/*
 * Isomorphic SmartClient
 * Version v13.1p_2026-05-28 (2026-05-28)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */

if(window.isc&&window.isc.module_Core&&!window.isc.module_Grids){isc.module_Grids=1;isc._moduleStart=isc._Grids_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'Grids load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="v13.1p_2026-05-28/LGPL Development Only"&&!isc.DevUtil){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v13.1p_2026-05-28/LGPL Development Only'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))}
isc.ClassFactory.defineClass("Selection");isc.A=isc.Selection.getPrototype();isc.A.enabledProperty="enabled";isc.A.canSelectProperty="canSelect";isc.A.cascadeSelection=false;isc.A.$q7=true;isc.A=isc.Selection;isc.A.NONE="none";isc.A.SINGLE="single";isc.A.MULTIPLE="multiple";isc.A.SIMPLE="simple";isc.A.$24e=0;isc.A=isc.Selection.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.trackByKey=false;isc.A.trackUnloadedItems=false;isc.A.cacheStateIndex=1;isc.A.$253p="**isc_null**";isc.A.$253e="**ROOT**";isc.A.accessResultSetCache=true;isc.A.defaultIsSelected=false;isc.A.$74f="up";isc.A.$74g="down";isc.A.selectionRangeNotLoadedMessage="Some records in the range you selected are not loaded.  Scroll through the entire range before selecting it.";isc.B.push(isc.A.init=function isc_Selection_init(){this.$27q=[];var _1=this.selectionProperty;if(!_1)this.selectionProperty="_selection_"+isc.Selection.$24e++;this.partialSelectionProperty="$74h"+this.selectionProperty;this.setData(this.data?this.data:[]);if(this.trackByKey&&!this.$251m()){this.logWarn("trackByKey was set to true for this Selection manager but no keyField was defined");this.trackByKey=false}
if(this.trackUnloadedItems&&!this.trackByKey){this.logWarn("selectionManager.trackUnloadedItems requires trackByKey:true - disabling trackUnloadedItems");this.trackUnloadedItems=false}
if(!_1)this.$q7=false},isc.A.destroy=function isc_Selection_destroy(){if(this.data)this.ignoreData(this.data);delete this.data;this.Super("destroy",arguments)},isc.A.setData=function isc_Selection_setData(_1){if(this.data!=null)this.ignoreData(this.data);this.data=_1;if(this.data!=null)this.observeData(this.data);this.markForRedraw()},isc.A.observeData=function isc_Selection_observeData(_1){var _2=isc.ResultSet&&isc.isA.ResultSet(_1);if(_2){this.observe(_1,"dataChanged",function(_3,_4,_5,_6,_7,_8){this.dataChanged(_3,_4,_5,_6,_7,_8)})}else{this.observe(_1,"dataChanged",function(){this.dataChanged()})}
if(_1.dataArrived){if(_2){this.observe(_1,"dataArrived",function(_3,_4,_5){this.dataArrived(_3,_4,_5)})}else{this.observe(_1,"dataArrived",function(){this.dataChanged()})}}},isc.A.ignoreData=function isc_Selection_ignoreData(_1){if(!_1)return;if(this.isObserving(_1,"dataChanged"))this.ignore(_1,"dataChanged");if(this.isObserving(_1,"dataArrived"))this.ignore(_1,"dataArrived")},isc.A.getKeyFields=function isc_Selection_getKeyFields(){if(this.keyField!=null){var _1=this.keyField;if(!isc.isAn.Array(_1)){_1=[_1]}
return _1}
var _2=this.getItemList(),_3=_2&&_2.getDataSource?_2.getDataSource():null;if(_3!=null){return _3.getPrimaryKeyFieldNames()}
return[]},isc.A.$251m=function isc_Selection__shouldTrackByKey(){return this.trackByKey&&(this.getKeyFields().length>0)},isc.A.$251n=function isc_Selection__shouldTrackUnloadedItems(){return this.trackUnloadedItems&&this.$251m()},isc.A.$251o=function isc_Selection__updateSelectionKeys(_1,_2,_3,_4){var _5=this.getKeyFields();var _6=_4?"$253f":"$251p";var _7=_4?false:this.defaultIsSelected;if(this[_6]==null)this[_6]={};var _8=this[_6];if(_2!=_7){for(var i=0;i<_5.length;i++){var _10=_5[i],_11=_1[_10];if(!isc.isA.String(_11)&&!isc.isA.Number(_11)){if(this.isRoot(_1)){_11=this.$253e}else if(_11==null){_11=this.$253p}else{this.logWarn("Unable to reliably track key-based selection for field:"+_10+" on item:"+this.echo(_1))}}
if(i==(_5.length-1)){_8[_11]=[_1,(_3?null:this.cacheStateIndex)]}else if(_8[_11]==null){_8[_11]={}}
_8=_8[_11]}}else{var _12=[];for(var i=0;i<_5.length;i++){var _10=_5[i],_11=_1[_10];if(_11==null)_11=this.$253p;if(_8[_11]==null)break;if(i==_5.length-1){delete _8[_11];var _13=i-1;while(_13>=0&&isc.isA.emptyObject(_8)){_8=_12[_13];var _14=_1[_5[_13]]
delete _8[_14];_13--}}else{_12.add(_8);_8=_8[_11]}}}},isc.A.$254a=function isc_Selection__clearUnloadedSelectionKeys(_1){var _2=this.getKeyFields();var _3=_1?"$253f":"$251p";if(this[_3]==null)return;var _4=this[_3];var _5=this.$254b(_4,_2,0);var _6=_1?false:this.defaultIsSelected;for(var i=0;i<_5.length;i++){this.$251o(_5[i][0],_6,true,_1)}},isc.A.$254b=function isc_Selection__findUnloadedSelectionKeys(_1,_2,_3){if(_3==_2.length-1){var _4=[];for(var _5 in _1){if(_1[_5][1]!=this.cacheStateIndex){_4.add(_1[_5[0]])}}
return _4}
var _4=[];for(var _5 in _1){_4.addList(this.$254b(_1[_5],_2,_3+1))}
return _4},isc.A.isRoot=function isc_Selection_isRoot(_1){var _2=this.data;return _2&&_2.isRoot!=null&&_2.isRoot(_1)},isc.A.$251q=function isc_Selection__selectionKeysContainsItem(_1,_2,_3){if(!this.$251p)return false;if(_3&&!this.$253f)return false;var _4=this.getKeyFields();var _5=_3?this.$253f:this.$251p;for(var i=0;i<_4.length;i++){var _7=_1[_4[i]];if(_7==null){if(this.isRoot(_1)){_7=this.$253e}else{_7=this.$253p}}
if(_5[_7]==null)return false;_5=_5[_7]}
if(_2){_5[0]=_1;_5[1]=this.cacheStateIndex}
return true},isc.A.setSelectedByKey=function isc_Selection_setSelectedByKey(_1,_2,_3){if(!this.$251m()){this.logWarn("This Selection is not configured to maintain selection by key");return}
var _4=this.getKeyFields();if(!isc.isAn.Object(_1)){if(_4.length==1){var _5=_1;_1={};_1[_4[0]]=_5}else{this.logWarn("setSelectedByKey - passed ambigous identifier:"+_1+" - this selection tracks multiple key fields")}}
var _6=this.getItemList();var _7={getPrimaryKeyFields:function(){var _8={};for(var i=0;i<_4.length;i++){_8[_4[i]]={name:_4[i]}}
return _8}};var _10;if(_3==null){var _11=_6.findByKeys(_1,_7);if(_11!=-1){_10=_6.get(_11)}}else if(_3){_10=_1}
if(_10!=null){this.setSelected(_10,_2)}else{this.$251o(_1,_2,true)}},isc.A.getSelectionByKeys=function isc_Selection_getSelectionByKeys(_1,_2){if(!this.$251m()){this.logWarn("This Selection is not configured to maintain selection by key");return}
if(this.$q7)this.cacheSelection();var _3=[];this.$251r(this.$251p,_3,this.getKeyFields(),[],_1);var _4=[];this.$251r(this.$253f,_4,this.getKeyFields(),[],_1);if(this.defaultIsSelected){if(!_2){_3.addList(_4)}}else{if(_2){_3.removeList(_4)}}
return _3},isc.A.$251r=function isc_Selection__getSelectionKeyValues(_1,_2,_3,_4,_5){if(_5&&!this.$251n())_5=false;var _6=isc.getKeys(_1);for(var i=0;i<_6.length;i++){var _8=_4.duplicate();_8.add(_6[i]);if(_8.length<_3.length){var _9=_1[_6[i]];this.$251r(_9,_2,_3,_8,_5)}else{if(!_5&&_1[_6[i]][1]!=this.cacheStateIndex){this.logDebug("Skipping stale record:"+this.echo(_1[_6[i]][0]));continue}
_2.add(_1[_6[i]][0])}}},isc.A.dataArrived=function isc_Selection_dataArrived(_1,_2,_3){if(!this.data)return;var _4,_5,_6,_7,_8;if(this.data.$52z()&&isc.isA.ResultSet(this.data)){_4=this.data.$572;_6=this.data.$573;_5=this.data.$574;_7=this.data.$575}
this.dataChanged(_4,_5,_7,_6,false,_3);if(this.data.$52z()){this.$143v=true}},isc.A.dataChanged=function isc_Selection_dataChanged(_1,_2,_3,_4,_5,_6){if(this.$143v){delete this.$143v;return}
if(!_5&&this.$279y){if(this.target&&(this.target.selectionChange||this.target.fireSelectionUpdated)){var _7=this.$279y,_8=this.getSelection(null,null,true);if(!_7.equals(_8)){if(this.target.selectionChange){for(var i=0;i<_7.length;i++){this.target.selectionChange(_7[i],false)}}
if(this.target.fireSelectionUpdated){this.target.fireSelectionUpdated()}}}
delete this.$279y}else if(_5){this.$279y=this.getSelection(null,null,true)}
if(this.reselectOnUpdate&&_1=="update"&&_2!=null&&this.isSelected(_2,_3))
{var _10=this.data.findByKey(_2);if(_10)this.performReselectOnUpdate(_10,_3)}else if(_6){if(this.$q7)this.cacheSelection();var _11=this.$27q,_12=[],_13=this.getItemList(),_14=_13.getLength();if(_11==null||(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_13)&&!_13.lengthIsKnown())){}else{for(var i=0;i<_14;i++){var _15=_13.getCachedRow(i),_16=_15==null?false:this.isSelected(_15,i);var _17;if(_16!=this.defaultIsSelected){_17=_11.contains(_15);if(_17||this.$251n()){_12.add(_15)}else{if(this.defaultIsSelected){this.select(_15,i)}else{this.deselect(_15,i)}}}}}}
this.markForRedraw();var _18=this.target,_19=(_18&&_18.getRuleScopeComponent?_18.getRuleScopeComponent():null);if(_19&&_10){var _20=false;var _21=isc.DataSource.get(this.data.dataSource);if(this.multipleSelected()){var _22=this.getSelection();if(_21!=null){var _23=_21.findByKeys(_2,_22);_20=_23==0}}else{_20=true}
if(_20){var _24=_18.getLocalId(),_25=_18.hasStableLocalID()||(_18.editNode!=null);_10=isc.shallowClone(_10);_19.provideRuleContext(_21.getID(),_10,_18,null,_25);if(_25){_19.provideRuleContext(_24+".selectedRecord",_10,_18,null,false)}}}},isc.A.performReselectOnUpdate=function isc_Selection_performReselectOnUpdate(_1){this.select(_1)},isc.A.markForRedraw=function isc_Selection_markForRedraw(){this.$q7=true;this.$156b=null},isc.A.isSelected=function isc_Selection_isSelected(_1,_2,_3){if(_3&&(this.cascadeSelection||!isc.isA.Tree(this.data))){_3=false}
if(this.$q7&&!(_3==true&&this.$156b!=null)&&!this.$89z){this.cacheSelection(_3)}
if(_1==null)return false;if(this.$251m()){var _4=this.$251q(_1,this.$89z);return(this.defaultIsSelected!=_4)}else{var _5=this.getSelectedFlag(_1,_2);return _5==null?this.defaultIsSelected:_5}},isc.A.isPartiallySelected=function isc_Selection_isPartiallySelected(_1){if(this.$q7&&!this.$89z)this.cacheSelection();if(_1==null)return false;if(this.$251m()){var _2=this.$251q(_1,this.$89z,true);return _2}else{return!!_1[this.partialSelectionProperty]}},isc.A.anySelected=function isc_Selection_anySelected(_1){if(!this.defaultIsSelected&&_1&&this.$251m()){return(this.$251p!=null&&!isc.isA.emptyObject(this.$251p))}
var _2=this.$251s(false,true);if(this.defaultIsSelected){return(this.getItemList().getLength()>_2.length)}else{return _2.length>0}},isc.A.getLength=function isc_Selection_getLength(){var _1=this.$251s(false,true);if(this.defaultIsSelected){return(_1.length-this.getItemList().getLength())}else{return _1.length}},isc.A.multipleSelected=function isc_Selection_multipleSelected(){return this.getLength()>1},isc.A.getSelection=function isc_Selection_getSelection(_1,_2){return this.$72c(_1,_2,true)},isc.A.$72c=function isc_Selection__getSelection(_1,_2,_3){if(_3!=this.defaultIsSelected){return this.$251s(_1,_2).duplicate()}else{if(!this.hasCompleteData()){var _4=(_3?"selected":"unselected");this.logInfo("Attempting to retrieve all "+_4+" items from incomplete data set where all items are "+_4+" by default. Only items that have been loaded will be returned. See the method 'selection.hasCompleteData()' for more information.")}
var _5=this.getItemList(),_6=_5.getLength();var _7=false;if(isc.isA.ResultSet(_5)){if(this.accessResultSetCache){_5=_5.localData||[]}else{_7=true}}
var _8=[];for(var i=0;i<_6;i++){var _10=_7?_5.getCachedRow(i):_5.get(i);if(_10==null||_10==Array.LOADING)continue;var _11=this.isSelected(_10,i);if(!_11&&!_1){_11=this.isPartiallySelected(_10,i)}
if(_11==_3){_8[_8.length]=_10}}
return _8}},isc.A.getUnselectedItems=function isc_Selection_getUnselectedItems(_1,_2){return this.$72c(_1,_2,false)},isc.A.$251s=function isc_Selection__getModifiedSelection(_1,_2){if(this.$q7){if(this.$89z)this.$89z=false;this.cacheSelection(false,_2)}
var _3=this.$27q;if(_1&&_3!=null&&_3.length>0){var _4=this.$27q;_3=[];for(var i=0;i<_4.length;i++){var _6=_4[i];if(!this.isPartiallySelected(_6)){_3[_3.length]=_6}}}
return _3},isc.A.getSelectedRecord=function isc_Selection_getSelectedRecord(){var _1=this.$251s()||[];if(this.defaultIsSelected){if(_1.length==this.data.getLength())return null;var _2=this.data&&isc.isA.ResultSet(this.data);for(var i=0;i<this.data.getLength();i++){var _4=_2?this.data.getCachedRow(i):this.data.get(i);if(this.isSelected(_4))return _4}}else{if(_1.length>0)return _1[0]}},isc.A.cacheSelection=function isc_Selection_cacheSelection(_1,_2){this.cacheStateIndex++;if(this.$890||this.$134v){return}else if(this.$89z){return}
var _3;if(_1){_3=this.$156b=[]}else{_3=this.$27q=[];this.$156b=null}
var _4=this.getItemList(_1,_2);var _5=false;if(this.accessResultSetCache&&isc.isA.ResultSet(_4)){_5=true;_4=_4.localData||[]}
var _6=!isc.isAn.Array(_4),_7=_4.getLength();if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_4)&&!_4.lengthIsKnown()){this.$q7=false;return}
this.$89z=true;this.$156c=_1;if(this.cascadeSelection){var _8=false;for(var i=0;i<_7;i++){var _10=_6?_4.getCachedRow(i):_4[i];if(_10!=null&&_10!==Array.LOADING&&(this.isSelected(_10,i,_1)!=this.defaultIsSelected))
{if(!this.isPartiallySelected(_10,i)){var _11=this.lastSelectionItem,_12=this.lastSelectionState,_13=this.lastSelectionPreviousState,_14=this.lastSelectionPartialValue,_15=this.lastSelectionPreviousPartialValue;this.setSelected(_10,!this.defaultIsSelected,i,null,true);this.lastSelectionItem=_11;this.lastSelectionState=_12;this.lastSelectionPreviousState=_13;this.lastSelectionPartialValue=_14;this.lastSelectionPreviousPartialValue=_15;_8=true}
if(!_8){_3[_3.length]=this.transformItemForCaching(_10,i)}}}
if(_8){if(_1){_3=this.$156b=[]}else{_3=this.$27q=[];this.$156b=null}
for(var i=0;i<_7;i++){var _10=_6?_4.getCachedRow(i):_4[i];if(_10!=null&&_10!==Array.LOADING&&(this.isSelected(_10,i,_1)!=this.defaultIsSelected))
{_3[_3.length]=this.transformItemForCaching(_10,i)}}}}else{if(_5){for(var i=0;i<_7;i++){var _10=_4[i];if(_10!=null&&_10!==Array.LOADING&&(this.isSelected(_10,i,_1)!=this.defaultIsSelected))
{_3[_3.length]=this.transformItemForCaching(_10,i)}}}else{for(var i=0;i<_7;i++){var _10=_6?_4.getCachedRow(i):_4[i];if(_10!=null&&(this.isSelected(_10,i,_1)!=this.defaultIsSelected)){_3[_3.length]=this.transformItemForCaching(_10,i)}}}}
if(this.trackByKey&&!this.trackUnloadedItems){this.$254a(true);this.$254a(false)}
this.$89z=false;if(!_1)this.$q7=false},isc.A.$110t=function isc_Selection__cacheSelectionAsync(_1,_2,_3,_4,_5){if(_5==null||_5.afterGetItemList){if(_5==null){if(this.$89z||this.$890||this.$134v){_4.call(_1);return}
var _6=this;this.$110u(_1,_2,_3,function(_8){var _5={data:_8,afterGetItemList:true};_1[_2]=_6.delayCall("$110t",[_1,_2,_3,_4,_5],0)});return}
_5.afterGetItemList=false;_5.cache=[];_5.length=_5.data.getLength();if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_5.data)&&!_5.data.lengthIsKnown()){this.$q7=false;this.$27q=_7;this.$156b=null;_4.call(_1);return}
this.$89z=true;this.$156c=false;_5.inFirstLoop=true;_5.delayCache=false;_5.i=0}
var _7=_5.cache,_8=_5.data,_9=_5.length,_10=_5.inFirstLoop,_11=_5.delayCache,i=_5.i,_13=this.$q7;this.$q7=false;if(_10){var _14=Math.min(_9,i+_3);for(;i<_14;i=_5.i=i+1){var _15=_8.getCachedRow(i);if(_15!=null&&(this.isSelected(_15,i)!=this.defaultIsSelected)){if(this.cascadeSelection&&!this.isPartiallySelected(_15)){this.setSelected(_15,true,null,null,true);_11=_5.delayCache=true}
if(!_11){_7[_7.length]=_15}}}
if(i!=_9){this.$q7=_13;if(_13)this.$156b=null;this.$89z=false;_1[_2]=this.delayCall("$110t",[_1,_2,_3,_4,_5],0);return}
_10=_5.inFirstLoop=false}
if(!_10&&_11){_7=_5.cache=[];i=_5.i=0;var _14=Math.min(_9,i+_3);for(;i<_9;i=_5.i=i+1){var _15=_8.getCachedRow(i);if(_15!=null&&(this.isSelected(_15,i)!=this.defaultIsSelected)){_7[_7.length]=_15}}
if(i!=_9){this.$q7=_13;if(_13)this.$156b=null;this.$89z=false;_1[_2]=this.delayCall("$110t",[_1,_2,_3,_4,_5],0);return}}
this.$89z=false;this.$q7=false;this.$27q=_7;this.$156b=null;_4.call(_1);return},isc.A.setDefaultIsSelected=function isc_Selection_setDefaultIsSelected(_1){if(this.defaultIsSelected==_1)return;this.defaultIsSelected=_1;this.markForRedraw();var _2=this.$251s();this.selectList(_2,_1)},isc.A.hasCompleteData=function isc_Selection_hasCompleteData(){var _1=this.getItemList();if(_1&&isc.ResultSet&&isc.isA.ResultSet(_1)&&!_1.allMatchingRowsCached()){return false}
return true},isc.A.setSelected=function isc_Selection_setSelected(_1,_2,_3,_4,_5){if(this.data==null||this.data.destroyed){return false}
isc.Selection.$102q(!isc.isA.MultiLinkSelection(this)||this.data.isMultiLinkTree());_1=this.transformItem(_1,_3);_3=this.transformRecordNum(_3);if(!this.$1596(_1))return false;var _6=this.$890;this.$890=true;var _7=this.data.childrenProperty||"children",_8=this.selectionProperty,_9=this.partialSelectionProperty,_10=false;var _11=(_10?_1.getAttribute(_9):this.isPartiallySelected(_1,_3));if(_2==null)_2=true;if(this.cascadeSelection&&!this.useRemoteSelection){if(_4==this.$74f){var _12=false,_13=_1[_7]?_1[_7].length:0;for(var i=0;i<_13;i++){var _15=_1[_7].get(i),_16=false;var _17=(_16?_15.getAttribute(_9):this.isPartiallySelected(_15,_3+i));;if(_17||(_2&&!this.isSelected(_15,_3+i))||(!_2&&this.isSelected(_15,_3+i)))
{_12=true;break}}
if(_10){_1.setAttribute(_9,_12+"")}else{if(this.$251m()){this.$251o(_1,_12,false,true)}else{this.setPartiallySelectedFlag(_1,_3,_12)}}
if(_2!=_12)_2=true}else if(_1[_7]&&_1[_7].length>0){if(_10){_1.removeAttribute(_9)}else{if(this.$251m()){this.$251o(_1,false,false,true)}else{this.clearPartiallySelectedFlag(_1,_3)}}}}
var _18=_10?_1.getAttribute(_8):this.isSelected(_1,_3);if(_18==null)_18=false;if(_10){_1.setAttribute(_8,(_2==true)+"")}else{if(this.$251m()){this.$251o(_1,_2)}else{this.setSelectedFlag(_1,_3,_2)}}
this.lastSelectionItem=_1;this.lastSelectionState=_2;this.lastSelectionPreviousState=_18;this.lastSelectionPartialValue=_12;this.lastSelectionPreviousPartialValue=_11;var _19=(_10?_1.getAttribute(_9):this.isPartiallySelected(_1,_3));var _20=true;if(_2==_18&&_19==_11){_20=false}
if(!_5&&_20==false){if(!_6)this.$890=false;return false}
this.markForRedraw();if(this.cascadeSelection&&!this.useRemoteSelection)
{var _21=_1,_22=_2,_23=_18,_24=_12,_25=_11;this.preserveAdditionalSetSelectionState();var _26=false;if(this.cascadeSyncOnly==null){_26=true;this.cascadeSyncOnly=!_20}
if(_4!=this.$74f&&!_10&&_1[_7]&&_1[_7].length>0)
{this.selectList(_1[_7],_2)}
if(_20||_26){if(_4!=this.$74g&&isc.isA.Tree(this.data)){var _27=this.getParent(_1);if(_27){this.recurseSelectionUpward(_27,_2,_3,this.$74f)}}}
this.lastSelectionItem=_21;this.lastSelectionState=_22;this.lastSelectionPreviousState=_23;this.lastSelectionPartialValue=_24;this.lastSelectionPreviousPartialValue=_25;this.restoreAdditionalSetSelectionState();if(_26){this.cascadeSyncOnly=null}}
if(!_6)this.$890=false;if(_20&&this.target&&this.target.selectionChange){this.target.selectionChange(_1,_2)}
return true},isc.A.transformItem=function isc_Selection_transformItem(_1,_2){return _1},isc.A.transformRecordNum=function isc_Selection_transformRecordNum(_1){return _1},isc.A.transformItemForCaching=function isc_Selection_transformItemForCaching(_1,_2){return _1},isc.A.getRange=function isc_Selection_getRange(_1,_2){return this.data.getRange(_1,_2)},isc.A.getPartiallySelectedFlag=function isc_Selection_getPartiallySelectedFlag(_1,_2){return _1[this.partialSelectionProperty]},isc.A.setPartiallySelectedFlag=function isc_Selection_setPartiallySelectedFlag(_1,_2,_3){_1[this.partialSelectionProperty]=_3},isc.A.clearPartiallySelectedFlag=function isc_Selection_clearPartiallySelectedFlag(_1,_2){delete _1[this.partialSelectionProperty]},isc.A.getSelectedFlag=function isc_Selection_getSelectedFlag(_1,_2){return _1[this.selectionProperty]},isc.A.setSelectedFlag=function isc_Selection_setSelectedFlag(_1,_2,_3){_1[this.selectionProperty]=_3},isc.A.clearSelectedFlag=function isc_Selection_clearSelectedFlag(_1,_2){delete _1[this.selectionProperty]},isc.A.getParent=function isc_Selection_getParent(_1,_2){return this.data.getParent(_1)},isc.A.recurseSelectionUpward=function isc_Selection_recurseSelectionUpward(_1,_2,_3,_4){this.setSelected(_1,_2,_3,_4)},isc.A.preserveAdditionalSetSelectionState=function isc_Selection_preserveAdditionalSetSelectionState(){},isc.A.restoreAdditionalSetSelectionState=function isc_Selection_restoreAdditionalSetSelectionState(){},isc.A.getLastIndex=function isc_Selection_getLastIndex(_1,_2){return this.data.fastIndexOf?this.data.fastIndexOf(_1):this.data.indexOf(_1)},isc.A.getBaseIndex=function isc_Selection_getBaseIndex(){return this.data.fastIndexOf?this.data.fastIndexOf(this.$1895):this.data.indexOf(this.$1895)},isc.A.$1596=function isc_Selection__canSelectItem(_1){if(_1==null){return false}
if(_1[this.enabledProperty]==false)return false;if(_1[this.canSelectProperty]==false)return false;return true},isc.A.select=function isc_Selection_select(_1){return this.setSelected(_1,true)},isc.A.deselect=function isc_Selection_deselect(_1){return this.setSelected(_1,false)},isc.A.selectSingle=function isc_Selection_selectSingle(_1,_2){var _3,_4;if(this.isSelected(_1,null,true)&&this.$251s().length==1){return false}
this.$251t=true;_3=this.deselect(_1);if(_2||this.defaultIsSelected){_4=this.deselectAll(_2)}else{_4=this.deselectList(this.$251s())}
this.select(_1);this.$251t=false;return!_3||_4},isc.A.selectList=function isc_Selection_selectList(_1,_2,_3,_4,_5){if(_2==null)_2=true;if(!_1)return false;if(this.$q7)this.cacheSelection();var _6=this.$27q;var _7=_1.getLength();if(_3==null){_3=[];var _8=this.getItemList();var _9=false,_10=null,_11=null;if(_4!=null){_11=_4.getDataSource();_10=_11&&_11.getPrimaryKeyFields();if(_10&&isc.isA.emptyObject(_10))_10=null}
if(this.accessResultSetCache&&isc.isA.ResultSet(_8)){_9=true;_8=_8.localData||[]}
for(var i=0;i<_7;i++){var _13=_1.get(i),_14=this.isSelected(_13,i),_15=null;if(_14==_2)continue;if(isc.MultiLinkSelection&&isc.isA.MultiLinkSelection(this)){this.$102q(_13.openListIndex!=null);_15=_8[_13.openListIndex]}else if(_10){var _16=_11&&_11.filterPrimaryKeyFields(_13);if(_16){_15=_8.findIndex(_16);if(_15>=0)_13=_8[_15]}}else{_15=_8.fastIndexOf(_13)}
if((_15==null||_15==-1)&&!_5){continue}
if(this.$1596(_13))_3[_3.length]=_13}}else{if(_6===_3)_3=_3.duplicate()}
var _17=false,_7=_3.length;var _18=this.$134v;this.$134v=true;var _19=this.$915;this.$915=_7>1?true:false;if(_7>0)this.$156b=null;for(var i=0;i<_7;i++){var _13=_3[i];if(_2!=this.defaultIsSelected){_6[_6.length]=_13}else{_6.remove(_13)}
_17=this.setSelected(_13,_2)||_17}
this.$134v=_18;if(this.cascadeSelection){if(this.$q7)this.cacheSelection()}else{this.$q7=false}
this.$915=_19;return _17},isc.A.deselectList=function isc_Selection_deselectList(_1,_2,_3){return this.selectList(_1,false,null,_2,_3)},isc.A.selectAll=function isc_Selection_selectAll(_1,_2){if(_1)return this.selectRange(0,this.data.getLength());if(this.defaultIsSelected){var _3=this.$251s(false,true);var _4=this.selectList(_3,true,_3);if(_2&&this.$251n()){if(this.anySelected(true)){_4=true;this.$251p={}}}
this.$q7=false;this.$27q=[];this.$156b=null;return _4}else{var _4=this.selectList(this.getItemList());if(_2){if(this.$251m()){this.setDefaultIsSelected(true)}else{this.logInfo("selectAll() selectUnloadedItems parameter requires trackByKey:true - ignoring")}}
return _4}},isc.A.deselectAll=function isc_Selection_deselectAll(_1){if(this.defaultIsSelected){_3=this.selectList(this.getItemList(),false);if(_1&&this.$251m()){this.setDefaultIsSelected(false)}}else{var _2=this.$251s(false,true);var _3=this.selectList(_2,false,_2);if(_1&&this.$251n()){if(this.anySelected(true)){_3=true;this.$251p={}}}
this.$q7=false;this.$27q=[];this.$156b=null}
return _3},isc.A.clearSelection=function isc_Selection_clearSelection(_1){if(this.defaultIsSelected){this.selectAll(null,_1)}else{this.deselectAll(_1)}},isc.A.selectItem=function isc_Selection_selectItem(_1){return this.selectRange(_1,_1+1)},isc.A.deselectItem=function isc_Selection_deselectItem(_1){return this.deselectRange(_1,_1+1)},isc.A.selectRange=function isc_Selection_selectRange(_1,_2,_3){if(_3==null)_3=true;var _4=this.data;if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_4)&&!_4.rangeIsLoaded(_1,_2))
{this.warnSelectionRangeNotLoaded();return false}
return this.selectList(this.getRange(_1,_2),_3)},isc.A.warnSelectionRangeNotLoaded=function isc_Selection_warnSelectionRangeNotLoaded(){this.logWarn("selectRange called - selection range not loaded. Showing selectionRangeNotLoadedMessage to the user.");isc.warn(this.selectionRangeNotLoadedMessage)},isc.A.deselectRange=function isc_Selection_deselectRange(_1,_2){return this.selectRange(_1,_2,false)},isc.A.selectOnMouseDown=function isc_Selection_selectOnMouseDown(_1,_2){var _3=_1.selectionType||isc.Selection.MULTIPLE;if(_3==isc.Selection.NONE)return false;var _4=this.lastRow;this.startRow=this.lastRow=_2;this.logDebug("selectOnMouseDown: recordNum: "+_2);var _5=this.data.get(_2),_6=this.isSelected(_5,_2,true)&&(this.deselectOnPartialCheckboxClick||!this.isPartiallySelected(_5,_2)),_7;if(Array.isLoading(_5))return false;this.deselectRecordOnMouseUp=false;this.deselectOthersOnMouseUp=false;var _8=this.$31q;this.$31q=_5;var _9=isc.Browser.isMac?isc.EventHandler.metaKeyDown():isc.EventHandler.ctrlKeyDown(),_10=isc.EH.shiftKeyDown();if(_3==isc.Selection.SINGLE||!_10){this.$1895=null}
if(_3==isc.Selection.SINGLE){if(_9&&_6)this.deselect(_5,_2);else if(!_6)this.selectSingle(_5,_2);else return false;return true}else if(_10){if(!this.anySelected()&&this.shiftSelectFallbackMode!="top"){this.$1895=_5;this.select(_5,_2)}else{if(!this.$1895){this.$2031=_4;this.$1895=_8=this.$1896(_2,_8)}
var _11=this.data;var _12=this.getLastIndex(_8,_4),_13=this.getBaseIndex();var _14=_13>_2,_15=_13<=_2,_16=_2-_12;if(_13>_2){if(_16<0){if(_12>_13){this.deselectRange(_13+1,_12+1);_12=_13}
this.selectRange(_2,_12)}
else if(_16>0)this.deselectRange(_12,_2)}else if(_13<=_2){if(_16>0){if(_12<_13){this.deselectRange(_12,_13);_12=_13}
this.selectRange(_12,_2+1)}
else if(_16<0)this.deselectRange(_2+1,_12+1)}}
return true}else if(_3==isc.Selection.SIMPLE){if(!_6){this.select(_5,_2);return true}else{this.deselectRecordOnMouseUp=true;return false}}else if(_9){if(_6){this.deselect(_5,_2)}else{this.select(_5,_2)}
return true}else{if(!_6){this.selectSingle(_5,_2);return true}else if(isc.EventHandler.rightButtonDown()){this.deselectOnDragMove=true;return false}else{if(this.dragSelection){if(this.simpleDeselect){this.deselectAll();this.selectOriginOnDragMove=true;return true}
this.selectSingle(_5,_2);return true}else{if(this.simpleDeselect){this.deselectAllOnMouseUp=true}else{this.deselectOthersOnMouseUp=this.anySelected()}
return false}}}},isc.A.$1896=function isc_Selection__calculateShiftSelectBaseRecord(_1,_2){if(_2&&this.isSelected(_2,_1)){return _2}else{var _3,_4=this.data;for(var i=_1-1;i>=0;i--){var _6=_4.getCachedRow(i);if(!_6||Array.isLoading(_6)){i++;break}
if(this.isSelected(_6,i)){_3=true;break}}
if(!_3&&this.shiftSelectFallbackMode!="top"){for(var j=_1+1;j<_4.getLength();j++){var _6=_4.getCachedRow(j);if(!_6||Array.isLoading(_6)){j--;break}
if(this.isSelected(_6,j)){i=j;break}}}
return _4.getCachedRow(Math.max(0,i))||_2}});isc.evalBoundary;isc.B.push(isc.A.selectOnDragMove=function isc_Selection_selectOnDragMove(_1,_2){var _3=this.startRow,_4=this.lastRow;if(_2<0){this.logWarn("selectOnDragMove: got negative coordinate: "+_2);return}
if(_2==_4)return;if(this.selectOriginOnDragMove){this.select(this.data.getItem(_3));this.selectOriginOnDragMove=false}else if(this.deselectOnDragMove||this.deselectAllOnMouseUp||this.deselectOthersOnMouseUp){this.selectSingle(this.data.getItem(_3));this.deselectAllOnMouseUp=this.deselectOthersOnMouseUp=this.deselectOnDragMove=false}
if((_2>_3&&_3>_4)||(_4>_3&&_3>_2))
{this.deselectAll();if(_3>_2){this.selectRange(_2,_3+1)}else{this.selectRange(_3,_2+1)}}else if(_3>=_4&&_4>_2){this.selectRange(_2,_4)}else if(_3>=_2&&_2>_4){this.deselectRange(_4,_2)}else if(_3<=_2&&_2<_4){this.deselectRange(_2+1,_4+1)}else if(_3<=_4&&_4<_2){this.selectRange(_4,_2+1)}else{this.logWarn("dragMove case not handled: lastRow: "+_4+", currRow: "+_2+", startRow "+_3)}
this.lastRow=_2},isc.A.selectOnMouseUp=function isc_Selection_selectOnMouseUp(_1,_2){if(_1.selectionType==isc.Selection.NONE)return false;this.logDebug("selectOnMouseUp: recordNum: "+_2);var _3=false;if(this.deselectOthersOnMouseUp){_3=this.selectSingle(this.data.getItem(_2),_2);this.deselectOthersOnMouseUp=false}else if(this.deselectRecordOnMouseUp){_3=this.deselect(this.data.getItem(_2),_2);this.deselectRecordOnMouseUp=false}else if(this.deselectAllOnMouseUp){_3=this.deselectAll();this.deselectAllOnMouseUp=false}
return _3},isc.A.getItemList=function isc_Selection_getItemList(_1,_2){var _3=this.data;if(isc.isA.Tree(_3))return _3.getNodeList(_1,_2);return(_3!=null?_3:[])},isc.A.$110u=function isc_Selection__getItemListAsync(_1,_2,_3,_4){if(this.data&&isc.isA.Tree(this.data)&&isc.isA.Function(this.data.$110q)){this.data.$110q(_1,_2,_3,_4)}else{_4.call(_1,this.getItemList())}});isc.B._maxIndex=isc.C+71;isc.ClassFactory.defineClass("MultiLinkSelection",isc.Selection);isc.A=isc.MultiLinkSelection.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.select=function isc_MultiLinkSelection_select(_1,_2){return this.setSelected(_1,true,_2)},isc.A.deselect=function isc_MultiLinkSelection_deselect(_1,_2){return this.setSelected(_1,false,_2)},isc.A.selectSingle=function isc_MultiLinkSelection_selectSingle(_1,_2){var _3,_4;_3=this.deselect(_1,_2);_4=this.deselectAll();this.select(_1,_2);return!_3||_4},isc.A.transformItem=function isc_MultiLinkSelection_transformItem(_1,_2){this.$102q(this.data.isMultiLinkTree()&&(this.data.isANodeLocator(_1)||_2!=null));if(this.data.isANodeLocator(_1)){this.lastSelectionNodeLocator=_1}else{this.$102q(isc.isA.Number(_2)&&_2>=0);this.lastSelectionNodeLocator=this.data.getNodeLocator(_2)}
this.lastSelectionRecordNum=_2!=null?_2:this.lastSelectionNodeLocator.openListIndex;return this.lastSelectionNodeLocator.node},isc.A.transformRecordNum=function isc_MultiLinkSelection_transformRecordNum(_1){return _1!=null?_1:this.lastSelectionRecordNum},isc.A.transformItemForCaching=function isc_MultiLinkSelection_transformItemForCaching(_1,_2){this.$102q(this.data.isMultiLinkTree());var _3;if(this.data.isANodeLocator(_1)){_3=_1}else{isc.MultiLinkSelection.$102q(isc.isA.Number(_2)&&_2>=0);_3=this.data.getNodeLocator(_2)}
this.$102q(_1==_3||_1[this.data.idField]==_3.node[this.data.idField]);return _3},isc.A.getRange=function isc_MultiLinkSelection_getRange(_1,_2){var _3=[];for(var i=_1;i<_2;i++){_3.add(this.data.getNodeLocator(i))}
return _3},isc.A.getPartiallySelectedFlag=function isc_MultiLinkSelection_getPartiallySelectedFlag(_1,_2,_3){var _4;if(_2!=null){_4=this.data.getNodeLocator(_2)}else if(_3){_4=this.lastSelectionNodeLocator}
return this.data.$2018(_4)},isc.A.setPartiallySelectedFlag=function isc_MultiLinkSelection_setPartiallySelectedFlag(_1,_2,_3,_4){var _5;if(_2!=null){_5=this.data.getNodeLocator(_2)}else if(_4){_5=this.lastSelectionNodeLocator}
this.data.$2019(_5,_3)},isc.A.clearPartiallySelectedFlag=function isc_MultiLinkSelection_clearPartiallySelectedFlag(_1,_2,_3){var _4;if(_2!=null){_4=this.data.getNodeLocator(_2)}else if(_3){_4=this.lastSelectionNodeLocator}
this.data.$2019(_4,null)},isc.A.getSelectedFlag=function isc_MultiLinkSelection_getSelectedFlag(_1,_2,_3){var _4;if(_2!=null){_4=this.data.getNodeLocator(_2)}else if(_3){_4=this.lastSelectionNodeLocator}
return this.data.$2016(_4)},isc.A.setSelectedFlag=function isc_MultiLinkSelection_setSelectedFlag(_1,_2,_3){this.$102q(isc.isA.Number(_2)&&_2>=0)
var _4=this.data.getNodeLocator(_2);this.$102q(!!_4)
this.data.$2017(_4,_3)},isc.A.clearSelectedFlag=function isc_MultiLinkSelection_clearSelectedFlag(_1,_2){var _3=this.data.getNodeLocator(_2);this.data.$2017(_3,null)},isc.A.getParent=function isc_MultiLinkSelection_getParent(_1,_2){var _3=this.data.getNodeLocator(_2);return this.data.$202h(_3)},isc.A.recurseSelectionUpward=function isc_MultiLinkSelection_recurseSelectionUpward(_1,_2,_3,_4){isc.MultiLinkSelection.$102q(this.data.isANodeLocator(_1));this.setSelected(_1,_2,_1.openListIndex,_4)},isc.A.preserveAdditionalSetSelectionState=function isc_MultiLinkSelection_preserveAdditionalSetSelectionState(){if(!this.$202o){this.$202o=[];this.$202p=[]}
this.$202o.push(this.lastSelectionNodeLocator);this.$202p.push(this.lastSelectionRecordNum)},isc.A.restoreAdditionalSetSelectionState=function isc_MultiLinkSelection_restoreAdditionalSetSelectionState(){if(!this.$202o)return;this.lastSelectionNodeLocator=this.$202o.pop();this.lastSelectionRecordNum=this.$202p.pop()},isc.A.cacheSelection=function isc_MultiLinkSelection_cacheSelection(_1,_2){this.Super("cacheSelection",[true,_2],arguments);if(this.$156b){this.$156b.$27q=null;this.$27q=this.$156b}
this.$q7=false},isc.A.isSelected=function isc_MultiLinkSelection_isSelected(_1,_2,_3){_3=true;this.$102q(this.data.isANodeLocator(_1)||isc.isA.Number(_2));if(_3&&(this.cascadeSelection||!isc.isA.Tree(this.data))){}
if(this.$q7&&!(_3==true&&this.$156b!=null)&&!this.$89z){this.cacheSelection(_3)}
if(_1==null)return false;var _4=_1;if(!this.data.isANodeLocator(_1)){_4=this.data.getNodeLocator(_2)}
if(_4==null){return false}
return this.data.$2016(_4)},isc.A.isPartiallySelected=function isc_MultiLinkSelection_isPartiallySelected(_1,_2){this.$102q(isc.isA.Number(_2)&&_2>=0);if(this.$q7&&!this.$89z)this.cacheSelection();if(_1==null)return false;return this.data.$2018(this.data.getNodeLocator(_2))},isc.A.performReselectOnUpdate=function isc_MultiLinkSelection_performReselectOnUpdate(_1,_2){this.select(_1,_2)},isc.A.getSelectedRecord=function isc_MultiLinkSelection_getSelectedRecord(){var _1=this.Super("getSelectedRecord",arguments);if(this.data.isANodeLocator(_1)){_1=_1.node}
return _1},isc.A.getSelection=function isc_MultiLinkSelection_getSelection(){return this.Super("getSelection",arguments)},isc.A.getSelectedRecords=function isc_MultiLinkSelection_getSelectedRecords(){var _1=this.getSelection();if(!_1||_1.length==0)return _1;if(this.data.isANodeLocator(_1[0])){var _2=_1;_1=[];for(var i=0;i<_2.length;i++){_1[_1.length]=_2[i].node}}
return _1},isc.A.selectList=function isc_MultiLinkSelection_selectList(_1,_2,_3,_4,_5){var _6=this.invokeSuper(isc.MultiLinkSelection,"selectList",_1,_2,_3,_4,true);if(_6){this.$q7=true;this.cacheSelection()}
return _6},isc.A.getLastIndex=function isc_MultiLinkSelection_getLastIndex(_1,_2){return _2},isc.A.getBaseIndex=function isc_MultiLinkSelection_getBaseIndex(){return this.$2031});isc.B._maxIndex=isc.C+27;isc.ClassFactory.defineClass("DetailViewer","Canvas","DataBoundComponent");isc.A=isc.DetailViewer;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.classAllowedForParam=function isc_c_DetailViewer_classAllowedForParam(_1,_2,_3){if(_1=="viewSelectedData"&&_2=="selectionComponent"){return!isc.isA.Menu(_3)}
return true});isc.B._maxIndex=isc.C+1;isc.A=isc.DetailViewer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.dataFetchMode="basic";isc.A.dataArity="either";isc.A.rowHeight=19;isc.A.fieldIdProperty="name";isc.A.recordsPerBlock=1;isc.A.blockSeparator="<br><br>";isc.A.showEmptyField=true;isc.A.emptyCellValue="&nbsp;";isc.A.labelPrefix="";isc.A.labelSuffix=":";isc.A.wrapValues=true;isc.A.useInnerWidth=true;isc.A.clipValues=false;isc.A.styleName="detailViewer";isc.A.blockStyle="detailBlock";isc.A.labelStyle="detailLabel";isc.A.cellStyle="detail";isc.A.headerStyle="detailHeader";isc.A.separatorStyle="detail";isc.A.cellPadding=3;isc.A.linkTextProperty="linkText";isc.A.showEmptyMessage=true;isc.A.emptyMessage="No items to display.";isc.A.emptyMessageStyle="normal";isc.A.loadingMessage="&nbsp;${loadingImage}";isc.A.loadingMessageStyle="normal";isc.A.defaultHeight=35;isc.A.showLabel=true;isc.B.push(isc.A.$275t=function isc_DetailViewer__getFieldGeneratorId(_1){if(_1.userFormula)return"userFormula";if(_1.userSummary)return"userSummary"});isc.B._maxIndex=isc.C+1;isc.A=isc.DetailViewer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$g4="date";isc.A.supportedViewStates=[{stateType:"field",getter:"getFieldStateAsObject",setter:"setFieldState"},{stateType:"hilite",getter:"getHiliteStateAsObject",setter:"setHiliteState"}];isc.A.fieldPickerWindowDefaults={autoParent:"none",_constructor:"FieldPickerWindow"};isc.A.canPickFields=false;isc.A.configureFieldsText="Configure Fields...";isc.A.fieldPickerFieldProperties=null;isc.B.push(isc.A.initWidget=function isc_DetailViewer_initWidget(){if(this.labelAlign==null)this.labelAlign=this.isRTL()?"left":"right";if(this.valueAlign==null)this.valueAlign=this.isRTL()?"right":"left";this.Super("initWidget",arguments);if(this.dataSource)this.dataSource=this.getDataSource();if(this.fieldState!=null)this.setFieldState(this.fieldState);else this.setFields(this.fields);if(this.canPickFields){this.contextMenu=isc.Menu.create({data:[this.createFieldPickerWindowMenuItem(this.configureFieldsText)]})}},isc.A.setData=function isc_DetailViewer_setData(_1){if(this.data)this.ignore(this.data,"dataChanged");this.invalidateUserCache();this.data=_1;if(this.data&&this.data.dataChanged){this.observe(this.data,"dataChanged","observer.dataChanged()")}
this.markForRedraw("new data")},isc.A.dataChanged=function isc_DetailViewer_dataChanged(){this.setFields(this.completeFields);this.invalidateUserCache(null,null,"dataChanged");this.applyHilites();this.markForRedraw()},isc.A.getData=function isc_DetailViewer_getData(){return this.data},isc.A.getFields=function isc_DetailViewer_getFields(){return this.fields},isc.A.draw=function isc_DetailViewer_draw(_1,_2,_3,_4){this.invokeSuper(isc.DetailViewer,"draw",_1,_2,_3,_4);this.$172u()},isc.A.getInnerHTML=function isc_DetailViewer_getInnerHTML(){var _1=this.getData();if(this.fields==null||this.fields.length==0){return"Note: you must define detailViewer.fields to specify what to display!"}
if(isc.ResultSet!=null&&isc.isA.ResultSet(_1)&&!_1.lengthIsKnown()){_1.get(0);return this.loadingMessageHTML()}
if(_1==null||(_1.getLength&&_1.getLength()==0)){return this.emptyMessageHTML()}
if(!isc.isA.List(_1))_1=[_1];if(Array.isLoading(_1.get(0))&&this.isOffline()){return this.emptyMessageHTML()}
if(_1.getLength()==1||this.recordsPerBlock=="*"){return this.getBlockHTML(_1)}else{var _2=isc.StringBuffer.create();for(var _3=0;_3<_1.getLength();_3+=this.recordsPerBlock){_2.append(this.getBlockHTML(_1.getRange(_3,_3+this.recordsPerBlock)),this.blockSeparator)}
return _2.release(false)}},isc.A.getBlockHTML=function isc_DetailViewer_getBlockHTML(_1){if(_1.getLength==null){var _2=[];for(var i=0;i<_1.length;i++){_2[i]=_1[i]}
_1=_2}
var _4=_1.getLength();var _5="<TABLE BORDER=0 CELLSPACING=0 CLASS='"+this.blockStyle+"' CELLPADDING='"+this.cellPadding+"' style='width:"+(this.useInnerWidth&&!this.isPrinting?this.getInnerWidth()+"px":"100%")+(this.clipValues?";table-layout:fixed":"")+"'>";var _6=this.fields;for(var _7=0,_8=_6.length;_7<_8;_7++){var _9=_6[_7];if(!_9||_9.hidden||_9.visible==false)continue;if(_9.showIf){if(!isc.isA.Function(_9.showIf)){isc.Func.replaceWithMethod(_9,"showIf","viewer,valueList")}
if(_9.showIf(this,_1)==false)continue}
var _10=_9.type?_9.type:"";if(_10!="separator"&&_10!="header"&&!this.showEmptyField){var _11=true;for(var i=0;i<_1.getLength();i++){var _12=_1.get(i)[_9.name]
if(!(_12==null||_12=="")){_11=false;break}}
if(_11)continue}
if(_9.output){if(!isc.isA.Function(_9.output)){isc.Func.replaceWithMethod(_9,"output","fieldNum,field,valueList")}
_5+=_9.output(_7,_9,_1)}else{_5+=this.outputItem(_7,_9,_1)}}
_5+="</TABLE>";return _5},isc.A.fieldIsVisible=function isc_DetailViewer_fieldIsVisible(_1){var _2=_1;if(!isc.isAn.Object(_2))_2=this.getSpecifiedField(_1);return this.fields.contains(_2)},isc.A.outputItem=function isc_DetailViewer_outputItem(_1,_2,_3){var _4=(_2.type?_2.type:"value"),_5="output_"+_4,_6="";if(!this[_5])_5="output_value";_6+="<TR "+(this.rowHeight!=null?"HEIGHT='"+this.rowHeight+"'":"")+(this.rowClass!=null?" CLASS='"+this.rowClass+"'":"")+">";_6+=this[_5](_1,_2,_3);_6+="</TR>\r";return _6},isc.A.output_blob=function isc_DetailViewer_output_blob(_1,_2,_3){return this.output_binary(_1,_2,_3)},isc.A.output_upload=function isc_DetailViewer_output_upload(_1,_2,_3){return this.output_binary(_1,_2,_3)},isc.A.output_binary=function isc_DetailViewer_output_binary(_1,_2,_3){var _4="<TD WIDTH=10% CLASS='"+(this.isPrinting?this.printLabelStyle||this.labelStyle:this.labelStyle)+"' style='text-align:"+this.labelAlign+";'"+(this.wrapLabel?">":" NOWRAP><NOBR>")+this.labelPrefix+(_2.title?_2.title:_2.name)+this.labelSuffix+(this.wrapLabel?"":"<\/NOBR>")+"<\/TD>";for(var i=0;i<_3.getLength();i++){var _6=_3.get(i),_7=this.getData().indexOf(_6),_8=this.dataSource?isc.DS.getDataSource(this.dataSource).getFilenameField(_2.name):_2.name+"_filename",_9=_6[_8],_10=isc.Canvas.POINTER_OR_HAND,_11="'"+this.getID()+".view",_12="'"+this.getID()+".download",_13="";if(_2&&_2.name){_13="Cell("+_7+", \""+_2.name+"\")'"}else{_13="Row("+_7+")'"}
var _14=isc.Canvas.imgHTML("[SKIN]actions/view.png",16,16,null,"style='cursor:"+_10+"' onclick="+_11+_13);var _14=isc.Canvas.imgHTML("[SKIN]actions/view.png",16,16,null,"style='cursor:"+_10+"' onclick="+_11+_13),_15=isc.Canvas.imgHTML("[SKIN]actions/download.png",16,16,null,"style='cursor:"+_10+"' onclick="+_12+_13),_16=_14+"&nbsp;"+_15+(_9?"&nbsp;"+_9:"");_4+="<TD CLASS='"+this.getCellStyle(_16,_2,_6,this)+"'>"+_16+"<\/TD>"}
return _4},isc.A.viewRow=function isc_DetailViewer_viewRow(_1){isc.DS.get(this.dataSource).viewFile(this.getData().get(_1))},isc.A.downloadRow=function isc_DetailViewer_downloadRow(_1){isc.DS.get(this.dataSource).downloadFile(this.getData().get(_1))},isc.A.viewCell=function isc_DetailViewer_viewCell(_1,_2){isc.DS.get(this.dataSource).viewFile(this.getData().get(_1),_2)},isc.A.downloadCell=function isc_DetailViewer_downloadCell(_1,_2){isc.DS.get(this.dataSource).downloadFile(this.getData().get(_1),_2)},isc.A.output_value=function isc_DetailViewer_output_value(_1,_2,_3){var _4;if(this.showLabel){_4="<TD WIDTH="+(this.labelWidth!=null?this.labelWidth:"10%")+" CLASS='"+(this.isPrinting?this.printLabelStyle||this.labelStyle:this.labelStyle)+"' style='text-align:"+this.labelAlign+";'"+(this.wrapLabel?">":" NOWRAP><NOBR>")+this.labelPrefix+(_2.title?_2.title:_2.name)+this.labelSuffix+(this.wrapLabel?"":"<\/NOBR>")+"<\/TD>"}else{_4=""}
if(_2.valueMap&&isc.isA.String(_2.valueMap))
_2.valueMap=this.getGlobalReference(_2.valueMap);for(var i=0;i<_3.getLength();i++){var _6=_3.get(i),_7="",_8;if(_2.type=="image"){var _9=this.getCellValue(_6,_2);if(_9==this.$122r(_2)){_8=this.$122r(_2)}else{_8=this.formatValueAsImage(_9,_2,_6)}}else if(_2.type=="link"){var _10=_2.target||"_blank",_11=_2.linkTextProperty||this.linkTextProperty,_12=this.getCellValue(_6,_2),_13=_6[_11]||_2.linkText||_12,_14=_12;if(_14==this.$122r(_2)){_8=this.$122r(_2)}else{if(_2.linkURLPrefix){_14=_2.linkURLPrefix+_14}
if(_2.linkURLSuffix){_14=_14+_2.linkURLSuffix}
if(_10=="javascript"){_14="javascript:void";_7=" onclick=\"if(window."+this.ID+") return "+this.ID+".$30i(event,'"+_2.name+"');\""}
_8=this.linkHTML(_14,_13,_10)}}else{_8=this.getCellValue(_6,_2)}
var _15=this.getRawValue(_6,_2);var _16;if(_2.getCellStyle){_16=_2.getCellStyle(_15,_2,_6,this)}else{_16=(this.getCellStyle(_15,_2,_6,this)||this.cellStyle)}
var _17=" style='";if(this.clipValues)_17+="overflow:hidden;";_17+="text-align:"+this.valueAlign;if(this.getCellCSSText){var _18=this.getCellCSSText(_15,_2,_6,this);if(_18!=null)_17+=isc.semi+_18}
_17+="'";_4+="<TD CLASS='"+_16+"'"+_17+(_2.height?"HEIGHT='"+_2.height+"' ":"")+_7+(this.wrapValues?">":" NOWRAP><NOBR>")+_8+(this.wrapValues?"":"<\/NOBR>")+"<\/TD>"}
return _4},isc.A.$30i=function isc_DetailViewer__linkClicked(_1,_2){var _3=this.fields.find("name",_2)||{},_4=false;if(_1.target=="javascript"||_3.target=="javascript"){_4=true;if(_3.click)_3.click()}
if(_4){if(!isc.Browser.isIE){_1.preventDefault()}
return false}
return true},isc.A.getCellCSSText=function isc_DetailViewer_getCellCSSText(_1,_2,_3,_4){return this.getRecordHiliteCSSText(_3,"",_2,true)},isc.A.getCellStyle=function isc_DetailViewer_getCellStyle(_1,_2,_3,_4){if(_2){if(_2.getCellStyle)return _2.getCellStyle(_1,_2,_3,_4);if(this.isPrinting&&_2.printCellStyle){return _2.printCellStyle}
if(_2.cellStyle){return _2.cellStyle}}
return(this.isPrinting&&this.printCellStyle!=null)?this.printCellStyle:this.cellStyle},isc.A.getSelectedRecord=function isc_DetailViewer_getSelectedRecord(){return this.data.get(0)},isc.A.getCellValue=function isc_DetailViewer_getCellValue(_1,_2){var _3=this.getRawValue(_1,_2);if(isc.isA.String(_2.formatCellValue)){_2.formatCellValue=isc.Func.expressionToFunction("value,record,field,viewer",_2.formatCellValue)}
if(_2.getCellValue!=null){if(isc.isA.String(_2.getCellValue)){_2.getCellValue=isc.Func.expressionToFunction("value,record,field,viewer",_2.getCellValue)}
_3=_2.getCellValue(_3,_1,_2,this);if(_2.formatCellValue)_3=_2.formatCellValue(_3,_1,_2,this)}else{if(_2.valueMap!=null)_3=isc.getValueForKey(_3,_2.valueMap);if(_2.formatCellValue)_3=_2.formatCellValue(_3,_1,_2,this)}
if(_2.formatCellValue==null&&this.formatCellValue){_3=this.formatCellValue(_3,_1,_2)}else{if(_3==null||isc.is.emptyString(_3)){_3=this.$122r(_2)}else{_3=this.$17c(_1,_2,_3);var _4=_2.escapeHTML;if(_4==null)_4=_2.asHTML;if(_4)_3=_3.asHTML(null,_2.skipLineBreaks)}}
if(_2){var _5=this.$275t(_2);if(_5=="userFormula")_3=this.getFormulaFieldValue(_2,_1);else if(_5=="userSummary")_3=this.getSummaryFieldValue(_2,_1);else if(_2.type=="imageFile"){var _6=this.dataSource?isc.DS.getDataSource(this.dataSource).getFilenameField(_2.name):_2.name+"_filename";if(_1[_6]!=null){if(_2.showFileInline!=false){if(!_1[_2.name+"$68c"]){var _7=isc.Canvas.getFieldImageDimensions(_2,_1),_8=this.getDataSource().getFileURL(_1,_2.name);_3=_1[_2.name+"$68c"]=this.imgHTML(_8,_7.width,_7.height,null,null,isc.Canvas.$1625)}else
_3=_1[_2.name+"$68c"]}else{_3=this.getViewDownloadHTML(_2,_1)}}}else if(_2.showFileInline==true){this.logWarn("getCellValue(): Unsupported field-type for showFileInline: "+_2.type)}
if(isc.isA.Number(_3)){if(isc.SimpleType.inheritsFrom(_2.type,"float")&&(_2.decimalPrecision!=null||_2.decimalPad!=null))
{_3=isc.Canvas.getFloatValueAsString(_3,_2.decimalPrecision,_2.decimalPad)}else if(_2.precision!=null){_3=isc.Canvas.getNumberValueAsString(_3,_2.precision,_2.type)}}}
var _9=this.getFieldHilites(_1,_2);if(_9!=null){_3=this.applyHiliteHTML(_9,_3);_3=this.applyHiliteIcon(_9,_2,_3)}
return _3},isc.A.getViewDownloadHTML=function isc_DetailViewer_getViewDownloadHTML(_1,_2){if(_2==null)return null;var _3=this.dataSource?isc.DS.getDataSource(this.dataSource).getFilenameField(_1.name):_1.name+"_filename",_4=_2[_3];if(!_1.filenameSuppressed&&(_4==null||isc.isA.emptyString(_4))){return"&nbsp;"}
var _5=isc.Canvas.imgHTML("[SKIN]actions/view.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='"+this.getID()+".viewFile("+_2+","+_1+")'");var _6=isc.Canvas.imgHTML("[SKIN]actions/download.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='alert('running');"+this.getID()+".downloadFile("+_2+","+_1+")'");return"<nobr>"+_5+"&nbsp;"+_6+"&nbsp;"+_4+"</nobr>"},isc.A.viewFile=function isc_DetailViewer_viewFile(_1,_2){isc.DS.get(this.dataSource).viewFile(_1,_2.name)},isc.A.downloadFile=function isc_DetailViewer_downloadFile(_1,_2){isc.DS.get(this.dataSource).downloadFile(_1,_2.name)},isc.A.$17c=function isc_DetailViewer__formatDataType(_1,_2,_3,_4){if(!_4&&_2&&_2.multiple&&isc.isA.Array(_3)){var _5=[];for(var i=0;i<_3.length;i++){_5[i]=this.$17c(_1,_2,_3[i],true)}
return _5.join(_2.multipleValueSeparator||", ")}
if(_2&&(isc.isA.Number(_3)||isc.isA.Date(_3))&&_2.format){return isc.isA.Number(_3)?isc.NumberUtil.format(_3,_2.format):isc.DateUtil.format(_3,_2.format)}
if(isc.isA.Date(_3)){if(this.$851(_2)){var _7=isc.SimpleType.inheritsFrom(_2.type,"time");_3=isc.Time.toTime(_3,this.$30o(_2),_7)}else{var _8=this.$45i(_2);if(isc.SimpleType.inheritsFrom(_2.type,"date"))
{_3=_3.toShortDate(_8,false)}else{_3=_3.toNormalDatetime(_8)}}}
if(_2.valueMap&&_2.valueMap[""+_3+""]!=null){_3=_2.valueMap[""+_3+""]}
if(_2.$62!=null&&_2.$62.normalDisplayFormatter!=null){_3=_2.$62.normalDisplayFormatter(_3,_2,this,_1)}
return isc.iscToLocaleString(_3)},isc.A.$851=function isc_DetailViewer__formatAsTime(_1){if(_1==null)return false;if(_1.dateFormatter==null&&_1.timeFormatter!=null)return true;if(_1.timeFormatter==null&&_1.dateFormatter!=null)return false;return isc.SimpleType.inheritsFrom(_1.type,"time")},isc.A.$45i=function isc_DetailViewer__getDateFormatter(_1){if(_1.dateFormatter)return _1.dateFormatter;if(_1.displayFormat!=null&&(isc.SimpleType.inheritsFrom(_1.type,"date")||isc.SimpleType.inheritsFrom(_1.type,"datetime")))
{return _1.displayFormat}
if(this.datetimeFormatter!=null&&isc.SimpleType.inheritsFrom(_1.type,"datetime")){return this.datetimeFormatter}
return this.dateFormatter},isc.A.$30o=function isc_DetailViewer__getTimeFormatter(_1){if(_1.timeFormatter)return _1.timeFormatter;if(_1.displayFormat!=null&&isc.SimpleType.inheritsFrom(_1.type,"time")){return _1.displayFormat}
return this.timeFormatter},isc.A.getRecordIndex=function isc_DetailViewer_getRecordIndex(_1){var _2=this.Super('getRecordIndex',arguments);if(_2==-1)_2=0;return _2},isc.A.output_header=function isc_DetailViewer_output_header(_1,_2,_3){return"<TD COLSPAN="+(_3.getLength()+1)+" CLASS='"+(this.isPrinting&&this.printHeaderStyle?this.printHeaderStyle:this.headerStyle)+"'>"+_2.value+"</TD>"},isc.A.output_separator=function isc_DetailViewer_output_separator(_1,_2,_3){var _4=(_2.width==null?_2.defaultSeparatorWidth:_2.width),_5=(_2.height==null?_2.defaultSeparatorHeight:_2.height);return"<TD COLSPAN="+(_3.getLength()+1)+" CLASS='"+this.separatorStyle+"'>"+isc.Canvas.spacerHTML(_4,_5)+"</TD>"},isc.A.getEmptyMessage=function isc_DetailViewer_getEmptyMessage(){return this.emptyMessage},isc.A.getLoadingMessage=function isc_DetailViewer_getLoadingMessage(){return this.loadingMessage==null?"&nbsp;":this.loadingMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})},isc.A.emptyMessageHTML=function isc_DetailViewer_emptyMessageHTML(){if(this.isOffline()){if(!this.showOfflineMessage)return"&nbsp;"}else{if(!this.showEmptyMessage)return"&nbsp;"}
return"<TABLE WIDTH=100%><TR><TD CLASS='"+this.emptyMessageStyle+"' ALIGN=CENTER><BR><BR>"+(this.isOffline()?this.offlineMessage:this.getEmptyMessage())+"<\/TD><\/TR><\/TABLE>"},isc.A.loadingMessageHTML=function isc_DetailViewer_loadingMessageHTML(){return"<TABLE WIDTH=100%><TR><TD CLASS='"+this.loadingMessageStyle+"' ALIGN=CENTER><BR><BR>"+this.getLoadingMessage()+"<\/TD><\/TR><\/TABLE>"},isc.A.setFields=function isc_DetailViewer_setFields(_1){this.invalidateUserCache(null,null,"setFields");if(this.completeFields==null||this.fields==null)this.fields=[];this.completeFields=this.bindToDataSource(_1);if(this.completeFields==null)this.completeFields=[];this.deriveVisibleFields();this.updateFieldDependencies();this.markForRedraw()},isc.A.deriveVisibleFields=function isc_DetailViewer_deriveVisibleFields(){this.fields.setArray(this.getVisibleFields(this.completeFields))},isc.A.$240e=function isc_DetailViewer__getVisibleFields(_1){var _2=this.getData(),_3=_1.duplicate();for(var i=0;i<_1.length;i++){var _5=_1.get(i);if(!this.fieldShouldBeVisible(_5,_2)||_5.visible==false)_3.remove(_5)}
return _3},isc.A.fieldShouldBeVisible=function isc_DetailViewer_fieldShouldBeVisible(_1,_2){if(_1.showIf!=null){if(_1.showIf==this.$18r||_1.showIf==this.$301)return false;isc.Func.replaceWithMethod(_1,"showIf","viewer,valueList");if(!_1.showIf(this,_2))return false}
return true},isc.A.getTitleFieldValue=function isc_DetailViewer_getTitleFieldValue(_1){var _2=this.getDataSource().getTitleField(),_3=this.getCellValue(_1,this.getDataSource().getField(_2));return _3},isc.A.getStandaloneFieldValue=function isc_DetailViewer_getStandaloneFieldValue(_1,_2){var _3=this.getField(_2),_4=this.getCellValue(_1,_3);_4=this.addHiliteSpan(_1,_3,_4);return _4},isc.A.hideField=function isc_DetailViewer_hideField(_1){this.toggleField(_1,false)},isc.A.showField=function isc_DetailViewer_showField(_1){this.toggleField(_1,true)},isc.A.toggleField=function isc_DetailViewer_toggleField(_1,_2){var _3=this.getField(_1);_3.showIf=_2?"true":"false";_3.visible=_2;this.setFields(this.getAllFields());this.markForRedraw();this.fieldStateChanged()},isc.A.getField=function isc_DetailViewer_getField(_1){var _2=this.getAllFields(),_3=this.fields,_4;if(isc.isAn.Object(_1)&&_1.name!=null){_4=_2.find("name",_1.name)||_3.find("name",_1.name)}else if(isc.isA.Number(_1)){_4=_2[_1]||_3[_1]}else{_4=_2.find("name",_1)||_3.find("name",_1)}
return _4},isc.A.getFormattedValue=function isc_DetailViewer_getFormattedValue(_1,_2,_3){return this.getCellValue(_1,this.getSpecifiedField(_2))},isc.A.getPivotedExportData=function isc_DetailViewer_getPivotedExportData(_1){var _2=[],_3=this.getAllFields(),_4=this.data,_5,_6;if(_1==null)_1={};var _7=_1.includeHiddenFields;if(isc.isA.ResultSet(_4))_4=_4.getAllLoadedRows();if(!isc.isA.Array(_4))_4=[_4];for(var _8=0;_8<_3.length;_8++){var _9=_3[_8],_10={},_11=this.recordsPerBlock;_10.title=_9.title||_9.name;if(isc.isA.String(_10.title)){_10.title=this.htmlUnescapeExportFieldTitle(_10.title)}
if(_11==null)_11=1;if(_11=="*")_11=100000;if((!this.fields.contains(_9))&&!_7)continue;for(var _12=0;_12<_11&&_12<_4.getLength();_12++)
{var _13=_4[_12],_14=this.getFieldNum(_9.name),_15="value"+(_12+1),_16=_15+"$style";var _17=this.getExportFieldValue(_13,_9.name,_14);if(!(_17==null||_17=="&nbsp;"))_10[_15]=_17;this.addDetailedExportFieldValue(_10,_16,_13,_9,_14,_1);if(_10[_16]==null||_10[_16]=="&nbsp;")
delete _10[_16]}
_2.push(_10)}
return _2},isc.A.$172u=function isc_DetailViewer__observeRuleContextChanged(){var _1=this,_2=this.getRuleScopeComponent();if(_2&&!this.isObserving(_2,"ruleContextChanged")){this.observe(_2,"ruleContextChanged",function(_9,_10){if(_1.destroying||_1.destroyed){this.logInfo("Attempt to respond to RuleContext changes during destruction...");return}
var _3=_1.getHilites();if(_3){var _4=false;for(var i=0;i<_3.length&&!_4;i++){var _6=_3[i],_7=_6.$265r;if(_7){for(var j=0;j<_7.length;j++){if(_10.contains(_7[j])){_4=true;break}}}}
if(_4){_1.fireOnPause("dvReapplyHilites",{target:_1,methodName:"applyHilites"})}}})}});isc.B._maxIndex=isc.C+50;isc.DetailViewer.registerStringMethods({getCellValue:"record,field",getCellStyle:"value,field,record,viewer",getCellCSSText:"value,field,record,viewer",formatCellValue:"value,record,field,viewer",fieldStateChanged:""});isc.ClassFactory.defineClass("GridRenderer","Canvas");isc.A=isc.GridRenderer;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.SELECTED="Selected";isc.A.DISABLED="Disabled";isc.A.OVER="Over";isc.A.SYNCHRONOUS="";isc.A.ASYNC="Async";isc.A.ASYNC_ERROR="AsyncError";isc.A.standardSuffixSubset=["","Over","Selected","SelectedOver","Disabled","DisabledOver","DisabledSelected","DisabledSelectedOver"];isc.A.standardStyleSuffixes={};isc.A.$2718={};isc.B.push(isc.A.getStyleSuffixes=function isc_c_GridRenderer_getStyleSuffixes(_1,_2,_3){if(this.standardStyleSuffixes[_3]==null){this.standardStyleSuffixes[_3]={}}
if(this.standardStyleSuffixes[_3][_2]==null){this.standardStyleSuffixes[_3][_2]={}}
var _4=this.standardStyleSuffixes[_3][_2][_1];if(_4==null){_4=this.standardSuffixSubset.duplicate();for(var i=0;i<this.standardSuffixSubset.length;i++){_4[i]+=_3;_4[8+i]=(i==0?_1:this.standardSuffixSubset[i]+_1)+_3;_4[16+i]=(i==0?_2:this.standardSuffixSubset[i]+_2)+_3;_4[24+i]=(i==0?_1+_2:this.standardSuffixSubset[i]+_1+_2)+_3}
this.standardStyleSuffixes[_3][_2][_1]=_4}
return _4},isc.A.getCellStyleName=function isc_c_GridRenderer_getCellStyleName(_1,_2,_3,_4,_5){var _6=isc.GridRenderer.calculatedStyleNames;if(_6==null){_6=isc.GridRenderer.calculatedStyleNames={}}
if(_6[_5]==null){_6[_5]={}}
_6=_6[_5];if(_6[_4]==null){_6[_4]={}}
_6=_6[_4];if(_6[_3]==null){_6[_3]={}}
_6=_6[_3];if(_6[_2]==null){var _7=isc.GridRenderer.getStyleSuffixes(_3,_4,_5);_6[_2]=[];for(var i=0;i<_7.length;i++){_6[_2][i]=_2+_7[i]}}
_6=_6[_2];return _6[_1]},isc.A.$188v=function isc_c_GridRenderer__getEmptyMessageStyleVPad(_1){if(!_1)return 0;var _2=this.$188w;if(!_2)this.$188w=_2={};if(_2[_1]!=null)return _2[_1];var _3=0,_4=isc.Element.getStyleDeclaration(_1);if(_4){if(_4.paddingTop&&_4.paddingTop.endsWith("px")){_3+=parseInt(_4.paddingTop)}
if(_4.paddingBottom&&_4.paddingBottom.endsWith("px")){_3+=parseInt(_4.paddingBottom)}}
return(_2[_1]=_3)},isc.A.$2719=function isc_c_GridRenderer__getTableBorderSpacing(_1,_2){if(_2==null)_2=0;if(this.$2718[_1]==null){this.$2718[_1]={}}
if(this.$2718[_1][_2]==null){if(this.$272a==null){isc.Element.createAbsoluteElement("<TABLE ID='isc_tableBorderSpacingTester' cellspacing="+_2+" STYLE='position:absolute;left:0px;top:-2000px;-webkit-user-select:none;'><TR><TD>&nbsp;</TD></TR></TABLE>");this.$272a=isc.Element.get("isc_tableBorderSpacingTester")}
this.$272a.className=_1;var _3=["borderCollapse","borderSpacing"]
var _4=isc.Element.getComputedStyle(this.$272a,_3),_5={};if(_4.borderCollapse!="separate"){_5.vSpacing=_5.hSpacing=0}else{var _6=_4.borderSpacing.split(" ");if(_6.length==1){_5.vSpacing=_5.hSpacing=parseInt(_6[0])}else{_5.hSpacing=parseInt(_6[0]);_5.vSpacing=parseInt(_6[1])}}
this.$2718[_1][_2]=_5}
return this.$2718[_1][_2]});isc.B._maxIndex=isc.C+4;isc.A=isc.GridRenderer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.showFocusOutline=false;isc.A.totalRows=0;isc.A.drawAllMaxCells=250;isc.A.recordCanSelectProperty="canSelect";isc.A.isSeparatorProperty="isSeparator";isc.A.singleCellValueProperty="singleCellValue";isc.A.instantScrollTrackRedraw=true;isc.A.scrollRedrawDelay=isc.Browser.useHighPerformanceGridTimings?0:75;isc.A.dragScrollRedrawDelay=75;isc.A.touchScrollRedrawDelay=isc.Browser.useHighPerformanceGridTimings?0:300;isc.A.drawAheadRatio=isc.Browser.useHighPerformanceGridTimings?2.0:1.3;isc.A.quickDrawAheadRatio=isc.Browser.useHighPerformanceGridTimings?2.0:1.0;isc.A.cellHeight=20;isc.A.fixedRowHeights=true;isc.A.fixedColumnWidths=true;isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.canSelectOnRightMouse=true;isc.A.hoverByCell=true;isc.A.backgroundColor="white";isc.A.tableStyle="listTable";isc.A.baseStyle="cell";isc.A.alternateRowSuffix="Dark";isc.A.alternateRowFrequency=1;isc.A.alternateColumnSuffix="AltCol";isc.A.alternateColumnFrequency=1;isc.A.emptyCellValue="&nbsp;";isc.A.emptyMessage="No data to display";isc.A.offlineMessage="No data available while offline";isc.A.fastCellUpdates=true;isc.A.overflow="auto";isc.A.$r9=true;isc.A.canFocus=true;isc.A.animateRowsMaxTime=1000;isc.A.snapToCells=false;isc.A.snapInsideBorder=false;isc.A.snapHDirection=isc.Canvas.BEFORE;isc.A.snapVDirection=isc.Canvas.BEFORE;isc.B.push(isc.A.shouldEnforceVClipping=function isc_GridRenderer_shouldEnforceVClipping(){return this.fixedRowHeights&&(this.enforceVClipping||this.wrapCells)},isc.A.setFastCellUpdates=function isc_GridRenderer_setFastCellUpdates(_1){if(_1&&!isc.Browser.isIE){this.fastCellUpdates=false;return}
if(_1==this.fastCellUpdates)return;this.fastCellUpdates=_1;this.markForRedraw()});isc.B._maxIndex=isc.C+2;isc.A=isc.GridRenderer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.columnSizerDefaults={columnSizer:true,top:-1000,width:1,height:1,overflow:"hidden",ariaState:{hidden:true}};isc.A.clearColumnSizerDelay=100;isc.A.$57k=["<DIV id='",,"' style='"+(isc.Browser.isMoz&&isc.Browser.version==18?"display:inline;":"")+"position:absolute;overflow:",,";z-index:",,";height:",,";width:",,"px' ",null,">",null,,,isc.Browser.isIE?"</form>":null,"</DIV>"];isc.A.$623="<table style='position:absolute;top:0px;font-size:1px;height:100%;width:100%;z-index:1;overflow:hidden;visibility:hidden;'><tr><td>&nbsp;</td></tr></table>";isc.A.$171f="<form action='javascript:void(0)' style='overflow:hidden' onsubmit='return false;'>";isc.A.$171g="<form action='javascript:void(0)' onsubmit='return false;'>";isc.A.maxAnimateSlideInRows=100;isc.A.$27r="none";isc.A.screenReader_suppressHandleFocus=true;isc.A.allowRowSpanning=true;isc.A.closeNOBRs=false;isc.A.$77c={};isc.A.$27s="<DIV role='presentation' cellClipDiv=true style='overflow:hidden;";isc.A.$1148=isc.Browser.$114w+":ellipsis;";isc.A.$80q="<div>";isc.A.$80r="</div>";isc.A.$131s=[,"<div style='height:",,,,,,"px;line-height:0px'>&nbsp;</div>"];isc.A.$57l="within";isc.A.$57m="expand";isc.A.$279z="below";isc.A.$2790="above";isc.A.$14k="cell";isc.A.alignSnapToMap={left:{top:"TL",center:"L",bottom:"BL"},right:{top:"TR",center:"R",bottom:"BR"},center:{top:"T",center:"C",bottom:"B"}};isc.A.recordCustomStyleProperty="customStyle";isc.A.showSelectedStyle=true;isc.A.writeOutRowElementId=false;isc.A.writeOutCellElementId=false;isc.A.$27t="NOBR";isc.A.$27u="cellClipDiv";isc.A.$o5="height";isc.A.$27v="minHeight";isc.A.$39=";";isc.A.$721="padding-top:0px;padding-bottom:0px;";isc.A.$722="overflow:hidden;";isc.A.suppressNativeHoversInSafari=true;isc.A.screenReaderNavigateByCell=false;isc.A.avgRowHeight=60;isc.A.showHoverOnDisabledCells=false;isc.A.disableNativeScrollOnMouseDownFocus=true;isc.B.push(isc.A.initWidget=function isc_GridRenderer_initWidget(){if(!this.$26a)this.setColumnWidths([]);if(this.selectionManager)this.setSelection(this.selectionManager);if(this.overflow==isc.Canvas.VISIBLE){this.showAllRows=true}
if(!this.fixedRowHeights&&this.virtualScrolling==null)this.virtualScrolling=true;if(this.virtualScrolling&&!this.showAllRows){if(this.showCustomScrollbars==false){this.logInfo("Variable height records cannot be used with native scrollbars; setting showCustomScrollbars:true on this GridRenderer and using the special 'NativeScrollbar' class as a scrollbarConstructor.");this.showCustomScrollbars=true;this.useNativeTouchScrolling=false;this.scrollbarConstructor="NativeScrollbar";if(!isc.Element.visibleNativeScrollbars()&&!this.$325l)
{this.floatingScrollbars=true}}}
if(this.showCustomScrollbars&&this.floatingScrollbars){this.suppressScrollbarGap=true}
this.setFastCellUpdates(this.fastCellUpdates);this.$2716()},isc.A.clearColumnSizer=function isc_GridRenderer_clearColumnSizer(_1){var _2=this.$292;if(_2!=null){if(_1){_2.clear()}else{_2.setContents(isc.nbsp)}}},isc.A.destroy=function isc_GridRenderer_destroy(){this.clearSelection();this.Super("destroy",arguments);this.$292=null;if(isc.isAn.Array(this.$29a)){for(var i=0;i<this.$29a.length;i++){this.ignore(this.$29a[i],"resized")}}},isc.A.shouldShowAllColumns=function isc_GridRenderer_shouldShowAllColumns(){if(this.showAllColumns)return true;if(!this.fixedRowHeights)return true;if(this.overflow==isc.Canvas.VISIBLE){return true}
if(this.autoFitData="both"||this.autoFitData=="horizontal")return true;return false},isc.A.isEmpty=function isc_GridRenderer_isEmpty(){return false},isc.A.$27w=function isc_GridRenderer__showEmptyMessage(_1,_2){return this.getEmptyMessageHTML(_1,_2,this.grid.isOffline())},isc.A.getEmptyMessageHTML=function isc_GridRenderer_getEmptyMessageHTML(_1,_2,_3){if(!_3){if(!this.showEmptyMessage)return"&nbsp;"}else{if(!this.showOfflineMessage)return"&nbsp;"}
if(this.isPrinting){if(_1==null)_1=0;if(_2==null)_2=this.fields?this.fields.getLength()-1:0;var _4=!(this.$568&&this.printChunkOnly);return"<TABLE role='presentation' cellspacing=0 style='width:100%'"+(this.emptyMessageTableStyle?(" class='"+this.emptyMessageTableStyle+"'"):"")+">"+(_4?this.getPrintHeaders(_1,_2+1):"")+"<TR><TD  ALIGN=CENTER class='"+(_3?this.offlineMessageStyle:this.emptyMessageStyle)+"' colspan='"+((_2-_1))+"'>"+(_3?this.getOfflineMessage():this.getEmptyMessage())+"</TD></TR>"+(_4?this.getPrintFooters(_1,_2+1):"")+"</TABLE>"}
var _5=this.getInnerWidth(),_6=this.$188q(_5);var _7=_6&&this.overflow!=isc.Canvas.VISIBLE;var _8=this.$28t;if(_8==null){_8=0;if(this.$167g()){_8=(this.fixedRowHeights?0:this.cellPadding*2);if(this.emptyMessageTableStyle)_8+=isc.Element.$ym(this.emptyMessageTableStyle)}}
var _9=isc.StringBuffer.create();_9.append("<TABLE id='",this.$188r(),"' role='presentation' BORDER=0 MARGIN=0 CELLSPACING='",this.cellSpacing,"' CELLPADDING='",(this.fixedRowHeights?0:this.cellPadding*2),(this.emptyMessageTableStyle?("' CLASS='"+this.emptyMessageTableStyle):null),"' style='position:absolute;height:100%;width:",(_5+_6),"px;'>","<TR><TD CLASS='",(_3?this.offlineMessageStyle:this.emptyMessageStyle),"' style='text-align:center; padding-left:0px;padding-right:0px;height:"+(this.cellHeight-_8)+"px'>",(_3?this.getOfflineMessage():this.getEmptyMessage()),(_6&&_7?"<br>"+isc.Canvas.spacerHTML(_5,1):null),"</TD>");if(_6&&_7){_9.append("<TD style='padding-left:0px;padding-right:0px;'>",isc.Canvas.spacerHTML(_6,1),"</TD>")}
_9.append("</TR></TABLE>");return _9.release(false)},isc.A.$188q=function isc_GridRenderer__getEmptyMessageExtraWidth(_1){var _2=0;if(this.expandEmptyMessageToMatchFields&&this.$26a){_2=this.$26a.sum()-_1;if(_2<0)_2=0}
if(this.applyHSpaceToEmptyMessage){if(this.leftSpace!=null)_2+=this.leftSpace;if(this.rightSpace!=null)_2+=this.rightSpace}
return _2},isc.A.$188r=function isc_GridRenderer__getEmptyMessageTableID(){return this.$qs("emptyID")},isc.A.$188s=function isc_GridRenderer__getEmptyMessageTable(){return this.getDocument().getElementById(this.$188r())},isc.A.getEmptyMessage=function isc_GridRenderer_getEmptyMessage(){return this.emptyMessage},isc.A.getOfflineMessage=function isc_GridRenderer_getOfflineMessage(){return this.grid.offlineMessage},isc.A.$135b=function isc_GridRenderer__getZIndexDivID(){return this.$qs("zIndexDiv")},isc.A.$135r=function isc_GridRenderer__getZIndexDiv(){return this.getDocument().getElementById(this.$135b())},isc.A.$171h=function isc_GridRenderer__zIndexDivOverflowHidden(){return(this.fixedFieldWidths&&this.overflow!=isc.Canvas.VISIBLE)},isc.A.getInnerHTML=function isc_GridRenderer_getInnerHTML(){var _1=this.getTableHTML(null,null,null,null,null,null,true),_2=this.$57k;_2[1]=this.$135b();var _3=this.$171h(),_4=_3?"hidden":"visible";_2[3]=_4;if(isc.Browser.isIE){_2[11]=_3?this.$171f:this.$171g}
_2[5]=this.getTableZIndex();var _5=this.grid,_6=this.$26a.sum();if(this.showCustomScrollbars&&!this.frozen&&_5!=null&&_5.$313()&&!this.vscrollOn)
{_6+=_5.$139x()}
const _7=this.getVPadding();_2[7]="calc(100% - "+_7+"px)";if(this.leftSpace)_6+=this.leftSpace;if(this.rightSpace)_6+=this.rightSpace;if(this.$278e)_2[11]="class='"+this.$278d+"'";_2[9]=_6;_2[14]=_1;if(isc.Browser.isMoz)_2[15]=this.$623;return _2.join(isc.emptyString)},isc.A.innerSizeChanged=function isc_GridRenderer_innerSizeChanged(_1,_2,_3,_4){var _5=this.invokeSuper(isc.GridRenderer,"innerSizeChanged",_1,_2,_3,_4);var _6=this.$135r();if(_6!=null){var _7=this.grid,_8=this.$26a.sum();if(this.showCustomScrollbars&&!this.frozen&&_7!=null&&_7.$313()&&!this.vscrollOn)
{_8+=_7.$139x()}
_6.style.width=_8+isc.px}
var _9=this.$188s();if(_9!=null){var _8=this.getInnerWidth(),_10=this.$188q(_8);_9.style.width=(_8+_10)+isc.px}
return _5},isc.A.isFastScrolling=function isc_GridRenderer_isFastScrolling(){return this.isDragScrolling()||this.isRepeatTrackScrolling()||this.isMouseWheelScrolling()},isc.A.shouldUseQuickDrawAheadRatio=function isc_GridRenderer_shouldUseQuickDrawAheadRatio(){return this.useQuickDrawAheadRatio||this.isFastScrolling()},isc.A.doneFastScrolling=function isc_GridRenderer_doneFastScrolling(){var _1=this.$50z;if(_1){this.$50v=true;this.markForRedraw("Done Fast scrolling.")}},isc.A.addDrawAhead=function isc_GridRenderer_addDrawAhead(_1,_2,_3,_4,_5){var _6=this.shouldUseQuickDrawAheadRatio(),_7=_6&&this.quickDrawAheadRatio!=null?this.quickDrawAheadRatio:this.drawAheadRatio,_8=Math.ceil((_2-_1)*_7);if(this.$50v)_4=null;if(_4!=null){if(_4)_2=_1+_8;else _1=_2-_8}else{if(_1==0)_2=_8;else{var _9=Math.ceil((_8-(_2-_1))/2);_1-=_9;_2+=_9}}
if(_1<0){_2-=_1;_1=0}
if(_2>=_3){var _10=_2-(_3-1);_1=Math.max(0,(_1-_10));_2=Math.max(0,_3-1)}
if(_6)this.$50z=true;else delete this.$50z;return[_1,_2]},isc.A.$100b=function isc_GridRenderer__isFrozenBody(){if(this.grid&&this.grid.frozenBody==this)return 1;return 0},isc.A.getExtraRowHeight=function isc_GridRenderer_getExtraRowHeight(_1,_2){var _3=0;for(var _4=_1;_4<_2;_4++){var _5=this.getRowHeight(this.getCellRecord(_4,0),_4,this.$100b()),_6=(_5-this.cellHeight);if(_6>0){_3+=_6}}
return _3},isc.A.getDrawAllMaxCells=function isc_GridRenderer_getDrawAllMaxCells(){return this.drawAllMaxCells},isc.A.getDrawArea=function isc_GridRenderer_getDrawArea(_1,_2){var _3=this.getTotalRows(),_4,_5,_6;var _7=_3*this.fields.length,_8=this.shouldShowAllCells(_3);var _9=this.fields.length;if(this.showAllRows||_8){_4=0;_5=Math.max(_3-1,0)}else{var _10=this.$80e(_2);var _11=_10[1]-_10[0],_12=this.getDrawAllMaxCells(),_13=0;if(_9>0&&_12&&!this.lengthIsKnown()){_13=Math.floor(_12/_9)}
if(_10[1]<_13){_4=0;_5=_13-1}else{_4=_10[0];_5=_10[1];_6=_10[2]}}
var _14,_15;if(_1!=null){_14=_1;_15=_1+1}else if(_8||this.shouldShowAllColumns()){_14=0;_15=_9-1}else{var _16=this.$200y();_14=_16[0];_15=_16[1]}
if(this.cacheDOM&&!this.$508){this.$508=_5-_4;this.$509=_15-_14}
return[_4,_5,_14,_15]},isc.A.shouldShowAllCells=function isc_GridRenderer_shouldShowAllCells(_1){if(!this.fields)return false;var _2=_1*Math.max(this.fields.length,1);return _2<=this.getDrawAllMaxCells()&&!isc.EH.dragging&&!this.isAnimating()&&!(this.parentElement&&this.parentElement.isAnimating())},isc.A.$200y=function isc_GridRenderer__getDrawCols(){var _1,_2,_3=this.fields.length,_4;var _5=this.getVisibleColumns();_4=(this.lastScrollLeft==null?null:this.lastScrollLeft<this.getScrollLeft());var _6=this.addDrawAhead(_5[0],_5[1],_3,_4);_1=_6[0];_2=_6[1];return[_1,_2]},isc.A.$80e=function isc_GridRenderer__getDrawRows(_1){var _2=this.$27x(_1);var _3=this.getTotalRows();if(this.$195b!=null){var _4=this.$195b;if(_4[0]>=0&&_4[1]<_3&&_4[0]<=_2[0]&&_4[1]>=_2[1])
{return this.$195b}}
var _5=(this.lastScrollTop==null?null:this.lastScrollTop<this.getScrollTop());var _6=this.addDrawAhead(_2[0],_2[1],_3,_5,true);if(this.virtualScrolling&&this.grid){var _7=this.grid.data,_8=_6[0];if(_8>0&&_8<this.getViewportHeight()/this.derivedRowHeight){if(isc.ResultSet&&isc.isA.ResultSet(_7)){var _9=_7.findLastCached(_8,true);if(_9!=null)_6[0]=_9}else if(isc.ResultTree&&isc.isA.ResultTree(_7)){var _10=isc.ResultTree.getLoadingMarker(),_11=_7.getRange(0,_8,true),_9=_11.lastIndexOf(_10);_6[0]=_9+1}else{_6[0]=0}}}
if(this.virtualScrolling&&this.derivedRowHeight<this.getAvgRowHeight()){this.$200l(_6,_2)}
_6[2]=_5;return _6},isc.A.$200l=function isc_GridRenderer__ensureDrawRangeFillsViewport(_1,_2){var _3=_1[0],_4=_2[0]-1;if(_3>_4)return;var _5=0,_6=this.$252,_7=this.$253;if(_6==null||_6>_4||_7<_3)
{_5=(_4-_3+1)*this.derivedRowHeight}else{var _8=this.$26b();if(_3<_6){_5=(_6-_3)*this.derivedRowHeight}
for(var i=Math.max(_3-_6,0);i<=_4-_6&&i<_8.length;i++)
{_5+=_8[i]}
if(_7<_4){_5+=(_4-_7)*this.derivedRowHeight}}
var _10=this.getAvgRowHeight()*(_4-_3+1),_11=Math.ceil((_10-_5)/this.derivedRowHeight);if(_11<=0)return;if(_1[1]-_2[1]<_11&&_1[1]<this.getTotalRows()-1)
{var _12=Math.min(_2[1]+_11,this.getTotalRows()-1);if(this.logIsDebugEnabled("virtualScrolling")){this.logDebug("Extending ending 'draw ahead' region since beginning 'draw ahead' is present to ensure viewport is filled: "+_1+" => "+_1[0]+", "+_12,"virtualScrolling")}
_1[1]=_12}},isc.A.getRowCoordinate=function isc_GridRenderer_getRowCoordinate(_1){var _2=this.getEventRow(_1),_3=this.getRowTop(_2),_4=_1-_3,_5=this.getRowSize(_2),_6=_4/_5;return _2+_6},isc.A.scrollToRatio=function isc_GridRenderer_scrollToRatio(_1,_2,_3,_4,_5){if(!_1||!this.$60s){return this.invokeSuper(isc.GridRenderer,"scrollToRatio",_1,_2,_3,_4,_5)}
var _6=this.getTotalRows()-1,_7=_2*_6,_8=Math.floor(_7),_9=Math.round((_7-_8)*this.getRowSize(_8));this.$27y=_8;this.$27z=_9;this.$270(_3||"scrollToRatio");if(this.isDirty()){this.$271=_2;this.$27y=_8;this.$27z=_9}},isc.A.getScrollRatio=function isc_GridRenderer_getScrollRatio(_1,_2,_3,_4){if(!_1||!this.$60s){return this.invokeSuper(isc.GridRenderer,"getScrollRatio",_1,_2,_3,_4)}
if(this.isDirty()&&this.$271!=null)return this.$271;var _5=this.getTotalRows()-1;if(_5<=0)return 0;var _6=this.getScrollTop(),_7=this.getRowCoordinate(_6),_8=_7/_5;return Math.min(1,_8)},isc.A.getViewportRatio=function isc_GridRenderer_getViewportRatio(_1,_2,_3,_4){if(!_1||!this.$60s){return this.invokeSuper(isc.GridRenderer,"getViewportRatio",_1,_2,_3,_4)}
var _5=this.$272||this.getAvgRowHeight();return Math.min(1,(this.getViewportHeight()/_5)/this.getTotalRows())},isc.A.$273=function isc_GridRenderer__storeTargetRow(_1,_2){if(this.$274)return;if(this.isEmpty()){this.$27y=this.$27z=0;return}
var _3,_4,_5=this.getTotalRows()-1;if(_2>0){_3=_1+this.getViewportHeight();_4=this.getEventRow(_3);if(_4==-2&&_5>=0){_4=_5}}else{_3=_1;_4=this.getEventRow(_3)}
if(_4<this.$252)_4=this.$252;if(_4>this.$253)_4=this.$253;if(_4<0||_4>_5){this.$27y=_5;this.$27z=0}else{this.$27y=_4;this.$27z=_1-this.getRowTop(this.$27y)+_2;if(-this.$27z>this.getViewportHeight()||this.$27z>this.getRowSize(this.$27y))
{this.logInfo("storeTargetRow: targetRow: "+_4+" with offset: "+this.$27z+" would place the targetRow outside the viewport, clearing","virtualScrolling");this.$27z=this.$27y=null}}
if(isNaN(this.$27y)||isNaN(this.$27z)){this.logWarn("$273: NaN detected in virtual scrolling state ($27y:"+this.$27y+", $27z:"+this.$27z+", $252:"+this.$252+", $253:"+this.$253+"). Clearing to zero.\n"+this.getStackTrace(),"virtualScrolling");this.$27y=this.$27z=0}},isc.A.$270=function isc_GridRenderer__scrollToTargetRow(_1){var _2=this.$27y,_3=this.$27z;var _4=this.getTotalRows()-1;if(_2>_4){_2=this.$27y=_4;_3=this.$27z=0}
var _5=this.getRowTop(_2)+_3;this.$274=true;this.$sz=null;this.scrollTo(null,_5,_1||"targetRow");this.$274=false;this.$271=null},isc.A.scrollIntoView=function isc_GridRenderer_scrollIntoView(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10){if((_10!=null)&&(_10!=this)){return}
this.invokeSuper(isc.GridRenderer,"scrollIntoView",_1,_2,_3,_4,_5,_6,_7,_8,_9,_10)},isc.A.scrollTo=function isc_GridRenderer_scrollTo(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(this.$60s&&_2!=null&&_3!="nativeScroll"){var _5=this.getScrollTop(),_6=_2-_5;if(_6!=0){this.$273(_5,_6);var _7=this.getTotalRows();var _8;if(_7>0){var _9=_7-1,_10=_11+this.cellHeight;if(this.grid){var _11=this.getRowTop(_9),_12=this.grid.data||[],_13={};if(isc.ResultSet&&isc.isA.ResultSet(_12)){_13=_12.localData?_12.localData[_9]:{}}else{_13=_12.get(_9)}
_10=_11+this.getRowHeight(_13,_9,this.$100b(),true)}
_8=Math.max(_11,_10-this.getViewportHeight())}else{_8=0}
_2=Math.min(_2,_8)}}
if(this.$80f){this.$195b=this.$191h}else{delete this.$195b}
this.invokeSuper(isc.GridRenderer,"scrollTo",_1,_2,_3,_4);if(this.isDirty()||this.$80f)return;if(!this.$1301&&this.$1302()){this.redrawOnScroll(!this.isFastScrolling()&&this.instantScrollTrackRedraw&&(_3!==this.$1315||isc.Browser.iOSVersion<8||!this.$145k()))}},isc.A.$134a=function isc_GridRenderer__getRedrawOnScrollCallback(){if(this.$134b==null){var _1=this;this.$134b=function(){delete this.$138f;_1.$1336();_1.redraw("scrolled")}}
return this.$134b},isc.A.redrawOnScroll=function isc_GridRenderer_redrawOnScroll(_1){if(this.$28i){return}
if(_1){this.redraw("scrolled")}else{var _2=this.isMouseWheelScrolling(),_3=this.getScrollRedrawDelay(_2);if(_3==0){this.markForRedraw("scrolled")}else{this.fireOnPause("scrollRedraw",this.$134a(),_3);this.$138f=_2}}
this.$250=true;if(this.grid&&this.grid.body)this.grid.$1756=true},isc.A.getScrollRedrawDelay=function isc_GridRenderer_getScrollRedrawDelay(_1){var _2=isc.Browser.isTouch?this.touchScrollRedrawDelay:this.scrollRedrawDelay;if(this.isDragScrolling())return this.dragScrollRedrawDelay;if(this.scrollWheelRedrawDelay==null)return _2;if(_1==null){_1=this.isMouseWheelScrolling()}
if(_1){_2=this.scrollWheelRedrawDelay}
return _2},isc.A.$276=function isc_GridRenderer__needRowRedraw(){if(this.showAllRows)return false;var _1=this.getVisibleRows(),_2=_1[0],_3=_1[1];var _4=this.getTotalRows();if(_3>_4-1)_3=_4-1;var _5=(_2<this.$252||_3>this.$253);return _5},isc.A.$277=function isc_GridRenderer__needColumnRedraw(){if(this.shouldShowAllColumns())return false;var _1=this.getVisibleColumns(),_2=_1[0],_3=_1[1],_4=(_2<this.$254||_3>this.$255);return _4},isc.A.$1302=function isc_GridRenderer__needAxisRedraw(){return this.$276()||this.$277()},isc.A.setOverflow=function isc_GridRenderer_setOverflow(_1){if(_1==isc.Canvas.VISIBLE){this.showAllRows=true}
return this.Super("setOverflow",arguments)},isc.A.getRowChunkNum=function isc_GridRenderer_getRowChunkNum(_1){return Math.round(_1/this.$508)},isc.A.getColChunkNum=function isc_GridRenderer_getColChunkNum(_1){return Math.round(_1/this.$509)},isc.A.getTableChunk=function isc_GridRenderer_getTableChunk(_1,_2){var _3=this.$51a;if(!_3)return;_1=_1||0;_2=_2||0;var _4=_3[_1];return _4?_4[_2]:null},isc.A.getTableChunkAt=function isc_GridRenderer_getTableChunkAt(_1,_2){var _3=this.getRowChunkNum(_1),_4=this.getColChunkNum(_2),_5=this.getTableChunk(_3,_4);if(_5!=null){this.$51b=_3*this.$508;this.$254=_4*this.$509;return _5}},isc.A.$rd=function isc_GridRenderer__updateInnerHTML(_1,_2,_3,_4){if(this.cacheDOM){this.drawVisibleChunks()}else{this.$29j();var _5=!this.$756;if(_5)this.$756=true;try{this.invokeSuper(isc.GridRenderer,"$rd",_1,_2,_3,_4)}finally{if(_5)delete this.$756}}},isc.A.$p9=function isc_GridRenderer__updateParentHTML(_1,_2,_3,_4){this.$29j();var _5=!this.$756;if(_5)this.$756=true;try{this.invokeSuper(isc.GridRenderer,"$p9",_1,_2,_3,_4)}finally{if(_5)delete this.$756}},isc.A.drawVisibleChunks=function isc_GridRenderer_drawVisibleChunks(){var _1=this.getVisibleRows(),_2=this.getVisibleColumns(),_3=this.getRowChunkNum(_1[0]),_4=this.getColChunkNum(_2[0]),_5=this.getRowChunkNum(_1[1]),_6=this.getColChunkNum(_2[1]);for(var _7=_3;_7<_5;_7++){for(var _8=_4;_8<_6;_8++){if(this.getTableChunk(_7,_8)==null){this.renderTableChunk(_7,_8)}}}
var _9=this.getTableHTML()},isc.A.renderTableChunk=function isc_GridRenderer_renderTableChunk(_1,_2){var _3=_1*this.$508,_4=_3+this.$508,_5=_2*this.$509,_6=_5+this.$509;var _7=this.getTableHTML([_5,_6],_3,_4),_8=isc.Element.insertAdjacentHTML(this.getHandle(),"beforeEnd",_7,true);var _9=this.$51a=this.$51a||[],_10=_9[_1]=_9[_1]||[];_10[_2]=_8},isc.A.startRowAnimation=function isc_GridRenderer_startRowAnimation(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10){this.finishRowAnimation();var _11=!this.isDrawn()||!this.isVisible();if(!_11){var _12=this.getDrawArea();if(_2<_12[0]||_2>_12[1])_11=true}
if(_11){if(_4!=null){var _13=_9?this.parentElement:this;_13.fireCallback(_4)}
return}
if(_1==null)_1=true;if(_2==null)_2=0;if(_3==null)_3=this.getTotalRows()-1;if(_2==_3){this.logWarn("startRowAnimation passed empty row range, aborting: "+[_2,_3]);return}
var _14=this.readyToRedraw("animating show / hide of rows",false);if(!_14){this.$278=[_1,_2,_3,_4,_5,_6,_7,_8,_9];this.$279=isc.Timer.setTimeout({target:this,methodName:"$28a"},0);return}
if((_3-_2)>this.maxAnimateSlideInRows)_8=false;this.$73q=_8;var _15=this.$28b(_1,_2,_3,_4,_9);this.animateRowHeight(this.$28c,(_1?_15:0),{target:this,methodName:"$28d"},_5,_6,_7,_8)},isc.A.$28a=function isc_GridRenderer__delayedStartRowAnimation(){if(this.$278==null){this.logWarn("Unable to perform delayed row animation - bailing");return}
var _1=this.$278,_2=_1[0],_3=_1[1],_4=_1[2],_5=_1[3],_6=_1[4],_7=_1[5],_8=_1[6],_9=_1[7],_10=_1[8];this.$278=null;this.$279=null;this.startRowAnimation(_2,_3,_4,_5,_6,_7,_8,_9,_10,true)},isc.A.$28b=function isc_GridRenderer__initializeShowHideRow(_1,_2,_3,_4,_5){var _6=0;if(this.$28c==_2&&this.$28e==_3){var _7=this.getTableElement(this.$28c,0),_8=this.$28g(_7);if(!_8){_6=(_3-_2)*this.derivedRowHeight}else _6=_8.scrollHeight}else{this.$28c=_2;this.$28e=_3;if(!_1){var _9=this.$26b();for(var i=_2;i<_3;i++){_6+=_9[i]}
this.$28f=_6;this.redraw("initializing animated hide row")}else{this.$28f=1;this.redraw("initializing animated show row");var _7=this.getTableElement(this.$28c,0),_8=this.$28g(_7);if(!_8){_6=(_3-_2)*this.derivedRowHeight}else _6=_8.scrollHeight}
if(this.isDirty())this.redraw("Initializing row animation requires second redraw")}
this.$28h={callback:_4,target:(_5?this.parentElement:this)};return _6},isc.A.finishRowAnimation=function isc_GridRenderer_finishRowAnimation(){if(this.$28c!=null){this.finishAnimateRowHeight()}else{if(this.$279!=null){isc.Timer.clearTimeout(this.$279);var _1=this.$278,_2=_1[0],_3=_1[1],_4=_1[2],_5=_1[3],_6=_1[4],_7=_1[5];delete this.$278;delete this.$279;if(!this.readyToRedraw()){this.logWarn("Finish row animation called while Grid is not ready to redraw. GridRenderer HTML will not be updated when callback fires.","animation");var _8=_7?this.parentElement:this;if(_5)_8.fireCallback(_5)}else{var _9=this.$28b(_2,_3,_4,_5,_7);this.setRowHeight(_3,(_2?_9:1));this.$28d()}}}},isc.A.$212z=function isc_GridRenderer__clearLastRowAnimation(){delete this.$28h;delete this.$28c;delete this.$28e;delete this.$28f},isc.A.$28d=function isc_GridRenderer__rowShowComplete(){var _1=this.$28h;this.$212z()
if(_1&&_1.callback)_1.target.fireCallback(_1.callback)},isc.A.animateRowHeight=function isc_GridRenderer_animateRowHeight(_1,_2,_3,_4,_5,_6,_7,_8){if(!this.isDrawn()){if(_3){var _9=(_8?this.parentElement:this);_9.fireCallback(_3)}
return}
if(this.$28i!=null){this.logInfo("early finish of row animation, because new animation started","animation")
this.finishAnimateRowHeight()}
var _10=this.getRowSize(_1);if(_4!=null){var _11=(_2-_10);if(_11<0)_11=0-_11;_5=Math.round((_11/_4)*1000);if(_5>this.animateRowsMaxTime)_5=this.animateRowsMaxTime}
this.$28j={$24t:_1,$28k:_10,$28l:_2,$03:_3,$1n:_7,$28m:_8}
_6=(_6||this.$27r);if(this.logIsInfoEnabled("animation")){this.logInfo("starting row animation, row:"+_1+", duration: "+_5+", effect: "+_6,"animation")}
this.$28i=this.registerAnimation({target:this,method:this.$28n},_5,_6);if(this.overflow==isc.Canvas.AUTO||this.overflow==isc.Canvas.SCROLL)
this.$417=true},isc.A.$28n=function isc_GridRenderer__fireRowAnimation(_1){var _2=this.$28j;if(_2==null)return;var _3=_2.$24t,_4=this.$04(_2.$28k,_2.$28l,_1);if(isc.Browser.isSafari&&_2.$28k>_2.$28l)
this.$28o=true;this.setRowHeight(_3,_4,null,isc.emptyString,true,true);if(isc.Browser.isSafari)delete this.$28o;if(_2.$1n){var _5=this.$28g(this.getTableElement(_3,0));if(_5){var _6=_5.scrollHeight,_7=_5.offsetHeight;if(_6>_7)_5.scrollTop=_6-_7;else _5.scrollTop=0}}
if(_1==1){isc.Timer.setTimeout({target:this,methodName:"$28p"},0)}},isc.A.$28p=function isc_GridRenderer__rowAnimationComplete(){if(isc.screenReader){var _1=this.ns.EH.getFocusCanvas();this.$86a(this.getNativeFocusRow(),this.getNativeFocusColumn(),_1!=null&&_1!==this)}
delete this.$417;this.adjustOverflow("row animation complete");var _2=this.$28j;delete this.$28i;delete this.$28j;if(_2&&_2.$03){var _3=_2.$28m?this.parentElement:this;_3.fireCallback(_2.$03)}},isc.A.finishAnimateRowHeight=function isc_GridRenderer_finishAnimateRowHeight(){if(!this.$28i)return;this.cancelAnimation(this.$28i);this.$28n(1)},isc.A.$80s=function isc_GridRenderer__getPrintChildren(){return this.$29a},isc.A.getTablePrintHTML=function isc_GridRenderer_getTablePrintHTML(_1,_2,_3,_4,_5){return this.getTableHTML(_1,_2,_3,_4,_5)},isc.A.draw=function isc_GridRenderer_draw(){this.$182m();if(isc.screenReader&&this.screenReader_suppressHandleFocus){this.clipHandleIsFocusHandle=this.isEmpty()}
return this.Super("draw",arguments)},isc.A.$182m=function isc_GridRenderer__clearCellValueCacheForDraw(){this.$182n()},isc.A.handleFocusIn=function isc_GridRenderer_handleFocusIn(_1,_2){if(isc.Browser.isIE&&isc.EH.leftButtonDown()){var _3=_1&&_1.nodeName;if(_3=="TD"){this.logDebug("GridRenderer: Intercepting native focus from mouseDown on table cell and resetting to handle.","nativeFocus");this.focus();return}}
return this.Super("handleFocusIn",arguments)},isc.A.$163p=function isc_GridRenderer__getScreenReaderCellSeparatorID(){return this.$qs("screenReaderCellSeparator")},isc.A.$163q=function isc_GridRenderer__getScreenReaderRowSeparatorID(){return this.$qs("screenReaderRowSeparator")},isc.A.$1720=function isc_GridRenderer__lockVirtualScrolling(){},isc.A.$1721=function isc_GridRenderer__canStopVirtualScrolling(){return false},isc.A.$167g=function isc_GridRenderer__shouldSubtractVBorderPadFromRowHeight(){return isc.Browser.isStrict&&((isc.Browser.isMoz&&isc.Browser.version>=17)||(isc.Browser.isSafari||isc.Browser.isIE))},isc.A.$193d=function isc_GridRenderer__updateVirtualScrolling(_1){var _2=this.$121d(),_3=this.grid;var _4=(_2[0]==0&&_2[1]==this.getTotalRows());if(this.virtualScrolling){var _5=this.$60s,_6=!_4;if(_6!=_5&&(_6||this.$1721()))
{this.$60s=_6;if(this.$60s){if(this.isDrawn()){var _7=this.getScrollTop(),_8=this.getEventRow(_7),_9=this.getRowTop(_8);if(_9<_7)_8++;this.$27y=_8;this.$27z=_7-this.getRowTop(_8);_2=this.$121d()}}else{delete this.$27y;delete this.$27z;delete this.$271;delete this.$60u}}
if(this.$60s)this.$1720()}
if(_1){this.$252=_2[0];this.$253=_2[1]-1}
return _2},isc.A.getTableHTML=function isc_GridRenderer_getTableHTML(_1,_2,_3,_4,_5,_6,_7){if(isc.$cv)arguments.$cw=this;this.$2716();var _8=isc.timeStamp();if(this.isEmpty()){if(_7){this.$252=this.$253=this.$254=this.$255=null}
return this.$27w()}
if(this.isPrinting&&(!this.$568||this.$2808)){var _9=this.$80s();if(_9!=null&&_9.length>0){for(var i=0;i<_9.length;i++){var _11=_9[i];if(_11.$80t!=null)continue;var _12={component:_11,colNum:_1,startRow:_2,endRow:_3,descreteCols:_4,asyncCallback:_5};var _13=_9[i].getPrintHTML(this.printProperties,_5==null?null:{target:this,methodName:"gotComponentPrintHTML",context:_12});if(_13!=null){_11.$80t=_13}else{return null}}}}
var _14=(_2!=null&&_3!=null),_15=_2!=null?_2:0,_16=_3!=null?_3:this.getTotalRows();var _17;if(_2!=null&&_3!=null){var _18=this.getTotalRows(),_2,_3,_19,_20,_21=this.fields.length,_22=_18*_21,_23=this.shouldShowAllCells(_18);if(_1!=null){_19=_4&&isc.isAn.Array(_1)?_1[0]:_1;_20=_1+1}else if(_23||this.shouldShowAllColumns()){_19=0;_20=_21-1}else{var _24=this.$200y();_19=_24[0];_20=_24[1]}
var _25=this.$200z(_2,_3);_2=_25[0];_3=_25[1];_17=[_2,_3,_19,_20]}else{_17=this.$193d(_7)}
var _26=this.grid;_2=_17[0];_3=_17[1];if(_7){this.$254=_17[2];this.$255=_17[3]}
var _27=_1!=null&&isc.isAn.Array(_1),_19,_20;if(!_27)_4=false;if(_1!=null){if(_27){_19=_1[0];_20=_1[1]+1}else{_19=_1;_20=_1+1}}else{_19=_17[2];_20=_17[3]+1}
var _28;if(_4)_28=_1;else{_28=[];for(var i=_19;i<_20;i++){_28[_28.length]=i}}
var _29=_28.length;var _30=(this.shouldShowAllColumns()||_1!=null);var _31=!_14&&_1==null&&!this.isPrinting&&!this.$941&&this.$191e(_17);var _32=isc.StringBuffer.create(),_33=this.fields,_34=this.$26a;this.$28r=_28[0]!=0?null:this.$26a[0];var _35,_36,_37,_38;if(!_30||this.leftSpace!=null||this.rightSpace!=null){_35=(this.leftSpace!=null)?this.leftSpace:0;_36=(this.rightSpace!=null)?this.rightSpace:0;if(!_30){_35+=this.$26a.slice(0,_19).sum();_36+=this.$26a.slice(_20,this.$26a.length).sum()}
_37=this.$26a.sum()
_38=(this.cacheDOM||(isc.Browser.isIE&&!(isc.Browser.isIE8||isc.Browser.isIE9))?"margin":"padding")}
var _39=this.autoFit;var _40="";if(_1!=null){if(!_39&&this.fixedColumnWidths){_40=" WIDTH=100%"}}else if(this.isPrinting&&this.autoFit){_40=" WIDTH=100%"}else if((isc.Browser.isIE8Strict||isc.Browser.isMoz||isc.Browser.isSafari)&&!_39)
{var _41=this.$26a.slice(_19,_20).sum();_40=" WIDTH="+_41}
var _42=this.startSpace||0;if(_14){_42=0}else{if(_2!=_15){var _43=((_2-_15)*this.getAvgRowHeight());this.$514=_43;_42+=_43}else{this.$514=0}}
var _44=true;var _45=(_16-_15)*this.getAvgRowHeight();if(isc.Browser.isIE){if(_45>1300000)_44=false}
if(!_14)this.$79b=_44;if(_45>10000000){this.logWarn("This grid is showing "+(_16-_15).toLocalizedString()+" rows. Due to native rendering limitations, grids with this many rows may not appear correctly on all browsers. Consider filtering the data displayed to the user to reduce the total number of rows displayed at a time. This will improve usability as well as avoiding unpredictable behavior.")}
if(!_14&&!this.cacheDOM&&!this.isPrinting){_32.append("<DIV style='width:1px;");if(_44){_32.append("height:",_42,"px;overflow:hidden;")}
if(_42==0)_32.append("display:none;");_32.append("' ");if(this.isPrinting){_32.append(">")}else{_32.append(" ID="+this.getID()+"$28s>")}
_32.append(isc.Canvas.spacerHTML(1,_42),"</DIV>")}
if(!this.$568||(this.$2808&&!this.printChunkOnly)){if(isc.screenReader){_32.append("<div id='",this.$163p(),"' style='display:none' aria-hidden='true'>",this.screenReaderCellSeparator,"</div>","<div id='",this.$163q(),"' style='display:none' aria-hidden='true'>",this.screenReaderRowSeparator,"</div>")}
_32.append("<TABLE",(isc.Browser.isIE&&(isc.screenReader||!this.canSelectText)?" unselectable='on'":null)," role='presentation' BORDER=0",_40,((!_14&&!this.isPrinting)?" ID="+this.getTableElementId():null),(this.tableStyle&&isc.Browser.isDOM?" CLASS='"+this.tableStyle+this.$ob:isc.$ad)," CELLSPACING=",this.cellSpacing," CELLPADDING=",this.cellPadding," STYLE='",(isc.Browser.isDOM&&!_39&&this.fixedColumnWidths?"table-layout:fixed;overflow:hidden;":""),(!_30?_38+(this.isRTL()?"-right: ":"-left:")+_35+"px;"+_38+(this.isRTL()?"-left:":"-right:")+_36+"px;":""),(this.cacheDOM&&this.$514>0?"margin-top:"+this.$514+"px;":""),(this.$27y!=null&&!(isc.Browser.isIE&&this.$r9)&&!this.isPrinting?"visibility:hidden;":""),"'>",(this.derivedCellBorderVSpacing==0&&isc.Browser.isMoz?"<TBODY></TBODY>":""));var _46=0,_47=0,_48=this.$54p();if(this.$167g()){if((isc.Browser.isIE&&isc.Browser.version<8)||(isc.Browser.isSafari&&isc.Browser.safariVersion<530))
{_47=this.$54q()}
_46=(this.fixedRowHeights?isc.Element.$ym(_48):this.$272o())}
this.$28t=_46;this.$28u=_47;_32.append("<colgroup>");if(!_39&&isc.Browser.isDOM){for(var i=0;i<_28.length;i++){_32.append("<COL WIDTH=",(_34[_28[i]]-_47),">")}
if(_31){_32.append("<COL width=0>")}}
_32.append("</colgroup>");_32.append("<TBODY>")}
var _49=this.cellHeight,_50=this.$28v(_49),_51=!this.wrapCells&&(!isc.Browser.isIE||isc.Browser.isStrict),_52=this.wrapCells||_50||_51,_53=this.preserveWhitespace?(this.wrapCells?";white-space:pre-wrap;":";white-space:pre;"):(!_51?null:";white-space:nowrap;"),_54=(_52?"":"<NOBR>"),_55=(!this.closeNOBRs||_52?"":"</NOBR>");if(this.$207q()){_54+="<div></div>"}
var _56=0;if(isc.Browser.isDOM){var _57=[],_58=1,_59=2,_60=3,_61=4,_62=5,_63=6,_64=7,_65=8,_66=10,_67=11,_68=18,_69,_70=21,_71=24;var _72,_28;_57[0]="<TD";if(isc.Browser.isIE&&(isc.screenReader||!this.canSelectText))_57[0]+=" unselectable='on'";_57[4]=" ALIGN=";_57[16]=_53;_57[17]=this.fastCellUpdates?"' ":"' class=";if(!_14&&!this.isPrinting&&(isc.screenReader||this.writeOutCellElementId)){_57[19]=" id=";_69=20}
_57[23]=">"+_54;_57[30]=_55+(_50?"</DIV></TD>":"</TD>");var _73="<TR ",_74="</TR>",_75=">",_76=" HEIGHT=",_77=" VALIGN=";if(_26&&_26.canDragRecordsOut&&_26.useNativeDrag){_73+=" draggable='true'"}
if(isc.Browser.isMobileWebkit)_73+=" onmousedown='return true;' style='-webkit-tap-highlight-color: rgba(0,0,0,0)'";var _78;if(isc.screenReader){_78=" tabIndex=-1"}
var _79=isc.Canvas.ariaEnabled();var _80=[],_81=0,_82=[];var _83=this.$99p={};this.$50d(_28,_39,_47,_50);if(this.isPrinting&&(!this.$568||(this.$2808&&!this.printChunkOnly))){_32.append(this.getPrintHeaders(_19,_20))}
var _84=this.$100b();if(_69!=null){_72=new Array(_28.length)}
for(var _85=_2;_85<_3;_85++){var _86=(!_14&&this.$28c==_85);if(_69!=null){var _87=_85-_2;for(var i=0;i<_28.length;++i){var _1=_28[i],_88=_1-_19;_72[_88]=this.getCellElementId(_85,_87,_1,_88);_28[_88]=_1}}
var _89=this.getCellRecord(_85);if(_26&&_89&&!_89[_26.isSeparatorProperty]){if(_26&&_26.tableRowStyle){_73+=" class='"+_26.tableRowStyle+"' "}}
var _90=_86||this.$282(_85,_89);_32.append(_73);if(_78!=null){if(this.screenReader_suppressHandleFocus){if(this.getNativeFocusRow()==_85){_32.append(" tabIndex=",this.getTabIndex(),isc.Canvas.$ry,this.$qn(),isc.Canvas.$rz,this.$qo())}else{_32.append(_78)}}else{_32.append(_78)}}
if(!_14&&!this.isPrinting&&(this.writeOutRowElementId||isc.screenReader)){_32.append(" ID=",this.getRowElementId(_85,_85-_2))}
if(_79){var _91=this.getRowRole&&this.getRowRole(_85,_89);if(_91)_32.append(" role='",_91,"'");var _92;if(this.getRowAriaState!=null){_92=this.getRowAriaState(_85,_89,_91)}else if(_69!=null&&isc.screenReader){_92={labelledby:null}}
if(_92!=null){if(_69!=null&&isc.screenReader&&_92.labelledby==null){var _93=_72;if(isc.isA.TreeGrid&&isc.isA.TreeGrid(_26)){var _94=_26.$34t,_95=_26.getFieldBody(_94);if(_95===this){var _96=_26.getLocalFieldNum(_94);if(_19<=_96&&_96<_20){_93=_72.duplicate();_93[_96-_19]=_26.$170d(_85)}}}
if(this.$234w){var _97=this.$234w(_28,_93,this.$163p(),this.$163q());if(_97)_92.labelledby=_97}}
_32.append(isc.Canvas.getAriaStateAttributes(_92))}}
_32.append(_75);var _98=_86?this.$28f:this.getRowHeight(_89,_85,_84,true);var _99;if(_86){_99=true}else{_99=this.$2698(_89,_85)}
if(_99){_57[_59]=_76;_57[_60]=_98-_46;_57[_66]=null}else{_57[_59]=null;_57[_60]=null;if(!_90&&_98==this.cellHeight&&!this.fixedRowHeights)
{_57[_66]=null}else{if(_89!=null&&_89.isSeparator==true&&this.useMinHeightForHR!=null){_57[_66]=this.useMinHeightForHR}else{_57[_66]=this.$281(_89,_85)}}}
if(_50){_57[_70]=">"+this.$27s+this.$283(_98,_89,_85,_86);if(_53!=null)_57[_70]+=_53}
var _100=_90?this.$67p(_89,_85,_19,_20):null;for(var i=0;i<_28.length;i++){_1=_28[i];if(this.useCellRecords)_89=this.getCellRecord(_85,_1);var _101=_33[_1],_102=_89;if(_102==null)_102=this.getCellRecord(_85,_1);if(_80[_1]>0){_101.$28w[_85]=_82[_1];if(_1==0){_83[_85]=_85>0?_83[_85-1]:0}
_80[_1]--;if(_80[_1]==0){_81--;_82[_1]=null}
continue}else if(_1==0){_83[_85]=_85>0?_83[_85-1]+1:0}
var _103=this.getCellAlign(_89,_101,_85,_1);if(_103!=null){_57[_62]=_103}else{delete _57[_61]}
var _104=this.getCellVAlign(_89,_101,_85,_1);if(_104!=null){_57[_63]=_77
_57[_64]=_104}
if(_100!=null&&(_1==_100[0])){_56++;_57[_65]=this.$67q(_100[1]-_100[0]);if(_50){_57[_70+1]=this.$ob}}else{_57[_65]=_101.$28x;if(this.allowRowSpanning&&this.getRowSpan){var _105=this.$100c(_89,_85,_1);if(_105>1){var _106=" ROWSPAN="+_105;if(_57[_62]!=null)
_57[_62]+=_106;else
_57[_62]=_106;_80[_1]=_105-1;_81++;if(_101.$28w==null)_101.$28w={};_101.$28w[_85]=_85;_82[_1]=_85;if(_1==0){_83[_85]=_85>0?_83[_85-1]+1:0}}}
_57[_58]=null;if(_79){var _107=this.getCellRole&&this.getCellRole(_85,_1,_89);if(_107){_57[_58]=" role='"+_107+"'"}
var _108=this.getCellAriaState&&this.getCellAriaState(_85,_1,_89,_107);if(_108!=null){var _109=isc.Canvas.getAriaStateAttributes(_108);var _110=_57[_58];_57[_58]=(_110==null?_109:_110+_109)}}
if(_50){_57[_70+1]=_101.$28y}else{_57[_70+1]=null}}
var _111=this.getCellStyleList(_89,_85,_1),_112=(this.getCellCSSText?this.getCellCSSText(_89,_85,_1):null);var _113=null;if(_86){_113="padding:0px;border:0px;"}else
if(this.$198v){_113="padding-bottom:0px;padding-top:0px;border-bottom:0px;border-top:0px;"}
if(_113!=null){if(_112)_112+=";"+_113
else _112=_113}
_112=(_112?_112:"")+";position:relative;";if(_112){if(!_112.endsWith(this.$39)){_112+=this.$39}
if(!_112.startsWith(this.$39)){_112=this.$39+_112}}
if(!this.fastCellUpdates){_57[_67]=_112==null?null:String.asAttValue(_112);_57[_68]=_86?"''":String.asAttValue(_111,false,true)}else{var _114=this.$77d(_111);_57[_67]=_114;_57[_67+1]=_112==null?null:String.asAttValue(_112)}
if(_86){this.$28q=true;var _115=this.getTableHTML(null,this.$28c,this.$28e);delete this.$28q;if(!_50){_57[_71]=isc.SB.concat(this.$27s,this.$283(_98,_89,_85,_86),this.$ob,this.$oa,_115,"</DIV>")}else{_57[_71]=_115}}else
_57[_71]=this.$22k(_89,_85,_1);if(_69!=null){_57[_69]=_72[_1-_19]}
_32.append(_57);if(!_14&&_102){var _116=this.grid.$917(_102);if(_116[0]&&_116[0].rowNum==null){this.updateEmbeddedComponentCoords(_116,_102,_85,_1)}}
if(_90&&(_1==_100[0])){i+=_100[1]-_100[0]}}
if(_31){_57[_65]=" STYLE='overflow:hidden;"
_57[_67]=null
_57[_68]=String.asAttValue(_111,false,true);_57[_70]=_57[_70+1]=null;_57[30]="</TD>";_57[_71]=this.$191g(_89,_85,_17);_32.append(_57)}
_32.append(_74);if(this.isPrinting&&_89&&this.grid){var _116=this.grid.$917(_89);for(var _117=0;_117<_116.length;_117++){var _118=_116[_117];if(_118.$57n==null&&_118.$80t!=null){_32.append(_73,_75,'<td colspan="',_29,'">',_118.$80t,"</td>",_74);delete _118.$80t}}}
if(_86){_85=this.$28e-1}}}
if(!this.$568||(_3==this.getTotalRows()&&!this.printChunkOnly)){if(this.grid&&this.isPrinting){_32.append(this.getPrintFooters(_19,_20))}
_32.append("</TBODY></TABLE>")}
var _119=_16-_3,_120=(!_14&&this.$60s);var _121=this.cacheDOM?0:(this.endSpace||0);if(_14){_121=0}else{if(!this.$941){this.$515=0}
if(!this.showAllRows&&(_119!=0||_120)){var _122=_119*this.getAvgRowHeight();if(_120&&_119==0&&!_14){var _123=this.getViewportHeight();if(_122<_123){_122=_123}}
if(!this.$941)this.$515=_122;_121+=_122}}
if(!_14&&!this.cacheDOM&&!this.isPrinting){_32.append("<DIV style='width:1px;");if(_44){_32.append("height:",_121,"px;overflow:hidden;")}
if(_121==0)_32.append("display:none;");_32.append("' ");if(this.isPrinting){_32.append(">")}else{_32.append(" ID="+this.getID()+"$284>")}
_32.append(isc.Canvas.spacerHTML(1,_121),"</DIV>")}
if(this.logIsDebugEnabled("gridHTML")){var _124=(isc.timeStamp()-_8),_125=(_29*(_3-_2)),_126=(_124/_125),_127=(1000/_126);if(_126.toFixed!=null)_126=_126.toFixed(2);if(_127.toFixed!=null)_127=_127.toFixed(2);this.logDebug("getTableHTML: "+(_14?"[fragment]:":"")+" columns "+(_4?_28:_19+"->"+(_20-1))+", rows "+_2+"->"+(_3-1)+", time: "+_124+"ms ("+_125+" cells at "+_126+"ms per cell, "+_127+" cells per second), spacerHeights: ["+[_42,_121]+"], left/right pad: ["+[_35,_36]+"], "+_56+" single cell rows","gridHTML")}
var _128=_32.release(false);if(_6){if(_5!=null){this.fireCallback(_5,"HTML,callback",[_128,_5])}
return null}
return _128});isc.evalBoundary;isc.B.push(isc.A.$200z=function isc_GridRenderer__limitFragmentRowRange(_1,_2){if(this.$28q&&!this.$73q){var _3=this.$80e();var _4=_3[0],_5=_3[1]+1;if(_4>_2||_5<_1){_1=_2}else{_1=Math.max(_1,_4);_2=Math.min(_2,_5)}}
return[_1,_2]},isc.A.$121d=function isc_GridRenderer__getTableHTMLDrawArea(_1){var _2,_3,_4=this.grid;if(_4&&_4.$30d!=null){var _5=_4.$30d;if(this.virtualScrolling)_3=isc.isAn.Array(_5)?_5[0]:_5;else _2=_4.$201a(_5)}
var _6=this.getDrawArea(null,_2);if(_4){if(_4.$30d==null&&_6[0]==0&&_4.data&&_4.data.getFirstUsedIndex)
{_3=_4.data.getFirstUsedIndex()}
if(_3)this.$201b(_6,_3)}
var _7=_6[0],_8=_6[1];if(this.$28c!=null){_8+=(this.$28e-this.$28c);var _9=this.getTotalRows();if(_8>=_9)_8=_9-1}
var _10=_7,_11=_8+1;if(_1){this.$252=_7;this.$253=_8}
_6[0]=_10;_6[1]=_11;return _6},isc.A.$201b=function isc_GridRenderer__moveDrawRect(_1,_2){var _3=_1[1]-_1[0],_4=_2+_3,_5=this.getTotalRows();if(_4>=_5){_2-=_4-(_5-1);_4=_5-1}
if(_2<0)_2=0;_1[0]=_2;_1[1]=_4},isc.A.$191e=function isc_GridRenderer__writeRowHeightSpacerHTML(_1){return false},isc.A.$191g=function isc_GridRenderer__getRowHeightSpacerCellValue(){return"&nbsp;"},isc.A.getPrintHeaders=function isc_GridRenderer_getPrintHeaders(_1,_2){return""},isc.A.getPrintFooters=function isc_GridRenderer_getPrintFooters(_1,_2){return""},isc.A.setFocus=function isc_GridRenderer_setFocus(_1,_2){if(this.$175p){return this.Super("setFocus",arguments)}
this.$175p=true;if(isc.screenReader){this.$175d=[this.getScrollLeft(),this.getScrollTop()];if(_2=="focus on mousedown"){var _3=this.getEventRow();if(_3!=null&&!this.isEmpty()){if(_3==-2)_3=this.getTotalRows()-1;if(_3>=0){this.$86a(_3,this.getEventColumn(),true)}}}}
var _4=this.Super("setFocus",arguments);if(isc.screenReader){if(this.getScrollLeft()!=this.$175d[0]||this.getScrollTop()!=this.$175d[1])
{this.scrollTo(this.$175d[0],this.$175d[1],"reset scroll after native row focus (via setFocus())")}
delete this.$175d}
delete this.$175p;return _4},isc.A.$86a=function isc_GridRenderer__putNativeFocusInRow(_1,_2,_3){var _4=this.screenReader_suppressHandleFocus;if(_4){this.$170e=true;this.$vj(false);this.$170e=false;this.$vj(false)}
this.$86b=_1;this.$233s=_2;if(_4){this.$vj(true)}
if(_4){this.clipHandleIsFocusHandle=this.isEmpty()}
if(_3==null)_3=!this.hasFocus;if(_3){return}
var _5=this.$168x();if(!(_5[0]<=_1&&_1<=_5[1])){return}
var _6;if(this.$175e!=null){_6=false}else{this.$175e=[this.getScrollLeft(),this.getScrollTop()];_6=true}
var _7=this.getFocusHandle();if(_7){this.logDebug("$86a() about to call native focus()","nativeFocus");_7.focus();if(!_4)isc.EH.$ke=null;this.logDebug("$86a() about to call native focus() again","nativeFocus");_7.focus();if(!_4)isc.EH.$ke=this}
if(_6){if(this.getScrollLeft()!=this.$175e[0]||this.getScrollTop()!=this.$175e[1])
{this.scrollTo(this.$175e[0],this.$175e[1],"reset scroll after native row focus (via putNativeFocusInRow())")}
delete this.$175e}},isc.A.getFocusHandle=function isc_GridRenderer_getFocusHandle(){if(isc.screenReader&&!this.$170e){var _1=this.getNativeFocusRow(),_2=this.canFocusInCells()?this.getNativeFocusColumn():null,_3=this.getTableElement(_1,_2);if(_3!=null)return _3}
return this.Super("getFocusHandle",arguments)},isc.A.gotComponentPrintHTML=function isc_GridRenderer_gotComponentPrintHTML(_1,_2){var _3=_2.context,_4=_3.component;if(_3.asyncCallback==null){return}
_4.$80t=_1;return this.getTableHTML(_3.colNum,_3.startRow,_3.endRow,_3.discreteCols,_3.asyncCallback,true)},isc.A.$77d=function isc_GridRenderer__getEscapedStyleText(_1){if(this.$77c[_1]!=null)return this.$77c[_1];var _2=isc.Element.getStyleText(_1,true);this.$77c[_1]=String.asAttValue(_2);return this.$77c[_1]},isc.A.getCellVAlign=function isc_GridRenderer_getCellVAlign(_1,_2,_3,_4){return null},isc.A.getCellAlign=function isc_GridRenderer_getCellAlign(_1,_2,_3,_4){return _2.cellAlign||_2.align},isc.A.$67p=function isc_GridRenderer__getSingleCellSpan(_1,_2,_3,_4){return[_3,_4]},isc.A.$67q=function isc_GridRenderer__getTDSpanHTML(_1){if(!isc.GridRenderer.$67r){isc.GridRenderer.$67r={$67s:{},$67t:{}}}
var _2=this.fixedRowHeights?isc.GridRenderer.$67r.$67s:isc.GridRenderer.$67r.$67t;if(_2[_1])return _2[_1];else{return _2[_1]=" COLSPAN="+_1+" STYLE='"+(this.fixedRowHeights?"padding-top:0px;padding-bottom:0px":"")}},isc.A.$54p=function isc_GridRenderer__getFirstRecordStyle(){var _1=this.grid,_2=0;if(_1){if(_1.$30d){_2=_1.$30d==null?0:isc.isAn.Array(_1.$30d)?_1.$30d[0]:_1.$30d}else if(_1.data&&_1.data.getFirstUsedIndex){_2=_1.data.getFirstUsedIndex()}}
return(this.getBaseStyle!=null?this.getBaseStyle(this.getCellRecord(_2,0),0,0):this.baseStyle)},isc.A.$50d=function isc_GridRenderer__cacheColumnHTML(_1,_2,_3,_4){var _5=this.fields,_6=this.$26a;for(var i=0;i<_1.length;i++){var _8=_1[i],_9=_5[_8];_9.$28w=null;if(this.$188p(_9)){_9.$28y=this.$1148}else{_9.$28y=isc.emptyString}
if(_2){_9.$28x=(isc.Browser.isIE&&!isc.Browser.isIEStrict)?" STYLE='":" STYLE='OVERFLOW:hidden;";_9.$28y+=this.$ob}else{var _10=isc.Browser.isIE8Strict?" STYLE='overflow:hidden;":" STYLE='";_9.$28x=(isc.Browser.isIE?" WIDTH="+(_6[_8]-_3)+_10:" STYLE='"+this.$28z(_8));if(_4){_9.$28y+=(this.$1546(_8)+this.$ob)}}
if(!this.fixedRowHeights){_9.$28x+=this.$281()}
if(this.fixedRowHeights)_9.$28x+="padding-top:0px;padding-bottom:0px;"}},isc.A.cellValueIsClipped=function isc_GridRenderer_cellValueIsClipped(_1,_2){var _3=this.getTableElement(_1,_2);var _4;if(!this.$28v(this.cellHeight))_4=_3;else _4=this.$28g(_3);return this.$1154(_4)},isc.A.$1154=function isc_GridRenderer__cellValueIsClipped(_1){if(_1==null)return null;return isc.Element.getClientWidth(_1)<_1.scrollWidth},isc.A.$28v=function isc_GridRenderer__writeDiv(_1){var _2=this.grid&&this.grid.currentPrintProperties;if(_2&&_2.printForExport)return false;var _3=(isc.Browser.isSafari||(isc.Browser.isOpera&&!this.autoFit&&(this.fixedColumnWidths||this.fixedRowHeights))||(isc.Browser.isMoz&&isc.Browser.geckoVersion>=20040113&&this.fixedColumnWidths&&!this.autoFit)||(this.shouldEnforceVClipping()&&(isc.Browser.isMoz||(isc.Browser.isIE&&(isc.Browser.isStrict||isc.Browser.version>=10)))));return _3},isc.A.$282=function isc_GridRenderer__drawRecordAsSingleCell(_1,_2){return(_2&&(_2[this.singleCellValueProperty]!=null||_2[this.isSeparatorProperty]||(Array.isLoading(_2)&&!(isc.Browser.isSafari&&(_1==0||_1==this.$252)))))},isc.A.$163s=function isc_GridRenderer__useMaxHeightForCellDivCSSHeight(){return(isc.Browser.isMoz||isc.Browser.isSafari||(isc.Browser.isIE&&((isc.Browser.version>=7&&isc.Browser.isStrict)||isc.Browser.version>=10)))},isc.A.$283=function isc_GridRenderer__getCellDivCSSHeight(_1,_2,_3,_4){var _5=_4||(this.shouldEnforceVClipping()&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_2,_3)!=false));if(_5){var _6=_1-2*this.cellSpacing-
(_4?0:2);if(_3==this.$285){for(var i=0;i<this.$286.getItems().length;i++){_6=Math.max(this.$286.getItems()[i].getHeight(),this.$286.getItems()[i].iconHeight)}}
if(_6<1)_6=1;return(this.$163s()?"MAX-HEIGHT:":"HEIGHT:")+_6+"px;"}
return isc.$ad},isc.A.$1546=function isc_GridRenderer__getFieldDivWidthCSSText(_1){if(!this.fixedColumnWidths||this.autoFit)return isc.emptyString;return"WIDTH:"+this.getInnerColumnWidth(_1)+"px;"},isc.A.$281=function isc_GridRenderer__getMinHeightCSSText(_1,_2){if(this.$191k)return"";var _3=(_2!=null?this.getRowHeight(_1,_2,this.$100b(),true):this.cellHeight),_4=isc.Browser.isIE,_5=isc.Browser.isStrict;if(_5)_3-=this.$28t;if(_4&&!_5&&!(this.autoFit||!this.fixedColumnWidths)){return"MIN-HEIGHT:"+_3+"px;"}
return"HEIGHT:"+_3+"px;"},isc.A.$28z=function isc_GridRenderer__getCSSTextForColWidth(_1){if(isc.Browser.isIE||this.autoFit)return isc.$ad;if(this.$287==null){this.$287=[];for(var i=0;i<this.$26a.length;i++){var _3=this.$26a[i];this.$287[i]="WIDTH:"+_3+(this.fixedColumnWidths?"px;OVERFLOW:hidden;":"px;")}}
return this.$287[_1]},isc.A.getCellRecord=function isc_GridRenderer_getCellRecord(_1,_2){return null},isc.A.findRowNum=function isc_GridRenderer_findRowNum(_1){return-1},isc.A.findColNum=function isc_GridRenderer_findColNum(_1){return-1},isc.A.$22k=function isc_GridRenderer__getCellValue(_1,_2,_3){var _4=this.isPrinting,_5=!this.bypassCellValueCache(_1,_2,_3),_6=_5&&this.$182o!=null?this.$182p(_1,_2,_3):null,_7=_6?_6.value:this.getCellValue(_1,_2,_3,this);if(_2==0&&_3==0&&this.logIsInfoEnabled("cellValueCache")){var _8=this.logIsDebugEnabled("cellValueCache");this.logInfo("getCellValue(0,0): "+(_6!=null?"Using cached cell value"+(_8?" of:"+_7:""):"Not using cached cell value")+(_8?"\nStack:\n"+this.getStackTrace():"(enable debug logging for stacktrace)"),"cellValueCache")}
if(_5&&!_6)this.$182q(_7,_1,_2,_3);if(!_4&&this.$80g(_1)){var _9=this.getMaxEmbeddedComponentHeight(_1),_10=this.$131s;if(_9.allWithin){if(_9.requiredHeight&&(_9.requiredHeight>this.cellHeight)){_10[0]=_7;var h=this.getRowHeight(_1,_2,this.frozen,true);isc.$bk(_10,(_9.requiredHeight-h),2,5,false);_7=_10.join(isc.emptyString)}}else if(_9.aboveContentHeight>0){_10[0]=null;isc.$bk(_10,_9.requiredHeight,2,5,false);_7=_10.join(isc.emptyString)+_7}else if(_9.requiredHeight>0){_10[0]=_7;isc.$bk(_10,_9.requiredHeight,2,5,false);_7=_10.join(isc.emptyString)}}else if(_1&&this.grid){var _12=0,_13=0;if(_4){_12=this.grid.$143l;_13=this.grid.$143w}
var _14=this.grid.$917(_1);for(var i=0,_16=_14.length;i<_16;++i){var _17=_14[i];if(_17==null)continue;var _18=_17.$57n;if(_4&&_18!=null){_18+=(_17.$143x?_13:_12)}
if(_18!=_3){continue}
var _19=(_17.embeddedPosition==this.$57l);var _20=_17.$80t;if(_20!=null){var _21=(_20!=isc.emptyString);if(_19&&_21){_20=this.$80q+_20+this.$80r}
if(_7==this.emptyCellValue&&_21){_7=_20}else{_7+=_20}
delete _17.$80t}}}
return _7},isc.A.getCellValue=function isc_GridRenderer_getCellValue(_1,_2,_3){return this.emptyCellValue},isc.A.$80g=function isc_GridRenderer__writeEmbeddedComponentSpacer(_1){return(_1&&this.grid&&this.grid.$916(_1))},isc.A.$182q=function isc_GridRenderer__cacheCellValue(_1,_2,_3,_4){if(this.neverCacheCellValues)return;if(_3==0&&this.logIsInfoEnabled("cellValueCache")){this.logInfo("Cacheing cell value (for first row) "+(this.logIsDebugEnabled("cellValueCache")?this.getStackTrace():""),"cellValueCache")}
var _5;if(_1===_5)_1=this.$182r;else if(_1===null)_1=this.$1790;if(this.$182o==null){this.$182o=[]}
if(this.$182o[_3]==null){this.$182o[_3]=[]}
this.$182o[_3][_4]={value:_1,record:_2}},isc.A.bypassCellValueCache=function isc_GridRenderer_bypassCellValueCache(_1,_2,_3){return this.isPrinting});isc.evalBoundary;isc.B.push(isc.A.$182p=function isc_GridRenderer__getCachedCellValue(_1,_2,_3){var _4=(this.$182o&&this.$182o[_2]&&this.$182o[_2][_3]);if(_4&&_4.record==_1){return _4}
return null},isc.A.$182s=function isc_GridRenderer__clearCachedCellValue(_1,_2){if(this.logIsInfoEnabled("cellValueCache")){this.logInfo("Dropping cached cell value (for "+[_1,_2]+") "+(this.logIsDebugEnabled("cellValueCache")?this.getStackTrace():""),"cellValueCache")}
if(this.$182o&&this.$182o[_1]){this.$182o[_1][_2]=null}},isc.A.$182n=function isc_GridRenderer__clearCellValueCache(){if(this.logIsInfoEnabled("cellValueCache")){this.logInfo("Dropping all cached cell values "+(this.logIsDebugEnabled("cellValueCache")?this.getStackTrace():""),"cellValueCache")}
delete this.$182o},isc.A.getTotalRows=function isc_GridRenderer_getTotalRows(){return this.totalRows},isc.A.lengthIsKnown=function isc_GridRenderer_lengthIsKnown(){return true},isc.A.setColumnWidth=function isc_GridRenderer_setColumnWidth(_1,_2){this.fields[_1].width=this.$26a[_1]=_2;this.$287=null;this.markForRedraw("setColumnWidth")},isc.A.setColumnWidths=function isc_GridRenderer_setColumnWidths(_1){var _2=this.$26a;this.$26a=_1.duplicate();this.$287=null;if(_2!=null&&_1!=null&&_2.length==_1.length)
{if(_2==_1)return;var _3=false;for(var i=0;i<_2.length;i++){if(_2[i]!=_1[i])_3=true}
if(!_3)return;if(!this.fixedColumnWidths&&!this.wrapCells&&this.isDrawn()&&_1.length==1){var _5=this.$28r||_2[0],_6=_1[0],_7=this.getColumnSize(0);if((_5==_6)||(_7>_5&&_7>=_6)){return}}}
this.markForRedraw("setColumnWidths");return true},isc.A.shouldRedrawOnResize=function isc_GridRenderer_shouldRedrawOnResize(_1,_2,_3){if(this.redrawOnResize!=null)return this.redrawOnResize;if(isc.isA.ListGrid(this.parentElement)&&isc.isA.Layout(this.parentElement.parentElement))
{var _4=this.parentElement.parentElement.getMembers();if(_4&&_4.callMethod("isAnimating").or())return false}
if(this.$276()||this.$277())return true;if(this.isEmpty())return true;return false},isc.A.$2716=function isc_GridRenderer__deriveRowHeight(){this.derivedCellBorderVSpacing=this.getCellBorderVSpacing();this.derivedRowHeight=this.cellHeight+this.derivedCellBorderVSpacing},isc.A.getCellBorderVSpacing=function isc_GridRenderer_getCellBorderVSpacing(){var _1=isc.GridRenderer.$2719(this.tableStyle,this.cellSpacing);return _1.vSpacing},isc.A.getRowHeight=function isc_GridRenderer_getRowHeight(_1,_2,_3,_4){var _5=this.updateHeightForEmbeddedComponents(_1,_2,this.cellHeight);if(!_4&&this.derivedCellBorderVSpacing!=null){_5+=this.derivedCellBorderVSpacing}
return _5},isc.A.updateHeightForEmbeddedComponents=function isc_GridRenderer_updateHeightForEmbeddedComponents(_1,_2,_3){if(_1&&this.grid&&this.grid.$916(_1)){var _4=this.getMaxEmbeddedComponentHeight(_1,_2);if(_4.allWithin){_3=Math.max(_3,_4.requiredHeight)}else{_3+=_4.requiredHeight}}
return _3},isc.A.getMaxEmbeddedComponentHeight=function isc_GridRenderer_getMaxEmbeddedComponentHeight(_1,_2){var _3=this.grid&&this.grid.$917(_1),_4=0,_5=true,_6=this.isPrinting,_7=0;for(var i=0;i<_3.length;i++){var _9=_3[i];if(!_9)continue;if(_6)continue;if(_2!=null)_9.$289=_2;var _10=(_9.embeddedPosition==this.$57l);if(!_10)_5=false;var _11=_9.getVisibleHeight(),_12=0;if(!_10)_12=_11;else if(_11>this.cellHeight)_12=_11;if(_9._percent_height!=null){_12=this.cellHeight}
var _13=_9.specifiedHeight;if(_10&&_13&&isc.isA.String(_13)&&_13.contains("%")){_12=0}
if(_9.embeddedPosition=="above"&&_12>_7){_7=_12}
if(_12>_4){_4=_12}}
return{allWithin:_5,requiredHeight:_4,aboveContentHeight:_7}},isc.A.$100c=function isc_GridRenderer__getRowSpan(_1,_2,_3){if(!this.allowRowSpanning||!this.getRowSpan)return 1;var _4=this.getRowSpan(_1,_2,_3);return Math.min(_4,this.getTotalRows()-_2)},isc.A.getCellStartRow=function isc_GridRenderer_getCellStartRow(_1,_2){var _3=this.fields[_2];if(_3==null)return null;var _4=_3.$28w;if(_4==null||_4[_1]==null)return _1;return _4[_1]},isc.A.getCellRowSpan=function isc_GridRenderer_getCellRowSpan(_1,_2){var _3=this.fields[_2].$28w;if(_3==null)return 1;var _4=this.getCellStartRow(_1,_2);var _5=_1+1,_6=_1-_4+1;while(_5<=this.$253&&_3[_5]==_4)
{_5++;_6++}
return _6},isc.A.addEmbeddedComponent=function isc_GridRenderer_addEmbeddedComponent(_1,_2,_3,_4,_5,_6){if(_5==null)_5=this.$57m;var _7=(_5!=this.$57l||!this.fixedRowHeights);if(!isc.isA.Canvas(_1)){_1.autoDraw=false;var _8=isc.ClassFactory.getClass(_1._constructor);if(_8==null)_8=isc.Canvas;_1=_8.create(_1)}
var _9=false;if(this.$29a&&this.$29a.contains(_1)){if(_1.embeddedPosition==_5&&_1.$289==_3&&_1.$57n==_4&&this.grid.$916(_2)&&this.grid.$917(_2).contains(_1))
{return}
if(_5==_1.embeddedPosition&&!_7){_9=!this.isDirty()}
this.removeEmbeddedComponent(_1.embeddedRecord,_1,true)}else if(!_7){_9=!this.isDirty()}
this.grid.$918(_2,_1);if(this.$29a==null)this.$29a=[];this.$29a.add(_1);_1.embeddedPosition=_5;_1.embeddedRecord=_2;_1.$289=_3;_1.$57n=_4;_1.$669=this.getID();if(_5==this.$57l)_1.percentBox="custom";if(_1.parentElement!=this){var _10=this.$417;this.$417=true;_1.hide();this.addChild(_1,null,false);if(_10==null)delete this.$417}
this.observe(_1,"resized",function(_11,_12){this.$80d(_1,_11,_12)});_1.$29b=_1._redrawWithParent;_1._redrawWithParent=false;_1.$668=_1.bubbleMouseEvents;if(!_1.bubbleMouseEvents){_1.bubbleMouseEvents=["mouseDown","mouseUp","click","doubleClick","contextClick"]}
if(_9&&(_3==-1||_4==-1)){_9=false}
if(_9){this.placeEmbeddedComponent(_1,_6)}else if(!_6){this.markForRedraw("added embedded component")}
return _1},isc.A.$80d=function isc_GridRenderer__handleEmbeddedComponentResize(_1,_2,_3){var _4=_1.embeddedPosition;if(_4!=this.$57l){if(_3!=null&&_3!=0)this.markForRedraw('embedded component resized')}else{this.placeEmbeddedComponent(_1)}},isc.A.updateEmbeddedComponentCoords=function isc_GridRenderer_updateEmbeddedComponentCoords(_1,_2,_3,_4){_1.setProperty("$289",_3)},isc.A.placeEmbeddedComponent=function isc_GridRenderer_placeEmbeddedComponent(_1,_2){var _3=_1.$289;if(_3==null||(this.$252==null||this.$253==null)||(_3<this.$252||_3>this.$253))
{if(_1.isDrawn())_1.clear();return}
if(!_1.removeOnHideField&&_1.$81k&&!this.grid.getField(_1.$81k))
{if(_1.isDrawn())_1.clear();return}
var _4=_1.embeddedRecord,_5=_1.embeddedPosition,_6=_1.$57n,_7=this.getCellTop(_3),_8=(_6!=null&&_6>=0)?this.getColumnLeft(_6):null,_9=(_6!=null&&_6>=0)?this.getColumnWidth(_6):Math.min(this.getInnerWidth(),this.$26a.sum());if(_8==null){if(!this.isRTL()){_8=this.getScrollLeft()}else{_8=this.$95h(this.getScrollLeft(),true)}}
if(_5==this.$57l){var _10=this.getEmbeddedComponentSnapTo(_1,_4,_3,_6),_11=_1.snapEdge||_10;var _12;if(this.allowRowSpanning&&this.getRowSpan){var _13=this.getRowSpan(_4,_3,_6==null?0:_6);if(_13==null)_13=1;_12=0;for(var i=0;i<_13;i++){_12+=this.getDrawnCellHeight(_3+i)}}else{_12=this.getDrawnCellHeight(_3)}
var _15=_1._percent_width,_16=_1._percent_height,_17,_18;if(!_1.sizeWithExpansion&&this.grid.$916(_4)){var _19=0,_20=this.grid.$917(_4);for(var i=0;i<_20.length;i++){var _21=_20[i];if(_21==null)continue;var _22=(_21.embeddedPosition==this.$57l);if(_22)continue;var _23=_21.getVisibleHeight();if(_23>_19){_19=_23}}
_12-=_19}
if(this.grid.indentRecordComponents&&_1.snapOffsetLeft){_9-=_1.snapOffsetLeft}
if(isc.isA.String(_15)&&_15.endsWith("%")){_17=Math.round((parseInt(_15)*_9)/100)}
if(isc.isA.String(_16)&&_16.endsWith("%")){_18=Math.round((parseInt(_16)*_12)/100)}
if(_18||_17){_1.resizeTo(_17,_18,null,null,this.$1872,true)}
if(_1.overflow==isc.Canvas.VISIBLE&&!_1.isDrawn()){_1.draw()}
_12=Math.max(_12,_1.getVisibleHeight());isc.Canvas.snapToEdge([_8,_7,_9,_12],_10,_1,_11)}else{_1.moveTo(_8,_7);var _17,_18,_16=_1._percent_height;if(isc.isA.String(_16)&&_16.endsWith("%")){_18=Math.round((parseInt(_16)*this.cellHeight)/100)}
_17=_9;_1.resizeTo(_17,_18,null,null,this.$1872,true)}
var _24=this.isDrawn();if(_24&&!_1.isDrawn())_1.draw();var _25=this.$207d,_26=this.getRowHeight(_4,_3,this.$100b()),_27=!this.isDirty()||_25;if(_27&&(_26>this.getRowSize(_3))){this.setRowHeight(_3,_26,_4);if(!_2){this.refreshRow(_3)}}
if(_24){if(_5!=this.$57l&&_5!=this.$2790){var _28=this.getDrawnCellHeight(_3)-_1.getVisibleHeight()-1;_1.moveTo(null,this.getCellTop(_3)+_28)}
if(!_1.isVisible()){if(this.shouldAnimateEmbeddedComponent(_1)){_1.animateShow()}else{_1.show()}}}
this.updateEmbeddedComponentZIndex(_1)},isc.A.getEmbeddedComponentSnapTo=function isc_GridRenderer_getEmbeddedComponentSnapTo(_1,_2,_3,_4){if(_1.snapTo!=null)return _1.snapTo;if(_4==null){return"TL"}
var _5=this.getCellAlign(_2,this.fields[_4],_3,_4)||"center",_6=this.getCellVAlign(_2,this.fields[_4],_3,_4)||"center";var _7=this.alignSnapToMap[_5][_6];return _7},isc.A.shouldAnimateEmbeddedComponent=function isc_GridRenderer_shouldAnimateEmbeddedComponent(_1){return false},isc.A.updateEmbeddedComponentZIndex=function isc_GridRenderer_updateEmbeddedComponentZIndex(_1){},isc.A.getEmbeddedComponent=function isc_GridRenderer_getEmbeddedComponent(_1,_2){if(isc.isA.Number(_1))_1=this.getCellRecord(_1,0);var _3=this.grid.$917(_1);if(_3.length==0)return;var _4=null;if(isc.isA.Number(_2))
_4=_3.find({$57n:_2,$669:this.getID()});else
_4=_3.find({$669:this.getID()});return _4},isc.A.removeEmbeddedComponent=function isc_GridRenderer_removeEmbeddedComponent(_1,_2,_3,_4){if(isc.isA.Number(_1))_1=this.getCellRecord(_1,0);var _5=this.grid.$917(_1);if(_5.length==0)return;if(isc.isA.Number(_2))
_2=_5.find({$57n:_2,$669:this.getID()});if(!_2)
_2=_5.find({$669:this.getID()});if(!_5.contains(_2))return;if(this.isObserving(_2,"resized")){this.ignore(_2,"resized")}
this.grid.$919(_1,_2);if(this.$29a)this.$29a.remove(_2);_2._redrawWithParent=_2.$29b;_2.$29b=null;_2.bubbleMouseEvents=_2.$668;var _6=_2.embeddedPosition!=this.$57l;_2.$289=null;_2.$57n=null;_2.$669=null;if(_3){_2.hide();return}
if(_2.isExpansionComponent&&this.grid.expansionComponentPoolingMode!="none"){var _7=_2.members[0];if(this.grid.expansionComponentPoolingMode=="destroy"){if(_7&&!_7.isStockComponent){if(!this.grid.destroyCustomExpansionComponents&&!_7.destroyOnUnembed){_2.removeMember(_7);_7.deparent()}}
_2.destroy()}}else{if(_2.dontAutoDestroy){this.removeChild(_2)}else if(_2.destroyOnUnEmbed){_2.destroy()}else{this.removeChild(_2)}}
if(!_4&&_6){this.markForRedraw("removed embedded component")}},isc.A.$29c=function isc_GridRenderer__resetEmbeddedComponents(){var _1=this.$29a;if(_1==null)return;_1.setProperty("$289",null)},isc.A.$29d=function isc_GridRenderer__placeEmbeddedComponents(){var _1=this.$29a;if(_1==null)return;_1.sortByProperty("$289",true);for(var i=0;i<_1.length;i++){this.placeEmbeddedComponent(_1[i])}},isc.A.$2001=function isc_GridRenderer__handleDisplayNoneOverflow(_1){this.invokeSuper(isc.GridRenderer,"$2001",_1);if(_1)this.$2898()},isc.A.$2898=function isc_GridRenderer__placeEmbeddedComponentsAfterDisplayNone(){const _1=this.$29a;if(_1==null)return;let _2=false;for(let i=0;i<_1.length;i++){const _4=_1[i];if(_4.isDrawn()&&_4.$289!=null){_2=true;break}}
if(_2)this.$29d()},isc.A.getTableZIndex=function isc_GridRenderer_getTableZIndex(){return 1000},isc.A.getCellStyle=function isc_GridRenderer_getCellStyle(_1,_2,_3){if(_1&&_1[this.recordCustomStyleProperty]!=null){return _1[this.recordCustomStyleProperty]}
var _4=this.getCellStyleIndex(_1,_2,_3);return this.getCellStyleName(_4,_1,_2,_3)},isc.A.getCellStyleList=function isc_GridRenderer_getCellStyleList(_1,_2,_3,_4,_5){_4=_4||this.getCellStyle(_1,_2,_3);var _6=[_4];if(this.grid&&!this.grid.isFilterEditor&&this.grid.editPendingMarkerStyle){if(!this.grid.$299(_2)){var _7=this.grid.$166v(_2,_3,true,false);if(_7){_6.add(this.grid.editPendingMarkerStyle)}}}
return _5?_6:_6.join(" ")},isc.A.getCellStyleName=function isc_GridRenderer_getCellStyleName(_1,_2,_3,_4){var _5;if(this.getBaseStyle){_5=this.getBaseStyle(_2,_3,_4)}else{_5=this.baseStyle}
var _6=isc.GridRenderer.SYNCHRONOUS,_7=this.grid;if(_2&&_7&&_7.showAsyncValues!=false){var _8=_7.getField(_7.getFieldNumFromLocal(_4,this));if(_8&&_7.isValuePendingAsyncOrAsyncError(_2,_8)){var _9=_2["_asyncNonSuccess_"+_7.getID()],_10=_9&&_9[_8.name];if(_10&&_10.$132l==_7.$132l){_6=isc.GridRenderer.ASYNC_ERROR}else{_6=isc.GridRenderer.ASYNC}}}
return isc.GridRenderer.getCellStyleName(_1,_5,this.alternateRowSuffix,this.alternateColumnSuffix,_6)},isc.A.getCellStyleIndex=function isc_GridRenderer_getCellStyleIndex(_1,_2,_3){var _4=0;var _5=this.$187l(_1,_2,_3);var _6=this.$187m(_1,_2,_3);if(_5)_4+=8;if(_6)_4+=16;if(!this.cellIsEnabled(_2,_3,_1)){_4+=4}else{if(_2==this.lastOverRow&&this.shouldShowRollOver(_2,_3)&&!this.isPrinting&&(!this.useCellRollOvers||_3==this.lastOverCol))
{_4+=1}
if(this.showSelectedStyle&&this.selectionEnabled()){var _7=this.$241l(_1,_2,_3);if(_7)_4+=2}}
return _4},isc.A.$241l=function isc_GridRenderer__showSelectedStyle(_1,_2,_3){var _4=false;if(this.canSelectCells){var _5=_2;if(this.useRowSpanStyling)_5=this.getCellStartRow(_2,_3);_4=this.selectionManager.cellIsSelected(_5,_3)}else{_4=this.selectionManager.isSelected(_1,_2,true)}
return _4},isc.A.getAlternateRowOffset=function isc_GridRenderer_getAlternateRowOffset(){return 0},isc.A.getAlternateColumnOffset=function isc_GridRenderer_getAlternateColumnOffset(){return 0},isc.A.$187l=function isc_GridRenderer__useAlternateRowStyle(_1,_2,_3){if(!this.alternateRowStyles)return false;if(this.grid!=null){var _4=this.grid.getField(this.grid.getFieldNumFromLocal(_3,this));if(_4&&_4.showAlternateStyle!=null&&_4.showAlternateStyle==false){return false}}
var _5=this.getAlternateRowOffset();var _6;if(this.useRowSpanStyling){var _7=this.getSpanningRowNum(_2)+_5;_6=(Math.floor(_7/this.alternateRowFrequency)%2==1)}else{_6=(Math.floor((_2+_5)/this.alternateRowFrequency)%2==1)}
return _6},isc.A.$187m=function isc_GridRenderer__useAlternateColStyle(_1,_2,_3){if(!this.alternateColumnStyles)return false;if(this.grid!=null){var _4=this.grid.getField(this.grid.getFieldNumFromLocal(_3,this));if(_4&&_4.showAlternateStyle!=null&&_4.showAlternateStyle==false){return false}}
var _5=this.getAlternateColumnOffset(),_6=(Math.floor((_3+_5)/this.alternateColumnFrequency)%2==1);return _6},isc.A.getSpanningRowNum=function isc_GridRenderer_getSpanningRowNum(_1){var _2=this.$99p;if(this.grid&&this.grid.frozenBody){var _2=this.grid.frozenBody.$99p}
return _2!=null?_2[_1]:_1},isc.A.cellIsEnabled=function isc_GridRenderer_cellIsEnabled(_1,_2,_3){return true},isc.A.getTableElementId=function isc_GridRenderer_getTableElementId(){return this.getCanvasName()+"table"},isc.A.getRowElementId=function isc_GridRenderer_getRowElementId(_1,_2){return this.ID+"$2341"+_1},isc.A.getCellElementId=function isc_GridRenderer_getCellElementId(_1,_2,_3,_4){return this.ID+"$2342"+_1+"_"+_3},isc.A.getDOMTable=function isc_GridRenderer_getDOMTable(_1,_2){if(this.cacheDOM)return this.getTableChunkAt(_1,_2);if((_1!=null&&(_1-this.$252<0||_1>this.$253))||(_2!=null&&(_2-this.$254<0||_2>this.$255)))
return null;var _3=this.$29f;if(_3==null){var _4=this.getTableElementId();var _3=isc.Element.get(_4);if(_3==null)return null;if(this.$756){this.logInfo("getTableElement() called while updating table HTML. This call may be invalid as the table is being rewritten in the DOM. Suppressing caching of the current element.","redrawing");return _3}}
return this.$29f=_3},isc.A.getTableElement=function isc_GridRenderer_getTableElement(_1,_2){var _3=this.getDOMTable(_1,_2);if(_1==null)return _3;if(!_3)return null;var _4=_1-(this.$252>0?this.$252:0);if(_4<0){return null}
var _5;if(this.$29g!=null)_5=this.$29g[_4];if(_5==null)_5=_3.rows[_4];if(_5==null)return null;if(!this.$756){if(this.$29g==null)this.$29g=[];this.$29g[_4]=_5}
if(_2==null)return _5;var _6=_2-this.$254;if(_6<0){return null}
if(this.allowRowSpanning&&this.getRowSpan){var _7=this.getCellStartRow(_1,_6);if(_7!=_4){_4=_7;_5=this.getTableElement(_7)}
if(_5.childNodes.length<(this.$255-this.$254+1)){var _8=0;for(var i=0;i<_6;i++){if(this.fields[i].$28w!=null&&this.fields[i].$28w[_4]!=null&&this.fields[i].$28w[_4]!=_4)_8++}
_6-=_8}}
return _5.childNodes[_6]},isc.A.$29h=function isc_GridRenderer__updateCellStyle(_1,_2,_3,_4,_5,_6){if(_4==null)_4=this.getTableElement(_2,_3);if(_4==null)return;if(_1==null)_1=this.getCellRecord(_2,_3);if(_5==null)_5=this.getCellStyle(_1,_2,_3);_5=this.getCellStyleList(_1,_2,_3,_5);if(this.fastCellUpdates){_4.style.cssText=this.$29i(_1,_2,_3,_5)}else{if(_4.className!=_5)_4.className=_5;if(this.getCellCSSText){_4.style.cssText=this.$29i(_1,_2,_3,_5)}}
var _7=this.$2698(_1,_2),_8=!_6&&!_7;if(this.shouldRefreshCellHTML(_1,_2,_3)){this.refreshCellValue(_2,_3,null,null,_8)}
if(!this.isDrawn())return;if(!this.suppressRowHeightUpdate)this.$1265(_1,_2,_5);if(_8)this.$2699(_2,_3,_7)},isc.A.$2698=function isc_GridRenderer__shouldClipRowHeight(_1,_2){return this.fixedRowHeights&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_1,_2)!=false)},isc.A.$1265=function isc_GridRenderer__updateRowHeight(_1,_2,_3){var _4=this.$2698(_1,_2),_5=(this.getRowHeight!=null?this.getRowHeight(_1,_2,this.$100b(),true):this.cellHeight);this.setRowHeight(_2,_5,_1,_3,_4)},isc.A.$28g=function isc_GridRenderer__getCellClipDiv(_1){if(_1==null)return null;var _2=_1.firstChild;if(!_2)return null;if(_2.tagName==this.$27t)_2=_2.firstChild;if(_2&&(_2.cellClipDiv||(_2.getAttribute&&_2.getAttribute(this.$27u))))
{return _2}
return null},isc.A.setRowHeight=function isc_GridRenderer_setRowHeight(_1,_2,_3,_4,_5,_6){var _7=this.$254,_8=this.$255;if(_5==null){if(_3==null)_3=this.getCellRecord(_1,_7);_5=this.$2698(_3,_1)}
var _9=this.getTableElement(_1,_7),_10=_9?parseInt(_9.height):null,_11;if(!isc.isA.Number(_10))_10=null;if(this.$167g()){if(_3==null)_3=this.getCellRecord(_1,_7);var _12=_4;if(_12==null)_12=this.getCellStyle(_3,_1,_7);var _13=isc.Element.$ym(_12);var _14=(this.fixedRowHeights?_13:this.$272o());_2-=_14}
if((!_5&&_10!=null)||(_10!=_2&&!(_10==null&&_2==isc.emptyString)))
{_11=true}
if(!_11)return;var _15=isc.isA.Number(_2);if(_15&&_2<=0)_2=_5?0:1;var _16=this.getTableElement(_1);if(_16==null)return;if(_2==0&&_5){_16.style.display="none"}else{_16.style.display=isc.emptyString;var _17=(!isc.Browser.isIE||isc.Browser.isStrict)?this.$o5:this.$27v,_18=_15?_2+isc.px:_2,_19=_5?_18:isc.emptyString;for(var i=_7;i<=_8;i++){var _21=this.getTableElement(_1,i);if(_21){if(_5){_21.height=_18;_21.style[_17]=isc.emptyString}else{_21.height=isc.emptyString;delete _21.height;_21.style[_17]=_18}
var _22=this.$28g(_21);if(_22){if(this.$163s()){_22.style.maxHeight=_19}else{_22.style.height=_19}}}}}
if(isc.Browser.isSafari&&this.$28o){var _23=this.getTableElement(_1);if(_23!=null){_23.innerHTML=_23.innerHTML}}
this.$29j();if(_6){this.adjustOverflow("cell height changed")}else{this.$t6("cell height changed")}
this.$2699()},isc.A.$29i=function isc_GridRenderer__getCompleteCellCSSText(_1,_2,_3,_4){var _5=null;if(this.fixedRowHeights)_5=this.$721;else{_5=this.$281(_1,_2)}
if(isc.Browser.isIE8Strict){if(_5==null)_5=this.$722;else _5+=this.$722}
if(isc.Browser.isMoz||isc.Browser.isSafari){if(_5==null)_5=this.$28z(_3);else _5+=this.$28z(_3)}
if(this.fastCellUpdates){if(_4==null)_4=this.getCellStyle(_1,_2,_3);var _6=isc.Element.getStyleText(_4,true);if(_6==null&&isc.Page.$29k){this.logInfo("fastCellUpdates set to true but this page loads styles from a remote stylesheet. This is unsupported - disabling fastCellUpdates.");this.fastCellUpdates=false;this.redraw()}
if(_5!=null)_5+=_6;else _5=_6}
if(this.getCellCSSText){var _7=this.getCellCSSText(_1,_2,_3)
if(_7!=null){if(!_7.endsWith(this.$39)){_7+=this.$39}
if(_5!=null)_5+=_7
else _5=_7}}
var _8=!this.wrapCells&&(!isc.Browser.isIE||isc.Browser.isStrict),_9=this.preserveWhitespace?(this.wrapCells?";white-space:pre-wrap;":";white-space:pre;"):(!_8?null:";white-space:nowrap;");if(_9!=null){_5+=_9}
_5+="position:relative;"
return _5},isc.A.shouldRefreshCellHTML=function isc_GridRenderer_shouldRefreshCellHTML(_1,_2,_3){return this.showHiliteInCells},isc.A.$29l=function isc_GridRenderer__readyToRefreshCell(_1,_2){var _3=this.ns.EH;if((_3.$ku||_3.$km)&&_3.lastEvent.target==this){var _4=this.getEventRow();if(_4!=_1)return true;if(_2!=null){var _5=this.getEventColumn();if(_2!=_5)return true}
return false}
if(_3.$129k()){var _6=this.getTableElement(_1,_2);if(_6!=null){if(isc.Browser.isMobileWebkit||isc.Browser.isChrome){var _7=_3.mouseDownEvent;if(_7!=null&&_7.DOMevent.target!=null&&_6.contains(_7.DOMevent.target))
{return false}}}}
return true},isc.A.refreshCellValue=function isc_GridRenderer_refreshCellValue(_1,_2,_3,_4,_5){this.$182t(_1,_2);var _6=this.getTableElement(_1,_2);if(!_6)return;if(!this.$29l(_1,_2)){isc.Timer.setTimeout({target:this,method:isc.GridRenderer.$b4.refreshCellValue,args:[_1,_2,_3,_4,_5]});return}
var _7=this.getCellRecord(_1,_2),_8=this.fields[_2];if(!_8){this.logDebug("refreshCell called for invalid field "+_2);return}
var _9=isc.StringBuffer.create();var _10=this.$28v(_14),_11=!this.wrapCells&&(!isc.Browser.isIE||isc.Browser.isStrict),_12=!this.wrapCells&&!_11,_13=this.preserveWhitespace?(this.wrapCells?"white-space:pre-wrap;":"white-space:pre;"):(!_11?null:"white-space:nowrap;");if(_10){_9.append(this.$27s);if(this.$188p(_8)){_9.append(this.$1148)}
var _14=(this.getRowHeight!=null?this.getRowHeight(_7,_1,this.$100b(),true):this.cellHeight);_9.append(this.$283(_14,_7,_1));var _15=this.$282(_1,_7);if(!_15){_9.append(this.$1546(_2))}
if(_13!=null)_9.append(_13);_9.append("'>")}
if(_12){_9.append("<NOBR>");if(this.$207q()){_9.append("<div></div>")}}
_9.append(this.$22k(_7,_1,_2));if(_12&&this.closeNOBRs){_9.append("</NOBR>")}
if(_10){_9.append("</DIV>")}
_6.innerHTML=_9.release(false);if(!_5)this.$2699(_1,_2,this.$2698(_7,_1))},isc.A.$188p=function isc_GridRenderer__clipDiv_writeTextOverflowEllipsis(_1){return true},isc.A.$207q=function isc_GridRenderer__shouldInjectEmptyDivBeforeValue(){return isc.Browser.isSafariStrict&&this.suppressNativeHoversInSafari},isc.A.setCellStyle=function isc_GridRenderer_setCellStyle(_1,_2,_3,_4){return this.setRowStyle(_1,_3,_2,_4)},isc.A.setRowStyle=function isc_GridRenderer_setRowStyle(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(_1==null||_1<0){this.logWarn("setRowStyle: bad rowNum: "+_1);return false}
if(this.isDirty()){var _5=this.$207d;if(!_5){this.redraw("immediate redraw to refresh rowStyle while dirty");return}}
var _6=this.getTableElement(_1,_3);if(_6==null){return false}
var _7=this.getCellRecord(_1,_3);if(_7&&_7.$29m){return}
if(_3!=null){this.$29h(_7,_1,_3,_6,_2,_4)}else{var _8=this.getTableElement(_1);if(_8!=null){var _9="TD",_10=(!this.shouldShowAllColumns()?this.$254:0),_11=(!this.shouldShowAllColumns()?this.$255:this.fields.length-1),_12=0;var _13=this.suppressRowHeightUpdate;this.suppressRowHeightUpdate=true;var _14=this.$2698(_7,_1),_15=!_4&&!_14;for(var _16=_10;_16<=_11;_16++,_12++){var _6;if(this.showColumnsSeparately||this.cacheDOM){_6=this.getTableElement(_1,_16)}else{_6=_8.childNodes[_12]}
if(_6==null)continue;this.$29h(_7,_1,_16,_6,_2,_15)}
if(!_13){delete this.suppressRowHeightUpdate;this.$1265(_7,_1,_2)}
if(_15){this.$2699(_1,null,_14)}}}
return true},isc.A.refreshCellStyle=function isc_GridRenderer_refreshCellStyle(_1,_2,_3,_4){return this.setCellStyle(_1,_2,_3,_4)},isc.A.refreshCell=function isc_GridRenderer_refreshCell(_1,_2,_3,_4,_5){this.$182t(_1,_2);if(!this.getTableElement(_1,_2))return;if(!this.$29l(_1,_2)){isc.Timer.setTimeout({target:this,method:isc.GridRenderer.$b4.refreshCell,args:[_1,_2,_3,_4,_5]});return}
var _6=this.getCellRecord(_1,_2),_7=this.$2698(_6,_1),_8=!_5;this.refreshCellStyle(_1,_2,null,_8);if(!this.shouldRefreshCellHTML())this.refreshCellValue(_1,_2,_3,_4,_8);if(_8)this.$2699(_1,_2,_7)},isc.A.$182t=function isc_GridRenderer__clearCachedCellValueForRefreshCell(_1,_2){this.$182s(_1,_2)},isc.A.refreshRow=function isc_GridRenderer_refreshRow(_1){if(!this.$29l(_1)){this.delayCall("refreshRow",[_1])}
var _2=this.getCellRecord(_1,this.$254||0),_3=this.$2698(_2,_1);for(var i=0;i<this.fields.length;i++){this.refreshCell(_1,i,true)}
this.$2699(_1,null,_3)},isc.A.refreshCellStyles=function isc_GridRenderer_refreshCellStyles(_1,_2,_3){this.logDebug("refreshing cell styles: "+_1.length+" cells");var _4=!_3;for(var i=0;i<_1.length;i++){var _6=_1[i][0],_7=_1[i][1];var _8=this.getTableElement(_6,_7);if(_8==null){continue}else{this.$29h(null,_6,_7,_8,_2,_4)}}
if(_4)this.$2699();return true},isc.A.getCellPageRect=function isc_GridRenderer_getCellPageRect(_1,_2){return[this.getColumnPageLeft(_2),this.getRowPageTop(_1),this.getColumnSize(_2),this.getRowSize(_1)]},isc.A.getColumnLeft=function isc_GridRenderer_getColumnLeft(_1){if(this.isRTL()){return this.getViewportWidth()-this.$26a.sum(0,_1+1)}else{return this.$26a.sum(0,_1)}},isc.A.getColumnPageLeft=function isc_GridRenderer_getColumnPageLeft(_1){var _2=this.getColumnLeft(_1);if(_2==null)return null;var _3=this.getPageLeft()-this.getScrollLeft()+_2;if(this.isRTL()){if(this.vscrollOn)_3+=this.getScrollbarSize();_3+=this.getScrollWidth()-this.getViewportWidth()}
return _3},isc.A.getScrollWidth=function isc_GridRenderer_getScrollWidth(_1){if(isc.$cv)arguments.$cw=this;var _2=this.$su!=null&&!_1,_3=this.invokeSuper(isc.GridRenderer,"getScrollWidth",_1);if(this.isDrawn&&!_2&&(isc.Browser.isIE||isc.Browser.isEdge)&&(!this.autoFit&&this.fixedColumnWidths&&this.$26a))
{var _4=this.$26a.sum();if(_4==_3-1){_3=_4}}
return _3},isc.A.getColumnWidth=function isc_GridRenderer_getColumnWidth(_1){return this.$26a[_1]},isc.A.getInnerColumnWidth=function isc_GridRenderer_getInnerColumnWidth(_1){var _2=this.getColumnWidth(_1);if(_2==null)return null;return(_2-(2*this.cellSpacing+this.$54q()))},isc.A.$54q=function isc_GridRenderer__getCellHBorderPad(_1){if(_1||this.$54r==null){this.$272p()}
return this.$54r},isc.A.$272o=function isc_GridRenderer__getCellVBorderPad(_1){if(_1||this.$272q==null){this.$272p()}
return this.$272q},isc.A.$272p=function isc_GridRenderer__cacheCellBorderPad(){var _1=this.$54p();var _2=isc.Element.$tq(_1),_3=isc.Element.$yn(_1),_4=isc.Element.$ym(_1);var _5=_2.nullLeft?this.cellPadding:_2.left,_6=_2.nullRight?this.cellPadding:_2.right,_7=_2.nullTop?this.cellPadding:_2.top,_8=_2.nullBottom?this.cellPadding:_2.bottom;this.$54r=(_5+_6+_3);this.$272q=(_7+_8+_4)},isc.A.getRowTop=function isc_GridRenderer_getRowTop(_1){if(_1<this.$252){return this.getAvgRowHeight()*_1}
var _2=this.$29n(),_3=this.$26b();if(_1>this.$253){return _2+_3.sum()+(((_1-1)-this.$253)*this.getAvgRowHeight())}
return _2+_3.sum(0,_1-this.$252)},isc.A.getCellTop=function isc_GridRenderer_getCellTop(_1){var _2=this.getRowTop(_1);if(this.derivedCellBorderVSpacing!=0){var _3=_1==this.$252
if(_3){_2+=this.derivedCellBorderVSpacing}else{_2+=Math.floor(this.derivedCellBorderVSpacing/2)}}
return _2},isc.A.getRowPageTop=function isc_GridRenderer_getRowPageTop(_1){return this.getPageTop()+this.getTopBorderSize()+(this.getRowTop(_1)-this.getScrollTop())},isc.A.getRowSize=function isc_GridRenderer_getRowSize(_1){return this.getDrawnRowHeight(_1)},isc.A.getDrawnRowHeight=function isc_GridRenderer_getDrawnRowHeight(_1){if(this.$252==null||this.$253==null||_1<this.$252||_1>this.$253)
{return this.getAvgRowHeight()}
var _2=_1-this.$252,_3=this.$26b();return _3[_2]});isc.evalBoundary;isc.B.push(isc.A.getDrawnCellHeight=function isc_GridRenderer_getDrawnCellHeight(_1){var _2=this.getDrawnRowHeight(_1);if(this.derivedCellBorderVSpacing!=0){var _3=_1==this.$252,_4=_1==this.$253;if(_3||_4){_2-=Math.floor(1.5*this.derivedCellBorderVSpacing)}else{_2-=this.derivedCellBorderVSpacing}}
return _2},isc.A.getColumnSize=function isc_GridRenderer_getColumnSize(_1){if((this.fixedFieldWidths&&!this.autoSize)||(_1<this.$254||_1>this.$255))
{return this.getColumnWidth(_1)}
var _2=_1-this.$254,_3=this.getColumnSizes();return _3[_2]},isc.A.$29n=function isc_GridRenderer__getUndrawnHeight(){return this.$252*this.getAvgRowHeight()},isc.A.$26b=function isc_GridRenderer__getDrawnRowHeights(){var _1=this.getDrawnRows(),_2=_1[1]-_1[0]+1;if(this.$8s!=null){return this.$8s}
var _3=[];if(!this.$756)this.$8s=_3;var _4=this.getTableElement();if(!_4||!_4.rows){delete this.$8s;return _3}
var _5=isc.Browser.isSafari&&isc.Browser.safariVersion<500;var _6=false,_7=null,_8=0,_9=this.isRTL();for(var _10=0;_10<=_2;_10++){var _11=this.cacheDOM?this.getTableElement(_10+this.$252):_4.rows[_10];if(_11==null){}else if(isc.Browser.$117b){var _12=isc.Element.getBoundingClientRect(_11);var _13=_12.bottom;var _14=_7==null;if(_14){_7=_12.top;if(this.derivedCellBorderVSpacing>0){_7-=this.derivedCellBorderVSpacing}}
if((_2-1)>_10){_13+=Math.floor(this.derivedCellBorderVSpacing/2)}else{_13+=this.derivedCellBorderVSpacing}
_3[_10]=Math.round((_13-_7)-_8)}else if(this.allowRowSpanning&&this.getRowSpan){_3[_10]=_11.offsetHeight}else{var _15=_5&&!this.$2698(this.getCellRecord(_10),_10),_16,_17=[];if(!_5||!_15){_16=_11.lastChild}else{for(var k=0;k<_11.childNodes.length;k++){_17[k]=_11.childNodes[k]}}
if(_15){_3[_10]=0;for(var _19=0;_19<_17.length;_19++){var _20=_17[_19],_21=_20.offsetHeight;var _22=parseInt(_20.style?_20.style.height:null);if(isc.Browser.isStrict){if(this.cellPadding)_22+=this.cellPadding;_22+=isc.Element.$yo(_20.className)}
if(isc.isA.Number(_22)&&_22>_21)
_21=_22;if(_21>_3[_10])_3[_10]=_21}
_3[_10]+=this.cellSpacing}else if(_16){if(!_5){_3[_10]=_16.offsetHeight}else{var _23=parseInt(_16.height);if(_23!=null&&isc.isA.Number(_23)){if(isc.Browser.isStrict){_23+=isc.Element.$ym(_16.className)}}else{_23=_16.offsetHeight||0}
_3[_10]=_23}
_3[_10]+=this.cellSpacing}}
var _21=_3[_10];if(_21>0){_6=true;_8+=_21}}
_3[0]+=this.cellSpacing;if(!_6){this.logInfo("row heights not yet available; returning all zeroes");this.$8s=null}
if(isc.Browser.isSafari&&!isc.Page.isLoaded())this.$8s=null;return _3},isc.A.getColumnSizes=function isc_GridRenderer_getColumnSizes(){if(this.$29o!=null)return this.$29o;if(!this.isDrawn()||this.$200q()){return this.$26a.duplicate()||[]}
var _1;if(this.fixedColumnWidths&&isc.Browser.version>=5){_1=this.$26a.duplicate();if(!this.$756)this.$29o=_1;return _1}else{_1=[];if(!this.$756)this.$29o=_1;var _2=this.getTableElement(this.$252);if(_2==null){_1=_1.concat(this.$26a);if(!this.$756)this.$29o=_1;return _1}
var _3=(isc.Browser.isMac?this.cellSpacing:0);for(var _4=0;_4<this.fields.length;_4++){var _5;if(this.showColumnsSeparately){_5=this.getTableElement(this.$252,_4)}else if(!(isc.Browser.isSafari&&isc.Browser.safariVersion<125)){_5=_2.childNodes[_4]}
if(_5){_1[_4]=_5.offsetWidth+_3}else{_1[_4]=this.$26a[_4]}}
this.innerWidth=this.getTableElement().offsetWidth;return _1}},isc.A.$146b=function isc_GridRenderer__differentEventCharacteristics(_1,_2){var _3=this.getEventRow(this.getOffsetY(_1)),_4=this.getEventRow(this.getOffsetY(_2));if(_3!=_4)return true;var _5=this.getEventColumn(this.getOffsetX(_1)),_6=this.getEventColumn(this.getOffsetX(_2));if(_5!=_6)return true;return false},isc.A.getEventRow=function isc_GridRenderer_getEventRow(_1){if(this.isEmpty())return-2;if(_1==null)_1=this.getOffsetY();if(this.startSpace)_1-=this.startSpace;var _2=this.$29n();if(_1<=_2)return Math.floor(_1/this.getAvgRowHeight());var _3=_1-_2,_4=this.$26b();var _5=this.inWhichPosition(_4,_3),_6;if(_5>=0){_6=this.$252+_5}else{var _7=_3-_4.sum();_6=this.$253+1+Math.floor(_7/this.getAvgRowHeight());if(_6>=this.getTotalRows())_6=-2}
return _6},isc.A.getEventColumn=function isc_GridRenderer_getEventColumn(_1){var _2=this.getColumnSizes();if(_1==null)_1=this.getOffsetX();var _3=this.getTextDirection(),_4=this.grid;if(!this.frozen&&_3==isc.Page.RTL&&_4)
{var _5=0;if(isc.isA.RecordEditor(_4)&&_4.actionButton){_5=_4.actionButton.getWidth();_1-=_5}else if(_4.$94m){var _6=_4.parentElement;if(_6&&!this.vscrollOn&&_6.$54u()){_1-=this.getScrollbarSize()}}else if(!this.vscrollOn&&_4.$54u()){_1-=this.getScrollbarSize()}}
return this.inWhichPosition(_2,_1,_3)},isc.A.getFocusRow=function isc_GridRenderer_getFocusRow(){return 0},isc.A.getFocusCol=function isc_GridRenderer_getFocusCol(){return 0},isc.A.getNativeFocusRow=function isc_GridRenderer_getNativeFocusRow(){var _1=this.$86b;if(_1==null)_1=this.getFocusRow();var _2=this.getDrawnRows();if(_2!=null&&_2.length>0&&(_1==null||_1<_2[0]||_1>_2[1])){_1=this.$27x()[0];if(this.getRowTop(_1)<this.getScrollTop())_1+=1}
return _1},isc.A.getNativeFocusColumn=function isc_GridRenderer_getNativeFocusColumn(){var _1=this.$233s;if(_1==null||_1<this.$254||_1>this.$255)_1=0
return _1},isc.A.canFocusInCells=function isc_GridRenderer_canFocusInCells(){if(this.canSelectCells)return true;return isc.screenReader&&this.screenReaderNavigateByCell},isc.A.getNearestRowToEvent=function isc_GridRenderer_getNearestRowToEvent(){var _1=this.getEventRow();if(_1<0){var _2=this.getVisibleRows();if(_1==-1)return _2[0];if(_1==-2)return _2[1]}
return _1},isc.A.getNearestColToEvent=function isc_GridRenderer_getNearestColToEvent(){var _1=this.getEventColumn();if(_1<0){var _2=this.getVisibleColumns();if(_1==-1)return _2[0];if(_1==-2)return _2[1]}
return _1},isc.A.$27x=function isc_GridRenderer__getViewportFillRows(_1){if(_1==null)_1=this.getScrollTop();var _2=this.getViewportHeight(),_3=this.getAvgRowHeight();var _4=this.grid&&this.grid.recordComponentHeight||this.derivedRowHeight;var _5=Math.floor(_1/_4);if(_5>this.getTotalRows()){_5=this.getTotalRows()-Math.ceil(_2/_4)}
var _6;if(this.autoFitData=="both"||this.autoFitData=="vertical"){_6=this.getTotalRows()-_5;var _7=this.autoFitMaxRecords;if(_7!=null&&_7<_6)_6=_7;var _8=this.getAutoFitMaxHeight();if(_8!=null){var _9=Math.ceil(_8/_4);if(_9<_6)_6=_9}}else{var _10=_1-(_5*_4);_6=Math.ceil((_10+_2)/_4)}
var _11=_5+_6-1;if(this.startSpace){var _12=Math.floor(this.startSpace/_4);_5=Math.max(0,_5-_12);_11=Math.max(0,_11-_12)}
var _13=this.virtualScrolling&&this.$27y!=null;if(_13){if(_5==0&&_11>=(this.getTotalRows()-1))_13=false}
if(!_13)return[_5,_11];var _14=this.$27y;if(this.$27z<0)_14+=Math.floor(this.$27z/_4);if(_14<0)_14=0;var _15=_14+Math.ceil(_2/_4);return[_14,_15]},isc.A.getAutoFitMaxHeight=function isc_GridRenderer_getAutoFitMaxHeight(){return this.height},isc.A.getAvgRowHeight=function isc_GridRenderer_getAvgRowHeight(){return this.fixedRowHeights?this.derivedRowHeight:Math.max(this.derivedRowHeight,this.avgRowHeight)},isc.A.getVisibleRows=function isc_GridRenderer_getVisibleRows(){if(!this.lengthIsKnown()){return[-1,-1]}
return this.$168x()},isc.A.$168x=function isc_GridRenderer__getVisibleRows(){var _1=this.getScrollTop();var _2=[this.getEventRow(_1),this.getEventRow(_1+this.getInnerHeight(true))];if(_2[1]==-2){var _3=this.getTotalRows();if(_3==0||_2[0]<0){_2[0]=-1;_2[1]=-1}else{_2[1]=this.getTotalRows()-1}}
return _2},isc.A.getVisibleColumns=function isc_GridRenderer_getVisibleColumns(){var _1=this.$26a;if(this.overflow==isc.Canvas.VISIBLE)return[0,_1.length-1];var _2=this.getScrollLeft();if(this.isRTL()){var _3=this.getScrollWidth()-this.getInnerWidth(),_2=_3-_2}
var _4=this.inWhichPosition(_1,_2),_5=this.inWhichPosition(_1,_2+this.getInnerWidth());if(_5==-2)_5=this.$26a.length-1;return[_4,_5]},isc.A.getDrawnRows=function isc_GridRenderer_getDrawnRows(){if(this.cacheDOM)return this.getVisibleRows();return[this.$252,this.$253]},isc.A.shouldShowRollOver=function isc_GridRenderer_shouldShowRollOver(_1,_2){return(this.showRollOver&&!this.$28j)},isc.A.updateRollOver=function isc_GridRenderer_updateRollOver(_1,_2){this.setRowStyle(_1,null,(this.useCellRollOvers?_2:null))},isc.A.startHover=function isc_GridRenderer_startHover(){},isc.A.mouseMove=function isc_GridRenderer_mouseMove(_1,_2){if(this.$29p(isc.EH.lastEvent))return;if(this.$964){this.$964=false;return}
var _3=this.getEventRow(),_4=this.getEventColumn();var _5=this.pendingActionOnPause("scrollRedraw"),_6=this.getDrawnRows();if(_5&&_6&&(_3<_6[0]||_3>_6[1]))
{return}
var _7=this.showRollOver,_8=this.showRollOver&&this.shouldShowRollOver(_3,_4);var _9=this.lastOverRow,_10=this.lastMouseOverRow,_11=this.lastOverCol,_12=this.lastMouseOverCol;var _13=(_3>=0&&_4>=0),_14=!(_3==_9&&_4==_11),_15=!(_3==_10&&_4==_12),_16=_13&&(_14||_15||this.cellMove||this.rowMove),_17=_16&&this.getCellRecord(_3,_4),_18=(_13&&_16&&(this.showHoverOnDisabledCells||this.cellIsEnabled(_3,_4,_17)));if(_14){if(_7&&_9!=null&&_11!=null&&(_3!=_9||_4<0||this.useCellRollOvers))
{this.lastOverRow=null;this.lastOverCol=null;this.updateRollOver(_9,_11,_18)}
if(_18){if(_9!=_3||this.useCellRollOvers){if(_8){this.lastOverRow=_3;this.lastOverCol=_4;this.updateRollOver(_3,_4)}}}}
var _19=this.$1269!=_1.target&&(_1.target==this);this.$1269=_1.target;if(_15||_19){if(_10!=null&&_12!=null){this.lastMouseOverRow=null;this.lastMouseOverCol=null;if((_3!=_10||_4<0||this.hoverByCell)&&this.getCanHover()&&!this.keepHoverActive)
{this.stopHover()}
var _20=this.getCellRecord(_10,_12);if(this.cellOut){this.cellOut(_20,_10,_12)}
if(_3!=_10&&this.rowOut){this.rowOut(_20,_10,_12)}}
if(_18){this.lastMouseOverRow=_3;this.lastMouseOverCol=_4;if(_3!=_10||this.hoverByCell){if(_13&&this.getCanHover()){var _21=this.getCellHoverDelay(_3,_4);isc.Hover.setAction(this,this.$2699,[],_21)}}
if(this.cellOver){this.cellOver(_17,_3,_4)}
if(_3!=_10&&this.rowOver){this.rowOver(_17,_3,_4)}}}
if(_13){if(this.cellMove){this.cellMove(_17,_3,_4)}
if(this.rowMove){this.rowMove(_17,_3,_4)}}
if(_5&&this.$1337){var _22=this.getScrollRedrawDelay(this.$138f);this.fireOnPause("scrollRedraw",this.$134a(),_22)}},isc.A.$29p=function isc_GridRenderer__suppressEventHandling(_1){if(this.$28j!=null)return true;return false},isc.A.mouseOut=function isc_GridRenderer_mouseOut(){var _1=isc.EH.getTarget();if(this.$29a){var _2=this.$29a;for(var i=0;i<_2.length;i++){if(!_2[i])continue;if(_2[i].contains(_1,true)){return}}}
if(_1==this&&!isc.EH.getDragTarget()&&!isc.EH.$118u){return}
if(this.getCanHover())this.stopHover();if(this.lastOverRow!=null&&this.lastOverCol!=null){var _4=this.lastOverRow,_5=this.lastOverCol;if(this.showRollOver){this.lastOverRow=null;this.lastOverCol=null;this.updateRollOver(_4,_5)}}
if(this.showRollOver&&this.preserveFocusStylingOnMouseOut&&this.$31p!=null){this.lastOverRow=this.$31p;this.lastOverCol=this.$237t||0;if(this.shouldShowRollOver(this.lastOverRow,this.lastOverCol)){this.updateRollOver(this.lastOverRow,this.lastOverCol,false)}}
if(this.lastMouseOverRow!=null&&this.lastMouseOverCol!=null){var _4=this.lastMouseOverRow,_5=this.lastMouseOverCol,_6=this.getCellRecord(_4,_5);this.lastMouseOverRow=null;this.lastMouseOverCol=null;if(this.cellOut){this.cellOut(_6,_4,_5)}
if(this.rowOut){this.rowOut(_6,_4,_5)}}},isc.A.$1159=function isc_GridRenderer__getShowClippedValuesOnHover(){return this.showClippedValuesOnHover},isc.A.getCellHoverDelay=function isc_GridRenderer_getCellHoverDelay(_1,_2){return this.hoverDelay},isc.A.$29q=function isc_GridRenderer__cellHover(_1,_2){var _3=this.getCellRecord(_1,_2);if(!this.shouldFireCellHover(_3,_1,_2))return;var _4,_5=this.cellValueIsClipped(_1,_2);if(this.$1159()&&_5&&this.cellValueHover&&this.cellValueHover(_3,_1,_2)==false)
{_4=false}
if(this.cellHover&&this.cellHover(_3,_1,_2)==false)_4=false;if(this.rowHover&&this.rowHover(_3,_1,_2)==false)_4=false;var _6=this.ns.EH;if(_4==false){if(_6.lastHoverTarget===this||(this.grid&&_6.lastHoverTarget===this.grid)){this.stopHover()}
return}
if(this.showHover||(this.grid&&this.grid.getCanHover())){if(this.grid.hoverPersist){isc.Hover.cancelWaitForMouseOver();isc.Hover.hide()}
this.$29r(_3,_1,_2,_5)}else if(_6.lastHoverTarget===this||(this.grid&&_6.lastHoverTarget===this.grid)){this.stopHover()}},isc.A.shouldFireCellHover=function isc_GridRenderer_shouldFireCellHover(_1,_2,_3){return _1!=null},isc.A.defaultCellValueHoverHTML=function isc_GridRenderer_defaultCellValueHoverHTML(_1,_2,_3){return this.$22k(_1,_2,_3)},isc.A.$wc=function isc_GridRenderer__getHoverProperties(_1,_2,_3){var _4=this.Super("$wc");if(this.grid){var _5=this.grid.frozenBody&&this==this.grid.frozenBody,_6=!_5&&this.grid.frozenBody?this.grid.frozenFields.length:0,_7=_3!=null?this.grid.fields[_3+_6]:null;if(_7){for(var _8 in this.$181q){var _9=this.$181q[_8];_4[_8]=_7[_9]!=null?_7[_9]:(this.grid[_9]!=null?this.grid[_9]:this[_9])}}}
var _10=this.cellHoverProperties(_1,_2,_3);if(_10){isc.addPropertiesWithAssign(_4,_10)}
return _4},isc.A.$29r=function isc_GridRenderer__showHover(_1,_2,_3,_4){var _5=this.$784(_1,_2,_3);var _6=this.$wc(_1,_2,_3);var _7=_5?"showHoverComponent":"show";if(!_5){var _8=false,_9=false;if(this.cellHoverHTML.$118m&&this.grid){var _10=this.grid,_11=_10.getFieldNumFromLocal(_3,this),_12=_10.getField(_11);_8=_12&&(_10.canHover||(_12.showHover&&_10.canHover!=false)||_10.cellHoverHTML!=_10.getClass().getInstanceProperty("cellHoverHTML")||(_10.canHover==null&&_12.showHover))&&_12.showHover!=false;_9=_10.$118o(_2,_11,_12)}
if(!_9){if(!_8){if(this.$1159()&&_4){_5=this.cellValueHoverHTML(_1,_2,_3,this.defaultCellValueHoverHTML(_1,_2,_3))}}else{_5=this.cellHoverHTML(_1,_2,_3)}}}
isc.Hover[_7](_5,_6,this.cellHoverBoundary(_2,_3),this.getHoverTarget())},isc.A.$784=function isc_GridRenderer__getCellHoverComponent(_1,_2,_3){},isc.A.getHoverTarget=function isc_GridRenderer_getHoverTarget(){return this},isc.A.cellHoverHTML=function isc_GridRenderer_cellHoverHTML(_1,_2,_3){return null},isc.A.cellHoverProperties=function isc_GridRenderer_cellHoverProperties(_1,_2,_3){return null},isc.A.cellValueHoverHTML=function isc_GridRenderer_cellValueHoverHTML(_1,_2,_3,_4){return null},isc.A.getCellHoverComponent=function isc_GridRenderer_getCellHoverComponent(_1,_2,_3){return null},isc.A.cellHoverBoundary=function isc_GridRenderer_cellHoverBoundary(_1,_2){return null},isc.A.$2699=function isc_GridRenderer__refreshCellHover(_1,_2,_3){if(this.isDirty())return;var _4=this.ns;if(_4.Hover.showingHoverComponent)return;if(!this.containsEvent()||(_4.EH.lastHoverTarget!==this&&(!this.grid||_4.EH.lastHoverTarget!==this.grid)))
{return}
var _5=this.getEventRow(),_6=this.getEventColumn();if(_5<0||_6<0)return;if(_1==null)_1=_5;if(_2==null)_2=_6;if(_3==null){_3=false}
if(!_3){if(_5<_1)return;_1=_5;_2=_6}else if(_1!=_5||_2!=_6){return}
this.lastMouseOverRow=_1;this.lastMouseOverCol=_2;this.$29q(_1,_2)},isc.A.showContextMenu=function isc_GridRenderer_showContextMenu(){if(this.$29p(isc.EH.lastEvent))return false;if(this.selectionManager.isA("CellSelection")){this.selectionManager.resetDragSelectionState()}
var _1=this.getEventRow(),_2=this.getEventColumn();var _3=isc.EH.isKeyEvent();if(_3){_1=this.getFocusRow(),_2=this.getFocusCol()}
var _4=(_1>=0&&_2>=0),_5=_4&&this.getCellRecord(_1,_2);if(_4&&this.cellIsEnabled(_1,_2,_5)){var _6;if(this.cellContextClick)
if(this.cellContextClick(_5,_1,_2)==false)_6=false;if(this.rowContextClick)
if(this.rowContextClick(_5,_1,_2)==false)_6=false;if(this.recordContextClick)
if(this.recordContextClick(_5,_1,_2)==false)_6=false;if(_6==false)return false}
return this.Super("showContextMenu")},isc.A.setSelection=function isc_GridRenderer_setSelection(_1){this.selectionManager=this.selection=_1;if(this.selectionManager.isA("CellSelection")){this.observe(this.selectionManager,"selectionChanged",function(){this.$29s(this.selectionManager.changedCells)})}else{this.observe(this.selectionManager,"setSelected",function(){this.$895(this.selectionManager)})}},isc.A.clearSelection=function isc_GridRenderer_clearSelection(){if(this.selectionManager){if(this.isObserving(this.selectionManager,"selectionChanged"))
this.ignore(this.selectionManager,"selectionChanged");if(this.isObserving(this.selectionManager,"setSelected"))
this.ignore(this.selectionManager,"setSelected");delete this.selectionManager}},isc.A.$29s=function isc_GridRenderer__cellSelectionChanged(_1){if(this.cellSelectionChanged){if(this.cellSelectionChanged(_1)==false)return false}
this.refreshCellStyles(_1);if(this.grid&&this.grid.selectionAppearance=="checkbox"&&this.grid.canSelectCells){for(var i=0;i<_1.length;i++)this.updateRowSelection(_1[i][0])}},isc.A.$895=function isc_GridRenderer__setSelectedObservation(_1){var _2=false;if(!!_1.lastSelectionPreviousState!=!!_1.lastSelectionState){_2=true}else if(_1.lastSelectionState&&(!!_1.lastSelectionPartialValue!=!!_1.lastSelectionPreviousPartialValue))
{_2=true}
if(_2){this.$102q(!isc.isA.MultiLinkSelection(_1)||!!_1.lastSelectionNodeLocator);this.$29t(_1.lastSelectionNodeLocator||_1.lastSelectionItem,!!_1.lastSelectionState,_1.cascadeSyncOnly)}},isc.A.$29t=function isc_GridRenderer__rowSelectionChanged(_1,_2,_3){var _4=this.selectionManager,_5=_4.lastSelectionItem,_6,_7;if(isc.Tree&&isc.Tree.isANodeLocator(_1)){_7=_1;_6=_1.openListIndex;_1=_1.node}else{_6=_4.data.indexOf(_5,this.$252,this.$253)}
if(_6==-1)_6=_4.data.indexOf(_5);if(!_3){if(this.handleSelectionChanged(_1,_2)==false){return false}}
if(this.selectionManager.$915){this.markForRowSelectionRefresh();return}
if(_6==-1)return;this.updateRowSelection(_6)},isc.A.markForRowSelectionRefresh=function isc_GridRenderer_markForRowSelectionRefresh(){this.markForRedraw("Selection changed")},isc.A.handleSelectionChanged=function isc_GridRenderer_handleSelectionChanged(_1,_2){if(this.selectionChanged&&this.$100b()==0)return this.selectionChanged(_1,_2)},isc.A.updateRowSelection=function isc_GridRenderer_updateRowSelection(_1){this.setRowStyle(_1)},isc.A.redrawForSelectionChanged=function isc_GridRenderer_redrawForSelectionChanged(){this.markForRedraw("selection changed")},isc.A.selectionEnabled=function isc_GridRenderer_selectionEnabled(){return this.selectionManager!=null},isc.A.canSelectRecord=function isc_GridRenderer_canSelectRecord(_1){return(_1!=null&&_1[this.recordCanSelectProperty]!==false)},isc.A.$1696=function isc_GridRenderer__getMouseDownCell(){return[this.getEventRow(),this.getEventColumn()]},isc.A.mouseDown=function isc_GridRenderer_mouseDown(){if(this.$29p(isc.EH.lastEvent)){return}
var _1=this.$1696(),_2=_1[0],_3=_1[1];if(!(_2>=0&&_3>=0))return;var _4=this.getCellRecord(_2,_3);if(!this.cellIsEnabled(_2,_3,_4)){return false}
this.$29u=_2;this.$29v=_3;this.$150d=false;this.$723=isc.EH.getX();this.$724=isc.EH.getY();if(!isc.EH.rightButtonDown()){return this.$29w(_4,_2,_3)}else{return this.$29x(_4,_2,_3)}},isc.A.rightMouseDown=function isc_GridRenderer_rightMouseDown(){return this.mouseDown()},isc.A.$29w=function isc_GridRenderer__cellMouseDown(_1,_2,_3){var _4;if(this.grid&&this.grid.$29w){if(this.grid.$29w(_1,_2,_3,this)==false)_4=false}
if(this.cellMouseDown&&(this.cellMouseDown(_1,_2,_3)==false))_4=false;if(this.rowMouseDown&&(this.rowMouseDown(_1,_2,_3)==false))_4=false;if(this.recordMouseDown&&this.recordMouseDown(_2,_3)==false)_4=false;if(_4==false)return false;this.selectOnMouseDown(_1,_2,_3)},isc.A.selectOnMouseDown=function isc_GridRenderer_selectOnMouseDown(_1,_2,_3,_4){if(!this.selectionEnabled()){return true}
if(_2>=0&&_3>=0&&!this.$89v(_3))
{if(this.canSelectRecord(_1)){this.$828=true;var _5=this.selectionManager.selectOnMouseDown(this,_2,_3);if(_5&&this.fireSelectionUpdated&&isc.isA.Function(this.fireSelectionUpdated)){this.fireSelectionUpdated()}}else if(this.$243q(_1,_2,_3,_4)){this.selectionManager.deselectAll()}}},isc.A.$89v=function isc_GridRenderer__shouldSelectOnMouseUp(_1,_2){var _3=this.ns.EH;if(_3.dragTarget!=null&&_3.dragOperation==_3.DRAG_SCROLL||!_2&&this.$145k())
{return true}
return false},isc.A.$29x=function isc_GridRenderer__cellRightMouseDown(_1,_2,_3){if(this.canSelectOnRightMouse)this.selectOnRightMouseDown(_1,_2,_3)},isc.A.$u6=function isc_GridRenderer__scrolled(_1,_2){if(!this.$171b){this.$150d=true}
if(this.grid&&this.grid.$965){if(isc.Browser.nativeMouseMoveOnCanvasScroll){this.$964=true;isc.Page.setEvent(isc.EH.MOUSE_MOVE,this,"once","$966")}
this.$95i(this,_1,_2);if(this.scrolled)this.scrolled(_1,_2)}else{this.Super("$u6",arguments)}},isc.A.$966=function isc_GridRenderer__suppressMouseMove(){var _1=isc.EH.lastEvent.target;if(_1!=this)this.$964=false},isc.A.selectOnRightMouseDown=function isc_GridRenderer_selectOnRightMouseDown(_1,_2,_3){this.selectOnMouseDown(_1,_2,_3)},isc.A.mouseUp=function isc_GridRenderer_mouseUp(){if(this.$29p(isc.EH.lastEvent))return;var _1=this.getEventRow(),_2=this.getEventColumn();if(!(_1>=0&&_2>=0))return;var _3=this.getCellRecord(_1,_2);if(!this.cellIsEnabled(_1,_2,_3))return;var _4;if(this.cellMouseUp&&(this.cellMouseUp(_3,_1,_2)==false))_4=false;if(this.rowMouseUp&&(this.rowMouseUp(_3,_1,_2)==false))_4=false;if(this.recordMouseUp&&this.recordMouseUp(_1,_2)==false)_4=false;if(_4==false)return _4;this.selectOnMouseUp(_3,_1,_2)},isc.A.selectOnMouseUp=function isc_GridRenderer_selectOnMouseUp(_1,_2,_3,_4){if(!this.selectionEnabled()){return true}
if(_2>=0&&_3>=0&&(_4||(this.$29u==_2&&this.$29v==_3&&!this.$150d)))
{if(this.canSelectRecord(_1)){var _5=false;if(this.$89v(_3)){this.$828=true;_5=this.selectionManager.selectOnMouseDown(this,_2,_3)}
if(this.grid)this.grid.$67j=true;if(this.selectionManager.selectOnMouseUp(this,_2,_3)){_5=true}
if(this.grid)this.grid.$67j=null;if(_5){this.redrawForSelectionChanged();if(this.$828){if(this.fireSelectionUpdated&&isc.isA.Function(this.fireSelectionUpdated)){this.fireSelectionUpdated()}
if(this.grid.getCurrentCheckboxField()!=null){this.grid.updateCheckboxHeaderState()}
this.$828=null}}}else{if(this.$89v(_3)&&this.$243q(_1,_2,_3,_4))
{this.selectionManager.deselectAll()}}}},isc.A.$243q=function isc_GridRenderer__deselectAllOnDisallowedSelectionEvent(_1,_2,_3,_4){return false},isc.A.click=function isc_GridRenderer_click(){if(this.$29p(isc.EH.lastEvent))return;var _1=this.getEventRow(),_2=this.getEventColumn();return this.$29y(_1,_2)},isc.A.$29y=function isc_GridRenderer__rowClick(_1,_2){this.$29z=this.$290=null;var _3=this.$29u;if(_3!=null&&_1!=_3){if(isc.EH.getX()==this.$723){_1=this.$29u}else{return}}
if(isc.EH.getY()==this.$724&&this.$29v!=null){_2=this.$29v}
if(!(_1>=0&&_2>=0))return;var _4=this.getCellRecord(_1,_2);if(!this.cellIsEnabled(_1,_2,_4))return false;this.$29z=_1;var _5;if(!this.$22n(_4,_1,_2))_5=false;if(this.$200x)_1=this.$200x(_4,_1,_2);if(this.rowClick&&(this.rowClick(_4,_1,_2)==false))
_5=false;this.$29u=null;return _5},isc.A.$22n=function isc_GridRenderer__cellClick(_1,_2,_3){if(this.$29v!=_3){this.$290=null;return}
this.$290=_3;this.$291=null;return!(this.cellClick&&(this.cellClick(_1,_2,_3)==false))},isc.A.doubleClick=function isc_GridRenderer_doubleClick(){if(this.$29p(isc.EH.lastEvent))return;var _1=this.getEventRow(),_2=this.getEventColumn();if(!(_1>=0&&_2>=0))return;var _3=this.getCellRecord(_1,_2);if(!this.cellIsEnabled(_1,_2,_3))return false;if(_1!=this.$29z){return this.$29y(_1,_2)}
var _4;if(_2!=this.$290){_4=this.$22n(_3,_1,_2)}else if(this.cellDoubleClick&&(this.cellDoubleClick(_3,_1,_2)==false))
{_4=false}
if(this.rowDoubleClick&&(this.rowDoubleClick(_3,_1,_2)==false))
_4=false;this.$29u=this.$29v=null;this.$29z=this.$290=null;if(_4==false)return false},isc.A.dragStart=function isc_GridRenderer_dragStart(){var _1=isc.EH,_2=_1.lastEvent;if(_2.target==this&&_2.eventType=="dragStart")
{var _3;try{_3=_2.DOMevent.dataTransfer}catch(e){_3=null}
if(_3!=null&&_3.setDragImage!=null){var _4=this.getNearestRowToEvent(),_5=this.getTableElement(_4);if(_5!=null){var _6=isc.Element.getOffsets(_5),x=_1.getX(),y=_1.getY();_3.setDragImage(_5,x-_6.left,y-_6.top)}}}},isc.A.dragMove=function isc_GridRenderer_dragMove(){if(this.$29p(isc.EH.lastEvent)||!this.selectionEnabled()||!this.canDragSelect)
return true;var _1=this.getNearestRowToEvent(),_2=this.getNearestColToEvent();this.selectionManager.selectOnDragMove(this,_1,_2)},isc.A.dragStop=function isc_GridRenderer_dragStop(){this.fireSelectionUpdated()},isc.A.noSnapDragOffset=function isc_GridRenderer_noSnapDragOffset(_1){return this.snapToCells},isc.A.getHSnapPosition=function isc_GridRenderer_getHSnapPosition(_1,_2){if(!this.snapToCells){return this.Super("getHSnapPosition",arguments)}
var _3=this.ns.EH,_4=_2||this.snapHDirection,_5=this.snapHGap?Math.floor(_1/this.snapHGap):this.getEventColumn(_1),_6=this.snapHGap?(_5*this.snapHGap):this.getColumnLeft(_5),_7=this.snapHGap?_6+this.snapHGap:this.getColumnLeft(_5)+this.getColumnSize(_5),_8=this.snapHGap?_5+1:this.getEventColumn(_7+1),_9;if(_8>=0){_9=this.snapHGap?_8*this.snapHGap:this.getColumnLeft(_8)}else{_9=_6}
var _10=_6+(this.snapHGap?this.snapHGap:this.getColumnSize(_5))/2;if(this.snapInsideBorder){var _11=isc.Element.$tl(this.baseStyle)
var _12=isc.Element.$tm(this.baseStyle)
_6+=_11;_7-=_12;_9+=_11}
if(_3.dragOperation==_3.DRAG_RESIZE){var _13=isc.EH.resizeEdge.contains("L");return _13?_6:_7}else{if(_4==isc.Canvas.BEFORE){return _6}else if(_4==isc.Canvas.AFTER){return _9}else{if(_1<=_10){return _6}else{return _9}}}},isc.A.getVSnapPosition=function isc_GridRenderer_getVSnapPosition(_1,_2){if(!this.snapToCells){return this.Super("getVSnapPosition",arguments)}
var _3=this.ns.EH,_4=_2||this.snapVDirection,_5=this.snapVGap?Math.floor(_1/this.snapVGap):this.getEventRow(_1),_6=this.snapVGap?(_5*this.snapVGap):this.getRowTop(_5),_7=this.snapVGap?_6+this.snapVGap:this.getRowTop(_5)+this.getRowSize(_5),_8=this.snapVGap?_5+1:this.getEventRow(_7+1),_9;if(_8>=0){_9=this.snapVGap?_8*this.snapVGap:this.getRowTop(_8)}else{_9=_6}
var _10=_6+(this.snapVGap?this.snapVGap:this.getRowSize(_5))/2;if(this.snapInsideBorder){var _11=isc.Element.$tn(this.baseStyle)
var _12=isc.Element.$to(this.baseStyle)
_6+=_11;_7-=_12;_9+=_11}
if(_3.dragOperation==_3.DRAG_RESIZE){var _13=isc.EH.resizeEdge.contains("T");return _13?_6:_7}else{if(_4==isc.Canvas.BEFORE){return _6}else if(_4==isc.Canvas.AFTER){return _9}else{if(_1<=_10)return _6;else return _9}}},isc.A.getColumnAutoSize=function isc_GridRenderer_getColumnAutoSize(_1,_2,_3){if(this.isEmpty()){return null}
var _4=this.$292;if(_4==null){_4=this.$292=this.createAutoChild("columnSizer")}
var _5=this.autoFit,_6=this.wrapCells;this.autoFit=true;this.wrapCells=false;if(_2==null||_3==null){var _7=this.getDrawArea();_2=_7[0];_3=_7[1]+1}
this.$941=true;_4.setContents(this.getTableHTML(_1,_2,_3,true));delete this.$941;this.autoFit=_5;this.wrapCells=_6;if(!_4.isDrawn()){_4.draw()}else{if(_4.isDirty())_4.redraw();if(_4.$uu)_4.adjustOverflow("Check autoFit column sizing")}
var _8;if(isc.isA.Array(_1)){var _9,_10=_4.getHandle().childNodes;for(var i=0;i<_10.length;i++){if(_10[i].tagName.toLowerCase()=="table"){_9=_10[i];break}}
var _12=this.$1321();if(_9&&_9.rows[_12]){var _13=_9.rows[_12],_14=_13.childNodes,_15=_14.length;_8=[];if(isc.Browser.isMoz&&isc.Browser.hasTextOverflowEllipsis){for(var i=0;i<_15;++i){_8[i]=Math.ceil(_14[i].getBoundingClientRect().width)}}else if(isc.Browser.isIE10){var _16=_13.ownerDocument;var _17=_16.msCSSOMElementFloatMetrics;_16.msCSSOMElementFloatMetrics=true;for(var i=0;i<_15;++i){_8[i]=Math.ceil(_14[i].offsetWidth)}
_16.msCSSOMElementFloatMetrics=_17}else{for(var i=0;i<_15;++i){_8[i]=_14[i].offsetWidth;if(isc.Browser.hasTextOverflowEllipsis&&this.adjustForSubPixelSizing(_1[i]))
{var c=Math.ceil(_8[i]);_8[i]=(_8[i]==c?c+1:c)}}}}}else{var _9,_10=_4.getHandle().childNodes;for(var i=0;i<_10.length;i++){if(_10[i].tagName.toLowerCase()=="table"){_9=_10[i];break}}
if(_9!=null&&_9.getBoundingClientRect){_8=Math.ceil(_9.getBoundingClientRect().width)}else{_8=_4.getScrollWidth()}}
var _19=this;this.fireOnPause("clearColumnSizer",function(){_19.clearColumnSizer()},this.clearColumnSizerDelay);return _8});isc.evalBoundary;isc.B.push(isc.A.adjustForSubPixelSizing=function isc_GridRenderer_adjustForSubPixelSizing(_1){return true},isc.A.$1321=function isc_GridRenderer__getValidAutoFitRowNum(){return 0},isc.A.redraw=function isc_GridRenderer_redraw(_1,_2,_3,_4){this.$29c();this.$182u();this.invokeSuper(isc.GridRenderer,"redraw",_1,_2,_3,_4);delete this.$50v;this.$2699()},isc.A.$182u=function isc_GridRenderer__clearCellValueCacheForRedraw(){this.$182n()},isc.A.modifyContent=function isc_GridRenderer_modifyContent(){if(!this.$28c)this.$29d();if(this.$60s){if(this.$27y==null){var _1=this.$252,_2=this.$253;if(_1!=null){var _3=this.getScrollTop(),_4=_3+this.getViewportHeight(),_5=this.getRowTop(_1),_6=this.getRowTop(_2)+this.getDrawnRowHeight(_2);if(_5>_3||_6<_4)
{this.$27y=_1+Math.floor((_2-_1)/2);this.$27z=0;this.logDebug("Redraw with no target scroll row rendered content outside the viewport. Scrolling to center of drawn range:"+this.$27y,"virtualScrolling")}}}
if(this.$27y!=null){this.$191h=this.$80e();this.$80f=true;this.$270("scrollToRow in modifyContent");delete this.$191h;this.$80f=null;var _7=this.getTableElement();if(_7)_7.style.visibility="inherit"}}
if(this.$60s){var _8=this.$26b().sum();if(_8<this.getViewportHeight()){this.$515=0;var _9=isc.Element.get(this.getID()+"$284"),_10=this.$515+(this.endSpace||0);if(_9){if(_10==0)_9.style.display="none"
else _9.style.display="";_9.style.height=_10+"px"}}
var _11=this.getVisibleRows(),_12=Math.max(1,_11[1]-_11[0]),_13=_12/this.getTotalRows(),_14=this.getViewportRatio(true);var _4=this.getScrollTop()+this.getViewportHeight(),_15=_4-this.getRowTop(_11[1]+1);if(isc.isA.Number(_13)&&(_15<=0||_11[0]==0)&&((_14==1&&_13<1)||_14/_13>1.25))
{this.$272=Math.max(this.derivedRowHeight,Math.round(this.getViewportHeight()/_12))}}},isc.A.setStartSpace=function isc_GridRenderer_setStartSpace(_1){if(!isc.isA.Number(_1)||_1==this.startSpace)return;var _2=this.startSpace&&this.startSpace>_1;this.startSpace=_1;if(!this.isDrawn())return;var _3=_1+this.$514,_4=isc.Element.get(this.getID()+"$28s");if(_4){if(_3==0)_4.style.display="none";else _4.style.display="";if(this.$79b){_4.style.height=_3+"px"}
if(!_2||!this.$79b){_4.innerHTML=isc.Canvas.spacerHTML(1,_3)}
this.$t6()}},isc.A.setEndSpace=function isc_GridRenderer_setEndSpace(_1){var _2=(_1==null);if(_2)_1=0;if(!isc.isA.Number(_1)||_1==this.endSpace)return;var _3=(this.endSpace&&this.endSpace)>_1;this.endSpace=_2?null:_1;if(!this.isDrawn())return;var _4=_1+this.$515,_5=isc.Element.get(this.getID()+"$284");if(_5){if(_4==0)_5.style.display="none";else _5.style.display="";if(this.$79b)_5.style.height=_4+"px";if(!_3||!this.$79b){_5.innerHTML=isc.Canvas.spacerHTML(1,_4)}
this.$t6()}},isc.A.setLeftSpace=function isc_GridRenderer_setLeftSpace(_1){if(this.leftSpace==_1)return;this.leftSpace=_1;this.redraw()},isc.A.setRightSpace=function isc_GridRenderer_setRightSpace(_1){if(this.rightSpace==_1)return;this.rightSpace=_1;this.redraw()},isc.A.clear=function isc_GridRenderer_clear(){this.Super("clear",arguments);this.clearColumnSizer(true);this.$29j();delete this.$50v},isc.A.$29j=function isc_GridRenderer__clearTableCache(){this.$29g=null;this.$29f=null;delete this.$29o;delete this.$8s;this.$250=false});isc.B._maxIndex=isc.C+277;isc.GridRenderer.$294={getCellRecord:"rowNum,colNum",getCellValue:"record,rowNum,colNum,gridBody",findRowNum:"record",findColNum:"record",getBaseStyle:"record,rowNum,colNum",getCellStyle:"record,rowNum,colNum",getCellCSSText:"record,rowNum,colNum",cellIsEnabled:"rowNum,colNum",getRowHeight:"record,rowNum,isFrozenBody,retrieveCellHeight",getRowSpan:"record,rowNum,colNum",cellOut:"record,rowNum,colNum",cellOver:"record,rowNum,colNum",rowOut:"record,rowNum,colNum",rowOver:"record,rowNum,colNum",cellMove:"record,rowNum,colNum",rowMove:"record,rowNum,colNum",cellContextClick:"record,rowNum,colNum",rowContextClick:"record,rowNum,colNum",recordContextClick:"record,recordNum,fieldNum",cellMouseDown:"record,rowNum,colNum",rowMouseDown:"record,rowNum,colNum",recordMouseDown:"recordNum,fieldNum",cellMouseUp:"record,rowNum,colNum",rowMouseUp:"record,rowNum,colNum",recordMouseUp:"recordNum,fieldNum",selectOnMouseDown:"record,rowNum,colNum",selectOnRightMouseDown:"record,rowNum,colNum",selectOnMouseUp:"record,rowNum,colNum",cellClick:"record,rowNum,colNum",cellDoubleClick:"record,rowNum,colNum",rowClick:"record,rowNum,colNum",rowDoubleClick:"record,rowNum,colNum",cellHover:"record,rowNum,colNum",cellValueHover:"record,rowNum,colNum",rowHover:"record,rowNum,colNum",cellHoverHTML:"record,rowNum,colNum",cellHoverProperties:"record,rowNum,colNum",cellValueHoverHTML:"record,rowNum,colNum,defaultHTML",getCellHoverComponent:"record,rowNum,colNum",selectionChanged:"record,state",cellSelectionChanged:"cellList",getRowElementId:"rowNum,physicalRowNum",getCellElementId:"rowNum,physicalRowNum,colNum,physicalColNum",shouldFixRowHeight:"record,rowNum",updateEmbeddedComponentZIndex:"component",updateEmbeddedComponentCoords:"component,record,rowNum,colNum",getRowRole:"rowNum,record",getRowAriaState:"rowNum,record,role",getCellRole:"rowNum,colNum,record",getCellAriaState:"rowNum,colNum,record,role",$234w:"colNums,labelledByIDs,cellSeparatorID,rowSeparatorID"};isc.GridRenderer.registerStringMethods(isc.GridRenderer.$294);isc.defineClass("SelectionOrRollOverCanvas","Canvas");isc.A=isc.SelectionOrRollOverCanvas.getPrototype();isc.A.cssPointerEvents="none";isc.ClassFactory.defineClass("ListGrid","VLayout","DataBoundComponent");isc.defer("isc.ListGrid.addProperties({ showRollOver: !isc.Browser.isTouch });if (isc.Browser.hasDualInput) isc.ListGrid.addProperties({ handleMouseMove : function (event, eventInfo) {return this.$194u(event, eventInfo)}});");isc.addGlobal("ListViewer",isc.ListGrid);isc.defineClass("GridBody",isc.GridRenderer);isc.A=isc.GridBody.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.adjustOverflowWhileDirty=false;isc.A.$148n=isc.Browser.isIE&&isc.Browser.version>9;isc.A.$187u="autoFitSize";isc.A.expandEmptyMessageToMatchFields=true;isc.A.applyHSpaceToEmptyMessage=true;isc.B.push(isc.A.initWidget=function isc_GridBody_initWidget(){this.Super("initWidget",arguments);if(isc.screenReader)this.$148n=false;this.$191i()},isc.A.fireSelectionUpdated=function isc_GridBody_fireSelectionUpdated(){this.grid.fireSelectionUpdated()},isc.A.canSelectRecord=function isc_GridBody_canSelectRecord(_1){return this.grid.canSelectRecord(_1)},isc.A.$241l=function isc_GridBody__showSelectedStyle(_1,_2,_3){var _4=this.grid;if(_1&&_4.isGrouped&&!(_4.canSelectGroups&&_4.selectionAppearance=="checkbox")&&_1.$52e)
{return false}
return this.Super("$241l",arguments)},isc.A.redrawForSelectionChanged=function isc_GridBody_redrawForSelectionChanged(){this.grid.$25a("selection changed")},isc.A.adjustOverflow=function isc_GridBody_adjustOverflow(_1,_2,_3,_4,_5){var _6=this.isDrawn()&&!this.$249i();if(!_6)return this.Super("adjustOverflow",arguments);if(this.$80o)return;if(this.grid.$81r){return this.Super("adjustOverflow",arguments)}
var _7=this.grid;if(_7==null)return this.Super("adjustOverflow",arguments);if(this.$su!=null)delete this.$su;if(this.$sz!=null)delete this.$sz;var _8=_7.data,_9=false;;if(isc.isA.ResultSet(_8)&&!_8.lengthIsKnown()){if(_7.emptyMessageHeight==null){return this.invokeSuper(isc.GridBody,"adjustOverflow",_1,_2,_3,_4,_5)}
_9=true}
var _10=this.getWidth(),_11=this.getHeight();var _12=(this.autoFitData=="both"),_13=_12,_14=_7&&_7.frozenFields!=null,_15=_14&&_7&&(_7.frozenBody==this);if(!_12)_12=(this.autoFitData=="vertical");if(!_13)_13=(this.autoFitData=="horizontal");if(_13||_12){var _16,_17,_18,_19,_20,_21,_22;if(_12){var _23=this.grid.getAutoFitMinBodyHeight();_16=_23;var _24=_9?0:this.getTotalRows(),_25=_24;_18=0;if(this.autoFitMaxRecords){_25=Math.min(_25,this.autoFitMaxRecords)}
if(_25>0){var _26=this.$26b();var _27=this.$252,_28=this.$253;if(this.$252==null){_27=_25;_28=_25}
var _15=this.$100b();if(_27>0){_27=Math.min(_27,_25);for(var i=0;i<_27;i++){var _30=this.getRowHeight?this.getRowHeight(this.grid.getRecord(i),i,_15):this.cellHeight;_18+=_30}}
var _31=_25-1;if(_28<_31){for(var i=_28+1;i<_31+1;i++){_18+=this.getRowHeight?this.getRowHeight(this.grid.getRecord(i),i,_15):this.cellHeight}}
_28=Math.min(_28,_31);for(var i=0;i<=_28-_27;i++){_18+=_26[i]}
_20=_24>_25;var _32=this.getAutoFitMaxHeight();if(_32&&_18>_32){_18=_32;_20=true}}else{if(this.grid.emptyMessageHeight!=null){_18=this.grid.emptyMessageHeight}}
if(this.autoFitExtraRecords&&this.autoFitExtraRecords>0){var _33=Math.round(this.autoFitExtraRecords*this.cellHeight);_18+=_33}}else{_20=this.getScrollHeight()>this.getHeight()}
if(_13&&!_15){var _17=this.grid.getInnerWidth(),_34;if(_14){var _35=this.grid.getFrozenSlots(this.grid.$26a);_34=_35.sum();_17-=_34}
var _36=this.getColumnSizes(),_37=_36.sum();if(this.autoFitMaxColumns){var _38=this.autoFitMaxColumns;if(_14){_38=Math.max(1,_38-this.grid.frozenFields.length)}
if(_38<_36.length){_36=_36.slice(0,_38)}}
var _39=_36.sum();if(this.autoFitMaxWidth){var _40=this.grid.getAutoFitMaxWidth();if(_14)_40=Math.max(20,_40-_34);_39=Math.min(_40,_39)}
_19=(this.overflow==isc.Canvas.SCROLL)?true:(this.overflow==isc.Canvas.AUTO)?(_37>Math.max(_17,_39)):false}else{_19=this.overflow==isc.Canvas.SCROLL?true:this.overflow==isc.Canvas.AUTO?this.getScrollWidth()>this.getWidth():false}
if(_12&&_18!=null){_18+=this.getVBorderPad()+this.getVMarginSize();if(_19){_18+=this.getScrollbarSize();var _32=this.getAutoFitMaxHeight()
if(_32&&_18>_32){_18=_32}}
if(_18>_16){_16=_18;this.$70u=true}else{if(this.$70u)delete this.$70u}}
if(_13&&!_15&&_39!=null){_39+=this.getHBorderPad()+this.getHMarginSize();if(_20||this.alwaysShowVScrollbar||this.grid.$54u(!!_20)){_39+=this.getScrollbarSize();if(this.autoFitMaxWidth){var _40=this.grid.getAutoFitMaxWidth();if(_14)_40=Math.max(20,_40-_34);_39=Math.min(_40,_39)}}
if(_39>_17){_17=_39;this.$70v=true}else{if(this.$70v)delete this.$70v}}
this.$80o=true;_22=this.getDelta(this.$o5,_16,this.getHeight());_21=this.getDelta(this.$o6,_17,this.getWidth());delete this.$80o;if(_22!=null||_21!=null){this.resizeBy(_21,_22,null,null,this.$187u)}
if(_21!=null||(_15&&_13)){var _41=this.grid,_42=_41.$54u()?_41.body.getScrollbarSize():0,_43=_17-_42,_44=_43;if(_14&&_41.headerLayout){if(_15){_44=this.getWidth()+_41.body.getWidth();if(_41.autoFitMaxWidth!=null&&(_44+_41.getHBorderPad()+_41.getHMarginSize()>_41.getAutoFitMaxWidth()))
{return _41.body.adjustOverflow()}
_44-=_42}else{_44=_43+_41.frozenBody.getWidth()}
_41.headerLayout.setWidth(_44)}
if(!_15){var _45=_41.header;if(_45&&_45.isDrawn()){_45.setWidth(_43)}}}}
if(_15){var _35=this.grid.getFrozenSlots(this.grid.$26a||this.grid.getFieldWidths()),_46=_35.sum();var _47=this.getViewportWidth()<_46;if(this.grid.bodyOverflow==isc.Canvas.AUTO){this.setCustomHScrollbar(_47)}}
var _48=(!_12&&this.$70u),_49=(!_13&&this.$70v);if(_48||_49){delete this.$70u;delete this.$70v;var _50=_48?this.grid.getAutoFitMinBodyHeight():null,_51=_49?(!_14?this.grid.getInnerWidth():(this.grid.getInnerWidth()-this.grid.frozenBody.getWidth())):null;this.resizeTo(_51,_50);if(!_13)this.updateUserSize("100%",this.$o6);if(!_12)this.updateUserSize("100%",this.$o5);this.grid.$45m("autoFitData mode changed")}
var _52=this.invokeSuper(isc.GridBody,"adjustOverflow",_1,_2,_3,_4,_5);if((_12||_13)&&(this.getWidth()!=_10||this.getHeight()!=_11))
{this.grid.updateRecordComponents(true)}
if(!_15)this.grid.bodyOverflowed();return _52},isc.A.adjustForSubPixelSizing=function isc_GridBody_adjustForSubPixelSizing(_1){var _2=this.grid;if(_2.$30a||_2.alwaysShowEditors){var _3=_2.getFieldNumFromLocal(_1,this),_4=_2.getField(_3),_5=!this.fieldIsEditable(_4);if(!_5&&(!_2.editByCell||_2.getEditCol()==_3)){return false}}
return true},isc.A.setCustomHScrollbar=function isc_GridBody_setCustomHScrollbar(_1){var _2=this.customHscrollbar;if(!_2){if(!_1)return;_2=this.customHscrollbar=isc.ClassFactory.newInstance(this.scrollbarConstructor,{ID:this.getID()+"$198c",autoDraw:false,_generated:true,zIndex:this.getZIndex()+1,showThumbTriggerArea:isc.Browser.isTouch||isc.Browser.supportsDualInput,vertical:false,scrollTarget:this,visibility:this.visibility,$jp:false,$jo:false,_redrawWithParent:false,snapTo:"B",width:"100%",btnSize:this.getCustomScrollbarSize()});this.addPeer(_2)}
_2.setVisibility(_1)},isc.A.getSizeMayChangeOnRedraw=function isc_GridBody_getSizeMayChangeOnRedraw(){var _1=(this.autoFitData=="both"),_2=_1;if(!_1)_1=(this.autoFitData=="vertical");if(!_2)_2=(this.autoFitData=="horizontal");if(_2||_1)return true;return this.Super("getSizeMayChangeOnRedraw",arguments)},isc.A.getAutoFitMaxHeight=function isc_GridBody_getAutoFitMaxHeight(){return this.grid?this.grid.getAutoFitMaxBodyHeight():null},isc.A.$1321=function isc_GridBody__getValidAutoFitRowNum(){var _1=this.grid;if(this.grid&&this.grid.isGrouped){var _2=0;while(_2<this.grid.getTotalRows()){var _3=this.grid.getRecord(_2);if(_3==null||!this.grid.isGroupNode(_3)){return _2}
_2++}}
return 0},isc.A.resizeBy=function isc_GridBody_resizeBy(_1,_2,_3,_4,_5){var _6=_5==this.$187u;if(!_6){this.$1i=this.getWidth()+(_1!=null?_1:0)}
var _7=this.invokeSuper(isc.GridBody,"resizeBy",_1,_2,_3,_4,_5);if(_6&&_1!=null&&!this.frozen){delete this.$pn}
return _7},isc.A.cellContextClick=function isc_GridBody_cellContextClick(_1,_2,_3){var _4=this.grid.getFieldNumFromLocal(_3,this);return this.grid.$298(_1,_2,_4)},isc.A.$29y=function isc_GridBody__rowClick(_1,_2){if(!this.grid)return;var _3;var _4=this.grid.getFieldNumFromLocal(_2,this);var _5=_1>=0?this.grid.getRecord(_1):null,_6=_4>=0?this.grid.getField(_4):null,_7=false;if(!isc.isA.RecordEditor(this.grid)&&_6&&_6.isRemoveField){_7=!_5||!(_5.$52e||_5[this.grid.groupSummaryRecordProperty]||_5[this.grid.gridSummaryRecordProperty])}
if(_7){if(_1>=0){this.grid.removeRecordClick(_1,_2);_3=false}}else{_3=this.Super("$29y",arguments)}
if(_3!=false&&this.grid.shouldSelectCellTextOnClick(_1,_4)){this.grid.selectCellText(_1,_4)}
return _3},isc.A.$200x=function isc_GridBody__fixRowClickRow(_1,_2,_3){var _4=this.grid
if(_4&&_4.data&&_4.isGrouped&&_4.isGroupNode(_1)&&_1!=this.getCellRecord(_2,_3))
{var _5=_4.data.indexOf(_1);if(_5>=0)return _5}
return _2},isc.A.getCellHoverDelay=function isc_GridBody_getCellHoverDelay(_1,_2){if(!this.grid)return;var _3=this.grid.getFieldNumFromLocal(_2,this);return this.grid.getCellHoverDelay(this.grid.getCellRecord(_1,_3),_1,_3)},isc.A.$784=function isc_GridBody__getCellHoverComponent(_1,_2,_3){if(this.grid&&isc.isA.ListGrid(this.grid)){var _4=this.grid.getFieldNumFromLocal(_3,this);return this.grid.$784(_1,_2,_4)}},isc.A.$191i=function isc_GridBody__cacheVariableHeightFieldNums(_1){this.$191j=null;var _2=this.grid;if(_2&&_2.variableRecordHeightFields!=null){var _3=[];for(var i=0;i<_2.variableRecordHeightFields.length;i++){var _5=_2.variableRecordHeightFields[i],_6=this.getFieldNum(_5);if(_6>=0){_3.push(_6)}}
if(_3.length>0){this.$191j=_3}
if(!_1){var _7=this.frozen?_2.body:_2.frozenBody;if(_7!=null){_7.$191i(true)}}}},isc.A.$273b=function isc_GridBody__addPassbackForObservation(_1){var _2="_observation_"+_1+"$273c";if(this[_2])return;var _3,_4=isc.$ah+_1;if(this[_4]){_3=this[_1],this[_1]=this[_4]}
try{var _5=this[_1],_6=this.grid.$273g(this,[_1])}finally{if(_3)this[_1]=_3}
this.addMethods(_6);if(!isc.isAn.emptyObject(_6))this[_2]={originalMethod:_5,passbackMethod:_6[_1]};if(this.logIsDebugEnabled()&&this[_2]){this.logDebug("Added passback method on "+_1+" to support observation of the grid")}},isc.A.$273e=function isc_GridBody__clearPassbackFromObservation(_1){var _2="_observation_"+_1+"$273c";var _3=this[_2];if(!_3)return;var _4=isc.$ah+_1,_5=this[_4]?this[_4]:this[_1];if(_5!=_3.passbackMethod)return;var _6={};_6[_1]=_3.originalMethod;if(this[_4]){isc.Func.replaceWithMethod(_6,_1)}
this.addMethods(_6);delete this[_2];if(this.logIsDebugEnabled()){this.logDebug("Cleared passback method on "+_1+" as the grid method will now be ignored")}},isc.A.getInnerHTML=function isc_GridBody_getInnerHTML(){this.grid.bodyDrawing(this);return this.Super("getInnerHTML",arguments)},isc.A.$kk=function isc_GridBody__canFocus(){var _1=this.Super("$kk",arguments);if(_1&&this.grid&&!this.grid.canFocusInEmptyGrid&&this.isEmpty()){return false}
return _1},isc.A.syntheticShiftFocus=function isc_GridBody_syntheticShiftFocus(){var _1=this.grid;if(_1&&_1.frozenFields!=null){var _2=_1.$32b(),_3=_2==-1?_1.body:_1.getFieldBody(_2);if(_3!=this)return false}
return this.Super("syntheticShiftFocus",arguments)},isc.A.getTablePrintHTML=function isc_GridBody_getTablePrintHTML(_1){var _2=_1.startRow,_3=_1.endRow,_4=_3!=null?(_3-_2):this.getTotalRows(),_5=this.printMaxRows,_6=_1.printWidths,_7=_1.printProps;var _8={target:this,methodName:"gotTablePrintHTML",printContext:_1,printCallback:_1.callback};_1.callback=_8;if(_5<_4){this.logDebug("get table print html - breaking HTML into chunks","printing");if(_2==null)_2=_1.startRow=0;if(_3==null)_3=_1.endRow=this.getTotalRows();this.getPrintHTMLChunk(_1);return null}
var _9=this.grid.$119d(_6,_7);var _10=this.getTableHTML(null,_2,_3,null,_8);this.grid.$119e(_9);return _10},isc.A.gotTablePrintHTML=function isc_GridBody_gotTablePrintHTML(_1,_2){var _3=_2.printCallback;if(_3){this.fireCallback(_3,"HTML,callback",[_1,_3])}},isc.A.getPrintHTMLChunk=function isc_GridBody_getPrintHTMLChunk(_1,_2){var _3=this.grid.$119d(_1.printWidths);this.$568=true;this.$2808=!_1.isSubsequentChunk;this.$80u=true;var _4=_1.startRow,_5=_1.endRow,_6=this.printMaxRows,_7=_1.callback;this.currentPrintProperties=_1.printProps;if(!_1.html)_1.html=[];var _8=_1.chunkEndRow=Math.min(_5,(_4+_6)),_9=this.getTableHTML(null,_4,_8,null,{target:this,methodName:"gotPrintChunkHTML",printContext:_1,printCallback:_1.callback});this.grid.$119e(_3);this.$568=false;if(_9!=null){delete this.$80u;this.gotPrintChunkHTML(_9,{printContext:_1});if(_2){return _9}}},isc.A.gotPrintChunkHTML=function isc_GridBody_gotPrintChunkHTML(_1,_2){var _3=_2.printContext,_4=_3.startRow,_5=_3.endRow,_6=_3.chunkEndRow,_7=this.printMaxRows,_8=_3.callback;_3.html.add(_1);_3.isSubsequentChunk=true;if(_6<_5){_3.startRow=_6;return this.delayCall("getPrintHTMLChunk",[_3],0)}
if(_8!=null){var _9=_3.html.join(isc.emptyString);this.fireCallback(_8,"HTML,callback",[_9,_8])}},isc.A.gotComponentPrintHTML=function isc_GridBody_gotComponentPrintHTML(_1,_2){var _3=_2.context.asyncCallback,_4=_3.printContext;var _5=_4.printWidths;var _6=this.grid.$119d(_5);if(this.$80u){this.$568=true}
var _1=this.Super("gotComponentPrintHTML",arguments);if(this.$568)delete this.$568;if(_1!=null){delete this.$80u}else{this.grid.$119e(_6)}},isc.A.getPrintHeaders=function isc_GridBody_getPrintHeaders(_1,_2){var _3=this.$119f;delete this.$119f;return _3==null?"":_3},isc.A.getPrintFooters=function isc_GridBody_getPrintFooters(_1,_2){var _3=this.$119g;delete this.$119g;return _3==null?"":_3},isc.A.refreshCellValue=function isc_GridBody_refreshCellValue(_1,_2,_3,_4,_5){var _6=this.grid;if(_6==null){return this.Super("refreshCellValue",arguments)}
if(!this.$29l(_1,_2)){this.delayCall("refreshCellValue",[_1,_2,_3,_4,_5]);return}
var _7=_6.getFieldNumFromLocal(_2,this);var _8=_6.getEditorName(_1,_7),_9=_6.getFieldName(_7),_10=_6.$286,_11,_12=false,_13,_14;if(_10){var _11=_10.getItem(_8),_15=(_6.$30a&&_1==_6.getEditRow());if(_11&&_11.colNum!=_7)_11=null;if(_15){_13=(_11&&_11.isDrawn());_14=_6.$2027(_1,_7);if(_11!=null&&_10.hasFocus){var _16=_10.getFocusSubItem();_12=(_16==_11||(_11.items&&_11.items.contains(_16)))}}else if(_11&&_11.rowNum==_1){_14=false;_13=_11.isDrawn()}}
if(!_4&&(_12&&_13&&_14))
{return false}
var _17=this.$207d;if(_17&&this.$316!=null&&_11!=null&&_11.rowNum==_1)
{this.$316.remove(_11)}
if(_13){_6.getUpdatedEditorValue();if(_11!=null){if(_12){if(_14){_11.$516();_10.$106();_11.$199k=true}
else _11.blurItem()}
if(!_14)_11.clearing(true)}}
if(this.$316&&this.$316.length==0){delete this.$316}
if(!_13&&!_14&&_6.selectCellTextOnClick){_6.$190i=_6.$190h(_1,_7)}
var _18=_1
if(_1>=0&&_2>=0&&_6&&_6.allowRowSpanning&&_6.useRowSpanStyling)
{var _19=this.getCellStartRow(_1,_2);if(_19!=_1){_18=_19}}
isc.GridRenderer.$b4.refreshCellValue.call(this,_18,_2,null,null,_5);if(_11&&_11.$199k)delete _11.$199k;if(_11&&(_13||_14)){if(_14)_6.$101f=_11;if(!_17)_6.$30b(_11,null,this);if(_14){delete _6.$101f;if(_12){_11.$897=true;_11.$109();_11.$897=false}}}else{if(_6.selectCellTextOnClick&&_6.$190i){var _20=_6.$190i;delete _6.$190i;var _21=this.getTableElement(_20.rowNum,_2);if(_21!=null&&window.getSelection!=null){var _22=window.document.createRange();_22.selectNodeContents(_21);if(_22.toString()==_20.text){var _23=window.getSelection();_23.removeAllRanges();_23.addRange(_22)}}}
if(!_3&&_6.frozenFields&&!_6.fixedRecordHeights&&_6.matchFrozenRowHeightsApproach=="rowHeightSpacerHTML"&&(_6.variableRecordHeightFields==null||_6.variableRecordHeightFields.contains(_9)))
{var _24=_6.frozenBody.getTableElement(_1),_25=_24?_24.cells[_6.frozenFields.length]:null,_26=_6.body.getTableElement(_1),_27=_26?_26.cells[_6.fields.length-_6.frozenFields.length]:null,_28=this.getCellRecord(_1,_7);if(_25)_25.innerHTML=_6.frozenBody.$191g(_28,_1);if(_27)_27.innerHTML=_6.body.$191g(_28,_1)}}},isc.A.getCellVAlign=function isc_GridBody_getCellVAlign(_1,_2,_3,_4){if(this.grid&&this.grid.getCellVAlign){var _5=this.grid.getFieldNumFromLocal(_4,this);return this.grid.getCellVAlign(_1,_3,_5)}},isc.A.getCellAlign=function isc_GridBody_getCellAlign(_1,_2,_3,_4){if(this.grid&&this.grid.getCellAlign!=null){var _5=this.grid.getFieldNumFromLocal(_4,this);return this.grid.getCellAlign(_1,_3,_5)}else return _2.cellAlign||_2.align},isc.A.$282=function isc_GridBody__drawRecordAsSingleCell(_1,_2,_3){var _4=this.grid;if(_4.$299(_1))return true;return isc.GridRenderer.$b4.$282.call(this,_1,_2,_3)},isc.A.showSingleCellCheckboxField=function isc_GridBody_showSingleCellCheckboxField(_1){var _2=this.grid;return _2&&_2.showSingleCellCheckboxField(_1)},isc.A.$67p=function isc_GridBody__getSingleCellSpan(_1,_2,_3,_4){if(_2==this.$28c||!this.showSingleCellCheckboxField(_1)||(this.grid&&this.grid.frozenBody!=null&&this.grid.frozenBody!=this))
{return[_3,_4]}
var _5=this.grid.getCheckboxFieldPosition()+1;return[Math.max(_3,_5),_4]},isc.A.$188p=function isc_GridBody__clipDiv_writeTextOverflowEllipsis(_1){if(this.grid.showEllipsisWhenClipped==false)return false;if(_1!=null&&_1.showEllipsisWhenClipped!=null)return _1.showEllipsisWhenClipped;if(_1!=null&&this.grid.showValueIconOnly(_1))return false;return true},isc.A.$191e=function isc_GridBody__writeRowHeightSpacerHTML(_1){var _2=this.grid;if(!_2||_2.matchFrozenRowHeightsApproach!="rowHeightSpacerHTML"){return false}
if(!this.fixedRowHeights&&_2){if(this.$191j){var _3=_1[2],_4=_1[3];for(var i=0;i<this.$191j;i++){var _6=this.$191j[i]
if(_6<_3||_6>_4){return true}}}
if(_2.frozenFields&&_2.frozenFields.length>0){var _7=this.frozen?_2.body:_2.frozenBody;if(_7!=null&&(!_2.variableRecordHeightFields||_7.$191j))
{return true}}}
return false},isc.A.$191g=function isc_GridBody__getRowHeightSpacerCellValue(_1,_2,_3){var _4=this.grid;if(_4){var _5;var _6=this.frozen?_4.body:_4.frozenBody;if(_6!=null){_6.$198v=true;_6.$191k=true;_6.$191m=true;_5=_6.getTableHTML(_6.$191j,_2,_2+1,true);_6.$191m=false;_6.$198v=false;_6.$191k=false}
if(this.$191j){var _7=_3[2],_8=_3[3],_9=[];for(var i=0;i<this.$191j.length;i++){var _11=this.$191j[i];if(_11<_7||_11>_8){_9.add(_11)}}
if(_9.length>0){this.$198v=true;this.$191k=true;this.$191m=true;if(_5==null){_5=this.getTableHTML(_9,_2,_2+1,true)}else{_5="<table cellspacing=0 cellpadding=0><tr><td>"+_5+"</td><td>"+this.getTableHTML(_9,_2,_2+1,true)+"</td></tr></table>"}
this.$191m=false;this.$198v=false;this.$191k=false}}
if(_5!=null)return _5}
return"&nbsp;"},isc.A.mouseWheel=function isc_GridBody_mouseWheel(){if(this.frozen&&this.grid!=null){var _1=this.ns.EH.lastEvent.wheelTarget;var _2=this.ns.EH.lastEvent.wheelDeltaY,_3=this.ns.EH.lastEvent.wheelDeltaX;var _4=(_1!=null&&_1!=this)||(_2==0)||(_2<0&&this.scrollTop==0)||(_2>0&&this.scrollTop==this.getScrollBottom()),_5=(this.customHscrollbar==null||!this.customHscrollbar.isVisible())||(_1!=null&&_1!=this)||(_3==0)||(_3<0&&this.scrollLeft==0)||(_3>0&&this.scrollLeft==this.getScrollRight());if(!_5){_1=this;var _6;_6=this.scrollLeft+Math.round(_3*isc.Canvas.scrollWheelDelta);this.scrollTo(_6,null,"mouseWheel")}
if(!_4){var _7=this.scrollTop+Math.round(_2*isc.Canvas.scrollWheelDelta);this.grid.body.scrollTo(null,_7,"frozenMouseWheel")}
if(!_5||!_4)return false}
return this.Super("mouseWheel",arguments)},isc.A.$80e=function isc_GridBody__getDrawRows(_1,_2,_3){if(this.frozen&&this.grid){var _4=this.grid,_5=_4.body;if(_5.$191h!=null){return _5.$191h}
return _4.body.$80e(_1,_2,_3)}
return this.Super("$80e",arguments)},isc.A.getDrawAllMaxCells=function isc_GridBody_getDrawAllMaxCells(){var _1=this.grid;if(_1&&_1.frozenFields!=null&&_1.virtualScrolling){return 0}
return this.drawAllMaxCells},isc.A.lengthIsKnown=function isc_GridBody_lengthIsKnown(){var _1=this.grid,_2=_1&&_1.data;return((_2&&_2.lengthIsKnown)?_2.lengthIsKnown():true)},isc.A.$195u=function isc_GridBody__shouldAllowRecordDrag(){if(!isc.Browser.isTouch)return true;var _1=this.grid;if(!_1||!_1.$195v())return true;var _2=_1.getOffsetX(isc.EH.mouseDownEvent),_3=_1.getEventColumn(_2),_4=_1.getField(_3);return _4&&_4.isDragHandle},isc.A.$89v=function isc_GridBody__shouldSelectOnMouseUp(_1){var _2;if(isc.Browser.isTouch){_2=this.grid.getField(this.grid.getFieldNumFromLocal(_1,this))}
return this.invokeSuper(isc.GridBody,"$89v",_1,_2&&_2.isDragHandle)},isc.A.doneFastScrolling=function isc_GridBody_doneFastScrolling(){if(!this.frozen&&this.grid!=null&&this.grid.frozenBody!=null){var _1=this.$50z;this.Super("doneFastScrolling",arguments);if(_1){this.grid.frozenBody.$50v=true;this.grid.frozenBody.markForRedraw("Done fast scrolling on unfrozen body")}}},isc.A.scrollTo=function isc_GridBody_scrollTo(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(this.$278e&&_3=="nativeScroll"){delete this.$278e;this.setStyleName(this.styleName);var _5=this.$135r();if(_5)_5.className=""}
if(_1!=null){var _6=this.getScrollWidth()-this.getViewportWidth();_1=Math.max(0,Math.min(_6,_1))}
if(_2!=null){var _7=this.getScrollHeight()-this.getViewportHeight();_2=Math.max(0,Math.min(_7,_2))}
var _8=this.grid;this.invokeSuper(isc.GridBody,"scrollTo",_1,_2,_3,_4);var _9=this.$80h;if(!_9)_8.bodyScrolled(this.getScrollLeft(),this.getScrollTop(),this.frozen);if(!this.isDirty()&&_8.$30a){var _10=_8.$286,_11=_10.getItems(),_12=[];for(var i=0;i<_11.length;i++){if(_11[i].isDrawn())_12.add(_11[i])}
_10.itemsMoved(_12)}},isc.A.$192v=function isc_GridBody__resetScrollTopBeforeFetch(){var _1=this.$1301;this.$1301=true;this.scrollTo(null,0);this.$1301=_1},isc.A.$148o=function isc_GridBody__fixIEFocusScrollArtifacts(){var _1=this.$148n;if(_1&&this.grid&&this.grid.frozenBody!=null&&this.virtualScrolling)
{this.logWarn("Disabling redraw");_1=false}
if(_1){this.fireOnPause("redrawToFixIEFocusScrollArtifacts",{target:this,methodName:"markForRedraw",args:["fixIEScrollArtifacts"]},100)}else{var _2=this.getStyleHandle();if(_2)_2.backgroundColor=_2.backgroundColor}},isc.A.addEmbeddedComponent=function isc_GridBody_addEmbeddedComponent(_1,_2,_3,_4,_5,_6){var _7=this.invokeSuper(isc.GridBody,"addEmbeddedComponent",_1,_2,_3,_4,_5,_6);if(_1.$57n!=null&&_1.$57n!=-1&&this.grid){var _8=this.grid,_4=_1.$57n,_9=_8.getFieldNumFromLocal(_4,this),_10=_8.getFieldName(_9);_1.$81k=_10;if(_8.$1167==null){_8.$1167={}}
if(_8.$1167[_10]==null){_8.$1167[_10]={}}
_8.$1167[_10][_1.getID()]=true;if(_1._percent_width==null){_8.$1168(_10)}}
return _1},isc.A.removeEmbeddedComponent=function isc_GridBody_removeEmbeddedComponent(_1,_2,_3){var _4=this.grid;if(_4){var _5=_2.$81k;if(_5!=null){if(_4.$1167&&_4.$1167[_5]){delete _4.$1167[_5][_2.getID()]}
if(_2._percent_width==null){_4.$1168(_5)}}
_2.$81k=null}
this.invokeSuper(isc.GridBody,"removeEmbeddedComponent",_1,_2,_3)},isc.A.updateHeightForEmbeddedComponents=function isc_GridBody_updateHeightForEmbeddedComponents(_1,_2,_3){if(_1&&!this.grid.$916(_1)&&this.grid.showRecordComponents&&this.grid.recordComponentHeight!=null)
{var _4=this.getMaxEmbeddedComponentHeight(_1,_2);if(_4.allWithin){_3=Math.max(_3,_4.requiredHeight)}else{_3+=_4.requiredHeight}
return _3}
return this.invokeSuper(isc.GridBody,"updateHeightForEmbeddedComponents",_1,_2,_3)},isc.A.getMaxEmbeddedComponentHeight=function isc_GridBody_getMaxEmbeddedComponentHeight(_1,_2){var _3=this.invokeSuper(isc.GridBody,"getMaxEmbeddedComponentHeight",_1,_2);if(this.grid.showRecordComponents&&this.grid.recordComponentHeight!=null){_3.requiredHeight=Math.max(_3.requiredHeight,this.grid.recordComponentHeight)}
return _3},isc.A.$80g=function isc_GridBody__writeEmbeddedComponentSpacer(_1){if(_1&&this.grid&&this.grid.showRecordComponents&&this.grid.recordComponentHeight!=null)
{return true}
return this.invokeSuper(isc.GridBody,"$80g",_1)});isc.evalBoundary;isc.B.push(isc.A.$29d=function isc_GridBody__placeEmbeddedComponents(){if(this.grid&&this.grid.$113n){return}
return this.Super("$29d",arguments)},isc.A.getAvgRowHeight=function isc_GridBody_getAvgRowHeight(){if(this.grid)return this.grid.getAvgRowHeight(this);return this.Super("getAvgRowHeight",arguments)},isc.A.shouldShowAllColumns=function isc_GridBody_shouldShowAllColumns(){if(this.showAllColumns){return true}
if(!this.fixedRowHeights){if(this.grid.canExpandRecords&&this.grid.$82v){return false}
if(this.grid.variableRecordHeightFields!=null){return false}
return true}
if(this.overflow==isc.Canvas.VISIBLE){return true}
return false},isc.A.redraw=function isc_GridBody_redraw(_1,_2,_3,_4){if(this.$174n)this.cancelPendingCellRefresh();if(this.grid)this.grid.checkForSearchForm();this.$58p=true;this.$182u();this.$183t=true;this.$191i();var _5=this.grid;if(_5.alwaysShowEditors&&!_5.$30a){var _6,_7;if(_5.$190r){_6=_5.$190r[0];_7=_5.$190r[1];delete _5.$190r}
_5.startEditing(_6,_7,true,null,true)}
if(_5.$30a&&!_5.$2025){_5.$2026()}
var _8=_5.$286,_9=_5.$30a,_10,_11,_12,_13,_14;_5.$69l();if(!_5.leaveScrollbarGap&&_5.predictScrollbarGap&&(this.overflow==isc.Canvas.AUTO)){var _15=this.vscrollOn,_16=!_5.isEmpty()&&(_5.getTotalRows()*_5.cellHeight)>this.getInnerHeight();if(_15!=_16){delete this.$773;_5.$45m("body redrawing with changed vertical scroll-state")}}
var _17,_18=false;if(_9){this.logInfo("redraw with editors showing, editForm.hasFocus: "+_8.hasFocus,"gridEdit");_10=_5.getEditCol();if(isc.Browser.isEdge){_17=_5.getFieldName(_10);_5.$32h(_8?_8.getItem(_17):null,_10)}
this.$516();_14=this.$517()}else if(_8!=null){var _19=_8.getItems();for(var i=0;i<_19.length;i++){if(_19[i].isDrawn())_19[i].clearing(true)}}else if(isc.screenReader){var _21=this.ns.EH.getFocusCanvas();_18=_21!==this}else{if(_5.selectCellTextOnClick){this.$190g=_5.$190h()}}
if(this.$773!=null){var _22=this.$773;delete this.$773;_5.$45m(_22)}
var _23=this.getDrawArea();var _24=this.grid,_25=this.$74k;if(!_25)_25=this.$74k=[0,0,0,0];var _24=this.grid,_26=_24.$131w(_23[0]),_27=_24.$131w(_23[1]),_28=(_26!=null&&_27!=null);if(_28&&!_25.equals(_23)){if(!this.frozen){_24.$74l(_25[0],_25[1],_25[2],_25[3],this);this.$74k=_23}}
delete this.$316;this.invokeSuper(isc.GridBody,"redraw",_1,_2,_3,_4);delete this.$58p;delete this.$183t;if(_24.$212y){delete _24.$212y;this.$212z()}
if(!(this.frozen&&this.$1055)){_24.updateRecordComponents()}
this.$1055=false;if(_9){if(_14!=null&&_14.length>0){_8.removeItems(_14)}
_5.$30b(null,true,this);_5.updateEditRow(_5.getEditRow());var _29=isc.ListGrid.$32u;if(isc.Browser.isEdge&&_17&&_29&&(_29.hasFocus||_29.itemHasFocus()))
{var _30=_8.getItem(_17);if(_30)this.$32v=_30.delayCall("focusAtEnd")}else if(_8.hasFocus||(this.$519&&isc.EH.getFocusCanvas()==null))
{this.$518(_10)}else{delete this.$519}}else{if(_8!=null){_5.$30b(null,null,this)}
if(isc.screenReader){this.$315s=true;this.$86a(this.getNativeFocusRow(),this.getNativeFocusColumn(),_18);delete this.$315s}else if(_5.selectCellTextOnClick&&this.$190g!=null){var _31=this.$190g;delete this.$190g;var _7=_5.getLocalFieldNum(_31.colNum);var _32=this.getTableElement(_31.rowNum,_7);if(_32!=null&&window.getSelection!=null){var _33=window.document.createRange();_33.selectNodeContents(_32);if(_33.toString()==_31.text){var _34=window.getSelection();_34.removeAllRanges();_34.addRange(_33)}}}}
if(_5.$30d!=null)_5.$181x()},isc.A.$182m=function isc_GridBody__clearCellValueCacheForDraw(){if(this.$191o)return;return this.Super("$182m",arguments)},isc.A.$182u=function isc_GridBody__clearCellValueCacheForRedraw(){if(this.$183t)return;var _1=this.grid;if(_1&&(_1.$168j||_1.$113n)){return}
return this.Super("$182u",arguments)},isc.A.bypassCellValueCache=function isc_GridBody_bypassCellValueCache(_1,_2,_3){if(this.grid){var _4=this.grid;if(this.grid.isGrouped&&_1&&_1.$52e){return true}else if(this.grid.$30a){var _5=_4.$285,_6=_5;if(_6!=null&&_4.allowRowSpanning){_6=_4.getCellStartRow(_6,_8)}
var _7=_6==_2;if(_7){var _8=_4.getFieldNumFromLocal(_3,this);var _9=(!_4.editByCell||_4.$30u==_8)&&(_4.$2027(_5,_8));if(_9)return true}}
if(_4.$191n(_2,_4.getFieldNumFromLocal(_3,this)))
{if(_4.formatInactiveCellValue!=null)return true;var _10=_4.getField(_3);if(_10&&_10.formatInactiveCellValue!=null)return true}}
return this.isPrinting},isc.A.redrawOnScroll=function isc_GridBody_redrawOnScroll(_1){if(this.frozen)this.$1055=true;return this.Super("redrawOnScroll",arguments)},isc.A.$1720=function isc_GridBody__lockVirtualScrolling(){this.grid.$1722=true},isc.A.$1721=function isc_GridBody__canStopVirtualScrolling(){return!this.grid.$1722},isc.A.setHandleDisabled=function isc_GridBody_setHandleDisabled(_1){var _2=this.grid;if(this.isDrawn()){this.markForRedraw("Grid body disabled")}
return this.Super("setHandleDisabled",arguments)},isc.A.$517=function isc_GridBody__updateEditItems(){var _1=this.grid,_2=_1.getEditForm(),_3=[],_4=_2.getItems();if(!_1.editByCell){var _5=_1.getEditRow(),_6=_1.getRecord(_5),_7=_1.getEditFormItemFieldWidths(_6);var _4=_2.getItems(),_8=_4.getProperty("name"),_9=_1.getDrawnFields(),_10=_9.getProperty("name");var _11=_4.length==_9.length,_12=false;for(var i=0;i<_4.length;i++){var _14=_10.indexOf(_8[i]),_15=_4[i].isDrawn();if(_14==-1){_12=true;_3.add(_4[i]);if(_15){_4[i].clearing(true)}}else{var _16=_8[i],_17=_1.$2027(_5,_14);if(_17){_4[i].width=_7[_4[i].colNum];_4[i].$8t=null}else{if(_15)_4[i].clearing(true)}}}
if(!_11||_12){var _18=_1.getEditedRecord(_5,0);for(var i=0;i<_9.length;i++){if(!_8.contains(_10[i])){var _19=_1.fields.indexOf(_9[i]);var _20=_1.getEditItem(_9[i],_6,_18,_5,_19,_7[_19]);_2.addItem(_20);if(_2.$187k){delete _2.$187k[_10[i]]}}}
_2.items.sortByProperty("colNum",Array.ASCENDING)}}
return _3},isc.A.$516=function isc_GridBody__storeFocusForRedraw(){var _1=this.grid,_2=_1.getEditForm(),_3=_1.getEditCol();if(_2.hasFocus){var _4=_2.getFocusSubItem();if(_4){_4.updateValue(true);var _5=_4;while(_4.parentItem!=null){_4=_4.parentItem}
if(!_1.$2027(_4.rowNum,_4.colNum)||_3!=_4.colNum){_2.blur()}else{if(_4.hasFocus){_4.rememberSelection();this.$519=[_4.$17r,_4.$17s]}
_2.$106()}}}
_2.$10u=true},isc.A.$518=function isc_GridBody__restoreFocusAfterRedraw(_1){var _2=this.grid,_3=_2.getEditForm(),_4=_3.getItem(_2.getEditorName(_2.getEditRow(),_1));if(_4!=null&&_4.isDrawn()){var _5=_2.body.getScrollLeft(),_6=_2.body.getScrollTop(),_7=_2.body.getViewportWidth(),_8=_2.body.getViewportHeight(),_9=_4.getRect(),_10=this.grid.fieldIsFrozen(_1),_11=!_10&&(_9[0]<_5||_9[1]<_6||_9[0]+_9[2]>(_5+_7)||_9[1]+_9[3]>(_6+_8));if(!_11){_3.$11b(_4);if(this.$519&&this.$519[0]!=null){_4.setSelectionRange(this.$519[0],this.$519[1])}
delete this.$519}}},isc.A.$29p=function isc_GridBody__suppressEventHandling(_1){if(this.Super("$29p",arguments))return true;if(_1){var _2=_1.target;while(_2&&_2!=this){if(_2.isExpansionComponent)return true;_2=_2.parentElement}}
return false},isc.A.mouseOut=function isc_GridBody_mouseOut(_1,_2,_3,_4,_5){var _6=this.grid;if(_6.getEditRow()!=null){var _7=_6.getEditForm();var _8=isc.EH.getTarget();while(_8&&_8.parentElement){if(_8.canvasItem!=null&&_7.items.contains(_8.canvasItem)){return}
if(_8==this)break;_8=_8.parentElement}}
return this.invokeSuper(isc.GridBody,"mouseOut",_1,_2,_3,_4,_5)},isc.A.cellMove=function isc_GridBody_cellMove(_1,_2,_3){if(isc.EH.lastEvent.target==this){var _4=isc.EH.lastEvent.nativeTarget;for(;_4;_4=_4.parentNode){if(_4.getAttribute&&_4.getAttribute("isErrorIcon")=="true")
{break}
if(_4===this.getHandle()){_4=null;break}}
if(_4){_3=this.grid.getFieldNumFromLocal(_3,this);if(this.grid.$79y!=null){var _5=this.grid.$79y[0],_6=this.grid.$79y[1];if(_5!=_2||_6!=_3){this.grid.$790(_2,_3)}}
if(this.grid.$79y==null){this.grid.$79z(_2,_3)}}else{if(this.grid.$79y!=null){this.grid.$790(_2,_3)}}}},isc.A.cellOut=function isc_GridBody_cellOut(_1,_2,_3){if(this.grid.$79y!=null){this.grid.$790(_2,_3)}},isc.A.shouldShowRollOver=function isc_GridBody_shouldShowRollOver(_1,_2,_3,_4){var _5=this.grid.hiliteRowOnFocus;if(_5==null){_5=this.grid.showRollOver}
var _6=this.grid;if((!_6.showRollOver&&(!_5||(this.$31p!=_1)))||this.$28j)
{return false}
var _7=_6.getRecord(_1);if(_7&&_7[_6.recordShowRollOverProperty]===false){return false}
if(!this.cellIsEnabled(_1,_2,_7))return false;if(_6.$30a&&_1==_6.$285){return false}
return true},isc.A.updateRollOver=function isc_GridBody_updateRollOver(_1,_2,_3){var _4=this.grid;if(_4.showRollOverCanvas||_4.showRollUnderCanvas||_4.showSelectedRollOverCanvas||_4.showSelectedRollUnderCanvas)
{if(!_3){var _5=!(this.lastOverRow==_1&&this.lastOverCol==_2);var _6=_4.getFieldNumFromLocal(_2,this);_4.updateRollOverCanvas(_1,_6,_5)}}
this.setRowStyle(_1,null,this.canSelectCells||this.useCellRollOvers?_2:null);var _7=(this==_4.body?_4.frozenBody:_4.body);if(_7&&!this.useCellRollOvers){_7.lastOverRow=this.lastOverRow;_7.lastOverCol=this.lastOverCol;_7.setRowStyle(_1,null,(this.useCellRollOvers?_2:null))}},isc.A.$94f=function isc_GridBody__selectCellOnMouseDown(_1,_2,_3){this.grid.clearLastHilite();this.$24n=_2;this.$24o=_3;this.grid.$967=this;if(this.useRowSpanStyling){var _4=this.grid.selectionManager;var _5=this.getCellStartRow(_2,_3);if(isc.EH.modifierKeyDown()){var _6=this.grid.getFieldNumFromLocal(_3,this);_4.selectOnMouseDown(this,_5,_6);return}
_4.deselectAll();var _7,_8,_9,_10=this.rowSpanSelectionMode;if(_10=="forward"||_10==null){_8=this.grid.getFieldNumFromLocal(_3,this);_9=this.getCellRowSpan(_5,_3)}else if(_10=="outerSpan"){_8=0;_7=this.grid.getFieldBody(0);_5=_7.getCellStartRow(_2,0);_9=_7.getCellRowSpan(_5,0)}else if(_10=="both"){_9=this.getCellRowSpan(_5,_3);_8=0}else{this.logWarn("unrecognized rowSpanSelectionMode: '"+_10+"'");return}
for(var _11=_8;_11<this.grid.fields.length;_11++){var _12=this.grid.getFieldBody(_11),_13=this.grid.getLocalFieldNum(_11);for(var i=_5;i<_5+_9;i++){var _15=_12.getCellStartRow(i,_13);_4.selectCell(_15,_11);i+=(_12.getCellRowSpan(_15,_13)-1)}}
return}
this.selectionManager.selectOnMouseDown(this,_2,_3)},isc.A.selectOnMouseDown=function isc_GridBody_selectOnMouseDown(_1,_2,_3,_4,_5,_6){var _7=true,_8=this.grid.selectionAppearance,_9=(_8=="checkbox");if(_9){if((this.grid.frozenFields!=null&&this.grid.frozenBody!=this)||((this.grid.getCheckboxFieldPosition()!=_3&&!this.canSelectCells)&&(this.grid.getExpansionFieldPosition()!=_3||!this.grid.selectOnExpandRecord)))
{_7=false}}
if(_7){if(this.canSelectCells)this.$94f(_1,_2,_3);else this.invokeSuper(isc.GridBody,"selectOnMouseDown",_1,_2,_3,_4,_5,_6)}
if(isc.screenReader){this.$86a(_2,_3);if(this.canSelectCells){var _10=this.lastOverRow,_11=this.lastOverCol;this.lastOverRow=null;this.lastOverCol=null;this.updateRollOver(_10,_11);this.grid.$97a=this;this.grid.$24y(_2,_3)}}else{if(this.$31p!=null&&this.$31p!=_2){if(this.lastOverRow==this.$31p){var _10=this.lastOverRow,_11=this.lastOverCol;this.lastOverRow=null;this.lastOverCol=null;this.updateRollOver(_10,_11)}}}
this.$31p=_2;this.$237t=_3},isc.A.$243q=function isc_GridBody__deselectAllOnDisallowedSelectionEvent(_1,_2,_3,_4){if(_4&&this.grid.selectionType!="simple"&&!isc.EH.shiftKeyDown()&&this.grid.isGroupNode(_1))
{return true}
return false},isc.A.$1696=function isc_GridBody__getMouseDownCell(){if(this.$1697!=null){var _1=this.$1697;this.$1697=null;return _1}
return this.Super("$1696",arguments)},isc.A.mouseUp=function isc_GridBody_mouseUp(){var _1=isc.EH.getTarget();if(this.grid&&_1!=null&&_1!=this&&this.grid.$30a){var _2=this.grid.getEditForm();while(_1!=this&&_1!=null&&_1!=_2){if(_1.canvasItem&&_2.items.contains(_1.canvasItem)){return}
_1=isc.isA.FormItem(_1)?_1.containerWidget:_1.parentElement}}
return this.Super("mouseUp",arguments)},isc.A.selectOnMouseUp=function isc_GridBody_selectOnMouseUp(_1,_2,_3,_4,_5,_6){var _7=this.grid.getCheckboxFieldPosition(),_8=this.grid.selectionAppearance;if(_8!="checkbox"||(_8=="checkbox"&&_7==_3)){this.invokeSuper(isc.GridBody,"selectOnMouseUp",_1,_2,_3,_4,_5,_6)}},isc.A.handleSelectionChanged=function isc_GridBody_handleSelectionChanged(_1,_2){if(this.grid.suppressSelectionChanged)return;var _3=this.Super("handleSelectionChanged",arguments);if(this.$100b()==0)this.grid.handleViewStateChanged();return _3},isc.A.setSelection=function isc_GridBody_setSelection(_1){this.clearSelection();this.Super("setSelection",arguments)},isc.A.clearSelection=function isc_GridBody_clearSelection(){var _1=this.selectionManager;this.Super("clearSelection",arguments);if(_1&&_1.isA("DependentCellSelection")){_1.destroy()}},isc.A.$968=function isc_GridBody__setSeparateCellSelection(_1,_2){this.clearSelection();if(_1){this.selectionManager=this.selection=_1.getDependentCellSelection(this.fields.length);this.selectionManager.$969(_2);this.observe(this.selectionManager,"selectionChanged",function(){this.$29s(this.selectionManager.changedCells)})}},isc.A.$29h=function isc_GridBody__updateCellStyle(_1,_2,_3,_4,_5,_6,_7,_8){this.invokeSuper(isc.GridBody,"$29h",_1,_2,_3,_4,_5,_6,_7,_8);var _9=this.grid;if(_9&&_9.getEditRow()==_2){var _10=_9.getFieldName(_9.getFieldNumFromLocal(_3,this)),_11=_9.getEditForm(),_12=_11?_11.getItem(_10):null;if(_12&&_12.gridCellStyleChanged){if(_5==null)_5=this.getCellStyle(_1,_2,_3);_12.gridCellStyleChanged(_1,_2,_3,_5)}}},isc.A.getHoverTarget=function isc_GridBody_getHoverTarget(){return this.grid},isc.A.keyPress=function isc_GridBody_keyPress(_1,_2){return this.grid.bodyKeyPress(_1,_2)},isc.A.getFocusRow=function isc_GridBody_getFocusRow(){return this.grid.getFocusRow()},isc.A.getFocusCol=function isc_GridBody_getFocusCol(){var _1=this.grid.$32b();return this.grid.getLocalFieldNum(_1)},isc.A.$170m=function isc_GridBody__restoreFocusForClickMaskHide(){this.$170n=true;this.focus();delete this.$170n},isc.A.$lf=function isc_GridBody__focusChanged(_1){var _2=this.Super("$lf",arguments);var _3=isc.EH.lastEvent;if(_3.target==this&&(_3.eventType==isc.EH.MOUSE_DOWN||_3.eventType==isc.EH.MOUSE_UP||_3.eventType==isc.EH.CLICK||_3.eventType==isc.EH.DOUBLE_CLICK))
{if(this.grid.$30c){delete this.grid.$30c}
return _2}
var _4,_5=this.grid;if(_1&&_5.canEdit!=false){if(_5.editOnFocus&&_5.canEdit!=false&&_5.getEditRow()==null)
{if(this.logIsInfoEnabled("gridEdit")){this.logInfo("Editing on focus: eventType: "+_3.eventType+", lastTarget "+_3.target,"gridEdit")}
if(_5.$30c){delete _5.$30c}else{var _4=_5.getFocusCell();var _6=isc.isAn.Array(_4)&&_4[0]!=null&&_4[0]>=0&&_4[1]!=null&&_4[1]>=0;if(_6&&!_5.canEditCell(_4[0],_4[1])){_4=_5.findNextEditCell(_4[0],_4[1],true,true,false,false,true,false);if(_4==null)_6=false}
if(!_6){_4=_5.findNextEditCell(0,0,true,true)}
if(_4!=null){_5.handleEditCellEvent(_4[0],_4[1],isc.ListGrid.FOCUS)}}}}
var _7=_5.hiliteRowOnFocus;if(_7==null)_7=_5.showRollOver;if(isc.screenReader){if(_1){if(_4==null){var _8=this.getNativeFocusRow();this.$86a(_8,this.getNativeFocusColumn())}}else{_5.clearLastHilite()}}else if(_7){if(_1){if(_4==null&&!this.$170n){if(_5.canSelectCells){_5.$24s(0,1,true,true,"focus")}else{_5.$318(1,true,"focus",true)}}}else{var _9=isc.EH.mouseDownTarget(),_10=isc.EH.lastEvent.eventType;if(_10!=isc.EH.MOUSE_DOWN||!this.contains(_9)){_5.clearLastHilite()}}}
return _2},isc.A.$86a=function isc_GridBody__putNativeFocusInRow(_1,_2,_3){var _4=this.grid;if(_4){var _5=_2==null?null:_4.getFieldNumFromLocal(_2,this);if(_4.hiliteOnNativeRowFocus&&!_3&&!this.$315s)
{_4.$88(_1,_5)}
if(!_3){_4.$237k=this;_4.keyboardClickField=_5}}
return this.Super("$86a",arguments)},isc.A.updateRowSelection=function isc_GridBody_updateRowSelection(_1){var _2=this.grid;if(!_2)return;if(_2.showSelectionCanvas||_2.showSelectionUnderCanvas){_2.updateSelectionCanvas()}
if(_2.showSelectedRollOverCanvas||_2.showSelectedRollUnderCanvas){_2.updateRollOverCanvas(this.lastOverRow,this.lastOverCol)}
if(_2.$67j){return}
this.invokeSuper(isc.GridBody,"updateRowSelection",_1);if(isc.Canvas.ariaEnabled()&&_2.selectionManager){this.setRowAriaState(_1,"selected",_2.selectionManager.isSelected(_2.getRecord(_1),_1,true))}
var _3=_2.getCellsToRefreshOnSelectionChange(_1);if(_3&&_3.length>0){for(var i=0;i<_3.length;i++){_2.refreshCell(_3[i][0],_3[i][1])}}
if(_2.getCurrentCheckboxField()!=null){_2.updateCheckboxHeaderState()}},isc.A.getCellStyle=function isc_GridBody_getCellStyle(_1,_2,_3){var _4=this.Super("getCellStyle",arguments);if(_4.startsWith("groupNode")||_4.startsWith("gridSummaryCell"))return _4;if(this.grid.styledRowEnds){if(_3==0){_4+=" "+this.grid.firstCellStyle}else if(_3==this.grid.fields.length-1){_4+=" "+this.grid.lastCellStyle}}
return _4},isc.A.markForRowSelectionRefresh=function isc_GridBody_markForRowSelectionRefresh(){var _1=this.grid;if(!_1)return;if(_1.showSelectionCanvas||_1.showSelectionUnderCanvas){_1.fireOnPause("updateSelectionCanvasFromRowRefresh","updateSelectionCanvas")}
if(_1.getCurrentCheckboxField()!=null){_1.fireOnPause("updateCheckboxHeaderFromRowRefresh","updateCheckboxHeaderState")}
if(_1.showSelectedRollOverCanvas||_1.showSelectedRollUnderCanvas){_1.fireOnPause("updateSelectionRollOverCanvasFromRowRefresh",{target:_1,methodName:"updateRollOverCanvas",args:[this.lastOverRow,this.lastOverCol]})}
if(_1.$67j){return}
this.invokeSuper(isc.GridBody,"markForRowSelectionRefresh")},isc.A.$29s=function isc_GridBody__cellSelectionChanged(_1,_2,_3,_4){var _5=this.grid;if(_5!=null&&(_5.showSelectionCanvas||_5.showSelectionUnderCanvas))
{_5.updateSelectionCanvas()}
return this.invokeSuper(isc.GridBody,"$29s",_1,_2,_3,_4)},isc.A.destroy=function isc_GridBody_destroy(){var _1=this.grid;if(this==_1.$967)_1.$967=null;if(this==_1.$97a)_1.$97a=null;this.Super("destroy",arguments)},isc.A.shouldAnimateEmbeddedComponent=function isc_GridBody_shouldAnimateEmbeddedComponent(_1){var _2=this.grid;if(_1==_2.selectionCanvas)return _2.animateSelection;if(_1==_2.selectionUnderCanvas)return _2.animateSelectionUnder;if(_1==_2.rollOverCanvas)return _2.animateRollOver;if(_1==_2.rollUnderCanvas)return _2.animateRollUnder;return false},isc.A.$80d=function isc_GridBody__handleEmbeddedComponentResize(_1,_2,_3){this.Super("$80d",arguments);this.grid.$80d(this,_1,_2,_3)},isc.A.draw=function isc_GridBody_draw(_1,_2,_3,_4){var _5=this.grid;if(_5.getEditRow()!=null){var _6=_5.getEditRow(),_7=_5.getRecord(_6),_8=_5.getEditCol(),_9=_5.$286,_10=_5.getEditRowItems(_7,_6,_8,_5.editByCell),_11=_9.getItems();var _12=_11==null||_10.length!=_11.length;if(!_12){var _13=_11.getProperty("name");for(var i=0;i<_10.length;i++){if(!_13.contains(_10[i].name)){_12=true;break}}}
if(_12){this.logDebug("calling setItems on form from body draw","gridEdit");_9.setItems(_10)}else{this.logDebug("Skipping setItems() on form from body draw","gridEdit")}
_9.$10u=true}
delete this.$316;if(_5.$30a&&_5.$2028==null){_5.$2026()}
this.invokeSuper(isc.GridBody,"draw",_1,_2,_3,_4);if(_5.$286){_5.$30b(null,null,this)}
_5.updateEditRow(_5.getEditRow());if(_5.$30d!=null)_5.$181x();this.grid.updateRecordComponents();if(!this.$112u)this.grid.updateExpansionComponents();if(isc.screenReader){this.$86a(this.getNativeFocusRow(),this.getNativeFocusColumn(),true)}
this.grid.$210q()},isc.A.layoutChildren=function isc_GridBody_layoutChildren(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"layoutChildren",_1,_2,_3,_4);if(!this.isDrawn()||(this.grid.frozenFields&&!this.grid.bodyLayout.isDrawn())){return}
var _5=isc.startsWith(_1,"scrolling state changed"),_6=isc.startsWith(_1,"introducing scrolling");if(_5||_6){if(this.isRTL()&&!this.$28c){this.$29d()}
if(this.$28i==null){this.grid.layoutChildren("body scroll changed");delete this.$30e}else{this.$30e=true}}},isc.A.$28p=function isc_GridBody__rowAnimationComplete(){this.Super("$28p",arguments);if(this.$30e){this.grid.layoutChildren("body scroll changed during animation");delete this.$30e}},isc.A.handleMoved=function isc_GridBody_handleMoved(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"handleMoved",_1,_2,_3,_4);this.$173a()},isc.A.handleParentMoved=function isc_GridBody_handleParentMoved(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"handleParentMoved",_1,_2,_3,_4);this.$173a()},isc.A.$173a=function isc_GridBody__notifyEditItemsOnMoved(){var _1=this.grid;if(_1.$30a){var _2=_1.$286,_3=_2.getItems(),_4=[];for(var i=0;i<_3.length;i++){if(_3[i].isDrawn())_4.add(_3[i])}
_2.itemsMoved(_4)}},isc.A.setVisibility=function isc_GridBody_setVisibility(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"setVisibility",_1,_2,_3,_4);var _5=this.grid;if(_5.$30a)_5.$286.itemsVisibilityChanged();if(_5.fieldPickerWindow&&_1=="hidden")_5.fieldPickerWindow.hide()},isc.A.parentVisibilityChanged=function isc_GridBody_parentVisibilityChanged(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"parentVisibilityChanged",_1,_2,_3,_4);var _5=this.grid;if(_5.$30a)_5.$286.itemsVisibilityChanged()},isc.A.clear=function isc_GridBody_clear(){var _1=this.grid;_1.$69l();var _2=_1.getEditForm();if(_2!=null){var _3=_2.getItems();for(var i=0;i<_3.length;i++){if(_3[i]&&_3[i].isDrawn()){_3[i].clearing(false)}}}
delete this.$316;this.Super("clear",arguments);if(_1.$30a){_1.$30b(null,null,this);_1.$286.itemsVisibilityChanged()}},isc.A.zIndexChanged=function isc_GridBody_zIndexChanged(){this.Super("zIndexChanged",arguments);var _1=this.grid;if(_1&&_1.$30a)_1.$286.itemsZIndexChanged()},isc.A.parentZIndexChanged=function isc_GridBody_parentZIndexChanged(_1,_2,_3,_4){this.invokeSuper(isc.GridBody,"zIndexChanged",_1,_2,_3,_4);var _5=this.grid;if(_5.$30a)_5.$286.itemsZIndexChanged()},isc.A.redrawFormItem=function isc_GridBody_redrawFormItem(_1,_2){var _3=this.grid;if(_3&&(_1.form==_3.$286)&&!(_3.$268t&&this.isDirty()))
{var _4=_3.getEditRow(),_5=_3.getColNum(_1.getFieldName());if(_3.getEditCol()==_5){_3.storeUpdatedEditorValue()}
if(_4>=0&&_5>=0)_3.refreshCell(_4,_5,false,true)}else{return this.markForRedraw("Form Item Redraw "+(_2?_2:isc.emptyString))}},isc.A.sizeFormItem=function isc_GridBody_sizeFormItem(_1){var _2=this.grid;var _3=_1.width,_4;if(isc.isA.String(_3)){var _5=_2.getEditFormItemFieldWidths(_1.record),_6=_5[_2.getFieldNum(_1.getFieldName())];if(_3=="*"){_4=_6}else if(_3.charAt(_3.length-1)=="%"){var _7=parseInt(_3);if(isc.isA.Number(_7)){_4=Math.floor(_6*(_7/100))}}}
var _8=_1.height,_9;if(isc.isA.String(_8)){var _10=_2.cellHeight;if(_3=="*"){_9=_10}else if(_8.charAt(_8.length-1)=="%"){var _11=parseInt(_8);if(isc.isA.Number(_11)){_9=Math.floor(_10*(_11/100))}}}
if(_9!=null||_4!=null){_1.$8t=[_4==null?_1.width:_4,_9==null?_1.height:_9]}},isc.A.getAlternateColumnOffset=function isc_GridBody_getAlternateColumnOffset(_1,_2,_3){var _4=this.grid;if(_4!=null&&(this==_4.body)&&_4.frozenFields!=null){return _4.frozenFields.length}
return 0},isc.A.startRowAnimation=function isc_GridBody_startRowAnimation(_1,_2,_3,_4,_5,_6,_7,_8,_9){this.finishRowAnimation();var _10=(_9&&(this.$34y!=null)),_11=this.grid;if(_10){var _12=_11.$34v;_11.$34v=true;_11.data.openFolder(this.$34y);_11.$34v=_12}
this.Super("startRowAnimation",arguments);if(_10){var _12=_11.$34v;_11.$34v=true;_11.data.closeFolder(this.$34y);_11.$34v=_12}
delete this.$34y});isc.B._maxIndex=isc.C+114;isc.A=isc.ListGrid;isc.A.CORNER="corner";isc.A.FIELD="field";isc.A.BEFORE="before";isc.A.AFTER="after";isc.A.OVER="over";isc.A.BETWEEN="between";isc.A.BODY="body";isc.A.CLICK_OUTSIDE="click_outside";isc.A.CLICK="click";isc.A.DOUBLE_CLICK="doubleClick";isc.A.ENTER_KEYPRESS="enter";isc.A.ESCAPE_KEYPRESS="escape";isc.A.UP_ARROW_KEYPRESS="arrow_up";isc.A.DOWN_ARROW_KEYPRESS="arrow_down";isc.A.LEFT_ARROW_KEYPRESS="arrow_left";isc.A.RIGHT_ARROW_KEYPRESS="arrow_right";isc.A.TAB_KEYPRESS="tab";isc.A.SHIFT_TAB_KEYPRESS="shift_tab";isc.A.EDIT_FIELD_CHANGE="field_change";isc.A.EDIT_ROW_CHANGE="row_change";isc.A.PROGRAMMATIC="programmatic";isc.A.FOCUS="focus";isc.A.GROUP_BY="groupBy";isc.A.REGROUP="regroup";isc.A.INCREMENTAL="incremental";isc.A.$295=["selection","selectionType","canSelectCells","canDragSelect","selectionManager","canSelectOnRightMouse","recordCanSelectProperty","useNativeTouchScrolling","screenReaderNavigateByCell","canDrag","canAcceptDrop","canDrop","autoFit","wrapCells","preserveWhitespace","cellSpacing","cellPadding","cellHeight","enforceVClipping","autoFitData","autoFitMaxRecords","autoFitMaxWidth","autoFitMaxColumns","autoFitMaxHeight","autoFitExtraRecords","allowRowSpanning","showAllColumns","drawAllMaxCells","drawAheadRatio","quickDrawAheadRatio","instantScrollTrackRedraw","scrollRedrawDelay","dragScrollRedrawDelay","scrollWheelRedrawDelay","touchScrollRedrawDelay","printMaxRows","animateRowsMaxTime","fastCellUpdates","showRollOver","useCellRollOvers","canHover","showHover","showHoverOnDisabledCells","showClippedValuesOnHover","hoverDelay","hoverWidth","hoverHeight","hoverAlign","hoverVAlign","hoverStyle","hoverOpacity","hoverMoveWithMouse","hoverAutoFitWidth","hoverAutoFitMaxWidth","hoverByCell","keepHoverActive","cellHoverOutset","showEmptyMessage","emptyMessageStyle","emptyMessageTableStyle","showOfflineMessage","offlineMessageStyle","useCellRecords","singleCellValueProperty","isSeparatorProperty","accessKey","canFocus","_useNativeTabIndex","tableStyle","baseStyle","recordCustomStyleProperty","showSelectedStyle","preserveFocusStylingOnMouseOut","useRowSpanStyling","rowSpanSelectionMode","showFocusOutline"];isc.A.$296=["getCellStyleName","getCellStyleIndex","$1159","getRowTop","getRowPageTop","getRowSize","getDrawnRowHeight","getCellStartRow","getCellRowSpan","getVisibleRows","getDrawnRows"];isc.A.$297=["getTotalRows","isEmpty","cellIsEnabled","willAcceptDrop","scrolled","getTableElementId","getRowElementId","getCellElementId","shouldFixRowHeight","getEmptyMessage","getCanHover","stopHover","updateEmbeddedComponentZIndex"];isc.A.$94g=null;isc.A=isc.ListGrid;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.makeBodyMethods=function isc_c_ListGrid_makeBodyMethods(_1){var _2=this.$cf;if(_2==null){_2=this.$cf=[,"this.grid.$81e = this;var returnVal = this.grid.",,"(",,");this.grid.$81e=null;return returnVal;"]}
var _3={};for(var i=0;i<_1.length;i++){var _5=_1[i],_6=isc.GridRenderer.getArgString(_5),_7=(_5=="cellIsEnabled");_2[0]="var methodName = '"+_5+"';\n";if(isc.contains(_6,"colNum")){_2[0]+="if (this.fields[colNum]) colNum = this.fields[colNum].masterIndex;"}else if(isc.isAn.emptyString(_6)){_6="body";_2[0]+="body = this;"}
if(_7){var _8="if (record === undefined) record = this.grid.getCellRecord("+_6+");";_2[0]+=_8}
_2[2]=_5;_2[4]=(_7?"record,"+_6:_6);var _9=_2.join(isc.emptyString);var _10=_3[_5]=isc.$aq((_7?_6+",record":_6),_9);_10.$118m=true}
return _3},isc.A.classInit=function isc_c_ListGrid_classInit(){this.addMethods(isc.ClassFactory.makePassthroughMethods(this.$296,"body"));var _1={};var _2=isc.getKeys(isc.GridRenderer.$294),_1=isc.ListGrid.makeBodyMethods(_2);isc.addProperties(_1,isc.ListGrid.makeBodyMethods(this.$297));this.$30f=_1;var _3={},_4=[,"var $81e = this.$81e || this.body; if ($81e == null) {return;}if($81e.__orig_",,")return $81e.__orig_",,"(",,")"],_5="__orig_",_6=isc.GridRenderer.getPrototype();for(var i=0;i<_2.length;i++){var _8=_2[i],_9=isc.GridRenderer.getArgString(_8);if(isc.ListGrid.getInstanceProperty(_8)==null){if(isc.contains(_9,"colNum")){_4[0]="if (colNum != null && colNum >= 0) colNum = this.getLocalFieldNum(colNum);"}else{_4[0]=null}
_4[2]=_4[4]=_8;_4[6]=_9
_3[_8]=isc.$aq(_9,_4.join(isc.emptyString))}
_6[_5+_8]=_6[_8]}
this.$30g=_3;this.addMethods(_3)},isc.A.$97b=function isc_c_ListGrid__getCoordinateList(_1,_2){var _3=[];for(var _4 in _1){if(_1.hasOwnProperty(_4)){_3.add(parseInt(_4))}}
if(_2){_3.sort(function(_5,_6){return _5-_6})}
return _3});isc.B._maxIndex=isc.C+3;isc.A=isc.ListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.styleName="listGrid";isc.A.useCellRecords=false;isc.A.recordEnabledProperty="enabled";isc.A.canExpandRecordProperty="canExpand";isc.A.recordCanRemoveProperty="_canRemove";isc.A.animateFolders=true;isc.A.animateFolderTime=100;isc.A.animateFolderSpeed=3000;isc.A.animateRowsMaxTime=1000;isc.A.autoFetchDisplayMap=true;isc.A.warnOnUnmappedValueFieldChange=true;isc.A.showDetailFields=true;isc.A.showEllipsisWhenClipped=true;isc.A.savedSearchItemDefaults={_constructor:"SavedSearchItem"};isc.A.saveDefaultSearch=true;isc.A.savedSearchStoredState=null;isc.A.noSavedSearchesText="[None]";isc.A.savedSearchText="Saved views";isc.A.newSearchText="Save View...";isc.A.savedSearchAdminSeparatorDefaults={isSeparator:true};isc.A.groupStartOpen="first";isc.A.canCollapseGroup=true;isc.A.collapseGroupOnRowClick=true;isc.A.showGroupTitleColumn=true;isc.A.groupTitleColumnDefaults={canEdit:false,canFilter:false,canHide:false,canReorder:false,showDefaultContextMenu:false,autoFreeze:true,sortNormalizer:function(_1,_2,_3){return _1.groupTitle},autoFitWidth:true,autoFitWidthApproach:"value",title:"&nbsp;"};isc.A.groupTitleColumnName="groupTitle";isc.A.showGroupSummaryInHeader=false;isc.A.showCollapsedGroupSummary=false;isc.A.groupNodeStyle="groupNode";isc.A.groupNodeBaseStyle=null;isc.A.groupIcon="[SKINIMG]/TreeGrid/opener.gif";isc.A.groupIconSize=16;isc.A.groupIndentSize=20;isc.A.groupLeadingIndent=10;isc.A.canGroupBy=true;isc.A.groupByMaxRecords=1000;isc.A.disabledGroupByPrompt="Grouping is not supported for datasets of this size";isc.A.groupByMaxRecordsExceededMessage="Grouping has been disabled. This data set is too large to apply grouping efficiently.";isc.A.groupByAsyncThreshold=50;isc.A.asynchGroupingPrompt="${loadingImage}&nbsp;Grouping data...";isc.A.nullGroupTitle="-none-";isc.A.valueIconSize=16;isc.A.valueIconLeftPadding=2;isc.A.valueIconRightPadding=2;isc.A.imageSize=16;isc.A.headerSpanVAlign="center";isc.A.showTreeColumnPicker=true;isc.A.reverseRTLAlign=true;isc.A.useMultiSelectForFilterValueMaps=true;isc.A.fetchDelay=300;isc.A.explicitFetchDelay=0;isc.A.uniqueMatch=true;isc.A.overflow=isc.Canvas.HIDDEN;isc.A.backgroundColor="white";isc.A.defaultWidth=200;isc.A.recordSummaryAttributePrefix="_";isc.A.drawAllMaxCells=250;isc.A.drawAheadRatio=isc.Browser.useHighPerformanceGridTimings?2.0:1.3;isc.A.quickDrawAheadRatio=isc.Browser.useHighPerformanceGridTimings?2.0:1.0;isc.A.scrollRedrawDelay=isc.Browser.useHighPerformanceGridTimings?0:75;isc.A.dragScrollRedrawDelay=75;isc.A.scrollWheelRedrawDelay=isc.Browser.useHighPerformanceGridTimings?0:250;isc.A.touchScrollRedrawDelay=isc.Browser.useHighPerformanceGridTimings?0:300;isc.A.dataFetchDelay=isc.Browser.useHighPerformanceGridTimings?1:300;isc.A.body=null;isc.A.bodyConstructor="GridBody";isc.A.bodyOverflow=isc.Canvas.AUTO;isc.A.bodyBackgroundColor="white";isc.A.allowMismatchedHeaderBodyBorder=true;isc.A.emptyCellValue="&nbsp;";isc.A.pendingAsyncCellValue="&nbsp;";isc.A.asyncErrorCellValue="!";isc.A.asyncMissingCellValue="-";isc.A.minimumCellHeight=20;isc.A.cellHeight=20;isc.A.normalCellHeight=20;isc.A.fixedRecordHeights=true;isc.A.fixedFieldWidths=true;isc.A.matchFrozenRowHeightsApproach="rowHeightSpacerHTML";isc.A.autoFitMaxRecords=50;isc.A.autoFitMaxColumns=50;isc.A.canAutoFitFields=true;isc.A.headerAutoFitEvent="doubleClick";isc.A.autoSizeHeaderSpans=false;isc.A.autoFitFieldsFillViewport=true;isc.A.autoFitWidthApproach="value";isc.A.includeGridSummaryInAutoFitWidth=true;isc.A.autoFitIconFields="title";isc.A.autoFitDateFields="value";isc.A.defaultFieldWidthScaleFactors={Date:6,EditableDate:4,DateTime:9,EditableDateTime:6,Time:6};isc.A.defaultDateFieldWidth=60;isc.A.defaultEditableDateFieldWidth=94;isc.A.defaultDateTimeFieldWidth=92;isc.A.defaultEditableDateTimeFieldWidth=130;isc.A.autoFitTimeFields="value";isc.A.defaultTimeFieldWidth=65;isc.A.leaveScrollbarGap=true;isc.A.resizeFieldsForScrollbar=true;isc.A.showClippedValuesOnHover=null;isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.timeFormatter="toShortPaddedTime";isc.A.$30h=["<a href='",,"' class='linkText' target='",,"' onclick='if(window.",,") return ",,".$30i(event,",,",",,");'>",,"</a>"];isc.A.$30j="\\'";isc.A.$30k="_blank";isc.A.linkTextProperty="linkText";isc.A.fastCellUpdates=isc.Browser.isIE&&!isc.Browser.isIE9;isc.A.normalBaseStyle="cell";isc.A.tallBaseStyle="cell";isc.A.editFailedBaseStyle=null;isc.A.editFailedCSSText="color:red;border:1px solid red;";isc.A.editPendingBaseStyle=null;isc.A.editPendingCSSText="color:#0066CC;";isc.A.editPendingMarkerStyle=null;isc.A.recordCustomStyleProperty="customStyle";isc.A.recordBaseStyleProperty="_baseStyle";isc.A.shrinkForFreeze=false;isc.A.alternateRecordSuffix="Dark";isc.A.alternateRecordFrequency=1;isc.A.alternateFieldSuffix="AltCol";isc.A.alternateFieldFrequency=1;isc.A.recordCSSTextProperty="cssText";isc.A.showHilitesInGroupSummary=true;isc.A.hiliteReplaceValueFieldTitle="Replace value with";isc.A.hiliteHTMLAfterFormat=true;isc.A.showSelectedStyle=true;isc.A.generateClickOnSpace=true;isc.A.generateDoubleClickOnEnter=true;isc.A.arrowKeyAction=null;isc.A.recordComponentPoolingMode="viewport";isc.A.poolComponentsPerColumn=true;isc.A.recordShowRollOverProperty="showRollOver";isc.A.preserveFocusStylingOnMouseOut=true;isc.A.animateRollOver=false;isc.A.animateRollUnder=false;isc.A.backgroundComponentDefaults={snapTo:"TL",autoDraw:false,opacity:"50%"};isc.A.showHover=true;isc.A.showClippedHeaderTitlesOnHover=true;isc.A.cellHoverOutset=5;isc.A.hoverStyle="gridHover";isc.A.selectionAppearance="rowStyle";isc.A.selectionType=null;isc.A.reselectOnUpdate=true;isc.A.reselectOnUpdateNotifications="selectionChanged";isc.A.recordCanSelectProperty="canSelect";isc.A.screenReaderNavigateByCell=false;isc.A.navigateOnTab=null;isc.A.tabKeyAction="select";isc.A.useCopyPasteShortcuts=null;isc.A.copyEmptyCells=true;isc.A.animateSelection=false;isc.A.animateSelectionUnder=false;isc.A.showEmptyMessage=true;isc.A.emptyMessage="No items to show.";isc.A.emptyMessageStyle="emptyMessage";isc.A.filterButtonPrompt="Filter";isc.A.loadingDataMessage="${loadingImage}&nbsp;Loading data...";isc.A.loadingDataMessageStyle="loadingDataMessage";isc.A.loadingMessage="&nbsp;";isc.A.singleCellValueProperty="singleCellValue";isc.A.isSeparatorProperty="isSeparator";isc.A.canShowFilterEditor=true;isc.A.showFilterEditorTitle="Show Filter Row";isc.A.hideFilterEditorTitle="Hide Filter Row";isc.A.filterEditorDefaults={shouldPrint:false,autoPopulateData:false,headerRadius:null};isc.A.filterEditorHeight=22;isc.A.clearCriteriaOnFilterEditorHide=true;isc.A.autoFetchTextMatchStyle="substring";isc.A.filterUsingText="Filter using";isc.A.defaultFilterOperatorSuffix="(default)";isc.A.canEditNew=false;isc.A.recordEditProperty="_canEdit";isc.A.editValuesTestedProperty="$30l";isc.A.autoValidate=true;isc.A.warnOnRemoval=false;isc.A.warnOnRemovalMessage="Are you sure you want to delete this record?";isc.A.recordRemovedProperty="$899";isc.A.removedCSSText="text-decoration:line-through;";isc.A.removeIcon="[SKIN]/actions/remove.png";isc.A.unremoveIcon="[SKIN]/actions/undo.png";isc.A.removeIconSize=16;isc.A.animateRemoveRecord=true;isc.A.animateRemoveTime=100;isc.A.animateRemoveSpeed=200;isc.A.removeFieldTitle=isc.nbsp;isc.A.removeFieldDefaults={type:"icon",width:24,showDefaultContextMenu:false,selectCellTextOnClick:false,canEdit:false,canHide:false,canSort:false,canGroupBy:false,canFilter:false,showTitle:false,canExport:false,autoFitWidth:false,canDragResize:false,canAutoFitWidth:false,ignoreKeyboardClicks:true,showGridSummary:false,showGroupSummary:false,summaryValue:"&nbsp;",treeField:false,featureField:true};isc.A.filterByCell=true;isc.A.autoSaveEdits=true;isc.A.showErrorIcons=true;isc.A.errorIconHeight=16;isc.A.errorIconWidth=16;isc.A.errorIconSrc="[SKIN]/validation_error_icon.png";isc.A.cancelEditingConfirmationMessage="Cancelling this edit will discard unsaved changes for this record. Continue?";isc.A.confirmDiscardEdits=true;isc.A.autoConfirmSaveEdits=false;isc.A.confirmDiscardEditsMessage="This action will discard all unsaved changes for this list.";isc.A.discardEditsSaveButtonTitle="Save";isc.A.newRecordRowMessage="-- Add New Row --";isc.A.enterKeyEditAction="done";isc.A.escapeKeyEditAction="cancel";isc.A.editEvent=isc.EH.DOUBLE_CLICK;isc.A.editOnF2Keypress=true;isc.A.selectOnEdit=true;isc.A.editSelectionType="single";isc.A.enumCriteriaAsInitialValues=true;isc.A.autoSelectEditors=true;isc.A.editFormDefaults={canSelectText:true,autoDraw:false,implicitSave:false,implicitSaveOnBlur:false,canTabToIcons:false,errorOrientation:"left",showErrorText:false,showErrorStyle:false,itemKeyPress:function(_1,_2,_3){return this.grid.editorKeyPress(_1,_2,_3)}};isc.A.longTextEditorThreshold=255;isc.A.longTextEditorType="PopUpTextAreaItem";isc.A.canTabToSorter=false;isc.A.headerHeight=22;isc.A.minFieldWidth=15;isc.A.showHeader=true;isc.A.headerBackgroundColor="#CCCCCC";isc.A.showHeaderShadow=false;isc.A.headerShadowVOffset=1;isc.A.headerShadowHOffset=0;isc.A.headerShadowSofness=1;isc.A.headerDefaults={instantRelayout:true,enforcePolicy:false,createButtonsOnInit:false,itemClick:function(_1,_2){this.Super("itemClick",arguments);this.grid.$666(_2,this)},itemDoubleClick:function(_1,_2){this.Super("itemDoubleClick",arguments);this.grid.$774(_2,this)},showContextMenu:function(){return this.grid.headerBarContextClick(this)},$203u:function(_1,_2){var _3=this.grid,_4=_3.spanMap;if(!_4)return false;var _5=_3.fields,_6=_5[_1];if(!_6)return false;var _7=_2<_1;for(var _8,_9=_4[_6.name];_9!=null;_8=_9,_9=_9.parentSpan)
{if(_9.canReorder==false)return false;var _5=_9.fields;if(_5){var _10=_3.$2030();_5=_5.filter(function(_12){return _10[_12]});if(_6.name!=(_7?_5.last():_5.first())){return false}}else{var _11=_9.spans.filter(function(_9){return _9.liveObject});if(_8!=(_7?_11.last():_11.first())){return false}}}
return true},backgroundRepeat:isc.Canvas.NO_REPEAT,shouldPrint:false,$6d:function(_1,_2){var _3=this.Super("$6d",arguments);if(!_3&&this.grid&&this.grid.frozenFields){if(_1==null)_1=true;return this.grid.$237v(this,_1)}
return _3}};isc.A.headerButtonDefaults={clipTitle:true,syntheticShiftFocus:function(){var _1=this.parentElement?this.parentElement.grid:null;if(_1&&_1.skipHeaderButtonFocus(this))return false;return this.Super("syntheticShiftFocus",arguments)},focusChanged:function(){var _1=this.parentElement?this.parentElement.grid:null;if(_1){_1.headerButtonFocusChanged(this,this.hasFocus)}
if(this.hasFocus&&this.parentElement&&this.parentElement.$6b){this.parentElement.$6b(this)}},getCurrentCursor:function(){var _1=this.parentElement?this.parentElement.grid:null;var _2=isc.Canvas.DEFAULT;if(_1&&this.masterIndex!=null){var _3=_1.getField(this.masterIndex),_4=_1.$66c(_3)!=false;if(_4)_2=isc.Canvas.HAND}else{if(this.isSorterButton){if(!_1&&isc.isA.ListGrid(this.parentElement))_1=this.parentElement;if(_1){var _4=_1.$66c(_1.$60z())!=false;if(_4)_2=isc.Canvas.HAND}}else{_2=this.getClass().getPrototype().cursor}}
this.cursor=_2;return this.Super("getCurrentCursor",arguments)},$s1:function(){if(this.$199b!=null)return this.$199b;var _1,_2,_3=isc.px;if(this.isDrawn()){var _4=this.$145n();if(_4){_1=isc.Element.getTopPaddingSize(_4);_2=isc.Element.getBottomPaddingSize(_4)}}
var _5=this.getStateName();if(_5){if(!isc.isA.Number(_1))_1=isc.Element.$tt(_5);if(!isc.isA.Number(_2))_2=isc.Element.$tu(_5)}
if(!isc.isA.Number(_1))_1=0;if(!isc.isA.Number(_2))_2=0;return this.$199b=_1+_2},dragScrollType:"parentsOnly",minWidth:20,hoverDelay:500};isc.A.clipHeaderTitles=(!isc.Browser.isIE||(isc.Browser.version>6&&isc.Browser.isStrict)||isc.Browser.version>=10);isc.A.sorterConstructor=isc.Button;isc.A.sorterButtonTitle="corner menu";isc.A.sorterDefaults={_redrawWithParent:false,getTitle:function(){if(this.creator.loadingData&&!this.creator.isEmpty()){return isc.Canvas.imgHTML(isc.Canvas.loadingImageSrc)}else{return this.creator.getSortArrowImage()}},click:function(){return this.creator.$91i()},showContextMenu:function(){return this.creator.$91j()},isSorterButton:true,allowFilterOperators:false,align:"center"};isc.A.sortBinaryByFileName=true;isc.A.canSort=true;isc.A.canUnsort=false;isc.A.invalidateCacheOnUnsort=false;isc.A.selectHeaderOnSort=true;isc.A.sortDirection="ascending";isc.A.sortArrowMenuButtonSpaceOffset=7;isc.A.sortNumeralMenuButtonSpaceOffset=9;isc.A.canPickFields=true;isc.A.canPickOmittedFields=false;isc.A.openRecordEditorContextMenuItemTitle="Edit";isc.A.dismissEmbeddedComponentContextMenuItemTitle="Dismiss";isc.A.deleteRecordContextMenuItemTitle="Delete";isc.A.canOpenRecordDetailGrid=true;isc.A.canOpenRecordEditor=true;isc.A.recordEditorSaveButtonTitle="Save";isc.A.recordEditorCancelButtonTitle="Cancel";isc.A.leaveHeaderMenuButtonSpace=null;isc.A.headerMenuButtonIcon="[SKIN]/ListGrid/headerMenuButton_icon.gif";isc.A.headerMenuButtonIconWidth=7;isc.A.headerMenuButtonIconHeight=7;isc.A.headerMenuButtonWidth=16;isc.A.headerMenuButtonHeight="100%";isc.A.rotatedHeaderMenuButtonWidth="100%";isc.A.rotatedHeaderMenuButtonHeight=16;isc.A.canDragRecordsOut=false;isc.A.canReorderFields=true;isc.A.canResizeFields=true;isc.A.dragAppearance=isc.EH.TRACKER;isc.A.dragResizeAppearance=isc.EH.OUTLINE;isc.A.dragTrackerMode="title";isc.A.resizeFieldsInRealTime=((isc.Browser.isIE&&isc.Browser.isWin)||(isc.Browser.isFirefox&&isc.Browser.geckoVersion>=20080529)||(isc.Browser.isSafari&&isc.Browser.safariVersion>=500));isc.A.embeddedComponentIndent=25;isc.A.embeddedComponentMargin=0;isc.A.expansionIndent=null;isc.A.nestedGridDefaults={height:150};isc.A.skinImgDir="images/ListGrid/";isc.A.sortAscendingImage={src:"[SKIN]sort_ascending.gif",width:7,height:7};isc.A.sortDescendingImage={src:"[SKIN]sort_descending.gif",width:7,height:7};isc.A.trackerImage={src:"[SKIN]tracker.gif",width:16,height:16};isc.A.booleanTrueImage=null;isc.A.booleanFalseImage=null;isc.A.booleanPartialImage=null;isc.A.printBooleanTrueImage=null;isc.A.printBooleanFalseImage=null;isc.A.printBooleanPartialImage=null;isc.A.booleanImageWidth=16;isc.A.booleanImageHeight=16;isc.A.mozBodyOutlineColor="white";isc.A.mozBodyNoHeaderOutlineColor="red";isc.A.dragHandleFieldTitle=isc.nbsp;isc.A.dragHandleIcon="[SKIN]/actions/drag.png";isc.A.dragHandleIconSize=16;isc.A.dragHandleFieldDefaults={type:"icon",width:24,name:"$195w",isDragHandle:true,canEdit:false,canHide:false,canSort:false,canGroupBy:false,canFilter:false,showTitle:false,canExport:false,autoFitWidth:true,canAutoFitWidth:false,canDragResize:false,excludeFromState:true,showDefaultContextMenu:false,selectCellTextOnClick:false,ignoreKeyboardClicks:true,keyboardFiresRecordClick:false,showGroupSummary:false,showGridSummary:false,summaryValue:"&nbsp;",allowFilterOperators:false,autoFreeze:true,treeField:false,cellAlign:"center"};isc.A.rowNumberStyle="specialCol";isc.A.applyRowNumberStyle=true;isc.A.rowNumberStart=1;isc.A.rowNumberFieldDefaults={name:"$74y",excludeFromState:true,selectCellTextOnClick:false,canEdit:false,canFilter:false,canGroupBy:false,selectCellTextOnClick:false,canSort:false,canExport:false,canHide:false,canReorder:false,canDragResize:false,canHilite:false,canAutoFitWidth:false,showAlternateStyle:false,$74z:true,showDefaultContextMenu:false,keyboardFiresRecordClick:false,showGroupSummary:false,showGridSummary:false,summaryValue:"&nbsp;",allowFilterOperators:false,formatCellValue:function(_1,_2,_3,_4,_5){if(_5.isGrouped){if(_2==null||_2.$52e)return"&nbsp;";var _6=_5.getGroupedRecordIndex(_2);if(_6==-1)return null;return(_5.rowNumberStart+_6)}else{return this.rowNumberStart+_3}},autoFreeze:true,treeField:false,featureField:true};isc.A.$740=30;isc.A.rowRangeDisplayConstructor="RowRangeDisplay";isc.A.canRequestRowCount=false;isc.A.rowRangeDisplayStyle="full";isc.A.fullRowRangeDisplayValue="Showing ${rowRange} of ${rowCount} rows";isc.A.briefRowRangeDisplayValue="${rowRange} of ${rowCount}";isc.A.emptyRowRangeDisplayValue="&nbsp;";isc.A.rowRangeFormat="${startRow}-${endRow}";isc.A.unknownRowCountDisplayValue="many";isc.A.loadingRowCountDisplayIcon="[SKINIMG]/loading_horizontal.gif";isc.A.loadingRowCountDisplayIconWidth=16;isc.A.loadingRowCountDisplayIconHeight=16;isc.A.exactRowCountFormat="${rowCount}";isc.A.minimumRowCountFormat="${rowCount}+";isc.A.approximateRowCountFormat="~${rowCount}";isc.A.maximumRowCountFormat="-${rowCount}";isc.A.rangeRowCountFormat="${minRowCount}-${maxRowCount}";isc.A.expansionComponentPoolingMode="destroy";isc.A.destroyCustomExpansionComponents=false;isc.A.canExpandMultipleRecords=true;isc.A.maxExpandedRecordsPrompt="This grid is limited to ${count} simultaneously expanded records.  Please collapse some expanded records and retry.";isc.A.expansionFieldDefaults={name:"_expansionField",canEdit:false,canFilter:false,canGroupBy:false,canSort:false,canExport:false,canHide:false,canReorder:false,canDragResize:false,canHilite:false,$72w:true,showDefaultContextMenu:false,keyboardFiresRecordClick:false,cellAlign:"center",summaryValue:"&nbsp;",allowFilterOperators:false,cellMouseDown:function(_1,_2,_3,_4){if(!_1.canExpandRecords||_2.$52e)return;if(!_1.$811(_2,_1.getRecordIndex(_2)))return;if(_1.isExpanded(_2))_1.collapseRecord(_2);else _1.expandRecord(_2)},formatCellValue:function(_1,_2,_3,_4,_5){_2=_5.getCellRecord(_3,_4);if(_2==null||_2.$52e)return null;if(!_5.$811(_2,_3))return null;var _6=_5.isExpanded(_2)?_5.expansionFieldTrueImage:_5.expansionFieldFalseImage
var _7;if(_5.expansionFieldImageShowSelected&&_5.isSelected(_2,_3)){_7="selected"}
if(_5.expansionFieldImageShowRTL&&_5.isRTL()){_7=_7==null?"rtl":_7+"_rtl"}
if(_7!=null){_6=isc.Img.urlForState(_6,null,null,null,null,_7)}
return _5.getValueIconHTML(_6,_5.expansionFieldImageStyle,this,isc.Canvas.HAND)},autoFreeze:true,treeField:false,featureField:true};isc.A.expansionFieldTrueImage="[SKINIMG]/ListGrid/group_opened.gif";isc.A.expansionFieldFalseImage="[SKINIMG]/ListGrid/group_opening.gif";isc.A.expansionFieldImageShowRTL=false;isc.A.expansionFieldImageShowSelected=false;isc.A.expansionFieldExtraWidth=16;isc.A.$74a=0;isc.A.$92b="_expanded_";isc.A.$92c="_hasExpansionComponent_";isc.A.$92d="_embeddedComponents_";isc.A.$92e="_recordComponents_";isc.A.expansionDetailFieldDefaults={_constructor:isc.HTMLFlow,selectCellTextOnClick:false,autoDraw:false,width:"100%",height:"100%"};isc.A.expansionDetailsDefaults={_constructor:isc.DetailViewer,autoDraw:false,width:"100%",$276p:true};isc.A.expansionRelatedDefaults={_constructor:isc.ListGrid,autoDraw:false,width:"100%",warnOnReusedFields:false,autoFitData:"vertical",autoFitMaxRecords:4};isc.A.expansionEditorDefaults={_constructor:"DynamicForm",autoDraw:false,numCols:4,colWidths:["*","*","*","*"],width:"100%",saveOperationType:"update"};isc.A.expansionEditorSaveDialogPrompt="You have unsaved changes - do you want to save them now?";isc.A.expansionEditorCollapseOnSave=true;isc.A.showExpansionEditorSaveButton=true;isc.A.expansionEditorSaveButtonDefaults={_constructor:"IButton",autoFit:true,layoutAlign:"center",click:function(){if(!this.grid||!this.form||!this.record)return;var _1=this.grid,_2=_1.$917(this.record).find("isExpansionComponent",true);if(!_2)return;this.grid.saveAndCollapseRecord(this.form,_2,this.record,false,this.grid.expansionEditorCollapseOnSave)}};isc.A.expansionEditorSaveButtonTitle="Save";isc.A.expansionDetailRelatedDefaults={_constructor:isc.HLayout,autoDraw:false,width:"100%",height:"100%"};isc.A.expansionLayoutDefaults={_constructor:isc.VLayout,autoDraw:false,height:10,overflow:"visible"};isc.A.expansionScreenPlaceholderDefaults={_constructor:isc.Label,autoDraw:false,border:"1px solid red",contents:"expansionScreen<br>Placeholder",align:"center"};isc.A.recordDetailDSProperty="detailDS";isc.A.recordDropAppearance=isc.ListGrid.BETWEEN;isc.B.push(isc.A.shouldAnimateFolder=function isc_ListGrid_shouldAnimateFolder(_1){if(!this.animateFolders||!this.isDrawn())return false;if(this.autoFitData=="vertical"||this.autoFitData=="both")return false;var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
var _3;if(this.data.isFolder(_1)){_3=this.data.getOpenList(_2||_1,null,null,null,null,null,null,true)}
if(_3==null||_3.length<=1)return false;return(_3.length<=this.getAnimateFolderMaxRows())},isc.A.getAnimateFolderMaxRows=function isc_ListGrid_getAnimateFolderMaxRows(){var _1=this.animateFolderMaxRows;if(_1==null){var _2=this.body?this.body.$27x():[0,0];_1=Math.min(75,(_2[1]-_2[0])*3)}
return _1},isc.A.getGroupTitleField=function isc_ListGrid_getGroupTitleField(){return this.groupTitleField},isc.A.$197s=function isc_ListGrid__isGroupTitleField(_1){var _2=this.getGroupTitleField();return _2==null?_1.$84g:_1.name==_2},isc.A.showingGroupTitleColumn=function isc_ListGrid_showingGroupTitleColumn(){return(this.isGrouped&&this.showGroupSummary&&this.showGroupSummaryInHeader&&this.showGroupTitleColumn&&this.getGroupTitleField()==null)},isc.A.getGroupTitleColumn=function isc_ListGrid_getGroupTitleColumn(){var _1=this;var _2=isc.addProperties({$84g:true,getAutoFreezePosition:function(){return _1.getGroupTitleColumnPosition()}},this.groupTitleColumnDefaults,this.groupTitleColumnProperties);if(_2.name==null){_2.name=this.groupTitleColumnName}
return _2},isc.A.getGroupTitleColumnPosition=function isc_ListGrid_getGroupTitleColumnPosition(){if(!this.showingGroupTitleColumn())return-1;var _1=0;if(this.shouldShowRowNumberField())_1++;if(this.shouldShowDragHandleField())_1++;if(this.shouldShowCheckboxField())_1++;if(this.shouldShowExpansionField())_1++;return _1},isc.A.singleCellGroupHeaders=function isc_ListGrid_singleCellGroupHeaders(){return this.$141u(this.showGroupSummary,this.showGroupSummaryInHeader)},isc.A.$141u=function isc_ListGrid__singleCellGroupHeaders(_1,_2){if(this.getGroupTitleField()!=null)return false;if(_1&&_2)return false;return true},isc.A.$188x=function isc_ListGrid__getDefaultMinHeight(){var _1=this.cellHeight+this.getVMarginBorderPad();if(this.showHeader)_1+=this.headerHeight;if(this.showFilterEditor)_1+=this.filterEditorHeight;if(this.showEmptyMessage)_1+=this.$188v();if(this.showGridSummary)_1+=this.summaryRowHeight;return _1},isc.A.$199v=function isc_ListGrid__getRecordSummaryAttributeProperty(_1){var _2=isc.isA.String(_1)?_1:_1.name;return this.recordSummaryAttributePrefix+_2},isc.A.getAutoFitMaxWidth=function isc_ListGrid_getAutoFitMaxWidth(){var _1=this.autoFitMaxWidth;if(_1!=null){if(!isc.isA.Number(_1)){if(this.$185d==null){this.$185d=this.$185e(this.autoFitMaxWidth)}
_1=this.$185d}}
return _1},isc.A.$185e=function isc_ListGrid__convertPercentageWidth(_1){var _2,_3,_4;if(this.percentSource||(this.snapTo&&this.masterElement)){_2=this.percentSource||this.masterElement;_4=(this.percentBox==this.$520),_3=(_4?_2.getViewportWidth():_2.getVisibleWidth())}else{_2=this.parentElement;if(isc.Layout&&isc.isA.Layout(_2)&&_2.hasMember(this)){_3=!_2.vertical?_2.getTotalMemberSpace():_2.getBreadth()-_2.$2u()}else if(_2){_3=_2.getInnerWidth()}else{_3=isc.Page.getWidth()}}
return Math.round((parseInt(_1,10)/100)*_3)},isc.A.$qw=function isc_ListGrid__resolvePercentageSize(){if(this.autoFitMaxWidth!=null&&!isc.isA.Number(this.autoFitMaxWidth)){delete this.$185d;if(this.body){this.body.$t6("Resolving percentage autoFitMaxWidth")}}
this.Super("$qw",arguments)},isc.A.shouldSkipLineBreaks=function isc_ListGrid_shouldSkipLineBreaks(_1){var _2=_1.skipLineBreaks;return _2||_2!=false&&this.skipLineBreaks},isc.A.getBreadth=function isc_ListGrid_getBreadth(){return this.getInnerWidth()},isc.A.$30m=function isc_ListGrid__formatDateCellValue(_1,_2,_3,_4,_5,_6){if(isc.isA.Date(_1)){if(_3.$851(_2)){var _7=_3.$30o(_2);var _8=isc.SimpleType.inheritsFrom(_2.type,"time");return isc.Time.toTime(_1,_7,_8)}
var _9=_2&&isc.SimpleType.inheritsFrom(_2.type,"datetime"),_10=!_9&&isc.SimpleType.inheritsFrom(_2.type,"date"),_7=_3.$45i(_2);if(_9)return _1.toShortDateTime(_7,true);return _1.toShortDate(_7,!_10)}
return _1},isc.A.$851=function isc_ListGrid__formatAsTime(_1){if(_1==null)return false;if(_1.timeFormatter!=null&&_1.dateFormatter==null)return true;if(_1.dateFormatter!=null&&_1.timeFormatter==null)return false;return isc.SimpleType.inheritsFrom(_1.type,"time")},isc.A.$45i=function isc_ListGrid__getDateFormatter(_1){if(_1==null)return this.dateFormatter;if(_1.dateFormatter!=null)return _1.dateFormatter;if(_1.displayFormat!=null&&(isc.SimpleType.inheritsFrom(_1.type,"date")||isc.SimpleType.inheritsFrom(_1.type,"datetime")))
{return _1.displayFormat}
if(this.datetimeFormatter!=null&&isc.SimpleType.inheritsFrom(_1.type,"datetime")){return this.datetimeFormatter}
return this.dateFormatter},isc.A.$45j=function isc_ListGrid__getDateInputFormat(_1){var _2;if(_1)_2=_1.inputFormat
if(!_2)_2=this.dateInputFormat;return _2},isc.A.$30n=function isc_ListGrid__formatNumberCellValue(_1,_2,_3,_4,_5,_6){if(isc.isA.Number(_1)){if(isc.SimpleType.inheritsFrom(_2.type,"float")&&(_2.decimalPrecision!=null||_2.decimalPad!=null))
{return isc.Canvas.getFloatValueAsString(_1,_2.decimalPrecision,_2.decimalPad)}else if(_2.precision!=null){return isc.Canvas.getNumberValueAsString(_1,_2.precision,_2.type)}else{var _7=(_2.numberFormatter||_2.formatter||_3.numberFormatter);return _1.toFormattedString(_7)}}
return _1},isc.A.$30o=function isc_ListGrid__getTimeFormatter(_1){if(_1!=null){if(_1.timeFormatter!=null)return _1.timeFormatter;if(_1.displayFormat!=null&&isc.SimpleType.inheritsFrom(_1.type,"time")){return _1.displayFormat}}
return this.timeFormatter},isc.A.$30p=function isc_ListGrid__formatTimeCellValue(_1,_2,_3,_4,_5,_6){var _7=_1;if(isc.isA.String(_7)){_7=isc.Time.parseInput(_7,true)}
if(isc.isA.Date(_7)){if(!_3.$851(_2)){return _7.toShortDate(_3.$45i(_2),true)}
var _8=_3.$30o(_2);return isc.Time.toTime(_7,_8,true)}
return _1},isc.A.$30q=function isc_ListGrid__formatBinaryCellValue(_1,_2,_3,_4,_5,_6){if(isc.isA.String(_1))return _1;if(_4==null)return null;var _7=_2.name,_8=_3.getDataSource(),_9=(_8?_8.getFilenameField(_7):null)||_7+"_filename",_10=_4[_9],_1;if(_2.type=="imageFile"&&_2.showFileInline==true){var _11=_7+"$68c";if(!_4[_11]){var _12=isc.Canvas.getFieldImageDimensions(_2,_4),_13=_3.getDataSource().getFileURL(_4,_2.name);_12.width=_12.width||_3.imageSize;_12.height=_12.height||_3.imageSize;_1=_4[_11]=isc.Canvas.imgHTML(_13,_12.width,_12.height,null,null,isc.Canvas.$1625)}else
_1=_4[_11]}else{if(_2.showFileInline==true){this.logWarn("$30q(): Unsupported field-type for showFileInline: "+_2.type)}
if(!_2.filenameSuppressed&&(_10==null||isc.isAn.emptyString(_10))){return this.emptyCellValue}
var _14="'"+_3.getID()+".view",_15="'"+_3.getID()+".download",_16="";if(_2&&_2.name){_16="Cell("+_5+", \""+_2.name+"\")'"}else{_16="Row("+_5+")'"}
var _17=isc.Canvas.imgHTML({src:"[SKIN]actions/view.png",width:16,height:16,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,eventStuff:" onclick="+_14+_16});var _18=isc.Canvas.imgHTML({src:"[SKIN]actions/download.png",width:16,height:16,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,eventStuff:" onclick="+_15+_16});_1=_17+"&nbsp;"+_18+(_10?"&nbsp;"+_10:"")}
return _1},isc.A.$30r=function isc_ListGrid__formatLinkCellValue(_1,_2,_3,_4,_5,_6){if(_1==null||isc.is.emptyString(_1))return _1;var _7=_2.target?_2.target.replaceAll(_3.$ob,_3.$30j):_3.$30k;var _8=_2.linkTextProperty?_2.linkTextProperty:_3.linkTextProperty;var _9=(_4&&_4[_8])?_4[_8]:_2.linkText||_1;var _10=""+_1;if(_7=="javascript"){_10="javascript:void"}else{if(_2.linkURLPrefix)_10=_2.linkURLPrefix+_10;if(_2.linkURLSuffix)_10=_10+_2.linkURLSuffix;_10=_10.replaceAll(_3.$ob,_3.$30j)}
var _11=_3.$30h;_11[1]=_10;_11[3]=_7;var _12=_3.getID();_11[5]=_12;_11[7]=_12;_11[9]=_5;_11[11]=_6;_11[13]=_9;return _11.join(isc.emptyString)},isc.A.$30i=function isc_ListGrid__linkClicked(_1,_2,_3){var _4=this.getRecord(_2),_5=(this.destroyed||!this.isDrawn()||!this.isVisible()||isc.EH.targetIsMasked(this.body)||!this.recordIsEnabled(_4,_2,_3)),_6=this.getField(_3);if(_1.target=="javascript"||_6.target=="javascript"){_5=true;this.cellClick(_4,_2,_3)}
if(_5){if(!isc.Browser.isIE){_1.preventDefault()}
return false}
return true},isc.A.$30s=function isc_ListGrid__formatImageCellValue(_1,_2,_3,_4,_5,_6){if(_1==null||isc.isAn.emptyString(_1))return isc.emptyString;var _7=isc.Canvas.getFieldImageDimensions(_2,_4);_7.width=_7.width||_3.imageSize;_7.height=_7.height||_3.imageSize;var _8=_1,_9=_2.imageURLPrefix||_2.baseURL||_2.imgDir;if(_2.imageURLSuffix!=null)_8+=_2.imageURLSuffix;return isc.Canvas.imgHTML(_8,_7.width,_7.height,null,_2.extraStuff,_9,_2.activeAreaHTML,null,null,null,null,_2.eventStuff)},isc.A.$59e=function isc_ListGrid__formatIconCellValue(_1,_2,_3,_4,_5,_6){if(isc.isA.RecordEditor(_3)&&_3.isAFilterEditor()&&_2.canFilter==false)return null;if(_2.$59f)return _2.$59f;var _7=_3.getIconCursor(_2),_8;if(_7!=null){if(_7==isc.Canvas.HAND&&isc.Browser.$191d){_7=isc.Canvas.POINTER}
_8="cursor:"+_7}
var _9={src:_2.cellIcon||_2.icon,width:_2.iconWidth||_2.iconSize||_3.imageSize,height:_2.iconHeight||_2.iconSize||_3.imageSize};if(_8)_9.extraCSSText=_8;_2.$59f=isc.Canvas.imgHTML(_9);return _2.$59f},isc.A.setFastCellUpdates=function isc_ListGrid_setFastCellUpdates(_1){if(this.body!=null){this.body.setFastCellUpdates(_1);_1=this.body.fastCellUpdates}
if(this.frozenBody!=null){this.frozenBody.setFastCellUpdates(_1)}
this.fastCellUpdates=_1},isc.A.shouldNavigateOnTab=function isc_ListGrid_shouldNavigateOnTab(){var _1=this.navigateOnTab;if(_1==null)_1=!isc.screenReader;return this.canSelectCells&&_1},isc.A.$2364=function isc_ListGrid__shouldUseCopyPasteShortcuts(){if(!this.canSelectCells)return false;var _1=this.canDragSelectText||this.selectCellTextOnClick;if(this.useCopyPasteShortcuts==null){return!_1}else{if(_1&&!isc.ListGrid.$2365){this.logWarn("Both 'useCopyPasteShortcut' and either 'canDragSelectText' or 'selectCellTextOnClick' is enabled for this grid. This configuration will allow the user to select cell content for copying but will intercept the OS level 'copy' keyboard shortcut, potentially resulting in a confusing user experience.");isc.ListGrid.$2365=true}
return this.useCopyPasteShortcuts}});isc.evalBoundary;isc.B.push(isc.A.setEmptyMessage=function isc_ListGrid_setEmptyMessage(_1){this.emptyMessage=_1;if(this.body&&this.body.isDrawn()){this.body.markForRedraw()}},isc.A.$188v=function isc_ListGrid__getEmptyMessageStyleVPad(){return isc.GridRenderer.$188v(this.emptyMessageStyle)},isc.A.$2360=function isc_ListGrid__canShowFilterEditor(){if(this.shouldAllowFilterViaAI())return true;if(!this.canShowFilterEditor)return false;if(this.getDataSource()==null)return false;var _1=false;var _2=this.getFields();if(_2!=null){for(var i=0;i<_2.length;i++){if(_2[i].canFilter!=false){_1=true;break}}}
return _1},isc.A.shouldAllowFilterOperators=function isc_ListGrid_shouldAllowFilterOperators(_1){if(this.allowFilterOperators==false||(this.filterViaAIMode!=null&&!this.canShowFilterEditor))
{return false}
if(!this.dataSource)return false;if(_1){if(isc.isA.String(_1))_1=this.getFieldByName(_1);if(!_1){}else{var _2=isc.FormItemFactory.getItemClass(this.getFilterEditorType(_1));if(!isc.isA.TextItem(_2))return false;var _3=_1.$62,_4=isc.SimpleType;if(_3){if(_4.inheritsFrom(_3.type,"date")||_4.inheritsFrom(_3.type,"datetime")||_4.inheritsFrom(_3.type,"boolean"))return false;if(_3.allowFilterOperators==false)return false}
if(_1.canFilter==false)return false;if(_1.allowFilterOperators!=null)return _1.allowFilterOperators}}
if(this.canFilter==false)return false;if(this.allowFilterOperators!=null)return this.allowFilterOperators;var _5=this.getDataSource();if(_5)return _5.supportsAdvancedCriteria();return false},isc.A.shouldAlwaysShowOperatorIcon=function isc_ListGrid_shouldAlwaysShowOperatorIcon(_1,_2){if(_1){if(isc.isA.String(_1))_1=this.getFieldByName(_1);if(_1&&_1.alwaysShowOperatorIcon!=null)return _1.alwaysShowOperatorIcon;var _3=this.getFilterEditor();if(!_2&&_3)_2=_3.editor.getEditForm().getItem(_1.name)
if(_2&&_2.alwaysShowOperatorIcon!=null)return _2.alwaysShowOperatorIcon}
if(this.alwaysShowOperatorIcon!=null)return this.alwaysShowOperatorIcon;return false},isc.A.shouldShowRemoveField=function isc_ListGrid_shouldShowRemoveField(){if(this.fieldSourceGrid!=null)return this.fieldSourceGrid.shouldShowRemoveField();return this.canRemoveRecords},isc.A.markRecordRemoved=function isc_ListGrid_markRecordRemoved(_1,_2){if(!isc.isA.Number(_1))_1=this.findRowNum(_1);if(this.getEditRow()==_1)this.hideInlineEditor();if(this.canSelectCells){this.selectionManager.deselectRow(_1)}else{var _3=this.getRecord(_1);this.selectionManager.deselect(_3,_1)}
this.setEditValue(_1,this.recordRemovedProperty,true,_2,false,_2);if(!_2)this.refreshRow(_1)},isc.A.markRecordsRemoved=function isc_ListGrid_markRecordsRemoved(_1){if(_1==null)return;if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<_1.length;i++){this.markRecordRemoved(_1[i],true)}},isc.A.recordMarkedAsRemoved=function isc_ListGrid_recordMarkedAsRemoved(_1){if(_1==null)return false;if(!isc.isA.Number(_1)){_1=this.getEditSessionRowNum(_1);if(_1==null)return false}
return(this.getEditValue(_1,this.recordRemovedProperty)==true)},isc.A.unmarkRecordRemoved=function isc_ListGrid_unmarkRecordRemoved(_1,_2){if(!isc.isA.Number(_1))_1=this.findRowNum(_1);this.clearEditValue(_1,this.recordRemovedProperty);if(!_2)this.refreshRow(_1)},isc.A.markSelectionRemoved=function isc_ListGrid_markSelectionRemoved(){var _1=this.getSelectedRecords(),_2=_1.length;for(var i=0;i<_2;++i){this.markRecordRemoved(_1[i],true)}
this.markForRedraw()},isc.A.shouldDeferRemoval=function isc_ListGrid_shouldDeferRemoval(){if(this.deferRemoval!=null)return this.deferRemoval;return!this.autoSaveEdits},isc.A.setFilterByCell=function isc_ListGrid_setFilterByCell(_1){this.filterByCell=_1;var _2=this.getFilterEditor();if(_2)_2.$2400()},isc.A.shouldShowNewRecordRow=function isc_ListGrid_shouldShowNewRecordRow(){return this.showNewRecordRow&&this.canEdit&&(this.getDataSource()==null||this.shouldSaveLocally()||(isc.ResultSet&&isc.isA.ResultSet(this.data)))},isc.A.editorKeyDown=function isc_ListGrid_editorKeyDown(_1,_2){if(isc.Browser.isMoz&&_1&&_1.multiple&&isc.isA.NativeSelectItem(_1)&&_2=="Enter")
{_1.$197a=true;_1.$695=_1.getValue()}},isc.A.isMultiLineEditor=function isc_ListGrid_isMultiLineEditor(_1){return _1.getIsMultiLineEditor()},isc.A.editorKeyPress=function isc_ListGrid_editorKeyPress(_1,_2,_3){var _4=isc.EH,_5,_6;var _7=this.isMultiLineEditor(_1);if(_2=="Enter"){if(_1.getFocusIconIndex()!=null)return;if(_7&&isc.EH.altKeyDown()==false){return _5}
if(_1.$197a){var _8=_1.$695;delete _1.$695;delete _1.$197a;_1.setValue(_8)}
_6=isc.ListGrid.ENTER_KEYPRESS;_5=false}else if(_2=="Escape"){_6=isc.ListGrid.ESCAPE_KEYPRESS;_5=false}else if(_2=="Arrow_Up"){var _9=this.getArrowKeyEditAction(_1,_2);if(_9=="none"){return _5}
_6=isc.ListGrid.UP_ARROW_KEYPRESS;_5=false}else if(_2=="Arrow_Down"){var _9=this.getArrowKeyEditAction(_1,_2);if(_9=="none"){return _5}
_6=isc.ListGrid.DOWN_ARROW_KEYPRESS;_5=false}else if(this.moveEditorOnArrow&&this.$51k){if(_2=="Arrow_Left"){_6=isc.ListGrid.LEFT_ARROW_KEYPRESS;_5=false}else if(_2=="Arrow_Right"){_6=isc.ListGrid.RIGHT_ARROW_KEYPRESS;_5=false}}
if(_6!=null){if(isc.EH.clickMaskUp()){isc.EH.setMaskedFocusCanvas(null,isc.EH.clickMaskRegistry.last())}
this.cellEditEnd(_6)}
return _5},isc.A.getArrowKeyEditAction=function isc_ListGrid_getArrowKeyEditAction(_1,_2){var _3=this.getField(_1.name),_4=_3.arrowKeyEditAction||this.arrowKeyEditAction;if(_4!=null)return _4;var _5=this.isMultiLineEditor(_1);if(_5&&!isc.EH.altKeyDown())_4="none";else if(isc.isA.SpinnerItem(_1)&&!isc.EH.altKeyDown())_4="none";else if(isc.isA.SelectItem(_1)&&!isc.EH.ctrlKeyDown())_4="none";else if(isc.isA.PresetCriteriaItem(_1)&&!isc.EH.ctrlKeyDown())_4="none";else if(isc.EH.ctrlKeyDown()&&isc.EH.shiftKeyDown())_4="none";else{_4="editNext"}
return _4},isc.A.$30t=function isc_ListGrid__editFormItem_elementFocus(_1){var _2=this.$1008(_1);this.Super("elementFocus",arguments);this.$1009(_2[0],_2[1])},isc.A.$101a=function isc_ListGrid__editFormItem_setLGEditCellForFocus(_1){var _2=this.form,_3=_2.grid;var _4,_5,_6,_7;if(_3.$30a){_4=_3.$285;if(!_3.editByCell){_4=_3.$285;_6=this.getFieldName();_5=_3.fields.findIndex("name",_6);if(!_1){_7=(_3.$30u!=_5);if(_7){_3.setNewEditCell(_4,_5);_3.cellEditEnd(isc.ListGrid.EDIT_FIELD_CHANGE)}}}else{_5=_3.$30u}}
return[_4,_5]},isc.A.$101b=function isc_ListGrid__editFormItem_fireLGEditorEnter(_1,_2){var _3=this.form,_4=_3.grid;if(_4.$30a){var _5=this.$30v,_6=this.$30w;delete this.$30v;delete this.$30w;var _7=isc.addProperties({},_4.getCellRecord(_1,_2),_4.$300(_1,_2));if(_6){var _8=_4.getFieldName(_2);_4.$30x(this,_1,_2,_7[_8])}
if(_5)_4.$30z(this,_1,_7)}else{_4.logWarn("suppressing editorEnter handlers on focus as listGrid.$30a is null")}},isc.A.skipHeaderButtonFocus=function isc_ListGrid_skipHeaderButtonFocus(_1){if(_1.parentElement.tabWithinToolbar)return false;if(this.lastFocusHeader!=null&&this.lastFocusHeader!=_1.parentElement){return true}
return false},isc.A.headerButtonFocusChanged=function isc_ListGrid_headerButtonFocusChanged(_1,_2){if(_2)this.lastFocusHeader=_1.parentElement},isc.A.$237v=function isc_ListGrid__focusInNextHeader(_1,_2){if(this.frozenFields){var _3=_2?this.header:this.frozenHeader;if(_3!=_1){var _4=_3.getMembers(),_5=_2?0:_4.length-1,_6=_2?1:-1,_7=_2?-1:_4.length;while(_5!=_7){var _8=_4[_5];if(_8.$kk()){_8.focus();return true}
_5+=_6}}}
return false},isc.A.getEmbeddedComponentMargin=function isc_ListGrid_getEmbeddedComponentMargin(){if(this.embeddedComponentMargin!=null)return this.embeddedComponentMargin;return 0},isc.A.getExpansionIndent=function isc_ListGrid_getExpansionIndent(){if(this.expansionIndent!=null)return this.expansionIndent;var _1=this.getExpansionField();var _2=_1?this.getFieldWidth(_1):null;if(_2!=null)return _2;return 25},isc.A.showDragHandles=function isc_ListGrid_showDragHandles(){this.$195x=true;this.refreshFields()},isc.A.hideDragHandles=function isc_ListGrid_hideDragHandles(){this.$195x=false;this.refreshFields()},isc.A.$195v=function isc_ListGrid__shouldUseDragHandles(){if(this.fieldSourceGrid)return this.fieldSourceGrid.$195v();return(this.$195x||this.useDragHandles)&&(this.canReorderRecords||this.canDragRecordsOut)},isc.A.shouldShowDragHandleField=function isc_ListGrid_shouldShowDragHandleField(){if(this.fieldSourceGrid)return this.fieldSourceGrid.shouldShowDragHandleField();return this.$195x&&(this.canReorderRecords||this.canDragRecordsOut)},isc.A.getCurrentDragField=function isc_ListGrid_getCurrentDragField(){var _1=this.completeFields||this.fields;if(!_1)return null;var _2=_1.find("name","$195w");if(!_2)return null;return isc.isAn.Array(_2)?_2[0]:_2},isc.A.getDragFieldPosition=function isc_ListGrid_getDragFieldPosition(){if(this.fieldSourceGrid)return this.fieldSourceGrid.getDragFieldPosition();if(!this.shouldShowDragHandleField())return-1;var _1=0;if(this.shouldShowRowNumberField())_1++;return _1},isc.A.getDragField=function isc_ListGrid_getDragField(){var _1=this,_2={title:this.dragHandleFieldTitle,cellIcon:this.dragHandleIcon,iconWidth:this.dragHandleIconWidth||this.dragHandleIconSize,iconHeight:this.dragHandleIconHeight||this.dragHandleIconSize,getAutoFreezePosition:function(){return _1.getDragFieldPosition()}};isc.addProperties(_2,this.dragHandleFieldDefaults,this.dragHandleFieldProperties);return _2},isc.A.$195u=function isc_ListGrid__shouldAllowRecordDrag(){if(!isc.Browser.isTouch||!this.$195v()){return true}
var _1=this.body;if(!_1||!_1.$145k())return true;var _2=this.getOffsetX(isc.EH.mouseDownEvent),_3=this.getEventColumn(_2),_4=this.getField(_3);return _4&&_4.isDragHandle},isc.A.getParentGroupIndex=function isc_ListGrid_getParentGroupIndex(_1){if(!this.isGrouped)return 0;var _2=this.groupTree,_3=_2.getParent(_1),_4=_2.getChildren(_2.getParent(_3)),_5=0;if(!isc.isA.ResultSet(_4)||_4.lengthIsKnown()){for(var i=0,_7=_4.getLength();i<_7;++i){var _8=_4.getCachedRow(i);if(_8!=null&&_8.groupValue==_3.groupValue){_5=i;break}}}
return _5},isc.A.getGroupedRecordIndex=function isc_ListGrid_getGroupedRecordIndex(_1){if(!this.isGrouped)return-1;var _2=this.groupTree,_3=_2==null?null:_2.getParent(_1);if(_3==null)return-1;if(_2.getLevel(_1)>1){var _4={currentIndex:0,parentNode:_3,record:_1};this.getGroupedRecordIndexRecursive(_2.root,_4);return _4.currentIndex}
var _5=_2.getChildren(_2.getParent(_3)),_6=0,_7=0;if(!isc.isA.ResultSet(_5)||_5.lengthIsKnown()){for(var i=0,_9=_5.getLength();i<_9;++i){var _10=_5.getCachedRow(i);if(_10!=null){if(_10.groupValue==_3.groupValue){var _11=_2.getChildren(_10);if(!isc.isA.ResultSet(_11)||_11.lengthIsKnown()){for(var j=0,_13=_11.getLength();j<_13;++j){var _14=_11.getCachedRow(j);if(_14!=null&&this.objectsAreEqual(_14,_1)){return _7+j}}}}
var _15=_2.getChildren(_10);if(!isc.isA.ResultSet(_15)||_15.lengthIsKnown()){var _16=_15.getLength();if(this.showGroupSummary&&!this.showGroupSummaryInHeader){for(var _17=_16-1;_17>=0;--_17){var _18=_15.getCachedRow(_17);if(_18!=null){if(_18[this.groupSummaryRecordProperty])--_16;else break}}}
_7+=_16}}}}
return _7},isc.A.getGroupedRecordIndexRecursive=function isc_ListGrid_getGroupedRecordIndexRecursive(_1,_2){var _3=this.groupTree;if(!_1)_1=_3.root;var _4=_3.getChildren(_1);if(!_4)return true;if(isc.isA.ResultSet(_4)&&!_4.lengthIsKnown())return true;var _5=_2.parentNode,_6=_2.record;var _7=_4.getLength();for(var i=0;i<_7;++i){var _9=_4.getCachedRow(i);if(_9==null){}else if(_3.isFolder(_9)){if(!this.getGroupedRecordIndexRecursive(_9,_2)){return false}}else{if(_1.groupName==_5.groupName&&_1.groupValue==_5.groupValue&&this.objectsAreEqual(_9,_6))
{return false}
if(!_9[this.groupSummaryRecordProperty]){_2.currentIndex++}}}
return true},isc.A.objectsAreEqual=function isc_ListGrid_objectsAreEqual(_1,_2){for(var _3 in _1){if(_1[_3]!=_2[_3])return false}
return true},isc.A.getRowNumberField=function isc_ListGrid_getRowNumberField(){var _1=this,_2={width:this.$740,rowNumberStart:this.rowNumberStart,getAutoFreezePosition:function(){return _1.getRowNumberFieldPosition()}};if(this.applyRowNumberStyle)_2.baseStyle=this.rowNumberStyle;isc.addProperties(_2,this.rowNumberFieldDefaults,this.rowNumberFieldProperties);_2.title=isc.nbsp;return _2},isc.A.getCurrentRowNumberField=function isc_ListGrid_getCurrentRowNumberField(){var _1=this.completeFields||this.fields,_2=_1.find("name","$74y");return!_2?null:isc.isAn.Array(_2)?_2[0]:_2},isc.A.isRowNumberField=function isc_ListGrid_isRowNumberField(_1){if(!_1||!_1.$74z)return false;else return true},isc.A.getRowNumberFieldPosition=function isc_ListGrid_getRowNumberFieldPosition(){if(this.fieldSourceGrid)return this.fieldSourceGrid.getRowNumberFieldPosition();if(!this.shouldShowRowNumberField())return-1;return 0},isc.A.shouldShowRowNumberField=function isc_ListGrid_shouldShowRowNumberField(){return this.fieldSourceGrid?this.fieldSourceGrid.shouldShowRowNumberField():(this.showRowNumbers==true)},isc.A.getRowRangeDisplay=function isc_ListGrid_getRowRangeDisplay(){if(this.rowRangeDisplay==null||this.rowRangeDisplay.destroyed){this.rowRangeDisplay=this.createAutoChild("rowRangeDisplay",{sourceGrid:this,canRequestRowCount:this.canRequestRowCount})}
return this.rowRangeDisplay},isc.A.getRowRangeDisplayValue=function isc_ListGrid_getRowRangeDisplayValue(){if(this.isEmpty())return this.emptyRowRangeDisplayValue;var _1=this.rowRangeDisplayStyle;if(_1=="countOnly"){return this.getFormattedRowCount()}
if(_1=="rangeOnly"){return this.getFormattedRowRange()}
var _2=_1=="full"?this.fullRowRangeDisplayValue:this.briefRowRangeDisplayValue;return _2.evalDynamicString(this,{rowCount:this.getFormattedRowCount(),rowRange:this.getFormattedRowRange()})},isc.A.rowRangeDisplayValueChanged=function(reason){},isc.A.getFormattedRowRange=function isc_ListGrid_getFormattedRowRange(){if(!this.body)return"";var _1=this.getVisibleRows();var _2=isc.NumberUtil.toLocalizedString(_1[0]+1),_3=isc.NumberUtil.toLocalizedString(_1[1]+1);return this.rowRangeFormat.evalDynamicString(this,{startRow:_2,endRow:_3})},isc.A.childResized=function isc_ListGrid_childResized(_1,_2,_3,_4){if(_1==this.body&&_3!=null&&_3!=0&&this.rowRangeDisplayStyle!="countOnly")
{this.rowRangeDisplayValueChanged("Body resized")}
return this.Super("childResized",arguments)},isc.A.getFormattedRowCount=function isc_ListGrid_getFormattedRowCount(){var _1=this.getRowCountStatus();if(_1=="unknown"){return this.unknownRowCountDisplayValue}
if(_1=="loading"){return this.imgHTML({src:this.loadingRowCountDisplayIcon,width:this.loadingRowCountDisplayIconWidth,height:this.loadingRowCountDisplayIconHeight})}
if(_1=="range"){var _2=this.getRowCountRange(),_3=this.$257f(_2[0],"minimum"),_4=this.$257f(_2[1],"maximum");return this.rangeRowCountFormat.evalDynamicString(this,{minRowCount:isc.NumberUtil.toLocalizedString(_3),maxRowCount:isc.NumberUtil.toLocalizedString(_4)})}else{var _5=this.$257f(this.getRowCount(),_1);_5=isc.NumberUtil.toLocalizedString(_5);var _6=this.exactRowCountFormat;switch(_1){case"minimum":_6=this.minimumRowCountFormat;break;case"approximate":_6=this.approximateRowCountFormat;break;case"maximum":_6=this.maximumRowCountFormat;break}
return _6.evalDynamicString(this,{rowCount:_5})}},isc.A.$257f=function isc_ListGrid__applyRowCountDisplayPrecision(_1,_2){if(_1==null)return _1;if(_2=="exact")return _1;var _3=this.rowCountDisplayPrecision;if(_3==null){_3=this.data?this.data.resultSize:this.dataPageSize}
if(_3==null||_3==1||_3==0)return _1;var _4=0;if(_2=="approximate"){_4=Math.round(_1/_3)}else if(_2=="maximum"){_4=Math.ceil(_1/_3)}else if(_2=="minimum"){_4=Math.floor(_1/_3)}
if(_4==0)return _1;return(_4*_3)},isc.A.getRowCount=function isc_ListGrid_getRowCount(){if(this.data&&this.data.getRowCount)return this.data.getRowCount();return this.data&&this.data.getLength()||0},isc.A.getRowCountRange=function isc_ListGrid_getRowCountRange(){if(this.data&&this.data.getRowCountRange)return this.data.getRowCountRange();return[this.getRowCount(),null]},isc.A.getRowCountStatus=function isc_ListGrid_getRowCountStatus(){if(this.data&&this.data.getRowCountStatus!=null)return this.data.getRowCountStatus();if(this.data&&this.data.lengthIsKnown!=null&&!this.data.lengthIsKnown())return"unknown";return"exact"},isc.A.fetchRowCount=function isc_ListGrid_fetchRowCount(_1,_2){if(this.data&&this.data.fetchRowCount)this.data.fetchRowCount(_1,_2)},isc.A.shouldShowExpansionField=function isc_ListGrid_shouldShowExpansionField(){return this.fieldSourceGrid?this.fieldSourceGrid.shouldShowExpansionField():this.canExpandRecords},isc.A.getExpansionField=function isc_ListGrid_getExpansionField(){var _1=this,_2={excludeFromState:true,width:this.$72y()+this.expansionFieldExtraWidth,getAutoFreezePosition:function(){return _1.getExpansionFieldPosition()}};_2.valueIconWidth=this.$72y();_2.valueIconHeight=this.$72z();isc.addProperties(_2,this.expansionFieldDefaults,this.expansionFieldProperties);_2.title=isc.nbsp;return _2},isc.A.getCurrentExpansionField=function isc_ListGrid_getCurrentExpansionField(){var _1=this.completeFields||this.fields,_2=_1.find("name","_expansionField");return!_2?null:isc.isAn.Array(_2)?_2[0]:_2},isc.A.$72y=function isc_ListGrid__getExpansionFieldImageWidth(){return this.expansionFieldImageWidth||this.booleanImageWidth||(isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconWidth"):null)},isc.A.$72z=function isc_ListGrid__getExpansionFieldImageHeight(){return this.expansionFieldImageHeight||this.booleanImageHeight||(isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconHeight"):null)},isc.A.isExpansionField=function isc_ListGrid_isExpansionField(_1){if(!_1)return false;var _2=this.getField(_1);if(_2&&_2.$72w)return true;return false},isc.A.getExpansionFieldPosition=function isc_ListGrid_getExpansionFieldPosition(){if(this.fieldSourceGrid!=null)return this.fieldSourceGrid.getExpansionFieldPosition();if(!this.shouldShowExpansionField())return-1;var _1=0;if(this.shouldShowRowNumberField())_1++;if(this.shouldShowDragHandleField())_1++;if(this.shouldShowCheckboxField())_1++;return _1},isc.A.$811=function isc_ListGrid__canExpandRecord(_1,_2){if(_1==null)_1=this.getRecord(_2);if(_1==null)return false;return this.canExpandRecord(_1,_2)},isc.A.canExpandRecord=function isc_ListGrid_canExpandRecord(_1,_2){return _1[this.canExpandRecordProperty]==false?false:true&&(this.canExpandRecords!=false)},isc.A.setCanExpandRecords=function isc_ListGrid_setCanExpandRecords(_1){if(this.canExpandRecords==_1)return;if(!_1){var _2=this.data;if(_2){var _3=this.$92f();if(_3!=null){for(var i=0;i<_3.length;i++){this.collapseRecord(_3[i])}}}}
this.canExpandRecords=_1;this.refreshFields()},isc.A.expandRecord=function isc_ListGrid_expandRecord(_1,_2){if(!this.body){if(!this.$112v)this.$112v=[];this.$112v.add(_1);return}
var _3=false,_4;if(!this.isExpanded(_1)){if(this.onExpandRecord!=null&&!this.onExpandRecord(_1))return false;if(!this.canExpandMultipleRecords){if(this.$74b)
this.collapseRecord(this.$74b);this.$74b=_1}else if(this.maxExpandedRecords!=null){if(this.$74a>=this.maxExpandedRecords){var _5=this.maxExpandedRecordsPrompt.evalDynamicString(this,{count:this.maxExpandedRecords});isc.say(_5);return false}}
_4=this.$231m(_1);var _6=this.getEmbeddedComponentMargin();var _7=this.isRTL(),_8={layoutLeftMargin:_7?_6:this.getExpansionIndent(),layoutRightMargin:_7?this.getExpansionIndent():_6,layoutTopMargin:(_6!=0)?_6-3:0,layoutBottomMargin:_6};if(_4)_8.members=[_4];var _9=this.createAutoChild("expansionLayout",_8);_9.isExpansionComponent=true;_9.removeOnHideField=true;this.addEmbeddedComponent(_9,_1,this.data.indexOf(_1));this.$92g(_1,true);this.$92h(_1,true);this.$74a++;if(!this.canExpandMultipleRecords)this.$74b=_1;_3=true}
if(_2!=false){this.delayCall("markForRedraw",["Expanded Record"])}
return _3},isc.A.expandRecords=function isc_ListGrid_expandRecords(_1){if(!_1||_1.length==0)return;var _2=_1.length;for(var i=0;i<_2;i++){var _4=(i==_2-1);this.expandRecord(_1[i],_4)}},isc.A.collapseRecord=function isc_ListGrid_collapseRecord(_1,_2){if(!_1)return;var _3=this.$917(_1).find("isExpansionComponent",true);if(!_3)return;this.$1303=_2;if(isc.isA.Layout(_3)){var _4=_3.getMember(0);if(_4){if(!isc.isA.DynamicForm(_4))_4=_4.formMember;if(isc.isA.DynamicForm(_4)&&_4.valuesHaveChanged()){this.saveAndCollapseRecord(_4,_3,_1,true,true);return}}}
this.$84t(_1,_3)},isc.A.collapseRecords=function isc_ListGrid_collapseRecords(_1){if(!_1||_1.length==0)return;var _2=_1.length;for(var i=0;i<_2;i++){var _4=(i==_2-1);this.collapseRecord(_1[i],_4)}},isc.A.saveAndCollapseRecord=function isc_ListGrid_saveAndCollapseRecord(_1,_2,_3,_4,_5){if(this.autoSaveEdits==true){var _6=this;if(this.expansionEditorShowSaveDialog&&_4){isc.confirm(this.expansionEditorSaveDialogPrompt,function(_9){if(_9){_6.saveExpansionDetail(_1,_2,_3,_5)}else{if(_5)_6.$84t(_3,_2)}})}else{this.saveExpansionDetail(_1,_2,_3,_5)}
return}else{var _7=_1.getChangedValues(),_8=this.getRecordIndex(_3),_6=this;if(this.expansionEditorShowSaveDialog&&_4){isc.confirm("You have unsaved changes - do you want to save them now?",function(_9){if(_9){_6.$90t(_8,_7)}
if(_5)_6.$84t(_3,_2)});return}else{_6.$90t(_8,_7);if(_5)this.$84t(_3,_2);return}}},isc.A.$90t=function isc_ListGrid__saveExpansionEditorValues(_1,_2){for(var _3 in _2){this.setEditValue(_1,_3,_2[_3])}},isc.A.saveExpansionDetail=function isc_ListGrid_saveExpansionDetail(_1,_2,_3,_4){var _5=this;_1.saveData(function(_6,_7,_8){if(_7){_3=_7;if(_4)_5.$84t(_3,_2);else _1.editRecord(_3)}},{showPrompt:true,promptStyle:"cursor"})},isc.A.$84t=function isc_ListGrid__collapseRecord(_1,_2){if(!_1)return;_2=_2||this.$917(_1).find("isExpansionComponent",true);if(this.isExpanded(_1)){if(this.onCollapseRecord!=null&&!this.onCollapseRecord(_1))return;if(this.$74b&&this.$74b==_1)
delete this.$74b;this.removeEmbeddedComponent(_1,_2?_2:this.frozenFields?this.frozenFields.length:0);this.$74a--}
this.$92g(_1,false);if(this.$1303!=false){this.markForRedraw()}},isc.A.isExpanded=function isc_ListGrid_isExpanded(_1){return(!_1?false:!!_1[this.$92b+this.ID])},isc.A.getExpandedRecords=function isc_ListGrid_getExpandedRecords(){return this.$92f()},isc.A.$92g=function isc_ListGrid__setExpanded(_1,_2){_1[this.$92b+this.ID]=_2},isc.A.$92f=function isc_ListGrid__getExpandedRows(){return this.data.findAll(this.$92b+this.ID,true)},isc.A.$92j=function isc_ListGrid__hasExpansionComponent(_1){return _1[this.$92c+this.ID]},isc.A.$92h=function isc_ListGrid__setExpansionComponent(_1,_2){_1[this.$92c+this.ID]=_2},isc.A.$916=function isc_ListGrid__hasEmbeddedComponents(_1){if(!_1)return false;var _2=_1[this.$92d+this.ID];return(_2!=null&&_2.length>0)},isc.A.$917=function isc_ListGrid__getEmbeddedComponents(_1){if(!_1)return[];var _2=_1[this.$92d+this.ID],_3=[];if(!_2)return _3;for(var i=0;i<_2.length;i++){_3[i]=isc.Canvas.getById(_2[i])}
return _3},isc.A.$92k=function isc_ListGrid__setEmbeddedComponents(_1,_2){_1[this.$92d+this.ID]=_2},isc.A.$918=function isc_ListGrid__addEmbeddedComponent(_1,_2){if(!_1[this.$92d+this.ID]){_1[this.$92d+this.ID]=[]}
if(!_1[this.$92d+this.ID].contains(_2.getID())){_1[this.$92d+this.ID].add(_2.getID())}},isc.A.$919=function isc_ListGrid__removeEmbeddedComponent(_1,_2){var _3=_1[this.$92d+this.ID];if(_3==null)return;if(_3.length==0){_1[this.$92d+this.ID]=null;return}
_3.remove(_2.getID());if(_3.length==0){_1[this.$92d+this.ID]=null}},isc.A.$92l=function isc_ListGrid__deleteEmbeddedComponents(_1,_2){delete _1[this.$92d+this.ID]},isc.A.$92m=function isc_ListGrid__hasRecordComponents(_1){return(_1&&_1[this.$92e+this.ID]!=null)},isc.A.$92n=function isc_ListGrid__getRecordComponents(_1){if(!_1)return null;var _2=_1[this.$92e+this.ID],_3={};if(_2){for(var _4 in _2){if(_2[_4].isNullMarker){_3[_4]=_2[_4]}else{_3[_4]=isc.Canvas.getById(_2[_4])}}}
return _3},isc.A.$92o=function isc_ListGrid__addRecordComponent(_1,_2,_3){if(!_1[this.$92e+this.ID]){_1[this.$92e+this.ID]={}}
if(_3.isNullMarker){_1[this.$92e+this.ID][_2]=_3}else{_1[this.$92e+this.ID][_2]=_3.getID()}},isc.A.$92p=function isc_ListGrid__deleteRecordComponent(_1,_2){var _3=_1[this.$92e+this.ID];if(_3==null)return;if(isc.isAn.emptyObject(_3)){_1[this.$92e+this.ID]=null;return}
if(_2==null)_2=this.$81m;delete _3[_2];if(isc.isAn.emptyObject(_3)){_1[this.$92e+this.ID]=null}},isc.A.getCurrentExpansionComponent=function isc_ListGrid_getCurrentExpansionComponent(_1){if(isc.isA.Number(_1))_1=this.getRecord(_1);if(!_1)return null;var _2=this.$917(_1).find("isExpansionComponent",true);if(_2){return _2.members[0]}
return null},isc.A.$231m=function isc_ListGrid__getExpansionComponent(_1){if(this.expansionScreen){return this.getExpansionScreen(_1)}else{return this.getExpansionComponent(_1)}},isc.A.getExpansionComponent=function isc_ListGrid_getExpansionComponent(_1){return this.$84d(_1,true,false,this.getRecordIndex(_1),0)},isc.A.getExpansionScreen=function isc_ListGrid_getExpansionScreen(_1){var _2=this.getDataSource(),_3={suppressAutoDraw:true};if(_2){_3.dataContext={};_3.dataContext[_2.ID]=_1}
var _4=isc.RPCManager.createScreen(this.expansionScreen,_3);if(!_4){_4=this.createAutoChild("expansionScreenPlaceholder")}
return _4},isc.A.getRelatedDataSource=function isc_ListGrid_getRelatedDataSource(_1){return isc.DS.getDataSource(_1[this.recordDetailDSProperty])||isc.DS.get(this.detailDS)});isc.B._maxIndex=isc.C+124;isc.A=isc.ListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.warnOnReusedFields=true;isc.A.autoFitExpandLengthThreshold=10;isc.A.discardDataOnSetFetchOperation=true;isc.A.clipRecordComponents=true;isc.A.$57l="within";isc.A.forceRedrawOnDataChanged=false;isc.A.$191c="New dataset loaded";isc.A.dataArrived=isc.Class.NO_OP;isc.A.$70q=0;isc.A.$g2="boolean";isc.A.discardEditsOnHideField=true;isc.A.$604="set fields";isc.A.$12c="checkbox";isc.A.$159l=[];isc.A.checkboxFieldDefaults={name:"_checkboxField",excludeFromState:true,selectCellTextOnClick:false,canEdit:false,shouldPrint:false,canFilter:false,canGroupBy:false,canSort:false,canExport:false,canHide:false,canReorder:false,canDragResize:false,canHilite:false,$63f:true,type:"boolean",showDefaultContextMenu:false,hoverHTML:"return null;",autoFreeze:true,showGridSummary:false,showGroupSummary:false,summaryValue:"&nbsp;",allowFilterOperators:false,treeField:false,title:isc.nbsp,featureField:true};isc.A.checkboxFieldHSpace=15;isc.A.saveDefaultSearch=true;isc.A.saveCriteriaInViewState=true;isc.A.$2605=["name","field","fieldName"];isc.A.$2606=["criteria","userCriteria"];isc.A.groupStateChanged=isc.Class.NO_OP;isc.A.viewStateChanged=isc.Class.NO_OP;isc.A.$812="Getting listGrid fieldWidths. ";isc.A.exportHiddenFieldWidth=100;isc.A.gridComponents=["filterEditor","header","body","summaryRow"];isc.A.showComponentPropertyMap={header:"showHeader",filterEditor:"showFilterEditor",summaryRow:"showGridSummary"};isc.A.$880="body";isc.A.$881="header";isc.A.iconPadding=2;isc.A.lastFieldMaxExpandWidth=80;isc.A.savedSearchMenuConstructor="SavedSearchMenu";isc.A.savedSearchAbstractType="list";isc.A.recordRadiusTargets=["normal"];isc.A.firstCellStyle="gridFirstCell";isc.A.lastCellStyle="gridLastCell";isc.A.applyFormulaAfterSummary=false;isc.A.$302="<HR";isc.A.$259u=">";isc.A.iconCursor=isc.Canvas.POINTER;isc.A.allowRowSpanning=false;isc.A.rowSpanSelectionMode="forward";isc.A.rowSpanEditMode="first";isc.A.$303=["style='margin-left:",,"px;margin-right:",,"px;'"];isc.A.$g2="boolean";isc.A.$gx="text";isc.A.useLegacyDefaultFormattedValue=true;isc.A.$54y={" ":true,"\n":true,"\r":true,"\r\n":true};isc.A.$54t="&nbsp;";isc.A.$687={text:true,TextItem:true,textArea:true,TextAreaItem:true,integer:true,IntegerItem:true,float:true,FloatItem:true,select:true,SelectItem:true,combobox:true,ComboBoxItem:true,boolean:true,checkbox:true,CheckboxItem:true,date:true,DateItem:true,datetime:true,DateTimeItem:true,time:true,TimeItem:true,password:true,PasswordItem:true,color:true,colorItem:true,spinner:true,SpinnerItem:true,popUpTextArea:true,PopUpTextAreaItem:true};isc.A.drawAreaChanged=isc.Class.NO_OP;isc.A.recordScreenPlaceholderDefaults={_constructor:isc.Label,autoDraw:false,border:"1px solid red",contents:"recordScreen<br>Placeholder",align:"center"};isc.A.$81m="$81n";isc.A.$81o=0;isc.A.$57m="expand";isc.A.$279z="below";isc.A.$2790="above";isc.A.printAutoFit=true;isc.A.printWrapCells=true;isc.A.printHeaderStyle="printHeader";isc.A.printMaxRows=100;isc.A.shouldPrintAttributeMap={filterEditor:"printFilterEditor",header:"printHeader",summaryRow:"printSummaryRow"};isc.A.printFilterEditor=false;isc.A.$118p="hoverHTML";isc.A.$118q="record,value,rowNum,colNum,grid";isc.A.placeholderAIHoverContents="<b><i>Retrieving summary from AI...</i></b>";isc.A.aiHoverContentsPrefix="<b>AI-generated summary:</b><br>";isc.A.emptyAIHoverContents="(Empty)";isc.A.aiHoverRetryDelay=30000;isc.A.defaultCellHoverComponentWidth=100;isc.A.defaultCellHoverComponentHeight=1;isc.A.selectOnExpandRecord=true;isc.A.selectCellTextOnClick=null;isc.A.$20s="Arrow_Up";isc.A.$20t="Arrow_Down";isc.A.$60n="Arrow_Left";isc.A.$60o="Arrow_Right";isc.A.$304="Space";isc.A.$10j="Enter";isc.A.$51g="f2";isc.A.$jf="Tab";isc.A.$51g="f2";isc.A.$20w="Escape";isc.A.$51h="Backspace";isc.A.$51i="Delete";isc.A.$51l="keyPress";isc.A.$27r="none";isc.A.$305="focus";isc.A.$12b="select";isc.A.$306="activate";isc.A.hiliteOnNativeRowFocus=true;isc.A.scrollToCellXPosition="center";isc.A.scrollToCellYPosition="center";isc.A._useFocusProxy=false;isc.A.alwaysManageFocusNavigation=true;isc.A.canFocusInEmptyGrid=true;isc.A.showFocusOutline=!isc.Browser.isSafari;isc.A.recordClick=isc.Class.NO_OP;isc.A.recordDoubleClick=isc.Class.NO_OP;isc.A.showGridSummary=false;isc.A.invalidSummaryValue="&nbsp;";isc.A.includeInSummaryProperty="includeInSummary";isc.A.gridSummaryRecordProperty="isGridSummary";isc.A.groupSummaryRecordProperty="isGroupSummary";isc.A.recordApplyPluralTitleProperty="applyPluralTitle";isc.A.maxSummaryRowRecords=1;isc.A.recordSummaryBaseStyle="recordSummaryCell";isc.A.summaryRowConstructor="ListGrid";isc.A.summaryRowDefaults={showRollOver:false,contributeToRuleContext:false};isc.A.summaryRowHeight=20;isc.A.summaryRowStyle="gridSummaryCell";isc.A.$12e="binary";isc.A.$52x="file";isc.A.$677="imageFile";isc.A.updateEditorItemsInPlace=true;isc.A.$307={time:true,TimeItem:true};isc.A.$g5="time";isc.A.$308={date:true,DateItem:true};isc.A.$68k={datetime:true,dateTime:true,DatetimeItem:true,DateTimeItem:true};isc.A.$g4="date";isc.A.$68l="datetime";isc.A.popUpTextAreaEditorTypes={popUpTextArea:true,PopUpTextAreaItem:true};isc.A.$31a={checkbox:true,CheckboxItem:true};isc.A.$g2="boolean";isc.A.$12c="checkbox";isc.A.$12i="CycleItem";isc.A.$31b={select:true,SelectItem:true};isc.A.$45k=["change","changed","defaultDynamicValue"];isc.A.$31c=["change","changed","defaultDynamicValue","keyPress","click","showIf","enableIf"];isc.A.$31d={};isc.A.$174o=100;isc.A.$174p=0.2;isc.A.$2906={};isc.A.calculateAsyncRecordSummariesAfterEditsDelay=1000;isc.A.$81p="column remap";isc.A.allowEditFormValueManipulation=true;isc.A.updateSummariesDuringEditing=true;isc.A.$31e=0;isc.A.$31f="rowNum,colNum,editCompletionEvent,success";isc.A.$88z=true;isc.A.cellRecordMode="row";isc.A.cellSelectionChanged=isc.Class.NO_OP;isc.A.selectionChanged=isc.Class.NO_OP;isc.A.$254k=isc.ListGrid.$254j(["canAcceptDroppedRecords","canCollapseGroup","canDragRecordsOut","canExpandRecords","canGroupBy","isGrouped","canReorderRecords","canReorderFields","canResizeFields"]);isc.A.$60m="toggle frozen fields";isc.A.$81q="rebuilding body";isc.A.screenReaderCellSeparator="/";isc.A.screenReaderRowSeparator=",";isc.A.screenReaderIncludeFieldTitles=true;isc.A.screenReaderWriteRowLabelledBy=true;isc.A.selectionCanvasDefaults={_constructor:"SelectionOrRollOverCanvas",opacity:20,overflow:"hidden"};isc.A.selectionUnderCanvasDefaults={};isc.A.rollOverCanvasDefaults={_constructor:"SelectionOrRollOverCanvas",contents:isc.Browser.isChrome?"<span></span>":isc.nbsp,snapTo:"TL",width:"100%",height:"100%",overflow:"hidden",skipModalCheck:true};isc.A.rollUnderCanvasDefaults={snapTo:"TL",width:"100%",height:"100%",overflow:"hidden",skipModalCheck:true};isc.A.headerResizerWidth=2;isc.A.headerResizerHeight="100%";isc.A.headerResizerColor="white";isc.A.showHeaderSpanTitlesInFormulaBuilder=true;isc.A.formulaBuilderSpanTitleSeparator=" - ";isc.A.showHeaderSpanTitlesInSortEditor=true;isc.A.sortEditorSpanTitleSeparator=" - ";isc.A.showHeaderSpanTitlesInHiliteEditor=true;isc.A.hiliteEditorSpanTitleSeparator=" - ";isc.A.$616="header height changed";isc.A.$617="header visibility changed";isc.A.headerMenuButtonSnapOffsetLeft=0;isc.A.headerMenuButtonDefaults={title:null,iconSpacing:0,showDisabled:false,showDisabledIcon:false,showIconCustomState:false,click:function(){this.creator.headerMenuButtonClick();if(this.creator.editingOn&&this.creator.editProxy){return false}},doubleClick:function(){this.creator.headerMenuButtonDoubleClick()},mouseOut:function(){var _1=this.ns.EH;if(!isc.Browser.isTouch){var _2=_1.getTarget();if(!_2||!this.parentElement.contains(_2)){this.hide()}}
this.Super("mouseOut",arguments)}};isc.A.$114x="$114y";isc.A.headerButtonPaddingThreshold=50;isc.A.$190m="$190n";isc.A.predictScrollbarGap=true;isc.A.sortFieldAscendingText="Sort Ascending";isc.A.sortFieldDescendingText="Sort Descending";isc.A.clearSortFieldText="Clear Sort";isc.A.clearAllSortingText="Clear All Sorting";isc.A.clearFilterText="Clear Filter";isc.A.advancedFilteringText="Advanced filtering...";isc.A.configureSortText="Configure Sort...";isc.A.configureGroupingText="Configure Grouping...";isc.A.autoFitFieldText="Auto Fit";isc.A.autoFitAllText="Auto Fit All Columns";isc.A.fieldVisibilitySubmenuTitle="Columns";isc.A.fieldVisibilitySubmenuIcon="[SKINIMG]actions/column_preferences.png";isc.A.freezeFieldText="Freeze ${title}";isc.A.unfreezeFieldText="Unfreeze ${title}";isc.A.groupByText="Group by ${title}";isc.A.ungroupText="Ungroup";isc.A.filterOperatorMenuDefaults={_constructor:"Menu"};isc.A.operatorIconStyle="filterOperatorIcon";isc.A.operatorIconDefaults={name:"operatorIcon",inline:true,inlineIconAlign:"left",align:"center",hspace:1,width:16,disableOnReadOnly:false,showOver:true};isc.A.$289x="result";isc.A.hiliteViaAIWasDisabledMessage="Hiliting via AI was disabled.";isc.A.filterWindowDefaults={autoParent:"none",_constructor:"Window",isModal:true,width:"65%",minWidth:800,maxWidth:1150,height:400,canDragResize:true,canDragReposition:true,vertical:true,autoCenter:true,showMinimizeButton:false};isc.A.filterWindowTitle="Advanced Filtering";isc.A.filterWindowFilterDefaults={autoParent:"none",_constructor:"FilterBuilder",overflow:"auto",height:"*",showModeSwitcher:true};isc.A.filterWindowInstructionsLabelDefaults={_constructor:"Label",width:"100%",height:1};isc.A.filterWindowInstructions="Enter criteria below. These criteria are <i>in addition to</i> any criteria entered in the filter immediately above column headers.";isc.A.editModeFilterWindowInstructions="When you Run or Deploy your application, this window allows users to add additional, advanced criteria to the grid.<P>While you are editing your application, instead, criteria defined here are treated as <em>Implicit Criteria</em> that your users will not be aware of, and cannot edit or remove.";isc.A.filterViaAIPanelInstructions="Alternatively, you can use AI to help create a filter for you, by describing the criteria using natural language.";isc.A.filterViaAIPanelDefaults={_constructor:"FilterViaAIPanel",width:"100%"};isc.A.showFilterWindowCriteriaIndicator=true;isc.A.filterWindowCriteriaIndicatorDefaults={_constructor:isc.Canvas,width:10,height:10,contents:"<div style='width: 0;height: 0;border-top: 10px solid ${this.color};border-left: 10px solid transparent'/>",dynamicContents:true,overflow:"hidden",snapTo:"TR",setColor:function(_1){this.color=_1;this.markForRedraw()}};isc.A.criteriaIndicatorColor="#33AAFF";isc.A.aiSummaryFieldMaxRecords=300;isc.A.aiSummaryFieldMaxRecordsMessage="Cannot add an AI summary field to a grid with more than ${maxRecords} records";isc.A.canAddAISortFields=false;isc.A.aiSortFieldBuilderWindowTitle="AI-Generated Sort Field";isc.A.addAIFieldSubmenuTitle="Add AI column";isc.A.addAISortFieldText="Sort...";isc.A.editAISortFieldText="Edit prompt...";isc.A.removeAISortFieldText="Remove AI column...";isc.A.fieldCriteriaText="Field criteria:";isc.A.gridAdditionalCriteriaText="Grid additional criteria:";isc.A.headerContextMenuConstructor="Menu";isc.A.headerContextMenuDefaults={hide:function(){this.Super("hide",arguments);var _1=this.grid;if(_1){_1.$93s=false;var _2=isc.EH.lastEvent;if(!isc.Browser.isTouch&&(_2.eventType!=isc.EH.MOUSE_DOWN||_2.target!=_1.headerMenuButton))
{_1.$129m()}}},doSort:function(_1,_2){if(_2=="unsort")this.grid.toggleSort(this.grid.getFieldName(_1),_2);else this.grid.sort(_1,_2)},canHover:true,showHover:true,showHoverOnDisabledCells:true,cellHoverHTML:function(_1,_2,_3){if(_1.cellHoverHTML!=null){return _1.cellHoverHTML(this,_1,_2,_3)}
return _1.prompt},groupField:function(_1){var _2=this.grid,_3=_2.getGroupByFields();if((_1.targetField&&_1.groupType)||!(_3&&_3.length==1&&_3.contains(_1.fieldName)))
{var _4=_2.makeGroupSpecifier(_1.fieldName,_1.groupType,_1.groupGranularity,_1.groupPrecision);_4.$1764=_1.targetField.groupingMode||"none";_1.targetField.groupingMode=_1.groupType;_2.setGroupSpecifiers([_4])}},ungroup:function(){this.grid.ungroup()}};isc.A.$31g="sort";isc.A.canMultiSort=true;isc.A.canMultiGroup=false;isc.A.sortNumeralStyle="sortNumeral";isc.A.$145s=["<span class='",,"' style='",,"'>",,,,"</span>"];isc.A.$199c="transform:rotate(180deg);";isc.A.$73y="setSort";isc.A.sortChanged=isc.Class.NO_OP;isc.A.chartConstructor="FacetChart";isc.A.chartType="Column";isc.A.groupIdField="groupId";isc.A.groupParentIdField="groupParentId";isc.A.retainOpenStateOnRegroup=true;isc.A.groupIconPadding=5;isc.A.showGroupTitleInFrozenBody=true;isc.A.showGroupSummary=false;isc.A.groupSummaryStyle="gridSummaryCell";isc.A.$31h={canDragSelect:true,canDragSelectText:true,canDragRecordsOut:true,canReorderRecords:true,canAcceptDroppedRecords:true};isc.A.$45l={bodyBackgroundColor:"backgroundColor",bodyStyleName:"styleName",fixedRecordHeights:"fixedRowHeights",fixedFieldWidths:"fixedColumnWidths",alternateRecordStyles:"alternateRowStyles",alternateRecordSuffix:"alternateRowSuffix",alternateRecordFrequency:"alternateRowFrequency",alternateFieldStyles:"alternateColumnStyles",alternateFieldSuffix:"alternateColumnSuffix",alternateFieldFrequency:"alternateColumnFrequency",showAllRecords:"showAllRows",canSelectText:"canDragSelectText"};isc.A.useAdvancedFieldPicker=false;isc.A.canEditTitles=false;isc.A.fieldPickerWindowDefaults={autoParent:"none",_constructor:"FieldPickerWindow"};isc.A.fieldPickerFieldProperties=null;isc.A.advancedFieldPickerThreshold=25;isc.A.fieldPickerShowSampleValues=true;isc.A.markForRefreshDataDelay=300;isc.B.push(isc.A.init=function isc_ListGrid_init(){if(this.disableTouchScrollingForDrag&&(this.canDragRecordsOut||this.canDragSelect||this.canReorderRecords)&&this.useTouchScrolling==null)
{this.logInfo("Automatically disabling touch scrolling","scrolling");this.useTouchScrolling=false}
if(this.minHeight==null)this.minHeight=this.$188x();this.Super("init",arguments)},isc.A.initWidget=function isc_ListGrid_initWidget(){this.$168f=true;if(this.dataFetchDelay===0)this.dataFetchDelay=1;this.Super("initWidget",arguments);if(this.selectionManager!=null)this.selection=this.selectionManager;if(this.showAllRecords&&this.dataFetchMode=="paged"){this.logWarn("dataFetchMode: 'paged' isn't supported for grids with showAllRecords: true")}
if(isc.Browser.isMobile)this.resizeFieldsInRealTime=false;if(this.showRecordComponents){delete this.showRecordComponents;this.setShowRecordComponents(true)}
if(!this.expansionDetailFieldDefaults.styleName){this.expansionDetailFieldDefaults.styleName=this.hoverStyle}
if(this.fields==null&&this.defaultFields!=null){this.fields=isc.shallowClone(this.defaultFields)}else if(this.warnOnReusedFields&&this.fields!=null){if(this.fields.$696){this.logWarn("ListGrid initialized with this.fields attribute set to an array which is already being displayed in another ListGrid instance. To reuse standard field configuration across multiple ListGrids, use listGrid.defaultFields rather than assigning directly to listGrid.fields.")}else{var _1;if(isc.isAn.Array(this.fields)){_1=this.fields.findIndex("$697",true)!=-1}else if(isc.isAn.Object(this.fields)){for(var _2 in this.fields){var _3=this.fields[_2];if(_3&&_3.$697){_1=true;break}}}
if(_1){this.logWarn("ListGrid initialized with this.fields attribute set to an array containing fields which are already being displayed in another ListGrid instance. To reuse standard field configuration across multiple ListGrids, use listGrid.defaultFields rather than assigning directly to listGrid.fields.")}}
this.fields.$696=true;if(isc.isAn.Array(this.fields)){for(var _4=this.fields.length;_4>0;--_4){var _3=this.fields[_4-1];if(_3==null){this.logWarn("ListGrid initialization: Specified fields array includes null entry. Removing.");this.fields.removeAt(_4-1);continue}
_3.$697=true}}else if(isc.isAn.Object(this.fields)){for(var _2 in this.fields){var _3=this.fields[_2];if(_3){_3.$697=true}}}}
if(this.canEditNew)this.listEndEditAction=this.rowEndEditAction="next";if(this.alwaysShowEditors){this.editByCell=false;this.selectionType="none";this.selectOnEdit=false;if(this.canGroup!=false){this.logInfo("grouping functionality is not supported when alwaysShowEditors is true. Explicitly disabling this.canGroup","inactiveEditorHTML");this.canGroup=false}
if(this.modalEditing){this.logInfo("modalEditing is not supported when alwaysShowEditors is true. Explicitly setting this.modalEditing to false","inactiveEditorHTML");this.modalEditing=false}
this.editEvent="click";if(this.canEdit==null){var _5=this.getFields()||[],_6=false;for(var i=0;i<_5.length;i++){if(_5[i].canEdit==true){_6=true;break}}
if(!_6){this.logInfo("alwaysShowEditors has been set for this grid but canEdit is unset and no fields are explicitly marked as editable. Defaulting this.canEdit to true. Note that to avoid this override developers can explicitly specify canEdit at the grid or field level","inactiveEditorHTML");this.canEdit=true}}}
this.updateFixedRecordHeights();if(this.canAddFormulaFields&&isc.FormulaBuilder==null){this.logInfo("Required modules for adding formula fields not present - setting canAddFormulaFields to false.");this.canAddFormulaFields=false}
if(this.canAddSummaryFields&&isc.SummaryBuilder==null){this.logInfo("Required modules for adding summary fields not present - setting canAddSummaryFields to false.");this.canAddSummaryFields=false}
if(this.useRowSpanStyling&&this.canSelectCells==null)this.canSelectCells=true;if(this.useCellRollOvers==null)this.useCellRollOvers=this.canSelectCells;if(this.loadingMessage==null||this.loadingMessage==isc.emptyString)
this.loadingMessage="&nbsp;";if(this.autoFitData!=null){this.$58o=this.overflow;this.setOverflow("visible")}
if(this.canCollapseGroup==false)this.groupStartOpen="all";this.sortDirection=Array.shouldSortAscending(this.sortDirection)?"ascending":"descending";this.$765=Array.shouldSortAscending(this.sortDirection)?"ascending":"descending";if(this.hiliteState)this.setHiliteState(this.hiliteState);this.setData(this.data?null:this.getDefaultData());this.setSelectionAppearance(this.selectionAppearance,true);this.$31i();if(this.headerRadius)this.setHeaderRadius(this.headerRadius);if(this.recordRadius)this.setRecordRadius(this.recordRadius);if(this.recordRadiusTargets)this.recordRadiusTargets=this.recordRadiusTargets.duplicate();if(this.searchForm)this.checkForSearchForm();if(this.showInitialDragHandles)this.$195x=this.showInitialDragHandles;if(!this.canResizeFields)this.canAutoFitFields=false;if(this.wrapHeaderTitles==null){this.wrapHeaderTitles=this.$181f("wrap")||false}
if(this.wrapHeaderSpanTitles==null){this.wrapHeaderSpanTitles=this.$181f("wrap",true)||false}
if(this.embeddedComponentIndentOtherMargins!=null){this.embeddedComponentMargin=this.embeddedComponentIndentOtherMargins;delete this.embeddedComponentIndentOtherMargins}
this.currentGroupState=this.getGroupState();delete this.$168f},isc.A.updateFixedRecordHeights=function isc_ListGrid_updateFixedRecordHeights(){var _1=(this.canExpandRecords||(this.fixedRecordHeights==false));if(_1!=this.$197g){this.$197g=_1;if(_1&&this.virtualScrolling==null){if(this.fixedRecordHeights&&!this.enforceVClipping){this.$82v=this.fixedRecordHeights;this.fixedRecordHeights=false}
this.virtualScrolling=true}
if(this.body){this.body.fixedRowHeights=this.fixedRecordHeights;this.body.virtualScrolling=this.virtualScrolling}
if(this.frozenBody){this.frozenBody.fixedRowHeights=this.fixedRecordHeights;this.frozenBody.virtualScrolling=this.virtualScrolling}}},isc.A.setFixedRecordHeights=function isc_ListGrid_setFixedRecordHeights(_1){this.fixedRecordHeights=_1;this.updateFixedRecordHeights();if(this.isDrawn())this.markForRedraw()},isc.A.setWrapCells=function isc_ListGrid_setWrapCells(_1){if(this.wrapCells==_1)return;this.wrapCells=_1;if(this.body)this.body.wrapCells=_1;if(this.frozenBody)this.frozenBody.wrapCells=_1;if(this.isDrawn())this.markForRedraw()},isc.A.$194u=function isc_ListGrid__handleDualInputMouseMove(_1,_2){if(_1&&_1.DOMevent){var _3=_1.DOMevent,_4=isc.EH.isMouseEvent(_3.type,true,_3);if(_4){isc.ListGrid.addProperties({showRollOver:true});delete this.$194x}}
return this.invokeSuper(isc.ListGrid,"handleMouseMove",_1,_2)},isc.A.enableTouchSupport=function isc_ListGrid_enableTouchSupport(){this.Super("enableTouchSupport",arguments);isc.ListGrid.addProperties({showRollOver:false})},isc.A.$181f=function isc_ListGrid__getHeaderButtonAutoChildConfig(_1,_2){var _3;if(_2){_3=this.headerSpanProperties?this.headerSpanProperties[_1]:null}
if(_3==null){_3=this.headerButtonProperties?this.headerButtonProperties[_1]:null}
if(_3!=null)return _3;if(_2){_3=this.headerSpanDefaults?this.headerSpanDefaults[_1]:null}
if(_3==null){_3=this.headerButtonDefaults?this.headerButtonDefaults[_1]:null}
return _3},isc.A.$910=function isc_ListGrid__storeDragProperties(){if(!this.$911){var _1=this.$911={};_1.canDrag=this.canDrag;_1.canDrop=this.canDrop;_1.canAcceptDrop=this.canAcceptDrop}},isc.A.$912=function isc_ListGrid__restoreDragProperties(){var _1=this.$911;if(_1){this.canDrag=_1.canDrag;this.canDrop=_1.canDrop;this.canAcceptDrop=_1.canAcceptDrop}},isc.A.$31i=function isc_ListGrid__setUpDragProperties(){if(!this.$911){this.$910()}
this.canDrag=!this.canDragSelectText&&(this.canDrag||this.canDragRecordsOut||this.canReorderRecords||this.canDragSelect);this.canDrop=(this.canDrop||this.canDragRecordsOut||this.canReorderRecords);this.canAcceptDrop=(this.canAcceptDrop||this.canAcceptDroppedRecords||this.canReorderRecords)},isc.A.setCanReorderRecords=function isc_ListGrid_setCanReorderRecords(_1){if(_1!=this.canReorderRecords){this.canReorderRecords=_1;this.$912();this.$31i();this.redraw()}},isc.A.getEmptyMessage=function isc_ListGrid_getEmptyMessage(){if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()){if(isc.Offline&&isc.Offline.isOffline()){return this.offlineMessage}
return this.loadingDataMessage==null?"&nbsp;":this.loadingDataMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})}
if(this.isOffline()){return this.offlineMessage}
return this.emptyMessage==null?"&nbsp;":this.emptyMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})},isc.A.isEmpty=function isc_ListGrid_isEmpty(){if(!this.data)return true;if(!this.fields||this.fields.length==0)return true;if(isc.ResultSet&&isc.isA.ResultSet(this.data)){if(this.data.isPaged()){if(!this.data.isEmpty())return false;if(this.shouldShowNewRecordRow())return false;var _1=this.getAllEditRows();if(_1&&_1.length>0){for(var i=0;i<_1.length;i++){if(_1[i]>=0)return false}}
return true}else{return(!this.data.lengthIsKnown()||this.getTotalRows()==0)}}else{return(this.getTotalRows()==0)}},isc.A.setData=function isc_ListGrid_setData(_1,_2){if(this.data==_1)return;if(!this.preserveEditsOnSetData)this.discardAllEdits();this.clearLastHilite();if(this.data){this.$31j(this.data);if(_1&&this.data.$31k&&isc.isA.Function(this.data.destroy)){this.data.destroy()}}
if(this.originalData&&(_1||!this.data)){this.$31j(this.originalData);if(this.originalData!=_1&&this.originalData.$31k&&isc.isA.Function(this.originalData.destroy))
{this.originalData.destroy()}
delete this.originalData}
if(this.overflow!=isc.Canvas.HIDDEN&&isc.ResultSet&&isc.isA.ResultSet(_1)&&!_1.lengthIsKnown())
{this.$187v()}else{this.$187w()}
if(_1)this.data=_1;if(!this.data){this.dataSetChanged();return}
if(!this.$141w&&!this.isGrouped&&(!this.selectionManager||(this.data!=this.selectionManager.data)))
{this.createSelectionModel()}
this.$31m(this.data);var _3,_4;if(isc.isA.ResultSet(this.data)&&!(_2&&this.sortByGroupFirst)&&(_3=this.data.getSort())&&this.data.lengthIsKnown())
{_3=_3.filter(function(_7){return!_7.sortedImplicitly});_4=_3}else{_4=this.getSort()}
var _5=this.$141v||this.getGroupByFields()||isc.$ac;if(_4||(this.sortByGroupFirst&&!_5.isEmpty())){if(this.fields)this.setSort(_4);else{this.initialSort=_4;this.$166w=true}}
if(this.preserveEditsOnSetData)this.$31n();this.regroup(true);this.calculateRecordSummaries(null,null,true,true);var _6=isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown();if(!_6&&this.$686()&&!this.$30a){this.startEditing(null,null,true,null,true)}
if(this.hilites)this.applyHilites(true);if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!(this.data.allRows&&this.data.neverDropCache)&&this.body&&this.body.overflow=="visible")
{this.body.showAllRows=false}
this.$74a=0;if(!this.canExpandMultipleRecords&&this.$74b)
delete this.$74b;if(this.$75p){this.setSelectedState(this.$75p);delete this.$75p}
if(this.isEmpty()&&((isc.ResultSet&&isc.isA.ResultSet(this.data))||(isc.ResultTree&&isc.isA.ResultTree(this.data))))
{this.$1584=true}else{this.updateFieldWidthsForAutoFitValue("setData called.")}
this.$25a("setData");this.updateBodyCanFocusForData();this.dataSetChanged()},isc.A.getAutoFitExpandField=function isc_ListGrid_getAutoFitExpandField(){if(!this.autoFitFieldsFillViewport)return null;if(this.autoFitExpandField!=null){var _1=this.getField(this.autoFitExpandField);if(_1!=null&&this.fields&&this.fields.contains(_1)&&(!this.frozenFields||!this.frozenFields.contains(_1)))
{return _1}}
var _2=[],_3=[];if(this.fields){for(var i=0;i<this.fields.length;i++){var _1=this.fields[i];if(!_1.showValueIconOnly&&(_1.type==null||(isc.SimpleType.inheritsFrom(_1.type,"text")&&!isc.SimpleType.inheritsFrom(_1.type,"image"))))
{if(!this.$54d&&_1.frozen)continue;_2.add(_1);if(_1!=null&&_1.length!=null&&_1.maxWidth==null){_3.add(_1)}}}}
if(_3.length>0){_3.sortByProperty("length",Array.DESCENDING);if(_3.last().length>=this.autoFitExpandLengthThreshold||_3.length==_2.length)
{return _3[0]}}
if(_2.length>0){if(_2.filter(function(_1){return _1.maxWidth!=null}).length>0){_2.sortByProperty("minWidth",Array.DESCENDING,function(_1){return _1.maxWidth||Infinity})}
var i=0;_1=_2[i]
while(_1!=null&&((_1.width!=null&&_1.width!="*")||(_1.length!=null&&_1.length<this.autoFitExpandLengthThreshold)))
{i++;_1=_2[i]}
return _1}
return null},isc.A.updateFieldWidthsForAutoFitValue=function isc_ListGrid_updateFieldWidthsForAutoFitValue(_1){if(!this.body||this.body.$773)return;var _2=this.fields||[];for(var i=0;i<_2.length;i++){var _4=this.shouldAutoFitField(_2[i]);if(!_4)continue;var _5=this.getAutoFitWidthApproach(_2[i]);if(_5=="value"||_5=="both"){this.fields.$775=false;this.body.$773="Updating field widths for field auto-fit"+(_1?(":"+_1):".");break}}},isc.A.invalidateCache=function isc_ListGrid_invalidateCache(){var _1=this.selectionManager,_2=_1&&_1.$251n&&_1.$251n();if(!_2&&this.getCheckboxFieldPosition()!=-1){var _3=_1.defaultIsSelected;if(_3){this.selectAllRecords()}else{this.deselectAllRecords()}
this.$63m(_3)}
if(this.body&&this.body.$74k)delete this.body.$74k;if(this.$94m)delete this.$210a;try{return this.Super("invalidateCache",arguments)}finally{this.dataSetChanged()}},isc.A.dataSetChanged=function isc_ListGrid_dataSetChanged(){this.$280c();delete this.$1722},isc.A.$66c=function isc_ListGrid__canSort(_1){if(!isc.isAn.Object(_1)){_1=this.getSpecifiedField(_1)}
if(_1==null)return false;var _2=(_1.canSort==false)?false:this.canSort==false?false:true;_2=_2&&this.$91k(_1);return _2},isc.A.$91k=function isc_ListGrid__canSortData(_1){var _2=isc.isAn.Object(_1)?_1:this.getSpecifiedField(_1);if(_2==null)return false;if(isc.isAn.Array(this.data))return true;if(_2.canSortClientOnly==true){if(isc.isA.ResultSet(this.data)){if(!this.data.lengthIsKnown()||!this.data.canSortOnClient()){return false}}}
return true},isc.A.$91d=function isc_ListGrid__canMultiSort(){var _1=(this.canMultiSort!=false)&&this.canSort&&this.$91l();return _1},isc.A.$91l=function isc_ListGrid__canMultiSortData(){var _1=this.canMultiSort;if(!this.data.setSort){_1=false}else if(this.getDataSource()&&_1!=false){_1=this.getDataSource().canMultiSort&&this.canSort}
return _1},isc.A.$766=function isc_ListGrid__getFieldSortDirection(_1){var _1=isc.isAn.Object(_1)?_1:this.getSpecifiedField(_1),_2;var _3=_1?_1.sortDirection:null;if(_3!=null){_2=Array.shouldSortAscending(_3)?"ascending":"descending"}else if(this.sortDirection!=null){_2=Array.shouldSortAscending(this.sortDirection)?"ascending":"descending"}else{_2=Array.shouldSortAscending(this.$765)?"ascending":"descending"}
return _2},isc.A.createSelectionModel=function isc_ListGrid_createSelectionModel(){this.invokeSuper(isc.ListGrid,"createSelectionModel",arguments);if(isc.isA.Canvas(this.body)){this.body.setSelection(this.selectionManager);if(this.frozenBody){this.frozenBody.setSelection(this.selectionManager);this.$97c()}}},isc.A.selectionChange=function isc_ListGrid_selectionChange(_1,_2){if(this.body==null&&this.selectionChanged!=null){this.selectionChanged(_1,_2)}},isc.A.destroySelectionModel=function isc_ListGrid_destroySelectionModel(){if(this.body)this.body.clearSelection();if(this.frozenBody)this.frozenBody.clearSelection();return this.Super("destroySelectionModel",arguments)},isc.A.setSelectionType=function isc_ListGrid_setSelectionType(_1,_2){this.selectionType=_1;if(this.body)this.body.selectionType=_1;if(this.frozenBody)this.frozenBody.selectionType=_1},isc.A.setSelectionAppearance=function isc_ListGrid_setSelectionAppearance(_1,_2){if(this.selectionAppearance==_1&&!_2)return;this.selectionAppearance=_1;if(_2&&this.selectionType==null&&!this.canSelectCells){this.selectionType=(_1=="checkbox"?isc.Selection.SIMPLE:isc.Selection.MULTIPLE)}
if(this.completeFields!=null){var _3=[];for(var i=0;i<this.completeFields.length;i++){var _5=this.completeFields[i];if(this.isCheckboxField(_5))continue;_3.add(_5)}
this.setFields(_3)}},isc.A.setFetchOperation=function isc_ListGrid_setFetchOperation(_1){if(this.fetchOperation==_1)return;this.Super("setFetchOperation",arguments);if(this.hasFilteredData()&&this.discardDataOnSetFetchOperation){this.logInfo("fetch operation has changed: Current data set will be discarded");this.setData([])}},isc.A.setBodyOverflow=function isc_ListGrid_setBodyOverflow(_1){if(this.$187x){this.$187x=_1}else this.bodyOverflow=_1;if(this.body)this.body.setOverflow(this.bodyOverflow)},isc.A.$187v=function isc_ListGrid__suppressBodyOverflow(){if(this.$187x)return;var _1=this.bodyOverflow;this.setBodyOverflow(isc.Canvas.HIDDEN);this.$187x=_1},isc.A.$187w=function isc_ListGrid__restoreBodyOverflow(){var _1=this.$187x;if(_1){delete this.$187x;this.setBodyOverflow(_1)}},isc.A.setBodyStyleName=function isc_ListGrid_setBodyStyleName(_1){this.bodyStyleName=_1;if(this.body&&(!this.alternateBodyStyleName||!this.alternateRecordStyles)){this.body.setStyleName(_1)}});isc.evalBoundary;isc.B.push(isc.A.setAlternateBodyStyleName=function isc_ListGrid_setAlternateBodyStyleName(_1){this.alternateBodyStyleName=_1;if(this.body&&this.alternateRecordStyles){this.body.setStyleName(_1||this.bodyStyleName)}},isc.A.setAlternateRecordStyles=function isc_ListGrid_setAlternateRecordStyles(_1){if(this.alternateRecordStyles==_1)return;this.alternateRecordStyles=_1;if(this.body&&(this.alternateBodyStyleName!=null)){if(_1)this.body.setStyleName(this.alternateBodyStyleName);else this.body.setStyleName(this.bodyStyleName)}},isc.A.hasInherentHeight=function isc_ListGrid_hasInherentHeight(_1,_2,_3,_4){if(this.inherentHeight!=null)return this.inherentHeight;if(this.autoFitData==isc.Canvas.VERTICAL||this.autoFitData==isc.Canvas.BOTH){return true}
return this.invokeSuper(isc.ListGrid,"hasInherentHeight",_1,_2,_3,_4)},isc.A.hasInherentWidth=function isc_ListGrid_hasInherentWidth(_1,_2,_3,_4){if(this.inherentWidth!=null)return this.inherentWidth;if(this.autoFitData==isc.Canvas.HORIZONTAL||this.autoFitData==isc.Canvas.BOTH){return true}
return this.invokeSuper(isc.ListGrid,"hasInherentWidth",_1,_2,_3,_4)},isc.A.setAutoFitData=function isc_ListGrid_setAutoFitData(_1){this.autoFitData=_1;if(this.$60v&&(_1=="both"||_1=="horizontal")){delete this.$60v;delete this.canFreezeFields}
if(_1==null&&this.$58o){this.setOverflow(this.$58o)}else if(this.overflow!="visible"){this.$58o=this.overflow;this.setOverflow("visible")}
if(this.body){this.body.autoFitData=this.autoFitData;this.body.adjustOverflow()}
if(this.frozenBody){this.frozenBody.autoFitData=this.autoFitData;this.frozenBody.adjustOverflow()}},isc.A.dragResizeStart=function isc_ListGrid_dragResizeStart(){this.resizeTo(this.getVisibleWidth(),this.getVisibleHeight());this.setAutoFitData("none");return this.Super("dragResizeStart",arguments)},isc.A.setAutoFitExtraRecords=function isc_ListGrid_setAutoFitExtraRecords(_1){this.autoFitExtraRecords=_1;if(this.body){this.body.autoFitExtraRecords=_1;this.body.adjustOverflow()}},isc.A.setAutoFitMaxRecords=function isc_ListGrid_setAutoFitMaxRecords(_1){this.autoFitMaxRecords=_1;if(this.body){this.body.autoFitMaxRecords=_1;this.body.adjustOverflow();if(this.frozenBody){this.frozenBody.autoFitMaxRecords=_1;this.frozenBody.redraw()}}},isc.A.setAutoFitMaxHeight=function isc_ListGrid_setAutoFitMaxHeight(_1){this.autoFitMaxHeight=_1;if(this.body){this.body.adjustOverflow();if(this.frozenBody)this.frozenBody.redraw()}},isc.A.getAutoFitMaxBodyHeight=function isc_ListGrid_getAutoFitMaxBodyHeight(){if(this.autoFitMaxHeight==null)return null;var _1=+this.autoFitMaxHeight;if(!isc.isA.Number(_1)){this.logWarn("Could not convert autoFitMaxHeight to a number");return null}
var _2=this.getVBorderPad();if(this.showHeader)_2+=this.getHeaderHeight();if(this.showFilterEditor)_2+=this.filterEditorHeight;if(this.showGridSummary)_2+=this.summaryRowHeight;return _1-_2},isc.A.getAutoFitMinBodyHeight=function isc_ListGrid_getAutoFitMinBodyHeight(){var _1=this.getTotalMemberSpace(),_2=0;var _3=this.getGridMembers(true),_4=this.bodyLayout||this.body;for(var i=0;i<_3.length;i++){if(_3[i]==_4)continue;if(_3[i].visibility==isc.Canvas.HIDDEN)continue;_2+=_3[i].getVisibleHeight()}
return(_1-_2)},isc.A.setAutoFitMaxColumns=function isc_ListGrid_setAutoFitMaxColumns(_1){this.autoFitMaxColumns=_1;if(this.body){this.body.autoFitMaxColumns=_1;this.body.adjustOverflow()}},isc.A.setAutoFitMaxWidth=function isc_ListGrid_setAutoFitMaxWidth(_1){delete this.$185d;this.autoFitMaxWidth=_1;if(this.body){this.body.autoFitMaxWidth=_1;this.body.adjustOverflow()}},isc.A.autoFitField=function isc_ListGrid_autoFitField(_1,_2){var _3=this.getField(_1),_4=this.getFieldNum(_3);if(_3==null||_4==-1)return;var _5=this.getFieldAutoFitWidths([_3]);if(_5==null||_5[0]==null)return;this.$168j=_3;var _6=_5[0];var _7=this.shouldAutoFitField(_3);if(this.$26a&&_6!=this.$26a[_4]){this.$278j(_1,_6,!_7)}else if(!_7)_3.width=_6;if(this.$26a&&_7)_3.$776=this.$26a[_4];if(_2)this.scrollToColumn(_4,"left");if(this.headerMenuButton!=null&&this.headerMenuButton.masterIndex==_4){var _8=this.getFieldHeader(_4),_9=_8.getMember(this.getLocalFieldNum(_4));var _10=this.ns.EH;if(isc.Browser.isTouch||_9.containsPoint(_10.getX(),_10.getY()))
{_9.getScrollWidth(true);this.getHeaderMenuButton(_9)}else{this.headerMenuButton.hide()}}
delete this.$168j;return _6},isc.A.autoFitFields=function isc_ListGrid_autoFitFields(_1){if(!this.isDrawn()){this.logWarn("autoFitFields() called on undrawn grid. This will have no effect. For one-time auto-fit to drawn sizes, call this method after draw. To establish permanent auto-fit, use listGrid.autoFitFieldWidths instead.");return}
if(this.body)this.body.$773=true;this.autoSizeHeaderSpans=false;if(_1==null)_1=this.getAllCanAutoFitFields();this.$113n=true;var _2=[];for(var i=0;i<_1.length;i++){var _4=this.getField(_1[i]);if(_4!=null){delete _1[i].width;delete _1[i].$776;_2[_2.length]=_4}}
_1=_2;var _5=this.getFieldAutoFitWidths(_1,this.autoFitFieldsFillViewport);var _6=[],_7=[],_8=[];for(var i=0;i<_1.length;i++){if(_5[i]==null)continue;var _9=_5[i],_4=_1[i],_10=this.getFieldNum(_1[i]),_11=_1[i].name;var _12=this.shouldAutoFitField(_4);if(this.$26a&&_9!=this.$26a[_10]){_6[_6.length]=_10;_7[_7.length]=_9;_8[_8.length]=!_12}else if(!_12)_4.width=_9}
this.$116t(_6,_7,_8);for(var i=0;i<_6.length;i++){if(!_8[i]){var _10=_6[i];this.getField(_10).$776=this.$26a[_10]}}
this.$113n=false;if(this.frozenBody)this.frozenBody.$29d()
if(this.body)this.body.$29d();if(this.header&&this.autoFitHeaderHeights){this.dropCachedHeaderButtonHeights();this.$109d()}
var _13=this.getFieldWidths("one-time horizontal auto-fit",true);if(_13)this.setBodyFieldWidths(_13);if(this.header)this.header.$55g();if(this.body&&this.body.$773&&!this.isDirty()&&!this.body.isDirty())
{delete this.body.$773}},isc.A.getAllCanAutoFitFields=function isc_ListGrid_getAllCanAutoFitFields(){var _1=this.fields;if(_1==null||_1.length==0){return _1}
var _2=[];for(var i=0;i<_1.length;i++){if(_1[i].canAutoFitWidth==false)continue;_2.add(_1[i])}
return _2},isc.A.shouldAutoFitField=function isc_ListGrid_shouldAutoFitField(_1){if(_1.autoFit!=null)return true;if(_1.autoFitWidth!=null)return _1.autoFitWidth;return this.autoFitFieldWidths},isc.A.getMinFieldWidth=function isc_ListGrid_getMinFieldWidth(_1,_2){var _3=this.minFieldWidth||1;if(!_2){var _4=_1.width;if(isc.isA.Number(_4)){_3=Math.max(_3,_1.width)}}
if(_1.minWidth!=null){_3=Math.max(_3,_1.minWidth)}
var _5=_1.name;if(this.showRecordComponents&&!this.clipRecordComponents&&(this.$1167&&this.$1167[_5]))
{var _6=this.$1169(_5);if(_6>_3){_3=_6}}
return _3},isc.A.$1169=function isc_ListGrid__getFieldComponentMaxWidth(_1){var _2=this.getField(_1);if(_2==null)return 0;if(_2.$117a!=null)return _2.$117a;var _3=this.$1167[_1];var _4=0;for(var _5 in _3){var _6=window[_5];if(_6&&(_6.embeddedPosition==this.$57l)&&(_6.getVisibleWidth()>_4))
{_4=_6.getVisibleWidth()}}
_2.$117a=_4;return _4},isc.A.$1168=function isc_ListGrid__fieldComponentWidthsChanged(_1,_2){var _3=this.getField(_1);if(_3){if(_2)_3.$117a=_2;else delete _3.$117a;if(this.$1173==null){this.$1173={}}
this.$1173[_1]=true;this.fireOnPause("checkFieldComponentOverflow",{target:this,methodName:"$1174"},0)}},isc.A.$1174=function isc_ListGrid__checkFieldComponentOverflow(){if(this.fields==null)return;var _1=this.$26a||this.getFieldWidths(),_2=[],_3=[],_4=[],_5=false;for(var i=0;i<this.fields.length;i++){var _7=this.fields[i].name;if(!this.$1173[_7])continue;this.$1173[_7]=null;var _8=this.getMinFieldWidth(this.fields[i]);if(_8>_1[i]){_2.add(i);_3.add(_8);_4.add(false)}}
if(_2.length>0){this.$116t(_2,_3,_4)}},isc.A.getFieldAutoFitWidths=function isc_ListGrid_getFieldAutoFitWidths(_1,_2){if(this.body==null||_1==null)return;if(!isc.isA.Array(_1)){_1=[_1]}
var _3=[],_4=[],_5=[];var _6=[],_7=[];for(var i=0;i<_1.length;i++){var _9=_1[i],_10=this.getColNum(_9),_11=this.getAutoFitWidthApproach(_9,true),_12=_11!="value",_13=_11!="title";_4[i]=_10;_3[i]=_5[i]=this.getMinFieldWidth(_1[i],true);if(_12){var _14=this.getFieldHeaderButton(_10);if(_14!=null)_6[i]=_14}
if(_13){_7.add(_9)}}
if(_6.length>0){var _15=this.getAutoFitTitleWidths(_6);for(var i=0;i<_15.length;i++){if(_15[i]==null)continue;_3[i]=Math.max(_3[i],_15[i])}}
if(_7.length>0){var _16=this.getAutoFitValueWidths(_7);for(var i=0;i<_1.length;i++){if(_4[i]!=null){var _10=_4[i],_17=_16?_16[_10]:null;if(_17!=null){if(_3[i]==null||_17>_3[i]){_3[i]=_17}}}}}
if(_2){var _18=0,_19=0,_20,_21=this.getAutoFitExpandField(),_22=this.fields.indexOf(_21),_23=_4.contains(_22);if(_23){for(var i=0;i<this.fields.length;i++){var _24,_25=_4.indexOf(i);if(_25>=0){_24=_3[_25]}else{_24=this.$26a[i];if(_24==null){_23=false;break}}
if(this.fields[i].frozen){_18+=_24}else{_19+=_24}}
if(_23){_20=this.getAvailableFieldWidth(true)-_18;_23=_19<_20}
if(_23){var _25=_4.indexOf(_22);_3[_25]+=_20-_19}}}
for(var i=0;i<_1.length;i++){var _9=_1[i],_26=_9.maxWidth;if(_26==null)continue;if(_3[i]>_26)_3[i]=Math.max(_5[i],_26)}
return _3},isc.A.getAutoFitTitleWidths=function isc_ListGrid_getAutoFitTitleWidths(_1){var _2="",_3={};for(var i=0;i<_1.length;i++){if(_1[i]==null){_3[i]=true;continue}
var _5=_1[i],_6=_5.titleStyle;if(_6==null)_6=_5.getStateName();_2+=_5.$160g(this.getHeaderButtonTitle(_5,false))}
if(this.logIsDebugEnabled("autoFitFieldWidths")){this.logDebug("Auto Fit Title test HTML:\n"+_2,"autoFitFieldWidths")}
if(isc.ListGrid.headerWidthsTester==null){isc.ListGrid.headerWidthsTester=isc.Canvas.create({top:-100,width:1,autoDraw:true,overflow:"hidden",contents:_2,ariaState:{hidden:true}})}else{isc.ListGrid.headerWidthsTester.setContents(_2)}
if(!isc.ListGrid.headerWidthsTester.isDrawn()){isc.ListGrid.headerWidthsTester.draw()}
if(isc.ListGrid.headerWidthsTester.isDirty()){isc.ListGrid.headerWidthsTester.redraw()}
var _7=isc.ListGrid.headerWidthsTester.getHandle(),_8=_7.childNodes;var _9=[];for(var i=0,j=0;i<_1.length;i++){if(_3[i]){_9[i]=null;continue}
var _11=_8[j];if(isc.Browser.isChrome||isc.Browser.isMoz||isc.Browser.isIE9){var _12=_11.getBoundingClientRect();if(!isc.Browser.isIE||isc.Browser.isIE10){_9[i]=Math.ceil(_12.width)}else{_9[i]=(_12.width+1)<<0}}else{_9[i]=Math.ceil(_11.offsetWidth)}
j++}
if(_9.length!=_1.length){this.logWarn("getAutoFitTitleWidths(): Mismatch between headers passed in and calculated widths","autoFitFieldWidths")}
return _9},isc.A.setAutoFitWidth=function isc_ListGrid_setAutoFitWidth(_1,_2){var _3=this.getField(_1);if(_3==null)return;if(_3.autoFitWidth==_2)return;_3.autoFitWidth=_2;if(_2)this.autoFitField(_3)},isc.A.setAutoFitFieldWidths=function isc_ListGrid_setAutoFitFieldWidths(_1,_2){if(_1==this.autoFitFieldWidths)return;this.autoFitFieldWidths=_1
if(_1){this.$45m("autoFitFieldWidths enabled")}else if(!_2){if(this.showHeader&&this.headerHeight>0)this.updateHeader();this.fields.$775=false;this.$45m("autoFitFieldWidths disabled")}},isc.A.setAutoFitWidthApproach=function isc_ListGrid_setAutoFitWidthApproach(_1){if(this.autoFitWidthApproach==_1)return;this.autoFitWidthApproach=_1;if(this.showHeader&&this.headerHeight>0)this.updateHeader();this.fields.$775=false;this.$45m("autoFitFieldWidthApproach changed")},isc.A.$25a=function isc_ListGrid__markBodyForRedraw(_1){if(this.bodies){this.bodies.callMethod("markForRedraw",_1)}else if(this.body){this.markForRedraw(_1)}},isc.A.redraw=function isc_ListGrid_redraw(_1,_2,_3,_4){if(this.body){if(this.body.$30e){this.$45m("scrollbar change during animation");delete this.body.$30e}}
this.invokeSuper(isc.ListGrid,"redraw",_1,_2,_3,_4)},isc.A.$31m=function isc_ListGrid__observeData(_1){this.Super("$31m",arguments);var _2=isc.ResultSet&&isc.isA.ResultSet(_1);if(!this.isObserving(_1,"dataChanged")){if(_2){this.observe(_1,"dataChanged",function(_3,_4,_5,_6,_7,_8){this.dataChanged(_3,_4,_5,_6,_7,_8)})}else if(isc.ResultTree&&isc.isA.ResultTree(_1)){this.observe(_1,"dataChanged",function(_3){this.dataChanged(_3||_1.$192s)})}else{this.observe(_1,"dataChanged",function(){this.dataChanged()})}}
if(!this.isObserving(_1,"dataArrived")){if(_2){this.observe(_1,"dataArrived",function(_3,_4,_5){this.$66d(_3,_4,_5)})}else if(isc.ResultTree&&isc.isA.ResultTree(_1)){this.observe(_1,"dataArrived",function(_3){this.$66d(_3)})}}
if(!this.isObserving(_1,"rowCountFetchComplete")&&_2){this.observe(_1,"rowCountFetchComplete",function(){this.rowRangeDisplayValueChanged("Row Count Fetch Complete")})}
if(isc.isA.Tree(_1)){this.observe(_1,"changeDataVisibility",function(_3,_4){this.$34u(_3,_4)})}
if(this.hiddenResultSet)this.hiddenResultSet.destroy();if(isc.isAn.Array(_1)&&this.filterLocalData&&this.dataSource&&isc.isAn.DataSource(this.dataSource)){this.hiddenResultSet=isc.ResultSet.create({dataSource:this.dataSource,allRows:_1})}},isc.A.groupTreeDataChanged=function isc_ListGrid_groupTreeDataChanged(){if(this.$67i)return;if(!this.$31o&&!this.suppressEditRowRemap)this.$31n();var _1=this.getTotalRows()-1;if(this.body){if(this.body.lastOverRow>_1)delete this.body.lastOverRow;if(this.body.lastMouseOverRow>_1)delete this.body.lastMouseOverRow;if(this.body.$31p>_1){delete this.body.$31p;delete this.body.$237t}}
if(this.$31q>_1)delete this.$31q;if(this.hilites)this.applyHilites(true);if(!this.$50w)this.markForRedrawDataChanged()},isc.A.$606=function isc_ListGrid__observeGroupData(_1){this.observe(_1,"dataChanged",function(_2){if(_2!="fieldGeneration")this.groupTreeDataChanged()});this.observe(_1,"changeDataVisibility",function(_2,_3){this.$34u(_2,_3)})},isc.A.$34u=function isc_ListGrid__folderToggleObservation(_1,_2){if(_1!=null&&_2){var _3=this.data.getLoadState(_1);if(_3==isc.Tree.FOLDERS_LOADED||_3==isc.Tree.LOADED||_3==isc.Tree.LOADED_PARTIAL_CHILDREN)
{this.calculateRecordSummaries(null,null,true,true,false,true);if(this.data.$264n){this.$264o=true}
else this.applyHilites(true)}}
if(this.$34v){this.$264p();return}
if(this.body)this.body.finishRowAnimation();this.$264p();this.$25a('folderToggled')},isc.A.$264p=function isc_ListGrid___folderToggleObservation(){if(this.data&&this.data.$264n){this.$264q=true;return}
this.$31n();this.updateFieldWidthsForAutoFitValue("Folder Toggled")},isc.A.$264r=function isc_ListGrid__applyBatchedFolderOperations(){if(this.$264o){delete this.$264o;this.applyHilites(true)}
if(this.$264q){delete this.$264q;this.$264p()}},isc.A.toggleFolder=function isc_ListGrid_toggleFolder(_1){var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
if(this.data.isOpen(_2||_1)){this.closeFolder(_2||_1)}else{this.openFolder(_2||_1);var _3=this.data.getLoadState(_1);if(_3==isc.Tree.LOADING){var _4=this.getRecordIndex(_1);if(_4>=0)this.refreshCell(_4,this.$34t)}
if(this.frozenBody)this.frozenBody.markForRedraw()}},isc.A.openFolder=function isc_ListGrid_openFolder(_1,_2){var _3;if(this.data.isMultiLinkTree()){if(this.data.isANodeLocator(_1)){_3=_1;_1=_3.node}else{_3=this.data.createNodeLocator(_1,null,null,_2)}}
if(this.folderOpened!=null){this.convertToMethod("folderOpened");if(this.folderOpened(_3||_1)==false)return false}
if(this.animateFolders){this.animateOpen(_3||_1)}else{this.data.openFolder(_3||_1)}},isc.A.animateOpen=function isc_ListGrid_animateOpen(_1){var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
var _3=this.data;if(_3.isOpen(_2||_1))return;this.$34v=true;_3.openFolder(_2||_1);delete this.$34v;if(_3.isMultiLinkTree()){if(!_2){this.logWarn("In LG.animateOpen(), we have a multiLinkTree but we were not passed a nodeLocator.  Assuming parent is open.")}else{var _4=_3.$202h(_2);if(!_3.isOpen(_4))return}}else{var _5=_3.getParent(_2||_1);if(_5&&!_3.isOpen(_5))return}
var _6=_3.getLoadState(_1);if(_6!=isc.Tree.LOADED&&_6!=isc.Tree.LOADED_PARTIAL_CHILDREN){this.$34z=_2||_1;return}
this.$340(_2||_1)},isc.A.closeFolder=function isc_ListGrid_closeFolder(_1){var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
if(this.folderClosed!=null){this.convertToMethod("folderClosed");if(this.folderClosed(_1)==false)return false}
if(this.getEditRow()!=null){var _3=this.getRecord(this.getEditRow());if(this.data.isDescendantOf(_3,_1))this.endEditing()}
if(this.shouldAnimateFolder(_2||_1))
this.animateClose(_2||_1);else
this.data.closeFolder(_2||_1)},isc.A.animateClose=function isc_ListGrid_animateClose(_1){var _2,_3=this.data;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
if(!_3.isOpen(_2||_1))return;if(_3.isMultiLinkTree()){if(!_2){this.logWarn("In LG.animateOpen(), we have a multiLinkTree but we were not passed a nodeLocator.  Assuming parent is open.")}else{var _4=_3.$202h(_2);if(!_3.isOpen(_4)){return this.closeFolder(_2)}}}else{var _5=_3.getParent(_2||_1);if(_5&&!_3.isOpen(_5)){return this.closeFolder(_1)}}
var _3=this.data,_6=_3.indexOf(_2||_1),_7=_3.getOpenList(_2||_1).getLength()-1;this.startRowAnimation(false,_6+1,_6+_7+1,{target:this,methodName:"redraw",args:["close folder animation complete"]},this.animateFolderSpeed,this.animateFolderTime,this.animateFolderEffect,true);var _8=this.$34v;this.$34v=true;this.data.closeFolder(_2||_1);this.$34v=_8;if(this.body&&this.body.$279!=null){if(this.data.isMultiLinkTree()&&_2){this.body.$34y=_2}else{this.body.$34y=_1}}
if(this.frozenBody&&this.frozenBody.$279!=null){if(this.data.isMultiLinkTree()&&_2){this.frozenBody.$34y=_2}else{this.frozenBody.$34y=_1}}},isc.A.$340=function isc_ListGrid__startFolderAnimation(_1){var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
if(!this.shouldAnimateFolder(_2||_1)){this.markForRedraw();return}
var _3=this.data,_4=_3.indexOf(_2||_1),_5=_3.getOpenList(_2||_1).getLength()-1;if(_4<0||_5<=0)return;this.startRowAnimation(true,_4+1,(_4+_5+1),{target:(this.bodyLayout||this.body),methodName:"redraw",args:["open folder animation complete"]},this.animateFolderSpeed,this.animateFolderTime,this.animateFolderEffect,true)},isc.A.$45q=function isc_ListGrid__addNodeToOpenState(_1,_2,_3,_4){if(!_1.isOpen(_2)||!_1.isLoaded(_2))return false;var _5=_1.getFolders(_2),_6=false;if(_5!=null){for(var i=0;i<_5.length;i++){_6=this.$45q(_1,_5[i],_3,_4)||_6}}
if(_4){var _8={};_8[_2.groupName]=_2.groupValue;_3.add(_8)}else{_3[_3.length]=_1.getPath(_2)}
return true},isc.A.$134c=function isc_ListGrid__getDataChangedRecord(_1,_2,_3){if(_1==null&&_2==null)return;if(_3=="remove")return null;var _4=this.data;if(this.data.isGroupedOutput&&this.originalData)_4=this.originalData;var _5=_4.get(_2);if(_5==null&&_1==null)return null;if(_1!=null){var _6=this.dataSource!=null?this.getDataSource().getPrimaryKeyFieldNames():[];var _7=_5==null;if(!_7){for(var i=0;i<_6.length;++i){if(_1[_6[i]]!=_5[_6[i]]){_7=true;break}}}
if(_7){_5=null;if(_3=="update"){_2=_4.indexOf(_1);if(_2!=-1){_5=_4.get(_2)}}}}
return _5},isc.A.dataChanged=function isc_ListGrid_dataChanged(_1,_2,_3,_4,_5,_6){this.$253v(_1,_2,_3,_4,_5,_6);if(this.dataChangedComplete!=null)this.dataChangedComplete(_1)},isc.A.$253v=function isc_ListGrid__dataChanged(_1,_2,_3,_4,_5,_6){if(isc.$cv)arguments.$cw=this;if(this.$166x)return;this.$67i=true;if(this.summaryRow&&this.getSummaryRowDataSource()!=null&&_1!="fetch"){var _7=this.ns.RPCManager,_8=this.summaryRow,_9=_7&&_7.$210b;if(_9==null||_9!=_8.$210a){_8.invalidateCache();_8.$210a=_9;_8.setCriteria(this.getSummaryRowCriteria())}}
var _10=this.logIsDebugEnabled("recordComponents");var _11=isc.isAn.Array(this.getOriginalData())||(_5||_1=="add"||_1=="remove");if(!_11&&_1=="replace"){if(_2==null||_3==null)_11=true;else{var _12=this.getOriginalData().get(_3);if(_12==null)_11=true;else{for(var i=0;i<this.fields.length;i++){if(this.shouldAutoFitField(this.fields[i])){var _14=this.getFieldName(this.fields[i]);if(_12[_14]!=_4[_14]){_11=true;break}}}}}}
var _15=false;var _16=(this.$141v||this.getGroupByFields());if(_16!=null&&!this.$52y){var _17=false;var _18=_1=="add",_19=!_18&&(_1=="remove"),_20=!_18&&!_19&&(_1=="update");var _12;if(_19){if(_2==null)_17=true}else if(_18||_20){if(_2==null)_18=true;_12=this.$134c(_2,_3,_1);if(_12==null){if(!_18){_19=true}else{_17=true}}}else if(_1=="replace"||_5||!this.groupTree){_17=true}
if((_18||_19||_20)&&!_17){var _21=false;this.calculateRecordSummaries(_12,null,false);var _22=this.getDataSource().getPrimaryKeyFieldNames(),_23={};if(this.logIsInfoEnabled("grouping")){this.logInfo("dataChanged(): Attempting incremental regroup for operation type:"+_1+" will be treated as a[n] "+(_18?"add":_19?"remove":"update"),"grouping")}
if(_18){this.$607(_12,null)}else{for(var i=0;i<_22.length;i++){_23[_22[i]]=(_19?_2[_22[i]]:_12[_22[i]])}
var _24=this.data.findAll(_23);if(_24!=null){_24.removeWhere("$52e",true)}
if(!_24||_24.length!=1){_17=true}else{var _25=_24[0];if(_19){this.$607(null,_25)}else{var _26=this.$2254();var _25=_24[0];for(var i=0;i<_16.length;i++){var _27,_14=_16[i];var _28=this.getUnderlyingField(_14),_29=this.$1589(_12[_14],_12,_28,_14),_30=this.$1589(_2[_14],_2,_28,_14);if(_29!=_30){this.$31n();this.$607(_12,_25,_4);_15=true;this.$113a=true;break}}
if(_25!==_12){isc.FieldGeneratorUtil.$2813(_25,_12,this)}
_25[this.$92e+this.ID]=null;_21=true;if(!_15){_15=true;this.refreshGroupSummary(_25)}
var _31=this.data.getSort();if(_31!=null){this.data.setSort(_31)}}}}
if(_21&&this.hilites)this.applyHilites(true)}
if(_17){this.$122o(true,false,false,false,true,_16)}}
var _32=this.$73p;if(_32!=null&&_32.length>0){var _33=this.getOriginalData();if(isc.isA.ResultSet(_33)&&((_33.shouldUpdatePartialCache()&&!_33.allMatchingRowsCached())||!_33.canSortOnClient())&&(_1=="replace"||_1=="update"||_1=="add"))
{if(_2==null||_3==null){this.unsort(true)}else{var _12=this.$134c(_2,_3,_1);if(_12==null){this.unsort()}else{this.$338(_12,_2)}}}else{if(this.filterLocalData&&!this.data.$126f&&this.data.resort){this.data.resort()}}}
if(this.filterLocalData){var _34=this.getOriginalData();if(_34.filterLocalData){this.$166x=true;_34.filterLocalData();delete this.$166x}}
if(this.$52y&&(!this.isGrouped||!this.$31o)&&(!isc.isA.ResultSet(this.data)||this.data.lengthIsKnown()))
{this.$75p=this.getSelectedState(true);this.regroup()}else if(this.$1097&&!this.$193j){var _35=this.$1749,_36;if(_35){_36=_35.groupByFields||_35.groupByField}else{_36=this.groupByFields||this.$141v}
if(this.logIsInfoEnabled("grouping")){this.logInfo("dataChanged() occurred while asynchronous regrouping in progress. Restarting grouping with fields:"+_36,"grouping")}
this.groupBy(_36)}
if(this.body)this.body.finishRowAnimation();if(!this.$31o){if(!this.suppressEditRowRemap)this.$31n();if(this.$30a){var _37=this.getEditForm(),_38=this.getEditRow(),_39=this.getRecord(_38),_40={};if(isc.isA.Tree(this.data)){_39=this.data.getCleanNodeData(_39,false)}
if(_37&&_39!=null){for(var _14 in _39){if(this.$30y(_38,_14,true)!=null)continue;var _41=_37.getItem(_14),_42=_41?_41.getValue():null;if(_41&&!_41.compareValues(_42,_39[_14])&&!_41.compareValues(_41.$160w(),_42))
{continue}
_40[_14]=_39[_14]}
this.$50r(_38,this.getEditCol(),_40);var _43=_37.$10s;var _44={};isc.DynamicForm.$91f(_37,_40,_44);for(var _14 in _40){_43[_14]=_44[_14]}}}}
var _45=this.$92m(_2);if(!isc.isA.ResultSet(this.data)||this.data.lengthIsKnown()){this.$74c()}
if(this.$686()&&!this.$30a){this.startEditing(null,null,true,null,true)}
var _46=this.getTotalRows()-1;if(this.body){if(this.body.lastOverRow>_46)delete this.body.lastOverRow;if(this.body.lastMouseOverRow>_46)delete this.body.lastMouseOverRow;if(this.body.$31p>_46){delete this.body.$31p;delete this.body.$237t}}
if(this.$31q>_46)delete this.$31q;var _47=null;if(_1=="update"){_47=_4}else if(_1!="update"&&_1!="remove"){_47=this.$134c(_2,_3,_1)}
if(_15){if(this.summaryRow&&this.showGridSummary)this.summaryRow.$855()}else{this.calculateRecordSummaries(_47,null,true,true,_1=="remove"||_1=="fieldGeneration",_1!=null&&_1!="fetch"&&_1!="update",false,this.$81l)}
if(this.hilites)this.applyHilites(true);if(!this.$50w){if(_11)this.updateFieldWidthsForAutoFitValue(this.$81l);var _48=true;if(!this.forceRedrawOnDataChanged&&_1=="update"&&_2!=null){var _49=this.data.indexOf(_2);if(_49!=null&&_49!=-1&&_49==_3){if(_10){this.logDebug("dataChanged running refreshRow("+_49+")","recordComponents")}
this.refreshRow(_49,_45);_48=false}}
if(_48)this.markForRedrawDataChanged()}else{if(_45)this.updateRecordComponents()}
this.rowRangeDisplayValueChanged("source grid dataChanged");if(isc.Canvas.ariaEnabled()&&this.updateAriaForDataChanged){this.updateAriaForDataChanged()}
if(_2&&_1=="remove"){delete _2["_async_"+this.ID]}
delete this.$67i;this.updateBodyCanFocusForData();this.$2247();if(_5)this.$178p()},isc.A.$122o=function isc_ListGrid__setMarkForRegroup(_1,_2,_3,_4,_5,_6,_7){var _8=this.$52y;if(_2){this.$122p=_6;this.$141w=true;this.$141v=_7}else if(_3){if(_8&&!_1){this.$122q=this.$122p;delete this.$122p;delete this.$141w;delete this.$141v}}else if(_4){delete this.$141w;delete this.$141v;delete this.$122p;delete this.$122q}
this.$52y=_1},isc.A.markForRedrawDataChanged=function isc_ListGrid_markForRedrawDataChanged(){if(this.frozenBody)this.frozenBody.$1055=true;this.$25a(this.$81l)},isc.A.$1107=function isc_ListGrid__forceUpdateFieldWidths(_1){if(this.body&&this.fields){this.body.$773=_1==null?true:_1;delete this.fields.$775}},isc.A.$66d=function isc_ListGrid__dataArrived(_1,_2){var _3=this.$60z();if(this.$1584||_1==0){this.$1584=false;if(this.body&&this.body.isDrawn())this.$1107(this.$191c)}
if(_3!=null&&_3!=-1){var _4=this.getFieldNum(_3),_5=this.getField(_4);if(_5&&_5.canSortClientOnly&&!this.$91k(_5)){this.$600(null);if(_3!=null&&this.header&&isc.isA.Toolbar(this.header)){this.header.deselectButton(_3);var _6=this.header.getButton(_3);if(_6)_6.setTitle(this.getHeaderButtonTitle(_6))}
if(this.sorter&&this.sorter.setTitle)this.sorter.setTitle(this.sorter.getTitle())}}
if(!(this.canSelectAll==false)&&this.getCurrentCheckboxField()){var _7=this.getCheckboxFieldPosition(),_5=this.getField(_7);if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.allMatchingRowsCached())
{var _8={disabled:true,showHover:true,prompt:this.selectionManager.selectionRangeNotLoadedMessage,title:(this.selectionType=="single")?isc.nbsp:this.$116w(false,false,true,true,_5)}}else{var _8={disabled:false,showHover:false,prompt:null,title:(this.selectionType=="single")?isc.nbsp:this.$116w(false,false,true,false,_5)}}
var _9=_5&&_5.disabled&&!_8.disabled;this.setFieldProperties(_7,_8);if(_9)this.updateCheckboxHeaderState()}
if(isc.screenReader&&this.body!=null){if(isc.isA.Tree(this.data)){var _10=_1;if(this.data.isOpen(_10)&&this.data.hasChildren(_10)){var _11=this.data.getChildren(_10);if(_11&&!_11.isEmpty())_10=_11.first()}
var _12=this.data.indexOf(_10);var _13=this.$32b(),_14=this.getFieldBody(_13),_15=this.getLocalFieldNum(_13);_14.$86a(_12,_15,!this.hasFocus)}}
if(this.$163a){this.$774(this.$163b,this.$163c);this.$163b=null;this.$163c=null;this.$163a=false}
this.$187w();if(!this.$67i){this.$25a()}
this.$131t=true;this.dataArrived(_1,_2);delete this.$131t;this.updateBodyCanFocusForData();if(this.data){if(isc.isA.ResultSet(this.data)){if(this.data.$178q){if(this.$178r){this.$178r()}
delete this.data.$178q}}else if(isc.isA.ResultTree(this.data)){this.$178r()}}});isc.evalBoundary;isc.B.push(isc.A.updateBodyCanFocusForData=function isc_ListGrid_updateBodyCanFocusForData(){if(this.body&&!this.canFocusInEmptyGrid){var _1=this.isEmpty();if(_1!=this.$1672){this.body.$ur();if(this.frozenBody!=null)this.frozenBody.$ur();this.$ur();this.$1672=_1}}},isc.A.$31j=function isc_ListGrid__ignoreData(_1,_2){if(this.body)this.body.finishRowAnimation();if(isc.isA.Tree(_1))this.ignore(_1,"changeDataVisibility");this.ignore(_1,"dataChanged");if(this.isObserving(_1,"dataArrived")){this.ignore(_1,"dataArrived")}
if(!_2&&this.selectionManager){var _3=this.selectionManager.getSelection();this.selectionManager.deselectAll();if(_3&&_3.length>0){this.fireSelectionUpdated()}}
this.Super("$31j",arguments)},isc.A.applyDefaultShowIf=function isc_ListGrid_applyDefaultShowIf(_1){if(_1==null)return;for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3.hidden&&_3.showIf==null)_3.showIf="false";if(_3.showIf==null&&((isc.Browser.isTablet&&_3.hideOnTablet!=null)||(isc.Browser.isHandset&&_3.hideOnPhone!=null)))
{_3.showIf=this.$2109()}}},isc.A.applyFieldDefaults=function isc_ListGrid_applyFieldDefaults(_1){if(_1==null)return;var _2=this.getID();for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4==null)continue;var _5=_4.rotateTitle=_4.rotateTitle||this.rotateHeaderTitles&&_4.rotateTitle!=false;if(_4.componentID==null)_4.componentID=_2;if(!this.allowNamelessFields&&_4.name==null){if(_4.dataPath==null){this.logWarn("unable to process field with no name / dataPath:"+this.echo(_4));continue}
_4.name="field"+this.$70q++}
var _6=(this.isRTL()&&!this.reverseRTLAlign)?isc.Canvas.RIGHT:isc.Canvas.LEFT;var _7=this.getFieldDisplayType(_4),_8=(_7!=null?isc.SimpleType.getBaseType(_7):null);if(_4.userFormula||_4.userSummary){for(var _9 in this.formulaFieldDefaultAttributes){if(_4[_9]==null){_4[_9]=this.formulaFieldDefaultAttributes[_9]}}}
if(isc.SimpleType.inheritsFrom(_7,"binary")){if(_4.canEdit){this.logWarn("Binary Field "+_4.name+" is specified as canEdit:true. Inline grid editing is not supported for binary fields. Marking this field as canEdit:false.")}
_4.canEdit=false}
if(isc.SimpleType.inheritsFrom(_7,"image")){_4.$31r=this.$30s}else if(_8==this.$gx){if(_4.width==null&&_4.length!=null){if(_4.length<15&&!_4.valueMap){_4.width=Math.max(_4.length*7,this.minFieldWidth||1,_4.minWidth||1)}}}else if(_8=="integer"||_8=="float"){var _10=_4.valueMap!=null&&!isc.isAn.Array(_4.valueMap),_11=(this.isRTL()&&!this.reverseRTLAlign);_6=_10?(_11?isc.Canvas.RIGHT:isc.Canvas.LEFT):(_11?isc.Canvas.LEFT:isc.Canvas.RIGHT);_4.$31r=this.$30n}else if(_8=="date"||_8=="datetime"){if(_4.width==null&&_4.autoFitWidth==null&&this.autoFitDateFields!="none")
{_4.autoFitWidth=true;_4.autoFitWidthApproach=this.autoFitDateFields}
_6=(this.isRTL()&&!this.reverseRTLAlign)?isc.Canvas.LEFT:isc.Canvas.RIGHT;_4.$31r=this.$30m}else if(_8=="time"){if(_4.width==null&&_4.autoFitWidth==null&&this.autoFitTimeFields!="none")
{_4.autoFitWidth=true;_4.autoFitWidthApproach=this.autoFitTimeFields}
_4.$31r=this.$30p;_6=(this.isRTL()&&!this.reverseRTLAlign)?isc.Canvas.LEFT:isc.Canvas.RIGHT}else if(_7=="binary"||_7=="blob"||_7=="upload"||_7=="imageFile"){_4.$31r=this.$30q}else if(_7=="link"){_4.$31r=this.$30r}else if(_7=="icon"){if(_4.width==null&&_4.autoFitWidth==null){if(this.autoFitIconFields!="none"){_4.autoFitWidth=true;_4.autoFitWidthApproach=(this.autoFitIconFields=="title"&&!_5)?"both":"value"}}
_4.align=_4.align||"center";_4.$31r=this.$59e;_4.title=_4.title||isc.nbsp}else if(_7=="boolean"||_7=="checkbox"){if(_4.canToggle==null)_4.canToggle=true}
if(_4.formatCellValue!=null&&!isc.isA.Function(_4.formatCellValue))
isc.Func.replaceWithMethod(_4,"formatCellValue","value,record,rowNum,colNum,grid");if(this.showValueIconOnly(_4)){_6=isc.Canvas.CENTER;_4.iconSpacing=0;if(_4.width==null&&_4.autoFitWidth==null){if(this.autoFitIconFields!="none"){_4.autoFitWidth=true;_4.autoFitWidthApproach=(this.autoFitIconFields=="title"&&!_5)?"both":"value"}}}else if(_4.icon!=null&&_4.showTitle==false){_4.iconSpacing=0}
if(_5){if(!_4.align){_4.align=isc.Canvas.CENTER;if(!_4.cellAlign)_4.cellAlign=_6}}
if(!_4.valign){if(this.headerTitleVAlign!=null)_4.valign=this.headerTitleVAlign;else if(_5)_4.valign="bottom"}
if(!_4.align)_4.align=_6;if(_4.multiple&&_4.validateEachItem==null)_4.validateEachItem=true;if(_4.recordClick){isc.Func.replaceWithMethod(_4,"recordClick","viewer,record,recordNum,field,fieldNum,value,rawValue")}}},isc.A.getDisplayField=function isc_ListGrid_getDisplayField(_1){var _2=_1.displayField;if(_2!=null){var _3=_1.optionDataSource?isc.DataSource.get(_1.optionDataSource):null;if(_3!=null)_2=_3.getField(_2);else{_2=this.getField(_2);if(_2==null&&this.dataSource!=null){_2=this.getDataSource().getField(_1.displayField)}}}
return _2},isc.A.getFieldDisplayType=function isc_ListGrid_getFieldDisplayType(_1){var _2=this.getDisplayField(_1),_3;if(_2!=null)_3=_2.type;if(_3==null)_3=_1.type;return _3},isc.A.$31s=function isc_ListGrid__formatBooleanFieldAsImages(_1){if(this.booleanTrueImage==null&&this.booleanFalseImage==null)return false;var _2=this.getFieldDisplayType(_1),_3=(_2!=null?isc.SimpleType.getBaseType(_2):null);if(_3!=this.$g2)return false;return(!_1.suppressValueIcon&&_1.showValueIconOnly==null&&_1.valueIcons==null&&_1.formatCellValue==null)},isc.A.setFieldProperties=function isc_ListGrid_setFieldProperties(_1,_2){var _3,_4=this.getAllFields();var _5=_1;if(isc.isA.Number(_1)){_3=this.getField(_1)}else{var _6=isc.Class.getArrayItemIndex(_1,_4,"name");_3=_4[_6];_1=this.getFieldNum(_3)}
if(!_3)return;for(var _7 in _2){if(_7=="operator"){this.setFieldProperty(_3,_7,_2[_7]);delete _2[_7]}}
isc.FieldGeneratorUtil.$275s(this,_3,_2);isc.addPropertiesWithAssign(_3,_2);if(this.header!=null&&this.header.isDrawn()){var _8=this.getFieldHeader(_1),_9=_8.getMember(this.getLocalFieldNum(_1));if(_9)_9.setProperties(_2)}},isc.A.setFieldMinWidth=function isc_ListGrid_setFieldMinWidth(_1,_2){this.setFieldProperties(_1,{minWidth:_2});var _3=this.fieldIsFrozen(_1)?this.frozenBody:this.body;if(_3)_3.$773=true},isc.A.setFieldMaxWidth=function isc_ListGrid_setFieldMaxWidth(_1,_2){this.setFieldProperties(_1,{maxWidth:_2});var _3=this.fieldIsFrozen(_1)?this.frozenBody:this.body;if(_3)_3.$773=true},isc.A.setMinFieldWidth=function isc_ListGrid_setMinFieldWidth(_1){this.minFieldWidth=_1;if(this.body)this.body.$773=true;if(this.frozenBody)this.frozenBody.$773=true},isc.A.setFieldTitle=function isc_ListGrid_setFieldTitle(_1,_2){this.setFieldProperties(_1,{title:_2})},isc.A.setFieldHeaderBaseStyle=function isc_ListGrid_setFieldHeaderBaseStyle(_1,_2){var _3=this.getField(_1);if(_3==null){this.logWarn("setFieldHeaderBaseStyle() unable to find field:"+_1);return}
_3.headerBaseStyle=_2;var _4=this.getFieldHeaderButton(this.getFieldNum(_3));if(_4!=null){if(_2==null){var _5=this.getHeaderButtonProperties();if(_3.frozen&&_5.frozenBaseStyle){_2=_5.frozenBaseStyle}else if(_5.baseStyle){_2=_5.baseStyle}}
if(_2==null){_2=_4.getClass().getPrototype().baseStyle}
_4.setBaseStyle(_2)}},isc.A.setFieldHeaderTitleStyle=function isc_ListGrid_setFieldHeaderTitleStyle(_1,_2){var _3=this.getField(_1);if(_3==null){this.logWarn("setFieldHeaderTitleStyle() unable to find field:"+_1);return}
_3.headerTitleStyle=_2;var _4=this.getFieldHeaderButton(this.getFieldNum(_3));if(_4!=null){if(_2==null){var _5=this.getHeaderButtonProperties();if(_3.frozen&&_5.frozenTitleStyle){_2=_5.frozenTitleStyle}else if(_5.titleStyle){_2=_5.titleStyle}}
if(_2==null){_2=_4.getClass().getPrototype().titleStyle}
_4.setTitleStyle(_2)}},isc.A.setFieldIcon=function isc_ListGrid_setFieldIcon(_1,_2){var _3=this.getField(_1);this.setFieldProperties(_1,{icon:_2});if(_3&&_3.type=="icon"&&_3.cellIcon==null){delete _3.$59f
this.body.markForRedraw("Field icon changed")}},isc.A.setFieldCellIcon=function isc_ListGrid_setFieldCellIcon(_1,_2){this.setFieldProperties(_1,{cellIcon:_2});var _3=this.getField(_1);if(_3&&_3.type=="icon"){delete _3.$59f
this.body.markForRedraw("Field cell icon changed")}},isc.A.setAutoComplete=function isc_ListGrid_setAutoComplete(_1){this.autoComplete=_1},isc.A.setFieldAutoComplete=function isc_ListGrid_setFieldAutoComplete(_1,_2){_1=this.getField(_1);if(_1)_1.autoComplete=_2},isc.A.showFields=function isc_ListGrid_showFields(_1,_2){return this.showField(_1,_2)},isc.A.showField=function isc_ListGrid_showField(_1,_2){arguments.$cw=this;if(this.completeFields==null){this.setFields(this.completeFields||this.fields);return this.showField(_1,_2)}
if(!isc.isAn.Array(_1)){_1=[_1]}else{_1=_1.duplicate()}
var _3=true,_4=true;var _5=this.frozenFields||this.$54d;for(var i=0;i<_1.length;i++){var _7=_1[i],_8=_7;if(!this.$235r){this.$235s(_7)}
_8=this.getSpecifiedField(_8);if(_8==null){_1[i]=null;this.logWarn("showField(): unable to find field object for field: "+_7+". Taking no action. Call setFields() to add new fields.")
continue}
_3=false;_8.hidden=false;_8.hideOnPhone=_8.hideOnTablet=null;if(_8.detail){_8.showIf="true"}else{if(_8.showIf!=null)_8.showIf=null}
if(_8.frozen)_5=true;if(this.spanMap&&this.spanMap[_8.name]!=null)_5=true;if(_5)continue;if(this.fields.contains(_8)){_1[i]=null;continue}
_4=false;_1[i]=_8}
if(_5){this.$168y=true;this.setFields(this.completeFields);delete this.$168y;if(this.selectHeaderOnSort&&this.$73p)this.selectSortFieldHeaderButton();this.handleFieldStateChanged();return}
if(_3||_4)return;this.deriveVisibleFields();_1.removeEmpty();var _9=[],_10=0;for(var i=0;i<this.fields.length;i++){var _11=_1.indexOf(this.fields[i]);if(_11!=-1){_9[_11]=i;_10++;if(_10==_1.length)break}}
var _12=this.header;if(_12!=null){if(!_2)this.header.hPolicy="fill";this.$132e=true;this.header.addButtons(_1.duplicate(),_9);delete this.$132e}
if(this.body){if(this.$30a){var _13=this.getEditRow(),_14=this.getRecord(_13),_15=this.getEditedRecord(_13),_16=false,_17=this.getEditForm().items,_18=_17.length-1,_19=_17[_18],_20=_19.colNum;_9.sort();for(var i=_9.length-1;i>=0;i--){var _21=i+1,_22=_9[i],_23=(_22-i);if(!_16&&this.$30u>=_22){this.$30u+=_21}
var _8=this.fields[_22],_24=this.getEditFormItemFieldWidths(_14)[_22],_25;while(_19!=null&&_20>=_23){_19.colNum+=_21;_18--;_19=(_18>=0)?_17[_18]:null;_20=(_19!=null)?_19.colNum:null}
var _26=this.body.getDrawArea();if(!this.editByCell&&_22>=_26[2]&&_22<=_26[3]){_25=this.getEditItem(_8,_14,_15,_13,_22,_24)}
if(_25!=null){this.$286.addItems([_25],_18+1)}}}
this.body.fields=this.normalFields||this.fields;this.setBodyFieldWidths(this.getFieldWidths());this.$75n(this.body)}
if(this.header&&this.autoFitHeaderHeights){this.dropCachedHeaderButtonHeights();this.$109d()}
if(this.sortField!=null){this.sortFieldNum=null;this.sortFieldNum=this.$60z();if(this.selectHeaderOnSort)this.selectSortFieldHeaderButton()}
if(this.filterEditor!=null){this.filterEditor.showField(_1,_2);if(this.allowFilterOperators){for(var i=0;i<_1.length;i++){var _27=this.filterEditor.getEditForm(),_28=_27&&_27.getItem(_1[i].name);if(_28){var _29=this.getFieldSearchOperator(_1[i]);this.updateOperatorIcon(_1[i],_28,_29)}}}}
this.calculateRecordSummaries(null,_1,true,false,false,true,false,"showFields");if(this.summaryRow!=null&&this.showGridSummary){this.summaryRow.showField(_1,_2)}
if(this.hilites)this.applyHilites(true);var _30=this.body;if(_30&&_30.isDrawn())_30.redraw("show field");this.markForRedraw("showField");this.handleFieldStateChanged();this.$134r()},isc.A.$2109=function isc_ListGrid__getFieldShowOnMobileFunction(){if(this.$211a==null){this.$211a=function(_1,_2,_3){if(isc.Browser.isTablet&&_2.hideOnTablet!=null){return!_2.hideOnTablet}
if(isc.Browser.isHandset&&_2.hideOnPhone!=null){return!_2.hideOnPhone}};this.$211a.$211b=true}
return this.$211a},isc.A.setHideOnPhone=function isc_ListGrid_setHideOnPhone(_1,_2){var _1=this.getFieldByName(_1);if(_1==null)return;if(_1.hideOnPhone===_2){return}
_1.hideOnPhone=_2;if(_1.showIf==null){_1.showIf=this.$2109()}
this.refreshFields()},isc.A.setHideOnTablet=function isc_ListGrid_setHideOnTablet(_1,_2){var _1=this.getFieldByName(_1);if(_1==null)return;if(_1.hideOnTablet===_2){return}
_1.hideOnTablet=_2;if(_1.showIf==null){_1.showIf=this.$2109()}
this.refreshFields()},isc.A.selectSortFieldHeaderButton=function isc_ListGrid_selectSortFieldHeaderButton(){var _1=this.getSort();if(_1&&_1.length>0){var _2=this.getFieldNum(_1[0].property);if(_2>=0){var _3=this.getFieldHeader(_2),_4=this.getFieldHeaderButton(_2);if(_4){_3.selectButton(_4);if(isc.Browser.isTouch&&this.shouldShowHeaderMenuButton(_4,true)){this.$129n(_4)}}}}},isc.A.hideFields=function isc_ListGrid_hideFields(_1,_2){return this.hideField(_1,_2)},isc.A.hideField=function isc_ListGrid_hideField(_1,_2){arguments.$cw=this;if(this.completeFields==null){this.setFields(this.completeFields||this.fields);return this.hideField(_1,_2)}
var _3=true,_4=true;if(!isc.isAn.Array(_1)){_1=[_1]}
var _5=[];if(_1.length==this.getFields().length){this.logWarn("Attempt to hide all fields in one call - disallowed.");return}
var _6=this.frozenFields;var _7=this.$30a,_8=_7?this.getEditRow():null,_9=_7?this.getEditCol():null,_10=false;for(var i=0;i<_1.length;i++){var _12=_1[i],_13=_12;_13=this.getSpecifiedField(_13);if(_13==null){this.logWarn("hideField(): unable to find field object for field: "+_12+". Taking no action. To add this field use the setFields() method.");_1[i]=null;continue}
_3=false;if(!this.$235r){this.$235s(_12)}
_13.hideOnPhone=_13.hideOnTablet=null;_13.showIf=this.$18r;if(!this.fields.contains(_13)){_1[i]=null;continue}
_4=false;_13.hidden=true;if(_6)continue;var _14=this.fields.indexOf(_13),_15=this.getFieldName(_14);_5.add(_14);if(_7){if(_9==_14)_10=true;var _16=this.getEditFormItem(_15);if(_16&&_16.hasFocus)_16.blurItem();if(this.discardEditsOnHideField){this.clearEditValue(_8,_14,true)}}}
if(_3||_4)return;if(_6){this.$168y=true;this.setFields(this.completeFields);delete this.$168y;if(this.selectHeaderOnSort&&this.$73p)this.selectSortFieldHeaderButton();this.handleFieldStateChanged();return}
_1.removeEmpty();if(_7){if(_10){if(this.editByCell){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_7=false}else{var _17=_9-1,_18=false;while(_17>=0){if(!_5.contains(_17)&&this.canEditCell(_8,_17)&&this.$60w(_8,_17))
{_18=true;break}
_17--}
if(!_18){_17=_9+1;while(_17<this.fields.length){if(!_5.contains(_17)&&this.canEditCell(_8,_17)&&this.$60w(_8,_17))
{_18=true;break}
_17++}}
if(!_18){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_7=false}else{this.$31u(_8,_17,!this.getEditForm().hasFocus)}}}}
this.deriveVisibleFields();var _19=this.header;if(_19!=null){if(!_2)this.header.hPolicy="fill";var _20=[];for(var i=0;i<_5.length;i++){var _14=_5[i];var _21=this.header.getButton(_14);_20[_20.length]=_21;if(this.headerMenuButton&&this.headerMenuButton.masterElement==_21){this.headerMenuButton.depeer()}}
this.header.removeButtons(_20.duplicate());_20.callMethod("destroy");if(this.autoFitHeaderHeights){this.dropCachedHeaderButtonHeights();this.$109d()}}
var _22=[];if(_7){_5.sort();var _23=this.$286,_24=_23.getItems(),_25=_24.length-1,_26=_24[_25],_27=_26.colNum,_28=false;for(var i=_5.length-1;i>=0;i--){var _29=i+1,_30=_5[i];if(!_28&&this.$30u>_30){this.$30u-=_29;_28=true}
while(_26!=null&&_27>=_30){if(_27==_30)_22.add(_26);else _26.colNum-=_29;_25--;_26=(_25>=0)?_24[_25]:null;_27=(_26!=null)?_26.colNum:null}}}
if(this.body){this.body.fields=this.normalFields||this.fields;this.setBodyFieldWidths(this.getFieldWidths());this.$75n(this.body)}
if(_7&&_22.length>0){for(var i=0;i<_22.length;i++){var _26=_22[i];if(_26.destroyed)continue;this.$286.removeItems([_26])}}
if(this.sortField!=null){this.sortFieldNum=null;this.sortFieldNum=this.$60z();if(this.selectHeaderOnSort&&this.header)this.selectSortFieldHeaderButton()}
if(this.filterEditor!=null)this.filterEditor.hideField(_1,_2);this.calculateRecordSummaries(null,null,true,false,false,true,false,"hideFields");if(this.summaryRow&&this.showGridSummary){this.summaryRow.hideField(_1,_2)}
var _31=this.body;if(_31&&_31.isDrawn())_31.redraw("hide field");this.handleFieldStateChanged();this.$134r()},isc.A.fieldIsVisible=function isc_ListGrid_fieldIsVisible(_1,_2){var _3=_1;if(!isc.isAn.Object(_3))_3=this.getSpecifiedField(_1);if(_2){if(_3.showIf=="false")return false;else if(_3.showIf==null)return true}
return this.fields.contains(_3)},isc.A.processVisibilityRule=function isc_ListGrid_processVisibilityRule(_1,_2){_1=!!_1;if(_2.targetObjectType=="ListGridField"){var _3=this.fieldIsVisible(_2.fieldName);if(_3!=_1){this.$235r=true;if(_1)this.showField(_2.fieldName);else this.hideField(_2.fieldName);delete this.$235r;return true}else{return false}}
return this.Super("processVisibilityRule",arguments)},isc.A.processEnableRule=function isc_ListGrid_processEnableRule(_1,_2){var _3=!_1
if(_2.targetObjectType=="ListGridField"){this.$235r=true;var _4=this.getSpecifiedField(_2.fieldName),_5=_4&&_4.disabled;if(_4&&(_5!=_3)){_4.disabled=_3;var _6=this.getFieldNum(_2.fieldName)
if(_6!=-1){var _7=this.getFieldHeaderButton(_6);if(_7){_7.setDisabled(_3)}}
return true}else{return false}}
return this.Super("processEnableRule",arguments)},isc.A.$235t=function isc_ListGrid__setupFieldWhenRules(){var _1=this.completeFields,_2=this.getRuleScope();if(!_1)return;if(!this.getRuleScopeComponent())return;var _3=[];for(var i=0;i<_1.length;i++){var _5=_1[i];if(_2&&!_5.ruleScope)_5.ruleScope=_2;if(!_5.$235l){if(_5.visibleWhen){var _6=this.$1636("visibility",_5.visibleWhen,{targetObjectType:"ListGridField",fieldName:_5.name});if(_6.applyWhen&&_6.applyWhen.fixedValue!=null){_6.negateShouldApply=true}
_3.add(_6)}
if(_5.enableWhen){var _6=this.$1636("enable",_5.enableWhen,{targetObjectType:"ListGridField",fieldName:_5.name});if(_6.applyWhen&&_6.applyWhen.fixedValue!=null){_6.negateShouldApply=true}
_3.add(_6)}
if(_5.readOnlyWhen){_3.add(this.$1636("enable",_5.enableWhen,{targetObjectType:"ListGridField",fieldName:_5.name}))}
_5.$235l=true}}
if(_3.length>0){var _7=this.getRulesEngine();if(!_7)return;var _8=[];for(var i=_3.length-1;i>=0;i--){var _6=_3[i];if(_6.applyWhen&&_6.applyWhen.fixedValue!=null){delete _6.applyWhen;_8.add(_6);_3.removeAt(i)}}
if(_8.length>0){_7.processRules(_8)}
for(var i=0;i<_3.length;i++){_7.addRule(_3[i])}
if(_3.length>0&&!_7.members.contains(this)){_7.addMember(this)}
_7.processContextRules(_3,this)}},isc.A.$235u=function isc_ListGrid__removeFieldWhenRules(_1){var _1=this.getSpecifiedField(_1);if(_1&&_1.$235l){if(_1.visibleWhen)this.$1637("visibility",{fieldName:_1.name});if(_1.enableWhen)this.$1637("enable",{fieldName:_1.name});delete _1.$235l}},isc.A.$235s=function isc_ListGrid__removeFieldVisibleWhen(_1){var _1=this.getSpecifiedField(_1);if(_1&&_1.visibleWhen){if(_1.$235l){this.$1637("visibility",{fieldName:_1.name})}
delete _1.visibleWhen}},isc.A.showActionInPanel=function isc_ListGrid_showActionInPanel(_1){if(_1.name=="editNew")return true;return this.Super("showActionInPanel",arguments)},isc.A.setFields=function isc_ListGrid_setFields(_1){if(isc.$cv)arguments.$cw=this;var _2=this.getAllFields();var _3=false;if(_1!=null&&this.fields!=null&&this.fields!=_1&&this.completeFields!=_1)
{delete this.fields.$775;this.$102q(_2!=null);for(var i=0;i<_2.length;i++){var _5=_2[i];if(!_1||!_1.contains(_5)){this.$235u(_5)}}}
if(_1){for(var _6=_1.length;_6>0;--_6){var _7=_1[_6-1];if(_7==null){this.logWarn("listGrid.setFields : null entry in new fields array - removing the entry");_1.removeAt(_6-1);continue}
if(_7&&this.$275o(_7)){_3=true}}}
if(!_1&&isc.DataSource&&isc.isA.DataSource(this.getDataSource())&&!this.getDataSource().hasFields())
{this.logWarn("ListGrid.setFields() : neither this ListGrid nor its dataSource have fields")}
if(!this.booleanFalseImage&&!this.booleanTrueImage&&!this.booleanPartialImage){this.booleanTrueImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("checkedImage"):null;this.booleanFalseImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("uncheckedImage"):null;this.booleanPartialImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("partialSelectedImage"):null;this.booleanImageWidth=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconWidth"):null;this.booleanImageHeight=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconHeight"):null}
if(!this.printBooleanFalseImage&&!this.printBooleanTrueImage&&!this.printBooleanPartialImage){this.printBooleanTrueImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("printCheckedImage"):null;this.printBooleanFalseImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("printUncheckedImage"):null;this.printBooleanPartialImage=isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("printPartialSelectedImage"):null}
var _8=this.$60z(),_9=(_8!=null&&this.fields?this.fields[_8]:null);var _10=this.$30a,_11=this.getEditRow(),_12=this.getEditCol(),_13=this.$286,_14=this.fields?this.getEditFieldName():null;if(this.completeFields==null){this.fields=[]}else if(_1===this.fields){_1=_1.duplicate()}
if(!this.$168y){this.completeFields=this.bindToDataSource(_1,this.canPickOmittedFields)}
if(this.completeFields==null)this.completeFields=[];if(this.shouldShowRowNumberField()){var _15=this.getCurrentRowNumberField(),_16=this.getRowNumberFieldPosition(),_17=!_15;if(_17&&_1&&_1.find("name","$74y")!=null)
{_17=false}
if(_17)_15=this.getRowNumberField();if(_17)this.completeFields.addAt(_15,_16);else this.completeFields.slideList([_15],_16)}else{var _15=this.getCurrentRowNumberField();if(_15)this.completeFields.remove(_15)}
if(this.shouldShowDragHandleField()){var _18=this.getCurrentDragField(),_17=!_18;if(_17&&_1&&_1.find("name","$195w"))
{_17=false}
if(_17)_18=this.getDragField();var _19=this.getDragFieldPosition();if(_19>this.completeFields.length)_19=this.completeFields.length;if(_17)this.completeFields.addAt(_18,_19);else this.completeFields.slideList([_18],_19)}else{var _18=this.getCurrentDragField();if(_18)this.completeFields.remove(_18)}
if(this.shouldShowCheckboxField()){var _20=this.getCurrentCheckboxField(),_21=this.getCheckboxFieldPosition(),_17=!_20;if(_17&&_1&&_1.find("name","_checkboxField")){_17=false}
if(_17)_20=this.getCheckboxField();if(_21>this.completeFields.length)_21=this.completeFields.length;if(_17)this.completeFields.addAt(_20,_21);else this.completeFields.slideList([_20],_21)}else{var _20=this.getCurrentCheckboxField();if(_20)this.completeFields.remove(_20)}
if(this.shouldShowExpansionField()){var _22=this.getCurrentExpansionField(),_23=this.getExpansionFieldPosition(),_17=!_22;if(_17)_22=this.getExpansionField();if(_17)this.completeFields.addAt(_22,_23);else this.completeFields.slideList([_22],_23)}else{var _22=this.getCurrentExpansionField();if(_22)this.completeFields.remove(_22)}
if(this.shouldShowRemoveField()){var _24=this.completeFields.findIndex("isRemoveField",true),_25=(_24>=0)?this.completeFields[_24]:{excludeFromState:true,isRemoveField:true};if(_24==-1&&_1){_24=_1.findIndex("isRemoveField",true)}
if(_24==-1)_25.$2324=true;if(!_25.$61a){isc.addProperties(_25,this.removeFieldDefaults,this.removeFieldProperties);if(_25.name==null)_25.name="_removeField";if(_25.title==null)_25.title=this.removeFieldTitle;if(_25.cellIcon==null&&_25.formatCellValue==null){_25.formatCellValue=function(_45,_46,_47,_48,_49){if(_49.recordCanRemoveProperty&&_46&&_46[_49.recordCanRemoveProperty]===false)return"&nbsp;";if(!this.removeIconHTML){this.removeIconHTML=isc.Canvas.imgHTML({src:_49.removeIcon,width:_49.removeIconSize,height:_49.removeIconSize,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,cssClass:_49.removeIconStyle});this.unremoveIconHTML=isc.Canvas.imgHTML({src:_49.unremoveIcon,width:_49.removeIconSize,height:_49.removeIconSize,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,cssClass:_49.removeIconStyle})}
if(_49.recordMarkedAsRemoved(_47)){return this.unremoveIconHTML}else{return this.removeIconHTML}};_25.iconSize=this.removeIconSize;var _26=this.getDefaultFieldWidth(_25);_25.width=Math.max(_26,_25.width)}
if(_24==-1){this.completeFields.add(_25)}
_25.$61a=true}else if(_25.$2324&&_24>=0&&_24<this.completeFields.length-1){this.completeFields.removeAt(_24);this.completeFields.add(_25)}}else{var _24=this.completeFields.findIndex("isRemoveField",true);if(_24>=0){this.completeFields.removeAt(_24)}}
if(this.headerSpans){this.reorderFieldsForHeaderSpans();this.spanMap=this.buildSpanMap()}
var _27=false;if(this.fieldState!=null){this.setFieldState();_27=true}else{this.$2177()}
var _28=false;if(this.groupState!=null){this.setGroupState(this.groupState);_28=true}
this.$235t();isc.FieldGeneratorUtil.$280h(this,_2,this.completeFields);this.applyDefaultShowIf(this.completeFields);this.deriveVisibleFields();this.applyFieldDefaults(this.completeFields);this.$278k(this.completeFields);this.$134r();if(isc.DataSource)this.$45n();if(this.fields.length==0&&this.completeFields.length>0){this.logWarn("All specified fields for this component are hidden. Note that fields may be hidden via 'showIf' or 'detail' attribute values. In order to display data this grid must have some visible fields.")}
this.$26a=null;var _29,_30,_31;if(_10){this.storeUpdatedEditorValue();_29=this.fields.findIndex("name",_14);if(_29!=-1&&!this.canEditCell(_11,_29))
_29=-1;if(_29==-1){var _32;if(!this.editByCell)_32=this.findNextEditCell(_11,0,1,true,true,false,true);if(_32!=null&&_32[0]==_11){_29=_32[1]}
if(_29==-1){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_10=false}}else{var _33=_13.getItem(_14);if(_33){_31=_33.hasFocus;if(_31)_13.$106()}
_30=true}
if(_10)this.hideInlineEditor(false,true)}
var _34=(this.canFreezeFields==null||this.$60v)&&this.fixedRecordHeights!=false&&this.fixedFieldWidths!=false&&this.autoFitData!="horizontal"&&this.autoFitData!="both"&&this.bodyOverflow!="visible";if(_34){if(this.completeFields.getProperty("overflow").contains("visible"))_34=false}
if(_34){this.$60v=true;this.canFreezeFields=true}else if(this.$60v){delete this.$60v;this.canFreezeFields=null}
if(this.canSelectCells&&this.selectionManager)this.selectionManager.numCols=this.fields.length;var _35=this.showHeader&&this.headerHeight>0&&this.header!=null;if(_35){this.updateHeader()}
var _36=false;if(this.$166w){delete this.$166w;this.setSort(this.getSort());_36=true}else if(this.sortState!=null){this.setSortState(this.sortState);_36=true}else{var _8=this.$60z();if(_8!=null&&this.$91k(_8)){this.setSort(this.getSort())}}
if(this.summaryRow&&this.showGridSummary){this.summaryRow.setFields(this.completeFields.duplicate())}
this.updateFieldDependencies();this.calculateRecordSummaries(null,null,true,false,!_3,true,false,"setFields");this.updateBody();if(this.filterEditor){this.filterEditor.updateDataSource(this.getDataSource());var _37=this.completeFields||[];this.filterEditor.setFields(_37.duplicate())}
this.layoutChildren(this.$604);if(_35&&this.body!=null){this.syncHeaderScrolling(this.body.getScrollLeft());if(this.frozenFields!=null){this.syncHeaderScrolling(this.frozenBody.getScrollLeft(),null,true)}}
if(this.$52b!=null){var _38={};for(var i in this.$52b){if(this.$52b[i]==null)continue;var _39=this.$52b[i].$31x,_40=(this.dataSource!=null?this.getDataSource().getPrimaryKeyFieldNames():[]);for(var _41 in _39){if(!this.fields.containsProperty("name",_41)&&!_40.contains(_41)){_38[_41]=true;this.clearEditValue(_39,_41,true)}}}
_38=isc.getKeys(_38);if(_38.length>0){this.logInfo("'setFields()' removed the following fields which had pending edit values for some row[s]: '"+_38.join("', '")+"'.\nEdit values for these fields have been dropped.","gridEdit")}}
if(_10){if(_30){this.showInlineEditor(_11,_29,false,false,true);if(_31)_13.$11b(_42)}else{this.$31u(_11,_29,!_31)}
if(_31){var _42=this.getEditFieldName();if(_42==_14){_13.$11b(_42)}else{_13.focusInItem(_42)}}}
if(this.hilites!=null)this.applyHilites();if(!this.$922)this.defaultFieldState=this.getFieldState();if(this.$30d)this.$181x();if(this.viewState){var _43=this.viewState;this.viewState=null;if(_27){var _44=this.evalViewState(_43,"viewState");if(_44){delete _44.field}
_43="("+isc.Comm.serialize(_44,false)+")"}
if(_36){var _44=this.evalViewState(_43,"viewState");if(_44){delete _44.sort}
_43="("+isc.Comm.serialize(_44,false)+")"}
if(this.hiliteState){var _44=this.evalViewState(_43,"viewState");if(_44){delete _44.hilite}
_43="("+isc.Comm.serialize(_44,false)+")"}
if(_28){var _44=this.evalViewState(_43,"viewState");if(_44){delete _44.group}
_43="("+isc.Comm.serialize(_44,false)+")"}
this.setViewState(_43)}
this.restorePersistedViewState()});isc.evalBoundary;isc.B.push(isc.A.$278k=function isc_ListGrid__rememberSpecifiedFieldWidths(_1){for(var i=0;i<_1.length;i++){_1[i].$248m=_1[i].width}},isc.A.$2177=function isc_ListGrid__refreshCompleteFieldsMaps(){var _1=this.$2178={},_2=this.$2179={},_3=this.completeFields;for(var i=0;i<_3.length;i++){var _5=_3[i];if(_5.dataPath)_2[_5.dataPath]=_5;_1[_5.name]=_5}},isc.A.$2254=function isc_ListGrid__getFieldNamesToUpdateForGrouped(){var _1=this.getDataSource(),_2=_1.getFieldNames();if(_1.clientOnly||this.updateExtraFields){var _3=_1.getFields(),_4=this.getAllFields();for(var i=0;i<_4.length;i++){var _6=_4[i].name;if(!_3.hasOwnProperty(_6)){_2.add(_6)}}}else{_2.addList(this.$277t().getProperty("name"))}
return _2},isc.A.$181x=function isc_ListGrid__delayedScrollToCell(){if(this.$30d!=null){var _1=isc.isAn.Array(this.$30d),_2=_1?this.$30d[0]:this.$30d,_3=_1?this.$30d[1]||0:0,_4=_1?this.$30d[2]:null,_5=_1?this.$30d[3]:null;delete this.$30d;this.scrollToCell(_2,_3,_4,_5);var _6=this.body;if(_6&&!_6.isDirty()&&_6.$1302()&&_6.virtualScrolling){this.$25a("redraw for scroll")}}},isc.A.addField=function isc_ListGrid_addField(_1,_2){return this.Super("addField",[_1,_2,this.completeFields],arguments)},isc.A.removeField=function isc_ListGrid_removeField(_1){return this.Super("removeField",[_1,this.completeFields],arguments)},isc.A.shouldShowCheckboxField=function isc_ListGrid_shouldShowCheckboxField(){if(this.fieldSourceGrid)return this.fieldSourceGrid.shouldShowCheckboxField();return(this.selectionAppearance==this.$12c&&this.selectionType!=this.$27r&&!isc.isA.TreeGrid(this))},isc.A.focusInFilterEditor=function isc_ListGrid_focusInFilterEditor(_1){if(this.filterEditor==null)return;var _2=_1!=null?this.getColNum(_1):null;this.filterEditor.startEditing(0,_2)},isc.A.filterByEditor=function isc_ListGrid_filterByEditor(){if(this.filterEditor!=null)this.filterEditor.performAction()},isc.A.bindToDataSource=function isc_ListGrid_bindToDataSource(_1,_2,_3,_4,_5,_6){var _7=false;var _8=this.invokeSuper(isc.ListGrid,"bindToDataSource",_1,_2,_3,_4,_5,_6);if(_8!=null){for(var i=0;i<_8.length;i++){var _10=_8[i];if(_10.showIf==null&&_10.hidden==null&&_10.detail==true){_10.hidden=true}
if(this.showDetailFields){if(this.$136j(_10.name)){_7=true}
if(this.$81f(_10)){_10.$81f=true}}
if(!_10.$268z){_10.$268z=true;var _11=this.getFieldEditorValidators(_10);if(_11)_10.validators=(_10.validators||[]).addList(_11)}}}
this.$81g=!_7;return _8},isc.A.$81f=function isc_ListGrid__isFieldObject(_1){if(_1==null)return false;return(!_1.isRemoveField&&!_1.isDragHandle&&!_1.$74z&&!_1.$72w&&!_1.$63f)},isc.A.$136j=function isc_ListGrid__isNumberOrArrayProp(_1){if(this.$159l[_1]!=null)return true;if(isc.isA.Number(parseInt(_1))&&parseInt(_1).toString()==_1)return true;return false},isc.A.setFieldState=function isc_ListGrid_setFieldState(_1,_2){if(_2==null)_2=this.sparseFieldState;if(this.completeFields==null)this.setFields(this.fields);if(_1==null&&this.fieldState!=null){if(isc.isA.String(this.fieldState)){_1=this.evalViewState(this.fieldState,"fieldState")}else{_1=this.fieldState}
this.completeFields=this.$31y(_1,null,_2);this.fieldState=null}else{_1=this.evalViewState(_1,"fieldState");if(_1){this.completeFields=this.$31y(_1,null,_2);this.refreshFields()}}
this.$2177()},isc.A.handleFieldStateChanged=function isc_ListGrid_handleFieldStateChanged(_1){if(!this.ignoreStateChangeHandlers)this.fieldStateChanged();this.handleViewStateChanged();if(this.canSelectCells&&!_1){this.selectionManager.deselectAll();if(this.fields&&this.fields.length!=this.selectionManager.numCols){this.selectionManager.numCols=this.fields.length}}
if(isc.Canvas.ariaEnabled&&this.updateAriaForFieldsChanged){this.updateAriaForFieldsChanged()}
this.checkForModifiedFetchFields&&this.delayCall("checkForModifiedFetchFields")},isc.A.setHilites=function isc_ListGrid_setHilites(){this.Super("setHilites",arguments);this.handleViewStateChanged()},isc.A.$1024=function isc_ListGrid__handleHilitesChanged(_1){this.Super("$1024",arguments);if(isc.isA.Function(this.hilitesChanged))this.hilitesChanged()},isc.A.redrawHilites=function isc_ListGrid_redrawHilites(){this.$25a("redrawHilites")},isc.A.getCheckboxField=function isc_ListGrid_getCheckboxField(){var _1=this,_2={width:this.checkboxFieldHSpace+this.$65a(),getAutoFreezePosition:function(){return _1.getCheckboxFieldPosition()}};isc.addProperties(_2,this.checkboxFieldDefaults,this.checkboxFieldProperties);_2.title=(this.canSelectAll==false||this.selectionType=="single"?isc.nbsp:this.$116w(false,false,true,false,_2));return _2},isc.A.getCurrentCheckboxField=function isc_ListGrid_getCurrentCheckboxField(){var _1=this.completeFields||this.fields;if(!_1)return null;var _2=_1.find("name","_checkboxField");return!_2?null:isc.isAn.Array(_2)?_2[0]:_2},isc.A.$65a=function isc_ListGrid__getCheckboxFieldImageWidth(){return this.checkboxFieldImageWidth||this.booleanImageWidth||(isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconWidth"):null)},isc.A.$65b=function isc_ListGrid__getCheckboxFieldImageHeight(){return this.checkboxFieldImageHeight||this.booleanImageHeight||(isc.CheckboxItem?isc.CheckboxItem.getInstanceProperty("valueIconWidth"):null)},isc.A.isCheckboxField=function isc_ListGrid_isCheckboxField(_1){if(!_1||!_1.$63f)return false;else return true},isc.A.getCheckboxFieldPosition=function isc_ListGrid_getCheckboxFieldPosition(){if(this.fieldSourceGrid)return this.fieldSourceGrid.getCheckboxFieldPosition();if(this.selectionAppearance!="checkbox"||isc.isA.TreeGrid(this))return-1;var _1=0;if(this.shouldShowRowNumberField())_1++;if(this.shouldShowDragHandleField())_1++;return _1},isc.A.getSelectedState=function isc_ListGrid_getSelectedState(_1,_2,_3){if(!this.selectionManager)return null;if(!this.dataSource||isc.isAn.emptyObject(this.getDataSource().getPrimaryKeyFields()))
{if(!_1){this.logWarn("can't getSelectedState without a DataSource with a primary key field set")}
return null}
var _4=[];if(this.canSelectCells){var _5=this.selectionManager.getSelectedCells();for(var i=0;i<_5.length;i++){var _7=_5[i],_8=this.getPrimaryKeys(_7[0],_7[1]),_9=null;for(var k=0;k<_4.length;k++){if(this.objectsAreEqual(_8,_4[k].PKs)){_9=_4[k];break}}
if(!_9){_4.add({PKs:_8,cells:[]});_9=_4[_4.length-1]}
if(this.selectionManager.cellRecordMode=="row"){_9.cells.add(this.getFieldName(_7[1]))}}}else{var _5=this.getSelection(_3);var _11=_5.length;for(var i=0;i<_11;++i){_4[i]=this.getPrimaryKeys(_5[i])}}
if(_2)return _4;return isc.Comm.serialize(_4,false)},isc.A.getCellSelection=function isc_ListGrid_getCellSelection(){if(!this.canSelectCells)return null;return this.getSelectionObject()},isc.A.setSelectedState=function isc_ListGrid_setSelectedState(_1,_2,_3){if(!this.dataSource||isc.isAn.emptyObject(this.getDataSource().getPrimaryKeyFields()))
{return}
var _4=this.selectionManager;if(_4==null){return}
var _5=this.originalData||this.data;if(isc.Tree&&isc.isA.Tree(_5)&&_3){var _6;_5=this.data.getDescendants(_6,_6,_6,true);_5.add(this.root)}
if(isc.ResultSet&&isc.isA.ResultSet(_5)&&!_5.lengthIsKnown())return;_1=this.evalViewState(_1,"selectedState");var _7=this.anySelected();if(!_1||_1.length==0){if(_7){_4.deselectAll();this.fireSelectionUpdated()}else if(_2){this.$210q()}
return}
var _8=false;if(this.canSelectCells){if(!_1[0].PKs){if(_7){if(this.selectionManager)this.selectionManager.deselectAll();this.fireSelectionUpdated()}
this.logWarn("setSelectedState(): Format of selected state is inapplicable to a ListGrid with canSelectCells: true.");return}
if(_4.cellRecordMode!="cell"){if(_1[0].cells==null){this.logWarn("setSelectedState(): selected state is lacking column coordinates. First column will be marked as selected for each row")}}else{_8=true}}else if(_1[0].PKs){this.logWarn("Cannot restore CellSelection state to a ListGrid with canSelectCells: false.");if(_7){if(this.selectionManager)this.selectionManager.deselectAll();this.fireSelectionUpdated()}
return}
var _9=_4.getSelection(),_10=[],_11=_9.length!=_1.length;for(var i=0;i<_1.length;i++){var _13=_1[i];if(!isc.isAn.Object(_13))continue;var _14=this.canSelectCells?_13.PKs:_13,_15=_5.findByKeys(_14,this.getDataSource());if(_15==-1){_11=true}else{var _16=_5.get(_15);if(_8){if(!_11)_11=_9.find(_14)==null;var _17=this.getCellCoordinates(_16);if(_17==null||_17[0]==-1){_11=true}else{_10.add(_17)}}else{if(this.canSelectCells){var _18=[];for(var k=0;k<_13.cells.length;k++){var _20=this.getColNum(_13.cells[k]);if(_20==-1){_11=true}else{_18.add(_20)}}
if(_18.length>0){var _16=_5.get(_15);for(var _20=0;_20<this.fields.length;_20++){var _21=_18.contains(_20);if(!_11){var _22=_4.cellIsSelected(_16,_20);if(_21!=_22)_11=true}
if(_21){_10.add([_15,_20])}}}}else{var _16=_5.get(_15);_11=_11||!_9.contains(_16);_10.add(_5.get(_15))}}}}
if(_11){_4.deselectAll();if(this.canSelectCells){this.selectionManager.selectCellList(_10)}else{this.selectionManager.selectList(_10)}
this.fireSelectionUpdated()}else if(_2){this.$210q()}},isc.A.getSortState=function isc_ListGrid_getSortState(_1){if(this.logIsDebugEnabled("sorting")){this.logInfo("\ngrid.sortFieldNum is: "+this.sortFieldNum+"\ngrid.sortField is: "+this.sortField+"\ngrid.getField(grid.sortFieldNum) is:\n"+isc.echoAll(this.getField(this.sortFieldNum))+"\n-----------------------------------------\ngrid.$60z() is: "+this.$60z()+"\ngrid.getField(grid.$60z()) is:\n"+isc.echoAll(this.getField(this.$60z()))+"\n","sorting")}
var _2=this.$60z();if(_2!=null||(this.$73p&&this.$73p.length>0)){var _3=(_2!=null?this.getField(_2):null),_4=_3!=null?this.getFieldName(_3):null,_5=this.$766(_3),_6={};if(this.$73p){var _7=isc.shallowClone(this.$73p);_7.clearProperty("primarySort");_7.clearProperty("sortIndex");_7.clearProperty("normalizer");_7.clearProperty("context");_7.clearProperty("$114u");_6.sortSpecifiers=_7}else{_6.fieldName=_4;_6.sortDir=_5}
if(_1)return _6;return"("+isc.Comm.serialize(_6,false)+")"}
if(_1)return[]},isc.A.setSortState=function isc_ListGrid_setSortState(_1){_1=this.evalViewState(_1,"sortState")
if(!_1){if(this.getSort())this.clearSort();return}
if(_1.sortSpecifiers){this.setSort(isc.shallowClone(_1.sortSpecifiers))}else if(_1.fieldName==null){this.clearSort()}else{var _2=this.getFieldNum(_1.fieldName)
if(_2!=-1)this.sort(_2,_1.sortDir)}},isc.A.getViewState=function isc_ListGrid_getViewState(_1){var _2={},_3=this.getSelectedState(true,true),_4=this.getFieldStateAsObject(),_5=this.getSortState(true),_6=this.getHiliteStateAsObject(true),_7=this.getGroupState(true),_8=this.saveCriteriaInViewState&&this.hasFilteredData(),_9=_8&&this.getUserCriteriaState(true),_10=this.$2360(),_11=0;if(_3&&_3!=""){_11++;_2.selected=_3}
if(_4&&_4!=""){_11++;_2.field=_4}
if(!_5||isc.isAn.emptyArray(_5))_5="[No Sorting]";if(_5!="[No Sorting]"||!this.minimalViewState){_11++;_2.sort=_5}
if(!_6||_6=="")_6="[No Hilites]";if(_6!="[No Hilites]"||!this.minimalViewState){_11++;_2.hilite=_6}
if(!_7||_7=="")_7="[No Grouping]";if(_7!="[No Grouping]"||!this.minimalViewState){_11++;_2.group=_7}
if(_10!=null){_11++;_2.showFilterEditor=!!this.showFilterEditor}
if(_8){if(!_9||isc.isAn.emptyObject(_9))_9="[No Criteria]";_2.userCriteria=_9}
if(_11>0){if(_1)return _2;return"("+isc.Comm.serialize(_2,false)+")"}},isc.A.$2604=function isc_ListGrid__updateViewStateForFieldRename(_1,_2,_3){for(var _4 in _1){if(this.$2606.contains(_4)){this.$2603(_1[_4],_2,_3);continue}
var _5=_1[_4];if(this.$2605.contains(_4)){if(_5==_2)_1[_4]=_3;if(isc.isAn.Array(_5))for(var i=0;i<_5.length;i++){if(_5[i]==_2)_5[i]=_3}}
if(isc.isAn.Array(_5)){for(var i=0;i<_5.length;i++){if(isc.isAn.Object(_5[i])){this.$2604(_5[i],_2,_3)}}}else if(isc.isAn.Object(_5)){this.$2604(_5,_2,_3)}}},isc.A.hasFilteredData=function isc_ListGrid_hasFilteredData(){var _1=this.getOriginalData();return _1!=null&&((isc.ResultSet&&isc.isA.ResultSet(_1))||(isc.ResultTree&&isc.isA.ResultTree(_1)))&&(_1.componentId==this.ID)},isc.A.getUserCriteriaState=function isc_ListGrid_getUserCriteriaState(_1){var _2=this.getFilterEditorCriteria(),_3=this.getFilterWindowCriteria(),_4=this.aiCriterion,_5=this.getDataSource();if(isc.isAn.emptyObject(_2))_2=null;if(isc.isAn.emptyObject(_3))_3=null;if(isc.isAn.emptyObject(_4))_4=null;if(_3==null&&_2==null&&_4==null){return""}
if(_2)_2=isc.DS.getCleanCollapsedCriterion(_2,_5);if(_3)_3=isc.DS.getCleanCollapsedCriterion(_3,_5);if(_4)_4=isc.DS.getCleanCollapsedCriterion(_4,_5);var _6;if(_3!=null||_4!=null){var _7={composite:true};if(_2!=null){_7.filterEditorCriteria=_2}
if(_3!=null){_7.filterWindowCriteria=_3}
if(_4!=null){_7.aiCriterion=_4}
_6=_7}else{_6=_2}
if(_1)return _6;return"("+isc.Comm.serialize(_6,false)+")"},isc.A.setUserCriteriaState=function isc_ListGrid_setUserCriteriaState(_1){var _2=_1,_3=this.getDataSource();if(_2){if(isc.isA.String(_2)){_2=this.evalViewState(_2,"userCriteriaState")}}else{_2=null}
if(_2&&_2.composite){var _4=_2.filterEditorCriteria,_5=_2.filterWindowCriteria,_6=_2.aiCriterion;if(_4)_4=isc.DS.fromCollapsedCleanCriterion(_4,_3);if(_5)_5=isc.DS.fromCollapsedCleanCriterion(_5,_3);if(_6)_6=isc.DS.fromCollapsedCleanCriterion(_6,_3);this.filterWindowCriteria=_5;this.aiCriterion=_6;_2=_4}else{_2=isc.DS.fromCollapsedCleanCriterion(_2,_3);this.filterWindowCriteria=null;this.aiCriterion=null}
this.$233w();this.setFilterEditorCriteria(_2);this.handleFilterEditorSubmit(_2)},isc.A.getGroupState=function isc_ListGrid_getGroupState(_1){var i,_3,_4,_5=this.getGroupByFields();if(_5==null){return""}else{_4=[];for(i=0;i<_5.length;i++){var _6=this.completeFields||this.fields||[];_3=_6.find("name",_5[i]);if(_3){var _7={fieldName:_5[i]};if(_3.groupingMode!=null)_7.groupingMode=_3.groupingMode;if(_3.groupGranularity!=null)_7.groupGranularity=_3.groupGranularity;if(_3.groupPrecision!=null)_7.groupPrecision=_3.groupPrecision;_4.add(_7)}}}
if(_1)return _4;return"("+isc.Comm.serialize(_4,false)+")"},isc.A.setGroupState=function isc_ListGrid_setGroupState(_1){var _2=[];if(_1){if(isc.isA.String(_1)){if(!_1.startsWith("(")){_1=_1.split(",");for(var i=0;i<_1.length;i++){_1[i]={fieldName:_1[i]}}}else{_1=this.evalViewState(_1,"groupState")}}
for(var i=0;i<_1.length;i++){var _4=_1[i]
var _5=this.makeGroupSpecifier(_4.property||_4.fieldName,_4.grouping||_4.groupingMode,_4.granularity||_4.groupGranularity,_4.precision||_4.groupPrecision);if(_5)_2.add(_5)}}else{_2=null}
this.setGroupSpecifiers(_2)},isc.A.setViewState=function isc_ListGrid_setViewState(_1){_1=this.evalViewState(_1,"viewState")
if(!_1)return;var _2=this.$31v;var _3=this.ignoreStateChangeHandlers;this.ignoreStateChangeHandlers=true;if(_1.field)this.setFieldState(_1.field);if(_1.group){if(_1.group=="[No Grouping]")this.clearGroupBy();else this.setGroupState(_1.group)}
if(_1.sort){if(_1.sort=="[No Sorting]"){var _4=this.invalidateCacheOnUnsort;var _5=this.getSort();var _6=(_5!=null&&_5.length>0)
if(_6)this.invalidateCacheOnUnsort=true;this.setSortState(null);if(_6)this.invalidateCacheOnUnsort=_4}else this.setSortState(_1.sort)}
if(_1.hilite){if(_1.hilite=="[No Hilites]")this.setHiliteState(null);else this.setHiliteState(_1.hilite)}
if(_1.selected&&_1.selected!="")this.setSelectedState(_1.selected);if(_1.showFilterEditor!=null&&_1.showFilterEditor!=this.showFilterEditor){this.setShowFilterEditor(!!_1.showFilterEditor)}
if(this.saveCriteriaInViewState&&_1.userCriteria&&this.getDataSource()){if(_1.userCriteria=="[No Criteria]"){this.filterWindowCriteria=null;this.$233w();this.clearFilterValues();this.handleFilterEditorSubmit({})}else{this.setUserCriteriaState(_1.userCriteria)}}
if(_2&&!this.isDrawn()){this.$31v=true}
this.ignoreStateChangeHandlers=_3},isc.A.handleGroupStateChanged=function isc_ListGrid_handleGroupStateChanged(){var _1=this.getGroupState();if(this.currentGroupState==_1)return;this.currentGroupState=_1;if(!this.getDataSource()&&!this.$75p){this.deselectAllRecords();var _2=this.getCurrentCheckboxField();if(_2&&this.selectionType!="single"&&this.canSelectAll!=false){this.$63m(false)}}
if(!this.ignoreStateChangeHandlers)this.groupStateChanged();this.handleViewStateChanged();this.$1765()},isc.A.handleViewStateChanged=function isc_ListGrid_handleViewStateChanged(){if(this.fields)this.fields.clearProperty("hasMenuItems");this.persistViewState();if(!this.ignoreStateChangeHandlers){this.fireOnPause("viewStateChangeNotification",{target:this,methodName:"viewStateChanged"},0)}},isc.A.clearSavedViewState=function isc_ListGrid_clearSavedViewState(){var _1=this.$2003();if(_1)isc.Offline.remove(_1)},isc.A.getSavedViewState=function isc_ListGrid_getSavedViewState(){var _1=this.$2003();if(_1)return isc.Offline.get(_1)},isc.A.persistViewState=function isc_ListGrid_persistViewState(){if(this.autoPersistViewState&&!this.$2004){var _1=this.$2003();if(_1){if(!this.$2005&&isc.Offline.get(_1)){return}
var _2=this.getViewState(true),_3={};if(!isc.isAn.Array(this.autoPersistViewState)){this.autoPersistViewState=[this.autoPersistViewState]}
for(var i=0;i<this.autoPersistViewState.length;i++){var _5=this.autoPersistViewState[i];if(_5=="all"){_3=_2;break}
_3[_5]=_2[_5]}
if(!isc.isAn.emptyObject(_3)){isc.Offline.put(_1,"("+isc.Comm.serialize(_3,false)+")")}}}},isc.A.restorePersistedViewState=function isc_ListGrid_restorePersistedViewState(){if(this.autoPersistViewState&&!this.$2004&&!this.$2005){this.$2005=true;var _1=this.$2003();if(_1){var _2=isc.Offline.get(_1);if(_2)this.setViewState(_2)}}},isc.A.$2003=function isc_ListGrid__getAutoPersistLocator(){var _1;if(this.autoPersistViewState&&!this.$2004){if(!this.$2006){var _2=isc.AutoTest.getLocatorWithIndicators(this);if(_2&&_2.containsGlobalId){this.logWarn("autoPersistViewState is enabled but locator has an auto-generated global ID. State will not be saved. locator="+_2.locator);this.$2004=true;return}
this.$2006=_2.locator}
_1=this.$2006}
return _1},isc.A.getViewStateChangedFunction=function isc_ListGrid_getViewStateChangedFunction(){if(this.$84i==null){var _1=this;this.$84i=function(){if(_1.destroyed)return;_1.viewStateChanged()}}
return this.$84i},isc.A.setDataSource=function isc_ListGrid_setDataSource(_1,_2){var _3=this.getDataSource();if(_3!=null&&_3!=_1&&_3.ID!=_1){this.ungroup()}
this.discardAllEdits();if(this.$30a)this.hideInlineEditor();if(this.$286){this.$286.destroy();delete this.$286}
this.Super("setDataSource",arguments);this.clearFilterValues()},isc.A.deriveVisibleFields=function isc_ListGrid_deriveVisibleFields(){var _1=this.getVisibleFields(this.completeFields);isc.FieldGeneratorUtil.$280i(this,this.fields,_1);this.fields.setArray(_1);delete this.fields.$775;this.deriveFrozenFields();this.refreshMasterIndex()},isc.A.refreshFields=function isc_ListGrid_refreshFields(){if(!this.completeFields)return;this.$922=true;this.$168y=true;this.setFields(this.completeFields);delete this.$168y;delete this.$922;if(this.showFilterEditor&&this.allowFilterOperators&&this.filterEditor){this.filterEditor.updateFilterOperators()}},isc.A.getCurrentFieldWidths=function isc_ListGrid_getCurrentFieldWidths(){var _1=[];for(var i=0;i<this.fields.length;i++){_1[i]=this.getFieldWidth(i)}
return _1},isc.A.getFieldWidths=function isc_ListGrid_getFieldWidths(_1,_2){var _3=this.$78q();if(this.autoFitFieldWidths&&!this.$813&&!this.$97e)
{this.$813=true;var _4=_3.duplicate(),_5=null;if(this.frozenFields!=null){var _6=this.freezeStart();if(_6){_5=_4.slice(0,this.frozenFields.length);_4=_4.slice(this.frozenFields.length)}else{_5=_4.slice(-this.frozenFields.length);_4=_4.slice(0,-this.frozenFields.length)}}
var _7=this.getAvailableFieldWidth(true),_8=_4.sum();var _9=_7;if(_5!=null)_9-=_5.sum();var _10=true;if(this.autoFitWidthApproach!="title"){var _11=this.getDrawArea();if(!this.data||_11==null||Array.isLoading(this.data.get(_11[0]))){_10=false}}
if(_8<_9&&_10){var _12=this.getAutoFitExpandField();if(_12){var _13=this.getFieldNum(_12);var _14=_12.maxWidth||Infinity,_15=_3[_13],_16=_15+_9-_8;_3[_13]=_16>_14?_14:_16;var _17=this.getFieldHeaderButton(_13);if(_17&&_17.isDrawn()){_17.setWidth(_3[_13]);_2=false}}}else if(_8>_9&&this.autoFitClipFields!=null){var _18;var _19=this.autoFitClipFields;for(var i=0;i<_19.length;i++){var _21=this.getField(_19[i]),_22=this.getFieldNum(_21);if(_21==null||_22<0)continue;if(!this.$54d&&_21.frozen){this.logInfo("auto-fitting field:"+_21.name+" is present in the autoFitClipFields array for this grid, but is currently frozen. This is not supported - the field will not be clipped.","frozenFields");continue}
delete _21.$776;var _23=this.getFieldHeader(_22);if(_23&&_23.isDrawn()){_17=_23.getMember(this.getLocalFieldNum(_22));_17.setWidth(_21.width||_21.minWidth||"*");_17.setOverflow("hidden")}}
if(this.header&&this.header.isDrawn()){var _24=this.$812;if(_1!=null)_24+=_1;_18=this.header.hPolicy;this.header.hPolicy="fill";this.header.reflowNow(_24);this.header.hPolicy=_18;if(this.frozenHeader){this.frozenHeader.hPolicy="fill";this.frozenHeader.reflowNow(_24);this.frozenHeader.hPolicy=_18}
_2=false}
_3=this.$78q()}
this.$813=false}
return _2?null:_3},isc.A.$78q=function isc_ListGrid__getCalculatedFieldWidths(){var _1=this.header;if(isc.isA.Layout(_1)&&_1.isDrawn()){if(_1.$3n){_1.reflowNow()}
var _2=_1.members;var _3=[];for(var i=0;i<_2.length;i++){if(_2[i].isDirty())_2[i].redraw();if(_2[i].label!=null&&_2[i].label.isDirty())_2[i].label.redraw();_3[i]=_2[i].getVisibleWidth()}
if(_3.length>0){if(this.allowMismatchedHeaderBodyBorder){var _5=_1.getLeftBorderSize()+_1.getLeftMargin(),_6=_1.getRightBorderSize()+_1.getRightMargin();if(_5!=0){_3[0]+=_5}}
var _7=_3.sum(),_8=_1.getInnerWidth();if(this.allowMismatchedHeaderBodyBorder){var _9=_7-_8;if(_9>0){_3[_3.length-1]+=Math.min(_9,_6)}}}
if(this.frozenFields){var _10=this.frozenHeader.getMemberSizes();_3.addListAt(_10,this.freezeStart()?0:_3.length)}}else{var _3=this.getStretchResizeWidths()}
return _3},isc.A.getStretchResizeWidths=function isc_ListGrid_getStretchResizeWidths(){var _1=this.fields;if(_1==null)return[];var _2=this.useOriginalStretchResizePolicy,_3=this.ignoreStretchResizeMemberSizeLimits||_2;var _4=_1.getProperty("width"),_5=_1.getProperty("$776"),_6=[];for(var i=0;i<_4.length;i++){if(_5[i]!=null){if(!_3&&_5[i]<_1[i].width){_5[i]=_1[i].width}
if(isc.isA.String(_4[i])){_6.add(i)}else{if(_4[i]==null||_4[i]<_5[i]){_4[i]=_5[i]}
if(!_3){var _8=_1[i].maxWidth,_9=_1[i].minWidth;if(_8!=null&&_4[i]>_8)_4[i]=_8;if(_9!=null&&_4[i]<_9)_4[i]=_9;if(_4[i]<this.minFieldWidth)_4[i]=this.minFieldWidth}}}}
var _10=this.innerWidth!=null?this.innerWidth:this.getAvailableFieldWidth(),_11=this.applyStretchResizePolicy(_4,_10,this.minFieldWidth,false,null,_5);if(_2&&_6.length>0){var _12=false;for(var i=0;i<_6.length;i++){var j=_6[i];if(_11[j]<_5[j]){_12=true;_4[j]=_5[j]}}
if(_12){_11=this.applyStretchResizePolicy(_4,_10,this.minFieldWidth)}}
return _11});isc.evalBoundary;isc.B.push(isc.A.getAvailableFieldWidth=function isc_ListGrid_getAvailableFieldWidth(_1){if(_1==null){_1=this.autoFitData!="both"&&this.autoFitData!="horizontal"}
var _2=(!_1?this.getVisibleWidth():this.getWidth());return this.$1669(_2)},isc.A.$1669=function isc_ListGrid__getInnerSpaceFromWidth(_1){_1-=this.getHMarginBorderPad();var _2=this.$54u();if(_2){_1-=this.body?this.body.getScrollbarSize():this.getScrollbarSize()}
return Math.max(1,_1)},isc.A.getFieldWidth=function isc_ListGrid_getFieldWidth(_1){_1=this.getFieldNum(_1);if(_1==-1||!this.fields||_1>=this.fields.length)return null;var _2;if(this.body!=null)_2=this.getColumnWidth(_1);if(_2==null||isNaN(_2))_2=this.getFieldWidths()[_1];return _2},isc.A.$310=function isc_ListGrid__adjustFieldSizesForBodyStyling(_1,_2){if(_2==null)_2=false;if(_1==null||_1.length==0)return _1;if(!this.body){return _1}
_1[_1.length-1]=this.$311(_1[_1.length-1],_1.sum(),_2);_1[0]=this.$312(_1[0],_2);return _1},isc.A.$312=function isc_ListGrid__adjustFirstFieldForBodyStyling(_1,_2){if(!this.body)return _1;var _3=(_2?this.body.getTopBorderSize()+this.body.getTopMargin():this.body.getLeftBorderSize()+this.body.getLeftMargin());if(_3!=0)_1-=_3;return Math.max(0,_1)},isc.A.$311=function isc_ListGrid__adjustLastFieldForBodyStyling(_1,_2,_3){if(!this.body)return _1;var _4=(_3?this.body.getBottomBorderSize()+this.body.getBottomMargin():this.body.getRightBorderSize()+this.body.getRightMargin());if(_4!=0){var _5=_2-
(_3?this.body.getInnerHeight():this.body.getInnerWidth());if(_5>0){_1-=Math.min(_5,_4)}}
return Math.max(_1,1)},isc.A.setBodyFieldWidths=function isc_ListGrid_setBodyFieldWidths(_1){var _2=false,_3=false;this.$26a=_1;var _4=_1;if(this.allowMismatchedHeaderBodyBorder){if(isc.isAn.Array(_1)){_1=this.$310(_1.duplicate())}}
var _5=this.frozenFields;if(_5&&this.frozenBody){var _6=this.getFrozenSlots(_1);_1=this.getUnfrozenSlots(_1);var _7=this.frozenBody.setColumnWidths(_6);if(_7)_3=true;var _8=_6.sum();var _9=this.$198q();if(_9!=null&&_8>_9)
{_8=_9}
this.frozenBody.setWidth(_8);this.frozenBody.updateUserSize(_8,this.$o6);if(this.frozenHeader)this.frozenHeader.setWidth(_8)}
if(this.body!=null){var _7=this.body.setColumnWidths(_1);if(_7)_2=true}
if(this.$30a){var _10=this.$286.getItems(),_11=this.getRecord(this.getEditRow()),_12=this.getEditFormItemFieldWidths(_11);for(var i=0;i<_10.length;i++){var _14=_10[i].colNum;if(_10[i].width!=_12[_14])
_10[i].setWidth(_12[_14])}}
if(_5&&_2!=_3&&!this.fixedRecordHeights&&this.matchFrozenRowHeightsApproach=="rowHeightSpacerHTML")
{if(!_3){this.frozenBody.markForRedraw("Row resizes due to field width change")}else{this.body.markForRedraw("Row resizes due to field width change")}}},isc.A.setFrozenFieldsMaxWidth=function isc_ListGrid_setFrozenFieldsMaxWidth(_1){delete this.$198r;this.frozenFieldsMaxWidth=_1;if(this.frozenFields!=null){this.$45m("frozenFieldsMaxWidth changed")}},isc.A.$198q=function isc_ListGrid__getFrozenFieldsMaxWidth(){if(this.fieldSourceGrid)return this.fieldSourceGrid.$198q();var _1=this.$198r||this.frozenFieldsMaxWidth;if(isc.isA.String(_1)){this.$198r=_1;if(_1=="*"){_1=this.getInnerContentWidth()}else if(_1.endsWith("%")){var _2=this.getInnerContentWidth(),_3=parseInt(_1);_1=Math.floor((_2*_3)/100)}}
return _1},isc.A.getGridMembers=function isc_ListGrid_getGridMembers(_1){var _2=this.gridComponents,_3=[],_4,_5;for(var i=0;i<_2.length;i++){var _7=_2[i],_8=null;if(isc.isA.Canvas(_7)){_8=_7}else if(isc.isA.String(_7)){if(!this.shouldShowGridComponent(_7)){continue}
switch(_7){case"filterEditor":if(this.filterEditor==null)this.makeFilterEditor();_8=this.filterEditor;break;case"header":_5=true;if(this.header==null){this.makeHeader()}
_8=this.headerLayout||this.header;break;case"body":_4=true;this.createBodies();_8=this.bodyLayout||this.body;break;case"summaryRow":_8=this.getSummaryRow(_1);break}}
if(_7!=null&&_8==null){_8=this.createCanvas(_7)}
_3.add(_8)}
if(_5&&_4){var _9=this.headerLayout||this.header,_10=this.bodyLayout||this.body;_9.moveAbove(_10)}
if(!_4){this.logWarn("ListGrid specified with gridComponents:"+_2+".  This does not include a \"body\" entry. ListGrids with no body are unsupported, displaying the body as the last member in the grid.");_3[_3.length]=this.createBodies()}
return _3},isc.A.shouldShowGridComponent=function isc_ListGrid_shouldShowGridComponent(_1){if(_1==this.$880)return true;if(_1==this.$881&&this.headerHeight==0){return false}
var _2=_1;if(_2.startsWith(this.$ou)){_2=_2.substring(this.$ou.length)}
var _3=this.showComponentPropertyMap[_2];if(_3==null){this.showComponentPropertyMap[_2]=_3="show"+_2.substring(0,1).toUpperCase()+_2.substring(1)}
return this[_3]},isc.A.createChildren=function isc_ListGrid_createChildren(){this.updateGridComponents();if(isc.Browser.isMoz&&isc.Browser.geckoVersion>=20051111){if(this.header){this.body.mozOutlineOffset="0px";if(this.body.mozOutlineColor==null)
this.body.mozOutlineColor=this.mozBodyOutlineColor}else{if(this.body.mozOutlineColor==null)
this.body.mozOutlineColor=this.mozBodyNoHeaderOutlineColor;this.body.mozOutlineOffset="-1px"}}
this.$122n=this._useNativeTabIndex;this._useNativeTabIndex=false},isc.A.updateGridComponents=function isc_ListGrid_updateGridComponents(){for(var _1 in this.showComponentPropertyMap){var _2=this.showComponentPropertyMap[_1];if(this[_2]&&!(this.gridComponents.contains(_1)||this.gridComponents.contains("autoChild:"+_1))){this.logWarn("Missing grid component:"+_2+" set to true, but "+_1+" not included in gridComponents. Setting "+_2+" to false.");this[_2]=false}}
this.setMembers(this.getGridMembers())},isc.A.layoutChildren=function isc_ListGrid_layoutChildren(_1,_2,_3){var _4=(this.getDrawnState()!=isc.Canvas.UNDRAWN)||(_1==this.$od);if(!_4){return isc.VLayout.$b4.layoutChildren.call(this,_1,_2,_3)}
var _5=false;if(this.body!=null&&this.frozenBody!=null&&!this.isDrawn()&&_1==this.$od)
{this.body.$182n();this.frozenBody.$182n();this.body.$191o=true;this.body.$191o=true;_5=true}
if(this.body!=null){if(_1!=this.$pc||_2!=0&&this.$217t(_2)){this.$45m(_1,_2,_3)}}
isc.VLayout.$b4.layoutChildren.call(this,_1,_2,_3);if(_5){delete this.body.$191o;delete this.frozenBody.$191o}
if(this.body!=null){if(this.frozenBody){var _6=this.shrinkForFreeze&&this.body.hscrollOn;var _7=this.bodyLayout.getInnerHeight();if(_6)_7-=this.body.getScrollbarSize();this.frozenBody.setHeight(_7);if(this.frozenBody.$276())this.frozenBody.markForRedraw("height changed");this.frozenBody.updateUserSize(_7,this.$o5)}}},isc.A.$217t=function isc_ListGrid__shouldUpdateFieldWidths(_1){if(!this.isDrawn()||!this.header||!isc.isA.Number(_1)||this.overflow!=isc.Canvas.VISIBLE&&this.overflow!=isc.Canvas.CLIP_V)
{return true}
var _2=this.header.getWidth()-this.getWidth();return _2<=0||_2+_1<=0},isc.A.getChildTabPosition=function isc_ListGrid_getChildTabPosition(_1,_2){var _3=this.Super("getChildTabPosition",arguments);var _4=this.headerLayout||this.header,_5=this.sorter;if(_4==null||_5==null){return _3}
var _6=this.members.indexOf(_4);if(_1==_5){return _6+1}
if(_3==null){return null}
var _7=this.members.indexOf(_1);if(_7==null||_7==-1||_7>_6){_3+=1}
return _3},isc.A.shouldAlterBreadth=function isc_ListGrid_shouldAlterBreadth(_1){if((_1==this.body||_1==this.bodyLayout)&&this.body.$70v)return false;return this.Super("shouldAlterBreadth",arguments)},isc.A.$105s=function isc_ListGrid__updateHeaderWidth(_1,_2,_3){var _4=this.autoFitMaxColumns;if(_4!=null){if(this.frozenFields==null||this.freezeStart()){_1=_1.slice(0,_4)}else{var _5=this.frozenFields.length;if(_4<_5){_1=_1.slice(-_5,-_5+_4)}else{var _6=_1.slice(0,_4-_5);_1=_1.slice(-_5);_1.addList(_6)}}}
var _7=_1.sum();if(this.body){var _8=this.body.vscrollOn;if(_8||this.alwaysShowVScrollbar||this.$54u(!!_8)){_7+=this.body.getScrollbarSize()}}
var _9=this.getAutoFitMaxWidth();if(_9!=null){_9=this.$1669(_9)}
if(_9!=null&&_7>_9){_7=_9}
if(_7>_2){if(_3)_3.resizeTo(_7);else _2=_7}
return _2},isc.A.$45m=function isc_ListGrid__updateFieldWidths(_1,_2,_3){if(this.body==null)return;if(this.$97e)return;var _4=(_1==this.$od);if(!_4&&this.getDrawnState()==isc.Canvas.UNDRAWN){return}
if(this.$928){if(_2)this.$174k=true;return}else{this.$174k=false}
if(this.$813){return}
if(this.$113n){return}
this.$928=true;var _5=this.$26a;this.$26a=null;if(this.fields&&!this.skipAutoFitWidths){if(!this.fields.$775){var _6=this.getAutoFitValueWidths(null,true);if(_6==null){this.fields.setProperty("$776",null)}else{var _7=this.header,_8=this.frozenHeader,_9=_7&&_7.instantRelayout,_10=_8&&_8.instantRelayout;if(_7)_7.instantRelayout=false;if(_8)_8.instantRelayout=false;for(var i=0;i<this.fields.length;i++){var _12=this.fields[i];if(_6[i]==null){_12.$776=null;continue}
var _13=_12.maxWidth||Infinity,_14=this.getMinFieldWidth(_12),_15=Math.min(_6[i],_13);var _16=this.getFieldHeaderButton(i);if(_16==null){if(_7&&_14>_15){_12.$187n=_14}}else{var _17=this.getAutoFitWidthApproach(_12)=="both",_18=_16.overflow,_19=_17&&(_18!="visible");if(_17&&_19){_16.setOverflow("visible")}
if(_14<_15){_16.setWidth(_15)}else{_16.setWidth(_14)}
if(_16.isDirty())_16.redraw();if(_16.label&&_16.label.isDirty()){_16.label.redraw()}
if(_17){var _20=_16.getVisibleWidth(),_21=Math.max(_14,_15);if(_20>_21){_15=Math.min(_20,_13);_16.setWidth(_15)}
if(_19){_16.setOverflow(_18)}}}
_12.$776=_15;var _16=this.getFieldHeaderButton(i);if(_16!=null){if(_14<_15){_16.setWidth(_15)}else{_16.setWidth(_14)}}}
if(_7){_7.instantRelayout=_9;if(_7.$3n)_7.$2029()}
if(_8){_8.instantRelayout=_10;if(_8.$3n)_8.$2029()}
this.fields.$775=true;this.$99j=this.getWidth()}}else if(this.$99j!=this.getWidth()){var _22=this.getAutoFitExpandField();if(_22){var _23=this.getFieldNum(_22);delete _22.$776;var _6=this.getAutoFitValueWidths(null,true);if(_6){var _24=_6[_23];if(isc.isA.Number(_24)){var _13=_22.maxWidth||Infinity,_14=this.getMinFieldWidth(_22);_22.$776=Math.min(_24,_13);var _16=this.getFieldHeaderButton(_23);if(_16!=null){_16.setWidth(Math.max(_14,_24))}
this.$99j=this.getWidth()}}}}}
var _25=this.getAvailableFieldWidth(true),_26=(_25!=this.innerWidth);this.innerWidth=_25;var _7=this.header,_27=(this.showHeader?this.getHeaderHeight():0);if(_7!=null){var _28=(this.isRTL()&&this.$313()?this.$139x():0);_7.hPolicy="fill";if(this.frozenHeader)this.frozenHeader.hPolicy="fill";var _29=this.autoFitData=="horizontal"||this.autoFitData=="both",_30=this.innerWidth,_31;if(!this.leaveScrollbarGap&&_7.isDrawn()&&_30!=_7.getWidth()&&_1=="body scroll changed"){if(this.$54e||!this.resizeFieldsForScrollbar){_7.hPolicy="none"}}
var _32=this.headerLayout||_7;_32.resizeTo(_30,_27);_32.updateUserSize(_27,this.$o5);if(_29&&!this.$97e){_31=this.getFieldWidths(_1+" [sizing horizontal auto-fit header]");this.$105s(_31,_30,_32)}
if(!_7.isDrawn()&&(_4||this.isDrawn())){if(!this.frozenFields){if(_4)this.$20(_7);_7.draw()}else{if(_31==null){_31=this.getFieldWidths(_1+" [sizing frozen fields]")}
var _33=this.getFrozenSlots(_31);var _34=_33.sum();this.frozenHeader.setWidth(_34);this.frozenHeader.updateUserSize(_34,this.$o6);if(_4)this.$20(this.headerLayout);this.headerLayout.draw()}}
if(_7.isDrawn())_7.hPolicy="none";if(this.frozenHeader&&this.frozenHeader.isDrawn())this.frozenHeader.hPolicy="none";if(this.sorter){this.updateSorter()}
if(this.autoFitHeaderHeights){var _27=this.getHeaderHeight();this.dropCachedHeaderButtonHeights();var _35=this.getHeaderHeight(),_32=this.headerLayout||this.header;if(_27!=_35||_32.getHeight()!=_35)
{_32.setHeight(_35);this.$109d()}else{if(this.headerSpans){this.header.$58r(true);if(this.frozenHeader)this.frozenHeader.$58r(true)}}}}
if((!this.$26a||_26)&&((_7&&_7.isDrawn())||_27==0))
{var _36;if(_7&&_7.hPolicy&&(_1==this.$191c||_1==this.$od))
{_36=_7.hPolicy;_7.hPolicy="fill"}
var _31=this.getFieldWidths(_1);this.setBodyFieldWidths(_31);if(this.filterEditor&&this.filterEditor.body!=null){this.filterEditor.setBodyFieldWidths(this.filterEditor.getFieldWidths(_1))}
if(this.summaryRow&&this.showGridSummary&&this.summaryRow.body!=null){this.summaryRow.setBodyFieldWidths(_31.duplicate())}
if(this.logIsDebugEnabled("layout")){this.logDebug("new field widths: "+this.$26a,"layout")}
if(_36)_7.hPolicy=_36}
if(_29&&this.filterEditor){this.filterEditor.setWidth(this.body.getVisibleWidth())}
this.$928=false;if(this.headerSpans!=null&&this.autoSizeHeaderSpans){var _37=false;if(this.$174k){_37=true}else if(this.$26a!=null&&_5!=null){if(_5.length!=this.$26a.length){_37=true}else{for(var i=0;i<_5.length;i++){if(_5[i]!=this.$26a[i]){_37=true;break}}}}
if(_37){if(this.$1719){}else{this.logDebug("Re-running update field widths to account for header span auto-size");this.$1719=true;var _38="Ensure header span and field sizes sync";if(_1!=null)_38+=" [from "+_1+"]";this.$45m(_38)}
this.$1719=false}}},isc.A.getHeaderButtonDefaultHeight=function isc_ListGrid_getHeaderButtonDefaultHeight(_1,_2){if(_2||_1.$109e==null){this.calculateDefaultSpanHeights()}
return _1.$109e},isc.A.calculateDefaultSpanHeights=function isc_ListGrid_calculateDefaultSpanHeights(){if(this.headerSpans==null){return}
if(this.headerSpans!=null){var _1=this.getFields(),_2=_1.getProperty("name");for(var i=0;i<this.headerSpans.length;i++){var _4=this.headerHeight,_5=this.headerSpans[i];this.$109f(_5,_4,_2)}
for(var i=0;i<_1.length;i++){if(this.spanMap[_1[i].name]==null){_1[i].$109e=this.headerHeight}}}},isc.A.$109f=function isc_ListGrid__calculateDefaultSpanHeight(_1,_2,_3,_4){if(!_4){if(!this.$97j(_3,_1))return;var _5;if(_1.$55j!==true){_5=_1.height||this.headerSpanHeight}
if(_5==null){var _6=this.getNestedSpanDepth(_1);_6+=1;_5=Math.floor(_2/_6)}
_1.$109e=_5;_2-=_5;if(_1.spans){for(var i=0;i<_1.spans.length;i++){this.$109f(_1.spans[i],_2,_3)}}else{for(var i=0;i<_1.fields.length;i++){var _8=this.getField(_1.fields[i]);if(_8){this.$109f(_8,_2,_3,true)}}}}else{if(!_3.contains(_1.name))return;_1.$109e=_2}},isc.A.$181g=function isc_ListGrid__getHeaderButtonWrap(_1,_2){if(_1.wrap!=null)return _1.wrap;return _2?this.wrapHeaderSpanTitles:this.wrapHeaderTitles},isc.A.getHeaderButtonMinHeight=function isc_ListGrid_getHeaderButtonMinHeight(_1,_2){if(!_2&&_1.$109g!=null){return _1.$109g}
return this.getHeaderButtonMinHeights([_1],_2)[0]},isc.A.getHeaderButtonMinHeights=function isc_ListGrid_getHeaderButtonMinHeights(_1,_2){var _3=[];var _4=[];var _5="";for(var i=0;i<_1.length;i++){var _7,_8,_9=_1[i];if(!_2&&_9.$109g!=null){_4[i]=_9.$109g}else{_8=!this.fields.contains(_9);if(_8){var _10=this.getSpannedFields(_9);_7=0;for(var _11=0;_11<_10.length;_11++){var _12=this.getField(_10[_11]);if(_12==null){continue}
_7+=this.getFieldWidth(_10[_11])}}else{_7=this.getFieldWidth(_9)}
if(isNaN(_7)){_4[i]=1}else{var _13=_9.headerBaseStyle,_14=this.getHeaderButtonProperties();if(_13==null){if(_9.frozen&&_14.frozenBaseStyle){_13=_14.frozenBaseStyle}else if(_14.baseStyle){_13=_14.baseStyle}}
var _15=_9.headerTitleStyle;if(_15==null){if(_9.frozen&&_14.frozenTitleStyle){_15=_14.frozenTitleStyle}else if(_14.titleStyle){_15=_14.titleStyle}}
if(_13==null||_15==null){var _16=this.headerButtonConstructor||this.header?this.header.buttonConstructor:isc.Toolbar.getPrototype().buttonConstructor;if(isc.isA.String(_16)){_16=isc[_16]}
if(_13==null){_13=_16.getPrototype().baseStyle}
if(_15==null){_15=_16.getPrototype().titleStyle}}
var _17=_8?_9.headerTitle||_9.title:this.getHeaderButtonTitle(_9);var _18=_9.$115h;if(_18&&_18.baseStyle==_13&&_18.titleStyle==_15&&_18.width==_7&&_18.wrap==_9.wrap&&_18.title==_17)
{_9.$109g=_18.height;_4[i]=_18.height}}}
if(_4[i]!=null)continue;if(this.$1880(_9,_7)){_7=Math.max(1,_7-this.$1881(_9))}
var _19={};_19.width=_7;_19.baseStyle=_13;_19.titleStyle=_15;_19.wrap=_9.wrap;_19.title=_17
_3.add({index:i,config:_19});if(_8==null)_8=!this.fields.contains(_9);var _20=this.$181g(_19,_8);_5+="<div style='position:absolute;width:"+_7+"px;'><div class="+(_19.titleStyle||_19.baseStyle)+(_20?">":" style='white-space:nowrap;'>")+_17+"</div></div>"}
if(_3.length==0)return _4;if(isc.ListGrid.headerHeightTester==null){isc.ListGrid.headerHeightTester=isc.Canvas.create({overflow:"hidden",top:-1000,autoDraw:true,contents:_5})}else{isc.ListGrid.headerHeightTester.setContents(_5)}
if(isc.ListGrid.headerHeightTester.isDirty())isc.ListGrid.headerHeightTester.redraw();var _21=isc.ListGrid.headerHeightTester.getHandle(),_22=_21.childNodes;if(_22.length!=_3.length){}
for(var i=0;i<_22.length;i++){var _23=_22[i];var _19=_3[i].config,_24=_3[i].index,_9=_1[_24];_19.height=_23.offsetHeight;_9.$115h=_19;_9.$109g=_19.height;_4[_24]=_19.height}
return _4},isc.A.dropCachedHeaderButtonHeights=function isc_ListGrid_dropCachedHeaderButtonHeights(){for(var i=0;i<this.fields.length;i++){this.fields[i].$109e=null;this.fields[i].$109g=null;if(this.spanMap){var _2=this.spanMap[this.fields[i].name];while(_2!=null){_2.$109e=null;_2.$109g=null;_2=_2.parentSpan}}}},isc.A.getHeaderHeight=function isc_ListGrid_getHeaderHeight(){if(this.headerHeight==0||!this.showHeader)return 0;if(!this.autoFitHeaderHeights)return this.headerHeight;var _1=0;if(this.headerSpans==null){_1=this.headerHeight;var _2=this.getFields();var _3=this.getHeaderButtonMinHeights(_2);_1=Math.max(_1,_3.max())}else{var _2=this.getFields(),_4=0;var _5=this.getHeaderButtonMinHeights(_2),_6=[];for(var i=0;i<_2.length;i++){if(this.spanMap[_2[i].name]){var _8=this.spanMap[_2[i].name];while(_8){if(!_6.contains(_8)){_6.add(_8)}
_8=_8.parentSpan}}}
var _9=this.getHeaderButtonMinHeights(_6);for(var i=0;i<_2.length;i++){_4=Math.max(this.getHeaderButtonDefaultHeight(_2[i]),this.getHeaderButtonMinHeight(_2[i]));if(this.spanMap[_2[i].name]){var _8=this.spanMap[_2[i].name];while(_8){_4+=Math.max(this.getHeaderButtonDefaultHeight(_8),this.getHeaderButtonMinHeight(_8));_8=_8.parentSpan}}
_1=Math.max(_1,_4)}}
return Math.max(_1,this.headerHeight)},isc.A.getAutoFitValueWidths=function isc_ListGrid_getAutoFitValueWidths(_1,_2){if(this.data==null)return;if(isc.isA.ResultSet(this.data)){var _3=this.body.getDrawArea();if(!this.data.rangeIsLoaded(_3[0],_3[1])){if(_1==null){this.updateFieldWidthsForAutoFitValue("Delayed resize pending data load")}
return}}else if(isc.isA.ResultTree(this.data)){var _4=this.data,_5=_4.getRoot();if(!_5||(_4.getLoadState(_5)!=isc.Tree.LOADED&&_4.getLoadState(_5)!=isc.Tree.LOADED_PARTIAL_CHILDREN))
{this.updateFieldWidthsForAutoFitValue("Delayed resize pending tree data load");return}}
var _6=(_1==null);if(_1==null){_1=[];for(var i=0;i<this.fields.length;i++){var _8=this.fields[i];if(this.shouldAutoFitField(_8)){if(!_2||this.getAutoFitWidthApproach(_8)!="title"){_1.add(_8);_6=false}}}}
if(_6)return[];var _9=[],_10=false,_11=[],_12=[],_13=[],_14=[];for(var i=0;i<this.fields.length;i++){if(_1.contains(this.fields[i])){var _8=this.fields[i];var _15=this.getDefaultFieldWidth(this.fields[i],true);if(_15==null){_10=true;if(_8.frozen){_11.add(this.getLocalFieldNum(i));_12.add(i)}else{_13.add(this.getLocalFieldNum(i));_14.add(i)}}else{_9[i]=_15}}}
if(_10){if(_11.length>0){var _16=this.$116i(true,_11);if(_16!=null){for(var i=0;i<_16.length;i++){_9[_12[i]]=_16[i]}}}
if(_13.length>0){var _16=this.$116i(false,_13);if(_16!=null){for(var i=0;i<_16.length;i++){_9[_14[i]]=_16[i]}}}}
return _9},isc.A.$116i=function isc_ListGrid__getBodyColumnAutoSize(_1,_2){var _3=_1?this.frozenBody:this.body;if(_3==null)return null;var _4=_3.getColumnAutoSize(_2);if(this.includeGridSummaryInAutoFitWidth&&this.showGridSummary&&this.summaryRow!=null)
{var _5=(_1?this.summaryRow.frozenBody:this.summaryRow.body);if(_5!=null){var _6=_5.getColumnAutoSize(_2);if(_6!=null){if(_4==null)_4=[];for(var i=0;i<_6.length;i++){if(_4[i]==null||_6[i]>_4[i])_4[i]=_6[i]}}}}
if(this.allowMismatchedHeaderBodyBorder&&_4!=null){var _3=_1?this.frozenBody:this.body,_8=_2.indexOf(0),_9=_2.indexOf((_1?this.frozenFields.length:this.fields.length)-1);if(_8!=-1){_4[_8]=_4[_8]+_3.getLeftBorderSize()+_3.getLeftMargin()}
if(_9!=-1){_4[_9]=_4[_9]+_3.getRightBorderSize()+_3.getRightMargin()}}
return _4},isc.A.getDefaultFieldWidth=function isc_ListGrid_getDefaultFieldWidth(_1,_2){if(_1.defaultWidth!=null)return _1.defaultWidth;var _3=_1.type==null?null:isc.SimpleType.getBaseType(_1.type)||_1.type;if(_3=="date"||_3=="datetime"){var _4=(this.canEdit==true&&_1.canEdit!=false)||(this.canEdit!=false&&_1.canEdit==true),_5=isc.SimpleType.inheritsFrom(_1.type,"datetime");if(_4){if(_5){if(this.defaultEditableDateTimeFieldWidth!=null){return this.defaultEditableDateTimeFieldWidth}}else{if(this.defaultEditableDateFieldWidth!=null){return this.defaultEditableDateFieldWidth}}}else{if(_5){if(this.defaultDateTimeFieldWidth!=null){return this.defaultDateTimeFieldWidth}}else{if(this.defaultDateFieldWidth!=null){return this.defaultDateFieldWidth}}}}
if(_3=="time"){if(this.defaultTimeFieldWidth!=null){return this.defaultTimeFieldWidth}}
var _6;if(_3=="icon"&&(_1.iconWidth!=null||_1.iconSize!=null)){_6=(_1.iconWidth||_1.iconSize)+2*this.cellPadding+2*this.iconPadding;_6+=isc.Element.$sw(this.baseStyle)}else if(this.showValueIconOnly(_1)){_6=this.getValueIconWidth(_1)+2*this.cellPadding+this.getValueIconRightPadding(_1)+this.getValueIconLeftPadding(_1);_6+=isc.Element.$sw(this.baseStyle)}else{_6=_2?null:this.getFieldContentWidth(_1)}
if(isc.isA.Number(_6)&&this.showFilterEditor&&!this.leaveScrollbarGap&&this.fields!=null&&_1===this.fields.last())
{var _7=this.$139x(),_8=Math.min(_6+_7,this.lastFieldMaxExpandWidth);if(_6<_8)_6=_8}
return _6},isc.A.getFieldContentWidth=function isc_ListGrid_getFieldContentWidth(_1){var _2,_3=this.getFieldNum(_1),_4=this.getLocalFieldNum(_3);var _5=this.$116i(_1.frozen,[_4]);_2=_5?_5[0]:null;if(_2==null)_2=_1.width;return _2},isc.A.getAutoFitWidthApproach=function isc_ListGrid_getAutoFitWidthApproach(_1){if(_1.autoFit!=null)return _1.autoFit;if(_1.autoFitWidthApproach!=null)return _1.autoFitWidthApproach;return this.autoFitWidthApproach},isc.A.draw=function isc_ListGrid_draw(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(!this.readyToDraw())return this;if(this.minHeight==null)this.minHeight=this.$188x();this.$168o=true;this.prepareForDraw();this.invokeSuper(isc.ListGrid,"draw",_1,_2,_3,_4);if(this.completeFields){this.$235t()}
delete this.$168o;this.body.getColumnSizes();for(var i=0;i<this.bodies.length;i++){var _6=this.bodies[i];if(_6.$29a)this.markForRedraw()}
var _7=this.$60z();if(this.header&&_7!=null&&this.selectHeaderOnSort){this.selectSortFieldHeaderButton()}
this.$206e(this.body.getScrollLeft(),this.body.getScrollTop());if(this.sorter)this.updateSorter();if(this.body.$29a||(this.frozenBody&&this.frozenBody.$29a))
{this.updateFieldWidthsForAutoFitValue("Initial draw with embeddedComponents")}
this.$1672=this.isEmpty();if(isc.Browser.isIE&&this.header&&this.headerSpans&&this.autoFitWidthApproach=="both"){this.header.layoutChildren()}
this.updateHeaderRadius();if(!isc.isA.PickListMenu||!isc.isA.PickListMenu(this)){this.$172u()}
return this},isc.A.$206e=function isc_ListGrid__syncBodyScrollForDraw(){this.bodyScrolled(this.body.getScrollLeft(),this.body.getScrollTop())},isc.A.$686=function isc_ListGrid__alwaysShowEditors(_1,_2){if(!_2&&this.getTotalRows()==0)return false;if(this.alwaysShowEditors)return true;var _3=_1?[_1]:this.fields;if(_3){for(var i=0;i<_3.length;i++){if(_3[i].alwaysShowEditors){return true}}}
return false},isc.A.prepareForDraw=function isc_ListGrid_prepareForDraw(){var _1=this.groupByField&&!this.isGrouped;if(this.data){this.data.$1708=_1}
if(this.completeFields==null)this.setFields(this.fields);if(this.data){delete this.data.$1708}
if(this.getEditRow()==null){var _2=this.$686();if(_2)this.startEditing(null,null,true,null,true)}
if(_1){var _3=this.getGroupByFields();this.groupByField=null;this.groupBy(_3)}
this.createChildren()},isc.A.getCanSaveSearches=function isc_ListGrid_getCanSaveSearches(){return false},isc.A.getGroupByFields=function isc_ListGrid_getGroupByFields(){var _1=this.groupByField;if(_1!=null&&!isc.isAn.Array(_1)){_1=[_1]}
return _1},isc.A.openGroup=function isc_ListGrid_openGroup(_1){if(isc.isA.Tree(this.data)&&_1.isFolder){if(!this.data.isOpen(_1)){this.openFolder(_1);return true}}
return false},isc.A.closeGroup=function isc_ListGrid_closeGroup(_1){if(isc.isA.Tree(this.data)&&_1.isFolder){if(this.data.isOpen(_1)){this.closeFolder(_1);return true}}
return false},isc.A.prepareForDestroy=function isc_ListGrid_prepareForDestroy(_1){if(this.isObserving(this,"fieldStateChanged"))this.ignore(this,"fieldStateChanged");if(this._dragLine){this._dragLine.destroy();this._dragLine=null}
if(this.$314)this.$314.destroy();if(this.spanContextMenu)this.spanContextMenu.destroy();if(this.cellContextMenu)this.cellContextMenu.destroy();if(this.$286){this.$286.destroy();delete this.$286;delete this.$30a}
if(this.searchForm)this.setSearchForm(null);if(this.refreshDataTimer)isc.Timer.clear(this.refreshDataTimer);if(this.data){if(this.data.$31k&&isc.isA.Function(this.data.destroy)){this.data.destroy()}else{this.$31j(this.data,true);delete this.data}}
if(this.originalData){if(this.originalData.$31k&&isc.isA.Function(this.originalData.destroy)){this.originalData.destroy()}else{this.$31j(this.originalData,true);delete this.originalData}}
if(this.selectionManager){this.destroySelectionModel()}
if(this.selectionCanvas)this.selectionCanvas.destroy();if(this.selectionUnderCanvas)this.selectionUnderCanvas.destroy();if(this.currentRollOverCanvas)this.currentRollOverCanvas.destroy();if(this.currentRollUnderCanvas)this.currentRollUnderCanvas.destroy();this.$67a();var _2=this.getRecordComponentPool();if(_2){for(var i=0;i<_2.length;i++){var _4=_2[i];if(_4&&_4.destroy&&!_4.destroyed){if(!_4.dontAutoDestroy)_4.destroy();else _4.deparent()}}}
if(this.$89r!=null){for(var _5 in this.$89r){var _4=this.$89r[_5];if(!_4||_4.destroyed||_4.destroying||_4.$65i)
{continue}
if(!_4.dontAutoDestroy)_4.destroy();else _4.deparent()}}
if(this.hiddenResultSet)this.hiddenResultSet.destroy();this.Super("prepareForDestroy",arguments)});isc.evalBoundary;isc.B.push(isc.A.redrawHeader=function isc_ListGrid_redrawHeader(_1){var _2=this.headerLayout||this.header;if(_2){if(_1){_2.redraw(this.ID+": redrawHeader()")}else{_2.markForRedraw(this.ID+": redrawHeader()")}}},isc.A.getBaseStyle=function isc_ListGrid_getBaseStyle(_1,_2,_3){if(this.canEdit==true&&!this.isPrinting){if(this.editFailedBaseStyle&&this.cellHasErrors(_2,_3))
return this.editFailedBaseStyle;if(this.editPendingBaseStyle&&this.$166v(_2,_3,false,true))
return this.editPendingBaseStyle}
if(this.originBaseStyle&&this.selectionManager.$94h(_2,_3)){return this.originBaseStyle}
if(_1&&this.recordBaseStyleProperty&&_1[this.recordBaseStyleProperty])
return _1[this.recordBaseStyleProperty];if(!_1||!_1[this.singleCellValueProperty]){var _4=this.getField(_3);if(_4&&_4.baseStyle)return _4.baseStyle;if(_4&&this.$275t(_4)=="recordSummary"&&this.recordSummaryBaseStyle)
return this.recordSummaryBaseStyle;if(_4&&_4.frozen&&!this.$54d&&this.frozenBaseStyle){return this.frozenBaseStyle}}
if(this.isPrinting&&(this.printBaseStyle!=null))return this.printBaseStyle;var _5=this.baseStyle,_6="regular";if(_5==null){if(this.cellHeight!=this.normalCellHeight||this.fastCellUpdates||this.allowRowSpanning||!this.shouldFixRowHeight(_1,_2)||(_1!=null&&this.$916(_1)))
{_5=this.tallBaseStyle;_6="tall"}else{_5=this.normalBaseStyle;_6="normal"}}
return _5},isc.A.parseRadiusString=function isc_ListGrid_parseRadiusString(_1){var _2=_1.split(" ");if(_2.length==1)_2=new Array(4).fill(_2[0]);else if(_2.length==2)_2.addList(_2);else if(_2.length==3)_2.add(_2[1]);return _2},isc.A.setHeaderRadius=function isc_ListGrid_setHeaderRadius(_1){this.headerRadius=_1;this.updateHeaderRadius(true)},isc.A.getHeaderRadiusArray=function isc_ListGrid_getHeaderRadiusArray(_1){if(_1)delete this.$260c;if(!this.headerRadius||this.headerRadius=="")return;if(!this.$260c){this.$260c=this.parseRadiusString(this.headerRadius)}
return this.$260c},isc.A.updateHeaderRadius=function isc_ListGrid_updateHeaderRadius(_1){var _2=this.getHeaderRadiusArray(_1);if(!_2||!this.isDrawn()||!this.headers)return;var _3=this.headers[0]&&this.headers[0].getStyleHandle(),_4=this.headers[1]&&this.headers[1].getStyleHandle(),_5=this.sorter&&(this.sorter.isVisible()||(this.vscrollOn&&this.leaveScrollbarGap!=false)),_6=this.sorter&&(this.sorter.getStyleHandle()||this.sorter.getHandle()),_7=this.showFilterEditor,_8=this.filterEditor&&this.filterEditor.getStyleHandle();if(_7&&_8){_8["border-radius"]="0px";_8["border-top-left-radius"]=_2[0];_8["border-top-tight-radius"]="0px";_8["border-bottom-right-radius"]="0px";_8["border-bottom-left-radius"]="0px"}
if(_3){_3["border-radius"]="0px";if(!_7)_3["border-top-left-radius"]=_2[0];_3["border-bottom-left-radius"]=_2[3];if(!_4&&!_5){if(!_7)_3["border-top-right-radius"]=_2[1];_3["border-bottom-right-radius"]=_2[2]}}
if(_4){_4["border-radius"]="0px";if(!_5){if(!_7)_4["border-top-right-radius"]=_2[1];_4["border-bottom-right-radius"]=_2[2]}}
if(_5&&_6){_6["border-radius"]="0px";if(!_7)_6["border-top-right-radius"]=_2[1];_6["border-bottom-right-radius"]=_2[2]}},isc.A.setRecordRadius=function isc_ListGrid_setRecordRadius(_1){this.recordRadius=_1;this.getRecordRadiusArray(true)},isc.A.getRecordRadiusArray=function isc_ListGrid_getRecordRadiusArray(_1){if(_1)delete this.$260d;if(!this.recordRadius||this.recordRadius=="")return;if(!this.$260d){this.$260d=this.parseRadiusString(this.recordRadius)}
return this.$260d},isc.A.getCellCSSText=function isc_ListGrid_getCellCSSText(_1,_2,_3){var _4=this.getField(_3),_5;if(_1){if(this.fieldSourceGrid==null&&_4!=null&&this.showValueIconOnly(_4)){if(!_1.$52e||this.canCollapseGroup||!this.$197t(this.getFieldBody(_3),_3,this.$197s(_4)))
{_5="line-height:0px;"}}
var _6=_1[this.recordCSSTextProperty];if(_6!=null){return _5!=null?_5+_6:_6}}
var _7=this.removedCSSText;if(this.recordMarkedAsRemoved(_2)&&_7){_5=_5!=null?_5+_7:_7}else{if(this.hasBeenEdited(_2)){var _8;if(this.editFailedBaseStyle==null&&(_8=this.editFailedCSSText)&&this.cellHasErrors(_2,_3))
{_5=_5!=null?_5+_8:_8}else if(this.editPendingBaseStyle==null&&(_8=this.editPendingCSSText)&&this.$166v(_2,_3,false,true))
{_5=_5!=null?_5+_8:_8}}}
if(!this.isFilterEditor&&this.recordRadius){if(!this.$260e){this.$260e={};for(var i=0;i<this.recordRadiusTargets.length;i++){this.$260e[this.recordRadiusTargets[i]]=true}}
var _10=_1&&_1.groupName!=null,_11=_1&&_1[this.groupSummaryRecordProperty],_12=this.$94m;var _13=true;var _14=this.$260e;if(_1){if(_10)_13=!!_14["groupHeader"];else if(_11)_13=!!_14["groupSummary"];else if(_12)_13=!!_14["gridSummary"];else _13=!!_14["normal"]}
if(_13){_5=_5||""
var _15=this.getFields().length-1,_16=this.getField(_15);if(_4.masterIndex==0||_4.masterIndex==_15){if(_5!=""&&!_5.endsWith(isc.semi))_5+=isc.semi;var _17=this.getRecordRadiusArray();if(_4.masterIndex==0){_5+="border-top-left-radius: "+_17[0]+"; border-bottom-left-radius: "+_17[3]+";"}
if(_4.masterIndex==_16.masterIndex||_10){_5+="border-top-right-radius: "+_17[1]+"; border-bottom-right-radius: "+_17[2]+";"}}}}
if(!this.body.$282(_2,_1)){_5=this.getRecordHiliteCSSText(_1,_5,this.getField(_3),true)}
if(_5&&!_5.endsWith(isc.semi))_5+=isc.semi;return _5},isc.A.getRawCellValue=function isc_ListGrid_getRawCellValue(_1,_2,_3,_4){return this.$141x(this.emptyCellValue,this.groupSummaryRecordProperty,this.gridSummaryRecordProperty,null,null,this.data,this.applyFormulaAfterSummary,null,null,null,null,_1,_2,_3,_4)},isc.A.$141x=function isc_ListGrid__getRawCellValue(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15){if(this.getRawCellValue!=isc.ListGrid.getInstanceProperty("getRawCellValue")){return this.getRawCellValue(_12,_13,_14,_15)}
var _16,_17,_18;if(_15){_17=_14
_16=this.completeFields?isc.Class.getArrayItem(_17,this.completeFields,"name"):this.getField(_17)}else{_16=this.fields[_14];_17=_16?_16.name:_17}
var _19=this.fieldSourceGrid||this,_20=_16&&_19.$275t(_16);if(_8==null){_8=_20=="userFormula"}
if(_8&&_9==null){_9=_16.userFormula}
if(_10==null){_10=_20=="userSummary"}
if(_10&&_11==null){_11=_16.userSummary}
_18=_16?this.getTrimmedFieldDataPath(_16):null;if(_17==null&&_18==null)return _1;var _21,_22,_23;if(this.$33a!=null&&this.$33a[_13]!=null){_21=this.$30y(_13,_14)}
if(_21!==_23){return _21}else if(_12==null){return _1}else if(_16&&_19.$275o(_16)){var _24=_19.$275h(_16),_25=isc.FieldGeneratorUtil.$280g(_24,_16,_19);_22=_12[_25]}else{if(_6.getFieldValue&&_16){_22=_6.getFieldValue(_12,_18,_16,this,"getRawValue")}else if(_12.ownerDocument&&_16){_22=isc.xml.getFieldValue(_12,_17,_16)}else{if(!_12.$52e&&!_12[this.groupSummaryRecordProperty]){_22=isc.Canvas.$70o(_18,_16,_12,this,true,"getRawValue")}
if(_22==null)_22=_12[_17]}}
if(_16&&_16.getRawCellValue){isc.Func.replaceWithMethod(_16,"getRawCellValue","viewer,record,recordNum,field,fieldNum,value");_22=_16.getRawCellValue(this,_12,_13,_16,_14,_22)}
if(_16){if(this.$142d(_7,_8,_16)&&this.$1410(_2,_7,_16,_12))
{var _26=_16.userFormula;_16.userFormula=_9;_22=this.getFormulaFieldValue(_16,_12);_16.userFormula=_26}
if(_10){var _27=_16.userSummary;_16.userSummary=_11;this.getSummaryFunction(_16);_16.userSummary=_27}}
return _22},isc.A.shouldShowRecordSummary=function isc_ListGrid_shouldShowRecordSummary(_1,_2){return this.$141y(this.groupSummaryRecordProperty,this.gridSummaryRecordProperty,_1,_2)},isc.A.$141y=function isc_ListGrid__shouldShowRecordSummary(_1,_2,_3,_4){if(_3&&this.$275t(_3)=="recordSummary"){if(_4[_1]){return(_3.summaryFunction==null&&_3.getGroupSummary==null)}else if(_4[_2]){return(_3.summaryFunction==null&&_3.getGridSummary==null)}
return true}
return false},isc.A.shouldShowUserFormula=function isc_ListGrid_shouldShowUserFormula(_1,_2){return this.$1410(this.groupSummaryRecordProperty,this.applyFormulaAfterSummary,_1,_2)},isc.A.$1410=function isc_ListGrid__shouldShowUserFormula(_1,_2,_3,_4){var _5=this.$94m||(_4&&_4[_1]);if(_5&&!this.$1411(_2,_3)){return false}
return true},isc.A.$117u=function isc_ListGrid__applyFieldFormulaAfterSummary(_1){return this.$1411(this.applyFormulaAfterSummary,_1)},isc.A.$1411=function isc_ListGrid___applyFieldFormulaAfterSummary(_1,_2){var _3=_2&&_2.applyAfterSummary;if(_3==null)_3=_1;if(_3==null)_3=false;return _3},isc.A.$116w=function isc_ListGrid__getCheckboxValueIconHTML(_1,_2,_3,_4,_5){var _6,_7;if(!_3){_6=isc.Canvas.$5w}else{var _8=this.isPrinting;var _9=(_8?this.printBooleanBaseStyle||this.booleanBaseStyle:this.booleanBaseStyle);if(_1){if(_2){_6=(_8?this.printCheckboxFieldPartialImage||this.checkboxFieldPartialImage||this.printBooleanPartialImage||this.booleanPartialImage:this.checkboxFieldPartialImage||this.booleanPartialImage);_7=_9==null?null:_9+"Partial"}else{_6=(_8?this.printCheckboxFieldTrueImage||this.checkboxFieldTrueImage||this.printBooleanTrueImage||this.booleanTrueImage:this.checkboxFieldTrueImage||this.booleanTrueImage);_7=_9==null?null:_9+"True"}}else{_6=(_8?this.printCheckboxFieldFalseImage||this.checkboxFieldFalseImage||this.printBooleanFalseImage||this.booleanFalseImage:this.checkboxFieldFalseImage||this.booleanFalseImage);_7=_9==null?null:_9+"False"}
if(_6==null)_6=isc.Canvas.$5w}
if(_4){var _10=isc.Canvas.$1861(_6);if(_10!=null){if(_10.src!=null&&!_10.svg){if(_10.src!=isc.Canvas.$5w){_10.src=isc.Img.urlForState(_10.src,false,false,isc.StatefulCanvas.STATE_DISABLED)}
if(_10.cssClass!=null){_10.cssClass+=isc.StatefulCanvas.STATE_DISABLED}
return this.getValueIconHTML(_6,_10.cssClass,_5)}else if(_10.svg){_6=isc.Img.urlForState(_6,false,false,isc.StatefulCanvas.STATE_DISABLED);return this.getValueIconHTML(_6,null,_5)}
return this.getValueIconHTML(_6,_10.cssClass,_5)}else{if(_6!=isc.Canvas.$5w)_6=isc.Img.urlForState(_6,false,false,isc.StatefulCanvas.STATE_DISABLED)}
if(_7!=null)_7+=isc.StatefulCanvas.STATE_DISABLED}
return this.getValueIconHTML(_6,_7,_5)},isc.A.getSeparatorRowHTML=function isc_ListGrid_getSeparatorRowHTML(_1){var _2=this.$302;if(this.separatorRowStyle)_2+=" class='"+this.separatorRowStyle+"'";if(!_2.endsWith(">"))_2+=this.$259u;return _2},isc.A.getCellValue=function isc_ListGrid_getCellValue(_1,_2,_3,_4){if(_4==null)_4=this.getFieldBody(_3);if(_1==null){if(this.$299(_2)){return this.getNewRecordRowCellValue()}
_1=this.$300(_2,_3)}else{if(_1[this.isSeparatorProperty])return this.getSeparatorRowHTML(_1);if(_1.$52e&&_3!=null){var _5=this.fields[_3],_6=this.$197s(_5);if(this.showGroupSummaryInHeader&&this.showGroupSummary&&_5.name==_1.groupName)
{var _7=_1.$134t&&_1.$134t[0];if((!_7||!_7[_5.name])&&!_6){return isc.nbsp}}
var _8=this.isCheckboxField(this.getField(_3));var _9=this.isRowNumberField(this.getField(_3));if(this.$197t(_4,_3,_6)){return this.getGroupNodeHTML(_1,_4)}else if(_8?!this.canSelectGroups:(_9||!this.showGroupSummaryInHeader))
{return isc.nbsp}}}
var _10=this.fields[_3],_11=null;if(_10==null)return isc.emptyString;if(this.$94m&&_10.summaryValue){return _10.summaryValue}
if(this.isCheckboxField(_10)){if(_1[this.groupSummaryRecordProperty])return"";var _12=this.selectionManager.isA("CellSelection"),_13,_14=this.disabled||(_1&&_1[this.recordEnabledProperty]==false);if(_12)_13=!!this.selectionManager.isSelected(_1,_3);else _13=!!this.selectionManager.isSelected(_1,_2);return this.$116w(_13,this.showPartialSelection&&!!this.selectionManager.isPartiallySelected(_1,_2),this.body.canSelectRecord(_1),_14,_10)}
var _15,_16,_17=this.showValueIconOnly(_10),_18;if(_1!=null){if(_1[this.singleCellValueProperty]!=null){return _1[this.singleCellValueProperty]}
if(Array.isLoading(_1)){if(!isc.Browser.isSafari||_3==0){return this.loadingMessage}
return isc.nbsp}
var _19=this.$285,_20=_19;if(_20!=null&&this.allowRowSpanning){_20=this.getCellStartRow(_20,_3)}
_18=(this.$30a&&_20==_2&&(!this.editByCell||this.$30u==_3)&&this.$2027(_19,_3));if(_18){var _21=_1;if(_19!=_2){_21=this.getCellRecord(_19,_3)}
if(_4.$941||this.$191m){_11=this.getInactiveEditorCellValue(_21,_19,_3,true)}else{_11=this.getEditItemCellValue(_21,_19,_3)}}else if(this.$68z(_3)&&this.canEditCell(_2,_3)){_11=this.getInactiveEditorCellValue(_1,_2,_3);_18=true}else{var _10=this.fields[_3],_22,_23,_24;if(_10.displayField!=null){_23=!_10.valueMap&&!_10.getCellValue&&this.$425(_10)&&(_1[_10.displayField]!==_24||this.$30y(_2,_10.displayField)!=_24);if(_23){var _25=_10.displayField;_22=this.getRawCellValue(_1,_2,_25,true)}}
_11=this.getRawCellValue(_1,_2,_3);if(_10.getCellValue){isc.Func.replaceWithMethod(_10,"getCellValue","viewer,record,recordNum,field,fieldNum,value");_11=_10.getCellValue(this,_1,_2,_10,_3,_11)}
_15=this.getValueIcon(_10,_11,_1,_2);_16=this.getValueIconStyle(_10,_11,_1,_2);if(!_17){var _26=_10.valueMap;if(_26){_11=this.resolveValueMap(_11,_10.valueMap)}}
if(_23)_11=_22}}
if(!_18){if(_1&&((_1[this.groupSummaryRecordProperty]&&!this.shouldShowGroupSummary(_10))||(this.$94m&&((_1[this.gridSummaryRecordProperty]&&!this.shouldShowGridSummary(_10))||(_10.showGridSummary==false)))))
{_11=_10.emptyCellValue!=null?_10.emptyCellValue:this.emptyCellValue}else{var _27;if(_1&&!_1.$132m&&this.$275o(_10)&&!this.$2750(_1)&&!this.isSummaryRecord(_1))
{if(this.isValuePendingAsync(_1,_10)){_27="pendingAsyncCellValue"}else if(this.$2725(_1,_10)){if(this.isValueAsyncError(_1,_10)){_27="asyncErrorCellValue"}else{_27="asyncMissingCellValue"}}else if(!this.$2754(_1,_10)){_27="asyncMissingCellValue"}}
var _28=null;if(!_27){if(_15!=null&&(!_1.$52e||_10.showGroupSummary)){_28=this.getValueIconHTML(_15,_16,_10,this.getValueIconCursor(_10,_1,_11))}
if(_17){if(!_28||isc.isAn.emptyString(_28))_27="emptyCellValue";else _11=_28}}
if(_27){_11=_10[_27]!=null?_10[_27]:this[_27]}
if(!_17){var _29=this.getFieldHilites(_1,_10);var _30=_10.hiliteHTMLAfterFormat;if(_30==null)_30=this.hiliteHTMLAfterFormat;if(_30==null)_30=true;if(_30){if(!_27)_11=this.$315(_11,_1,_10,_2,_3);if(_29!=null)_11=this.applyHiliteHTML(_29,_11)}else{if(_29!=null)_11=this.applyHiliteHTML(_29,_11);if(!_27)_11=this.$315(_11,_1,_10,_2,_3)}
if(_28){if(_10.valueIconOrientation!=isc.Canvas.RIGHT)
_11=_28+_11;else
_11=_11+_28}}
if(this.canEdit!=false&&this.showErrorIcons&&this.cellHasErrors(_2,_3)){var _31=this.getErrorIconHTML(_1,_2,_3);if(isc.FormItem.getPrototype().errorOrientation=="right")_11=_11+_31;else _11=_31+_11}
var _10=this.fields[_3];var _29=this.getFieldHilites(_1,_10);if(_29!=null){if(!_1||(_1&&!_1[this.groupSummaryRecordProperty])||(this.showHilitesInGroupSummary&&_10.showHilitesInGroupSummary!=false))
{_11=this.applyHiliteIcon(_29,_10,_11)}}}}
var _32=this.isGrouped?this.getGroupTitleField():null;if(_32&&this.fields[_3].name==_32){var _33=isc.Canvas.spacerHTML(this.groupIndentSize+this.groupLeadingIndent,1);_11=_33+_11}
return _11},isc.A.cellValueIsClipped=function isc_ListGrid_cellValueIsClipped(_1,_2){var _3=this.getFieldBody(_2);_2=this.getLocalFieldNum(_2);return _3.cellValueIsClipped(_1,_2)},isc.A.resolveValueMap=function isc_ListGrid_resolveValueMap(_1,_2){if(isc.isA.String(_2))_2=this.getGlobalReference(_2);if(!isc.isAn.Array(_2)){if(isc.isAn.Array(_1)){var _3=[];for(var i=0;i<_1.length;i++){var _5=isc.getValueForKey(_1[i],_2,_1[i]);_3[_3.length]=_5}
_1=_3}else{_1=isc.getValueForKey(_1,_2)}}
return _1},isc.A.getTitleFieldValue=function isc_ListGrid_getTitleFieldValue(_1){var _2=this.getDataSource().getTitleField(),_3=this.getCellValue(_1,this.getRecordIndex(_1),this.getFieldNum(_2),this.body);if(!_3||_3==""){_3=this.getRawCellValue(_1,this.getRecordIndex(_1),_2,true)}
return _3},isc.A.getRawValue=function isc_ListGrid_getRawValue(_1,_2){var _3=this.getRecordIndex(_1);return this.getRawCellValue(_1,_3,_2,true)},isc.A.getFormattedValue=function isc_ListGrid_getFormattedValue(_1,_2,_3,_4,_5){var _6=this.getRecordIndex(_1),_7=this.getSpecifiedField(_2),_8=this.getFieldNum(_2);if(this.fieldIsVisible(_7)&&_3==null){return this.getCellValue(_1,_6,_8,this.body)}
if(_3==null)_3=this.getRawValue(_1,_2);var _9=_7?_7.valueMap:null;if(_9){if(isc.isA.String(_9))_9=this.getGlobalReference(_9);if(!isc.isAn.Array(_9)){if(isc.isAn.Array(_3)){var _10=[];for(var i=0;i<_3.length;i++){var _12=isc.getValueForKey(_3[i],_9,_3[i]);_10[_10.length]=_12}
_3=_10}else{_3=isc.getValueForKey(_3,_9)}}}
var _13=this.$315(_3,_1,_7,_6,_8,_4,_5);return _13},isc.A.getSpecifiedFieldWidth=function isc_ListGrid_getSpecifiedFieldWidth(_1){var _2=this.getField(_1);if(_2==null){if(isc.isAn.Object(_1))_1=_1.name;_2=this.getSpecifiedField(_1)}
if(_2==null)return;var _1=_2.name,_3=this.header?this.header.members:null,_4=this.frozenFields&&this.frozenHeader?this.frozenHeader.members:null,_5;if(_3||_4){var _6;if(_3)_6=_3.find("name",_1);if(!_6&&_4){_6=_4.find("name",_1)}
if(_6){if(_6.$pn&&isc.isA.Number(_6.$pn))
_5=_6.$pn}else{if(_2.width!=null&&isc.isA.Number(_2.width)){_5=_2.width}}}
return _5},isc.A.getIconCursor=function isc_ListGrid_getIconCursor(_1){if(_1.iconCursor)return _1.iconCursor;else return this.iconCursor},isc.A.getValueIconCursor=function isc_ListGrid_getValueIconCursor(_1,_2,_3){if(_1.iconCursor!=null)return _1.iconCursor;if(this.showValueIconHandCursor(_1))return isc.Canvas.HAND},isc.A.showValueIconHandCursor=function isc_ListGrid_showValueIconHandCursor(_1){return _1.valueIconClick!=null},isc.A.getValueIconHTML=function isc_ListGrid_getValueIconHTML(_1,_2,_3,_4){var _5=_3.imageURLPrefix||_3.baseURL||_3.imgDir,_6=_3.imageURLSuffix,_7=this.getValueIconWidth(_3),_8=this.getValueIconHeight(_3),_9=this.getValueIconLeftPadding(_3),_10=this.getValueIconRightPadding(_3);if(_6!=null){var _11=isc.Canvas.$1861(_1),_12=_11!=null;if(_12)_1=_11;var _13=_12?_1.src:_1;if(_13!=isc.Canvas.$5w){_13+=_6;if(_12){_1.src=_13}else{_1=_13}}}
var _14;if(_4!=null){if(_4==isc.Canvas.HAND&&isc.Browser.$191d){_4=isc.Canvas.POINTER}
_14="cursor:"+_4}
var _15=isc.Canvas.$xq(_1,_5,_2,_7,_8,_9,_10,null,this,null,_14);return _15},isc.A.getCellAlign=function isc_ListGrid_getCellAlign(_1,_2,_3){var _4=this.isRTL();if(_1&&_1[this.singleCellValueProperty]!=null&&(!this.showSingleCellCheckboxField(_1)||!this.isCheckboxField(this.getField(_3))))
{return _4?isc.Canvas.RIGHT:isc.Canvas.LEFT}
return this.getFieldCellAlign(_3,_4)},isc.A.getFieldHeaderAlign=function isc_ListGrid_getFieldHeaderAlign(_1,_2){var _3=this.getField(_1);if(!_3)return _2?isc.Canvas.RIGHT:isc.Canvas.LEFT;var _4=_3.align;if(_2&&this.reverseRTLAlign){if(_4==isc.Canvas.RIGHT)_4=isc.Canvas.LEFT;else if(_4==isc.Canvas.LEFT)_4=isc.Canvas.RIGHT}
return _4},isc.A.getFieldCellAlign=function isc_ListGrid_getFieldCellAlign(_1,_2){var _3=this.getField(_1);if(!_3)return _2?isc.Canvas.RIGHT:isc.Canvas.LEFT;if(_3.cellAlign==null&&_3.userFormula){return _2?isc.Canvas.LEFT:isc.Canvas.RIGHT}
var _4=_3.cellAlign||_3.align;if(_2&&this.reverseRTLAlign){if(_4==isc.Canvas.RIGHT)_4=isc.Canvas.LEFT;else if(_4==isc.Canvas.LEFT)_4=isc.Canvas.RIGHT}
return _4},isc.A.showSingleCellCheckboxField=function isc_ListGrid_showSingleCellCheckboxField(_1){return(this.getCurrentCheckboxField()!=null)&&_1&&(this.canSelectGroups||!_1.$52e)&&!_1[this.isSeparatorProperty]},isc.A.$425=function isc_ListGrid__useDisplayFieldValue(_1){if(!_1||_1.valueMap||_1.displayField==null||(_1.displayField==_1.name))
{return false}
if(_1.optionDataSource==null){if(_1.displayValueFromRecord==false)return false;return true}
var _2=_1.autoFetchDisplayMap;if(_2==null)_2=this.autoFetchDisplayMap;if(_2)return false;if(_1.displayValueFromRecord!=null)return _1.displayValueFromRecord;return(_1.valueField==null||_1.valueField==_1.name)&&(isc.DS.get(_1.optionDataSource)==this.getDataSource())},isc.A.getValueIcon=function isc_ListGrid_getValueIcon(_1,_2,_3,_4){if(!_1.valueIcons||_1.suppressValueIcon){if(this.$31s(_1)){var _5;if(_2){_5=(this.isPrinting?this.printBooleanTrueImage||this.booleanTrueImage:this.booleanTrueImage)}else{_5=(this.isPrinting?this.printBooleanFalseImage||this.booleanFalseImage:this.booleanFalseImage)}
_4=(_4!=null)?_4:this.findRowNum(_3);var _6=_1.masterIndex;if(_1.canToggle&&_5!=isc.Canvas.$5w&&!this.canEditCell(_4,_6)){var _7=isc.Canvas.$1861(_5);if(_7!=null){if(_7.src!=null&&!_7.svg){_7.src=isc.Img.urlForState(_7.src,false,false,isc.StatefulCanvas.STATE_DISABLED);if(_7.cssClass!=null){_7.cssClass+=isc.StatefulCanvas.STATE_DISABLED}
_5=_7}else if(_7.svg){_5=isc.Img.urlForState(_5,false,false,isc.StatefulCanvas.STATE_DISABLED)}}else{_5=isc.Img.urlForState(_5,false,false,isc.StatefulCanvas.STATE_DISABLED)}}
if(_5==isc.Canvas.$5w||_5==null){_5=isc.Canvas.$5w}
return _5}
return null}
var _8=_1.valueIcons[_2];return _8},isc.A.getValueIconStyle=function isc_ListGrid_getValueIconStyle(_1,_2,_3,_4){var _5=(this.isPrinting?this.printBooleanBaseStyle||this.booleanBaseStyle:this.booleanBaseStyle);if(_5&&_1&&(!_1.valueIcons||_1.suppressValueIcon)){if(this.$31s(_1)){var _6=_5+(_2?"True":"False");_4=(_4!=null)?_4:this.findRowNum(_3);var _7=_1.masterIndex;if(_1.canToggle&&!this.canEditCell(_4,_7)){_6+=isc.StatefulCanvas.STATE_DISABLED}
return _6}}
return null},isc.A.getValueIconLeftPadding=function isc_ListGrid_getValueIconLeftPadding(_1){return(_1&&_1.valueIconLeftPadding!=null?_1.valueIconLeftPadding:this.valueIconLeftPadding||0)},isc.A.getValueIconRightPadding=function isc_ListGrid_getValueIconRightPadding(_1){return(_1&&_1.valueIconRightPadding!=null?_1.valueIconRightPadding:this.valueIconRightPadding||0)},isc.A.showValueIconOnly=function isc_ListGrid_showValueIconOnly(_1){if(_1.showValueIconOnly!=null)return _1.showValueIconOnly;if(_1.valueIcons!=null&&_1.valueMap!=null)return true;return this.$31s(_1)},isc.A.getValueIconWidth=function isc_ListGrid_getValueIconWidth(_1){if(this.isCheckboxField(_1))return this.$65a();if(this.$31s(_1))return this.booleanImageWidth;return(_1.valueIconWidth!=null?_1.valueIconWidth:(_1.valueIconSize!=null?_1.valueIconSize:(this.valueIconWidth!=null?this.valueIconWidth:this.valueIconSize)))},isc.A.getValueIconHeight=function isc_ListGrid_getValueIconHeight(_1){if(this.isCheckboxField(_1))return this.$65b();if(this.isExpansionField(_1))return this.$72z();if(this.$31s(_1))return this.booleanImageHeight;return(_1.valueIconHeight!=null?_1.valueIconHeight:(_1.valueIconSize!=null?_1.valueIconSize:(this.valueIconHeight!=null?this.valueIconHeight:this.valueIconSize)))},isc.A.$299=function isc_ListGrid__isNewRecordRow(_1){return this.shouldShowNewRecordRow()&&(_1==this.getTotalRows()-1)},isc.A.getNewRecordRowCellValue=function isc_ListGrid_getNewRecordRowCellValue(){return'<div align="center">'+this.newRecordRowMessage+'</div>'},isc.A.getErrorIconHTML=function isc_ListGrid_getErrorIconHTML(_1,_2,_3){var _4=this.getCellErrors(_2,_3);if(_4==null)return isc.$ad;var _5=this.imgHTML(this.errorIconSrc,this.errorIconWidth,this.errorIconHeight,null,null,null,null,null," isErrorIcon='true'");var _6=this.isRTL(),_7=this.getCellAlign(_1,_2,_3),_8=((_6&&_7===isc.Canvas.LEFT)||(!_6&&_7===isc.Canvas.RIGHT));var _9=isc.FormItem.getPrototype().errorOrientation;if(_9=="right")_8=false;var _10;if(isc.Browser.isIE&&this.$30a&&this.getEditRow()==_2&&(!this.editByCell||this.getEditCol()==_3))
{_10=" "}else{_10=isc.Canvas.spacerHTML(this.cellPadding,"auto")}
if(_8){_5=_10+_5}else{_5+=_10}
return _5},isc.A.$79z=function isc_ListGrid__handleErrorIconOver(_1,_2){this.$79y=[_1,_2];if(this.cellErrorIconOver&&this.cellErrorIconOver(this.getRecord(_1,_2),_1,_2)==false)
{return}
isc.Hover.setAction(this,this.$79v)},isc.A.$79v=function isc_ListGrid__handleErrorIconHover(_1,_2){if(this.$79y==null)return;if(this.cellErrorIconHover&&this.cellErrorIconHover(this.getRecord(_1,_2),_1,_2)==false)
{return}
var _1=this.$79y[0],_2=this.$79y[1];var _3=this.getCellErrors(_1,_2);if(_3==null)return;var _4=isc.FormItem.getErrorPromptString(_3);isc.Hover.show(_4,this.$wc())},isc.A.$790=function isc_ListGrid__handleErrorIconOut(_1,_2){delete this.$79y;if(this.cellErrorIconOut&&this.cellErrorIconOut(this.getRecord(_1,_2),_1,_2)==false)
{return}
if(isc.Hover.isActive&&!isc.Hover.$209n){isc.Hover.clear()}},isc.A.$294f=function isc_ListGrid__applyFormattingLogic(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10){if(_8){if(_3&&_3.formatCellValue!=null){_1=_3.formatCellValue(_1,_2,_4,_5,this)}else if(this.formatCellValue!=null){_1=this.formatCellValue(_1,_2,_4,_5)}else{_8=false}}
if(!_8){_1=this.$294g(_1,_2,_3,_4,_5,_6,_7,_9,_10)}
_1=this.formatValueAsString(_1,_2,_3,_4,_5);if(_3&&(_3.escapeHTML==true||(_3.escapeHTML!=false&&_3.aiFieldRequest)))
{if(isc.isA.String(_1)&&_1!=this.$54t&&(_3.emptyCellValue==null||_1!=_3.emptyCellValue))
{_1=_1.asHTML(null,this.shouldSkipLineBreaks(_3))}}
return _1},isc.A.$294g=function isc_ListGrid__applyDeclarativeFormatting(_1,_2,_3,_4,_5,_6,_7,_8,_9){var _10;if(_8&&_3&&_3.cellValueTemplate){_1=_3.cellValueTemplate.evalDynamicString(this,{value:_1,record:_2,field:_3})}else if(_9&&(_10=_7?this.getDeclarativeFormat(_3):_3&&_3.format)&&(isc.isA.Number(_1)||isc.isA.Date(_1)))
{_1=isc.isA.Number(_1)?isc.NumberUtil.format(_1,_10):isc.DateUtil.format(_1,_10)}else if(_9&&isc.CubeGrid&&isc.isA.CubeGrid(this)&&(isc.isA.Number(_1)||isc.isA.Date(_1))&&(_10=this.getValueFormat(_4,_5,_7))!=null)
{_1=isc.isA.Number(_1)?isc.NumberUtil.format(_1,_10):isc.DateUtil.format(_1,_10)}else if(_3&&(_6||this.$237y(_3))){_1=this.applyCellTypeFormatters(_1,_2,_3,_4,_5)}
return _1},isc.A.$315=function isc_ListGrid__formatCellValue(_1,_2,_3,_4,_5,_6,_7){var _8=_3&&this.$275t(_3);if(_8=="userSummary"){_1=this.getSummaryFieldValue(_3,_2)}else{var _9=false;if(_2&&_2[this.groupSummaryRecordProperty]){if(_3&&_3.formatGroupSummary){if(!isc.isA.Function(_3.formatGroupSummary)){_3.formatGroupSummary=isc.Func.expressionToFunction("value",_3.formatGroupSummary)}
if(isc.isA.Function(_3.formatGroupSummary)){_1=_3.formatGroupSummary(_1);_9=true}}}
if(this.$191n(_4,_5)){if(_3&&_3.formatInactiveCellValue!=null){_1=_3.formatInactiveCellValue(_1,_2,_4,_5,this);_9=true}else if(this.formatInactiveCellValue!=null){_1=this.formatInactiveCellValue(_1,_2,_4,_5);_9=true}}
if(_2&&this.$94m){if(_3&&_3.formatGridSummary){if(!isc.isA.Function(_3.formatGridSummary)){_3.formatGridSummary=isc.Func.expressionToFunction("value",_3.formatGridSummary)}
if(isc.isA.Function(_3.formatGridSummary)){_1=_3.formatGridSummary(_1);_9=true}}}
if(!_9){_1=this.$294f(_1,_2,_3,_4,_5,_6,_7,true,true,true)}else{_1=this.formatValueAsString(_1,_2,_3,_4,_5);if(_3&&(_3.escapeHTML==true||(_3.escapeHTML!=false&&_3.aiFieldRequest)))
{if(isc.isA.String(_1)&&_1!=this.$54t&&(_3.emptyCellValue==null||_1!=_3.emptyCellValue))
{_1=_1.asHTML(null,this.shouldSkipLineBreaks(_3))}}}}
if(this.formatDisplayValue){_1=this.formatDisplayValue(_1,_2,_4,_5)}
return _1});isc.evalBoundary;isc.B.push(isc.A.$237y=function isc_ListGrid__shouldApplyTypeFormatters(_1){return _1&&!_1.$1100},isc.A.$191n=function isc_ListGrid__gettingInactiveCellHTML(_1,_2){if(this.$191l)return true;var _3=this.getFieldBody(_2);if(_3&&_3.$941)return true;if(_3&&_3.$191m)return true;return false},isc.A.getDefaultFormattedValue=function isc_ListGrid_getDefaultFormattedValue(_1,_2,_3){var _4=this.getField(_3);var _5=this.getRawCellValue(_1,_2,_3),_6,_7,_8;if(!this.useLegacyDefaultFormattedValue&&_4&&_4.displayField!=null){_7=!_4.valueMap&&this.$425(_4)&&(_1[_4.displayField]!==_8||this.$30y(_2,_4.displayField)!=_8);if(_7){var _9=_4.displayField;_6=this.getRawCellValue(_1,_2,_9,true)}}
if(!this.useLegacyDefaultFormattedValue&&!_7){var _10=_4?_4.valueMap:null;if(_10){_5=this.resolveValueMap(_5,_4.valueMap)}}
if(_7)_5=_6;_5=this.$294f(_5,_1,_4,_2,_3,false,false,false,!this.useLegacyDefaultFormattedValue,!this.useLegacyDefaultFormattedValue);return _5},isc.A.getDefaultFormattedFieldValue=function isc_ListGrid_getDefaultFormattedFieldValue(_1,_2,_3,_4){if(_3==null)_3=-1;if(_4==null)_4=-1;var _5=isc.DataSource.getFieldValue(_2,_1),_6,_7,_8;if(!this.useLegacyDefaultFormattedValue&&_2&&_2.displayField!=null){_7=!_2.valueMap&&this.$425(_2)&&(_1[_2.displayField]!==_8||this.$30y(_3,_2.displayField)!=_8);if(_7){_6=_1[_2.displayField];if(_6===_8){_6=this.$30y(_3,_2.displayField)}}}
if(!this.useLegacyDefaultFormattedValue&&!_7){var _9=_2?_2.valueMap:null;if(_9){_5=this.resolveValueMap(_5,_2.valueMap)}}
if(_7)_5=_6;if(_2&&_2.formatCellValue!=null){_5=_2.formatCellValue(_5,_1,_3,_4,this)}else{_5=this.$294g(_5,_1,_2,_3,_4,false,false,!this.useLegacyDefaultFormattedValue,!this.useLegacyDefaultFormattedValue)}
_5=this.formatValueAsString(_5,_1,_2,_3,_4);if(_2&&(_2.escapeHTML==true||(_2.aiFieldRequest!=null&&_2.escapeHTML!==false)))
{_5=isc.makeXMLSafe(_5)}
return _5},isc.A.applyCellTypeFormatters=function isc_ListGrid_applyCellTypeFormatters(_1,_2,_3,_4,_5,_6){if(!_6&&_3&&_3.multiple&&isc.isA.Array(_1)){var _7=[];for(var i=0;i<_1.length;i++){_7[i]=this.applyCellTypeFormatters(_1[i],_2,_3,_4,_5,true)}
return _7.join(_3.multipleValueSeparator||", ")}
if(_3&&_3.$62!=null&&_3.$62.shortDisplayFormatter!=null)
{_1=_3.$62.shortDisplayFormatter(_1,_3,this,_2,_4,_5)}else if(_3&&_3.$31r!=null){_1=_3.$31r(_1,_3,this,_2,_4,_5)}
if(_1!=null&&!isc.isA.emptyString(_1)&&_2&&_3&&_2[this.recordApplyPluralTitleProperty])
{var _9=_2[this.recordApplyPluralTitleProperty];if(_9.contains(_3.name)){var _10=_3.pluralTitle;if(_10==null)_10=_3.title;if(_10!=null)_1+=" "+_10}}
if(_1==null&&_2&&_3&&this.invalidSummaryValue!=null&&((_2[this.groupSummaryRecordProperty]&&this.shouldShowGroupSummary(_3))||(_2[this.gridSummaryRecordProperty]&&this.shouldShowGridSummary(_3))))
{_1=this.invalidSummaryValue}
return _1},isc.A.formatValueAsString=function isc_ListGrid_formatValueAsString(_1,_2,_3,_4,_5){if(_1==null||isc.is.emptyString(_1)){if(this.$122r(_3)!=this.emptyCellValue){_1=this.$122r(_3)}else if(_3&&this.$275t(_3)=="recordSummary"){_1=this.invalidSummaryValue}else{_1=this.emptyCellValue}}else if(this.$54y[_1]==true){_1=this.$54t}else if(!isc.isA.String(_1)){if(isc.isA.Date(_1)){if(this.$851(_3)){var _6=this.$30o(_3);var _7=isc.SimpleType.inheritsFrom(_3.type,"time");_1=isc.Time.toTime(_1,_6,_7)}else{var _8=_3&&isc.SimpleType.inheritsFrom(_3.type,"datetime"),_9=!_8&&_3&&isc.SimpleType.inheritsFrom(_3.type,"date"),_6=this.$45i(_3);if(_8)_1=_1.toShortDateTime(_6,true);else _1=_1.toShortDate(_6,!_9)}}else{_1=isc.iscToLocaleString(_1)}}
return _1},isc.A.getEditItemCellValue=function isc_ListGrid_getEditItemCellValue(_1,_2,_3){var _4=this.getEditorName(_2,_3);if(!this.$286||!this.$286.getItem(_4)){return"&nbsp;"}
var _5=this.getCellErrors(_2,_3);var _6=this.$286.getItem(_4);var _7=_6.containerWidget;if(_6.isDrawn()){_6.redrawing()}else{_6.drawing(_7.isDrawn())}
var _8=_6.getStandaloneItemHTML(_6.getValue(),false,true);if(!_7.$316)_7.$316=[];if(!_7.$316.contains(_6)){_7.$316.add(_6)}
return _8},isc.A.$68z=function isc_ListGrid__showInactiveEditor(_1){return this.$686(_1)},isc.A.getInactiveEditorCellValue=function isc_ListGrid_getInactiveEditorCellValue(_1,_2,_3,_4){var _5=this.getEditorName(_2,_3);var _6=this.$286.getItem(_5);if(_6==null){return this.getFormattedValue(_1,_2,_3)}
var _7=isc.DynamicForm.getEditorType(_6,this,null,this.$286),_8=this.getRawCellValue(_1,_2,_3),_9;if(this.shouldShowEditorPlaceholder(this.getField(_3),_7)){_9=this.getEditorPlaceholderHTML(_7,_8,_1,_2,_3)}else{var _10={grid:this.getID(),record:_1,rowNum:_2,colNum:_3}
_9=_6.getInactiveEditorHTML(_8,false,true,_10);if(!_4){if(!this.$69m)this.$69m={};var _11="_"+_2+"_"+_3;if(this.$69m[_11]){this.logWarn("creating new inactiveEditor context for a cell without having cleared the previous one."+this.getStackTrace(),"inactiveEditorHTML")}
this.$69m[_11]=_10}}
return _9},isc.A.shouldShowEditorPlaceholder=function isc_ListGrid_shouldShowEditorPlaceholder(_1,_2){if(_1.showEditorPlaceholder!=null)return _1.showEditorPlaceholder;return!this.$687[_2]},isc.A.getEditorPlaceholderHTML=function isc_ListGrid_getEditorPlaceholderHTML(_1,_2,_3,_4,_5){return _2},isc.A.$30b=function isc_ListGrid__editItemsDrawingNotification(_1,_2,_3){var _4=isc.RPCManager&&!isc.RPCManager.startQueue();var _5;if(_1)_5=[_1];else{_5=[];var _6=this.$286.getItems();for(var i=0;i<_6.length;i++){if(_6[i].containerWidget==_3)_5.add(_6[i])}}
var _8=_3.$316;for(var i=0;i<_5.length;i++){var _9=_5[i],_10=_9.isDrawn(),_11=_8?_8.contains(_9):false,_12=isc.CanvasItem&&isc.isA.CanvasItem(_9);if(_10){if(_11){_9.redrawn();if(_2)_9.moved()}else{_9.cleared(true)}}else if(_11){if(_12)_9.placeCanvas();_9.drawn(true)}else{if(isc.CanvasItem&&isc.isA.CanvasItem(_9)){if(_9.canvas&&_9.canvas.isDrawn()){_9.canvas.clear();_9.canvas.deparent()}}}}
if(this.$286){this.$286.destroyOrphanedItems("Grid edit-items removed")}
if(_4)isc.RPCManager.sendQueue();delete _3.$316},isc.A.$69l=function isc_ListGrid__clearingInactiveEditorHTML(_1,_2){if(this.$69m==null)return;if(!this.$286||!this.$686((_2!=null?this.getField(_2):null),true))return;if(_1!=null){var _3="_"+_1+"_"+_2,_4=this.$69m[_3];if(_4){_4.formItem.clearInactiveEditorContext(_4);delete this.$69m[_3]}}else{var _5=this.getEditForm(),_6=_5.getItems();for(var i=0;i<_6.length;i++){_6[i].clearAllInactiveEditorContexts()}
delete this.$69m}},isc.A.setRecordValues=function isc_ListGrid_setRecordValues(_1,_2){if(!this.shouldSaveLocally()){this.logWarn("setRecordValues() not supported for grids where saveLocally is false");return}
if(!this.data)return;var _3=this.data.indexOf(_1),_4=this.data.get(_3);this.combineRecords(_4,_2);this.calculateRecordSummaries(_4,null,true);if(this.useCellRecords){_3=this.findRowNum(_4);var _5=this.findColNum(_4);this.refreshCell(_3,_5)}else{this.refreshRow(_3)}
this.resort();this.filterByEditor();if(this.valuesManager!=null){this.valuesManager.$71e(_3,null,_4,this)}},isc.A.combineRecords=function isc_ListGrid_combineRecords(_1,_2){return isc.combineObjects(_1,_2)},isc.A.setRawCellValue=function isc_ListGrid_setRawCellValue(_1,_2,_3,_4,_5){var _6=this.fields[_3];if(!_1||!_6)return;if(_6.setRawCellValue){isc.Func.replaceWithMethod(_6,"setRawCellValue","viewer,record,recordNum,field,fieldNum,value");_6.setRawCellValue(this,_1,_2,_6,_3,_4)}else{isc.Canvas.$70n(null,_6,_4,_1,this,true)}
if(!_5)this.getOriginalData().dataChanged()},isc.A.getCellBooleanProperty=function isc_ListGrid_getCellBooleanProperty(_1,_2,_3,_4){var _5=this[_1];if(_5==false||_5==this.$18r)return false;var _6=this.fields[_3][_1];if(_6==false||_6==this.$18r)return false;if(_4!=null){var _7=this.getRecord(_2,_3),_8=(_7!=null?_7[_4]:false);if(_8==false||_8==this.$18r)return false;if(_8==true||_8==this.$18q)return true}
return _5==true||_6==true||_5==this.$18q||_6==this.$18q},isc.A.setShowRecordComponents=function isc_ListGrid_setShowRecordComponents(_1){if(this.showRecordComponents==_1)return;if(_1){if(this.animateFolders){this.$805=true
this.animateFolders=false}}else{if(this.$805){this.animateFolders=true;delete this.$805}}
this.showRecordComponents=_1;this.$80i();if(_1){this.$74p=this.drawAllMaxCells;this.drawAllMaxCells=0;if(this.body!=null)this.body.drawAllMaxCells=0}else{if(this.$74p!=null){this.drawAllMaxCells=this.$74p;if(this.body!=null)this.body.drawAllMaxCells=this.$74p;delete this.$74p}}
this.invalidateRecordComponents();if(!_1&&(this.recordComponentPosition==this.$57l||(this.recordComponentPosition==null&&this.showRecordComponentsByCell)))
{this.updateFieldWidthsForAutoFitValue("showRecordComponents changed");this.$45m()}},isc.A.$80i=function isc_ListGrid__updateVirtualScrollingForRecordComponents(){if(!this.showRecordComponents){if(this.$80j){delete this.virtualScrolling;delete this.$80j}}else{if(this.virtualScrolling==null||this.$80j){if(this.frozenFields==null){this.virtualScrolling=true;this.$80j=true}else{if(this.recordComponentHeight==null){this.logWarn("This grid has frozen fields and is showing recordComponents. This may lead to unpredictable row heights which are not supported with frozen fields. Setting listGrid.recordComponentHeight will avoid this issue.","recordComponents")}
if(this.$80j){delete this.virtualScrolling;delete this.$80j}}}}
if(this.body&&this.virtualScrolling!=this.body.virtualScrolling){this.body.virtualScrolling=this.virtualScrolling;if(this.frozenBody){this.frozenBody.virtualScrolling=this.virtualScrolling}}},isc.A.getDrawArea=function isc_ListGrid_getDrawArea(_1,_2,_3){if(this.body){var _4=this.body.getDrawArea(_1,_2,_3);if(this.frozenFields&&this.freezeStart()){_4[2]+=this.frozenFields.length;_4[3]+=this.frozenFields.length}
return _4}
return null},isc.A.$74l=function isc_ListGrid__drawAreaChanged(_1,_2,_3,_4,_5){if(this.frozenFields&&this.freezeStart()){_3+=this.frozenFields.length;_4+=this.frozenFields.length}
var _6=[_1,_2,_3,_4];if(_6.equals(this.getDrawArea()))return;this.drawAreaChanged(_1,_2,_3,_4);if(this.rowRangeDisplayStyle!="countOnly"){this.rowRangeDisplayValueChanged("body draw area changed")}},isc.A.updateExpansionComponents=function isc_ListGrid_updateExpansionComponents(){if(!this.$112v||this.$112v.length==0)return;this.$112u=true;for(var i=this.$112v.length-1;i>=0;i--){this.expandRecord(this.$112v[i])}
delete this.$112u;delete this.$112v},isc.A.updateRecordComponents=function isc_ListGrid_updateRecordComponents(){var _1=this.logIsDebugEnabled("recordComponents");if(this.$81r){if(_1){this.logDebug("updateRecordComponents called recursively - returning","recordComponents")}
return}
var _2=this.body,_3=this.frozenBody;if(_2==null)return;if(_2.$28c!=null){return}
if((!_2.isDrawn()||_2.$26a==null||(_2.$26a.length==0&&_2.fields.length>0))||(_3&&(!_3.isDrawn()||_3.$26a==null||(_3.$26a.length==0&&_3.fields.length>0))))
{return}
this.$81r=true;var _4=this.$81s||[],_5=this.$81t||{};if(_1){this.logDebug("updateRecordComponents - old record components before refreshing:"+this.echo(_4),"recordComponents")}
this.$81t={};this.$81s=[];if(this.showRecordComponents||this.showBackgroundComponents){var _6=this.body.getDrawArea(),_7=this.showRecordComponentsByCell,_8=this.body.getID(),_9=this.frozenBody?this.frozenBody.getID():null;if(this.recordComponentPoolingMode=="recycle"){if(_1){this.logDebug("START updateRecordComponents - pre-loop recordComponent cleanup - drawArea is "+_6);var _10=[]}
for(var i=0;i<_4.length;i++){var _12=_4[i];if(!_12)continue;var _13=this.getRecordIndex(_12.currentRecord);if(_13<_6[0]||_13>_6[1]){this.$81w(_12);_5[_12.getID()]=null;if(_1){_10.add(_12);this.logDebug("cleaned up recordComponent: "+_12.ID+" from row "+_13)}}}
if(_1){this.logDebug("END updateRecordComponents - pre-loop recordComponent cleanup: cleaned "+_10.length+" components")}}
if(_1){this.logDebug("updating to potentially show recordComponents for drawArea:"+_6,"recordComponents")}
for(var _14=_6[0];_14<=_6[1];_14++){var _15=this.getRecord(_14);if(_15==null||Array.isLoading(_15))continue;if(this.showRecordComponents){if(!_7){var _16=null;if(this.allowRowSpanning&&this.getRowSpan){var _17=this.getCellStartRow(_14,0)!=_14;if(_17)_16=false}
if(_16==null){_16=this.shouldShowRecordComponent(_15)}
var _18=null;if(_16){_18=this.$81u(_15,null,_8);if(_18!=null){if(_18.isNullMarker){_18=null}else{var _19=_18.getID();_5[_19]=null}}else{_18=this.$81v(_15,null,this.body,_14)}}
if(_18!=null){var _19=_18.getID();this.$81t[_19]=true;this.$81s[this.$81s.length]=_18}}else{if(this.frozenBody!=null){for(var _20=0;_20<this.frozenBody.fields.length;_20++){var _21=this.frozenBody.fields[_20],_22=_21.name;var _16=null;if(this.allowRowSpanning&&this.getRowSpan){var _17=this.getCellStartRow(_14,_21.masterIndex)!=_14;if(_17)_16=false}
if(_16==null){_16=this.shouldShowRecordComponent(_15,_21.masterIndex)}
var _18=null;if(_16){_18=this.$81u(_15,_22,_9);if(_18!=null){if(!_18.isNullMarker){var _19=_18.getID();_5[_19]=null}else{_18=null}}else{_18=this.$81v(_15,_22,this.frozenBody,_14,_20)}}
if(_18!=null){var _19=_18.getID();this.$81t[_19]=true;this.$81s[this.$81s.length]=_18}}}
for(var _23=_6[2];_23<=_6[3];_23++){var _21=this.body.fields[_23],_22=_21.name;var _16=null;if(this.allowRowSpanning&&this.getRowSpan){var _17=this.getCellStartRow(_14,_21.masterIndex)!=_14;if(_17)_16=false}
if(_16==null){_16=this.shouldShowRecordComponent(_15,_21.masterIndex)}
var _18=null;if(_16){var _18=this.$81u(_15,_22,_8);if(_18!=null){if(!_18.isNullMarker){var _19=_18.getID();_5[_19]=null}else{_18=null}}else{_18=this.$81v(_15,_22,this.body,_14,_23)}}
if(_18!=null){var _19=_18.getID();this.$81t[_19]=true;this.$81s[this.$81s.length]=_18}}}}
if(this.showBackgroundComponents){if(_15&&_15.backgroundComponent){var _24=this.$917(_15).find("isBackgroundComponent",true);if(!_24){if(isc.isA.Canvas(_15.backgroundComponent)){var _12=_15.backgroundComponent.addProperties(this.backgroundComponentProperties,{isBackgroundComponent:true})}else{var _25=isc.addProperties({isBackgroundComponent:true},this.backgroundComponentProperties,_15.backgroundComponent);var _12=this.createAutoChild("backgroundComponent",_25)}
var _26=_2.getTableZIndex();_12.setZIndex(_26-49);_12.setWidth("100%");_12.setHeight("100%");_12.setOverflow("hidden");_12.removeOnHideField=true;this.addEmbeddedComponent(_15.backgroundComponent,_15,_14,null,"within")}}}}}
var _6=this.body.getDrawArea();for(var _14=_6[0];_14<=_6[1];_14++){var _15=this.getRecord(_14);if(_15==null||Array.isLoading(_15)||!_15.embeddedComponent){continue}
var _27=_15.embeddedComponentPosition||"within";var _28=_15.embeddedComponentFields;var _29=null;if(isc.isA.Array(_28)&&_28.length>0){if(_28.length>2){this.logWarn("Only 2 fields are supported for embeddedComponentFields but "+_28.length+" was provided. Only the 2 first fields will be used.");_28=[_28[0],_28[1]]}
for(var _30=0;_30<_28.length;_30++){_29=this.fields.findIndex("name",_28[_30]);if(_29>=0){break}else{this.logWarn("Could not find field '"+_28[_30]+"' to embed component inside.")}}}
if(_27==="within"&&!_15.embeddedComponent.width&&!_15.embeddedComponent.height){_15.embeddedComponent.width="100%";_15.embeddedComponent.height="100%"}
_15.autoDismiss=false;this.addEmbeddedComponent(_15.embeddedComponent,_15,_14,_29,_27)}
if(_4.length>0||this.$81s>0){this.resized()}
if(this.logIsInfoEnabled("recordComponents")){this.logInfo("updateRecordComponents - new recordComponents:"+this.echo(this.$81t)+", old record components (will be cleaned up if value is 'true'):"+this.echo(_5),"recordComponents")}
for(var i=0;i<_4.length;i++){var _19=_4[i].getID();if(_5[_19]!=true){continue}
if(_1){this.logDebug("cleaning up RecordComponent:"+_4[i],"recordComponents")}
this.$81w(_4[i]);_5[_19]=null}
delete this.$81r},isc.A.$81v=function isc_ListGrid__applyNewRecordComponent(_1,_2,_3,_4,_5,_6){var _7=this.logIsDebugEnabled("recordComponents");if(_7){this.logDebug("getting record component for row/field:"+[_4,_2],"recordComponents")}
var _8=this.recordComponentPoolingMode=="recycle",_9,_10,_11=_2==null?null:this.getColNum(_2);if(_8){var _12=this.getFromRecordComponentPool(_1,_2);_9=_12?_12[0]:null;_10=_12?_12[1]:null}
if(!_9){if(this.createRecordComponent&&isc.isA.Function(this.createRecordComponent)){_9=this.createRecordComponent(_1,this.getColNum(_2));if(_9!=null){_9.isRecordComponent=true;if(_7){this.logDebug("created new record component:"+_9,"recordComponents")}}}else if(this.recordScreen){var _13=this.getDataSource(),_14={};if(_13){_14.dataContext={};_14.dataContext[_13.ID]=_1}
_9=isc.RPCManager.createScreen(this.recordScreen,_14);if(!_9){_9=this.createAutoChild("recordScreenPlaceholder")}
if(_9!=null){_9.isRecordComponent=true;if(_7){this.logDebug("created new record component from screen "+this.recordScreen+":"+_9,"recordComponents")}}}}else{if(this.updateRecordComponent&&isc.isA.Function(this.updateRecordComponent)){var _15=_9;_9=this.updateRecordComponent(_1,_11,_9,!_10);if(_9==null){if(this.logIsInfoEnabled("recordComponents")){this.logInfo("showRecordComponents: updateRecordComponent() method failed to return an updated component.","recordComponents")}
this.addToRecordComponentPool(_15)}
if(_7){this.logDebug("updated record component from pool: "+_9,"recordComponents")}}else if(this.recordScreen&&_9.$112p!=null){var _13=this.getDataSource();if(_13){var _16={};_16[_13.ID]=_1;_9.setDataContext(_16)}}}
return this.$116u(_1,_2,_3,_4,_5,_9,_6)},isc.A.$116u=function isc_ListGrid__finishApplyNewRecordComponent(_1,_2,_3,_4,_5,_6,_7){var _8=this.recordComponentPoolingMode=="recycle",_9=(_6==null);if(_9){_6={isNullMarker:true,$669:_3.getID(),$81x:this.$81o}}
if(_2==null)_2=this.$81m;this.$92o(_1,_2,_6);if(_8&&!_9){_6.currentFieldName=_2;_6.currentRecord=_1}
if(!_9){_6.removeOnHideField=true;return _3.addEmbeddedComponent(_6,_1,_4,_5,this.getRecordComponentPosition(),_7)}},isc.A.setDontAutoDestroyComponent=function isc_ListGrid_setDontAutoDestroyComponent(_1,_2){_1.dontAutoDestroy=_2},isc.A.$81w=function isc_ListGrid__cleanUpRecordComponent(_1,_2,_3){var _4=this.logIsDebugEnabled("recordComponents");if(_4){this.logDebug("cleaning up recordComponent:"+_1,"recordComponents")}
var _5=this.recordComponentPoolingMode;if(_2)_5="viewport";if(_5=="data"){if(!_1.destroyed&&!_1.destroying&&!_1.$65i){if(this.$89r==null){this.$89r={}}
var _6=_1.ID;if(this.$89r[_6]!=_1){this.$89r[_6]=_1;if(_1.pointersToThis==null)_1.pointersToThis=[];_1.pointersToThis.add({object:this.$89r,property:_6})}
if(_4){this.logDebug("$81w - poolingMode 'data' - added orpahaned component : "+_1.ID,"recordComponents")}}}else{var _6=_1.ID,_7=isc.Canvas.getById(_1.$669),_8=_1.embeddedRecord,_9=_1.$81k;if(this.$92m(_8)){this.$92p(_8,_9)}
if(_7!=null){_7.removeEmbeddedComponent(_8,_1,null,_3);this.$919(_8,_1)}
if(_5=="viewport"){if(_4){this.logDebug("$81w - not pooling component : "+_1.ID,"recordComponents")}
if(!_1.dontAutoDestroy){_1.markForDestroy();if(_4){this.logDebug("$81w - marked component : "+_1.ID+" for destruction","recordComponents")}}}else{if(_1.destroying||_1.destroyed||_1.$65i)return;if(_4){this.logDebug("$81w - adding component : "+_1.ID+" to the pool","recordComponents")}
this.addToRecordComponentPool(_1)}}},isc.A.getLiveRecordComponent=function isc_ListGrid_getLiveRecordComponent(_1,_2,_3){if(!_1)return null;if(isc.isA.Number(_1))_1=this.getRecord(_1);if(!_3)_3=this.body.getID();var _4=this.$81u(_1,_2,_3);return _4},isc.A.$81u=function isc_ListGrid__getLiveRecordComponent(_1,_2,_3){if(_2==null)_2=this.$81m;if(!this.$92m(_1))return null;var _4=this.$92n(_1);if(_4[_2]==null)return null;var _5=_4[_2];if(_5.$669!=_3){return null}
if(_5.isNullMarker&&_5.$81x!=this.$81o){return null}
if(_5.destroyed||_5.destroying||_5.$65i){this.logWarn("Destroyed or Destroying record component:"+_5+" present on record. Ignoring","recordComponents");_4[_2]=null;return null}
if(_5.$289!=null&&_5.$289!=this.getRowNum(_1)){return null}
return _5},isc.A.invalidateRecordComponents=function isc_ListGrid_invalidateRecordComponents(){this.dropRecordComponents(true);if(this.showRecordComponents&&this.isDrawn()){this.updateRecordComponents()}},isc.A.dropRecordComponents=function isc_ListGrid_dropRecordComponents(_1){this.$81o++;var _2=this.$81s||[];delete this.$81s;delete this.$81t;for(var i=0;i<_2.length;i++){this.$81w(_2[i],_1)}},isc.A.refreshRecordComponent=function isc_ListGrid_refreshRecordComponent(_1,_2,_3){if(!this.showRecordComponents||_1==null||this.body==null)return;if(this.showRecordComponentsByCell&&_2==null){this.logWarn("refreshRecordComponent() called with no colNum. This parameter is required when showRecordComponentsByCell is true. Taking no action.");return}
var _4=this.getRecord(_1);if(_4==null||Array.isLoading(_4))return;var _5=this.logIsDebugEnabled("recordComponents");var _6=this.body,_7=null,_8=null;if(this.showRecordComponentsByCell){_6=this.getFieldBody(_2);_7=this.getLocalFieldNum(_2);_8=this.getFieldName(_2)}
var _9=this.$81u(_4,_8,_6.getID());if(_9!=null&&_9.isNullMarker)_9=null;var _10=this.shouldShowRecordComponent(_4,_2);var _11;if(_9!=null){if(_5){this.logDebug("refreshRecordComponent detected previous component "+_9.ID,"recordComponents")}
if(_10&&isc.isA.Function(this.updateRecordComponent)){_11=this.updateRecordComponent(_4,_2,_9,false);if(_11!=_9){if(_5){this.logDebug("refreshRecordComponent() - updateRecordComponent returned a different component: "+(_11?_11.ID:"null")+" - cleaning up the old one: "+_9.ID,"recordComponents")}
this.$81w(_9,(this.recordComponentPoolingMode!="recycle"),_3);_11=this.$116u(_4,_8,_6,_1,_7,_11,_3);if(_11&&_11.isNullMarker)_11=null}else{if(_5){this.logDebug("refreshRecordComponent() - updateRecordComponent returned the same component: "+_9.ID,"recordComponents")}}
_10=false}else if(_10&&this.recordScreen&&_9.$112p!=null){var _12=this.getDataSource();if(_12){var _13={};_13[_12.ID]=_4;_9.setDataContext(_13)}
_10=false}else{this.$81w(_9,(this.recordComponentPoolingMode!="recycle"),_3)}}
if(_10){_11=this.$81v(_4,_8,_6,_1,_7,_3);if(_11&&_11.isNullMarker)_11=null}
if(!this.$81t||!this.$81s)return;var _14=this.$81s.length;if(_9){var _15=_9.getID();this.$81t[_9.getID()]=null;if(_11!=null){_14=this.$81s.indexOf(_9);this.$81s[_14]=null}else{this.$81s.remove(_9)}}
if(_11!=null){var _15=_11.getID();this.$81t[_15]=true;this.$81s[_14]=_11}},isc.A.getRecordComponentPosition=function isc_ListGrid_getRecordComponentPosition(){if(this.recordComponentPosition!=null)return this.recordComponentPosition;return(this.showRecordComponentsByCell?"within":"expand")},isc.A.getRecordComponentPool=function isc_ListGrid_getRecordComponentPool(){if(!this.$74m)this.$74m=[];return this.$74m},isc.A.getFromRecordComponentPool=function isc_ListGrid_getFromRecordComponentPool(_1,_2){var _3=this.getRecordComponentPool(),_4=[],_5=this.showRecordComponentsByCell&&this.poolComponentsPerColumn==true,_6;if(!_3||_3.length==0)return null;if(_5){_4=_3.findAll("currentFieldName",_2)}else{_4=_3}
if(!_4||_4.length==0)return null;for(var i=0;i<_4.length;i++){_6=_4[i];var _8=_6.currentRecord;if(this.comparePrimaryKeys(_8,_1)){_3.remove(_6);return[_6,true]}}
_3.remove(_6);return[_6,false]},isc.A.addToRecordComponentPool=function isc_ListGrid_addToRecordComponentPool(_1){var _2=this.getRecordComponentPool();if(!_2.contains(_1)){_2.add(_1);if(this.logIsDebugEnabled("recordComponents")){this.logDebug("addToRecordComponentPool() added "+_1.ID+" to the pool","recordComponents")}
return true}else{if(this.logIsDebugEnabled("recordComponents")){this.logDebug("addToRecordComponentPool() passed a component that's already pooled - "+_1.ID+" - ignoring...","recordComponents")}}
return false});isc.evalBoundary;isc.B.push(isc.A.shouldShowRecordComponent=function isc_ListGrid_shouldShowRecordComponent(_1,_2){if(_1==null||_1.$52e||_1.$94m||_1[this.isSeparatorProperty]||_1[this.groupSummaryRecordProperty]||Array.isLoading(_1))
{return false}
return this.showRecordComponent(_1,_2)},isc.A.showRecordComponent=function isc_ListGrid_showRecordComponent(){return true},isc.A.bodyDrawing=function isc_ListGrid_bodyDrawing(_1){if(isc.$cv)arguments.$cw=this;if(_1!=this.body)return;var _2;if(this.$31v){_2=!isc.RPCManager.startQueue();this.$67b()}
this.requestVisibleRows();if(_2)isc.RPCManager.sendQueue();this.$31v=null;delete this.$1756},isc.A.setRecordComponentHeight=function isc_ListGrid_setRecordComponentHeight(_1){this.recordComponentHeight=_1;if(this.isDrawn())this.markForRedraw()},isc.A.getAvgRowHeight=function isc_ListGrid_getAvgRowHeight(_1){if(this.showRecordComponents&&this.recordComponentHeight!=null){var _2=this.getRecordComponentRowHeight();if(this.body&&this.body.derivedCellBorderVSpacing!=null){_2+=this.body.derivedCellBorderVSpacing}
if(_2!=null)return _2}
return!_1.virtualScrolling?_1.derivedRowHeight:Math.max(_1.derivedRowHeight,_1.avgRowHeight)},isc.A.getRecordComponentRowHeight=function isc_ListGrid_getRecordComponentRowHeight(){if(this.recordComponentHeight==null)return null;var _1=this.getRecordComponentPosition();if(_1==this.$57m||_1==this.$279z)return this.cellHeight+this.recordComponentHeight;if(_1==this.$2790)return this.cellHeight+this.recordComponentHeight;else return Math.max(this.recordComponentHeight,this.cellHeight)},isc.A.$45n=function isc_ListGrid__setOptionDataSources(){var _1=this.$31v;this.$31v=null;var _2=this.$45o;this.$45o=[];var _3=this.getDataSource();for(var i=0;i<this.completeFields.length;i++){var _5=this.completeFields[i];if(_5==null){this.logWarn("Fields array contains an empty entry");continue}
if(_5.optionDataSource==null||_5.displayField==null||(_5.displayField==_5.valueField)||(_5.valueField==null&&(_5.displayField==_5.name))||(_5.autoFetchDisplayMap==false)||(this.autoFetchDisplayMap==false&&_5.autoFetchDisplayMap==null))
{continue}
var _6=isc.DS.get(_5.optionDataSource);if(_6==null){this.logWarn(_5.optionDataSource+" dataSource not found, check value of optionDataSource property on the "+_5.name+" field");continue}
var _7=_6.ID,_8=_5.optionCriteria;var _9=false;if(_2&&!_5.optionFilterContext){for(var _10=0;_10<_2.length;_10++){var _11=_2[_10];if(_11==null)continue;if(this.$68m(_5,_11)){_11.$51u=[_5];this.$45o.add(_11);_2[_10]=null;_9=true;break}}}
if(!_9&&!_5.optionFilterContext){for(var _10=0;_10<this.$45o.length;_10++){var _11=this.$45o[_10];if(this.$68m(_5,_11)){_11.$51u.add(_5);_9=true;break}}}
if(!_9){this.$45o.add({$68n:_7,$51u:[_5],$51w:_5.optionTextMatchStyle,$68o:_8,$68p:_5.optionFilterContext,$68r:_5.optionOperationId});this.$31v=true}}
if(_9&&!this.$31v&&_1){this.$31v=true}
for(var i=0;i<this.$45o.length;i++){if(this.$45o[i].$68q!=null){this.$67c(this.$45o[i])}}
if(_2!=null){for(var i=0;i<_2.length;i++){if(_2[i]&&_2[i].$68q)_2[i].$68q.destroy()}}},isc.A.$68m=function isc_ListGrid__fieldMatchesODSConfig(_1,_2){return(_2.$68n==_1.optionDataSource&&(_1.optionTextMatchStyle==_2.$51w)&&(_1.optionOperationId==_2.$68r)&&(isc.DataSource.getDataSource(_2.$68n).compareCriteria(_1.optionCriteria||{},_2.$68o||{})==0))},isc.A.$67c=function isc_ListGrid__updateValueMapFromODS(_1){var _2=_1.$68n,_3=_1.$51u;if(_3==null||_3.length==0){this.logWarn("$67c fired for dataSource:"+_2+" which no longer applies to any fields in this ListGrid");return}
var _4=_1.$68q;if(_4==null||(isc.isA.ResultSet(_4)&&!_4.lengthIsKnown()&&!_4.initialData))
{return}
if(_1.$68r){_4.fetchOperation=_1.$68r}
var _5=this.getGroupByFields()||[];if(!isc.isAn.Array(_5))_5=[_5];for(var i=0;i<_3.length;i++){var _7=_3[i],_8=(_7.valueField||_7.name),_9=_4.getValueMap(_8,_7.displayField);if(this.getField(_7.name)==null){_7.valueMap=_9}else{this.setValueMap(_7.name,_9)}
if(_5.contains(_7.valueField)||_5.contains(_7.displayField)){this.$92x=true}}
if(this.$92x){var _10=true;for(var i=0;i<this.$45o.length;i++){var _1=this.$45o[i];if(!_1.$68q){_10=false;break}}
if(_10){this.regroup(true);delete this.$92x}}},isc.A.$67b=function isc_ListGrid__fetchValueMapData(){var _1;for(var i=0;i<this.$45o.length;i++){var _3=this.$45o[i];if(_3.$68q==null){if(_1==null){_1=!isc.RPCManager.startQueue()}
var _4=_3.$68n;var _5,_6=_3.$51u;if(_6&&_6.length>0){_5="ODS:";for(var _7=0;_7<_6.length;_7++){_5+=_6[_7].name;if(_7<_6.length-1)_5+=","}}
var _8=_3.$68p||{};isc.addProperties(_8,{showPrompt:false,internalClientContext:{ODSConfig:_3},componentId:this.getID(),componentContext:_5,textMatchStyle:_3.$51w});if(_3.$68r!=null){_8.operationId=_3.$68r}
isc.DataSource.getDataSource(_4).fetchData(_3.$68o,{target:this,methodName:"$317"},_8)}}
if(_1)isc.RPCManager.sendQueue()},isc.A.$317=function isc_ListGrid__fetchValueMapCallback(_1,_2,_3){var _4=_3.internalClientContext.ODSConfig;if(!_4||(_4.$68q!=null)||!this.$45o||!this.$45o.contains(_4))
{return}
_4.$68q=isc.ResultSet.create({dataSource:_4.$68n,ODSConfig:_4,targetGrid:this,dataChanged:"this.targetGrid.$67c(this.ODSConfig)",initialData:_2})
this.$67c(_4);return true},isc.A.getPromptStyle=function isc_ListGrid_getPromptStyle(){return isc.Browser.useHighPerformanceGridTimings&&this.$1756?"component":null},isc.A.showComponentPrompt=function isc_ListGrid_showComponentPrompt(){this.loadingData=true;if(this.sorter&&this.sorter.setTitle){this.sorter.setTitle(this.sorter.getTitle())}},isc.A.clearComponentPrompt=function isc_ListGrid_clearComponentPrompt(){delete this.loadingData;if(this.sorter&&this.sorter.setTitle){this.sorter.setTitle(this.sorter.getTitle())}},isc.A.$67a=function isc_ListGrid__dropODSData(){if(this.$45o==null)return;for(var i=0;i<this.$45o.length;i++){var _2=this.$45o[i].$68q;if(_2)_2.destroy()}
delete this.$45o},isc.A.requestVisibleRows=function isc_ListGrid_requestVisibleRows(){var _1=this.data,_2=this.body,_3=isc.ResultSet!=null&&isc.isA.ResultSet(_1),_4=isc.ResultTree!=null&&isc.isA.ResultTree(_1);if(_3&&!_1.lengthIsKnown()||_4&&_1.isLoading(_1.root)){if(_2&&_2.getScrollTop()>0)_2.$192v()}
var _5=_4&&this.data.isPaged();if(_3||_5){if(_2==null||_2.$100r){var _6=(_3&&(this.isGrouped||(this.groupByField!=null&&this.getUnderlyingField(this.groupByField))));var _7=Math.max(this.dataPageSize||0,1);if(this.drawAllMaxCells&&_8!=null&&_8>0){var _8=this.getFields().length,_9=Math.floor(this.drawAllMaxCells/_8);if(_9>_7)_7=_9}
if(_6){return this.data.getRange(0,Math.max(_7,this.groupByMaxRecords))}else{return this.data.getRange(0,_7)}}
if(_3&&this.data.lengthIsKnown()&&this.data.getLength()==0){return}
if((_3&&!this.data.lengthIsKnown())||_5){_2.showAllRows=false}else{_2.showAllRows=_2.overflow==isc.Canvas.VISIBLE?true:this.showAllRecords}
var _10,_11,_12=this.$30d;if(_12!=null){if(_2.virtualScrolling)_11=isc.isAn.Array(_12)?_12[0]:_12;else _10=this.$201a(_12)}
var _13=_2.getDrawArea(null,_10);if(_11)_2.$201b(_13,_11);if(_3&&this.isGrouped){return this.data.getRange(0,this.groupByMaxRecords)}else{return this.data.getRange(_13[0],_13[1]+1)}}else if(this.body!=null){this.body.showAllRows=(this.body.overflow==isc.Canvas.VISIBLE?true:this.showAllRecords)}
return null},isc.A.$201a=function isc_ListGrid__getScrollTopFromScrollCell(_1){var _2=this.body;if(!_2||_2.overflow==isc.Canvas.VISIBLE||_2.overflow==isc.Canvas.IGNORE){return}
var _3,_4;if(isc.isAn.Array(_1)){_3=_1[0],_4=_1[3]}else if(_1!=null){_3=_1}else return;var _5=_2.derivedRowHeight;var y=_5*_3,_7=_5;if(_4==this.$o3||_4==null)y+=Math.floor(_7/2);else if(_4==this.$o2)y+=_7;return _2.$2009(y,null,_4)},isc.A.getPrintHTML=function isc_ListGrid_getPrintHTML(_1,_2){var _3=this.body;if(_3==null){this.createChildren();_3=this.body}
if(this.isDirty()||_3.isDirty()){this.redraw("updating HTML for printing")}
var _4=this.updatePrintProperties(_1);var _5,_6;if(isc.isA.ResultSet(this.data)&&!this.data.allMatchingRowsCached()){var _7=this.body.getVisibleRows(),_8=_7?_7[0]:null,_9=this.data.getCachedRange(_8);if(_9!=null){_5=_9[0];_6=_9[1]}}
var _10=isc.Canvas.applyStretchResizePolicy(this.fields.getProperty("width"),_4.width||isc.Page.getWidth());var _11=this.setupHeaderPrintHTML({startRow:_5,endRow:_6,callback:_2,printWidths:_10,printProps:_4});if(this.isExpansionGrid||!_2){return _11}},isc.A.setupHeaderPrintHTML=function isc_ListGrid_setupHeaderPrintHTML(_1,_2,_3){var _4=_3!=null;if(_2==null)_2="";if(_3==null)_3=0;var _5=this.body;this.currentPrintProperties=_1.printProps;var _6=this.gridComponents;for(var i=_3;i<_6.length;i++){var _8=_6[i];if(_8=="body"){_5.$119f=_2;_2="";continue}
if(!this.shouldPrintGridComponent(_8)){continue}
if(_8=="header"){_2+=this.getPrintHeaderRow()}else if(_8=="summaryRow"){_2+=this.getPrintSummaryRow()}else if(isc.isA.Canvas(_8)){var _9=this,_10=function componentPrintCallback(_12){_2+="<TR><TD colSpan='"+_9.fields.length+"'>"+_12+"</TD></TR>";_9.setupHeaderPrintHTML(_1,_2,i+1)}
var _11=_8.getPrintHTML(_1.printProps,_10);if(_11==null){return null}
_2+="<TR><TD colSpan='"+this.fields.length+"'>"+_11+"</TD></TR>"}else{this.logWarn("getPrintHTML() - unable to get print HTML for gridComponent "+_8)}}
delete this.currentPrintProperties;_5.$119g=_2;return this.setupHeaderPrintHTMLComplete(_1,_4)},isc.A.setupHeaderPrintHTMLComplete=function isc_ListGrid_setupHeaderPrintHTMLComplete(_1,_2){var _3=this.body.getTablePrintHTML(_1);var _4=_1.callback&&_1.callback.printCallback;if(_3!=null&&(_4||_2)){var _5=_1.callback;if(_5){this.fireCallback(_5,"HTML,callback",[_3,_5])}}
return _2?null:_3},isc.A.shouldPrintGridComponent=function isc_ListGrid_shouldPrintGridComponent(_1){if(_1==null)return false;if(isc.isA.String(_1)){var _2=this.shouldPrintAttributeMap[_1];if(_2!=null&&this[_2]!=null){return this[_2]}
return this.shouldShowGridComponent(_1)}
return this.shouldPrintChild(_1)},isc.A.getPrintHeaderRow=function isc_ListGrid_getPrintHeaderRow(){var _1=this.fields.duplicate();_1.removeAll(_1.findAll("shouldPrint",false));var _2=0,_3=_1.length;var _4=isc.Canvas.LEFT,_5=this.printHeaderStyle||this.headerBaseStyle,_6;if(this.headerSpans){var _7=[],_8=1;var _9=this.buildSpanMap(null,null,true);for(var i=_2;i<_3;++i){var _11=_1[i];_7[i]=[_11];var _12=_9[_11.name];while(_12!=null){_7[i].add(_12);_12=_12.parentSpan}
_8=Math.max(_7[i].length,_8)}
_6=[];for(var i=_8-1;i>=0;i--){_6[_6.length]="<TR>";var _13=null,_14=null;for(var _15=_2;_15<_3;_15++){var _16=1,_17=1;var _18=(i==0);var _19=_7[_15][i];if(_19=="spanned"){continue}
var _20=0,_21=_15,_22=[];_17=0;while(_21<_3){var _23=null,_24=false;for(var _25=0;(i-_25)>=0;_25++){_23=_7[_21][i-_25];if(_23!=null){if(_19==null){_19=_23;_20=_25;if(i-_25==0){_18=true}}
if(_19==_23){_22[_17]=_25;_20=Math.min(_25,_20)}else{_24=true}
break}}
if(_24){break}
_21++;_17++}
if(_20!=null){_16=_20+1}
for(var _26=0;_26<_22.length;_26++)
{var _27=_7[_26+_15],_25=_22[_26];for(var _28=0;_28<=_25;_28++){if(_26==0&&_28==0){_27[i-_28]=_19}else if(_28<=_20){_27[i-_28]="spanned"}else{_27[i-_28]=null}}}
if(_19==null){this.logWarn("Error in getPrintHeaders() - unable to generate print header HTML from this component's specified headerSpans")}
var _29="center",_30;if(_18){_29=_19.align||_4;_30=this.getHeaderButtonTitle(_19.masterIndex)}else{_30=_19.title}
if(this.isRTL()&&this.reverseRTLAlign){if(_29==isc.Canvas.LEFT)_29=isc.Canvas.RIGHT;else if(_29==isc.Canvas.RIGHT)_29=isc.Canvas.LEFT}
var _31=_6.length;_6[_6.length]="<TD class='";_6[_6.length]=_5;_6[_6.length]="' align='";_6[_6.length]=_29;_6[_6.length]="' rowSpan='";_6[_6.length]=_16;_6[_6.length]="' colSpan='";_6[_6.length]=_17;_6[_6.length]="'>";_6[_6.length]=_30;_6[_6.length]="</TD>"}
_6[_6.length]="</TR>"}}else{var _6=["<TR>"];var _32=["<TD CLASS=",_5," ALIGN="].join("");for(var _33=_2;_33<_3;_33++){var _11=_1[_33];var _29=_11.align||_4;if(this.isRTL()&&this.reverseRTLAlign){if(_29==isc.Canvas.LEFT)_29=isc.Canvas.RIGHT;else if(_29==isc.Canvas.RIGHT)_29=isc.Canvas.LEFT}
_6.addList([_32,_29,">",this.getHeaderButtonTitle(_11.masterIndex),"</TD>"])}
_6[_6.length]="</TR>"}
return _6.join(isc.emptyString)},isc.A.getPrintSummaryRow=function isc_ListGrid_getPrintSummaryRow(){if(!(this.summaryRow)||!(this.summaryRow.body)||!(this.showGridSummary)){return""}
var _1={startRow:0,endRow:this.summaryRow.getTotalRows(),maxRows:this.summaryRow.printMaxRows,printProps:this.printProperties||{},html:[]}
var _2=isc.Canvas.applyStretchResizePolicy(this.fields.getProperty("width"),_1.printProps.width||isc.Page.getWidth());_1.printWidths=_2;this.summaryRow.body.printChunkOnly=true;var _3=this.summaryRow.body.getPrintHTMLChunk(_1,true);delete this.summaryRow.body.printChunkOnly;return _3},isc.A.$119d=function isc_ListGrid__prepareBodyForPrinting(_1,_2){this.isPrinting=this.body.isPrinting=true;this.currentPrintProperties=_2;var _3=this.body,_4=this.$30a;var _5=isc.getProperties(_3,["autoFit","wrapCells","showAllRows","showAllColumns","fixedRowHeights","$26a","fields"]);_3.showAllRows=true;_3.showAllColumns=true;this.$30a=false;_3.autoFit=this.printAutoFit;_3.wrapCells=this.printWrapCells;_3.fixedRowHeights=!this.printWrapCells;var _6=this.fields.duplicate();_6.removeAll(_6.findAll("shouldPrint",false));_3.fields=_6;var _7=this.frozenFields;delete this.frozenFields;var _8=this.$143y=_3.$29a,_9=(this.frozenBody!=null&&this.frozenBody.$29a!=null?this.frozenBody.$29a.length:0);if(_9>0){var _10=(_8!=null?_8.length:0),_11=_9+_10,_12=_3.$29a=new Array(_11);for(var i=_10;i--;){_12[i]=_8[i]}
for(var i=_9;i--;){var _14=this.frozenBody.$29a[i];_14.$143x=true;_12[_10+i]=_14}}
this.$143l=0;this.$143w=0;if(this.freezeStart()){if(this.frozenBody&&this.frozenBody.$255!=null&&this.frozenBody.$254!=null)
{this.$143l=(this.frozenBody.$255-this.frozenBody.$254+1)}}else{if(this.body&&this.body.$255!=null&&this.body.$254!=null)
{this.$143w=(this.body.$255-this.body.$254+1)}}
_3.$26a=_1;return{oldEditorShowing:_4,oldFrozenFields:_7,origProps:_5}},isc.A.$119e=function isc_ListGrid__bodyDonePrinting(_1){var _2=this.body,_3=_1.origProps,_4=_1.oldEditorShowing;isc.addProperties(_2,_3);if(_3.showAllRows==null)_2.showAllRows=null;this.$30a=_4;this.frozenFields=_1.oldFrozenFields;_2.$29a=this.$143y;delete this.$143y;if(this.frozenBody!=null&&this.frozenBody.$29a!=null){for(var i=this.frozenBody.$29a.length;i--;){var _6=this.frozenBody.$29a[i];delete _6.$143x}}
delete this.$143l;delete this.$143w;delete this.currentPrintProperties;this.isPrinting=this.body.isPrinting=false;this.body.markForRedraw("finished printing")},isc.A.rowClick=function isc_ListGrid_rowClick(_1,_2,_3,_4){this.$31q=_2;var _1=this.getCellRecord(_2,_3),_5=this.fields[_3];if(Array.isLoading(_1))return;var _6=this.getCellValue(_1,_2,_3);var _7=this.getRawCellValue(_1,_2,_3);if(_1!=null&&_1.$52e){if(this.canCollapseGroup==false)return;if(_4){var _8=isc.EH.getKey();if(_8!="Space"&&_8!="Enter")return}
if(this.canSelectGroups&&this.isCheckboxField(_5)){return}
if(!this.collapseGroupOnRowClick){var _9=this.getEventPart();if(!_9||_9.part!="opener")return}
var _10=this,_11=_1;if(this.getEditRow()!=null){if(this.autoSaveEdits){var _12=this.saveAllEdits(null,function(){_10.toggleFolder(_11)});if(_12)return}else{this.storeUpdatedEditorValue()}}
this.toggleFolder(_1);return}
if(_5.valueIconClick!=null&&!_4){var _9=this.getEventPart();if(_9&&_9.part=="valueicon"){isc.Func.replaceWithMethod(_5,"valueIconClick","viewer,record,recordNum,field,rawValue,editor");var _13=_5.valueIconClick(this,_1,_2,_5,_7,null);if(_13==false)return false}}
var _14=this.getEditedRecord(_2);if(_5.recordClick&&!(_4&&_5.keyboardFiresRecordClick==false)){isc.Func.replaceWithMethod(_5,"recordClick","viewer,record,recordNum,field,fieldNum,value,rawValue,editedRecord");var _13=_5.recordClick(this,_1,_2,_5,_3,_6,_7,_14);if(_13==false)return false}
if(this.recordClick){if(this.onRecordClick(this,_1,_2,_5,_3,_6,_7,_14)==false)
return false;if(this.recordClick(this,_1,_2,_5,_3,_6,_7,_14)==false)
return false}
var _15=this.canEdit!=false&&(this.editEvent==isc.EH.CLICK||this.editOnFocus||this.$299(_2));if(this.isCheckboxField(_5))_15=false;if(_5.canToggle&&this.canEditCell(_2,_3)&&this.shouldToggle(_5,_4))
{var _16=this.getEditorValueMap(_5,this.getEditedRecord(_2,_3));if(_16==null&&isc.SimpleType.getBaseType(_5.type)==this.$g2){_16=[true,false]}
if(_16!=null){if(!isc.isAn.Array(_16))_16=isc.getKeys(_16);if(_16.length>1){var _17=this.getFieldName(_3),_18=this.getEditedCell(_2,_3),_19=_16.indexOf(_18);_19+=1;if(_19>=_16.length)_19=0;var _20=_18;_18=_16[_19];var _21;if(_5.change!=null){this.logInfo("canToggle firing specified field.change() event directly","gridEdit");_21=this.fireCallback(_5.change,"form,item,value,oldValue",[null,null,_18,_20])==false}
if(!_21){if(!_15&&this.autoSaveEdits){this.setEditValue(_2,_3,_18,true,false)}else{this.setEditValue(_2,_3,_18)}
if(_5.changed!=null){this.logInfo("canToggle firing specified field.changed() event directly","gridEdit");this.fireCallback(_5.changed,"form,item,value",[null,null,_18])}
if(this.autoSaveEdits){this.saveEdits(null,null,_2,_3)}else{this.validateCell(_2,_3)}}}}}
if(_15){if(this.handleEditCellEvent(_2,_3,isc.ListGrid.CLICK)==true){return true}
if(_4){for(var i=0;i<this.fields.length;i++){if(i==_3)continue;if(this.handleEditCellEvent(_2,i,isc.ListGrid.CLICK)==true){return true}}}}},isc.A.shouldToggle=function isc_ListGrid_shouldToggle(_1,_2){if(_2){var _3=isc.EH.getKey();if(_3==this.$304||_3==this.$10j)return true}
if(!this.$31s(_1))return true;var _4=this.getEventPart();return(_4&&_4.part=="valueicon")},isc.A.rowDoubleClick=function isc_ListGrid_rowDoubleClick(_1,_2,_3,_4){var _5=this.fields[_3],_6=this.getCellValue(_1,_2,_3),_7=this.getRawCellValue(_1,_2,_3);if(_1!=null&&_1.$52e)return;var _8=this.getEditedRecord(_2,_3);if(_5.recordDoubleClick){isc.Func.replaceWithMethod(_5,"recordDoubleClick","viewer,record,recordNum,field,fieldNum,value,rawValue,editedRecord");var _9=_5.recordDoubleClick(this,_1,_2,_5,_3,_6,_7,_8);if(_9==false)return _9}
if(this.recordDoubleClick!=null){var _9=this.recordDoubleClick(this,_1,_2,_5,_3,_6,_7,_8);if(_9==false)return _9}
if(this.canEdit!=false&&this.editEvent==isc.EH.DOUBLE_CLICK){if(this.handleEditCellEvent(_2,_3,isc.ListGrid.DOUBLE_CLICK)==true)return true;if(_4){for(var i=0;i<this.fields.length;i++){if(i==_3)continue;if(this.handleEditCellEvent(_2,i,isc.ListGrid.DOUBLE_CLICK)==true)return true}}}},isc.A.$298=function isc_ListGrid__cellContextClick(_1,_2,_3){this.cellContextItems=null;if(this.cellContextClick){var _1=this.getCellRecord(_2,_3);if(this.cellContextClick(_1,_2,_3)==false)return false}
if(this.showCellContextMenus){if(!this.cellContextMenu){var _4=isc.addProperties({},this.contextMenuProperties,{ruleScope:this.ruleScope});this.cellContextMenu=this.createAutoChild("cellContextMenu",_4,this.getMenuConstructor())}
if(!this.cellContextItems){this.cellContextItems=this.getCellContextMenuItems(this.getCellRecord(_2,_3),_2,_3)}
if(isc.isAn.Array(this.cellContextItems)&&this.cellContextItems.length>0){this.cellContextMenu.setData(this.cellContextItems);this.cellContextMenu.showContextMenu(this)}
return false}else{return true}},isc.A.getShowChildDataSourceContextMenuItemTitle=function isc_ListGrid_getShowChildDataSourceContextMenuItemTitle(_1){return"Show "+_1.getPluralTitle()},isc.A.getCellContextMenuItems=function isc_ListGrid_getCellContextMenuItems(_1,_2,_3){return this.makeCellContextItems(_1,_2,_3)},isc.A.makeCellContextItems=function isc_ListGrid_makeCellContextItems(_1,_2,_3){if(this.dataSource!=null){var _4=[];if(this.canOpenRecordDetailGrid){var _5=isc.DS.get(this.getRecordDataSource(_1)),_6=_5.getChildDataSources();if(_6!=null){for(var i=0;i<_6.length;i++){var _8=_6[i];_4.add({title:this.getShowChildDataSourceContextMenuItemTitle(_8),record:_1,dataSource:_8,click:"target.openRecordDetailGrid(item.record, item.dataSource)"})}}}
if(this.canOpenRecordEditor){_4.add({title:this.openRecordEditorContextMenuItemTitle,record:_1,click:"target.endEditing();target.openRecordEditor(item.record)"})}
if(_1!=null&&this.$32o==_1){_4.add({title:this.dismissEmbeddedComponentContextMenuItemTitle,click:"target.closeRecord()"})}
_4.add({title:this.deleteRecordContextMenuItemTitle,click:"target.removeSelectedData()"});return(_4.length>0?_4:null)}
return null},isc.A.getCanHover=function isc_ListGrid_getCanHover(){if(this.canHover!=null)return this.canHover;var _1=this.$1159();if(_1)return _1;var _2=this.getFields();if(_2!=null){for(var i=0;i<_2.length;i++){if(_2[i].showHover)return true}}
return this.canHover},isc.A.$118n=function isc_ListGrid__getFieldHoverHTMLCallback(_1,_2){var _3=this.getField(_2);if(_3==null)return null;if(_3.showHover==false)return null;if(_3.showHover==null&&!this.canHover)return null;var _4=this.getRecord(_1);if(_4.$52e&&this.singleCellGroupHeaders())return null;if(_3.hoverHTML){isc.Func.replaceWithMethod(_3,this.$118p,this.$118q);return{target:_3,methodName:this.$118p}}
return null},isc.A.$118o=function isc_ListGrid__isCellHoverSuppressed(_1,_2,_3){if(this.isEditingCell(_1,_2)){return true}
if(this.$68z(_2)&&this.canEditCell(_1,_2)){return true}
if(_3){if(this.showHover==false&&_3.showHover!=true)return true;if(_3.showHover==false)return true}
return false},isc.A.getCellHoverDelay=function isc_ListGrid_getCellHoverDelay(_1,_2,_3){var _4=this.getField(_3);return _4&&_4.hoverDelay!=null?_4.hoverDelay:this.hoverDelay},isc.A.cellHoverHTML=function isc_ListGrid_cellHoverHTML(_1,_2,_3){var _4=this.$118n(_2,_3),_5=_1.$52e&&(_3==0||this.singleCellGroupHeaders()),_6=_5?this.getGroupTitle(_1):this.getCellValue(_1,_2,_3);if(_4){return isc.Class.fireCallback(_4,this.$118q,[_1,_6,_2,_3,this])}
if(this.getTreeFieldNum&&_3==this.getTreeFieldNum()){return this.getTreeCellHoverHTML(_1,_2,_3)}
var _7=this.getField(_3);if(_7!=null){if(_7.cellPrompt)_6=_7.cellPrompt;var _8=this.$277j(_7);if(_8){isc.HoverPseudoFieldGeneratorUtil.$2765(this,_8,_1,this.$277l());return isc.HoverPseudoFieldGeneratorUtil.$277c(this,_8,_1)}
if(this.isValuePendingAsyncOrAsyncError(_1,_7)){var _9=_1["_asyncNonSuccess_"+this.ID],_10=_9&&_9[_7.name];if(_10&&_10.$132l==this.$132l){var _11=_10._message;if(!_11||!(_11=String(_11).trim())){_11=this.defaultasyncNonSuccessHoverContents}else{_11=_11.asHTML()}
return _11}
return this.asyncValueHoverContents}}
if(_6!=null&&!isc.isAn.emptyString(_6)&&_6!=this.emptyCellValue){return _6}},isc.A.cellHoverProperties=function isc_ListGrid_cellHoverProperties(_1,_2,_3){if(!_1)return null;var _4=this.getField(_3);if(_4){var _5=this.$277j(_4);if(_5){isc.HoverPseudoFieldGeneratorUtil.$2765(this,_5,_1,this.$277l());return isc.HoverPseudoFieldGeneratorUtil.$wc(this,_5,_1)}
if(this.isValueAsyncError(_1,_4)){return this.asyncErrorHoverProperties}}
return null},isc.A.cellValueHoverHTML=function isc_ListGrid_cellValueHoverHTML(_1,_2,_3,_4){var _5=this.getField(_3);if(_5.showHover==false)return null;if(_5.showHover==null&&this.canHover==false)return null;return _4},isc.A.$182v=function isc_ListGrid__shouldShowCellHoverComponent(_1,_2,_3){if(this.showHoverComponents===false||(this.showHoverComponents==null&&this.hoverMode==null))
{var _4=_3!=null?this.getField(_3):null;if(_4&&_4.showHoverComponents==true)return true;return false}
return true},isc.A.$784=function isc_ListGrid__getCellHoverComponent(_1,_2,_3){if(!this.$182v(_1,_2,_3))return null;if(this.$30a&&this.getEditRow()==_2&&(!this.editByCell||this.getEditCol()==_3))return null;var _4=this.getField(_3);if(_4.showHover==false)return null;if(_4.showHover==null&&!this.canHover)return null;if(this.hoverScreen){var _5=this.getDataSource(),_6={};if(_5){_6.dataContext={};_6.dataContext[_5.ID]=_1}
return isc.RPCManager.createScreen(this.hoverScreen,_6)}else if(this.getCellHoverComponent&&isc.isA.Function(this.getCellHoverComponent)){isc.Hover.preparingHoverComponent=true;var _7=this.getCellHoverComponent(_1,_2,_3);delete isc.Hover.preparingHoverComponent;return _7}else{return null}},isc.A.getCellHoverComponent=function isc_ListGrid_getCellHoverComponent(_1,_2,_3){return this.$84d(_1,false,true,_2,_3)},isc.A.$84d=function isc_ListGrid__getStockEmbeddedComponent(_1,_2,_3,_4,_5){var _6=this.getFields(),_7=this.dataSource?isc.getValues(this.getDataSource().getFields()):_6,_8=(!_3?null:this.hoverWidth||this.hoverSize||this.defaultCellHoverComponentWidth),_9=(!_3?null:this.hoverHeight||this.hoverSize||this.defaultCellHoverComponentHeight),_10=[],_11,_12=false,_13=this.detailField;if(_2&&this.expansionMode=="detailField"&&!_13){_13=this.getDefaultExpansionDetailField();if(_13){_13=_13.name}}
for(var i=0;i<_7.length;i++){var _15=_7.get(i);if(_13&&_15.name==_13&&_15.escapeHTML){_12=true}
if(this.dataSource){if(!_6.find("name",_15.name)){_10.add(_15)}}else{if(_15.$81f){_10.add(_15)}}}
var _16=(_3?this.hoverMode:(_2?this.expansionMode:null));if(!_16){if(this.detailDS){_16="detailRelated"}else{_16="details"}}
var _17;if(_16=="detailField"){if(!_2&&!_1[_13])return null;var _18=_1[_13];if(_12&&isc.isA.String(_18)&&_18!=this.$54t){_18=_18.asHTML(null,this.shouldSkipLineBreaks(_15))}
_11=this.createAutoChild("expansionDetailField",{contents:_18});_17={width:(_3?_8:"100%"),height:(_3?_9:"100%"),autoDraw:false,members:[_11]};if(_3){_17=isc.addProperties(_17,{hoverAutoDestroy:this.hoverAutoDestroy})}
_11=isc.VLayout.create(_17)}else if(_16=="details"){_10=_10.map(function(_15){return isc.addProperties({},_15,_15.showIf==null?{showIf:"true"}:{})});_17={dataSource:this.dataSource,fields:_10};var _1=isc.addProperties({},_1);if(_3){_17=isc.addProperties(_17,{width:_8,height:_9,hoverAutoDestroy:this.hoverAutoDestroy})}
_11=this.createAutoChild("expansionDetails",_17);if(isc.isA.ResultSet(_1)||!this.dataSource){_11.setData(_1)}else{var _19=isc.ResultSet.create({dataSource:this.dataSource,initialData:[_1]});_11.setData(_19)}}else if(_16=="related"){_17={dataSource:this.getRelatedDataSource(_1)};if(_3){_17=isc.addProperties(_17,{canEdit:false,width:_8,height:_9,dataProperties:{context:{showPrompt:false}},hoverAutoDestroy:this.hoverAutoDestroy})}
if(_2){if(this.childExpansionMode!=null)_17=isc.addProperties(_17,{canExpandRecords:this.childExpansionMode?true:false,expansionMode:this.childExpansionMode});if(this.expansionCanEdit!=null)_17=isc.addProperties(_17,{canEdit:this.expansionCanEdit});_17.isExpansionGrid=true}
_11=this.createAutoChild("expansionRelated",_17);if(this.expansionCanEdit)_11.autoSaveEdits=true;_11.delayCall("fetchRelatedData",[_1,this.dataSource,function(_24,_25){if(_25==null||_25.length==0)_11.setBodyOverflow("visible")}])}else if(_16=="detailRelated"){_17={dataSource:this.dataSource,fields:_10};if(_3){_17=isc.addProperties(_17,{dataProperties:{context:{showPrompt:false}},hoverAutoDestroy:this.hoverAutoDestroy})}
var _20=this.createAutoChild("expansionDetails",_17)
_20.setData(_1);_17={dataSource:this.getRelatedDataSource(_1),height:"100%"};if(_3){_17=isc.addProperties(_17,{dataProperties:{context:{showPrompt:false}},hoverAutoDestroy:this.hoverAutoDestroy,canEdit:false})}
if(_2){if(this.childExpansionMode!=null)_17=isc.addProperties(_17,{canExpandRecords:this.childExpansionMode?true:false,expansionMode:this.childExpansionMode});if(this.expansionCanEdit!=null)_17=isc.addProperties(_17,{canEdit:this.expansionCanEdit});_17.isExpansionGrid=true}
var _21=this.createAutoChild("expansionRelated",_17);_17={members:[_20,_21]};if(_3){_17=isc.addProperties(_17,{width:_8,height:_9,hoverAutoDestroy:this.hoverAutoDestroy})}
_11=this.createAutoChild("expansionDetailRelated",_17)}else if(_16=="editor"){_11=isc.VLayout.create({autoDraw:false,width:"100%",height:"100%",creator:this});var _22=this.createAutoChild("expansionEditor",{dataSource:this.dataSource,fields:_10,extraSpace:5,itemChanged:function(){if(this.saveButton)this.saveButton.setDisabled(false)}});_22.editRecord(this.getEditedRecord(_4)||_1);_22.validate();if(this.showExpansionEditorSaveButton){var _23=this.createAutoChild("expansionEditorSaveButton",{title:this.expansionEditorSaveButtonTitle,grid:this,form:_22,record:_1,disabled:true,extraSpace:5});_22.saveButton=_23}
_11.formMember=_22;_11.addMembers([_22,_23])}
if(_11){_11.isStockComponent=true;_11.expandedRecord=_1}
return _11});isc.evalBoundary;isc.B.push(isc.A.getDefaultExpansionDetailField=function isc_ListGrid_getDefaultExpansionDetailField(){var _1=this.getAllFields(),_2=this.getVisibleFields(_1),_3=[],_4;;for(var i=0;i<_1.length;i++){if(!_2.contains(_1[i])){_3.add(_1[i])}}
var _6,_7=0;for(var i=0;i<_3.length;i++){if(_3[i].length>_7){_7=_3[i].length;_6=_3[i]}}
if(_6){return _6}
_6=null;_7=0;for(var i=0;i<_2.length;i++){if(_2[i].length>_7){_7=_2[i].length;_6=_2[i]}}
if(_6){var _8=isc.DynamicForm.getInstanceProperty("longTextEditorThreshold");if(_6.length>=_8){return _6}}
for(var i=0;i<_3.length;i++){if(_3[i].type=="text"){return _3[i]}}
if(_3[0]){return _3[0]}
_6=null;_7=0;for(var i=0;i<_2.length;i++){if(_2[i].type=="text"&&_2[i].length>_7){_7=_2[i].length;_6=_2[i]}}
if(_6){return _6}
return _1[0]},isc.A.selectAllRecords=function isc_ListGrid_selectAllRecords(_1){this.$67j=true;this.selectionManager.selectAll(_1);this.$67j=null;this.$25a("select all");if(this.getCurrentCheckboxField()!=null){if(!isc.ResultSet||!isc.isA.ResultSet(this.data)||this.data.allMatchingRowsCached())
{this.$63m(true)}}
this.fireSelectionUpdated()},isc.A.deselectAllRecords=function isc_ListGrid_deselectAllRecords(){this.$67j=true;this.selectionManager.deselectAll();this.$67j=null;this.$25a("deselect all");if(this.getCurrentCheckboxField()!=null)this.$63m(false);this.fireSelectionUpdated()},isc.A.userSelectAllRecords=function isc_ListGrid_userSelectAllRecords(){var _1=this.getOriginalData(),_2=_1.getLength();if(isc.ResultSet&&isc.isA.ResultSet(_1)&&!_1.rangeIsLoaded(0,_2)){this.selectionManager.warnSelectionRangeNotLoaded();return}
var _3=(this.isGrouped?this.getAllRecordsFromGroupTree():_1.getRange(0,_2)),_4=[];for(var i=0;i<_3.length;i++){if(!this.canSelectRecord(_3[i]))continue;_4[_4.length]=_3[i]}
this.selectionManager.selectList(_4);this.fireSelectionUpdated()},isc.A.getAllRecordsFromGroupTree=function isc_ListGrid_getAllRecordsFromGroupTree(){var _1;if(this.isGrouped)_1=this.data;if(!_1||!isc.isA.Tree(_1))return;return this.data.getDescendantLeaves(this.data.getRoot())},isc.A.canSelectCell=function isc_ListGrid_canSelectCell(_1,_2){return true},isc.A.canSelectRecord=function isc_ListGrid_canSelectRecord(_1){if(!_1)return false;if(this.isGrouped&&!this.canSelectGroups&&_1.$52e)return false;if(_1[this.recordCanSelectProperty]!=null){return _1[this.recordCanSelectProperty]}
if(this.selectOnExpandRecord==false&&this.selectionAppearance!="checkbox"){var _2=this.getUnderlyingField(this.getEventColumn());if(_2){if(this.isExpansionField(_2))return false}}
return true},isc.A.selectCellText=function isc_ListGrid_selectCellText(_1,_2){if(!this.isDrawn()||!this.body)return;var _3=this.fieldIsFrozen(_2),_4=_3?this.frozenBody:this.body,_5=this.getLocalFieldNum(_2);var _6=_4.getTableElement(_1,_5);if(_6!=null)isc.Element.selectElementText(_6)},isc.A.$190h=function isc_ListGrid__getSelectedCellTextConfig(_1,_2){if(!this.isDrawn()||!this.body||!this.body.getTableElement())return;var _3=_1!=null&&_2!=null;if(window.getSelection!=null){var _4=window.getSelection(),_5=_4!=null&&_4.rangeCount>0&&_4.getRangeAt(0),_6=_5&&!_5.collapsed?_5.commonAncestorContainer:null;if(_6&&(_5.startContainer!=_6)||(_5.endContainer!=_6))
{_6=null}
if(_6!=null){var _7;if(_3){var _8;if(this.fieldIsFrozen(_2)){if(this.frozenBody){_8=this.frozenBody.getTableElement(_1,this.getLocalFieldNum(_2))}}else{_8=this.body.getTableElement(_1,this.getLocalFieldNum(_2))}
if(_8&&_8.contains(_6)){return{rowNum:_1,colNum:_2,text:_5.toString()}}}else{var _9=this.body,_10=_9.getTableElement(),_11=_10&&_10.contains(_6);if(!_11&&this.frozenBody){_9=this.frozenBody;_10=_9.getTableElement();_11=_10&&_10.contains(_6)}
if(_11){var _12={};var _13,_14,_15=_6;while(_15!=_10){if(_15.tagName=="TD"){_13=_15}
if(_15.tagName=="TR"){_14=_15}
_15=_15.parentNode}
if(_13!=null){var _16=_14.rowIndex,_17=_13.cellIndex;_12.rowNum=_16+(_9.$252||0);var _18=_17+(_9.$254||0);_12.colNum=this.getFieldNumFromLocal(_18,_9);_12.text=_5.toString();return _12}}}}}},isc.A.shouldSelectCellTextOnClick=function isc_ListGrid_shouldSelectCellTextOnClick(_1,_2){if(this.isEditingCell(_1,_2))return false;if(this.selectCellTextOnClick==false)return false;var _3=this.getField(_2);if(_3){if(_3.selectCellTextOnClick==false)return false;if(_3.selectCellTextOnClick)return true}
if(this.selectCellTextOnClick)return true;return false},isc.A.bodyKeyPress=function isc_ListGrid_bodyKeyPress(_1,_2){if(this.onBodyKeyPress(_1,_2)==false)return false;if(this.$30a){var _3=_1.keyTarget,_4;while(_4==null&&_3!=this&&_3!=null){_4=_3.canvasItem;_3=_3.parentElement}
if(_4!=null&&_4.form==this.getEditForm()){var _5=this.editorKeyPress(_4,isc.EH.getKey(),isc.EH.getKeyEventCharacterValue());return(_5==null?isc.EH.STOP_BUBBLING:_5)}}
if(this.data.getLength()>0){var _6=isc.EventHandler,_7=_1.keyName;var _8=this.editOnKeyPress&&this.canEdit!=false;if(_8&&this.$51j(_1,_2))return false;var _9=this.getFocusCell();if(this.isGrouped){var _10=_7==this.$60n,_11=!_10&&_7==this.$60o;if(_10||_11){var _12=_9[0],_13=this.data?this.data.get(_12):null;if(_13&&_13.$52e){if(_10)this.closeFolder(_13);else this.openFolder(_13);return}}}
var _9=this.getFocusCell(),_14=_9[0]!=null?this.getCellRecord(_9[0],_9[1]):null;if(this.canExpandRecords&&this.$811(_14,_9[0])){var _15=this.isExpanded(_14);if(_15&&_7==this.$60n){this.collapseRecord(_14);return}
if(!_15&&_7==this.$60o){this.expandRecord(_14);return}}
switch(_7){case this.$20s:return this.$24s(-1,0);case this.$20t:return this.$24s(1,0);case this.$60n:return this.$24s(0,-1);case this.$60o:return this.$24s(0,1)}
if(_7==this.$jf){if(this.shouldNavigateOnTab()){if(isc.EH.shiftKeyDown())return this.$24s(0,-1,true);else return this.$24s(0,1,true)}}
if(_7==this.$304){var _16=true;if(this.generateClickOnSpace){var _17=this.$240();if(_17==false)return false;else if(_17==true)_16=false}
if(this.generateDoubleClickOnSpace){var _18=this.$241();if(_18!=null)_16=false}
if(!_16)return false}else if(_7==this.$10j){var _16=true;if(this.generateClickOnEnter){var _17=this.$240();if(_17==false)return false;else if(_17==true)_16=false}
if(this.generateDoubleClickOnEnter){var _18=this.$241();if(_18!=null)_16=false}
if(!_16)return false}else if(_6.modifierKeyDown()&&(_7=="D"||_7=="R"||_7=="C"||_7=="V")){return this.$94i(_7)}else if(_6.modifierKeyDown()&&_7=="A"&&this.canSelectCells&&this.canSelectAll){this.selectionManager.selectAll();this.fireSelectionUpdated();return false}else if(this.getTotalRows()>=0&&_7==this.$51g&&this.editOnF2Keypress&&this.canEdit!=false&&this.editEvent!="none")
{var _19,_20;if(this.canSelectCells&&this.editByCell){var _21=this.getFocusCell();if(_21[0]>=0)_19=_21[0];if(_21[1]>=0)_20=_21[1]}else{_19=this.getFocusRow();if(_19<0)_19=null}
if(_19==null||_20==null){var _22=(_19==null?0:_19),_23=(_20==null?0:_20);var _24=this.findNextEditCell(_22,_23,1,(_20==null),true);if(_24==null){_19=_20=null}else{_19=_24[0];_20=_24[1]}}
if(_19!=null&&_20!=null&&this.canEditCell(_19,_20)){this.startEditing(_19,_20);return false}}}
return true},isc.A.onBodyKeyPress=function isc_ListGrid_onBodyKeyPress(){},isc.A.$24s=function isc_ListGrid__navigateToNextCell(_1,_2,_3,_4,_5){var _6=isc.EH.lastEvent;if(this.body.contains(_6.keyTarget)&&!this.body.hasFocus){this.body.focus()}else if(this.frozenBody&&this.frozenBody.contains(_6.keyTarget)==this.frozenBody&&!this.frozenBody.hasFocus)
{this.frozenBody.focus()}
if(!this.canSelectCells){return this.$318(_1,_4,_5,false,_2)}else if(this.selectionType==isc.Selection.NONE)return true;if(_5==null){_5=_3?this.tabKeyAction:this.getArrowKeyAction()}
if(_5==this.$27r)return true;var _7=_5=="select"||_5=="selectOnly";var _8=isc.EH.shiftKeyDown();if(_7&&_8){this.$94n()}
var _9=this.getFocusCell(_8);var _10=_9[0],_11=_9[1];if(_10!=null&&_11!=null){if(!_4){_10+=_1;_11+=_2}}else{_10=_11=0}
var _12=this.getTotalRows(),_13=this.getTotalCols();var _14="done";if(_3)_14=this.rowEndEditAction||"next";if(_11<0||_11>=_13){if(_14=="same"){if(_2>0)_11=0;else _11=_12-1}else if(_14=="next"){if(_2>0){if(_10<_12-1){_10++;_11=0}else return true}else{if(_10>0){_10--;_11=_13-1}else return true}}else{if(_14=="stop")return false;return true}}
var _15=_7&&isc.EH.modifierKeyDown();if(_15){if(_1>0)_10=this.getTotalRows()-1;else if(_1<0)_10=0;if(_2>0)_11=this.getTotalCols()-1;else if(_2<0)_11=0;_1=-_1;_2=-_2}
while(!this.recordIsEnabled(this.getCellRecord(_10,_11),_10,_11)){if(_1!=0)_10+=_1;if(_2!=0)_11+=_2;if(_10==_9[0]&&_11==_9[1]){return true}
if(_11<0||_11>=_13){if(_14=="same"){if(_2>0)_11=0;else _11=_12-1}else if(_14=="next"){if(_2>0){if(_10<_12-1){_10++;_11=0}else return true}else{if(_10>0){_10--;_11=_13-1}else return true}}else{if(_14=="stop")return false;return true}}else if(_10<0||_10>=_12){return true}}
this.clearLastHilite();this.$24v=_10;this.$24w=_11;this.$97a=this.getFieldBody(_11);if(_7){this.$24y(_10,_11);if(_3){const _16=this.selectionManager.deselectAll();if(_16)this.fireSelectionUpdated()}
this.$24x(_10,_11,null,(_5=="selectOnly"))}else{if(_5==this.$305)this.$24y(_10,_11)}
this.$965=true;this.scrollToCell(_10,_11);this.$965=false;return false},isc.A.focusInCell=function isc_ListGrid_focusInCell(_1,_2){this.$24v=_1;this.$24w=_2;var _3=this.getFieldBody(_2);this.$97a=_3;this.$24y(_1,_2);if(!_3.hasFocus)_3.focus()},isc.A.focusInRow=function isc_ListGrid_focusInRow(_1){this.$88(_1);if(this.body&&!this.body.isFocused())this.body.focus()},isc.A.$24y=function isc_ListGrid__hiliteCell(_1,_2){if(isc.isAn.Object(_1)){_2=_1.$24u;_1=_1.$24t}
if(_1==null||_2==null||_1<0||_2<0||_1>=this.getTotalRows()||_2>=this.getTotalCols())return;var _3=this.$97a,_4=_3.selectionManager.firstCol||0;_3.lastOverRow=_1;_3.lastOverCol=_2-_4;_3.setRowStyle(_1,null,_2-_4);this.updateRollOverCanvas(_1,_2)},isc.A.$97d=function isc_ListGrid__getLastMouseOverBody(){if(!this.frozenBody)return this.body;if(this.frozenBody.lastMouseOverRow==null&&this.frozenBody.lastMouseOverCol==null)return this.body;return this.frozenBody},isc.A.$94n=function isc_ListGrid__ensureValidSelectionOrigin(){if(!this.selectionManager.$94l(this)){var _1=this.$97d(),_2=_1.selectionManager.firstCol||0;var _3=_1.lastMouseOverRow||0,_4=_1.lastMouseOverCol||0,_5=this.getCellRecord(_3,_4+_2);if(this.recordIsEnabled(_5,_3,_4+_2)){_1.selectOnMouseDown(_5,_3,_4)}}},isc.A.$51j=function isc_ListGrid__editOnKeyPress(_1,_2){var _3=_2.keyName,_4=isc.EH.getKeyEventCharacter(_1);if(_3!=this.$51g&&_3!=this.$51i&&_3!=this.$51h&&(_3==this.$20w||isc.EH.$i8[_3]||_4==null||_4==isc.emptyString))
{return false}
var _5=this.getFocusCell(),_6=_5[0]||0,_7=_5[1]||0;if(this.$30a||_6<0||_7<0)return false;var _8;if(_3==this.$10j||_3==this.$51g)_4=null;var _9;if(_4!=null){if(_3==this.$51i||_3==this.$51h){_9=null}else if(this.autoSelectEditors){_9=_4}else{_9=this.getEditedCell(_6,_7)+_4}
this.$51m=true}
return this.handleEditCellEvent(_5[0],_5[1],this.$51l,_9)},isc.A.getArrowKeyAction=function isc_ListGrid_getArrowKeyAction(){var _1=this.arrowKeyAction;if(_1==this.$27r)return this.$27r;var _2=this.canSelectCells&&isc.EH.shiftKeyDown();if(isc.EH.modifierKeyDown()&&!_2)return this.$305;if(_1!=null)return _1;return this.selectionAppearance=="checkbox"?this.$305:this.$12b},isc.A.$318=function isc_ListGrid__navigateToNextRecord(_1,_2,_3,_4,_5){var _3=_3==null?this.getArrowKeyAction():_3;if(_3==this.$27r)return true;var _6=isc.screenReader&&this.body.canFocusInCells();if(_5==null)_5=0;if(_1==0&&(_5==0||!_6)){return}
var _7=_6?this.$237l(_5):null;var _8;_8=this.getFocusRow(_1>0,isc.EH.shiftKeyDown()&&_3!=this.$305);if(_1==0){if(!_4){this.scrollCellIntoView(_8,_7)}
this.$237m(_8,_7,this.suppressNavigationFocus);return false}
if(_1==null)_1=1;if(_8==null)_8=this.$31q;var _9=_8,_10;if(!isc.isA.Number(_8)){_8=this.body?this.body.$27x()[0]:0;_10=_8}else{_8=_8+(_2?0:_1);_10=_9}
var _11=this.getTotalRows()-1;if(_8<0||_8>_11){if(_11<0)return true;_8=_10}
while(!this.recordIsEnabled(this.getCellRecord(_8,0),_8,0)){_8+=_1;if(_8<0||_8>_11){_8=_10;break}}
if(isc.screenReader){this.$237m(_8,_7,this.suppressNavigationFocus)}
this.$88(_8,_7);if(_3==this.$305){if(isc.screenReader)this.$237m(_8,_7,this.suppressNavigationFocus)}else{if(_8==_9){var _12=_7!=null?_7:this.$32b();if(_12>=0&&this.body.selectionEnabled()){var _13=this.getCellRecord(_8,_12);if(this.canSelectRecord(_13)&&this.recordIsEnabled(_13,_8,_12))
{this.selectionManager.selectOnMouseDown(this,_8,_12);this.selectionManager.selectOnMouseUp(this,_8,_12);this.fireSelectionUpdated()}}}
else if(_3=="selectOnly"||_3==this.$12b){this.$24x(_8,_7,null,(_3=="selectOnly"))}
else if(_3==this.$306){this.$32a(_8,_7)}}
if(!_4){this.$965=true;this.scrollRecordIntoView(_8)
this.$965=false}
return false},isc.A.$237n=function isc_ListGrid__canFocusInBodyCells(){return this.body&&this.body.canFocusInCells()},isc.A.$237l=function isc_ListGrid__getNewNativeFocusCol(_1){var _2=this.$32b(true);if(_1!=null){var _3=_2+_1;if(_3>=0&&_3<this.fields.length){_2=_3}}
return _2},isc.A.$237m=function isc_ListGrid__putNativeFocusInCell(_1,_2,_3){var _4=this.body,_5;if(_2!=null){_4=this.getFieldBody(_2);_5=this.getLocalFieldNum(_2)}
if(_4){_4.$86a(_1,_5);if(!_3&&!_4.hasFocus)_4.focus()}},isc.A.$32b=function isc_ListGrid__getKeyboardClickNum(_1){var _2=this.keyboardClickField;if(_2!=null){var _3;if(isc.isA.Number(_2)&&_2>0&&_2<this.fields.length){_3=this.fields[_2]}else{_3=this.fields.find("name",_2)}
if(_3&&_3.ignoreKeyboardClicks&&!_1){this.logWarn("Explicitly specified keyboardClickField:"+this.keyboardClickField+" refers to a field which disallows keyboard click events.");_3=null}
if(_3!=null){return this.fields.indexOf(_3)}}
if(isc.screenReader&&(this.$237k||_1)){var _4=this.$237k||this.body;return this.getFieldNumFromLocal(_4.getNativeFocusColumn(),_4)}
if(this.getCurrentCheckboxField()!=null){return this.getCheckboxFieldPosition()}
for(var i=0;i<this.fields.length;i++){if(this.fields[i].ignoreKeyboardClicks!=true)return i}
return-1},isc.A.$24x=function isc_ListGrid__generateCellClick(_1,_2,_3,_4){if(!this.canSelectCells&&this.body.lastOverRow!=null&&this.body.lastOverRow!=_1)
{this.clearLastHilite()}
if(isc.isAn.Object(_1))_1=this.getRecordIndex(_1);if(!isc.isA.Number(_1)||_1<0)_1=0;if(_1>=this.data.getLength())_1=this.data.getLength()-1;var _5,_6,_7=this.body&&this.body.canFocusInCells();if(this.canSelectCells){if(_2==null||_2<0||_2>=this.getTotalCols())return;_5=_3?this.getFieldBody(_2):this.$97a;var _8=_5.selectionManager.firstCol||0;_6=(_2-_8)}else{if(_2!=null&&isc.screenReader&&_7){_5=this.getFieldBody(_2)}else{_5=this.body;if(_2==null)_2=this.$32b()}
_5.$31p=_1;if(_2==-1)return;_6=this.getLocalFieldNum(_2);_5.$237t=_6}
var _9=this.getCellRecord(_1,_2),_10=this.selectOnGeneratedCellClick(_9,_1,_2,_5);if(_10){_5.selectOnMouseDown(_9,_1,_6,true);_5.selectOnMouseUp(_9,_1,_6,true)}
if(_7){this.$237m(_1,_2)}
if(_4)return;var _9=this.getCellRecord(_1,_2)
var _11=(this.cellClick(_9,_1,_2,true)!=false)&&(this.rowClick(_9,_1,_2,true)!=false);return _11},isc.A.selectOnGeneratedCellClick=function isc_ListGrid_selectOnGeneratedCellClick(_1,_2,_3,_4){return(_4.selectionEnabled()&&this.recordIsEnabled(_1,_2,_3))},isc.A.getFocusRow=function isc_ListGrid_getFocusRow(_1,_2){if(this.body.$31p!=null&&((this.body.$31p==this.body.lastOverRow)||(this.body.$31p==this.$31q)))
{return this.body.$31p}
delete this.body.$31p;if(_2)return null;var _3=this.selection.defaultIsSelected?this.getUnselectedRecords():this.getSelection();if(_3.length==0)return null;_3=_3[(_1?_3.length-1:0)]
return this.getRecordIndex(_3)},isc.A.getFocusCell=function isc_ListGrid_getFocusCell(_1){if(!this.canSelectCells){return[this.getFocusRow(),this.$32b()]}
var _2,_3;if(this.$24v!=null&&this.$24w!=null){var _4=this.$97a;if(_4!=null){var _5=_4.selectionManager.firstCol||0;if((this.$24v==_4.lastOverRow&&this.$24w==_4.lastOverCol+_5)||(this.$967==_4&&this.$24v==_4.$24n&&this.$24w==_4.$24o+_5))
{_2=this.$24v;_3=this.$24w}}}
if(_2==null||_3==null){if(_1){_2=this.selectionManager.lastRow;_3=this.selectionManager.lastCol}
var _4=this.$967;if(_4){var _5=_4.selectionManager.firstCol||0;if(_2==null||_3==null){_2=_4.$24n;_3=_4.$24o+_5}}}
if(_2>=this.getTotalRows()){_2=null;_3=null}
if(_2==null||_3==null){var _6=this.getSelection();if(_6.getLength()>0){_2=_6[0].$24t;_3=_6[0].$24u}}
return[_2,_3]},isc.A.$240=function isc_ListGrid__generateFocusRecordClick(){var _1=this.getFocusCell(),_2=_1[0],_3=_1[1];if(_2!=null&&_3!=null){var _4=this.$24x(_2,_3,true);if(_4==null)_4=true;return _4}
return null},isc.A.$32a=function isc_ListGrid__generateRecordDoubleClick(_1,_2){if(_2==null)_2=this.$32b();if(_2==null||_2==-1)return;return this.rowDoubleClick(this.getCellRecord(_1,_2),_1,_2,true)},isc.A.$241=function isc_ListGrid__generateFocusRecordDoubleClick(){var _1=this.getFocusCell(),_2=_1[0],_3=_1[1];if(_2!=null&&_3!=null&&_3>=0){var _4=this.$32a(_2,_3);if(_4==null)_4=true;return _4}
return null},isc.A.scrollRecordToTop=function isc_ListGrid_scrollRecordToTop(_1){return this.scrollRecordIntoView(_1,"top")},isc.A.scrollRecordIntoView=function isc_ListGrid_scrollRecordIntoView(_1,_2){return this.scrollToCell(_1,null,null,_2)},isc.A.scrollToColumn=function isc_ListGrid_scrollToColumn(_1,_2){return this.scrollToCell(null,_1,_2)},isc.A.scrollToRow=function isc_ListGrid_scrollToRow(_1,_2,_3){this.scrollToCell(_1,null,null,_2,_3);return this},isc.A.scrollCellCallback=function isc_ListGrid_scrollCellCallback(_1,_2,_3,_4,_5,_6){if(_6==this.$77o){this.$77o=null;this.scrollToCell(_1,_2,_3,_4,_5)}},isc.A.scrollToCell=function isc_ListGrid_scrollToCell(_1,_2,_3,_4,_5){return this.scrollCellIntoView(_1,_2,_3,_4,_5)},isc.A.scrollCellIntoView=function isc_ListGrid_scrollCellIntoView(_1,_2,_3,_4,_5){if(isc.isA.Boolean(_3)&&(typeof _5=='undefined')){isc.logWarn("Center argument had been passed to a scroll method(scrollToCell, scrollCellIntoView, scrollToColumn or scrollRecordIntoView). This is deprecated. See documentation for detailed information about passed arguments.");_5=_4;_4=_3?"center":"top";_3=_3?"center":"left"}
if((isc.isAn.Array(this.data)&&this.data.length==0&&this.dataSource)||(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown())){if(!this.$77o)this.$77o=1;else this.$77o+=1;var _6=this.$77o;isc.Page.waitFor(this,"dataArrived",{method:this.scrollCellCallback,args:[_1,_2,_3,_4,_5,_6],target:this});return}
var _7=this.body&&this.body.isDrawn(),_8=this.autoFitFieldWidths==true||(this.getFields()||[]).getProperty("autoFitWidth").contains(true),_9=_8&&(this.body&&![false,null].contains(this.body.$773));if(!_7||_9){this.logInfo("scrollCellIntoView() called "+(!_7?"before the body has been drawn.":"while a redraw() was pending.")+"  Cell "+_1+","+_2+" will be scrolled into view on "+(!_7?"draw().":"redraw()."));this.$30d=[_1,_2,_3,_4];return}
if(this.body.$qz||this.body.$rm){this.body.adjustOverflow("ScrollCellIntoView requesting size")}
if(_3!="left"&&_3!="center"&&_3!="right"){_3=this.scrollToCellXPosition}
if(_4!="top"&&_4!="center"&&_4!="bottom"){_4=this.scrollToCellYPosition}
var x,y,_12,_13,_14=this.body,_15=this.isDirty()||_14.isDirty();if(_1!=null){if(_15&&this.virtualScrolling&&!_14.$60s){_14.$193d()}
if(!_14.$60s){y=_14.getRowTop(_1);_13=_14.getRowSize(_1)}else{var _16=_14.$252==null||_1<_14.$252||_1>_14.$253,_17=!_16;if(_17){var _18=_14.getRowTop(_1),_19=_14.getRowHeight?_14.getRowHeight(this.getCellRecord(_1),_1,0):_14.derivedRowHeight,_20=_14.getScrollTop();if(_20>_18||((_14.getViewportHeight()+_20)<(_18+_19)))
{_17=false}}
if(!_17||(isc.EH.isKeyEvent(isc.EH.lastEvent)&&!this.$965)){_14.$27y=_1;if(_4=="center"){var _19=_14.getRowHeight?_14.getRowHeight(this.getCellRecord(_1),_1,0):_14.derivedRowHeight;_14.$27z=-1*(_14.getViewportHeight()-_19)/2}else if(_4=="bottom"){var _19=_14.getRowHeight?_14.getRowHeight(this.getCellRecord(_1),_1,0):_14.derivedRowHeight;_14.$27z=_19-_14.getViewportHeight()}else{_14.$27z=0}
if(_2!=null){var _21=null;if(_3=="left"){_21=this.getColumnLeft(_2)}else if(_3=="right"){_21=this.getColumnLeft(_2)+this.getColumnWidth(_2)-_14.getViewportWidth()}else{_21=this.getColumnLeft(_2)+(this.getColumnWidth(_2)-_14.getViewportWidth())/2}
_14.scrollTo(_21)}
_14.$270()}
return}}
if(_2!=null){if(this.frozenFields!=null&&_2<this.frozenFields.length){_2=null}else{x=this.getColumnLeft(_2);_12=this.getColumnWidth(_2)}}
if(_15){var _22;if(_1!=null){var _23=_14.getScrollHeight();if(y+_13>_23)_22=true}
if(!_22&&_2!=null){var _24=_14.getScrollWidth();if(x+_12>_24)_22=true}
if(_22){if(this.alwaysShowEditors&&!this.$30a){this.$190r=[_1,_2]}
this.redraw("scrollIntoView")}}
_14.scrollIntoView(x,y,_12,_13,_3,_4,null,null,_5)},isc.A.bodyScrolled=function isc_ListGrid_bodyScrolled(_1,_2,_3){if(_1==null)_1=_3?this.frozenBody.getScrollLeft():this.body.getScrollLeft();if(_3){this.body.$80h=true;var _4=this.frozenBody;if(_4.$274){var _5=this.body;if(_4.$80f&&_5.isDirty()){_5.redraw("frozenBody redraw to sync draw area with body")}
this.body.$27y=_4.$27y;this.body.$27z=_4.$27z;this.body.$271=_4.$271;this.body.$270()}else{this.body.scrollTo(null,_2,"scrollSync")}
delete this.body.$80h}else if(this.frozenBody!=null){this.frozenBody.$80h=true;var _5=this.body,_4=this.frozenBody;if(_5.$274){if(_5.$80f&&_4.isDirty()){_4.redraw("frozenBody redraw to sync draw area with body")}
_4.$27y=_5.$27y;_4.$27z=_5.$27z;_4.$271=_5.$271;_4.$270()}else{_4.scrollTo(null,_2,"bodyScrollSync")}
delete this.frozenBody.$80h}
if(!this.$97e){this.syncHeaderScrolling(_1,_2,_3);this.syncFilterEditorScrolling(_1,_2,_3);this.syncSummaryRowScrolling(_1,_2,_3)}
if(this.$30a&&this.$519){var _6=this.getEditForm(),_7=this.getEditRow(),_8=this.getEditCol(),_9=_6.getItem(this.getEditorName(_7,_8));if(_9){if(!_9.hasFocus&&(_6.hasFocus||isc.EH.getFocusCanvas()==null))
{this.$518(_8)}else{delete this.$519}}}
if(this.rowRangeDisplayStyle!="countOnly"){this.rowRangeDisplayValueChanged("source grid scrolled")}},isc.A.syncHeaderScrolling=function isc_ListGrid_syncHeaderScrolling(_1,_2,_3){var _4=_3?this.frozenBody:this.body,_5=_3?this.frozenHeader:this.header;if(_4.$1899){delete _4.$1899;return}
if(_1!=null&&_5){if(!this.isRTL()){if(_1!=_5.getScrollLeft()){_5.scrollTo(_1,null,"headerScrollSync")}}else{var _4=_4,_6=_5.getScrollWidth()-_5.getViewportWidth(),_7=_6-_5.getScrollLeft(),_8=_4.getScrollWidth()-_4.getViewportWidth(),_9=_8-_1;if(_9!=_7){_5.scrollTo(_6-_9,null,"scrollSync")}}}},isc.A.headerScrolled=function isc_ListGrid_headerScrolled(){if(!this.$32c){this.$32c=this.delayCall("syncBodyScrolling")}});isc.evalBoundary;isc.B.push(isc.A.syncBodyScrolling=function isc_ListGrid_syncBodyScrolling(){delete this.$32c;var _1=this.header.getScrollLeft();if(this.body){if(!this.isRTL()){if(_1!=this.body.getScrollLeft())this.body.scrollTo(_1,null,"scrollSync")}else{var _2=this.header,_3=this.body,_4=_2.getScrollWidth()-_2.getViewportWidth(),_5=_4-_2.getScrollLeft(),_6=_3.getScrollWidth()-_3.getViewportWidth(),_7=_6-_1;if(_7!=_5){_3.scrollTo(Math.max(0,_6-_5),null,"scrollSync")}}}},isc.A.syncFilterEditorScrolling=function isc_ListGrid_syncFilterEditorScrolling(_1,_2,_3){if(_1==null)return;var _4=_3?this.frozenBody:this.body,_5=this.filterEditor?(_3?this.filterEditor.frozenBody:this.filterEditor.body):null;if(_5){if(this.isRTL()){var _6=_4.getViewportWidth()-_5.getViewportWidth()
_1+=_6}
if(_5.getScrollLeft()!=_1)
{_5.scrollTo(_1,null,"scrollSync")}}},isc.A.syncSummaryRowScrolling=function isc_ListGrid_syncSummaryRowScrolling(_1,_2,_3){if(_1==null)return;var _4=this.showGridSummary?this.summaryRow:null;var _5=_4&&(_3?_4.frozenBody:_4.body);if(_5!=null&&_5.getScrollLeft()!=_1)
{_5.scrollTo(_1,null,"scrollSync")}},isc.A.$88=function isc_ListGrid__hiliteRecord(_1,_2){if(_2==null){_2=0}
if(!isc.isA.Number(_1)){_1=this.getRecordIndex(_1)}
if(!isc.isA.Number(_1)||_1<0)_1=0;if(_1>=this.getTotalRows()){_1=this.getTotalRows()-1}
this.clearLastHilite();if(!this.canSelectCells){this.bodies.setProperty("$31p",_1);this.bodies.setProperty("lastOverRow",_1);this.bodies.setProperty("lastOverCol",0);this.bodies.callMethod("setRowStyle",_1)}else{var _3=this.getFieldBody(_2);_3.$31p=_1;_3.$237t=_3.lastOverCol=this.getLocalFieldNum(_2,_3);_3.lastOverRow=_1;_3.setRowStyle(_1)}
this.updateRollOverCanvas(_1)},isc.A.clearLastHilite=function isc_ListGrid_clearLastHilite(_1){var _2=_1?this.frozenBody:this.body;if(!_2)return;var _3=_2.lastOverRow,_4;if(_3<0)return;var _5=false;if(!this.canSelectCells){_5=(_2.$31p!=null);_2.$31p=null;_2.$237t=null;if(_3==null)return}else{_5=(this.$24v!=null&&this.$24w!=null);_2.$31p=null;_2.$237t=null;if(!_1)this.clearLastHilite(true);this.$24v=null;this.$24w=null;this.$97a=null;_4=_2.lastOverCol;if(_3==null||_4==null)return;delete _2.lastOverCol}
delete _2.lastOverRow;if(this.showRollOver||_5){_2.updateRollOver(_3,_4)}},isc.A.setAccessKey=function isc_ListGrid_setAccessKey(_1){this.Super("setAccessKey",arguments)
if(this.body!=null)this.body.setAccessKey(_1)},isc.A.setFocus=function isc_ListGrid_setFocus(_1){if(this.body!=null){this.body.setFocus(_1)}},isc.A.$kk=function isc_ListGrid__canFocus(){if(this.body)return this.body.$kk();return false},isc.A.syntheticShiftFocus=function isc_ListGrid_syntheticShiftFocus(){return false},isc.A.onRecordClick=function isc_ListGrid_onRecordClick(_1,_2,_3,_4,_5,_6,_7){return true},isc.A.setShowGridSummary=function isc_ListGrid_setShowGridSummary(_1){if(this.showGridSummary==_1)return;this.showGridSummary=_1;if(this.showGridSummary){this.showSummaryRow()}else{this.clearSummaryRow()}},isc.A.$134o=function isc_ListGrid__getFieldDependencyTable(){if(this.$134q==null){this.Super("$134o");var _1=this.fields,_2=this.$134q,_3=_1.filter(function(_5){return _5&&this.$275t(_5)=="recordSummary"},this);for(var i=0;i<_1.length;i++){var _5=_1[i],_6=_5.includeInRecordSummary;if(_6==true||_6!=false&&(_5.type=="integer"||_5.type=="float"))
{if(_2[_5.name]==null){_2[_5.name]={}}
var _7=_5.includeInRecordSummaryFields||_3;for(var j=0;j<_7.length;j++){var _9=_7[j];if(isc.isA.String(_9)){_9=this.getField(_9)}
_2[_5.name][_9.name]=_9}}}}
return this.$134q},isc.A.recalculateSummaries=function isc_ListGrid_recalculateSummaries(_1,_2,_3){_3=_3!=null?_3:true;this.calculateRecordSummaries(_1,_2,true,_3)},isc.A.$855=function isc_ListGrid__recalculateSummaries(_1,_2,_3){if(this.isGrouped&&this.showGroupSummary){this.refreshGroupSummary(_1,_2)}
if(this.summaryRow!=null&&this.showGridSummary){if(_3&&!this.isDirty())this.markForRedraw();this.summaryRow.$855(_2)}
if(this.summaryRow&&this.hideEmptySummaryRow){if(this.summaryRow.data&&this.summaryRow.data.length>0){if(!this.summaryRow.isVisible()){this.summaryRow.show()}}else{if(this.summaryRow.isVisible()){this.summaryRow.hide()}}}},isc.A.$280c=function isc_ListGrid__clearGridSummaryData(){if(this.summaryRow&&this.getSummaryRowDataSource()!=null){this.summaryRow.setData([])}},isc.A.recalculateGridSummary=function isc_ListGrid_recalculateGridSummary(){if(this.showGridSummary&&this.summaryRow!=null){this.summaryRow.$855()}},isc.A.shouldShowGridSummary=function isc_ListGrid_shouldShowGridSummary(_1){if(_1.showGridSummary!=null)return _1.showGridSummary;return(_1.getGridSummary!=null||this.getGridSummaryFunction(_1)!=null)},isc.A.getGridSummaryFunction=function isc_ListGrid_getGridSummaryFunction(_1){if(!_1)return;var _2=_1.summaryFunction;if(!_2&&!_1.primaryKey&&!_1.foreignKey){_2=isc.SimpleType.getDefaultSummaryFunction(_1.type)}
return _2},isc.A.getGridSummary=function isc_ListGrid_getGridSummary(_1){if(!_1||!this.data||(isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()))
return;var _2=this.getOriginalData(),_3=isc.ResultSet&&isc.isA.ResultSet(_2),_4=isc.isA.Tree(_2);if(_4){_2=_2.getDescendants(_2.getRoot());_3=isc.ResultSet&&isc.isA.ResultSet(_2)}
if(_3&&!_2.allMatchingRowsCached()){this.logWarn("Unable to show summary values - dataset not completely loaded");return}
var _5=_3?_2.getRange(0,_2.getLength()):_2;var _6=this.getAllEditRows();if(_6!=null&&_6.length>0){_5=_5.duplicate();for(var i=0;i<_5.length;i++){var _8=_5[i];var _9=this.getEditSessionRowNum(_8);if(_9!=null)_5[i]=this.getEditedRecord(_9,null,true)}
var _10=this.data.getLength();for(var i=0;i<_6.length;i++){var _9=_6[i];if(_9>=_10){_5.add(this.getEditedRecord(_9,null,true))}}}
if(_1.getGridSummary){var _11;if(this.isGrouped&&this.showGroupSummary&&(this.groupTree!=null)){_11=this.assembleGroupSummaries()}
return _1.getGridSummary(_5,_1,_11)}
return this.getSummaryValue(_5,_1)},isc.A.getSummaryRowDataSource=function isc_ListGrid_getSummaryRowDataSource(){return this.summaryRowDataSource},isc.A.getSummaryRowCriteria=function isc_ListGrid_getSummaryRowCriteria(){if(this.summaryRowCriteria!=null)return this.summaryRowCriteria;var _1=this.getOriginalData();if(isc.ResultSet&&isc.isA.ResultSet(_1)){return this.data.getCriteria()}
return this.getInitialCriteria()},isc.A.setSummaryRowCriteria=function isc_ListGrid_setSummaryRowCriteria(_1){this.summaryRowCriteria=_1;if(this.dataSource)this.invalidateCache()},isc.A.getSummaryRowFetchRequestConfig=function isc_ListGrid_getSummaryRowFetchRequestConfig(_1){return isc.addProperties({textMatchStyle:this.summaryRowCriteria!=null?"exact":this.autoFetchTextMatchStyle,showPrompt:false,startRow:0,endRow:this.maxSummaryRowRecords},this.summaryRowFetchRequestDefaults,this.summaryRowFetchRequestProperties,_1)},isc.A.summaryRowFetchComplete=function isc_ListGrid_summaryRowFetchComplete(_1,_2,_3){if(this.$1097){this.$257e=true;return}
this.updateFieldWidthsForAutoFitValue("gridSummary fetch complete");this.$45m()},isc.A.getGridSummaryData=function isc_ListGrid_getGridSummaryData(_1,_2){if(this.$84c&&!_1)return this.$84c;var _3;if(this.$84c&&_2!=null){_3=this.$84c}else{_2=this.skipHiddenGridSummaryFields?this.fields:this.getAllFields();_3=[];if(_2==null)return _3}
for(var i=0;i<_2.length;i++){var _5=_2[i],_6=this.$275h(_5),_7=isc.FieldGeneratorUtil.$280g(_6,_5,this);if(!this.shouldShowGridSummary(_5)){continue}
var _8=this.getGridSummary(_5),_9=this.getGridSummaryFunction(_5);if(!isc.isAn.Array(_9))_9=[_9];if(!isc.isAn.Array(_8)){_8=[_8]}
for(var _10=0;_10<_8.length;_10++){if(_3[_10]==null){_3[_10]={};_3[_10][this.gridSummaryRecordProperty]=true;_3[_10][this.recordCanSelectProperty]=false;if(_9[_10]=="count"){var _11=_3[_10][this.recordApplyPluralTitleProperty]||[];_11.add(_5.name);_3[_10][this.recordApplyPluralTitleProperty]=_11}}
_3[_10][_7]=_8[_10]}}
this.$84c=_3;return _3},isc.A.getGroupSummaryData=function isc_ListGrid_getGroupSummaryData(_1,_2,_3,_4){return this.$1412(this.includeInSummaryProperty,this.applyFormulaAfterSummary,this.groupSummaryRecordProperty,null,_1,_2,_4,_3)},isc.A.$1412=function isc_ListGrid__getGroupSummaryData(_1,_2,_3,_4,_5,_6,_7,_8){if(this.getGroupSummaryData!=isc.ListGrid.getInstanceProperty("getGroupSummaryData")){return this.getGroupSummaryData(_5,_6,_8,_7)}
var _9;if(_6&&_6.$134t&&(_7!=null||_8==false)){if(_8==false)return _6.$134t;_9=_6.$134t}else{_7=this.skipHiddenGroupSummaryFields?this.fields:this.getAllFields();_9=[];if(_7==null)return _9}
for(var i=0;i<_7.getLength();i++){var _11=_7[i],_12=this.$275h(_11),_13=isc.FieldGeneratorUtil.$280g(_12,_11,this),_14;if(this.shouldShowGroupSummary(_11)){var _15=(_4==null?(_11&&_11.userFormula!=null):_4[i]);_14=this.$1413(_1,_2,_15,_5,_11,_6);if(!isc.isAn.Array(_14))_14=[_14];var _16=this.getGridSummaryFunction(_11);if(!isc.isAn.Array(_16))_16=[_16];for(var _17=0;_17<_14.length;_17++){var _18=_9[_17];if(_18==null){_18=_9[_17]={};_18.customStyle=this.groupSummaryStyle;_18[this.recordEnabledProperty]=false;_18[_1]=false;_18[_3]=true;if(_16[_17]=="count"){var _19=_18[this.recordApplyPluralTitleProperty]||[];_19.add(_11.name);_18[this.recordApplyPluralTitleProperty]=_19}}
var _20=_14[_17];_18[_13]=_20}}}
if(_6)_6.$134t=_9;return _9},isc.A.assembleGroupSummaries=function isc_ListGrid_assembleGroupSummaries(_1,_2){var _3=this.groupTree;if(!_1)_1=_3.getRoot();if(!_2)_2=[];var _4=_3.getFolders(_1);for(var i=0;i<_4.length;i++){var _6=_4[i];if(this.groupByFieldSummaries==null||this.groupByFieldSummaries.contains(_6.groupName))
{var _7=_3.combineWithEditVals(_3.getRecordsInGroup(_6));var _8=this.getGroupSummaryData(_7,_6);for(var _9=0;_9<_8.length;_9++){var _10=isc.addProperties({},_8[_9]);delete _10.customStyle;delete _10[this.recordEnabledProperty];delete _10[this.includeInSummaryProperty];_10.groupName=_6.groupName;_10.groupValue=_6.groupValue;_2.add(_10)}}
this.assembleGroupSummaries(_4[i],_2)}
return _2},isc.A.getSummaryValue=function isc_ListGrid_getSummaryValue(_1,_2){return this.$1414(this.includeInSummaryProperty,this.applyFormulaAfterSummary,(_2&&_2.userFormula!=null),_1,_2)},isc.A.$1414=function isc_ListGrid__getSummaryValue(_1,_2,_3,_4,_5){if(_4==null)return null;var _6=[];for(var i=0;i<_4.length;i++){var _8=_4[i];if(!_8||(_8[_1]==false))continue;_6[_6.length]=_8}
var _9=this.getGridSummaryFunction(_5);if(_9==null)return null;if(this.$142d(_2,_3,_5))
{return[]}
if(!isc.isAn.Array(_9)){_9=[_9]}
var _10=[];for(var i=0;i<_9.length;i++){var _11=_9[i];if(_11!=null){_10[i]=isc.SimpleType.applySummaryFunction(_6,_5,_11,this,this)}}
return _10},isc.A.shouldShowGroupSummary=function isc_ListGrid_shouldShowGroupSummary(_1){if(_1.showGroupSummary!=null)return _1.showGroupSummary;return(_1.getGroupSummary!=null||this.getGridSummaryFunction(_1)!=null)},isc.A.getGroupSummary=function isc_ListGrid_getGroupSummary(_1,_2,_3){return this.$1413(this.includeInSummaryProperty,this.applyFormulaAfterSummary,(_2&&_2.userFormula!=null),_1,_2,_3)},isc.A.$1413=function isc_ListGrid__getGroupSummary(_1,_2,_3,_4,_5,_6){var _7;if(_5.getGroupSummary!=null){_7=_5.getGroupSummary(_4,_5,_6)}else{_7=this.$1414(_1,_2,_3,_4,_5)}
return _7},isc.A.getRecordSummary=function isc_ListGrid_getRecordSummary(_1,_2){if(!isc.isAn.Object(_2))_2=this.getField(_2);return this.$141z(null,null,_1,_2)},isc.A.$141z=function isc_ListGrid__getRecordSummary(_1,_2,_3,_4){var _5=isc.isAn.Object(_3)?_3:this.getEditedRecord(_3);if(_4.getRecordSummary!=null){return _4.getRecordSummary(_5,_4,this)}
var _6=_4.recordSummaryFunction,_7=this.fields,_8=isc.DS.getRecordSummaryFunctionDependencies(_6,_7,_4,this),_9=_8&&_8.map(this.getFieldByName,this);return isc.DS.applyRecordSummaryFunction(_6,_5,_9,_4,this,this.$280p())},isc.A.shouldApplyUserFormulaBeforeSummary=function isc_ListGrid_shouldApplyUserFormulaBeforeSummary(_1){return _1&&this.$275t(_1)=="userFormula"&&!this.$117u(_1)},isc.A.shouldApplyUserFormulaAfterSummary=function isc_ListGrid_shouldApplyUserFormulaAfterSummary(_1){return this.$142d(this.applyFormulaAfterSummary,_1&&this.$275t(_1)=="userFormula",_1)},isc.A.$142d=function isc_ListGrid__shouldApplyUserFormulaAfterSummary(_1,_2,_3){return(_2&&this.$1411(_1,_3))},isc.A.calculateRecordSummaries=function isc_ListGrid_calculateRecordSummaries(_1,_2,_3,_4,_5,_6,_7,_8){var _9;if(_2!=null){if(!isc.isAn.Array(_2))_2=[_2];var _10=[];for(var i=0;i<_2.length;i++){var _12=_2[i];if(isc.isA.String(_12)){_12=this.getField(_12)}
if(_12)_10.add(_12)}
_2=_10;isc.FieldGeneratorUtil.$2756(this,_2);_9=_2}else{_9=this.skipHiddenUserSummaryFields?this.fields:this.getAllFields();if(!_9)return}
if(isc.isA.Number(_1)){var _13=_1;if(this.data.getLength()>_13){_1=this.data.get(_13)}else{_1=this.$300(_13);_3=false}}
if(_5!=true&&!_6)this.invalidateUserCache(_1,_2,_8);if(_1!=null&&!isc.isAn.Array(_1))_1=[_1];var _14=_1==null?this.data:_1;if(_14==null||(isc.isA.ResultSet(_14)&&!_14.lengthIsKnown()))
{return}
var _15,_16=false,_17=this.ns.EH;if(_5!=true){var _18=[],_19=[];for(var i=0;i<_9.length;i++){var _12=_9[i];if(!_12)continue;if(this.$275t(_12)=="recordSummary"){_18.add(_12)}else if(this.shouldApplyUserFormulaBeforeSummary(_12)){_19.push(_12)}}
var _20=isc.FieldGeneratorUtil.$2766(this,_9,_14,this.$277l(),_7,_4);_15=_20.promise;_16=!!_20.dataChanged||!!_15}
if(_3==false||(_3==null&&!_16)||((!this.isGrouped||!this.showGroupSummary)&&(this.summaryRow==null||!this.showGridSummary)))
{return _15}
var _3=function(){this.$855(_1,_2,!_4)};if(_15){_15=_15.then(_17.$2762("PromiseFulfilled",_3,this),_17.$2762("PromiseRejected",function(_21){if(_21.type=="canceled"||_21.type=="deferred")
{return}
this.logError("Field generation failed: "+isc.getAsyncMessage(_21))},this))}else{_3.call(this)}
return _15},isc.A.$2750=function isc_ListGrid__shouldSkipGeneratingRecord(_1){return!!(this.$276p||_1.$52e||this.isSummaryRecord(_1))},isc.A.$275t=function isc_ListGrid__getFieldGeneratorId(_1){if(isc.isA.nonemptyString(_1.fieldGeneratorId))return _1.fieldGeneratorId;if(_1.type=="summary"&&(_1.getRecordSummary||isc.DS))return"recordSummary";if(_1.userFormula)return"userFormula";if(_1.userSummary)return"userSummary"},isc.A.$275e=function isc_ListGrid__asyncFieldGenerationPartialResult(_1,_2){var _3=this.getFieldNum(_1),_4=this.getFieldBody(_3);if(_4){var _5=_4&&this.getLocalFieldNum(_3),_6=true,_7=_2.records;for(var r=0;r<_7.length;++r){var _9=_7[r],_10=this.getEditSessionRowNum(_9);if(_10==null||_10<0)_10=this.getRecordIndex(_9);if(_10>=0){_6=_6&&_4.$2698(_9,_10);_4.refreshCell(_10,_5,null,null,true)}}
_4.$2699(null,_5,_6)}},isc.A.$277h=function isc_ListGrid__getHoverGeneratorId(_1){if(isc.isA.nonemptyString(_1.hoverGeneratorId))return _1.hoverGeneratorId},isc.A.$2767=function isc_ListGrid__pseudoFieldValueGenerated(_1,_2,_3){this.$102q(_1.type=="hover");var _4=_1.masterFieldName,_5=!isc.isA.nonemptyString(_4)?null:this.getField(_4);if(!_5)return;var _6=this.getFieldNum(_5),_7=this.getFieldBody(_6),_8=this.getLocalFieldNum(_6),_9=this.getRecordIndex(_2);if(_9>=0){_7.$2699(_9,_8,true)}},isc.A.getSummaryRow=function isc_ListGrid_getSummaryRow(_1){if(!this.summaryRow){var _2=this.getSummaryRowDataSource();var _3;if(this.completeFields)_3=this.completeFields.duplicate();else if(this.fields)_3=this.fields.duplicate();var _4=this.summaryRowHeight;this.summaryRow=this.createAutoChild("summaryRow",{showEmptyMessage:false,warnOnReusedFields:false,autoDraw:false,width:"100%",height:_4,minHeight:null,dataProperties:{useClientFiltering:false},selectionType:this.canSelectSummaryRows?null:isc.Selection.NONE,dataFetchMode:this.dataFetchMode=="local"?"local":"basic",autoFitData:"vertical",bodyOverflow:"hidden",showHeader:false,recordRadius:this.recordRadius,recordRadiusTargets:this.recordRadiusTargets.duplicate(),getBaseStyle:function(){return this.creator.summaryRowStyle},alternateRecordStyles:false,disabled:this.disabled,applyFormulaAfterSummary:this.applyFormulaAfterSummary,$276p:true,$67b:function(){},$31s:function(_12){return false},dataSource:_2,data:_2==null?this.getGridSummaryData():null,$855:function(_12,_13){var _5=this.creator,_6=_5.data;if(!_5.fields||(isc.isA.ResultSet(_6)&&!_6.lengthIsKnown()))return;if(this.dataSource!=null){var _7=this;this.fetchData(_5.getSummaryRowCriteria(),function(){_5.summaryRowFetchComplete();_7.$238u()},_5.getSummaryRowFetchRequestConfig())}else{this.setData(_5.getGridSummaryData(true,_13));this.$238u()}},$238u:function(){var _5=this.creator,_8=this.data;if(!_5.hasStableLocalID()&&_5.editNode==null)return;var _9=_5.getLocalId()+".summaryRecord",_10=_8&&(isc.isA.ResultSet(_8)?_8.get(0):_8.length>0&&_8[0]);_5.provideRuleContext(_9,_10,_5)},fieldSourceGrid:this,fields:_3,recordApplyPluralTitleProperty:this.recordApplyPluralTitleProperty,gridSummaryRecordProperty:this.gridSummaryRecordProperty,invalidSummaryValue:this.invalidSummaryValue,emptyCellValue:this.emptyCellValue,skipAutoFitWidths:true,getFieldWidths:function(){return this.creator.getFieldWidths()},fieldShouldBeVisible:function(_12,_13){return this.fieldSourceGrid.fieldShouldBeVisible(_12,_13)},canEditCell:function(){return false},screenReaderNavigateByCell:((this.summaryRowProperties&&this.summaryRowProperties.screenReaderNavigateByCell!=null)?this.summaryRowProperties.screenReaderNavigateByCell:this.screenReaderNavigateByCell),$94m:true})}else{var _7=this.summaryRow,_11=this.getSummaryRowDataSource();if(!_11)_7.skipNullDataSourceCheck=true;if(!isc.DS.$217u(_7.getDataSource(),_11)){_7.setDataSource(_11,this.completeFields.duplicate())}
if(!_1)this.summaryRow.$855()}
return this.summaryRow},isc.A.showSummaryRow=function isc_ListGrid_showSummaryRow(){var _1=this.gridComponents.indexOf("summaryRow");if(_1==-1){this.logWarn("showGridSummary set to true, but gridComponents array does not include an entry for the summary row - not showing.");return}
this.updateGridComponents()
this.syncSummaryRowScrolling(this.body.getScrollLeft(),this.body.getScrollTop)},isc.A.clearSummaryRow=function isc_ListGrid_clearSummaryRow(){if(this.summaryRow&&this.summaryRow.parentElement==this){this.removeMember(this.summaryRow)}},isc.A.isSummaryRecord=function isc_ListGrid_isSummaryRecord(_1){return _1[this.gridSummaryRecordProperty]||_1[this.groupSummaryRecordProperty]},isc.A.$159d=function isc_ListGrid__setUserField(_1,_2,_3,_4,_5){var _6=this;this.Super("$159d",[_1,_2,_3,function(_1){var _7=[_1];isc.FieldGeneratorUtil.$2756(_6,_7);if(_4!=false)_6.recalculateSummaries(null,_7);if(_5)_6.markForRedraw()}])},isc.A.$159e=function isc_ListGrid__setUserFieldText(_1,_2,_3,_4,_5){var _6=this;this.Super("$159e",[_1,_2,_3,function(_1){var _7=[_1];isc.FieldGeneratorUtil.$2756(_6,_7);if(_4!=false)_6.recalculateSummaries(null,_7);if(_5)_6.markForRedraw()}])},isc.A.setUserFormula=function isc_ListGrid_setUserFormula(_1,_2,_3,_4){this.$159d(_1,"userFormula",_2,_3,_4)},isc.A.setUserSummary=function isc_ListGrid_setUserSummary(_1,_2,_3,_4){this.$159d(_1,"userSummary",_2,_3,_4)},isc.A.setUserFormulaText=function isc_ListGrid_setUserFormulaText(_1,_2,_3,_4){this.$159e(_1,"userFormula",_2,_3,_4)},isc.A.setUserSummaryText=function isc_ListGrid_setUserSummaryText(_1,_2,_3,_4){this.$159e(_1,"userSummary",_2,_3,_4)},isc.A.setShowFilterEditor=function isc_ListGrid_setShowFilterEditor(_1){if(this.showFilterEditor==_1)return;this.showFilterEditor=_1;if(_1){var _2=this.gridComponents.indexOf("filterEditor");if(_2==-1){_1=false;this.logWarn("setShowFilterEditor(true) called, but gridComponents array does not include the filterEditor. FilterEditor will not be shown.")}}
var _3;if(_1){if(this.isDrawn()){this.updateGridComponents()}}else if(this.filterEditor){_3=this.getFilterEditorCriteria();this.filterEditor.destroy();this.filterEditor=null;this.clearInternalFieldOperators()}
this.layoutChildren();if(this.clearCriteriaOnFilterEditorHide&&_3&&_3!=isc.emptyObject){this.fetchData()}
this.handleViewStateChanged()},isc.A.clearInternalFieldOperators=function isc_ListGrid_clearInternalFieldOperators(_1){if(!this.fields)return;var _2=this;this.fields.map(function(_5){var _3=!!_1;if(!_3){var _4=isc.DS.$57z[_5.operator];if(_4&&_4.valueType=="none")_3=true}
if(_3){_2.clearFieldSearchOperator(_5.name,true);delete _5.operator}})},isc.A.makeFilterEditor=function isc_ListGrid_makeFilterEditor(){var _1=this.getDataSource();if(this.allowFilterOperators==null&&_1&&_1.supportsAdvancedCriteria()){this.allowFilterOperators=true}
var _2=isc.addProperties({autoDraw:false,warnOnReusedFields:false,reverseRTLAlign:this.reverseRTLAlign,isFilterEditor:true,dataPath:this.dataPath,setDataPath:function(_5){this.dataPath=_5},dataSource:this.dataSource,saveLocally:true,$67b:function(){},height:this.filterEditorHeight,sourceWidget:this,ID:this.getID()+isc.$ag+"filterEditor",_generated:true,bodyConstructor:"FilterEditorBody",showContextMenu:function(){if(this.sourceWidget.showHeaderContextMenu){return this.sourceWidget.displayHeaderContextMenu()}else{this.Super("showContextMenu",arguments)}},fieldShouldBeVisible:function(_5,_6){return this.sourceWidget.fieldShouldBeVisible(_5,_6)},fieldSourceGrid:this,actionType:"filter",actionButtonGetHoverHTML:isc.$aq("return "+this.getID()+".getFieldCriteriaHover(null,true)"),actionButtonProperties:isc.addProperties({hoverWrap:true,hoverAutoFitWidth:true,hoverAutoFitMaxWidth:300},this.filterButtonProperties),fetchDelay:this.fetchDelay,explicitfetchDelay:this.explicitFetchDelay,allowFilterExpressions:this.allowFilterExpressions,expressionDataSource:this.getDataSource(),allowFilterOperators:this.allowFilterOperators,useMultiSelectForValueMaps:this.useMultiSelectForFilterValueMaps,discardEditsOnHideField:false,useAdvancedCriteria:this.useAdvancedCriteria,editFormProperties:{itemHoverHTML:(function(_5){return function(_6){var _3=_5.getFieldCriteriaHover(_6);if(_3!=null)return _3;if(_5.showFilterEditorHovers==false)return null;var _4=_5.getField(_6.name);if(_4&&_4.showFilterEditorHovers==false){return null}
return this.Super("itemHoverHTML",arguments)}})(this),itemHoverWrap:true,itemHoverAutoFitWidth:true,itemHoverAutoFitMaxWidth:300}},this.filterEditorDefaults,this.filterEditorProperties);if(_2.bodyDefaults==null)_2.bodyDefaults={};_2.bodyDefaults.focusChanged=function(_5){if(_5&&isc.EH.isKeyEvent()){if(this.parentElement.isA("RecordEditor")){this.parentElement.startEditing()}else{if(this.parentElement.parentElement.isA("RecordEditor")){this.parentElement.parentElement.startEditing()}}}}
this.filterEditor=isc.RecordEditor.create(_2);this.filterEditor.setLocatorParent(this,"filterEditor")},isc.A.getGridInnerContentWidth=function isc_ListGrid_getGridInnerContentWidth(){var _1=this.autoFitData!=null&&this.autoFitData!="vertical";if(_1&&this.body){var _2=this.bodyLayout||this.body;return _2.getWidth()}
return this.getInnerContentWidth()},isc.A.getFilterEditorValueMap=function isc_ListGrid_getFilterEditorValueMap(_1){return _1.filterEditorValueMap||_1.valueMap||(_1.filterEditorProperties&&_1.filterEditorProperties.valueMap)},isc.A.getFilterEditorType=function isc_ListGrid_getFilterEditorType(_1){if(_1.filterEditorType!=null)return _1.filterEditorType;var _2=this.getDataSource();if((isc.SimpleType.inheritsFrom(_1.type,"date")||isc.SimpleType.inheritsFrom(_1.type,"datetime"))&&_2&&_2.supportsAdvancedCriteria())
{return"MiniDateRangeItem"}
var _3=_1.type;var _4=(_3==this.$12e||_3==this.$52x||_3==this.$677);if(_4&&_1.editorType==null){if(_1.filenameSuppressed||_2&&_2.getFilenameField(_1.name)==null){return"StaticTextItem"}else{return"TextItem"}}
var _5=isc.addProperties({},_1,{canEdit:_1.canFilter!==false,length:null});if(_5._constructor!=null)delete _5._constructor;if(_1.filterEditorType!=null)_5.editorType=_1.filterEditorType;else if(_1.editorType!=null&&!this.supportsFilterEditorType(_1.editorType)){delete _5.editorType}
isc.addProperties(_5,_1.filterEditorProperties);var _6=this.filterEditor&&this.filterEditor.getEditForm();var _3=isc.DynamicForm.getEditorType(_5,this,null,_6);return _3},isc.A.supportsFilterEditorType=function isc_ListGrid_supportsFilterEditorType(_1){if(_1=="TextAreaItem"||_1=="textArea")return false;return true},isc.A.getFieldUIOperatorList=function isc_ListGrid_getFieldUIOperatorList(_1,_2,_3){var _4={};_1=this.getUnderlyingField(_1);if(!_1)return _4;_2=isc.DataSource.get(_2)||this.getDataSource();if(_1.displayField){var _5=_1.optionDataSource;if(_5)_5=isc.DataSource.get(_5);var _6=this.getDisplayField(_1);if(_6){if(_5)_2=_5;_1=_6}else{var _7=_5&&_1.valueField&&_5.getField(_1.valueField);this.logWarn("can't find displayField '"+_1.displayField+"' when looking up operators; falling back to "+(_7?"valueField '"+_7.name+"'":"field '"+_1.name+"'"));if(_7){if(_5)_2=_5;_1=_7}}}
if(_2){var _8=this.getFilterEditor(),_9=_8&&_8.getEditForm(),_10=_9&&_9.getItem(_1.name),_11=null;_11=_10&&_10.getValidOperators(true);var _12=_11!=null||_3;if(!_11)_11=_2.getFieldOperators(_1);_4=_2.getFieldOperatorMap(_1,_12,"fieldType",null,_11);if(this.allowFilterExpressions&&_1.allowFilterExpressions!=false){isc.addProperties(_4,_2.getFieldOperatorMap(_1,_12,"valueRange",null,_11));isc.addProperties(_4,_2.getFieldOperatorMap(_1,_12,"valueSet",null,_11))}
isc.addProperties(_4,_2.getFieldOperatorMap(_1,_12,"none",null,_11));isc.addProperties(_4,_2.getFieldOperatorMap(_1,_3||_12,"custom",null,_11))}
return _4},isc.A.getFieldFilterEditorProperties=function isc_ListGrid_getFieldFilterEditorProperties(_1){var _2=isc.addProperties({},_1.filterEditorProperties);if(_1.filterOperator)_2.operator=_1.filterOperator;if(_1.defaultOperator)_2.defaultOperator=_1.defaultOperator;if(_1.allowFilterExpressions!=null){_2.allowExpressions=_1.allowFilterExpressions;_2.enforceLength=!_2.allowExpressions}else if(this.allowFilterExpressions){_2.enforceLength=false}
_2.autoComplete="none";var _3;if(isc.DynamicForm.suppressSearchFormFieldMultiple&&_2.multiple===_3){delete _2.multiple}
if(this.shouldAllowFilterOperators(_1)){if(_2.setCriterion&&!_2.custom_setCriterion){_2.custom_setCriterion=_2.setCriterion;_2.setCriterion=null}
if(_2.canEditCriterion&&!_2.custom_canEditCriterion){_2.custom_canEditCriterion=_2.canEditCriterion;_2.canEditCriterion=null}
isc.addProperties(_2,{lgField:_1,showInlineStyle:true,init:function(){this.Super("init",arguments);var _4=this.grid.getDataSource();this.$1686=this.lgField.filterOperator||this.getOperator();this.$252u=_4&&_4.getFieldDefaultOperator(this.getCriteriaFieldName());if(this.$252u&&this.$252u!=this.$1686){this.defaultOperator=this.$1686}},setCriterion:function(_16){if(this.custom_setCriterion){this.custom_setCriterion(_16);return}
if(this.getOperator()!=_16.operator){this.grid.sourceWidget.setFieldSearchOperator(_1,_16.operator,true)}
if(!this.form&&this.grid)this.form=this.grid.getEditForm();if(!this.form){this.grid.logWarn("setCriterion() called on filterEditor formItem '"+_16.fieldName+"', which has no form specified.");return}
this.Super("setCriterion",arguments)},canEditCriterion:function(_16){if(_16.valuePath!=null)return false;if(this.custom_canEditCriterion){return this.custom_canEditCriterion(_16)}
if(_16.fieldName!=null&&_16.fieldName==this.getCriteriaFieldName()){var _4=this.grid.getDataSource();if(_4!=null){var _1=this.grid.getUnderlyingField(_16.fieldName);var _5=this.grid.getFieldUIOperatorList(_1,_4,true);return _5[_16.operator]}}
return this.Super("canEditCriterion",arguments)},$1681:function(_16){return"center"},$169b:function(_16){return 1},$169c:function(_16){return 1},showContextMenu:function(_16,_17,_18){if(_18&&isc.Browser.isTouch){var _6=_18.nativeTarget,_7=this.$15h();if(_7&&_7.contains&&_7.contains(_6)){return}}
var _8=this.grid.sourceWidget,_9=_8.getFilterOperatorMenuItems(this.lgField,true),_10=_8.filterOperatorMenu;if(!_10){_10=_8.filterOperatorMenu=_8.createAutoChild("filterOperatorMenu")}
_10.setItems(_9);var _11=_8.getFieldHeaderButton(_8.getFieldNum(this.lgField));_10.showContextMenu(_11);return false}});if(!_2.icons)_2.icons=[];else _2.icons=_2.icons.duplicate();var _12=_2.operator;if(!_2.icons.getProperty("name").contains("operatorIcon")){_2.icons.add(this.getOperatorIcon(_1,_2.operator))}}else{isc.addProperties(_2,{lgField:_1,showInlineStyle:true,init:function(){this.Super("init",arguments);this.$1686=this.lgField.filterOperator||this.getOperator()}})}
var _13=_1.type;var _14=(_13==this.$12e||_13==this.$52x||_13==this.$677);if(_14&&!_1.filenameSuppressed){var _4=this.getDataSource(),_15=_4&&_4.getFilenameField(_1.name);if(_15!=null){_2.criteriaField=_15}}
return _2});isc.evalBoundary;isc.B.push(isc.A.getFilterEditor=function isc_ListGrid_getFilterEditor(){return this.filterEditor},isc.A.setFilterEditorCriteria=function isc_ListGrid_setFilterEditorCriteria(_1,_2){this.$255d=true;if(this.filterEditor){var _3=false,_4=[];var _5=this.filterEditor.getEditForm();for(var i=0;i<this.completeFields.length;i++){var _7=this.completeFields[i];if(this.fieldIsVisible(_7,true)){if(!_5||_5.getItem(_7.name)!=null){continue}}
_3=true;_4.add(_7.name)}
this.filterEditor.clearFilterOperators=true;this.setFilterValues(_1,_2!==false&&_3,_4);this.filterEditor.clearFilterOperators=null}
else if(this.showFilterEditor)this.initialCriteria=_1;delete this.$255d},isc.A.getFilterEditorCriteria=function isc_ListGrid_getFilterEditorCriteria(_1){if(this.filterEditor){var _2=this.filterEditor.getEditForm();if(!_1||!_2){return this.filterEditor.getValuesAsCriteria(this.autoFetchTextMatchStyle)}else if(_2){var _3=_2.getItems(),_4=true,_5={},_6={_constructor:"AdvancedCriteria",operator:"and",criteria:[]};for(var i=0;i<_3.length;i++){if(_3[i].hasAdvancedCriteria()){var _8=_3[i].getCriterion();if(_8!=null){_4=false;_6.criteria.add(_8)}}else{var _9=_3[i].getValue();if(_9!=null){_5[_3[i].getCriteriaFieldName()]=_9}}}
var _10=_2.$187k;if(_10){for(var _11 in _10){if(!_10[_11]||!_10[_11].criteria)continue;if(!this.fieldIsVisible(_11))continue;if(_10[_11].advanced){_4=false;_6.criteria.add(_10[_11].criteria)}else{_5[_11]=_10[_11].criteria}}}
if(!_4){_5=(this.getDataSource()||isc.DS).combineCriteria(_5,_6)}
return _5}}},isc.A.getFilterEditorCriterion=function isc_ListGrid_getFilterEditorCriterion(_1){if(!_1||!this.showFilterEditor||!this.getDataSource())return;if(this.filterEditor){var _2=this.filterEditor.getEditForm();if(_2){var _3=_2.getItem(_1);if(_3){return _3.getCriterion()}}}
var _4=this.getDataSource();var _5=this.getFilterEditorCriteria();var _6=_4.getFieldCriterion(_5,_1);return _6},isc.A.setCriteria=function isc_ListGrid_setCriteria(_1){if(this.filterEditor!=null){this.filterEditor.clearFilterOperators=true;this.setFilterValues(_1,true);this.filterEditor.clearFilterOperators=null}
this.$253z=isc.EH.$jx;var _2=this.isGrouped?this.getOriginalData():this.data;if(_2){if(_2.setCriteria)_2.setCriteria(_1);else{this.initialCriteria=_1;if(this.filterLocalData)this.filterData(_1)}}else this.initialCriteria=_1;this.$280c()},isc.A.setFilterValues=function isc_ListGrid_setFilterValues(_1,_2,_3){this.$32d=isc.addProperties({},_1);this.initialCriteria=this.$32d;this.updateFilterEditor(_2,_3)},isc.A.updateFilterEditor=function isc_ListGrid_updateFilterEditor(_1,_2){var _3=this.filterEditor;if(!_3)return;var _4=this.$32e();_3.setValuesAsCriteria(_4,true,_1,_2);var _5=_3.getEditForm();if(_5!=null){this.$32d={_constructor:"AdvancedCriteria",operator:_5.operator,criteria:_5.getItemValuesAsCriteria(true,this.autoFetchTextMatchStyle)}}else{this.$32d=_3.getValuesAsCriteria(this.autoFetchTextMatchStyle)}},isc.A.$32e=function isc_ListGrid__getFilterEditorValues(){var _1=isc.addProperties({},this.$32d);if(this.updateFilterEditorValues!=null){_1=this.updateFilterEditorValues(_1,this.autoFetchTextMatchStyle)}
if(_1==null||isc.isAn.emptyObject(_1)){_1={};for(var i=0;i<this.completeFields.length;i++){_1[this.completeFields[i].name]=this.completeFields[i].defaultFilterValue}}
return _1},isc.A.clearFilterValues=function isc_ListGrid_clearFilterValues(){this.$32d=null;this.updateFilterEditor(true)},isc.A.handleFilterEditorSubmit=function isc_ListGrid_handleFilterEditorSubmit(_1,_2,_3){var _4=this.getDataSource();var _5=this.combineUserCriteria(_1);if(this.filterEditorSubmit!=null&&this.filterEditorSubmit(_5)==false)return;this.fireCriteriaChanged();this.filterData(_1,_3,_2)},isc.A.doInitialFetch=function isc_ListGrid_doInitialFetch(){return this.Super("doInitialFetch",arguments)},isc.A.getInitialCriteria=function isc_ListGrid_getInitialCriteria(){var _1={},_2,_3=this.getFields(),_4;for(var i=0;i<_3.length;i++){if(_3[i].defaultFilterValue!==_4){_2=true;var _6=this.getFieldName(_3[i]);_1[_6]=_3[i].defaultFilterValue}}
if(!_2){_1=this.initialCriteria||this.getCriteria(true)}else{isc.addProperties(_1,this.initialCriteria||this.getCriteria(true))}
return _1},isc.A.$v6=function isc_ListGrid__adjustSpecialPeers(_1){if(this.filterEditor!=null)this.filterEditor.setZIndex(_1-1);return this.Super("$v6",arguments)},isc.A.$2799=function isc_ListGrid__getFieldCanEdit(_1){if(this.canEdit==false||this.canEdit==this.$18r)return false;if(_1.canEdit==false||_1.canEdit==this.$18r)return false;if(_1.disabled==true)return false;var _2=this.getFieldDisplayType(_1);if(isc.SimpleType.inheritsFrom(_2,"binary")){return false}
if(this.$275o(_1)){return false}
if(_1.canEdit==true||_1.canEdit==this.$18q)return true;if(this.canEdit==true||this.canEdit==this.$18q)return true;return null},isc.A.canEditCell=function isc_ListGrid_canEditCell(_1,_2){if(this.canEdit==false)return false;if(_2<0||_2>=this.fields.length)return false;if(this.allowRowSpanning&&this.rowSpanEditMode=="first"){var _3=this.getCellStartRow(_1,_2);if(_3!=_1){return false}}
var _4=this.getCellRecord(_1,_2);if(_4!=null){if(!this.recordIsEnabled(_4,_1,_2))return false;if(this.$32o==_4)return false}
var _5=this.getField(_2);if(!_5)return false;if(this.$2799(_5)==false)return false;if(this.getCellBooleanProperty("canEdit",_1,_2,(_4!=null?this.recordEditProperty:null))==false){return false}
return true},isc.A.fieldIsEditable=function isc_ListGrid_fieldIsEditable(_1){if(!isc.isAn.Object(_1)){_1=this.getField(_1);if(!_1)return false}
return this.$2799(_1)!=false},isc.A.setCanRemoveRecords=function isc_ListGrid_setCanRemoveRecords(_1){if(_1==this.canRemoveRecords)return;this.canRemoveRecords=_1;this.refreshFields()},isc.A.setCanEdit=function isc_ListGrid_setCanEdit(_1){if(_1==false){if(this.getEditRow()!=null)this.cancelEditing(isc.ListGrid.PROGRAMMATIC);this.canEdit=false}else{this.canEdit=_1}},isc.A.setFieldCanEdit=function isc_ListGrid_setFieldCanEdit(_1,_2){if(isc.isA.String(_1))_1=this.getField(_1);if(_1==null||!this.completeFields.contains(_1)||_1.canEdit==_2)return;_1.canEdit=_2;if(this.$30a){var _3=this.getEditRow(),_4=_1.name,_5=this.getColNum(_1);if(this.editByCell){if(!_2&&_5==this.getEditCol()){this.cancelEditing(isc.ListGrid.PROGRAMMATIC)}}else if(_5>=0){if(!_2&&_5==this.getEditCol()){var _6=this.$286.getItem(_4),_7=_6.hasFocus;var _8=this.findNextEditCell(_3,_5,-1,true,false,false,true);if(_8==null||_8[0]!=_3)
_8=this.findNextEditCell(_3,_5,1,true,false,false,true);if(_8==null||_8[0]!=_3){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);return}
this.startEditing(_8[0],_8[1],!_7)}
this.refreshCell(this.getEditRow(),_5)}}},isc.A.handleEditCellEvent=function isc_ListGrid_handleEditCellEvent(_1,_2,_3,_4){if(_3==this.$51l)this.$51k=true;else delete this.$51k
if(_1<0||_2<0)return false;if(this.allowRowSpanning){_1=this.getCellStartRow(_1,_2)}
if(this.editByCell){if(!this.canEditCell(_1,_2))return false}else{var _5=this.findNextEditCell(_1,_2,-1,true,true,false,true);if(_5==null||_5[0]!=_1)
_5=this.findNextEditCell(_1,_2,1,true,false,false,true);if(_5==null||_5[0]!=_1)return false;_2=_5[1]}
var _6;if(_4!==_6){this.setEditValue(_1,_2,_4)}
return this.startEditing(_1,_2,null,_3)},isc.A.hasBeenEdited=function isc_ListGrid_hasBeenEdited(_1){if(_1==null)return false;_1=(isc.isAn.Object(_1)?this.getRecordIndex(_1):_1);if(_1==null)return false;var _2=this.getEditSession(_1);if(_2==null)return false;return(_2.$198a||_2.$198b)},isc.A.disableKeyboardEvents=function isc_ListGrid_disableKeyboardEvents(_1,_2,_3,_4){var _5=this.$286;if(_5&&(!_4||_4.indexOf(_5)!=-1)){if(!_3||!_5.isDisabled()){_5.disableKeyboardEvents(_1,true,_3)}}
return this.Super("disableKeyboardEvents",arguments)},isc.A.startEditing=function isc_ListGrid_startEditing(_1,_2,_3,_4,_5){if(this.$167w){this.logInfo("call to startEditing() while keyboard events disabled (may be due to a component-mask blocking this grid). Ignoring","gridEdit");return false}
if(!this.canEdit&&!(this.completeFields||this.fields).getProperty("canEdit").or()){this.canEdit=true}
if(this.completeFields==null)this.setFields(this.fields);var _6=(_1==null),_7=(_2==null);if(_6||_7){var _8=(_6?0:_1),_9=(_7?0:_2);var _10=this.findNextEditCell(_8,_9,1,_7,true);if(_10==null){this.logInfo("startEditing() passed bad cell coordinates:"+[_1,_2],"gridEdit")}else{this.logInfo("startEditing() using derived coordinates:"+_10,"gridEdit");_1=_10[0];_2=_10[1]}}
if((_1==null||_1<0||_1>this.getTotalRows())||(_2==null||_2<0||_2>this.fields.length))
{if(!_5){this.logWarn("startEditing() passed bad cell coordinates:"+[_1,_2]+", can't edit"+this.getStackTrace(),"gridEdit")}
return false}
if(!this.canEditCell(_1,_2)){this.logInfo("startEditing(): cell "+[_1,_2]+" is non editable. Returning.","gridEdit");return false}
if(this.$30a){this.$32f((_4||isc.ListGrid.PROGRAMMATIC),this.getEditRow(),this.getEditCol(),_1,_2)}else{this.$31u(_1,_2,_3)}
return true},isc.A.isEditingCell=function isc_ListGrid_isEditingCell(_1,_2){return this.$30a&&this.getEditRow()==_1&&this.canEditCell(_1,_2)&&(!this.editByCell||this.getEditCol()==_2)},isc.A.$32f=function isc_ListGrid__changeEditCell(_1,_2,_3,_4,_5){var _6=this.getEditValue(_2,_3);var _7=this.getFieldName(_3),_8=this.$286,_9=_8?_8.getItem(_7):null,_10=_9?!_9.$30w:true;if(_9){delete _9.$30w;delete _9.$30v;if(this.$32g(_9,_2,_4,_5)){this.$32h(_9,_3)}}
var _11=(_4!=_2),_12=this.$300(_2,_3);if(_10){var _13=!this.$32i(_1,_2,_3,_6);if(_11&&!_13){_13=!this.$32j(_1,_2,_12)}
if(_13){if(_1==isc.ListGrid.EDIT_FIELD_CHANGE){var _14=this.getFieldName(_5);if(_9&&_8.getItem(_14).hasFocus){_9.focusInItem()}}
return false}}
var _15;if(_6!==_15&&!_11&&_9&&!this.editByCell){var _16=this.$30y(_2,_3);var _17=this.$329(_16,this.getCellRecord(_2,_3),_2,_3);_9.setValue(_17)}
var _18=(this.autoSaveEdits&&((_11&&this.shouldSaveOnRowExit(_2,_3,_1))||this.shouldSaveOnCellExit(_2,_3,_1)));if(!_18&&this.$32k()){var _19,_20=_11&&this.shouldValidateByRow(_2,_3,_1);if(_20&&!this.usingCellRecords){_19=!this.validateRow(_2)}else{if(_20||this.shouldValidateByCell(_2,_3,_1))
{_19=!this.validateCell(_2,_3)}}
if(this.stopOnErrors&&_19)return false}
if(_18){this.$32l(_4,_5,_1)}else{this.$31u(_4,_5)}
if(_11&&this.isGrouped&&(!_18||!this.shouldSaveLocally())){this.$75i(_2)}},isc.A.$75i=function isc_ListGrid__updateGroupForEditValueChange(_1){if(!this.isGrouped||!isc.isA.Tree(this.data))return;var _2=this.data.get(_1),_3=_2,_4=false;if(_2==null)return;var _5=this.getGroupByFields();if(!isc.isAn.Array(_5))_5=[_5];var _6=this.getEditedRecord(_1,null,true);for(var i=_5.length-1;i>=0;i--){var _8=_5[i],_3=this.data.getParent(_3);if(_3==null||_3.groupName!=_8){this.logWarn("error updating group for edit value change - unexpected group tree structure. Regrouping.");_4=true;break}
var _9=_6[_8],_10=this.getUnderlyingField(_8);_9=this.$1589(_9,_6,_10,_8);if(_3.groupValue!=_9){_4=true;break}}
if(_4){this.$607(_2,_2);this.$31n();this.markForRedraw()}
return _4},isc.A.$32g=function isc_ListGrid__shouldParkFocus(_1,_2,_3,_4){if(!isc.Browser.isIE)return false;var _5=(isc.isA.PopUpTextAreaItem(_1)&&_1.$32m&&_1.$21t.hasFocus)||(_1.hasFocus&&isc.FormItem.$12r(_1));if(!this.editByCell&&_3==_2)return false;var _6=this.getEditorType(this.getField(_4),this.getCellRecord(_3,_4));return!(_6==null||isc.FormItem.$12r(_6,true))},isc.A.$31u=function isc_ListGrid__startEditing(_1,_2,_3){if(_1=="delayed"){var _4=this.$32n;if(_4==null)return;_1=_4[0];_2=_4[1];_3=_4[2]}else if(this.isDrawn()&&(!this.body.readyToRedraw()||(this.frozenBody&&!this.frozenBody.readyToRedraw())))
{if(!this.$32n){this.delayCall("$31u",['delayed'],0)}
this.$32n=[_1,_2,_3];return}
delete this.$32n;if(!_3){this.$24v=_1;this.$24w=_2;this.$97a=this.getFieldBody(_2);if(this.selectOnEdit&&this.$97a!=null){this.$967=this.$97a;this.$967.$24n=_1;var _5=this.getLocalFieldNum(_2);this.$967.$24o=_5}}
var _6=this.getEditRow()!=_1;if(!_6&&!_3&&(this.getEditCol()==_2)){this.getEditForm().focusInItem(this.getEditorName(_1,_2));return}
this.logInfo("Starting editing at row "+_1+", colNum "+_2,"gridEdit");if(this.$32o!=null)this.closeRecord();if(this.$30a){if(this.editByCell||_6){this.hideInlineEditor(false,true)}}
var _7=(this.$32p==null)||_6||this.saveByCell;if(_7){this.$32p=this.$32q()}
var _8=this.getCellRecord(_1,_2);if(_8==Array.LOADING){return true}
var _9=this.$30a&&(this.getEditRow()==_1)
this.initializeEditValues(_1,_2,_9,true);if(this.selectOnEdit&&_8!=null)this.selectRecordForEdit(_8,_1,_2);if(this.modalEditing)this.clearLastHilite();if(_8==null&&this.addNewBeforeEditing){this.$285=_1;this.$30u=_2;var _10=this.shouldWaitForSave();var _11="this.$32r("+_10+","+_3+")";this.saveEdits(isc.ListGrid.PROGRAMMATIC,_11);if(_10)return;else{_1=this.$285;_2=this.$30u}}
this.showInlineEditor(_1,_2,true,_6,_3);if(_6&&!_3)this.$165p();var _12=this.getEditSession(_1,_2);if(_12){_12.$198a=true}
return true},isc.A.selectRecordForEdit=function isc_ListGrid_selectRecordForEdit(_1,_2,_3){if(!this.editByCell)_1.$29m=true;if(this.canSelectCells){var _4=this.getRecordCellIndex(_1,_3);this.selectionManager.selectSingleCell(_4[0],_4[1]);this.fireSelectionUpdated()}else if(this.selectionManager!=null&&(!this.selectionManager.isSelected(_1,_2)||this.selectionManager.multipleSelected()))
{if(this.selectionType==isc.Selection.NONE){this.logInfo("selectOnEdit is true, but this.selectionType is set to 'none'. Unable to perform a selection on edit.","gridEdit")}else{var _5=this.getEditSelectionType();var _6=true;if(_5==isc.Selection.NONE){_6=false}else if(_5==isc.Selection.MULTIPLE){this.selectionManager.select(_1,_2)}else if(_5==isc.Selection.SIMPLE){this.selectionManager.setSelected(_1,!this.selectionManager.isSelected(_1,_2),_2)}else{this.selectionManager.selectSingle(_1,_2)}
if(_6)this.fireSelectionUpdated()}}
delete _1.$29m},isc.A.getEditSelectionType=function isc_ListGrid_getEditSelectionType(){if(this.editSelectionType==null){if(this.selectionType==isc.Selection.SIMPLE){return isc.Selection.MULTIPLE}
return isc.Selection.SINGLE}else{return this.editSelectionType}},isc.A.$51n=function isc_ListGrid__updateEditorSelection(_1){if(!isc.isA.TextItem(_1)&&!isc.isA.TextAreaItem(_1)&&!(isc.isA.TimeItem(_1)&&_1.useTextField!=false)&&!(isc.isA.DateItem(_1)&&_1.useTextField))return;if((_1.form&&_1.form.$897)||_1.$897)return;var _2=isc.isA.DateItem(_1)?_1.dateTextField:isc.isA.TimeItem(_1)?_1.textField:_1;var _3=_2.getDataElement();if(!_3)return;if(this.$51m||!this.autoSelectEditors){var _4=_3.value||"";_2.setSelectionRange(_4.length,_4.length);delete this.$51m}else{if(_2.$1441){_2.$179r=true}else{_2.selectValue()}}},isc.A.$32r=function isc_ListGrid__updateNewEditRowValues(_1,_2){var _3=this.$285,_4=this.$30u,_5=this.getCellRecord(_3,_4);if(_5!=null&&_5!="loading"){var _6=this.getEditValues(_3,_4);for(var i in _5){if(_5[i]!=null&&_6[i]==null){_6[i]=_5[i]}}}
if(_1)this.showInlineEditor(_3,_4,true,true,_2);else this.updateEditRow(_3)},isc.A.editField=function isc_ListGrid_editField(_1,_2){if(this.completeFields==null)this.setFields(this.fields);var _3;if(isc.isA.Number(_1))_3=_1;else _3=this.fields.findIndex("name",_1);if(_2==null){_2=this.getEditRow();if(_2==null){this.logWarn("editField(): unable to determine which row to edit - returning.","gridEdit");return}}
return this.startEditing(_2,_3)},isc.A.showInlineEditor=function isc_ListGrid_showInlineEditor(_1,_2,_3,_4,_5){if(this.$30a){if(_1!=this.getEditRow()||(this.editByCell&&_2!=this.getEditCol())){this.logWarn("Unexpected call to 'showInlineEditor' during another edit - cancelling previous edit","gridEdit");this.cancelEditing();this.startEditing(_1,_2);return}}
if(this.$82k&&this.$82k[_1]==_1&&this.$82k[_2]==_2)
{return}
this.$82k=[_1,_2];var _6=(this.suppressEditScrollIntoView||_5||(this.ns.EH.$129k()&&(isc.EH.getTarget()==this.getEditForm())));this.logDebug("showing inline editor at: "+[_1,_2]+", will focus: "+!_5,"gridEdit");var _7=this.body&&(!this.body.shouldShowAllColumns()||!this.body.showAllRows);if(_7&&!_6){var _8=this.body.scrollRedrawDelay;this.body.scrollRedrawDelay=0;this.scrollToCell(_1,_2,"left","top");this.body.scrollRedrawDelay=_8}
var _9=this.currentRollOverCanvas||this.currentRollUnderCanvas;if(_9!=null&&_9.$289==_1){this.updateRollOverCanvas(_9.$289,_9.$57n,true)}
var _10;var _11=!this.$30a;if(!_11){var _12=this.getEditForm().items,_13=this.getDrawnFields();if(_12.length!=_13.length)_11=true;else{for(var i=0;i<_12.length;i++){if(_12.find("name",_13[i].name)==null){_11=true}}}}
if(_11){var _15=this.makeEditForm(_1,_2);if(this.$686()&&_15){this.logInfo("Edit Form rebuilt with alwaysShowEditors:true, requires full redraw","inactiveEditorHTML");_10=true}}
var _16=this.$30u!=null&&(_2<this.$30u);this.$285=_1;this.$30u=_2;this.$31q=_1;this.$32s(_1,_2,_10);this.$82k=null;if(_11)this.$2186();if(this.body&&!_6){var _17;if(!_7)_17=true;else{var _18=this.body,_19=_18.getRowTop(_1),_20=_18.getRowSize(_1),_21=_18.getScrollTop(),_22=_18.getViewportHeight();_17=(_19<_21)||(_19+_20>_21+_22)}
if(_17){this.scrollToCell(_1,_2,"left","top")}}
if(!this.isDrawn()){return}
this.$32t();var _23=this.getEditorName(_1,_2),_24=this.$286.getItem(_23);if(_24==null){this.logWarn("ListGrid showing inline editor. Unable to get a pointer to the edit form item for field:"+_23)}else{if(_3)_24.$30w=true;if(_4)_24.$30v=true;if(!_5){if(isc.Browser.isMoz){var _25=this.body.getClipHandle(),_26=_25.scrollTop}
var _27=isc.EH.lastEvent;var _28=false;if(isc.Browser.isIE&&_27.eventType==isc.EH.MOUSE_DOWN){var _29=_27.target;if(_29!=this.$286){_28=true;var _30=this.$286.getCanvasItemCanvii();for(var i=0;i<_30.length;i++){if(_30[i]==_29||_30[i].contains(_29)){_28=false;break}}}}
if(isc.Browser.isIE){var _31=isc.ListGrid.$32u;if(_31&&(_31.hasFocus||_31.itemHasFocus()))_28=true}
if(isc.Browser.isSafari&&this.alwaysShowEditors){_28=true}
if(_28){var _32=this.$286.getItem(_23);this.$32v=_32.delayCall("focusAtEnd",[!_16])}else{if(isc.Browser.isMoz&&this.body.overflow==isc.Canvas.VISIBLE){this.adjustOverflow()}
var _32=this.$286.getItem(_23);_32.focusAtEnd(!_16)}}}},isc.A.$32s=function isc_ListGrid__showEditForm(_1,_2,_3){var _4=this.$30a;this.$30a=true;if(!this.isDrawn()||!this.body)return;if(!_4)this.updateEditFormTabPosition();var _5=this.isEmpty()||(!_4&&(_1>=this.data.getLength())&&(this.shouldShowNewRecordRow()||(this.body.getTableElement(_1)==null)));var _6=this.getCellRecord(_1,_2);if(_6&&this.$916(_6)){}
if(this.$286)this.$193x(this.$286);this.$2026();if(_3||_5||this.isDirty()||this.body.isDirty()||(this.frozenBody&&this.frozenBody.isDirty())){var _7=this.isDirty()?this:(this.bodyLayout?this.bodyLayout:this.body);this.$2025=true;_7.redraw("Showing editor");delete this.$2025;return}
var _8=isc.RPCManager&&isc.RPCManager.startQueue();this.$2025=true;if(this.editByCell){var _9=(this.frozenFields!=null)||(this.baseStyle==null);if(_9)this.refreshRow(_1);else this.refreshCell(_1,_2)}else{var _10=this.getDrawnFields();var _11=false;for(var i=0;i<_10.length;i++){if(this.isCheckboxField(_10[i]))continue;var _13=_10[i],_14=_13.name,_15=this.$286.getItem(_14),_2=_15.colNum,_16=!!(_4&&_15.isDrawn()),_17=this.$2027(_1,_2);if(_16!=_17){_15.$176l=true;this.refreshCell(_1,_2);delete _15.$176l;_11=true}
else if(this.selectOnEdit||this.lastOverRow){var _18=(_13.frozen&&!this.$54d)?this.frozenBody:this.body;_18.$29h(this.getCellRecord(_1,_2),_1,_2)}}
if(_11&&this.frozenFields&&!this.fixedRecordHeights&&this.matchFrozenRowHeightsApproach=="rowHeightSpacerHTML")
{var _19=this.frozenBody.getTableElement(_1),_20=_19?_19.cells[this.frozenFields.length]:null,_21=this.body.getTableElement(_1),_22=_21?_21.cells[this.fields.length
-this.frozenFields.length]:null,_6=this.getCellRecord(_1,_2);if(_20){_20.innerHTML=this.frozenBody.$191g(_6,_1)}
if(_22){_22.innerHTML=this.body.$191g(_6,_1)}
var _19=this.frozenBody.getTableElement(_1),_20=_19?_19.cells[this.frozenFields.length]:null,_21=this.body.getTableElement(_1),_22=_21?_21.cells[this.fields.length-this.frozenFields.length]:null,_6=this.getCellRecord(_1,_2);if(_20){_20.innerHTML=this.frozenBody.$191g(_6,_1)}
if(_22){_22.innerHTML=this.body.$191g(_6,_1)}}}
delete this.$2025;if(!_8&&isc.RPCManager)isc.RPCManager.sendQueue()},isc.A.$2026=function isc_ListGrid__cacheCurrentEditCells(_1,_2){var _3=this.$285;if(_1!=null&&_2!=null){if(!this.$2028)this.$2028=[];var _4=(_1==_3)&&this.canEditCell(_1,_2),_5=this.$2028.findIndex([_1,_2]);if(_4){if(_5==-1){this.$2028.add([_1,_2])}}else{if(_5!=-1){this.$2028.removeAt(_5)}}}else{this.$2028=[];var _1=this.$285;if(_1!=null){if(this.editByCell){this.$2028[0]=[this.$285,this.$30u]}else{for(var i=0;i<this.fields.length;i++){if(_2==this.$30u||this.canEditCell(_1,i)){this.$2028.add([_1,i])}}}}}},isc.A.$2027=function isc_ListGrid__shouldShowEditCell(_1,_2){if(this.$30a&&this.$2028==null){return this.$30a&&_1==this.$285&&this.canEditCell(_1,_2)}
return(this.$30a&&_1==this.$285&&(this.$2028.findIndex([_1,_2])!=-1))},isc.A.$193x=function isc_ListGrid__clearCachedEditItemFocus(_1){if(isc.isA.DynamicForm(_1)){var _2=_1.items;if(_2){for(var i=0;i<_2.length;i++){var _4=_2[i];delete _4.$105;if(isc.CanvasItem&&isc.isA.CanvasItem(_4)){this.$193x(_4.canvas)}}}}
var _5=_1.children;if(_5){for(var i=0;i<_5.length;i++){this.$193x(_5[i])}}},isc.A.$2186=function isc_ListGrid__startTrackingEditFieldUpdates(){var _1=this.$286;if(_1)_1.$2182={}},isc.A.$2187=function isc_ListGrid__stopTrackingEditFieldUpdates(){var _1=this.$286;if(_1)_1.$2182=null},isc.A.updateEditFormTabPosition=function isc_ListGrid_updateEditFormTabPosition(){isc.TabIndexManager.moveTarget(this.$286.ID,this.body.ID,0)},isc.A.$32t=function isc_ListGrid__showEditClickMask(){if(!this.modalEditing){if(this.canHover)this.stopHover();return}
if(!this.$286.clickMaskUp()){if(!this.$32w)
this.$32w=isc.$aq(this.getID()+".$32x()");var _1=[this.$286];if(isc.ListGrid.$32u!=null){_1.add(isc.ListGrid.$32u)}
this.$286.showClickMask(this.$32w,(this.stopOnErrors?isc.EH.SOFT_CANCEL:isc.EH.SOFT),_1)}},isc.A.editExistingRecord=function isc_ListGrid_editExistingRecord(_1){if(!this.isDrawn()){this.logWarn("An existing record cannot be edited because the grid is not drawn");return}
var _2=this.getDataSource(),_3=(isc.isAn.Array(this.data)?this.data:(isc.isA.Tree(this.data)?this.data.getAllNodes():this.data.getAllCachedRows())),_4;if(_2){_4=_2.applyFilter(_3,_1)}else{_4=isc.DS.applyFilter(_3,_1)}
if(!_4||_4.length==0){this.logWarn("no loaded record was found to match criteria. edit request ignored.");return}
var _5=_4[0];var _3=this.data;if(isc.isA.Tree(_3)){var _6=_3.getParents(_5);if(_6){_3.openFolders(_6)}}
var _7=this.getRowNum(_5),_8=this.getVisibleRows();if(_7<=_8[0]||_8[1]<=_7){this.scrollToRow(_7)}
this.startEditing(_7)},isc.A.stopHover=function isc_ListGrid_stopHover(){if(this.$30a&&isc.EH.getTarget()==this.getEditForm())return;return this.Super("stopHover",arguments)},isc.A.shouldWaitForSave=function isc_ListGrid_shouldWaitForSave(){if(this.stopOnErrors&&!this.waitForSave){var _1="Note: ListGrid initialized with 'waitForSave' false, and 'stopOnErrors' true. In this case user input will be be blocked during save, to allow server side  errors to be determined before the editor is hidden. Setting 'waitForSave' to true.";if(this.waitForSave==false)this.logWarn(_1,"gridEdit");else this.logInfo(_1,"gridEdit");this.waitForSave=true}
return!!(this.waitForSave||this.stopOnErrors)},isc.A.hideInlineEditor=function isc_ListGrid_hideInlineEditor(_1,_2,_3){if(_1){if(!this.hasFocus&&!(this.body&&this.body.hasFocus)&&!(isc.ListGrid.$32u&&isc.ListGrid.$32u.hasFocus))
{var _4=this.getEditForm();if(_4==null){_1=false}else if(!_4.hasFocus){var _5=isc.EH.getFocusCanvas();if(!_5||!this.body||!this.body.contains(_5)){_1=false}}}}
if(isc.Browser.isFirefox){var _4=this.getEditForm();if(_4!=null){var _6=_4.getFocusItem();if(_6!=null&&_6.hasFocus){var _7=_6.$166();if(_7&&_7.blur)_7.blur()}}}
if(!this.$30a)return false;this.$30a=null;this.$519=null;var _8=this.$285,_9=this.$30u;this.$285=this.$30u=null;if(!_2)this.$286.hideClickMask();if(this.getEditValues(_8,_9)!=null&&(!this.$31o||!this.$31o[this.getEditValuesID(_8,_9)])&&!this.recordHasChanges(_8,_9,null,false)&&!this.hasSubmittedEditValues(_8,_9)&&!this.recordMarkedAsRemoved(_8)&&!this.rowHasErrors(_8,_9))
{this.logInfo("hideInlineEditor for row with no edits - dropping edit values","gridEdit");this.$321(_8,_9)}
if(!_2){this.$165p()}
this.$2187();if(!this.body)return true;var _4=this.$286;if(_4.hasFocus){_4.blur()}
if(isc.Browser.isIE){var _10=_4.getFocusSubItem(),_11=isc.EH.$ld;if(_4.hasFocus||(_11&&((_11==_4)||(isc.EH.$ld.form==_4))))
{_10.elementBlur();this.$32h(_10,_9)}}
var _12=this.getCellRecord(_8,_9),_13=false;if(_12&&this.$916(_12)){_13=true}
if(_4!=null){var _6=_4.getFocusItem();if(isc.CanvasItem&&isc.isA.CanvasItem(_6)){this.$193w(_6)}}
if(!this.body.isDirty()&&(!this.bodyLayout||!this.bodyLayout.isDirty())&&!this.isDirty())
{if(_13||_8>=this.getTotalRows()){var _14=this.bodyLayout||this.body;_14.markForRedraw("Editor Hidden")}else{if(this.editByCell){var _15=(this.frozenFields!=null)||(this.baseStyle==null);if(_15)this.refreshRow(_8);else this.refreshCell(_8,_9)}
else this.refreshRow(_8);this.refreshGroupSummary(_8)}}
if(_1){if(_3!=null){isc.TabIndexManager.shiftFocusAfterGroup(this.body.getID(),(_3>0?true:false))}else{this.$30c=true;this.body.focus()}}
this.$1740(null);this.markForRedraw();return true});isc.evalBoundary;isc.B.push(isc.A.$193w=function isc_ListGrid__blurCanvasItemforEditorHide(_1){var _2=_1.canvas;if(_2&&!_2.hasFocus)_2=isc.EH.getFocusCanvas();while(_2!=null){if(isc.isA.DynamicForm(_2)){_2.blurFocusItem(true)}
if(_2.hasFocus)_2.blur();var _3=_2.canvasItem;if(_3==_1)return;_2=_3?_3.form:_2.parentElement}},isc.A.$32h=function isc_ListGrid__parkFocus(_1,_2){if(isc.isA.TextItem(_1)||isc.isA.TextAreaItem(_1)||isc.isA.PopUpTextAreaItem(_1))
{var _3=isc.ListGrid.$32u;if(!_3){_3=isc.ListGrid.$32u=isc.DynamicForm.create({pointersToThis:[{object:isc.ListGrid,property:"$32u"}],getFocusParkItem:function(){return this.getItem(0)},autoDraw:false,_redrawWithParent:false,ID:"$322",_generated:true,selectOnFocus:true,tabIndex:-1,numCols:1,items:[{name:"focusPark",type:"text",title:isc.nbsp,handleKeyPress:function(){return false}}],width:1,height:1,overflow:isc.Canvas.HIDDEN,itemHasFocus:function(){var _4=this.getFocusParkItem();if(_4.hasFocus)return true;if(isc.Browser.isIE&&this.isDrawn()&&this.isVisible()&&(this.getActiveElement()==this.getFocusParkItem().getFocusElement()))
return true;return false},redraw:function(){var _5=false;if(this.itemHasFocus())_5=true;this.Super("redraw",arguments);if(_5)this.focusInItem(this.getFocusParkItem())},$1196:true})}
if(_3.isVisible())_3.hide();_3.moveTo(Math.max(this.body.getPageLeft(),this.getColumnPageLeft(_2)),this.getPageTop()+Math.min(((this.showHeader?this.getHeaderHeight():0)+this.getRowTop(this.getEditRow())
-this.body.getScrollTop()),this.getScrollHeight()-1));_3.sendToBack();_3.show();if(this.$286.clickMaskUp())_3.unmask(this.$286.getID());_3.getFocusParkItem().focusInItem();_1.form.hasFocus=false}},isc.A.makeEditForm=function isc_ListGrid_makeEditForm(_1,_2){var _3=this.getCellRecord(_1,_2),_4=this.getEditDisplayValues(_1,_2),_5=false;if(this.$286!=null){if(this.updateEditorItemsInPlace){_5=true;var _6=this.editByCell?[this.getField(_2)]:this.getDrawnFields();if(_6){if(_6.length!=this.$286.getItems().length){_5=false}else{for(var i=0;i<_6.length;i++){var _8=_6[i],_9=this.getEditorName(_1,_8),_10=this.$286.getItem(_9);if(_10==null||(this.getEditorType(_8,_4)!=this.$286.getEditorType(_10)))
{_5=false;break}}}}}
if(_5&&_6){var _11=this.getDrawnFieldWidths(_3,_6);for(var i=0;i<_6.length;i++){var _8=_6[i],_12=this.getColNum(_8),_9=this.getEditorName(_1,_8),_10=this.$286.getItem(_9),_3=this.getRecord(_1),_13=this.getEditedRecord(_1),_14=this.getEditItem(_8,_3,_13,_1,_12,_11[i],true);_10.setProperties(_14);_10.$8t=null;if(_8.frozen){_10.containerWidget=this.frozenBody}else{_10.containerWidget=this.body}}}else{var _15=this.getEditRowItems(_3,_1,_2,this.editByCell);this.$286.setItems(_15)}
this.$286.setValues(_4)}else{var _15=this.getEditRowItems(_3,_1,_2,this.editByCell);var _16=isc.addProperties({},this.editFormDefaults,{grid:this,ruleScope:this.ruleScope,$176k:false,$112p:this.$112p,dataPath:this.dataPath,showErrorIcons:this.showErrorIcons,hasFieldErrors:function(_9){var _17=this.grid;if(_17){var _18;if(isc.isAn.Object(_9)){_18=_9;_9=_18.name}
var _1=this.$192r(_18||_9);return _17.cellHasErrors(_1,_9)}
return this.Super("hasFieldErrors",arguments)},getFieldErrors:function(_9){var _17=this.grid;if(_17){var _18;if(isc.isAn.Object(_9)){_18=_9;_9=_18.name}
var _1=this.$192r(_18||_9);return _17.getCellErrors(_1,_9)}
return this.Super("getFieldErrors",arguments)},addFieldErrors:function(_9,_21,_22){var _17=this.grid;if(_17){var _18;if(isc.isAn.Object(_9)){_18=_9;_9=_18.name}
var _1=this.$192r(_18||_9);return _17.addFieldErrors(_9,_21,_22,_1)}
return this.Super("addFieldErrors",arguments)},$192r:function(_9){var _17=this.grid;var _18;if(isc.isAn.Object(_9)){_18=_9;_9=_18.name}else{_18=this.getItem(_9)}
var _1;if(_18&&_18.$68x){var _19=_18.getInactiveContext(_18.$68u);_1=_19.rowNum}else{_1=_17.getEditRow()}
return _1},dataSource:this.dataSource,suppressAllDSFields:true,autoComplete:this.autoComplete,uniqueMatch:this.uniqueMatch,autoFocus:false,$425:function(_21){if(!this.Super("$425",arguments))return false;var _20=_21!=null?this.grid.getSpecifiedField(_21.name):null;if(_20&&_20.displayValueFromRecord===false)return false;return true},setFocusItem:function(_18){this.Super("setFocusItem",arguments);this.grid.$1740(this.isFocused()?_18:null)},clearFocusItem:function(){this.Super("clearFocusItem",arguments);this.grid.$1740(null)},alwaysManageFocusNavigation:true,$170m:this.$1874},this.editFormProperties);if(this.dateFormatter!=null&&_16.dateFormatter==null){_16.dateFormatter=this.dateFormatter}
if(this.datetimeFormatter!=null&&_16.datetimeFormatter==null){_16.datetimeFormatter=this.datetimeFormatter}
if(this.timeFormatter!=null&&_16.timeFormatter==null){_16.timeFormatter=this.timeFormatter}
_16.disableUnboundCacheSync=true;this.$286=isc.DynamicForm.create(_16);this.$286.setLocatorParent(this,"editRowForm","$286");this.$286.setItems(_15);this.$286.setValues(_4,true)}
if(this.logIsDebugEnabled("gridEdit")){this.logDebug("editRowForm created with values: "+this.echo(this.$286.getValues()),"gridEdit")}
return!_5},isc.A.getEditForm=function isc_ListGrid_getEditForm(){return this.$30a?this.$286:null},isc.A.getEditFormItem=function isc_ListGrid_getEditFormItem(_1){var _2=this.getEditForm();if(!_2)return null;var _3=this.getEditorName(this.getEditRow(),_1),_4=_2.getItem(_3);if(!isc.isA.Number(_1)||(_4&&_4.colNum==_1))return _4},isc.A.getEditFormValue=function isc_ListGrid_getEditFormValue(_1){var _2=this.getEditFormItem(_1);return(_2?_2.getValue():null)},isc.A.$33g=function isc_ListGrid__updateEditItemValues(){if(!this.$286)return;var _1=this.getEditRow(),_2=this.getEditCol(),_3=this.getEditDisplayValues(_1,_2);this.$286.setValues(_3)},isc.A.getEditDisplayValues=function isc_ListGrid_getEditDisplayValues(_1,_2,_3){var _4=_3?this.$300(_1,_2):this.getEditValues(_1,_2),_5=this.getCellRecord(_1,_2),_6={};if(_5!="loading"){for(var _7 in _5){_6[_7]=_5[_7]}}
for(var _7 in _4){_6[_7]=_4[_7]}
for(var _7 in _6){var _8=this.getFieldNum(_7);if(_8>=0&&this.$329!=null){_6[_7]=this.$329(_6[_7],_5,_1,_8)}}
return _6},isc.A.getEditFormItemFieldWidths=function isc_ListGrid_getEditFormItemFieldWidths(_1){var _2=[];for(var i=0;i<this.fields.length;i++){var _4=this.getLocalFieldNum(i),_5=this.fields[i],_6=(!this.$54d&&_5.frozen)?this.frozenBody:this.body;_2[i]=_6.getInnerColumnWidth(_4)}
return _2},isc.A.getEditorValueMap=function isc_ListGrid_getEditorValueMap(_1,_2,_3){if(_3&&_3.$199m!=null){return _3.$199m}
if(_1.getEditorValueMap!=null){isc.Func.replaceWithMethod(_1,"getEditorValueMap","values,field,grid");return _1.getEditorValueMap(_2,_1,this)}
if(_1.editorValueMap!=null){return _1.editorValueMap}
if(_1.editorProperties&&_1.editorProperties.valueMap){return _1.editorProperties.valueMap}
return _1.valueMap},isc.A.getEditorValueIcons=function isc_ListGrid_getEditorValueIcons(_1,_2){return _1.editorValueIcons||_1.valueIcons},isc.A.getEditorValueIconWidth=function isc_ListGrid_getEditorValueIconWidth(_1){if(_1.editorValueIconWidth!=null)return _1.editorValueIconWidth;return(_1.valueIconWidth!=null?_1.valueIconWidth:_1.valueIconSize)},isc.A.getEditorValueIconHeight=function isc_ListGrid_getEditorValueIconHeight(_1){if(_1.editorValueIconHeight!=null)return _1.editorValueIconHeight;return _1.valueIconHeight!=null?_1.valueIconHeight:_1.valueIconSize},isc.A.setEditorValueMap=function isc_ListGrid_setEditorValueMap(_1,_2){var _3=this.getColNum(_1),_4=this.getField(_1),_5=_4.name;_4.editorValueMap=_2;if(this.$30a){var _6=this.getEditRow(),_7=this.getEditedRecord(_6,_3);var _8=this.$286.getItem(_5);if(_8)delete _8.$199m;this.$286.setValueMap(_5,this.getEditorValueMap(_4,_7))}},isc.A.getEditorType=function isc_ListGrid_getEditorType(_1,_2){var _3=_2==null||isc.isAn.emptyObject(_2);if(!_3&&this.getDataSource()!=null){var _4=this.getDataSource().getPrimaryKeyFieldNames();for(var i=0;i<_4.length;i++){if(_2[_4[i]]==null){_3=true;break}}}
var _6=_3?-1:this.getRecordIndex(_2);var _7=this.getEditorProperties(_1,_2,_6);var _8=isc.addProperties({},_1,_1.editorProperties,_7);return isc.DynamicForm.getEditorType(_8,this,null,this.$286)},isc.A.getEditorProperties=function isc_ListGrid_getEditorProperties(_1,_2,_3){return isc.addProperties({},this.editorProperties,_1.editorProperties)},isc.A.getEditRowItems=function isc_ListGrid_getEditRowItems(_1,_2,_3,_4){var _5=this.body;if(_5==null)return[];var _6,_7,_8=[],_9=[];var _10=this.getEditedRecord(_2,_3);var _11;if(_4)_11=[this.getField(_3)]
else _11=this.getDrawnFields();_8=this.getDrawnFieldWidths(_1,_11);if(_11!=null){for(var i=0;i<_11.length;i++){var _13=this.getColNum(_11[i]);var _14=this.getEditItem(_11[i],_1,_10,_2,_13,_8[i])
if(_14==null)continue;_9[_9.length]=_14}}
return _9},isc.A.getDrawnFields=function isc_ListGrid_getDrawnFields(){if(!this.body)return null;var _1=[],_2=this.body;var _3=this.frozenFields,_4=this.freezeStart();if(_3&&_4){_1.addList(_3)}
var _5,_6;if((_2.$254==null)||!_2.isDrawn()||_2.isDirty()||_2.$58p){var _7=_2.getDrawArea();_5=_7[2];_6=_7[3]}else{_5=_2.$254;_6=_2.$255}
if(_3&&_4){_5+=_3.length;_6+=_3.length}
for(var i=_5;(i<=_6&&i<this.fields.length);i++){_1.add(this.fields[i])}
if(_3&&!_4){_1.addList(_3)}
return _1},isc.A.getDrawnFieldWidths=function isc_ListGrid_getDrawnFieldWidths(_1,_2){if(!_2)_2=this.getDrawnFields();if(!_2)return null;var _3=this.getEditFormItemFieldWidths(_1),_4=[];for(var i=0;i<_2.length;i++){_4[i]=_3[_2[i].masterIndex]}
return _4},isc.A.$323=function isc_ListGrid__popUpTextAreaItemKeyPress(_1,_2,_3){return this.grid.editorKeyPress(this,_2,_3)},isc.A.$54z=function isc_ListGrid__popUpTextAreaItemKeyDown(_1,_2,_3){return this.grid.editorKeyDown(this,_2,_3)},isc.A.$62k=function isc_ListGrid__popUpTextAreaItemFocus(){var _1=this.form,_2=this.grid,_3,_4,_5,_6;if(_2.$30a){_3=_2.$285;if(!_2.editByCell){_3=_2.$285;_5=this.getFieldName(),_4=_2.fields.findIndex("name",_5);_6=(_2.$30u!=_4);if(_6){_2.setNewEditCell(_3,_4);_2.cellEditEnd(isc.ListGrid.EDIT_FIELD_CHANGE)}}}},isc.A.$324=function isc_ListGrid__getPopUpTextAreaTop(){var _1=this.grid,_2=this.getFieldName(),_3=_1.getEditRow(),_4=_1.getCellStyle(_1.getRecord(_3),_3,_1.getColNum(_2)),_5=_1.getRowPageTop(_3)+isc.Element.$tn(_4)+isc.Element.$tt(_4);return _5},isc.A.$581=function isc_ListGrid__checkboxClick(_1,_2,_3,_4){if(!this.hasFocus){var _5=this.grid;_5.setNewEditCell(this.rowNum,this.colNum);_5.cellEditEnd(isc.ListGrid.EDIT_FIELD_CHANGE);this.$30w=true}
return this.Super("handleClick",arguments)},isc.A.handleEditorChanged=function isc_ListGrid_handleEditorChanged(_1){if(this.$101f==_1)return;var _2=_1.getFieldName(),_3=this.getField(_2),_4;if(_3&&_3.validateOnChange!=null)_4=_3.validateOnChange;else _4=this.validateOnChange;var _5=this.getEditRow();if(_5==null||_5!=_1.rowNum){return}
if(_4){this.validateCell(_5,_2,false,true)}else if(!_1.hasFocus&&!this.editByCell){if(_1.isDrawn()&&_1.isVisible()){this.storeUpdatedEditorValue(false,_1.colNum);if(this.saveByCell&&this.autoSaveEdits){var _6=isc.ListGrid.EDIT_FIELD_CHANGE;this.saveEdits(_6,null,_5,_1.colNum)}else if(this.validateByCell)this.validateCell(_5,_2)}}else{var _7={};_7[_2]=_1.getValue();this.$165p(_7)}},isc.A.$325=function isc_ListGrid__editorHandleChangedOverride(_1,_2,_3,_4){this.invokeSuper(null,"handleChanged",_1,_2,_3,_4);if(!this.destroyed)this.grid.handleEditorChanged(this)},isc.A.$45p=function isc_ListGrid__editorGetAutoComplete(){var _1=this.grid;if(!_1)return null;var _2=_1.getField(this.getFieldName());if(_2.autoComplete!=null)return _2.autoComplete;if(_1.autoComplete!=null)return _1.autoComplete;return this.Super("$17h",arguments)},isc.A.getEditItem=function isc_ListGrid_getEditItem(_1,_2,_3,_4,_5,_6,_7){var _8={};_8.width=_6;_8.record=_2;_8.rowNum=_4;_8.colNum=_5;var _9=this.getEditorName(_4,_1);_8.name=_9;var _10=this.getEditorName(_4,_1,true);if(_10&&_10!=_9){_8.dataPath=_10}
if(_1.title!=null)_8.title=_1.title;_8.valueMap=this.getEditorValueMap(_1,_3);if(_1.multiple!=null)_8.multiple=_1.multiple;if(_1.disabled!=null)_8.disabled=_1.disabled;if(_1.valueField!=null)_8.valueField=_1.valueField
if(_1.displayField!=null)_8.displayField=_1.displayField
if(_1.optionDataSource)_8.optionDataSource=_1.optionDataSource
if(_1.optionFilterContext)_8.optionFilterContext=_1.optionFilterContext
if(_1.optionCriteria)_8.optionCriteria=_1.optionCriteria
if(_1.optionOperationId!=null)_8.optionOperationId=_1.optionOperationId;if(_1.escapeHTML!=null)_8.escapeHTML=_1.escapeHTML;var _11=this.shouldSkipLineBreaks(_1);if(_11!=null)_8.skipLineBreaks=_11;_8.valueIcons=this.getEditorValueIcons(_1,_3);var _12=this.getEditorValueIconWidth(_1),_13=this.getEditorValueIconHeight(_1);if(_12)_8.valueIconWidth=_12;if(_13)_8.valueIconHeight=_13;if(_1.valueIconClick!=null){_8.valueIconClick=this.$1477}
_8.imageURLPrefix=(_1.editorImageURLPrefix||_1.imageURLPrefix);_8.imageURLSuffix=(_1.editorimageURLSuffix||_1.imageURLSuffix);_8.baseURL=_1.baseURL;_8.imgDir=_1.imgDir;var _14;if(_1.icons!==_14)_8.icons=_1.icons;if(_1.showPickerIcon!==_14)_8.showPickerIcon=_1.showPickerIcon;if(_1.pickerIconSrc!==_14)_8.pickerIconSrc=_1.pickerIconSrc;if(_1.pickerIconWidth!==_14)_8.pickerIconWidth=_1.pickerIconWidth;if(_1.pickerIconHeight!==_14)_8.pickerIconHeight=_1.pickerIconHeight;if(_1.defaultIconSrc!==_14)_8.defaultIconSrc=_1.defaultIconSrc;var _15=(_1.editorIconHeight||_1.iconHeight);if(_15!==_14)_8.iconHeight=_15
var _16=(_1.editorIconWidth||_1.iconWidth);if(_16!==_14)_8.iconWidth=_16;if(_1.iconPrompt!==_14)_8.iconPrompt=_1.iconPrompt;if(_1.iconHSpace!==_14)_8.iconHSpace=_1.iconHSpace;if(_1.iconVAlign!==_14)_8.iconVAlign=_1.iconVAlign;if(_1.editorProperties==null)_1.editorProperties={};if(_1.editorHint||_1.editorProperties.hint){_8.hint=_1.editorHint||_1.editorProperties.hint;_8.showHintInField=true}else{_8.showHint=false}
if(this.showValueIconOnly(_1)){_1.editorProperties.showValueIconOnly=true}
if(_1.pickListWidth!=null)_8.pickListWidth=_1.pickListWidth;if(_1.pickListFields!=null)_8.pickListFields=_1.pickListFields;if(_1.editorFormula!=null)_8.formula=_1.editorFormula;if(_1.editorTextFormula!=null)_8.textFormula=_1.editorTextFormula;_8.textAlign=this.getFieldCellAlign(_1,this.isRTL())
if(_1.editorProperties!=null){for(var i=0;i<this.$31c.length;i++){var _18=this.$31c[i],_19=_1.editorProperties[_18];if(_19!=null&&!isc.isA.Function(_19)){var _20=isc.FormItem._stringMethodRegistry;_1.editorProperties[_18]=_19=isc.Func.expressionToFunction(_20[_18],_19)}
if(_19!=null)_1.editorProperties[_18]=_19}}
for(var i=0;i<this.$45k.length;i++){var _18=this.$45k[i];if(_1.editorProperties&&_1.editorProperties[_18]!=null){continue}
var _19=_1[_18];if(_19!=null){if(_1.editorProperties==null)_1.editorProperties={};if(!isc.isA.Function(_19)){var _20=isc.FormItem._stringMethodRegistry;_19=isc.Func.expressionToFunction(_20[_18],_19)}
_1.editorProperties[_18]=_19}}
_8.valueIconLeftPadding=this.getValueIconLeftPadding(_1);_8.valueIconRightPadding=this.getValueIconRightPadding(_1);_8.$176o=null;_8.format=_1.format;if(_1.decimalPrecision!=null)_8.decimalPrecision=_1.decimalPrecision;if(_1.decimalPad!=null)_8.decimalPad=_1.decimalPad;if(!_7){_8.$17h=this.$45p;_8.autoCompleteCandidates=_1.autoCompleteCandidates;_8.uniqueMatch=_1.uniqueMatch;_8.containerWidget=(!this.$54d&&_1.frozen)?this.frozenBody:this.body;_8.grid=this;_8.tabGroupExit=function(_32){this.logDebug("Attempting to tab out of editItem "+this+". This will fire 'cellEditEnd()' with an appropriate editEvent","syntheticTabIndex");var _21=_32?isc.ListGrid.TAB_KEYPRESS:isc.ListGrid.SHIFT_TAB_KEYPRESS;if(isc.EH.clickMaskUp()){isc.EH.setMaskedFocusCanvas(null,isc.EH.clickMaskRegistry.last())}
this.grid.cellEditEnd(_21);return false};_8.handleChanged=this.$325;_8.keyDown=function(_8,_32,_33){if(this.form==null)return;return this.form.grid.editorKeyDown(_8,_33)}
_8.inactiveEditorMouseDown=function(_27,_32){if(_27&&(_27.grid==this.form.grid.getID())&&_27.rowNum!=null&&_27.colNum!=null)
{if(this.form==null)return;this.form.grid.startEditing(_27.rowNum,_27.colNum)}}
_8.handleMouseDown=function(){var _22=this.Super("handleMouseDown",arguments);var _23=this.$1008();this.$1009(_23[0],_23[1]);return _22}
_8.showInlineStyle=true;_8.type=_1.type;_8.editorType=this.getEditorType(_1,_2);var _24=_8.editorType;_8.browserAutoCorrect=false;if(_1.dateFormatter!=null)_8.dateFormatter=_1.dateFormatter;if(_1.timeFormatter!=null)_8.timeFormatter=_1.timeFormatter;if(_1.displayFormat!=null)_8.displayFormat=_1.displayFormat;var _25=this.$45j(_1);if(_25)_8.inputFormat=_25;_8.getIconBackgroundColor=function(_32,_33,_34,_35){if(this.isInactiveHTML()&&isc.isA.ColorItem(this)){var _26=this.$68u;if(this.$68v&&_26&&this.$68v[_26])
{var _27=this.$68v[_26];return this.grid.getEditedCell(_27.rowNum,_27.colNum)}
return null}
return this.Super("getIconBackgroundColor",arguments)}
if(this.$308[_24]==true||this.$68k[_24]==true||(_1.type==this.$g4&&_24==null))
{_8.editorType=(this.$68k[_24]==true?this.$68l:this.$g4);_8.useTextField=true;_8.selectOnFocus=true;_8.cellPadding=0;_8.itemCellStyle=null;_8.pickerIconHSpace=0}
if(this.$307[_24]==true){_8.editorType=this.$g5;var _28=this.getDataSource();if(_28&&_28.allowAdvancedCriteria==false)_8.allowExpressions=false;_8.selectOnFocus=true}
if(this.popUpTextAreaEditorTypes[_24]==true){_8.showOver=false;_8.getTextBoxStyle=function(){var _29=this.grid,_2=_29.getCellRecord(this.rowNum,this.colNum);this.textBoxStyle=_29.getCellStyle(_2,this.rowNum,this.colNum);return this.Super("getTextBoxStyle",arguments)}
_8.gridCellStyleChanged=function(_2,_4,_5,_32){var _30=this.$15h();if(_30){_30.className=this.textBoxStyle=_32}}
_8.textBoxCellCSS=isc.Canvas.$42a
_8.textAreaKeyDown=this.$54z;_8.textAreaKeyPress=this.$323;_8.getTextAreaTop=this.$324;if(_8.popUpOnEnter==null)_8.popUpOnEnter=true;_8.textAreaFocus=this.$62k}
if(this.$31a[_24]==true||(_1.type==this.$g2&&_24==null)){if(_8.showLabel==null)_8.showLabel=false;if(_8.handleClick==null){_8.handleClick=this.$581}}
if(_24=="RichTextItem"||_24=="richText"){if(_8.overflow==null)_8.overflow="auto"}
_8.elementFocus=this.$30t;_8.$1008=this.$101a;_8.$1009=this.$101b;_8.focusInItem=this.$51o;_8.$109=this.$898}
var _31=this.getEditorProperties(_1,_2,_4);if(_31.valueMap!=null&&_31.valueMap!=_8.valueMap)
{_8.$199m=_31.valueMap}
isc.addProperties(_8,_31);if(_8.canEdit==null)_8.canEdit=true;return _8},isc.A.$1477=function isc_ListGrid__editorValueIconClickFunction(_1,_2,_3){var _4=this.grid.getField(this.name);var _5=this.grid.getEditRow(),_6=this.grid.getEditCol();var _7=this.grid.getCellRecord(_5,_6);isc.Func.replaceWithMethod(_4,"valueIconClick","viewer,record,recordNum,field,rawValue,editor");var _8=_4.valueIconClick(this.grid,_7,_5,_4,_3,this);if(_8==false)return false;return this.Super("valueIconClick",arguments)},isc.A.$51o=function isc_ListGrid__editFormItem_focusInItem(){this.Super("focusInItem",arguments);this.grid.$51n(this)},isc.A.$1874=function isc_ListGrid__editForm_restoreFocusForClickMaskHide(){this.$897=true;this.Super("$170m",arguments);this.$897=false},isc.A.$898=function isc_ListGrid__editFormItem_refocusAfterRedraw(){this.$897=true;this.Super("$109",arguments);this.$897=false},isc.A.getEditorName=function isc_ListGrid_getEditorName(_1,_2,_3){_2=this.getField(_2);if(!_2)return null;if(_3&&_2.dataPath){return _2.dataPath}
return _2.name},isc.A.getTrimmedFieldDataPath=function isc_ListGrid_getTrimmedFieldDataPath(_1){var _2=this.getField(_1);if(_2==null){if(isc.isAn.Object(_1))return _1.dataPath||_1.name||null;return _1}
if(_2.dataPath){return this.$840(_2.dataPath)}else{return _1.name}},isc.A.refreshCell=function isc_ListGrid_refreshCell(_1,_2,_3,_4,_5){if(_1==null){this.logInfo("ListGrid.refreshCell(): first parameter rowNum not present, returning");return}
if(!this.isDrawn()||!this.body)return;if(!_3&&this.$30a&&!this.$2025){this.$2026(_1,_2)}
var _6=this.getFieldBody(_2);if(_6.isDirty()){if(_6.$58p){this.logDebug("refreshCell called while body redraw is in progress - ignoring.","gridEdit");return false}
this.logDebug("refresh cell redrawing body","gridEdit");_6.redraw("refresh cell");return false}
if(this.$686(this.getField(_2),true)){this.$69l(_1,_2)}
var _7=this.getLocalFieldNum(_2);_6.refreshCell(_1,_7,_3,_4,_5)},isc.A.markCellForRefresh=function isc_ListGrid_markCellForRefresh(_1,_2){if(_1==null){this.logInfo("ListGrid.refreshCell(): first parameter rowNum not present, returning");return}
if(!this.isDrawn()||!this.body)return;var _3=this.getFieldBody(_2);if(_3.isDirty())return;var _4=this;if(!this.$174q)this.$174q=[];var _5=this.$174q;var _6=false;for(var i=0;i<_5.length;i++){var _8=_5[i];if(_8[0]==_1&&_8[1]==_2){_6=true;break}}
if(!_6)_5.add([_1,_2]);if(this.$174n)return;this.$174n=isc.Timer.setTimeout(function(){delete this.$174n;delete this.$174q;if(_3.isDirty())return;var _9=_3.getDrawArea();if(isc.isAn.Array(_9)){var _10=(_9[1]-_9[0]+1)*
(_9[3]-_9[2]+1);if(_5.length>_10*_4.$174p){return _3.redraw("markCellForRefresh")}}
for(var i=0;i<_5.length;i++){var _8=_5[i];_4.refreshCell(_8[0],_8[1])}},this.$174o)},isc.A.cancelPendingCellRefresh=function isc_ListGrid_cancelPendingCellRefresh(){isc.Timer.clear(this.$174n);delete this.$174n;delete this.$174q},isc.A.refreshCellValue=function isc_ListGrid_refreshCellValue(_1,_2,_3,_4){if(!this.isDrawn()||!this.body)return;var _5=this.getFieldBody(_2),_6=this.getLocalFieldNum(_2);_5.refreshCellValue(_1,_6,_3,_4)},isc.A.$2038=function isc_ListGrid__updateRecordComponentsForRefreshRow(_1,_2){if(this.showRecordComponents){var _3=[];if(_2){for(var i=0;i<this.frozenFields.length;i++){_3.add([_1,this.getFieldNum(this.frozenFields[i])])}}
var _5=this.body.$254,_6=this.body.$255;for(var i=_5;i<=_6;i++){var _7=this.getFieldNumFromLocal(i,this.body);_3.add([_1,_7])}
for(var i=0;i<_3.length;i++){var _1=_3[i][0],_7=_3[i][1];if(this.logIsDebugEnabled("recordComponents")){this.logDebug("refreshCell calling refreshRecordComponent("+_1+", "+_7+") ","recordComponents")}
this.refreshRecordComponent(_1,_7,true)}}},isc.A.refreshRow=function isc_ListGrid_refreshRow(_1,_2){if(!this.body||!this.isDrawn())return;if(this.$30a&&!this.$2025)this.$2026();var _3=this.frozenFields&&this.frozenFields.length>0;if(_3&&!this.frozenBody)_3=false;var _4=false;if(this.body.isDirty())_4=true;if(_3&&!_4){if(this.frozenBody.isDirty()||this.bodyLayout.isDirty())_4=true}
if(_4){var _5=_3?this.bodyLayout:this.body;var _6=_5.redraw("refresh row");if(_2){this.$2038(_1,_3)}
return _6}
if(this.$30a&&this.$286!=null){this.logInfo("refresh row: "+_1,"gridEdit")}
if(_2){this.$2038(_1,_3)}
if(_3){for(var i=0;i<this.frozenFields.length;i++){this.refreshCell(_1,this.getFieldNum(this.frozenFields[i]),true)}}
var _8=this.body.$254,_9=this.body.$255;for(var i=_8;i<=_9;i++){var _10=this.getFieldNumFromLocal(i,this.body);this.refreshCell(_1,_10,true)}
if(this.frozenFields&&!this.fixedRecordHeights&&this.matchFrozenRowHeightsApproach=="rowHeightSpacerHTML")
{var _11=this.frozenBody.getTableElement(_1),_12=_11?_11.cells[this.frozenFields.length]:null,_13=this.body.getTableElement(_1),_14=_13?_13.cells[this.fields.length
-this.frozenFields.length]:null,_15=this.getCellRecord(_1,_10);if(_12){_12.innerHTML=this.frozenBody.$191g(_15,_1)}
if(_14){_14.innerHTML=this.body.$191g(_15,_1)}}},isc.A.getCellsToRefreshOnSelectionChange=function isc_ListGrid_getCellsToRefreshOnSelectionChange(_1){var _2=this.getCheckboxFieldPosition();if(_2>=0){return[[_1,_2]]}},isc.A.startEditingNew=function isc_ListGrid_startEditingNew(_1,_2){if(!this.canEdit&&!(this.completeFields||this.fields).getProperty("canEdit").or()){this.canEdit=true}
if(isc.isAn.Array(this.data)&&this.data.length==0&&this.dataSource&&!this.shouldSaveLocally())
{this.fetchData(null,null,{$326:true});this.data.setFullLength(0);this.data.setAllRows([])}
var _3=this.body?this.body.getTotalRows():this.getTotalRows();if(this.shouldShowNewRecordRow())_3-=1;if(!this.useCellRecords&&_1!=null){this.setEditValues(_3,isc.addProperties({},_1),true)}
var _4=this.findNextEditCell(_3,0,1,true,true,true);if(_4==null){this.logInfo("startEditingNew() failed to find any editable fields in this grid.","gridEdit");if(!this.useCellRecords&&_1!=null){this.$321(_3,null,false)}
return}
if(this.useCellRecords&&_1!=null){this.setEditValues(_4,isc.addProperties({},_1),true)}
this.startEditing(_4[0],_4[1],_2)},isc.A.updateEditRow=function isc_ListGrid_updateEditRow(_1){if(this.$285!=_1||!this.$286){return}
this.$2187();this.$286.setItemValues();delete this.$286.$10u;this.$286.$327=false;this.$2186()},isc.A.shouldFixRowHeight=function isc_ListGrid_shouldFixRowHeight(_1,_2){if(this.canEdit!=false&&this.$30a&&_2==this.$285){return false}
return this.fixedRecordHeights},isc.A.$32q=function isc_ListGrid__getNextEditFlowID(){if(this.$328==null)this.$328=isc.timeStamp();return this.$328++},isc.A.$32x=function isc_ListGrid__handleClickOutsideEditor(){if(isc.EH.mouseIsDown()){var _1=isc.EH.getTarget();if(_1==this.body||_1==this.frozenBody){var _2=_1.getEventRow(),_3=_1.getEventColumn();if(this.canRemoveRecords&&(_2==this.getEditRow())){var _4=this.getField(_3);if(_4&&_4.isRemoveField){this.validateRow(_2,true);return this.removeRecordClick(_2,_3)}}
if(this.modalEditing){_1.$1697=[_2,_3]}}}
this.cellEditEnd(isc.ListGrid.CLICK_OUTSIDE)},isc.A.getEditDisplayValue=function isc_ListGrid_getEditDisplayValue(_1,_2,_3){var _4;if(_3===_4)_3=this.getCellRecord(_1,_2);var _5=this.$30y(_1,_2);if(_5===_4){if(_3!=null){_5=this.getRawCellValue(_3,_1,_2)}}
_5=this.$329(_5,_3,_1,_2);return _5},isc.A.$329=function isc_ListGrid__formatEditorValue(_1,_2,_3,_4){if(_2==null)_2=this.$300(_3,_4);var _5=this.fields[_4];if(_5&&_5.formatEditorValue!=null){isc.Func.replaceWithMethod(_5,"formatEditorValue","value,record,rowNum,colNum,grid");_1=_5.formatEditorValue(_1,_2,_3,_4,this)}else if(this.formatEditorValue!=null){_1=this.formatEditorValue(_1,_2,_3,_4)}
return _1},isc.A.getEditValuesID=function isc_ListGrid_getEditValuesID(_1){var _2=this.$52b;if(_1==null||_2==null)return null;if(isc.isA.String(_1)&&_2[_1]!=null)return _1;if(isc.isA.Number(_1)){return this.$33a[_1]}
for(var i in _2){if(!Object.hasOwn(_2,i))continue;var _4=_2[i];if(_4===_1)return i;if(_4.$31x===_1)return i;var _5=_4.$33b;if(_5&&this.comparePrimaryKeys(_5,_1)){return i}}
return null});isc.evalBoundary;isc.B.push(isc.A.getEditSession=function isc_ListGrid_getEditSession(_1,_2){if(this.$52b==null)return null;if(!isc.isA.String(_1))_1=this.getEditValuesID(_1,_2);return this.$52b[_1]},isc.A.getEditSessionRowNum=function isc_ListGrid_getEditSessionRowNum(_1){_1=this.getEditSession(_1);return(_1!=null?_1.$24t:null)},isc.A.getEditSessionColNum=function isc_ListGrid_getEditSessionColNum(_1){_1=this.getEditSession(_1);return(_1!=null?_1.$24u:null)},isc.A.getAllEditRows=function isc_ListGrid_getAllEditRows(_1){return this.getAllEditCells(_1,true)},isc.A.getAllEditCells=function isc_ListGrid_getAllEditCells(_1,_2){var _3=this.$52b,_4=[];if(!_3)return _4;if(_1)return isc.getKeys(this.$52b);for(var i in _3){var _6=_3[i].$24t;_6=parseInt(_6);if(_6==null||_6<0||isNaN(_6))continue;if(_2)_4[_4.length]=_6
else{var _7=_3[i].$24u;if(_7==null){_7=this.$30a&&(_6==this.getEditRow())?this.getEditCol():this.getRowEditColNum(_6)}
if(_7!=null&&!isc.isA.Number(_7))_7=parseInt(_7);_4[_4.length]=[_6,_7]}}
return _4},isc.A.getEditValues=function isc_ListGrid_getEditValues(_1,_2){if(_1==null){return this.logWarn("getEditValues() called with no valuesID. "+(this.logIsDebugEnabled("gridEdit")?this.getStackTrace():""))}
if(this.$989){return{}}
if(_2==null&&isc.isA.Array(_1)){_2=_1[1];_1=_1[0]}
var _3=(isc.isA.Number(_1)?_1:this.getEditSessionRowNum(_1));if(this.$30a&&(this.getEditRow()==_3)){this.storeUpdatedEditorValue()}
var _4={};this.combineRecords(_4,this.$300(_1,_2));if(_4!=null){delete _4[this.recordRemovedProperty]}
return _4},isc.A.$300=function isc_ListGrid__getEditValues(_1,_2){var _3=this.getEditSession(_1,_2);return _3!=null?_3.$31x:null},isc.A.getEditedRecord=function isc_ListGrid_getEditedRecord(_1,_2,_3){if(_1==null)return this.logWarn("getEditedRecord() called with no valuesID");if(!isc.isA.Number(_1)){_1=this.getEditSessionRowNum(_1);_2=this.getEditSessionColNum(_1)}
var _4=this.getCellRecord(_1,_2),_5=_3?this.$300(_1,_2):this.getEditValues(_1,_2);if(_5!=null){}
var _6={},_7={};isc.Canvas.$91f(this.getEditForm(),_4,_7,null,this.keepNativeJavaObjs!==false,this.getDataSource());this.combineRecords(_6,_7);this.combineRecords(_6,_5);if(_6.__ref)_6.__ref=null;return _6},isc.A.getEditedCell=function isc_ListGrid_getEditedCell(_1,_2){if(_1==null||_2==null)
return this.logWarn("getEditedCell() called with no record / field parameter");var _3=this.getEditValues(_1,_2),_4=isc.isA.Number(_1)?_1:this.getEditSessionRowNum(_1),_5=isc.isA.Number(_2)?_2:this.getFieldNum(_2),_1=this.getCellRecord(_4,_5);var _6=this.getEditorName(_4,this.getField(_5))
var _7;if(_3&&_3[_6]!==_7)return _3[_6];return _1?_1[_6]:null},isc.A.rememberSubmittedEditValues=function isc_ListGrid_rememberSubmittedEditValues(_1,_2){var _3=this.getEditSession(_1);if(_3!=null){_3.$33e=isc.addProperties({},_3.$31x)}},isc.A.getSubmittedEditValues=function isc_ListGrid_getSubmittedEditValues(_1,_2){var _3=this.getEditSession(_1,_2);return _3!=null?_3.$33e:null},isc.A.hasSubmittedEditValues=function isc_ListGrid_hasSubmittedEditValues(_1,_2){var _3=this.getSubmittedEditValues(_1,_2);return _3!=null&&!isc.isA.emptyObject(_3)},isc.A.clearSubmittedEditValues=function isc_ListGrid_clearSubmittedEditValues(_1,_2){var _3=this.getEditSession(_1);if(_3==null)return;var _4=_3.$33e;if(!_4)return;for(var _5 in _2){if(_4[_5]==_2[_5])delete _4[_5]}
if(isc.isA.emptyObject(_4))_3.$33e=null},isc.A.createEditValues=function isc_ListGrid_createEditValues(_1){var _2=this.body.getTotalRows();this.setEditValues(_2,_1);return this.getEditValuesID(_2)},isc.A.initializeEditValues=function isc_ListGrid_initializeEditValues(_1,_2,_3,_4){if(this.$300(_1,_2)==null){this.$989=true;var _5={};if(this.getCellRecord(_1,_2)==null){var _6=this.getAllFields();for(var i=0;i<_6.length;i++){if(_6[i]&&_6[i].initialValue!=null){isc.Canvas.$70n(_6[i].dataPath||_6[i].name,null,_6[i].initialValue,_5,this,true)}}}
this.setEditValues([_1,_2],_5,!_3,!_4);delete this.$989}},isc.A.setEditValues=function isc_ListGrid_setEditValues(_1,_2,_3,_4){var _5;if(isc.isAn.Array(_1)){_5=_1[1];_1=_1[0]}
if(!isc.isA.Number(_1)||_1<0||(_1>this.getTotalRows())){this.logWarn("setEditValues() called with bad rowNum: "+this.echo(_1));return}
if(_2==null)_2={};var _6=this.getCellRecord(_1,_5),_7=this.getEditSession(_1,_5);var _8=_7==null,_9=_6==null&&_8;var _10,_11;if(!_3){if(_6==null)_6={};_10=this.getEditValues(_1,_5);_11=isc.addProperties({},_10);for(var i in _11){_11[i]=_6[i]}
isc.addProperties(_11,_2)}
if(this.logIsInfoEnabled("gridEdit")){if(!_8){this.logInfo("establishing new edit session at row: "+_1+(_5!=null?", col:"+_5:"")+(this.logIsDebugEnabled("gridEdit")?" with values: "+this.echo(_2):""),"gridEdit")}}
var _13=this.recordMarkedAsRemoved(_1);if(_13)_2[this.recordRemovedProperty]=true;this.$33f(_1,_5,_2);var _14=_11!=null&&!isc.isAn.emptyObject(_11);if(_3||!this.isDrawn()||!this.body){if(_14&&!_4){if(this.summaryRow&&this.showGridSummary)this.summaryRow.$855()}
return}
if(_14){this.calculateRecordSummaries(_1,null,true,true)}
var _15=(_9||this.body.isDirty());if(_15){var _16=this.isEditingRecord(_1,_5)&&this.$286!=null
if(_16)this.$33g();this.body.markForRedraw();if(_14&&this.summaryRow&&this.showGridSummary){this.summaryRow.markForRedraw()}}else{this.$50r(_1,_5,_11)}},isc.A.$50r=function isc_ListGrid__displayNewEditValues(_1,_2,_3,_4){if(!_3||isc.isAn.emptyObject(_3)){return}
var _5=this.isEditingRecord(_1,_2)&&this.$286!=null
var _6=false;for(var _7 in _3){var _8=this.getColNum(_7);var _9;if(_5){var _10=this.$286.getItem(_7);_9=(_8>=0&&_10&&this.canEditCell(_1,_8));var _11=_10?this.$329(_3[_7],this.getCellRecord(_1,_2),_1,_8):_3[_7];this.$286.setValue(_7,_11)}
if(_8==-1)continue;if(this.$67i)continue;_6=true;if(!_9){this.refreshCell(_1,_8)}else if(_4&&_4[_7]){this.showCellErrors(_1,_8)}}
if(_6&&this.summaryRow&&this.showGridSummary){this.summaryRow.$855();this.refreshGroupSummary(_1)}
return _6},isc.A.$33f=function isc_ListGrid__storeEditValues(_1,_2,_3,_4){var _5=this.getCellRecord(_1,_2);var _6=this.getEditSession(_1,_2)||this.createEditSession(_1,_2,_5,_4);if(this.dataSource!=null){if(_5=="loading"){_6.$33i=true}else if(_5!=null){var _7=this.getDataSource(),_8=_7.getPrimaryKeyFieldNames();for(var i=0;i<_8.length;i++){if(_5[_8[i]]!=null)_3[_8[i]]=_5[_8[i]]}}}
if(_5==null){_6.$33i=true;var _10=this.completeFields||this.fields||[],_11;for(var i=0;i<_10.length;i++){var _12=_10[i],_13=_12.name;if(_3[_13]===_11){var _14=this.getDefaultEditValue(_13,_12);if(_14!=null){_3[_13]=_14}}}}
for(var i in _6.$31x){delete _6.$31x[i]}
for(var i in _3){_6.$31x[i]=_3[i]}
if(this.$33j!=null&&_1>=this.$33j){this.$33j=_1}
if(this.$30a&&this.getEditRow()==_1){this.$165p(_3)}
var _6=this.getEditSession(_1,_2);if(_6){_6.$198b=true}},isc.A.getDefaultEditValue=function isc_ListGrid_getDefaultEditValue(_1,_2){var _3=_2.defaultValue;if(_3==null&&this.enumCriteriaAsInitialValues&&_2.type=="enum"&&this.$32d!=null&&this.$32d[_1]!=null)
{_3=this.$32d[_1]}
return _3},isc.A.createEditSession=function isc_ListGrid_createEditSession(_1,_2,_3,_4){var _5={};if(_3!=null&&_3!=Array.LOADING){_5.$33b=this.getPrimaryKeys(_3)}
_5.$24t=_1;if(this.useCellRecords){_5.$24u=_2;if(this.getCellFacetValues)_5.$507=this.getCellFacetValues(_1,_2)}
_5.$31x={};if(this.$52b==null)this.$52b={};if(_4==null){if(this.$33k==null)this.$33k=0;_4="_"+this.$33k++}
this.$52b[_4]=_5;if(this.$33a==null)this.$33a={};this.$33a[_1]=_4;return _5},isc.A.setEditValue=function isc_ListGrid_setEditValue(_1,_2,_3,_4,_5,_6,_7){if(isc.isA.String(_1)){this.logWarn("Warning: first parameter rowNum is a string, expecting a number");return false}
if(_6==null){_6=this.updateSummariesDuringEditing!=true}else{_6=_6||this.updateSummariesDuringEditing!=true}
var _8,_9,_10;if(isc.isA.Number(_2)){_8=this.getUnderlyingField(_2);_9=_8?_8.name:null
_10=this.getEditorName(_1,_8,true)}else{var _9=_2,_8=this.getUnderlyingField(_9);if(_8!=null){_10=this.getEditorName(_1,_8,true);_2=this.fields.indexOf(_8)}else{_10=_9;_2=-1}}
_10=this.$840(_10);var _11;if(_9!=null){_11=this.$2906[_9];this.$2906[_9]=true}
var _12=this.$33l(_1,_2,_10,_3,isc.CubeGrid&&isc.isA.CubeGrid(this)?true:_4,_5,_6,_7);if(!_12){if(!_11)delete this.$2906[_9];return false}
if(_7)_3=this.$30y(_1,_2,true);if(_8&&this.$425(_8)){var _13=false,_14;var _15=this.getEditForm(),_16=_15?_15.getItem(_9):null;if(_16&&this.getEditRow()==_1&&this.fieldValuesAreEqual(_8,_15.getValue(_9),_3))
{_13=true;_14=_16.$1416(_3)}
if(!_13&&(_8.valueField==null||_8.valueField==_9)&&(!_8.optionDataSource||isc.DS.get(_8.optionDataSource)==this.getDataSource()))
{var _17=this.data;if(isc.ResultSet&&isc.isA.ResultSet(_17))_17=_17.localData;if(_17){var _18=_17.find(_9,_3);if(_18){_13=true;_14=_18[_8.displayField]}}}
if(_13){if(this.$286&&this.getEditRow()==_1){if(_16&&_14==_16.emptyDisplayValue)_14=null;this.$286.setValue(_8.displayField,_14)}
this.setEditValue(_1,_8.displayField,_14,_4,true)}else{if(this.warnOnUnmappedValueFieldChange){this.logWarn("Edit value updated for field:"+_9+". This field has 'displayField' attribute specified as '"+_8.displayField+((_8.optionDataSource==null||isc.DataSource.get(_8.optionDataSource)==this.getDataSource())?"', and no unique optionDataSource, ":"', ")+"so display value is derived from the current record. In order to ensure the display value is updated to reflect the new edit-value for this field, developers can explicitly update the edit value for the display-field on this record. To avoid seeing this method set listGrid.warnOnUnmappedValueFieldChange to false.")}}}
if(_4){if(!_6){this.calculateRecordSummaries(_1,_8,true,true,false,false,true);if(_8){var _19=this.getEditSession(_1,_2);if(!_19.$1962)_19.$1962=[];if(!_19.$1962.contains(_8))_19.$1962.push(_8);this.$280a()}}
if(!_11)delete this.$2906[_9];return true}
this.setRowEditFieldName(_1,_9);if(!isc.isA.Number(_1)){_2=this.getEditSessionColNum(_1);_1=this.getEditSessionRowNum(_1)}
var _20={};_20[_9]=_3;if(this.$50r(_1,_2,_20)){if(!_6){this.calculateRecordSummaries(_1,null,true,null,null,null,true);if(_8){var _19=this.getEditSession(_1,_2);if(!_19.$1962)_19.$1962=[];if(!_19.$1962.contains(_8))_19.$1962.push(_8);this.$280a()}}}
if(!_11)delete this.$2906[_9];return true},isc.A.$280a=function isc_ListGrid__scheduleCalculateAsyncRecordSummariesAfterEdits(){this.fireOnPause("$280b",{methodName:"$280b"},this.calculateAsyncRecordSummariesAfterEditsDelay)},isc.A.$280b=function isc_ListGrid__calculateAsyncRecordSummariesAfterEdits(){if(this.updateSummariesDuringEditing!=true)return;var _1=this.$52b;if(!_1)return;var _2=[],_3=[];for(var _4 in _1){if(!Object.hasOwn(_1,_4))continue;var _5=_1[_4],_6=_5.$1962;if(!_6)continue;_3.addList(_6);_5.$1962=null;var _7=_5.$24t,_8;if(this.data&&isc.isA.Number(_7)&&_7<this.data.getLength()){_8=this.data.get(_7)}else{_8=_5.$31x}
_2.push(_8)}
this.calculateRecordSummaries(_2,_3,true,false,false,true,false)},isc.A.$33l=function isc_ListGrid__storeEditValue(_1,_2,_3,_4,_5,_6,_7,_8){var _9=true,_10=false,_11,_12,_13,_14;var _15=_3;if(_15.contains(isc.Canvas.$70l)){_15=this.$840(_15)}
_11=this.getEditSession(_1,_2);if(_11!=null){_12=_11.$31x;_13=isc.Canvas.$70o(_15,null,_12,this,true,"edit")}else{this.logInfo("creating new edit values for row: "+_1,"gridEdit");this.initializeEditValues(_1,_2,!_5,!_7);_11=this.getEditSession(_1,_2);_12=_11.$31x}
if(_13===_14){var _16=this.getCellRecord(_1,_2);_13=_16?isc.Canvas.$70o(_15,null,_16,this,true,"edit"):null}else _10=true;var _17=_13,_18=_4;var _19=this.getUnderlyingField(_3);if(_19&&_19.type){var _20=isc.SimpleType.getType(_19.type);if(_20&&_20.getAtomicValue!=null){_17=_20.getAtomicValue(_13,"compare");if(!_8)_18=_20.getAtomicValue(_4,"compare")}}
if((_17===undefined&&_18==null)||this.fieldValuesAreEqual(_19,_17,_18))_9=false;if(_4===_14){isc.Canvas.$70m(_3,_12,this,true)}else if(_10||_9){isc.Canvas.$70n(_15,(_8?_19:null),_4,_12,this,true);if(_8){_4=isc.Canvas.$70o(_15,null,_16,this,true)}}
if(_9&&!_6){this.$33m(_1,_2,_4,_13)}
if(_9&&this.$30a&&this.getEditRow()==_1){var _21={};_21[_3]=_4;this.$165p(_21)}
return _9},isc.A.setRowEditFieldName=function isc_ListGrid_setRowEditFieldName(_1,_2){var _3=this.getEditSession(_1);if(!_3){var _4=this.getColNum(_2);this.setEditValues([_1,_4],null,true);_3=this.getEditSession(_1)}
if(isc.isA.Number(_2))_2=this.getFieldName(_2);_3.$33n=_2},isc.A.getRowEditFieldName=function isc_ListGrid_getRowEditFieldName(_1){var _2=this.getEditSession(_1);return(_2?_2.$33n:null)},isc.A.getRowEditColNum=function isc_ListGrid_getRowEditColNum(_1){var _2=this.getRowEditFieldName(_1);return _2?this.getColNum(_2):null},isc.A.getEditValue=function isc_ListGrid_getEditValue(_1,_2){var _3=_2
if(isc.isA.String(_2))_2=this.getColNum(_2);if(this.$30a&&(this.getEditRow()==_1)&&(this.getEditCol()==_2))
{this.storeUpdatedEditorValue()}
return this.$30y(_1,_3,true)},isc.A.$30y=function isc_ListGrid__getEditValue(_1,_2,_3){var _4=this.$300(_1,_2);if(_4==null)return;var _5=this.getField(_2);if(_5&&!_3){return isc.Canvas.$70o(null,_5,_4,this,true,"edit")}else{var _6=this.getTrimmedFieldDataPath(_5||_2);return isc.Canvas.$70o(_6,null,_4,this,true,"edit")}},isc.A.clearEditValue=function isc_ListGrid_clearEditValue(_1,_2,_3,_4){var _5=(isc.isA.Number(_1)?_1:this.getEditSessionRowNum(_1));var _6=_2;if(isc.isA.Number(_6))_6=this.getEditorName(_5,_6);else _2=this.getColNum(_6);if(this.$30a){if(this.getEditRow()==_5&&this.getEditFieldName()==_6){this.storeUpdatedEditorValue(true)}}
var _7=this.getEditSession(_1,_2);if(_7==null)return;var _8=_7.$31x,_9=false,_10=_7.$33e,_11=this.hasErrors(),_12=_7.$33o,_13=_12&&_12[_6],_5=_7.$24t;if(_8!=null){var _14=_5==null?null:this.getRecord(_5);_9=isc.propertyDefined(_8,_6)&&((_5==null||_14==null)||!this.fieldValuesAreEqual(this.getField(_6),_8[_6],_14[_6]));delete _8[_6];if(_7.$1962){var _15=_7.$1962.findIndex("name",_6);if(_15>=0)_7.$1962.removeAt(_15)}
if(_10)delete _10[_6];if(_12!=null)delete _12[_6];if(!_4&&!(_14==null&&(!this.discardEmptyEditValuesForNewRows||(this.$30a&&this.getEditRow()==_5)))&&isc.isAn.emptyObject(_8))
{this.logDebug("no edit values left for row, discarding editSession","gridEdit");return this.$321(_1,_2,_3)}}
var _16=this.getField(_6);if(_16&&this.$425(_16)&&(_16.displayField!=_6)){this.clearEditValue(_1,_16.displayField,_3,_4)}
if(_3||_5==null)return;if(_9){var _17;if(this.$30a&&this.getEditRow()==_5){var _18=_14?_14[_6]:null;this.$286.setValue(_6,_18);_17=_2>=0&&this.canEditCell(_5,_2)&&this.$286.getItem(_6)}
if(_2>=0&&!_17)this.refreshCell(_5,_2)}else if(_13&&_2>=0){if(_13)this.showCellErrors(_5,_2)}
this.$234g(_11)},isc.A.$321=function isc_ListGrid__clearEditValues(_1,_2,_3){if(_1==null){return}
if(!isc.isA.String(_1))_1=this.getEditValuesID(_1,_2);var _4=this.getEditSession(_1);if(_4==null)return;var _5=_4.$24t;if(_5!=null)delete this.$33a[_5];if(_2==null)_2=_4.$24u;var _6=this.$52b[_1];delete this.$52b[_1];var _7=this.$34e();delete this.$33j;if(_5!=null&&_4.$33i){var _8=this.getEditRow();for(var i=_5+1;i<=_7;i++){var _10=this.getEditSession(i);var _11=_10.$24t;_10.$24t=i-1;this.$33a[i-1]=this.$33a[i];delete this.$33a[i]}
if(_8!=null&&_8>_5)this.$285-=1;if(!_3){if(this.$30a){if(_5==_8)this.hideInlineEditor();else{if(_5<_8)this.$50s(_8-1,null,"Earlier temp edit row removed")}}
if(this.body){var _12=this.frozenBody!=null?this.bodyLayout:this.body;_12.markForRedraw("clear edit values, remove row")}}}else if(_5!=null&&!_3&&!isc.isAn.emptyObject(_6.$31x)){var _13={},_14=this.data.get(_5);for(var _15 in _6.$31x){_13[_15]=_14?_14[_15]:null}
this.$50r(_5,_2,_13,_6.$33o)}},isc.A.newRecordForEditValues=function isc_ListGrid_newRecordForEditValues(_1,_2){var _3=this.getEditSession(_1),_4=_3.$31x;_3.$33b=this.getPrimaryKeys(_2);var _5=this.getDataSource().getPrimaryKeyFieldNames();for(var i=0;i<_5.length;i++){var _7=_5[i];_4[_7]=_2[_7]}
delete _3.$33i},isc.A.$31n=function isc_ListGrid__remapEditRows(_1){delete this.$33j;delete this.$33q;if(this.$52b==null)return false;var _2=false;var _3=this.getEditRow(),_4=this.getEditCol(),_5=false;var _6=this.data.getLength(),_7={};var _8=isc.getKeys(this.$52b);for(var i=0;i<_8.length;i++){var _10=_8[i],_11=this.$52b[_10];var _12=_11.$24t;var _13=this.$52p(_11,_6);if(_11.$33b==null)_6++;if(_13==null)continue;var _14=_13[0],_15=_13[1];if(_14!=null&&_14>=0){if(_14!=_12)_2=true;if(_3!=null&&_3==_11.$24t&&(!this.useCellRecords||(_4==_11.$24u)))
{_5=true;if(!_1)this.$50s(_14,_15,"remapEditRows")}
_7[_14]=_10;_11.$24t=_14;if(this.useCellRecords)_11.$24u=_15}else{if(_12!=null&&_12>=0)_2=true;var _16=this.getOriginalData();var _17=!this.dataSource||this.shouldSaveLocally()||(isc.ResultSet&&isc.isA.ResultSet(_16)&&_16.allRowsCached());if(_17&&!isc.isA.Tree(this.data)&&(!this.isGrouped||!this.data.find(_11.$33b)))
{if(!(_11.$31x&&_11.$31x[this.recordRemovedProperty]&&_11.$198b))
{this.logWarn("Record:"+this.echo(_11.$33b)+", is no longer present in this List. Clearing edit values for this record.","gridEdit")}
delete this.$52b[this.getEditValuesID(_10)]}else{this.logInfo("Record:"+this.echo(_11.$33b)+(_17?", hidden in grouped tree data. ":", lost from local cache in paged result set. ")+"Pending edits for this record will be maintained.","gridEdit");delete _11.$24t;delete _11.$24u;this.$33q=true}}}
this.$33a=_7;if(_3!=null&&!_5&&!_1){this.hideInlineEditor(true)}
return _2},isc.A.$74c=function isc_ListGrid__remapEmbeddedComponents(){if(!this.body||this.body.$29a==null)return;if(this.showRecordComponents&&this.recordComponentPoolingMode!="data"){this.$117w();return}
var _1=this.body.$29a,_2=_1?_1.length:0,_3=[];this.$74a=0;var _4=this.getTotalRows();for(var i=0;i<_2;i++){var _6=_1[i],_7=_6.embeddedRecord,_8=this.getPrimaryKeys(_7),_9=_6.$289,_10=_9==null||_9>=_4?null:this.data.get(_9),_11=false;if(!(_10===_7)){_9=this.findRowNum(_8);_11=true}
if(_9>=0){if(_11)_10=this.data.get(_9);if(_10&&!this.$916(_10)||!this.$917(_10).contains(_6))
{_6.$289=_9;_6.embeddedRecord=_10;this.$918(_10,_6);if(_6.isExpansionComponent){if(this.maxExpandedRecords==null||(this.$74a<this.maxExpandedRecords))
{this.$74a++;this.$92g(_10,true);this.$92h(_10,true);if(!this.canExpandMultipleRecords)this.$74b=_10}else{this.$92g(_10,false);this.$92h(_10,false);this.removeEmbeddedComponent(_10,_6,true);_3.add(_6);continue}}else{this.$92o(_10,_6.$81k,_6)}}}else{if(isc.isA.Tree(this.data)){var _12;if(isc.ResultTree&&isc.isA.ResultTree(this.data)){var _13=this.data.getDataSource().getPrimaryKeyFieldNames();_12=isc.applyMask(_7,_13)}else{_12=_7}
_10=this.data.find(_12)}
if(_10==null)_10=_7;if(this.$74d==false||(this.showRecordComponents&&this.recordComponentPoolingMode=="data")||(_6.isExpansionComponent)){if(_10!=null){var _14=_10[this.$92d+this.ID];if(_14!=null&&_14.length>0){_14.remove(_6.getID())}
if(_14&&_14.length==0){_10[this.$92d+this.ID]=null}
if(_6.isExpansionComponent){this.$92g(_10,false);this.$92h(_10,false)}}
_3.add(_6)}}}
if(_3.length>0){for(var i=0;i<_3.length;i++){var _15=_3[i];if(this.canExpandRecords){if(this.$74b&&this.$74b==_15.embeddedRecord)
delete this.$74b}
this.body.$29a.remove(_15);if(this.shouldDestroyOnUnembed(_15,this.$81l)){_15.markForDestroy()}else{_15.deparent()}}}},isc.A.$117w=function isc_ListGrid__remapVisibleEmbeddedComponents(){var _1=this.logIsDebugEnabled("recordComponents");if(!this.body||this.body.$29a==null)return;var _2=this.body.$29a,_3=[],_4=this.getDrawArea(),_5=[_4[0],_4[1]];if(_5[0]==null&&_5[1]==null)return;this.$74a=0;var _6=0,_7=0;if(_1){this.logDebug("START $117w - rowRange is: "+_5)}
for(var i=_5[0];i<=_5[1];i++){var _9=this.data.get(i),_10=_9?this.$92n(_9):null,_11=_10?isc.getValues(_10):null;if(_11){for(var j=0;j<_11.length;j++){var _13=_11[j];if(!_13||_13.isNullMarker)continue;if(_13.$289==i){if(_1){this.logDebug(_13.ID+" remains at rowNum "+i+": no action")}
_13.$117x=true;_7++;continue}
_13.$289=i;this.$918(_9,_13);_13.$117x=true;_6++;if(_13.isExpansionComponent){if(this.maxExpandedRecords==null||(this.$74a<this.maxExpandedRecords))
{if(_1){this.logDebug("ExpansionComponent "+_13.ID+" added at row "+i,"recordComponents")}
this.$74a++;this.$92g(_9,true);this.$92h(_9,true);if(!this.canExpandMultipleRecords)this.$74b=_9}else{if(_1){this.logDebug("Removed expansionComponent "+_13.ID+" from row "+i+": too many expanded records","recordComponents")}
this.$92g(_9,false);this.$92h(_9,false);this.removeEmbeddedComponent(_9,_13,true);_3.add(_13);continue}}else{if(_1){this.logDebug("recordComponent "+_13.ID+" added at row "+i,"recordComponents")}}}}}
if(this.recordComponentPoolingMode!="data"){for(var i=0;i<_2.length;i++){var c=_2[i];if(c.$117x)delete c.$117x;else{if(c==this.currentRollOverCanvas||c==this.currentRollUnderCanvas)continue;if(c.isBackgroundComponent||c.isExpansionComponent){var r=this.getRecordIndex(c.embeddedRecord);if(r>=0){if(c.isExpansionComponent)this.$74a++}else{if(c.isExpansionComponent&&c.embeddedRecord){this.$92g(c.embeddedRecord,false);this.$92h(c.embeddedRecord,false)}
_3.add(c)}}else if(c.isRecordComponent){if(_1){this.logDebug("adding recordComponent "+c.ID+" to remove list ","recordComponents")}
_3.add(c)}}}}
if(_3.length>0){for(var i=0;i<_3.length;i++){var _16=_3[i];var _17=this.$81s,_18=this.$81t;if(_18&&_18[_16.ID]!=null){delete _18[_16.ID];_17.remove(_16)}
if(this.canExpandRecords){if(this.$74b&&this.$74b==_16.embeddedRecord)
delete this.$74b}
if(_16.isRecordComponent&&this.recordComponentPoolingMode=="recycle"){if(_1){this.logDebug("$117w() about to clean up  recordComponent "+_16.ID,"recordComponents")}
this.$81w(_16)}else{this.body.$29a.remove(_16);if(this.shouldDestroyOnUnembed(_16,this.$81l)){if(_1){this.logDebug("$117w() calling  markForDestroy() on component "+_16.ID,"recordComponents")}
_16.markForDestroy()}else{if(_1){this.logDebug("$117w() deparenting component "+_16.ID,"recordComponents")}
_16.deparent()}}}}
if(_1){this.logDebug("END $117w:\n\tremappedCount = "+_6+"\n\tinPlaceCount = "+_7,"recordComponents")}},isc.A.$75n=function isc_ListGrid__remapEmbeddedComponentColumns(_1){if(_1.$29a==null)return;var _2=this.logIsDebugEnabled("recordComponents");var _3=_1.$29a,_4={},_5=false;for(var i=0;i<_1.fields.length;i++){_4[_1.fields[i].name]=i}
var _7=[];for(var i=0;i<_3.length;i++){var _8=_3[i].$81k;if(_8==null){continue}
var _9=_4[_8];if(_9==null){_7[_7.length]=_3[i]}else{if(_3[i].$57n!=_9){_5=true;_3[i].$57n=_9}}}
if(_7.length>0){for(var i=0;i<_7.length;i++){var _10=_7[i];if(_10.isRecordComponent&&this.recordComponentPoolingMode=="recycle"){if(_2){this.logDebug("$75n() about to clean up  recordComponent "+_10.ID,"recordComponents")}
this.$81w(_10);_5=true}else if(_10.removeOnHideField){_1.removeEmbeddedComponent(_10.embeddedRecord,_10);if(this.shouldDestroyOnUnembed(_10,this.$81p)){_10.markForDestroy()}}else{_5=true}}}
if(_5){_1.$29d()}},isc.A.$52p=function isc_ListGrid__calculateEditCell(_1,_2){var _3,_4,_5=_1.$33b;if(_5==null){_3=_2}else{var _6=_1.$31x,_7=false,_8;if(_1.$33o!=null&&!isc.isA.emptyObject(_1._validationErrors_))
{_7=true}else{for(var _9 in _6){if(_6[_9]!=_5[_9]||_5[_9]===_8){_7=true;break}}}
if(!_7&&_1.$24t!=null&&!this.isEditingRecord(_1.$24t,_1.$24u))
{this.logInfo("dropping empty editSession","gridEdit");delete this.$52b[this.getEditValuesID(_1)];return null}
_3=this.findRowNum(_5,_1);_4=this.findColNum(_5,_1)}
return[_3,_4]},isc.A.$wo=function isc_ListGrid__filter(_1,_2,_3,_4,_5){if(this.completeFields==null)this.setFields(this.fields);if(!_5&&(this.confirmDiscardEdits||this.autoConfirmSaveEdits)&&this.dataSource!=null)
{var _6=this.getOriginalData();if(this.hasChanges()&&!(isc.ResultSet&&isc.isA.ResultSet(_6)&&_6.compareCriteria(_2,_6.getCriteria())==0))
{this.$33t={type:_1,criteria:_2,callback:_3,requestProperties:_4}
this.showLostEditsConfirmation({target:this,methodName:"$33r"},{target:this,methodName:"$33s"});return}}
var _7=_2;if(isc.isA.Class(_7)){_7=isc.DynamicForm.getFilterCriteria(_7)}
var _8=this.getDataSource();if(!_8||!_8.isAdvancedCriteria)_8=isc.DS;if(_8.isAdvancedCriteria(_7)){_7=isc.DS.compressNestedCriteria(_7)}
this.setFilterValues(_7,true);if(this.showFilterEditor){if(!_7||isc.isAn.emptyObject(_7)){this.clearInternalFieldOperators()}}
return this.Super("$wo",[_1,_2,_3,_4],arguments)});isc.evalBoundary;isc.B.push(isc.A.combineUserCriteria=function isc_ListGrid_combineUserCriteria(_1){var _2=this.getDataSource();if(this.filterWindowCriteria){_1=(_2||isc.DS).combineCriteria(_1,this.filterWindowCriteria,"and",this.autoFetchTextMatchStyle)}
this.checkForSearchForm();if(this.searchFormCriteria){_1=(_2||isc.DS).combineCriteria(_1,this.searchFormCriteria,"and",this.autoFetchTextMatchStyle)}
return _1},isc.A.$33r=function isc_ListGrid__continueFilter(){var _1=this.$33t,_2=_1.type,_3=_1.criteria,_4=_1.callback,_5=_1.requestProperties;delete this.$33t;this.$wo(_2,_3,_4,_5,true)},isc.A.$33s=function isc_ListGrid__cancelFilter(){delete this.$33t},isc.A.showLostEditsConfirmation=function isc_ListGrid_showLostEditsConfirmation(_1,_2){this.$33u=_1;this.$33v=_2;if(this.autoConfirmSaveEdits){this.lostEditsCallback("save",null)}else{isc.confirm(this.confirmDiscardEditsMessage,"if(window[this.targetGridID])window[this.targetGridID].lostEditsCallback(value, this);",{targetGridID:this.getID(),buttons:[isc.Dialog.OK,{title:this.discardEditsSaveButtonTitle,width:75,click:"this.hide();this.topElement.returnValue('save');"},isc.Dialog.CANCEL]})}},isc.A.lostEditsCallback=function isc_ListGrid_lostEditsCallback(_1,_2){var _3=this.$33u,_4=this.$33v;delete this.$33u;delete this.$33v;if(_1==null){this.fireCallback(_4)}else if(_1==true){this.discardAllEdits();this.fireCallback(_3)}else if(_1=="save"){this.saveAllEdits(null,_3)}
if(_2)_2.targetGrid=null},isc.A.findRowNum=function isc_ListGrid_findRowNum(_1){var _2=this.getDataSource(),_3=isc.isA.Array(this.data);if(_2&&_3){var _4=_2.getPrimaryKeyFields(),_5=false;if(_4){for(var _6 in _4){if(_1[_6]==null){_5=false;break}
_5=true}}
if(!_5){if(!this.shouldSaveLocally()){this.logWarn("findRowNum(): Attempt to find row number on dataBound grid. Target record has no primary keys. Typically this is only supported where listGrid.saveLocally is true. Specified primaryKeys are :"+this.echo(_1))}
return this.data.indexOf(_1)}else{return _2.findByKeys(_1,this.data)}}
return this.data.indexOf(_1)},isc.A.findColNum=function isc_ListGrid_findColNum(_1){return-1},isc.A.$50s=function isc_ListGrid__moveEditor(_1,_2,_3){if(!this.$30a||_1==this.$285){return}
var _4=this.$285;this.logInfo(_3+": editSession: "+this.getEditValuesID(_1)+" with values: "+this.echo(this.$300(_1,_2))+" was being edited at row: "+_4+", will now edit at row: "+_1,"gridEdit");this.$285=_1;var _5=this.$286,_6=_5?_5.getItems():null;if(_6){for(var i=0;i<_6.length;i++){_6[i].rowNum=_1}}},isc.A.rowEditNotComplete=function isc_ListGrid_rowEditNotComplete(_1){return(this.$33a!=null&&this.$33a[_1]!=null)},isc.A.$33m=function isc_ListGrid__editorChange(_1,_2,_3,_4){var _5=this.getCellRecord(_1,_2);if(this.editorChange!=null)this.editorChange(_5,_3,_4,_1,_2);var _6=this.getFieldName(_2);if(this.editValueChanged!=null)
this.editValueChanged(_1,_6,_3,_4);if(this.$30a&&this.isEditingRecord(_1,_2)&&this.fields!=null){_5=isc.addProperties({},this.$300(_1,_2),_5);var _7=!this.editByCell?this.fields:[this.getEditField()];for(var i=0;i<_7.length;i++){var _9=_7[i],_10=this.$286.getItem(_9.name);if(_10==null)continue;var _11=this.getEditorValueMap(_9,this.getEditedRecord(_1,_2,true),_10);if(_10.valueMap!=_11){var _12=true;if(isc.isAn.Array(_11)&&isc.isAn.Array(_10.valueMap)){_12=!_11.equals(_10.valueMap)}else if(isc.isAn.Object(_11)&&isc.isAn.Object(_10.valueMap)){if(isc.getKeys(_11).equals(isc.getKeys(_10.valueMap))){_12=false;for(var _13 in _11){if(_11[_13]!=_10.valueMap[_13]){_12=true;break}}}}
if(_12)_10.setValueMap(_11)}}}},isc.A.getEditRow=function isc_ListGrid_getEditRow(){return this.$285},isc.A.getEditCol=function isc_ListGrid_getEditCol(){return this.$30u},isc.A.getEditField=function isc_ListGrid_getEditField(){return this.getField(this.getEditCol())},isc.A.getEditFieldName=function isc_ListGrid_getEditFieldName(){return this.getFieldName(this.getEditCol())},isc.A.getEditRecord=function isc_ListGrid_getEditRecord(){return this.getCellRecord(this.getEditRow(),this.getEditCol())},isc.A.cancelEditing=function isc_ListGrid_cancelEditing(_1){if(!this.$30a)return;this.discardEdits(this.getEditRow(),this.getEditCol(),false,_1)},isc.A.cellEditEnd=function isc_ListGrid_cellEditEnd(_1,_2){if(this.$51k&&_1!=isc.ListGrid.TAB_KEYPRESS&&_1!=isc.ListGrid.SHIFT_TAB_KEYPRESS&&_1!=isc.ListGrid.UP_ARROW_KEYPRESS&&_1!=isc.ListGrid.DOWN_ARROW_KEYPRESS&&_1!=isc.ListGrid.LEFT_ARROW_KEYPRESS&&_1!=isc.ListGrid.RIGHT_ARROW_KEYPRESS)delete this.$51k
var _3=this.getEditRow(),_4=this.getEditCol();if(_3==null&&_4==null)return;if(arguments.length>=2){this.setEditValue(_3,_4,_2)}
var _5=this.getFieldName(_4),_6=this.shouldCancelEdit(_3,_4,_1);if(_6)return this.cancelEditing(_1);var _7=this.getNextEditCell(_3,_4,_1);this.clearNewEditCell();if(_7==null){this.logInfo("cellEditEnd: ending editing, completion event: "+_1,"gridEdit");this.$33x(_1);return}
if(Array.isLoading(this.getCellRecord(_7[0],_7[1]))){return false}
this.$32f(_1,_3,_4,_7[0],_7[1])},isc.A.getUpdatedEditorValue=function isc_ListGrid_getUpdatedEditorValue(){if(!this.$30a)return;var _1=this.$286.getItem(this.getEditFieldName()),_2=this.getEditField(),_3;if(_1){if(_1.$10v())_1.updateValue();_3=_1.getValue();return this.$33y(_3,_2,this.getEditRow(),this.getEditCol())}else{return this.getEditDisplayValue(this.getEditRow(),this.getEditCol())}},isc.A.storeUpdatedEditorValue=function isc_ListGrid_storeUpdatedEditorValue(_1,_2){if(!this.isDrawn()||!this.$30a)return;var _3=this.getEditRow();if(_2==null)_2=this.getEditCol();var _4,_5=false,_6=this.getField(_2),_7=_6&&this.$2906[_6.name],_8=this.$286,_9=this.getEditFormItem(_2),_10;if(!_7&&_9){if(_9.$10v()){_9.updateValue()}else{if(_9.defaultValue!=null&&_9.getValue()==null)_9.setValue(null)}
var _11=_9.getValue();_10=this.$33y(_11,_6,_3,_2);if(_10===_4)_10=null;var _12=this.$30y(_3,_2);if(_12===_4||!this.fieldValuesAreEqual(_6,_12,_10)){var _13=isc.SimpleType.getType(_6.type);if(_13&&_13.getAtomicValue!=null){var _14=_8.getValue(_9.name);if(_11!=_10&&_13.updateAtomicValue!=null){_13.updateAtomicValue(_10,_14)}
_10=_14}
var _15=this.setEditValue(_3,_2,_10,true,_1,true)!=false;if(_15&&_6){var _16=this.getEditSession(_3,_2);if(!_16.$1962)_16.$1962=[];if(!_16.$1962.contains(_6))_16.$1962.push(_6)}
_5|=_15}}
if(this.allowEditFormValueManipulation){var _17=this.$2178,_18=_8.getChangedValues(true),_19=this.$300(_3,_2),_20=this.getCellRecord(_3,_2);var _21=_8.getFields();for(var i=0;i<_21.length;i++){if(this.$2906[_21[i].name])continue;var _23=_21[i].name,_11=_21[i].getValue();if(_11!=null&&_19!=null&&_19[_23]==null&&_21[i].isSetToDefaultValue()){_18[_23]=_11}}
var _24=this.$280n(this.getAllFields());for(var _25 in _18){if(!Object.hasOwn(_18,_25))continue;var _26=this.getUnderlyingField(_25),_27=this.getFieldNum(_25),_28=_18[_25];if(_19&&(_25 in _19)||_20&&(_25 in _20)){if(_6&&_25==_6.name)continue;if(_28===_4)continue;if(_8.getItem(_25)!=null&&_26){_28=this.$33y(_28,_26,_3,_27)}
if(_26&&this.$275o(_26)){continue}
var _29=_25 in _19?_19[_25]:_20[_25];if(_27>=0&&this.$329!=null){_29=this.$329(_29,_20,_3,_27)}
if(this.fieldValuesAreEqual(_26,_28,_29)){continue}}else{if(this.isMetaDataProperty(_25,false,_24))continue;if(this.fieldValuesAreEqual(_26,_28,_4))
{continue}}
if(_17[_25]==null&&_28===_4)continue;var _15=this.setEditValue(_3,_25,_28,true,true,true)!=false;if(_15&&_26){var _16=this.getEditSession(_3,_27);if(!_16.$1962)_16.$1962=[];if(!_16.$1962.contains(_26))_16.$1962.push(_26)}
_5|=_15}}
if(_5&&this.updateSummariesDuringEditing==true){this.calculateRecordSummaries(_3,null,true,true,false,false,true);this.$280a()}},isc.A.$32i=function isc_ListGrid__handleEditorExit(_1,_2,_3,_4){var _5=this.getCellRecord(_2,_3),_6=this.getField(_3),_7=this.getEditorName(_2,_6),_8=true;var _9=this.$286.getItem(_7);if(isc.isA.PopUpTextAreaItem(_9)){if(_9.$21t&&_9.$21t.isDrawn())_9.hidePopUp()}
if(isc.CubeGrid&&isc.isA.CubeGrid(this)&&this.selectionManager&&this.selectionManager.anySelected())
{this.selectionManager.deselectAll();this.fireSelectionUpdated()}
var _10=isc.EH.clickMaskRegistry.last();if(_6&&_6.editorExit!=null){isc.Func.replaceWithMethod(_6,"editorExit","editCompletionEvent,record,newValue,rowNum,colNum,grid");_8=(_6.editorExit(_1,_5,_4,_2,_3,this)
!=false)}
if(_8&&this.editorExit!=null){_8=this.editorExit(_1,_5,_4,_2,_3)!=false}
if(!_8)this.$200w(_10);return _8},isc.A.$32j=function isc_ListGrid__handleRowEditorExit(_1,_2,_3){if(this.rowEditorExit==null)return true;var _4=this.getRecord(_2),_5=isc.EH.clickMaskRegistry.last();var _6=this.rowEditorExit(_1,_4,_3,_2)!=false;if(!_6)this.$200w(_5);return _6},isc.A.$200w=function isc_ListGrid__restoreEditClickMask(_1){if(_1==isc.EH.clickMaskRegistry.last())this.$32t();else if(this.modalEditing){isc.logWarn("If you return 'false' from an editor exit check in which you raise a modal dialog, we won't re-raise the modal edit mask","gridEdit")}},isc.A.$30x=function isc_ListGrid__handleEditorEnter(_1,_2,_3,_4){var _5=this.getCellRecord(_2,_3),_6=this.getFieldName(_3),_7=this.getField(_3),_8=true;if(isc.isA.PopUpTextAreaItem(_1)&&_1.popUpOnEnter){_1.showPopUp(true)}
if(_7&&_7.editorEnter!=null){isc.Func.replaceWithMethod(_7,"editorEnter","record,value,rowNum,colNum,grid");_8=_7.editorEnter(_5,_4,_2,_3,this)!=false}
if(_8&&this.editorEnter!=null)
_8=this.editorEnter(_5,_4,_2,_3)!=false;return _8},isc.A.$30z=function isc_ListGrid__handleRowEditorEnter(_1,_2,_3){var _4=this.getRecord(_2);if(this.rowEditorEnter!=null)
return this.rowEditorEnter(_4,_3,_2)!=false;return true},isc.A.$32k=function isc_ListGrid__validationEnabled(){if(!isc.DS)return false;var _1=isc.DS.get(this.dataSource);return!this.neverValidate&&!(_1&&_1.useLocalValidators!=null&&_1.useLocalValidators==false)},isc.A.shouldSaveOnCellExit=function isc_ListGrid_shouldSaveOnCellExit(_1,_2){if(this.getCellRecord(_1,_2)==null)return false;return(this.saveByCell!=null?this.saveByCell:this.editByCell)},isc.A.shouldSaveOnRowExit=function isc_ListGrid_shouldSaveOnRowExit(_1,_2,_3){return true},isc.A.shouldValidateByCell=function isc_ListGrid_shouldValidateByCell(_1,_2,_3){var _4=this.getField(_2);if(_4&&_4.validateByCell!=null)return _4.validateByCell;return(this.validateByCell!=null?this.validateByCell:this.editByCell)},isc.A.shouldValidateByRow=function isc_ListGrid_shouldValidateByRow(_1,_2,_3){return this.autoValidate},isc.A.shouldCancelEdit=function isc_ListGrid_shouldCancelEdit(_1,_2,_3){if(_3==isc.ListGrid.ESCAPE_KEYPRESS){var _4=this.getField(_2),_5=_4.escapeKeyEditAction||this.escapeKeyEditAction;if(_5=="cancel")return true}
return false},isc.A.$33w=function isc_ListGrid__killEdit(_1,_2,_3){if(this.$32p!=_1)return;if(this.confirmCancelEditing){if(_3==null){var _4=this.getID()+".$33w('"+_1+"','"+_2+"',value);";isc.ask(this.cancelEditingConfirmationMessage,_4);var _5=isc.Dialog.Warn.toolbar.getButton(0);if(_5.isDrawn())_5.focus()
else isc.Timer.setTimeout({target:_5,methodName:"focus"},0);return}else if(_3==false)return}
var _6=this.getEditRow(),_7=this.getEditCol(),_8=this.getUpdatedEditorValue(),_9=this.getEditValues(_6,_7);if(!this.$32i(_2,_6,_7,_8)||!this.$32j(_2,_6,_9))
{return}
var _10,_11=[],_12=this.$285,_13=this.getEditValues(_12,_7),_14=this.body?this.body.getDrawArea():[null,null,1,0],_15=_14[2],_16=_14[3],_17;if(_13!=null){if(this.isNewEditRecord(_12,_7)){if(this.isDrawn())this.body.markForRedraw("clearing extra edit row");_10=true}else{for(var i=_15;i<=_16;i++){if(_13[this.getFieldName(i)]!==_17&&((this.editByCell&&this.$30u!=i)||!this.canEditCell(_12,i)))
{_11.add(i)}}}
this.$321(this.$285,_7,true);if(this.isGrouped&&this.$75i(_12)){_10=true}}
if(this.body){this.hideInlineEditor(true);if(this.isDrawn()){if(!_10){for(var i=0;i<_11.length;i++){this.refreshCell(_12,_11[i])}}}}
this.$165p()},isc.A.isNewEditRecord=function isc_ListGrid_isNewEditRecord(_1){var _2=this.getEditSession(_1);return _2&&_2.$33i},isc.A.endEditing=function isc_ListGrid_endEditing(){if(this.getEditRow()!=null)this.$33x(isc.ListGrid.PROGRAMMATIC)},isc.A.$33x=function isc_ListGrid__saveAndHideEditor(_1){if(this.$686()){this.saveEdits(_1);return}
if(_1==isc.ListGrid.ESCAPE_KEYPRESS&&this.escapeKeyEditAction=="ignore")
{return}
var _2=(_1==isc.ListGrid.TAB_KEYPRESS)?1:(_1==isc.ListGrid.SHIFT_TAB_KEYPRESS)?-1:null;var _3=this.getEditRow(),_4=this.getEditCol(),_5=this.getEditValue(_3,_4),_6=this.getEditValues(_3,_4);if(!this.$32i(_1,_3,_4,_5)||!this.$32j(_1,_3,_6))return;var _7=(this.autoSaveEdits&&this.shouldWaitForSave()),_8=(this.autoSaveEdits&&this.stopOnErrors),_9;if(_7)_9="if((success||!this.stopOnErrors)&&(this.$32p=="+this.$32p+"))this.hideInlineEditor(true, null, "+_2+");";var _10=(_1==isc.ListGrid.ESCAPE_KEYPRESS&&this.escapeKeyEditAction=="exit"),_11=this.autoSaveEdits&&!_10;if(_11){this.saveEdits(_1,_9)}else{var _12=this.getFieldName(_4);var _13=!_10&&this.$32k()&&(this.shouldValidateByCell(_3,_4,_1)||this.shouldValidateByRow(_3,_4,_1));if(_13){var _14;if(this.useCellRecords){_14=!this.validateCell(_3,_4)}else{_14=!this.validateRow(_3)}
if(this.stopOnErrors&&_14)return false}
if(!this.recordHasChanges(_3,_4,false,false)&&!this.hasSubmittedEditValues(_3,_4)&&!this.rowHasErrors(_3,_4))
{this.logInfo("editor hiding at "+[_3,_4]+", no actual changes, dropping editSession","gridEdit");this.$321(_3,_4)}}
if(!_7)this.hideInlineEditor(true,null,_2);else this.$32t();if(this.isGrouped&&(!_11||!this.shouldSaveLocally())){this.$75i(_3)}
this.$234g(false)},isc.A.saveAndEditNewCell=function isc_ListGrid_saveAndEditNewCell(_1,_2,_3){if(_3==null)_3=isc.ListGrid.PROGRAMMATIC;this.$32l(_1,_2,_3)},isc.A.$32l=function isc_ListGrid__saveAndStartEditing(_1,_2,_3){var _4=this.shouldWaitForSave(),_5;if(_4){_5="if((success||!this.stopOnErrors)&&(this.$32p=="+this.$32p+"))this.$31u("+_1+","+_2+");"}
this.saveEdits(_3,_5);if(!_4){this.$31u(_1,_2)}},isc.A.$33z=function isc_ListGrid__saveAndEditNextCell(_1,_2){var _3=this.getEditRow(),_4=this.getEditCol(),_5=isc.ListGrid.PROGRAMMATIC,_6=this.findNextEditCell(_3,_4,_1,_2,false);this.$32l(_6[0],_6[1],_5)},isc.A.saveAndEditNextCell=function isc_ListGrid_saveAndEditNextCell(){this.$33z(1,true)},isc.A.saveAndEditPreviousCell=function isc_ListGrid_saveAndEditPreviousCell(){this.$33z(-1,true)},isc.A.saveAndEditNextRow=function isc_ListGrid_saveAndEditNextRow(){this.$33z(1,false)},isc.A.saveAndEditPreviousRow=function isc_ListGrid_saveAndEditPreviousRow(){this.$33z(-1,false)},isc.A.getNextEditCell=function isc_ListGrid_getNextEditCell(_1,_2,_3){switch(_3){case isc.ListGrid.CLICK_OUTSIDE:case isc.ListGrid.ESCAPE_KEYPRESS:return null;case isc.ListGrid.ENTER_KEYPRESS:var _4=this.getField(_2),_5=_4.enterKeyEditAction||this.enterKeyEditAction;if(_5=="done")return null;else if(_5=="nextCell")
return this.findNextEditCell(_1,_2,1,true,false);else if(_5=="nextRow")
return this.findNextEditCell(_1,_2,1,false,false);else if(_5=="nextRowStart"){var _6=this.listEndEditAction||"done";if(_1+1<this.getTotalRows()||_6=="next"){return this.findNextEditCell(_1+1,0,1,true,true)}else{if(_6=="stop")return[_1,_2];return null}}
case isc.ListGrid.EDIT_FIELD_CHANGE:case isc.ListGrid.PROGRAMMATIC:return this.getNewEditCell();case isc.ListGrid.UP_ARROW_KEYPRESS:return this.findNextEditCell(_1,_2,-1,false,false);case isc.ListGrid.DOWN_ARROW_KEYPRESS:return this.findNextEditCell(_1,_2,1,false,false);case isc.ListGrid.TAB_KEYPRESS:case isc.ListGrid.RIGHT_ARROW_KEYPRESS:var _4=this.getField(_2);if(_4.nextTabColNum!=null){return this.findNextEditCell(_1+1,_4.nextTabColNum,1,true,true)}else{return this.findNextEditCell(_1,_2,1,true,false)}
case isc.ListGrid.SHIFT_TAB_KEYPRESS:case isc.ListGrid.LEFT_ARROW_KEYPRESS:var _4=this.getField(_2)
if(_4.previousTabColNum!=null){return this.findNextEditCell(_1-1,_4.previousTabColNum,-1,true,true)}else
return this.findNextEditCell(_1,_2,-1,true,false)}
this.logWarn("getNextEditCell(): Passed unrecognized editCompletionEvent type:"+_3+", returning null");return null},isc.A.findNextEditCell=function isc_ListGrid_findNextEditCell(_1,_2,_3,_4,_5,_6,_7,_8){var _9=_1,_10=_2,_11,_12=this.getFields().length;if(_12==0)return;_11=(_7?_9:(this.listEndEditAction=="next"||_6)?this.getTotalRows():this.getTotalRows()-1);if(_9>this.getTotalRows())_11=_9;var _13=this.canEditCell(_9,_10);if((_5!=false||_3==0)&&_9<=_11&&_9>=0&&_10<_12&&_10>=0&&_13&&(_8||this.$60w(_9,_10)))
{return[_9,_10]}
if(_3==0)return null;_13=_13&&this.$60w(_9,_10);var _14=_7?_9:0;if(_4){var _15=this.rowEndEditAction||"next";while(_9<(_11+1)&&_9>=_14){if(isc.ResultSet&&isc.isA.ResultSet(this.data)){if(_9<this.data.getLength()&&!this.data.rowIsLoaded(_9))return null}
_10+=_3;if(_15=="same"&&_2==_10){return _13?[_1,_2]:null}
if(_10<0||_10>=_12){if(_15=="done"||isc.isA.RecordEditor(this))return null;if(_15=="stop")return(_13?[_1,_2]:null)
else{_10=(_3>0?-1:_12);if(_15=="next")_9+=_3}}else if(this.canEditCell(_9,_10)&&(_8||this.$60w(_9,_10)))
{return[_9,_10]}}
if(this.listEndEditAction=="stop"||(this.listEndEditAction=="next"&&_9<_14))
{if(_13)return[_1,_2];else return null}else{return null}}else{_9+=_3;while(_9>=_14&&_9<=_11){if(this.canEditCell(_9,_10)&&(_8||this.$60w(_9,_10))){return[_9,_10]}
_9+=_3}
if(this.listEndEditAction=="stop"||(this.listEndEditAction=="next"&&_9<_14))
{return _13?[_1,_2]:null}
return null}},isc.A.$60w=function isc_ListGrid__canFocusInEditor(_1,_2){if(this.$167w)return false;var _3=this.getFieldName(_2),_4=this.getEditForm();var _5=_3||_2;if(_4==null){this.makeEditForm(_1,_2);_4=this.$286}
var _6=_4?_4.getItem(_5):null;if(_6)return _6.$kk();var _7=this.getField(_5);if(_7.canFocus!=null)return _7.canFocus;var _8=this.getEditorType(_7,this.getEditedRecord(_1));_8=isc.FormItemFactory.getItemClassName(_7,_8,null,true);var _9=_8=isc.FormItemFactory.getItemClass(_8);if(_9){var _10=_9.getPrototype(),_11=_10.canFocus;if(_11!=null)return _11;if(isc.isA.CanvasItem(_9)){return true}
if(_10.$kk)return _10.$kk()}
return false},isc.A.setNewEditCell=function isc_ListGrid_setNewEditCell(_1,_2){this.$330=[_1,_2]},isc.A.getNewEditCell=function isc_ListGrid_getNewEditCell(){if(this.canEditCell(this.$330[0],this.$330[1]))return this.$330;return null},isc.A.clearNewEditCell=function isc_ListGrid_clearNewEditCell(){this.$330=null},isc.A.discardAllEdits=function isc_ListGrid_discardAllEdits(_1,_2){if(_1==null)_1=this.getAllEditRows(true);else{for(var i=0;i<_1.length;i++){if(isc.isA.Array(_1[i]))_1[i]=this.getEditValuesID(_1[i][0],_1[i][1]);if(isc.isA.Number(_1[i]))_1[i]=this.getEditValuesID(_1[i])}}
if(_1==null)return;for(var i=0;i<_1.length;i++)this.discardEdits(_1[i],null,_2)},isc.A.discardEdits=function isc_ListGrid_discardEdits(_1,_2,_3,_4){if(_1==null)return;var _5;if(isc.isA.Number(_1)){_5=this.getEditValuesID(_1,_2)}else{_5=_1;_1=this.getEditSessionRowNum(_5,_2)}
var _6=this.recordMarkedAsRemoved(_1),_7=this.hasErrors();if(!_3&&this.$686()&&(!(this.getTotalRows()==1&&_1==0)))
{this.logInfo("Refusing to hide editor on 'discardEdits' [editCompletionEvent:"+_4+"] due to alwaysShowEditors settings","inactiveEditorHTML");_3=true}
if(!_3&&this.$30a&&this.getEditRow()==_1){if(_4==null)_4=isc.ListGrid.PROGRAMMATIC;this.$33w(this.$32p,_4)}else{if(this.$30a&&this.getEditRow()==_1){this.storeUpdatedEditorValue(true)}
this.$321(_5,_2);this.$165p();if(_6)this.refreshRow(_1)}
if(_1!=null){this.calculateRecordSummaries(_1,null,true,true)}
this.$234g(_7)},isc.A.saveEdits=function isc_ListGrid_saveEdits(_1,_2,_3,_4,_5,_6){if(_1==null)_1=isc.ListGrid.PROGRAMMATIC;if(_3==null){_3=this.getEditRow()
_4=this.getEditCol()}else if(_4==null){_4=(_3==this.getEditRow()?this.getEditCol():this.getRowEditColNum(_3))}
if(_3==null)return false;if(this.recordMarkedAsRemoved(_3)){if(_5){return true}
var _7=this.isNewEditRecord(_3,_4);if(_7){this.discardEdits(_3);this.$332(_2,_3,_4,_1,true);return}else{var _8=[];_8[this.recordRemovedProperty]=true;this.setEditValues(_3,_8,true,true);var _9=this;var _10=function(_19,_20,_21){_9.fireCallback(_2,"rowNum,colNum,editCompletionEvent,success",[_3,_4,_1,true])};this.removeData(this.getCellRecord(_3,_4),_10,null,true);return}}
var _11=this.getEditValues(_3,_4),_12=this.getCellRecord(_3,_4),_13=this.getEditValuesID(_3,_4);var _14;if(_12!=null&&!Array.isLoading(_12)){if(isc.isA.Tree(this.data)){_14=this.data.getCleanNodeData(_12,false)}else{_14=isc.addProperties({},_12)}
if(_14&&this.selectionManager){delete _14[this.selectionManager.selectionProperty]}}
var _15={rowNum:_3,colNum:_4,oldValues:_14,editValuesID:_13,values:_11,editCompletionEvent:_1,newRecord:(_3>this.data.getLength())};if(this.logIsDebugEnabled("gridEdit")){this.logDebug("change detection: newValues: "+this.echo(_11)+", oldValues: "+this.echo(_14),"gridEdit")}
var _16=this.recordHasChanges(_3,_4,false,false);if(!_6&&this.$32k()){if(_16){this.$81c=(_5||_16);var _17;if(this.useCellRecords){_17=!this.validateCell(_3,_4)}else{_17=!this.validateRow(_3)}
this.$81c=null;if(_17){if(!_5)this.$331(_15,_2);return false}}else{if(this.useCellRecords){if(this.cellHasErrors(_3,_4))this.clearFieldError(_3,_4)}else{if(this.rowHasErrors(_3))this.clearRowErrors(_3)}}}
if(_5)return true;if(!_16){this.logInfo("saveEdits: no actual change, not saving","gridEdit");if(!this.hasSubmittedEditValues(_13,_4)){this.$321(_13,_4)}
this.$332(_2,_3,_4,_1,true);return}
_11=this.$300(_3,_4);this.logInfo("Saving newValues '"+isc.echoAll(_11)+"'","gridEdit");this.rememberSubmittedEditValues(_3,_4);_11=isc.addPropertiesWithAssign({},_11);_11=this.getCleanRecordData(_11);var _18=this.saveEditedValues(_3,_4,_11,_14,_13,_1,_2);if(_18===false){this.$331(_15,_2);return false}
return true},isc.A.rowHasChanges=function isc_ListGrid_rowHasChanges(_1,_2,_3){return this.recordHasChanges(_1,null,_2,_3)},isc.A.recordHasChanges=function isc_ListGrid_recordHasChanges(_1,_2,_3,_4){if(_4==null)_4=true;var _5=false,_6=(_4?this.getEditValues(_1,_2):this.$300(_1,_2)),_7=this.getCellRecord(_1,_2),_8=_3?null:this.getSubmittedEditValues(_1,_2);if(!_7&&!_8)return true;var _9=isc.addProperties({},_7,_8);var _10=this.getFields().duplicate();for(var i=0;i<_10.length;i++){_10[i]=this.getEditFormItem(_10[i].name)||_10[i]}
if(isc.DataSource&&isc.isA.DataSource(this.getDataSource())){var _12=this.getDataSource().getFields(),_13=this.$2178,_14=this.$2179;for(var _15 in _12){var _16=_12[_15];if(_16.dataPath){if(!_14[_16.dataPath])_10.add(_16)}else if(_16.name){if(!_13[_16.name])_10.add(_16)}}}
var _17={},_18;for(var i=0;i<_10.length;i++){if(_10[i].name==this.removeRecordProperty)continue;var _19=_10[i].dataPath||_10[i].name;if(_19!=null){if(_17[_19]&&!isc.isA.FormItem(_10[i])){continue}
_17[_19]=_10[i];var _20=isc.Canvas.$70o(_19,null,_9,null,true,"compare",true);var _21=isc.Canvas.$70o(_19,null,_6,null,true,"compare",true);var _22=_19.split('/');if(_22.length>1){var _23="";for(var j=0;j<_22.length;j++){if(j>0)_23+="/";_23+=_22[j];if(!_17[_23]){_17[_23]=_10[i]}}}
if(_21===_18)continue;if(!this.fieldValuesAreEqual(_10[i],_20,_21)){return true}}}
if(this.canChangeNonFieldValues!==false){for(var _25 in _6){if(_17[_25])continue;if(_25==this.removeRecordProperty)continue;var _26=_9[_25],_27=_6[_25];if(!this.fieldValuesAreEqual(_25,_26,_27)){if(!(_26===undefined&&_27==null)){_5=true;break}}}}
return _5},isc.A.hasChanges=function isc_ListGrid_hasChanges(_1,_2){var _3=this.getAllEditRows();if(_3!=null){for(var i=0;i<_3.length;i++){if(this.recordMarkedAsRemoved(_3[i]))return true;if(this.rowHasChanges(_3[i],_1,_2))return true}}
return false},isc.A.cellHasChanges=function isc_ListGrid_cellHasChanges(_1,_2,_3){return this.$166v(_1,_2,_3,false)},isc.A.$166v=function isc_ListGrid__cellHasChanges(_1,_2,_3,_4){if(_1==null||_2==null)return false;var _5=(_3?this.getEditValues(_1,_2):this.$300(_1,_2));if(!_5)return false;var _6=this.getCellRecord(_1,_2);if(!_6)return true;var _7=this.getField(_2);if(_7==null)return false;var _8=!_7.dataPath&&isc.CubeGrid&&isc.isA.CubeGrid(this)?this.getValueProperty(_1,_2):null;var _9=isc.Canvas.$70o(_8,_7,_5,this,true,"compare");var _10;if(_9===_10)return false;var _11=_4?null:this.getSubmittedEditValues(_1,_2),_12;if(_11){_12=isc.Canvas.$70o(_8,_7,_11,this,true,"compare")}
if(_12==null){_12=isc.Canvas.$70o(_8,_7,_6,this,true,"compare")}
if(_12==null){_12=isc.Canvas.$70o(_8,_7,_11,this,true,"compare")}
return!this.fieldValuesAreEqual(_7,_12,_9)},isc.A.saveAllEdits=function isc_ListGrid_saveAllEdits(_1,_2){this.$333=this.$333||{};this.$90a=this.$90a||{};this.$334=this.$334||{};if(_1==null)_1=this.getAllEditCells();if(_1==null)return false;if(!isc.isAn.Array(_1))_1=[_1];if(this.$32k()){for(var i=0;i<_1.length;i++){var _4=isc.isAn.Array(_1[i])?_1[i][0]:_1[i],_5=isc.isAn.Array(_1[i])?_1[i][1]:null;var _6=this.recordMarkedAsRemoved(_4)||this.saveEdits(null,null,_4,_5,true);if(!_6){if(this.stopOnErrors)return false;else{_1[i]=null;_2=null}}}}
var _7=(this.dataSource!=null&&!this.shouldSaveLocally()),_8=false;if(_7)_8=!isc.RPCManager.startQueue();var _9=this.$31e++,_10=this.$333[_9]=[],_11=this.$90a[_9]=[];this.$334[_9]=_2;var _12=false;var _13=["this.$335('",,"',rowNum,"+_9+",colNum,editCompletionEvent,success)"];var _14=[];for(var i=0;i<_1.length;i++){if(_1[i]==null)continue;var _4=_1[i],_5;if(isc.isAn.Array(_4)){_5=_4[1];_4=_4[0]}
var _15=0;if(_14&&_14.length>0){for(var k=_14.length;k--;){if(_4>_14[k]){++_15}}}
_4-=_15;var _17=this.isNewEditRecord(_4,_5);var _18=this.recordMarkedAsRemoved(_4);if((!_7||_17)&&_18){_14.push(_4)}
if(!this.recordHasChanges(_4,_5)&&!_18){continue}
_12=true;var _19=this.getEditValuesID(_4,_5);_13[1]=_19;if(_18){_11[_11.length]=_19}else{_10[_10.length]=_19}
this.saveEdits(null,_13.join(""),_4,_5,false,true)}
if(_8){isc.RPCManager.sendQueue(null,null,null,true)}
return _12},isc.A.$335=function isc_ListGrid__saveAllEditsRowCallback(_1,_2,_3,_4,_5,_6){if(!_6){delete this.$334[_3];delete this.$333[_3];delete this.$90a[_3];return}
var _7=this.$333[_3],_8=this.$90a[_3];if(_7==null&&_8==null)return;var _9,_10,_11;for(_9=0;_9<_7.length;_9++){var _12=_7[_9];if(_12==_1){_10=true;break}}
if(!_10){for(_9=0;_9<_8.length;_9++){var _12=_8[_9];if(_12==_1){_10=true;break}}
if(_10)_11=true}
if(_11){_8.removeAt(_9)}else{_7.removeAt(_9)}
if(_7.length==0&&_8.length==0){this.$332(this.$334[_3],_2,_4,_5);delete this.$334[_3];delete this.$333[_3];delete this.$90a[_3]}});isc.evalBoundary;isc.B.push(isc.A.$33y=function isc_ListGrid__parseEditorValue(_1,_2,_3,_4,_5){var _6;if(_5===_6)_5=this.getCellRecord(_3,_4);if(_2&&_2.parseEditorValue!=null){isc.Func.replaceWithMethod(_2,"parseEditorValue","value,record,rowNum,colNum,grid");_1=_2.parseEditorValue(_1,_5,_3,_4,this)}else if(this.parseEditorValue!=null){_1=this.parseEditorValue(_1,_5,_3,_4)}
return _1},isc.A.saveEditedValues=function isc_ListGrid_saveEditedValues(_1,_2,_3,_4,_5,_6,_7){var _8={editValuesID:_5,rowNum:_1,colNum:_2,values:_3,oldValues:_4,editCompletionEvent:_6};if(this.shouldSaveLocally()){if(this.useRemoteValidators==true){var _9=false,_10=this.getDataSource(),_11=_10?_10.getFieldNames():null;if(_11!=null){for(var i=0;i<_11.length;i++){var _13=_10.getField(_11[i]),_14=_13.validators;if(_14==null)continue;if(!isc.isAn.Array(_14))_14=[_14];for(var _15=0;_15<_14.length;_15++){if(isc.Validator.isServerValidator(_14[_15])){_9=true;break}}
if(_9)break}}
if(_9){var _16={validationMode:"partial",prompt:isc.RPCManager.validateDataPrompt,showPrompt:this.shouldWaitForSave(),internalClientContext:{editInfo:_8,saveCallback:_7},componentID:this.ID};_10.validateData(_8.values,{target:this,methodName:"remoteValidationForLocalSaveComplete"},_16);if(this.$31o==null)this.$31o={};this.$31o[_8.editValuesID]=true;return}}
return this.$336(_8,_7)}
if(isc.Offline&&isc.Offline.isOffline()&&!this.dataSource.clientOnly){isc.warn(this.offlineSaveMessage);return false}
var _17=this;var _18=function(_24,_25,_26){_17.$337(_24,_26)},_19={operationId:(_4==null?this.addOperation:this.updateOperation)||this.saveOperation,application:this.application,willHandleError:true,showPrompt:this.shouldWaitForSave(),oldValues:_4,internalClientContext:{saveCallback:_7,newValues:_3,editInfo:_8},componentId:this.ID};var _20=this.getAllFields();if(_20!=null){for(var i=0;i<_20.length;i++){if(_20[i].includeFrom!=null&&this.getDataSource().getField(_20[i].name)==null)
{if(_19.additionalOutputs==null)_19.additionalOutputs="";else _19.additionalOutputs+=",";_19.additionalOutputs+=[_20[i].name,_20[i].includeFrom].join("!")}}}
if(this.saveRequestProperties){isc.addProperties(_19,this.saveRequestProperties)}
this.$338(_3,_4);if(this.$31o==null)this.$31o={};this.$31o[_8.editValuesID]=true;var _10=isc.DS.get(this.dataSource);if(_4==null){var _21=isc.addPropertiesWithAssign({},_3);_10.addData(_21,_18,_19)}else{var _22=isc.DS.get(this.dataSource).filterPrimaryKeyFields(_4),_23=isc.addProperties({},_22,_3);this.updateData(_23,_18,_19)}},isc.A.$336=function isc_ListGrid__saveLocally(_1,_2){var _3=_1.rowNum,_4=_1.colNum,_5=_1.oldValues,_6=_1.values;var _7=this.getCellRecord(_3,_4),_8=(_7==null);if(_8){var _9=this.getOriginalData();var _10=this.getEditSession(_3);_10.$33b=this.getPrimaryKeys(_6);delete _10.$33i;if(isc.ResultSet&&isc.isA.ResultSet(_9)){if(_9.allRows!=null){_9.allRows.add(isc.addProperties({},_6));_9.filterLocalData()}else{this.logWarn("Unable to add data to resultSet - allRows is not set")}}else{_9.add(_6);_9.dataChanged()}}else{var _11,_12,_13;var _14={};for(var i=0;i<this.completeFields.length;i++){var _16=this.completeFields[i],_17=this.getEditorName(_3,_16,true);_11=isc.Canvas.$70o(null,_16,_6,this,true,"edit");if(_11!==_13){var _18=this.fields.indexOf(_16);if(_18!=-1){this.setRawCellValue(_7,_3,_18,_11,true);_12=true}else{isc.Canvas.$70n(null,_16,_11,_7,this,true)}}
var _19=_17;if(_17.indexOf("/")>=0){_19=isc.DynamicForm.$840(_17,this)}
_14[_19]=true}
if(_12){var _20=this.getOriginalData(),_21=!this.forceRedrawOnDataChanged&&isc.ResultSet&&isc.isA.ResultSet(_20);if(_21){_20.dataChanged("update",_7,_3,_7)}else{_20.dataChanged()}}
this.combineValuesRecursively(_7,_6,_14)}
this.$338(_6,_5);this.$339(_1,_2);if(this.valuesManager!=null){this.valuesManager.$71e(_3,null,_7,this)}},isc.A.combineValuesRecursively=function isc_ListGrid_combineValuesRecursively(_1,_2,_3,_4,_5){if(_4==null)_4="";if(_5==null)_5=[];if(isc.isAn.Object(_1)&&!isc.isA.Date(_1)){if(_5.contains(_1))return;_5.add(_1)}
if(_3[_4]){return}
if(isc.isAn.Array(_2)){for(var i=0;i<_2.length;i++){var _7=_4==""?""+i:_4+"/"+i;if(isc.isAn.Object(_2[i])&&!isc.isA.Date(_2[i])){if(_1[i]==null)_1[i]=isc.isAn.Array(_2[i])?[]:{};this.combineValuesRecursively(_1[i],_2[i],_3,_7,_5)}else{_1[i]=_2[i]}}}else if(isc.isAn.Object(_2)&&!isc.isA.Date(_2)){for(var _8 in _2){var _7=_4==""?_8:_4+"/"+_8;if(isc.isAn.Object(_2[_8])&&!isc.isA.Date(_2[_8])){if(_1[_8]==null)_1[_8]=isc.isAn.Array(_2[_8])?[]:{};this.combineValuesRecursively(_1[_8],_2[_8],_3,_7,_5)}else{if(_3[_7]){}else{_1[_8]=_2[_8]}}}}},isc.A.remoteValidationForLocalSaveComplete=function isc_ListGrid_remoteValidationForLocalSaveComplete(_1,_2,_3){var _4=_1.internalClientContext,_5=_4.editInfo;if(this.$31o&&this.$31o[_5.editValuesID]){delete this.$31o[_5.editValuesID];if(isc.isAn.emptyObject(this.$31o))delete this.$31o}
if(_1.status<0&&_1.status!=isc.RPCResponse.STATUS_VALIDATION_ERROR){this.logWarn("Server-side validation failed: "+_1.data);isc.RPCManager.$a0(_1,_3);return}
var _6=this.$300(_5.editValuesID);if(_1.errors){var _7=isc.DynamicForm.getSimpleErrors(_1.errors),_8=false;for(var _9 in _7){_8=true;if(_6==null){this.logWarn("Asynchronous remote validation failed for attempted save of edits for row:"+_5.rowNum+" but edit values have subsequently been discarded. Ignoring validation failure.  Validation failure details:\n"+this.echoFull(_7));break}
var _10=_7[_9],_11=this.getField(_9);if(_10!=null&&_11!=null){var _12=_5.values[_9],_13=_6[_9];if(_12!=_13&&!(isc.isA.Date(_13)&&isc.isA.Date(_12)&&(_13.getTime()==_12.getTime())))
{this.logWarn("Asynchronous remote validation failed for attempted save of edits for row:"+_5.rowNum+". Submitted value for field "+_9+" was "+_12+", but the edit value has subsequently been modified and is now:"+_13+". Not showing the following validation error[s] for this field:\n"+this.echoAll(_10));continue}
if(!isc.isAn.Array(_10))_10=[_10];_10=_10.getProperty("errorMessage");var _14=this.getEditSessionRowNum(_5.editValuesID);this.setFieldError(_14,_9,_10,false)}}
if(_8)return}
this.$336(_5,_4.saveCallback)},isc.A.$338=function isc_ListGrid__unsortOnChange(_1,_2){var _3=this.getSort();if(_3==null||_3.length==0){return}
if(this.logIsInfoEnabled("sorting")){this.logInfo("unsort on change: current sort: "+this.echo(_3)+", newValues: "+this.echo(_1)+", oldValues: "+this.echo(_2))}
var _4,_5;if(_2==null)_4=true;else{for(var i=0,_7=_3.length;i<_7;++i){var _8=_3[i],_9=_8.property,_5;if(!isc.propertyDefined(_1,_9))continue;if(!isc.propertyDefined(_2,_9)||!this.fieldValuesAreEqual(_9,_2[_9],_1[_9]))
{if(this.logIsInfoEnabled("sorting")){this.logInfo("Value for current sort field '"+_9+"' has changed - grid will unsort")}
_4=true;break}}}
if(_4){this.unsort(true)}},isc.A.$337=function isc_ListGrid__updateRecordReply(_1,_2){var _3=_1.data,_4=_1.internalClientContext,_5=_4.editInfo,_6=_5.colNum,_7=this.fields[_6];if(this.$31o&&this.$31o[_5.editValuesID]){delete this.$31o[_5.editValuesID];if(isc.isAn.emptyObject(this.$31o))delete this.$31o}
var _8=this.getEditSession(_5.editValuesID);if(_8!=null){_5.rowNum=_8.$24t}else{if(_3&&_3[0]){_5.rowNum=this.findRowNum(_3[0]);if(this.useCellRecords)_5.colNum=this.findColNum(_3[0])}
else _5.rowNum=-1}
var _9=_5.rowNum,_6=_5.colNum;if(_1.status<0){var _10=this.parseServerErrors(_1.errors);this.logInfo("error on save, status: "+_1.status+", errors: "+this.echo(_1.errors),"gridEdit");if(isc.isAn.Array(_10)){if(_10.length!=1)
this.logWarn("Server reports validation errors for multiple records - only displaying errors for the first record.","gridEdit");_10=_10[0]}
if(this.useCellRecords)this.setCellErrors(_9,_6,_10[this.getEditorName(_9,_6)]);else this.setRowErrors(_9,_10);this.$331(_5,_4.saveCallback,_1,_2,_10);return false}
this.$339(_5,_4.saveCallback,_1,_2)},isc.A.parseServerErrors=function isc_ListGrid_parseServerErrors(_1){if(isc.isAn.Array(_1)){if(_1.length>1){this.logWarn("server returned errors for multiple records - dropping all but the first record returned")}
_1=_1[0]}
if(_1&&_1.recordPath)delete _1.recordPath;for(var _2 in _1){var _3=_1[_2];if(_3==null)_3="Unspecified error";if(isc.isAn.Array(_3)){for(var i=0;i<_3.length;i++){_3[i]=_3[i].errorMessage}}else if(_3.errorMessage){_1[_2]=[_3.errorMessage]}else{_1[_2]=[_3]}}
return _1},isc.A.$339=function isc_ListGrid__editCompleteCallback(_1,_2,_3,_4){if(this.$30a&&this.getEditForm().hasFocus)this.storeUpdatedEditorValue(true);var _5=_1.rowNum,_6=_1.colNum,_7=_1.editValuesID,_8=this.getEditSession(_7),_9=this.isNewEditRecord(_7);var _10;if(_3!=null){var _11=isc.DataSource.getUpdatedData(_4,_3,true),_10=isc.isAn.Array(_11)?_11[0]:_11;if(_10==null){return}
if(_8&&_8.$33b==null){this.newRecordForEditValues(_7,_10)}}else{_10=this.getCellRecord(_5,_6)}
var _12=_1.values,_13=this.$300(_7),_14=this.isEditingRecord(_5,_6),_15=this.dataSource?isc.DS.get(this.dataSource).getPrimaryKeyFieldNames():null;var _16=this.$280n(this.getAllFields());var _17=false;for(var _18 in _13){if(!Object.hasOwn(_13,_18))continue;if(this.isMetaDataProperty(_18,false,_16)){continue}
var _19=_15&&_15.contains(_18),_20=this.getField(_18);if(this.fieldValuesAreEqual(_20,_13[_18],_12[_18]))
{var _21=this.isDrawn()&&!this.isDirty()&&!this.body.isDirty()&&!this.fieldValuesAreEqual(_20,_12[_18],_10[_18]);if(!(_14&&_19))this.clearEditValue(_7,_18,!_21,true)}else{if(!_19)_17=true}}
if(!_14&&!_17&&!this.rowHasErrors(_5,_6)){this.$321(_7,_6)}
if(_3!=null||_9){if(_3!=null&&this.isGrouped){var _22=false;if(!_9){_22=true;var _23=this.getGroupByFields(),_24=_3.context&&_3.context.params?_3.context.params:{};for(var i=0;i<_23.length;i++){var _26=_23[i];if(_24[_26]!=null){_22=false;break}}}
if(_22)this.$113a=true}
this.displayUpdatedDSRecord(_5,_6,_10)}
var _27=_1.values,_28=_1.oldValues,_29=_1.editCompletionEvent;if(_5==-1)_5=_1.rowNum;if(this.convertToMethod("editComplete")){this.editComplete(_5,_6,_27,_28,_29,_3)}
this.$50u(_10,_5,_6,_27,_28,_4);if(_2)this.$332(_2,_5,_6,_29,true)},isc.A.displayUpdatedDSRecord=function isc_ListGrid_displayUpdatedDSRecord(_1,_2,_3){if(this.$31n()){this.suppressEditRowRemap=true;this.dataChanged();this.suppressEditRowRemap=false}else if(this.isGrouped){if(this.$113a&&!this.$52y){delete this.$113a;return}
this.regroup()}},isc.A.isEditingRecord=function isc_ListGrid_isEditingRecord(_1,_2){return this.getEditRow()==_1},isc.A.$332=function isc_ListGrid__fireSaveCallback(_1,_2,_3,_4,_5){if(_1!=null){this.fireCallback(_1,this.$31f,[_2,_3,_4,_5])}},isc.A.$50u=function isc_ListGrid__fireCellChanged(_1,_2,_3,_4,_5,_6){var _7,_8;for(var i in _4){var _10=(_5==null?null:_5[i]);if(_4[i]==_10)continue;var _11=this.fields.find("name",i);if(!_11)continue;if(this.isGrouped&&_11){var _12=this.getGroupByFields();if(_12.contains(_11.name))_7=true}
if(this.shouldAutoFitField(_11)){_8=true}
this.$34a(_1,_11,_4[i],_10,_2,this.fields.indexOf(_11))}
if(_8){if(this.shouldSaveLocally()){this.updateFieldWidthsForAutoFitValue("Local edit")}}
if(_7){if(this.shouldSaveLocally()){this.$607(_1,_1,_4)}
this.$34v=false;this.$34u()}},isc.A.$34a=function isc_ListGrid__cellChanged(_1,_2,_3,_4,_5,_6){if(_2&&_2.cellChanged){if(!isc.isA.Function(_2.cellChanged)){isc.Func.replaceWithMethod(_2,"cellChanged","record,newValue,oldValue,rowNum,colNum,grid,recordNum,fieldNum")}
_2.cellChanged.call(this,_1,_3,_4,_5,_6,this,_5,_6)}else if(this.cellChanged){this.cellChanged(_1,_3,_4,_5,_6,this,_5,_6)}},isc.A.$331=function isc_ListGrid__editFailedCallback(_1,_2,_3,_4,_5){var _6=_1.rowNum,_7=_1.colNum,_8=_1.values,_9=_1.oldValues,_10=_1.editCompletionEvent;var _11=this.getRecord(_6);if(_11!=null&&this.canExpandRecord(_11,_6)&&this.expansionMode=="editor")
{var _5=isc.isAn.Array(_3.errors)?_3.errors[0]:_3.errors,_11=this.getRecord(_6),_12=false;if(isc.isAn.Object(_5)){for(var _13 in _5){var _14=this.getField(_13);if(!_14||!this.fieldIsVisible(_14)){_12=true;break}}}
if(_12){this.expandRecord(_11)}}
if(this.convertToMethod("editFailed")){this.editFailed(_6,_7,_8,_9,_10,_3,_4)}
if(_2!=null)this.$332(_2,_6,_7,_10,false);this.clearSubmittedEditValues(_1.editValuesID,_8);if(!this.$30a&&_5){var _14=this.getField(_7);if(_14&&!_5[_14.name])this.refreshCell(_6,_7)}},isc.A.editFailed=function isc_ListGrid_editFailed(_1,_2,_3,_4,_5,_6,_7){if(_6!=null&&_6.errors==null){isc.RPCManager.$a0(_6,_7)}},isc.A.validateRow=function isc_ListGrid_validateRow(_1,_2){return this.validateRecord(_1,_2)},isc.A.validateRecord=function isc_ListGrid_validateRecord(_1,_2){var _3,_4;if(isc.isAn.Array(_1)){_3=_1[0];_4=_1[1]}else{_3=_1}
var _5=this.getEditValues(_3,_4);if(_5==null)return true;var _6=this.getCellRecord(_3,_4),_7=this.getFields().getProperty("name");var _8=isc.rpc.startQueue();if(this.$81c!=true){this.$131n=true;this.$131o=[]}
var _9=this.validateRowValues(_5,_6,_3,_7);if(this.$131n&&this.$131o.length>0){var _10={rowNum:_3},_11={editValuesID:this.getEditValuesID(_3,_4)};this.validateFieldsOnServer(this.$131o,this.getEditedRecord(_3,null,true),_10,_11)}
this.$131n=null;if(!_8)isc.rpc.sendQueue();this.setRowErrors(_3,_9,_2);return(_9==null)},isc.A.hasFieldDependencies=function isc_ListGrid_hasFieldDependencies(_1,_2){if(!_1||_2==null)return false;var _3=_1.dataPath;if(_3!=null){_3=this.$840(_3)}else{_3=_1.name}
var _4=this.getFieldDependencies(_1);if(_4==null){return isc.Canvas.$1683(_3,_1,_2,this,true,"compare")}
_4.add(_3);var _5;for(var i=0;i<_4.length;i++){if(_2[_4[i]]!==_5||_2.hasOwnProperty(_4[i])){return true}}
return false},isc.A.validateRowValues=function isc_ListGrid_validateRowValues(_1,_2,_3,_4){var _5=true,_6={};if(!isc.isAn.Array(_4))_4=[_4];var _7=false;if(_2==null){_7=true;_2={}}
for(var i=0;i<_4.length;i++){if(_4[i]==null)continue;var _9,_10;if(isc.isA.Number(_4[i])){_10=_4[i];_9=_4[i]=this.getFieldName(_10)}else{_9=_4[i];_10=this.getFields().findIndex("name",_9)}
if(_10<0)continue;var _11=((_7&&this.canEditCell(_3,_10))||this.hasFieldDependencies(this.getField(_10),_1));var _12,_13;var _14=this.getField(_9),_15=_14?_14.dataPath:null,_16;if(_15!=null){_15=this.$840(_15)}else{_15=_14.name}
_12=isc.Canvas.$70o(_15,_14,_1,this,true,"validate");_13=isc.Canvas.$70o(_15,_14,_2,this,true,"validate");if(!_11){_11=(_12!==_16&&(_13===_16||_13==null))}
if(!_11)continue;if(_12===_16)_12=_13;var _17=this.validateCellValue(_3,_10,_12,_13);if(_17!=null){_5=false;_6[_9]=_17}}
if(!_5)return _6;return null},isc.A.validateCell=function isc_ListGrid_validateCell(_1,_2,_3,_4){var _5;if(isc.isA.String(_2))_5=this.getColNum(_2);else{_5=_2;_2=this.getEditorName(_1,_5)}
if(this.$30a&&(this.getEditRow()==_1)&&this.getEditForm().getItem(_2)!=null)
{this.storeUpdatedEditorValue(null,_5)}
var _6=this.getEditValues(_1,_5),_7=this.getCellRecord(_1,_5);if(_7!=null&&(!_6||!this.hasFieldDependencies(this.getFieldByName(_2),_6)))
{return true}
var _8,_9=this.cellHasErrors(_1,_2),_10,_11,_12=this.getFieldByName(_2);if(!_6){_10=_8}else{_10=isc.Canvas.$70o(null,_12,_6,this,true,"validate")}
if(!_7){_11=_8}else{_11=isc.Canvas.$70o(null,_12,_7,this,true,"validate")}
if(_10===_8)_10=_11;var _13=this.validateCellValue(_1,_5,_10,_11,_4);if(_13!=null){this.setFieldError(_1,_2,_13);return false}
if(_9){this.setFieldError(_1,_2,null)}
return true},isc.A.validateCellValue=function isc_ListGrid_validateCellValue(_1,_2,_3,_4,_5){var _6=this.getField(_2),_7=this.getCellRecord(_1,_2);var _8=isc.isA.RecordEditor(this)&&this.isAFilterEditor();return this.validateFieldValue(_3,_4,_7,_6,_1,_2,_5,_8)},isc.A.getRequiredFieldMessage=function isc_ListGrid_getRequiredFieldMessage(_1,_2){return isc.Validator.requiredField},isc.A.validateFieldValue=function isc_ListGrid_validateFieldValue(_1,_2,_3,_4,_5,_6,_7,_8){var _9=[],_10=true;var _11=this.cellIsRequired(_5,_6)&&!_8;if(_11&&(_1==null||isc.isAn.emptyString(_1))){var _12=this.getRequiredFieldMessage(_4,_3);_9.add(_12);_10=false}
var _13=this.getCellValidators(_5,_6);if(_13){if(this.logIsDebugEnabled("gridEdit")){this.logDebug((this.useCellRecords?"At col:"+_6:"At field: "+_4.name)+" applying "+(_8?"type validators only from":"validators")+": "+this.echoAll(_13)+" to value: "+_1,"gridEdit")}
var _14,_15=this.getEditedRecord(_5,_6),_16=null,_17={rowNum:_5,colNum:_6};if(_8)_17.typeValidationsOnly=true;if(this.$81c==true){_17.skipServerValidation=true}else if(this.$131n==true){_17.deferServerValidation=true}
var _18=_4,_19=this.getEditForm();if(_19){var _20=_19.getItem(_4.name);if(_20)_18=_20}
if(_7){_14=this.validateFieldAndDependencies(_18,_13,_1,_15,_17)}else{_14=this.validateField(_18,_13,_1,_15,_17)}
if(_14!=null){if(_14.needsServerValidation){this.$131o.add(_4)}
if(_14.valid!=true){_10=false;if(_7)
_9=_14.errors[_4.name]||[];else
_9=_14.errors||[]}else{if(_14.resultingValue!=null){this.setEditValue(_5,_6,_14.resultingValue,null,null,null,true);_1=_14.resultingValue}}
_16=_14.errors;if(this.logIsInfoEnabled("gridEdit")){this.logInfo("validateFieldValue, newValue: "+this.echo(_1)+", passed validation: "+_10+", resultingValue: "+this.echo(_14.resultingValue),"gridEdit")}}}
if(_7){for(var _21 in _16){if(_21!=_4.name){this.setFieldError(_5,_21,_16[_21],true)}}}
if(_10)return null
else return _9},isc.A.cellIsRequired=function isc_ListGrid_cellIsRequired(_1,_2){var _3=this.getField(_2);return _3&&((_3.required||this.isXMLRequired(_3))&&!_3.conditionallyRequired)},isc.A.getCellValidators=function isc_ListGrid_getCellValidators(_1,_2){var _3=this.getField(_2);if(!_3)return null;var _4,_5=_3.validators,_6=this.getEditForm();if(_6){var _7=_6.getItem(_3.name);if(_7)_4=_7.validators}
if(_5&&_4){var _8=[];for(var i=0;i<_5.length;i++){var _10=_5[i];if(!_8.contains(_10)&&(!_10.ID||!_8.find("ID",_10.ID)))
{_8.add(_10)}}
for(var i=0;i<_4.length;i++){var _10=_4[i];if(!_8.contains(_10)&&(!_10.ID||!_8.find("ID",_10.ID)))
{_8.add(_10)}}
return _8}
return _5||_4||null},isc.A.getFieldEditorValidators=function isc_ListGrid_getFieldEditorValidators(_1){if(!_1)return null;var _2=[];var _3=_1.editorType?isc[_1.editorType]:null;if(_3&&_3.getPrototype&&_3.getPrototype().validators){_2.addList(isc.shallowClone(_3.getPrototype().validators))}
var _4=_1.editorProperties;if(_4&&_4.validators){_2.addList(isc.shallowClone(_4.validators))}
return _2.length>0?_2:null},isc.A.hasErrors=function isc_ListGrid_hasErrors(){var _1=this.getAllEditRows(true);for(var i=0;i<_1.length;i++){if(this.rowHasErrors(_1[i]))return true}
return false},isc.A.rowHasErrors=function isc_ListGrid_rowHasErrors(_1,_2){var _3=this.getEditSession(_1,_2);return(_3&&_3.$33o&&!isc.isA.emptyObject(_3.$33o))},isc.A.cellHasErrors=function isc_ListGrid_cellHasErrors(_1,_2){var _3=this.getEditorName(_1,_2),_4=this.getEditSession(_1,_2),_5=_4?_4.$33o:null;return(_5!=null&&_5[_3]!=null)},isc.A.getRowValidationErrors=function isc_ListGrid_getRowValidationErrors(_1){return this.getRowErrors(_1)},isc.A.getRowErrors=function isc_ListGrid_getRowErrors(_1,_2){var _3=this.getEditSession(_1,_2);return(_3!=null?_3.$33o:null)},isc.A.getCellErrors=function isc_ListGrid_getCellErrors(_1,_2){var _3=this.getEditSession(_1,_2);if(_3==null)return null;if(isc.isA.Number(_2))_2=this.getEditorName(_1,_2);var _4=_3.$33o;return(_4==null?null:_4[_2])},isc.A.setCellErrors=function isc_ListGrid_setCellErrors(_1,_2,_3,_4){return this.setFieldError(_1,_2,_3,_4)},isc.A.setFieldError=function isc_ListGrid_setFieldError(_1,_2,_3,_4){var _5=_2;if(isc.isA.Number(_5))_5=this.getEditorName(_1,_5);var _6=this.hasErrors();if(_3==null||(isc.isAn.Array(_3)&&_3.length==0)){if(!this.cellHasErrors(_1,_2))return;this.logDebug("setFieldError() passed empty errors- clearing the errors for row:"+_1+", field:"+_2,"gridEdit");var _7=this.getEditSession(_1,_2);delete _7.$33o[_5];if(isc.isAn.emptyObject(_7.$33o))delete _7.$33o}else{if(_5==null){this.logWarn("setFieldError() passed field identifier '"+_2+"'. Unable to find corresponding field in this grid - not setting error.");return}
var _8=this.getFields().getProperty("name");if(!_8.contains(_5)&&(!isc.CubeGrid||!isc.isA.CubeGrid(this)))
{this.logWarn("setFieldError() passed field identifier '"+_2+"'. This is not a visible field in the grid - error may not be visible to user.")}
var _9;if(isc.isAn.Array(_3))_9=_3
else _9=[_3];var _7=this.getEditSession(_1,_2);if(_7==null){var _10=this.getColNum(_2),_11=this.getCellRecord(_1,_10);_7=this.createEditSession(_1,_10,_11)}
this.logDebug("setFieldError() setting errors for row:"+_1+", field:"+_2+" to:"+this.echo(_9),"gridEdit");if(_7.$33o==null)_7.$33o={};_7.$33o[_5]=_9}
if(!_4){if(this.useCellRecords)this.showCellErrors(_1,_2)
else this.showErrors(_1,[_5])}
this.$234g(_6)},isc.A.addFieldErrors=function isc_ListGrid_addFieldErrors(_1,_2,_3,_4){this.setFieldError(_4,_1,_2)},isc.A.setRowErrors=function isc_ListGrid_setRowErrors(_1,_2,_3){if(_1==null||_1==-1)return;var _4=this.getRowErrors(_1);if(!_2&&!_4)return;var _5=this.getEditSession(_1);if(_5==null)_5=this.createEditSession(_1,null,this.getRecord(_1));if(_2){var _6=this.getFields().getProperty("name");for(var _7 in _2){if(!_3&&!_6.contains(_7)){this.logWarn("setRowErrors() passed error for non-visible field: '"+_7+"'")}
if(!isc.isAn.Array(_2[_7]))_2[_7]=[_2[_7]]}}
this.logDebug("setRowErrors() setting errors for row "+_1+" to "+this.echo(_2),"gridEdit");var _8=this.hasErrors();_5.$33o=_2;if(!_3){var _9=_2?isc.getKeys(_2):[];for(var _7 in _4){var _10=this.getColNum(_7);if(!_9.contains(_7))_9.add(_7)}
this.showErrors(_1,_9)}
this.$234g(_8)},isc.A.clearFieldError=function isc_ListGrid_clearFieldError(_1,_2,_3){return this.setFieldError(_1,_2,null,_3)},isc.A.clearRowErrors=function isc_ListGrid_clearRowErrors(_1,_2){this.setRowErrors(_1,null,_2)},isc.A.showErrors=function isc_ListGrid_showErrors(_1,_2){if(_2==null)_2=this.getFields().getProperty("name");var _3=this.getRowErrors(_1);if(_3==null)_3={};var _4;for(var i=0;i<_2.length;i++){var _6=_2[i];this.showCellErrors(_1,_6);if(_4==null&&_3[_6])_4=_6}
var _7=this.assembleErrorMessage(_3,_2);if(_7){this.displayRowErrorMessages(_7)}
if(this.stopOnErrors&&_4!=null){var _8=this.getColNum(_4);if(_8!=-1){this.showInlineEditor(_1,_8);return}
for(var _6 in _3){if(this.fieldIsVisible(_6)&&_3[_6]){this.showInlineEditor(_1,this.getColNum(_6))}}}},isc.A.showCellErrors=function isc_ListGrid_showCellErrors(_1,_2){var _3;if(isc.isA.Number(_2)){this.getEditorName(_1,_2)}else{_3=_2;_2=this.getColNum(_3)}
if(_2==-1)return;if(this.showErrorIcons){this.refreshCell(_1,_2,null,true)}else{this.body.$29h(null,_1,_2)}},isc.A.assembleErrorMessage=function isc_ListGrid_assembleErrorMessage(_1,_2){var _3=false,_4="Validation Errors occurred:\r\n";for(var _5 in _1){if(_2&&!_2.contains(_1))continue;var _6=this.$34b(_5,_1[_5]);if(_6!=null){_3=true;_4+=_6}}
return(_3?_4:null)},isc.A.$34b=function isc_ListGrid__createFieldErrorString(_1,_2){var _3,_4,_5=this.getField(_1),_6=_5&&_5.title?_5.title:_1;for(var i=0;i<_2.length;i++){var _8=_2[i];if(_8!=null){if(_4==null){_4="<br>Field '"+_6+"':"}
_4+="<br>* "+_8}}
return _4},isc.A.displayRowErrorMessages=function isc_ListGrid_displayRowErrorMessages(_1){if(this.stopOnErrors)isc.warn(_1,"var LG="+this.getID()+";if(LG.$286)LG.$286.focus()")},isc.A.removeData=function isc_ListGrid_removeData(_1,_2,_3,_4){_3=isc.addProperties({},_3);_3.internalClientContext={removeDataCallback:_2};var _5={fromUserAction:_4,rowNum:this.findRowNum(_1),colNum:null,values:_1,editCompletionEvent:isc.ListGrid.PROGRAMMATIC};_3.internalClientContext.editInfo=_5;_3.internalClientContext.$69t=_3.willHandleError;_3.willHandleError=true;if(this.getDataSource()!=null&&!this.shouldSaveLocally()){if(_1)_1=isc.addProperties({},_1);return this.Super("removeData",[_1,{target:this,methodName:"removeDataComplete"},_3],arguments)}
if(this.data){var _6=this.getEditValuesID(_1);if(_6!=null)this.discardEdits(_6);if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.shouldSaveLocally()){if(this.data.allRows!=null){this.data.allRows.remove(_1);this.data.filterLocalData()}else{this.logWarn("Unable to remove data from resultSet - allRows is not set")}}else{var _7=this.getOriginalData();_7.remove(_1)}
this.updateFieldWidthsForAutoFitValue("removeData");this.regroup()}
this.fireCallback({target:this,methodName:"removeDataComplete"},"dsResponse,data,dsRequest",[null,_1,_3])},isc.A.removeDataComplete=function isc_ListGrid_removeDataComplete(_1,_2,_3){var _4=_3.internalClientContext,_5=_4.editInfo,_6=_5.fromUserAction,_7=_5.rowNum,_8=_5.colNum,_9=_5.oldValues||_5.values,_10=_5.editCompletionEvent;var _11=_1==null||_1.status>=0;if(_11){if(!isc.isAn.Array(_2))_2=[_2];for(var i=0;i<_2.length;i++){var _13=this.getEditValuesID(_2[i]);if(_13!=null){this.discardEdits(_13)}}
var _14=_5.values||_5.oldValues,_7=_5.rowNum;if(_6&&this.convertToMethod("editComplete")){this.editComplete(_7,_8,_9,_9,_10,_1)}}else{var _15=_3.internalClientContext.$69t;if(!_15){isc.RPCManager.$a0(_1,_3)}
if(_6&&this.convertToMethod("editFailed")){this.editFailed(_7,_8,_9,_9,_10,_1,_3)}}
if(_4.removeDataCallback){this.fireCallback(_4.removeDataCallback,"dsResponse,data,dsRequest",[_1,_2,_3])}},isc.A.removeRecordClick=function isc_ListGrid_removeRecordClick(_1,_2){var _3=this.getRecord(_1);if(this.recordCanRemoveProperty&&_3!=null&&_3[this.recordCanRemoveProperty]==false)
{return}
if(this.onRemoveRecordClick(_1)==false)return;var _4=this.warnOnRemoval,_5=this.shouldDeferRemoval();if(_4&&_5&&this.recordMarkedAsRemoved(_1))_4=false;if(_4){isc.ask(this.warnOnRemovalMessage,this.getID()+".completeRemoveRecordClick(value, "+_1+","+_2+")")}else{this.completeRemoveRecordClick(true,_1,_2)}},isc.A.onRemoveRecordClick=function isc_ListGrid_onRemoveRecordClick(_1){return true},isc.A.completeRemoveRecordClick=function isc_ListGrid_completeRemoveRecordClick(_1,_2,_3){if(!_1)return;if(this.shouldDeferRemoval()){if(this.recordMarkedAsRemoved(_2)){this.unmarkRecordRemoved(_2)}else{this.markRecordRemoved(_2)}}else{var _4=this.getAllEditRows(),_5=_4.contains(_2);if(_5)this.discardEdits(_2,_3);var _6=this.getCellRecord(_2,_3);if(_6==null)return;this.delayCall("removeRecord",[_2,_6])}},isc.A.removeRecord=function isc_ListGrid_removeRecord(_1,_2){if(_2==null)_2=this.data.get(_1);else _1=(this.data?this.data.indexOf(_2):null)
if(_2==null||_1==null||_1==-1||!this.data)return;if(isc.Offline&&isc.Offline.isOffline()&&this.dataSource&&!this.dataSource.clientOnly){isc.warn(this.offlineSaveMessage);return}
var _3=this.animateRemoveRecord&&this.isDrawn()&&this.isVisible()&&this.body&&_1>=this.body.$252&&_1<=this.body.$253;if(this.fixedRecordHeights==false&&this.frozenFields!=null){_3=false}else if(this.$916(_2)){_3=false}
if(_3){this.$50w=true;var _4=1;if(isc.isA.Tree(this.data)&&this.data.isFolder(_2)&&this.data.isOpen(_2)){var _5=this.data.getChildren(_2);if(_5&&(!isc.isA.ResultSet(_5)||_5.lengthIsKnown())){_4+=_5.getLength()}}
this.$63o=_4;this.body.$28b(false,_1,_1+_4)}
var _6=this.getDataSource(),_7=(_6==null||this.shouldSaveLocally());if(!_7){if(!_6.getPrimaryKeyField()){this.logWarn("DataSource:"+_6+" has no primary key field - unable to remove records");return}}
var _8;if(_3){_8=this.getID()+".showRemoveCompleteAnimation("+_1+", data,dsResponse);"}
if(this.canExpandRecords&&this.isExpanded(_2))this.collapseRecord(_2);if(this.isSelected(_2))this.deselectRecord(_2);this.removeData(_2,_8,{showPrompt:false},true)});isc.evalBoundary;isc.B.push(isc.A.showRemoveCompleteAnimation=function isc_ListGrid_showRemoveCompleteAnimation(_1,_2,_3){if(_3&&_3.status<0){this.logWarn("Removal of record failed");_2=null}
if(!_2){delete this.$50w;if(this.body){delete this.body.$28c;delete this.body.$28e;delete this.body.$28f;delete this.body.$28h}
this.markForRedraw()}else{this.startRowAnimation(false,_1,_1+this.$63o,{target:this,methodName:"$63d"},this.animateRemoveSpeed,this.animateRemoveTime);delete this.$63o}},isc.A.$63d=function isc_ListGrid__removeDataAnimationComplete(){delete this.$50w;this.$212y=true;this.redraw()},isc.A.removeSelectedData=function isc_ListGrid_removeSelectedData(_1,_2,_3){var _4=this.getSelection();this.invokeSuper(isc.ListGrid,"removeSelectedData",_1,_2,function(_6){if(this.data&&(this.getDataSource()==null||this.shouldSaveLocally())){if(!isc.ResultSet||!isc.isA.ResultSet(this.data)||!this.shouldSaveLocally()){var _5=this.getOriginalData();if(_5!=this.data)_5.removeList(_4)}
this.updateFieldWidthsForAutoFitValue("removeSelectedData");this.regroup()}
if(_3){this.fireCallback(_3,"responses",[_6])}})},isc.A.startRowAnimation=function isc_ListGrid_startRowAnimation(_1,_2,_3,_4,_5,_6,_7,_8,_9){if(!this.body)return;this.finishRowAnimation();this.$64v=_4;if(this.frozenBody){this.frozenBody.startRowAnimation(_1,_2,_3,{target:this,methodName:"rowAnimationComplete",argNames:"body,hasFrozenBody",args:[this.frozenBody,true]},_5,_6,_7,_8,true,_9)}
this.body.startRowAnimation(_1,_2,_3,{target:this,methodName:"rowAnimationComplete",argNames:"body,hasFrozenBody",args:[this.body,(this.frozenBody!=null)]},_5,_6,_7,_8,true,_9)},isc.A.rowAnimationComplete=function isc_ListGrid_rowAnimationComplete(_1,_2){var _3=!_2||this.$64w;if(!_3){this.$64w=true}else{delete this.$64w;var _4=this.$64v;delete this.$64v;if(_4!=null)this.fireCallback(_4)}},isc.A.finishRowAnimation=function isc_ListGrid_finishRowAnimation(){if(this.body)this.body.finishRowAnimation();if(this.frozenBody)this.frozenBody.finishRowAnimation()},isc.A.animateRowHeight=function isc_ListGrid_animateRowHeight(_1,_2,_3,_4,_5,_6,_7){if(!this.body)return;return this.body.animateRowHeight(_1,_2,_3,_4,_5,_6,_7,true)},isc.A.setCellHeight=function isc_ListGrid_setCellHeight(_1){var _2=this.cellHeight;this.cellHeight=_1;if(this.body)this.body.cellHeight=_1;if(_2!=_1&&this.isDrawn()){this.body.markForRedraw("Cell height changed");if(this.frozenBody)this.frozenBody.markForRedraw("Cell height changed")}},isc.A.setRowHeight=function isc_ListGrid_setRowHeight(_1,_2){if(!this.body)return;if(this.frozenBody!=null)this.frozenBody.setRowHeight(_1,_2);return this.body.setRowHeight(_1,_2)},isc.A.getDragTrackerIcon=function isc_ListGrid_getDragTrackerIcon(_1){var _2=_1?_1[0]:null,_3;if(_2){var _4=this.getTitleField();_3=this.getValueIcon(this.getField(_4),_2[_4],_2)}
if(_3==null)_3=this.trackerImage;return _3},isc.A.getDragTrackerTitle=function isc_ListGrid_getDragTrackerTitle(_1,_2){var _3,_4=this.getTitleField(),_5=this.getFormattedValue(_1,_4,_1?_1[_4]:_3);return"<nobr>"+_5+"</nobr>"},isc.A.$288u=function isc_ListGrid__hasValidDragData(){var _1=this.getDragData();if(_1==null||_1.length==0){return false}
for(var i=0;i<_1.length;i++){if(!_1[i].$52e&&_1[i].canDrag==false){return false}}
return true},isc.A.$288t=function isc_ListGrid__shouldPreventNativeTouchMove(_1,_2){if(!this.useNativeDrag&&this.$195u()&&(this.canDragSelect||this.$288u()))
{this.logInfo("ListGrid drag - preventing default touch-move scroll","dragDrop");return true}
return false},isc.A.dragStart=function isc_ListGrid_dragStart(){var _1=isc.EH.getTarget();if(_1&&this.header&&this.header.contains(_1)){return false}
if(this.canDragSelect)return true;if(!this.$195u())return false;if(this.selectionType!="none"){const _2=this.$81e||this.body,_3=this.getEventRow(_2.getOffsetY(isc.EH.mouseDownEvent));var _4=this.getRecord(_3);if(!this.isSelected(_4)&&this.selectionAppearance!="checkbox"){if(this.selectionType=="single"){this.selectSingleRecord(_4)}else{if(this.selectionType=="simple")this.selectRecord(_4);else{if(isc.EH.ctrlKeyDown())this.selectRecord(_4);else this.selectSingleRecord(_4)}}}}
if(!this.$288u())return false;this.$1936=this.getDragData();return true},isc.A.dragMove=function isc_ListGrid_dragMove(){var _1=isc.EH.dropTarget;if(!this.canDragRecordsOut&&_1!=null&&_1!=this&&!this.contains(_1))
{return false}},isc.A.dropMove=function isc_ListGrid_dropMove(){var _1=this.willAcceptDrop();if(_1){if(this.canReorderRecords)this.showDragLineForRecord();this.body.clearNoDropIndicator();return false}else if(_1==null){return true}else{this.body.setNoDropIndicator();if(this.canReorderRecords)this.showDragLineForRecord();return false}},isc.A.dropOver=function isc_ListGrid_dropOver(){return this.dropMove()},isc.A.dropOut=function isc_ListGrid_dropOut(){this.body.clearNoDropIndicator();this.hideDragLine()},isc.A.dragStop=function isc_ListGrid_dragStop(){this.body.clearNoDropIndicator();this.hideDragLine();this.$1936=null},isc.A.willAcceptDrop=function isc_ListGrid_willAcceptDrop(){var _1=this.ns.EH;var _2=this.Super("willAcceptDrop",arguments);if(!_2&&_1.dragTarget!=this.body)return _2;if(_1.dragTarget==this){if(!this.$34c())return false}else{if(!this.canAcceptDroppedRecords)return null}
if(!_1.nativeDragging&&!_1.wasNativeDragging&&!isc.isAn.Object(_1.dragTarget.getDragData()))
{return null}
isc.$54j=true;var _3=this.getEventRecordNum(),_4=this.getEventFieldNum();var _5=this.getRecordDropPosition(_3);if(_3!=-2&&_5==isc.ListGrid.AFTER)_3+=1;isc.$54j=false;if(_3<-1){if(this.canDropInEmptyArea==false)return false;return true}
if(_3==-1)return false;var _6=this.getRecord(_3,_4);if(!this.recordIsEnabled(_6,_3,_4)||(_6!=null&&_6.canAcceptDrop==false))return false;return true},isc.A.$34c=function isc_ListGrid__canDragRecordsToSelf(){return this.canReorderRecords},isc.A.drop=function isc_ListGrid_drop(){if(this.willAcceptDrop()==false)return false;var _1=this.ns.EH.dragTarget;var _2=this.getDropIndex();var _3=_1.cloneDragData();var _4=(_2!=-2&&this.getTotalRows()>_2?this.data.get(_2):null);var _5=this.getRecordDropPosition(this.getEventRecordNum());if(this.onRecordDrop!=null&&(this.onRecordDrop(_3,_4,_2,_5,_1)==false))
{return false}
return this.recordDrop(_3,_4,_2,_1)},isc.A.recordDrop=function isc_ListGrid_recordDrop(_1,_2,_3,_4){this.transferRecords(_1,_2,(this.canReorderRecords?_3:null),_4);if(this.recordsDropped)this.recordsDropped(_1,_3,this,_4);return false},isc.A.viewRow=function isc_ListGrid_viewRow(_1){this.getDataSource().viewFile(this.getRecord(_1))},isc.A.downloadRow=function isc_ListGrid_downloadRow(_1){this.getDataSource().downloadFile(this.getRecord(_1))},isc.A.viewCell=function isc_ListGrid_viewCell(_1,_2){this.getDataSource().viewFile(this.getRecord(_1),_2)},isc.A.downloadCell=function isc_ListGrid_downloadCell(_1,_2){this.getDataSource().downloadFile(this.getRecord(_1),_2)},isc.A.autoSizeColumn=function isc_ListGrid_autoSizeColumn(_1){var _2=this.body,_3=this.fieldIsFrozen(_1),_4=this.getLocalFieldNum(_1);if(_3&&this.frozenBody){_2=this.frozenBody}
if(!_2)return;var _5=_2.getColumnAutoSize(_4);if(this.includeGridSummaryInAutoFitWidth&&this.showGridSummary&&this.summaryRow!=null){var _6=_3?this.summaryRow.frozenBody:this.summaryRow.body;if(_6!=null){var _7=_6.getColumnAutoSize(_4);if(_7>_5)_5=_7}}
if(_5!=null)this.$278j(_1,_5)},isc.A.getRecord=function isc_ListGrid_getRecord(_1,_2){return this.getCellRecord(_1,_2)},isc.A.getCellRecord=function isc_ListGrid_getCellRecord(_1,_2){if(!isc.isA.Number(_1)){this.logWarn("getCellRecord called with bad rowNum: "+this.echo(_1));return}
if(!this.data||0>_1||_1>=this.data.getLength())return null;var _3=this.data.get(_1);if(this.$33q)this.$34d(_3,_1);return _3},isc.A.$131w=function isc_ListGrid__getCachedCellRecord(_1,_2){if(!isc.isA.Number(_1)){this.logWarn("getCellRecord called with bad rowNum: "+this.echo(_1));return}
if(!this.data||0>_1||(isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown())||_1>=this.data.getLength())
{return null}
var _3=this.data.getCachedRow(_1);if(this.$33q)this.$34d(_3,_1);return _3},isc.A.$34d=function isc_ListGrid__testRowEditData(_1,_2){if(_1==null||_1[this.editValuesTestedProperty])return;if(this.$33a==null)this.$33a={};var _3=true;for(var i in this.$52b){var _5=this.$52b[i];if(_5!=null&&_5.$24t==null){if(this.comparePrimaryKeys(_1,_5.$33b)){_5.$24t=_2;this.$33a[_2]=i}else{_3=false}}}
if(_3)delete this.$33q;_1[this.editValuesTestedProperty]=true},isc.A.comparePrimaryKeys=function isc_ListGrid_comparePrimaryKeys(_1,_2){var _3=this.getPrimaryKeys(_1);if(!this.dataSource||this.shouldSaveLocally())return(_3==_2);for(var _4 in _3){if(_3[_4]!=_2[_4])return false}
return true},isc.A.getPrimaryKeys=function isc_ListGrid_getPrimaryKeys(_1,_2){if(isc.isA.Number(_1))_1=this.getCellRecord(_1,_2);if(this.shouldSaveLocally())return _1;var _3=this.getDataSource(),_4=_3.getPrimaryKeyFieldNames(),_5={};if(!isc.isAn.Array(_4))_4=[_4];for(var i=0;i<_4.length;i++){_5[_4[i]]=_1[_4[i]]}
return _5},isc.A.getTotalRows=function isc_ListGrid_getTotalRows(){if(this.data==null)return 0;if(this.data.getLength==null){this.logWarn("GetTotalRows: ListGrid has invalid data object:"+this.echo(this.data));return 0}
var _1=this.data.getLength(),_2=this.$34e();if(_2!=null&&_2+1>_1)_1=_2+1;if(this.shouldShowNewRecordRow())_1+=1;return _1},isc.A.getTotalCols=function isc_ListGrid_getTotalCols(){return this.fields.length},isc.A.$34e=function isc_ListGrid__getLastEditRow(){if(this.$33j==null){var _1=-1,_2=(this.$33a?isc.getKeys(this.$33a):[]);for(var i=0;i<_2.length;i++){var _4=parseInt(_2[i]);if(_4>_1)_1=_4}
this.$33j=_1}
return this.$33j},isc.A.recordIsEnabled=function isc_ListGrid_recordIsEnabled(_1,_2,_3){if(_1==null)return true;if(this.recordMarkedAsRemoved(_2))return false;return(_1[this.recordEnabledProperty]!=false&&_1[this.isSeparatorProperty]!=true)},isc.A.cellIsEnabled=function isc_ListGrid_cellIsEnabled(_1,_2,_3){if(this.isDisabled())return false;return this.recordIsEnabled(_1,_2,_3)},isc.A.getCellField=function isc_ListGrid_getCellField(_1,_2){return this.getField(_2)},isc.A.getFields=function isc_ListGrid_getFields(){return this.fields},isc.A.getUserFields=function isc_ListGrid_getUserFields(){return this.getAllFields().findAll({fieldName:"featureField",operator:"notEqual",value:true})},isc.A.getSpecifiedField=function isc_ListGrid_getSpecifiedField(_1){var _2=this.completeFields;if(_2==null)_2=this.fields;if(_2==null)return;var _3=null;if(isc.isAn.Object(_1)){if(_2.contains(_1))_3=_1;if(_3==null&&_1.name!=null){_3=this.getSpecifiedField(_1.name)}}else if(isc.isA.String(_1)){var _4=this.$2178;_3=_4?_4[_1]:_2.find("name",_1)}
else _3=_2[_1];if(_3)this.$172i(_3);return _3},isc.A.$172i=function isc_ListGrid__setFieldGridID(_1){if(_1&&!_1.componentID)_1.componentID=this.ID},isc.A.getFieldName=function isc_ListGrid_getFieldName(_1){var _2=this.getField(_1);return _2?_2.name:null},isc.A.getFieldByName=function isc_ListGrid_getFieldByName(_1){return this.getSpecifiedField(_1)},isc.A.getField=function isc_ListGrid_getField(_1){if(this.fields==null||_1==null)return null;var _2;if(this.$81g){_2=this.fields[_1];if(_2!=null&&this.$159l[_1]==null)return _2}else{if(isc.isA.Number(_1))return this.fields[_1]}
if(_1.$81f||isc.isAn.Object(_1))return _1;if(isc.isA.String(_1)){if(!_1.contains(isc.Canvas.$70l)){_2=this.fields.find("name",_1);if(_2)return _2}
var _3,_4,_5,_6=_1.trimCharacters(isc.Canvas.$70l),_7,_8,_9,_10;if(_1.startsWith(isc.Canvas.$70l)){_4=_1.substring(1);if(_1.endsWith(isc.Canvas.$70l)){_5=_1.substring(0,_1.length)}else{_3=_1+"/"}}else{if(_1.endsWith(isc.Canvas.$70l)){_5=_1.substring(0,_1.length);_3="/"+_1}else{_3="/"+_1+"/"}
_7="/"+_1}
var _11=_6.lastIndexOf(isc.Canvas.$70l);if(_11!=-1){_8=_6.substring(_11+1);_9=_8+"/"}
for(var i=0;i<this.fields.length;i++){var _13=this.fields[i].dataPath;if(!_13)continue;if(_13==_1||(_4&&_13==_4)||(_5&&_13==_5)||(_6&&_13==_6)||(_7&&_13==_7)||(_3&&_13==_3)||(_8&&_13==_8)||(_9&&_13==_9))
{return this.fields[i]}
var _14=this.$840(_13,this);if(_14==_1||(_4&&_14==_4)||(_5&&_14==_5)||(_6&&_14==_6)||(_7&&_14==_7)||(_3&&_14==_3)||(_8&&_14==_8)||(_9&&_14==_9))
{return this.fields[i]}}}
return null},isc.A.getColNum=function isc_ListGrid_getColNum(_1){return this.getFieldNum(_1)},isc.A.getFieldTitle=function isc_ListGrid_getFieldTitle(_1){var _2=this.getUnderlyingField(_1);if(!_2)return this.unknownFieldTitle;var _3;if(_2.getFieldTitle){isc.Func.replaceWithMethod(_2,"getFieldTitle","viewer,fieldNum");_3=_2.getFieldTitle(this,this.getFieldNum(_2))}else{_3=_2.title}
if(isc.isA.String(_3))return _3;return _2.name||this.unnamedFieldTitle},isc.A.getSummaryTitle=function isc_ListGrid_getSummaryTitle(_1){var _2;if(_1.getSummaryTitle!=null){isc.Func.replaceWithMethod(_1,"getSummaryTitle","viewer,field");_2=_1.getSummaryTitle(this,_1)}else if(_1.summaryTitle!=null){_2=_1.summaryTitle}else{_2=this.getFieldTitle(_1)}
return _2},isc.A.setValueMap=function isc_ListGrid_setValueMap(_1,_2){this.setFieldValueMap(_1,_2);if(this.$30a){var _3,_4;var _5=this.getColNum(_1);if(_5!=-1&&_5<this.fields.length){var _4=this.getField(_1),_3=_4.name;var _6=this.$286.getItem(_3);if(_6!=null)delete _6.$199m;this.$286.setValueMap(_3,this.getEditorValueMap(_4,this.getEditedRecord(this.getEditRow(),_5)))}}
if(this.summaryRow){this.summaryRow.setValueMap(_1,_2)}
if(this.isDrawn()&&this.isVisible()){this.$25a("setValueMap")}},isc.A.getDisplayValue=function isc_ListGrid_getDisplayValue(_1,_2,_3){var _4=isc.isAn.Object(_1)?_1:this.getSpecifiedField(_1),_5=_4?_4.valueMap:null;var _6=this.$1416(_4,_5,_4&&_4.displayField,_2,_3);if(_6!=null&&!isc.isA.String(_6))_6=""+_6;return _6},isc.A.$1416=function isc_ListGrid__getDisplayValue(_1,_2,_3,_4,_5){if(this.getDisplayValue!=isc.ListGrid.getInstanceProperty("getDisplayValue")){return this.getDisplayValue(_1,_4,_5)}
if(_1){if(isc.isAn.Object(_2)&&!isc.isAn.Array(_2)&&isc.propertyDefined(_2,_4))
{return _2[_4]}else if(_5&&_3){_4=_5[_3]}}
return _4},isc.A.getData=function isc_ListGrid_getData(){return this.data},isc.A.getRecordIndex=function isc_ListGrid_getRecordIndex(_1){var _2=-1;if(this.body&&this.body.isDrawn()){_2=this.data.indexOf(_1,this.body.$252,this.body.$253)}
if(_2==-1)_2=this.data.indexOf(_1);return _2},isc.A.getRowNum=function isc_ListGrid_getRowNum(_1){return this.getRecordIndex.apply(this,arguments)},isc.A.getRecordCellIndex=function isc_ListGrid_getRecordCellIndex(_1,_2){var _3=this.getRecordIndex(_1);return _3>=0?[_3,_2]:[-1,-1]},isc.A.getCellCoordinates=function isc_ListGrid_getCellCoordinates(_1){return this.getRecordCellIndex(_1,0)},isc.A.getEventRow=function isc_ListGrid_getEventRow(_1){if(this.header&&this.header.containsPoint(this.ns.EH.getX(),this.ns.EH.getY())){return-1}
if(this.$81e)return this.$81e.getEventRow(_1);return this.body.getEventRow(_1)},isc.A.getEventColumn=function isc_ListGrid_getEventColumn(_1){var _2=(_1!=null?_1:this.getOffsetX()),_3=0,_4=0;if(this.frozenBody)_4=this.frozenFields.length;if(_4>0&&_2<this.frozenBody.getVisibleWidth()){_3=this.frozenBody.getEventColumn(_1)}else{_3=this.body.getEventColumn(_1)+_4}
return _3},isc.A.getEventRecordNum=function isc_ListGrid_getEventRecordNum(_1){return this.getEventRow(_1)},isc.A.getEventFieldNum=function isc_ListGrid_getEventFieldNum(_1){return this.getEventColumn(_1)},isc.A.$132o=function isc_ListGrid__getRecordDropPosition(_1,_2,_3){if(!_3)_3=this.recordDropAppearance;var _4=_2-this.body.getRowTop(_1),_5=this.body.getRowSize(_1);if(_3==isc.ListGrid.BETWEEN){if(_4>Math.round(_5/2)){return isc.ListGrid.AFTER}else{return isc.ListGrid.BEFORE}}else if(_3==isc.ListGrid.BOTH){if(_4<Math.round(_5/4)){return isc.ListGrid.BEFORE}else if(_4>Math.round(3*_5/4)){return isc.ListGrid.AFTER}else{return isc.ListGrid.OVER}}},isc.A.getRecordDropPosition=function isc_ListGrid_getRecordDropPosition(_1,_2,_3){if(this.recordDropAppearance==isc.ListGrid.OVER)return isc.ListGrid.OVER;if(this.recordDropAppearance==isc.ListGrid.BODY)return null;if(_2==null)_2=this.body.getOffsetY();if(_1==null)_1=this.getEventRow(_2);if(_1==-2)return isc.ListGrid.AFTER;if(_1>=this.getTotalRows())return isc.ListGrid.BEFORE;return this.$132o(_1,_2,_3)},isc.A.getDropIndex=function isc_ListGrid_getDropIndex(_1,_2){if(this.data.getLength()==0){return 0}
if(_1==null)_1=this.getEventRow();if(_2==null)_2=this.getRecordDropPosition(_1);if(this.canReorderRecords){if(_1==-2)_1=this.data.getLength()-1;if(_2==isc.ListGrid.AFTER)_1++}
return _1},isc.A.getSerializeableFields=function isc_ListGrid_getSerializeableFields(_1,_2){_1=_1||[];_1.addList(["header","selection"]);return this.Super("getSerializeableFields",[_1,_2],arguments)},isc.A.getUISummary=function isc_ListGrid_getUISummary(_1,_2){_2=_2||[];_2.add("body");var _3=[];_3.addList(_1);_3.addList(_2);var _4=_3.contains("data");if(!_4)_2.add("data");var _5=this.Super("getUISummary",[_1,_2]);if(_5.canDragRecordsOut||_5.canReorderRecords){delete _5.canDrop;delete _5.canDrag}
if(_5.canAcceptDroppedRecords||_5.canReorderRecords){delete _5.canAcceptDrop}
if(this.data){_5.totalRows=this.getTotalRows();var _6=this.getVisibleRows();if(_6){_5.firstVisibleRow=_6[0];_5.lastVisibleRow=_6[1];if(!_4){var _7=this.data.getRange(_6[0],_6[1]+1);this.$255e(_7,_5)}}}
return _5},isc.A.$255e=function isc_ListGrid__normalizeUISummaryGridData(_1,_2){for(var i=0;i<_1.length;i++){_1[i]=this.getCleanRecordData(_1[i])}
_2.visibleRows=_1},isc.A.deriveFrozenFields=function isc_ListGrid_deriveFrozenFields(){var _1=this.frozenFields=this.fields.findAll("frozen",true),_2=this.fields.findAll("autoFreeze",true),_3=this.fields.findAll("$74j",true);if(_1&&_3&&_1.length==_3.length){for(var i=0;i<_3.length;i++){var _5=_3[i];_5.frozen=false;delete _5.$74j}
_1=this.frozenFields=null}
var _6=this.completeFields.findAll("frozen",true);if(_1&&_1.length==this.fields.length){_1=this.frozenFields=null;this.$54d=true}else this.$54d=false;if(_1){if(_2){for(var i=0;i<_2.length;i++){var _5=_2[i];if(!_5.frozen){_5.frozen=true;_5.$74j=true;var _7=_5.getAutoFreezePosition?_5.getAutoFreezePosition():this.freezeStart()?0:this.fields.length,_8=_5.getAutoFreezePosition?_5.getAutoFreezePosition():this.freezeStart()?0:this.completeFields.length;_1.addAt(_5,_7);_6.addAt(_5,_8)}}}
this.fields.slideList(_1,this.freezeStart()?0:this.fields.length);this.completeFields.slideList(_6,this.freezeStart()?0:this.completeFields.length);this.resizeFieldsInRealTime=false}
for(var i=0;i<this.fields.length;i++){var _5=this.fields[i];_5.masterIndex=i}
if(_1){var _9=this.normalFields=[];for(var i=0;i<this.fields.length;i++){var _5=this.fields[i];if(!_5.frozen)_9.add(_5)}}else this.normalFields=null},isc.A.rebuildForFreeze=function isc_ListGrid_rebuildForFreeze(_1){if(!this.body)return;if(this.filterEditor){for(var i=0;i<this.completeFields.length;i++){var _3=this.completeFields[i],_4=this.filterEditor.getSpecifiedField(_3.name);if(_4){if(_3.frozen)_4.frozen=true;else delete _4.frozen}}
this.filterEditor.deriveVisibleFields();this.filterEditor.updateBody(_1);this.filterEditor.remapEditFieldsForFreeze();this.filterEditor.layoutChildren(this.$60m)}
this.endEditing();this.deriveVisibleFields();this.updateHeader();if(this.summaryRow&&this.showGridSummary){this.summaryRow.setFields(this.completeFields.duplicate())}
this.updateBody(_1);this.layoutChildren(this.$60m);if(this.frozenBody){this.frozenBody.markForRedraw("Recalculating draw area from initial sizing of body")}
if(this.summaryRow&&this.showGridSummary)this.summaryRow.$855();if(this.showRecordComponents&&this.recordComponentPoolingMode=="data"){if(this.$89r){var _5=isc.getValues(this.$89r),_6=_5.length;for(var i=_6-1;i>=0;i--){var _7=_5[i];if(!this.data.contains(_7.embeddedRecord))continue;this.addEmbeddedComponent(_7,_7.embeddedRecord);delete this.$89r[_7.ID]}}}
this.updateHeaderRadius()},isc.A.setCanFreezeFields=function isc_ListGrid_setCanFreezeFields(_1){this.canFreezeFields=_1;delete this.$60v},isc.A.refreshMasterIndex=function isc_ListGrid_refreshMasterIndex(){if(this.fields)this.$51c(this.fields);if(!this.body)return;if(this.header)this.$51c(this.header.getMembers());if(this.body)this.$51c(this.body.fields||[]);if(!this.frozenFields)return;if(this.frozenHeader)this.$51c(this.frozenHeader.getMembers());if(this.frozenBody)this.$51c(this.frozenBody.fields)},isc.A.$51c=function isc_ListGrid__refreshMasterIndexForFields(_1){for(var i=0;i<_1.length;i++){_1[i].masterIndex=this.fields.findIndex("name",_1[i].name)}},isc.A.getFreezeOn=function isc_ListGrid_getFreezeOn(){return(this.freezeOn!=null?this.freezeOn:(this.isRTL()?"right":"left"))},isc.A.freezeLeft=function isc_ListGrid_freezeLeft(){return this.getFreezeOn()=="left"},isc.A.freezeStart=function isc_ListGrid_freezeStart(){if(this.isRTL()){return this.getFreezeOn()=="right"}else{return this.getFreezeOn()=="left"}},isc.A.getLeftBody=function isc_ListGrid_getLeftBody(){var _1=this.freezeLeft()
return this.frozenFields&&_1?this.frozenBody:this.body},isc.A.getRightBody=function isc_ListGrid_getRightBody(){var _1=this.freezeLeft();return this.frozenFields&&!_1?this.frozenBody:this.body},isc.A.setFreezeOn=function isc_ListGrid_setFreezeOn(_1){var _2=this.get
this.freezeOn=_1;if(_1!=_2)this.rebuildForFreeze(true)},isc.A.getFrozenSlots=function isc_ListGrid_getFrozenSlots(_1){var _2=this.frozenFields;if(!_2)return _1;return this.freezeStart()?_1.slice(0,_2.length):_1.slice(_1.length-_2.length)},isc.A.getUnfrozenSlots=function isc_ListGrid_getUnfrozenSlots(_1){var _2=this.frozenFields;if(!_2)return _1;return this.freezeStart()?_1.slice(_2.length):_1.slice(0,_1.length-_2.length)},isc.A.fieldIsFrozen=function isc_ListGrid_fieldIsFrozen(_1){if(!this.frozenFields)return false;var _2=this.getField(_1);return _2&&!!_2.frozen},isc.A.getFieldBody=function isc_ListGrid_getFieldBody(_1){if(!this.frozenFields)return this.body;return this.fieldIsFrozen(_1)?this.frozenBody:this.body},isc.A.getFieldHeader=function isc_ListGrid_getFieldHeader(_1){if(!this.frozenFields)return this.header;return this.fieldIsFrozen(_1)?this.frozenHeader:this.header},isc.A.getFieldHeaderButton=function isc_ListGrid_getFieldHeaderButton(_1){var _2=this.getFieldHeader(_1);return _2?_2.getMember(this.getLocalFieldNum(_1)):null},isc.A.getLocalFieldNum=function isc_ListGrid_getLocalFieldNum(_1){if(_1==null)return null;if(this.body&&this.body.isPrinting){var _2=this.fields[_1];if(!this.$54d&&_2.frozen&&this.frozenBody){return this.frozenBody.fields.indexOf(_2)}else{return this.body.fields.indexOf(_2)}}
if(!this.frozenFields)return _1;var _3;_3=this.frozenFields.length;if(!this.fieldIsFrozen(_1))return _1-_3;return this.freezeStart()?_1:_1-(this.fields.length-this.frozenFields.length)},isc.A.getFieldNumFromLocal=function isc_ListGrid_getFieldNumFromLocal(_1,_2){if(_1==null)return null;if(this.isPrinting){var _3=this.frozenFields!=null?(_2==this.frozenBody?this.frozenFields:this.unfrozenFields):this.fields;var _4=_2.fields[_1];for(var i=0;i<_3.length;i++){if(_3[i].name==_4.name)break;if(_3[i].shouldPrint==false)_1++}}
if(!this.frozenFields)return _1;if(_2==this.frozenBody){if(this.freezeStart())return _1;else{var _6=this.fields.length-this.frozenFields.length;return _1+_6}}else{var _7=this.freezeStart()?this.frozenFields.length:0;return _1+_7}},isc.A.getColumnLeft=function isc_ListGrid_getColumnLeft(_1){var _2=this.getFieldBody(_1);if(!_2)return null;return _2.getColumnLeft(this.getLocalFieldNum(_1))},isc.A.getColumnPageLeft=function isc_ListGrid_getColumnPageLeft(_1){var _2=this.getFieldBody(_1);if(!_2)return null;return _2.getColumnPageLeft(this.getLocalFieldNum(_1))},isc.A.getColumnWidth=function isc_ListGrid_getColumnWidth(_1){var _2=this.getFieldBody(_1);if(!_2)return null;return _2.getColumnWidth(this.getLocalFieldNum(_1))},isc.A.getCellPageRect=function isc_ListGrid_getCellPageRect(_1,_2){var _3=this.getFieldBody(_2);if(!_3)return null;return _3.getCellPageRect(_1,this.getLocalFieldNum(_2))},isc.A.refreshCellStyle=function isc_ListGrid_refreshCellStyle(_1,_2,_3){var _4=this.getFieldBody(_2);return _4.refreshCellStyle(_1,this.getLocalFieldNum(_2),_3)},isc.A.freezeField=function isc_ListGrid_freezeField(_1){return this.toggleFrozen(_1,true)},isc.A.unfreezeField=function isc_ListGrid_unfreezeField(_1){return this.toggleFrozen(_1,false)},isc.A.toggleFrozen=function isc_ListGrid_toggleFrozen(_1,_2){if(!isc.isAn.Array(_1))_1=[_1];var _3=false;for(var i=0;i<_1.length;i++){var _5=this.getField(_1[i]);if(!_5||!this.fieldIsVisible(_5)||this.isCheckboxField(_5))
{continue}
var _6=_2;if(_6==null)_6=!_5.frozen;if(_5.frozen==_2)continue;_3=true;_5.frozen=_6}
if(!_3)return false;this.rebuildForFreeze();this.selectSortFieldHeaderButton();this.handleFieldStateChanged(true);return true},isc.A.updateBody=function isc_ListGrid_updateBody(_1){if(_1||(this.frozenFields&&!this.frozenBody)||(this.frozenBody&&!this.frozenFields))
{_1=true;this.dropRecordComponents();if(this.body){this.$810()}
if(this.bodyLayout)this.bodyLayout.destroy();else if(this.body)this.body.destroy();this.body=this.bodyLayout=this.frozenBody=null;this.createBodies()}
if(this.isDrawn()){this.updateGridComponents()}
if(this.body){this.body.fields=this.normalFields||this.fields;this.body.$182n();if(!_1)this.$75n(this.body);this.body.markForRedraw("fields change")}
if(this.frozenBody){this.frozenBody.fields=this.frozenFields;this.frozenBody.$182n();if(!_1)this.$75n(this.frozenBody);this.frozenBody.markForRedraw("fields change");if(this.canSelectCells)this.$97f()}},isc.A.shouldDestroyOnUnembed=function isc_ListGrid_shouldDestroyOnUnembed(_1,_2){if(_1.dontAutoDestroy)return false;if(_1.isBackgroundComponent){if(_2==this.$81l&&_1.creator==this)return true;return false}
if(_1.isRecordComponent){if(_2==this.$81l)return true;return false}
if(_1.destroyOnUnembed!=null)return _1.destroyOnUnembed;if(_2==this.$81p)return false;return true},isc.A.$810=function isc_ListGrid__destroyEmbeddedComponentsForRebuild(){var _1=this.body.$29a;if(this.frozenBody){var _2=[];if(_1==null)_1=_2;else _1=_2.addList(_1);_1.addList(this.frozenBody.$29a||[])}
if(_1&&_1.length>0){for(var i=0;i<_1.length;i++){var _4=_1[i]&&_1[i].embeddedRecord,_5=false,_6=this.$917(_4);if(_6.length>0){for(var j=0;j<_6.length;j++){var _8=_6[j];if(!_8||_8.destroying||_8.destroyed)continue;_5=_5||_8.isExpansionComponent;if(this.shouldDestroyOnUnembed(_8,this.$81q)){_8.markForDestroy()}else{_8.deparent()}}
this.$92k(_4,null);if(_5)this.$92g(_4,false);this.$92l(_4)}}}},isc.A.createBodies=function isc_ListGrid_createBodies(){if(this.body!=null)return;this.$80i();this.body=this.createBody(this.ID+"_body",this.normalFields||this.fields);this.body.setLocatorParent(this,"body");this.$ur();if(this.$30a){this.updateEditFormTabPosition()}
if(this.sorter!=null){this.sorter.setWidth(this.$139x(true))}
this.body.resizeTo("100%","100%");this.bodies=[this.body];this.dragScrollTarget=this.body;var _1=this.frozenFields;if(_1==null||_1.length==0){return this.body}
this.body.addProperties({$27x:function(_4,_5,_6){var _2=[0,0];if(!this.frozen&&this.grid&&this.grid.frozenBody){_2=this.grid.frozenBody.$27x(_4,_5,_6)}
var _3=this.Super("$27x",arguments);if(_2[1]>_3[1])_3[1]++;return _3}});this.frozenBody=this.createBody(this.ID+"$51d",_1,true);this.frozenBody.setLocatorParent(this,"frozenBody");this.frozenBody.useNativeDrag=false;this.frozenBody.drawAllMaxCells=0;if(this.body.hscrollOn&&!this.shrinkForFreeze){this.frozenBody.setEndSpace(this.body.getScrollbarSize())}
if(this.freezeStart()){this.bodies.unshift(this.frozenBody)}else{this.bodies.add(this.frozenBody)}
this.bodyLayout=this.createAutoChild("bodyLayout",{width:"100%",height:"100%",autoDraw:false,members:this.bodies},isc.HLayout);this.$97c()},isc.A.getBody=function isc_ListGrid_getBody(){return this.body},isc.A.$97c=function isc_ListGrid__separateDependentSelections(){if(this.canSelectCells){var _1=this.freezeStart(),_2=this.selectionManager,_3=this.body.fields.length,_4=this.frozenBody?this.frozenBody.fields.length:0;this.body.$968(_2,_1?_4:0);this.frozenBody.$968(_2,_1?0:_3)}});isc.evalBoundary;isc.B.push(isc.A.$97f=function isc_ListGrid__updateDependentSelections(){if(!isc.isA.DependentCellSelection(this.body.selectionManager)||!isc.isA.DependentCellSelection(this.frozenBody.selectionManager)){return}
var _1=this.freezeStart(),_2=this.body.fields.length,_3=this.frozenBody.fields.length;this.body.selectionManager.$969(_1?_3:0,_2);this.frozenBody.selectionManager.$969(_1?0:_2,_3)},isc.A.bodyOverflowed=function isc_ListGrid_bodyOverflowed(){if(this.summaryRow!=null&&this.summaryRow.body){this.summaryRow.body.setRightSpace(this.body.vscrollOn?this.body.getScrollbarSize():0)}
if(!this.frozenBody)return;this.frozenBody.setEndSpace(this.body.hscrollOn&&!this.shrinkForFreeze?this.body.getScrollbarSize():0)},isc.A.createBody=function isc_ListGrid_createBody(_1,_2,_3){var _4=isc.ClassFactory.getClass(this.bodyConstructor,true).createRaw();_4.ID=_1;_4.autoDraw=false;_4.creator=this;_4.grid=this;_4.fields=_2;_4.frozen=_3;if(!_3||this.useNativeTouchScrolling&&this.$1399){if(_3&&(isc.Browser.isChrome||isc.Browser.isEdge)){_4.$278e=true}
_4.overflow=this.bodyOverflow}else{_4.overflow="hidden"}
if(this.scrollbarConstructor!=null)_4.scrollbarConstructor=this.scrollbarConstructor;if(this.showCustomScrollbars!=null)_4.showCustomScrollbars=this.showCustomScrollbars;if(this.alwaysShowScrollbars!=null)_4.alwaysShowScrollbars=this.alwaysShowScrollbars;if(this.hasOwnProperty("floatingScrollbars")){_4.floatingScrollbars=this.floatingScrollbars;_4.$325l=true}
if(this.hasOwnProperty("nativeAutoHideScrollbars")){_4.nativeAutoHideScrollbars=this.nativeAutoHideScrollbars}
if(this.useTouchScrolling!=null)_4.useTouchScrolling=this.useTouchScrolling;if(this.scrollbarSize!=null)_4.scrollbarSize=this.scrollbarSize;_4.backgroundColor=this.bodyBackgroundColor;var _5=this.bodyStyleName;if(this.alternateBodyStyleName!=null&&this.alternateRecordStyles){_5=this.alternateBodyStyleName}
if(_3&&this.frozenBodyStyleName)_5=this.frozenBodyStyleName;_4.styleName=_5;_4.allowContentAndChildren=true;_4.fixedRowHeights=this.fixedRecordHeights;_4.fixedColumnWidths=this.fixedFieldWidths;_4.variableRecordHeightFields=this.variableRecordHeightFields;_4.alternateRowStyles=this.alternateRecordStyles;_4.alternateRowFrequency=this.alternateRecordFrequency;_4.alternateRowSuffix=this.alternateRecordSuffix;_4.alternateColumnStyles=this.alternateFieldStyles;_4.alternateColumnFrequency=this.alternateFieldFrequency;_4.alternateColumnSuffix=this.alternateFieldSuffix;_4.canSelectText=this.canDragSelectText;_4.showAllRows=this.showAllRecords;if(this.virtualScrolling!=null)_4.virtualScrolling=this.virtualScrolling;_4.dragTarget=this.canDragSelect?null:this;_4.dragAppearance=isc.EventHandler.NONE;_4.screenReaderCellSeparator=this.screenReaderCellSeparator;_4.screenReaderRowSeparator=this.screenReaderRowSeparator;_4.selectionAppearance=this.selectionAppearance;var _6=isc.ListGrid.$295;for(var i=0;i<_6.length;i++){var _8=_6[i],_9=this[_8];if(_9!=null)_4[_8]=_9}
if(this.$122n!=null){_4._useNativeTabIndex=this.$122n}
isc.addProperties(_4,this.bodyDefaults,this.bodyProperties);if(_3)_4.showEmptyMessage=false;_4.completeCreation();_4=isc.SGWTFactory.extractFromConfigBlock(_4);this.$51e(_4);return _4},isc.A.$29w=function isc_ListGrid__cellMouseDown(_1,_2,_3,_4){var _5=this.getField(this.getFieldNumFromLocal(_3,_4));var _6;if(_5.cellMouseDown){if(_5.cellMouseDown(this,_1,_2,_3)==false)return false}},isc.A.getRowHeight=function isc_ListGrid_getRowHeight(_1,_2,_3,_4){var _5;if(_3)_5=this.frozenBody;if(_5==null)_5=this.body;var _6;if(this.allowRowSpanning&&this.getRowSpan){if(!this.allowIncreasingRowSpanning){if(_3){var _7=this.body.derivedRowHeight
*this.frozenBody.$100c(_1,_2,this.frozenFields.length-1);_6=_7-_5.derivedCellBorderVSpacing}else{_6=this.body.derivedRowHeight}}else{var _8,_5=_3?this.frozenBody:this.body,_9=_3?0:(this.frozenFields?this.frozenFields.length:0),_10=_3?this.frozenFields.length:this.fields.length;for(var i=_9;i<_10;i++){if(_8==null){_8=_5.$100c(_1,_2,i)}else{_8=Math.min(_8,_5.$100c(_1,_2,i))}
if(_8==1)break}
_6=(this.body.derivedRowHeight*_8)-this.body.derivedCellBorderVSpacing}}else{_6=this.body.cellHeight}
if(this.frozenFields&&this.getEditRow()==_2){var _12=this.getEditForm(),_13=_12?_12.getItems():[];for(var i=0;i<_13.length;i++){var _14=(_13[i].getHeight()+2*this.cellPadding);if(_14>_6)_6=_14}}
_6=this.body.updateHeightForEmbeddedComponents(_1,_2,_6);if(!_4&&this.body.derivedCellBorderVSpacing!=null){_6+=this.body.derivedCellBorderVSpacing}
return _6},isc.A.makeSelectionCanvas=function isc_ListGrid_makeSelectionCanvas(_1){return this.selectionCanvas=this.createAutoChild("selectionCanvas",{eventProxy:this.body,snapTo:"TL",width:"100%",height:"100%",bubbleMouseEvents:true,destroyOnUnEmbed:false,percentSource:this,percentBox:"custom",grid:this,autoDraw:false})},isc.A.makeSelectionUnderCanvas=function isc_ListGrid_makeSelectionUnderCanvas(_1){return this.selectionUnderCanvas=this.createAutoChild("selectionUnderCanvas",{eventProxy:this.body,snapTo:"TL",width:"100%",height:"100%",bubbleMouseEvents:true,destroyOnUnEmbed:false,percentSource:this,percentBox:"custom",grid:this,autoDraw:false})},isc.A.getSelectionCanvas=function isc_ListGrid_getSelectionCanvas(){var _1=this.selectionCanvas;if(_1==null||_1.destroyed){_1=this.makeSelectionCanvas()}
return _1},isc.A.getSelectionUnderCanvas=function isc_ListGrid_getSelectionUnderCanvas(){var _1=this.selectionUnderCanvas;if(_1==null||_1.destroyed){_1=this.makeSelectionUnderCanvas()}
return _1},isc.A.updateSelectionCanvas=function isc_ListGrid_updateSelectionCanvas(){var _1=this.selectionManager,_2,_3,_4;if(isc.isA.CellSelection(_1)){var _5=_1.getSelectedCells()[0];_2=_5?_5[0]:-1,_3=_5?_5[1]:-1;_4=_5?this.getCellRecord(_2,_3):null}else{_4=this.getSelectedRecord();_2=this.data?this.data.indexOf(_4):-1}
var _6=this.selectionCanvas,_7=this.selectionUnderCanvas,_8=_6||_7,_9,_10,_11;if(_8!=null){_9=_8.embeddedRecord;_10=_8.$289;_11=_8.$57n}else{_9=null;_10=-1;_11=-1}
var _12=this.showSelectionCanvas||this.showSelectionUnderCanvas;if(_8==null){if(_4==null||!_12)return}else if(_12&&_9==_4&&_10==_2&&_11==_3)
{return}
if(_12&&this.selectionType!=isc.Selection.SINGLE&&this.selectionType!=isc.Selection.NONE)
{this.logWarn((this.showSelectionCanvas?(this.showSelectionUnderCanvas?"showSelectionCanvas and showSelectionUnderCanvas are":"showSelectionCanvas is"):"showSelectionUnderCanvas is")+" set to true, but this is not supported for selectionType "+this.selectionType);this.showSelectionCanvas=false;this.showSelectionUnderCanvas=false;_12=false}
if(!_4||_2==-1||!_12){if(_6!=null){this.removeEmbeddedComponent(_9,_6)}
if(_7!=null){this.removeEmbeddedComponent(_9,_7)}
return}
if(this.showSelectionCanvas){_6=this.getSelectionCanvas();_6.record=_4;_6.removeOnHideField=true;this.addEmbeddedComponent(_6,_4,_2,_3,"within")}
if((this.showSelectionCanvas&&this.showSelectionUnderCanvas==null)||this.showSelectionUnderCanvas)
{_7=this.getSelectionUnderCanvas();_7.record=_4;_7.removeOnHideField=true;this.addEmbeddedComponent(_7,_4,_2,_3,"within")}},isc.A.makeRollOverCanvas=function isc_ListGrid_makeRollOverCanvas(_1){var _2=this.createAutoChild("rollOverCanvas",{eventProxy:_1?this.frozenBody:this.body,percentSource:this,percentBox:"custom",bubbleMouseEvents:true,destroyOnUnEmbed:false,grid:this,autoDraw:false});if(_1)this.frozenRollOverCanvas=_2;else this.rollOverCanvas=_2;return _2},isc.A.makeRollUnderCanvas=function isc_ListGrid_makeRollUnderCanvas(_1){var _2=this.createAutoChild("rollUnderCanvas",{eventProxy:_1?this.frozenBody:this.body,percentSource:this,percentBox:"custom",bubbleMouseEvents:true,destroyOnUnEmbed:false,grid:this,autoDraw:false});if(_1)this.frozenRollUnderCanvas=_2;else this.rollUnderCanvas=_2;return _2},isc.A.getRollOverCanvas=function isc_ListGrid_getRollOverCanvas(_1,_2){var _3=this.rollOverCanvas;if(_3==null||_3.destroyed){_3=this.makeRollOverCanvas(false)}
return _3},isc.A.getFrozenRollOverCanvas=function isc_ListGrid_getFrozenRollOverCanvas(_1,_2){var _3=this.frozenRollOverCanvas;if(_3==null||_3.destroyed){_3=this.makeRollOverCanvas(true)}
return _3},isc.A.getRollUnderCanvas=function isc_ListGrid_getRollUnderCanvas(_1,_2){var _3=this.rollUnderCanvas;if(_3==null||_3.destroyed){_3=this.makeRollUnderCanvas(false)}
return _3},isc.A.getFrozenRollUnderCanvas=function isc_ListGrid_getFrozenRollUnderCanvas(_1,_2){var _3=this.frozenRollUnderCanvas;if(_3==null||_3.destroyed){_3=this.makeRollUnderCanvas(true)}
return _3},isc.A.updateRollOverCanvas=function isc_ListGrid_updateRollOverCanvas(_1,_2,_3){var _4=false;var _5;if(_3||(!this.showSelectedRollOverCanvas&&!this.showSelectedRollOverCanvas)&&(!this.showRollOverCanvas&&!this.showRollUnderCanvas)||_1==null||_1==-1)
{_4=true}else{_5=this.getCellRecord(_1,_2);if(_5==null||Array.isLoading(_5)){_4=true}else{var _6=this.selectionManager,_7=isc.isA.CellSelection(_6)?_6.isSelected(_1,_2):_6.isSelected(_5,_1,true);if(!this.showRollOverCanvas&&!this.showRollUnderCanvas&&!_7){_4=true}}}
if(_4){var _8=[this.currentRollOverCanvas,this.currentRollUnderCanvas,this.currentFrozenRollOverCanvas,this.currentFrozenRollUnderCanvas];for(var i=0;i<_8.length;i++){var _10=_8[i];if(_10&&!_10.destroying&&!_10.destroyed){this.removeEmbeddedComponent(_10.embeddedRecord,_10)}}
return}
if(!this.useCellRollOvers){_2=null}
var _11,_12;if(_2!=null){var _13=this.fieldIsFrozen(_2);_11=_13;_12=!_11}else{_11=this.frozenFields&&this.frozenFields.length>0;_12=true}
var _14=this.currentRollOverCanvas,_15=this.currentRollUnderCanvas,_16=this.currentFrozenRollOverCanvas,_17=this.currentFrozenRollUnderCanvas;var _18=null,_19=null;if(this.showRollOverCanvas||(this.showSelectedRollOverCanvas&&_7)){if(_12){_18=this.getRollOverCanvas(_1,_2)}
if(_11){_19=this.getFrozenRollOverCanvas(_1,_2)}}
this.currentRollOverCanvas=_18;this.currentFrozenRollOverCanvas=_19;var _20=null,_21=null;if((this.showRollOverCanvas&&this.showRollUnderCanvas==null)||this.showRollUnderCanvas||(_7&&((this.showSelectedRollOverCanvas&&this.showSelectedRollUnderCanvas==null)||this.showSelectedRollUnderCanvas)))
{if(_12){_20=this.getRollUnderCanvas(_1,_2)}
if(_11){_21=this.getFrozenRollUnderCanvas(_1,_2)}}
this.currentRollUnderCanvas=_20;this.currentFrozenRollUnderCanvas=_21;if(_18!=null){_18.grid=this;_18.record=_5;_18.removeOnHideField=true;_18.sizeWithExpansion=this.showRollOverInExpansion;this.addEmbeddedComponent(_18,_5,_1,_2,"within")}else if(_14!=null&&!_14.destroying){this.removeEmbeddedComponent(_14.embeddedRecord,_14)}
if(_20!=null){_20.grid=this;_20.record=_5;_20.removeOnHideField=true;this.addEmbeddedComponent(_20,_5,_1,_2,"within")}else if(_15!=null&&!_15.destroying){this.removeEmbeddedComponent(_15.embeddedRecord,_15)}
if(_19!=null){_19.grid=this;_19.record=_5;_19.removeOnHideField=true;this.addEmbeddedComponent(_19,_5,_1,_2,"within",this.frozenBody)}else if(_16!=null&&!_16.destroying){this.removeEmbeddedComponent(_16.embeddedRecord,_16)}
if(_21!=null){_21.grid=this;_21.record=_5;_21.removeOnHideField=true;this.addEmbeddedComponent(_21,_5,_1,_2,"within",this.frozenBody)}else if(_17!=null&&!_17.destroying){this.removeEmbeddedComponent(_17.embeddedRecord,_17)}},isc.A.updateEmbeddedComponentZIndex=function isc_ListGrid_updateEmbeddedComponentZIndex(_1){if(!_1)return;if(this.selectionCanvas==_1){var _2=this.body.getTableZIndex();this.selectionCanvas.setZIndex(_2+50)}
if(this.selectionUnderCanvas==_1){var _2=this.body.getTableZIndex();this.selectionUnderCanvas.setZIndex(_2-100)}
if(this.currentRollOverCanvas==_1){var _2=this.body.getTableZIndex();_1.setZIndex(_2+100)}
if(this.currentRollUnderCanvas==_1){var _2=this.body.getTableZIndex();_1.setZIndex(_2-50)}
if(this.currentFrozenRollOverCanvas==_1){var _2=this.frozenBody.getTableZIndex();_1.setZIndex(_2+100)}
if(this.currentFrozenRollUnderCanvas==_1){var _2=this.frozenBody.getTableZIndex();_1.setZIndex(_2-50)}},isc.A.$80d=function isc_ListGrid__handleEmbeddedComponentResize(_1,_2,_3,_4){if(_2!=null&&_2.$81k&&_2.embeddedPosition==this.$57l&&_3!=null&&_3!=0)
{var _5=_2.$81k,_6=this.getField(_5);var _7=_2._percent_width;if(_6&&(_7==null||!_7.endsWith("%")))
{var _8=_2.getVisibleWidth(),_9=_8-_3;var _10=_6.$117a;if(_10!=null){if(_8>_10){this.$1168(_5,_8)}else if(_9==_10){this.$1168(_5)}}}}
if(this.frozenBody!=null&&_4!=null&&_4!=0){var _11=(_1==this.frozenBody)?this.body:this.frozenBody;_11.markForRedraw("Embedded component requires row resizing")}},isc.A.getButtonProperties=function isc_ListGrid_getButtonProperties(){var _1={align:null};if(this.headerTitleStyle!=null)_1.titleStyle=this.headerTitleStyle;if(this.headerBaseStyle!=null)_1.baseStyle=this.headerBaseStyle;if(this.headerButtonSrc!=null)_1.src=this.headerButtonSrc;if(this.frozenHeaderBaseStyle!=null)
_1.frozenBaseStyle=this.frozenHeaderBaseStyle;if(this.frozenHeaderTitleStyle!=null)
_1.frozenTitleStyle=this.frozenHeaderTitleStyle;if(this.frozenHeaderButtonSrc!=null)
_1.frozenSrc=this.frozenHeaderButtonSrc;var _2=isc.addProperties({},this.headerButtonDefaults,_1,this.headerButtonProperties);_2.createCanvasWhenRules=false;return _2},isc.A.getHeaderButtonProperties=function isc_ListGrid_getHeaderButtonProperties(_1){var _2=this.getButtonProperties();if(this.buttonTitleFunction==null){this.buttonTitleFunction=function(){return this.parentElement.grid.getHeaderButtonTitle(this)}}
isc.addProperties(_2,{$115g:true,minNonEdgeSize:isc.Browser.isTouch?10:5,defaultRadioGroup:this.getID()+"$34f",getActionType:function(_16,_17,_18,_19){var _3=this.parentElement,_4;if(_3)_4=_3.grid;if(_4&&isc.isA.ListGrid(_4)){var _5=_4.fields[_3.getButtonNumber(this)];var _6=(_4.canSort!=false);if(_6&&_5!=null)_6=(_4.$66c(_5)!=false);if(_6&&_4.selectHeaderOnSort)return isc.Button.RADIO}
return this.invokeSuper(null,"getActionType",_16,_17,_18,_19)},getTitle:this.buttonTitleFunction,handleMouseOver:function(_16){var _4=this.parentElement.grid;if(_4.shouldShowHeaderMenuButton(this,null,true)){var _7=_4.$129n(this);if(_16){var _8=_7.getPageRect();if(_8[0]<=_16.x&&_8[1]<=_16.y&&_16.x<=(_8[0]+_8[2])&&_16.y<=(_8[1]+_8[3]))
{this.$116g=this.$116f("handleMouseOver",arguments,null,50);return}}}
return this.Super("handleMouseOver",arguments)},handleMouseOut:function(){if(this.$116g!=null){isc.Timer.clear(this.$116g);delete this.$116g}
var _9=this.ns.EH;if(!isc.Browser.isTouch&&!this.containsPoint(_9.getX(),_9.getY()))
{var _4=this.parentElement.grid,_10=_4.headerMenuButton;if(isc.EH.getTarget()!=_10){_4.$129m(this)}}
if(isc.Hover.isActive&&!isc.Hover.$209n)isc.Hover.clear();return this.Super("handleMouseOut",arguments)},handleHover:function(){var _3=this.parentElement,_4=_3.grid,_11=this.masterIndex;if(_4.headerHover!=null)_4.headerHover(_11);var _12=_4.defaultHeaderHoverHTML(_11);if(_4.headerHoverHTML)_12=_4.headerHoverHTML(_11,_12);_4.$115a(_11,_12)}},this.headerSpans!=null?{layoutAlign:"bottom"}:null,_1);if(this.showHeaderResizers){isc.addProperties(_2,{showFlexEdge:true,flexEdgeProperties:{vertical:true,canDragReposition:false,canDragResize:true,snapOffsetLeft:-2,resizeFrom:"R"},flexEdgeColor:this.headerResizerColor,getFlexEdgeProperties:function(){return{width:this.getFlexEdgeWidth(),height:this.getFlexEdgeHeight(),snapTo:this.getFlexEdgeSnapTo(),snapOffsetLeft:0}},getFlexEdgeSnapTo:function(){var _13="R";if(this.isSpan)_13="BR";else{var _14=(this.grid&&this.grid.headerSpans)||[];for(var i=0;i<_14.length;i++){if(this.name==_14[i].fields[_14[i].fields.length-1]){_13="TR";break}}}
return _13},getFlexEdgeWidth:function(){return this.grid&&this.grid.headerResizerWidth},getFlexEdgeHeight:function(){if(this.isSpan){return"90%"}
var _14=(this.grid&&this.grid.headerSpans)||[];for(var i=0;i<_14.length;i++)
if(this.name==_14[i].fields[_14[i].fields.length-1])return"90%";return this.grid.headerResizerHeight},flexEdgeDoubleClick:function(){this.doubleClick&&this.doubleClick()},shouldShowFlexEdge:function(){if(!this.grid.showResizerOnFinalField){}
return this.Super("shouldShowFlexEdge",arguments)}})}
return _2},isc.A.makeHeader=function isc_ListGrid_makeHeader(){if(this.header!=null)return;var _1=this.header=this.makeHeaderForFields(this.normalFields||this.fields||[]);_1.locatorParent=this;_1.setLocatorParent(this,"header");if(this.sorter==null){this.makeCornerSortButton()}
this.headers=[_1];if(this.frozenFields){var _2=this.frozenHeader=this.makeHeaderForFields(this.frozenFields,"visible",this.getID()+"$51f");_2.setLocatorParent(this,"frozenHeader");_2.setOverflow("hidden");if(this.freezeStart()){this.headers.unshift(this.frozenHeader)}else{this.headers.add(this.frozenHeader)}
var _3=this.headers.duplicate();this.headerLayout=this.createAutoChild("headerLayout",{autoDraw:false,overflow:"hidden",height:this.getHeaderHeight(),members:_3},isc.HLayout)}
var _4=this.headerLayout||this.header;if(this.showHeaderShadow&&_4.shouldUseCSSShadow()){_4.showShadow=true;if(this.headerShadowHOffset!=null){_4.shadowHOffset=this.headerShadowHOffset}
if(this.headerShadowVOffset!=null){_4.shadowVOffset=this.headerShadowVOffset}
if(this.headerShadowSoftness!=null){_4.shadowSoftness=this.headerShadowSoftness}
if(this.headerShadowColor!=null){_4.shadowColor=this.headerShadowColor}}
_4.inherentWidth=true;this.observe(_4,"moved",function(){this.updateSorter()});this.observe(_4,"resized",function(){this.updateSorter()})},isc.A.updateSorter=function isc_ListGrid_updateSorter(){if(this.destroying||this.destroyed)return;if(!this.sorter||this.sorter.destroying||this.sorter.destroyed)return;if(this.$rm||this.$qz){this.delayCall("updateSorter");return}
var _1=(this.header||this.headerLayout)&&this.$313();if(_1){this.sorter.moveTo(this.getSorterLeft(),this.getSorterTop());this.sorter.setHeight(this.getHeaderHeight())}else{this.sorter.moveTo(0,0)}
this.sorter.setVisibility(_1?isc.Canvas.INHERIT:isc.Canvas.HIDDEN);if(_1){if(this.isDrawn()&&!this.sorter.isDrawn())this.sorter.draw();else this.sorter.moveAbove(this.headerLayout||this.header)}
if(this.sortByGroupFirst){var _2=this.getSort();this.setSort(_2)}},isc.A.makeHeaderForFields=function isc_ListGrid_makeHeaderForFields(_1,_2,_3){var _4=this.createHeader({ID:_3,grid:this,buttons:_1.duplicate(),reorderOnDrop:false,height:null,minMemberLength:this.minFieldWidth,tabWithinToolbar:false,overflow:_2||"hidden",_redrawWithParent:!this.fixedFieldWidths})
this.observe(_4,"scrollTo",function(){this.headerScrolled()});return _4},isc.A.setFieldButtonProperties=function isc_ListGrid_setFieldButtonProperties(_1,_2){var _3=this.getField(_1)
if(_3!=null){var _4=this.getFieldHeaderButton(this.getFieldNum(_3));if(_4!=null){_4.setProperties(_2)}}else{_3=this.completeFields.find("name",_1)}
if(_3==null){this.logWarn("setFieldButtonProperties() Unable to find specified field: "+_1);return}
var _5=isc.addProperties({},_2);var _6={titleStyle:"headerTitleStyle",baseStyle:"headerBaseStyle"}
for(var _7 in _6){if(_5[_7]!=null){_5[_6[_7]]=_5[_7];delete _5[_7]}}
isc.addProperties(_3,_5)},isc.A.getHeaderSpanConfig=function isc_ListGrid_getHeaderSpanConfig(_1,_2){if(_2==null)_2=this.headerSpans;if(_2==null)return;var _3=_2.find("name",_1);if(_3!=null)return _3;for(var i=0;i<_2.length;i++){var _5=_2[i];if(_5.spans!=null){_3=this.getHeaderSpanConfig(_1,_5.spans);if(_3!=null)return _3}}},isc.A.setHeaderSpanButtonProperties=function isc_ListGrid_setHeaderSpanButtonProperties(_1,_2){var _3=this.getHeaderSpanConfig(_1);if(!_3){this.logWarn("setHeaderSpanButtonProperties() - unable to locate span named: "+_1+this.getStackTrace());return}
if(_3.liveObject){_3.liveObject.setProperties(_2)}
var _4=isc.addProperties({},_2);var _5={titleStyle:"headerTitleStyle",baseStyle:"headerBaseStyle"}
for(var _6 in _5){if(_4[_6]!=null){_4[_5[_6]]=_4[_6];delete _4[_6]}}
isc.addProperties(_3,_4)},isc.A.getNestedSpanDepth=function isc_ListGrid_getNestedSpanDepth(_1){if(_1.$109h!=null)return _1.$109h;if(_1.spans){var _2=0;for(var i=0;i<_1.spans.length;i++){_2=Math.max(_2,this.getNestedSpanDepth(_1.spans[i]))}
_1.$109h=(1+_2);return _1.$109h}
return 1},isc.A.getHeaderTableStyle=function isc_ListGrid_getHeaderTableStyle(_1){var _2=null;if(!this.headerSpans){_2=this.headerTableStyle}else{_2=this.spannedHeaderTableStyle}
return _2},isc.A.createHeader=function isc_ListGrid_createHeader(_1){var _2=this;var _3=this.canTabToHeader||(this.canTabToHeader==null&&isc.screenReader);var _4=isc.addProperties({ariaRole:this.getHeaderAriaRole?this.getHeaderAriaRole():null,shouldDragScroll:function(){return _2&&_2.body&&_2.body.hscrollOn},makeButton:function(_15,_54,_55,_56,_57){_15=isc.addProperties({},_15);_15.ignoreRTL=true;if(!_2.clipHeaderTitles){_15.clipTitle=false;_15.showClippedTitleOnHover=false}
_15.tableStyle=_2.getHeaderTableStyle(_15);_15.$1155=true;_15.$115j=function(){var _2=this.grid,_5=this.masterIndex;return _2.$1880(this)?_2.$1881(_2.getField(_5)):null};if(_15.headerTitleStyle)_15.titleStyle=_15.headerTitleStyle;else if(_15.frozen&&this.buttonProperties.frozenTitleStyle)
_15.titleStyle=_15.frozenTitleStyle;if(_15.frozen&&this.buttonProperties.frozenSrc)
_15.src=this.buttonProperties.frozenSrc;_15.showIf=null;_15.grid=_2;_15.$2322=true;var _6=_2.shouldAutoFitField(_15),_7,_8,_9;if(_6){_7=_2.getAutoFitWidthApproach(_15);if(_7=="both"){_8=true;_9=true}else if(_7=="title"){_8=true;_9=false}else{_8=false;_9=true}}
if(_6&&_8){_15.overflow=isc.Canvas.VISIBLE;_15.resized=function(){if(this.isDrawn()&&this.grid){this.grid.headerButtonResized(this)}}}
delete _15.autoFit;if(_15.wrap==null&&_15.headerLevel==null){_15.wrap=_2.wrapHeaderTitles}
if(_15.rotateTitle){_15.customState="Rotated";var _10=this.grid.$115c(_15);if(isc.Browser.isMoz||isc.Browser.isSafariStrict){_15.modifyContent=function(){var _11=isc.Element.get(_10);if(_11){var _12=_11.parentElement,_13=isc.Element.getClientWidth(_12),_14=isc.Element.getClientWidth(_11);_12.style.width=(_13+_14)+"px"}}}}
if(_15.$776){if(_15.width==null||_15.width<_15.$776){_15.width=_15.$776}
if(_15.width<_15.$187n){_15.width=_15.$187n}}else if(_15.width==null&&_8){_15.width=Math.max(_2.minFieldWidth||1,_15.minWidth||1)}
_15.sizeImageToFitOverflow=true;if(_2.reverseRTLAlign&&_2.isRTL()){if(_15.align==isc.Canvas.LEFT)_15.align=isc.Canvas.RIGHT;else if(_15.align==isc.Canvas.RIGHT)_15.align=isc.Canvas.LEFT}
if(_15.masterIndex!=null){if(_2.getHeaderButtonAriaRole){_15.ariaRole=_2.getHeaderButtonAriaRole(_15)}
if(_2.getHeaderButtonAriaState){_15.getAriaState=function(){return _2.getHeaderButtonAriaState(this)}}}
var _15=this.Super("makeButton",[_15,_54,_55,_56,_57]);if(_15.rotateTitle&&_2.getAutoFitWidthApproach(_15)!="value"){_15.logWarn("Autofitting by title width isn't supported for rotated titles - width or layout may be incorrect")}
var _16=this.parentElement!=null&&this.parentElement.headerSpans!=null;if(_16&&_15.spannedHeaderBaseStyle){_15.setBaseStyle(_15.spannedHeaderBaseStyle)}else if(_16&&this.parentElement.spannedHeaderBaseStyle){_15.setBaseStyle(this.parentElement.spannedHeaderBaseStyle)}else if(_15.headerBaseStyle){_15.setBaseStyle(_15.headerBaseStyle)}else{if(_15.frozen&&this.buttonProperties.frozenBaseStyle)
_15.setBaseStyle(this.buttonProperties.frozenBaseStyle);else if(this.buttonProperties.baseStyle!=null)
_15.setBaseStyle(this.buttonProperties.baseStyle)}
return _15},buttonProperties:this.getHeaderButtonProperties(),border:this.headerBorder,styleName:this.headerBarStyle,backgroundColor:this.headerBackgroundColor,backgroundImage:this.headerBackgroundImage,canResizeItems:(this.canResizeFields||(this.editingOn&&this.editProxy&&this.editProxy.canResizeFields)),canReorderItems:(this.canReorderFields||(this.editingOn&&this.editProxy&&this.editProxy.canReorderFields)),dontObserve:false,childVisibilityChanged:function(){this.Super("childVisibilityChanged",arguments);this.$55g()},$3j:function(){this.Super("$3j",arguments);this.$55g()},dragReorderMove:function(){this.Super("dragReorderMove",arguments);this.$55g()},addSpan:function(_41){if(!this.$55h)this.$55h=[];this.$55h.add(_41);if(this.isDrawn()){this.$55i(_41);this.addChild(_41)}},$55g:function(){if(!this.$55h||!this.isDrawn())return;if(this.$97g)return;var _17=this.instantRelayout;this.instantRelayout=false;for(var i=0;i<this.$55h.length;i++)this.$55i(this.$55h[i]);this.instantRelayout=_17;delete this.$97h},$82w:function(_41){if(_41.$82y!=null){return _41.$82y}
var _19=_2.getSpannedFields(_41);var _20=[],_21=_19.length,_22=true;for(var i=0;i<this.members.length;i++){if(_41.$55k[this.members[i].name]==true){_22=false;_20[_20.length]=this.members[i];_21--}
if(_21==0)break}
_41.$82y=_20;return _22?null:_20},getNestedSpanDepth:function(_41){return _2.getNestedSpanDepth(_41)},$55i:function(_41){if(!this.isDrawn()){return}
if(_41.$55j){if(_2.autoFitHeaderHeights){_41.setHeight(Math.max(_2.getHeaderButtonDefaultHeight(_41.spanConfig),_2.getHeaderButtonMinHeight(_41.spanConfig)))}else{var _23=_41,_24=_2.headerHeight;while(_23.parentSpan!=null&&_23.parentSpan.liveObject)
{var _25=_23.parentSpan.liveObject;_24-=_25.getVisibleHeight();_23=_25}
var _26=this.getNestedSpanDepth(_41);var _27=Math.floor(_24/(_26+1));if(_27<=0)_27=1;_41.setHeight(_27)}}
if(_41.parentSpan!=null&&_41.parentSpan.liveObject!=null){_41.setTop(_41.parentSpan.liveObject.getBottom())}
var _28=_2.autoSizeHeaderSpans;var _29=this.$82w(_41);var _30=_29==null||_29.length==0;if(_30){if(this.isVisible()){_41.hide()}
return}
var _31,_32=0,_33=0;for(var i=0;i<_29.length;i++){var _34=_29[i];_34.canReorder=false;if(_34.visibility!=isc.Canvas.HIDDEN){_32++;_33+=_34.getVisibleWidth();if(!_31||this.isRTL())_31=_34}}
if(_31){_41.setVisibility(isc.Canvas.INHERIT);_41.setLeft(_31.getLeft());var _35=_41.getWidth();_41.setWidth(_33);if(_28&&_41.isDrawn()){if(_41.isDirty())_41.redraw();_41.setOverflow(isc.Canvas.VISIBLE);var _36=_41.getVisibleWidth();if(_36>_33){_41.setWidth(_36);var _37=_36-_33;for(var i=0;i<_29.length;i++){var _34=_29[i];if(_34.visibility!=isc.Canvas.HIDDEN){var _38=Math.ceil(_37/_32);_37-=_38;_32-=1;_34.resizeBy(_38)}}
if(_36!=_35){_2.$45m("autoSizeHeaderSpans: Caused fields to expand",true)}}
_41.setOverflow(isc.Canvas.HIDDEN)}}},$58r:function(_54){if(!this.$55h)return;var _39=this.$97i;this.$97i=true;if(!_54)this.$55g();var _40=this.getVisibleHeight();this.$97g=true;var _17=this.instantRelayout;this.instantRelayout=false;for(var i=0;i<this.$55h.length;i++){var _41=this.$55h[i];if(!this.resizeFieldsOnly)this.addChild(_41);var _29=this.$82w(_41);if(!_29)continue;for(var j=0;j<_29.length;j++){var _43=_29[j],_44=_43.getVisibleHeight();var _25=_2.spanMap[_43.name],_45=0;do{if(_25.liveObject==null)break;_45+=_25.liveObject.getVisibleHeight();_25=_25.parentSpan}while(_25!=null)
_43.setHeight(_40-_45);if(_43.isDirty()){_43.redraw()}}
_41.bringToFront()}
this.instantRelayout=_17;if(!_39){delete this.$97g;delete this.$97i}},removeButtons:function(_54){if(_2.headerSpans)_2.$82z(_54,this);this.Super("removeButtons",arguments)},addButtons:function(_54,_55){this.Super("addButtons",arguments);if(_2.headerSpans)_2.$60x(_54,this);this.$58r()},draw:function(){if(this.$55h&&_2.unspannedHeaderVAlign){for(var i=0;i<this.buttons.length;i++){var _15=this.buttons[i],_46=_2.spanMap[_15.name]!=null;if(!_46){_15.valign=_2.unspannedHeaderVAlign}}}
this.Super("draw",arguments);this.$58r();if(_2.autoFitHeaderHeights){var _47=this.rotateHeaderTitles;for(var i=0;i<this.buttons.length;i++){var _48=this.buttons[i].rotateTitle;if(_47?_48!=false:_48){_2.logWarn("Autofitting header heights isn't supported for rotated titles - height or layout may be incorrect");break}}}},getStandardChildLocator:function(_54){var _5=_54.masterIndex,_2=this.grid;if(_5!=null&&_2!=null){var _49=this.$2558?this.$2558(_5):{fieldName:this.grid.getFieldName(_5)};return isc.AutoTest.createLocatorFallbackPath("headerButton",_49)}
return this.Super("getStandardChildLocator",_54)},getChildFromLocatorSubstring:function(_54,_55,_56,_57){if(isc.isA.Canvas(this[_54]))return this[_54];var _50=isc.AutoTest.parseLocatorFallbackPath(_54);if(this.grid&&_50&&_50.name=="headerButton"){var _51=_50.config.fieldName,_5=_51!=null?this.grid.getFieldNum(_51):parseInt(_50.config.index);if(isNaN(_5))_5=-1;var _43=this.grid.getFieldHeader(_5);if(_5==-1||_43==null){this.logWarn("fieldName:"+_51+", gave fieldNum:"+_5+" unable to find header button for this field.");return}
if(_43!=this){this.logWarn("AutoTest locator string specified this header for field "+_51+" but that header button is contained in header "+_43+". This can happen if headers have been frozen / unfrozen since the locator string was created. Redirecting to that widget.");return _43.getChildFromLocatorSubstring(_54)}
if(_57&&_57.attribute==isc.Canvas.$95l){var _52=this.grid.fields[_5];if(_5==this.grid.getCheckboxFieldPosition()){_57.value=!!_52.$63h}else _57.value=_52.sortDirection}
return this.members[this.grid.getLocalFieldNum(_5)]}
return this.Super("getChildFromLocatorSubstring",arguments)},$2029:function(_54,_55,_56){var _53=this.hPolicy;this.hPolicy="fill";this.reflowNow(_54,_55,_56);this.hPolicy=_53}},_1);if(!_3){_4.tabIndex=-1}
if(this.headerButtonConstructor!=null)
_4.buttonConstructor=this.headerButtonConstructor;var _43=this.createAutoChild("header",_4,isc.Toolbar);if(_43.canReorderItems&&!_43.dontObserve){this.observe(_43,"itemDragReordered",function(_54,_55){this.headerDragReordered(_54,_55,_43)})}
if(_43.canResizeItems&&!_43.dontObserve)this.$62l(_43);if(this.headerSpans)this.$60x(_1.buttons,_43);return _43});isc.evalBoundary;isc.B.push(isc.A.headerButtonResized=function isc_ListGrid_headerButtonResized(_1){if(this.$132e)return;if(this.$97e)return;if(this.$176h)return;if(this.$168j!=null&&this.$168j==this.getField(_1.name)){return}
this.fields.$775=false;this.$45m("header button resized")},isc.A.reorderFieldsForHeaderSpans=function isc_ListGrid_reorderFieldsForHeaderSpans(_1){if(_1==null)_1=this.headerSpans;if(_1==null)return;var _2=false;for(var i=0;i<_1.length;i++){var _4=_1[i],_5=this.getSpannedFields(_4);if(_5==null||_5.length==0||_5.length==1)continue;var _6=this.fields,_7=_5.length,_8=[],_9=null;for(var _10=0;_10<_7;_10++){var _11=this.completeFields.findIndex("name",_5[_10]);if(_11==-1)continue;if(_9==null){_9=!!(this.completeFields[_11].frozen)}else{if(_9!=!!(this.completeFields[_11].frozen)){this.logWarn("HeaderSpan with title:"+_4.title+" has both frozen and unfrozen fields specified. This is not supported.")}}
_8.add({field:_5[_10],pos:this.completeFields.findIndex("name",_5[_10])})}
_8.sortByProperty("pos",Array.ASCENDING);if(_8.length>0&&(_8.last().pos-_8.first().pos)>(_8.length-1))
{this.logWarn("HeaderSpan with title "+_4.title+" spans fields that are not adjacent in the specified fields array. Reordering fields such that they are adjacent and can be spanned.");var _12=_8.first().pos;for(var _10=0;_10<_7;_10++){var _13=_5[_10],_14=this.completeFields.findIndex("name",_13);if(_14==-1)continue;if(_12!=_14){_2=true;this.completeFields.slide(_14,_12)}
_12+=1}}else if(_4.spans){_2=this.reorderFieldsForHeaderSpans(_4.spans)}}
return _2},isc.A.buildSpanMap=function isc_ListGrid_buildSpanMap(_1,_2,_3,_4){if(_4==null)_4={};if(_1==null)_1=this.headerSpans;for(var i=0;i<_1.length;i++){var _6=_1[i];if(_2)_6.parentSpan=_2;if(_6.spans){this.buildSpanMap(_6.spans,_6,_3,_4)}else if(_6.fields){if(_3==true){_6=isc.addProperties({},_6);_6.fields=_6.fields.duplicate();for(var j=0;j<_6.fields.length;){var _8=_6.fields[j];var _9=this.getField(_8);if(_9==null||_9.shouldPrint==false){_6.fields.removeAt(j)}else{++j}}
_6.fields.removeAll(_6.fields.findAll("shouldPrint",false))}
for(var j=0;j<_6.fields.length;j++){_4[_6.fields[j]]=_6}}else{this.logWarn("ListGrid passed unexpected header span object with neither fields nor spans specified:"+this.echo(_6))}}
return _4},isc.A.getSpannedFields=function isc_ListGrid_getSpannedFields(_1,_2){if(_1==null)return[];if(_1.fields){var _3=_1.fields;if(_2){var _4=[];for(var i=0;i<_1.fields.length;i++){var _6=(this.completeFields||this.fields).find("name",_1.fields[i]);if(!_6||_6.canHide==false){continue}
_4.add(_1.fields[i])}
_3=_4}
return _3}
var _3=[];if(_1.spans){for(var i=0;i<_1.spans.length;i++){_3.addList(this.getSpannedFields(_1.spans[i],_2))}}
return _3},isc.A.$97j=function isc_ListGrid__headerSpanVisible(_1,_2){if(_2.spans){for(var i=0;i<_2.spans.length;i++){if(this.$97j(_1,_2.spans[i]))return true}
return false}else{return(_1.intersect(_2.fields).length>0)}},isc.A.$60x=function isc_ListGrid__addHeaderSpans(_1,_2,_3,_4){if(_3==null)_3=this.headerSpans;var _5=_1.getProperty("name");for(var i=0;i<_3.length;i++){var _7=_3[i];if(_7.fields!=null&&_7.spans!=null){this.logWarn("ListGrid specified with headerSpan config object containing both spans and fields. This is not supported - spanned fields must be all frozen or all not frozen. Span Configuration:\n"+this.echo(_7));_7.fields=null}
if(!this.$97j(_5,_3[i]))continue;var _8=this,_9=this.createHeaderSpan(_2,_7);_2.addSpan(_9);if(_9.spans){this.$60x(_1,_2,_9.spans,_9)}}},isc.A.createHeaderSpan=function isc_ListGrid_createHeaderSpan(_1,_2){var _3=this,_4=_2.liveObject;if(_4==null||_4.destroyed||_4.destroying||_4.$65i){var _5=_2,_6=isc.addProperties(this.getButtonProperties(),{_constructor:_1.buttonConstructor,height:this.headerSpanHeight,align:"center",valign:this.headerSpanVAlign,showRollOver:false,isSpan:true,tableStyle:this.getHeaderTableStyle(_5),showContextMenu:function(){return _3.headerSpanContextClick(this)},shouldClipTitle:function(_4){if(_3.autoSizeHeaderSpans)return false;return this.Super("shouldClipTitle",arguments)}},_5);if(_5.headerTitleStyle){_6.titleStyle=_5.headerTitleStyle}
if(_5.headerBaseStyle!=null){_6.baseStyle=_5.headerBaseStyle}
else{var _7=(this.headerSpanProperties?this.headerSpanProperties.baseStyle:null)||(this.headerSpanDefaults?this.headerSpanDefaults.baseStyle:null);if(_7)_6.baseStyle=_7}
if(_5.headerTitle!=null)_6.title=_5.headerTitle;_4=_5.liveObject=this.createAutoChild("headerSpan",_6);var _8=_5.height||(this.headerSpanProperties?this.headerSpanProperties.height:null)||(this.headerSpanDefaults?this.headerSpanDefaults.height:null)||this.headerSpanHeight;_4.$55j=this.autoFitHeaderHeights?_8||true:_8==null}
_4.$55k={};var _9=this.getSpannedFields(_2);for(var _10=0;_10<_9.length;_10++){_4.$55k[_9[_10]]=true}
_4.$82y=null;_4.spanConfig=_2;return _4},isc.A.$82z=function isc_ListGrid__removeHeaderSpans(_1,_2){var _3=[],_4=_1.getProperty("name");for(var i=0;i<_4.length;i++){var _6=this.spanMap[_4[i]];while(_6!=null&&_6.liveObject!=null){_6.liveObject.$82y=null;_6=_6.parentSpan}}},isc.A.getHiliteCriteriaFields=function isc_ListGrid_getHiliteCriteriaFields(){var _1=this.getAllFields();if(!_1)return;_1=_1.duplicate();if(this.showHeaderSpanTitlesInHiliteEditor&&this.headerSpans!=null){for(var i=0;i<_1.length;i++){var _3=this.spanMap[_1[i].name],_4=false,_5=[{title:this.getFieldTitle(_1[i])}];while(_3!=null){_4=true;_5.addAt(_3,0);_3=_3.parentSpan}
if(_4){var _6=_5.getProperty("title").join(this.hiliteEditorSpanTitleSeparator);_1[i]=isc.addProperties({},_1[i],{title:_6})}}}
return _1},isc.A.dirtyHeader=function isc_ListGrid_dirtyHeader(){if(this.header)this.header.markForRedraw()},isc.A.updateHeader=function isc_ListGrid_updateHeader(){var _1=this.frozenHeader?this.headerLayout:this.header;if(_1){_1.markForDestroy();_1.clear();if(this.showHeader){var _2=[this.frozenHeader,this.header];for(var i=0;i<_2.length;i++){if(_2[i]==null)continue;if(_2[i].$55h!=null){for(var _4=0;_4<_2[i].$55h.length;_4++){var _5=_2[i].$55h[_4];if(_5){_5.deparent();if(this.$1747)_5.destroy()}}}}
delete this.$1747}
_1.clearIDs();this.headerMenuButton=null}
this.header=this.frozenHeader=this.headerLayout=null;var _6=this.showHeader,_7;if(_6){_7=this.gridComponents.indexOf(this.$881);if(_7==-1){_6=false;this.logWarn("showHeader set to true, but header not included in grid header components. The header will not be shown.")}}
if(_6){if(this.autoFitHeaderHeights){this.dropCachedHeaderButtonHeights()}
this.makeHeader();this.updateGridComponents()}else if(this.sorter){this.sorter.hide()}
this.updateHeaderRadius()},isc.A.setHeaderHeight=function isc_ListGrid_setHeaderHeight(_1){var _2=this.headerHeight;if(_2==_1)return;this.headerHeight=_1;this.$109d(_2==0)},isc.A.$109d=function isc_ListGrid__updateHeaderHeight(_1){if(this.showHeader==false)return;if(!this.header&&this.getHeaderHeight()>0){var _2=this.gridComponents.indexOf("header");if(_2==-1){return}
if(this.isDrawn()){this.updateGridComponents()}}else{if(_1)this.updateHeader();this.layoutChildren(this.$616)}
this.updateSorter();if(this.headerSpans){this.header.$58r(true)}},isc.A.setShowHeader=function isc_ListGrid_setShowHeader(_1){if(_1==this.showHeader)return;this.showHeader=_1;this.updateHeader();this.layoutChildren(this.$617)},isc.A.shouldShowHeaderMenuButton=function isc_ListGrid_shouldShowHeaderMenuButton(_1,_2,_3){if(!_2&&this.ns.EH.$129k())return false;if(this.suppressHeaderMenuButton)return false;var _4;if(_1.showDefaultContextMenu==false){_4=false}
else if(_1.showHeaderContextMenuButton!=null){_4=_1.showHeaderContextMenuButton}else{_4=this.showHeaderMenuButton}
if(this.showHeaderContextMenu&&_4&&_1.masterIndex!=null){return this.hasHeaderContextMenuItems(_1.masterIndex)}
return false},isc.A.getHeaderMenuButton=function isc_ListGrid_getHeaderMenuButton(_1){if(!this.headerMenuButton||this.headerMenuButton.destroyed){var _2={resizeFrom:(this.isRTL()?"L":"R")};if(this.headerMenuButtonIcon)_2.icon=this.headerMenuButtonIcon;if(this.headerMenuButtonIconHeight){_2.iconHeight=this.headerMenuButtonIconHeight}
if(this.headerMenuButtonIconWidth){_2.iconWidth=this.headerMenuButtonIconWidth}
var _3=this.headerSpans!=null;if(_3&&this.spannedHeaderMenuBaseStyle){_2.baseStyle=this.spannedHeaderMenuBaseStyle}else if(this.headerMenuButtonBaseStyle){_2.baseStyle=this.headerMenuButtonBaseStyle}
if(this.headerMenuButtonTitleStyle){_2.titleStyle=this.headerMenuButtonTitleStyle}
if(this.headerMenuButtonSrc)_2.src=this.headerMenuButtonSrc;var _4=this.headerMenuButtonConstructor||"Button";this.createAutoChild("headerMenuButton",_2,_4,true)}
this.$2022(_1);this.headerMenuButton.masterIndex=_1.masterIndex;this.headerMenuButton.canDragResize=_1.canDragResize!=null?_1.canDragResize&&this.canResizeFields:this.canResizeFields;return this.headerMenuButton},isc.A.$2023=function isc_ListGrid__getHeaderMenuButtonSnapOffsetLeft(_1){var _2=this.headerMenuButtonSnapOffsetLeft,_3=this.fieldIsFrozen(_1.masterIndex);if(!_3&&this.body!=null){var _4=this.body.getViewportWidth(),_5=_1.getVisibleWidth();if(this.isRTL()){}else{var _6=_1.getLeft(),_7=_6-this.body.getScrollLeft(),_8=_7+_5-_4;if(this.$313())_8+=this.$139x();if(this.body.vscrollOn)_8-=this.body.getScrollbarSize();if(_8>0){_2+=-_8}}}else if(_3&&this.frozenBody!=null){var _4=this.getViewportWidth(),_5=_1.getVisibleWidth();if(this.isRTL()){}else{var _8;if(this.sorter!=null&&this.$313()){_8=_1.getPageLeft()+_5-this.sorter.getPageLeft()}else{_8=_1.getLeft()+_5-_4;if(this.frozenBody.vscrollOn)_8-=this.frozenBody.getScrollbarSize()}
if(_8>0){_2+=-_8}}}
if(this.showHeaderResizers)_2-=(this.headerResizerWidth-1);return _2},isc.A.$2022=function isc_ListGrid__updateHeaderMenuButtonForRotation(_1){var _2=this.headerMenuButton,_3=_2.getSnapTo()!=null,_4=_2.getCustomState()!=null,_5=this.$2024(_1);if(!_3||_4!=_5){_2.setSnapTo(_5?"T":(this.isRTL()?"L":"R"));_2.setWidth(_5?this.rotatedHeaderMenuButtonWidth:this.headerMenuButtonWidth);_2.setHeight(_5?this.rotatedHeaderMenuButtonHeight:this.headerMenuButtonHeight);_2.setCustomState(_5?"Rotated":null)}
_2.setSnapOffsetLeft(_5?0:this.$2023(_1))},isc.A.headerMenuButtonClick=function isc_ListGrid_headerMenuButtonClick(){var _1=this.header,_2=this.headerMenuButton,_3=_1.containsEvent()?_1.getMouseOverButtonIndex():-1;if(_3<0&&this.frozenHeader){_1=this.frozenHeader;_3=_1.getMouseOverButtonIndex()}
if(_3==-1||!_2)return;var _4=_1.getMember(_3),_5=_2.getPageBottom(),_6=this.$314?this.$314.getVisibleWidth():isc.Menu.getPrototype().defaultWidth,_7=_4.getPageLeft(),_8=_2.getPageRight(),_9=this.isRTL()?Math.min(_7,_8-_6):Math.max(_7,_8-_6);this.displayHeaderContextMenu(_2,[_9,_5]);_2.bringToFront()},isc.A.headerMenuButtonDoubleClick=function isc_ListGrid_headerMenuButtonDoubleClick(){var _1=this.header,_2=_1.getMouseOverButtonIndex();if(_2==-1&&this.frozenHeader){_1=this.frozenHeader;_2=_1.getMouseOverButtonIndex()}
if(_2==-1)return;if(this.frozenFields&&_1==this.header){_2+=this.frozenFields.length}
isc.Menu.hideAllMenus();return this.headerDoubleClick(_2,_1)},isc.A.$129n=function isc_ListGrid__showHeaderMenuButton(_1){var _2=this.getHeaderMenuButton(_1);if(_2.masterElement!=null)_2.masterElement.markForRedraw();_1.addPeer(_2);_2.enable();_2.addProperties({dragTarget:_1});if(_1.zIndex>_2.zIndex)_2.bringToFront();if(!_2.isVisible()){_2.show()}
_1.markForRedraw();return _2},isc.A.$129m=function isc_ListGrid__hideHeaderMenuButton(_1){var _2=this.headerMenuButton;if(_2!=null&&_2.isVisible()){var _3=_2.masterElement;if(_1==null)_1=_3;if(_3==_1){_2.hide();if(_3!=null)_3.markForRedraw()}}},isc.A.$115b=function isc_ListGrid__shouldClipHeaderTitle(_1){var _2=this.fields[_1];if(this.autoFitHeaderHeights)return false;if(this.$181g(_2))return false;var _3=this.shouldAutoFitField(_2);if(_3){var _4=this.getAutoFitWidthApproach(_2);if(_4=="title"||_4=="both"){return false}}
return true},isc.A.$115c=function isc_ListGrid__getHeaderTitleClipperID(_1){if(!_1||!_1.name)return null;return this.$qs(_1.name+this.$114x)},isc.A.headerTitleClipped=function isc_ListGrid_headerTitleClipped(_1){var _2=this.fields[_1],_3=this.$115c(_2);if(_3==null)return false;var _4=isc.Element.get(_3);if(_4==null){var _5=this.getFieldHeaderButton(_1);if(_5.overflow==isc.Canvas.VISIBLE){return _5.getVisibleHeight()>_5.getHeight()}
var _6=_2?this.$190o(_2):null;return _5&&_5.titleClipped?_5.titleClipped(_6):null}
var _7=_2.rotateTitle;if(_7&&_2.wrap){var _8=this.getDocument().createRange();_8.selectNode(_4);var _9=_8.getBoundingClientRect(),_10=_4.parentElement.getBoundingClientRect();return _10.height<_9.height||_10.width<_9.width}
if(isc.Browser.isChrome||(isc.Browser.isMoz&&isc.Browser.version>=7))
{var _8=this.getDocument().createRange();_8.selectNodeContents(_4);var _9=_8.getBoundingClientRect(),_10=_4.getBoundingClientRect();return _7?_10.height<_9.height:_10.width<_9.width}else{return _7?_4.clientHeight<_4.scrollHeight:isc.Element.getClientWidth(_4)<_4.scrollWidth}},isc.A.$190o=function isc_ListGrid__getHeaderButtonSortAnchor(_1){if(this.isSortField(_1.name)&&(this.showSortArrow!=isc.ListGrid.NONE&&this.showSortArrow!=isc.ListGrid.CORNER||this.showSortNumerals&&this.getSortFieldCount()>1))
{var _2=this.$190p(_1);if(_2!=null)return isc.Element.get(_2)}
return null},isc.A.$1880=function isc_ListGrid__shouldPadHeaderButton(_1,_2){if(!_1)return false;var _3=_1.masterIndex,_4=this.getField(_3!=null?_3:_1.name);if(!_4)return false;var _5=this.headerButtonPaddingThreshold;if(_5!=null&&(this.getAutoFitWidthApproach(_4)=="value"||(!this.shouldAutoFitField(_4)&&this.$168j!=_4&&(!this.$113n||_4.canAutoFitWidth==false))))
{if(!_2)_2=isc.isA.Canvas(_1)?_1.getVisibleWidth():this.getColumnWidth(_3);if(!_2||_2<_5)return false}
return this.shouldLeaveHeaderMenuButtonSpace(_4)&&this.shouldShowHeaderMenuButton(_1)&&(this.$115b(_3)||this.$181g(_1))},isc.A.$1881=function isc_ListGrid__getHeaderButtonPadding(_1){var _2=this.headerMenuButtonWidth+1;if(_1){if(this.isSortField(_1.name)){if(!this.showSortArrow||this.showSortArrow==isc.ListGrid.FIELD||this.showSortArrow==isc.ListGrid.BOTH)
{_2+=this.sortArrowMenuButtonSpaceOffset}
if(this.showSortNumerals!=false&&this.getSortFieldCount()>1){_2+=this.sortNumeralMenuButtonSpaceOffset}}}
return _2},isc.A.$190p=function isc_ListGrid__getHeaderButtonSortAnchorID(_1){if(!_1||!_1.name)return null;return this.$qs(_1.name+this.$190m)},isc.A.getHeaderButtonTitle=function isc_ListGrid_getHeaderButtonTitle(_1,_2){var _3=_1;if(isc.isA.Object(_1))_3=_1.masterIndex;else{_1=this.getFieldHeaderButton(_3)}
var _4=this.fields[_3];if(!_4)return"";var _5=_4.name,_6=this.isSortField(_5),_7=this.$1880(_1||_4),_8=_6&&(!this.showSortArrow||this.showSortArrow==isc.ListGrid.FIELD||this.showSortArrow==isc.ListGrid.BOTH),_9=this.showSortNumerals==false?false:_6&&this.getSortFieldCount()>1;var _10;if(_9){var _11=this.getSortSpecifier(_5);_10=_11.sortIndex}
var _12=this.isRTL(),_13=_4.rotateTitle,_14=this.$181g(_4),_15=this.getFieldHeaderAlign(_3,_12);var _16=isc.StringBuffer.create(),_17=_4.showTitle==false?"":(_4.headerTitle!=null?_4.headerTitle:this.getFieldTitle(_3));if(_2==null)_2=this.$115b(_3);if(_14&&!_13){if(_7){var _18=this.headerMenuButtonWidth+1,_19=_8?this.getSortArrowImage(_3):null,_20=_9?this.getSortNumeralHTML(_5,_10,_12?"margin-right:4px":"margin-left:4px"):null;if(_19||_20){_16.append("<a id='",this.$190p(_4),"' style='display:inline-block;position:absolute;",_12?"left:":"right:",_18,"px;'>",_19,_20,"</a>")}}else{if(_9){_16.append("<a style='display:inline-block;",(_12?"float:left;margin-right:":"float:right;margin-left:"),"4px'>",this.getSortNumeralHTML(_5,_10),"</a>")}
if(_8){_16.append(this.getSortArrowImage(_3,false,false,true))}}
_16.append(_17)}else if(!_7&&(!_2||!this.clipHeaderTitles)&&!_13){_16.append("<div style='display:inline-block;max-width:100%;text-align:",_15,";vertical-align:middle'>");_16.append(_17);if(_8)_16.append(isc.nbsp,this.getSortArrowImage(_3));if(_9){_16.append(isc.nbsp,this.getSortNumeralHTML(_5,_10))}
if(!_2&&_1&&this.shouldLeaveHeaderMenuButtonSpace(_4)&&this.shouldShowHeaderMenuButton(_1))
{_16.append(isc.Canvas.spacerHTML(this.headerMenuButtonWidth,1))}
_16.append("</div>")}else{_16.append("<div style='display:inline-block;max-width:100%;text-align:",_15,";vertical-align:");if(_13){if(_1.valign==isc.Canvas.TOP)_16.append("top'>");else if(_1.valign==isc.Canvas.BOTTOM)_16.append("bottom'>");else _16.append("middle'>")}else _16.append("middle'>");var _21,_22=0,_23=0;if(_7){var _18=this.headerMenuButtonWidth+1,_19=_8?this.getSortArrowImage(_3):null,_20=_9?this.getSortNumeralHTML(_5,_10,_12?"margin-right:4px":"margin-left:4px"):null;if(_19||_20){_16.append("<a style='display:inline-block;position:absolute;",_12?"left:":"right:",_18,"px;'>",_19,_20,"</a>")}}else{_21=isc.Browser.isMoz&&!_13;if(_9){var _24=(_10>=9?12:6);_23+=4+_24;_16.append("<a style='",_12?"float:left;":"float:right;");if(!_13||_8){_16.append(_12?"margin-right:":"margin-left:","4px;")}
if(_13&&(_14||isc.Browser.isSafariStrict)){_16.append("height:12px;");_22=12}
_16.append("width:",_24,"px;overflow:hidden'>",this.getSortNumeralHTML(_5,_10),"</a>")}
if(_8){var _25=this.getSortArrowImage(_3,true,true);if(_25!=null){_23+=4+_25.width;_16.append(this.getSortArrowImage(_3,false,_2,_14,_13));if(_13&&(_14||isc.Browser.isSafariStrict)){_22=Math.max(_22,_25.height)}}}}
_16.append("<div");var _26=this.$115c(_4);if(_26!=null){_16.append(" id='",_26,"'")}
_16.append(" style='overflow:hidden;",isc.Browser.$114w,":ellipsis;white-space:",_14?"normal;":"nowrap;");if(_13){var _27="center;";if(_1.valign==isc.Canvas.TOP)_27="right;";else if(_1.valign==isc.Canvas.BOTTOM)_27="left;";var _28=this.$199e(true,_12);_16.append("text-align:",_27,this.$199d(true,_12),"writing-mode:",_28);if(isc.Browser.isSafariStrict){_16.append("-webkit-writing-mode:",_28)}
if(isc.isAn.Instance(_1)){var _29=_1.getHeight()-_1.$s1()-_22;if(_22>0){_16.append("margin-top:",_22,"px;display:block;height:")}else{_16.append("display:inline-block;height:")}
_16.append(_29,"px;")}else{}}
if(_21){_16.append(_12?"margin-left:":"margin-right:",_23,"px;")}
_16.append("'>",_17,"</div>","</div>")}
return _16.release(false)},isc.A.shouldLeaveHeaderMenuButtonSpace=function isc_ListGrid_shouldLeaveHeaderMenuButtonSpace(_1){if(_1.hasMenuItems==false)return false;if(this.$2024(_1))return false;if(_1.leaveHeaderMenuButtonSpace!=null)return _1.leaveHeaderMenuButtonSpace;if(this.leaveHeaderMenuButtonSpace!=null)return this.leaveHeaderMenuButtonSpace;return _1.align!="center"},isc.A.$2024=function isc_ListGrid__shouldRotateHeaderMenuButton(_1){if(this.rotateHeaderMenuButton==false)return false;return this.rotateHeaderTitles?_1.rotateTitle!=false:!!_1.rotateTitle},isc.A.$63m=function isc_ListGrid__setCheckboxHeaderState(_1,_2){if(this.fields==null){return}
var _3=this.getCheckboxFieldPosition(),_4=this.fields[_3];if(!this.isCheckboxField(_4))return;var _5=(this.canSelectAll==false||this.selectionType=="single")?isc.nbsp:this.$116w(_1,_2,true,false,_4);this.setFieldTitle(_3,_5);_4.$63h=_1&&!_2;_4.$188t=_1&&_2},isc.A.updateCheckboxHeaderState=function isc_ListGrid_updateCheckboxHeaderState(){var _1=this.getOriginalData();var _2=isc.isAn.Array(_1)||(isc.isA.ResultSet(_1)&&_1.allMatchingRowsCached());if(!_2){return}
var _3=this.isGrouped?this.getAllRecordsFromGroupTree():_1,_4=true,_5=false;var _6,_7=this.selectionManager.isA("CellSelection");if(_3!=null){for(var i=0,_9=_3.getLength();i<_9;++i){var _10=_3.get(i);if(_7){_6=this.canSelectRecord(_10)}else{_6=this.selectionManager.$1596(_10)}
if(_6){if(this.selectionManager.isSelected(_10)){_5=true;if(!_4)break}else{_4=false;if(_5)break}}}}
var _11=this.showHeaderPartialSelection,_12=_5&&(_4||(_11!=false&&_5)),_13=_11!=false?_5&&!_4:false;this.$63m(_12,_13)},isc.A.defaultHeaderHoverHTML=function isc_ListGrid_defaultHeaderHoverHTML(_1){var _2=this.fields[_1];if(_2==null)return null;if(_2.prompt!=null)return _2.prompt;var _3=this.clipHeaderTitles&&this.showClippedHeaderTitlesOnHover&&this.headerTitleClipped(_1);if(_3){return _2.headerTitle!=null?_2.headerTitle:this.getFieldTitle(_1)}
return null},isc.A.headerHoverHTML=function isc_ListGrid_headerHoverHTML(_1,_2){return _2},isc.A.$115a=function isc_ListGrid__showHeaderHover(_1,_2){var _3=this.fields[_1];if(_2&&!isc.is.emptyString(_2)){var _4=this.$115d(_3);isc.Hover.show(_2,_4,(_3.hoverRect||this.headerHoverRect))}else isc.Hover.clear()},isc.A.$115d=function isc_ListGrid__getHeaderHoverProperties(_1){var _2={};if(_1){_2=isc.addProperties({},{align:(_1.hoverAlign!=null?_1.hoverAlign:this.headerHoverAlign),baseStyle:(_1.hoverStyle!=null?_1.hoverStyle:this.headerHoverStyle),height:(_1.hoverHeight!=null?_1.hoverHeight:this.headerHoverHeight),hoverDelay:(_1.headerHoverDelay!=null?_1.headerHoverDelay:_1.hoverDelay!=null?_1.hoverDelay:this.headerHoverDelay),moveWithMouse:(_1.hoverMoveWithMouse!=null?_1.hoverMoveWithMouse:this.headerHoverMoveWithMouse),opacity:(_1.hoverOpacity!=null?_1.hoverOpacity:this.headerHoverOpacity),valign:(_1.hoverVAlign!=null?_1.hoverVAlign:this.headerHoverVAlign),width:(_1.hoverWidth!=null?_1.hoverWidth:this.headerHoverWidth),wrap:(_1.hoverWrap!=null?_1.hoverWrap:this.headerHoverWrap),autoFitWidth:this.hoverAutoFitWidth,autoFitMaxWidth:this.hoverAutoFitMaxWidth})}else{_2=isc.addProperties({},{align:this.headerHoverAlign,baseStyle:this.headerHoverStyle,height:this.headerHoverHeight,hoverDelay:this.headerHoverDelay,moveWithMouse:this.headerHoverMoveWithMouse,opacity:this.headerHoverOpacity,valign:this.headerHoverVAlign,width:this.headerHoverWidth,wrap:this.headerHoverWrap,autoFitWidth:this.hoverAutoFitWidth,autoFitMaxWidth:this.hoverAutoFitMaxWidth})}
return _2},isc.A.$666=function isc_ListGrid__headerClick(_1,_2){var _3=_2.getMember(_1).masterIndex;return this.headerClick(_3,_2)},isc.A.headerClick=function isc_ListGrid_headerClick(_1,_2){if(this.editingOn&&this.editProxy&&this.editProxy.headerClick){this.editProxy.headerClick(_1,_2);return}
if(this.onHeaderClick&&(this.onHeaderClick(_1,_2)==false)){return}
var _3=this.fields[_1];if(this.isCheckboxField(_3)&&this.selectionType!="single"&&this.canSelectAll!=false){if(_3.$63h||(_3.$188t&&this.deselectOnPartialCheckboxClick)){this.deselectAllRecords();this.$63m(false)}else{this.userSelectAllRecords();this.updateCheckboxHeaderState()}
return false}
if(_3&&this.canAutoFitField(_3)&&this.headerAutoFitEvent=="click"){this.autoFitField(_1)}
if(!this.$66c(_3))return false;var _4=_3.name,_5=isc.EventHandler,_6=_5.shiftKeyDown(),_7=this.$765,_8=_3.sortDirection;if(!this.$93s){if(_6&&this.$91d()&&this.$91k(_3)){if(this.isSortField(_4)){if(_8==_7||this.canUnsort==false){this.toggleSort(_4)}else{this.toggleSort(_4,"unsort")}}else{this.$73z(_3)}}else{if(this.isSortField(_4)&&this.getSortFieldCount()==1){if(_8==_7||this.canUnsort==false){this.toggleSort(_4)}else{this.toggleSort(_4,"unsort")}}else{var _9=this.$766(_3);this.setSort([{property:_4,direction:_9}])}}}
return false});isc.evalBoundary;isc.B.push(isc.A.$774=function isc_ListGrid__headerDoubleClick(_1,_2){if(this.data&&this.data.lengthIsKnown&&!this.data.lengthIsKnown()){this.$163a=true;this.$163b=_1;this.$163c=_2;return}
return this.headerMenuButtonDoubleClick()},isc.A.headerDoubleClick=function isc_ListGrid_headerDoubleClick(_1,_2){var _3=this.fields[_1];if(this.isCheckboxField(_3))return;if(_3&&this.canAutoFitField(_3)&&this.headerAutoFitEvent=="doubleClick"){this.autoFitField(_1)}
return false},isc.A.fieldDragResizeStart=function isc_ListGrid_fieldDragResizeStart(){this.$97e=true;this.autoFitFieldsFillViewport=false;this.makeDragLine();this._dragLine.resizeTo(2,this.getVisibleHeight()-(this.body.hscrollOn?this.body.getScrollbarSize():0));var _1=this.ns.EH.dragTarget;var _2=this.getField(_1.masterIndex);if(_2){_2.autoFitWidth=false;var _3=this.$181g(_2);if(_3!=_1.wrap){_1.setWrap(_3)}}
_1.setWidth(_1.getVisibleWidth());_1.setOverflow("hidden")},isc.A.fieldDragResizeMove=function isc_ListGrid_fieldDragResizeMove(){var _1=this.ns.EH,_2=_1.dragTarget;if(this.autoSizeHeaderSpans!=null){this.$111t=this.autoSizeHeaderSpans;this.autoSizeHeaderSpans=false}
var _3=this.header.$6j;this.showDragLineForField(_3);if(this.resizeFieldsInRealTime){this.realtimeFieldResize(_3)}
if(this.headerMenuButton&&this.headerMenuButton.snapOffsetLeft!=0){this.headerMenuButton.setSnapOffsetLeft(0)}},isc.A.realtimeFieldResize=function isc_ListGrid_realtimeFieldResize(_1){var _2=isc.EH,_3=_2.dragResizeWidth,_4=this.getMinFieldWidth(this.fields[_1],true);if(_3<_4)_3=_4;this.$26a[_1]=_3;if(this.$32c){this.syncBodyScrolling()}
this.$54e=true;this.setBodyFieldWidths(this.$26a);this.body.useQuickDrawAheadRatio=true;this.body.redraw("fieldDragResize");delete this.body.useQuickDrawAheadRatio;delete this.$54e;if(!this.isRTL()){var _5=this.body.getScrollLeft();if(_5>0){this.header.scrollTo(_5,null,"headerResize")}}else{if(this.header.getScrollLeft()<this.header.getLeft()){this.header.scrollTo(this.header.getLeft())}}},isc.A.fieldDragResizeStop=function isc_ListGrid_fieldDragResizeStop(){if(this.$111t!=null){this.autoSizeHeaderSpans=this.$111t;delete this.$111t}
this.hideDragLine()},isc.A.headerDragReordered=function isc_ListGrid_headerDragReordered(_1,_2,_3){var _4=_3.getMember(_1).masterIndex,_5=_3.getMember(_2).masterIndex;this.reorderField(_4,_5)},isc.A.reorderField=function isc_ListGrid_reorderField(_1,_2){this.reorderFields(_1,_1+1,_2-_1)},isc.A.reorderFields=function isc_ListGrid_reorderFields(_1,_2,_3){if(this.showFilterEditor&&this.filterEditor!=null){this.filterEditor.reorderFields(_1,_2,_3)}
if(this.summaryRow&&this.showGridSummary){this.summaryRow.reorderFields(_1,_2,_3)}
var _4=this.fields[_1],_5=this.fields[_2-1],_6=_1+_3,_7=this.fields[_6];var _8=this.$60z(),_9=this.fields[_8];if(this.$26a!=null)this.$26a.slideRange(_1,_2,_1+_3);if(this.completeFields==null)this.setFields(this.fields);if(this.completeFields.contains(_7)){var _10=this.completeFields.indexOf(_4),_11=this.completeFields.indexOf(_5)+1,_12=this.completeFields.indexOf(_7);this.completeFields.slideRange(_10,_11,_12)}
this.deriveVisibleFields();if(_8!=null){_8=this.fields.indexOf(_9);if(_8==-1)_8=null;this.$600(_8)}
var _13;if(!this.frozenFields){_13=this.getFieldHeader(_1);if(_13){_13.reorderItems(this.getLocalFieldNum(_1),this.getLocalFieldNum(_2),this.getLocalFieldNum(_1+_3))}}else{_13=this.getFieldHeader(_1);this.rebuildForFreeze();this.syncHeaderScrolling(this.body.getScrollLeft())}
if(_8!=null&&_13&&this.selectHeaderOnSort){this.selectSortFieldHeaderButton()}
var _14=this.$30a;if(_14){var _15=this.$286,_16=this.getEditRow(),_17=this.getEditField(),_18=[]
for(var i=0;i<_15.items.length;i++){var _20=_15.items[i];_20.colNum=this.fields.findIndex("name",_20.getFieldName());for(var j=0;j<=_18.length;j++){if(_18[j]==null||_18[j].colNum>_20.colNum){_18.addAt(_20,j);break}}}
_15.items.setArray(_18);this.$30u=this.fields.indexOf(_17)}
var _22=this.body;if(this.frozenFields&&_1<this.frozenFields.length){_22=this.frozenBody}
if(_22){this.body.fields=this.normalFields||this.fields;if(this.frozenBody)this.frozenBody.fields=this.frozenFields;this.setBodyFieldWidths(this.$26a);if(_22.$29a!=null){this.$75n(_22)}
if(!_22.isDirty())this.$25a("reorderFields")}
if(this.showFilterEditor&&this.filterEditor!=null&&!this.$54u())
{var _23=this.fields.length;if(_2==_23||_2+_3==_23){this.filterEditor.sourceWidgetFieldsResized()}}
this.handleFieldStateChanged()},isc.A.remapEditFieldsForFreeze=function isc_ListGrid_remapEditFieldsForFreeze(){if(this.$30a){var _1=this.getEditForm(),_2=_1.getItems();for(var i=0;i<_2.length;i++){var _4=_2[i];_4.colNum=this.fields.findIndex("name",_4.getFieldName());var _5=this.fields[_4.colNum];if(!this.$54d&&_5.frozen)_4.containerWidget=this.frozenBody;else _4.containerWidget=this.body}}},isc.A.headerDragResized=function isc_ListGrid_headerDragResized(_1,_2,_3){var _4=_3.getMember(_1).masterIndex;for(var i=0;i<this.fields.length;i++){if(i==_4)continue;this.fields[i].$35z=this.fields[i].width;this.fields[i].$120x=this.fields[i].autoFitWidth
this.fields[i].width=this.getFieldWidth(i);this.fields[i].autoFitWidth=false;var _6=this.getFieldHeaderButton(i);if(_6){_6.$120y=_6.$pn;_6.updateUserSize(this.fields[i].width,this.$o6)}}
this.$278j(_4,_2,true);for(var i=0;i<this.fields.length;i++){if(i==_4)continue;this.fields[i].width=this.fields[i].$35z;delete this.fields[i].$35z;this.fields[i].autoFitWidth=this.fields[i].$120x
delete this.fields[i].$120x;var _6=this.getFieldHeaderButton(i);if(_6){_6.updateUserSize(_6.$120y,this.$o6);delete _6.$120y}}
this.$97e=false;var _7=this.body.getScrollLeft();this.syncHeaderScrolling(_7,top);this.syncFilterEditorScrolling(_7,top);this.syncSummaryRowScrolling(_7,top)},isc.A.setCanResizeFields=function isc_ListGrid_setCanResizeFields(_1){if(this.canResizeFields==_1)return;this.canResizeFields=_1;if(_1==false)this.canAutoFitFields=false;if(this.header)this.header.setCanResizeItems(_1);if(this.frozenHeader)this.frozenHeader.setCanResizeItems(_1);if(this.headerMenuButton)this.headerMenuButton.canDragResize=_1;if(_1){if(this.header&&!this.header.dontObserve)this.$62l(this.header);if(this.frozenHeader&&!this.frozenHeader.dontObserve)
this.$62l(this.frozenHeader)}else{if(this.header)this.$62m(this.header);if(this.frozenHeader)this.$62m(this.frozenHeader)}},isc.A.$62l=function isc_ListGrid__observeHeaderResize(_1){this.observe(_1,"itemDragResized",function(_2,_3){this.headerDragResized(_2,_3,_1)});this.observe(_1,"dragResizeMemberStart",function(){this.fieldDragResizeStart()});this.observe(_1,"dragResizeMemberMove",function(){this.fieldDragResizeMove()});this.observe(_1,"dragResizeMemberStop",function(){this.fieldDragResizeStop()})},isc.A.$62m=function isc_ListGrid__ignoreHeaderResize(_1){if(this.isObserving(_1,"itemDragResized"))
this.ignore(_1,"itemDragResized");if(this.isObserving(_1,"dragResizeMemberStart"))
this.ignore(_1,"dragResizeMemberStart");if(this.isObserving(_1,"dragResizeMemberMove"))
this.ignore(_1,"dragResizeMemberMove");if(this.isObserving(_1,"dragResizeMemberStop"))
this.ignore(_1,"dragResizeMemberStop")},isc.A.resizeField=function isc_ListGrid_resizeField(_1,_2){this.$278j(_1,_2);var _3=this.getField(_1);if(_3!=null)this.$278k([_3])},isc.A.$278j=function isc_ListGrid__resizeField(_1,_2,_3){this.$116t([_1],[_2],[_3])},isc.A.$116t=function isc_ListGrid__resizeFields(_1,_2,_3){for(var i=0;i<_1.length;i++){var _5=_1[i];if(!isc.isA.Number(_5))_5=this.getFieldNum(_5);if(_5==-1){_1.removeAt(i);_2.removeAt(i);_3.removeAt(i);i--}else{_1[i]=_5;var _6=this.getMinFieldWidth(this.fields[_5],true);if(_6>_2[i]){_2[i]=_6}}}
if(_1.length==0)return;var _7=this.header&&this.header.isDrawn();if(_7){var _8=this.header.instantRelayout,_9=this.frozenHeader?this.frozenHeader.instantRelayout:null;this.header.instantRelayout=false;if(this.frozenHeader)this.frozenHeader.instantRelayout=false}
this.$176h=true;for(var i=0;i<_1.length;i++){var _5=_1[i],_10=_2[i];if(_7){var _11=this.getFieldHeader(_5),_12=this.getLocalFieldNum(_5);_11.getMember(_12).setOverflow("hidden");_11.getMember(_12).setWidth(_10)}
var _13=_3[i];if(_13==null||_13){this.fields[_5].width=_10;this.fields[_5].autoFitWidth=false;this.fields[_5].userResizeWidth=_10}
if(this.$26a!=null){this.$26a[_5]=_10}}
delete this.$176i;if(_7){this.header.instantRelayout=_8;this.header.reflowNow("resized headers");if(this.frozenHeader){this.frozenHeader.instantRelayout=_9;this.frozenHeader.reflowNow("resized headers")}}
if(!this.isDrawn())return;this.$54e=true;this.setBodyFieldWidths(this.$26a);if(this.body.isDirty()){this.body.redraw("setting body field widths")}
delete this.$54e;if(!this.$113n&&this.header&&this.autoFitHeaderHeights){this.dropCachedHeaderButtonHeights();this.$109d()}
if(this.isRTL()&&this.header!=null){this.syncBodyScrolling()}
if(this.showFilterEditor&&this.filterEditor){this.filterEditor.sourceWidgetFieldsResized()}
if(this.summaryRow&&this.showGridSummary){this.summaryRow.$116t(_1,_2,_3)}
this.handleFieldStateChanged(true)},isc.A.$313=function isc_ListGrid__showSortButton(){var _1=this.showSortArrow;if(_1!=null){return(_1==isc.ListGrid.CORNER||_1==isc.ListGrid.BOTH)}
return this.$54u()},isc.A.$54u=function isc_ListGrid__shouldLeaveScrollbarGap(_1){if(this.body&&this.body.suppressScrollbarGap)return false;var _2=(this.autoFitData==isc.Canvas.VERTICAL||this.autoFitData==isc.Canvas.BOTH);if(this.leaveScrollbarGap&&!_2)return true;if(!this.body||this.isEmpty())return false;if(_1==null)_1=this.body.vscrollOn;if(_1)return true;if(!this.predictScrollbarGap||this.bodyOverflow!=isc.Canvas.AUTO)return false;var _3=this.body,_4=this.getHeaderHeight(),_5=this.getInnerHeight()-this.body.getVMarginBorder()-
(this.showHeader?_4:0);var _6=this.getTotalRows(),_7;if(_2){var _8=this.autoFitMaxRecords,_9=true;if(_8!=null&&_8!=0&&_8<_6){_6=_8;_9=false}
_7=(_6*_3.derivedRowHeight);if(_9)_7+=_3.derivedCellBorderVSpacing;var _10=this.getAutoFitMaxBodyHeight();if(_10!=null&&_10!=0&&_10<_7){_7=_10}
if(_7>_5){_5=_7}}else{_7=(_6*_3.derivedRowHeight);if(_9)_7+=_3.derivedCellBorderVSpacing}
return _7>_5},isc.A.getSorterTop=function isc_ListGrid_getSorterTop(){return(this.headerLayout||this.header).getTop()},isc.A.getSorterLeft=function isc_ListGrid_getSorterLeft(){if(this.isRTL()){return this.getLeftMargin()+this.getLeftBorderSize()+this.getLeftPadding()}else{var _1=(this.headerLayout||this.header);var _2=_1.getWidth()+_1.getLeft()-this.$139x();if(this.$54u()){_2+=this.body!=null?this.body.getScrollbarSize():this.getScrollbarSize()}
return _2}},isc.A.$139x=function isc_ListGrid__getSorterWidth(_1){var _2=this.sorter;if(_1||_2==null){var _3=this.body!=null?this.body.getScrollbarSize():this.getScrollbarSize(),_4;if(_3<=0)_4=16;else _4=Math.max(5,_3);return _4}else{return _2.getWidth()}},isc.A.makeCornerSortButton=function isc_ListGrid_makeCornerSortButton(){this.sorter=this.createAutoChild("sorter",isc.addProperties(this.getButtonProperties(),this.sorterDefaults,{ID:this.getID()+"_sorter",width:this.$139x(),height:this.getHeaderHeight(),backgroundColor:this.headerBackgroundColor,imgDir:this.widgetImgDir,visibility:(this.$313()?isc.Canvas.INHERIT:isc.Canvas.HIDDEN),ariaState:{label:this.sorterButtonTitle},tabIndex:this.canTabToSorter?null:-1,canHover:true,getHoverHTML:isc.$aq("return "+this.getID()+".getFieldCriteriaHover()"),hoverWrap:true,hoverAutoFitWidth:true,hoverAutoFitMaxWidth:300,visibilityChanged:function(){this.creator.updateHeaderRadius()},stateChanged:function(){this.creator.updateHeaderRadius()}}));if(this.showHeaderShadow&&this.sorter.shouldUseCSSShadow()){this.sorter.showShadow=true;if(this.headerShadowHOffset!=null){this.sorter.shadowHOffset=this.headerShadowHOffset}
if(this.headerShadowVOffset!=null){this.sorter.shadowVOffset=this.headerShadowVOffset}
if(this.headerShadowSoftness!=null){this.sorter.shadowSoftness=this.headerShadowSoftness}
if(this.headerShadowColor!=null){this.sorter.shadowColor=this.headerShadowColor}}
this.addChild(this.sorter,"sorter",false)},isc.A.$91j=function isc_ListGrid__sorterContextClick(){if(this.sorterContextClick&&!this.sorterContextClick())return false;var _1=this.showHeaderContextMenu;if(this.showCornerContextMenu!=null)_1=this.showCornerContextMenu;if(_1)return this.displayHeaderContextMenu(this.sorter)},isc.A.headerBarContextClick=function isc_ListGrid_headerBarContextClick(_1){var _2=this.showHeaderContextMenu;if(this.showCornerContextMenu!=null)_2=this.showCornerContextMenu;if(_2&&(isc.EH.isKeyEvent()||_1.containsEvent())){var _3=isc.EH.isKeyEvent()?_1.getFocusButtonIndex():_1.getMouseOverButtonIndex();return this.displayHeaderContextMenu(_1.getMember(_3))}},isc.A.headerSpanContextClick=function isc_ListGrid_headerSpanContextClick(_1){var _2=this.getHeaderSpanContextMenuItems(_1);if(!_2||_2.length==0)return false;if(!this.spanContextMenu){this.spanContextMenu=this.createAutoChild("spanContextMenu",{items:_2,autoFitFieldWidths:true},this.getMenuConstructor())}else{this.spanContextMenu.setItems(_2)}
this.spanContextMenu.showContextMenu();return false},isc.A.displayHeaderContextMenu=function isc_ListGrid_displayHeaderContextMenu(_1,_2){if(!_1){if(this.sorter){_1=this.sorter}else{return}}
var _3=this.fields[_1.masterIndex];if(_3&&_3.showDefaultContextMenu==false)return false;var _4=this.getHeaderContextMenuItems(_1.masterIndex);if(_4.length==0)return;if(!this.$314)this.$314=this.getHeaderContextMenu(_1);this.$314.setData(_4);this.$93s=true;if(_2!=null&&_2.length>0){var _5=this.$314;_5.target=_1;_5=_5.$148b||_5.$1431||_5;_5.setVisibility("hidden");if(_5!==this.$314){if(!_5.isDrawn()){this.$314.$8h();if(!_5.isDrawn())_5.draw()}}else{_5.moveTo(0,0);if(!_5.isDrawn()){_5.$8h();if(!_5.isDrawn())_5.draw()}else{_5.redraw()}
_5.placeNear(_2[0],_2[1])}
this.$314.show();return false}else{return this.$314.showContextMenu(_1)}},isc.A.getToggleFreezeText=function isc_ListGrid_getToggleFreezeText(_1,_2){var _3={viewer:this,title:_2?_2.title:this.getSummaryTitle(_1)};return(!this.$54d&&_1.frozen)?this.unfreezeFieldText.evalDynamicString(this,_3):this.freezeFieldText.evalDynamicString(this,_3)},isc.A.getGroupByText=function isc_ListGrid_getGroupByText(_1){var _2={field:_1,title:this.getSummaryTitle(_1),viewer:this}
return this.groupByText.evalDynamicString(this,_2)},isc.A.$269f=function isc_ListGrid__enableGroupByFieldItem(_1){var _1=this.getField(_1);if(!_1||_1.hidden)return false;return!!(this.$58g(_1)&&this.getOriginalData().getLength()<=this.groupByMaxRecords)},isc.A.$58g=function isc_ListGrid__canGroupByField(_1){var _1=this.getUnderlyingField(_1);return!!(_1&&((this.canGroupBy==true&&_1.canGroupBy!=false)||(this.canGroupBy!=false&&_1.canGroupBy==true)||(this.editingOn&&this.editProxy&&this.editProxy.canGroupBy)))},isc.A.getHeaderSpanContextMenuItems=function isc_ListGrid_getHeaderSpanContextMenuItems(_1){if(!this.showHeaderSpanContextMenu){return _1.getParentElement&&_1.getParentElement().showContextMenu()}
var _2=[];if(this.canPickFields&&this.showTreeColumnPicker){_2[0]={title:this.fieldVisibilitySubmenuTitle,submenu:this.getColumnPickerItems(),icon:this.fieldVisibilitySubmenuIcon}}
var _3=this,_4=this.getSpannedFields(_1),_5;if(_4){for(var i=0;i<_4.length;i++){var _7=_4[i],_8=this.getField(_7);if(_8&&!this.$54d&&_8.frozen){_5=true;break}}}
if(this.$2360()){_2.add({title:this.showFilterEditor?this.hideFilterEditorTitle:this.showFilterEditorTitle,grid:this,click:function(){this.grid.setShowFilterEditor(!this.grid.showFilterEditor)}})}
if(this.canFreezeFields&&this.fields.length>1&&!_1.parentSpan){if(_5||this.frozenFields==null||this.normalFields.length>_4.length){if(_2.length>0)_2.add({isSeparator:true});_2.add({title:this.getToggleFreezeText(this.completeFields.find("name",_4[0]),_1),grid:this,spanFields:_4,frozen:_5,icon:(_5?"[SKINIMG]actions/unfreeze.png":"[SKINIMG]actions/freezeLeft.png"),click:function(){var _9=this.spanFields;for(var i=0;i<_9.length;i++){_3.completeFields.find("name",_9[i]).frozen=!this.frozen}
_3.rebuildForFreeze()}})}}
return _2},isc.A.shouldShowColumnPicker=function isc_ListGrid_shouldShowColumnPicker(_1){if(_1.treeField||_1.canHide===false)return false;var _2=this.getSummaryTitle(_1);if(_2==null||isc.isAn.emptyString(_2))return false;return true},isc.A.getColumnPickerItems=function isc_ListGrid_getColumnPickerItems(){var _1=[],_2=this;for(var i=0;i<this.completeFields.length;i++){var _4=this.completeFields[i];if(!this.shouldShowColumnPicker(_4))continue;var _5=this.getSummaryTitle(_4);var _6=this.spanMap?this.spanMap[_4.name]:null;if(this.showTreeColumnPicker&&_6){var _7=[_6],_8=_6.parentSpan;while(_8!=null){_7.add(_8);_8=_8.parentSpan}
var _9="";for(var _10=_7.length-1;_10>=0;_10--){var _11=_7[_10];if(!_1.find("spanConfig",_11)){_1.add({title:_9+_11.title,autoDismiss:false,spanConfig:_11,click:function spanMenu_click(_23,_14,_24){var _12=_2.getSpannedFields(_14.spanConfig,true);var _13=_14.anySpannedFieldsVisible(true);if(_13)_2.hideFields(_12.duplicate())
else _2.showFields(_12.duplicate());_24.body.delayCall("markForRedraw")},anySpannedFieldsVisible:function spanMenu_anySpannedFieldsVisible(_23){var _12=_2.getSpannedFields(this.spanConfig,_23);for(var i=0;i<_12.length;i++){if(_2.fieldIsVisible(_12[i]))return true}
return false},enableIf:function spanMenu_enableIf(_23,_24,_14){var _11=_14.spanConfig;var _12=_2.getSpannedFields(_11);for(var i=0;i<_24.data.length;i++){var _14=_24.data[i];if(_14.fieldName&&_2.fieldIsVisible(_14.fieldName)&&!_12.contains(_14.fieldName))return true}
return false},checkIf:function(_23,_24,_14){return _14.anySpannedFieldsVisible()}})}
_9+="&nbsp;&nbsp;&nbsp;&nbsp;"}
_5=_9+_5}
_1.add({title:_5,fieldName:_4.name,prompt:_4.prompt,autoDismiss:false,checkIf:function(_23,_24,_14){return _2.fieldIsVisible(_14.fieldName)},enableIf:function(_23,_24,_14){var _15=0;for(var i=0;i<_2.fields.length;i++){var _16=_2.fields[i];if(_2.fieldIsVisible(_16)&&_16.$81f){_15++}}
return!(_15===1&&_2.fieldIsVisible(_14.fieldName))},click:function(_23,_14,_24){var _17=_24.$35q,_18=_17?_17.data.findIndex("groupItem",true):null,_19=_17?_17.data[_18]:null,_20=(_19&&_19.fieldName==_14.fieldName);if(_2.fieldIsVisible(_14.fieldName)){var _21=_2.fields.length;if(_2.getCurrentCheckboxField()!=null)_21-=1;if(_21>1){_2.hideField(_14.fieldName)}
if(_21==1){var _22=_24.data.find("fieldName",_2.fields[0].name);_24.setItemEnabled(_22,false);this.$58s=_22}}else{_2.showField(_14.fieldName);if(this.$58s){_24.setItemEnabled(this.$58s,true);this.$58s=null}}
if(_20){_17.setItemEnabled(_18,_2.$269f(_19.fieldName))}
_24.body.delayCall("markForRedraw")}})}
return _1},isc.A.getColumnPickerMenu=function isc_ListGrid_getColumnPickerMenu(_1){var _2={canHover:true,showIcons:true,showHover:true,cellHoverHTML:function(_3){return _3.prompt},items:_1};return{title:this.fieldVisibilitySubmenuTitle,submenu:_2,icon:this.fieldVisibilitySubmenuIcon}},isc.A.getFilterOperatorMenuItem=function isc_ListGrid_getFilterOperatorMenuItem(_1,_2){var _3;var _4=_2?null:this.getFilterOperatorMenuItems(_1);if(_4&&_4.length==1&&_4[0].title==this.advancedFilteringText){_3=_4[0]}else{_3={title:this.filterUsingText,fieldName:_1.name,targetField:_1,prompt:_1.prompt,icon:"[SKINIMG]actions/filter.png",canSelectParent:false,submenu:_2?null:this.getFilterOperatorMenuItems(_1)}}
return _3},isc.A.getFilterOperatorMenuItems=function isc_ListGrid_getFilterOperatorMenuItems(_1,_2){var _3=this.getDataSource(),_4=this,_5=this.getFilterEditor(),_6=_5&&_5.getEditForm(),_7=_6&&_6.getItem(_1.name),_8=[];if(_7){var _9=function(_21,_1,_22){var _14=isc.DS.$1780(_1,_21);_8.add({title:_14,grid:_4,targetField:_1,fieldName:_1.name,operator:_21,checked:_22==_21.ID,click:function(_23,_24,_25){this.grid.setFieldSearchOperator(this.targetField,this.operator)}})}
if(_2){var _10=this.getFilterOperatorMenuItem(_1,true);if(_10.submenu){_10.showRollOver=false;_10.canSelect=false}
_8.add(_10);_8.add({isSeparator:true})}
var _11=isc.FormItemFactory.getItemClass(this.getFilterEditorType(_1));if(isc.isA.TextItem(_11)){var _12=_7.$1686||_7.getDefaultOperator(),_13=isc.shallowClone(isc.DS.$57z[_12]),_14=isc.DS.$1780(_1,_13);_14+=" "+this.defaultFilterOperatorSuffix;_13.title=_14;_13.titleProperty=null;_13.isFieldDefault=true;var _15=(_7.getOperator()||_1.filterOperator);var _16=_3.getSearchOperator(_15);var _17=_15==_12;_9(_13,_1,_15);_8.add({isSeparator:true});var _18=this.getFieldUIOperatorList(_1,_3);var _19;for(var _20 in _18){if(_20==_15)_17=true;_19=_3.getSearchOperator(_20)||_18[_20];if(_19.ID!=_12){_9(_19,_1,_15)}}
if(!_17&&_16){_9(_16,_1,_15)}}}
return _8},isc.A.getFieldSearchOperator=function isc_ListGrid_getFieldSearchOperator(_1,_2){var _3=this.getDataSource();if(!_3)return;var _4=_1;if(isc.isA.String(_4))_4=this.getFieldByName(_4);var _5;if(_4.operator||_4.filterOperator){_5=_3.getSearchOperator(_4.operator||_4.filterOperator)}
if(!_5&&_2){_5=_3.getSearchOperator(_2)}
return _5},isc.A.clearFieldSearchOperator=function isc_ListGrid_clearFieldSearchOperator(_1,_2){this.setFieldSearchOperator(_1,null,null,_2)},isc.A.setFieldSearchOperator=function isc_ListGrid_setFieldSearchOperator(_1,_2,_3,_4){var _5=this.getDataSource();if(!_5)return;_4=_4||this.$255d;var _6=_1;if(isc.isA.String(_6))_6=this.getFieldByName(_6);var _7=this.getFilterEditor(),_8=_7&&_7.getEditForm(),_9=_8&&_8.getItem(_6.name),_10=_9&&_9.getValue();if(!_9)return;if(_2!=null){if(isc.isA.String(_2))_2=_5.getSearchOperator(_2);if(!isc.isAn.Object(_2)){if(this.shouldAlwaysShowOperatorIcon(_6,_9))_9.showIcon("operatorIcon");return}}
var _11=this.getFieldSearchOperator(_6,_9.$1686),_12=!_2||_2.ID!=_11.ID,_13=(!_12||(_11!=null&&_2!=null&&_11.valueType==_2.valueType)),_14=false;if(_9){if(!_13&&this.allowFilterExpressions!=true){_14=true}else if(_2&&_2.valueType=="none"){_14=true}else if((_2&&_2.valueType=="criteria")||(_11&&_11.valueType=="criteria")){_14=true}else if(_9.optionDataSource||_9.getValueMap()&&(_9.$193&&!_9.$193(_9.getValue())))
{_14=true}}
if(_14)_9.clearValue();var _15=_9.getValue(),_16=_10!=_15;var _17=this.shouldAlwaysShowOperatorIcon(_6,_9)||(_2&&!_2.isFieldDefault);this.updateOperatorIcon(_6,_9,_17?_2:null);if(_2&&_2.valueType=="none"){if(_9.getCanEdit()){if(!_9.readOnlyDisplay)_9.readOnlyDisplay="disabled";_9.setCanEdit(false)}
if(!_4){if(_12||_16){if(this.filterByCell||this.filterOnKeypress){this.getFilterEditor().editorChanged(_9)}}}}else{if(!_9.getCanEdit()){_9.setCanEdit(true)}
if(_9&&(_12||_16)){var _18=this.filterByCell||this.filterOnKeypress;if(!_18){if(_11&&(_11.valueType=="none"||_11.valueType=="criteria")){_18=true}}
if(!_4&&_18){this.getFilterEditor().editorChanged(_9)}}
if(!_3)this.focusInFilterEditor(_6.name)}},isc.A.setFieldProperty=function isc_ListGrid_setFieldProperty(_1,_2,_3){if(_2=="operator"){var _4=this.getFilterEditor(),_5=_4.getEditForm(),_6=_5.getItem(_1.name);if(_3){_6.setValue(_3)}else{_6.resetValue();this.updateOperatorIcon(_1,_6,_3)}}},isc.A.updateOperatorIcon=function isc_ListGrid_updateOperatorIcon(_1,_2,_3){var _4=_2.getIcon("operatorIcon"),_5=false;if(!_4)return;if(!_3)_3=isc.DS.$57z[_2.$1686];if(_3.ID==_2.$1686){if(!this.shouldAlwaysShowOperatorIcon(_1,_2))_5=true}
if(_5){_2.operator=_2.$1686;this.getField(_1.name).operator=_2.operator;_2.hideIcon("operatorIcon");if(!_2.getCanEdit()){_2.setCanEdit(true)}}else{_4.prompt=isc.Operators[_3.titleProperty];var _6=isc.Operators.getOperatorUsageHint(_3);if(_6)_4.prompt+="<br>"+_6;_4.text=_3.symbol;_2.operator=_3.ID;this.getField(_1.name).operator=_3.ID;_2.showIcon("operatorIcon",false)}
_2.redraw()},isc.A.getOperatorIcon=function isc_ListGrid_getOperatorIcon(_1,_2){if(!_1)return;if(isc.isA.String(_2)){_2=this.getDataSource().getSearchOperator(_2)}
if(!_2){_2=this.getDataSource().getSearchOperator(_1.filterOperator)}
var _3=isc.addProperties({},this.operatorIconDefaults,this.operatorIconProperties,{grid:this,field:_1,fieldName:_1.name,hidden:true,showIf:"false",text:_2?_2.symbol:"",prompt:_2?isc.Operators[_2.titleProperty]:"",baseStyle:this.operatorIconStyle||this.header.getButton(0).baseStyle,click:function(_8,_9,_3){var _4=_3.grid,_5=_4.getFilterOperatorMenuItems(_3.field,true),_6=_4.filterOperatorMenu;if(!_6){_6=_4.filterOperatorMenu=_4.createAutoChild("filterOperatorMenu")}
_6.setItems(_5);var _7=_4.getFieldHeaderButton(_4.getFieldNum(this.field));_6.showContextMenu(_7)}});return _3},isc.A.hasHeaderContextMenuItems=function isc_ListGrid_hasHeaderContextMenuItems(_1){var _2=this.getField(_1);if(!_2)return null;if(_2.hasMenuItems!=null)return _2.hasMenuItems;_2.hasMenuItems=this.getHeaderContextMenuItems(_1,true).length>0;return _2.hasMenuItems},isc.A.getHeaderContextMenuItems=function isc_ListGrid_getHeaderContextMenuItems(_1,_2){var _3=this.getField(_1);if(!_2){}
if(!this.isObserving(this,"fieldStateChanged")){this.observe(this,"fieldStateChanged",function(){if(this.$314)this.$314.setDynamicItems()})}
var _4=[],_5=false;var _6=this.$66c(_3);if(_6||!_3){if(_3){var _7=_1!=null?_1:this.$60z();_4[0]={title:this.sortFieldAscendingText,icon:"[SKINIMG]actions/sort_ascending.png",click:function(_28,_18,_29){_29.doSort(_3.masterIndex,"ascending")},enableIf:function(_28,_29,_18){if(!_3.hidden)return true;else return false}};_4[1]={title:this.sortFieldDescendingText,icon:"[SKINIMG]actions/sort_descending.png",click:function(_28,_18,_29){_29.doSort(_3.masterIndex,"descending")},enableIf:function(_28,_29,_18){if(!_3.hidden)return true;else return false}};_5=true}
if(this.$91d()){_4.add({title:this.configureSortText,icon:"[SKINIMG]actions/configure_sort.png",field:_3,click:function(_28,_18,_29){_29.grid.askForSort(this.field==null?null:this.field.name)}});_5=true;if(!_3||this.isSortField(_3.name)){_4.add({title:_3?this.clearSortFieldText:this.clearAllSortingText,field:_3,icon:"[SKINIMG]actions/clear_sort.png",enableIf:function(_28,_29,_18){return(_3||(!_3&&_29.grid.getSortFieldCount()>0))},click:function(_28,_18,_29){if(_3)_29.doSort(_3.masterIndex,"unsort");else _29.grid.clearSort(true)}});_5=true}}}
if(_2&&_4.length>0)return _4;var _8=(_3&&this.canAutoFitField(_3));if(_8){if(this.canAutoFitFields){_4.add({title:this.autoFitAllText,icon:"[SKINIMG]actions/auto_fit_all.png",click:"menu.grid.autoFitFields()"})}
_4.add({title:this.autoFitFieldText,icon:"[SKINIMG]actions/auto_fit.png",click:function(_28,_18,_29){_29.grid.autoFitField(_3.masterIndex,true)},enableIf:function(_28,_29,_18){if(!_3.hidden)return true;else return false}})}
if(_2&&_4.length>0)return _4;if(!_3&&this.showFilterEditor){if(_5)_4.add({isSeparator:true});_4.add({title:this.clearFilterText,click:"menu.grid.clearFilterItemClick();"});_5=true}
if(_2&&_4.length>0)return _4;if(this.canPickFields&&this.completeFields.length>1){if(this.useAdvancedFieldPicker&&this.completeFields.length>=this.advancedFieldPickerThreshold)
{if(_5)_4.add({isSeparator:true});_4.add(this.createFieldPickerWindowMenuItem(this.fieldVisibilitySubmenuTitle+"..."));_5=true}else{var _9=this.getColumnPickerItems();if(_9.length>0){var _10=_9.length>1;if(!_10){var _11=_9[0].fieldName;for(var i=0;i<this.fields.length;i++){if(this.fields[i].name!=_11){_10=true;break}}}
if(_10){if(_5)_4.add({isSeparator:true});_4.add(this.getColumnPickerMenu(_9));_5=true}}}}
if(_2&&_4.length>0)return _4;if(this.$2360()){_4.add({title:this.showFilterEditor?this.hideFilterEditorTitle:this.showFilterEditorTitle,grid:this,click:function(){this.grid.setShowFilterEditor(!this.grid.showFilterEditor)}})}
var _13=_3&&this.$58g(_3),_14=(this.canGroupBy!=false)&&_3&&_3.canGroupBy!=false&&this.isGrouped;if(_5&&(_14||_13)){_4.add({isSeparator:true})}
if(_2&&_4.length>0)return _4;var _15=this.shouldAllowFilterWindow();if(_3&&(this.shouldAllowFilterOperators(_3)||_15)){var _16=this.getFilterEditor();var _17=_16&&_16.getEditForm();var _18;var _19=(_17||_15)?this.getFilterOperatorMenuItems(_3):[];if(_19.length==1&&_19[0].title==this.advancedFilteringText){_18=_19[0]}else{_18={title:this.filterUsingText,fieldName:_3.name,targetField:_3,icon:"[SKINIMG]actions/filter.png",prompt:_3.prompt,canSelectParent:false,submenu:_19}}
_4.add(_18)}
if(_2&&_4.length>0)return _4;if(_13){var _20=_3.groupingModes?_3.groupingModes:(!_3.getGroupValue?(_3.$62?(_3.$62.getGroupingModes?_3.$62.getGroupingModes():_3.$62.groupingModes):false):false);var _21=null;if(_20){_21=[];var _22=function(_28,_29){if(!_29)_29=_28;_21.add({title:_29,groupType:_28,targetField:_3,fieldName:_3.name,prompt:_3.prompt,checked:_3.groupingMode==_28,click:function(_30,_18,_31){_31.$35q.groupField(_18)}})}
if(isc.isAn.Array(_20)){for(var i=0;i<_20.length;i++){_22(_20[i])}}else if(isc.isAn.Object(_20)){for(var _23 in _20){_22(_23,_20[_23])}}}
_4.add({groupItem:true,title:this.getGroupByText(_3),fieldName:_3.name,targetField:_3,prompt:_3.prompt,icon:"[SKINIMG]actions/groupby.png",click:function(_28,_18,_29){_29.groupField(_18)},enabled:this.$269f(_3),cellHoverHTML:function(_28,_18,_29,_30){var _24=_28.grid;if(!_18.enabled){return _24.disabledGroupByPrompt}else{return _18.targetField.prompt}},canSelectParent:true,submenu:_21});if(this.canMultiGroup){var _24=this;_4.add({title:this.configureGroupingText,icon:"[SKINIMG]actions/groupby.png",targetField:_3,click:function(_28,_18,_29){_24.configureGrouping(this.targetField)},enabled:this.$269f(_3)})}
_5=true}
if(_2&&_4.length>0)return _4;if(_14){_4.add({title:this.ungroupText,click:"menu.ungroup()",icon:"[SKINIMG]actions/ungroup.png"});_5=true}
if(_2&&_4.length>0)return _4;if(_3){if(this.canFreezeFields&&this.fields.length>1&&(_3.frozen||(this.frozenFields==null||this.normalFields.length>1))&&!(this.spanMap&&this.spanMap[_3.name])&&_3.canFreeze!=false)
{if(_5)_4.add({isSeparator:true});_4.add({title:this.getToggleFreezeText(_3),grid:this,field:_3,icon:(_3.frozen?"[SKINIMG]actions/unfreeze.png":"[SKINIMG]actions/freezeLeft.png"),click:"item.grid.toggleFrozen(this.field,!this.field.frozen)",enableIf:function(_28,_29,_18){if(!_3.hidden)return true;else return false}});_5=true}}
if(_2&&_4.length>0)return _4;var _25=(this.canAddFormulaFields||(this.editingOn&&this.editProxy&&this.editProxy.canAddFormulaFields));if(_25){if(_5)_4.add({isSeparator:true});if(_3&&_3.userFormula&&_3.canEditFormula!=false){_4.add({title:this.editFormulaFieldText,grid:this,field:_3,click:"item.grid.editFormulaField(item.field)",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});_4.add({title:this.removeFormulaFieldText,grid:this,field:_3,click:"item.grid.removeField(item.field.name)",icon:"[SKINIMG]ListGrid/formula_menuItem.png"})}
_4.add({title:this.addFormulaFieldText,grid:this,click:"item.grid.addFormulaField()",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});_5=true}
if(_2&&_4.length>0)return _4;var _26=(this.canAddSummaryFields||(this.editingOn&&this.editProxy&&this.editProxy.canAddSummaryFields));if(_26){if(_5)_4.add({isSeparator:true});if(_3&&_3.userSummary&&_3.canEditSummary!=false){_4.add({title:this.editSummaryFieldText,grid:this,field:_3,click:"item.grid.editSummaryField(item.field)",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});_4.add({title:this.removeSummaryFieldText,grid:this,field:_3,click:"item.grid.removeField(item.field.name)",icon:"[SKINIMG]ListGrid/formula_menuItem.png"})}
_4.add({title:this.addSummaryFieldText,grid:this,click:"item.grid.addSummaryField()",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});_5=true}
if(_2&&_4.length>0)return _4;if(isc.AI&&this.addAIGeneratedFieldMenuItems(_3,_4,_5)){_5=true}
if(_2&&_4.length>0)return _4;var _27=(this.canEditHilites||(this.editingOn&&this.editProxy&&this.editProxy.canEditHilites));if(_27){if(_5)_4.add({isSeparator:true});_4.add({title:this.editHilitesText,grid:this,click:"item.grid.editHilites()"})}
if(_2&&_4.length>0)return _4;if(this.getCanSaveSearches()){{this.logWarn("The canSaveSearches property requires SmartClient Pro or better. See https://www.smartclient.com/product/ to find the edition right for you.")}}
return _4});isc.evalBoundary;isc.B.push(isc.A.canAutoFitField=function isc_ListGrid_canAutoFitField(_1){if(_1.canDragResize==false)return false;if(this.canResizeFields==false)return false;if(_1.canAutoFitWidth!=null)return _1.canAutoFitWidth;return!!this.canAutoFitFields},isc.A.clearFilterItemClick=function isc_ListGrid_clearFilterItemClick(){this.clearAllCriteria()},isc.A.clearAllCriteria=function isc_ListGrid_clearAllCriteria(_1){this.setFilterEditorCriteria(null);this.clearFilterWindowCriteria(false);if(!_1)this.filterByEditor()},isc.A.clearFilterWindowCriteria=function isc_ListGrid_clearFilterWindowCriteria(_1){if(this.filterWindowCriteria!=null){delete this.filterWindowCriteria;this.$233w();if(_1!=false){this.filterByEditor();return true}}
return false},isc.A.shouldAllowFilterWindow=function isc_ListGrid_shouldAllowFilterWindow(){if(this.shouldAllowFilterViaAI())return true;if(this.allowFilterWindow&&!isc.ListGrid.$2539){this.logWarn("The allowFilterWindow property requires SmartClient Pro or better. See https://www.smartclient.com/product/ to find the edition right for you.");isc.ListGrid.$2539=true}
return false},isc.A.advancedFilteringItemClick=function isc_ListGrid_advancedFilteringItemClick(_1){this.showFilterWindow(_1)},isc.A.shouldAllowFilterViaAI=function isc_ListGrid_shouldAllowFilterViaAI(){return false},isc.A.setAICriterion=function isc_ListGrid_setAICriterion(_1){if(!this.shouldAllowFilterViaAI()){this.logWarn("Filter-via-AI is not enabled.");return}
if(_1&&_1.operator!="aiFilter"){this.aiCriterion=null;this.setShowFilterEditor(true);this.setFilterEditorCriteria(_1,false);var _2=this.filterEditor.getEditForm(),_3=_2.$76u;delete _2.$76u;this.setFilterWindowCriteria(_3)}else{this.setCriteria(null);this.Super("setAICriterion",arguments);this.setShowFilterEditor(false);this.setFilterWindowCriteria(null);this.$233w()}},isc.A.shouldAllowHiliteViaAI=function isc_ListGrid_shouldAllowHiliteViaAI(){return false},isc.A.hiliteViaAI=function isc_ListGrid_hiliteViaAI(_1,_2,_3,_4){if(!this.shouldAllowHiliteViaAI()){this.delayFireCallback(_3,this.$289x,[isc.createDisabledResult(this.hiliteViaAIWasDisabledMessage)]);return}
if(isc.isA.String(_1))_1=_1.trim();if(!_1){this.delayFireCallback(_3,this.$289x,[{type:"success",hilites:[]}]);return}
let _5;if(isc.isA.String(_1))_5={prompt:_1};else _5=_1;const _6=isc.addPropertiesWithAssign({showProgressDialog:true},_2,{userAIRequest:_5,records:this.$2642(),dataSource:this.getDataSource(),component:this,mode:this.hiliteViaAIMode,aiPageSize:this.aiPageSize});const _7=this;isc.AI.buildHilites(_6,function(_9,_6){if(_9.type!="success"){if(!(_6.cancellationController&&_6.cancellationController.canceled)){isc.warn("Hiliting via AI did not succeed: "+isc.getAsyncMessage(_9))}}else if(!_4&&_9.hilites.length){const _8=_7.getHilites()||[];_8.addList(_9.hilites);_7.setHilites(_8)}
_7.fireCallback(_3,_7.$289x,[_9])})},isc.A.showFilterWindow=function isc_ListGrid_showFilterWindow(_1){{this.logWarn("showFilterWindow() requires SmartClient Pro or better. See https://www.smartclient.com/product/ to find the edition right for you.")}},isc.A.setFilterWindowCriteria=function isc_ListGrid_setFilterWindowCriteria(_1){this.filterWindowCriteria=isc.DS.simplifyAdvancedCriteria(_1,true);var _2=this.getFilterEditorCriteria();this.filterData(_2);this.$233w()},isc.A.getFilterWindowCriteria=function isc_ListGrid_getFilterWindowCriteria(){return isc.shallowClone(this.filterWindowCriteria)},isc.A.$233v=function isc_ListGrid__hideFilterWindowCriteriaIndicator(){if(this.filterWindowCriteriaIndicator){this.filterWindowCriteriaIndicator.hide();this.filterWindowCriteriaIndicator.markForDestroy();this.filterWindowCriteriaIndicator=null}},isc.A.$233w=function isc_ListGrid__showFilterWindowCriteriaIndicator(){if(!this.showFilterWindowCriteriaIndicator)return;var _1=isc.DS.simplifyAdvancedCriteria(this.filterWindowCriteria,true);if(_1||(this.shouldAllowFilterViaAI()&&this.aiCriterion)){if(!this.filterWindowCriteriaIndicator){this.filterWindowCriteriaIndicator=this.createAutoChild("filterWindowCriteriaIndicator")}
var _2=this.criteriaIndicatorColor,_3;if(this.$54u()){if(this.showFilterEditor&&this.filterEditor){_3=this.filterEditor.actionButton}else{_3=this.sorter;_2=this.criteriaIndicatorHeaderColor||_2}}else{if(this.showFilterEditor&&this.filterEditor){_3=this.filterEditor.actionButton}else{var _4=this.getFieldHeaderButton(this.getFields().length-1);_3=_4;_2=this.criteriaIndicatorHeaderColor||_2}}
if(_3){_3.addPeer(this.filterWindowCriteriaIndicator);this.filterWindowCriteriaIndicator.setProperty("eventProxy",_3);this.filterWindowCriteriaIndicator.setColor(_2);this.filterWindowCriteriaIndicator.moveAbove(_3);this.filterWindowCriteriaIndicator.show();if(_3.isDrawn&&!this.filterWindowCriteriaIndicator.isDrawn())this.filterWindowCriteriaIndicator.draw()}}else{if(this.filterWindowCriteriaIndicator){this.filterWindowCriteriaIndicator.clear()}}},isc.A.fireCriteriaChanged=function isc_ListGrid_fireCriteriaChanged(){if(this.criteriaChanged&&!this.ignoreStateChangeHandlers){this.fireCallback(this.criteriaChanged)}
if(this.saveCriteriaInViewState)this.handleViewStateChanged()},isc.A.editAISummaryField=function isc_ListGrid_editAISummaryField(){if(this.getTotalRows()<=this.aiSummaryFieldMaxRecords){return this.Super("editAISummaryField",arguments)}
isc.warn(this.aiSummaryFieldMaxRecordsMessage.evalDynamicString(this,{maxRecords:this.aiSummaryFieldMaxRecords}))},isc.A.$265e=function isc_ListGrid__canAddAISortFields(){return(this.canAddAISortFields||(this.editingOn&&this.editProxy&&this.editProxy.canAddAISortFields))&&this.$273m()},isc.A.editAISortField=function isc_ListGrid_editAISortField(_1){if(this.$273m()){return this.$1144(_1,"AISortField",null,this.aiSortFieldBuilderWindowTitle)}
isc.warn(this.aiSortFieldMaxRecordsMessage.evalDynamicString(this,{maxRecords:this.aiSortFieldMaxRecords}))},isc.A.addAISortField=function isc_ListGrid_addAISortField(){this.editAISortField()},isc.A.applySearchFormCriteria=function isc_ListGrid_applySearchFormCriteria(_1){this.searchFormCriteria=_1;var _2=this.getFilterEditorCriteria();this.filterData(_2)},isc.A.getFieldCriteriaHover=function isc_ListGrid_getFieldCriteriaHover(_1,_2){var _3=this.getDataSource(),_4;if(_1&&(this.showFilterEditorHovers==false||_1.showFilterEditorHovers==false)){return null}
if(_1){var _5=this.getFilterEditor().getEditFormItem(_1.name);var _6=_5&&_5.getCriterion();var _7=this.getActiveTextMatchStyle();if(_6&&_6.fieldName!=null&&_6.operator!=null&&!_5.operator&&_7)
{var _8=isc.DS.getCriteriaOperator(_6.value,_7,null,false);if(_8)_6.operator=_8}
if(_6){_4=isc.DS.getCriterionDescription(_6,_3).asHTML()}}
if(!_4&&!_1&&_2)_4=this.filterButtonPrompt;return _4},isc.A.$233x=function isc_ListGrid__getFieldCriterion(_1,_2){if(!_2.criteria)return null;return _2.criteria.find("fieldName",_1)},isc.A.getHeaderContextMenu=function isc_ListGrid_getHeaderContextMenu(){return this.createAutoChild("headerContextMenu",{ID:this.getID()+"$314",grid:this,ruleScope:this.ruleScope},this.getMenuConstructor())},isc.A.getSortArrowImage=function isc_ListGrid_getSortArrowImage(_1,_2,_3,_4,_5){if(_1==null)_1=this.$60z();var _6=null;if(this.showSortArrow!=false&&_1!=null){var _7=this.getField(_1),_8=_7&&_7.sortDirection;if(_8==null)_8=this.sortDirection;_6=Array.shouldSortAscending(_8)?this.sortAscendingImage:this.sortDescendingImage}
if(_2)return _6;if(_6!=null){if(isc.isA.String(_6))_6={src:_6};return this.imgHTML(isc.addProperties({imgDir:this.widgetImgDir,extraCSSText:(_3&&this.clipHeaderTitles)||_4||_5?(_5?(this.isRTL()?"float:left;":"float:right;"):(this.isRTL()?"float:left;margin-right:4px":"float:right;margin-left:4px")):null},_6))}else{return isc.Canvas.spacerHTML(1,1)}},isc.A.$91i=function isc_ListGrid__sorterClick(){if(this.sorterClick&&!this.sorterClick())return;var _1=this.$60z();if(!this.$66c(_1))return false;if(_1!=null){var _2=this.getField(_1),_3=_2.name,_4=this.$765,_5=this.$766(_2);if(this.isSortField(_3)){if(_4==_5||this.canUnsort==false){this.toggleSort(_3)}else{this.toggleSort(_3,"unsort")}}else{this.setSort([{property:_3,direction:_4}])}}else{this.sort(_1,(_1!=null?!Array.shouldSortAscending(this.getField(_1).sortDirection):null))}},isc.A.shouldShowDragLineForRecord=function isc_ListGrid_shouldShowDragLineForRecord(_1){return this.canReorderRecords&&this.showDropLines!=false},isc.A.showDragLineForRecord=function isc_ListGrid_showDragLineForRecord(_1,_2){if(!this.shouldShowDragLineForRecord(_1))return;var _3=this.body;if(_1==null)_1=this.getEventRecordNum();if(_1==-1){if(this._dragLine)this._dragLine.hide();return}
var _4=_3.getVisibleRows()[1];if(_1==-2)_1=_4;if(this._dragLine&&_1!=_4){var _5=this.getCellRecord(_1);if(!this.recordIsEnabled(_5,_1)){return this._dragLine.hide()}}
if(_2==null)_2=this.getRecordDropPosition(_1);var _6=this.getLeftBody();var _7=_6.getPageLeft()+(this.isRTL()&&_6.vscrollOn?_6.getScrollbarSize():0);if(_2==isc.ListGrid.BEFORE){this.showHDragLine(_7,_3.getRowPageTop(_1));this._dragLine.afterRow=_1-1}else if(_2==isc.ListGrid.AFTER){this.showHDragLine(_7,(_3.getRowPageTop(_1)+_3.getRowSize(_1)));this._dragLine.afterRow=_1}else{if(this._dragLine)this._dragLine.hide();return}
if(this.recordDropMove){this.fireCallback("recordDropMove","viewer,recordNum,record,position",[this,_1,this.getRecord(_1),_2])}},isc.A.showHDragLine=function isc_ListGrid_showHDragLine(_1,_2){this.makeDragLine();this._dragLine.resizeTo(this.getViewportWidth()-(this.body.vscrollOn?this.body.getScrollbarSize():0),2);var _3=this.body.getPageTop(),_4=_3+this.body.getVisibleHeight();if(_2<_3)_2=_3;else if(_2>_4)_2=_4;this._dragLine.setPageRect(_1,_2);this._dragLine.show();this._dragLine.moveAbove(this.getTopLevelCanvas())},isc.A.showDragLineForField=function isc_ListGrid_showDragLineForField(_1,_2){this.makeDragLine();if(_2==true||!this.body){this._dragLine.resizeTo(2,this.getHeaderHeight())}else{this._dragLine.resizeTo(2,this.getHeaderHeight()+this.body.getVisibleHeight())}
if(_1==null)_1=this.getEventFieldNum();if(_1<0){this._dragLine.hide();return}
var _3=this.ns.EH.dragTarget,_4=(!this.isRTL()?_3.getPageLeft()+this.ns.EH.dragResizeWidth:_3.getPageRight()-this.ns.EH.dragResizeWidth)-1;this._dragLine.setPageRect(_4,this.getPageTop()+(this.showFilterEditor?this.filterEditorHeight:0));this._dragLine.bringToFront();this._dragLine.show()},isc.A.unsort=function isc_ListGrid_unsort(_1){this.setSort(null,_1)},isc.A.resort=function isc_ListGrid_resort(){if(this.$126f)return;this.$126f=true;if(this.$73p)return this.setSort(isc.shallowClone(this.$73p));var _1=this.$60z();if(_1!=null){var _2=this.getField(_1),_3=this.$766(_2);return this.sort(_1,_3)}},isc.A.sort=function isc_ListGrid_sort(_1,_2){var _3,_4;if(isc.isA.String(_1)){_3=_1;_1=this.getFieldNum(_3);if(_1<0){_4=this.getUnderlyingField(_3)}}
if(!_4){var _5=this.$60z();if(_1==null){if(_5!=null){_1=_5}else{for(var i=0;i<this.fields.length;i++){if(this.$91k(this.fields[i])!=false){_1=i;break}}}}
if(_1==null)return false;_4=this.getField(_1)}
if(_4==null){return}
if(_2==null){_2=this.$766(_4)}
if(_5==_1&&_2==_4.sortDirection)return;var _7={property:_4.name,direction:Array.shouldSortAscending(_2)?"ascending":"descending"};return this.setSort([_7])},isc.A.$60z=function isc_ListGrid__getSortFieldNum(){if(this.sortFieldNum!=null)return this.sortFieldNum;if(this.sortField!=null){var _1=this.getFieldNum(this.sortField);if(_1==-1)_1=null;this.sortFieldNum=_1;var _2=this.getFieldName(this.sortFieldNum);if(_2)this.sortField=_2;return _1}
return null},isc.A.$600=function isc_ListGrid__setSortFieldNum(_1){this.sortFieldNum=_1;var _2=this.getFieldName(_1);this.sortField=_2},isc.A.getSortField=function isc_ListGrid_getSortField(){return this.sortField},isc.A.toggleSort=function isc_ListGrid_toggleSort(_1,_2){var _3=this.getSpecifiedField(_1),_4=this.$73p?isc.shallowClone(this.$73p):[],_5=_4.find("property",_1);if(!_5&&_3&&_3.displayField){_5=_4.find("property",_3.displayField)}
if(!_5){if(_2!="unsort"){if(!_2)_2=this.$766(_3);_4.push({property:_1,direction:_2})}}else{if(_2=="unsort")_4.remove(_5);else{if(!_2)
_2=Array.shouldSortAscending(_5.direction)?"descending":"ascending";_5.direction=_2}}
this.setSort(_4)},isc.A.$73z=function isc_ListGrid__addSort(_1,_2){if(!isc.isAn.Object(_1)){_1=this.getSpecifiedField(_1)}
var _3=_2||this.$766(_1);this.addSort({property:_1.name,direction:Array.shouldSortAscending(_3)?"ascending":"descending"})},isc.A.addSort=function isc_ListGrid_addSort(_1){var _2=this.$73p?isc.shallowClone(this.$73p):[];_2.add(_1);this.setSort(_2)},isc.A.getSort=function isc_ListGrid_getSort(){if(this.$73p){return this.removeSortSpecifierMarkers(isc.shallowClone(this.$73p))}else if(this.initialSort){return isc.shallowClone(this.initialSort)}else if(this.sortState){var _1=this.evalViewState(this.sortState,"sortState")||{};return _1.sortSpecifiers||_1}else{var _2;if(this.sortFieldNum!=null)_2=this.getField(this.sortFieldNum);if(!_2&&this.sortField!=null){_2=this.getUnderlyingField(this.sortField)}
if(_2){var _3=this.$766(_2);return[{property:_2.name,direction:_3}]}}},isc.A.getSortSpecifier=function isc_ListGrid_getSortSpecifier(_1){var _2=null;if(this.$73p&&this.$73p.length>0){_2=this.$73p.find("property",_1);if(!_2){var _3=this.getSpecifiedField(_1);if(_3&&_3.displayField&&_3.sortByDisplayField!=false){var _4;if(_3.optionDataSource){_4=isc.DS.getDataSource(_3.optionDataSource)}
if(!_4||_4===this.getDataSource()){_2=this.$73p.find("property",_3.displayField)}}}}
return _2},isc.A.getSortFieldCount=function isc_ListGrid_getSortFieldCount(){return this.$73p?this.$73p.length:0},isc.A.getSortNumeralHTML=function isc_ListGrid_getSortNumeralHTML(_1,_2,_3){var _4=this.$145s;_4[1]=this.sortNumeralStyle;_4[3]=_3;isc.$bk(_4,(_2+1),5,3);return _4.join(isc.emptyString)},isc.A.$199d=function isc_ListGrid__getTextTransform(_1,_2){if(!_1)return null;if(_2==null)_2=this.isRTL();var _3=isc.Browser.$199a;return(_2?_3.rotate_rtl:_3.rotate_ltr)?this.$199c:null},isc.A.$199e=function isc_ListGrid__getTextWritingMode(_1,_2){var _3=isc.Browser.$199a;if(!_1)return _3.horizontal;if(_2==null)_2=this.isRTL();return _2?_3.vertical_rtl:_3.vertical_ltr},isc.A.clearSort=function isc_ListGrid_clearSort(_1){var _2=this.ignoreStateChangeHandlers;if(!_1)this.ignoreStateChangeHandlers=true;this.setSort(null);if(!_1)this.ignoreStateChangeHandlers=_2},isc.A.$1444=function isc_ListGrid__addImplicitSort(_1,_2){if(!_2)_2=this.$141v||this.getGroupByFields()||[];var _3=false,_4=isc.shallowClone(_1);if(this.sortByGroupFirst&&!_2.isEmpty()){this.logInfo("Evaluating implicit sort for grouping "+isc.echoAll(_2),"sorting");var _5=_1.isEmpty()?"ascending":null;if(!_1.isEmpty()&&!this.groupSortDirection){for(var i=0;i<_1.length;i++){var _7=_1[i];if(!_7.sortedImplicitly){if(_7.direction!=null)_5=_7.direction;break}}}
this.$1445=this.groupSortDirection||_5;for(var i=0;i<_2.length;i++){var _8=_2[i];if(_1.find("property",_8)){this.logInfo("Existing sort specifier found for property '"+_8+"'.  Skipping.","sorting");continue}
var _9=this.getUnderlyingField(_8);if(_9==null)continue;var _10={sortedImplicitly:true,context:this,normalizer:this.groupSortNormalizer||this.$1446(_9)||"text",property:_8,direction:this.$1445}
_4.addAt(_10,i);_3=true}}
if(_3){this.logInfo("Returning augmented sort specifiers"+isc.echoAll(_4),"sorting")}else{this.logInfo("Returning unmodified sort specifiers"+isc.echoAll(_4),"sorting")}
return _4},isc.A.getSortByGroupFirst=function isc_ListGrid_getSortByGroupFirst(){return this.sortByGroupFirst},isc.A.setSortByGroupFirst=function isc_ListGrid_setSortByGroupFirst(_1){this.sortByGroupFirst=_1},isc.A.$1446=function isc_ListGrid__getSortNormalizerForField(_1){if(_1.sortNormalizer){return _1.sortNormalizer}
var _2=this.$275h(_1),_3=_2&&_2.ID,_4=this;if(_3=="userFormula")return function(_10,_1){if(_10.$52e)return _10.groupValue;return _4.getFormulaFieldValue(_1,_10)};if(_3=="userSummary")return function(_10,_1){if(_10.$52e)return _10.groupValue;return _4.getSummaryFieldValue(_1,_10)};if(_2){var _5=isc.FieldGeneratorUtil.$280g(_2,_1,this);return function(_10,_1){return _10[_5]}}
if(_1.valueMap&&!isc.isAn.Array(_1.valueMap)&&(_1.sortByMappedValue==null||_1.sortByMappedValue==true)){var _6=isc.addProperties({},isc.isA.String(_1.valueMap)?this.getGlobalReference(_1.valueMap):_1.valueMap);_6.$249w=true;return _6}
if((this.$141w||this.isGrouped)&&_1.groupingMode){var _7=this.getGroupSpecifiers();if(_7.find("property",_1.name)){return function(_10,_11){var _8=_1.name,_9;if(_10.$52e)_9=_10.groupValue;else _9=_10[_8];return _9}}}
if(_1.type!=null){return _1.type}},isc.A.setSort=function isc_ListGrid_setSort(_1,_2){if(this.logIsInfoEnabled("sorting"))this.logInfo("Entering setSort","sorting");if(!this.$173r)this.$173s();if(_1&&!isc.isAn.Array(_1))_1=[_1];var _3=this.getDataSource();if(!_3&&this.formItem&&this.formItem.optionDataSource){this.initialSort=_1;if(this.logIsInfoEnabled("sorting")){this.logInfo("setSort() not performing sort - this is a pickList who's DS is not yet present","sorting")}
return false}
if(!this.fields&&!this.getDataSource()){this.initialSort=_1;if(this.logIsInfoEnabled("sorting")){this.logInfo("setSort() not performing sort - no fields","sorting")}
return false}
if(this.confirmDiscardEdits&&this.dataSource!=null){if(this.hasChanges()&&isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.allMatchingRowsCached())
{this.showLostEditsConfirmation({target:this,methodName:"$34g"},{target:this,methodName:"$34h"});this.$34i=_1
return}}
var _1=_1||[],_4=[],_5;if(this.$73p){for(var i=0;i<this.$73p.length;i++){var _7=this.$73p[i],_8=_1.find("property",_7.property);if(!_8){_4.add(isc.shallowClone(_7));if(this.logIsInfoEnabled("sorting")){this.logInfo("In setSort - marking field "+_7.property+" for removal","sorting")}}}}
if(!_1||_1.length==0){if(this.logIsInfoEnabled("sorting")){this.logInfo("null or zero-length sortSpecifiers - unsorting only","sorting")}}
var _9=[];_1.removeEmpty();for(var i=0;i<_1.length;i++){var _10=_1[i];if(!_10)continue;var _11=this.getUnderlyingField(_10.property),_12=this.getField(_10.property);if(_11&&_11.sortByField){_10.sortByProperty=_11.sortByField;_11=this.getUnderlyingField(_10.sortByProperty)}
if(!_11){var _13=this.getAllFields();_11=!_13?null:_13.find("displayField",_10.sortByProperty?_10.sortByProperty:_10.property)}
if(_11){if(!this.$91k(_11)){this.logWarn("Removing field '"+_11.name+"' from the sortSpecifier array because it specifies canSortClientOnly: true and all data is not yet client-side.","sorting");continue}
if(_12){if(!_5)_5=_12}
if(!_10.normalizer){_10.normalizer=this.$1446(_11)}
if(_10.direction==null){_10.direction=this.$766(_11)}
if(_5&&_5==_12){_10.primarySort=true}
if(_10.primarySort){this.sortDirection=Array.shouldSortAscending(_10.direction)?"ascending":"descending"}
if(!_10.context)_10.context=this;_10.sortIndex=i;_9.add(_10)}else{this.logWarn("ListGrid sort specifier for property:"+_10.property+" has no associated field - ignoring","sorting")}}
this.$173t=this.$73p?isc.shallowClone(this.$73p):[];this.sortSpecifiers=this.$73p=_9;this.$173u=this.$1444(this.$73p),this.$173v=(this.$173u.length==this.$173t.length);this.$173w=_4;if(this.$173v&&this.$173t.length>0){for(var i=0;i<this.$173u.length;i++){var _10=this.$173u[i];var _14={property:_10.property,direction:_10.direction};var _15=this.data.getDefaultNormalizer?this.data.getDefaultNormalizer(_10.property):null;if(_10.normalizer!=null&&_10.normalizer!=_15){_14.normalizer=_10.normalizer}
var _16=this.$173t.findIndex(_14);if(_16==null||_16<0){this.$173v=false;break}}}
if(this.setSortHandler&&this.setSortHandler(_9)===false){this.logInfo("User-written setSortHandler() method returned false","sorting");return false}
this.displaySort(_9);this.applySortToData(this.$173u,_2);delete this.$173r;delete this.$126f;return true},isc.A.displaySort=function isc_ListGrid_displaySort(_1){if(this.logIsInfoEnabled("sorting"))this.logInfo("Entering displaySort","sorting");_1=_1||this.$73p;var _2=_1&&_1.length>0,_3=_2?_1[0]:null,_4=_3?_3.property:null,_5=_4?this.getFieldNum(_4):null,_6=_4?this.getUnderlyingField(_4):null,_7=_3?Array.shouldSortAscending(_3.direction):null;if(_2&&!_6){if(_3){this.logWarn("sort: field does not exist: "+_3.property)}}
if(_5>=0){this.$600(_5)}else{this.$600(null)}
if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort - ready to change visible sort state for specifiers:\n"+isc.echoAll(_1),"sorting")}
var _8=this.$173u,_9=this.$173t,_10=(_8.length==_9.length),_11=this.$173w;var _12=(this.header&&isc.isA.Toolbar(this.header));if(_11){if(_11.length>0){if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort - Removing sort-media from now unsorted fields:\n"+isc.echoAll(_11),"sorting")}}
for(var i=0;i<_11.length;i++){var _14=_11[i],_15=this.getSpecifiedField(_14.property),_16=[];if(_15){_16.add(_15);if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort, removing sort-media for fieldName '"+_15.name+"'","sorting")}}
var _17=this.getFields();if(_17){var _18=_17.findAll("displayField",_14.property);if(_18){_18.removeUnless("optionDataSource",null);if(_18.length>0){_16.addList(_18);if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort, removing sort-media for fields with displayField '"+_15.name+"' - these are: "+isc.echoFull(_18.getProperty("name").join(", ")),"sorting")}}}}
for(var j=0;j<_16.length;j++){var _20=_16[j],_21=this.getFieldNum(_20.name);if(_20){_20.sortDirection=_20.originalSortDirection}
if(_21>=0&&_12){var _22=this.getFieldHeaderButton(_21);if(_22&&_22.setTitle)_22.setTitle(_22.getTitle());delete _20.$109g}}}}
if(_2){this.logInfo("In displaySort - Setting sort-media for sorted fields:\n"+isc.echoAll(_1),"sorting");var _23=false;for(var i=0;i<_1.length;i++){var _14=_1[i],_15=this.getSpecifiedField(_14.property),_16=[];if(_15){_16.add(_15);if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort, adding sort-media for fieldName '"+_15.name+"'","sorting")}}
var _17=this.getFields();if(_17){var _18=_17.findAll("displayField",_14.property);if(_18){_16.addList(_18);if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort, adding sort-media for fields with displayField '"+_15.name+"' - these are: "+isc.echoFull(_18.getProperty("name").join(", ")),"sorting")}}}
for(var j=0;j<_16.length;j++){var _20=_16[j],_21=this.getFieldNum(_20.name);if(_20){if(_20.sortDirection&&!_20.originalSortDirection){_20.originalSortDirection=_20.sortDirection}
_20.sortDirection=_14.direction}
if(_12&&_21>=0){var _24=this.getFieldHeader(_21),_22=this.getFieldHeaderButton(_21);if(_22){if(!_23&&this.selectHeaderOnSort){_24.selectButton(_22);if(isc.Browser.isTouch&&this.shouldShowHeaderMenuButton(_22,true)){this.$129n(_22)}
_23=true}
if(_22.setTitle)_22.setTitle(this.getHeaderButtonTitle(_22))}}}}}else if(_12&&this.selectHeaderOnSort){var _25;if(this.header){_25=this.header.getSelectedButton();if(_25){_25.deselect();this.$129m(_25)}}
if(this.frozenHeader){_25=this.frozenHeader.getSelectedButton();if(_25)_25.deselect()}}
if(_5>=0){if(this.logIsInfoEnabled("sorting")){this.logInfo("In displaySort - $600 called with fieldNum: "+_5+" - sortField is now: "+this.sortField+"\ngetSortState() now returns: "+isc.echoAll(this.getSortState()),"sorting")}}
if(this.sorter&&this.sorter.setTitle){this.sorter.setTitle(this.sorter.getTitle())}
if(this.logIsInfoEnabled("sorting"))this.logInfo("Leaving displaySort","sorting");return true});isc.evalBoundary;isc.B.push(isc.A.applySortToData=function isc_ListGrid_applySortToData(_1,_2){if(this.logIsInfoEnabled("sorting"))this.logInfo("Entering applySortToData","sorting");var _3=_1||this.$173u,_4=_3&&_3.length>0,_5=_4?_3[0]:null,_6=this.data;if(_4){if(this.$173x&&_6&&_6.resort&&_6.$73p){_6.resort()}else if(_6&&(_6.setSort||_6.length>0||isc.isA.ResultTree(_6)||isc.isA.Tree(_6)))
{for(var i=0;i<_3.length;i++){var _8=_3[i],_9=this.getUnderlyingField(_8.property);if(this.sortBinaryByFileName&&_9&&_9.sortByField==null&&isc.SimpleType.inheritsFrom(_9.type,"binary",this.getDataSource()))
{_8=isc.addProperties({},_8)
_8.sortByProperty=this.getDataSource().getFilenameField(_9);_3[i]=_8}}
if(_6.setSort){if(this.logIsInfoEnabled("sorting")){this.logInfo("In applySortToData -  Calling data.setSort with specifiers:\n"+isc.echoAll(_3),"sorting")}
_6.setSort(_3)}else if(_6.sortByProperty){if(this.logIsInfoEnabled("sorting")){this.logInfo("In applySortToData - Calling data.sortByProperty with specifier:\n"+isc.echoAll(_5),"sorting")}
_6.sortByProperty(_5.sortByProperty?_5.sortByProperty:_5.property,Array.shouldSortAscending(_5.direction),_5.normalizer,_5.context)}}else{if(this.logIsInfoEnabled("sorting")){this.logInfo("In applySortToData - not sorting:\nthis.data is "+this.echoAll(_6),"sorting")}}}else{if(_6){var _10=_6.unsort!=null&&_6.unsort();if(!_10&&_6.setSort)_6.setSort([],null,_2)}
if(this.invalidateCacheOnUnsort){this.invalidateCache()}}
if(this.body&&this.showRecordComponents)delete this.body.$74k;this.$25a(this.$73y);if(!this.$173v&&!this.$168f&&!this.$168o){this.handleSortChanged(this.$73p)}
if(this.logIsInfoEnabled("sorting"))this.logInfo("Leaving applySortToData","sorting");return true},isc.A.$173s=function isc_ListGrid__storeResortingFlag(){this.$173x=this.$126f;delete this.$126f;this.$173r=true;return this.$173x},isc.A.handleSortChanged=function isc_ListGrid_handleSortChanged(_1){if(!this.ignoreStateChangeHandlers){this.sortChanged(this.removeSortSpecifierMarkers(isc.shallowClone(_1)))}
this.handleViewStateChanged(true)},isc.A.$34g=function isc_ListGrid__continueSort(){var _1=this.$34i;delete this.$34i;this.displaySort(_1);this.applySortToData(_1)},isc.A.$34h=function isc_ListGrid__cancelSort(){var _1;var _1=this.$34i?this.$34i[0]:null;delete this.$34i;if(_1!=null){var _2=this.getFieldNum(_1.property);if(_2!=-1&&this.sortFieldNum!=_2){this.header.deselectButton(_2)}}},isc.A.sortData=function isc_ListGrid_sortData(){if(!this.data||!this.fields)return;var _1=this.fields[this.$60z()],_2=null;if(_1==null){this.$600(0);_1=this.fields[0]}
if(_1.sortNormalizer){_2=_1.sortNormalizer}else if(_1.valueMap){_2=_1.valueMap;if(isc.isA.String(_1.valueMap))_2=this.getGlobalReference(_1.valueMap)}else if(_1.type!=null){_2=_1.type}
this.data.sortByProperty(_1.name,_1.sortDirection,_2,this)},isc.A.getEmbeddedComponentCount=function isc_ListGrid_getEmbeddedComponentCount(_1){var _2=this.body?this.body.$29a:null;if(this.frozenBody&&this.frozenBody.$29a!=null){_2=(_2?_2.duplicate():[]).addList(this.frozenBody.$29a)}
if(!_2)return 0;if(_1=="recordComponent"){_2=_2.findAll("isRecordComponent",true)}else if(_1=="backgroundComponent"){_2=_2.findAll("isBackgroundComponent",true)}
return _2==null?0:_2.length},isc.A.addEmbeddedComponent=function isc_ListGrid_addEmbeddedComponent(_1,_2,_3,_4,_5,_6){if(_4==null&&_1.$81k!=null){_4=this.getFieldNum(_1.$81k)}
if(_4!=null||_6==null){_6=this.getFieldBody(_4)}
_4=this.getLocalFieldNum(_4);_5=_5||_1.embeddedPosition
if(_3==null)_3=this.getRecordIndex(_2);_6.addEmbeddedComponent(_1,_2,_3,_4,_5);if(this.frozenBody!=null){var _7=_6==this.frozenBody?this.body:this.frozenBody;var _8=_7==this.frozenBody?1:0;if(_3>=0&&_7.isDrawn()&&!_7.isDirty()){var _9=_7.getRowHeight(_2,_3,_8);if(_9!=_6.getRowSize(_3)){_7.markForRedraw()}}}},isc.A.removeEmbeddedComponent=function isc_ListGrid_removeEmbeddedComponent(_1,_2,_3){var _4;if(isc.isA.Canvas(_1)){_2=_1;_1=_2.embeddedRecord}
if(isc.isA.Number(_2)){_4=this.getFieldBody(_2);_2=this.getLocalFieldNum(_2)}else{if(!_2){if(!_1||!this.$916(_1))return;_2=this.$917(_1)[0]}
_4=isc.Canvas.getById(_2.$669)}
if(_4==null){return}
_4.removeEmbeddedComponent(_1,_2,_3)},isc.A.getEmbeddedComponent=function isc_ListGrid_getEmbeddedComponent(_1,_2){var _3;if(isc.isA.Number(_2)){_3=this.getFieldBody(_2);_2=this.getLocalFieldNum(_2)}else if(_2==null){_3=this.body}else{_3=isc.Canvas.getById(_2.$669)}
return _3.getEmbeddedComponent(_1,_2)},isc.A.getRecordComponent=function isc_ListGrid_getRecordComponent(_1,_2){var _3=this.getRecord(_1);return this.getEmbeddedComponent(_3,_2)},isc.A.getRecordDataSource=function isc_ListGrid_getRecordDataSource(_1){return this.dataSource},isc.A.openRecordEditor=function isc_ListGrid_openRecordEditor(_1){if(this.$32o!=null)this.closeRecord();var _2=isc.addProperties({},_1);var _3=this.ns.DynamicForm.create(this.recordEditorProperties,{autoDraw:false,dataSource:this.getRecordDataSource(_1),numCols:4,values:_2,$34j:_1});var _4=this.ns.VStack.create({autoDraw:false,width:this.getAvailableFieldWidth()-this.embeddedComponentIndent,left:this.isRTL()?0:this.embeddedComponentIndent,destroyOnUnEmbed:true,members:[_3,this.ns.Toolbar.create({autoDraw:false,width:200,buttons:[{title:this.recordEditorSaveButtonTitle,click:this.getID()+".embeddedSaveRecord("+_3.getID()+")",extraSpace:10},{title:this.recordEditorCancelButtonTitle,record:_1,grid:this,click:function(){var _5=this.parentElement.parentElement;this.grid.closeRecord(this.record,_5)}}]})]});_4.removeOnHideField=true;this.addEmbeddedComponent(_4,_1,this.data.indexOf(_1));this.$32o=_1;this.$57o=_4},isc.A.embeddedSaveRecord=function isc_ListGrid_embeddedSaveRecord(_1){_1.saveData({target:this,methodName:"embeddedEditComplete"},{$34j:_1.$34j,$57p:_1})},isc.A.embeddedEditComplete=function isc_ListGrid_embeddedEditComplete(_1,_2,_3){if(_1.status==0){this.removeEmbeddedComponent(_3.$34j,_3.$57p)}},isc.A.closeRecord=function isc_ListGrid_closeRecord(_1,_2){if(!_1)_1=this.$32o;if(!_2)_2=this.$57o;this.removeEmbeddedComponent(_1,_2);this.$32o=null;this.$57o=null},isc.A.openRecordDetailGrid=function isc_ListGrid_openRecordDetailGrid(_1,_2){if(this.$32o!=null)this.closeRecord();var _3=this.getRecordDetailGrid(_1,_2);var _4=isc.VLayout.create({autoDraw:false,destroyOnUnEmbed:true,height:this.cellHeight,left:this.isRTL()?0:this.embeddedComponentIndent,width:this.getAvailableFieldWidth()-this.embeddedComponentIndent,resizeBarSize:4,members:[_3],removeOnHideField:true});this.addEmbeddedComponent(_4,_1,this.data.indexOf(_1));var _2=isc.DataSource.getDataSource(_3.dataSource);_3.fetchRelatedData(_1,this.getRecordDataSource(_1));this.$32o=_1;this.$57o=_4},isc.A.getRecordDetailGrid=function isc_ListGrid_getRecordDetailGrid(_1,_2){_2=isc.DataSource.getDataSource(_2);var _3=isc.ListGrid.create(this.recordDetailGridProperties,{autoDraw:false,dataSource:_2,showResizeBar:true,showCellContextMenus:this.showCellContextMenus},this.nestedGridDefaults);return _3},isc.A.chartData=function isc_ListGrid_chartData(_1,_2,_3,_4,_5){this.checkChartConstructor();if(_1)_1=this.getField(_1);if(_2)_2=this.map("getField",_2);else{_2=this.fields.duplicate();_2.remove(_1)}
if(!_3){if(!isc.ResultSet||!isc.isA.ResultSet(this.data)){_3=this.data}else if(this.data.allMatchingRowsCached()){_3=this.data.getAllRows()}else{var _6=this.getVisibleRows();_3=this.data.getRange(_6[0],_6[1])}}
var _7,_8;if(_2.length>=1){for(var i=0;i<_2.length;i++){var _10=_2[i];_2[i]={id:_10.name,title:this.htmlUnescapeExportFieldValue(_10.title),type:_10.type}}
_8={id:"columnFacet",title:this.valueTitle,values:_2,inlinedValues:true}}
if(_3.length>=1&&_1){_7={id:_1.name}}
var _11=[_8,_7];_11.removeAll([null]);if(_5)_11.reverse();var _12=isc.addProperties({data:_3,facets:_11,title:this.chartTitle,chartType:this.chartType},_4);if(_7&&!_8)_12.valueProperty=_2[0].name;return this.createAutoChild("chart",_12,this.chartConstructor)},isc.A.checkChartConstructor=function isc_ListGrid_checkChartConstructor(){var _1=this.chartConstructor;if(isc.isA.String(_1)){_1=window.isc[this.chartConstructor]}
if(_1==null){this.logWarn('Component chartConstructor attribute set to "'+this.chartConstructor+'" - this cannot be resolved to a valid SmartClient class. Verify that all appropriate modules are loaded and that this class exists.')}else if(_1.invalidClass){var _2='Component chartConstructor attribute set to "'+this.chartConstructor+'". ';if(_1.invalidErrorMessage)_2+=_1.invalidErrorMessage;else _2+=".This class is invalid - verify all appropriate modules are loaded.";this.logWarn(_2)}},isc.A.chartRow=function isc_ListGrid_chartRow(_1,_2,_3){return this.chartData(null,_2,[this.getRecord(_1)],_3)},isc.A.chartColumn=function isc_ListGrid_chartColumn(_1,_2,_3){return this.chartData(_2,[_1],null,_3)},isc.A.loadAllRecords=function isc_ListGrid_loadAllRecords(_1,_2){_1=_1||-1;var _3;if(this.data.isGroupedOutput&&this.originalData){_3=this.originalData}else{_3=this.data}
if(_3!=null){var _4=_3.getLength();var _5=_1!=-1&&_4>_1;if(isc.ResultSet&&isc.isA.ResultSet(_3)){if(_5){this.logWarn("Passed 'maxRecords' ("+_1+") is too low to fetch all records ("+_4+").");return false}
if(!_3.lengthIsKnown()){this.logWarn("ResultSet length is not yet known, can't fetch.");return false}
if(_3.allMatchingRowsCached()){if(_2){this.fireCallback(_2,"response, data, request",[null,null,null])}
this.logInfo("Data already loaded, firing callback with null parameters");return true}
var _6=this;this.observe(_3,"fetchRemoteDataReply",function(_7,_8,_9){_6.ignore(_3,"fetchRemoteDataReply");_6.fireCallback(_2,"response, data, request",[_7,_8,_9])});_3.getRange(0,_4);this.logInfo("Postponing loadAllRecords() callback until data is loaded");return true}}},isc.A.regroup=function isc_ListGrid_regroup(_1){var _2=this.$141w||this.isGrouped,_3=_2&&(this.$141v||this.getGroupByFields()),_4=false,_5;if(!_2||_3==null||_3.length==0||this.inhibitRegroup||!(this.originalData||this.data)||!this.data)
{_5=null}else{if(this.data.isGroupedOutput&&this.originalData){_5=this.originalData}else{_5=this.data;_4=true}}
var _6=this.$1097;if(_5!=null){var _7=_5.getLength();if(isc.ResultSet&&isc.isA.ResultSet(_5)&&(!_5.lengthIsKnown()||(_7<=this.groupByMaxRecords&&!_5.rangeIsLoaded(0,_7-1))))
{var _8=_5.lengthIsProgressive();var _9=(_5.lengthIsKnown()&&!_8)?_7:this.groupByMaxRecords;if(_8){_5.invalidateCache()}
_5.getRange(0,_9,false,true);this.$122o(true,false,true,false,false,_3);this.logInfo("postponing grouping until data is loaded","grouping");if(_4){this.originalData=_5}
this.$50w=true;return}else if(_7>this.groupByMaxRecords){this.logInfo("Data set size ("+_7+") exceeds specified groupByMaxRecordsResults ("+this.groupByMaxRecords+") - disabling grouping.","grouping");this.$169e=[];this.clearGroupBy(true);if(_4){this.originalData=_5}
if(!this.selectionManager||(this.data!=this.selectionManager.data)){this.createSelectionModel()}
var _10=this.$193j;if(_10){this.$199w([])}
delete this.$50w;this.$199x(_10?isc.ListGrid.GROUP_BY:isc.ListGrid.REGROUP,false);if(this.groupByMaxRecordsExceededMessage){isc.warn(this.groupByMaxRecordsExceededMessage)}
return}}else{if(_6)this.$1931();return}
this.$122o(false,false,true,false,false);var _11=this.$122q;if(_11==null&&this.handleRegroup!=null)this.handleRegroup();delete this.$50w;var _12=(_5.getLength()>this.groupByAsyncThreshold);if(_6&&_12){isc.Timer.clear(this.$1099);delete this.$1749;delete this.$1099}else if(_6&&!_12){this.$1931()}else if(!_6&&_12){if(this.showAsynchGroupingPrompt!=false)isc.showPrompt(this.asynchGroupingPrompt);this.$1097=true;delete this.$1932;delete this.$1933;this.$112b=this.showGroupSummary;this.$112a=this.groupByFieldSummaries}
var _13=this.groupByField,_14=null;if(_11!=null){_13=[];_14=[];for(var i=0;i<_11.length;i++){if(this.isCheckboxField(_11[i]))continue;var _16=_11[i].property,_17=null,_18=null;if(_16){_17=_11[i].property;_18=this.getUnderlyingField(_17)}else{_17=_11[i];_18=this.getUnderlyingField(_17)}
if(_18&&_18.displayField!=null&&_18.groupByDisplayField!=false&&_18.optionDataSource==null)
{var _19=this.getUnderlyingField(_18.displayField);if(_19){_18=_19;if(_18.displayField!=null)_17=_18.displayField;else _17=_18.name}}
_13.add(_17);var _20=null;if(_18&&this.$169e){_20=this.$169e.find("property",_11[i]);if(_20){_18.groupingMode=_20.grouping;_18.groupGranularity=_20.granularity;_18.groupPrecision=_20.precision}}
var _21=(_16?_11[i].grouping:null);if(_18){if(!_16){_21=_18.groupingMode}
var _22=_18.groupingModes||(_18.$62?(_18.$62.getGroupingModes?_18.$62.getGroupingModes():_18.$62.groupingModes):null);if(_21==null&&_22!=null){var _23=_18.defaultGroupingMode||(_18.$62&&_18.$62.defaultGroupingMode);if(isc.isAn.Array(_22)){if(_22.contains(_23))_21=_23;else if(_22.length>0)_21=_22[0]}else if(isc.isAn.Object(_22)){if(_22[_23]!=null)_21=_23}}}
_14.push(_21)}}
var _24=(_13!=null&&!isc.isAn.Array(_13)?[_13]:_13),_21=null;if(_24!=null){for(var i=0;i<_24.length;i++){var _18=this.getUnderlyingField(_24[i]),_25=((_14!=null&&_14[i]!=null)?_14[i]:_18&&_18.groupingMode);if(_25&&(!isc.isAn.Array(_13)?_18.name==_13:_13.contains(_18.name)))
{_21=_25}}}
var _26={applyFormulaAfterSummary:this.applyFormulaAfterSummary,emptyCellValue:this.emptyCellValue,gridSummaryRecordProperty:this.gridSummaryRecordProperty,groupByFieldSummaries:(isc.isAn.Array(this.groupByFieldSummaries)?this.groupByFieldSummaries.duplicate():null),groupNodeBaseStyle:this.groupNodeBaseStyle,groupNodeStyle:this.groupNodeStyle,groupStartOpen:(isc.isAn.Array(this.groupStartOpen)?this.groupStartOpen.duplicate():this.groupStartOpen),groupSummaryRecordProperty:this.groupSummaryRecordProperty,includeInSummaryProperty:this.includeInSummaryProperty,nullGroupTitle:this.nullGroupTitle,recordBaseStyleProperty:this.recordBaseStyleProperty,recordCustomStyleProperty:this.recordCustomStyleProperty,recordEditProperty:this.recordEditProperty,showCollapsedGroupSummary:this.showCollapsedGroupSummary,showGroupSummary:this.showGroupSummary,showGroupSummaryInHeader:this.showGroupSummaryInHeader,singleCellValueProperty:this.singleCellValueProperty,groupByField:_13,groupByFields:_24,groupByFieldGroupingModes:_14,groupingMode:_21,currData:_5,setOriginalDataToCurrData:_4,sortSpecifiers:isc.isAn.Array(this.$73p)?this.$1444(this.$73p.duplicate(),_24):null};this.$1749=_26;var _27=new Array(this.fields.getLength()),_28=new Array(this.fields.getLength());for(var i=_27.length;i--;){var _18=this.fields[i];_27[i]=_18&&_18.userFormula!=null;_28[i]=_18&&_18.userSummary!=null}
_26.fieldsHaveUserFormulas=_27;_26.fieldsHaveUserSummaries=_28;var _29=new Array(_24.length),_30=new Array(_24.length),_31=new Array(_24.length),_32=new Array(_24.length);for(var i=_24.length;i--;){var _18=this.getUnderlyingField(_24[i]);if(_18){_29[i]=isc.clone(_18.userFormula);_30[i]=isc.clone(_18.userSummary);_31[i]=_18.displayField;var _33=_18.valueMap;if(isc.isAn.Array(_33)){_32[i]=_33.duplicate()}else{_32[i]=isc.shallowClone(_33)}}}
_26.groupByFieldUserFormulas=_29;_26.groupByFieldUserSummaries=_30;_26.groupByFieldDisplayFields=_31;_26.groupByFieldValueMaps=_32;this.$110b(_12,_26,_1)},isc.A.$199w=function isc_ListGrid___groupByComplete(_1){if(this.groupByComplete!=null)this.groupByComplete(_1)},isc.A.$199x=function isc_ListGrid___groupTreeChanged(_1,_2){if(this.groupTreeChanged!=null)this.groupTreeChanged(_1,_2)},isc.A.$110b=function isc_ListGrid__regroupRestoreOpenFolders(_1,_2,_3){var _4;if(this.groupTree){var _5=this.groupTree.$684,_6=(_5==_2.groupByField);if(isc.isAn.Array(_5)){var _7=_2.groupByField.duplicate(),_8=_5.duplicate();if(_7.length!=_8.length)_6=false;else{_7.removeList(_8);_6=(_7.length==0)}}
if(!_3&&this.canCollapseGroup&&this.retainOpenStateOnRegroup&&(this.groupTree.getLength()>0)&&(_6))
{if(this.groupTree.$124z==_2.groupingMode){_4=[];var _9=this.groupTree,_10=_9.getRoot();if(_9.isOpen(_10)&&_9.isLoaded(_10)){var _11=[[_9.getFolders(_10)],[0]];if(_1){this.$1099=this.delayCall("$110c",[_1,_2,_11,_9,_4],0)}else{this.$110c(_1,_2,_11,_9,_4)}
return}}}}
this.$110d(_1,_2,_2.currData,_4)},isc.A.$110c=function isc_ListGrid__regroupAddNodeToOpenState(_1,_2,_3,_4,_5){var _6=_3[0],_7=_3[1],_8=_6.length,_9=0;while(_8>0){var _10=_6.pop(),i=_7.pop();--_8;for(var _12=_10.length;i<_12;++i,++_9){if(_1&&_9>this.groupByAsyncThreshold){_6.push(_10);_7.push(i);this.$1099=this.delayCall("$110c",[_1,_2,_3,_4,_5],0);return}
var _13=_10[i];if(_4.isOpen(_13)&&_4.isLoaded(_13)){var _14={};_14[_13.groupName]=_13.groupValue;_5.add(_14);var _15=_4.getFolders(_13);if(_15!=null){_6.push(_10);_7.push(i+1);++_8;_10=_15;i=-1;_12=_10.length}}}}
if(_1){this.$1099=this.delayCall("$110d",[_1,_2,_2.currData,_5],0)}else{this.$110d(_1,_2,_2.currData,_5)}},isc.A.$110d=function isc_ListGrid__regroupCreateGroupTree(_1,_2,_3,_4){var _5=this.createAutoChild("groupTree",{idField:this.groupIdField,parentIdField:this.groupParentIdField,titleProperty:"groupValue",childrenProperty:"groupMembers",parentProperty:"_groupTree_"+this.ID,showRoot:false,isGroupedOutput:true,nameProperty:"$bc",alwaysSortGroupHeaders:(_2.showGroupSummary&&_2.showGroupSummaryInHeader),$684:_2.groupByField,$141v:_2.groupByFields,$124z:_2.groupingMode,separateFolders:true,$112c:"$112c",$117k:"$117k",$73p:_2.sortSpecifiers,getCriteria:function(){var _6=this.creator.originalData;if(_6){if(_6.getCombinedCriteria)return _6.getCombinedCriteria();if(_6.getCriteria)return _6.getCriteria()}
return null},getRecordsInGroup:function(_37){var _7=this.$141v,_8=_37.groupName,_9=this.getChildren(_37),_10=[];if(_8==_7[_7.length-1]){if(!isc.isA.ResultSet(_9)||_9.lengthIsKnown()){for(var i=0,_12=_9.getLength();i<_12;i++){var _13=_9.getCachedRow(i);if(_13!=null&&_13[this.$112c]!==true){_10.add(_13)}}}}else if(_9!=null){if(!isc.isA.ResultSet(_9)||_9.lengthIsKnown()){for(var i=0,_12=_9.getLength();i<_12;i++){var _13=_9.getCachedRow(i);if(_13!=null){var _14=this.getRecordsInGroup(_13);if(_14!=null&&_14.length>0){_10.addList(_14)}}}}}
return _10},combineWithEditVals:function(_9){var _15=this.creator,_16=[];_16.addList(_9);var _17=_15.getAllEditRows();if(_17.length>0){var _18;for(var i=0;i<_16.length;i++){var _19=_15.getEditSession(_16[i]);if(_19){var _20=isc.addProperties({},_16[i],_19.$31x);_16[i]=_20}}}
return _16},primaryKeyFields:this.dataSource?this.getDataSource().getPrimaryKeyFieldNames():null,indexOf:function(_37,_40,_41){if(_37==null)return-1;var _21=this.$27l(),_22,_23,_24=-1;if(this.primaryKeyFields!=null){var _25=this.primaryKeyFields;_22={};for(var i=0;i<_25.length;i++){var _26=_25[i];if(_37[_26]==null){_23=false;break}else{_23=true;_22[_26]=_37[_26]}}}
if(_23){_24=_21.findNextIndex(_40,_22,null,_41)}else{_24=_21.indexOf(_37,_40,_41)}
return _24},$110i:function(_37,_40,_41,_42){if(!_37)_37=this.root;var _27=function(_43,i){if(i==null){i=0}
for(var j=0,_12=_43.length;j<_41&&i<_12;++i,++j){if(!this.isOpen(_43[i])){this.changeDataVisibility(_43[i],true)}}
if(i<_12){_27.apply(this,[_43,i])}else{this.changeDataVisibility(_37,true);_40.apply(this,[])}};this.$110j(_37,isc.Tree.FOLDERS_ONLY,null,_27,_41,_42)},$110j:function(_37,_40,_41,_42,_43,_44,_45,_46){var _29,_30;if(_45==null){if(!_37)_37=this.root;_45=[];if(!_41)_41=function(){return true};if(this.isLeaf(_37)){_42.apply(this,[_45]);return}
var _9=this.getChildren(_37);if(!_9){_42.apply(this,[_45]);return}
_29=[_9];_30=[0];_46={childrenStack:_29,indexStack:_30}}else{_29=_46.childrenStack;_30=_46.indexStack}
var _31=_29.length,_32=0;while(_31>0){var _9=_29.pop(),i=_30.pop();--_31;if(!isc.isA.ResultSet(_9)||_9.lengthIsKnown()){for(var _12=_9.getLength();i<_12;++i,++_32){if(_32>_43){_29.push(_9);_30.push(i);this.creator[_44]=this.delayCall("$110j",[_37,_40,_41,_42,_43,_44,_45,_46],0);return}
var _13=_9.getCachedRow(i);if(_13!=null){if(this.isFolder(_13)){if(_40!=isc.Tree.LEAVES_ONLY&&_41(_13))
_45[_45.length]=_13;var _33=this.getChildren(_13);if(_33){_29.push(_9);_30.push(i+1);++_31;_9=_33;i=-1;_12=_9.getLength()}}else{if(_40!=isc.Tree.FOLDERS_ONLY&&_41(_13)){_45[_45.length]=_13}}}}}}
_42.apply(this,[_45])},addBeforeSummaries:function(_40,_41){var _9=this.getChildren(_41);var _34=_9?_9.length:null;while(_34>0&&_9&&_9[_34-1][this.$112c])
{_34--}
this.add(_40,_41,_34)},$134d:function(_40,_41,_42){if(!isc.isAn.Array(_40))_40=[_40];for(var i=0;i<_40.length;i++){var _35=_40[i];if(_35!=null&&!_35.$52e){_35=this.getParent(_35)}
if(!_35||!_35.$52e)continue;var _36=this.getParents(_35);_36.unshift(_35);for(var j=_36.length-2;j>=0;j--){var _37=_36[j];if(_37.$134e==null){_37.$134e=true;if(_41){var _38=_36[j+1];if(!_38.$134f)_38.$134f=[];_38.$134f.add(_37)}else if(_42){_42.add(_37)}}}}
if(_42)return _42},$134g:function(_37){var _39=_37.$134f;if(!_39)return[];delete _37.$134f;return _39}},isc.Tree);this.logInfo("Adding "+_3.getLength()+" records to groups","grouping");if(_1){this.$1099=this.delayCall("$110e",[_1,_2,_5,_3,0,_3.getLength(),_4],0)}else{this.$110e(_1,_2,_5,_3,0,_3.getLength(),_4)}},isc.A.$110e=function isc_ListGrid__regroupAddRecordsToGroup(_1,_2,_3,_4,_5,_6,_7){var _8=_6;if(_1){_6=Math.min(_5+this.groupByAsyncThreshold,_8)}
var _9=(isc.ResultSet&&isc.isA.ResultSet(_4)?isc.ResultSet.getLoadingMarker():null);var _10;if(this.groupTree==this.data){_10=this.data.$27l()}
for(var i=_5;i<_6;++i){var _12=_4.get(i);if(_12!=null&&_12!=_9){this.$1417(_2.groupByFields,this.data,_2.emptyCellValue,_2.groupSummaryRecordProperty,_2.gridSummaryRecordProperty,_2.fieldsHaveUserFormulas,_2.fieldsHaveUserSummaries,_2.applyFormulaAfterSummary,_2.groupByFieldUserFormulas,_2.groupByFieldUserSummaries,_2.groupByFieldDisplayFields,_2.groupByFieldValueMaps,_2.nullGroupTitle,_2.showGroupSummary,_2.showGroupSummaryInHeader,_2.recordBaseStyleProperty,_2.groupNodeBaseStyle,_2.recordCustomStyleProperty,_2.groupNodeStyle,_2.recordEditProperty,_2.singleCellValueProperty,_3,_12,false,_7,_10)}}
if(_1&&_6<_8){this.$1099=this.delayCall("$110e",[_1,_2,_3,_4,_6,_8,_7],0)}else if(_1){this.$1099=this.delayCall("$112d",[_1,_2,_3],0)}else{this.$112d(_1,_2,_3)}});isc.evalBoundary;isc.B.push(isc.A.$112d=function isc_ListGrid__regroupAddSummaryChildren(_1,_2,_3){this.$1418(_2.showGroupSummaryInHeader,_2.groupByFields,_2.showCollapsedGroupSummary,_2.includeInSummaryProperty,_2.applyFormulaAfterSummary,_2.groupSummaryRecordProperty,_2.fieldsHaveUserFormulas,_3,null,_2.showGroupSummary,[],_2.groupByFieldSummaries);if(_1){this.$1099=this.delayCall("$110z",[_1,_2,_3],0)}else{this.$110z(_1,_2,_3)}},isc.A.getGroupMembers=function isc_ListGrid_getGroupMembers(_1,_2){var _3=_1.$42c,_4=window[_3];if(!_4)return null;var _5=_2?_4.getRecordsInGroup(_1):_4.getChildren(_1);return _5},isc.A.$112e=function isc_ListGrid__updateSummaryRows(_1,_2,_3,_4,_5,_6,_7,_8){return this.$1418(this.showGroupSummaryInHeader,this.getGroupByFields(),this.showCollapsedGroupSummary,this.includeInSummaryProperty,this.applyFormulaAfterSummary,this.groupSummaryRecordProperty,null,_1,_2,_3,_4,_5,_6,_7,_8)},isc.A.$1418=function isc_ListGrid___updateSummaryRows(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15){if(_1){return}
if(!isc.isAn.Array(_11)){_11=_2}
if(!isc.isAn.Array(_12)){_12=_2}
var _16,_17,_18;if(!(_9||_10)){return}else if(_9&&!_10){_17=_11}else if(!_9&&_10){_16=_12}else{_17=[];if(_12){for(var i=_11.length;i--;){var _20=_11[i];if(!_12.contains(_20)){_17.push(_20)}}}
_16=[];_18=[];for(var i=_12.length;i--;){var _20=_12[i];if(!_11.contains(_20)){_16.push(_20)}else if(_13){_18.push(_20)}}}
if(!(_16&&_16.length>0)&&!(_17&&_17.length>0)&&!(_18&&_18.length>0))
{return}
var _21=_3,_22=_14!=null&&!_21;if(_14!=null)_8.$134d(_14,_22);var _23=_8.getRoot(),_24=null;if(_23&&_8.isFolder(_23)){_24=_22?_8.$134g(_23):_8.getChildren(_23)}
if(!(_23&&_24&&!_24.isEmpty())){return}
var _25=_8.$112c,_26=_8.$117k,_27=Array.excludeFromSortProperty,_28=[_23],_29=[_24],_30=[0];var _31=false;_8.$1266=true;while(_30.length>0){var _32=_28.pop(),_33=_29.pop(),i=_30.pop();if(isc.isA.ResultSet(_33)&&!_33.lengthIsKnown())continue;var _34=_33.getLength();for(;i<_34;++i){var _35=_33.getCachedRow(i);if(!_35){continue}
if(_14!=null){if(_35.$134e)delete _35.$134e;else continue}
var _36=_35.groupName,_37=_16&&_16.contains(_36),_38=_17&&_17.contains(_36),_39=_8.getChildren(_35);if(_18&&!_37&&!_38){_37=_18.contains(_36);_38=_18.contains(_36)}
if(_38){if(!_21){if(!isc.isA.ResultSet(_39)||_39.lengthIsKnown()){var _40=[];for(var j=_39.getLength();j-->0;){var _42=_39.getCachedRow(j);if(_42[_25]===true){_40.push(_42)}else{break}}
_31|=_8.removeList(_40)}}else{var _43=[],j=0;for(;;){var s=_33.getCachedRow(i+j+1);if(s&&s[_25]==true){_43.add(s);++j}else{break}}
_31|=_8.removeList(_43);_34-=_43.length}}
if(_37){var _40=_8.getRecordsInGroup(_35);_40=_8.combineWithEditVals(_40);var _45=this.$1412(_4,_5,_6,_7,_40,_35,_15);if(_45!=null){if(!isc.isAn.Array(_45)){_45[_25]=true;_45[_27]=true;if(!_21){_31|=_8.add(_45,_35)!=null}else{_31|=_8.add(_45,_32,i)!=null;i+=1;_34+=1}}else{for(var k=_45.length;k--;){_45[k][_25]=true;_45[k][_27]=true;if(_21){_45[k][_26]=_35}}
if(!_21){_31|=_8.addList(_45,_35)!=null}else{_31|=_8.addList(_45,_32,i+1)!=null;i+=_45.length;_34+=_45.length}}}}
if(_22)_39=_8.$134g(_35);var _47=(_39&&!_39.isEmpty()&&_8.isFolder(_39.first()));if(_47){_28.push(_32);_29.push(_33);_30.push(i+1);_32=_35;_33=_39;_34=_33.getLength();i=-1}}}
delete _8.$1266;if(_31){_8.$736(true);_8.dataChanged()}},isc.A.$110z=function isc_ListGrid__regroupProcessGroupHeaderNode(_1,_2,_3,_4){if(_4==null){_4={i:0,children:_3.getChildren(_3.getRoot()),groupsVisited:0,indexStack:[],childrenStack:[]}}
var _5=_2.groupByFields||[],i=_4.i,_7=_4.children||[],_8=_4.groupsVisited==null?0:_4.groupsVisited,_9=_4.indexStack||[],_10=_4.childrenStack||[],_11=0;if(_5.length>0){for(;;){if(!isc.isA.ResultSet(_7)||_7.lengthIsKnown()){for(;i<_7.getLength();++i,++_11){if(_1&&_11>this.groupByAsyncThreshold){_4.i=i;_4.children=_7;_4.groupsVisited=_8;this.$1099=this.delayCall("$110z",[_1,_2,_3,_4],0);return}
var _12=_7.getCachedRow(i);if(_12!=null&&!_12[this.groupSummaryRecordProperty]){var _13=this.getUnderlyingField(_5[_8]);if(_2.showGroupSummary&&_2.showGroupSummaryInHeader){_11+=this.$142a(_2.groupByFieldSummaries,_2.includeInSummaryProperty,_2.applyFormulaAfterSummary,_2.groupSummaryRecordProperty,_2.fieldsHaveUserFormulas,_3,_12)}
var _14=this.$1419(_3,_2.groupByFields,_2.groupByFieldValueMaps,_2.singleCellValueProperty,_12,_13);if(!this.$141u(_2.showGroupSummary,_2.showGroupSummaryInHeader))
{_12.groupTitle=_14}else _12[_2.singleCellValueProperty]=_14;if(_8+1<_5.length){++_8;_9.push(i+1);_10.push(_7);i=-1;_7=_3.getChildren(_12)||[]}}}}
if(_9.length>0){--_8;i=_9.pop();_7=_10.pop()}else{break}}}
if(_1){this.$1099=this.delayCall("$110k",[_1,_2,_3,_2.restoreOpenFolders],0)}else{this.$110k(_1,_2,_3,_2.restoreOpenFolders)}},isc.A.$110k=function isc_ListGrid__regroupOpenInitialGroups(_1,_2,_3,_4){if(!_4){var _5=_2.groupStartOpen;if(!_1){this.$142b(_5,_3)}else{var _6=function(){this.creator.$110v(_1,_2,_2.currData,_2.setOriginalDataToCurrData,_3)};var _7=250;if(isc.isAn.Array(_5)){var _8=_3.getChildren(_3.getRoot());for(var i=0;i<_5.length;i++){var _10=_5[i];var _11=_8.find("groupValue",_10);if(_11)_3.openFolder(_11)}}else if(_5=="all"){_3.$110i(null,_6,_7,"$1099");return}else if(_5=="first"){var _8=_3.getChildren(_3.getRoot(),null,null,null,null,null,null,null,this.sortByGroupFirst?false:null);_3.$110i(_8.first(),_6,_7,"$1099");return}}}
if(_1){this.$1099=this.delayCall("$110v",[_1,_2,_2.currData,_2.setOriginalDataToCurrData,_3],0)}else{this.$110v(_1,_2,_2.currData,_2.setOriginalDataToCurrData,_3)}},isc.A.$110v=function isc_ListGrid__regroupCreateSelectionModel(_1,_2,_3,_4,_5){if(_4){this.originalData=_3}
if(this.groupTree){this.ignore(this.groupTree,"changeDataVisibility");this.groupTree.destroy()}
this.groupTree=_5;this.data=_5;this.$606(this.data);this.createSelectionModel();if(_1){this.$1099=this.delayCall("$110w",[_1,_2],0)}else{this.$110g(_1,_2)}},isc.A.$110w=function isc_ListGrid__regroupGetGroupTreeLength(_1,_2){var _3=4000;this.data.$110s(this,"$1099",_3,function(_4){this.$1099=this.delayCall("$110x",[_1,_2],0)})},isc.A.$110x=function isc_ListGrid__regroupCacheSelectionModel(_1,_2){var _3=function(){this.$1099=this.delayCall("$110g",[_1,_2],0)};if(isc.isA.Selection(this.selectionManager)){var _4=4000;this.selectionManager.$110t(this,"$1099",_4,_3)}else if(isc.isA.CellSelection(this.selectionManager)){this.selectionManager.getSelectedCells();this.$1099=this.delayCall("$110g",[_1,_2],0)}},isc.A.$1931=function isc_ListGrid__completeAsyncRegroup(_1,_2){delete this.$1097;delete this.$1749;if(!_1)isc.Timer.clear(this.$1099);delete this.$1099;isc.clearPrompt();if(!_2){this.setGroupByFieldSummaries(this.$112a);this.setShowGroupSummary(this.$112b);if(this.$1932){this.applyHilites(this.$1933)}}
if(this.$257e){delete this.$257e;this.summaryRowFetchComplete()}
delete this.$1932;delete this.$1933},isc.A.applyHilites=function isc_ListGrid_applyHilites(_1){if(this.$1097){this.$1932=true;var _2=this.$1933;this.$1933=_2!=null?_2&&!!_1:!!_1;return}
this.invokeSuper(isc.ListGrid,"applyHilites",_1)},isc.A.$110g=function isc_ListGrid__regroupFinish(_1,_2){delete this.$1749;var _3=_2.groupByFields;this.groupByField=_3;if(_2.groupByFieldGroupingModes!=null){for(var i=_3.length;i--;){var _5=_2.groupByFieldGroupingModes[i];if(_5!=null){var _6=this.fields.find("name",_3[i]);if(_6)_6.groupingMode=_5}}}
this.isGrouped=true;this.handleGroupStateChanged();if(this.$75p){this.setSelectedState(this.$75p,true);delete this.$75p}
if(this.fields.find("$84g",true)!=null){this.updateFieldWidthsForAutoFitValue("regroup with group title column showing")}
this.markForRedraw("regroup");if(_1)this.$1931(true);var _7=this.$122q,_8;delete this.$122q;var _9=_7!==_8;if(_9){this.$199w(_7)}
this.$199x(_9?isc.ListGrid.GROUP_BY:isc.ListGrid.REGROUP,true)},isc.A.$607=function isc_ListGrid__incrementalRegroup(_1,_2,_3){var _4=this.$34v;this.$34v=true;var _5=false;if(this.$75p==null){_5=true;this.$75p=this.getSelectedState(true)}
var _6=_2?this.data.getParents(_2):[];if(this.groupTree==this.data&&_1==_2){_2=null}
var _7=_2?this.data.remove(_2):false;var _8=_1||_3;if(!(_2&&!_7)&&(_8)){this.$52u(this.groupTree,_8,true,true)}
var _9=null;for(var i=0;i<_6.length-1;i++){var _11=_6[i],_12=_11.groupMembers,_13=this.showGroupSummary&&!this.showCollapsedGroupSummary;if(_13?!_12.find(this.groupSummaryRecordProperty,null):_12.getLength()==0)
{this.data.remove(_11)}else{var _14=(this.completeFields||this.fields).find("name",_11);if(this.singleCellGroupHeaders()){_11[this.singleCellValueProperty]=this.getGroupTitle(_11,_14)}else{_11.groupTitle=this.getGroupTitle(_11,_14)}
if(!_9)_9=_11}}
this.$34v=_4;if(this.showGroupSummary){var _15=[_8];if(_9)_15.add(_9);this.refreshGroupSummary(_15)}
if(_5){if(_7){this.setSelectedState(this.$75p)}
delete this.$75p}
var _16=_8&&this.data.getParents?this.data.getParents(_8):[];if(!_16.equals(_6))this.$199x(isc.ListGrid.INCREMENTAL,true)},isc.A.$142b=function isc_ListGrid__openInitialGroups(_1,_2){if(isc.isAn.Array(_1)){var _3=_2.getChildren(_2.getRoot());for(var i=0;i<_1.length;i++){var _5=_1[i];var _6=_3.find("groupValue",_5);if(_6)_2.openFolder(_6)}}else if(_1=="all"){_2.openAll()}else if(_1=="first"){var _3=_2.getChildren(_2.getRoot(),null,null,null,null,null,null,null,this.sortByGroupFirst?false:null);_2.openAll(_3.first())}},isc.A.getGroupSpecifiers=function isc_ListGrid_getGroupSpecifiers(){if(this.$169e)return isc.shallowClone(this.$169e)},isc.A.setGroupSpecifiers=function isc_ListGrid_setGroupSpecifiers(_1){if(_1){if(!isc.isAn.Array(_1))_1=[_1];if(isc.isA.String(_1[0])){var _2=[];for(var i=0;i<_1.length;i++){var _4=this.makeGroupSpecifier(_1[i]);if(_4)_2.add(_4)}
_1=_2}
this.groupBy(_1)}else{delete this.$169e;this.$75p=this.getSelectedState(true);this.groupBy([])}},isc.A.makeGroupSpecifier=function isc_ListGrid_makeGroupSpecifier(_1,_2,_3,_4){var _5=this.getFieldByName(_1);var _6={property:_1};if(_5){var _2=_2||_5.groupingMode||_5.defaultGroupingMode||(_5.$62&&_5.$62.defaultGroupingMode);if(_2!=null)_6.grouping=_2;_3=_3||_5.groupGranularity;if(_3!=null)_6.granularity=_3;_4=_4||_5.groupPrecision;if(_4!=null)_6.precision=_4}
return _6},isc.A.clearGroupSpecifiers=function isc_ListGrid_clearGroupSpecifiers(){this.setGroupSpecifiers(null)},isc.A.groupBy=function isc_ListGrid_groupBy(_1){var _2=[];if(isc.isAn.Array(_1)){_2=isc.shallowClone(_1)}else{for(var i=0;i<arguments.length;i++){_2[i]=arguments[i]}}
var _4=[];if(_2.length>0){if(isc.isA.String(_2[0])){this.setGroupSpecifiers(_2);return}else if(isc.isAn.Object(_2[0])){_4=_2.duplicate();_2=_2.getProperty("property")}}
if(!this.fields){this.groupState=_2.join(",");this.$52y=true;return}
for(var i=0;i<_2.length;i++){if(_2[i]!=null&&!this.getUnderlyingField(_2[i])){this.logWarn("groupBy() passed field:"+_2[i]+" - this is not a valid field within this grid - ignoring","grouping");return}}
if(_2.length>0&&_2[0]==null){_2=[]}
if(this.handleGroupBy!=null&&this.handleGroupBy(_2,_4)==false){for(var i=0;i<_4.length;i++){var _5=_4[i];if(_5.$1764){var _6=this.getFieldByName(_5.property);if(_5.$1764=="none")delete _6.groupingMode;else _6.groupingMode=_5.$1764;delete _5.$1764}}
return}
this.$169e=isc.shallowClone(_4);if(_2.length==0){this.clearGroupBy();this.handleGroupStateChanged();this.$199w(_2);this.$199x(isc.ListGrid.GROUP_BY,true);return}
var _7=[];for(var i=0;i<_2.length;i++){if(this.isCheckboxField(_2[i]))continue;var _8=(_2[i].property||_2[i]),_9=this.getUnderlyingField(_8);if(_9&&_9.displayField!=null&&_9.groupByDisplayField!=false&&_9.optionDataSource==null&&this.getUnderlyingField(_9.displayField))
{_8=_9.displayField}
_7.add(_8)}
this.logInfo("groupBy: "+_7,"grouping");var _10=this.isGrouped;this.isGrouped=true;if(this.showGroupSummary&&this.showGroupSummaryInHeader&&this.showGroupTitleColumn&&this.getGroupTitleField()==null)
{if(this.groupTitleColumn==null){this.groupTitleColumn=this.getGroupTitleColumn()}
if(this.fields.indexOf(this.groupTitleColumn)==-1){this.addField(this.groupTitleColumn,this.getGroupTitleColumnPosition())}}
this.isGrouped=_10;this.$122o(true,true,false,false,false,_2,_7);this.$193j=true;this.dataChanged();delete this.$193j},isc.A.setGroupByField=function isc_ListGrid_setGroupByField(_1){if(_1)this.groupBy(_1);else this.clearGroupBy()},isc.A.clearGroupBy=function isc_ListGrid_clearGroupBy(_1){this.$122o(false,false,false,true,false);this.logInfo("ungrouping","grouping");if(this.$1097){this.$1931(false,_1)}
var _2=this.getGroupByFields();if(_2!=null)for(var i=0;i<_2.length;i++){var _4=this.getUnderlyingField(_2[i]);if(_4)_4.groupingMode=null}
this.isGrouped=false;this.$1765();if(this.originalData){if(this.groupByField)this.groupByField=null;var _5=this.preserveEditsOnSetData;this.preserveEditsOnSetData=true;this.setData(this.originalData,true);this.preserveEditsOnSetData=_5;delete this.originalData;if(this.groupTree){isc.Tree.removeNodeMetaData(isc.isA.ResultSet(this.data)?this.data.allRows:this.data,false,false,this.groupTree);this.ignore(this.groupTree,"changeDataVisibility");this.groupTree.destroy();delete this.groupTree}}
if(this.groupTitleColumn!=null){var _6=this.completeFields||this.fields,_7=_6.indexOf(this.groupTitleColumn);if(_7!=-1){var _8=[];for(var i=0;i<_6.length;i++){if(i==_7)continue;_8[_8.length]=_6[i]}
this.setFields(_8)}}},isc.A.getGroupTitle=function isc_ListGrid_getGroupTitle(_1,_2){return this.$1419(this.data,this.getGroupByFields(),null,this.singleCellValueProperty,_1,_2)},isc.A.$1419=function isc_ListGrid__getGroupTitle(_1,_2,_3,_4,_5,_6){if(!_6&&_2){var _7=_1.getLevel(_5)-1,_6=this.getUnderlyingField(_2[_7])}
if(_6==null){return}
var _8;var _9=_6;if(!_6.getGroupTitle){var _10=this.completeFields||this.fields;for(var i=0;i<_10.length;i++){var f=_10[i];if(f.displayField==_6.name&&f.getGroupTitle&&f.groupByDisplayField!=false&&f.optionDataSource==null)
{_9=f;break}}}
if(_9.getGroupTitle){if(!isc.isA.Function(_9.getGroupTitle)){isc.Func.replaceWithMethod(_9,"getGroupTitle","groupValue,groupNode,field,fieldName,grid")}
return _9.getGroupTitle(_5.groupValue,_5,_9,_9.name,this)}
else if(!_6.getGroupValue&&_6.$62&&_6.$62.getGroupTitle){return _6.$62.getGroupTitle(_5.groupValue,_5,_6,_6.name,this)}else{_8=_5.groupValue}
var k=(_3==null?-1:_3.indexOf(_6)),_14=(k==-1?_6.valueMap:_3[k]);if(_14){_8=this.resolveValueMap(_8,_14)}else if(_6.displayField&&_5[_6.displayField]!=null){_8=_5[_6.displayField]}
if(_6.escapeHTML&&isc.isA.String(_8)&&_8!=this.$54t){_8=_8.asHTML(null,this.shouldSkipLineBreaks(_6))}
return _8},isc.A.getGroupNodeHTML=function isc_ListGrid_getGroupNodeHTML(_1,_2){var _3=this.frozenBody===_2;var _4=this.frozenFields&&this.frozenFields.length>0;if(_4&&this.singleCellGroupHeaders()){if(this.showGroupTitleInFrozenBody!=_3){return this.emptyCellValue}}
if(!isc.isA.Tree(this.data))return this.emptyCellValue;var _5=this.data.isOpen(_1),_6=_5?"opened":"closed",_7=isc.Img.urlForState(this.groupIcon,null,null,_6),_8=isc.Canvas.spacerHTML(this.groupIconPadding,1),_9=isc.Canvas.spacerHTML((this.data.getLevel(_1)-1)*this.groupIndentSize+this.groupLeadingIndent,1),_10=this.getGroupTitle(_1);var _11={src:_7,width:this.groupIconSize,height:this.groupIconSize,align:"middle"};if(this.groupIconStyle)_11.cssClass=this.groupIconStyle;var _12=this.imgHTML(_11,null,null,null,null,null,null,isc.Canvas.$123e,"eventPart='opener'",null,_11.cssClass);var _13=(this.canCollapseGroup?_9+_12:_9)+_8+_10;return _13},isc.A.$197t=function isc_ListGrid__shouldUseGroupNodeHTML(_1,_2,_3){var _4=this.getCheckboxFieldPosition();return(!this.canSelectGroups||_2>_4)&&(this.singleCellGroupHeaders()&&!_1.$941||_3)},isc.A.$1483=function isc_ListGrid__shouldCascadeSelection(){if(this.canSelectGroups&&this.groupTree!=null&&(this.groupTree==this.data))return true;return this.Super("$1483",arguments)},isc.A.getGroupTreeSelection=function isc_ListGrid_getGroupTreeSelection(_1,_2){var _3=this.getSelection(_1,true);if(_2&&this.isGrouped){var _4=[];for(var i=0;i<_3.length;i++){if(_3[i].$52e)_4.add(_3[i])}
_3=_4}
return _3},isc.A.getSelection=function isc_ListGrid_getSelection(_1,_2,_3){var _4=this.Super("getSelection",arguments);if(!_2&&_4&&_4.length>0&&this.isGrouped){var _5=[];for(var i=0;i<_4.length;i++){if(_4[i].$52e)continue;_5.add(_4[i])}
_4=_5}
return _4},isc.A.getUnselectedRecords=function isc_ListGrid_getUnselectedRecords(_1,_2){var _3=this.Super("getUnselectedRecords",arguments);if(!_1&&_3&&_3.length>0&&this.isGrouped){var _4=[];for(var i=0;i<_3.length;i++){if(_3[i].$52e)continue;_4.add(_3[i])}
_3=_4}
return _3},isc.A.getSelectedRecord=function isc_ListGrid_getSelectedRecord(){var _1=this.getSelection();return(_1.length>0?_1[0]:null)},isc.A.$1589=function isc_ListGrid__getGroupValue(_1,_2,_3,_4,_5,_6,_7,_8,_9){var _10=_3.userFormula,_11=_3.userSummary;if(_5==null)_5=_10;if(_6==null)_6=_11;if(_7==null)_7=_3.displayField;if(_8==null)_8=_3.valueMap;var _12;if(_1===_12)_1=null;if(_3.getGroupValue){_1=_3.getGroupValue(_1,_2,_3,_4,this)}else if(_5){_3.userFormula=_5;_1=this.getFormulaFieldValue(_3,_2);_3.userFormula=_10}else if(_6){_3.userSummary=_6;_1=this.getSummaryFieldValue(_3,_2);_3.userSummary=_11}else{if(_7&&_3.groupByDisplayField!=false){var _13=this.$1416(_3,_8,_7,_1,_2);if(_13){_1=_13}}else if(_3.$62&&_3.$62.getGroupValue){_1=_3.$62.getGroupValue(_1,_2,_3,_4,this)}}
if(_8&&_8[_1]){_1=_8[_1]}
if(_1==null||isc.isAn.emptyString(_1)){_1=_9||this.nullGroupTitle}
return _1},isc.A.$52u=function isc_ListGrid__addRecordToGroup(_1,_2,_3,_4){return this.$1417(this.getGroupByFields(),this.data,this.emptyCellValue,this.groupSummaryRecordProperty,this.gridSummaryRecordProperty,null,null,this.applyFormulaAfterSummary,null,null,null,null,this.nullGroupTitle,this.showGroupSummary,this.showGroupSummaryInHeader,this.recordBaseStyleProperty,this.groupNodeBaseStyle,this.recordCustomStyleProperty,this.groupNodeStyle,this.recordEditProperty,this.singleCellValueProperty,_1,_2,_3,_4)},isc.A.$1417=function isc_ListGrid___addRecordToGroup(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13,_14,_15,_16,_17,_18,_19,_20,_21,_22,_23,_24,_25,_26){var _27=this.$141u(_14,_15),_28=_22.getRoot(),_29;var _30=_26!=null?_26.indexOf(_23):_2.indexOf(_23);var _31=this.rowEditNotComplete(_30)?this.getEditedRecord(_30):_23;for(var i=0;i<_1.length;i++){var _33=_1[i],_34=this.getUnderlyingField(_33),_35=this.$275t(_34);var _36=_9==null?_34.userFormula:_9[i],_37=_10==null?_34.userSummary:_10[i],_38=_11==null?_34.displayField:_11[i],_39=_12==null?_34.valueMap:_12[i],_40=this.$141x(_3,_4,_5,_6,_7,_2,_8,_35=="userFormula"&&_36!=null,_36,_35=="userSummary"&&_37!=null,_37,_23,_30,_33,true);var _41=_40;_40=this.$1589(_40,_31,_34,_33,_36,_37,_38,_39,_13);var _42=_22.getChildren(_28);if(_42==null)_29=null;else _29=_42.find('groupValue',_40,_34.type=="datetime"?Array.DATETIME_VALUES:null);if(!_29){_29={groupName:_33,groupValue:_40,$52e:true,canDrag:false};if(_34.optionDataSource==null&&_34.displayField!=null){_29[_34.displayField]=_23[_34.displayField]}
if(_34.groupingMode){_29[_33]=_41}else{_29[_33]=_40}
_29[_16]=_17;_29[_18]=_19;_29[_20]=false
if(_25!=null){_29[_22.openProperty]=isc.isA.List(_25)?_25.find(_33,_40):!!_25}
if(_14)_22.addBeforeSummaries(_29,_28);else _22.add(_29,_28)}
_28=_29}
if(_22==_2)_2.remove(_23);if(_14)_22.addBeforeSummaries(_23,_28);else _22.add(_23,_28);if(_24){var _43=_22.getParents(_23);for(var i=_43.length-2,j=0;i>=0;i--,j++){var _45=this.$1419(_22,_1,_12,_21,_43[i],null);if(!_27)_43[i].groupTitle=_45;else _43[i][_21]=_45}}},isc.A.isGroupNode=function isc_ListGrid_isGroupNode(_1){if(_1==null)return false;return!!_1.$52e},isc.A.applyGroupSummaryToHeader=function isc_ListGrid_applyGroupSummaryToHeader(_1,_2,_3){return this.$142a(this.groupByFieldSummaries,this.includeInSummaryProperty,this.applyFormulaAfterSummary,this.groupSummaryRecordProperty,null,_1,_2,_3)},isc.A.$142a=function isc_ListGrid__applyGroupSummaryToHeader(_1,_2,_3,_4,_5,_6,_7,_8){var _9=_7.groupName;if(_1!=null&&!_1.contains(_9)){return}
var _10=_6.combineWithEditVals(_6.getRecordsInGroup(_7)),_11=this.$1412(_2,_3,_4,_5,_10,_7,_8);if(isc.isAn.Array(_11))_11=_11[0];if(!_11)return 0;var _8=this.completeFields||this.fields;for(var i=0;i<_8.length;i++){var _13=_8[i];var _14=this.getGridSummaryFunction(_13);if(_14&&isc.isAn.Array(_14))_14=_14[0];if(_14=="count"){var _15=_7[this.recordApplyPluralTitleProperty]||[];_15.add(_13.name);_7[this.recordApplyPluralTitleProperty]=_15}
var _16=this.$275h(_13),_17=isc.FieldGeneratorUtil.$280g(_16,_13,this);if(_17=="groupTitle")continue;_7[_17]=_11[_17]}
_7[_4]=true;return _10.length},isc.A.setShowGroupSummaryInHeader=function isc_ListGrid_setShowGroupSummaryInHeader(_1){if(this.showGroupSummaryInHeader==_1)return;this.showGroupSummaryInHeader=_1;var _2=this.getGroupByFields();this.ungroup();if(_2!=null&&_2.length>0){this.groupBy(_2)}},isc.A.setShowCollapsedGroupSummary=function isc_ListGrid_setShowCollapsedGroupSummary(_1){if(this.showCollapsedGroupSummary==_1)return;this.showCollapsedGroupSummary=_1;var _2=this.getGroupByFields();this.ungroup();if(_2!=null&&_2.length>0){this.groupBy(_2)}},isc.A.ungroup=function isc_ListGrid_ungroup(){this.$75p=this.getSelectedState(true);this.groupBy(null)},isc.A.setHeaderSpans=function isc_ListGrid_setHeaderSpans(_1,_2){this.headerSpans=_1;this.$1747=true;if(_2)return;if(this.completeFields)this.refreshFields();this.layoutChildren("headerSpans changed")},isc.A.setHeaderSpanTitle=function isc_ListGrid_setHeaderSpanTitle(_1,_2){var _3=this.getHeaderSpanConfig(_1);if(!_3){this.logWarn("setHeaderSpanTitle() - unable to locate span named: "+_1+this.getStackTrace());return}
_3.title=_2;if(_3.liveObject&&_3.headerTitle==null){_3.liveObject.setTitle(_2)}},isc.A.setHeaderSpanHeaderTitle=function isc_ListGrid_setHeaderSpanHeaderTitle(_1,_2){var _3=this.getHeaderSpanConfig(_1);if(!_3){this.logWarn("setHeaderSpanHeaderTitle() - unable to locate span named: "+_1+this.getStackTrace());return}
_3.headerTitle=_2;if(_3.liveObject)_3.liveObject.setTitle(_2)},isc.A.setHeaderSpanBaseStyle=function isc_ListGrid_setHeaderSpanBaseStyle(_1,_2){var _3=this.getHeaderSpanConfig(_1);if(!_3){this.logWarn("setHeaderSpanBaseStyle() - unable to locate span named: "+_1+this.getStackTrace());return}
_3.headerBaseStyle=_2;if(_3.liveObject==null)return;if(_2==null){var _4=this.getSpannedFields(_3),_5=_4[0];var _6=this.getHeaderButtonProperties();if(_5.frozen&&_6.frozenBaseStyle){_2=_6.frozenBaseStyle}else if(_6.baseStyle){_2=_6.baseStyle}
if(_2==null){_2=_3.liveObject.getClass().getPrototype().baseStyle}}
_3.liveObject.setBaseStyle(_2)},isc.A.setHeaderSpanTitleStyle=function isc_ListGrid_setHeaderSpanTitleStyle(_1,_2){var _3=this.getHeaderSpanConfig(_1);if(!_3){this.logWarn("setHeaderSpanTitleStyle() - unable to locate span named: "+_1+this.getStackTrace());return}
_3.headerTitleStyle=_2;if(_3.liveObject==null)return;if(_2==null){var _4=this.getSpannedFields(_3),_5=_4[0];var _6=this.getHeaderButtonProperties();if(_5.frozen&&_6.frozenTitleStyle){_2=_6.frozenTitleStyle}else if(_6.titleStyle){_2=_6.titleStyle}
if(_2==null){_2=_3.liveObject.getClass().getPrototype().titleStyle}}
_3.liveObject.setTitleStyle(_2)},isc.A.setShowGroupSummary=function isc_ListGrid_setShowGroupSummary(_1){if(this.$1097){this.$112b=_1;return}
var _2=(this.showGroupSummary!=_1);if(_2&&this.groupTree){var _3=this.groupByFieldSummaries;this.$112e(this.groupTree,this.showGroupSummary,_1,_3,_3)}
this.showGroupSummary=_1},isc.A.setGroupByFieldSummaries=function isc_ListGrid_setGroupByFieldSummaries(_1){if(this.$112f){this.$112a=_1;return}
var _2=(this.groupByFieldSummaries!=_1);if(!_2){var _3=isc.isAn.Array(_1);_2=(_3!=isc.isAn.Array(this.groupByFieldSummaries));if(!_2&&_3){var _4=_1.length;_2=(_4==this.groupByFieldSummaries.length);if(!_2){for(var i=_4;!_2&&i--;){_2=!this.groupByFieldSummaries.contains(_1[i])}}}}
if(_2&&this.groupTree){var _6=this.showGroupSummary;this.$112e(this.groupTree,_6,_6,this.groupByFieldSummaries,_1)}
this.groupByFieldSummaries=_1},isc.A.refreshGroupSummary=function isc_ListGrid_refreshGroupSummary(_1,_2){if(!this.isGrouped||!this.showGroupSummary||!this.groupTree)return;if(isc.isA.Number(_1))_1=this.groupTree.get(_1);if(this.showGroupSummaryInHeader){if(_1!=null){var _3=this.groupTree.$134d(_1,false,[]);for(var i=_3.length-1;i>=0;i--){var _5=_3[i];this.applyGroupSummaryToHeader(this.groupTree,_5,_2);this.refreshRow(this.groupTree.indexOf(_5));delete _5.$134e}}else{var _3=this.groupTree.findAll("$52e",true);if(_3!=null){for(var i=0;i<_3.length;i++){this.applyGroupSummaryToHeader(this.groupTree,_3[i],_2)}}
this.markForRedraw("refresh group summaries")}}else{this.$112e(this.groupTree,this.showGroupSummary,this.showGroupSummary,this.groupByFieldSummaries,this.groupByFieldSummaries,true,_1,_2)}},isc.A.configureGrouping=function isc_ListGrid_configureGrouping(_1){var _2=this,_3=this.getGroupByFields();if(_1&&(!_3||_3.length==0)){_3=[_1.name]}
var _4=isc.addProperties({},this.multiGroupDialogDefaults,this.multiGroupDialogProperties);isc.MultiGroupDialog.askForGrouping(this,_3,function(_5){if(_5)_2.setGroupSpecifiers(_5)},_4)},isc.A.addBodyPassthroughMethods=function isc_ListGrid_addBodyPassthroughMethods(_1){if(this.body)this.$51e(this.body);if(this.frozenBody)this.$51e(this.frozenBody)});isc.evalBoundary;isc.B.push(isc.A.$51e=function isc_ListGrid__addBodyPassthroughMethods(_1){var _2=isc.getKeys(isc.ListGrid.$30f);var _3=this.$273g(_1,_2);_1.addMethods(_3)},isc.A.$273g=function isc_ListGrid__getBodyPassthroughMethods(_1,_2){var _3={};for(var i=0;i<_2.length;i++){var _5=_2[i],_6=this[_5];if(_5=="cellContextClick")continue;if(_6==null){_3[_5]=_1.getClass().getPrototype()[_5]}else if(_6!=isc.ListGrid.$30g[_5]&&!(_1[_5]!=null&&!_1[_5].$273f&&(_1[_5].$118m||(_1[_5]!=_1.getClass().getPrototype()[_5]))))
{_3[_5]=isc.ListGrid.$30f[_5]}}
return _3},isc.A.$273a=function isc_ListGrid__addBodyPassbackForObservation(_1){if(this.body)this.body.$273b(_1);if(this.frozenBody)this.frozenBody.$273b(_1)},isc.A.$2729=function isc_ListGrid__clearBodyPassbackFromObservation(_1){if(this.body)this.body.$273e(_1);if(this.frozenBody)this.frozenBody.$273e(_1)},isc.A.addProperties=function isc_ListGrid_addProperties(_1){this.Super("addProperties",arguments);this.addBodyPassthroughMethods()},isc.A.addMethods=function isc_ListGrid_addMethods(_1){this.Super("addMethods",arguments);this.addBodyPassthroughMethods()},isc.A.propertyChanged=function isc_ListGrid_propertyChanged(_1,_2){this.invokeSuper(isc.ListGrid,"propertyChanged",_1,_2);if(this.$31h[_1])this.$34k=true;if(this.body==null)return;if(isc.ListGrid.$295.contains(_1)){this.body[_1]=_2;if(this.frozenBody)this.frozenBody[_1]=_2}
if(this.$45l[_1]!=null){this.body.setProperty(this.$45l[_1],_2);if(this.frozenBody)this.frozenBody.setProperty(this.$45l[_1],_2);this.markForRedraw()}
if(this.editingOn&&this.editProxy&&_1=="initialCriteria"){this.setCriteria(this.initialCriteria)}else if(this.editingOn&&this.editProxy&&_1=="sortField"){this.sort(_2)}},isc.A.doneSettingProperties=function isc_ListGrid_doneSettingProperties(){if(this.$34k)this.$31i()},isc.A.setChildEditableProperties=function isc_ListGrid_setChildEditableProperties(_1,_2,_3,_4){var _5=isc.DS.get(_3.type);if(!_5||!_5.inheritsSchema("ListGridField")){return this.Super("setChildEditableProperties",arguments)}
if(!_2.hidden&&_1.showIf=="false")_1.showIf=null;var _6=this.completeFields||this.fields;isc.addProperties(_1,_2);this.setFields(_6)},isc.A.getExportFieldValue=function isc_ListGrid_getExportFieldValue(_1,_2,_3,_4){var _5=this.getSpecifiedField(_2);if(this.isCheckboxField(_5)||_5.valueIcons||this.$31s(_5))
{var _6=this.getRecordIndex(_1),_7;var _8=_5.displayField!=null&&!_5.valueMap&&!_5.getCellValue&&this.$425(_5);if(_8){_7=this.getRawCellValue(_1,_6,_5.displayField,true)}else{_7=this.getRawCellValue(_1,_6,_3);var _9=!this.showValueIconOnly(_5)&&_5.valueMap;if(_9)_7=this.resolveValueMap(_7,_9)}
var _10=_5.hiliteHTMLAfterFormat;if(_10==null)_10=this.hiliteHTMLAfterFormat;if(_10==null)_10=true;var _11=this.getFieldHilites(_1,_5);if(!_10){if(_11!=null)_7=this.applyHiliteHTML(_11,_7);_7=this.$315(_7,_1,_5,_6,_3)}else{_7=this.$315(_7,_1,_5,_6,_3);if(_11!=null)_7=this.applyHiliteHTML(_11,_7)}
return this.htmlUnescapeExportFieldTitle(_7.toString())}
return this.Super("getExportFieldValue",arguments)},isc.A.getOriginalData=function isc_ListGrid_getOriginalData(){return(this.isGrouped&&this.originalData)?this.originalData:this.getData()},isc.A.getSelectedCellData=function isc_ListGrid_getSelectedCellData(_1,_2){if(this.canSelectCells){var _3=[],_4={},_5;var _6=this.selectionManager.getSelectedCells();if(_6.length==0)return[];var _7,_8=0,_9=_6[_8][1];while(_8<_6.length){var _10={},_11=false,_12=_6[_8][0],_13=_6[_8][1];while(_8<_6.length){var _14=_6[_8][0];var _15=_6[_8][1];if(_14!=_12)break;if(_15==_13||!_2){var _16=this.getCellRecord(_14,_15);if(this.shouldShowRecordComponent(_16,_15)){_7=this.getRawCellValue(_16,_14,_15);if(_7===_5&&this.copyEmptyCells)_7=null;_11=true}else _7=_5}
var _17=_15-_9;if(_1){var _18=_4[_17];if(_18!==_5)_7=_18;else _4[_17]=_7}
if(_7!==_5)_10[_17]=_7;_8++}
if(_11)_3.add(_10)}
return _3}
return null},isc.A.applyCellData=function isc_ListGrid_applyCellData(_1,_2,_3){if(!this.canSelectCells||!_1)return;if(!_3)_3=this.selectionManager.getSelectedCells().slice(0,1);if(_3.length==0)return;var _4=_3[0][1],_5=this.getTotalRows();var _6=isc.CellListIterator.create({cells:_3});for(var i=0,_8=_6.getNextRow();i<_1.length&&_8<_5;i++,_8=_6.getNextRow()){while(!this.$97k(_8)){_8=_6.getNextRow()}
if(_8>=_5)break;var _9,_10=_1[i];var _11=isc.ListGrid.$97b(_10,!_2);for(var j=0;j<_11.length;j++){if(j==0||_2)_9=_4+_11[j];else _9++;for(var _13=null;_9>=0&&_9<this.getTotalCols();_9++){_13=this.$97l(_9);if(_13||_2)break}
if(_13&&this.canEditCell(_8,_9)){this.setEditValue(_8,_9,_10[_11[j]])}}}},isc.A.applyRecordData=function isc_ListGrid_applyRecordData(_1){if(!this.canSelectCells||!_1)return;var _2=this.selectionManager.getSelectedCells();if(_2.length==0)return;var _3,_4=_2[0][0],_5=this.getTotalRows();for(var i=0,_7=_4;i<_1.length&&_7<_5;i++,_7++){while(!this.$97k(_7)){_7++}
if(_7>=_5)break;var _8=_1[i];for(var _9 in _8){if(_8.hasOwnProperty(_9)){var _10=_8[_9];if(_10!==_3){var _11=this.getFieldNum(_9);var _12=this.getField(_11);if(_12&&this.canEditCell(_7,_11)){this.setEditValue(_7,_11,_10)}}}}}},isc.A.$97l=function isc_ListGrid__getFieldIfNonGenerated(_1){var _2=this.getField(_1);if(!_2||this.$275o(_2)){return null}
return _2},isc.A.$97k=function isc_ListGrid__isValidRowForApplyGridData(_1){var _2=this.getCellRecord(_1);if(_2==null)return true;return!_2.$52e&&!_2[this.isSeparatorProperty]&&!_2[this.groupSummaryRecordProperty]},isc.A.$94i=function isc_ListGrid__invokeKeyboardCopyPasteShortcut(_1){if(!this.$2364())return true;switch(_1){case"D":this.applyCellData(this.getSelectedCellData(true,null),true,this.selectionManager.getSelectedCells());break;case"R":this.applyCellData(this.getSelectedCellData(null,true),true,this.selectionManager.getSelectedCells());break;case"C":isc.ListGrid.$94g=this.getSelectedCellData();break;case"V":this.applyCellData(isc.ListGrid.$94g);break}
return false},isc.A.$165p=function isc_ListGrid__provideEditRecordToRuleContext(_1){if(this.ruleScope||this.isRuleScope){var _2=(this.getEditSession(this.getEditRow())?this.getEditRow():null),_3=(_2!=null?this.getEditedRecord(_2,null,true):null),_4=(_2!=null?this.rowHasChanges(_2,false):null),_5=this.getDataSource(),_6=this.hasStableLocalID()||(this.editNode!=null);if(_1){for(var _7 in _1){if(_5){this.provideRuleContext(_5.getID()+"."+_7,_1[_7],this,null,_6)}
if(_6){this.provideRuleContext(this.getLocalId()+".values."+_7,_1[_7],this,null,true)}}}else{if(_3){if(this.selectionManager){delete _3[this.selectionManager.selectionProperty]}
delete _3.__ref}
if(_5){this.provideRuleContext(_5.getID(),_3,this,null,_6)}
if(_6){this.provideRuleContext(this.getLocalId()+".values",_3,this,null,true)}}
if(_6){this.provideRuleContext(this.getLocalId()+".hasChanges",_4,this)}}},isc.A.$1740=function isc_ListGrid__provideEditFocusToRuleContext(_1){if(!this.hasStableLocalID()&&this.editNode==null)return;var _2=this.getLocalId()+".focusField",_3=(_1?_1.name:null),_4=this.$1671(_2);if(_3!=_4)this.provideRuleContext(_2,_3,this)},isc.A.$1765=function isc_ListGrid__provideIsGroupedToRuleContext(){if(!this.hasStableLocalID()&&this.editNode==null)return;var _1=this.getLocalId()+".isGrouped",_2=this.isGrouped,_3=this.$1671(_1);if(_2!=_3)this.provideRuleContext(_1,_2,this)},isc.A.$178p=function isc_ListGrid__provideCriteriaToRuleContext(){if(!this.hasStableLocalID()&&this.editNode==null)return;var _1=this.getLocalId()+".criteria",_2=this.getCriteria(),_3=this.getImplicitCriteria(true),_4=(this.dataSource?isc.DS.get(this.dataSource):null),_5=this.$1671(_1);if(_3){_2=(_4||isc.DS).combineCriteria(_2||{},_3)}
if(_4&&_4.implicitCriteria){_2=_4.combineCriteria(_2||{},isc.DataSource.copyCriteria(_4.implicitCriteria))}
if(_2&&isc.isAn.emptyObject(_2))_2=null;if(_5!=null&&this.data.compareCriteria){if(this.data.compareCriteria(_2,_5)){this.provideRuleContext(_1,_2,this)}}else if(_2!=_5){this.provideRuleContext(_1,_2,this)}},isc.A.$178r=function isc_ListGrid__provideDataLoadingToRuleContext(){if(!this.hasStableLocalID()&&this.editNode==null)return;var _1=this.getLocalId()+".dataLoading",_2=this.$1671(_1);var _3=null;if(isc.isA.ResultSet(this.data)){_3=!this.data.lengthIsKnown()}else if(isc.isA.ResultTree(this.data)){var _4=this.data.getChildren(this.data.getRoot());if(isc.isA.ResultSet(_4)){_3=!_4.lengthIsKnown()}else{_3=this.data.isLoading(this.data.getRoot())}}
if(!_3)_3=null;if(_3!=_2)this.provideRuleContext(_1,_3,this)},isc.A.$172u=function isc_ListGrid__observeRuleContextChanged(){var _1=this,_2=this.getRuleScopeComponent();if(_2&&!this.isObserving(_2,"ruleContextChanged")){this.observe(_2,"ruleContextChanged",function(_15,_16){if(_1.destroying||_1.destroyed){this.logInfo("Attempt to respond to RuleContext changes during destruction...");return}
var _3=false,_4=false,_5=this.getDataSource();if(_5&&!isc.isA.DataSource(_5))return;var _6=_1.getImplicitCriteria(false);if(_6&&isc.DS.$167l(_6)){_6=_1.resolveDynamicCriteria(_6,"implicitCriteria");if(!_6||(!_6.valuePath&&(!_6.criteria||_6.criteria.length==0)))return;if(_5&&_5.compareCriteria(this.oldImplicitCriteria,_6,_1.data.context)!=0){this.oldImplicitCriteria=isc.DS.copyCriteria(_6);_4=true}}
var _7=_1.getCriteria()||_1.getInitialCriteria();if(_7&&isc.DS.$167l(_7)){var _8=_1.resolveDynamicCriteria(_7,null);if(_5&&_5.compareCriteria(this.oldResolvedCriteria,_8,_1.data.context)!=0){this.oldResolvedCriteria=isc.DS.copyCriteria(_8);if(_8!=null){_3=true}}}
if(_3){_1.fetchData(_7)}else if(_4){if(!_1.dataObjectSupportsFilter(_1.getData()))
_1.fetchData(_7);else
_1.markForRefreshData()}
var _9=_1.getHilites();if(_9){var _10=false;for(var i=0;i<_9.length&&!_10;i++){var _12=_9[i],_13=_12.$265r;if(_13){for(var j=0;j<_13.length;j++){if(_16.contains(_13[j])){_10=true;break}}}}
if(_10){_1.fireOnPause("lgReapplyHilites",{target:_1,methodName:"applyHilites",args:[true]})}}})}},isc.A.markForRefreshData=function isc_ListGrid_markForRefreshData(){if(this.refreshDataTimer)isc.Timer.clear(this.refreshDataTimer);var _1=this;this.refreshDataTimer=isc.Timer.setTimeout(function(){isc.Timer.clear(_1.refreshDataTimer);_1.refreshData()},this.markForRefreshDataDelay)},isc.A.$1633=function isc_ListGrid__removeFromRuleScope(){if(this.ruleScope){var _1=isc.DS.get(this.getDataSource()),_2=this.hasStableLocalID()||(this.editNode!=null);if(_1)this.provideRuleContext(_1.getID(),null,this,null,_2);if(_2)this.provideRuleContext(this.getLocalId(),null,this)}
var _3=this.getRuleScopeComponent();if(_3&&this.isObserving(_3,"ruleContextChanged")){this.ignore(_3,"ruleContextChanged")}
this.Super("$1633",arguments)});isc.B._maxIndex=isc.C+1055;isc.ListGrid.registerStringMethods(isc.GridRenderer.$294);isc.ListGrid.registerStringMethods({recordClick:"viewer,record,recordNum,field,fieldNum,value,rawValue,editedRecord",recordDoubleClick:"viewer,record,recordNum,field,fieldNum,value,rawValue,editedRecord",removeRecordClick:"rowNum,colNum",recordsDropped:"records,rowNum,viewer,sourceWidget",recordDropMove:"viewer,recordNum,record,position",editValueChanged:"rowNum,fieldName,newValue,oldValue",editorChange:"record,newValue,oldValue,rowNum,colNum",cellChanged:"record,newValue,oldValue,rowNum,colNum,grid,recordNum,fieldNum",editComplete:"rowNum,colNum,newValues,oldValues,editCompletionEvent,dsResponse",editFailed:"rowNum,colNum,newValues,oldValues,editCompletionEvent,dsResponse,dsRequest",editorEnter:"record,value,rowNum,colNum",rowEditorEnter:"record,editValues,rowNum",editorExit:"editCompletionEvent,record,newValue,rowNum,colNum",rowEditorExit:"editCompletionEvent,record,newValues,rowNum",validateCellValue:"rowNum,colNum,newValue,oldValue",validateFieldValue:"newValue,oldValue,record,field,rowNum,colNum",formatCellValue:"value,record,rowNum,colNum",formatInactiveCellValue:"value,record,rowNum,colNum",formatEditorValue:"value,record,rowNum,colNum",parseEditorValue:"value,record,rowNum,colNum",sortChanged:"sortSpecifiers",fieldStateChanged:"",groupStateChanged:"",viewStateChanged:"",dataArrived:"startRow,endRow",dataChanged:"operationType",dataChangedComplete:"operationType",headerHover:"fieldNum",headerClick:"fieldNum",onHeaderClick:"fieldNum",onRecordDrop:"dropRecords,targetRecord,index,dropPosition,sourceWidget",onExpandRecord:"record",onCollapseRecord:"record",drawAreaChanged:"oldStartRow,oldEndRow,oldStartCol,oldEndCol",showRecordComponent:"record,colNum",createRecordComponent:"record,colNum",updateRecordComponent:"record,colNum,component,recordChanged",updateFilterEditorValues:"criteria",filterEditorSubmit:"criteria",handleGroupBy:"fields,specifiers",groupByComplete:"fields",handleRegroup:"",groupTreeChanged:"changeType,success",hilitesChanged:"",cellErrorIconHover:"record,rowNum,colNum",cellErrorIconOver:"record,rowNum,colNum",cellErrorIconOut:"record,rowNum,colNum",criteriaChanged:""});isc.ListGrid.$24j=isc.addProperties({},isc.ListGrid.getInstanceProperty("headerDefaults"));isc.ListGrid.$24k=isc.addProperties({},isc.ListGrid.getInstanceProperty("headerButtonDefaults"));isc.ListGrid.classInit();isc.defineClass("LineEditor",isc.ListGrid);isc.A=isc.LineEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canEdit=true;isc.A.editEvent="click";isc.A.editOnFocus=true;isc.A.modalEditing=true;isc.A.enterKeyEditAction="nextRowStart";isc.A.listEndEditAction="next";isc.A.height=50;isc.A.emptyMessage="Click to add data";isc.A.emptyMessageStyle="normal";isc.A.autoFitData="vertical";isc.A.leaveScrollbarGap=false;isc.B.push(isc.A.click=function isc_LineEditor_click(){var _1=this.getRecord(this.getEventRow());this.Super("click",arguments);if(_1==null&&isc.EH.lastEvent.target==this.body)this.startEditingNew()});isc.B._maxIndex=isc.C+1;isc.defineClass("RowRangeDisplay","Label");isc.A=isc.RowRangeDisplay.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.wrap=false;isc.A.align="center";isc.A.valign="center";isc.A.canRequestRowCount=false;isc.A.interactiveCursor=isc.Canvas.HAND;isc.A.requestRowCountPrompt="Click to calculate row count";isc.A.canHover=true;isc.A.showHover=true;isc.B.push(isc.A.initWidget=function isc_RowRangeDisplay_initWidget(){if(this.sourceGrid!=null&&isc.isA.ListGrid(this.sourceGrid)){this.observeSourceGrid()}
return this.Super("initWidget",arguments)},isc.A.setSourceGrid=function isc_RowRangeDisplay_setSourceGrid(_1){if(this.sourceGrid==_1)return;if(isc.isA.ListGrid(this.sourceGrid))this.ignoreSourceGrid();this.sourceGrid=_1;if(isc.isA.ListGrid(_1)){this.observeSourceGrid()}},isc.A.observeSourceGrid=function isc_RowRangeDisplay_observeSourceGrid(){this.observe(this.sourceGrid,"rowRangeDisplayValueChanged","observer.$257d(reason)")},isc.A.ignoreSourceGrid=function isc_RowRangeDisplay_ignoreSourceGrid(){this.ignore(this.sourceGrid,"rowRangeDisplayValueChanged")},isc.A.$257d=function isc_RowRangeDisplay__rowRangeDisplayValueChanged(_1){if(this.isDrawn())this.markForRedraw("rowRangeDisplayValueChanged")},isc.A.getContents=function isc_RowRangeDisplay_getContents(){var _1=this.sourceGrid;if(isc.isA.ListGrid(_1)){return _1.getRowRangeDisplayValue()}},isc.A.getRowCountStatus=function isc_RowRangeDisplay_getRowCountStatus(){return this.sourceGrid.getRowCountStatus()},isc.A.click=function isc_RowRangeDisplay_click(){if(this.$2566()){this.sourceGrid.fetchRowCount();this.redraw()}},isc.A.$2566=function isc_RowRangeDisplay__canRequestRowCount(){return this.canRequestRowCount&&this.getRowCountStatus()!="exact"&&this.getRowCountStatus()!="loading"},isc.A.fetchRowCountReply=function isc_RowRangeDisplay_fetchRowCountReply(_1,_2,_3){if(_3)return;this.markForRedraw("row count fetch complete")},isc.A.getStateName=function isc_RowRangeDisplay_getStateName(){if(this.interactiveStyleName&&this.$2566()){return this.interactiveStyleName}
return this.Super("getStateName",arguments)},isc.A.getCurrentCursor=function isc_RowRangeDisplay_getCurrentCursor(){if(this.interactiveCursor&&this.$2566()){return this.interactiveCursor}
return this.Super("getCurrentCursor",arguments)},isc.A.getHoverHTML=function isc_RowRangeDisplay_getHoverHTML(){if(this.requestRowCountPrompt&&this.$2566()){return this.requestRowCountPrompt}});isc.B._maxIndex=isc.C+13;isc.ClassFactory.defineClass("TreeGrid","ListGrid");isc.addGlobal("TreeViewer",isc.TreeGrid);isc.defineClass("TreeGridBody",isc.GridBody);isc.A=isc.TreeGridBody.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$34w="TABLE";isc.A.$34x="padding:0px;border:0px;";isc.B.push(isc.A.$1159=function isc_TreeGridBody__getShowClippedValuesOnHover(){if(this.showClippedValuesOnHover==null)return true;return this.showClippedValuesOnHover},isc.A.cellValueIsClipped=function isc_TreeGridBody_cellValueIsClipped(_1,_2,_3,_4,_5){var _6=this.grid,_7=_6.$34t,_8=_6.getFieldBody(_7);if(this===_8&&_2==_6.getLocalFieldNum(_7)){var _9;if(_6.writeTreeCellTable){var _10=this.getTableElement(_1,_2);if(_10==null)return false;var _11=_10.firstChild;while(_11&&_11.tagName!=this.$34w)_11=_11.firstChild;if(_11&&_11.rows&&_11.rows[0]){var _12=_11.rows[0].lastChild,_9=_12;if(isc.Browser.isMoz&&_12.firstChild&&_12.firstChild.hasAttribute&&_12.firstChild.hasAttribute("$114y"))
{_9=_12.firstChild}}}else{var _13=isc.Element.get(_6.$170d(_1));if(_13){_9=_13.firstChild;if(_9&&(!_9.hasAttribute||!_9.hasAttribute("$114y")))
{_9=null}}}
if(_9){return this.$1154(_9)}}
return this.invokeSuper(isc.TreeGridBody,"cellValueIsClipped",_1,_2,_3,_4,_5)},isc.A.bypassCellValueCache=function isc_TreeGridBody_bypassCellValueCache(_1,_2,_3){var _4=isc.GridBody.$b4.bypassCellValueCache.call(this,_1,_2,_3);if(_4)return true;if(this.fixedColumnWidths){var _5=this.grid,_6=_5.$34t,_7=_5.getFieldBody(_6);if(this===_7&&_3==_5.getLocalFieldNum(_6)){return true}}
return false},isc.A.defaultCellValueHoverHTML=function isc_TreeGridBody_defaultCellValueHoverHTML(_1,_2,_3,_4,_5,_6){var _7=this.grid,_8=_7.$34t,_9=_7.getFieldBody(_8);if(this===_9&&_3==_7.getLocalFieldNum(_8)){return this.grid.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_8)}
return this.invokeSuper(isc.TreeGridBody,"defaultCellValueHoverHTML",_1,_2,_3,_4,_5,_6)},isc.A.$29h=function isc_TreeGridBody__updateCellStyle(_1,_2,_3,_4,_5){if(_4==null)_4=this.getTableElement(_2,_3);if(_4==null)return;if(!this.showHiliteInCells&&_3==this.grid.getLocalFieldNum(this.grid.getTreeFieldNum())&&this.grid.writeTreeCellTable)
{if(_1==null)_1=this.getCellRecord(_2,_3);if(_5==null)_5=this.getCellStyle(_1,_2,_3);var _6=_4.getElementsByTagName(this.$34w),_7=_6&&_6[0];if(_7){var _8;if(this.getCellCSSText){_8=this.getCellCSSText(_1,_2,_3);if(_8!=null&&!isc.isAn.emptyString(_8)){_8+=isc.Canvas.$42a}else _8=null}
_7.className=_5;if(_8!=null)_7.cssText=_8;var _9=_7.rows,_10=_9[0].childNodes;if(_10&&_10.length>0){for(var i=0;i<_10.length;i++){_10[i].className=_5;if(_8){var _12=this.grid.$253i(_8);if(i==_10.length-1){if(this.grid.$127g()){_12+=this.grid.$253j()}
_12+=(this.isRTL()?"padding-left:1px;padding-right:":"padding-right:1px;padding-left:")+1+"px"}
_10[i].style.cssText=_12}}}}}
return isc.GridRenderer.getPrototype().$29h.apply(this,[_1,_2,_3,_4,_5])},isc.A.click=function isc_TreeGridBody_click(_1,_2){if(!this.$29p()){var _3=this.grid,_4=_3.getEventRecordNum(),_5=_4<0?null:_3.getRecord(_4),_6;if(_3.data.isMultiLinkTree()){_6=_3.data.getNodeLocator(_4)};if(_5!=null&&_3.data.isFolder(_5)&&_3.clickInOpenArea(_6||_5)){if(isc.screenReader){this.$86a(_4,this.getEventColumn())}
_3.toggleFolder(_6||_5);_3.clearLastHilite();_3.$31q=null;delete this.$1697;return isc.EH.STOP_BUBBLING}}
return this.Super("click",arguments)},isc.A.mouseDown=function isc_TreeGridBody_mouseDown(){if(!isc.isA.Tree(this.grid.data)){return false}
var _1=this.$1696(),_2=_1[0],_3=_2<0?null:this.grid.data.get(_2),_4;if(this.grid.data.isMultiLinkTree()){_4=this.grid.data.getNodeLocator(_2)}
if(_3!=null){if(this.grid.clickInOpenArea(_4||_3)){return isc.EH.STOP_BUBBLING}else if(this.grid.clickInCheckboxArea(_4||_3)&&this.canSelectRecord(_3)){var _5=this.grid.selectionType;if(_5==isc.Selection.SINGLE){this.deselectAllRecords();this.selectRecord(_3)}else if(_5==isc.Selection.SIMPLE||_5==isc.Selection.MULTIPLE)
{if(this.selectionManager.isSelected(_3,_2)){this.deselectRecord(_3)}else{this.selectRecord(_3)}}
return isc.EH.STOP_BUBBLING}else if(this.grid.singleClickFolderToggle){this.grid.toggleFolder(_3);return isc.EH.STOP_BUBBLING}}
return this.Super("mouseDown",arguments)},isc.A.mouseUp=function isc_TreeGridBody_mouseUp(){if(!isc.isA.Tree(this.grid.data)){return false}
var _1=this.getEventRow(),_2=_1<0?null:this.grid.data.get(_1),_3;if(this.grid.data.isMultiLinkTree()){_3=this.grid.data.getNodeLocator(_1)}
if(_2!=null&&(this.grid.clickInOpenArea(_3||_2)||this.grid.clickInCheckboxArea(_3||_2)))
{return isc.EH.STOP_BUBBLING}else{return this.Super("mouseUp",arguments)}},isc.A.placeEmbeddedComponent=function isc_TreeGridBody_placeEmbeddedComponent(_1){if(this.grid.indentRecordComponents){var _2=_1.$57n;if(_2==this.grid.getTreeFieldNum()&&(_1.snapOffsetLeft==null||_1.$2741)){var _3=_1.embeddedRecord;if(_3!=null){_1.snapOffsetLeft=this.grid.getOpenAreaWidth(_3)+this.grid.getIconPadding(_3);_1.$2741=true}}}
return this.Super("placeEmbeddedComponent",arguments)},isc.A.getTableHTML=function isc_TreeGridBody_getTableHTML(_1,_2,_3,_4,_5,_6,_7){var _8=this.grid.data,_9=(isc.isA.ResultTree(_8)&&!this.isEmpty());var _10=_2,_11=_3;if(_9){var _12=(_2!=null&&_3!=null)?this.$200z(_2,_3):this.$121d(false);_10=_12[0];_11=_12[1];_8.$121e(_10,_11)}
var _13=this.invokeSuper(isc.TreeGridBody,"getTableHTML",_1,_2,_3,_4,_5,_6,_7);if(_9){_8.$121f(_10,_11)}
return _13});isc.B._maxIndex=isc.C+10;isc.A=isc.TreeGrid;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.TREE_FIELD={name:"nodeTitle",treeField:true,canFilter:false,$2395:true,getCellValue:function(_1,_2,_3,_4){if(!_1.getNodeTitle){var _5=_4==null?null:_1.getFieldName(_4);return _2==null||_5==null?null:_2[_5]}
return _1.getNodeTitle(_2,_3,this)},getFieldTitle:function(_1,_2){var _3=this
if(_3.name=="nodeTitle")return _1.treeFieldTitle;return _3.title||_3.name}};isc.A.$35f={};isc.A.$35g={};isc.A.$190a={};isc.B.push(isc.A.$175n=function isc_c_TreeGrid__pagedTreeFieldSortNormalizer(_1,_2,_3){return _3.getNodeTitle(_1,-1,this)},isc.A.$82d=function isc_c_TreeGrid__getTreeCellTemplate(){if(!this.$819){isc.Canvas.$816.add({target:this,methodName:"$82a"});this.$819=true}
if(this.$34p==null){this.$34p=["<table"+(isc.Browser.isIE&&isc.screenReader?" unselectable='on'":"")+" role='presentation' cellpadding=0 cellspacing=0 class='",,"' style='",,isc.Canvas.$42a+"'><colgroup><col width='",,"px'/><col width='",,"px'/><col/></colgroup><tbody><tr><td"+(isc.Browser.isIE&&isc.screenReader?" unselectable='on'":"")+" style='line-height:0px;",,isc.Canvas.$42a+"' class='",,"'>",,"</td>"]}
return this.$34p},isc.A.$82e=function isc_c_TreeGrid__getTreeCellTitleTemplate(){if(!this.$819){isc.Canvas.$816.add({target:this,methodName:"$82a"});this.$819=true}
if(this.$34q==null){this.$34q=["<td"+(isc.Browser.isIE&&isc.screenReader?" unselectable='on'":"")+" style='line-height:0px;",,";"+isc.Canvas.$42a+"' class='",,"'>"+(isc.Browser.isSafari||isc.Browser.isIE?"<nobr style='white-space:nowrap;display:inline-block;'>":""),,,,(isc.Browser.isSafari||isc.Browser.isIE?"</nobr>":"")+"</td><td",,(isc.Browser.isIE&&isc.screenReader?" unselectable='on'":"")+" style='",,";"+isc.Canvas.$42a+(isc.Page.isRTL()?"padding-left:1px;padding-right:":"padding-right:1px;padding-left:"),,"px;' class='",,"'>",,,,"</td>"]}
return this.$34q},isc.A.$82a=function isc_c_TreeGrid__doublingStringsChanged(){this.$34p=null;this.$34q=null},isc.A.getOpenerImageMap=function isc_c_TreeGrid_getOpenerImageMap(_1){var _2=isc.isAn.Object(_1)?_1._base:_1;if(!this.$35f[_2]){if(isc.isAn.Object(_1)){this.$35f[_2]=_1}else{this.$35f[_2]=[null,isc.Img.urlForState(_1,null,null,"opened"),isc.Img.urlForState(_1,null,null,"closed"),isc.Img.urlForState(_1,null,null,"opening"),null,isc.Img.urlForState(_1,null,null,"opened_selected"),isc.Img.urlForState(_1,null,null,"closed_selected"),isc.Img.urlForState(_1,null,null,"opening_selected"),null,isc.Img.urlForState(_1,null,null,"opened_rtl"),isc.Img.urlForState(_1,null,null,"closed_rtl"),isc.Img.urlForState(_1,null,null,"opening_rtl"),null,isc.Img.urlForState(_1,null,null,"opened_selected_rtl"),isc.Img.urlForState(_1,null,null,"closed_selected_rtl"),isc.Img.urlForState(_1,null,null,"opening_selected_rtl")]}}
return this.$35f[_2]},isc.A.getConnectorImageMap=function isc_c_TreeGrid_getConnectorImageMap(_1,_2){var _3=_2?this.$190a:this.$35g;var _4=_1;if(isc.isAn.Object(_4)){_4=_1._base||_1[isc.getKeys(_1)[0]]}
if(_3[_4]==null){if(_4!=_1){_3[_4]=_1}else{var _5=["","opened","closed"];var _6=["single","start","end","middle"];var _7=[];for(var i=0;i<_6.length;i++){for(var _9=0;_9<_5.length;_9++){_7.add(_5[_9]+(_5[_9]==""?"":"_")+_6[i])}}
var _10=_7.length;for(var i=0;i<_10;i++){_7.add(_7[i]+"_selected")}
if(_2){for(var i=0;i<_7.length;i++){_7[i]+="_rtl"}}
_3[_4]=[];for(var i=0;i<_7.length;i++){_3[_4][i]=isc.Img.urlForState(_4,null,null,_7[i])}}}
return _3[_4]});isc.B._maxIndex=isc.C+6;isc.A=isc.TreeGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoFetchTextMatchStyle="exact";isc.A.cascadeSelection=false;isc.A.showPartialSelection=false;isc.A.booleanTrueImage=null;isc.A.booleanFalseImage=null;isc.A.booleanPartialImage=null;isc.A.showClippedValuesOnHover=null;isc.A.treeFieldMinWidth=100;isc.A.treeFieldTitle="Name";isc.A.autoAssignTreeField=true;isc.A.showRoot=false;isc.A.displayNodeType=isc.Tree.FOLDERS_AND_LEAVES;isc.A.canDragRecordsOut=false;isc.A.canDropRootNodes=true;isc.A.dragDataAction=isc.ListGrid.MOVE;isc.A.openDropFolderDelay=600;isc.A.parentAlreadyContainsChildMessage="This item already contains a child item with that name.";isc.A.cantDragIntoSelfMessage="You can't drag an item into itself.";isc.A.cantDragIntoChildMessage="You can't drag an item into one of its children";isc.A.childCannotBeItsOwnAncestorMessage="This drag operation would mean an item is a descendant of an existing item with the same ID";isc.A.cantDragMultipleNodeOccurencesMessage="You can't drag two occurrences of the same node into a parent.";isc.A.fixedFieldWidths=true;isc.A.wrapCells=false;isc.A.showHiliteInCells=false;isc.A.indentSize=20;isc.A.extraIconGap=2;isc.A.iconSize=16;isc.A.iconBaseStyle="icon";isc.A.skinImgDir="images/TreeGrid/";isc.A.showLoadingIcons=true;isc.A.loadingIcon="[SKIN]folder_loading.gif";isc.A.folderIcon="[SKIN]/folder.gif";isc.A.connectorPadding=0;isc.A.iconPaddingProperty="iconPadding";isc.A.dropIconSuffix="drop";isc.A.openIconSuffix="open";isc.A.closedIconSuffix="closed";isc.A.selectedIconSuffix="selected";isc.A.nodeIcon="[SKIN]/file.gif";isc.A.showOpenIcons=true;isc.A.showSelectedIcons=false;isc.A.showDropIcons=true;isc.A.customIconProperty="icon";isc.A.customIconOpenProperty="showOpenIcon";isc.A.customIconDropProperty="showDropIcon";isc.A.customIconSelectedProperty="showSelectedIcon";isc.A.showCustomIconOpen=false;isc.A.showCustomIconDrop=false;isc.A.showCustomIconSelected=false;isc.A.leaveSelectionCheckboxGap=true;isc.A.manyItemsImage="[SKIN]folder_file.gif";isc.A.showConnectors=false;isc.A.showFullConnectors=true;isc.A.showOpener=true;isc.A.alwaysShowOpener=false;isc.A.openerImage="[SKIN]opener.gif";isc.A.connectorImage="[SKIN]connector.gif";isc.A.offlineNodeMessage="This data not available while offline";isc.A.indentRecordComponents=true;isc.A.createDefaultTreeField=true;isc.A.canGroupBy=false;isc.A.ignoreEmptyCriteria=false;isc.A.drawAllMaxCells=50;isc.A.drawAheadRatio=isc.Browser.useHighPerformanceGridTimings?2.0:1.0;isc.A.$34l="open_icon_";isc.A.$349="extra_icon_";isc.A.$34n="icon_";isc.A.$34o="nodeTitle";isc.B.push(isc.A.getConnectorPadding=function isc_TreeGrid_getConnectorPadding(_1){return this.connectorPadding},isc.A.groupBy=function isc_TreeGrid_groupBy(){this.logWarn("groupBy() isn't supported for TreeGrids, as the data is already a tree")});isc.B._maxIndex=isc.C+2;isc.A=isc.TreeGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.saveOpenStateInViewState=true;isc.A.bodyConstructor="TreeGridBody";isc.A.showDropEndSpace=true;isc.A.recordDropAppearance=isc.ListGrid.BOTH;isc.A.savedSearchAbstractType="tree";isc.B.push(isc.A.initWidget=function isc_TreeGrid_initWidget(){var _1=this.dataFetchMode||(this.dataProperties&&this.dataProperties.fetchMode);var _2=this.treeRootValue||(this.dataProperties&&this.dataProperties.rootValue);var _3=this.data||this.dataProperties||{};if(_1!="paged"&&this.keepParentsOnFilter&&_2&&!_3.multiLinkTree){delete this.treeRootValue;if(this.dataProperties)delete this.dataProperties.rootValue;this.logWarn("Invalid use of rootValue with keepParentsOnFilter but without fetchMode 'Paged' - rootValue has been cleared.")}
this.invokeSuper(isc.TreeGrid,this.$oc);if(!this.dataSource&&this.data!=null&&this.data.dataSource){this.dataSource=this.data.dataSource}
if(this.createDefaultTreeField&&(this.getDataSource()==null||!this.useAllDataSourceFields))
{if(!this.fields||this.fields.length==0){this.fields=[isc.addProperties({},isc.TreeGrid.TREE_FIELD)]}}},isc.A.setDataSource=function isc_TreeGrid_setDataSource(_1,_2){if(this.createDefaultTreeField){if(_2==null||_2.length==0){_2=[isc.addProperties({},isc.TreeGrid.TREE_FIELD)]}}
return this.Super("setDataSource",[_1,_2])},isc.A.cellValueHoverHTML=function isc_TreeGrid_cellValueHoverHTML(_1,_2,_3,_4){if(_3==this.$34t){var _5=this.Super("cellValueHoverHTML",arguments);if(_5!=null&&!isc.isAn.emptyString(_5))_5="<nobr>"+_5+"</nobr>";return _5}else if(this.showClippedValuesOnHover!==true)return null;else return _4},isc.A.$34s=function isc_TreeGrid__initTreeField(){delete this.$227q;if((!this.fields||this.fields.length==0)&&(this.getDataSource()==null||!this.useAllDataSourceFields))
{if(this.createDefaultTreeField)this.fields=[isc.addProperties({},isc.TreeGrid.TREE_FIELD)]}else{var _1=this.completeFields,_2=this.fields,_3;for(var i=0;i<_1.length;i++){if(_1[i].treeField){var _5=_2.indexOf(_1[i]);if(_5!=-1){_3=_5}
break}}
if(_3==null){if(!this.autoAssignTreeField)return;var _6=this.data.titleProperty,_7=_2.findIndex("name",_6);if(_7!=-1)_3=_7}
if(_3==null){_3=0;this.$227q=true;while(this.fields[_3]&&this.fields[_3].treeField==false)
{_3++}
if(this.fields[_3]==null)return}
this.$34t=_3;var _8=_2[_3],_9=isc.TreeGrid.TREE_FIELD,_10=_8.formatCellValue!=null||_8.displayField!=null;for(var _11 in _9){if(_10&&_11=="getCellValue"){continue}
if(_8[_11]==null){_8[_11]=_9[_11]}}
if(this.treeFieldMinWidth!=null&&_8.minWidth==null){_8.minWidth=this.treeFieldMinWidth}}},isc.A.deriveVisibleFields=function isc_TreeGrid_deriveVisibleFields(_1,_2,_3,_4){this.invokeSuper(isc.TreeGrid,"deriveVisibleFields",_1,_2,_3,_4);if(this.$227q){this.completeFields.map(function(_5){if(_5.treeField)delete _5.treeField})}
this.$34s()},isc.A.getEmptyMessage=function isc_TreeGrid_getEmptyMessage(){if(this.isOffline()){return this.offlineMessage}
if(isc.isA.Tree(this.data)&&this.data.getLoadState(this.data.getRoot())==isc.Tree.LOADING)
return this.loadingDataMessage==null?"&nbsp;":this.loadingDataMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)});return this.emptyMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})},isc.A.isEmpty=function isc_TreeGrid_isEmpty(){if(!isc.isA.Tree(this.data))return true;if(this.showNewRecordRow)return false;var _1=this.data.getRoot();if(_1==null)return true;var _2=this.data.hasChildren(_1);if(_2||this.showRoot||this.data.showRoot)return false;return true},isc.A.getOpenState=function isc_TreeGrid_getOpenState(){var _1=this.data;if(_1==null){this.logWarn("getOpenState() called for a treeGrid with no data");return[]}
if(_1.getOpenState)return _1.getOpenState();var _2=_1.getRoot(),_3=[];this.$45q(_1,_2,_3);return isc.Comm.serialize(_3)},isc.A.setOpenState=function isc_TreeGrid_setOpenState(_1){if(this.data&&this.data.setOpenState){this.data.setOpenState(_1);return}
_1=this.evalViewState(_1,"openState")
if(!_1)return;if(!this.data){this.logWarn("unable to set open state for this treeGrid as this.data is unset");return}
this.data.closeAll();this.data.openFolders(_1)},isc.A.getSelectedPaths=function isc_TreeGrid_getSelectedPaths(){if(!this.selectionManager)return null;if(isc.isA.MultiLinkSelection(this.selectionManager)){return this.getSelectedMultiLinkPaths()}
var _1=this.selectionManager.getSelection(),_2=_1.length,_3=[];for(var i=0;i<_2;++i){_3[i]=this.data.getPath(_1[i])}
return isc.Comm.serialize(_3)},isc.A.getSelectedMultiLinkPaths=function isc_TreeGrid_getSelectedMultiLinkPaths(){var _1=[];return _1},isc.A.showActionInPanel=function isc_TreeGrid_showActionInPanel(_1){return this.Super("showActionInPanel",arguments)},isc.A.setSelectedPaths=function isc_TreeGrid_setSelectedPaths(_1){_1=this.evalViewState(_1,"selectedPaths")
if(!_1)return;var _2=this.selectionManager,_3=this.data;if(_3&&_2){_2.deselectAll();var _4=[];for(var i=0;i<_1.length;i++){var _6=_3.find(_1[i]);if(_6)_4.add(_6)}
this.selectionManager.selectList(_4);this.fireSelectionUpdated()}},isc.A.getViewState=function isc_TreeGrid_getViewState(){var _1=this.Super("getViewState",[true]);if(this.saveOpenStateInViewState)_1.open=this.getOpenState();return"("+isc.Comm.serialize(_1)+")"},isc.A.setViewState=function isc_TreeGrid_setViewState(_1){this.Super("setViewState",arguments);_1=this.evalViewState(_1,"viewState",true)
if(!_1)return;if(_1.open)this.setOpenState(_1.open);if(_1.selected)this.setSelectedState(_1.selected)},isc.A.getDefaultData=function isc_TreeGrid_getDefaultData(){return isc.Tree.create({$31k:true})},isc.A.setData=function isc_TreeGrid_setData(_1){if(isc.isA.Tree(_1)){if(this.separateFolders!=null)_1.setSeparateFolders(this.separateFolders);if(this.sortFoldersBeforeLeaves!=null){_1.setSortFoldersBeforeLeaves(this.sortFoldersBeforeLeaves)}}
this.Super("setData",arguments);if(!isc.isA.Tree(this.data))return;if(this.separateFolders!=null)this.data.setSeparateFolders(this.separateFolders);if(this.sortFoldersBeforeLeaves!=null){this.data.setSortFoldersBeforeLeaves(this.sortFoldersBeforeLeaves)}
if(this.showRoot&&isc.ResultTree&&isc.isA.ResultTree(this.data)){this.logWarn("showRoot may not be set with a databound treeGrid, unexpected results may occur")}
this.data.setShowRoot(this.showRoot);this.data.setOpenDisplayNodeType(this.displayNodeType);if(this.autoOpenTree)this.data.autoOpen=this.autoOpenTree;if(this.autoPreserveOpenState!=null){this.data.autoPreserveOpenState=this.autoPreserveOpenState}},isc.A.$1927=function isc_TreeGrid__getNodesToOpenForRefresh(_1,_2){var _3=[],_4=this.data;if(_4.isPaged()){var _5=this.getVisibleRows(),_6=_5[1]-_5[0]+1,_7=Math.max(0,Math.floor((_4.resultSize-_6)/2));var _8=[];for(var i=_5[0];i<=_5[1];i++){var _10,_11=this.getRecord(i),_12;if(_4.isMultiLinkTree()){_12=_4.isOpen(_4.getNodeLocator(_4.getPathForOpenListIndex(i)))}else{_12=_4.isOpen(_11)}
var _13;if(_12){_10=_11,_11=null}else{if(_4.isMultiLinkTree()){_13=_4.getPathForOpenListIndex(i);_10=_4.getParent(_4.getNodeLocator(_13))}else{_10=_4.getParent(_11)}}
if(!_10||_10.$1928)continue;var _14=_4.$201f(_13);for(var _15=_11,_16=_10;_16;_15=_16,_16=_4.getParent(_16,_14))
{if(_16.$1928==null){var _17=_4.getChildren(_16);if(_17&&_15){var _18=_17.indexOf(_15);if(_18>_7)_16.$1929=_18-_7}
_16.$1928=true;_8.add(_16)}
_14=_4.$201f(_14)}
while(_8.length>0){_3.add(_8.last());_8.length--}}
_3.map(function(_20){delete _20.$1928});if(this.keepParentsOnFilter){_1.keepParentsOnFilter=true}
_1.sortBy=isc.shallowClone(this.$39x);var _19=this.getRecord(_5[0]);if(_19)_2.topNodePath=_4.getPath(_19)}else{if(!_4.showRoot)_3.add(_4.getRoot());_3.addList(_4.$27l().filter(function(_20,_18){if(!_4.isMultiLinkTree()){return _4.isOpen(_20)}else{return _4.isOpen(_4.getNodeLocator(_18))}}));_1.dataFetchMode=_4.fetchMode;_1.sortBy=this.getSort()}
return _3},isc.A.$1926=function isc_TreeGrid__refreshResultTreeData(_1,_2){var _3=this.getData();var _4={showPrompt:false,willHandleError:true,componentId:this.getID()};var _5=this.$193a={newData:null,callback:_1,skipDataChanged:_2,openState:_3.getOpenState(),selectedState:this.getSelectedState()};isc.RPCManager.startQueue();var _6=_3.context;if(_6&&_6.textMatchStyle)_4.textMatchStyle=_6.textMatchStyle;if(_6&&_6.operationId)_4.operationId=_6.operationId;if(this.implicitCriteria){_4.dbcImplicitCriteria=this.getImplicitCriteria()}
var _7=this.$1927(_4,_5)
for(var i=0;i<_7.length;i++){var _9=_7[i],_10=_3.$1218(_9,true),_11=_10.childDS,_12=_10.parentDS;var _13=_3.$1219(_9,_10,null,true);var _14={fetchCount:++_3.currentFetch,parentPath:_3.getPath(_9),relationship:_10};var _15=_3.$193b(_11,_12,_9,_14,_4);var _16=this.getImplicitCriteria(true);if(_16)_13=this.getDataSource().combineCriteria(_13,_16);if(_3.isPaged()){var _17=0;if(_9.$1929>0){_17=_9.$1929;delete _9.$1929}
_15.startRow=_17;_15.endRow=_17+_3.resultSize}
_11.fetchData(_13,function(_22,_3,_23){if(_22.status!=0&&!_5.$203y){_5.$203z=_23;_5.$203y=_22}
if(_5.$203y)return;if(!_5.newData){var _18=this.getData();var _19=_18.getCriteria();_5.newData=this.createResultTree(_19,null,_18.context,null,null,true)}
var _20=_5.newData,_21=_22.internalClientContext,_9=_20.find(_21.parentPath);if(_20.isMultiLinkTree()&&!_20.linkData&&_18){_20.linkData=_18.linkData}
if(_9){_21.parentNode=_9;var _11=_21.relationship.childDS;_9.$40a=_11.ID;_20.loadChildrenReply(_22,_3,_23)}}.bind(this),_15)}
isc.RPCManager.sendQueue({caller:this,methodName:"$193c"})},isc.A.$193c=function isc_TreeGrid__refreshResultTreeDataReply(_1){var _2=this.$193a;delete this.$193a;var _3=_2.callback,_4=_2.$203z,_5=_2.$203y;if(_4){if(_3)_3(_1);return this.$203x(_5,_4)}
var _6=_2.newData;_6.setOpenState(_2.openState);var _7=this.getTotalRows();var _8=this.preserveEditsOnSetData;this.preserveEditsOnSetData=true;this.setData(_6);this.preserveEditsOnSetData=_8;this.setSelectedState(_2.selectedState);var _9=_2.topNodePath,_10=_9?_6.find(_9):null;if(_10){var _11=this.getRecordIndex(_10);if(_11>=0)this.scrollToRow(_11,"top",true)}
if(_7!=this.getTotalRows()){this.logDebug("refreshData() has changed the total row count","refreshData");if(!_2.$2320)this.dataChanged()}
if(_3)_3(_1)},isc.A.$255e=function isc_TreeGrid__normalizeUISummaryGridData(_1,_2){var _3=[],_4=this.data,_5=_2.firstVisibleRow;var _6,_7,_8,_9;for(var i=0;i<_1.length;i++){var _11=_1[i],_12=_4.getParent(_11);if(_12!==_6){_7=_4.getChildren(_12);_9=this.getRecordIndex(_12);_8=0;for(var _13=_12;_13;_13=_4.getParent(_13))
{_8++}
_6=_12}
_3[i]={parentIndex:_9,depth:_8,position:_7.indexOf(_11)}}
var _14=_2.visibleRows=[];for(var i=0;i<_1.length;i++){var _11=_1[i]=_4.getCleanNodeData(_1[i],false);isc.addProperties(_11,{depth:_3[i].depth,position:_3[i].position});var _9=_3[i].parentIndex;if(_9>=_2.firstVisibleRow&&_9<=_2.lastVisibleRow)
{var _12=_1[_9-_2.firstVisibleRow];if(!_12.children)_12.children=[];_12.children.add(_11)}else{_14.add(_11)}}},isc.A.$1446=function isc_TreeGrid__getSortNormalizerForField(_1,_2,_3,_4){if(_1.$2395&&isc.ResultTree&&isc.isA.ResultTree(this.data)){if(this.data.isPaged())return isc.TreeGrid.$175n}
return this.invokeSuper(isc.TreeGrid,"$1446",_1,_2,_3,_4)},isc.A.draw=function isc_TreeGrid_draw(_1,_2,_3,_4){if(this.initialData&&(!isc.ResultSet||!isc.isA.ResultSet(this.data))&&(!this.data||!isc.isA.ResultTree(this.data))){var _5=isc.addProperties({$178g:true,$326:true},this.getInitialFetchContext());this.fetchData(this.getInitialCriteria(),null,_5);delete _5.$326}
this.invokeSuper(isc.TreeGrid,"draw",_1,_2,_3,_4)},isc.A.bodyKeyPress=function isc_TreeGrid_bodyKeyPress(_1){var _2=this.selectionManager;if(this.selectionType!=isc.Selection.NONE&&this.data.getLength()>0&&_2.anySelected()&&(!_2.multipleSelected||!_2.multipleSelected()))
{var _3=this.getFocusCell(),_4=_3[0],_5=_3[1],_6=this.getRecord(_4),_7,_8;if(this.data.isMultiLinkTree()){var _9=this.data.getPathForOpenListIndex(_4);_8=this.data.getParent(_6,_9);_7=this.data.createNodeLocator(_6,_8,null,_9)}else{_8=this.data.getParent(_6)}
if(_1.keyName=="Arrow_Left"){if(!this.canExpandRecords||!(this.$811(_6,this.getFocusRow())&&this.isExpanded(_6)))
{if((!this.canSelectCells||(this.getTreeFieldNum()==_5))&&(this.data.isFolder(_6)&&this.data.isOpen(_7||_6)))
{this.closeFolder(_7||_6,_9);return false}else if(!this.canSelectCells){if(_8){var _10=_4;while(_10>0&&this.getRecord(_10)!=_8){_10--}
if(this.getRecord(_10)==_8){this.$318(_10-this.getFocusRow(),false);return false}}}}}else if(_1.keyName=="Arrow_Right"){if(this.data.isFolder(_6)){if((!this.canSelectCells||(this.getTreeFieldNum()==_5))&&!this.data.isOpen(_6,_9))
{this.openFolder(_6,_9);return false}else if(!this.canSelectCells&&(!this.canExpandRecords||!(this.$811(_6,this.getFocusRow())&&!this.isExpanded(_6))))
{if(this.data.hasChildren(_6)){this.$318(1,false);return false}}}}}else{var _6=this.getRecord(this.getFocusRow());if(_1.keyName=="Arrow_Left"){if((!this.canSelectCells||(this.getTreeFieldNum()==_5))&&this.data.isFolder(_6)&&this.data.isOpen(_6,_9))
{this.closeFolder(_6,_9);return false}}else if(_1.keyName=="Arrow_Right"){if((!this.canSelectCells||(this.getTreeFieldNum()==_5))&&this.data.isFolder(_6)&&!this.data.isOpen(_6,_9))
{this.openFolder(_6,_9);return false}}}
return this.Super("bodyKeyPress",arguments)},isc.A.$298=function isc_TreeGrid__cellContextClick(_1,_2,_3){if(_2<0||_3<0)return true;var _4=this.data.isFolder(_1);if(this.nodeContextClick&&this.nodeContextClick(this,_1,_2)==false){return false}
if(_4){if(this.folderContextClick&&this.folderContextClick(this,_1,_2)==false){return false}}else{if(this.leafContextClick&&this.leafContextClick(this,_1,_2)==false){return false}}
return this.Super("$298",arguments)},isc.A.handleEditCellEvent=function isc_TreeGrid_handleEditCellEvent(_1,_2){var _3=this.getRecord(_1),_4;if(this.data.isMultiLinkTree()){_4=this.data.getNodeLocator(_1)}
if(this.clickInOpenArea(_4||_3)||this.clickInCheckboxArea(_4||_3)){return false}
return this.Super("handleEditCellEvent",arguments)},isc.A.canEditCell=function isc_TreeGrid_canEditCell(_1,_2){if(this.Super("canEditCell",arguments)==false)return false;if(this.getField(_2).name==this.data.nameProperty)return false;if(this.getField(_2).name==this.$34o)return false;return true},isc.A.getEditFormItemFieldWidths=function isc_TreeGrid_getEditFormItemFieldWidths(_1){var _2=this.data.getLevel(_1);if(!this.showRoot)_2--;var _3=this.showConnectors?this.getConnectorIconWidth(_1):this.getOpenerIconWidth(_1),_4=_2*(this.showConnectors?_3:this.indentSize);_4+=this.iconSize+_3;if(this.$739(_1)){_4+=(this.$65a()+this.extraIconGap)}else if(this.getExtraIcon(_1)){_4+=(this.iconSize+this.extraIconGap)}
var _5=this.Super("getEditFormItemFieldWidths",arguments),_6=this.getTreeFieldNum();_5[_6]-=_4;return _5},isc.A.getRecordDataSource=function isc_TreeGrid_getRecordDataSource(_1){return this.data.getNodeDataSource(_1)},isc.A.rowClick=function isc_TreeGrid_rowClick(_1,_2,_3){var _4=_1,_5;if(this.data.isMultiLinkTree()){_5=this.data.getNodeLocator(_2)}
if(this.clickInOpenArea(_5||_4)||this.clickInCheckboxArea(_5||_4)){return false}
this.$31q=_2;if(_2<0||_3<0)return false;var _4=this.getRecord(_2),_6=this.data.isFolder(_4);if(this.nodeClick)this.nodeClick(this,_4,_2);if(_6){if(this.folderClick)this.folderClick(this,_4,_2)}else{if(this.leafClick)this.leafClick(this,_4,_2)}
return this.Super("rowClick",arguments)},isc.A.recordDoubleClick=function isc_TreeGrid_recordDoubleClick(_1,_2,_3,_4,_5,_6,_7){var _8;if(this.data.isMultiLinkTree()){_8=this.data.getNodeLocator(_3)}
if(this.clickInOpenArea(_8||_2)||this.clickInCheckboxArea(_8||_2)){return false}
if(this.canEdit!=false&&this.editEvent==isc.EH.DOUBLE_CLICK&&this.canEditCell(_3,_5))
{return true}
if(this.data.isFolder(_2)){return this.toggleFolder(_8||_2,this.data.getPathForOpenListIndex(_3))}else
return this.openLeaf(_2)},isc.A.$253v=function isc_TreeGrid__dataChanged(){this.Super("$253v",isc.$ac,arguments);var _1=this.$34z;if(_1&&(!this.data.isMultiLinkTree()||this.data.$201p(_1))&&this.data.isOpen(_1)&&this.data.getLoadState(_1)==isc.Tree.LOADED)
{this.$340(_1);this.$34z=null}
this.$178p()},isc.A.openLeaf=function isc_TreeGrid_openLeaf(_1){},isc.A.getDragTrackerIcon=function isc_TreeGrid_getDragTrackerIcon(_1){var _2;if(_1&&_1.length>1&&this.manyItemsImage!=null)
_2=this.manyItemsImage;else if(_1&&_1[0])_2=this.getIcon(_1[0],null,true);return _2},isc.A.getDragTrackerTitle=function isc_TreeGrid_getDragTrackerTitle(_1,_2,_3,_4,_5,_6){var _7=this.getFieldNum(this.getTitleField());if(_7!=this.getTreeFieldNum())
return this.invokeSuper(isc.TreeGrid,"getDragTrackerTitle",_1,_2,_3,_4,_5,_6);var _8=this.getCellStyle(_1,_2,_7),_9=this.getCellCSSText(_1,_2,_7);if(this.selectionManager.isSelected(_1,_2)){var _10=this.body.getCellStyleIndex(_1,_2,_7),_11=this.body.getCellStyleName(_10,_1,_2,_7);if(_11==_8){_10-=2;_8=this.body.getCellStyleName(_10,_1,_2,_7)}}
var _12=this.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_7);var _13=this.$342(_12,_1,_2,_7,false,_8,_9).join(isc.emptyString);return["<table class='",_8,"' style='",_9,"'><tr>",_13,"</tr></table>"].join(isc.emptyString)},isc.A.getDraggedNodeLocators=function isc_TreeGrid_getDraggedNodeLocators(){var _1;if(isc.MultiLinkSelection&&isc.isA.MultiLinkSelection(this.selectionManager)){_1=this.selectionManager.getSelection()}else{_1=[]}
return _1},isc.A.willAcceptDrop=function isc_TreeGrid_willAcceptDrop(){var _1=this.Super("willAcceptDrop",arguments);if(!_1)return _1;var _2=this.getEventRecordNum(null,true),_3=this.data.get(_2);var _4=this.data.isFolder(_3);if(!_4&&!(this.canReorderRecords||this.canDropOnLeaves)){return false}
var _5=this.getDropFolder(_2),_6;if(this.data.isANodeLocator(_5)){_6=_5;_5=_5.node}
if(!_5||!this.isValidDropFolder(_5)){return false}
var _7=isc.EH.dragTarget.getDragData();var _8=_7;if(this.data.isMultiLinkTree()){_8=[];for(var i=0;i<_7.length;i++){this.$102q(isc.Tree.isANodeLocator(_7[i]));_8[i]=_7[i].node}}
if(!isc.isAn.Object(_7)||this.getDropError(_8,(_6||_5))!=null)
{return false}
if(isc.EH.dragTarget!=this)return true;var _10=this.canReparentNodes;if(_10==null&&this.canAcceptDroppedRecords)_10=true;if(!_10){if(!isc.isAn.Array(_7))_7=[_7];var _11;_11=this.data.getParent(_7[0]);if(_11!=_5)return false;for(var i=1;i<_7.length;i++){if(_11!=this.data.getParent(_7[i])){return false}}}
return true},isc.A.$31i=function isc_TreeGrid__setUpDragProperties(){this.canDrag=(this.canDrag||this.canDragRecordsOut||this.$34c()||this.canDragSelect);this.canDrop=(this.canDrop||this.canDragRecordsOut||this.$34c());this.canAcceptDrop=(this.canAcceptDrop||this.canAcceptDroppedRecords||this.$34c())},isc.A.$34c=function isc_TreeGrid__canDragRecordsToSelf(){var _1=this.canReparentNodes;if(_1==null&&this.canAcceptDroppedRecords){if(!this.$343){this.logInfo("'canReparentNodes' is unset. Allowing node reparenting as 'canAcceptDroppedRecords' is set to true. For explicit control, use 'canReparentNodes' instead.","dragDrop");this.$343=true}
_1=this.canAcceptDroppedRecords}
return this.canReorderRecords||_1},isc.A.getDropError=function isc_TreeGrid_getDropError(_1,_2){var _3;if(this.data.isANodeLocator(_2)){_3=_2;_2=_2.node}
for(var i=0,_5=_1.length;i<_5;i++){if(this.data.isDescendantOf(_2,_1[i])){return this.cantDragIntoChildMessage}}
var _6=this.data.isFolder(_2);if(_6){for(i=0;i<_5;i++){if(_1[i]==_2){return this.cantDragIntoSelfMessage}}}
return null},isc.A.getDropEndSpace=function isc_TreeGrid_getDropEndSpace(){if(this.dropEndSpace!=null)return this.dropEndSpace;return Math.ceil(this.cellHeight/2)},isc.A.dropOver=function isc_TreeGrid_dropOver(){this.applyDropEndSpace();return this.Super("dropOver",arguments)},isc.A.applyDropEndSpace=function isc_TreeGrid_applyDropEndSpace(){if(!this.showDropEndSpace||(this.canDropInEmptyArea==false)||!this.canAcceptDroppedRecords)
{return}
if(this.$229l||!this.body)return;this.$229l=true;this.$229m=this.body.endSpace;this.body.setEndSpace((this.$229m||0)+this.getDropEndSpace())
if(this.frozenBody){this.$229n=this.frozenBody.endSpace;this.frozenBody.setEndSpace((this.$229n||0)+this.getDropEndSpace())}
var _1=this;isc.Page.setEvent("dragStop",function(){_1.resetDropEndSpace()},isc.Page.FIRE_ONCE)},isc.A.resetDropEndSpace=function isc_TreeGrid_resetDropEndSpace(){if(!this.$229l)return;delete this.$229l;this.body.setEndSpace(this.$229m);delete this.$229m;if(this.frozenBody){this.frozenBody.setEndSpace(this.$229n);delete this.$229n}},isc.A.dropMove=function isc_TreeGrid_dropMove(){var _1=this.getEventRow();if(_1==-1)return false;if(this.canDragRecordsOut==false&&isc.EH.dropTarget!=this&&!this.contains(isc.EH.dropTarget))return false;if(!this.canAcceptDroppedRecords&&isc.EH.dragTarget!=this){return false}
var _2=(_1==-2?this.data.getRoot():this.data.get(_1)),_3=this.getDropFolder(),_4=(this.canReorderRecords?this.getRecordDropPosition(_1):null);var _5;if(this.data.isANodeLocator(_3)){_5=_3;_3=_3.node}
var _6;if(this.data.isMultiLinkTree()){_6=!this.dropFolderLocator||!this.lastDropFolderLocator||_5.path!=this.lastDropFolderLocator.path||_1!=this.$202q||_4!=this.$345}else{_6=_3!=this.lastDropFolder||_2!=this.$344||_4!=this.$345}
if(_6){if(!this.$346){this.$346=this.getID()+".openDropFolder()"}
if(this.openDropFolderTimer)isc.Timer.clear(this.openDropFolderTimer);if(!this.data.isOpen(_5||_3)){this.openDropFolderTimer=isc.Timer.setTimeout(this.$346,this.openDropFolderDelay)}
this.updateDropFolder(_5||_3)}
if(!this.willAcceptDrop()){this.body.setNoDropIndicator()}else{this.body.clearNoDropIndicator()}
if(this.shouldShowDragLineForRecord(_3)){if(this.data.isOpen(_5||_3)){this.showDragLineForRecord(_1,_4,_5)}else{this.hideDragLine()}}
this.$344=_2;this.$202q=_1;this.$345=_4},isc.A.getEventRecordNum=function isc_TreeGrid_getEventRecordNum(_1,_2){var _3=this.Super("getEventRecordNum",arguments);if(_3<0&&_2&&!this.canDropRootNodes){var _4=this.data,_5=_4.getChildren();if(_5!=null){if(_3==-2){if(!this.canDropSiblingAfterLastNode||!this.dropEventAdjacentToLastNode()){for(var i=_5.length-1;i>=0;i--){if(_4.isFolder(_5[i]))return this.getRecordIndex(_5[i])}}}else{for(var i=0;i<_5.length;i++){if(_4.isFolder(_5[i]))return this.getRecordIndex(_5[i])}}}}
return _3},isc.A.openDropFolder=function isc_TreeGrid_openDropFolder(){var _1=this.lastDropFolder,_2;if(this.data.isMultiLinkTree()){_2=this.lastDropFolderLocator}
if(!_1||!this.data.isFolder(_1)||this.data.isOpen(_2||_1))
{return false}
this.openFolder(_2||_1);if(this.shouldShowDragLineForRecord(_1)){this.showDragLineForRecord(this.data.indexOf(_1),isc.ListGrid.OVER,_2)}},isc.A.getRecordDropPosition=function isc_TreeGrid_getRecordDropPosition(_1,_2,_3){if(this.recordDropAppearance==isc.ListGrid.OVER)return isc.ListGrid.OVER;if(this.recordDropAppearance==isc.ListGrid.BODY)return null;if(_2==null)_2=this.body.getOffsetY();if(_1==null)_1=this.getEventRow(_2);var _4=this.data;if(!isc.isA.Number(_1))_1=_4.indexOf(_1);var _5=_1<0?null:_4.get(_1);if(_5&&_4.isFolder(_5)){return this.$132o(_1,_2,_3)}
if(_3==null&&!this.canDropOnLeaves){_3=isc.ListGrid.BETWEEN}
return this.invokeSuper(isc.TreeGrid,"getRecordDropPosition",_1,_2,_3)},isc.A.showDragLineForRecord=function isc_TreeGrid_showDragLineForRecord(_1,_2,_3,_4,_5,_6){if(_1==null)_1=this.getEventRecordNum();if(_2==null)_2=this.getRecordDropPosition(_1);if(_2==isc.ListGrid.OVER){var _7=this.getRecord(_1),_8=this.data;if(_8.isFolder(_7)&&_8.isOpen(_3||_7)){_2=isc.ListGrid.AFTER}}
return this.invokeSuper(isc.TreeGrid,"showDragLineForRecord",_1,_2,_4,_5,_6)},isc.A.dropOut=function isc_TreeGrid_dropOut(){this.hideDragLine();this.body.clearNoDropIndicator();this.$344=null;delete this.$202q;this.updateDropFolder();if(this.openDropFolderTimer)isc.Timer.clear(this.openDropFolderTimer)},isc.A.updateDropFolder=function isc_TreeGrid_updateDropFolder(_1){if(!isc.isA.Tree(this.data))return;var _2,_3;if(this.data.isANodeLocator(_1)){_3=this.lastDropFolderLocator
_2=this.lastDropFolderLocator=_1;_1=_1.node}else if(this.data.isMultiLinkTree()){_3=this.lastDropFolderLocator
_2=this.lastDropFolderLocator=null}
var _4=this.lastDropFolder;this.lastDropFolder=_1;this.logDebug("In updateDropFolder.  NodeLocator: "+(_2?_2.path:"(n/a)")+".  Last locator: "+(_3?_3.path:"(n/a)")+".  Node ID: "+(_1?_1.oid:"(n/a)"));if(_1){var _5;if(_2){if(_2.node==this.data.root){_5=-2}else{var _6=this.data.$201p(_2);isc.TreeGrid.$102q(!!_6&&_6.openListIndex!=null);_5=_6.openListIndex}
_1.$347=this.body.willAcceptDrop(_1);this.logDebug("In updateDropFolder, setting icon on row "+_5);this.setRowIcon(_5,this.getIcon(_1,_5))}else{_1.$347=this.body.willAcceptDrop(_1);this.logDebug("In updateDropFolder, setting icon by object!!");this.setRowIcon(_1,this.getIcon(_1,_5))}}
var _7;if(this.data.isMultiLinkTree()){_7=_3&&_3.path!=(_2?_2.path:null)}else{_7=_4&&_4!=_1}
if(_7){if(_4)delete _4.$347;var _8;if(_3){if(_3.node==this.data.root){_8=-2}else{var _6=this.data.$201p(_3);isc.TreeGrid.$102q(!!_6&&_6.openListIndex!=null);_8=_6.openListIndex}
this.logDebug("In updateDropFolder, clearing icon for row "+_8);this.setRowIcon(_8,this.getIcon(_4,_8))}else{this.logDebug("In updateDropFolder, clearing icon by object!!");this.setRowIcon(_4,this.getIcon(_4,_8))}}},isc.A.transferSelectedData=function isc_TreeGrid_transferSelectedData(_1,_2,_3,_4){if(!this.isValidTransferSource(_1)){if(_4)this.fireCallback(_4);return}
if(_3==null)_3=0;if(_2==null)_2=this.data.getRoot();var _5=_1.cloneDragData();this.transferNodes(_5,_2,_3,_1,_4)},isc.A.drop=function isc_TreeGrid_drop(){return this.dropTreeNode()},isc.A.$67w=function isc_TreeGrid__updateComplete(_1,_2,_3){if(!_3.dragTree)return;if(_3.newParentNode!=this.data.root&&_3.dragTree.getParent(_3.newParentNode)==null)
{isc.logWarn("Target folder is no longer in the Tree in TreeGrid cache sync");return}
var _4=_3.dropNeighbor,_5=_3.dragTree,_6=_5.getChildren(_3.newParentNode),_7=_3.draggedNodeList,_8=_5.idField,_9=_7.findIndex(_8,_3.draggedNode[_8]),_10,_11;if(_4==null){_10=0}else{for(var i=0,_13=_6.getLength();i<_13;++i){var _14=_6.getCachedRow(i);if(_14==_4){_10=i+1;break}}}
if(_10!==_11){var _13=_6.getLength();while(_10<_13){var _14=_6.getCachedRow(_10);if(_14!=null){var _15=_7.findIndex(_8,_14[_8]);if(_15==-1||_15>_9)break}
_10++}}
if(_10===_11){isc.logWarn("Could not order dropped node by reference to neighbor; trying absolute index");_10=_3.dropIndex}
if(_10===_11){isc.logWarn("Unable to determine drop location in TreeGrid cache sync");return}
var _16=this.data.find(_8,_3.draggedNode[_8]);_5.move(_16,_3.newParentNode,_10);this.Super("$67w",arguments)},isc.A.getTreeFieldInnerWidth=function isc_TreeGrid_getTreeFieldInnerWidth(_1){if(this.$183n!=null)return this.$183n;var _2=this.getFieldBody(_1),_3=this.getLocalFieldNum(_1),_4=_2.getInnerColumnWidth(_3);this.$183n=_4;return _4},isc.A.setBodyFieldWidths=function isc_TreeGrid_setBodyFieldWidths(_1,_2,_3,_4){delete this.$183n;return this.invokeSuper(isc.TreeGrid,"setBodyFieldWidths",_1,_2,_3,_4)},isc.A.getCellAlign=function isc_TreeGrid_getCellAlign(_1,_2,_3){var _4=this.getField(_3);if(_4&&_4.treeField){return this.isRTL()?"right":"left"}
return this.Super("getCellAlign",arguments)},isc.A.getCellValue=function isc_TreeGrid_getCellValue(_1,_2,_3,_4,_5,_6,_7){if(this.data.isMultiLinkTree()){var _8=this.data.getLinkRecord(this.data.getNodeLocator(_2));isc.addDefaults(_1,_8)}
var _9=this.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_3,_4,_5,_6,_7);if(_3==this.getTreeFieldNum()){_9=this.getTreeCellValue(_9,_1,_2,_3,_4)}
return _9},isc.A.bodyDrawing=function isc_TreeGrid_bodyDrawing(_1,_2,_3,_4,_5){this.$35a={};return this.invokeSuper(isc.TreeGrid,"bodyDrawing",_1,_2,_3,_4,_5)},isc.A.getNodeTitle=function isc_TreeGrid_getNodeTitle(_1,_2,_3){var _4;if(_3.name&&_3.name!=this.$34o){if(_2==-1)return _1[_3.name];_4=this.getEditedCell(_2,_3)}else{_4=this.data.getTitle(_1)}
return this.applyCellTypeFormatters(_4,_1,_3,_2,this.getFieldNum(_3))});isc.evalBoundary;isc.B.push(isc.A.$237y=function isc_TreeGrid__shouldApplyTypeFormatters(_1){if(!_1||this.Super("$237y"))return false;return _1&&!_1.treeField},isc.A.getTitleField=function isc_TreeGrid_getTitleField(){if(this.titleField!=null)return this.titleField;return this.getFieldName(this.getTreeFieldNum())},isc.A.getOpenAreaWidth=function isc_TreeGrid_getOpenAreaWidth(_1){var _2=(this.showOpener?(this.showConnectors?this.getConnectorIconWidth(_1):this.getOpenerIconWidth(_1)):0),_3=(this.showConnectors?_2:this.indentSize);return((this.data.getLevel(_1)-(this.showRoot?0:1))*_3)+_2},isc.A.getOpenerIconSize=function isc_TreeGrid_getOpenerIconSize(_1){return(this.openerIconSize||(this.showConnectors?this.getInnerCellHeight():this.iconSize))},isc.A.getOpenerIconWidth=function isc_TreeGrid_getOpenerIconWidth(_1){return this.openerIconWidth||this.getOpenerIconSize(_1)},isc.A.getOpenerIconHeight=function isc_TreeGrid_getOpenerIconHeight(_1){return this.openerIconHeight||this.getOpenerIconSize(_1)},isc.A.getConnectorIconWidth=function isc_TreeGrid_getConnectorIconWidth(_1){return this.connectorIconWidth||this.getOpenerIconWidth(_1)},isc.A.clickInOpenArea=function isc_TreeGrid_clickInOpenArea(_1){var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
if(!this.data.isFolder(_1)||!this.showOpener)return false;var _3=this.getTreeFieldNum(),_4=this.getFieldBody(_3),_5=this.getLocalFieldNum(_3),_6=_4.getColumnLeft(_5),_7=_4.getColumnWidth(_5),_8=this.getOpenAreaWidth(_2||_1),x=_4.getOffsetX();if(this.isRTL()){_6+=_4.getScrollWidth()-_4.getViewportWidth();_6-=this.cellPadding;var _10=_6+_7;return x>=(_10-_8)&&x<=_10}else{_6+=this.cellPadding;return x>=_6&&x<_6+_8}},isc.A.isOverOpenArea=function isc_TreeGrid_isOverOpenArea(){var _1=this.getRecord(this.getEventRow());if(_1==null)return false;var _2;if(this.data.isMultiLinkTree()){_2=this.data.getNodeLocator(this.getEventRow())}
return this.clickInOpenArea(_2||_1)},isc.A.clickInCheckboxArea=function isc_TreeGrid_clickInCheckboxArea(_1){if(this.selectionAppearance!=this.$12c)return false;return this.isOverExtraIcon(_1)},isc.A.isOverExtraIcon=function isc_TreeGrid_isOverExtraIcon(_1){if(_1==null)_1=this.getRecord(this.getEventRow());if(_1==null)return false;var _2;if(this.data.isANodeLocator(_1)){_2=_1;_1=_1.node}
var _3=this.$739(_1),_4=_3||this.getExtraIcon(_1);if(_4==null)return false;var _5=(_3!=null?this.$65a():this.iconSize);var _6=this.getTreeFieldNum(),_7=this.getFieldBody(_6),_8=this.getLocalFieldNum(_6),_9=_7.getColumnLeft(_8),_10=_7.getColumnWidth(_8),_11=this.getOpenAreaWidth(_2||_1),x=_7.getOffsetX();if(this.isRTL()){var _13=_9+_10;_9-=this.cellPadding;return(x>=(_13-_11-_5)&&x<=(_13-_11))}else{_9+=this.cellPadding;return(x>=(_9+_11)&&x<(_9+_11+_5))}},isc.A.getOpenIcon=function isc_TreeGrid_getOpenIcon(_1){if(this.showOpener==false&&!this.showConnectors)return null;if(!this.data)return null;var _2,_3,_4;if(isc.isA.Number(_1)){_2=_1;_1=this.data.get(_2);_4=this.data.isMultiLinkTree()?this.data.getNodeLocator(_2):null}
if(_1==null)return null;if(_1.openIcon){return _1.openIcon}else{var _5=this.showOpener&&this.data.isFolder(_1),_6=_5,_7=_5,_8,_9;if(_5){var _10=this.data.getLoadState(_1);if(_10==isc.Tree.UNLOADED||(_10==isc.Tree.FOLDERS_LOADED&&this.displayNodeType!=isc.Tree.FOLDERS_ONLY))
{_6=true;_7=false}else{_6=this.data.hasChildren(_1,this.displayNodeType);_7=(_6||this.alwaysShowOpener)&&this.data.isOpen(_4||_1)}}
if(_7&&!this.showFullConnectors)_9=true
else{_9=!this.$35d(_1,_2)}
_8=!this.$35e(_1,_2);var _11=this.showSelectedOpener&&this.isSelected(_1,_2);return this.getOpenerImageURL(_5,_6,_7,_11,_8,_9)}},isc.A.$35e=function isc_TreeGrid__shouldShowPreviousLine(_1,_2){if(!this.data.isEmpty()&&this.data.first()==_1){return false}
if(this.showFullConnectors)return true;_2=_2==null?this.data.indexOf(_1):_2;var _3=this.getRecord(_2-1),_4=this.data.getParent(_1,this.data.getPathForOpenListIndex(_2));if(_3==null)return false;return(_4==_3||_4==this.data.getParent(_3,this.data.getPathForOpenListIndex(_2)))},isc.A.$35d=function isc_TreeGrid__shouldShowNextLine(_1,_2){if(this.showFullConnectors){var _3=this.data,_4=_3.getParent(_1),_5=_3.getChildren(_4);return(_5.indexOf(_1)!=(_5.getLength()-1))}
_2=_2==null?this.data.indexOf(_1):_2;var _6=this.getRecord(_2+1);if(_6==null)return false;return(this.data.getParent(_1,this.data.getPathForOpenListIndex(_2))==this.data.getParent(_6,this.data.getPathForOpenListIndex(_2)))},isc.A.getOpenerImageURL=function isc_TreeGrid_getOpenerImageURL(_1,_2,_3,_4,_5,_6){if(this.showConnectors){var _7=(_2||(_1&&this.alwaysShowOpener)),_8;var _9=isc.TreeGrid.getConnectorImageMap(this.connectorImage,this.isRTL());if(!isc.isAn.Array(_9)){var _10=_1?(_3?"opened":"closed"):"";if(_7&&_3&&!this.showFullConnectors){if(_10.length>0)_10+="_";_10+=_5?"single":"end"}else{if(_10.length>0)_10+="_";if(_5&&_6)_10+="single";else _10+=(_5?"start":_6?"end":"middle")}
if(_4)_10+="_selected";return _9[_10]}
var _11=0,_12=3,_13=6,_14=9,_15=1,_16=2,_17=12;if(_7&&_3&&!this.showFullConnectors){_8=_5?_11:_13}else{_8=_5&&_6?_11:_5?_12:_6?_13:_14}
if(_7){_8+=_3?_15:_16}
if(_4){_8+=12}
return _9[_8]}else{if(!_1||(!_2&&!this.alwaysShowOpener))return null;var _9=isc.TreeGrid.getOpenerImageMap(this.openerImage);if(!isc.isAn.Array(_9)){var _10=(_3?"opened":"closed")+(_4?"_selected":"");return _9[_10]}
var _18=!_3?this.isRTL():false;var _8=(_3?1:2);if(_4)_8+=4;if(_18)_8+=8;return _9[_8]}},isc.A.setRowIcon=function isc_TreeGrid_setRowIcon(_1,_2){if(!isc.isA.Number(_1)){_1=this.getRecordIndex(_1)}
if(_1!=-1&&this.getIcon(_1)!=null){this.logDebug("In setRowIcon, about to set icon "+_2+" for row "+_1);var _3=this.getFolderIconID(_1);if(this.$195i(_3)){this.setImage(_3,_2,null,isc.Canvas.$123e)}else this.markForRedraw()}},isc.A.setNodeIcon=function isc_TreeGrid_setNodeIcon(_1,_2){_1[this.customIconProperty]=_2;this.setImage(this.$34n+this.getRecordIndex(_1),_2,null,isc.Canvas.$123e)},isc.A.getCellsToRefreshOnSelectionChange=function isc_TreeGrid_getCellsToRefreshOnSelectionChange(_1){var _2=this.getTreeFieldNum();if(_2!=null){if(this.selectionAppearance=="checkbox")return[[_1,_2]];if(this.showSelectedOpener)return[[_1,_2]];var _3=this.data&&this.data.get(_1);if(_3&&_3[this.customIconProperty]!=null){var _4=_3[this.customIconSelectedProperty];if(_4==null)_4=this.showCustomIconSelected;if(_4)return[[_1,_2]]}else{if(this.showSelectedIcons)return[[_1,_2]]}}},isc.A.getPrintHTML=function isc_TreeGrid_getPrintHTML(_1,_2){var _3=this.printExpandTree;if(_3==null)_3=_1?_1.expandTrees:null;if(_3&&this.data){if(isc.ResultTree&&isc.isA.ResultTree(this.data)&&this.data.loadDataOnDemand){this.logWarn("Printing TreeGrid with option to expand folders on print not supported for load on demand trees.")}else{this.data.openAll()}}
return this.Super("getPrintHTML",arguments)},isc.A.getExportFieldValue=function isc_TreeGrid_getExportFieldValue(_1,_2,_3){var _4=this.Super("getExportFieldValue",arguments);if(_3==this.getTreeFieldNum()&&this.exportIndentString){var _5=this.data.getLevel(_1);while(--_5>0)_4=this.exportIndentString+_4}
return _4});isc.B._maxIndex=isc.C+80;isc.TreeGrid.registerStringMethods({folderOpened:"node",folderClosed:"node",folderClick:"viewer,folder,recordNum",leafClick:"viewer,leaf,recordNum",nodeClick:"viewer,node,recordNum",folderContextClick:"viewer,folder,recordNum",leafContextClick:"viewer,leaf,recordNum",nodeContextClick:"viewer,node,recordNum",dataArrived:"parentNode",onFolderDrop:"nodes,folder,index,dropPosition,sourceWidget"});isc.defineInterface("Observer").addInterfaceProperties({registerObserved:isc.ClassFactory.TARGET_IMPLEMENTS,unregisterObserved:isc.ClassFactory.TARGET_IMPLEMENTS});isc.defineInterface("AutoObserver","Observer").addInterfaceProperties({observedName:"observed",observations:{},registerObserved:function(_1){this[this.observedName]=_1;for(var _2 in this.observations){this.observe(_1,_2,this.observations[_2])}
if(isc.isA.Canvas(_1)){this.observe(_1,"destroy","observer.unregisterObserved(observed)")}},unregisterObserved:function(_1){this[this.observedName]=null;for(var _2 in this.observations){this.ignore(_1,_2)}},initInterface:function(){if(this[this.observedName])this.registerObserved(this[this.observedName])},destroyInterface:function(){if(this[this.observedName])this.unregisterObserved(this[this.observedName])}});isc.defineInterface("GridAutoObserver","AutoObserver").addInterfaceProperties({observedName:"grid"});isc.defineClass("GridTotalRowsIndicator","Label","GridAutoObserver");isc.A=isc.GridTotalRowsIndicator.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.height=1;isc.A.wrap=false;isc.A.overflow="visible";isc.A.valign="center";isc.A.observations={"dataArrived":"observer.gridDataChanged()","setData":"observer.gridDataChanged()"};isc.A.dynamicContents=true;isc.A.contents="Total Rows: ${this.rowCount}";isc.A.rowCount="N/A";isc.B.push(isc.A.gridDataChanged=function isc_GridTotalRowsIndicator_gridDataChanged(){var _1=this.grid.getOriginalData();if(!_1)this.rowCount="N/A";if(isc.isA.ResultSet(_1)){if(_1.lengthIsKnown()){if(_1.getLength()!=0&&_1.progressiveLoading){var _2=_1.getLength()-1;if(_1.rowIsLoaded(_2))this.rowCount=_1.getLength();else this.rowCount=_1.getLength()+"+ (progressive loading)"}else{this.rowCount=_1.getLength()}}
else this.rowCount="N/A"}else if(isc.isAn.Array(_1)){this.rowCount=_1.getLength()}
this.markForRedraw()});isc.B._maxIndex=isc.C+1;isc.defineClass("GridToolStrip","ToolStrip");isc.A=isc.GridToolStrip.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.membersMargin=5;isc.A.addButtonDefaults={_constructor:"Img",size:16,layoutAlign:"center",src:"[SKIN]/actions/add.png",click:"this.grid.startEditingNew()"};isc.A.removeButtonDefaults={_constructor:"Img",size:16,layoutAlign:"center",src:"[SKIN]/actions/remove.png",click:"this.grid.removeSelectedData()"};isc.A.refreshButtonDefaults={_constructor:"Img",size:16,layoutAlign:"center",src:"[SKIN]/actions/refresh.png",click:"this.grid.invalidateCache()"};isc.A.exportButtonDefaults={_constructor:"IButton",title:"Export to CSV",layoutAlign:"center",click:"this.grid.exportData()"};isc.A.totalRowsIndicatorDefaults={_constructor:"GridTotalRowsIndicator",layoutAlign:"center"};isc.A.members=["autoChild:removeButton","autoChild:addButton","autoChild:exportButton","starSpacer","autoChild:refreshButton","autoChild:totalRowsIndicator"];isc.B.push(isc.A.getDynamicDefaults=function isc_GridToolStrip_getDynamicDefaults(){return{grid:this.grid}});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("FieldPickerField");isc.A=isc.FieldPickerField;isc.A.frozenTitle="Is Frozen";isc.A.precisionTitle="Precision";isc.A.decimalPrecisionTitle="Decimal Precision";isc.A.decimalPadTitle="Decimal Pad";isc.A.alignTitle="Header Text Alignment";isc.A.cellAlignTitle="Data Alignment";isc.ClassFactory.defineInterface("FieldPickerGrid").addInterfaceProperties({clearCriteriaIfPresent:function(){if(!isc.isA.emptyObject(this.getCriteria())){if(this.willFetchData(null,"substring")){this.logWarn("ListGrid.willFetchData() has returned true unexpectedly while trying to clear the filter criteria prior to save.")}
this.filterData()}},getExpansionComponent:function(_1){var _2=this.parentElement,_3=_2.shuttle.changedRecords,_4=_3[_1.name];if(_4){_1=isc.shallowClone(_1);isc.addProperties(_1,_4)}
return _2.createExpansionDynamicForm(this.editableProperties,_1)},saveAndCollapseRecord:function(_1,_2,_3){var _4=this.parentElement,_5=_1.getChangedValues(),_6=_4.shuttle.changedRecords;if(_6[_3.name])isc.addProperties(_6[_3.name],_5);else _6[_3.name]=_5;this.$84t(_3,_2)},setCanExpandRecords:function(_1){var _2=_1&&!this.canExpand;this.Super("setCanExpandRecords",arguments);if(_2)this.setRecordExpansion(0,this.getTotalRows())},setRecordExpansion:function(_1,_2){var _3=0,_4=0,_5=0;var _6=this.parentElement.shuttle,_7=_6.picker.expansionDataSource,_8=_7.getFieldNames(),_9=_7.getFields();for(var i=0;i<_8.length;i++){var _11=_8[i];if(this.editableProperties.contains(_11)){switch(_11){default:_5++;case"precision":_4++;case"decimalPad":case"decimalPrecision":_3++;break}}}
var _12=false,_13=this.canExpandRecordProperty;for(var i=_1;i<_2;i++){var _14=true,_15=this.getFieldRecord(i);if(!_15.userSummary&&!_15.userFormula){if(isc.SimpleType.inheritsFrom(_15.type,"float")){_14=_3>0}else if(isc.SimpleType.inheritsFrom(_15.type,"integer")){_14=_4>0}else{_14=_5>0}}
if(_15[_13]==null||_15[_13]==true){if(!_14){_15[_13]=false;_12=true}}else{if(_14){delete _15[_13];_12=true}}}
if(_12)this.markForRedraw()},collapseRecordList:function(_1,_2){for(var i=0;i<_1.length;i++){var _4=_1[i];if(this.isExpanded(_4))this.collapseRecord(_4);if(_2)_4.$9g=_4.title}},collapseAllRecords:isc.ClassFactory.TARGET_IMPLEMENTS,filterData:function(){this.collapseAllRecords();if(this.useReorderBounds())this.clearReorderBounds();return this.Super("filterData",arguments)},expandRecord:function(_1){this.Super("expandRecord",arguments);var _2=this.getCurrentExpansionComponent(_1);if(_2!=null)_2.validate()},validateFieldRecord:function(_1){if(this.isExpanded(_1))return this.getCurrentExpansionComponent(_1).validate();var _2=this.parentElement.shuttle,_3=_2.changedRecords[_1.name];if(!_3)return true;return _2.picker.validateDataSourceField(_3)},validateRecordList:function(_1){if(!this.canExpandRecords)return true;var _2=this.canExpandRecordProperty;for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4[_2]!=false&&!this.validateFieldRecord(_4)){if(!this.isExpanded(_4)){this.expandRecord(_4);this.getCurrentExpansionComponent(_4).validate()}
this.scrollToRow(this.getRecordIndex(_4));return false}}
return true},validateAllRecords:isc.ClassFactory.TARGET_IMPLEMENTS,$1021:function(_1,_2,_3){var _4=[],_5=this.creator.dataBoundComponent,_6=!isc.isA.ListGrid(_5)||_5.canReorderFields;for(var i=0;i<_1.length;i++){var _8=_1[i];if(_2){if(_8.canHide==false)_4.add(_8)}else{if(_8.canReorder==null&&!_6||_8.canReorder==false)
{_4.add(_8)}}}
if(_3){return _1.length>_4.length}
else{if(_4.length>0)_1.removeList(_4);return _1.length>0}},willAcceptDrop:function(){var _1=this.ns.EH,_2=this.Super("willAcceptDrop");if(!_2)return false;return this.$1021(_1.dragTarget.getDragData(),_1.dragTarget!=this,true)},getCurrentGrid:function(){if(this.pickerRole=="current")return this;var _1=this.parentElement.shuttle;return _1.picker.currentFieldsGrid},dropComplete:function(_1){if(_1.length>0){var _2=this.parentElement;_2.shuttle.markForSave()}
var _3=this.getCurrentGrid();if(_3.useReorderBounds()){_3.clearReorderBounds()}},$1022:function(){},transferSelectedFieldRecords:function(_1,_2){var _3=this;_3.transferSelectedData(_1,null,!_2?null:function(_5){var _4=_3.getRecordIndex(_5[0]);if(_4>=0)_3.scrollToRow(_4)})},canHover:true,showHover:true,cellHoverHTML:function(_1,_2,_3){if(!this.creator.showFieldPrompts)return null;if(_1&&_1.prompt)return _1.prompt;return null},getContiguousSelection:function(){var _1=this.getSelectedRecords(),_2=(_1==null?0:_1.length);if(_2==0)return null;var _3=this.getRecordSetBounds(_1,-1);var _4=[];for(var i=1;i<_2;++i){var _6=_1[i];if(_4.length==0&&this.getRecord(_3+i)!=_6||_4.length>0)_4.add(_6)}
this.deselectRecords(_4);return this.getSelectedRecords()},getRecordSetBounds:function(_1,_2,_3){if(_3==null)_3=0;var _4=this.getTotalRows();switch(_2){case-1:var _5=this.getRecordIndex(_1.first());if(_5>=0){return Math.max(_5-_3,0)}
break;case 1:var _5=this.getRecordIndex(_1.last());if(_5>=0){return Math.min(_5+_3+1,_4)}
break}
return null},getCellValue:function(_1,_2,_3){var _4=this.Super("getCellValue",arguments);var _5=this.getField(_3);if(_5.name!="$9g"||_4!=this.emptyCellValue)return _4;var _6=this.creator.dataBoundComponent;if(isc.isA.Function(_6.getFieldTitle)){var _7=_6.getField(_1.name);if(_7)return _6.getFieldTitle(_7)}
return _1.name}});isc.ClassFactory.defineClass("FieldPickerListGrid","ListGrid","FieldPickerGrid");isc.A=isc.FieldPickerListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.getFieldRecord=isc.ListGrid.getPrototype().getRecord;isc.A.getTotalFieldRecords=isc.ListGrid.getPrototype().getTotalRows;isc.A.spanFieldsNotContiguousMessage="The span titled: '${title}' is not valid; visible fields in a span must be positioned contiguously";isc.A.$177j="transferRejected";isc.A.filterData=isc.FieldPickerGrid.getPrototype().filterData;isc.A.expandRecord=isc.FieldPickerGrid.getPrototype().expandRecord;isc.A.dropComplete=isc.FieldPickerGrid.getPrototype().dropComplete;isc.A.setCanExpandRecords=isc.FieldPickerGrid.getPrototype().setCanExpandRecords;isc.A.getExpansionComponent=isc.FieldPickerGrid.getPrototype().getExpansionComponent;isc.A.saveAndCollapseRecord=isc.FieldPickerGrid.getPrototype().saveAndCollapseRecord;isc.A.cellHoverHTML=isc.FieldPickerGrid.getPrototype().cellHoverHTML;isc.A.getCellValue=isc.FieldPickerGrid.getPrototype().getCellValue;isc.B.push(isc.A.clearFieldRecords=function isc_FieldPickerListGrid_clearFieldRecords(){},isc.A.dataArrived=function isc_FieldPickerListGrid_dataArrived(_1,_2){if(this.canExpandRecords&&_1<_2)this.setRecordExpansion(_1,_2)},isc.A.collapseAllRecords=function isc_FieldPickerListGrid_collapseAllRecords(){if(this.canExpandRecords){var _1=this.data.getAllRows();this.collapseRecordList(_1)}},isc.A.validateAllRecords=function isc_FieldPickerListGrid_validateAllRecords(){var _1=this.creator.dataBoundComponent;if(_1&&!this.$2304(_1)){return false}
if(this.canExpandRecords){var _2=this.data.getAllRows();return this.validateRecordList(_2)}
return true},isc.A.$2305=function isc_FieldPickerListGrid__buildHeaderSpanMap(_1,_2,_3){for(var i=0;i<_1.length;i++){var _5=i;if(isc.isAn.Array(_3))_5=_3.duplicate().add(i);else if(_3!=null)_5=[_3,i];var _6=_1[i].fields;if(_6)for(var j=0;j<_6.length;j++)_2[_6[j]]=_5;else if(_1[i].spans){this.$2305(_1[i].spans,_2,_5)}}
return _2},isc.A.$2306=function isc_FieldPickerListGrid__updateHeaderSpanStats(_1,_2){if(_1.$2307==null)_1.$2307=1;else _1.$2307++;var _3=_1.$2308;if(_3==null||_3<_2)_1.$2308=_2;var _4=_1.$2309;if(_4==null||_4>_2)_1.$2309=_2},isc.A.$231a=function isc_FieldPickerListGrid__cleanHeaderSpanStats(_1){for(var i=0;i<_1.length;i++){var _3=_1[i];delete _3.$2307;delete _3.$2309;delete _3.$2308;if(_3.spans)this.$231a(_3.spans)}},isc.A.$231b=function isc_FieldPickerListGrid__spanFieldsContiguous(_1){for(var i=0;i<_1.length;i++){var _3,_4=_1[i];if(_4.$2307==null)continue;if(_4.spans&&(_3=this.$231b(_4.spans))){return _3}
if(_4.$2308-_4.$2309+1>_4.$2307){return _4}}},isc.A.$2304=function isc_FieldPickerListGrid__validateHeaderSpans(_1){var _2=_1.headerSpans;if(!_2)return true;var _3=this.$2305(_2,{});for(var i=0;i<this.getTotalRows();i++){var _5=this.getRecord(i).name,_6=_3[_5];if(_6==null)continue;if(isc.isAn.Array(_6)){var _7=_2;for(var j=0;j<_6.length;j++){var _9=_7[_6[j]];this.$2306(_9,i);_7=_9.spans}}else{this.$2306(_2[_6],i)}}
var _10=this.$231b(_2);if(_10){isc.warn(this.spanFieldsNotContiguousMessage.evalDynamicString(this,{title:_10.title}))}
this.$231a(_2);return!_10},isc.A.requestSyntheticReorder=function isc_FieldPickerListGrid_requestSyntheticReorder(_1,_2){if(this.$100j||!this.canReorderRecords)return;if(!this.isObserving(this.data,"handleUpdate")){this.observe(this.data,"handleUpdate","observer.applySyntheticReorder(arguments[1])")}
var i,_4={};for(i=0;i<_1.length;i++)_4[_1[i].name]=true;this.$100j={target:_2.name,total:_1.length,arrived:0,keys:_4}},isc.A.applySyntheticReorder=function isc_FieldPickerListGrid_applySyntheticReorder(_1){var _2=this.$100j;if(!_2){this.ignore(this.data,"handleUpdate");return}
if(!isc.isAn.Array(_1))_1=[_1];if(_1==null)return;for(var i=0;i<_1.length;i++){if(_2.keys[_1[i].name])_2.arrived++}
if(_2.arrived!=_2.total)return;if(!this.data.lengthIsKnown())return;var _4=[],_5=this.data.getLength(),_6=Math.max(0,_5-_2.total),_7=this.data.findIndex("name",_2.target);for(var i=_6;i<_5;i++){var _8=this.data.get(i)||{};if(_2.keys[_8.name])_4.add(_8)}
this.$100j=null;this.ignore(this.data,"handleUpdate");this.delayCall("$136w",[_2,_4,_7])},isc.A.$136w=function isc_FieldPickerListGrid__finishApplySyntheticReorder(_1,_2,_3){this.transferRecords(_2,_1.target,_3,this,this.$1022)},isc.A.willAcceptDrop=function isc_FieldPickerListGrid_willAcceptDrop(){var _1=this.ns.EH,_2=this.Super("willAcceptDrop");if(!_2)return false;_2=this.$1021(_1.dragTarget.getDragData(),_1.dragTarget!=this,true);if(!_2)return false;if(this.useReorderBounds()){var _3=this.getEventRecordNum();if(_3!=-2&&_3!=null){var _4=this.getRecordDropPosition(_3);if(_4==isc.ListGrid.AFTER)_3++}
if(_3!==this.getBoundedTransferIndex(_3))return false}
return true},isc.A.calculateReorderBounds=function isc_FieldPickerListGrid_calculateReorderBounds(){var _1=this.getTotalRows(),_2=_1,_3=-1;var _4=this.creator.dataBoundComponent,_5=_4.canReorderFields;if(_5!=false){for(var i=0;i<_1;i++){var _7=this.getRecord(i);if(_7.canReorder==true||(_5&&_7.canReorder!=false)){_2=i;break}}
for(var i=_1-1;i>=0;i--){var _7=this.getRecord(i);if(_7.canReorder==true||(_5&&_7.canReorder!=false)){_3=i;break}}}
this.$177k=[_2,_3]},isc.A.clearReorderBounds=function isc_FieldPickerListGrid_clearReorderBounds(){delete this.$177k},isc.A.useReorderBounds=function isc_FieldPickerListGrid_useReorderBounds(){return this.canReorderRecords==true},isc.A.getBoundedTransferIndex=function isc_FieldPickerListGrid_getBoundedTransferIndex(_1){var _2=_1==-2||_1==null;if(!this.$177k)this.calculateReorderBounds();var _3=this.getTotalRows(),_4=this.$177k[0],_5=this.$177k[1];if(_4>_5+1){return _2?_1:_3}
if(_4>0&&!_2&&_1<_4){return _4}
if(_5<_3-1&&(_2||_1>_5+1)){return _5+1}
return _1},isc.A.transferRecords=function isc_FieldPickerListGrid_transferRecords(_1,_2,_3,_4,_5){var _6=this.parentElement,_7=this!=_4,_8=_5==this.$1022;if(!_8)this.$1021(_1,_7);if(_7&&!_4.validateRecordList(_1))_1.clear();if(_7){_4.collapseRecordList(_1,true)}
if(this.useReorderBounds()){var _9=_3;if(_9!==(_3=this.getBoundedTransferIndex(_3))){if(_3==this.$177j)return;if(_3!=null)_2=this.getRecord(_3)}}
if(_7&&_2!=null){this.requestSyntheticReorder(_1,_2)}
return this.Super("transferRecords",arguments)});isc.B._maxIndex=isc.C+18;isc.ClassFactory.defineClass("FieldPickerTreeGrid","TreeGrid","FieldPickerGrid");isc.A=isc.FieldPickerTreeGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.filterData=isc.FieldPickerGrid.getPrototype().filterData;isc.A.expandRecord=isc.FieldPickerGrid.getPrototype().expandRecord;isc.A.dropComplete=isc.FieldPickerGrid.getPrototype().dropComplete;isc.A.willAcceptDrop=isc.FieldPickerGrid.getPrototype().willAcceptDrop;isc.A.setCanExpandRecords=isc.FieldPickerGrid.getPrototype().setCanExpandRecords;isc.A.getExpansionComponent=isc.FieldPickerGrid.getPrototype().getExpansionComponent;isc.A.saveAndCollapseRecord=isc.FieldPickerGrid.getPrototype().saveAndCollapseRecord;isc.A.cellHoverHTML=isc.FieldPickerGrid.getPrototype().cellHoverHTML;isc.A.getCellValue=isc.FieldPickerGrid.getPrototype().getCellValue;isc.B.push(isc.A.createResultTree=function isc_FieldPickerTreeGrid_createResultTree(_1,_2,_3){var _4=this.parentElement.shuttle.picker;if(!_3.dataProperties)_3.dataProperties={};isc.addProperties(_3.dataProperties,{modelType:"parent",defaultIsFolder:true,reportCollisions:false,idField:_4.pickerIdField,parentIdField:"_"+_4.pickerParentIdField});var _5=this.Super("createResultTree",arguments);if(this.isObserving(this.data,"dataSourceDataChanged")){this.ignore(this.data,"dataSourceDataChanged")}
this.observe(_5,"dataSourceDataChanged","observer.invalidateCacheIfMissingNodes()");return _5},isc.A.getTotalFieldRecords=function isc_FieldPickerTreeGrid_getTotalFieldRecords(){this.$990=this.data.getDescendants();return this.$990.length},isc.A.getFieldRecord=function isc_FieldPickerTreeGrid_getFieldRecord(_1){return this.$990[_1]},isc.A.clearFieldRecords=function isc_FieldPickerTreeGrid_clearFieldRecords(){delete this.$990},isc.A.dataArrived=function isc_FieldPickerTreeGrid_dataArrived(_1){if(this.canExpandRecords&&isc.isA.Object(_1)){this.$990=this.data.getChildren(_1);this.setRecordExpansion(0,this.$990.getLength());delete this.$990}},isc.A.collapseAllRecords=function isc_FieldPickerTreeGrid_collapseAllRecords(){if(this.canExpandRecords){var _1=this.data.getDescendants();this.collapseRecordList(_1)}},isc.A.validateAllRecords=function isc_FieldPickerTreeGrid_validateAllRecords(){if(this.canExpandRecords){var _1=this.data.getDescendants();return this.validateRecordList(_1)}
return true},isc.A.useReorderBounds=function isc_FieldPickerTreeGrid_useReorderBounds(){return false},isc.A.transferNodes=function isc_FieldPickerTreeGrid_transferNodes(_1,_2,_3,_4){var _5=this.parentElement,_6=this!=_4;this.$1021(_1,_6);if(_6&&!_4.validateRecordList(_1))_1.clear();_4.$991=true;if(_6){_4.collapseRecordList(_1,true)}
this.Super("transferNodes",arguments)},isc.A.invalidateCacheIfMissingNodes=function isc_FieldPickerTreeGrid_invalidateCacheIfMissingNodes(){if(this.data.getAllNodes().length<
this.dataSource.cacheData.length){if(!this.$991)return;delete this.$991;this.invalidateCache()}});isc.B._maxIndex=isc.C+10;isc.ClassFactory.defineClass("FieldPickerGridView","VLayout");isc.A=isc.FieldPickerGridView.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.expansionFormDefaults={_constructor:"DynamicForm",width:5,titleAlign:isc.Page.isRTL()?"right":"left",overflow:"visible",wrapItemTitles:false,validateOnExit:true,validateOnChange:true};isc.B.push(isc.A.initWidget=function isc_FieldPickerGridView_initWidget(){this.Super(this.$oc,arguments);var _1=isc.SectionStack.create({height:5,overflow:"visible",sections:[{title:this.title,controls:this.controls,controlsLayoutProperties:{membersMargin:2,layoutEndMargin:2},canCollapse:false}]});this.addMember(_1)},isc.A.addMember=function isc_FieldPickerGridView_addMember(_1){this.Super("addMember",arguments);if(isc.isA.ListGrid(_1))this.grid=_1},isc.A.createExpansionDynamicForm=function isc_FieldPickerGridView_createExpansionDynamicForm(_1,_2){var _3=[],_4=this.shuttle.picker.dataBoundComponent,_5=this.shuttle.picker.expansionDataSource,_6=_5.getFieldNames();for(var i=0;i<_6.length;i++){var _8=_6[i],_9=_1.contains(_8);switch(_8){case"decimalPad":case"decimalPrecision":if(!isc.SimpleType.inheritsFrom(_2.type,"float"))_9=false;break;case"precision":if(!isc.SimpleType.inheritsFrom(_2.type,"float")&&!isc.SimpleType.inheritsFrom(_2.type,"integer"))_9=false;break}
if(_9)_3.add({name:_8})}
if(_2.userSummary){_3.add({type:"text",autoFit:true,endRow:false,record:_2,shuttle:this.shuttle,editorType:"ButtonItem",name:"$99k",title:_4.editSummaryFieldText,click:function(){this.shuttle.confirmSaveOK('editSummaryField',this.record)}})}
if(_2.userFormula){_3.add({type:"text",autoFit:true,endRow:false,record:_2,shuttle:this.shuttle,editorType:"ButtonItem",name:"$99l",title:_4.editFormulaFieldText,click:function(){this.shuttle.confirmSaveOK('editFormulaField',this.record)}})}
if(_2.userSummary||_2.userFormula){_3.add({type:"text",autoFit:true,startRow:false,record:_2,shuttle:this.shuttle,editorType:"ButtonItem",name:"$112t",title:"Remove Field",click:function(){this.shuttle.confirmRemoveOK(this.record)}})}
var _10=this.createAutoChild("expansionForm",{dataSource:_3.length>0?_5:null,fields:_3});_10.setValues(_2);return _10},isc.A.cleanup=function isc_FieldPickerGridView_cleanup(){this.grid.collapseAllRecords()});isc.B._maxIndex=isc.C+4;isc.ClassFactory.defineClass("FieldPickerShuttle","HLayout");isc.A=isc.FieldPickerShuttle.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.changedRecords={};isc.A.availableViewDefaults={_constructor:"FieldPickerGridView"};isc.A.currentViewDefaults={_constructor:"FieldPickerGridView"};isc.A.buttonStackDefaults={align:"center",overflow:"visible",layoutAlign:"center"};isc.A.hilitesButtonConstructor="IButton";isc.A.hilitesButtonDefaults={autoFit:true,click:"this.shuttle.confirmSaveOK('editHilites')"};isc.A.transferButtonWidth=24;isc.A.transferButtonHeight=22;isc.A.transferImageWidth=16;isc.A.transferImageHeight=16;isc.A.iconBaseStyle="icon";isc.B.push(isc.A.applyCompleteFields=function isc_FieldPickerShuttle_applyCompleteFields(_1){var i,_3,_4,_5=[],_6=this.picker.shouldUseTrees(),_7=this.picker.pickerParentIdField;var _8=this.currentView.grid,_9=_8.getTotalFieldRecords();for(i=0;i<_9;i++){_4=_8.getFieldRecord(i);_3=this.picker.getOriginalField(_4);_3.title=_4.$9g;if(_8.isExpanded(_4)){var _10=_8.getCurrentExpansionComponent(_4);if(_10&&_10.valuesHaveChanged()){var _11=_10.getChangedValues();isc.addProperties(_3,_11);_10.setValues(_11)}}
if(_6)_3[_7]=_4["_"+_7];_3.showIf="true";_3.visible=true;_3.hidden=false;_5.add(_3)}
_8.clearFieldRecords();var _12=this.availableView.grid,_13=_12.getTotalFieldRecords();for(i=0;i<_13;i++){_4=_12.getFieldRecord(i);_3=this.picker.getOriginalField(_4);if(_6)_3[_7]=_4["_"+_7];_3.showIf="false";_3.visible=false;_3.hidden=true;_5.add(_3)}
_12.clearFieldRecords();for(i=0;i<_5.length;i++){var _14=this.changedRecords[_5[i].name];if(_14)isc.addProperties(_5[i],_14)}
if(_1.useAllDataSourceFields){_1.setProperty("useAllDataSourceFields",false);this.logInfo("Clearing useAllDataSourceFields for DBC "+_1.getID()+"so that setFields() can apply the requested picker field order")}
_1.setFields(_5);this.clearChanges()},isc.A.clearChanges=function isc_FieldPickerShuttle_clearChanges(){this.changedRecords={};this.recordsMoved=false},isc.A.markForSave=function isc_FieldPickerShuttle_markForSave(){this.recordsMoved=true},isc.A.requiresSave=function isc_FieldPickerShuttle_requiresSave(){var _1=this.currentView.grid,_2=_1.getTotalFieldRecords();for(var i=0;i<_2;i++){var _4=_1.getFieldRecord(i);if(_1.isExpanded(_4)){var _5=_1.getCurrentExpansionComponent(_4);if(_5&&_5.valuesHaveChanged())return true}}
_1.clearFieldRecords();var _6=isc.getKeys(this.changedRecords);return this.recordsMoved||_6.length>0},isc.A.confirmRemoveOK=function isc_FieldPickerShuttle_confirmRemoveOK(_1){this.$99n=_1;isc.confirm(this.picker.removeText,{target:this,methodName:"completeConfirmRemoveOK"})},isc.A.completeConfirmRemoveOK=function isc_FieldPickerShuttle_completeConfirmRemoveOK(_1){var _2=this.$99n;delete this.$99n;if(_1)this.currentView.grid.removeData(_2)},isc.A.confirmSaveOK=function isc_FieldPickerShuttle_confirmSaveOK(_1,_2){this.$99m=_1;this.$99n=_2;if(this.requiresSave()){isc.confirm(this.picker.confirmText,{target:this,methodName:"completeSaveOK"})}else{this.completeSaveOK(true)}},isc.A.completeSaveOK=function isc_FieldPickerShuttle_completeSaveOK(_1){var _2=this.$99m,_3=this.$99n;delete this.$99m;delete this.$99n;if(_1)this.saveAndExecuteMethod(_2,_3)},isc.A.saveAndExecuteMethod=function isc_FieldPickerShuttle_saveAndExecuteMethod(_1,_2){var _3=this.picker;if(!_3.currentFieldsGrid.validateAllRecords())return false;_3.currentFieldsGrid.endEditing();_3.currentFieldsGrid.clearCriteriaIfPresent();_3.availableFieldsGrid.clearCriteriaIfPresent();_3.currentFieldsGrid.collapseAllRecords();this.applyCompleteFields(_3.dataBoundComponent);if(_1!=null)this.openEditor(_1,_2);return true},isc.A.openEditor=function isc_FieldPickerShuttle_openEditor(_1,_2){var _3=this.picker.dataBoundComponent,_4=_2?_2.name:null;var _5=this;switch(_1){case"addSummaryField":case"addFormulaField":case"editSummaryField":case"editFormulaField":var _6=_1.startsWith("edit"),_7=_4?_3.getField(_4):null,_8=_1.substring(_1.length-12,_1.length-5);var _9={showSaveAddAnotherButton:!_6,fireOnClose:function(){_3.userFieldCallback(this,_9);_5.picker.refresh(this)}};_3.$1144(_7,_8,_9);var _10=_3.fieldEditorWindow;if(_10){var _11=_10.items[0];_11.testRecord=this.picker.sampleRecord}
break;case"editHilites":_3.editHilites();var _10=_3.hiliteWindow;if(_10){this.observe(_10,"hide","observer.picker.refresh(null, observed)")}
break}},isc.A.initWidget=function isc_FieldPickerShuttle_initWidget(){this.Super(this.$oc,arguments);var _1=this.picker,_2=_1.dataBoundComponent;this.availableView=this.createAutoChild("availableView",{shuttle:this,controls:_1.availableFieldsHeaderControls,title:_1.availableFieldsTitle});var _3=[];var _4=_1.currentFieldsHeaderControls;if(_4==null){_4=[];if(_1.showHilitesButton)_4.add("hilitesButton");if(_2.canAddFormulaFields||_2.canAddSummaryFields){_4.add("customFieldsMenuButton")}}
for(var i=0;i<_4.length;i++){var _6=_4[i];if(_6=="hilitesButton"){this.hilitesButton=this.createAutoChild("hilitesButton",{shuttle:this,title:_1.hilitesText});_3.add(this.hilitesButton)}else if(_6=="customFieldsMenuButton"){var _7=[];if(_2.canAddSummaryFields)_7.add({shuttle:this,title:_2.addSummaryFieldText,click:"item.shuttle.confirmSaveOK('addSummaryField')",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});if(_2.canAddFormulaFields)_7.add({shuttle:this,title:_2.addFormulaFieldText,click:"item.shuttle.confirmSaveOK('addFormulaField')",icon:"[SKINIMG]ListGrid/formula_menuItem.png"});_3.add(isc.MenuButton.create({autoFit:true,title:_1.addCustomFieldsButtonTitle,menu:isc.Menu.create({data:_7})}))}else if(isc.isA.Canvas(_6)){_6.addProperties({shuttle:this,picker:_1});_3.add(_6)}}
this.currentView=this.createAutoChild("currentView",{shuttle:this,controls:_3,title:_1.currentFieldsTitle});this.initTransferArrows();this.addMembers([this.availableView,this.horizontalArrows,this.currentView,this.verticalArrows])},isc.A.initTransferArrows=function isc_FieldPickerShuttle_initTransferArrows(){var _1=this.currentView,_2=this.availableView;this.horizontalArrows=isc.VLayout.create({width:this.transferButtonWidth,membersMargin:5,members:[isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,imageType:"center",showDown:false,align:"center",src:"[SKINIMG]TransferIcons/right.png",click:function(){_1.grid.transferSelectedFieldRecords(_2.grid,true)}}),isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,imageType:"center",showDown:false,src:"[SKINIMG]TransferIcons/left.png",click:function(){_2.grid.transferSelectedData(_1.grid)}})]},this.buttonStackDefaults);var _3=function(_8){var _4=_1.grid,_5=_4.getSelection()||[],_6=_8==-1?0:_4.getTotalRows();_4.transferRecords(_5,null,_6,_4);_4.scrollToRow(_6)};var _7=function(_8){var _4=_1.grid,_5=_4.getContiguousSelection();if(_5){var _6=_4.getRecordSetBounds(_5,_8,1);_4.transferRecords(_5,null,_6,_4);_4.scrollToRow(_6-(_8+1)/2)}};if(this.picker.showFieldOrderButtons){this.verticalArrows=isc.VLayout.create({width:this.transferButtonWidth,membersMargin:5,members:[isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageType:"center",imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,showDown:false,src:"[SKINIMG]TransferIcons/up_first.png",click:function(){_3(-1)}}),isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageType:"center",imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,showDown:false,src:"[SKINIMG]TransferIcons/up.png",click:function(){_7(-1)}}),isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,imageType:"center",showDown:false,src:"[SKINIMG]TransferIcons/down.png",click:function(){_7(1)}}),isc.ImgButton.create({baseStyle:this.iconBaseStyle,height:this.transferButtonHeight,imageWidth:this.transferImageWidth,imageHeight:this.transferImageHeight,imageType:"center",showDown:false,src:"[SKINIMG]TransferIcons/down_last.png",click:function(){_3(1)}})]},this.buttonStackDefaults)}},isc.A.cleanup=function isc_FieldPickerShuttle_cleanup(){this.currentView.cleanup();this.clearChanges()});isc.B._maxIndex=isc.C+13;isc.ClassFactory.defineClass("FieldPicker","VLayout");isc.A=isc.FieldPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.layoutMargin=10;isc.A.membersMargin=10;isc.A.originalFields={};isc.A.defaultWidth=800;isc.A.defaultHeight=425;isc.A.dataBoundComponent=null;isc.A.sampleRecord="first";isc.A.showFieldOrderButtons=true;isc.A.hilitesText="Highlights...";isc.A.availableFieldsTitle="Available Fields";isc.A.currentFieldsTitle="Visible Fields";isc.A.addCustomFieldsButtonTitle="Add Custom Fields";isc.A.availableTitleTitle="Name";isc.A.currentTitleTitle="Field Title";isc.A.sampleValueTitle="Sample Value";isc.A.sampleValueField="$99o";isc.A.showAvailableSampleValue=true;isc.A.showSampleValues=true;isc.A.canFilterSampleValue=false;isc.A.confirmText="Must save pending changes to proceed. OK?";isc.A.removeText="You are about to remove the field. Are you sure?";isc.A.instructions="Drag and drop or use arrows to move fields.  Drag reorder to change field order.";isc.A.instructionLabelConstructor="Label";isc.A.instructionLabelDefaults={height:5,overflow:"visible"};isc.A.saveAndExitButtonTitle="Apply";isc.A.cancelButtonTitle="Cancel";isc.A.removeItemTitle="Remove";isc.A.emptyTitleHint="[No title specified]";isc.A.showFieldPrompts=true;isc.A.sortAvailableFields=true;isc.A.availableFieldsSortDirection="ascending";isc.A.availableFieldsHeaderControls=null;isc.A.availableFieldsGridDefaults={canGroupBy:false,pickerRole:"available",dataFetchMode:"basic",dragDataAction:"move",canFreezeFields:false,showFilterEditor:true,filterOnKeypress:true,canDragRecordsOut:true,loadDataOnDemand:false,dragRecategorize:"never",keepParentsOnFilter:true,autoFitWidthApproach:"both",useAllDataSourceFields:true,canAcceptDroppedRecords:true,createDefaultTreeField:false,recordEnabledProperty:"$1023",autoFetchTextMatchStyle:"substring"};isc.A.buttonLayoutConstructor="HLayout";isc.A.buttonLayoutDefaults={height:5,align:"right",overflow:"visible",membersMargin:10,defaultLayoutAlign:"center"};isc.A.saveAndExitButtonConstructor="IButton";isc.A.saveAndExitButtonDefaults={click:"this.picker.saveClick()"};isc.A.cancelChangesButtonConstructor="IButton";isc.A.cancelChangesButtonDefaults={click:"this.picker.closeClick()"};isc.B.push(isc.A.getOriginalField=function isc_FieldPicker_getOriginalField(_1){return this.originalFields[_1[this.primaryKeyField]]},isc.A.shouldUseTrees=function isc_FieldPicker_shouldUseTrees(){if(this.dataBoundComponent){var _1=this.dataBoundComponent.dataSource;return _1!=null&&!!_1.showFieldsAsTree}
return false},isc.A.duplicateAndValidateFields=function isc_FieldPicker_duplicateAndValidateFields(_1){var _2=[],_3=this.dataBoundComponent,_4=!isc.isA.ListGrid(_3)||_3.canReorderFields;for(var i=0;i<_1.length;i++){var _6=_1[i];if(_6.excludeFromFieldPicker||(_6.excludeFromState&&_6.excludeFromFieldPicker!=false)){continue}
_2.add(_6);if((_6.canReorder==false||_6.canReorder==null&&!_4)&&_6.canHide==false)_6.$1023=false}
return _2},isc.A.createDataSourceFromFields=function isc_FieldPicker_createDataSourceFromFields(_1,_2,_3,_4){var _5=_4?_1:this.duplicateAndValidateFields(_1);if(_2!=null)_5.removeList(_2);var _1=[],_6=this.dataBoundComponent;if(_3){_5=_5.filter(function(_12){return _12.canHide!=false})}
var _7,_8=_3?this.availableTitleTitle:this.currentTitleTitle;if(isc.isA.String(this.sampleRecord)){if(this.sampleRecord=="first"){if(isc.isA.ListGrid(_6)){if(_6.fieldPickerShowSampleValues){var _9=_6.getOriginalData();this.sampleRecord=_9&&_9.getLength()>0?_9.get(0):null}}else if(this.showSampleValues){this.sampleRecord=_6.getRecord(0)}
if(!isc.isAn.Object(this.sampleRecord))this.sampleRecord=null}else if(this.sampleRecord=="firstOpenLeaf"&&isc.isA.TreeGrid(_6)){var _9=_6.getData();var _10=_9.getOpenList(_9.getRoot(),isc.Tree.LEAVES_ONLY);if(_10.length)this.sampleRecord=_10.get(0);else this.sampleRecord=_6.getRecord(0)}}
if(isc.isA.Object(this.sampleRecord)){for(var i=0;i<_5.length;i++){var _12=_5[i];_12[this.sampleValueField]=_6.getStandaloneFieldValue(this.sampleRecord,_12.name)}
if(!_3||this.showAvailableSampleValue){_1.add({name:this.sampleValueField,title:this.sampleValueTitle,canFilter:this.canFilterSampleValue,canEdit:false,type:"any"});_7=true}}
var _13={name:"name",title:_8,autoFitWidth:_7,primaryKey:true},_14={name:"$9g",title:_8,autoFitWidth:_7,editorProperties:{showHintInField:true,hint:this.emptyTitleHint},canEdit:this.canEditTitles&&!_3};if(this.useTitleField){_13.hidden=true;_14.treeField=true}
else{_14.hidden=true;_13.treeField=true}
_1.addListAt([_13,_14],0);if(this.shouldUseTrees()){var _15=this.pickerIdField,_16=this.pickerParentIdField,_17=_6.dataSource.fieldTreeRootValue;_1.addList([{name:_15,hidden:true,primaryKey:true},{name:"_"+_16,hidden:true,foreignKey:_15,rootValue:_17}]);if(this.useTitleField)_14.canFilter=true;else _13.canFilter=true;delete _13.primaryKey;_5.map(function(_12){_12["_"+_16]=_12[_16]})}
for(var i=0;i<_5.length;i++){var _12=_5[i];this.originalFields[_12[this.primaryKeyField]]=_12;if(_12.userSummary||_12.userFormula)this.customFields=true;_12.$9g=_12.title}
var _18=isc.DataSource.create({fields:_1,clientOnly:true,dataProtocol:"clientCustom",transformRequest:function(_20){var _19=this.getClientOnlyResponse(_20,null);this.processResponse(_20.requestId,_19);return _20.data}});_18.setCacheData(_5);return _18},isc.A.createExpansionDataSource=function isc_FieldPicker_createExpansionDataSource(){var _1=[{name:"frozen",title:isc.FieldPickerField.frozenTitle,showTitle:false,type:"boolean"},{name:"precision",validators:[{type:"regexp",errorMessage:"Must be between 1 and 21 inclusive",expression:"^([1-9]|1[0-9]|2[0-1])?$"}],title:isc.FieldPickerField.precisionTitle,type:"integer"},{name:"decimalPrecision",title:isc.FieldPickerField.decimalPrecisionTitle,type:"integer"},{name:"decimalPad",validators:[{type:"regexp",errorMessage:"Must be between 0 and 20 inclusive",expression:"^([0-9]|1[0-9]|20)?$"}],title:isc.FieldPickerField.decimalPadTitle,type:"integer"},{name:"align",title:isc.FieldPickerField.alignTitle,valueMap:["left","center","right"]},{name:"cellAlign",title:isc.FieldPickerField.cellAlignTitle,valueMap:["left","center","right"]}];if(isc.isA.DetailViewer(this.dataBoundComponent)){var _2=function(_3){switch(_3.name){case"frozen":case"align":case"cellAlign":return false;default:return true}};_1=_1.filter(_2)}
this.expansionDataSource=isc.DataSource.create({clientOnly:true,fields:_1})},isc.A.updateFieldConfiguration=function isc_FieldPicker_updateFieldConfiguration(_1){this.useTitleField=_1&&_1.title!=null;this.primaryKeyField=this.shouldUseTrees()?this.pickerIdField:"name"},isc.A.updateEditableProperties=function isc_FieldPicker_updateEditableProperties(){var _1=this.dataBoundComponent.fieldPickerFieldProperties,_2=this.currentFieldsGrid;isc.addProperties(_2,{editableProperties:_1||[],autoFitFieldWidths:isc.isA.Object(this.sampleRecord)});_2.setCanExpandRecords(isc.isA.Array(_1)&&_1.length>0||this.customFields);if(_2.useReorderBounds())_2.clearReorderBounds()},isc.A.validateDataSourceField=function isc_FieldPicker_validateDataSourceField(_1){var _2=_1.precision;if(_2!=null&&(_2<1||_2>21))return false;var _3=_1.decimalPad;if(_3!=null&&(_3<0||_3>20))return false;return true},isc.A.refresh=function isc_FieldPicker_refresh(_1,_2){if(_1){var _3=this.shuttle;_3.ignore(_1,"fireOnClose");var _4=this.dataBoundComponent.fieldEditorWindow;if(!_4.destroying&&!_4.destroyed){_3.observe(_4.items[0],"fireOnClose","observer.picker.refresh(observed)")}}
if(_2){this.shuttle.ignore(_2,"hide")}
var _5=this.dataBoundComponent.getVisibleFields(),_6=this.dataBoundComponent.getAllFields(),_7;this.updateFieldConfiguration(_6[0]);this.availableFieldsGrid.setDataSource(this.createDataSourceFromFields(_6,_5,true));this.availableFieldsGrid.fetchData();this.currentFieldsGrid.setDataSource(this.createDataSourceFromFields(_5));this.currentFieldsGrid.fetchData();this.updateEditableProperties();this.needsRefresh=false},isc.A.initWidget=function isc_FieldPicker_initWidget(){this.Super(this.$oc,arguments);if(this.dataBoundComponent==null&&this.dataSource!=null){var _1=this,_2=isc.addProperties({},this.creator.fieldPickerProperties,{autoDraw:false,fieldStateChanged:function(){if(isc.isA.Function(_1.callback)){_1.callback(this.completeFields,this.getHilites())}}});var _3=isc.ListGrid.create(_2);_3.setFields(_3.fields);this.dataBoundComponent=_3}
if(this.showHilitesButton==null){var _4=this.dataBoundComponent;this.showHilitesButton=_4&&_4.canEditHilites}
this.instructionLabel=this.createAutoChild("instructionLabel",{contents:this.instructions});this.addMember(this.instructionLabel);var _5=isc.FieldPickerShuttle.create({picker:this,membersMargin:10});this.shuttle=_5;this.addMember(_5);var _6=this.shouldUseTrees()?isc.FieldPickerTreeGrid:isc.FieldPickerListGrid;var _7=this.dataBoundComponent.getVisibleFields(),_8=this.dataBoundComponent.getAllFields();if(!_8){_8=_7}
this.updateFieldConfiguration(_8[0]);var _9;if(this.sortAvailableFields){_9=[{property:"$9g",direction:this.availableFieldsSortDirection}]}
this.addAutoChild("availableFieldsGrid",{autoFetchData:true,initialSort:_9,autoFitExpandField:this.showAvailableSampleValue?this.sampleValueField:null,dataSource:this.createDataSourceFromFields(_8,_7,true),rowDoubleClick:function(_12,_13,_14){var _10=_5.currentView.grid;_10.transferSelectedData(this)}},_6,_5.availableView);this.addAutoChild("currentFieldsGrid",{autoFetchData:true,autoFitExpandField:this.sampleValueField,dataSource:this.createDataSourceFromFields(_7),contextMenu:isc.Menu.create({autoDraw:false,data:[{title:this.removeItemTitle,click:function(){var _10=_5.currentView.grid;var _11=_5.availableView.grid;_11.transferSelectedData(_10)}}]})},_6,_5.currentView);this.createExpansionDataSource();this.updateEditableProperties();this.addAutoChild("buttonLayout");if(this.buttonLayout){this.saveAndExitButton=this.createAutoChild("saveAndExitButton",{picker:this,title:this.saveAndExitButtonTitle});this.cancelChangesButton=this.createAutoChild("cancelChangesButton",{picker:this,title:this.cancelButtonTitle});this.buttonLayout.addMembers([this.saveAndExitButton,this.cancelChangesButton]);this.addMember(this.buttonLayout)}},isc.A.setAvailableFields=function isc_FieldPicker_setAvailableFields(_1){var i,_3,_4={};for(i=0;i<_1.length;i++){var _5=_1[i];_4[_5.name]=_5}
var _6=this.currentFieldsGrid,_7=_6.dataSource.cacheData;var _8=[];for(var i=0;i<_7.length;i++){var _9=_7[i];if(_4[_9.name]!==_3){_8.add(_9);delete _4[_9.name]}}
_6.setDataSource(this.createDataSourceFromFields(_8,null,false,true));_6.fetchData();var _10=this.availableFieldsGrid,_11=_10.dataSource.cacheData;var _12=[];for(var i=0;i<_11.length;i++){var _9=_11[i];if(_4[_9.name]!==_3){_12.add(_9);delete _4[_9.name]}}
for(var _13 in _4){if(_4.hasOwnProperty(_13)){var _14=isc.DataSource.getAutoTitle(_13);_12.add({name:_13,title:_14})}}
_10.setDataSource(this.createDataSourceFromFields(_12,null,true,true));_10.fetchData()},isc.A.saveClick=function isc_FieldPicker_saveClick(){if(this.shuttle.saveAndExecuteMethod()){var _1=this.dataBoundComponent;_1.markForRedraw();if(_1.handleFieldStateChanged){_1.handleFieldStateChanged()}
if(this.callback)this.callback(_1.getAllFields(),_1.getHilites());if(this.creator)this.creator.closeClick()}},isc.A.closeClick=function isc_FieldPicker_closeClick(){},isc.A.cleanup=function isc_FieldPicker_cleanup(){this.shuttle.cleanup();var _1=this.dataBoundComponent.getAllFields(),_2=this.currentFieldsGrid.canExpandrecordProperty;for(var i=0;i<_1.length;i++){var _4=_1[i];delete _4[this.sampleValueField];delete _4[_2];delete _4["_"+this.pickerParentIdField];delete _4.$1023;delete _4.$9g}
this.originalFields={}});isc.B._maxIndex=isc.C+14;isc.A=isc.FieldPicker.getPrototype();isc.A.currentFieldsGridDefaults=isc.addProperties(isc.shallowClone(isc.FieldPicker.getPrototype().availableFieldsGridDefaults),{canSort:false,pickerRole:"current",expansionMode:"editor",canReparentNodes:true,canReorderRecords:true,canExpandRecordProperty:"$99q"});if(isc.Window!=null){isc.ClassFactory.defineClass("FieldPickerWindow","Window");isc.A=isc.FieldPickerWindow.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.title="Field Picker";isc.A.width=800;isc.A.height=425;isc.A.canDragResize=true;isc.A.autoCenter=true;isc.A.isModal=true;isc.A.autoDismiss=true;isc.A.fieldPickerConstructor="FieldPicker";isc.A.fieldPickerDefaults={autoParent:"none",pickerIdField:"fieldTreeId",pickerParentIdField:"fieldTreeParentId"};isc.B.push(isc.A.initWidget=function isc_FieldPickerWindow_initWidget(){if(this.isModal&&this.autoDismiss)this.isModal=false;this.Super(this.$oc,arguments);this.addAutoChild("fieldPicker");this.addItem(this.fieldPicker);this.observe(this.fieldPicker,"closeClick","observer.closeClick()");this.observe(this.fieldPicker.dataBoundComponent,"visibilityChanged","if (!observed.isVisible()) observer.hide();")},isc.A.show=function isc_FieldPickerWindow_show(){if(this.needsRefresh)this.fieldPicker.refresh();var _1=this.Super("show",arguments);if(this.autoDismiss&&!this.clickMaskUp())this.$172f();return _1},isc.A.$172f=function isc_FieldPickerWindow__showClickMask(){if(this.autoDismiss&&!this.clickMaskUp()){this.showClickMask(this.getID()+".closeClick()","soft",this)}},isc.A.closeClick=function isc_FieldPickerWindow_closeClick(){if(this.clickMaskUp())this.hideClickMask();this.fieldPicker.cleanup();this.needsRefresh=true;return this.Super("closeClick",arguments)},isc.A.destroy=function isc_FieldPickerWindow_destroy(){this.ignore(this.fieldPicker,"closeClick");this.ignore(this.fieldPicker.dataBoundComponent,"hide");return this.Super("destroy",arguments)});isc.B._maxIndex=isc.C+5}else{isc.Log.logInfo("Source for standard FieldPickerWindow class included in this module, but required related class (Window) is not loaded. This can occur if the Grid module is loaded without the Containers module.","moduleDependencies")}
isc.defineClass("FilterEditorBody","GridBody");isc.A=isc.FilterEditorBody.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getInnerHTML=function isc_FilterEditorBody_getInnerHTML(_1){var _2;var _3={target:this,method:function(_5){if(!isc.Browser.isIE){_5="<form action='javascript:void(0)' onsubmit='return false;'>"+_5+"</form>"}
if(_2){if(_1!=null)this.fireCallback(_1,"HTML",[_5]);return false}else{return _5}}};var _4=this.Super("getInnerHTML",[_3],arguments);_2=(_4===false);if(_2){return false}else{return _3.method.call(this,_4)}},isc.A.resized=function isc_FilterEditorBody_resized(){this.grid.bodyResized()});isc.B._maxIndex=isc.C+2;isc.ClassFactory.defineClass("RecordEditor","ListGrid");isc.A=isc.RecordEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDraw=false;isc.A.cellSpacing=0;isc.A.cellPadding=0;isc.A.selectionType="none";isc.A.showRollOver=false;isc.A.baseStyle="recordEditorCell";isc.A.recordSummaryBaseStyle="recordEditorCell";isc.A.showHeader=false;isc.A.canSaveSearches=false;isc.A.showEmptyMessage=false;isc.A.bodyOverflow="hidden";isc.A.fixedRecordHeights=true;isc.A.drawAllMaxCells=0;isc.A.skinImgDir="images/RecordEditor/";isc.A.saveImg="[SKIN]add.png";isc.A.filterImg={src:"[SKIN]filter.png",width:50,height:50,showOver:true};isc.A.actionButtonConstructor=isc.Button;isc.A.actionButtonDefaults={title:"",showOver:true,showFocusedAsOver:false};isc.A.actionButtonStyle="normal";isc.A.listEndEditAction="next";isc.A.canEdit=true;isc.A.editByCell=false;isc.A.$jo=false;isc.A.bodyStyleName="normal";isc.A.styleName="normal";isc.B.push(isc.A.$32h=function isc_RecordEditor__parkFocus(){return},isc.A.shouldAutoFitField=function isc_RecordEditor_shouldAutoFitField(){return false},isc.A.$32t=function isc_RecordEditor__showEditClickMask(){});isc.B._maxIndex=isc.C+3;isc.A=isc.RecordEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$65g="filter";isc.A.suppressNullValueFormat=true;isc.A.bodyProperties={$517:function(){var _1=this.Super("$517",arguments);if(_1&&_1.length>0){var _2=this.grid.getEditForm();if(_2){var _3=_2.getValues()
for(var _4 in _3){var _5=_1.find("name",_4);if(_5){var _6={};if(_5.hasAdvancedCriteria()){_6={criteria:_5.getCriterion(),advanced:true}}else _6={criteria:_5.getValue()};if(_6.criteria!=null){_2.$187k[_4]=_6}else if(_2.$187k[_4]){delete _2.$187k[_4]}}}}}
return _1}};isc.A.skipAutoFitWidths=true;isc.A.rebuildForFreeze=isc.Class.NO_OP;isc.A.rowClick=isc.Class.NO_OP;isc.A.rowDoubleClick=isc.Class.NO_OP;isc.B.push(isc.A.initWidget=function isc_RecordEditor_initWidget(){if(this.sourceWidget!=null){var _1=this.sourceWidget;this.setWidth(_1.getGridInnerContentWidth());this.observe(_1,"resized","observer.sourceWidgetResized(observed);");this.leaveScrollbarGap=this.sourceWidget.leaveScrollbarGap;var _2={autoFocus:false};if(this.isAFilterEditor()){this.$2400();_2.storeDisplayValues=false;var _3=this;_2.addItems=function(_13,_14){var _4=this.Super("addItems",arguments);if(_13&&this.grid&&this.grid.shouldAllowFilterOperators()){_3.updateFilterOperators(this,isc.isA.Array(_13)?_13:[_13])}
return _4}}else{this.actOnCellChange=this.sourceWidget.saveByCell}
isc.addProperties(this.editFormDefaults,_2);var _5=this.fields=this.sourceWidget.completeFields.duplicate();for(var i=0;i<_5.length;i++){_5[i]=isc.addPropertiesWithAssign({},_5[i])}
var _7=this.getInnerHeight();var _8=this.tableStyle;var _9=isc[this.bodyConstructor]||isc.GridBody;if(_8==null){_8=_9.getPrototype().tableStyle}
var _10=_9.getPrototype().cellSpacing||0;if(_8){var _11=isc.GridRenderer.$2719(_8,_10);var _12=_11.vSpacing;_7-=2*_12}
_7-=this.getVPadding();this.cellHeight=_7}else{this.logWarn("RecordEditor initialized without a sourceWidget property. This widget is not supported as a standalone component.")}
return this.Super(this.$oc,arguments)},isc.A.$2400=function isc_RecordEditor__applySourceWidgetFilterByCell(){var _1=this.sourceWidget;this.actOnCellChange=_1.filterByCell;this.actOnChange=_1.filterByCell||_1.filterOnKeypress;var _2=this.getEditForm();if(_2){var _3=_2.getItems();for(var i=0;i<_3.length;i++){var _5=this.getField(_3[i].name),_6=this.getEditorProperties(_5);_3[i].actOnChange=_6.actOnChange}}},isc.A.destroy=function isc_RecordEditor_destroy(){this.ignore(this.sourceWidget,"resized");this.Super("destroy",arguments)},isc.A.sourceWidgetResized=function isc_RecordEditor_sourceWidgetResized(_1){this.setWidth(_1.getGridInnerContentWidth())},isc.A.isAFilterEditor=function isc_RecordEditor_isAFilterEditor(){return(this.actionType==this.$65g)},isc.A.$315=function isc_RecordEditor__formatCellValue(_1,_2,_3,_4,_5){if(_3.isRemoveField)return"&nbsp;"
var _6;if(_1===_6&&this.suppressNullValueFormat){var _7=(_3&&_3.emptyCellValue!=null)?_3.emptyCellValue:(this.emptyCellValue!=null?this.emptyCellValue:"&nbsp;");return _7}
return this.Super("$315",arguments)},isc.A.$425=function isc_RecordEditor__useDisplayFieldValue(_1){return false},isc.A.draw=function isc_RecordEditor_draw(){var _1=this.sourceWidget;this.setWidth(_1.getGridInnerContentWidth());var _2=this.findNextEditCell(0,0,1,true,true,false,true,true);if(_2==null){this.logInfo("No editable fields in this record editor."+(this.isAFilterEditor()?" Check the 'canFilter' property for each field in ":" Check the 'canEdit' property for each field in ")+this.sourceWidget.getID())}else{var _3=this.isAFilterEditor(),_4;if(_3){_4=this.sourceWidget.$32e()}else{var _5;_4={};for(var i=0;i<this.fields.length;i++){var _7=this.fields[i];if(_7.defaultValue!==_5){_4[_7.name]=_7.defaultValue}}}
if(this.isAFilterEditor())this.setValuesAsCriteria(_4);else this.setEditValues(0,_4);var _8=_2[1];this.$31u(0,_8,true)}
this.Super("draw",arguments);this.actionButton.bringToFront();var _9=this.getEditForm();if(_9!=null){if(this.$176j){delete this.$176j;_9.setValuesAsCriteria(this.$789);delete this.$789}
if(this.isAFilterEditor()&&this.shouldAllowFilterOperators()){this.updateFilterOperators()}}},isc.A.updateFilterOperators=function isc_RecordEditor_updateFilterOperators(_1,_2){if(_1==null)_1=this.getEditForm();if(_1!=null&&this.isAFilterEditor()&&this.shouldAllowFilterOperators()){if(_2==null)_2=_1.getItems();this.$268t=true;try{var _3=_2.length;for(var i=0;i<_3;i++){var _5=_1.getItem(_2[i].name);if(isc.isA.TextItem(_5)){if(this.sourceWidget.shouldAlwaysShowOperatorIcon(_5.name,_5)){this.sourceWidget.setFieldSearchOperator(_5.name,_5.getOperator(),true)}}}}finally{delete this.$268t}}},isc.A.shouldAllowFilterOperators=function isc_RecordEditor_shouldAllowFilterOperators(_1){return this.sourceWidget?this.sourceWidget.shouldAllowFilterOperators(_1):this.allowFilterOperators},isc.A.setFields=function isc_RecordEditor_setFields(_1){var _2=this.getEditForm();if(this.isAFilterEditor()){this.$172b=_2?this.getValuesAsCriteria():null}
this.Super("setFields",arguments);if(this.$172b){_2.setValuesAsCriteria(this.$172b);delete this.$172b}
this.initializeEdit()},isc.A.initializeEdit=function isc_RecordEditor_initializeEdit(){if(!this.isDrawn()||this.$30a)return;var _1=this.findNextEditCell(0,0,1,true,true);if(_1==null)_1=[0,0];this.$31u(0,_1[1])},isc.A.showField=function isc_RecordEditor_showField(){this.Super("showField",arguments);this.initializeEdit()},isc.A.createChildren=function isc_RecordEditor_createChildren(){this.Super("createChildren",arguments);var _1=this.getEditForm();if(this.$789)this.$176j=true;if(!this.actionButton)this.makeActionButton()},isc.A.makeActionButton=function isc_RecordEditor_makeActionButton(){var _1;if(this.isAFilterEditor()){_1=this.filterImg}else{_1=this.saveImg}
var _2,_3
if(isc.isAn.Object(_1)){_2=_1.showOver;_3=_1.showFocused;_1=_1.src}
var _4=this.sourceWidget.$139x();var _5={recordEditor:this,left:this.isRTL()?0:this.getInnerWidth()-_4,width:_4,autoDraw:false,baseStyle:this.actionButtonStyle,skinImgDir:this.skinImgDir,icon:_1,iconSize:_4,prompt:this.actionButtonPrompt,click:function(){this.recordEditor.performAction()}}
if(this.actionButtonGetHoverHTML){_5.getHoverHTML=this.actionButtonGetHoverHTML;_5.showHover=true;_5.canHover=true}
if(_2!=null)_5.showRollOverIcon=_2;if(_3!=null)_5.showFocusedIcon=_3;if(this.tabIndex!=null&&!this.$180j){_5.tabIndex=this.tabIndex}
this.actionButton=this.createAutoChild("actionButton",_5);this.addChild(this.actionButton)},isc.A.performAction=function isc_RecordEditor_performAction(_1,_2){if(this.isAFilterEditor())this.performFilter(_1,_2,true);else this.performSave(_1,_2)},isc.A.setValuesAsCriteria=function isc_RecordEditor_setValuesAsCriteria(_1,_2,_3,_4){var _5=this.getEditForm();if(_5==null||_5.getItems().length==0){this.$789=_1;return}
if(this.clearFilterOperators){if(this.shouldAllowFilterOperators()){var _6=isc.DS.getCriteriaFields(_1);for(var i=0;i<_5.items.length;i++){var _8=_5.items[i],_9=_8.name,_10=_8.getOperator(),_11=_10?isc.DS.$57z[_10]:{},_12=_6.contains(_9)&&_1[_9]!==undefined;if(!_12&&this.shouldAllowFilterOperators(_9)){if(_8.getValue()||(_8.$1686&&_8.$1686!=_8.getOperator())){this.sourceWidget.clearFieldSearchOperator(_9)}}}}}
_5.setValuesAsCriteria(_1,isc.DS.isAdvancedCriteria(_1),_3,_4);if(_2)this.refreshRow(0)},isc.A.makeEditForm=function isc_RecordEditor_makeEditForm(){var _1=this.editFormProperties=this.editFormProperties||{};if(_1.allowExpressions==null&&this.allowFilterExpressions!=null)
_1.allowExpressions=this.allowFilterExpressions;_1.disableUnboundCacheSync=true;_1.expressionDataSource=this.expressionDataSource;if(this.isAFilterEditor()){_1.storeAtomicValues=true;_1.isSearchForm=true;_1.useMultiSelectForValueMaps=this.useMultiSelectForValueMaps;if(this.sourceWidget.defaultFilterOperator!=null){_1.defaultSearchOperator=this.sourceWidget.defaultFilterOperator}}
var _2=this.getEditForm(),_3;_1.$125e=true;_1.$187k={};if(_2==null){_3=this.$789;if(this.isAFilterEditor()){if(!_1.validate)_1.validate=function(_4,_5,_6,_7,_8,_9){return this.invokeSuper(null,"validate",_4,_5,this.validateTypeOnly?true:_6,_7,_8,_9)};if(!("validateTypeOnly"in _1))_1.validateTypeOnly=true}}else{_3=_2.getValuesAsCriteria();_2.expressionDataSource=this.expressionDataSource}
this.Super("makeEditForm",arguments);_2=this.getEditForm();if(_2!=null){_2.setValuesAsCriteria(_3);delete this.$789;if(this.isAFilterEditor())_2.isSearchForm=true}
if(this.isAFilterEditor()&&this.shouldAllowFilterOperators()){this.updateFilterOperators()}},isc.A.updateDataSource=function isc_RecordEditor_updateDataSource(_1){this.expressionDataSource=_1;var _2=this.getEditForm();if(_2)_2.expressionDataSource=this.expressionDataSource},isc.A.getEditDisplayValue=function isc_RecordEditor_getEditDisplayValue(_1,_2,_3){if(this.isAFilterEditor()&&this.$286!=null){var _4=this.getFieldName(_2);return this.$286.getValue(_4)}
return this.Super("getEditDisplayValue",arguments)},isc.A.getEditDisplayValues=function isc_RecordEditor_getEditDisplayValues(_1,_2){if(this.isAFilterEditor()&&this.$286!=null){return this.$286.getValues()}
return this.Super("getEditDisplayValues",arguments)},isc.A.performFilter=function isc_RecordEditor_performFilter(_1,_2,_3,_4){var _5=this.$74n();var _6={};if(_1)_6.showPrompt=false;_5=isc.DS.checkEmptyCriteria(_5);if(_5==null||isc.getKeys(_5).length==0){_6.textMatchStyle=this.sourceWidget.autoFetchTextMatchStyle}
var _7=this.sourceWidget.data;if(!_4&&((isc.isA.ResultSet(_7)&&_7.willFetchData(_5,_6.textMatchStyle))||(isc.isA.Tree(_7)&&this.sourceWidget.dataSource!=null)||!this.$186w))
{this.fireOnPause("performFilter",{target:this,methodName:"performFilter",args:[_1,_2,false,true]},_3?this.explicitFetchDelay:this.fetchDelay)}else{this.sourceWidget.handleFilterEditorSubmit(_5,_6,_2)}},isc.A.$74n=function isc_RecordEditor__getFilterCriteria(_1){var _2=this.getEditForm();if(_2==null){return this.$789}
this.storeUpdatedEditorValue();var _3=_2.getValuesAsCriteria(null,_1);var _4=isc.DS.compressNestedCriteria(_3);return _4},isc.A.$1978=function isc_RecordEditor__performOrScheduleFilter(_1){var _2=this.sourceWidget,_3=_2.data;if(isc.isA.ResultSet(_3)&&!_3.lengthIsKnown()||isc.ResultTree&&isc.isA.ResultTree(_3)&&_3.isLoading(_3.root))
{if(!this.$1979||_1){if(_1==null){this.logInfo("Deferring filter request from "+_2.ID+" until the component's outstanding server request completes")}
this.$1979=this.delayCall("$1978",[true],100)}}else{if(this.$1979){if(_1!=null){this.logInfo("Making deferred filter request from "+_2.ID)}
if(!_1)isc.Timer.clear(this.$1979);delete this.$1979}
var _4=this;this.performFilter(true,function(){if(_4.$1979)_4.$1978(false)})}},isc.A.performSave=function isc_RecordEditor_performSave(_1,_2){var _3=this.getEditRow(),_4=this.getEditCol(),_5=this.getFieldName(_4),_6=this.$286.getValue(_5);this.setEditValue(_3,_4,_6);var _7=this.getEditValues(0),_8=this.getFields().getProperty("name");if(!this.validateRowValues(_7,{},0,_8))return;this.$321(0);this.$31u(0,0);for(var _5 in _7){this.refreshCell(0,_4)}
if(_2)this.fireCallback(_2)},isc.A.getValues=function isc_RecordEditor_getValues(){var _1=this.getEditCol(),_2=this.getEditFieldName();this.setEditValue(0,_1,this.$286.getValue(_2));var _3=this.$74n();return _3},isc.A.getValuesAsCriteria=function isc_RecordEditor_getValuesAsCriteria(_1){var _2=this.$74n(_1);return _2},isc.A.canEditCell=function isc_RecordEditor_canEditCell(_1,_2){if(this.isAFilterEditor()){var _3=this.getField(_2);if(_3==null)return false;return(_3.canFilter!=false)}else{return this.sourceWidget.canEditCell(_1,_2)}},isc.A.getEditorValueMap=function isc_RecordEditor_getEditorValueMap(_1,_2){if(this.isAFilterEditor()){return this.sourceWidget.getFilterEditorValueMap(_1)}else{return this.sourceWidget.getEditorValueMap(_1,_2)}},isc.A.getEditorType=function isc_RecordEditor_getEditorType(_1,_2){if(this.isAFilterEditor()){return this.sourceWidget.getFilterEditorType(_1)}else{return this.sourceWidget.getEditorType(_1,_2)}},isc.A.$45r=function isc_RecordEditor__editorChanged(_1,_2,_3){if(_2.$242m)_2.$242m(_1,_2,_3);_1.grid.editorChanged(this)},isc.A.editorChanged=function isc_RecordEditor_editorChanged(_1){var _2=this.getEditForm();if(_2&&_2.$248x)return;var _3=_1.actOnChange!=null?_1.actOnChange:this.actOnChange;if(_3){if(this.sourceWidget.allowFilterExpressions&&_1.enteredCompleteExpression()==false)
{return}
this.$1978()}},isc.A.getEditorProperties=function isc_RecordEditor_getEditorProperties(_1){var _2={height:this.editorItemHeight||this.cellHeight};if(this.isAFilterEditor()){_2.allowEmptyValue=true;var _3=_1.filterOnKeypress!=null?_1.filterOnKeypress:(!!this.sourceWidget.filterOnKeypress),_4=_3||this.sourceWidget.filterByCell;_2.changeOnKeypress=_3;_2.actOnChange=_4;isc.addProperties(_2,this.sourceWidget.getFieldFilterEditorProperties(_1));if(_2.changed)_2.$242m=_2.changed;_2.changed=this.$45r}else{isc.addProperties(_2,this.sourceWidget.getEditorProperties(_1))}
return _2},isc.A.getEditItem=function isc_RecordEditor_getEditItem(_1,_2,_3,_4,_5,_6){var _7=this.Super("getEditItem",arguments);if(!this.isAFilterEditor())return _7;_7.getElementName=function(){return this.Super("getElementName",arguments)+"$148l"};var _8=this.sourceWidget.getFieldFilterEditorProperties(_1),_9;if(!_8)_8={};if(_1.defaultValue!=null&&_8.defaultValue===_9){delete _7.defaultValue}
if(_1.change!=null&&_8.change===_9){delete _7.change}
if(_1.defaultDynamicValue!=null&&_8.defaultDynamicValue!=null)
{delete _7.defaultDynamicValue}
if(_1.icons!=null&&_8.icons===_9){delete _7.icons}
if(_1.showPickerIcon!=null&&_8.showPickerIcon===_9){delete _7.showPickerIcon}
if(this.isAFilterEditor()){if(_7.editorType=="MiniDateRangeItem"||isc.isA.MiniDateRangeItem(_7)){_7.$172=function(_11){var _10;if(_11=="picker"){if(isc.EH.getKey()!="Enter"){var _10=this.Super("$172",arguments)}}
return _10}}}
return _7},isc.A.getDefaultEditValue=function isc_RecordEditor_getDefaultEditValue(_1,_2){if(this.isAFilterEditor())return null;return this.Super("getDefaultEditValue",arguments)},isc.A.getValueIcon=function isc_RecordEditor_getValueIcon(_1,_2,_3,_4){if(this.isAFilterEditor())return null;return this.Super("getValueIcon",arguments)},isc.A.cellEditEnd=function isc_RecordEditor_cellEditEnd(_1,_2){if(_1!=isc.ListGrid.ENTER_KEYPRESS&&_1!=isc.ListGrid.TAB_KEYPRESS&&_1!=isc.ListGrid.SHIFT_TAB_KEYPRESS&&_1!=isc.ListGrid.EDIT_FIELD_CHANGE)return true;var _3;if(_2===_3)_2=this.getUpdatedEditorValue();var _4=this.getEditRow(),_5=this.getEditCol();var _6=this.getEditValue(_4,_5,_2),_7=false;if(!isc.Canvas.compareValues(_2,_6)){_7=true;this.setEditValue(_4,_5,_2)}
if(_1==isc.ListGrid.ENTER_KEYPRESS||(_7&&this.actOnCellChange)){this.performAction();if(_1==isc.ListGrid.ENTER_KEYPRESS){if(this.autoSelectEditors){var _8=this.getEditFormItem(_5);this.$51n(_8)}
return}}
var _9=this.getNextEditCell(_4,_5,_1);if(_9==null||_9[0]!=_4){if(!this.$180j&&this.tabIndex!=null){this.$92z=true;return}else{var _10=(_1==isc.ListGrid.TAB_KEYPRESS);isc.TabIndexManager.shiftFocusAfterGroup(this.body.getID(),_10);return}}
return this.Super("cellEditEnd",arguments)},isc.A.editorKeyPress=function isc_RecordEditor_editorKeyPress(_1,_2,_3){var _4=this.Super("editorKeyPress",arguments);if(this.$92z){this.$92z=null;return true}
return _4},isc.A.clearEditValue=function isc_RecordEditor_clearEditValue(_1,_2){return this.Super("clearEditValue",[_1,_2,null,true])},isc.A.$206e=function isc_RecordEditor__syncBodyScrollForDraw(){if(this.sourceWidget&&this.sourceWidget.isDrawn()){this.sourceWidget.syncFilterEditorScrolling(this.sourceWidget.body.getScrollLeft(),null,false)}else{return this.Super("$206e",arguments)}},isc.A.layoutChildren=function isc_RecordEditor_layoutChildren(){this.Super("layoutChildren",arguments);var _1=this.sourceWidget.$139x();if(this.actionButton){this.actionButton.setLeft(this.isRTL()?0:this.sourceWidget.getGridInnerContentWidth()-_1)}
if(this.body){var _2=this.body;if(this.bodyLayout)_2=this.bodyLayout;_2.setWidth(Math.max(1,this.getInnerWidth()-_1));if(this.actionButton&&this.isRTL()){_2.setLeft(_1)}}},isc.A.adjustOverflow=function isc_RecordEditor_adjustOverflow(){this.Super("adjustOverflow",arguments);if(this.actionButton){this.actionButton.setHeight(this.body.getVisibleHeight())}},isc.A.bodyScrolled=function isc_RecordEditor_bodyScrolled(_1,_2){this.Super("bodyScrolled",arguments);if(!this.isVisible()||!this.isDrawn())return;if(this.$35j!=null){isc.Timer.clear(this.$35j)}
this.$35j=this.delayCall("syncSourceScrolling",[],0)},isc.A.syncSourceScrolling=function isc_RecordEditor_syncSourceScrolling(){var _1=this.sourceWidget,_2;if(!_1||!(_2=_1.body))return;var _3=this.body.getScrollLeft();if(this.isRTL()){var _4=_2.getViewportWidth()-this.body.getViewportWidth();_3-=_4;if(_3<0)_3=0}
var _5=_2.getScrollRight();if(_3>_5)_3=_5;if(_2.getScrollLeft()!=_3){_2.scrollTo(_3)}},isc.A.sourceWidgetFieldsResized=function isc_RecordEditor_sourceWidgetFieldsResized(){var _1=[];for(var i=0;i<this.fields.length;i++)_1.add(i);this.$116t(_1,this.getFieldWidths(),[])},isc.A.bodyResized=function isc_RecordEditor_bodyResized(){if(this.body.isDrawn()&&!this.isDrawn()&&!this.$54e){this.$54e=true;this.setBodyFieldWidths(this.getFieldWidths());this.$54e=false}},isc.A.getFieldWidths=function isc_RecordEditor_getFieldWidths(){var _1=this.sourceWidget.getCurrentFieldWidths();if(isc.isA.Array(_1)){_1=_1.duplicate();this.$57q(_1)}
return _1},isc.A.getBaseStyle=function isc_RecordEditor_getBaseStyle(_1,_2,_3){var _4=this.getField(_3);if(_4&&!_4.canFilter)return this.baseStyle;return this.invokeSuper(isc.RecordEditor,"getBaseStyle",_1,_2,_3)},isc.A.$57q=function isc_RecordEditor__correctForActionButtonClipping(_1){var _2=this.sourceWidget;if(this.body!=null&&_2!=null&&_2.body!=null&&_2.body.getInnerContentWidth()>this.body.getInnerContentWidth())
{var _3=_1.sum(),_4=_2.$139x(),_5=_2.body.getScrollWidth(true)-_4;if(_2.frozenBody)_5+=_2.frozenBody.getInnerWidth();if(_3>_5){_1[_1.length-1]-=Math.min(_4,(_3-_5))}}},isc.A.getCellValue=function isc_RecordEditor_getCellValue(_1,_2,_3,_4){var _5=this.fields[_3];if(_5&&(this.isCheckboxField(_5)||this.isExpansionField(_5)||this.isRowNumberField(_5)||this.isAFilterEditor()&&_5.canFilter==false))
{return"&nbsp;"}
return this.invokeSuper(isc.RecordEditor,"getCellValue",_1,_2,_3,_4)});isc.B._maxIndex=isc.C+50;isc.ClassFactory.defineClass("Menu","ListGrid");isc.A=isc.Menu;isc.A.ICON_FIELD={};isc.A.TITLE_FIELD={};isc.A.KEY_FIELD={};isc.A.SUBMENU_FIELD={};isc.A.$kc=[];isc.A.SHIFT=(isc.Browser.isWin?"Shift+":"shift-");isc.A.CTRL=(isc.Browser.isWin?"Ctrl+":"ctrl-");isc.A.ALT=(isc.Browser.isWin?"Alt+":"option-");isc.A.META=(isc.Browser.isWin?"Windows+":"command-");isc.A=isc.Menu.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canShowFilterEditor=false;isc.A.canSaveSearches=false;isc.A.iconFieldDefaults={name:"icon",width:25,getCellValue:function(_1,_2){if(_2.isSeparator)return null;return _1.getIcon(_2)},showIf:function(_1,_2,_3){if(this.isSeparator)return false;return _1.shouldShowIconField?_1.shouldShowIconField():false},$109b:true};isc.A.titleFieldDefaults={name:"title",width:"*",getCellValue:function(_1,_2){return _1.getItemTitle?_1.getItemTitle(_2):_2.title}};isc.A.keyFieldDefaults={name:"key",width:35,getCellValue:function(_1,_2){return _1.getKeyTitle(_2)},showIf:function(_1,_2,_3){return _1.shouldShowKeyField?_1.shouldShowKeyField():false}};isc.A.submenuFieldDefaults={name:"submenu",width:18,align:"right",getCellValue:function(_1,_2){return _1.getSubmenuImage(_2)},showIf:function(_1,_2,_3){return _1.shouldShowSubmenuField?_1.shouldShowSubmenuField():false}};isc.A.fixedIconWidth=true;isc.A.styleName="normal";isc.A.bodyStyleName="normal";isc.A.submenuDelay=200;isc.A.submenuOffset=-4;isc.A.defaultWidth=150;isc.A.defaultHeight=20;isc.A.enforceMaxHeight=true;isc.A.maxHeight=null;isc.A.minHeight=14;isc.A.backgroundColor=null;isc.A.overflow=isc.Canvas.VISIBLE;isc.A.bodyOverflow=isc.Canvas.VISIBLE;isc.A.arrowKeyAction="focus";isc.A.hiliteRowOnFocus=false;isc.A.selectionType=isc.Selection.NONE;isc.A.autoDraw=false;isc.A.tableStyle="menuTable";isc.A.showRollOver=true;isc.A.activeParentStyle="Over";isc.A.showFocusOutline=false;isc.A.showAllRecords=true;isc.A.fixedFieldWidths=false;isc.A.fixedRecordHeights=false;isc.A.leaveScrollbarGap=false;isc.A.baseStyle="menu";isc.A.alternateRecordStyles=false;isc.A.showHeader=false;isc.A.showSortArrow=isc.ListGrid.NONE;isc.A.canDrag=false;isc.A.canAcceptDrop=false;isc.A.canReorderRecords=false;isc.A.useKeys=true;isc.A.showKeys=true;isc.A.showIcons=true;isc.A.showSubmenus=true;isc.A.submenuDirection=null;isc.A.showFieldsSeparately=false;isc.A.emptyMessage="[Empty menu]";isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.iconWidth=16;isc.A.iconHeight=16;isc.A.autoSetDynamicItems=true;isc.A.skinImgDir="images/Menu/";isc.A.submenuImage={src:"[SKIN]submenu.gif",width:7,height:7};isc.A.submenuDisabledImage={src:"[SKIN]submenu_disabled.gif",width:7,height:7};isc.A.checkmarkImage={src:"[SKIN]check.gif",width:9,height:9};isc.A.checkmarkDisabledImage={src:"[SKIN]check_disabled.gif",width:9,height:9};isc.A.useBackMask=true;isc.A.submenuInheritanceMask=["submenuConstructor","$35k","className","submenuDelay","submenuOffset","defaultWidth","backgroundColor","tableStyle","showRollOver","baseStyle","emptyMessage","canDrag","canAcceptDrop","canReorderRecords","useKeys","showKeys","showIcons","showSubmenus","submenuDirection","cellPadding","iconWidth","iconHeight","autoSetDynamicItems","skinImgDir","submenuImage","submenuDisabledImage","checkmarkImage","checkmarkDisabledImage","bodyDefaults","$171q","iconBodyStyleName","fillSpaceStyleName","iconFillSpaceStyleName","itemClick","canSelectParentItems","childrenProperty","ruleScope","inheritedProperties"];isc.A.mergeSingleParent=true;isc.A.autoDismiss=true;isc.A.cascadeAutoDismiss=true;isc.A.autoDismissOnBlur=true;isc.A.fetchSubmenus=true;isc.A.navigationBarDefaults={autoParent:"none",hieght:44,rightPadding:5,leftPadding:5,defaultLayoutAlign:"center",overflow:"hidden",showLeftButton:false,showRightButton:true,navigationClick:function(_1){if("back"==_1){this.creator.$1431.pop()}else if("forward"==_1){this.creator.hide()}}};isc.A.navigationBarConstructor="NavigationBar";isc.A.cancelButtonTitle="Done";isc.A.navStackDefaults={height:"100%",overflow:"hidden",autoDraw:false,$148a:false,getTransformCSS:function(){if(!this.creator.$148b||!this.creator.$172g()){return null}else{var y=(!this.$148a?"100%":"0px");return";"+isc.Element.$159t+": translateY("+y+");"}},$2891:function(){var _1=this.creator;var _2=_1.$148b||this;if(!this.$148a){_2.hide();_1.$1431.setSinglePanel(_1.$350||_1)}},handleTransitionEnd:function(_1,_2){if(_2.target===this){this.$1393();this.$2891()}},$148c:function(){if(!this.creator.$172g()){this.moveTo(0,this.getInnerHeight());this.animateMove(0,0,function(){},this.creator.animateDuration)}else{this.$148a=true;this.delayCall("$151v")}},$151v:function(){this.$1392();isc.Element.$136r(this,"translateY(0px)")},$148d:function(){if(!this.creator.$172g()){this.animateMove(0,this.getInnerHeight(),function(){this.$2891()},this.creator.animateDuration)}else{this.$148a=false;this.$1392();isc.Element.$136r(this,"translateY(100%)")}},isA:function(_1){return isc.Menu.isA(_1)}};isc.A.navStackConstructor="NavStack";isc.A.navStackContainerDefaults={width:"100%",height:"100%",overflow:"hidden",autoDraw:false,isA:function(_1){return isc.Menu.isA(_1)}};isc.A.navStackContainerConstructor="Layout";isc.A.animateTransitions=!isc.Browser.isMobileIE;isc.A.skinUsesCSSTransitions=false;isc.A.animateDuration=350;isc.B.push(isc.A.getIconField=function isc_Menu_getIconField(){return isc.addProperties({},this.iconFieldDefaults,isc.Menu.ICON_FIELD,this.iconFieldProperties)},isc.A.$142p=function isc_Menu__getTitleField(){return isc.addProperties({},this.titleFieldDefaults,isc.Menu.TITLE_FIELD,this.titleFieldProperties)},isc.A.getKeyField=function isc_Menu_getKeyField(){return isc.addProperties({},this.keyFieldDefaults,isc.Menu.KEY_FIELD,this.keyFieldProperties)},isc.A.getSubmenuField=function isc_Menu_getSubmenuField(){return isc.addProperties({},this.submenuFieldDefaults,isc.Menu.SUBMENU_FIELD,this.submenuFieldProperties)},isc.A.getStandardField=function isc_Menu_getStandardField(_1){if(isc.isA.String(_1)){var _2=this.getIconField();if(_2.name==_1)return _2;var _3=this.$142p();if(_3.name==_1)return _3;var _4=this.getKeyField();if(_4.name==_1)return _4;var _5=this.getSubmenuField();if(_5.name==_1)return _5;this.logWarn("Menu field specified as :"+_1+". This is not a recognized standard field name");return null}else{var _6=_1.name;var _2=this.getIconField();if(("menuBuiltin_"+_2.name)==_6)return _2;var _3=this.$142p();if(("menuBuiltin_"+_3.name)==_6)return _3;var _4=this.getKeyField();if(("menuBuiltin_"+_4.name)==_6)return _4;var _5=this.getSubmenuField();if(("menuBuiltin_"+_5.name)==_6)return _5}
return _1},isc.A.shouldShowKeyField=function isc_Menu_shouldShowKeyField(){return this.showKeys},isc.A.setShowIcons=function isc_Menu_setShowIcons(_1){this.$173b=true;this.showIcons=_1;if(this.completeFields!=null)this.refreshFields()},isc.A.shouldShowIconField=function isc_Menu_shouldShowIconField(){return this.showIcons},isc.A.setShowSubmenus=function isc_Menu_setShowSubmenus(_1){this.$173c=true;this.showSubmenus=_1;if(this.isDrawn())this.refreshFields()},isc.A.shouldShowSubmenuField=function isc_Menu_shouldShowSubmenuField(){return this.showSubmenus},isc.A.getSubmenuDirection=function isc_Menu_getSubmenuDirection(){if(this.submenuDirection!=null)return this.submenuDirection;if(this.isRTL())return"left";return"right"},isc.A.$172g=function isc_Menu__animateTransitionsUsingCSS(){return this.animateTransitions&&isc.Browser.$139c&&this.skinUsesCSSTransitions});isc.B._maxIndex=isc.C+12;isc.A=isc.Menu.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.warnOnReusedFields=false;isc.A.observeCSSVariableChanges=true;isc.A.itemClick=isc.Class.NO_OP;isc.A.$151w="nearOrigin";isc.A.filterHiddenItems=true;isc.A.itemHiddenProperty="hidden";isc.A.$oz="left";isc.A.$o1="right";isc.B.push(isc.A.init=function isc_Menu_init(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){this.$173d=(_1&&_1.showKeys!=null)||(_2&&_2.showKeys!=null)||(_3&&_3.showKeys!=null)||(_4&&_4.showKeys!=null)||(_5&&_5.showKeys!=null);this.$173c=(_1&&_1.showSubmenus!=null)||(_2&&_2.showSubmenus!=null)||(_3&&_3.showSubmenus!=null)||(_4&&_4.showSubmenus!=null)||(_5&&_5.showSubmenus!=null);this.$173b=(_1&&_1.showIcons!=null)||(_2&&_2.showIcons!=null)||(_3&&_3.showIcons!=null)||(_4&&_4.showIcons!=null)||(_5&&_5.showIcons!=null);this.$173k=(_1&&_1.bodyStyleName!=null)||(_2&&_2.bodyStyleName!=null)||(_3&&_3.bodyStyleName!=null)||(_4&&_4.bodyStyleName!=null)||(_5&&_5.bodyStyleName!=null);return this.Super("init",arguments)},isc.A.initWidget=function isc_Menu_initWidget(){this.$35l();this.position=isc.Canvas.ABSOLUTE;var _1=this.initialCriteria||this.criteria;var _2=this.$1053;if(this.dataSource!=null&&!this.hasFlatDataSource()){var _3=this;var _4=this.createResultTree(_1,null,{showPrompt:false,dataProperties:isc.addProperties({autoOpenRoot:false,getOperationId:function(_12,_13,_14){var _5;if(_12==_3.dataSource&&_2!==_5){return _2}else{return this.Super("getOperationId",arguments)}}},this.dataProperties)});if(this.items)_4.addList(this.items,_4.getRoot());if(this.loadDataOnDemand==false){_4.loadChildren(_4.getRoot(),{caller:this,methodName:"treeDataLoaded"})}
this.data=_4}else if(this.dataSource!=null){var _6=isc.DataSource.get(this.dataSource),_7=this.requestProperties||{},_5;if(_2!==_5){isc.addProperties(_7,{operationId:_2})}
_6.fetchData(_1,{caller:this,methodName:"flatDataLoaded"},_7)}
if(this.data==null&&this.items!=null)this.data=this.items;if(isc.Tree&&isc.isA.Tree(this.data)){this.setTreeData(this.data,false)}
if(!this.fields){this.$51r=true;this.fields=[];this.$173e()}else{this.$51r=false;for(var i=0;i<this.fields.length;i++){var _9=this.fields[i];_9=this.getStandardField(_9);if(_9==null){this.fields.removeAt(i);i-=1}else{this.fields[i]=_9}}}
this.Super(this.$oc);if(isc.Browser.isSafari){isc.addProperties(this.submenuImage,{align:"BOTTOM"});isc.addProperties(this.submenuDisabledImage,{align:"BOTTOM"})}
if(isc.Browser.isStrict){isc.addProperties(this.submenuImage,{align:"absmiddle"});isc.addProperties(this.submenuDisabledImage,{align:"absmiddle"})}
if(this.useKeys&&this.data&&this.data.length>0)this.setUpKeyListening();if(this.$35k){if(!this.treeParentNode)this.treeParentNode=this.$35k.getRoot();this.setTreeNode(this.treeParentNode)}
if(this.placement==null&&isc.Browser.isHandset){this.placement="fillScreen"}
if(this.placement=="fillScreen"||this.placement=="halfScreen"||this.placement=="fillPanel")
{var _10=(this.placement=="halfScreen")?"50%":"100%";this.setWidth(_10);this.autoDismissOnBlur=false;this.showShadow=false;this.showEdges=false;if(this.$1431==null){this.$1432=this.createAutoChild("navigationBar",{rightButtonTitle:this.cancelButtonTitle});this.$1431=this.createAutoChild("navStack",{width:_10,navigationBar:this.$1432});if(this.placement=="fillScreen"){this.$148b=this.createAutoChild("navStackContainer",{children:[this.$1431]})}
var _11=this;this.$1431.push(this,function(){if(!_11.$35v)_11.$35w()})}}
if(this.$171q==null)this.$171q=this.bodyStyleName},isc.A.$173e=function isc_Menu__setToStandardFields(){var _1=[];var _2,_3;_2=(this.getSubmenuDirection()==this.$oz);_3=(_2!=this.isRTL());if(_3){_1.add(this.getSubmenuField())}
_1.add(this.getIconField());_1.add(this.$142p());_1.add(this.getKeyField());if(!_3)_1.add(this.getSubmenuField());this.$173f=true;this.setFields(_1);delete this.$173f;this.markForRedraw()},isc.A.isVisible=function isc_Menu_isVisible(){if(!this.$1431){return this.Super("isVisible",arguments)}else{return this.$1431.isVisible()}},isc.A.setTreeData=function isc_Menu_setTreeData(_1,_2){this.$35k=_1;this.childrenProperty=_1.childrenProperty;var _3=_1.getChildren(),_4=this.mergeSingleParent&&!isc.isA.ResultTree(this.$35k)&&_3.length==1&&_1.hasChildren(_3[0]);if(_4){var _5=_3[0];this.data=_1.getChildren(_5).duplicate();this.data.add({isSeparator:true});var _6={};isc.addProperties(_6,_5);_6[this.childrenProperty]=null;this.data.add(_6)}else{this.data=null}
if(_2&&this.$35k){this.treeParentNode=this.$35k.getRoot();this.setTreeNode(this.treeParentNode)}},isc.A.hasFlatDataSource=function isc_Menu_hasFlatDataSource(){var _1=isc.DataSource.get(this.dataSource);var _2=_1.childrenField!=null||(this.dataProperties&&this.dataProperties.modelType=="children");var _3=_1.getFieldNames();var _4=false,_5=false;for(var i=0;i<_3.length;i++){var _7=_1.getField(_3[i]);if(_7.primaryKey)_4=true;if(_7.foreignKey)_5=true}
return!(_2||(_4&&_5))},isc.A.setFields=function isc_Menu_setFields(_1,_2,_3,_4,_5){if(_1&&(!this.$173f||(_1!=this.fields))){this.$51r=false;for(var i=0;i<this.fields.length;i++){var _7=this.fields[i];_7=this.getStandardField(_7);if(_7==null){this.fields.removeAt(i);i-=1}else{this.fields[i]=_7}}}
this.invokeSuper(isc.Menu,"setFields",_1,_2,_3,_4,_5)},isc.A.treeDataLoaded=function isc_Menu_treeDataLoaded(){this.treeDataArrived(this.$35m)},isc.A.setTreeNode=function isc_Menu_setTreeNode(_1){var _2=this.$35k.getLoadState(_1);this.$35m=_1;if(_2==isc.Tree.LOADED){this.treeDataArrived(_1)}else if(_2!=isc.Tree.LOADING){this.$35k.loadChildren(_1,this.getID()+".treeDataArrived(node)");this.$35n=true;this.setData(null)}},isc.A.$66d=function isc_Menu__dataArrived(_1){var _2=this.Super("$66d",arguments);if(this.isDrawn()&&this.enforceMaxHeight&&(!this.$35m||_1==this.$35m))
{if(this.isDirty()||this.body.isDirty())this.redraw();if(this.$rm)this.adjustOverflow();this.doEnforceMaxHeight()}
return _2},isc.A.treeDataArrived=function isc_Menu_treeDataArrived(_1){delete this.$35n;if(_1==this.$35m){var _2=this.$35k.getChildren(_1);if(isc.isA.ResultSet(_2)){_2=_2.getAllLoadedRows()}
this.setData(_2);if(this.masterMenu&&this.masterMenu.isVisible())
this.masterMenu.placeSubmenu(_1,this)}
if(this.$124p){delete this.$124p;this.$318(1)}},isc.A.flatDataLoaded=function isc_Menu_flatDataLoaded(_1,_2){this.setData(_2)},isc.A.getEmptyMessage=function isc_Menu_getEmptyMessage(){if(this.$35n){return this.loadingDataMessage==null?"&nbsp;":this.loadingDataMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})}
return this.Super("getEmptyMessage",arguments)},isc.A.cssVariablesChanged=function isc_Menu_cssVariablesChanged(_1){this.redraw()},isc.A.isEmpty=function isc_Menu_isEmpty(){if(this.$35n)return true;return this.Super("isEmpty",arguments)},isc.A.$35l=function isc_Menu__setUpEmptyMessage(){isc.addProperties(this,{emptyMessageTableStyle:this.tableStyle,emptyMessageStyle:this.baseStyle+"Disabled"})},isc.A.$31m=function isc_Menu__observeData(_1,_2,_3,_4,_5){var _6;if(this.$35k){_6=this.isObserving(this.$35k,"dataChanged");_1=this.$35k}
if(!_6)this.invokeSuper(isc.Menu,"$31m",_1,_2,_3,_4,_5)},isc.A.draw=function isc_Menu_draw(){if(!this.ruleScope&&this.$112p){this.ruleScope=this.$112p.ruleScope}
var _1=this.Super("draw",arguments);this.$165q();return _1},isc.A.$235d=function isc_Menu__getRuleNamePrefix(_1){var _2=this.Super("$235d",arguments);if(_1.menuItem){_2+="$2341"+_1.menuItem}
return _2},isc.A.processVisibilityRule=function isc_Menu_processVisibilityRule(_1,_2){if(_2.targetObjectType=="MenuItem"){var _3=!this.itemIsHidden(_2.menuItem);if(_3!=_1){this.setItemHidden(_2.menuItem,!_1);return true}else{return false}}
return this.Super("processVisibilityRule",arguments)},isc.A.processEnableRule=function isc_Menu_processEnableRule(_1,_2){if(_2.targetObjectType=="MenuItem"){var _3=this.itemIsEnabled(_2.menuItem);if(_3!=_1){this.setItemEnabled(_2.menuItem,!!_1);return true}else{return false}}
return this.Super("processEnableRule",arguments)},isc.A.$165q=function isc_Menu__createMenuWhenRules(){if(this.$165r)return;var _1=this.getRuleScopeComponent();if(!_1)return null;var _2=[];var _3=this.getAllItems();for(var i=0,_5=_3.length;i<_5;++i){var _6=_3[i];if(!_6)continue;if(_6.enableWhen&&!_6.enableIf){var _7=this.$1636("enable",_6.enableWhen,{targetObjectType:"MenuItem",menuItem:i});if(_7.applyWhen&&_7.applyWhen.fixedValue!=null){_7.negateShouldApply=true}
_2.add(_7)}
if(_6.visibleWhen){var _7=this.$1636("visibility",_6.visibleWhen,{targetObjectType:"MenuItem",menuItem:i});if(_7.applyWhen&&_7.applyWhen.fixedValue!=null){_7.negateShouldApply=true}
_2.add(_7)}}
if(_2.length>0){var _8=this.getRulesEngine();if(!_8){return}
_8.addMember(this);var _9=[];for(var i=_2.length-1;i>=0;i--){var _7=_2[i];if(_7.applyWhen&&_7.applyWhen.fixedValue!=null){delete _7.applyWhen;_9.add(_7);_2.removeAt(i)}}
if(_9.length>0){_8.processRules(_9)}
for(var i=0;i<_2.length;i++){_8.addRule(_2[i])}
_8.processContextRules(_2,this)}
this.$165r=true},isc.A.$165s=function isc_Menu__removeMenuWhenRules(){var _1=this.getRuleScopeComponent();if(_1&&_1.rulesEngine){var _2=this.getAllItems();for(var i=0,_4=_2.length;i<_4;++i){var _5=_2[i];if(_5&&_5.enableWhen)this.$1637("enable",{menuItem:i});if(_5&&_5.visibleWhen)this.$1637("visibility",{menuItem:i})}}
delete this.$165r},isc.A.getDataSource=function isc_Menu_getDataSource(_1){var _2=this.invokeSuper(isc.Menu,"getDataSource");if(_2||!_1)return _2;return this.$350?this.$350.getDataSource():null},isc.A.rowClick=function isc_Menu_rowClick(_1,_2,_3){this.Super("rowClick",arguments);this.selectMenuItem(_2,_3)},isc.A.selectMenuItem=function isc_Menu_selectMenuItem(_1,_2){if(_1==null)_1=this.getEventRecordNum();_1=this.getItem(_1);var _3=true;if(_1==null||!this.itemIsEnabled(_1)){isc.Menu.hideAllMenus("itemClick");return false}
if(_1.canSelect==false)return false;if(this.hasSubmenu(_1)){var _4=false;if(!this.canSelectParentItems&&!_1.canSelectParent){_4=true}else{var _5=this.getFieldNum("title");var _6=this.body.getTableElement(this.getEventRecordNum(),_5);var _7;if(!this.body.$28v(this.body.cellHeight)){_7=_6}else{_7=this.body.$28g(_6)}
if(_7!=null){var _8=_7.innerHTML;_7.innerHTML="<span>"+_8+"</span>";var _9=_7.firstChild.offsetWidth;_7.innerHTML=_8;var _10=this.body.getColumnSizes(),_11=0,_12=0;for(var i=0;i<_5;i++){_11+=_10[i]}
var _14=this.getFieldNum("submenu");for(var i=0;i<_14;i++){_12+=_10[i]}
var x=this.getOffsetX();var _16=0;if(x<_11){_16=_11-x}else{_16=x-(_11+_9)}
var _17=0;if(x<_12){_17=_12-x}else{_17=x-(_12+_10[_14])}
_4=_16>_17}}
if(_4){if(!this.$1431){if(this.submenuTimer)this.submenuTimer=isc.Timer.clear(this.submenuTimer);if(this.$35p!=_1)this.hideSubmenu();this.showSubmenu(_1)}else{var _18=this;var _19=this.getSubmenu(_1);if(_19){_19.$35q=this;_19.$35r=this.getVisibleItemNum(_1)}
this.$1431.push(_19,function(){if(!_18.$35v)_18.$35w()})}
return false}}
var _20=this;while(_20.$35q){_20=_20.$35q}
if(this.autoDismiss&&(_1.autoDismiss||_1.autoDismiss==null)){isc.Menu.hideAllMenus("itemClick")}
if(_1.action){if(!isc.isA.Function(_1.action)){isc.Func.replaceWithMethod(_1,"action","")}
if(_1.action()==false)return false}
if(_1.click){if(!isc.isA.Function(_1.click)){if(this.$112p&&!_1.$112p)_1.$112p=this.$112p;isc.Func.replaceWithMethod(_1,"click","target,item,menu,colNum")}
var _21=(this.target?this.target:this);if(this.ruleScope)_1.ruleScope=this.ruleScope;_3=_1.click(_21,_1,this,_2);delete _1.ruleScope}
if(_3!=false){_3=this.itemClick(_1,_2)}
if(!(this.autoDismiss&&(_1.autoDismiss||_1.autoDismiss==null))){this.refreshRow(this.getRecordIndex(_1))}
return _3},isc.A.mouseOver=function isc_Menu_mouseOver(){var _1=this.$35q;if(_1&&_1.body.lastOverRow!=this.$35r){if(_1.submenuTimer)_1.submenuTimer=isc.Timer.clear(_1.submenuTimer);_1.$88(this.$35r);if(this.showParentStyle){_1.showParentStyle.show=true;_1.refreshRow(this.$35r)}}},isc.A.rowOver=function isc_Menu_rowOver(_1,_2){if(this.showParentStyle&&(_1.submenu||_1.children||(this.showParentStyle.show&&!this.hasSubmenu(_1))))
{this.showParentStyle.show=false;this.refreshRow(_2)}
if((this.placement!=null&&this.placement!="nearOrigin")||isc.Browser.isTablet){return}
if(this.submenuTimer)this.submenuTimer=isc.Timer.clear(this.submenuTimer);this.submenuTimer=isc.Timer.setTimeout({target:this,method:this.changeSubmenu},this.submenuDelay)},isc.A.getShowSubmenuKey=function isc_Menu_getShowSubmenuKey(){return this.getSubmenuDirection()=="right"?"Arrow_Right":"Arrow_Left"},isc.A.getHideSubmenuKey=function isc_Menu_getHideSubmenuKey(){return this.getSubmenuDirection()=="right"?"Arrow_Left":"Arrow_Right"},isc.A.bodyKeyPress=function isc_Menu_bodyKeyPress(_1,_2){var _3=isc.EventHandler.lastEvent.keyName;if(_3==this.getHideSubmenuKey()){if(this.$35q!=null){this.$35q.hideSubmenu();this.$35q.focus();return false}}else if(_3==this.getShowSubmenuKey()){var _4=this.getItem(this.getFocusRow());if(this.hasSubmenu(_4)){this.changeSubmenu();var _5=this.$35s;if(_5.$35n)_5.$124p=true;else _5.$318(1);return false}}else if(_3=="Escape"&&this.autoDismissOnBlur!=false){if(this.$35q!=null){this.$35q.hideSubmenu();this.$35q.focus()}else{isc.Menu.hideAllMenus("outsideClick")}
return false}else if(_3=="Enter"){return this.$240()}
return this.Super("bodyKeyPress",arguments)},isc.A.$318=function isc_Menu__navigateToNextRecord(_1){var _2=this.getFocusRow();if(_2==null)_2=0;if(_1==-1){do{_2+=_1;if(_2<0){this.hide();return false}}while(!this.itemIsEnabled(_2))}
return this.Super("$318",arguments)},isc.A.show=function isc_Menu_show(_1){if(this.$172j){return this.Super("show",arguments)}
if(isc.EH.mouseIsDown()){if(isc.Menu.mouseDownEventID==null)isc.Menu.mouseDownEventID=0;else isc.Menu.mouseDownEventID++;isc.EH.mouseDownEvent.$173o=isc.Menu.mouseDownEventID}
this.$173l();var _2=this.$1431!=null&&this.$172k==null;var _3=_2?(this.$148b||this.$1431||this):this;if(this.$1431&&_3.isVisible()&&_3.isDrawn()){if(this.autoSetDynamicItems)this.setDynamicItems();return}
if(_2&&this.placement=="fillPanel"&&isc.Menu.$358){var c=isc.Menu.$358.getParentCanvas();this.$1431.setRect(c.getLeft(),c.getTop(),c.getWidth(),c.getHeight())}
if(this.$35t){_3.moveTo(this.$35u[0],this.$35u[1]);this.$35t=null}
if(_1==null)_1=this.showAnimationEffect;var _5=!this.$35v&&(_1!=null)&&(_1!="none");if(_5){this.$35v=true;this.animateShow(_1,"this.$35w()");return}
if(this.autoSetDynamicItems)this.setDynamicItems()
if(!_3.isDrawn()){if(_3.contains(this))this.$172j=true;if(!this.ruleScope){if(this.$112p)this.ruleScope=this.$112p.getRuleScope();if(!_3.ruleScope){var _6=this.getRuleScope();if(_6)_3.ruleScope=_6}}
_3.draw(true);delete this.$172j}
if(this.body)this.body.focusOnHide=isc.EH.getFocusCanvas();isc.Menu.$kc.add(this);if(this.autoDismissOnBlur){isc.Menu.$781()}
_3.bringToFront();var _7=(this.placement=="fillScreen")&&_2&&!this.$1431.$148a;this.Super("show",arguments);if(_2&&!_3.isVisible()){_3.show()}
if(_7){this.$1431.$148c()}else if(!this.$35v){this.$35w()}
if(this.rulesEngine&&!this.$165t){this.rulesEngine.processContextChanged(this);this.$165t=true}},isc.A.$35w=function isc_Menu__showComplete(){if(!this.body||this.$1431&&this.$1431.$1430()){return}
if(this.$35v)delete this.$35v;if(isc.Browser.isMoz){this.getClipHandle().offsetLeft}
this.body.focus()},isc.A.$173l=function isc_Menu__updateBodyStyleName(){var _1=this.getFields(),_2=(_1[0].name=="icon"&&_1[0].$109b==true),_3=(this.placement=="fillScreen"||this.placement=="halfScreen"||this.placement=="fillPanel");var _4=this.$171q;if(_3){if(_2&&this.iconFillSpaceStyleName!=null){_4=this.iconFillSpaceStyleName;if(this.isRTL())_4+="RTL"}else if(this.fillSpaceStyleName!=null){_4=this.fillSpaceStyleName}
if(this.placement=="fillScreen"&&this.$1431){this.$1431.setStyleName(_4+"Animated")}}else{if(_2&&this.iconBodyStyleName!=null){_4=this.iconBodyStyleName;if(this.isRTL())_4+="RTL"}}
this.$173m=true;this.setBodyStyleName(_4)
this.$173m=false},isc.A.setBodyStyleName=function isc_Menu_setBodyStyleName(_1){if(!this.$173m){this.$173k=_1;this.$171q=_1}
return this.Super("setBodyStyleName",arguments)},isc.A.placeNear=function isc_Menu_placeNear(){if(!this.$1431)this.Super("placeNear",arguments)},isc.A.hide=function isc_Menu_hide(_1){if(this.$1431){isc.Menu.$kc.remove(this);if(this.$1431.visibility==isc.Canvas.HIDDEN)return;this.$91y();if(this.placement=="fillScreen"){if(_1!=false){this.$1431.$148d()}else{this.$1431.$148a=false;this.$1431.$2891()}}else{this.$1431.setSinglePanel(this.$350||this);this.$1431.hide()}}else{if(this.visibility==isc.Canvas.HIDDEN)return;this.$91y();this.Super("hide",arguments)}
this.clearLastHilite();this.$31q=null;if(this.$35p)delete this.$35p;if(this.submenuTimer)isc.Timer.clearTimeout(this.submenuTimer);var _2=isc.Menu.$358;if(_2&&_2.menu===this){delete _2.$289t;_2.setCustomState("");delete isc.Menu.$358}},isc.A.showContextMenu=function isc_Menu_showContextMenu(_1){if(_1&&(_1.target==this||(this.body&&_1.target==this.body)||(_1.target&&_1.target.topElement==this)))
{if(this.body){if(isc.Browser.isSafari){this.body.$29u=this.getEventRow();this.body.$29v=this.getEventColumn()}
this.body.click()}
if(_1.target&&_1.target.topElement==this){_1.target.click()}
return false}
var _2;if(isc.isA.Canvas(_1))_2=_1;if(_1!=null&&_1.target!=null)_2=_1.target;if(_2!=null)this.target=_2;this.positionContextMenu();this.show();return false},isc.A.getMaxHeight=function isc_Menu_getMaxHeight(){if(this.maxHeight!=null)return this.maxHeight;var _1=this.$1432==null?0:this.$1432.getHeight();return isc.Page.getHeight()-this.getScrollbarSize()-_1},isc.A.$8h=function isc_Menu__showOffscreen(){var _1=this.$148b||this.$1431||this;if(!_1.isDrawn()){_1.setVisibility(isc.Canvas.HIDDEN);_1.draw()}
_1.setVisibility(isc.Canvas.VISIBLE);this.$91y();if(this.isDirty()||this.body.isDirty())_1.redraw();if(this.$rm)this.adjustOverflow();if(!this.$35y&&this.enforceMaxHeight){this.doEnforceMaxHeight()}
_1.setVisibility(isc.Canvas.HIDDEN)},isc.A.doEnforceMaxHeight=function isc_Menu_doEnforceMaxHeight(){if(this.overflow!=isc.Canvas.VISIBLE){this.leaveScrollbarGap=false;this.setOverflow(isc.Canvas.VISIBLE);this.setHeight(this.defaultHeight);this.setWidth(this.$35z||this.defaultWidth);this.adjustOverflow()}
var _1=this.getVisibleHeight(),_2=this.getVisibleWidth(),_3=this.getMaxHeight();if(this.overflow==isc.Canvas.VISIBLE&&_1>_3){this.leaveScrollbarGap=true;this.setHeight(_3);this.$35z=this.$pn||this.getWidth();this.setWidth(this.getVisibleWidth()+this.getScrollbarSize()+this.getHMarginBorder());this.setOverflow(isc.Canvas.AUTO);this.adjustOverflow()}
this.$35y=true;if(!this.$123w){this.$123w=isc.Page.setEvent("resize",this,null,"pageResized")}},isc.A.pageResized=function isc_Menu_pageResized(){if(this.enforceMaxHeight)this.doEnforceMaxHeight()},isc.A.$253v=function isc_Menu__dataChanged(_1,_2,_3,_4){if(this.$35k&&this.$35m!=null){if(!this.$501(this.$35m)){if(this.$35q==null){this.setTreeNode(this.$35k.getRoot())}else{this.destroy(true);return}}}
var _5=this.invokeSuper(isc.Menu,"$253v",_1,_2,_3,_4);delete this.$35y;return _5},isc.A.$501=function isc_Menu__treeContains(_1){while(_1){if(this.$35k.isRoot(_1))return true;_1=this.$35k.getParent(_1)}
return false},isc.A.setData=function isc_Menu_setData(_1,_2,_3,_4){var _5;if(isc.Tree&&isc.isA.Tree(_1)){this.setTreeData(_1,true)}else{var _6=_1;if(_1==null&&this.data!=null)_6=this.data;if(this.filterHiddenItems&&isc.FilteredList!=null&&isc.isA.Array(_6)){var _7=false;for(var i=0;i<_6.length;i++){if(_6[i][this.itemHiddenProperty]||_6[i].visibleWhen!=null){_7=true;break}}
if(_7){var _9=this.createFilteredResultSet(_6);if(_9&&_9!=_6){_1=_9}}}
_5=this.Super("setData",[_1,_2,_3,_4],arguments)}
delete this.$35y;if(this.useKeys&&_1&&_1.getLength()>0){if(this.registeredKeys){for(var i=0;i<this.registeredKeys.length;i++){isc.Page.unregisterKey(this.registeredKeys[i],this)}}
this.setUpKeyListening()}
return _5},isc.A.setItems=function isc_Menu_setItems(_1,_2,_3,_4){return this.setData(_1,_2,_3,_4)},isc.A.createFilteredResultSet=function isc_Menu_createFilteredResultSet(_1){var _2=this.getFilteredResultSetCriteria();if(this.$235f==null){this.$235f=isc.FilteredList.create({$235g:true,allRows:_1,criteria:_2})}else{this.$235f.$78z(_1);this.$235f.setCriteria(_2)}
return this.$235f},isc.A.getFilteredResultSetCriteria=function isc_Menu_getFilteredResultSetCriteria(){if(!this.itemHiddenProperty)return{};return{operator:"notEqual",fieldName:this.itemHiddenProperty,value:true}},isc.A.getAllItems=function isc_Menu_getAllItems(){if(this.data&&this.data.$235g){return this.data.allRows}
return this.data||this.items},isc.A.getMenuItem=function isc_Menu_getMenuItem(_1){return isc.Class.getArrayItem(_1,this.getAllItems(),"name")},isc.A.$91y=function isc_Menu__moveMenuOffscreen(){if(this.parentElement!=null)return;if(this.$35t)return;this.$35u=[this.getLeft(),this.getTop()];this.moveTo(0,-9999);this.$35t=true},isc.A.moveBy=function isc_Menu_moveBy(){var _1=this.Super("moveBy",arguments);if(this.$35t)this.$35t=false;return _1},isc.A.resizeBy=function isc_Menu_resizeBy(_1,_2,_3,_4,_5,_6){if((_1!=null&&_1!=0)||(_2!=null&&_2!=0))delete this.$35y;return this.invokeSuper(isc.Menu,"resizeBy",_1,_2,_3,_4,_5,_6)},isc.A.hideContextMenu=function isc_Menu_hideContextMenu(){this.hide()},isc.A.positionContextMenu=function isc_Menu_positionContextMenu(){if(this.rulesEngine&&!this.$165t){this.rulesEngine.processContextChanged(this);this.$165t=true}
this.$8h();var _1=isc.EH.getLastEvent(),_2=_1.x,_3=_1.y;if(isc.Browser.isKatalon&&!isc.Browser.isWin){_2++,_3++}
if(this.isRTL()){_2-=this.getVisibleWidth()}
this.placeNear(_2,_3)},isc.A.getItem=function isc_Menu_getItem(_1,_2){var _3=!_2?this.getItems():this.getAllItems();return isc.Class.getArrayItem(_1,_3,"name")},isc.A.setItemProperties=function isc_Menu_setItemProperties(_1,_2){var _1=this.getItem(_1);if(_1!=null){isc.addProperties(_1,_2)}
if(this.isVisible())this.redraw()},isc.A.getItemNum=function isc_Menu_getItemNum(_1){var _2=this.getAllItems()||[];return isc.Class.getArrayItemIndex(_1,_2,"name")},isc.A.getVisibleItemNum=function isc_Menu_getVisibleItemNum(_1){var _2=this.data||[];return _2.indexOf(_1)},isc.A.convertToVisbleItemNum=function isc_Menu_convertToVisbleItemNum(_1){return this.getVisibleItemNum(this.getItem(_1,true))},isc.A.getItems=function isc_Menu_getItems(){return this.getData()},isc.A.addItem=function isc_Menu_addItem(_1,_2){if(_1.click){if(!isc.isA.Function(_1.click)){isc.Func.replaceWithMethod(_1,"click","target,item,menu,colNum")}}
var _3=this.getAllItems()||[];if(_2==null)_2=_3.getLength();_3.addAt(_1,_2);this.setData(_3)},isc.A.removeItem=function isc_Menu_removeItem(_1){this.data.remove(_1);this.markForRedraw()},isc.A.changeSubmenu=function isc_Menu_changeSubmenu(){var _1=this.getItem(this.body.lastOverRow);if(_1&&this.$35p==_1)return;if(!this.$1431){this.hideSubmenu();if(_1!=null)this.showSubmenu(_1)}else{var _2=this.getSubmenu(_1);var _3=this;if(_2!=null){if(_2.autoSetDynamicItems)_2.setDynamicItems();this.$1431.push(_2,function(){if(!_3.$35v)_3.$35w()})}}},isc.A.hasSubmenu=function isc_Menu_hasSubmenu(_1){if(!_1)return false;if(_1.submenu)return true;if(this.fetchSubmenus==false||_1.fetchSubmenus==false)return false;if(isc.isA.Tree(this.$35k)){return(this.$35k.isFolder(_1)&&((isc.ResultTree&&isc.isA.ResultTree(this.$35k))||this.$35k.hasChildren(_1)))}
return false},isc.A.getCellStyle=function isc_Menu_getCellStyle(_1,_2,_3){var _4=this.Super("getCellStyle",arguments);if(this.showParentStyle&&this.showParentStyle.show)
_4=_4.replace("Over",this.activeParentStyle);if(_1&&_1.isSeparator)_4=this.separatorRowStyle||this.cellStyle;return _4},isc.A.showSubmenu=function isc_Menu_showSubmenu(_1){var _2=this.getSubmenu(_1);if(!_2)return;if(this.activeParentStyle=="Selected"){this.showParentStyle={show:false}
var _3=this.getRecordIndex(_1);this.refreshRow(_3);_2.showParentStyle=this.showParentStyle}
this.placeSubmenu(_1,_2)},isc.A.getSubmenu=function isc_Menu_getSubmenu(_1){_1=this.getItem(_1);if(!this.hasSubmenu(_1))return;var _2=isc.applyMask(this,this.submenuInheritanceMask);if(!this.$51r){var _3=[];var _4=this.completeFields||this.fields;for(var i=0;i<_4.length;i++){_3[i]=isc.addProperties({},_4[i])}
_2.fields=_3}
if(this.cascadeAutoDismiss){_2.autoDismiss=this.autoDismiss}
if(this.placement){_2.placement=this.placement;_2.$1431=this.$1431}
var _6=this.getID()+"$1773";var _7=_1.submenu;if(_1[_6]){if(_1[_6].destroying||_1[_6].destroyed){delete _1[_6]}else{_7=_1[_6]}}
if(!_7){var _8=(this.$350||this),_9=(_8==this?0:!this.$351?0:this.$351);if(!_8.$352)_8.$352=[];this.logDebug("RootMenu:"+_8.getID()+", submenus:"+_8.$352+", Level:"+_9);_7=_8.$352[_9];if(!_7){isc.addProperties(_2,{ID:(_8.getID()+"_childrenSubMenu_"+_9),$350:_8,$351:_9+1,autoDraw:false,treeParentNode:this.$35k?_1:null,masterMenu:this});var _10=this.submenuConstructor||this.menuConstructor||isc.Menu;_7=isc.ClassFactory.newInstance(_10,_2);_8.$352[_9]=_7;_8.observe(_7,"destroy",function(){this.submenuDestroyed(_9)})}}else if(!isc.isA.Menu(_7)){if(!this.$352)this.$352=[];if(isc.isA.String(_7)){_7=window[_7]}else if(isc.isAn.Array(_7)){_7=this.getMenuConstructor().create({autoDraw:false,data:_7},_2);this.$352.add(_7)}else if(isc.isAn.Object(_7)){_7=this.getMenuConstructor().create(isc.addProperties({autoDraw:false},_2,_7));this.$352.add(_7)}
_1[_6]=_7;if(_7&&_7.__sgwtRelink)_7.__sgwtRelink()}else{if(this.placement){_7.placement=this.placement;_7.$172k=this.$1431}}
if(this.showAnimationEffect){_7.showAnimationEffect=this.showAnimationEffect}
if(_7.placement!=null&&_7.placement!="nearOrigin"){_7.autoDismissOnBlur=false}
if(!_7.$173k&&_7.$171q==null){_7.$171q=this.$171q}
if(!_7.$173b)_7.setShowIcons(this.showIcons);if(!_7.$173c)_7.setShowSubmenus(this.showSubmenus);if(!_7.$173d){_7.showKeys=this.showKeys}
if(_7.refreshFields!=null)_7.refreshFields();if(this.$35k)_7.setTreeNode(_1);_7.$350=this.$350||this;return _7},isc.A.submenuDestroyed=function isc_Menu_submenuDestroyed(_1){delete this.$352[_1]},isc.A.placeSubmenu=function isc_Menu_placeSubmenu(_1,_2){var _3=(this.$35p==_1&&this.$35s==_2);var _4=this.getVisibleItemNum(_1);if(!this.$1431){_2.$8h();if(_2.$3n)_2.reflowNow();var _5=_2.getPeerRect(),_6=isc.Canvas.$t7(_5[2],_5[3],{left:this.getPageLeft()-this.submenuOffset,width:this.getVisibleWidth()+this.submenuOffset,top:this.body.getRowPageTop(_4)},this.getSubmenuDirection()==this.$oz?this.$oz:this.$o1,false)
_2.setPageRect(_6[0],_6[1]);if(_3){_2.setVisibility(isc.Canvas.INHERIT)}}
if(_3)return;this.$35p=_1;this.$35s=_2;if(this.target!=this&&_2.target!=_2){_2.target=this.target}
_2.show();_2.$35q=this;_2.$35r=_4;if(isc.Menu.$353)delete isc.Menu.$353[this.getID()]},isc.A.menuTreeContains=function isc_Menu_menuTreeContains(_1,_2){if(this.contains(_1,_2))return true;var _3=this.$352;if(_3&&_3.length>0){for(var i=0;i<_3.length;i++){if(_3[i].menuTreeContains(_1,_2))return true}}
return false},isc.A.hideMenuTree=function isc_Menu_hideMenuTree(){this.hideSubmenu();this.hide()},isc.A.hideSubmenu=function isc_Menu_hideSubmenu(){if(this.$35s){this.$35s.hideSubmenu();this.$35s.hide();delete this.$35s;delete this.$35p}});isc.evalBoundary;isc.B.push(isc.A.getSubmenuImage=function isc_Menu_getSubmenuImage(_1){if(!this.hasSubmenu(_1))return"&nbsp;";if(!this.$354){var _2=(this.getSubmenuDirection()==this.$oz),_3=isc.addProperties({},!isc.isA.String(this.submenuImage)?this.submenuImage:{src:this.submenuImage}),_4=isc.addProperties({},!isc.isA.String(this.submenuDisabledImage)?this.submenuDisabledImage:{src:this.submenuDisabledImage});_3.src=isc.Img.urlForState(_3.src,null,null,(_2?this.$oz:null));_4.src=isc.Img.urlForState(_4.src,null,null,(_2?this.$oz:null));this.$354=this.imgHTML(_3);this.$355=this.imgHTML(_4)}
return(this.itemIsEnabled(_1)?this.$354:this.$355)},isc.A.itemIsEnabled=function isc_Menu_itemIsEnabled(_1){_1=this.getItem(_1);return(_1&&_1.enabled!=false&&_1.isSeparator!=true)},isc.A.setDynamicItems=function isc_Menu_setDynamicItems(){if(this.enableIf){isc.Func.replaceWithMethod(this,"enableIf","target,menu")}
var _1=false,_2=this.target,_3=this,_4=isc.isA.Function(this.enableIf)&&this.enableIf(_2,_3),_5=isc.isAn.Object(_4)&&isc.getKeys(_4),_6=_5?_5.length:0,_7="target,menu,item"+(_5?","+_5.join(","):""),_8=[_2,_3,null];if(_6>0){_8.addListAt(isc.getValues(_4),3)}
var _9=this.getAllItems();if(!_9)return;for(var i=0,_11=_9.length;i<_11;++i){var _12=this.getItem(i,true);if(!_12)continue;_8[2]=_12;if(_12.enableIf!=null){var _13;if(_12.enableIf===this.$18q){_13=true}else if(_12.enableIf===this.$18r){_13=false}else{isc.Func.replaceWithMethod(_12,"enableIf",_7);_13=_12.enableIf.apply(_12,_8)}
_1|=this.$59g(i,_13)}
if(_12.checkIf){var _14;if(_12.checkIf===this.$18q){_14=true}else if(_12.checkIf===this.$18r){_14=false}else{isc.Func.replaceWithMethod(_12,"checkIf",_7);_14=_12.checkIf.apply(_12,_8)}
_1|=this.$59h(i,_14)}
if(_12.dynamicTitle){isc.Func.replaceWithMethod(_12,"dynamicTitle",_7);_1|=this.setItemTitle(i,_12.dynamicTitle.apply(_12,_8))}
if(_12.dynamicIcon){isc.Func.replaceWithMethod(_12,"dynamicIcon",_7);_1|=this.setItemIcon(i,_12.dynamicIcon.apply(_12,_8))}}
if(_1&&this.isDrawn()){this.redraw("dynamic item change");if(isc.Browser.isIE){this.body.setRowStyle(0)}}},isc.A.refreshRow=function isc_Menu_refreshRow(){if(this.autoSetDynamicItems)this.setDynamicItems();return this.Super("refreshRow",arguments)},isc.A.$59g=function isc_Menu__setItemEnabled(_1,_2){return this.setItemEnabled(_1,!!_2)},isc.A.$59h=function isc_Menu__setItemChecked(_1,_2){return this.setItemChecked(_1,!!_2)},isc.A.setItemEnabled=function isc_Menu_setItemEnabled(_1,_2){if(_2==null)_2=true;_1=this.getItem(_1);if(!_1)return;if(_1.enabled!=_2){_1.enabled=_2;this.markForRedraw("itemEnabled");return true}
return false},isc.A.setItemChecked=function isc_Menu_setItemChecked(_1,_2){if(_2==null)_2=true;_1=this.getItem(_1);if(!_1)return;if(_1.checked!=_2){_1.checked=_2;this.markForRedraw("itemChecked");return true}
return false},isc.A.itemIsHidden=function isc_Menu_itemIsHidden(_1){var _1=this.getItem(_1,true);return _1&&this.itemHiddenProperty&&_1[this.itemHiddenProperty]},isc.A.setItemHidden=function isc_Menu_setItemHidden(_1,_2){if(!this.itemHiddenProperty){this.logWarn("itemHiddenProperty is unset on this Menu - ignoring call to setItemHidden()");return}
_1=this.getItem(_1,true);var _3=false;if(_1!=null){if(_2==null)_2=true;_3=(_1[this.itemHiddenProperty]!=_2)
_1[this.itemHiddenProperty]=_2}
if(_3){if(this.data.filterLocalData){this.data.filterLocalData()}else{this.setData(this.data)}}
return _3},isc.A.setItemTitle=function isc_Menu_setItemTitle(_1,_2){_1=this.getItem(_1);if(!_1)return;if(_1.title!=_2){_1.title=_2;this.markForRedraw("item title change");return true}
return false},isc.A.setItemIcon=function isc_Menu_setItemIcon(_1,_2,_3){_1=this.getItem(_1);if(!_1)return;if(_1.icon!=_2){_1.icon=_2;if(_3)_1.disabledIcon=_3;this.markForRedraw("item icon change");return true}
return false},isc.A.getIcon=function isc_Menu_getIcon(_1){var _2=this.fixedIconWidth,_3=_2?this.iconWidth:null;var _4;if(_1.icon){var _5=(this.itemIsEnabled(_1)||!_1.disabledIcon?_1.icon:_1.disabledIcon);var _6={src:_5};_6.width=_1.iconWidth||this.iconWidth;_6.height=_1.iconHeight||this.iconHeight;if(isc.Browser.isStrict){_6.align="absmiddle"}
_4=this.imgHTML(_6);if(_2&&(_1.iconWidth==null||_1.iconWidth>=_3)){_2=false}else{_3-=_1.iconWidth}}
if(_1.checked){_4=this.getCheckmarkImage(_1);if(_2){var _7=this.checkmarkImage?this.checkmarkImage.width:this.iconWidth;if(_7<_3){_3-=_7}else{_2=false}}}
if(_2){if(_4)return _4+this.imgHTML("[SKIN]/../blank.gif",_3,1);else return this.imgHTML("[SKIN]/../blank.gif",_3,1)}
return _4||"&nbsp;"},isc.A.getItemTitle=function isc_Menu_getItemTitle(_1){var _2;if(this.$35k){_2=this.$35k.getTitle(_1)}else{_2=_1.title||_1.name||_1.id}
_2=_2||"&nbsp;";return _2},isc.A.getKeyTitle=function isc_Menu_getKeyTitle(_1){if(_1.keyTitle)return _1.keyTitle;return"&nbsp;"},isc.A.getCheckmarkImage=function isc_Menu_getCheckmarkImage(_1){if(!this.$356){if(isc.Browser.isStrict){if(isc.isAn.Object(this.checkmarkImage))this.checkmarkImage.align="absmiddle";if(isc.isAn.Object(this.checkmarkDisabledImage))
this.checkmarkDisabledImage.align="absmiddle"}
this.$356=this.imgHTML(this.checkmarkImage);this.$357=this.imgHTML(this.checkmarkDisabledImage)}
return(this.itemIsEnabled(_1)?this.$356:this.$357)},isc.A.setUpKeyListening=function isc_Menu_setUpKeyListening(){var _1="";var _2,_3,_4=this.data.getLength();this.registeredKeys=[];for(var i=0;i<_4;i++){_2=this.getItem(i);if(!_2)continue;_3=_2.keys;if(!_3)continue;if(!isc.isAn.Array(_3))_3=[_3];for(var _6,k=0,_8=_3.length;k<_8;k++){_6=_3[k];if(_6==null)continue;isc.Page.registerKey(_6,"target.menuKey("+i+");",this);this.registeredKeys.add(_6)}
if(!_2.keyTitle)this.setItemKeyTitle(_2,_3[0])}},isc.A.destroy=function isc_Menu_destroy(_1){if(this.registeredKeys){for(var i=0;i<this.registeredKeys.length;i++){isc.Page.unregisterKey(this.registeredKeys[i],this)}}
if(this.$352)this.$352.callMethod("destroy");if(this.$35k){var _3=this.$35k;if(!_1&&_3.$31k&&isc.isA.Function(_3.destroy)&&(_3.componentId==this.ID))
{_3.destroy()}else{this.$31j(_3)}
delete this.$35k}
if(this.$123w)isc.Page.clearEvent("resize",this.$123w);this.$165s();this.Super("destroy",arguments)},isc.A.menuKey=function isc_Menu_menuKey(_1){if(this.autoSetDynamicItems)this.setDynamicItems();return this.selectMenuItem(_1)},isc.A.setItemKeyTitle=function isc_Menu_setItemKeyTitle(_1,_2){var _3;if(isc.isA.String(_2))_3=_2
else if(isc.isAn.Object(_2)){if(_2.title)_3=_2.title
else _3=_2.keyName}
_1.keyTitle=_3},isc.A.setChildEditableProperties=function isc_Menu_setChildEditableProperties(_1,_2,_3,_4){var _5=isc.DS.get(_3.type);if(!_5||!_5.inheritsSchema("MenuItem")){return this.Super("setChildEditableProperties",arguments)}
var _6=this.getRecordIndex(_1);if(_6>=0){isc.addProperties(_1,_2);if(this.isDrawn())this.refreshRow(_6)}});isc.B._maxIndex=isc.C+95;isc.A=isc.Menu;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.hideAllMenus=function isc_c_Menu_hideAllMenus(_1){var _2=_1=="itemClick",_3=_1=="outsideClick",_4=_1!="orientationchange";var _5=true;var _6=isc.Menu.$358;if(isc.Menu.$kc.length>0){var _7=isc.Menu.$kc,_8=false,_9,_10=isc.EH.getFocusCanvas();isc.Menu.$kc=[];for(var i=_7.length-1;i>=0;i--){var _12=_7[i];if(!_12.isVisible()){continue}
if(_2&&_12.autoDismiss==false){isc.Menu.$kc.addAt(_12,0);_5=false;continue}
if(_3&&_12.autoDismissOnBlur==false){isc.Menu.$kc.addAt(_12,0);_5=false;continue}
if(_12.$sr(_10)){if(_9==null)_9=_12;_8=true}
_12.hide(_4)}
if(_8&&isc.isA.Canvas(_9.body.focusOnHide)){_9.body.focusOnHide.focus()}}
isc.Menu.$353={};if(_5){if(isc.Menu.$35x){isc.EH.hideClickMask(isc.Menu.$35x);isc.Menu.$35x=null}}else{if(!isc.EH.clickMaskUp(isc.Menu.$35x)){this.$781()}}
if(_6){delete _6.$289t;_6.setCustomState("");if(isc.EH.lastEvent.eventType==isc.EH.MOUSE_DOWN&&isc.EH.lastEvent.target==_6)
{_6.$359=true;isc.Page.setEvent(isc.EH.MOUSE_UP,_6,isc.Page.FIRE_ONCE,"$36a")}
delete isc.Menu.$358}},isc.A.$79j=function isc_c_Menu__getAutoDismissOnBlurMenus(){if(this.$kc==null||this.$kc.length==0)return[];var _1=[];for(var i=0;i<this.$kc.length;i++){if(this.$kc[i].autoDismissOnBlur!=false)_1.add(this.$kc[i])}
return _1},isc.A.$781=function isc_c_Menu__showMenuClickMask(){if(isc.Menu.$79j().length>0&&(isc.Menu.$35x==null||!isc.EH.clickMaskUp(isc.Menu.$35x)))
{isc.Menu.$35x=isc.EH.showClickMask("isc.Menu.hideAllMenus('outsideClick')",true)}},isc.A.menuForValueMap=function isc_c_Menu_menuForValueMap(_1,_2){var _3=[];if(isc.isA.String(_1))_1=this.getPrototype().getGlobalReference(_1);if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){_3[i]={value:_1[i],title:_1[i]}}}else{for(var _5 in _1){_3.add({value:_5,title:_1[_5]})}}
var _6=isc.Menu.$36b;if(_2==false||isc.Menu.$36b==null){_6=isc.Menu.newInstance({autoDraw:false,itemClick:function(_7){if(this.target.valueMapMenuSelected){this.target.valueMapMenuSelected(_7.value)}}})}
if(_2!=false&&isc.Menu.$36b==null)isc.Menu.$36b=_6;_6.setData(_3);return _6});isc.B._maxIndex=isc.C+4;isc.Menu.registerStringMethods({itemClick:"item"})
isc.A=isc.ListGrid.getPrototype();isc.A.showHeaderContextMenu=true;isc.A=isc.ListGrid.getPrototype();isc.A.showHeaderMenuButton=false;isc.A=isc.ListGrid.getPrototype();isc.A.showHeaderSpanContextMenu=true;isc.$75j={$166o:true,title:"Show Menu",height:22,showMenuButtonImage:true,menuButtonImage:"[SKIN]menu_button.gif",menuButtonImageUp:"[SKIN]menu_button_up.gif",hiliteAccessKey:true,iconWidth:7,iconHeight:7,iconOrientation:"right",iconAlign:"right",align:"left",showMenuBelow:true,menu:null,initWidget:function(_1,_2,_3,_4){if(this.menuAlign==null){this.menuAlign=!this.isRTL()?isc.Canvas.LEFT:isc.Canvas.RIGHT}
if(this.showMenuButtonImage)this.$36c();return this.invokeSuper(isc.MenuButton,"initWidget",_1,_2,_3,_4)},autoDestroyMenu:true,destroy:function(_1,_2,_3,_4,_5){if(this.menu!=null&&this.autoDestroyMenu&&this.menu.destroy!=null&&!this.menu.destroyed&&!this.menu.destroying)
{this.menu.destroy();this.menu=null}
return this.invokeSuper(isc.MenuButton,"destroy",_1,_2,_3,_4,_5)},setShowMenuButtonImage:function(_1){if(_1==this.showMenuButtonImage)return;this.showMenuButtonImage=_1;if(_1)this.$36c();else this.icon=null;if(this.isDrawn())this.markForRedraw()},setShowMenuBelow:function(_1){if(_1!=this.showMenuBelow){this.showMenuBelow=_1;if(this.showMenuButtonImage){this.$36c();if(this.isDrawn())this.markForRedraw()}}},setCustomState:function(_1){this.customState=_1;this.stateChanged()},stateChanged:function(){this.Super("stateChanged",arguments);this.updateButtonIcon()},updateButtonIcon:function(){if(!this.showMenuButtonImage)return;var _1=this.showMenuBelow?this.menuButtonImageUp:this.menuButtonImage,_2=this.showMenuBelow?this.menuButtonImage:this.menuButtonImageUp;if(!this.showOpenedIcon){this.setIcon(_2)}else{this.setIcon(this.$289t?_1:_2)}},$36c:function(){var _1=this.showMenuBelow?this.menuButtonImage:this.menuButtonImageUp;if(isc.isAn.Object(_1)){if(_1.width)this.iconWidth=_1.width;if(_1.height)this.iconHeight=_1.height;this.icon=_1.src}else{this.icon=_1}},handleActivate:function(){if(this.Super("handleActivate",arguments)==false)return;if(this.$359){this.stateChanged();return}
this.showMenu();this.stateChanged()},$36a:function(){var _1=this;isc.Timer.setTimeout(function(){_1.$359=null},50)},keyPress:function(){if(isc.EventHandler.lastEvent.keyName=="Arrow_Down"){this.showMenu();return false}
return this.Super("keyPress",arguments)},$ur:function(){this.Super("$ur",arguments);this.markForRedraw()},$86e:function(_1){_1.rootMenuButton=this;_1.autoDismissOnBlur=false;this.observe(_1,"mouseOver",function(){this.checkRollOverMouseOver()});this.observe(_1,"mouseOut",function(){this.checkRollOverMouseOut()});var _2=_1.getSubmenu;_1.getSubmenu=function(_4){var _3=_2.apply(this,arguments);if(isc.isA.Menu(_3)){if(_3.rootMenuButton==null){this.rootMenuButton.$86e(_3)}}
return _3};this.observe(_1,"$u2",function(){this.$161n(_1)});if(_1.vscrollbar!=null)this.$161n(_1)},$161n:function(_1){var _2=_1.vscrollbar;var _3=function(){this.checkRollOverMouseOver()};var _4=function(){this.checkRollOverMouseOut()};this.observe(_2,"handleMouseOver",_3);this.observe(_2,"handleMouseOut",_4);var _5=_2.peers,_6=_5==null?0:_5.length;for(var i=0;i<_6;++i){var _8=_5[i];this.observe(_8,"handleMouseOver",_3);this.observe(_8,"handleMouseOut",_4)}},checkRollOverMouseOver:function(){if(this.$86f!=null){isc.Timer.clear(this.$86f);this.$86f=null}
if(isc.isA.Menu(this.menu)&&!(this.menu.isVisible()&&this.menu.isDrawn())){isc.Menu.hideAllMenus();this.showMenu()}},checkRollOverMouseOut:function(){if(this.$86f!=null){isc.Timer.clear(this.$86f);this.$86f=null}
if(isc.isA.Menu(this.menu)&&this.menu.isVisible()&&this.menu.isDrawn()){var _1=this;this.$86f=isc.Timer.setTimeout(function(){_1.$86f=null;if(isc.isA.Menu(_1.menu)&&_1.menu.isVisible()&&_1.menu.isDrawn()){isc.Menu.hideAllMenus()}},this.rollOverMenuHideDelay)}},showMenu:function(){if(isc.isA.String(this.menu))this.menu=window[this.menu];if(!isc.isA.Menu(this.menu))this.$36d(this.menu);if(!isc.isA.Menu(this.menu))return;isc.Menu.$358=this;var _1=this.menu;if(!_1.ruleScope){var _2=this.getRuleScope();if(_2)_1.ruleScope=_2}
if(this.showMenuOnRollOver&&_1.rootMenuButton==null){if(_1.rootMenuButton==null){this.$86e(_1)}}
_1.$8h();this.positionMenu(_1);_1.show(this.menuAnimationEffect);this.$289t=true},positionMenu:function(_1){if(!_1)return;var _2=this.getPageLeft();if(this.menuAlign==isc.Canvas.CENTER){_2=_2-((_1.getVisibleWidth()-this.getVisibleWidth())/2)}else if(this.menuAlign==isc.Canvas.RIGHT){_2-=(_1.getVisibleWidth()-this.getVisibleWidth())}
if(this.menuCanOcclude){var _3=this.showMenuBelow?this.getPageTop()+this.getVisibleHeight()+1:this.getPageTop()-_1.getVisibleHeight()+2;_1.placeNear(_2,_3)}else{_1.placeNear(_2,this.getPageTop()-2,null,this.getVisibleWidth(),this.getVisibleHeight()+3,this.showMenuBelow?"bottom":"top")}},repositionMenu:function(){var _1=this.menu;if(_1&&isc.isA.Menu(_1)&&_1.isDrawn()&&_1.isVisible()){this.positionMenu(_1)}},$36d:function(_1){if(!_1)return;_1.autoDraw=false;var _2=this.menuConstructor||isc.Menu;this.menu=isc.ClassFactory.newInstance(_2,_1)},handleMoved:function(_1,_2){this.Super("handleMoved",arguments);this.repositionMenu()},handleParentMoved:function(_1,_2,_3){this.Super("handleParentMoved",arguments);this.repositionMenu()},rollOverMenuHideDelay:250,mouseMove:function(){if(this.showMenuOnRollOver)this.mouseOver()},mouseOver:function(){if(this.showMenuOnRollOver)this.checkRollOverMouseOver();return this.Super("mouseOver",arguments)},mouseOut:function(){if(this.showMenuOnRollOver)this.checkRollOverMouseOut();return this.Super("mouseOut",arguments)}};isc.ClassFactory.defineClass("MenuButton","Button");isc.MenuButton.addProperties(isc.$75j)
isc.A=isc.MenuButton.getPrototype();isc.A.skinImgDir="images/Menu/";isc.A.baseStyle="menuButton";isc.ClassFactory.defineClass("IMenuButton","MenuButton");isc.IMenuButton.addProperties(isc.$75j)
isc.A=isc.IMenuButton.getPrototype();isc.A.labelSkinImgDir="images/Menu/";isc.defineClass("ToolStripMenuButton","MenuButton");isc.A=isc.ToolStripMenuButton.getPrototype();isc.A.showRollOver=true;isc.A.showDown=true;isc.A.labelVPad=0;isc.A.labelHPad=7;isc.A.autoFit=true;isc.A.src="[SKIN]/ToolStrip/button/button.png";isc.A.capSize=3;isc.A.height=22;isc.defineClass("TextMenuButton","MenuButton");isc.A=isc.TextMenuButton.getPrototype();isc.A.baseStyle="textMenuButton";isc.ClassFactory.defineClass("SelectionTreeMenu","Menu")
isc.A=isc.SelectionTreeMenu.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.activeParentStyle="Over";isc.B.push(isc.A.itemClick=function isc_SelectionTreeMenu_itemClick(_1){this.inheritedProperties.button.$21j(_1)},isc.A.getBaseStyle=function isc_SelectionTreeMenu_getBaseStyle(_1,_2,_3){var _4=this.inheritedProperties.button;if(_4.$36e(_1))return _4.selectedBaseStyle;return this.Super("getBaseStyle",arguments)},isc.A.show=function isc_SelectionTreeMenu_show(){if(this.body){for(var i=0;i<this.getTotalRows();i++){this.body.setRowStyle(i)}}
return this.Super("show",arguments)},isc.A.getItemTitle=function isc_SelectionTreeMenu_getItemTitle(_1,_2,_3,_4,_5){var _6=this.inheritedProperties.button;if(_6.displayField){return _1[_6.displayField]}
return this.invokeSuper(isc.SelectionTreeMenu,"getItemTitle",_1,_2,_3,_4,_5)});isc.B._maxIndex=isc.C+4;isc.ClassFactory.defineClass("TreeMenuButton","MenuButton");isc.ClassFactory.defineClass("ITreeMenuButton","TreeMenuButton");isc.$75k={title:null,unselectedTitle:"Choose a value",showPath:false,pathSeparatorString:"&nbsp;&gt;&nbsp;",selectedBaseStyle:"treeMenuSelected",overflow:isc.Canvas.VISIBLE,treeMenuConstructor:isc.SelectionTreeMenu,treeMenuDefaults:{height:1},getTitle:function(){if(this.title)return this.title;var _1=this.getSelectedItem();return this.$161k(_1)},$161k:function(_1){if(_1!=null){if(!this.showPath){if(!isc.isA.Menu(this.treeMenu))this.$36d();return this.treeMenu.getItemTitle(_1)}else{var _2=this.getTree();var _3=_2.getParents(_1),_4=[];for(var i=_3.length-1;i>=0;i--){if(!_2.showRoot&&i==_3.length-1)continue;_4.add(this.treeMenu.getItemTitle(_3[i]))}
_4.add(this.treeMenu.getItemTitle(_1));return _4.join(this.pathSeparatorString)}}else{return this.unselectedTitle}},$36d:function(_1){_1=isc.addProperties({},_1,{inheritedProperties:{button:this},submenuConstructor:this.treeMenuConstructor,canSelectParentItems:this.canSelectParentItems,dataSource:this.dataSource,criteria:this.criteria,data:this.data,dataProperties:this.dataProperties});if(this.emptyMenuMessage)_1.emptyMessage=this.emptyMenuMessage;if(this.loadDataOnDemand!=null)_1.loadDataOnDemand=this.loadDataOnDemand;this.treeMenu=this.createAutoChild("treeMenu",_1);this.menu=this.treeMenu;this.observe(this.treeMenu,"treeDataLoaded","observer.$21l()")},$21l:function(){if(this.treeDataLoaded)this.treeDataLoaded()},getTree:function(){if(!isc.isA.Menu(this.treeMenu))this.$36d();return this.treeMenu.$35k},setData:function(_1){this.data=_1;if(this.treeMenu!=null){if(!isc.isA.Menu(this.treeMenu))this.$36d();this.treeMenu.setData(_1)}},$21j:function(_1){if(this.itemSelected&&this.itemSelected(_1,this.$36f)==false)
return;this.setSelectedItem(_1)},setSelectedItem:function(_1){this.$36f=_1;if(this.isDrawn())this.setTitle()},getSelectedItem:function(){return this.$36f},$36e:function(_1){var _2=this.getSelectedItem(),_3=this.getTree();return _1===_2||_3.isDescendantOf(_2,_1)}};isc.TreeMenuButton.addProperties(isc.$75k)
isc.ITreeMenuButton.addProperties(isc.$75k)
isc.TreeMenuButton.registerStringMethods({itemSelected:"item, oldItem"});isc.ITreeMenuButton.registerStringMethods({itemSelected:"item, oldItem"});isc.ClassFactory.defineClass("TileLayout","Canvas");isc.A=isc.TileLayout.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.layoutPolicy="fit";isc.A.tileSize=100;isc.A.tileMargin=10;isc.A.layoutMargin=5;isc.A.paddingAsLayoutMargin=true;isc.A.animateTileChange=true;isc.A.orientation="horizontal";isc.A.overflow="auto";isc.A.canFocus=true;isc.A.expandMargins=true;isc.A.autoWrapLines=true;isc.A.dragLineDefaults={overflow:"hidden"};isc.A.dragLineStyle="layoutDropLine";isc.A.dragLineThickness=2;isc.A.$66i=true;isc.A.relayoutProperties=["tilesPerLine","orientation","tileWidth","tileHeight","expandMargins"];isc.A.canDrop=true;isc.B.push(isc.A.initWidget=function isc_TileLayout_initWidget(){this.$73g();this.invokeSuper(isc.TileLayout,"initWidget");if(!this.tiles)this.tiles=[];this.data=this.tiles},isc.A.draw=function isc_TileLayout_draw(_1,_2,_3,_4){this.invokeSuper(isc.TileLayout,"draw",_1,_2,_3,_4);this.logDebug('calling layoutTiles from draw',"TileLayout");this.layoutTiles()},isc.A.layoutChildren=function isc_TileLayout_layoutChildren(){this.Super("layoutChildren",arguments);this.logDebug('calling layoutTiles from layoutChildren',"TileLayout");if(this.$223g!=null&&this.layoutPolicy=="fit"&&this.$uw){return}
this.layoutTiles()},isc.A.childResized=function isc_TileLayout_childResized(_1,_2,_3,_4){if(this.$2z)return;this.invokeSuper(isc.TileLayout,"childResized",_1,_2,_3,_4);if(this.tiles!=null&&this.tiles.contains(_1)){this.logDebug('calling layoutTiles from childResized',"TileLayout");this.delayCall("layoutTiles",null,100)}},isc.A.$73g=function isc_TileLayout__enforceLegalLayoutPolicy(){if(this.layoutPolicy!="fit"&&this.layoutPolicy!="flow"){this.layoutPolicy="fit"}},isc.A.willScroll=function isc_TileLayout_willScroll(){if(this.overflow!="auto")return this.$223g=(this.overflow=="scroll");var _1=this.orientation=="horizontal";var _2=this.$td;var _3=this.$te;var _4=this.$tb;var _5=this.$tc;var _6,_7;if(this.$66i){_7=this.getUserVisibleTiles();_6=_7.getLength()}else{_6=this.getLength()}
if(this.layoutPolicy=="flow"){var _8=_1?this.getInnerWidth()-_5:this.getInnerHeight()-_3;var _9=_1?this.getInnerHeight()-_3:this.getInnerWidth()-_4;var _10=_1?_4:_2;var _11=_1?_2:_4;var _12=0;var _13=0;var _14=_1?this.getTileHMargin():this.getTileVMargin();var _15=_1?this.getTileVMargin():this.getTileHMargin();for(var i=0;i<_6;i++){var _17,_18=_7?_7[i]:this.getTile(i);if(_18==null)continue;var _19=_1?_18.getVisibleWidth():_18.getVisibleHeight();if((this.autoWrapLines&&_10+_19>_8)||(_18.startLine||_17&&_17.endLine))
{_10=_1?_4:_2;;_11+=_12+_15;_12=0;_13++}
var _20=_1?_18.getVisibleHeight():_18.getVisibleWidth();if(_11+_20>_9)return true;if(_12<_20){_12=_20}
_10+=_19+_14;if(_18)_17=_18}
return false}else{this.$223g=false;this.$73k();var _9=_1?this.getVisibleHeight()-(_2+_3):this.getVisibleWidth()-(_5+_4);var _20=_1?this.getTileHeight():this.getTileWidth();var _15=_1?this.getTileVMargin():this.getTileHMargin();var _21=this.getTilesPerLine();var _22=Math.floor(_9/(_20+_15));var _23=_21*_22;return this.$223g=_6>_23}},isc.A.layoutTiles=function isc_TileLayout_layoutTiles(_1){var _2=this.$2z;if(_2&&this.layoutPolicy=="fit"){return}
this.$2z=true;this.$149a(_1);this.$2z=_2;if(_2)this.$149b=true},isc.A.$149a=function isc_TileLayout__layoutTiles(_1){if(!this.isDrawn())return;this.$585=[];this.$608=0;if(this.tiles)this.tiles.map(function(_52){delete _52.$149c});var _2,_3,_4,_5;if(this.paddingAsLayoutMargin){var _6=this.$tq();_4=_6.left;_5=_6.right;_2=_6.top;_3=_6.bottom}
var _7=this.$td=this.$du(this.layoutMargin,_2,0);var _8=this.$te=this.$du(this.layoutMargin,_3,0);var _9=this.$tb=this.$du(this.layoutMargin,_4,0);var _10=this.$tc=this.$du(this.layoutMargin,_5,0);var _11=this.willScroll();this.$73k();this.$619=[this.getScrollLeft(),this.getScrollTop(),this.getAvailableWidth(),this.getAvailableHeight()];var _12,_13;if(this.$66i){_13=this.getUserVisibleTiles();_12=_13.getLength()}else{_12=this.getLength()}
if(this.tileLayoutStart)this.tileLayoutStart(_12);if(this.layoutPolicy=="flow"){this.logDebug("starting flow layout","TileLayout");var _14=this.orientation=="horizontal";var _15=_14?this.getInnerWidth()-_10:this.getInnerHeight()-_8;if(_11)_15-=this.getScrollbarSize();var _16=_14?_9:_7,_17=_14?_7:_9,_18=_14?this.getTileHMargin():this.getTileVMargin(),_19=_14?this.getTileVMargin():this.getTileHMargin();var _20=0,_21=0;var _22=this.$35v;for(var i=0;i<_12;i++){var _24,_25=_13?_13[i]:(_22?this.getRecordTile(i):this.getTile(i));if(_25==null)continue;if(!_22&&_25.parentElement!==this)this.addChild(_25);var _26=_14?_25.getVisibleWidth():_25.getVisibleHeight();if((this.autoWrapLines&&_16+_26>_15)||(_25.startLine||_24&&_24.endLine))
{_16=_14?_9:_7;;_17+=_21+(i==0?0:_19);_21=0;_20++}
var _27=_14?_17:_16;var _28=_14?_16:_17;this.processTile(_25,_27,_28);var _29=_14?_25.getVisibleHeight():_25.getVisibleWidth();if(_21<_29){_21=_29}
_16+=_26+_18;if(_25)_24=_25}}else{this.logDebug("starting fit layout:"+this.$35v,"TileLayout");var _30=this.getTilesPerLine();var _31=this.getTileHeight();var _32=this.getTileWidth();var _14=this.orientation=="horizontal";var _33,_34,_35;var _36,_37,_38,_39,_40,_41;if(this.shouldUseIncrRendering()){this.logDebug("fit layout, using incremental rendering","TileLayout");var _42=this.getVisibleTiles();this.$57r=_42;_37=_42[0];_36=_12;var _43=this.getVisibleLines();_40=_43[0];_41=_43[0]+_43[1];if(!this.hasAllVisibleTiles(_42,true)){if(this.loadingMessage==null||!this.data.lengthIsKnown())return}}else{this.logDebug("fit layout, rendering all tiles","TileLayout");delete this.$57r;_36=_12;_37=0;_40=0;_41=Math.ceil(_36/_30);_33=this.getTileHMargin();_34=this.getTileVMargin()}
if(this.$150f)this.$150f();var _44=Math.ceil(_12/_30);var _34=this.getTileVMargin();var _33=this.getTileHMargin();var _29=_14?_31:_32;var _45=_14?_34:_33;var _46=((_29+_45)*_44)-_45+(_14?_7+_8:_9+_10);_39=this.$58t();_14?_39.setHeight(_46):_39.setWidth(_46);_39.sendToBack();_35=this.getExtraMarginPixels(_30,_31,_32,_33,_34);this.$149b=false;for(var i=_40;i<_41;i++){var _47=_35;for(var j=0;j<_30;j++){var _49=_14?i:j;var _50=_14?j:i;var _27=(_49*_31)+(_49*_34)+_7;if(!_14&&j+1<=_35)_27+=j+1;var _28=(_50*_32)+(_50*_33)+_9;if(_14&&j+1<=_35)_28+=j+1;var _51=_13?_13[_37]:_37;var _25=this.processTile(_51,_27,_28,this.getTileHeight(),this.getTileWidth());if(this.$149b)return;_37++;if(_37>=_36)break}
if(_37>=_36)break}}},isc.A.hasAllVisibleTiles=function isc_TileLayout_hasAllVisibleTiles(){return true},isc.A.getUserVisibleTiles=function isc_TileLayout_getUserVisibleTiles(){var _1=[];for(var i=0;i<this.getLength();i++){var _3=this.getTile(i);if(!_3.$66j)_1.add(_3)}
return _1},isc.A.processTile=function isc_TileLayout_processTile(_1,_2,_3,_4,_5){var _6;if(this.$35v){if(isc.isA.Canvas(_1))_6=_1;else _6=this.getRecordTile(_1);if(!_6)return;if(this.$584!=null&&this.$584.findIndex("ID",_6.ID)==-1)
{return}
if(_4)_6.setHeight(_4);if(_5)_6.setWidth(_5);if(_6.getTop()!=_2||_6.getLeft()!=_3){_6.$589=_2;_6.$588=_3;this.$586.add(_6)}
var _7=[_3,_2,_6.getVisibleWidth(),_6.getVisibleHeight()];if(isc.Canvas.rectsIntersect(this.$619,_7)){if(!this.$585.contains(_6))this.$585.add(_6)}}else{if(isc.isA.Canvas(_1))_6=_1;else _6=this.getTile(_1);if(!_6)return;if(_6.isDirty()){_6.redraw("tile dirty during layout")}
if(_4)_6.setHeight(_4);if(_5)_6.setWidth(_5);_6.setTop(_2);_6.setLeft(_3);this.addChild(_6);if(isc.TileGrid&&isc.isA.TileGrid(this)){_6.$114t=true;_6.show();_6.$114t=null}else{if(_6.visibility=="hidden")_6.$66j=true;else _6.$66j=null}
var _7=[_6.getLeft(),_6.getTop(),_6.getVisibleWidth(),_6.getVisibleHeight()];if(isc.Canvas.rectsIntersect(this.$619,_7)){if(!this.$585.contains(_6))this.$585.add(_6)}
this.$608++;_6.$149c=true;return _6}},isc.A.$58t=function isc_TileLayout__getSpacerCanvas(){if(!this.$58u){this.$58u=isc.Canvas.create({autoDraw:false,width:1,height:1});this.addChild(this.$58u)}
return this.$58u},isc.A.getDrawnStartIndex=function isc_TileLayout_getDrawnStartIndex(_1){if(this.$57r)return this.$57r[0];return _1?null:0},isc.A.getDrawnEndIndex=function isc_TileLayout_getDrawnEndIndex(_1){if(this.$57r)return this.$57r[1];return _1?null:(this.data?this.data.getLength():0)},isc.A.shouldUseIncrRendering=function isc_TileLayout_shouldUseIncrRendering(){if(this.$35v){return true}else if(!this.showAllRecords&&this.layoutPolicy=="fit"&&(this.overflow=="auto"||this.overflow=="hidden"))
{var _1=this.data;if(_1==null||isc.ResultSet&&isc.isA.ResultSet(_1)&&!_1.lengthIsKnown()){return true}
var _2=this.drawAllMaxTiles;return _2==null||_2==0||_1.getLength()>_2}else{return false}},isc.A.getLength=function isc_TileLayout_getLength(){if(!this.tiles)return 0;else return this.tiles.getLength()},isc.A.getTilesPerLine=function isc_TileLayout_getTilesPerLine(){if(this.tilesPerLine)return this.tilesPerLine;else{var _1=this.orientation=="horizontal";var _2=_1?this.getTileWidth():this.getTileHeight();var _3=_1?(this.tileHMargin||this.tileMargin):(this.tileVMargin||this.tileMargin);var _4=_1?this.getAvailableWidth():this.getAvailableHeight();var _5=Math.floor(_4/_2);var _6=_1?this.$tb+this.$tc:this.$td+this.$te;var _7=_3*(_5-1)+(_5*_2)+_6;if(_7>_4){var _8=Math.ceil((_7-_4)/_2);_5-=_8}
if(_5<1)_5=1;return _5}},isc.A.$73k=function isc_TileLayout__setTileSize(){var _1=this.orientation=="horizontal";if(this.layoutPolicy!="fit"||this.expandMargins||!this.tilesPerLine||(_1&&this.tileWidth)||(!_1&&this.tileHeight))return;var _2=_1?(this.tileHMargin||this.tileMargin):(this.tileVMargin||this.tileMargin);var _3=_1?this.getAvailableWidth():this.getAvailableHeight();var _4=_1?this.$tb+this.$tc:this.$td+this.$te;var _5=_3-_4;if(!this.tilesPerLine){if(this.tileSize==null)this.tileSize=50}else{var _6=Math.floor(_5/this.tilesPerLine);_6-=_2;if(_1)this.defaultTileWidth=_6;else this.defaultTileHeight=_6}},isc.A.getVisibleLines=function isc_TileLayout_getVisibleLines(){var _1=this.orientation=="horizontal";var _2=_1?this.getScrollTop():this.getScrollLeft();var _3=_1?this.getTileHeight()+this.getTileVMargin():this.getTileWidth()+this.getTileHMargin();var _4=_1?this.getAvailableHeight():this.getAvailableWidth();var _5=Math.floor(_2/_3);if(_5>0)_5--;var _6=Math.ceil(_4/_3)+2;return[_5,_6]},isc.A.getVisibleTiles=function isc_TileLayout_getVisibleTiles(){var _1=this.getVisibleLines();var _2=this.getTilesPerLine();var _3=_1[0]*_2;var _4=(_1[0]+_1[1])*_2;return[_3,_4]},isc.A.scrolled=function isc_TileLayout_scrolled(){if(this.shouldUseIncrRendering()){if(this.$57s)isc.Timer.clear(this.$57s);this.$57s=this.delayCall("layoutAfterScroll")}},isc.A.layoutAfterScroll=function isc_TileLayout_layoutAfterScroll(){this.logDebug('layoutAfterScroll',"TileLayout");if(this.shouldLayoutTiles()){this.logDebug('calling layoutTiles from layoutAfterScroll',"TileLayout");this.layoutTiles()}
this.$57s=null},isc.A.shouldLayoutTiles=function isc_TileLayout_shouldLayoutTiles(){var _1=this.getVisibleTiles();return _1[0]!=this.getDrawnStartIndex(true)||_1[1]!=this.getDrawnEndIndex(true)},isc.A.getTileWidth=function isc_TileLayout_getTileWidth(){if(this.tileWidth){if(isc.isA.String(this.tileWidth)){this.tileWidth=parseInt(this.tileWidth);if(!isc.isA.Number(this.tileWidth))this.tileWidth=this.tileSize}
return this.tileWidth}else if(this.defaultTileWidth){return this.defaultTileWidth}else{return this.tileSize}},isc.A.getTileHeight=function isc_TileLayout_getTileHeight(){if(this.tileHeight){if(isc.isA.String(this.tileHeight)){this.tileHeight=parseInt(this.tileHeight);if(!isc.isA.Number(this.tileHeight))this.tileHeight=this.tileSize}
return this.tileHeight}else if(this.defaultTileHeight!=null){return this.defaultTileHeight}else{return this.tileSize}},isc.A.getAvailableWidth=function isc_TileLayout_getAvailableWidth(){var _1=this.$223g;if(this.orientation!="horizontal"||this.layoutPolicy!="fit"||_1==null){return this.getInnerWidth()}
var _2=this.getWidth()-this.getHMarginBorder();if(_1)_2-=this.getScrollbarSize();return _2},isc.A.getAvailableHeight=function isc_TileLayout_getAvailableHeight(){var _1=this.$223g;if(this.orientation=="horizontal"||this.layoutPolicy!="fit"||_1==null){return this.getInnerHeight()}
var _2=this.getHeight()-this.getVMarginBorder();if(_1)_2-=this.getScrollbarSize();return _2},isc.A.getTileHMargin=function isc_TileLayout_getTileHMargin(){var _1;if(this.tileHMargin){_1=this.tileHMargin}else{_1=this.tileMargin}
if(this.layoutPolicy=="fit"&&this.expandMargins&&this.orientation=="horizontal"){var _2=this.getTilesPerLine();var _3=this.$tb+this.$tc;var _4=_2-1;if(_4==0)_4=1;var _5=Math.floor((this.getAvailableWidth()-(_2*this.getTileWidth())-
_3)/_4);if(_5<_1)return _1;else return _5}else{return _1}},isc.A.getTileVMargin=function isc_TileLayout_getTileVMargin(){var _1;if(this.tileHMargin){_1=this.tileVMargin}else{_1=this.tileMargin}
if(this.layoutPolicy=="fit"&&this.expandMargins&&this.orientation=="vertical"){var _2=this.getTilesPerLine();var _3=this.$td+this.$te;var _4=_2-1;if(_4==0)_4=1;var _5=Math.floor((this.getAvailableHeight()-(_2*this.getTileHeight())-
_3)/_4);if(_5<_1)return _1;else return _5}else{return _1}},isc.A.getExtraMarginPixels=function isc_TileLayout_getExtraMarginPixels(_1,_2,_3,_4,_5){if(this.expandMargins&&this.orientation=="horizontal"){var _6=(_1*_3)+((_1-1)*_4)+(this.$tb+this.$tc);return this.getAvailableWidth()-_6}else if(this.expandMargins&&this.orientation=="vertical"){var _6=(_1*_2)+((_1-1)*_5)+(this.$td+this.$te);return this.getAvailableHeight()-_6}else{return 0}},isc.A.getTile=function isc_TileLayout_getTile(_1){return isc.Class.getArrayItem(_1,this.tiles)},isc.A.addTile=function isc_TileLayout_addTile(_1,_2){if(!this.tiles)return;if(_2!==0&&!_2)_2=this.tiles.getLength();this.tiles.addAt(_1,_2);this.reLayout()},isc.A.removeTile=function isc_TileLayout_removeTile(_1){if(!this.tiles)return;if(!isc.isA.Canvas(_1)){var _2=this.tiles.findIndex("ID",_1);if(_2==-1)_1=this.tiles.get(_1);else _1=this.tiles.get(_2)}
this.removeChild(_1)},isc.A.removeChild=function isc_TileLayout_removeChild(_1,_2){this.tiles.removeWhere("ID",_1.ID);if(this.$585){this.$585.removeWhere("ID",_1.ID)}
if(this.$584&&this.$584!=this.$585){this.$584.removeWhere("ID",_1.ID)}
if(this.$586){this.$586.removeWhere("ID",_1.ID)}
this.invokeSuper(isc.TileLayout,"removeChild",_1,_2);this.reLayout()},isc.A.getRecordTile=function isc_TileLayout_getRecordTile(_1){if(_1==null)return null;return this.tiles.get(_1)},isc.A.childVisibilityChanged=function isc_TileLayout_childVisibilityChanged(_1,_2){if(!this.$35v&&!_1.$114t){if(_2=="hidden")_1.$66j=true;else _1.$66j=null;this.reLayout()}},isc.A.propertyChanged=function isc_TileLayout_propertyChanged(_1,_2){this.invokeSuper(isc.TileLayout,"propertyChanged",_1,_2);if(isc.endsWith(_1,"Margin")||this.relayoutProperties.contains(_1))
{this.layoutTiles()}},isc.A.showDragLineForRecord=function isc_TileLayout_showDragLineForRecord(_1){if(isc.isAn.Array(this.data)||(isc.isA.ResultSet(this.data))){if(this.data.getLength()==0){return}
var x=this.getOffsetX(),y=this.getOffsetY(),_4=_1!=null?_1:this.findIndexForCoord(x,y);if(this.$66f==null)this.$66f=_4;var _5=this.getRecordTile(_4),_6=this.orientation!="vertical";if(_5!=null&&_1==null){if((_6&&x>_5.getLeft()+(_5.getVisibleWidth()/2))||(!_6&&y>_5.getTop()+(_5.getVisibleHeight()/2)))
{_4++;_5=this.getRecordTile(_4)}}
var _7,_8,_5=this.getRecordTile(_4);if(_4==null||_5==null){_4=this.data.getLength();_5=this.getRecordTile(_4-1);if(_6){_7=_5.getLeft()+_5.getVisibleWidth()-this.dragLineThickness;_8=_5.getTop()}else{_7=_5.getLeft();_8=_5.getTop()+_5.getVisibleHeight()-this.dragLineThickness}}else{_7=_5.getLeft();_8=_5.getTop()}
this.$610=_4;if(this.showDragLine!=false){var _9,_10;if(_6){_10=_5.getVisibleHeight();_9=this.dragLineThickness}
else{_9=_5.getVisibleWidth();_10=this.dragLineThickness}
this.makeDragLine({styleName:this.dragLineStyle});var _11=this.transformTileRect([_7,_8,_9,_10]);this._dragLine.moveTo(_11[0],_11[1]);this._dragLine.resizeTo(_11[2],_11[3]);this._dragLine.show()}}},isc.A.transformTileRect=function isc_TileLayout_transformTileRect(_1,_2,_3,_4){if(isc.isAn.Array(_1)){_2=_1[1];_3=_1[2];_4=_1[3];_1=_1[0]}
_1-=this.getScrollLeft();_2-=this.getScrollTop();if(this.orientation=="vertical"){var _5=this.getVisibleWidth();var _6=Math.round((_5-this.getInnerWidth())/2);var _7=_5-_6;if(_1<_6){_3-=_6-_1,_1=_6;if(_3<0)_3=0}
if(_1+_3>_7){if(_1>=_7)_3=0;else{_3-=(_1+_3)-_7}}}else{var _8=this.getVisibleHeight();var _6=Math.round((_8-this.getInnerHeight())/2);var _9=_8-_6;if(_2<_6){_4-=_6-_2,_2=_6;if(_4<0)_4=0}
if(_2+_4>_9){if(_2>=_9)_4=0;else{_4-=(_2+_4)-_9}}}
return[_1+this.getPageLeft(),_2+this.getPageTop(),_3,_4]},isc.A.dropOut=function isc_TileLayout_dropOut(){this.hideDragLine()},isc.A.dropMove=function isc_TileLayout_dropMove(){this.showDragLineForRecord()},isc.A.findIndexForCoord=function isc_TileLayout_findIndexForCoord(_1,_2){var _3=this.getDrawnStartIndex(),_4=this.getDrawnEndIndex();var _5=this.ns.EH;var _6=_5.dragTarget,_7;if(_6)_7=_6.ID;for(var i=_3;i<_4;i++){var _9=this.getRecordTile(i);if(!_9)continue;if(_9.ID==_7)continue;if(_9.getLeft()+_9.getVisibleWidth()>_1&&_9.getTop()+_9.getVisibleHeight()>_2)return i}
return null},isc.A.drop=function isc_TileLayout_drop(){var _1=this.getDropIndex(),_2=this.ns.EH.dragTarget,_3=this.$66f;this.$66f=null;if(!isc.isAn.Array(_2))_2=[_2];var _4=_2[0].parentElement;var _5=this.data.get(_1);this.transferRecords(_2,_5,_1,_4);this.reLayout()},isc.A.getDropIndex=function isc_TileLayout_getDropIndex(){return this.$610||0},isc.A.reLayout=function isc_TileLayout_reLayout(){if(this.destroying)return;if(this.animateTileChange){this.delayCall("$583",null,200)}else{this.logDebug('calling layoutTiles from reLayout',"TileLayout");this.layoutTiles()}},isc.A.$583=function isc_TileLayout__animateChange(){this.logDebug("starting $583()","TileLayout");this.$35v=true;this.$0j=[];var _1=this.$584=this.$585;this.$586=[];this.layoutTiles();if(_1!=null){for(var i=0;i<_1.length;i++){if(!this.$585.contains(_1[i])){_1[i].hide()}}}
var _3=this.$586.length;if(_3==0){this.$587();return}
for(var i=0;i<_3;i++){var _4=this.$586[i];_4.show();var _5;if(i==_3-1){_5=_4.animateMove(_4.$588,_4.$589,this.getID()+".$587()")}else{_5=_4.animateMove(_4.$588,_4.$589)}
this.$0j.add({ID:_5,tile:_4})}},isc.A.$587=function isc_TileLayout__finishAnimating(){this.$35v=false;this.$584=null;delete this.$584;this.$586=null;delete this.$586;this.logDebug('calling layoutTiles from $587',"TileLayout");this.layoutTiles()},isc.A.isAnimatingTileLayout=function isc_TileLayout_isAnimatingTileLayout(){return this.$35v===true},isc.A.setTileSize=function isc_TileLayout_setTileSize(_1){this.tileSize=_1;this.layoutTiles()},isc.A.setTileWidth=function isc_TileLayout_setTileWidth(_1){this.tileWidth=_1;this.layoutTiles()},isc.A.setTileHeight=function isc_TileLayout_setTileHeight(_1){this.tileHeight=_1;this.layoutTiles()},isc.A.setTilesPerLine=function isc_TileLayout_setTilesPerLine(_1){this.tilesPerLine=_1;this.layoutTiles()},isc.A.setTileMargin=function isc_TileLayout_setTileMargin(_1){this.tileMargin=_1;this.layoutTiles()},isc.A.setTileHMargin=function isc_TileLayout_setTileHMargin(_1){this.tileHMargin=_1;this.layoutTiles()},isc.A.setTileVMargin=function isc_TileLayout_setTileVMargin(_1){this.tileVMargin=_1;this.layoutTiles()});isc.B._maxIndex=isc.C+55;isc.ClassFactory.defineClass("FlowLayout","TileLayout");isc.A=isc.FlowLayout.getPrototype();isc.A.layoutPolicy="flow";isc.ClassFactory.defineClass("TileGrid","TileLayout","DataBoundComponent");isc.A=isc.TileGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.tileValueStyle="tileValue";isc.A.valuesShowRollOver=false;isc.A.valuesShowSelected=true;isc.A.valuesShowDown=false;isc.A.tileValueAlign="center";isc.A.showLabels=false;isc.A.tileLabelStyle="tileLabel";isc.A.wrapValues=false;isc.A.canSortFields=true;isc.A.autoFetchTextMatchStyle="substring";isc.A.selectionType=isc.Selection.MULTIPLE;isc.A.tileConstructor="SimpleTile";isc.A.detailViewerDefaults={_constructor:"DetailViewer",visibility:"hidden"};isc.A.recycleTiles=true;isc.A.loadingDataMessage="${loadingImage}&nbsp;Loading data...";isc.A.loadingDataMessageStyle="loadingDataMessage";isc.A.drawAllMaxTiles=25;isc.A.animateTileChange=true;isc.A.styleName="tileGrid";isc.A.$66i=false;isc.A.minimumImageFieldSize=16;isc.A.$275t=isc.DetailViewer.getInstanceProperty("$275t");isc.A.dataArrived=isc.Class.NO_OP;isc.A.tileScreenPlaceholderConstructor="Label";isc.A.tileScreenPlaceholderDefaults={autoDraw:false,border:"1px solid red",contents:"tileScreen<br>Placeholder",align:"center"};isc.A.$727=10;isc.A.recordClick=isc.Class.NO_OP;isc.A.recordDoubleClick=isc.Class.NO_OP;isc.A.recordContextClick=isc.Class.RET_TRUE;isc.A.reselectOnUpdate=true;isc.A.reselectOnUpdateNotifications="selectionChanged";isc.A.$20s="Arrow_Up";isc.A.$20t="Arrow_Down";isc.A.$60n="Arrow_Left";isc.A.$60o="Arrow_Right";isc.A.dragAppearance=isc.EH.TRACKER;isc.A.dragTrackerMode="title";isc.A.tileDragAppearance=isc.EH.TRACKER;isc.A.emptyTileValue="&nbsp;";isc.A.showEmptyMessage=true;isc.A.emptyMessage="No tiles to show.";isc.A.emptyMessageStyle="emptyMessage";isc.A.emptyMessageLabelConstructor="Label";isc.A.emptyMessageLabelDefaults={width:"100%",height:1,align:"center",snapTo:"T"};isc.A.$223h=true;isc.A.savedSearchAbstractType="tile";isc.A.$31h={canDragTilesOut:true,canReorderTiles:true,canAcceptDroppedRecords:true};isc.B.push(isc.A.init=function isc_TileGrid_init(){if(this.disableTouchScrollingForDrag&&(this.canDragTilesOut||this.canReorderTiles)&&this.useTouchScrolling==null)
{this.logInfo("Automatically disabling touch scrolling","scrolling");this.useTouchScrolling=false}
this.defaultWidth=((this.tileWidth||this.tileSize)+(this.layoutMargin*2)+this.tileMargin)*2;this.defaultHeight=((this.tileHeight||this.tileSize)+(this.layoutMargin*2)+this.tileMargin)*2;this.Super("init",arguments)},isc.A.initWidget=function isc_TileGrid_initWidget(){this.$726=[];this.$73g();if(isc.FormulaBuilder==null)this.canAddFormulaFields=false;if(isc.SummaryBuilder==null)this.canAddSummaryFields=false;if(this.layoutPolicy=="flow"&&this.getTileHTML==this.getPrototype().getTileHTML){isc.logWarn("TileGrid does not support layoutPolicy 'flow'; there may be unexpected behavior.  Use a TileLayout instead for flow layout.")}
this.$31i(true);this.invokeSuper(isc.TileLayout,"initWidget");if(!this.tiles)this.tiles=[];if(this.showAllRecords)this.recycleTiles=false;var _1=this.getDataSource();if(isc.isA.DataSource(_1)){this.$601={};if(_1.getPrimaryKeyFieldNames().length==0){this.animateTileChange=false}}
this.detailViewer=this.createAutoChild("detailViewer",{tileGrid:this,showLabel:this.showLabels,showBorder:false,cellStyle:this.tileValueStyle,labelStyle:this.tileLabelStyle,blockStyle:"normal",wrapValues:this.wrapValues,cellPadding:0,valueAlign:this.tileValueAlign,useInnerWidth:false,clipValues:true,width:10,height:10,data:[],dataSource:_1,getCellStyle:function(_3,_4,_5,_6){var _2=(_4.cellStyle||this.cellStyle);if(this.tileGrid.valuesShowRollOver&&this.currentTile.state==isc.StatefulCanvas.STATE_OVER){_2+=this.currentTile.getStateSuffix()}else if(this.tileGrid.valuesShowDown&&this.currentTile.state==isc.StatefulCanvas.STATE_DOWN){_2+=this.currentTile.getStateSuffix()}else if(this.tileGrid.valuesShowSelected&&this.currentTile.isSelected()){_2+=this.currentTile.getStateSuffix()}
return _2}},this.detailViewerProperties);this.$150g=[];if(this.fieldState!=null)this.setFieldState(this.fieldState);else this.setFields(this.fields,true);this.membersMargin=this.tileMargin;this.setData(this.data?this.data:this.getDefaultData())},isc.A.setDataSource=function isc_TileGrid_setDataSource(_1,_2){this.Super("setDataSource",arguments);var _3=this.getDataSource();if(isc.isA.DataSource(_3)){this.$601={};if(_3.getPrimaryKeyFieldNames().length==0){this.animateTileChange=false}}},isc.A.shouldUseField=function isc_TileGrid_shouldUseField(_1,_2){if(this.Super("shouldUseField",arguments))return true;_2=isc.DS.get(_2);if(isc.isA.DataSource(_2)){var _3=_2.getIconField();if(_1==_3||_1.name==_3||(_3&&_1.name==_3.name))
{return true}}
return false},isc.A.getDefaultFields=function isc_TileGrid_getDefaultFields(_1){_1=_1||isc.DS.get(this.dataSource);var _2;if(_1){var _3=_1.getIconField();if(_3){_2={};_2[_3]=_1.getField(_3);var _4=_1.getTitleField();if(_4)_2[_4]=_1.getField(_4)}}
return _2},isc.A.setFields=function isc_TileGrid_setFields(_1,_2){delete this.$221q;var _3=this.getDataSource();if(!_1&&isc.isA.DataSource(_3)){var _4=_3.getIconField();if(_4){_1=[];_1.add({name:_4,type:_3.getField(_4).type});_1.add({name:_3.getTitleField()});this.$221q=true}}
this.invalidateUserCache(null,null,"setFields");if(this.completeFields==null)this.fields=[];this.completeFields=this.bindToDataSource(_1);if(this.completeFields==null)this.completeFields=[];if(!this.completeFields)return;this.deriveVisibleFields();this.updateFieldDependencies();var _5=this.completeFields.duplicate();if(this.autoScaleImageFields!=false){var _6=[];var _7=0;for(var i=0;i<_5.length;i++){var _9=_5.get(i);if(!isc.SimpleType.inheritsFrom(_9.type,"image")){_7+=this.detailViewer.rowHeight}else{if(_9.$221n){delete _9.$221n;_9.imageSize=null}
if(_9.$221o){delete _9.$221o;_9.imageHeight=null}
_6.add(_9)}}
for(var i=0;i<_6.length;i++){var _9=_6.get(i);if(_9.imageSize==null){_9.imageSize=(this.tileWidth||this.tileSize)-this.tileMargin;_9.$221n=true;if(_9.imageHeight==null){if(_7==0)_7=this.tileMargin;var _10=(this.tileHeight||this.tileSize)-(_7+this.tileMargin);_9.imageHeight=Math.max(this.minimumImageFieldSize,(_10/_6.length));_9.$221o=true}}}}
this.detailViewer.setFields(_5);if(!_2){this.logDebug('calling layoutTiles from setFields',"TileGrid");this.$240v()}},isc.A.$240v=function isc_TileGrid__refreshTiles(){this.layoutTiles();this.tiles.callMethod("markForRedraw")},isc.A.deriveVisibleFields=function isc_TileGrid_deriveVisibleFields(){this.fields.setArray(this.getVisibleFields(this.completeFields))},isc.A.$240e=function isc_TileGrid__getVisibleFields(_1){var _2=this.detailViewer,_3=this.getData(),_4=_1.duplicate();for(var i=0;i<_1.length;i++){var _6=_1.get(i);if(!_2.fieldShouldBeVisible(_6,_3)||_6.visible==false){_4.remove(_6)}}
return _4},isc.A.computeTileDimensions=function isc_TileGrid_computeTileDimensions(_1){if(((this.tileHeight&&this.tileWidth)||(this.tileSize))&&!_1)return;if(!((isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.data.resultSize>=this.data.getLength())||isc.isAn.Array(this.data))){return}
if(this.layoutPolicy!="fit")return;var _2=0,_3=0;this.detailViewer.clipValues=false;for(var i=0;i<this.data.getLength();i++){var t=this.getTile(i);var _6=t.overflow;t.setOverflow("visible");t.redraw();t.show();var _7=t.getVisibleHeight();var _8=t.getVisibleWidth();if(_7>_2)_2=_7;if(_8>_3)_3=_8;t.setOverflow(_6);t.hide()}
this.detailViewer.clipValues=true;if(!this.tileHeight&&_2>0)this.tileHeight=_2;if(!this.tileWidth&&_3>0)this.tileWidth=_3},isc.A.getTileID=function isc_TileGrid_getTileID(_1){if(!_1)return null;var _2=this.getDataSource();if(isc.isA.DataSource(_2)&&_2.getPrimaryKeyFieldNames().length>0){var _3=_2.getPrimaryKeyFields();var _4="";for(var _5 in _3){_4+=_1[_5]}
return this.$601[_4]}else{return _1["_tileID_"+this.getID()]}},isc.A.setTileID=function isc_TileGrid_setTileID(_1,_2){var _3=this.getDataSource();if(isc.isA.DataSource(_3)&&_3.getPrimaryKeyFieldNames().length>0){var _4=_3.getPrimaryKeyFields();var _5="";for(var _6 in _4){_5+=_1[_6]}
this.$601[_5]=_2}else{_1["_tileID_"+this.getID()]=_2}},isc.A.getTileRecord=function isc_TileGrid_getTileRecord(_1){return _1.record},isc.A.checkTileRecord=function isc_TileGrid_checkTileRecord(_1){if(isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown())return false;var _2=_1.tileNum;if(_2==null)return false;var _3=_1.record,_4=this.data.get(_2);return this.$149d(_1,_3,_4)},isc.A.setData=function isc_TileGrid_setData(_1){if(this.$35v)this.$158t();if(!_1)return;if(this.data){this.ignore(this.data,"dataChanged");this.ignore(this.data,"dataArrived")}
if(_1)this.data=_1;if(!this.data)return;if(this.data){if(isc.ResultSet&&isc.isA.ResultSet(this.data)){this.observe(this.data,"dataArrived","observer.dataArrived(arguments[0],arguments[1])");this.observe(this.data,"dataChanged","observer.dataChanged(operationType, originalRecord, rowNum, updateData)")}else{this.observe(this.data,"dataChanged","observer.dataChanged()")}}
if(!this.selectionManager||(this.data!=this.selectionManager.data)){this.createSelectionModel()}
this.dataChanged()},isc.A.getData=function isc_TileGrid_getData(){return this.data},isc.A.getPrimaryKeys=function isc_TileGrid_getPrimaryKeys(_1){var _2=this.data;if(!isc.ResultSet||!isc.isA.ResultSet(_2))return _1;var _3=this.getDataSource(),_4={};if(isc.isA.DataSource(_3)){var _5=_3.getPrimaryKeyFieldNames();for(var i=0;i<_5.length;i++){_4[_5[i]]=_1[_5[i]]}}
return _4},isc.A.setRecordValues=function isc_TileGrid_setRecordValues(_1,_2){if(!this.data)return;var _3=this.data.indexOf(_1);if(_3==-1)return;var _4=this.data.get(_3);isc.combineObjects(_4,_2);this.invalidateUserCache(_4);if(this.valuesManager!=null){this.valuesManager.$71e(_3,null,_4,this)}
this.logDebug('calling layoutTiles from setRecordValues',"TileGrid");this.layoutTiles()},isc.A.dataChanged=function isc_TileGrid_dataChanged(_1,_2,_3,_4){this.invalidateUserCache(null,null,"dataChanged");if(!this.data||(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()))
{if(_1==null){this.layoutTiles()}
this.logDebug("dataChanged: returning due to no data yet","TileGrid");return}
this.computeTileDimensions();if(!this.$257)this.$257=0;this.detailViewer.setHilites(this.hilites);if(_1=="add"){this.logDebug("add","TileGrid");this.layoutTiles()}else if(_1=="remove"){this.logDebug("remove","TileGrid");if(!this.recycleTiles||this.data.getLength()>this.getDrawnEndIndex()-this.getDrawnStartIndex())
{if(_2)this.setTileID(_2,null);var _5=this.tiles[this.tiles.length-1];this.$150h(_5.tileNum);this.$150i(_5);this.tiles.remove(_5);_5.destroy()}
this.layoutTiles()}else if(_1=="update"){this.logDebug("update","TileGrid");if(_2){this.$199j(_4,_2)}else if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.data.$175g){var _6=this.data.$175h;if(isc.isAn.Array(_6)){for(var i=0;i<_6.length;i++){this.$199j(_6[i])}}}else{var _8=this.getTileID(_4);if(_8!=null){var _9=_8&&window[_8];if(_9&&this.$149d(_9,_4,_9.record)){_9.$176v=true}}}
this.layoutTiles()}else if(this.data.getLength()>=this.$257){this.logDebug("filter or sort, new data same or longer","TileGrid");if(this.getDataSource())this.tiles.setProperty("$176v",true);if(this.$257>0)this.$582();else this.layoutTiles()}else{this.logDebug("filter or sort, new data shorter","TileGrid");if(this.getDataSource())this.tiles.clearProperty("record");this.selectionManager.deselectAll();this.fireSelectionUpdated();var _10=this.getDrawnEndIndex();var _11=_10>this.data.getLength()?this.data.getLength():_10;var _12=this.getTilesPerLine();if(Math.floor(_10/_12)>Math.floor(_11/_12)&&this.getScrollTop()!=0&&this.recycleTiles){this.scrollToTop();this.layoutTiles()}else{this.$582()}}
this.$257=this.data.getLength();if(this.data.getLength()==0){this.cleanupExtraTiles(true)}},isc.A.$199j=function isc_TileGrid__updateTileForDataChanged(_1,_2){var _3=this.getTileID(_2||_1),_4=_3&&window[_3];if(_4){_4.record=_1;delete _4.$176v;if(isc.isA.StatefulCanvas(_4)&&this.selectionManager){_4.setSelected(this.selectionManager.isSelected(_1))}
_4.redraw("tile record data changed")}},isc.A.$158t=function isc_TileGrid__cancelAnimation(){var _1=this.$0j;for(var i=0;i<_1.length;i++){this.finishAnimation(_1[i].ID);_1[i].tile.hide()}},isc.A.$582=function isc_TileGrid__layoutAfterDataChange(){if(this.destroying)return;if(this.animateTileChange){if(this.$35v){this.$158t();return}
this.fireOnPause("tileGridAnimate",this.$583)}else{this.logDebug('calling layoutTiles from layoutAfterDataChange',"TileGrid");this.layoutTiles()}},isc.A.cleanupExtraTiles=function isc_TileGrid_cleanupExtraTiles(_1){var _2=this.tiles;for(var i=0;i<_2.length;i++){var _4=_2[i];if(!_4.$149c||_1){_4.hide();_4.moveTo(0,0)}}},isc.A.destroy=function isc_TileGrid_destroy(){if(this.data){this.ignore(this.data,"dataChanged");this.ignore(this.data,"dataArrived");if(this.data.$31k&&isc.isA.Function(this.data.destroy))
this.data.destroy()}
this.Super("destroy",arguments)},isc.A.$57t=function isc_TileGrid__getTileID(_1){if(this.createTile!=null&&this.tiles&&this.tiles.length>_1){return this.tiles[_1].ID}
return this.ID+"_tile_"+_1},isc.A.getLength=function isc_TileGrid_getLength(){if(!this.data||(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()))return 0;else return this.data.getLength()},isc.A.makeTile=function isc_TileGrid_makeTile(_1,_2){var _3=this;var _4={canHover:true,tileGrid:_3,handleHover:function(){if(this.tileGrid.itemHover)this.tileGrid.fireCallback("itemHover","item",[this]);return this.Super("handleHover",arguments)},handleMouseMove:function(){if(this.tileGrid.mouseOverTile!=this)this.tileGrid.mouseOverTile=this;return this.Super("handleMouseMove",arguments)},handleMouseOut:function(){if(this.tileGrid.mouseOverTile==this)this.tileGrid.mouseOverTile=null;return this.Super("handleMouseOut",arguments)},handleMouseDown:function(){this.tileGrid.$673(this);this.tileGrid.focus();return this.Super("handleMouseDown",arguments)},handleRightMouseDown:function(){var _5=this.tileGrid.$90l(this);if(_5==false)return false;this.tileGrid.focus();return this.Super("handleRightMouseDown",arguments)},handleMouseUp:function(){this.tileGrid.$674(this);return this.Super("handleMouseUp",arguments)},handleClick:function(){this.tileGrid.$57u(this);return this.Super("handleClick",arguments)},handleShowContextMenu:function(){var _5=this.tileGrid.$148x(this);if(_5!=false){_5=this.Super("handleShowContextMenu",arguments)}
return _5},handleDoubleClick:function(){var _6=this.tileGrid.getTileRecord(this);var _5=this.tileGrid.recordDoubleClick(this.tileGrid,this,_6);if(_5!=false){_5=this.Super("handleDoubleClick",arguments)}
return _5}};var _7;if(this.createTile!=null){_7=this.createTile(_1,_2);_7.setProperties(_4,this.tileDefaults,this.tileProperties,_1.tileProperties)}else{if(this.tileScreen){var _8=this.getDataSource(),_9={};if(_8){_9.dataContext={};_9.dataContext[_8.ID]=_1}
_7=isc.RPCManager.createScreen(this.tileScreen,_9);if(!_7){_7=this.createAutoChild("tileScreenPlaceholder",_4,null,null,true)}
_7.addProperties(_4)}else{_4.ID=this.$57t(this.tiles.length);if(_1.tileProperties)isc.addProperties(_4,_1.tileProperties);if(_1.tileConstructor)_4._constructor=_1.tileConstructor;_7=this.createAutoChild("tile",_4,null,null,true)}}
this.detailViewer.setWidth(_7.getInnerWidth());this.detailViewer.setHeight(_7.getInnerHeight());return _7},isc.A.setHilites=function isc_TileGrid_setHilites(_1){this.Super("setHilites",arguments);this.dataChanged()},isc.A.$149d=function isc_TileGrid__tileRecordsEqual(_1,_2,_3){if(_2==null)return _3==null;if(_3==null)return _2==null;if(_1.$176v)return false;var _4=this.getDataSource();if(!_4)return _2==_3;var _5=_4.getPrimaryKeyFieldNames();for(var i=0;i<_5.length;++i){if(_2[_5[i]]!=_3[_5[i]]){return false}}
return true},isc.A.getTileHTML=function isc_TileGrid_getTileHTML(_1){return this.detailViewer.getBlockHTML([_1])},isc.A.getEmptyMessage=function isc_TileGrid_getEmptyMessage(){if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown()){return this.loadingDataMessage==null?"&nbsp;":this.loadingDataMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})}
return this.emptyMessage==null?"&nbsp;":this.emptyMessage.evalDynamicString(this,{loadingImage:this.imgHTML(isc.Canvas.loadingImageSrc,isc.Canvas.loadingImageSize,isc.Canvas.loadingImageSize)})},isc.A.getTile=function isc_TileGrid_getTile(_1){var _2,_3,_4;if(isc.isAn.Object(_1)){_3=_1;_4=this.data.indexOf(_1);_2=this.getTileID(_1)}else{if(!this.data)return null;_3=this.data.get(_1);if(!_3)return null;_2=this.getTileID(_3);_4=_1}
if(_4==null)return null;var _5=this.getDrawnStartIndex(),_6=this.getDrawnEndIndex();if(_4<_5||_4>=_6){this.logWarn("canReclaimTile() has been called with an index "+_4+" outside the visible range ["+_5+", "+_6+"]");return null}
var _7=_2&&window[_2];if(_7&&this.$149d(_7,_3,_7.record)){if(_7.tileNum!=_4){this.$150h(_4,_7)}
return _7}
var _8=true,_9=null;if(this.canReclaimTile(_4)&&!_3.tileConstructor){_9=this.$57w(_4)}else if(_2&&window[_2]){_9=this.$57w(_4,window[_2])}else{if(!this.tiles)this.tiles=[];_9=this.makeTile(_3,_4);this.setTileID(_3,_9.ID);this.$150h(_4,_9);if(_9.setFields&&_9.getFields&&(_9.getFields()==null||_9.getFields().length==0))
{_9.setFields(isc.clone(this.fields))}
this.tiles.add(_9);_8=false}
if(_9.setValues)_9.setValues(_3);else if(_9.setData)_9.setData([_3]);_9.record=_3;delete _9.$176v;if(_8){if(_9.isA("SimpleTile")){_9.setSelected(this.selectionManager.isSelected(_3))}
if(_9.isDirty())_9.redraw("tile bound to new record")}else if(this.selectionManager.isSelected(_3)){_9.setSelected(true)}
return _9},isc.A.getTileIndex=function isc_TileGrid_getTileIndex(_1){return this.tiles.indexOf(_1)},isc.A.getCurrentTile=function isc_TileGrid_getCurrentTile(){return this.mouseOverTile},isc.A.$728=function isc_TileGrid__clearLogs(){this.$726=[]},isc.A.$729=function isc_TileGrid__limitLog(_1,_2){if(!this.$726.find("key",_2)){this.$726.add({key:_2,logs:this.$727})}
if(this.$726.find("key",_2).logs>0){isc.logWarn(_1);this.$726.find("key",_2).logs-=1}},isc.A.layoutTiles=function isc_TileGrid_layoutTiles(){this.requestVisibleRows();this.computeTileDimensions();this.invokeSuper(isc.TileGrid,"layoutTiles");var _1=this.tiles?this.tiles.length:0;var _2=this.$608;if(!this.$35v&&_2<_1)this.cleanupExtraTiles();this.updateEmptyMessageLabel()},isc.A.invalidateCache=function isc_TileGrid_invalidateCache(){this.Super("invalidateCache",arguments);this.requestVisibleRows()},isc.A.requestVisibleRows=function isc_TileGrid_requestVisibleRows(){var _1=this.data;if(_1==null||!isc.isA.ResultSet(_1))return;if(!_1.lengthIsKnown()){if(this.tileSize==null)_1.get(0);else{var _2=this.getVisibleTiles();_1.getRange(_2[0],_2[1])}}},isc.A.$150h=function isc_TileGrid__updateTileIndex(_1,_2){var _3=this.$150g,_4=_3[_1];if(_4!=_2&&_4!=null&&_4.tileNum==_1){this.$150j(_4);_4.tileNum=null}
_3[_1]=_2;if(_2)_2.tileNum=_1},isc.A.$150k=function isc_TileGrid__getTileForTileIndex(_1){var _2=this.$150g,_3=_2[_1];return _3!=null&&_3.tileNum==_1?_3:null},isc.A.$150j=function isc_TileGrid__addTileToReclaim(_1){var _2=this.$150l;if(_2!=null)_2.push(_1)},isc.A.$150i=function isc_TileGrid__removeTileFromReclaim(_1){var _2=this.$150l;if(_2!=null)_2.remove(_1)},isc.A.$150m=function isc_TileGrid__canReclaimTile(_1,_2,_3){var _4=_1.tileNum;return _4==null||_4<_2||_4>=_3},isc.A.$150n=function isc_TileGrid__getTileToReclaim(){var _1=this.getDrawnStartIndex(),_2=this.getDrawnEndIndex();var _3=this.$150l;if(_3==null){_3=this.$150l=[];for(var i=0;i<this.tiles.length;i++){var _5=this.tiles[i];if(this.$150m(_5,_1,_2))_3.push(_5)}}
while(_3.length>0){var _5=_3.pop();if(this.$150m(_5,_1,_2))return _5}
return null},isc.A.$150f=function isc_TileGrid__lastVisibleTilesChanged(){delete this.$150l},isc.A.$57w=function isc_TileGrid__reclaimTile(_1,_2){var _3=this.data.get(_1);var _4=_2||this.$150k(_1)||this.$150n();if(this.updateTile!=null&&this.recycleTiles){this.updateTile(_3,_1,_4)}else if(this.tileScreen&&this.recycleTiles){var _5=this.getDataSource();if(_5){var _6={};_6[_5.ID]=_3;_4.setDataContext(_6)}}
var _7=_4.record;if(_7)this.setTileID(_7,null);this.setTileID(_3,_4.ID);this.$150h(_1,_4);return _4},isc.A.canReclaimTile=function isc_TileGrid_canReclaimTile(_1){if(!this.recycleTiles)return false;var _2=this.getDrawnStartIndex(),_3=this.getDrawnEndIndex(),_4=_3-_2;return this.tiles.length>=_4},isc.A.$90l=function isc_TileGrid__tileRightMouseDown(_1){return this.$673(_1)},isc.A.$673=function isc_TileGrid__tileMouseDown(_1){var _2=this.getTileRecord(_1);if(_2){var _3=this.selectionManager.selectOnMouseDown(this,_1.tileNum);if(_3&&this.fireSelectionUpdated&&isc.isA.Function(this.fireSelectionUpdated))
{this.fireSelectionUpdated()}}
var _4=_1.getTop(),_5=_1.getLeft(),_6=_1.getVisibleWidth(),_7=_1.getVisibleHeight();var _8=this.getInnerWidth()-this.$tb-this.$tc,_9=this.getInnerHeight()-this.$td-this.$te;var _10,_11;if(_4<this.getScrollTop()||_7>_9){_11="top"}else if(_4+_7>this.getScrollTop()+_9){_11="bottom"}
if(_5<this.getScrollLeft()||_6>_8){_10="left"}else if(_5+_6>this.getScrollLeft()+_8){_10="right"}
if(_10||_11){this.scrollIntoView(_5,_4,_6,_7,_10,_11,true)}},isc.A.$674=function isc_TileGrid__tileMouseUp(_1){this.selectionManager.selectOnMouseUp(this,_1.tileNum)},isc.A.$57u=function isc_TileGrid__tileClick(_1){var _2=this.getTileRecord(_1);this.recordClick(this,_1,_2)},isc.A.$148x=function isc_TileGrid__tileContextClick(_1){var _2=this.getTileRecord(_1);return this.recordContextClick(this,_1,_2)},isc.A.selectionChange=function isc_TileGrid_selectionChange(_1,_2){if(!this.suppressSelectionChanged&&this.selectionChanged&&(this.selectionChanged(_1,_2)==false))
{return false}
var _3=this.selectionManager,_4=_3.lastSelectionItem;var _5=window[this.getTileID(_4)];if(_5&&_5.setSelected){_5.setSelected(_2)}},isc.A.widgetHandleKeyPress=function isc_TileGrid_widgetHandleKeyPress(_1,_2){if(this.isAnimating("scroll"))return false;var _3=this.selectionManager.lastSelectionItem;if(!_3)return;var _4=_1.keyName,_5=this.selectionManager.data.indexOf(_3),_6=this.orientation=="horizontal",_7;if(_4==this.$20s){_7=_6?this.$60p(_5,"above"):_5-1}else if(_4==this.$20t){_7=_6?this.$60p(_5,"below"):_5+1}else if(_4==this.$60n){_7=_6?_5-1:this.$60p(_5,"above")}else if(_4==this.$60o){_7=_6?_5+1:this.$60p(_5,"below")}else{return}
if(_7==-1||_7>this.data.getLength()-1)return;if(_7==null)return false;var _8=this.selectionManager.data.get(_7),_9=window[this.getTileID(_8)];if(_9){this.$673(_9)}
return false},isc.A.$60p=function isc_TileGrid__adjacentTileIndex(_1,_2){var _3=this.selectionManager.data,_4=_1,_5=window[this.getTileID(_3.get(_4))],_6=this.orientation=="horizontal",_7=_6?_5.getTop():_5.getLeft(),_8=_6?_5.getLeft():_5.getTop(),_9=_6?_5.getVisibleWidth():_5.getVisibleHeight(),_10=_5;while(_7==(_6?_10.getTop():_10.getLeft())){_4=_2=="above"?_4-1:_4+1;if(_4<0||_4>_3.getLength()-1){return-1}
_10=window[this.getTileID(_3.get(_4))];if(!_10)return-1}
var _11=_6?_10.getTop():_10.getLeft();var _12=-1,_13=0;while((_6?_10.getTop():_10.getLeft())==_11){var _14=_6?_10.getLeft():_10.getTop(),_15=_6?_10.getVisibleWidth():_10.getVisibleHeight(),_16=this.$60q([_8,_8+_9],[_14,_14+_15]);if(_16>_13){_12=_4;_13=_16}
_4=_2=="above"?_4-1:_4+1;if(_4<0||_4>_3.getLength()-1)break;_10=window[this.getTileID(_3.get(_4))];if(!_10)break}
return _12},isc.A.$60q=function isc_TileGrid__getCommonRange(_1,_2){if((_2[0]>=_1[0]&&_2[0]<=_1[1])||(_2[1]>=_1[0]&&_2[1]<=_1[1])||(_2[0]<=_1[0]&&_2[1]>=_1[1]))
{var _3=_2[0]>_1[0]?_2[0]:_1[0];var _4=_2[1]>_1[1]?_1[1]:_2[1];return _4-_3}
return 0},isc.A.addTile=function isc_TileGrid_addTile(){return false},isc.A.removeTile=function isc_TileGrid_removeTile(_1){return false},isc.A.getRecordTile=function isc_TileGrid_getRecordTile(_1){if(_1==null)return null;if(!this.data||_1>=this.data.getLength())return null;var _2=this.getTileID(this.data.get(_1));if(!_2)return null;else return window[_2]},isc.A.childVisibilityChanged=function isc_TileGrid_childVisibilityChanged(_1,_2){this.invokeSuper(isc.TileLayout,"childVisibilityChanged",_1,_2)},isc.A.hasAllVisibleTiles=function isc_TileGrid_hasAllVisibleTiles(_1,_2){if(isc.isA.ResultSet(this.data)){if(!this.data.lengthIsKnown())return false;var _3=_1[1]+1;if(_3>this.data.getLength())_3=this.data.getLength();if(this.data.rangeIsLoaded(_1[0],_3)){return true}else{if(_2){this.logDebug("in hasAllVisibleTiles, fetching range: "+_1[0]+" to "+_3+", total length: "+this.data.getLength(),"TileGrid");this.data.getRange(_1[0],_3)}
return false}}else{return true}},isc.A.$31i=function isc_TileGrid__setUpDragProperties(_1){this.canReorderTiles=((_1&&this.canDrag)||this.canReorderTiles);this.canDragTilesOut=((_1&&this.canDrag)||this.canDragTilesOut);this.canAcceptDroppedRecords=((_1&&this.canAcceptDrop)||this.canAcceptDroppedRecords);this.canDrag=((_1&&this.canDrag)||this.canDragTilesOut||this.canReorderTiles);this.canAcceptDrop=((_1&&this.canAcceptDrop)||this.canAcceptDroppedRecords||this.canReorderTiles)},isc.A.setCanReorderTiles=function isc_TileGrid_setCanReorderTiles(_1){this.canReorderTiles=_1;this.$31i()},isc.A.setCanDragTilesOut=function isc_TileGrid_setCanDragTilesOut(_1){this.canDragTilesOut=_1;this.$31i()},isc.A.setCanAcceptDroppedRecords=function isc_TileGrid_setCanAcceptDroppedRecords(_1){this.canAcceptDroppedRecords=_1;this.$31i()},isc.A.getDragTrackerTitle=function isc_TileGrid_getDragTrackerTitle(_1){var _2=this.getTitleField(),_3=_1[_2];return"<nobr>"+_3+"</nobr>"},isc.A.drop=function isc_TileGrid_drop(){var _1=this.$66f;this.$66f=null;var _2=this.ns.EH.dragTarget;var _3=_2.cloneDragData();var _4=this.getDropIndex();var _5=this.data.get(_4);this.transferRecords(_3,_5,_4,_2)},isc.A.getDropIndex=function isc_TileGrid_getDropIndex(){var _1=this.$610||0;return _1>this.data.getLength()?0:_1},isc.A.dropMove=function isc_TileGrid_dropMove(){if(!this.canReorderTiles)return true;if(!this.canAcceptDroppedRecords&&isc.EH.dragTarget!=this)return true;this.showDragLineForRecord()},isc.A.dragStart=function isc_TileGrid_dragStart(){var _1=isc.EH.dropTarget;if(!this.canDragTilesOut&&_1!=null&&_1!=this){return false}
var _2=this.getSelectedRecord();if(_2==null)return false},isc.A.dragMove=function isc_TileGrid_dragMove(){var _1=this.getSelectedRecord();if(this.tileDragAppearance=="outline"){var _2=this.ns.EH;var _3=this.getTileID(_1);var _4=window[_3];var _5="<div style='width:"+_4.getVisibleWidth()+"px;height:"+_4.getVisibleHeight()+"px;'>"+_2.getDragOutline(_4).getInnerHTML()+"</div>";_2.setDragTracker(_5)}else if(this.tileDragAppearance=="target"){var _2=this.ns.EH;var _3=this.getTileID(_1);var _4=window[_3];this.detailViewer.clipValues=false;var _5="<div style='width:"+_4.getVisibleWidth()+"px;height:"+_4.getVisibleHeight()+"px;'>"+_4.getInnerHTML()+"</div>";this.detailViewer.clipValues=true;_2.setDragTracker(_5);_4.hide();this.$815=_4;if(!_2.dragMoveAction)_2.dragMoveAction=_2.$ll;if(_2.dragTarget.showDragShadow)_2.$lm();if(_2.dragTarget.dragOpacity!=null)_2.$ln()}},isc.A.willAcceptDrop=function isc_TileGrid_willAcceptDrop(){var _1=this.ns.EH;var _2=this.Super("willAcceptDrop",arguments);if(!_2)return _2;var _3=_1.dragTarget;if(_3==this){if(!this.canReorderTiles)return false}else{if(!this.canAcceptDroppedRecords)return null}
if(!isc.isAn.Object(_3.getDragData()))return null;return true},isc.A.dragStop=function isc_TileGrid_dragStop(){this.Super("dropOut",arguments);if(this.$815){this.$815.show();this.$815=null}},isc.A.getCellValue=function isc_TileGrid_getCellValue(_1,_2){return this.detailViewer.getStandaloneFieldValue(_1,_2.name)},isc.A.getStandaloneFieldValue=function isc_TileGrid_getStandaloneFieldValue(_1,_2){var _3=this.getCellValue(_1,this.getSpecifiedField(_2));return _3},isc.A.getTitleFieldValue=function isc_TileGrid_getTitleFieldValue(_1){var _2=this.getDataSource(),_3=_2.getTitleField(),_4=this.getCellValue(_1,_2.getField(_3));return _4},isc.A.hideField=function isc_TileGrid_hideField(_1){var _2=this.getSpecifiedField(_1);if(_2!=null){_2.showIf="false";_2.hidden=true;this.$240v();this.fieldStateChanged()}},isc.A.showField=function isc_TileGrid_showField(_1){var _2=this.getSpecifiedField(_1);if(_2!=null){_2.showIf="true";_2.hidden=false;this.$240v();this.fieldStateChanged()}},isc.A.getField=function isc_TileGrid_getField(_1){if(!this.fields)return null;return isc.Class.getArrayItem(_1,this.fields,"name")},isc.A.getFields=function isc_TileGrid_getFields(){return this.fields},isc.A.setFieldState=function isc_TileGrid_setFieldState(_1,_2){if(_2==null)_2=this.sparseFieldState;if(isc.isA.String(_1))_1=this.evalViewState(_1,"fieldState");if(_1){var _3=this.$31y(_1,null,_2);this.setFields(_3);this.markForRedraw();this.fieldStateChanged()}},isc.A.showActionInPanel=function isc_TileGrid_showActionInPanel(_1){if(_1.name=="sort")return true;return this.Super("showActionInPanel",arguments)},isc.A.getPrintHTML=function isc_TileGrid_getPrintHTML(){var _1=isc.ResultSet&&isc.isA.ResultSet(this.data);if(_1&&!this.data.lengthIsKnown()){isc.logWarn("Attempt to print TileGrid "+this.ID+" while data is loading will be ignored");return""}
var _2=this.data.getLength();if(_1&&!this.data.rangeIsLoaded(0,_2)){isc.logWarn("Make sure all data is loaded before attempting to print TileGrid: "+this.ID);return""}
var _3;var _4=this.printTilesPerLine?this.printTilesPerLine:this.getTilesPerLine();if(this.orientation=="horizontal"){var _5=this.getInnerWidth();_3="<table width='"+_5+"'>";for(var i=0;i<_2;i++){var _7=this.getTile(i);if(i%_4==0){if(i==0)_3+="<tr>";else if(i<_2-1)_3+="</tr><tr>"}
_3+="<td>"+_7.getPrintHTML()+"</td>"}
_3+="</tr></table>"}else{_3="<table>";for(var i=0;i<_4;i++){_3+="<tr>";for(var j=i;j<_2;j+=_4){var _7=this.getTile(j);_3+="<td>"+_7.getPrintHTML()+"</td>"}
_3+="</tr>"}
_3+="</table>"}
return _3});isc.evalBoundary;isc.B.push(isc.A.tileLayoutStart=function isc_TileGrid_tileLayoutStart(_1){var _2=this.emptyMessageLabel;if(_2&&_2.isDrawn()&&_2.isVisible()&&_1>0){_2.hide()}},isc.A.setShowEmptyMessage=function isc_TileGrid_setShowEmptyMessage(_1){this.showEmptyMessage=_1;this.updateEmptyMessageLabel()},isc.A.setEmptyMessage=function isc_TileGrid_setEmptyMessage(_1){this.emptyMessage=_1;var _2=this.emptyMessageLabel;if(_2)_2.setContents(_1)},isc.A.setEmptyMessageStyle=function isc_TileGrid_setEmptyMessageStyle(_1){this.emptyMessageStyle=_1;var _2=this.emptyMessageLabel;if(_2)_2.setStyleName(_1)},isc.A.updateEmptyMessageLabel=function isc_TileGrid_updateEmptyMessageLabel(){var _1=this.getEmptyMessage();var _2=this.showEmptyMessage,_3=this.$585&&this.$585.length>0;if(this.emptyMessageLabel==null){if(_2)this.addAutoChild("emptyMessageLabel",{contents:_1,visibility:!_3,styleName:this.emptyMessageStyle})}else{this.emptyMessageLabel.setContents(_1);if(_3||!_2)this.emptyMessageLabel.hide();else{this.emptyMessageLabel.show()}}},isc.A.propertyChanged=function isc_TileGrid_propertyChanged(_1,_2){this.invokeSuper(isc.TileGrid,"propertyChanged",_1,_2);if(this.$31h[_1])this.$34k=true;if(this.editingOn&&this.editProxy&&_1=="initialCriteria"){this.setCriteria(this.initialCriteria)}},isc.A.doneSettingProperties=function isc_TileGrid_doneSettingProperties(){if(this.$34k){this.$31i();delete this.$34k}},isc.A.addField=function isc_TileGrid_addField(_1,_2){if(this.$221q){this.fields=[];delete this.$221q}
var _3=this.Super("addField",arguments);this.$221r();return _3},isc.A.removeField=function isc_TileGrid_removeField(_1){var _2=this.Super("removeField",arguments);this.$221r();return _2},isc.A.setChildEditableProperties=function isc_TileGrid_setChildEditableProperties(_1,_2,_3,_4){var _5=isc.DS.get(_3.type);if(!_5||!_5.inheritsSchema("TileGridField")){return this.Super("setChildEditableProperties",arguments)}
var _6=this.completeFields||this.fields;isc.addProperties(_1,_2);this.setFields(_6,true);this.$221r()},isc.A.$221r=function isc_TileGrid__refreshTilesAfterFieldChange(){if(this.getDataSource())this.tiles.setProperty("$176v",true);this.layoutTiles()});isc.B._maxIndex=isc.C+95;isc.ClassFactory.defineClass("SimpleTile","StatefulCanvas");isc.A=isc.SimpleTile.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.baseStyle="simpleTile";isc.A.overflow="hidden";isc.A.showRollOver=true;isc.A.redrawOnStateChange=true;isc.A._redrawWithParent=false;isc.B.push(isc.A.getInnerHTML=function isc_SimpleTile_getInnerHTML(){var _1=this.tileGrid;if(!_1)return this.Super("getInnerHTML");_1.detailViewer.currentTile=this;this.showDown=_1.valuesShowDown;var _2=this.getRecord();if(!_2)return _1.emptyTileValue;if(_1.loadingMessage!=null&&Array.isLoading(_2)){return _1.loadingMessage}
return _1.getTileHTML(_2)},isc.A.setValues=function isc_SimpleTile_setValues(_1){this.$q7=true},isc.A.getRecord=function isc_SimpleTile_getRecord(){return this.tileGrid.getTileRecord(this)});isc.B._maxIndex=isc.C+3;isc.TileGrid.registerStringMethods({dataArrived:"startRecord,endRecord",selectionChanged:"record,state",itemHover:"item",itemClick:"item",recordClick:"viewer,tile,record",recordDoubleClick:"viewer,tile,record",recordContextClick:"viewer,tile,record",fieldStateChanged:""});isc.ClassFactory.defineClass("AdaptiveMenu","Layout");isc.A=isc.AdaptiveMenu.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.overflow="hidden";isc.A.partialInlining=true;isc.A.showIconOnlyInline=false;isc.A.menuDefaults={_constructor:"Menu"};isc.A.menuButtonConstructor="ToolStripMenuButton";isc.A.menuButtonDefaults={overflow:"visible",visibility:"display"};isc.A.inlineMenuItemDefaults={_constructor:"ToolStripButton",width:1,visibility:"hidden",wrap:false};isc.A.inlineSubmenuItemDefaults={_constructor:"IconMenuButton",width:1,visibility:"hidden",wrap:false};isc.A.separatorDefaults={isSeparator:true};isc.A.inlineSeparatorDefaults={_constructor:"ToolStripSeparator",visibility:"hidden"};isc.A.inlineImgButtonDefaults={_constructor:"ToolStripButton",width:1,title:undefined,visibility:"hidden",wrap:false};isc.A.inlineEmbeddedPlaceholderDefaults={_constructor:"ToolStripButton",height:1,width:1,visibility:"hidden"};isc.A.commonInlineMenuItemProps={getAdaptiveMenu:function(){var _1=this.$2776?this.$2776.creator:this.creator;if(isc.isA.Menu(_1))_1=_1.creator;return _1}};isc.A.commonInlineButtonProps={getAdaptiveMenu:function(){var _1=this.creator;if(isc.isA.Menu(_1))_1=_1.creator;return _1},processVisibilityRule:function(_1,_2){if(!this.creator.$2757){return}
var _3=this.$179t;var _4=!!_1;_3.$2775=!_4;if(_4&&_3.$276c){return}
var _5=(this.visibility!="hidden");if(_5!=_4){if(!this.creator.$283w){this.creator.logDebug("Schedule refresh layout because an inlined item ("+this.title+") visibility changed",this.creator.$283p);this.creator.$283w=true}
isc.Class.fireOnPause("refreshAdaptiveMenu",{target:this.creator,methodName:"refreshLayout"},10);return true}}};isc.B.push(isc.A.setItems=function isc_AdaptiveMenu_setItems(_1){return this.setData(_1)},isc.A.setData=function isc_AdaptiveMenu_setData(_1){this.logDebug("Set new items",this.$283p);this.Super("setData",arguments);this.inlinedCount=0;this.inlinedMax=0;this.removedMembers=0;this.setMembers([]);if(this.menuButton)this.menuButton=undefined;this.menu=null;_1.map(function(_2){_2=isc.addProperties(_2,this.commonInlineMenuItemProps)});this.items=_1;this.data=_1;if(this.isDrawn()){this.createChildren();this.refreshLayout()}});isc.B._maxIndex=isc.C+2;isc.A=isc.AdaptiveMenu.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$283p="adaptiveMenu";isc.B.push(isc.A.initWidget=function isc_AdaptiveMenu_initWidget(){this.inlinedCount=0;this.removedMembers=0;if(this.vertical){this.canAdaptHeight=true;if(this.showInlineSeparators==undefined)this.showInlineSeparators=false}else{this.canAdaptWidth=true;if(this.showInlineSeparators==undefined)this.showInlineSeparators=true;this.animateMemberEffect={effect:"slide",startFrom:"L",endAt:"L"}}
if(this.inlinePlacement=="center"){isc.logWarn("Center is an invalid value for inlinePlacement in adaptiveMenu, ignoring this setting.");this.inlinePlacement=undefined}
if(this.items){var _1=this;this.items.map(function(_2){_2=isc.addProperties(_2,_1.commonInlineMenuItemProps)})}
this.Super("initWidget",arguments)},isc.A.createChildren=function isc_AdaptiveMenu_createChildren(){for(var i=0;i<this.items.getLength();i++){var _2=this.items.get(i);var _3=_2.showIconOnlyInline==undefined?this.showIconOnlyInline:_2.showIconOnlyInline;var _4;if(_2.isSeparator){_4=this.createAutoChild("inlineSeparator",{vertical:!this.vertical,height:(!this.vertical?isc.ToolStrip.getInstanceProperty("separatorSize"):isc.ToolStrip.getInstanceProperty("separatorBreadth")),width:(!this.vertical?isc.ToolStrip.getInstanceProperty("separatorBreadth"):isc.ToolStrip.getInstanceProperty("separatorSize"))})}else if(_2.embeddedComponent){_2.$25m=this.createAutoChild("inlineEmbeddedPlaceholder",{$179t:_2});_4=_2.embeddedComponent;_4.visibility="hidden"}else if(_3){_4=this.createAutoChild("inlineImgButton",isc.addProperties({enableWhen:_2.enableWhen,visibleWhen:_2.visibleWhen,icon:_2.icon,click:_2.click},this.commonInlineButtonProps))}else if(_2.submenu!=undefined){var _5=this.createAutoChild("inlineSubmenu",{data:_2.submenu},isc.Menu);_4=this.createAutoChild("inlineSubmenuItem",isc.addProperties({enableWhen:_2.enableWhen,visibleWhen:_2.visibleWhen,icon:_2.icon,title:_2.title,click:_2.click,menu:_5},this.commonInlineButtonProps))}else{_4=this.createAutoChild("inlineMenuItem",isc.addProperties({enableWhen:_2.enableWhen,visibleWhen:_2.visibleWhen,icon:_2.icon,title:_2.title,click:_2.click},this.commonInlineButtonProps))}
this.addMember(_4);_4.$179t=_2;_2.$2776=_4;_2.$276c=true}
this.inlinedMax=this.items.getLength();if(!this.menuButton)this.createMenuButton();else if(!this.menuButton.isDrawn())this.menuButton.draw();this.$2757=true},isc.A.populateMenu=function isc_AdaptiveMenu_populateMenu(_1){if(!this.menuButton.menu||_1){var _2=[];var j=0;for(var i=0;i<this.items.getLength();i++){var _5=this.items.get(i);var _6=_5.$2776;var _7=_5.embeddedComponent?_5.embeddedComponent:_6;if(_1&&(_7.visibility!=="hidden"||_5.$2775)){continue}
_2[j++]=_5;if(this.showInlineSeparators&&i<this.items.getLength()-1)_2[j++]=this.createAutoChild("separator")}
this.menu=this.createAutoChild("menu",{data:_2});this.menuButton.menu=this.menu}
return this.menu},isc.A.createMenuButton=function isc_AdaptiveMenu_createMenuButton(){var _1=1;if(this.menuButtonIcon)_1=this.menuButtonIcon.width+1;this.menuButton=this.createAutoChild("menuButton",{title:this.menuButtonTitle,icon:this.menuButtonIcon,width:_1});isc.Canvas.moveOffscreen(this.menuButton);this.menuButton.show();this.menuButtonWidth=this.menuButton.getVisibleWidth();this.menuButtonHeight=this.menuButton.getVisibleHeight();this.menuButton.hide();this.addMember(this.menuButton);this.observe(this.menuButton,"click",function(){this.populateMenu()})},isc.A.layoutChildren=function isc_AdaptiveMenu_layoutChildren(_1){this.Super("layoutChildren",arguments);if(!this.$2757){this.createChildren()}},isc.A.refreshLayout=function isc_AdaptiveMenu_refreshLayout(){this.logDebug("Refresh layout",this.$283p);delete this.$283w;var _1=this;var _2=function(_7){if(!_7||!_7.embeddedComponent)return;_7.embeddedComponent.hide();_7.$276c=true;delete _7.embeddedComponent.embeddedPosition;var _3=_1.getMemberNumber(_7.embeddedComponent);if(_3>=0){_1.removeMember(_7.embeddedComponent);_1.addMember(_7.$25m,_3)}
if(_7.embeddedComponent.$1732){_7.embeddedComponent.setSnapTo(_7.embeddedComponent.$1732);delete _7.embeddedComponent.$1732}
if(_1.menu)_1.menu.updateRecordComponents()};var _4=this.members;for(var i=0;i<_4.length;i++){var _6=this.members[i];var _7=_6.$179t;var _8=_7&&_7.embeddedComponent?_7.embeddedComponent:_6;if(_8&&_8!==this.menuButton){_8.hide();_7.$276c=true}
if(_7&&_7.embeddedComponent){_2(_7)}}
for(i=0;i<this.inlinedMax;i++){_7=this.items.get(i);if(_7&&_7.embeddedComponent){_2(_7)}}
this.inlinedCount=0;this.populateMenu(true);if(!this.vertical)this.adaptWidthBy(0,this.getVisibleWidth());else this.adaptHeightBy(0,this.getVisibleHeight())},isc.A.setPartialInlining=function isc_AdaptiveMenu_setPartialInlining(_1){this.logDebug("Partial inlining changed from "+this.partialInlining+" to "+_1,this.$283p);this.partialInlining=_1;this.refreshLayout()},isc.A.adaptWidthBy=function isc_AdaptiveMenu_adaptWidthBy(_1,_2){return this.$1726("Width",_1,_2)},isc.A.adaptHeightBy=function isc_AdaptiveMenu_adaptHeightBy(_1,_2){return this.$1726("Height",_1,_2)},isc.A.getNextInlineItemDimension=function isc_AdaptiveMenu_getNextInlineItemDimension(_1,_2){var _3=isc.NumberUtil.clamp(this.inlinedCount,0,this.inlinedMax);var _4=this.items.get(this.inlinedCount);var _5=_4.$2776;var _6=_4&&_4.embeddedComponent?_4.embeddedComponent:_5;if(!_6.isDrawn())_6.draw();if(_4.$2775)return 0;var _7=_3===this.inlinedMax-1;var _8=_6["getVisible"+_1]()+(_7?-this["minimal"+_1]:0);return _6["getVisible"+_1]()+(!_2&&_7?-this["minimal"+_1]:0)},isc.A.getNextInlineItem=function isc_AdaptiveMenu_getNextInlineItem(){return this.items.get(this.inlinedCount)},isc.A.getNextInlinedItemWidth=function isc_AdaptiveMenu_getNextInlinedItemWidth(){return this.getNextInlineItemDimension("Width")},isc.A.getNextInlinedItemHeight=function isc_AdaptiveMenu_getNextInlinedItemHeight(){return this.getNextInlineItemDimension("Height")},isc.A.getItemDimension=function isc_AdaptiveMenu_getItemDimension(_1,_2){var _3=_1.embeddedComponent?_1.embeddedComponent:_1.$2776;return(_1.$2775?0:_3["getVisible"+_2]())},isc.A.removeInlinedItem=function isc_AdaptiveMenu_removeInlinedItem(_1){var _2=this.populateMenu();if(!_2){return-1}
if(this.inlinedCount===0){return-1}
if(this.showInlineSeparators&&_2.data.getLength()>0){_2.data.addAt({isSeparator:true},0)}
var _3=this.items[this.inlinedCount-1];if(!_3)return-1;this.inlinedCount--;var _4=_3.$2776;var _5=_3.embeddedComponent?_3.embeddedComponent:_4;_5.hide();_3.$276c=true;if(_3.isSeparator){_2.$282n=_3}else{if(_2.$282n){_2.data.addAt(_2.$282n,0);delete _2.$282n}
_2.data.addAt(_3,0)}
if(_3.enableWhen){_2.setItemEnabled(0,!_5.disabled)}
if(_3.embeddedComponent){var _6=this.getMemberNumber(_3.embeddedComponent);this.removeMember(_3.embeddedComponent);this.addMember(_3.$25m,_6);if(_3.embeddedComponent.$1732){_3.embeddedComponent.setSnapTo(_3.embeddedComponent.$1732);delete _3.embeddedComponent.$1732}
_2.updateRecordComponents()}
var _7=this.getItemDimension(_3,_1);if(!_3.isSeparator){this.logDebug("Removed inlined item ("+_7+"): "+(_3.embeddedComponent?"embedded component":_3.title),this.$283p);var _8=this.$283q();if(_8&&_8.isSeparator){var _9=this.removeInlinedItem(_1);_7+=_9}}else{this.logDebug("Removed inlined item ("+_7+"): separator",this.$283p)}
return _7},isc.A.$283q=function isc_AdaptiveMenu__getLastInlinedItem(){var _1;for(var i=this.inlinedCount-1;i>=0;i--){if(!this.items[i].$276c){_1=this.items[i];break}}
return _1},isc.A.addInlinedItem=function isc_AdaptiveMenu_addInlinedItem(_1,_2){var _3=this.populateMenu();if(!_3){return}
var _4=this.items[this.inlinedCount],_5=this.getItemDimension(_4,_1);if(_5>_2){return-1}
var _6=null;if(_3.$282n){_6=_3.$282n}else{_6=_3.data.getLength()>0?_3.data.get(0):null}
if(_6&&_6===_4){if(_3.$282n){delete _3.$282n}else{_3.data.removeAt(0)}}else{_6=_4}
if(this.showInlineSeparators&&_3.data.getLength()>0){_3.data.removeAt(0)}
if(_6&&_6.embeddedComponent){_3.removeEmbeddedComponent(_6,_6.embeddedComponent);_3.updateRecordComponents();if(_3.isDrawn()){_3.redraw()}}
var _7=_6;if(_7&&_7.embeddedComponent){if(_7.embeddedComponent.snapTo){_7.embeddedComponent.$1732=_7.embeddedComponent.snapTo;delete _7.embeddedComponent.snapTo}
var _8=this.getMemberNumber(_7.$25m);if(_8===-1)_8=this.inlinedCount;this.removeMember(_7.$25m);this.addMember(_7.embeddedComponent,_8)}
var _9=_7&&_7.$2776;if(_9&&!_7.$2775)_9.show();if(_7){delete _7.$276c;var _10=(_7.$2775?0:_9["getVisible"+_1]());this.logDebug("Added inline item: "+(_7.embeddedComponent?"embedded component":(_7.isSeparator?"separator":_7.title))+" ("+_10+")",this.$283p);this.inlinedCount++}
if(_3.getTotalRows()===0){this.menuButton.hide();this.logDebug("Hide menu button",this.$283p)}
return _5},isc.A.$1726=function isc_AdaptiveMenu__adaptDimensionBy(_1,_2,_3){var _4=0;var _5=0;var _6=function(_9){return _9&&_9.embeddedComponent?_9.embeddedComponent:_9.$2776};var _7=function(_9,_10){return((_10&&_10.visibility==="hidden")||(_9&&_9.embeddedComponent&&!_9.embeddedComponent.isVisible()))};for(var i=0;i<this.inlinedMax;i++){var _9=this.items.get(i);var _10=_6(_9);if(_10!==this.menuButton){if(!_10.isDrawn()){_10.draw()}
_5+=_10["getVisible"+_1]()}
if(_7(_9,_10)){continue}
_4+=_10["getVisible"+_1]()}
var _11=_3+_2;if(!this.partialInlining){if(_5>_11){while(this.inlinedCount>0){this.removeInlinedItem(_1)}
this.menuButton.show();return this.menuButton["getVisible"+_1]()-_3}}
this.logDebug("Adapt menu by "+_1+" by "+_2+" ("+_3+")",this.$283p);this.logDebug("Available space: "+_11+", used space: "+_4,this.$283p);this.$283r("Current",_1);if(_11<_4){while(this.inlinedCount>0&&_4>_11){var _12=this.removeInlinedItem(_1);if(_12<0){break}
_4-=_12}}else if(_11>_4){while(this.inlinedCount<this.inlinedMax&&_4<_11){var _12=this.addInlinedItem(_1,_11-_4);if(_12<0){break}
_4+=_12}
var _13=this.$283q();if(_13&&_13.isSeparator){_4-=this.removeInlinedItem(_1)}}
if(this.menu&&this.menu.getTotalRows()>0){this.$284b(_1,_4,_11)}
this.$283r("Done adapt "+_1,_1);return _2},isc.A.$284b=function isc_AdaptiveMenu__showMenuButton(_1,_2,_3){var _4=this["menuButton"+_1];if(_4==null){this.logError("MenuButton has no visible dimension. Cannot be shown.")}
if(_4+_2>_3){this.logDebug("Make space for menu button ("+_4+"). "+_4+"+"+_2+" > "+_3,this.$283p);_2+=_4;while(this.inlinedCount>0&&_2>_3){var _5=this.removeInlinedItem(_1);if(_5<0){break}
_2-=_5}}
this.menuButton.show();this.logDebug("Show menu button",this.$283p);for(var i=this.inlinedCount;i<this.inlinedMax;i++){var _7=this.items.get(i);_7.$276c=true}},isc.A.$283r=function isc_AdaptiveMenu__dumpVisibleItems(_1,_2){if(!this.logIsDebugEnabled(this.$283p))return;_2=_2||"Width";var _3=this.items,_4=0,_5="";for(var i=0;i<_3.length;i++){var _7=_3[i],_8=_7.$2776;if(!_7.$276c){var _9=(_7.$2775?0:_8["getVisible"+_2]());_5+=" "+(_7.embeddedComponent?"embedded component":(_7.isSeparator?"separator":_7.title))+" ("+_9+")";_4+=_9}}
this.logDebug(_1+" inlined items ["+this.inlinedCount+" of "+this.inlinedMax+", total size="+_4+"]: "+_5,this.$283p)},isc.A.getVisibleInlinedMemberCount=function isc_AdaptiveMenu_getVisibleInlinedMemberCount(){var _1=this.getMembers().length,_2=0;for(var i=0;i<_1;i++){var _4=this.getMember(i);if(_4.visibility!="hidden"&&_4!=this.menuButton){_2++}}
return _2},isc.A.getInlinedItemCount=function isc_AdaptiveMenu_getInlinedItemCount(){var _1=this.items,_2=0;for(var i=0;i<_1.length;i++){var _4=_1[i],_5=_4.$2776;if(!_4.$276c){_2++}}
return _2},isc.A.getVisibleItemsTotalLength=function isc_AdaptiveMenu_getVisibleItemsTotalLength(){var _1=this.vertical?"Height":"Width",_2=this.items,_3=0;for(var i=0;i<_2.length;i++){var _5=_2[i],_6=_5.$2776;if(!_5.$276c){var _7=(_5.$2775?0:_6["getVisible"+_1]());_3+=(_5.$2775?0:_6["getVisible"+_1]())}}
return _3});isc.B._maxIndex=isc.C+23;isc.ClassFactory.defineClass("ColumnTree","Layout","DataBoundComponent");isc.A=isc.ColumnTree;isc.A.TREE_FIELD={name:"treeField",width:"*",getCellValue:function(_1,_2,_3,_4,_5,_6,_7,_8){var _9=_1.creator;var _10=_9.getNodeTitle(_2,_3);if(!_1.$35k){_1.$35k=_9.data}
_10=_1.getTreeCellValue(_10,_2,_3,_4);return _10}};isc.A=isc.ColumnTree.getPrototype();isc.A.orientation="horizontal";isc.A.animateMemberEffect={effect:"slide",startFrom:"L",endAt:"R"};isc.A.iconSize=16;isc.A.folderIcon="[SKIN]/folder.png";isc.A.customIconProperty="icon";isc.A.skinImgDir="images/TreeGrid/";isc.A.nodeIcon="[SKIN]file.png";isc.A.openIconSuffix="open";isc.A.closedIconSuffix="closed";isc.A.showOpenIcons=true;isc.A.showCustomIconOpen=false;isc.A.customIconOpenProperty="showOpenIcon";isc.A.showColumn=true;isc.A.columnConstructor="ListGrid";isc.A.columnDefaults={animateTime:100,animateEffect:"slide",canAddFormulaFields:false,canAddSummaryFields:false,canSort:false,canGroupBy:false,showHeaderMenuButton:false,selectionChanged:function(_1,_2){if(_2){this.creator.nodeSelected(this,_1)}},bodyProperties:{$29h:function(_1,_2,_3,_4,_5){var _6="padding:0px;border:0px;";if(_4==null)_4=this.getTableElement(_2,_3);if(_4==null)return;if(!this.showHiliteInCells)
{if(_1==null)_1=this.getCellRecord(_2,_3);if(_5==null)_5=this.getCellStyle(_1,_2,_3);var _7=_4.firstChild;while(_7&&_7.tagName!="TABLE")_7=_7.firstChild;if(_7){_7.className=_5;if(this.getCellCSSText){_4.style.cssText=isc.StringBuffer.concat(this.$29i(_1,_2,_3,_5),this.zeroBorderPadding)}}}
return isc.GridRenderer.getPrototype().$29h.apply(this,[_1,_2,_3,_4,_5])}},drop:function(){return this.dropTreeNode()},folderDrop:function(_1,_2,_3,_4,_5){this.transferNodes(_1,_2,_3,_4,_5)},getData:function(){return this.creator.data},getDataSource:function(){var _1=this.creator.dataSource;if(_1&&_1.getID){return _1}
return null},transferDragData:function(){var _1=this.Super("transferDragData",arguments);var _2=this.creator.getColumnIndex(_1[0]);this.creator.hideColumnsToRight(_2);return _1},$34t:0,indentSize:0,initWidget:function(){var _1=this.creator;this.iconSize=_1.iconSize;this.folderIcon=_1.folderIcon;this.customIconProperty=_1.customIconProperty;this.skinImgDir=_1.skinImgDir;this.nodeIcon=_1.nodeIcon;this.openIconSuffix=_1.openIconSuffix;this.closedIconSuffix=_1.closedIconSuffix;this.showOpenIcons=_1.showOpenIcons;this.showCustomIconOpen=_1.showCustomIconOpen;this.customIconOpenProperty=_1.customIconOpenProperty;this.canReorderRecords=_1.canReorderRecords;this.canDragRecordsOut=_1.canDragRecordsOut;this.canAcceptDroppedRecords=_1.canAcceptDroppedRecords;if(this.columnTitle){this.setShowHeader(true);this.setFieldProperties(0,{title:this.columnTitle})}
this.Super("initWidget",arguments)}};isc.A.showHeaders=false;isc.A.firstColumnTitle="&nbsp;";isc.A.showNodeCount=false;isc.A.wrapCells=false;isc.A.iconPadding=3;isc.A.ignoreEmptyCriteria=false;isc.A.backButtonTitle="Back";isc.A.backButtonDefaults={_constructor:"IButton",snapTo:"TR",left:5,top:5,autoFit:true,click:function(){this.creator.navigateBack()}};isc.A.overflow="hidden";isc.A=isc.ColumnTree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canDragRecordsOut=false;isc.B.push(isc.A.getDynamicDefaults=function isc_ColumnTree_getDynamicDefaults(_1){if(_1=="column"){return{autoDraw:false,showHiliteInCells:true,leaveScrollbarGap:false,selectionType:"single",showHeader:false,fields:isc.clone(this.fields)}}},isc.A.initWidget=function isc_ColumnTree_initWidget(){this.Super("initWidget",arguments);if(this.showMultipleColumns==null)
this.showMultipleColumns=!isc.Browser.isHandset;this.columns=[];if(!this.dataSource&&this.data!=null&&this.data.dataSource){this.dataSource=this.data.dataSource}
if(!this.fields||this.fields.length==0){this.fields=[isc.ColumnTree.TREE_FIELD]}
if(this.showMultipleColumns==false&&this.showHeaders&&this.showBackButton!=false){this.backButton=this.createAutoChild("backButton",{title:this.backButtonTitle,disabled:true});this.addChild(this.backButton);this.backButton.bringToFront()}
this.columns[0]=this.createAutoChild("column",this.$198h(this.data?this.data.getRoot():null,0),null,false);this.addColumn(this.columns[0],0);if(this.fixedColumns){for(var i=1;i<this.fixedColumns;i++){this.columns[i]=this.createAutoChild("column",this.$198h(null,i),null,false);this.addColumn(this.columns[i],i)}}
this.currentColumn=0;if(this.data)this.populateFirstColumn()},isc.A.populateFirstColumn=function isc_ColumnTree_populateFirstColumn(){if(this.data.showRoot){this.columns[0].setData([this.data.getRoot()])}else{var _1=this.data.getChildren(this.data.getRoot());if(isc.isA.ResultSet(_1)){_1=_1.getAllLoadedRows()}
this.columns[0].setData(_1)}
if(this.shouldShowHeader(null,0)){this.columns[0].setShowHeader(true);this.columns[0].setFieldProperties(0,{title:this.getColumnTitle(null,0)})}},isc.A.treeIsTied=function isc_ColumnTree_treeIsTied(_1,_2){return false},isc.A.getSelectedRecord=function isc_ColumnTree_getSelectedRecord(){if(this.currentColumn<=0)return this.data.getRoot();var _1=this.getColumn(this.currentColumn-1);return _1.getSelectedRecord()},isc.A.navigateBack=function isc_ColumnTree_navigateBack(){if(this.currentColumn<=0)return;var _1,_2;if(this.currentColumn>=2){_1=this.columns[this.currentColumn-2];_2=_1&&_1.getSelectedRecord()}else{_1=this.columns[0];_2=this.data.getRoot()}
if(_2==null){return}
this.logInfo("navigating to column: "+(this.currentColumn-1)+" to node: "+this.data.getTitle(_2));this.nodeSelected(_1,_2,true)},isc.A.slideTransition=function isc_ColumnTree_slideTransition(_1,_2,_3,_4){if(!isc.Browser.isWebKit){if(_4){_2.deselectAllRecords();_2.animateShow()}else{_1.animateHide();_2.show()}
_2.bringToFront();return}
this.logInfo((_4?"right":"left")+" slideTransition from: "+_1+" to "+_2+" within "+_3);_2.hide();_3.addChild(_2);if(!_2.isDrawn())_2.draw();var _5=_1.getStyleHandle();var _6=_2.getStyleHandle();_6.setProperty("-webkit-transition","none");var _7="translate3d("+(_4?"-":"")+_3.getViewportWidth()+"px, 0%, 0%)";_6.setProperty("-webkit-transform",_7);var _8=_3.overflow;_3.setOverflow("hidden");_2.show();isc.Timer.setTimeout(function(){_5.setProperty("-webkit-transition","-webkit-transform 0.3s ease-in-out");_6.setProperty("-webkit-transition","-webkit-transform 0.3s ease-in-out");_7="translate3d("+(_4?"":"-")+_3.getViewportWidth()+"px, 0%, 0%)";_5.setProperty("-webkit-transform",_7);_6.setProperty("-webkit-transform","translate3d(0px, 0%, 0%)");isc.Timer.setTimeout(function(){_1.hide();_3.setOverflow(_8)},350)},0)},isc.A.nodeSelected=function isc_ColumnTree_nodeSelected(_1,_2,_3){if(this.onNodeSelected!=null&&(this.onNodeSelected(_1,_2)==false)){return}
var _4=this.getColumnIndex(_2),_5=this.data.isFolder(_2);var _6=_4+1;if(!_5)_6-=1;var _7=this.columns[_6];if(!this.treeIsTied(_1,_2)){if(this.showMultipleColumns!=false)this.hideColumnsToRight(_6);if(!_5)return;this.data.openFolder(_2);if(isc.isA.ListGrid(_7)){_7.deselectAllRecords();var _8=this.data.getChildren(_2);if(isc.isA.ResultSet(_8)){_8=_8.getAllLoadedRows()}
_7.setData(_8);this.addColumn(_7,_6)}else{_7=this.columns[_6]=this.createAutoChild("column",this.$198h(_2,_4+1),null,false);var _8=this.data.getChildren(_2);if(isc.isA.ResultSet(_8)){_8=_8.getAllLoadedRows()}
_7.setData(_8);this.addColumn(_7,_6)}
if(this.shouldShowHeader(_2,_6)){_7.setShowHeader(true);var _9=this.getColumnTitle(_2,_6);_7.setFieldProperties(0,{title:_9})}
if(_7.data.getLength()>0){this.updateHeadingNodeCount(_2)}}
var _10=(_3?this.columns[this.currentColumn]:_1);var _11=_7;if(this.showMultipleColumns==false){this.slideTransition(_10,_11,this,_3?true:false)}else{_11.show()}
this.currentColumn=(_6<0?0:_6);this.logInfo("currentColumn is now: "+this.currentColumn);if(this.backButton){this.backButton.bringToFront();this.backButton.setDisabled(this.currentColumn<=0)}},isc.A.addColumn=function isc_ColumnTree_addColumn(_1,_2){if(this.showMultipleColumns==false){_1.resizeTo("100%","100%");this.addChild(_1,_2)}else{this.addMember(_1,_2)}},isc.A.getCurrentTitle=function isc_ColumnTree_getCurrentTitle(){return this.columns[this.currentColumn].getFieldTitle(0)},isc.A.getPreviousTitle=function isc_ColumnTree_getPreviousTitle(){if(this.currentColumn<=0)return"";return this.columns[this.currentColumn-1].getFieldTitle(0)},isc.A.updateHeadingNodeCount=function isc_ColumnTree_updateHeadingNodeCount(_1){var _2=this.getColumnIndex(_1);if(!this.shouldShowHeader(_1,_2)||!this.showNodeCount)return;if(_2<0)return;if(this.columns[_2+1].data.getLength()==0)return;var _3=this.getColumnTitle(_1,_2+1);if(this.showNodeCount){_3=_3+" ("+this.columns[_2+1].data.getLength()+")"}
this.columns[_2+1].setFieldProperties(0,{title:_3})},isc.A.getColumnIndex=function isc_ColumnTree_getColumnIndex(_1){if(this.data.showRoot){return this.data.getLevel(_1)}else{var _2=this.data.getLevel(_1);return _2-1}},isc.A.hideColumnsToRight=function isc_ColumnTree_hideColumnsToRight(_1){for(var i=_1+1;i<this.columns.length;i++){if(this.fixedColumns){this.columns[i].setData([])}else{this.columns[i].hide();this.columns[i].deselectAllRecords()}}},isc.A.shouldShowHeader=function isc_ColumnTree_shouldShowHeader(_1,_2){return this.showHeaders},isc.A.getColumnTitle=function isc_ColumnTree_getColumnTitle(_1,_2){if(this.fixedColumns&&this.columnTitles){return this.columnTitles[_2]}
if(_2==0){return this.firstColumnTitle}else{return this.data.getTitle(_1)}},isc.A.getRecord=function isc_ColumnTree_getRecord(_1,_2){if(_1==null||_1<0)return null;if(_2!=null){if(_2<0||_2>this.columns.length){return null}
if(_1>this.columns[_2].data.length||!this.columns[_2].isVisible()){return null}
return this.columns[_2].data[_1]}
var _3=0;for(var _4=0;_4<this.columns.length;_4++){if(!this.columns[_4].isVisible())continue;if(_3+this.columns[_4].data.length>_1){return this.columns[_4].data[_1-_3]}
_3+=this.columns[_4].data.length}
return null},isc.A.getNodeTitle=function isc_ColumnTree_getNodeTitle(_1,_2,_3){return this.data.getTitle(_1)},isc.A.getData=function isc_ColumnTree_getData(){return this.data},isc.A.setData=function isc_ColumnTree_setData(_1,_2,_3,_4){if(!isc.isA.Tree(_1))return;this.data=_1;this.data.columnTree=this;this.data.setProperty("dataArrived","this.columnTree.updateHeadingNodeCount(parentNode);");this.data.setSeparateFolders(this.separateFolders);if(this.showRoot&&isc.isA.ResultTree(this.data)){this.logWarn("showRoot may not be set with a databound columnTree, unexpected results may occur")}
this.data.setShowRoot(this.showRoot);this.data.setOpenDisplayNodeType(this.displayNodeType);this.data.openFolder(this.data.root);this.hideColumnsToRight(0);this.populateFirstColumn()},isc.A.useExistingDataModel=function isc_ColumnTree_useExistingDataModel(_1,_2,_3){return false},isc.A.createDataModel=function isc_ColumnTree_createDataModel(_1,_2,_3){return this.createResultTree(_1,_3.afterFlowCallback,_3,null)},isc.A.updateDataModel=function isc_ColumnTree_updateDataModel(_1,_2,_3){},isc.A.getColumn=function isc_ColumnTree_getColumn(_1){if(isc.isAn.Object(_1)){var _2=this.getColumnIndex(_1)+1;if(this.columns[_2]&&this.columns[_2].isVisible())return this.columns[_2]}else{var _3=this.columns[_1];if(_1<=this.currentColumn&&_3&&_3.isVisible())return _3}
return null},isc.A.getColumnProperties=function isc_ColumnTree_getColumnProperties(_1,_2){},isc.A.$198h=function isc_ColumnTree__getColumnProperties(_1,_2){var _3={};if(this.fixedColumns){if(this.columnWidths)_3.width=this.columnWidths[_2];if(this.columnTitles)_3.columnTitle=this.columnTitles[_2];if(this.emptyColumnMessages)_3.emptyMessage=this.emptyColumnMessages[_2];isc.addProperties(_3,this.getColumnProperties(_1,_2))}
if(this.folderDrop){_3.folderDrop=this.folderDrop}
return _3},isc.A.selectAllRecords=function isc_ColumnTree_selectAllRecords(_1){if(_1==null)_1=0;if(!this.columns[_1])return;this.columns[_1].selectAllRecords()},isc.A.deselectAllRecords=function isc_ColumnTree_deselectAllRecords(_1){if(_1==null)_1=0;if(!this.columns[_1])return;this.columns[_1].deselectAllRecords()},isc.A.anySelected=function isc_ColumnTree_anySelected(_1){if(_1==null)_1=0;if(!this.columns[_1])return false;return this.columns[_1].anySelected()},isc.A.getSelection=function isc_ColumnTree_getSelection(_1){if(_1==null)_1=0;if(!this.columns[_1])return[];return this.columns[_1].getSelection()},isc.A.getSelectionObject=function isc_ColumnTree_getSelectionObject(_1){if(_1==null)_1=0;if(!this.columns[_1])return null;return this.columns[_1].selectionManager});isc.B._maxIndex=isc.C+31;isc.ColumnTree.registerStringMethods({nodeSelected:"column, node",onNodeSelected:"column,node"})
isc.ClassFactory.defineClass("TableView","ListGrid");isc.A=isc.TableView;isc.A.canShowFilterEditor=false;isc.A.canSaveSearches=false;isc.A.PLAIN="plain";isc.A.GROUPED="grouped";isc.A.TITLE_ONLY="titleOnly";isc.A.TITLE_DESCRIPTION="titleAndDescription";isc.A.SUMMARY_INFO="summaryInfo";isc.A.SUMMARY_DATA="summaryData";isc.A.SUMMARY_FULL="summaryFull";isc.A.WHOLE_RECORD="wholeRecord";isc.A.NAVICON_ONLY="navIconOnly";isc.A=isc.TableView.getPrototype();isc.A.iconField="icon";isc.A.showIconField=true;isc.A.titleField="title";isc.A.infoField="info";isc.A.dataField="data";isc.A.descriptionField="description";isc.A.recordNavigationProperty="$79p";isc.A.tableMode=isc.TableView.PLAIN;isc.A.recordLayout=isc.TableView.TITLE_ONLY;isc.A.navIcon="[SKINIMG]/iOS/listArrow_button.png";isc.A.wholeRecordNavIcon="[SKINIMG]/iOS/listArrow.png";isc.A.navigationMode=isc.TableView.WHOLE_RECORD;isc.A.recordTitleStyle="recordTitle";isc.A.recordDescriptionStyle="recordDescription";isc.A.recordDataStyle="recordData";isc.A.recordInfoStyle="recordInfo";isc.A.iconFieldDefaults={width:50,imageSize:30,align:"center",type:"image"};isc.A.titleFieldDefaults={name:"TVtitleField",width:"*",type:"text",formatCellValue:function(_1,_2,_3,_4,_5){if(_5.formatRecord!=null){return _5.formatRecord(_2)}
var _6=_5.$80v(_2,_5.titleField),_7=_5.$80v(_2,_5.descriptionField),_8=_5.$80v(_2,_5.infoField),_9=_5.$80v(_2,_5.dataField),_10="";if(_5.recordLayout==isc.TableView.SUMMARY_INFO||_5.recordLayout==isc.TableView.SUMMARY_FULL)
{_10+="<span class='"+_5.recordInfoStyle+"'>"+_8+"</span>"}
_10+="<span class='"+_5.recordTitleStyle+"'>"+_6+"</span>";if(_5.recordLayout!=isc.TableView.TITLE_ONLY){_10+="<span class='"+_5.recordDescriptionStyle+"'>"+_7+"</span>"}
if(_5.recordLayout==isc.TableView.SUMMARY_DATA||_5.recordLayout==isc.TableView.SUMMARY_FULL)
{_10+="<span class='"+_5.recordDataStyle+"'>"+_9+"</span>"}
return _10}};isc.A.navigationFieldDefaults={name:"TVnavigationField",width:54,align:"right",formatCellValue:function(_1,_2,_3,_4,_5){if(_5.getShowNavigation(_2)){var _6=isc.Img.create({autoDraw:false,autoFit:true,imageType:"normal",src:_5.getNavigationIcon(_2)});return _6.getInnerHTML()}
return _5.$54t}};isc.A.groupByFieldDefaults={showIf:"false"};isc.A.canAddFormulaFields=false;isc.A.canAddSummaryFields=false;isc.A.showHeader=false;isc.A.selectionType="none";isc.A.skinImgDir="images/iOS/";isc.A.baseStyle="tableCell";isc.A.border="0px";isc.A.wrapCells=false;isc.A.cellHeight=44;isc.A.alternateRecordStyles=false;isc.A.canCollapseGroup=false;isc.A.groupStartOpen="all";isc.A.ignoreEmptyCriteria=false;isc.A=isc.TableView.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_TableView_initWidget(){this.Super("initWidget",arguments);this.$80w={}},isc.A.setFields=function isc_TableView_setFields(_1){this.invokeSuper(isc.TableView,"setFields",this.$80x(_1))},isc.A.$80x=function isc_TableView__defineTableFields(_1){var _2=_1||[];for(var i=0;i<_2.length;i++){_2[i].showIf="false"}
if(this.showIconField){var _4=_2.find("name",this.iconField);if(_4)_2.remove(_4);this.$79q=_2.length;_2[_2.length]=isc.addProperties({name:this.iconField},this.iconFieldDefaults,this.iconFieldProperties)}
var _4=_2.find("name",this.titleFieldDefaults.name);if(_4)_2.remove(_4);_2[_2.length]=isc.addProperties({},this.titleFieldDefaults,this.titleFieldProperties);var _4=_2.find("name",this.navigationFieldDefaults.name);if(_4)_2.remove(_4);this.$79r=_2.length;_2[_2.length]=isc.addProperties({},this.navigationFieldDefaults,this.navigationFieldProperties);if(this.groupByField){var _5;if(isc.isA.Array(this.groupByField)){_5=this.groupByField}else{_5=[this.groupByField]}
for(var i=0;i<_5.length;i++){var _6=_2.find("name",_5[i]);if(_6){isc.addProperties(_6,this.groupByFieldDefaults,this.groupByFieldProperties)}else{_2[_2.length]=isc.addProperties({name:_5[i]},this.groupByFieldDefaults,this.groupByFieldProperties)}}}
return _2},isc.A.$80v=function isc_TableView__getFormattedFieldValue(_1,_2){var _3=_1[_2]||this.$54t,_4=this.$80w[_2],_5;if(_4==null||_4==_5){_4=isc.Class.getArrayItemIndex(_2,this.getAllFields(),"name");this.$80w[_2]=_4}
if(_4>=0){_3=this.getFormattedValue(_1,_2,_3)}
return _3},isc.A.getNavigationIcon=function isc_TableView_getNavigationIcon(_1){return(this.navigationMode==isc.TableView.NAVICON_ONLY?this.navIcon:this.wholeRecordNavIcon)},isc.A.getShowNavigation=function isc_TableView_getShowNavigation(_1){if(_1&&_1[this.recordNavigationProperty]!=null){return _1[this.recordNavigationProperty]}
return this.showNavigation},isc.A.recordClick=function isc_TableView_recordClick(_1,_2,_3,_4,_5,_6,_7){if(_5!=this.$79q&&_5!=this.$79r&&this.canSelectRecord(_2))
{this.selectSingleRecord(_2)}
if(_5==this.$79r||this.navigationMode==isc.TableView.WHOLE_RECORD){if(this.recordNavigationClick!=null){this.recordNavigationClick(_2)}}else if(_5==this.$79q){if(this.imageClick!=null){this.imageClick(_2)}}},isc.A.getBaseStyle=function isc_TableView_getBaseStyle(_1,_2,_3){if(this.isGrouped){var _4=this.data.get(_2),_5=this.data.isFirst(_4),_6=this.data.isLast(_4);if(_5&&_6){return(_3==0?"cellOnlyLeft":(_3==this.fields.length-1?"cellOnlyRight":"cellOnly"))}else if(_5){return(_3==0?"cellTopLeft":(_3==this.fields.length-1?"cellTopRight":"cellTop"))}else if(_6){return(_3==0?"cellBottomLeft":(_3==this.fields.length-1?"cellBottomRight":"cellBottom"))}}
return this.Super("getBaseStyle",arguments)});isc.B._maxIndex=isc.C+8;isc.TableView.registerStringMethods({recordNavigationClick:"record",imageClick:"record",formatRecord:"record"});isc.ClassFactory.defineClass("DOMTree","Tree");isc.A=isc.DOMTree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.tagNameProperty="tagName";isc.A.elementProperty="$9b";isc.A.loadOnInit=true;isc.A.loadDataOnDemand=true;isc.A.hideTextNodes=true;isc.B.push(isc.A.makeRoot=function isc_DOMTree_makeRoot(){var _1=this.Super("makeRoot",arguments);_1[this.elementProperty]=this.rootElement;return _1},isc.A.getElement=function isc_DOMTree_getElement(_1){return _1[this.elementProperty]},isc.A.getElementTitle=function isc_DOMTree_getElementTitle(_1){var _2=_1.getAttribute(this.titleProperty);if(!this.valueIsEmpty(_2))return _2;_2=_1.getAttribute(this.nameProperty);if(!this.valueIsEmpty(_2))return _2;if(!isc.xml.hasElementChildren(_1)){_2=isc.xml.getElementText(_1);if(!this.valueIsEmpty(_2))return _2}
return _1.tagName||_1.nodeName},isc.A.valueIsEmpty=function isc_DOMTree_valueIsEmpty(_1){return _1==null||isc.isAn.emptyString(_1)},isc.A.isFolder=function isc_DOMTree_isFolder(_1){if(_1==this.root||_1.children!=null)return true;var _2=_1[this.elementProperty];if(!_2||!_2.childNodes||_2.childNodes.length==0)return false;if(!this.hideTextNodes)return true;return isc.xml.hasElementChildren(_2)},isc.A.moveList=function isc_DOMTree_moveList(_1,_2,_3){var _4=_1[0],_5=this.getElement(_4);this.logWarn("moveList: "+this.echoAll(_1)+", newParent: "+this.echo(_2)+", index: "+_3);this.$36g(_5,_2,_3);this.Super("moveList",arguments)},isc.A.remove=function isc_DOMTree_remove(_1){var _2=this.getElement(_1);_2.parentNode.removeChild(_2);return this.Super("remove",arguments)},isc.A.addElement=function isc_DOMTree_addElement(_1,_2,_3){this.$36g(_1,_2,_3);if(this.isLoaded(_2)){var _4=this.nodeForElement(_1);this.add(_4,_2,_3)}else{this.dataChanged()}},isc.A.$36g=function isc_DOMTree__addToDOM(_1,_2,_3){var _4=this.getElement(_2);if(_3==null){this.logWarn("appending: "+this.echoLeaf(_1)+" to: "+this.echoLeaf(_4));_4.appendChild(_1)}else{var _5=this.getChildren(_2)[_3],_6=this.getElement(_5);this.logWarn("inserting into: "+this.echoLeaf(_4)+", before: "+this.echoLeaf(_6));_4.insertBefore(_1,_6)}},isc.A.nodeForElement=function isc_DOMTree_nodeForElement(_1){var _2={};_2[this.elementProperty]=_1;_2[this.titleProperty]=this.getElementTitle(_1);if(this.tagNameProperty){_2[this.tagNameProperty]=_1.tagName||_1.nodeName}
if(this.copyAttributes){for(var j=0;j<this.copyAttributes.length;j++){var _4=this.copyAttributes[j];_2[_4]=_1.getAttribute(_4)}}
return _2},isc.A.loadChildren=function isc_DOMTree_loadChildren(_1){if(this.isLoaded(_1))return;try{var _2=_1.$9b;if(_2==null)return;var _3=_2.childNodes;if(isc.Browser.isMoz&&_2.contentDocument){_3=[_2.contentDocument.documentElement]}else{if(this.loadingBatch()&&!isc.xml.hasElementChildren(_2))return}
_1[this.openProperty]=true;if(_3!=null){for(var i=0;i<_3.length;i++){var _5=_3[i];if(this.hideTextNodes&&_5.nodeName.startsWith("#"))continue;var _6=this.nodeForElement(_5);this.add(_6,_1)}}
this.setLoadState(_1,isc.Tree.LOADED)}catch(e){this.logWarn("parent node: "+this.echo(_1)+", at path: "+this.getPath(_1)+", error: "+this.echo(e)+this.getStackTrace())}});isc.B._maxIndex=isc.C+11;isc.defineClass("DOMGrid","TreeGrid");isc.A=isc.DOMGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canShowFilterEditor=false;isc.A.canSaveSearches=false;isc.A.canDragRecordsOut=true;isc.A.canAcceptDroppedRecords=true;isc.A.canReorderRecords=true;isc.A.showRoot=true;isc.A.$36h="&lt;";isc.A.$36i="&gt;";isc.A.$36j=[" ",,'="',,'"'];isc.A.colorMap={table:"#009900",tr:"#333399",td:"#663366",form:"#CC6600",input:"#3333FF",textarea:"#3333FF",div:"#663300",span:"#663300"};isc.A.colorPrefix="color:";isc.A.$36k={};isc.B.push(isc.A.initWidget=function isc_DOMGrid_initWidget(){this.Super(this.$oc,arguments);if(this.url){isc.xml.loadXML(this.url,this.getID()+".setRootElement(xmlDoc.documentElement)")}},isc.A.getDefaultData=function isc_DOMGrid_getDefaultData(){return null},isc.A.getElement=function isc_DOMGrid_getElement(_1){return this.data.getElement(_1)},isc.A.setRootElement=function isc_DOMGrid_setRootElement(_1){this.rootElement=_1;var _2=isc.DOMTree.create({rootElement:_1});this.setData(_2)},isc.A.getIcon=function isc_DOMGrid_getIcon(){},isc.A.getNodeTitle=function isc_DOMGrid_getNodeTitle(_1,_2,_3){if(_1==null)return null;if(_1.$9g)return _1.$9g;var _4=this.htmlMode?this.$36l(_1):this.$36m(_1);return(_1.$9g=_4)},isc.A.$253v=function isc_DOMGrid__dataChanged(){this.Super("$253v",arguments);this.data.getOpenList().setProperty("$9g",null)},isc.A.$36m=function isc_DOMGrid__getXMLNodeTitle(_1){if(_1.$9b==null){this.logWarn("no element for node: "+this.echo(_1))}
var _2=_1.$9b,_3=isc.emptyString,_4=this.$36n;if(_4==null)_4=this.$36n=isc.SB.create();else _4.clear();_4.append(this.$36h,(_2.tagName||_2.nodeName));var _5=_2.attributes;if(_5!=null){var _6=this.$36j;for(var i=0;i<_5.length;i++){var _8=_5[i];_6[1]=_8.name;_6[3]=_8.value;_4.append(_6)}}
if(!isc.xml.hasElementChildren(_2)){_4.append(this.$36i,isc.xml.getElementText(_2),"&lt;/",(_2.tagName||_2.nodeName),this.$36i)}else if(_2.childNodes.length>0){_4.append(this.$36i)}else{_4.append("/&gt;")}
return _4.toString()},isc.A.$36l=function isc_DOMGrid__getHTMLNodeTitle(_1){var _2=_1.$9b,_3=isc.emptyString,_4,_5;if(isc.Browser.isIE&&_2.scopeName=="VML"){_4=(_2.style?_2.style.width:null);_5=(_2.style?_2.style.height:null)}else{_4=_2.width||(_2.style?_2.style.width:null);_5=_2.height||(_2.style?_2.style.height:null)}
var _6=(_2.tagName&&_2.tagName.toLowerCase()=="td");return isc.SB.concat(this.$36h,(_2.tagName||_2.nodeName),(_2.id?" ID="+_2.id:_3),(!this.valueIsEmpty(_4)?" WIDTH="+_4:_3),(!this.valueIsEmpty(_5)?" HEIGHT="+_5:_3),(_6&&_2.rowSpan>1?" ROWSPAN="+_2.rowSpan:_3),(_6&&_2.colSpan>1?" COLSPAN="+_2.colSpan:_3),this.$36i)},isc.A.valueIsEmpty=function isc_DOMGrid_valueIsEmpty(_1){return _1==null||isc.isAn.emptyString(_1)},isc.A.getCellCSSText=function isc_DOMGrid_getCellCSSText(_1,_2,_3){var _4=this.data.getElement(_1);if(_4==null)return null;var _5=_4.tagName;if(_5==null)return null;if(this.$36k[_5]){_5=this.$36k[_5]}else{this.$36k=_5=_5.toLowerCase()}
if(this.colorMap[_5]!=null){return isc.SB.concat(this.colorPrefix,this.colorMap[_5],isc.semi)}});isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("MenuBar","Toolbar");isc.addGlobal("Menubar",isc.MenuBar);isc.A=isc.MenuBar.getPrototype();isc.A.overflow=isc.Canvas.VISIBLE;isc.A.defaultHeight=22;isc.A.menuConstructor="Menu";isc.A.buttonConstructor="MenuBarButton";isc.A.tabIndex=-1;isc.A.tabWithinToolbar=false;isc.A.buttonDefaults={autoApplyDownState:false,showDown:true,showRollOver:true,showFocused:true,showFocusedAsOver:true};isc.A=isc.MenuBar.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_MenuBar_initWidget(){this.Super("initWidget",arguments)},isc.A.setButtons=function isc_MenuBar_setButtons(){var _1=[];if(this.menus){for(var i=0;i<this.menus.length;i++){var _3=this.menus[i];_1[i]=this.$36o(_3,i)}}
return this.Super("setButtons",[_1],arguments)},isc.A.$36o=function isc_MenuBar__getButtonProperties(_1,_2,_3){return{title:_1.title,width:(_1.menuButtonWidth?_1.menuButtonWidth:(!_3?_1.width:null)),menuNum:_2,focusChanged:function(_4){if(isc.Browser.isMoz&&_4)this.bringToFront()}}},isc.A.setMenus=function isc_MenuBar_setMenus(_1){if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<this.members.length;i++){var _3=this.members[i],_4=this.menus[_3.menuNum];if(_3.isObserving(_4,"hide")){_3.ignore(_4,"hide")}}
this.menus=_1;this.setButtons()},isc.A.$36p=function isc_MenuBar__remapButton(_1,_2){if(!_1)return;if(_2==-1){var _3=_1.menuNum,_4=this.menus[_1.menuNum];if(_1.isObserving(_4,"hide")){_1.ignore(_4,"hide")}}
_1.menuNum=_2},isc.A.addMenu=function isc_MenuBar_addMenu(_1,_2){return this.addMenus([_1],_2,true)},isc.A.addMenus=function isc_MenuBar_addMenus(_1,_2,_3){if(!_1)return;if(!isc.isAn.Array(_1))_1=[_1];if(!this.menus)this.menus=[];if(_2==null)_2=this.menus.length;if(!this.$6c){this.menus.addListAt(_1,_2)}else{for(var i=_2;i<this.members.length;i++){this.$36p(this.members[i],(i+_1.length))}
this.menus.addListAt(_1,_2);var _5=[];for(var i=0;i<_1.length;i++){var _6=this.menus.indexOf(_1[i]);_5[i]=this.$36o(_1[i],_6,_3)}
this.addButtons(_5,_2)}},isc.A.removeMenus=function isc_MenuBar_removeMenus(_1){if(_1==null)return;if(!isc.isAn.Array(_1))_1=[_1];var _2=[],_3=this.menus.duplicate();for(var i=0;i<_1.length;i++){var _5=_1[i];if(isc.isA.Number(_5))_5=this.menus[_5];else if(!this.menus.contains(_5))continue;_3.remove(_5);var _6=this.menus.indexOf(_5);if(this.$6c)_2.add(this.members[_6])}
if(!this.$6c){this.menus=_3;return}
for(var i=0;i<this.menus.length;i++){if(this.menus[i]==_3[i])continue;this.$36p(this.members[i],_3.indexOf(this.menus[i]))}
this.menus=_3;this.removeButtons(_2)},isc.A.showMenu=function isc_MenuBar_showMenu(_1){var _2;if(isc.isA.Number(_1))_2=this.menus[_1];else{_2=_1;_1=this.menus.indexOf(_2)}
if(!_2){this.logWarn("showMenu() called with invalid menu number: "+_1+".  No effect.");return}
var _3;for(var i=0;i<this.members.length;i++){if(this.members[i].menuNum==_1){_3=this.members[i]}}
if(!isc.isA.Canvas(_2)){if(_2.ID==null)_2.ID=this.getID()+"_menu"+_1;_2.autoDraw=false;_2=this.menus[_1]=isc.ClassFactory.newInstance(this.menuConstructor,_2,this.menuDefaults)}
if(this.activeMenu!=null){this.menus[this.activeMenu].hideMenuTree()}
_2.keyEventParent=this;if(!this.vertical){_2.moveTo(_3.getPageLeft(),_3.getPageBottom())}else{_2.moveTo(_3.getPageRight(),_3.getPageTop())}
_2.show();_3.$36q=_3.autoApplyOverState;_3.autoApplyOverState=false;_3.setState(isc.StatefulCanvas.STATE_DOWN);this.activeMenu=_1;if(!_3.isObserving(_2,"hide")){_3.observe(_2,"hide","observer.menuHidden(observed)")}
var _5=isc.EH;if(_5.targetIsMasked(this))this.bringToFront();var _6=_5.clickMaskRegistry.last(),_7=_5.getMaskedFocusCanvas(_6);if(this.members.contains(_7))_5.setMaskedFocusCanvas(null,_6);if(!isc.Browser.isTouch){if(_2.body!=null)_2.body.focusOnHide=_3;else{if(_2.bodyProperties==null)_2.bodyProperties={};_2.bodyProperties.focusOnHide=_3}}},isc.A.$6d=function isc_MenuBar__focusInNextButton(_1){if(!this.activeMenu==null)return this.Super("$6d",arguments);if(_1==null)_1=true;var _2=this.activeMenu,_3=_1?1:-1,_4=_2+_3,_5=this.getMembers();while(_2!=_4){if(_4<0)_4=_5.length-1;else if(_4>=this.members.length)_4=0;var _6=_5[_4];if(!_6.isDisabled()){_6.showMenu();break}
_4+=_3}},isc.A.getFocusButtonIndex=function isc_MenuBar_getFocusButtonIndex(){if(this.activeMenu!=null)return this.activeMenu;return this.Super("getFocusButtonIndex",arguments)});isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("MenuBarButton","MenuButton");isc.A=isc.MenuBarButton.getPrototype();isc.A.showMenuButtonImage=false;isc.A.autoDraw=false;isc.A.align="center";isc.A=isc.MenuBarButton.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.mouseOver=function isc_MenuBarButton_mouseOver(){this.Super("mouseOver",arguments);var _1=this.parentElement.activeMenu;if(_1!=null&&_1!=this.menuNum){this.showMenu()}},isc.A.mouseDown=function isc_MenuBarButton_mouseDown(){if(this.parentElement.activeMenu==this.menuNum){isc.Menu.hideAllMenus()}else{this.showMenu()}},isc.A.mouseUp=function isc_MenuBarButton_mouseUp(){},isc.A.click=function isc_MenuBarButton_click(){},isc.A.handleClick=function isc_MenuBarButton_handleClick(_1,_2){if(this.click!=null){return this.click(_1,_2)}},isc.A.mouseOut=function isc_MenuBarButton_mouseOut(){if(this.parentElement.activeMenu!=this.menuNum){this.Super("mouseOut",arguments)}},isc.A.handleKeyPress=function isc_MenuBarButton_handleKeyPress(_1,_2){if(_1.keyName=="Space"||_1.keyName=="Enter")return this.showMenu();if(this.keyPress){this.convertToMethod("keyPress");return this.keyPress(_1,_2)}},isc.A.showMenu=function isc_MenuBarButton_showMenu(){this.parentElement.showMenu(this.menuNum)},isc.A.menuHidden=function isc_MenuBarButton_menuHidden(_1){if(isc.$cv)arguments.$cw=this;if(this.state==isc.StatefulCanvas.STATE_DOWN){this.setState(isc.StatefulCanvas.STATE_UP)}
this.autoApplyOverState=this.$36q;delete this.$36q;this.menuIsDown=false;if(this.parentElement.activeMenu==this.menuNum){this.parentElement.activeMenu=null}
delete _1.eventParent;this.ignore(_1,"hide")});isc.B._maxIndex=isc.C+9;isc.ClassFactory.defineClass("CellSelection");isc.A=isc.CellSelection;isc.A.$24e=0;isc.A.COL_SELECTION_FLAGS=null;isc.A=isc.CellSelection;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.generateFlagTable=function isc_c_CellSelection_generateFlagTable(){isc.CellSelection.COL_SELECTION_FLAGS=[];for(var i=0;i<32;i++)
isc.CellSelection.COL_SELECTION_FLAGS[i]=Math.pow(2,i)});isc.B._maxIndex=isc.C+1;isc.A=isc.CellSelection.getPrototype();isc.A.data=null;isc.A.numCols=0;isc.A.selectionProperty=null;isc.A.$q7=true;isc.A=isc.CellSelection.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.cellRecordMode="cell";isc.B.push(isc.A.init=function isc_CellSelection_init(){if(this.defaultIsSelected){this.logWarn("defaultIsSelected is not supported for cell selection");this.defaultIsSelected=false}
this.$24f=[];this.lastSelectedCell=[];this.changedCells=[];if(!isc.CellSelection.COL_SELECTION_FLAGS)isc.CellSelection.generateFlagTable();if(!this.selectionProperty)this.selectionProperty="_cellSelection_"+isc.CellSelection.$24e++;this.setData((this.data?this.data:[]))},isc.A.setData=function isc_CellSelection_setData(_1){if(this.data!=null)this.ignoreData(this.data);this.data=_1;if(this.data!=null)this.observeData(this.data)},isc.A.observeData=function isc_CellSelection_observeData(_1){this.observe(_1,"dataChanged","observer.$q7 = true")},isc.A.ignoreData=function isc_CellSelection_ignoreData(_1){this.ignore(_1,"dataChanged")},isc.A.cellIsSelected=function isc_CellSelection_cellIsSelected(_1,_2){if(_2==null)_2=0;var _3=isc.isAn.Object(_1)?_1:this.data.get(_1),_4=(_3?_3[this.selectionProperty]:null),_5=(_4?_4[Math.floor(_2/32)]:null),_6=isc.CellSelection.COL_SELECTION_FLAGS[_2%32];return(_5!=null&&((_5&_6)!=0))},isc.A.rowHasSelection=function isc_CellSelection_rowHasSelection(_1){var _2=this.data.get(_1),_3=(_2?_2[this.selectionProperty]:null),_4=Math.ceil(this.numCols/32);if(!_2||!_2[this.selectionProperty])return false;for(var i=0;i<_4;i++){if(_3[i])return true}
return false},isc.A.colHasSelection=function isc_CellSelection_colHasSelection(_1){if(_1>this.numCols-1)return false;var _2=isc.CellSelection.COL_SELECTION_FLAGS[_1%32],_3=Math.floor(_1/32),_4=this.data;if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_4)&&!_4.lengthIsKnown()){return false}
var _5=_4.getLength();for(var i=0;i<_5;i++){var _7=_4.getCachedRow(i);if(_7==null)continue;var _8=_7[this.selectionProperty];if(!_8)continue;if(_8&&_8[_3]&&((_8[_3]&_2)!=0)){return true}}
return false},isc.A.anySelected=function isc_CellSelection_anySelected(){if(!this.$q7)return(this.$24f!=null&&this.$24f.length>0);var _1=this.data;if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_1)&&!_1.lengthIsKnown()){return false}
var _2=Math.ceil(this.numCols/32);var _3=_1.getLength();for(var i=0;i<_3;i++){var _5=_1.getCachedRow(i);if(_5==null){continue}
var _6=_5[this.selectionProperty];if(!_6)continue;for(var j=0;j<_2;j++){if(_6[j])return true}}
return false},isc.A.getSelectedCells=function isc_CellSelection_getSelectedCells(){if(!this.$q7)return this.$24f;var _1=[],_2=this.data,_3=isc.CellSelection.COL_SELECTION_FLAGS,_4=Math.ceil(this.numCols/32),_5=_2.getLength();if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_2)&&!_2.lengthIsKnown()){this.$q7=false;return _1}
for(var i=0;i<_5;i++){var _7=_2.getCachedRow(i);if(_7==null)continue;var _8=_7[this.selectionProperty];if(!_8)continue;for(var j=0,_10,_11;j<_4;j++){_10=_8[j];if(!_10)continue;_11=(j==_4-1&&this.numCols%32!=0)?this.numCols%32:32;for(var k=0;k<_11;k++){if((_10&_3[k])!=0){_1[_1.length]=[i,j*32+k]}}}}
this.$24f=_1;this.$q7=false;return _1},isc.A.getSelectionRowNums=function isc_CellSelection_getSelectionRowNums(){var _1=[],_2=Math.ceil(this.numCols/32),_3=this.data,_4=_3.getLength();if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_3)&&!_3.lengthIsKnown()){return _1}
for(var i=0;i<_4;i++){var _6=_3.getCachedRow(i);if(_6==null)continue;var _7=_6[this.selectionProperty];if(!_7)continue;for(var j=0,_9;j<_2;j++){if(_7[j]){_1[_1.length]=i;break}}}
return _1},isc.A.getSelectedRecord=function isc_CellSelection_getSelectedRecord(){if(this.cellRecordMode=="cell")return this.getSelection()[0];var _1=this.getSelectionRowNums(),_2=_1.length==0?null:_1[0],_3=_2==null?null:this.data.get(_2);return _3},isc.A.getSelection=function isc_CellSelection_getSelection(){if(this.cellRecordMode=="cell"){var _1=this.getSelectedCells();if(_1==null)return null;var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i],_5=this.target.getCellRecord(_4[0],_4[1]);if(_5==null)continue;_2.add(_5)}
return _2}else{var _6=this.getSelectionRowNums(),_7=[];if(_6&&_6.length>0){for(var i=0;i<_6.length;i++){var _8=this.data.get(_6[i]);if(_8==null)continue;_7.add(_8)}}
return _7}},isc.A.selectList=function isc_CellSelection_selectList(_1,_2){if(_2==null)_2=true;if(!_1)return false;let _3=false;for(var i=0;i<_1.length;i++){var _5=_1.get(i),_6=this.data.indexOf(_5);if(_6==null||_6<0)continue;if(_2){if(this.selectRow(_6))_3=true}else{if(this.deselectRow(_6))_3=true}}
return _3},isc.A.getSelectionColNums=function isc_CellSelection_getSelectionColNums(){var _1=[],_2=[],_3=isc.CellSelection.COL_SELECTION_FLAGS,_4=Math.ceil(this.numCols/32),_5=this.data,_6=_5.getLength();if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_5)&&!_5.lengthIsKnown()){return _1}
for(var i=0;i<_6;i++){var _8=_5.getCachedRow(i);if(_8==null)continue;var _9=_8[this.selectionProperty];if(!_9)continue;for(var j=0,_11;j<_4;j++){if(_9[j]){_2[j]=_2[j]|_9[j]}}}
if(_2.length==0)return _1;for(var i=0,_12=this.numCols;i<_12;i++){if((_2[Math.floor(i/32)]&_3[i%32])!=0)
_1[_1.length]=i}
return _1},isc.A.getSelectionBounds=function isc_CellSelection_getSelectionBounds(){var _1=this.getSelectionRowNums(),_2=this.getSelectionColNums();return[_1.first(),_2.first(),_1.last(),_2.last()]},isc.A.canSelectCell=function isc_CellSelection_canSelectCell(_1,_2){return false},isc.A.$24g=function isc_CellSelection__setCellSelection(_1,_2,_3){if(_3&&!this.cellIsSelected(_1,_2)){if(!this.target.canSelectCell(_1,_2)){return false}}
var _4=this.data.getCachedRow(_1);if(_4==null)return false;var _5=(_4?_4[this.selectionProperty]:null),_6=Math.floor(_2/32),_7=(_5?_5[Math.floor(_2/32)]:0),_8=isc.CellSelection.COL_SELECTION_FLAGS[_2%32];if(!_4||_2>this.numCols-1)return false;if(_4.enabled==false)return false;if(_5==null){_5=_4[this.selectionProperty]=[];for(var i=0,_10=Math.ceil(this.numCols/32);i<_10;i++)_5[i]=0}
else if(_7==null){_5[_6]=0}
if(((_7&_8)!=0)==_3)return false;_5[_6]=_7^_8;if(_3)this.lastSelectedCell=[_1,_2];this.$q7=true;return true},isc.A.setCellRangeSelection=function isc_CellSelection_setCellRangeSelection(_1,_2,_3,_4,_5){this.changedCells=this.$24h(_1,_2,_3,_4,_5);return this.$24i()},isc.A.$24h=function isc_CellSelection__setCellRangeSelection(_1,_2,_3,_4,_5){var _6=[],_7,_8,_9,_10;var _11=this.data;if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_11)&&!_11.lengthIsKnown()){return _6}
if(_1<=_3){_7=_1;_8=_3}else{_7=_3;_8=_1}
if(_2<=_4){_9=_2;_10=_4}else{_9=_4;_10=_2}
if(this.logIsDebugEnabled()){this.logDebug((_5?"selecting ":"deselecting ")+[_7,_9]+" through "+[_8,_10])}
for(var _12=_7;_12<=_8;_12++){for(var _13=_9;_13<=_10;_13++){if(this.$24g(_12,_13,_5)){_6[_6.length]=[_12,_13]}}}
return _6},isc.A.setCellListSelection=function isc_CellSelection_setCellListSelection(_1,_2){if(!_1)return false;var _3=[];for(var i=0,_5=_1.length,_6,_7;i<_5;i++){_6=_1[i][0];_7=_1[i][1];if(this.$24g(_6,_7,_2))
_3[_3.length]=[_6,_7]}
this.changedCells=_3;return this.$24i()},isc.A.$24i=function isc_CellSelection__cellSelectionsChanged(){if(this.changedCells.length>0){this.selectionChanged();return true}else
return false},isc.A.$94k=function isc_CellSelection__updateSelectionOrigin(_1,_2,_3){var _4=isc.isA.GridBody(_1)?_1.grid:_1;var _5=this.originRow,_6=this.originCol;if(_2!=null&&_3!=null){this.originRow=_2;this.originCol=_3;_4.refreshCellStyle(_2,_3)}else{delete this.originRow;delete this.originCol}
if(_5!=null&&_6!=null){_4.refreshCellStyle(_5,_6)}},isc.A.$94l=function isc_CellSelection__validateSelectionOrigin(_1){if(this.originRow==null||this.originCol==null)return false;if(!this.cellIsSelected(this.originRow,this.originCol)){this.$94k(_1);return false}
var _2=isc.isA.GridBody(_1)?_1.grid:_1;_2.refreshCellStyle(this.originRow,this.originCol);return true},isc.A.$94h=function isc_CellSelection__isCellSelectionOrigin(_1,_2){if(this.originRow!=_1||this.originCol!=_2)return false;return this.cellIsSelected(_1,_2)},isc.A.selectionChanged=function isc_CellSelection_selectionChanged(){},isc.A.setCellSelection=function isc_CellSelection_setCellSelection(_1,_2,_3){if(this.$24g(_1,_2,_3)){this.changedCells=[[_1,_2]];this.selectionChanged();return true}else
return false},isc.A.selectCell=function isc_CellSelection_selectCell(_1,_2){return this.setCellSelection(_1,_2,true)},isc.A.deselectCell=function isc_CellSelection_deselectCell(_1,_2){return this.setCellSelection(_1,_2,false)},isc.A.selectCellRange=function isc_CellSelection_selectCellRange(_1,_2,_3,_4){this.changedCells=this.$24h(_1,_2,_3,_4,true);return this.$24i()},isc.A.deselectCellRange=function isc_CellSelection_deselectCellRange(_1,_2,_3,_4){this.changedCells=this.$24h(_1,_2,_3,_4,false);return this.$24i()},isc.A.selectRow=function isc_CellSelection_selectRow(_1){return this.selectCellRange(_1,0,_1,this.numCols-1)},isc.A.deselectRow=function isc_CellSelection_deselectRow(_1){return this.deselectCellRange(_1,0,_1,this.numCols-1)},isc.A.selectCol=function isc_CellSelection_selectCol(_1){return this.selectCellRange(0,_1,this.data.getLength()-1,_1)},isc.A.deselectCol=function isc_CellSelection_deselectCol(_1){return this.deselectCellRange(0,_1,this.data.getLength()-1,_1)},isc.A.selectAll=function isc_CellSelection_selectAll(){return this.selectCellRange(0,0,this.data.getLength()-1,this.numCols-1)},isc.A.deselectAll=function isc_CellSelection_deselectAll(){return this.deselectCellRange(0,0,this.data.getLength()-1,this.numCols-1)},isc.A.selectCellList=function isc_CellSelection_selectCellList(_1){return this.setCellListSelection(_1,true)},isc.A.deselectCellList=function isc_CellSelection_deselectCellList(_1){return this.setCellListSelection(_1,false)},isc.A.selectSingleCell=function isc_CellSelection_selectSingleCell(_1,_2){var _3=this.cellIsSelected(_1,_2);this.changedCells=this.$24h(0,0,this.data.getLength()-1,this.numCols-1,false);this.$24g(_1,_2,true);if(!_3&&_1>=0)
this.changedCells[this.changedCells.length]=[_1,_2];return this.$24i()},isc.A.selectSingleRow=function isc_CellSelection_selectSingleRow(_1){var _2=[];if(_1>0)
_2=this.$24h(0,0,_1-1,this.numCols-1,false);_2=_2.concat(this.$24h(_1,0,_1,this.numCols-1,true));if(_1<this.data.getLength()-1)
_2=_2.concat(this.$24h(_1+1,0,this.data.getLength()-1,this.numCols-1,false));this.changedCells=_2;return this.$24i()},isc.A.selectSingleCol=function isc_CellSelection_selectSingleCol(_1){var _2=[];if(_1>0)
_2=this.$24h(0,0,this.data.getLength()-1,_1-1,false);_2=_2.concat(this.$24h(0,_1,this.data.getLength()-1,_1,true));if(_1<this.numCols-1)
_2=_2.concat(this.$24h(0,_1+1,this.data.getLength()-1,this.numCols-1,false));this.changedCells=_2;return this.$24i()},isc.A.selectOnMouseDown=function isc_CellSelection_selectOnMouseDown(_1,_2,_3){var _4=_1.selectionType;if(_4==isc.Selection.NONE)return false;this.deselectCellOnMouseUp=false;this.deselectOthersOnMouseUp=false;var _5=this.cellIsSelected(_2,_3);if(isc.EventHandler.shiftKeyDown()&&_4!=isc.Selection.SINGLE)
{if(this.$94l(_1)){this.startRow=this.originRow;this.startCol=this.originCol;this.selectOnDragMove(_1,_2,_3);return true}
_4=isc.Selection.SIMPLE;_5=false}
this.startRow=_2;delete this.lastRow;this.startCol=_3;delete this.lastCol;if(_1.selectionAppearance=="checkbox"&&_3!=_1.grid.getCheckboxFieldPosition()){this.areThereSelectedRows=false}
if(_1.selectionAppearance=="checkbox"&&_3==_1.grid.getCheckboxFieldPosition()){if(isc.EventHandler.shiftKeyDown()){this.startRow=this.originRow;var _6=this.startRow,_7=_2;if(_6>_7){_6=_2;_7=this.startRow}
this.deselectAll();for(var i=_6;i<=_7;i++)this.selectRow(i)}else{if(!_5){if(!this.areThereSelectedRows){this.selectSingleRow(_2);this.areThereSelectedRows=true}else this.selectRow(_2)}else this.deselectRow(_2);this.originRow=_2}
return true}else if(_4==isc.Selection.SINGLE){this.selectSingleCell(_2,_3);return true}else if(_4==isc.Selection.SIMPLE){if(!_5){this.selectCell(_2,_3);this.$94k(_1,_2,_3);return true}else{this.deselectCellOnMouseUp=true;return false}}else if(isc.EventHandler.modifierKeyDown()){this.setCellSelection(_2,_3,!_5);if(!_5)this.$94k(_1,_2,_3);return true}else{if(!_5){this.selectSingleCell(_2,_3);this.$94k(_1,_2,_3);return true}else if(isc.EventHandler.rightButtonDown()){this.deselectOnDragMove=true;return false}else{if(this.dragSelection){if(this.simpleDeselect){this.deselectAll();this.selectOriginOnDragMove=true;return true}
this.selectSingleCell(_2,_3);this.$94k(_1,_2,_3);return true}else{if(this.simpleDeselect){this.deselectAllOnMouseUp=true}else{var _9=this.getSelectedCells();this.deselectOthersOnMouseUp=(_9.length>1);this.$94k(_1,_2,_3)}
return false}}}},isc.A.selectOnDragMove=function isc_CellSelection_selectOnDragMove(_1,_2,_3){if(_1.selectionAppearance=="checkbox"&&(_3==_1.grid.getCheckboxFieldPosition()||this.startCol==_1.grid.getCheckboxFieldPosition())){return}
var _4=this.startRow,_5=this.startCol;if(this.lastRow==null)this.lastRow=this.startRow;if(this.lastCol==null)this.lastCol=this.startCol;var _6=this.lastRow,_7=this.lastCol;if(_2<0||_3<0){this.logWarn("selectOnDragMove: aborting due to negative coordinate: "+[_2,_3]);return}
if(_2==_6&&_3==_7)return;if(_1.selectionType!=isc.Selection.SINGLE){this.$94k(_1,_4,_5)}
if(_1.selectionType==isc.Selection.SINGLE){this.selectSingleCell(_2,_3);return}
var _8=[];if(this.selectOriginOnDragMove){this.$24g(_4,_5);_8.add([_4,_5]);this.selectOriginOnDragMove=false}else if(this.deselectOnDragMove||this.deselectAllOnMouseUp||this.deselectOthersOnMouseUp)
{this.selectSingleCell(_4,_5);this.deselectAllOnMouseUp=this.deselectOthersOnMouseUp=this.deselectOnDragMove=false}
if((_2!=_6&&((_6>=_4&&_4>=_2)||(_2>=_4&&_4>=_6)))||(_3!=_7&&((_7>=_5&&_5>=_3)||(_3>=_5&&_5>=_7))))
{var _9=this.$24g(_4,_5,false);_8.addList(this.$24h(_4,_5,_6,_7,false));if(_9)this.$24g(_4,_5,true);_8.addList(this.$24h(_4,_5,_2,_3,true));this.changedCells=_8;this.$24i();this.lastRow=_2;this.lastCol=_3;return}
if(_2>=0&&_2!=_6){if(_4>=_6&&_6>_2){_8.addList(this.$24h(_2,_5,_6-1,_7,true))}else if(_4>=_2&&_2>_6){_8.addList(this.$24h(_6,_5,_2-1,_7,false))}else if(_4<=_2&&_2<_6){_8.addList(this.$24h(_2+1,_5,_6,_7,false))}else if(_4<=_6&&_6<_2){_8.addList(this.$24h(_6+1,_5,_2,_7,true))}
_6=this.lastRow=_2}
if(_3>=0&&_3!=_7){if(_5>=_7&&_7>_3){_8.addList(this.$24h(_4,_3,_6,_7-1,true))}else if(_5>=_3&&_3>_7){_8.addList(this.$24h(_4,_7,_6,_3-1,false))}else if(_5<=_3&&_3<_7){_8.addList(this.$24h(_4,_3+1,_6,_7,false))}else if(_5<=_7&&_7<_3){_8.addList(this.$24h(_4,_7+1,_6,_3,true))}
this.lastCol=_3}
this.changedCells=_8;this.$24i()},isc.A.selectOnMouseUp=function isc_CellSelection_selectOnMouseUp(_1,_2,_3){if(_1.selectionType==isc.Selection.NONE)return false;var _4=false;if(this.deselectOthersOnMouseUp){this.selectSingleCell(_2,_3);this.deselectOthersOnMouseUp=false;_4=true}else if(this.deselectCellOnMouseUp){this.deselectCell(_2,_3);this.deselectCellOnMouseUp=false;_4=true}else if(this.deselectAllOnMouseUp){this.deselectAll();this.deselectAllOnMouseUp=false;_4=true}
var _5=this.$94l(_1);if(_5&&!_4){_1.fireSelectionUpdated()}
return _4},isc.A.resetDragSelectionState=function isc_CellSelection_resetDragSelectionState(){this.deselectAllOnMouseUp=this.deselectOthersOnMouseUp=this.deselectOnDragMove=false},isc.A.getDependentCellSelection=function isc_CellSelection_getDependentCellSelection(_1){var _2=isc.DependentCellSelection.create({numCols:_1,rootSelection:this});_2.observe(this,"selectionChanged","observer.$97m()");return _2});isc.B._maxIndex=isc.C+46;isc.CellSelection.getPrototype().isSelected=isc.CellSelection.getPrototype().cellIsSelected;isc.ClassFactory.defineClass("DependentCellSelection");isc.A=isc.DependentCellSelection.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$969=function isc_DependentCellSelection__updateDependency(_1,_2){if(this.firstCol!=_1||this.numCols!=_2){this.rootSelection.deselectAll()}
this.firstCol=_1;if(_2!=null)this.numCols=_2},isc.A.cellIsSelected=function isc_DependentCellSelection_cellIsSelected(_1,_2){if(_2<0||_2>=this.numCols)return false;return this.rootSelection.cellIsSelected(_1,_2+this.firstCol)},isc.A.selectOnMouseDown=function isc_DependentCellSelection_selectOnMouseDown(_1,_2,_3){if(_3<0||_3>=this.numCols)return false;return this.rootSelection.selectOnMouseDown(_1,_2,_3+this.firstCol)},isc.A.selectOnDragMove=function isc_DependentCellSelection_selectOnDragMove(_1,_2,_3){if(_3<0||_3>=this.numCols)return false;return this.rootSelection.selectOnDragMove(_1,_2,_3+this.firstCol)},isc.A.selectOnMouseUp=function isc_DependentCellSelection_selectOnMouseUp(_1,_2,_3){if(_3<0||_3>=this.numCols)return false;return this.rootSelection.selectOnMouseUp(_1,_2,_3+this.firstCol)},isc.A.$97m=function isc_DependentCellSelection__selectionChanged(){var _1=this.rootSelection.changedCells;var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i],_5=_4[1]-this.firstCol;if(_5>=0&&_5<this.numCols){_2.add([_4[0],_5])}}
this.changedCells=_2;this.selectionChanged()},isc.A.destroy=function isc_DependentCellSelection_destroy(){if(this.isObserving(this.rootSelection,"selectionChanged"))
this.ignore(this.rootSelection,"selectionChanged");this.rootSelection.deselectAll();this.Super("destroy",arguments)},isc.A.selectionChanged=function isc_DependentCellSelection_selectionChanged(){});isc.B._maxIndex=isc.C+8;isc.ClassFactory.defineClass("CellListIterator");isc.A=isc.CellListIterator.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_CellListIterator_init(){if(!this.cells)this.cells=[];this.currCell=0;this.currRow=-1},isc.A.getNextRow=function isc_CellListIterator_getNextRow(){if(this.currCell<this.cells.length)this.currRow=this.cells[this.currCell][0];else this.currRow++;while(this.currCell<this.cells.length){if(this.cells[this.currCell][0]!=this.currRow)break;this.currCell++}
return this.currRow});isc.B._maxIndex=isc.C+2;if(isc.Window){isc.ClassFactory.defineClass("FieldEditor","Window");isc.A=isc.FieldEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.isModal=true;isc.A.showMinimizeButton=false;isc.A.autoCenter=true;isc.A.autoSize=true;isc.A.defaultWidth=475;isc.A.visibleFieldsConstructor="ListGrid";isc.A.hiddenFieldsConstructor="ListGrid";isc.A.showFooter=false;isc.A.title="Customize Fields";isc.A.showInstructionsPane=true;isc.A.bodyProperties={layoutMargin:5};isc.A.instructionsPaneDefaults={_constructor:isc.HTMLFlow,padding:5,height:1};isc.A.instructions="Drag fields between grids to control which fields are visible and the order in which fields are displayed";isc.B.push(isc.A.initWidget=function isc_FieldEditor_initWidget(){this.invokeSuper(isc.FieldEditor,"initWidget");if(!this.fields){isc.logWarn('FieldEditor can not be created because no fields were provided');return}
this.addItem(this.addAutoChild("instructionsPane",{contents:this.instructions}));this.visibleFieldsDefaults=this.hiddenFieldsDefaults={height:200,width:200,leaveScrollbarGap:false,canDragRecordsOut:true,canAcceptDroppedRecords:true,canReorderRecords:true,dragDataAction:"move"};var _1=this.visibleFieldsGrid=this.createAutoChild("visibleFields",{fields:[{name:"title",title:"Visible Fields",formatCellValue:"value || record.name"}]});var _2=this.fields;var _3=_2.findAll("visible",null);var _4=_2.findAll("visible",false);_1.setData(_3);var _5=this.hiddenFieldsGrid=this.createAutoChild("hiddenFields",{canReorderRecords:false,fields:[{name:"title",title:"Hidden Fields",formatCellValue:"value || record.name"}]});_5.setData(_4);var _6=isc.HLayout.create({membersMargin:10,layoutMargin:5,height:1,overflow:"visible",members:[_1,isc.VStack.create({width:32,height:74,layoutAlign:"center",membersMargin:10,members:[isc.Img.create({src:"[SKINIMG]actions/back.png",width:16,height:16,visFieldsGrid:_1,hidFieldsGrid:_5,layoutAlign:"center",click:"this.visFieldsGrid.transferSelectedData(this.hidFieldsGrid)"}),isc.Img.create({src:"[SKINIMG]actions/forward.png",width:16,height:16,layoutAlign:"center",visFieldsGrid:_1,hidFieldsGrid:_5,click:"this.hidFieldsGrid.transferSelectedData(this.visFieldsGrid)"})]}),_5]});this.addItem(_6);var _7=this.createAutoChild("okButton",{autoDraw:false,title:"Done",fieldEditor:this,click:function(){this.creator.okClick()},layoutAlign:"center"},isc.IButton);this.addItem(_7)},isc.A.okClick=function isc_FieldEditor_okClick(){var _1=isc.clone(this.visibleFieldsGrid.data);var _2=isc.clone(this.hiddenFieldsGrid.data);_1.setProperty("visible",null);_2.setProperty("visible",false);_1.addList(_2);var _3=_1.getProperties(["name","visible"]);this.done(_1,_3);this.hide();this.destroy()},isc.A.done=function isc_FieldEditor_done(_1,_2){});isc.B._maxIndex=isc.C+3}
isc.ClassFactory.defineClass("FormulaBuilder","VLayout");isc.A=isc.FormulaBuilder.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.vertical=true;isc.A.padding=10;isc.A.vmDefaults={_constructor:"ValuesManager",itemChanged:function(_1,_2){var _3=this.creator;if(_3&&_3.itemChanged){_3.itemChanged(_1,_2)}}};isc.A.showFormulaField=true;isc.A.formulaFieldDefaults={type:"text",formItemType:"AutoFitTextAreaItem",width:"*",hoverWidth:300,keyPress:function(_1,_2,_3){var _4=_2.creator;if(_3=="Enter"&&isc.isA.SummaryBuilder(_4)){return false}
if(_4.autoTest){this.fireOnPause("autoTest",{target:_4,methodName:"testFunction"},_4.autoTestDelay)}}};isc.A.showTitleField=true;isc.A.titleFieldDefaults={selectOnFocus:true,type:"text",titleOrientation:"top",colSpan:2,width:"*"};isc.A.showHelpIcon=true;isc.A.helpIconDefaults={src:"[SKIN]actions/help.png"};isc.A.autoHideCheckBoxLabel="Auto hide fields used in formula";isc.A.showAutoHideCheckBox=true;isc.A.autoHideCheckBoxDefaults={type:"boolean",align:"right"};isc.A.builderTypeText="Formula";isc.A.helpTextIntro="Building Formula Columns<P>For basic arithmetic, type in symbols (+, -, *, /, %, //) directly.<P>The following functions are also available:";isc.A.nearbyComponentFieldPrompt="This value comes from the '${fieldName}' field in the nearby component [${componentName}]";isc.A.currentComponentFieldPrompt="This value comes from the '${fieldName}' field in the current component [${componentName}]";isc.A.dataSourceFieldPrompt="This value comes from the '${fieldName}' field in any nearby component that uses DataSource '${dataSource}'. Values that are edited by end users are preferred.";isc.A.fieldKeyDefaults={_constructor:"ListGrid",canSaveSearches:false,canShowFilterEditor:false,allowFilterWindow:false,leaveScrollbarGap:false,autoFitData:"both",autoFitMaxRecords:8,autoFitMaxWidth:500,autoFetchData:true,showRollOver:true,selectionType:"none",autoFitFieldWidths:true,autoFitWidthApproach:"both",autoFitExpandField:"title",detailField:"title",canHover:true,hoverWidth:250,defaultFields:[{name:"mappingKey",width:40},{name:"title",width:"*"},{name:"sourceDS",width:"*",showIf:"list.creator.dataSources != null"},{name:"name",showIf:"false"},{name:"type",showIf:"false"},{name:"length",showIf:"false"}],cellHoverHTML:function(_1,_2,_3){if(!this.creator.targetRuleScope)return _1[this.detailField];var _4=this.getFieldName(_3);if(_4!="title"&&_4!="sourceDS")return"";var _5,_6,_7=_1.title,_8={};if(_1.sourceDSID){_6=isc.DS.get(_1.sourceDSID);if(_6&&_6.criteriaBasePath)_5=_6.criteriaBasePath}
if(_5){_7=this.creator.nearbyComponentFieldPrompt;var _9=_1.name.replace(_5+".","");if(_1.criteriaPath){_9=_1.title}else if(this.creator.localComponent&&_1.name.split(".")[0]==this.creator.localComponent.getID()){_7=this.creator.currentComponentFieldPrompt}
_8.fieldName=_1.name.replace(_5+".","");_8.componentName=_6.pluralTitle}else if(_1.sourceDSID){_7=this.creator.dataSourceFieldPrompt;_8.fieldName=_1.name.replace(_1.sourceDSID+".","");_8.dataSource=_1.sourceDSID}
return _7.evalDynamicString(this,_8)},recordClick:function(_1,_2){var _3=this.creator.formulaField;if(_3){_3.focusInItem();var _4=this.creator.getInsertValueForRecord(_2);if(_4!=null){if(this.creator.valuePrefix!=null)_4=this.creator.valuePrefix+_4;if(this.creator.valueSuffix!=null)_4+=this.creator.valueSuffix;var _5=_3.getEnteredValue()||"";var _6=_3.getSelectionRange(),_7;if(_6!=null){_5=_5.substring(0,_6[0])+_4+_5.substring(_6[1]);_7=_6[0]+_4.length}else{_5+=_4;_7=_4.length}
_3.setValue(_5);_3.focusInItem();_3.setSelectionRange(_7,_7);if(this.creator.autoTest){this.fireOnPause("autoTest",{target:this.creator,methodName:"testFunction"},this.creator.autoTestDelay)}}}}};isc.A.instructionsTextStart="The following fields are available for use in this ${builderType}.  Click any field to have it added to the ${builderType}.";isc.A.instructionsDefaults={_constructor:"DynamicForm",height:1,colWidths:["*",45],extraSpace:10,overflow:"visible"};isc.A.titleFormDefaults={_constructor:"DynamicForm",extraSpace:5,autoFocus:true};isc.A.formulaFormDefaults={_constructor:"DynamicForm",extraSpace:5};isc.A.hideFieldsFormDefaults={_constructor:"DynamicForm",extraSpace:5};isc.A.sampleHeaderDefaults={_constructor:"Label",height:15,extraSpace:5};isc.A.sampleLabelDefaults={_constructor:"Canvas",height:40,width:"100%",align:"center",valign:"top",extraSpace:10,showHover:true,overflow:"hidden",styleName:"sampleOutput"};isc.A.messageLabelDefaults={_constructor:"Label",height:20,width:"100%",align:"right",valign:"center",overflow:"hidden",showHover:true};isc.A.buttonLayoutDefaults={_constructor:"HLayout",width:"100%",height:20,align:"right"};isc.A.cancelButtonDefaults={_constructor:"IButton",autoParent:"buttonLayout",autoFit:true,extraSpace:10,click:function(){this.creator.closeClick()}};isc.A.testButtonHoverContents="Click to test the formula";isc.A.testButtonHoverContents_cantTest="You cannot test the formula at this time.";isc.A.testButtonDefaults={_constructor:"IButton",autoParent:"buttonLayout",autoFit:true,extraSpace:10,canHover:true,getHoverHTML:function(){return this.creator.$274l()},click:function(){this.creator.testButtonClick()}};isc.A.saveAddAnotherButtonDefaults={_constructor:"IButton",autoParent:"buttonLayout",autoFit:true,extraSpace:10,click:function(){if(!this.creator.showTitleForm||this.creator.titleForm.validate())this.creator.saveAddAnother()}};isc.A.saveButtonDefaults={_constructor:"IButton",autoParent:"buttonLayout",autoFit:true,click:function(){if(!this.creator.showTitleForm||this.creator.titleForm.validate())this.creator.save()}};isc.A.supportedFieldTypes=["integer","float","date","datetime"];isc.A.fieldType="float";isc.A.fieldWidth=50;isc.A.allowEscapedKeys=false;isc.A.invalidBuilderPrompt="Invalid ${builderType}: ${errorText}";isc.A.defaultErrorText="[No Explicit Error]";isc.A.invalidBlankPrompt="Invalid blank ${builderType}";isc.A.validBuilderPrompt="Valid ${builderType}";isc.A.helpWindowTitle="${builderType} Help";isc.A.titleFieldTitle="Title";isc.A.defaultNewFieldTitle="New Field";isc.A.keyColumnTitle="Key";isc.A.sourceFieldColumnTitle="Source Field";isc.A.sourceDSColumnTitle="Source DataSource";isc.A.cancelButtonTitle="Cancel";isc.A.saveAddAnotherButtonTitle="Save &amp; Add Another";isc.A.saveButtonTitle="Save";isc.A.saveConfirmationPrompt="Save changes to this ${builderType}?";isc.A.invalidGeneratedFunctionPrompt="The generated function is invalid - Check your ${builderType} and retry.";isc.A.sampleHeaderTitle="Sample:";isc.A.testButtonTitle="Test";isc.A.anotherTestRequestedCancellationReason="Another test was requested.";isc.A.userSavedCancellationReason="The user has saved.";isc.B.push(isc.A.$273x=function isc_FormulaBuilder__getOrCreateBuilderCC(){var _1=this.$273y;if(_1&&!_1.destroyed)return _1;return this.$273y=isc.CancellationController.create()},isc.A.setTitleFieldHint=function isc_FormulaBuilder_setTitleFieldHint(_1){if(isc.isA.Class(this.titleField)){this.titleField.setProperty("hint",_1)}},isc.A.getInsertValueForRecord=function isc_FormulaBuilder_getInsertValueForRecord(_1){if(_1==null)return"";var _2=_1.mappingKey;var _3=this.insertEscapedKeys;if(_3==null)_3=this.allowEscapedKeys;if(_3){_2="#{"+_2+"}"}
return _2},isc.A.closeClick=function isc_FormulaBuilder_closeClick(){var _1=this.$273y;if(_1&&!_1.canceled){_1.cancel(null,"user")}
this.completeEditing(true)},isc.A.$274l=function isc_FormulaBuilder__getTestButtonHoverHTML(){return this.$274m()?this.testButtonHoverContents:this.testButtonHoverContents_cantTest},isc.A.testButtonClick=function isc_FormulaBuilder_testButtonClick(){this.testFunction()});isc.B._maxIndex=isc.C+6;isc.A=isc.FormulaBuilder.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canEditAttributeName="canEditFormula";isc.A.$249j=["record"];isc.A.warnDuplicateTitlesMessage="Another field already has the title '${fieldTitle}'.  Continue anyway?";isc.A.autoTest=true;isc.A.autoTestDelay=200;isc.A.samplePrompt="<nobr>For Record: ${title}</nobr><br><nobr>Output: ${output}</nobr>";isc.A.ruleContextTitle="[Rule Context values]";isc.B.push(isc.A.getValue=function isc_FormulaBuilder_getValue(){return this.formulaField?this.formulaField.getValue():null},isc.A.setValue=function isc_FormulaBuilder_setValue(_1){if(this.formulaField){this.formulaField.setValue(_1)}},isc.A.$273z=function isc_FormulaBuilder__isValueChanged(){return this.formulaField&&this.formulaField.name in this.vm.getChangedValues()},isc.A.setFormula=function isc_FormulaBuilder_setFormula(_1){this.setValue(_1)},isc.A.getFieldIdProperty=function isc_FormulaBuilder_getFieldIdProperty(){return"name"},isc.A.getTitle=function isc_FormulaBuilder_getTitle(){return this.titleField?this.titleField.getValue():null},isc.A.setTitle=function isc_FormulaBuilder_setTitle(_1){if(this.titleField){this.titleField.setValue(_1)}},isc.A.$2730=function isc_FormulaBuilder__isTitleChanged(){return this.titleField&&this.titleField.name in this.vm.getChangedValues()},isc.A.getFieldFromMappingKey=function isc_FormulaBuilder_getFieldFromMappingKey(_1){var _2=this.getAvailableFields();for(var i=0;i<_2.length;i++){var _4=_2.get(i);if(_4.mappingKey==_1)return _4}
return null},isc.A.getFields=function isc_FormulaBuilder_getFields(){if(this.fields)return this.fields;if(this.component){if(this.component.getUserFields)return this.component.getUserFields();return this.component.getAllFields()}
var _1;if(this.dataSources){_1=[];for(var i=0;i<this.dataSources.length;i++){var _3=this.dataSources[i],_4=_3.getFields();for(var _5 in _4){var _6=(_3.criteriaBasePath&&!_3.criteriaBasePath.startsWith("$")?_3.criteriaBasePath:(_3.$229f?_3.tagName:_3.ID)),_7=_4[_5].criteriaPath||_6+"."+_5,_8=isc.addProperties({},_4[_5],{name:_7,sourceDS:_3.title||_3.getID(),sourceDSID:_3.getID()});_1.add(_8)}}}else{_1=isc.getValues(this.dataSource.getFields())}
return _1},isc.A.shouldHideUsedFields=function isc_FormulaBuilder_shouldHideUsedFields(){if(this.showAutoHideCheckBox&&this.autoHideCheckBox&&this.autoHideCheckBox.getValue()){return this.autoHideCheckBox.getValue()}else return false},isc.A.getHelpText=function isc_FormulaBuilder_getHelpText(){return this.getHoverText()},isc.A.initWidget=function isc_FormulaBuilder_initWidget(){this.Super("initWidget",arguments);if(this.targetRuleScope){this.dataSources=isc.Canvas.getAllRuleScopeDataSources(this.targetRuleScope)}else if(this.dataSource){this.dataSource=isc.DataSource.get(this.dataSource)}
if(this.dataSources){var _1=[];for(var i=0;i<this.dataSources.length;i++){_1[i]=isc.DataSource.get(this.dataSources[i])}}
var _3=this.getAvailableFields();if(!this.field){this.field={name:this.getUniqueFieldName(),title:this.defaultNewFieldTitle,_hasDefaultTitle:true,type:this.fieldType,width:this.fieldWidth};if(this.initialUserFormula){if(this.initialUserFormula.title){this.field.title=this.initialUserFormula.title;delete this.initialUserFormula.title}
this.field.userFormula=this.initialUserFormula}
if(this.canEditAttributeName)this.field[this.canEditAttributeName]=true;if(this.defaultSummaryFunction)this.field.summaryFunction=this.defaultSummaryFunction}
this.vm=this.createAutoChild("vm");this.instructions=this.createAutoChild("instructions",{valuesManager:this.vm,fields:[{editorType:"StaticTextItem",showTitle:false,shouldSaveValue:false,value:this.instructionsTextStart.evalDynamicString(this,{builderType:this.builderTypeText})},{editorType:"SpacerItem",showIcons:true,name:"help",icons:this.showHelpIcon?[isc.addProperties({prompt:this.getHelpText()},this.helpIconDefaults,this.helpIconProperties,{click:"form.creator.showHelpWindow();"})]:null}]});if(this.showHelpIcon)this.helpIcon=this.instructions.getField("help").icons[0];this.addMember(this.instructions);if(this.showFieldKey!=false){this.fieldKeyDS=isc.DataSource.create({ID:this.getID()+"DS",clientOnly:true,testData:_3,fields:[{name:"mappingKey",title:this.keyColumnTitle,width:40},{name:"title",title:this.sourceFieldColumnTitle,width:"*"},{name:"sourceDS",title:this.sourceDSColumnTitle,showIf:"false"},{name:"name",showIf:"false",primaryKey:true},{name:"type",showIf:"false"},{name:"length",showIf:"false"}]});this.minBreadthMember=this.fieldKey=this.createAutoChild("fieldKey",{dataSource:this.fieldKeyDS});if(this.fieldKey.showFilterEditor!==false&&this.fieldKey.autoFitMaxRecords&&_3.length>this.fieldKey.autoFitMaxRecords)
{this.fieldKey.setShowFilterEditor(true)}
if(this.targetRuleScope){this.fieldKey.hideField("mappingKey")}
this.addMember(this.fieldKey)}
if(this.showTitleField){this.addAutoChild("titleForm",{valuesManager:this.vm,fields:[isc.addProperties(this.titleFieldDefaults,this.titleFieldProperties,{title:this.titleFieldTitle,name:"titleField"})]});this.titleField=this.titleForm.getField("titleField");this.setInitialTitle()}
if(this.showFormulaField){this.addAutoChild("formulaForm",{valuesManager:this.vm,fields:[isc.addProperties({title:this.builderTypeText},this.formulaFieldDefaults,this.formulaFieldProperties,{name:"formulaField"})]});this.formulaField=this.formulaForm.getField("formulaField");var _4=isc.TextItem.getPrototype().height,_5=this.formulaField.getTextBoxStyle(),_6=isc.Element.$tt(_5)+isc.Element.$tu(_5);this.formulaField.setHeight(_4*2-_6/2)}
this.addAutoChild("messageLabel");this.addAutoChild("sampleHeader",{contents:this.sampleHeaderTitle});this.addAutoChild("sampleLabel");if(this.showAutoHideCheckBox){this.addAutoChild("hideFieldsForm",{valuesManager:this.vm,fields:[isc.addProperties({title:this.autoHideCheckBoxLabel},this.autoHideCheckBoxDefaults,this.autoHideCheckBoxProperties,{name:"autoHide"})]});this.autoHideCheckBox=this.hideFieldsForm.getField("autoHide")}
this.addAutoChild("buttonLayout");if(this.buttonLayout){this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});if(!this.autoTest)this.addAutoChild("testButton",{title:this.testButtonTitle});this.addAutoChild("saveAddAnotherButton",{title:this.saveAddAnotherButtonTitle});this.addAutoChild("saveButton",{title:this.saveButtonTitle})}
if(this.showTitleField)this.titleForm.focusInItem(this.titleField);else this.formulaForm.focusInItem(this.formulaField);this.setInitialValue();if(!this.useSingleLetterKey)this.remapFormulaText(_3);this.vm.rememberValues();if(this.editMode&&this.autoTest)this.testFunction();this.$274n();this.observe(this.component,"$31m",this.$274o);this.observe(this.component,"$31j",this.$274p)},isc.A.$274o=function isc_FormulaBuilder__observeComponentData(_1){if(_1)this.observe(_1,"dataChanged",this.$274n)},isc.A.$274p=function isc_FormulaBuilder__ignoreComponentData(_1){if(_1)this.ignore(_1,"dataChanged")},isc.A.$274n=function isc_FormulaBuilder__handleComponentDataChanged(){delete this.testRecord;if(this.$274m()){if(this.testButton)this.testButton.enable();if(this.sampleHeader)this.sampleHeader.show();if(this.sampleLabel)this.showMember(this.sampleLabel)}else{if(this.testButton)this.testButton.disable();if(this.sampleHeader)this.sampleHeader.hide();if(this.sampleLabel)this.hideMember(this.sampleLabel)}},isc.A.getUniqueFieldName=function isc_FormulaBuilder_getUniqueFieldName(){return this.getNewUniqueFieldName("formulaField")},isc.A.getNewUniqueFieldName=function isc_FormulaBuilder_getNewUniqueFieldName(_1){if(!_1||_1=="")_1="field";var _2=this.component,_3=(_2&&_2.fieldNamingStrategy||"simple")=="uuid",_4=this.getFields(),_5=_1.length,_6;if(_3){_6=_1+isc.Math.randomUUID()}else{var _7=_1+"Index";if(_2&&!_2.fieldNameGenerator[_7])_2.fieldNameGenerator[_7]=1;var _8=_2?_2.fieldNameGenerator[_7]:1;for(var i=0;i<_4.length;i++){var _10=_4.get(i);if(_10.name.startsWith(_1)){var _11=_10.name.substr(_5),_12=new Number(_11);if(_12&&_12>=_8)_8=_12+1}}
if(_2)_2.fieldNameGenerator[_7]=_8;_6=_1+_8}
return _6},isc.A.destroy=function isc_FormulaBuilder_destroy(){if(this.$273y)this.$273y.destroy();if(this.fieldKeyDS)this.fieldKeyDS.destroy();if(this.targetRuleScope&&this.dataSources){for(var i=0;i<this.dataSources.length;i++){var _2=this.dataSources[i];if(_2.$197d){_2.destroy()}}}
if(this.vm)this.vm.destroy();this.Super("destroy",arguments)},isc.A.setInitialTitle=function isc_FormulaBuilder_setInitialTitle(){this.setTitle(this.field.title||isc.DataSource.getAutoTitle(this.field.name))},isc.A.setInitialValue=function isc_FormulaBuilder_setInitialValue(){var _1;if(this.editMode&&this.field.userFormula){_1=this.field.userFormula.text;if(this.field.userFormula.allowEscapedKeys){this.allowEscapedKeys=this.field.userFormula.allowEscapedKeys}}
this.setValue(_1)},isc.A.remapFormulaText=function isc_FormulaBuilder_remapFormulaText(_1){var _2=this.getValue(),_3=this.field.userFormula;if(!_2||!_3)return;var _4=this.getClass(),_5=_3.formulaVars;if(!_4.hasLetterKeyVars(_5))return;var _6=this.allowEscapedKeys,_7=this.$249k(_1);for(var _8 in _5){var _9=_7[_5[_8]];if(!_9)continue;var _10=_9.mappingKey;if(_4.handleKeyExp(_2,_8)){_2=_4.handleKeyExp(_2,_8,null,_10)}
if(!_6)continue;if(_4.handleKeyExp(_2,_8,"escaped")){_2=_4.handleKeyExp(_2,_8,"escaped","#"+_10)}
if(_4.handleKeyExp(_2,_8,"braced")){_2=_4.handleKeyExp(_2,_8,"braced","#{"+_10+"}")}}
this.setValue(_2)},isc.A.showHelpWindow=function isc_FormulaBuilder_showHelpWindow(){var _1=this.locatorParent,_2=_1?_1.getTop():this.top,_3=_1?_1.getRight():this.left,_4=_1?_1.getVisibleWidth():this.width,_5=_1?_1.getVisibleHeight():this.getVisibleHeight();if(this.helpWindow&&this.helpWindow!=null){this.hideHelpWindow()}else{this.helpIcon.prompt=null;this.formulaField.stopHover();var _6=this;this.helpWindow=isc.Window.create({title:this.helpWindowTitle.evalDynamicString(this,{builderType:this.builderTypeText}),showMinimizeButton:false,showMaximizeButton:false,canDragResize:true,isModal:false,minWidth:300,closeClick:function(){_6.hideHelpWindow()},headerIconProperties:{src:"[SKIN]actions/help.png"},items:[isc.Label.create({contents:this.getHelpText(),canSelectText:true,padding:10})]},this.helpWindowDefaults,this.helpWindowProperties);this.helpWindow.observe(_1,"bringToFront","observer.bringToFront()");if(_1){var _7=isc.Page.getWidth(),_8=this.helpWindow.minWidth;_4=Math.max(_8,Math.min(_4,_7-_4));var _9=_1.getRight()+_4;var _10=_9-isc.Page.getWidth();if(_10>0){_1.setLeft(Math.max(0,_1.getLeft()-_10));_3=_1.getRight()}}
this.helpWindow.resizeTo(_4,_5);this.helpWindow.moveTo(_3,_2);this.helpWindow.show();if(_1){}}},isc.A.hideHelpWindow=function isc_FormulaBuilder_hideHelpWindow(){if(this.helpWindow){this.helpWindow.destroy();this.helpWindow=null}
this.helpIcon.prompt=this.getHelpText();this.formulaField.stopHover()},isc.A.getHoverText=function isc_FormulaBuilder_getHoverText(){var _1=isc.SB.create();_1.append("<b>",this.helpTextIntro,"</b> <P>");_1.append("<ul>");var _2=isc.MathFunction.getRegisteredFunctionIndex(),_3=this.mathFunctions;if(_3&&_3.length>0){for(var i=0;i<_3.length;i++){var _5=_2[_3[i]];_1.append("<li> <b>",_5.name,": </b> ",_5.description,"<p>");_1.append("<i>usage: ",_5.usage,"</i> </li>")}}
_1.append("</ul>");return _1.release(false)},isc.A.getReservedFormulaIdentifiers=function isc_FormulaBuilder_getReservedFormulaIdentifiers(){var _1=isc.MathFunction?isc.MathFunction.getRegisteredFunctionIndex():{};var _2=this.$249j;for(var i=0;i<_2.length;i++){var _4=_2[i];_1[_4]=_4}
return _1},isc.A.$249m=function isc_FormulaBuilder__shouldReplaceMappingKey(_1){if(this.useSingleLetterKey)return false;return _1&&_1.indexOf("Field")<0},isc.A.$249k=function isc_FormulaBuilder__buildFieldMap(_1){var _2={};for(var i=0;i<_1.length;i++){_2[_1[i].name]=_1[i]}
return _2},isc.A.getAvailableFields=function isc_FormulaBuilder_getAvailableFields(){if(this.availableFields)return this.availableFields;var _1=this.availableFields=[],_2=this.field,_3=this.getFields(),j=0;if(!_3)return _1;var _5,_6;if(!this.targetRuleScope&&!this.useSingleLetterKey){_5=this.$249k(_3);_6=this.getReservedFormulaIdentifiers()}
var _7=this.component?this.component.$158m:{},_8=(this.localComponent?this.localComponent.getLocalId()+".values.":null);for(var i=0;i<_3.getLength();i++){var _10=isc.addProperties({},_3.get(i)),_11=_10.type;if(_2){if(_2.name==_10.name)continue;if(_10.userFormula){var _12=false,_13=_10.userFormula.formulaVars||{};for(var _14 in _13){if(_13[_14]==_2.name){_12=true;break}}
if(_12)continue}}
if(_10.userFormula||this.supportedFieldTypes.map(function(_24){return isc.SimpleType.inheritsFrom(_11,_24)}).contains(true))
{var _15=_7.varToFieldName||{},_16=_7.fieldNameToVar||{};var _17=_16[_10.name];if(_17&&this.$249m(_17))_17=null;if(_17)_10.mappingKey=_17;else{var _18=_10.name;if(this.targetRuleScope&&_8&&_18.startsWith(_8))
{_18=_18.replace(_8,"")}
if(!this.targetRuleScope){if(_6){_18=isc.FormulaBuilder.mappingKeyForFieldName(_18,_15,_6,_5,this.component)}else{while(_15[(_18=isc.FormulaBuilder.mappingKeyForIndex(j++))]){}}}
_10.mappingKey=_18}
if(!_10.title)_10.title=isc.DataSource.getAutoTitle(_10.name);_1.add(_10)}}
var _13=_2&&_2.userFormula?_2.userFormula.formulaVars:{};var _19=[];for(var _20 in _13){var _21=_1.find("mappingKey",_20),_22=_1.find("name",_13[_20]);if(_22==null){_19.add(_20);continue}
if(this.$249m(_20))continue;if(_21)_21.mappingKey=_22.mappingKey;_22.mappingKey=_20}
if(_19.length>0){var _23=this.component&&this.component.missingFormulaFieldValue||"-";isc.FormulaBuilder.remapBadVars(_19,_13,_2.userFormula,_23)}
isc.FormulaBuilder.sortFields(_1,true,this.useSingleLetterKey,this.targetRuleScope);isc.FormulaBuilder.applyHeaderSpanTitles(this,_1);return _1},isc.A.getUsedFields=function isc_FormulaBuilder_getUsedFields(_1){var _2=[],_3=this.getValue(),_4=this.useSingleLetterKey,_5=this.getAvailableFields().duplicate();if(!_3)return _2;isc.FormulaBuilder.sortFields(_5,!!_1,_4,this.targetRuleScope);for(var i=0;i<_5.length;i++){var _7=_5.get(i);if(isc.FormulaBuilder.fieldIsUsed(_3,_7.mappingKey,this.allowEscapedKeys,_4))
{_2.add(_7)}}
return _2},isc.A.getCompleteValueObject=function isc_FormulaBuilder_getCompleteValueObject(){var _1=this.getUsedFields(),_2=this.generateFunction(),_3={$65w:_2,type:this.fieldType,userFormula:{text:this.getValue(),formulaVars:{}}},_4=_3.userFormula;if(this.allowEscapedKeys)_4.allowEscapedKeys=true;if(!this.targetRuleScope){for(var i=0;i<_1.length;i++){var _6=_1.get(i),_7=_6.mappingKey,_8=_6.name;if(this.useSingleLetterKey||_8!=_7){_4.formulaVars[_7]=_8}}}
if(isc.isAn.emptyObject(_4.formulaVars))delete _4.formulaVars;return _3},isc.A.getBasicValueObject=function isc_FormulaBuilder_getBasicValueObject(){var _1=this.$176q();if(this.allowBlankFormula&&_1.text=="")_1=null;else if(this.targetRuleScope)delete _1.formulaVars;return _1},isc.A.$176q=function isc_FormulaBuilder__getBasicValueObject(_1){var _2=this.getUsedFields(),_3={text:this.getValue(),formulaVars:{}};if(this.allowEscapedKeys)_3.allowEscapedKeys=true;if(_1&&this.targetRuleScope)_3.targetRuleScope=this.targetRuleScope;if(!this.targetRuleScope){for(var i=0;i<_2.length;i++){var _5=_2.get(i);_3.formulaVars[_5.mappingKey]=_5.name}}
return _3},isc.A.getUpdatedFieldObject=function isc_FormulaBuilder_getUpdatedFieldObject(){var _1=isc.addPropertiesWithAssign({title:this.getTitle()},this.getCompleteValueObject());if(this.component){isc.FieldGeneratorUtil.$275s(this.component,this.field,_1)}
return isc.addPropertiesWithAssign(this.field,_1)},isc.A.$274m=function isc_FormulaBuilder__canTest(){return!!this.getTestRecord()},isc.A.testFunction=function isc_FormulaBuilder_testFunction(){if(!this.$274m())return;var _1=this.getClass().testFunction(this.field,this.$176q(true),this.component,this.getFields(),this.testRecord,this);var _2="",_3=_1.errorText||this.defaultErrorText;if(_1.failedGeneration||_1.failedExecution){_2=this.invalidBuilderPrompt.evalDynamicString(this,{builderType:this.builderTypeText,errorText:_3})}else if(_1.emptyTestValue){if(!this.allowBlankFormula){_2=this.invalidBlankPrompt.evalDynamicString(this,{builderType:this.builderTypeText})}}else{_2=this.validBuilderPrompt.evalDynamicString(this,{builderType:this.builderTypeText})}
if(this.messageLabel)this.setTestMessage(_2);if(_1.record){this.setSamplePrompt(this.getSamplePrompt(_1))}
return _1},isc.A.getTestRecord=function isc_FormulaBuilder_getTestRecord(){if(this.testRecord)return this.testRecord;return this.testRecord=this.getClass().getTestRecord(this.component,this.getAvailableFields(),null,this.targetRuleScope)},isc.A.setTestMessage=function isc_FormulaBuilder_setTestMessage(_1){this.messageLabel.setContents(_1)},isc.A.setSamplePrompt=function isc_FormulaBuilder_setSamplePrompt(_1){this.sampleLabel.setContents("<center>"+_1+"</center>")},isc.A.generateFunction=function isc_FormulaBuilder_generateFunction(){if(this.targetRuleScope){return this.getClass().generateRuleScopeFunction(this.$176q(),this.targetRuleScope)}
return this.getClass().generateFunction(this.$176q(true),this.getUsedFields(),this.component)},isc.A.saveAddAnother=function isc_FormulaBuilder_saveAddAnother(){this.restartBuilder=true;this.save()},isc.A.fieldTitleIsUnique=function isc_FormulaBuilder_fieldTitleIsUnique(_1){var c=this.component,_3=c?(c.getUserFields?c.getUserFields():c.getAllFields()):null,_4=_3?_3.findAll({"title":_1}):null,_5=true;if(_4&&_4.length>0){for(var i=0;i<_4.length;i++){if(_4[i].name!=this.field.name){_5=false;break}}}
return _5},isc.A.save=function isc_FormulaBuilder_save(){var _1=this.testFunction();if(this.warnDuplicateTitles&&!this.duplicateTitleAccepted){var _2=this.getTitle();if(!this.fieldTitleIsUnique(_2)){var _3=this.warnDuplicateTitlesMessage.evalDynamicString(this,{fieldTitle:_2});var _4=this;isc.confirm(_3,function(_5){if(_5){_4.duplicateTitleAccepted=true;_4.delayCall("save")}else{_4.restartBuilder=false}});return null}}
delete this.duplicateTitleAccepted;if(!this.allowBlankFormula&&_1.emptyTestValue){isc.warn(this.invalidBlankPrompt.evalDynamicString(this,{builderType:this.builderTypeText}));return}else if(_1.failedGeneration||_1.failedExecution){isc.warn(this.invalidGeneratedFunctionPrompt.evalDynamicString(this,{builderType:this.builderTypeText}));return}
this.completeEditing(false)},isc.A.completeEditing=function isc_FormulaBuilder_completeEditing(_1,_2){this.cancelled=_1;if(_1){if(this.editMode&&!_2){if(this.$273z()){var _3=this;var _4=this.saveConfirmationPrompt.evalDynamicString(this,{builderType:this.builderTypeText});isc.confirm(_4,function(_5){if(_5){_3.save()}else{_3.completeEditing(true,true)}});return}}}
if(this.helpWindow)this.hideHelpWindow();if(this.availableFields){isc.FormulaBuilder.sortFields(this.availableFields,true,this.useSingleLetterKey,this.targetRulescope)}
this.fireOnClose()},isc.A.fireOnClose=function isc_FormulaBuilder_fireOnClose(){},isc.A.getSamplePrompt=function isc_FormulaBuilder_getSamplePrompt(_1){var _2=this.dataSource?this.dataSource.getTitleField():isc.firstKey(_1.record),_3=_1.result!=null?String(_1.result).asHTML():this.invalidBuilderPrompt.evalDynamicString(this,{builderType:this.builderTypeText,errorText:_1.errorText||this.defaultErrorText}),_4;if(this.targetRuleScope){_4=this.ruleContextTitle}else{_4=String(_1.record[_2]).asHTML()}
return this.samplePrompt.evalDynamicString(this,{title:_4,output:_3})});isc.B._maxIndex=isc.C+46;isc.A=isc.FormulaBuilder;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.buildDummyTestRecords=true;isc.B.push(isc.A.mappingKeyForIndex=function isc_c_FormulaBuilder_mappingKeyForIndex(_1){if(_1<26)return String.fromCharCode(65+_1);_1-=26;var _2=Math.floor(_1/(26*26)),_3=_1%(26*26),_4=Math.floor(_3/26),_5=_3%26;var _6=String.fromCharCode(65+_4,65+_5);return _2>=1?String.fromCharCode(65+(_2-1))+_6:_6},isc.A.mappingKeyForFieldName=function isc_c_FormulaBuilder_mappingKeyForFieldName(_1,_2,_3,_4,_5){var _6=_1,_7,i=0;while(_2[_6]||_3[_6]||_4[_6]&&_4[_6].name!=_6)
{_6=_1+"Field";if(++i>=2)_6+=i;_7=true}
if(_7)_2[_6]=_1;return _6},isc.A.getFieldIdProperty=function isc_c_FormulaBuilder_getFieldIdProperty(_1){return"name"},isc.A.applyHeaderSpanTitles=function isc_c_FormulaBuilder_applyHeaderSpanTitles(_1,_2,_3,_4){if(!_1.showHeaderSpanTitles)return;_3=_3||_1.headerSpans;if(!_3)return;for(var i=0;i<_3.length;i++){var _6=_4||"";var _7=_3[i];_6+=_7.title+_1.spanTitleSeparator;if(_7.spans){this.applyHeaderSpanTitles(_1,_2,_7.spans,_6)}else if(_7.fields){for(var j=0;j<_7.fields.length;j++){var _9=_7.fields[j];for(var k=0;k<_2.length;k++){if(_2[k].name==_9){_2[k].title=_6+_2[k].title;break}}}}}},isc.A.sortFields=function isc_c_FormulaBuilder_sortFields(_1,_2,_3,_4){if(_4){_1.setSort([{property:"sourceDS",direction:"ascending"},{property:"title",direction:"ascending",normalizer:function(_7,_8){var _5=_7[_8];return(_5.startsWith("[meta]")?"Z~"+_5:_5)}}])}else if(_3){_1.sortByProperty("mappingKey",_2,function(_7,_8,_9){var _6=_7[_8];if(_6.length==1)_6='99'+_6;else if(_6.length==2)_6='9'+_6;return _6})}else{_1.setSort([{property:"title",direction:"ascending"}])}},isc.A.handleKeyExp=function isc_c_FormulaBuilder_handleKeyExp(_1,_2,_3,_4,_5){var _6=_5?"(^|[^A-Z.]+)":"(^|[^A-Za-z0-9_.]+)",_7=_5?"(?=$|[^A-Z.]+)":"(?=$|[^A-Za-z0-9_.]+)";switch(_3){case"braced":var _8=new RegExp("#{\\s*"+_2+"\\s*}","g");if(_4)return _1.replace(_8,_4);else return _8.test(_1);case"escaped":var _8=new RegExp("#"+_2+_7,"g");if(_4)return _1.replace(_8,_4);else return _8.test(_1);default:case"simple":var _8=new RegExp(_6+_2+_7,"g");if(_4)return _1.replace(_8,"$1"+_4);else return _8.test(_1)}},isc.A.fieldIsUsed=function isc_c_FormulaBuilder_fieldIsUsed(_1,_2,_3,_4){if(!_1||!_2)return false;if(this.handleKeyExp(_1,_2,null,null,_4))return true;if(!_3)return false;return this.handleKeyExp(_1,_2,"escaped",null,_4)||this.handleKeyExp(_1,_2,"braced",null,_4)},isc.A.hasLetterKeyVars=function isc_c_FormulaBuilder_hasLetterKeyVars(_1){if(_1)for(var _2 in _1){if(_2==_1[_2])continue;return _2.indexOf("Field")<0}},isc.A.getFormulaVarsFromFormula=function isc_c_FormulaBuilder_getFormulaVarsFromFormula(_1,_2){return _1.split(/[^A-Za-z0-9_.]+/).filter(function(_3){return _3})},isc.A.getFieldDetailsFromValue=function isc_c_FormulaBuilder_getFieldDetailsFromValue(_1,_2,_3,_4,_5){var _6=this.hasLetterKeyVars(_2),_7=isc.shallowClone(_2||isc.emptyObject),_8={usedFields:[],missingFields:[]};if(!_6){var _9=this.getFormulaVarsFromFormula(_1,_5);for(var i=0;i<_9.length;i++){var _11=_9[i];if(_11.indexOf(".")>=0)continue;var _12=_3.findIndex("name",_11);if(_12<0)continue;if(!_7[_11])_7[_11]=_11}}
for(var _13 in _7){var _14=_7[_13],_15=this.fieldIsUsed(_1,_13,_5,_6),_12=_3.findIndex("name",_14);if(!_3[_12]){if(!_15){isc.logWarn("Field "+_14+" is not in the list of available fields.  However, it is not used in the formula either - ignoring.");delete _2[_13]}else{isc.logWarn("Field "+_14+" is not in the list of available-fields");_8.missingFields.add(_14)}}else if(_15){var _16=isc.addProperties({},_3[_12]);_16.mappingKey=_13;_8.usedFields.add(_16)}}
return _8},isc.A.testFunction=function isc_c_FormulaBuilder_testFunction(_1,_2,_3,_4,_5){var _6={};try{_6.component=_3;_6.record=this.getTestRecord(_3,_4,_5,_2.targetRuleScope);if(!_2.text||_2.text==""){_6.emptyTestValue=true;return _6}
_6.jsFunction=(_2.targetRuleScope?this.generateRuleScopeFunction(_2,_2.targetRuleScope):this.generateFunction(_2,_4,_3));_6.result=_6.jsFunction(_6.record,_3)}catch(err){if(!_6.jsFunction)_6.failedGeneration=true;_6.failedExecution=true;_6.errorText=err.message}
return _6},isc.A.getTestRecord=function isc_c_FormulaBuilder_getTestRecord(_1,_2,_3,_4){var _5;if(_3)return _3;if(_1){if(_1.$270c)return _1.$270c;_5=_1.getSelectedRecord();if(!_5){if(_1.body){var _6=_1.body.getVisibleRows();_5=_6?_1.getRecord(_6[0]):_1.data.get(0)}else{_5=_1.data.get(0)}}}
if(this.buildDummyTestRecords!=false&&!_5&&_2){_5={};for(var i=0;i<_2.length;i++){var _8=_2.get(i);if(_8.userFormula){_8.$65w=(_4?isc.FormulaBuilder.generateRuleScopeFunction(_8.userFormula,_4):isc.FormulaBuilder.generateFunction(_8.userFormula,_2,_1));var _9=_8.$65w;_8.sortNormalizer=function(_5,_10,_11){return _9(_5,_11)}}
if(_8.$65w){isc.DataSource.setPathValue(_5,_8.name,null,_8.$65w(_5,_1))}else if(_8.type)
if(isc.SimpleType.inheritsFrom(_8.type,"integer")||isc.SimpleType.inheritsFrom(_8.type,"float"))
{isc.DataSource.setPathValue(_5,_8.name,null,1)}else{isc.DataSource.setPathValue(_5,_8.name,null,_8.name)}
else{isc.DataSource.setPathValue(_5,_8.name,null,_8.name)}}}
return _5},isc.A.generateFunction=function isc_c_FormulaBuilder_generateFunction(_1,_2,_3,_4,_5){if(_4==null)_4=true;var _6=isc.SB.create(),_7=_1.text;var _8=isc.MathFunction.getRegisteredFunctions();if(_8&&_8.length>0){_6.append("var functions=isc.MathFunction.getRegisteredFunctionIndex();\n");_7=this.$279x(_7)}
var _9=this.hasLetterKeyVars(_1.formulaVars),_10=this.getFieldDetailsFromValue(_7,_1.formulaVars,_2,_3,_1.allowEscapedKeys),_11=_10.usedFields,_12=_10.missingFields;isc.FormulaBuilder.sortFields(_11,false,_9);if(_12.length==0){_6.append("var nullVars = [];\n");if(_11.length>0){for(var i=0;i<_11.length;i++){var _14=_11.get(i),_15=_14.mappingKey;var _16=_14.name,_17="isc.DataSource.getPathValue(record,'"+_16+"', field)";var _18=_14.userFormula&&_3&&!_3.shouldApplyUserFormulaAfterSummary(_14);_6.append("var ");_6.append("field=component==null?null:component.getField('",_16,"');","if (field==null && component && component.completeFields)","field=component.completeFields.find('name','",_16,"');","var ",_15,_14.userFormula?"=component"+(_18?"&&!component.isSummaryRecord(record)":"")+"?component.getFormulaFieldValue(field, record):"+_17:_14.userSummary?"=component?component.getSummaryFieldValue(field, record):"+_17:"="+_17,"\n;");_6.append("if (",_15," == null || (component && ",_15," == component.badFormulaResultValue) || (!component && ",_15," == '.')) nullVars.add('",_15,"');");if(_1.allowEscapedKeys){_7=this.handleKeyExp(_7,_15,"escaped",_15,_9);_7=this.handleKeyExp(_7,_15,"braced",_15,_9)}}
_6.append("\n")}
if(_4){_6.append("try{\n")}
_6.append("var value=",_7,";");if(_4){var _19="Attempt to evaluate formulaFunction "+_7+" failed. Error message:";_6.append("\n} catch (e) { (component||isc).logWarn(",_19.asSource(true)," + e.message)}\n")}
_6.append(_5?null:"if (!isFinite(value) || nullVars.length > 0) return (component && component.badFormulaResultValue) || '.'; ","return value;")}else{this.logWarn("Formula failed due to missing fields: "+_12.join(", ")+".");var _20=(_3&&_3.badFormulaResultValue)||".";if(_20)_20="'"+_20+"'";_6.append("return ",_20,";")}
var _21=_6.release(false);var _22;if(_4){try{_22=isc.$aq("record,component",_21)}catch(e){this.logWarn("Error attempting to convert formula text '"+_7+"' to a function:"+e.message);_22=isc.$aq("record,component","return null;")}}else{_22=isc.$aq("record,component",_21)}
return _22},isc.A.$279x=function isc_c_FormulaBuilder__processUnqualifiedFormulaFunctionCalls(_1){var _2=isc.MathFunction.getRegisteredFunctionIndex();for(var _3 in _2){var _4=new RegExp("(?<!\\w)"+_3+"\\s*\\(","g");_1=_1.replace(_4,"functions."+_3+".jsFunction(")}
return _1},isc.A.getRuleScopeUsedFields=function isc_c_FormulaBuilder_getRuleScopeUsedFields(_1,_2,_3,_4){var _5=_1.text,_6=_1.formulaVars,_7=[],_8=[],_9={};if(_6){for(var _10 in _6){_9[_6[_10]]=_10}}
var _11=new RegExp("#\{(["+isc.$ag+"a-zA-Z.]+)\}","g"),_12;do{_12=_11.exec(_5);var _13=_12&&_12[1];if(_13&&_13.contains(".")){var _14=_13.split(".")[0];if(!_8.contains(_14)){_8.add(_14)}
_7.add(_13)}}while(_12);var _11=new RegExp("(["+isc.$ag+"a-zA-Z][a-zA-Z0-9.]*)","g"),_12;do{_12=_11.exec(_5);var _13=_12&&_12[1];if(_13&&_13.contains(".")){var _14=_13.split(".")[0];if(!_8.contains(_14)){_8.add(_14)}
if(!_7.contains(_13)){_7.add(_13)}}}while(_12);if(!_3){var _15=false;if(!_4){_4=isc.Canvas.getAllRuleScopeDataSources(_2);_15=true}
for(var i=0;i<_4.length;i++){var _17=_4[i],_18=_17.getFieldNames();for(var j=0;j<_18.length;j++){var _20=_18[j],_21=_17.getField(_20),_22=_21.criteriaPath;var _14=(_17.criteriaBasePath&&!_17.criteriaBasePath.startsWith("$")?_17.criteriaBasePath:(_17.$229f?_17.tagName:_17.ID)),_23=_22||_14+"."+_20,_24=_9[_23]||_23,_25=this.fieldIsUsed(_5,_24,_1.allowEscapedKeys);if(_25){if(_14.contains("."))_14=_14.split(".")[0];if(!_8.contains(_14)){_8.add(_14)}
if(!_9[_23]&&!_7.contains(_24)){_7.add(_24)}}}
if(_15&&_17.$197d)_17.destroy()}}
return _7},isc.A.getRuleScopeUsedKeys=function isc_c_FormulaBuilder_getRuleScopeUsedKeys(_1,_2,_3,_4){var _5=_1.formulaVars,_6=[];if(_5){var _7=_1.text,_8={};for(var _9 in _5){_8[_5[_9]]=_9}
if(!_3){var _10=false;if(!_4){_4=isc.Canvas.getAllRuleScopeDataSources(_2);_10=true}
for(var i=0;i<_4.length;i++){var _12=_4[i],_13=_12.getFieldNames();for(var j=0;j<_13.length;j++){var _15=_13[j],_16=_12.getField(_15),_17=_16.criteriaPath;var _18=(_12.criteriaBasePath&&!_12.criteriaBasePath.startsWith("$")?_12.criteriaBasePath:(_12.$229f?_12.tagName:_12.ID)),_19=_17||_18+"."+_15,_20=_8[_19]||_19,_21=this.fieldIsUsed(_7,_20,_1.allowEscapedKeys);if(_21){if(_8[_19]){_6.add(_20)}}}
if(_10&&_12.$197d)_12.destroy()}}}
return _6},isc.A.getRuleScopeLocalFields=function isc_c_FormulaBuilder_getRuleScopeLocalFields(_1,_2){var _3=_1.text,_4={},_5={};if(_2){var _6=[];if(_2.getItems)_6=_2.getItems();else{if(_2.getUserFields)_6=_2.getUserFields();else if(_2.getAllFields)_6=_2.getAllFields();else _6=isc.getKeys(_2)}
if(_6){var _7=_2.ID+".values.";for(var i=0;i<_6.length;i++){var _9=_6[i].name;if(this.fieldIsUsed(_3,_9,_1.allowEscapedKeys)){_4[_9]=_7+_9;if(isc.SimpleType.inheritsFrom(_6[i].type,"date")||isc.SimpleType.inheritsFrom(_6[i].type,"datetime")){_5[_9]=true}}}}}
return _4},isc.A.getRuleScopeLocalDateFields=function isc_c_FormulaBuilder_getRuleScopeLocalDateFields(_1,_2){var _3=_1.text,_4={};if(_2){var _5=[];if(_2.getItems)_5=_2.getItems();else{if(_2.getUserFields)_5=_2.getUserFields();else if(_2.getAllFields)_5=_2.getAllFields();else _5=isc.getKeys(_2)}
if(_5){for(var i=0;i<_5.length;i++){var _7=_5[i].name;if(this.fieldIsUsed(_3,_7,_1.allowEscapedKeys)){if(isc.SimpleType.inheritsFrom(_5[i].type,"date")||isc.SimpleType.inheritsFrom(_5[i].type,"datetime")){_4[_7]=true}}}}}
return _4},isc.A.generateRuleScopeFunction=function isc_c_FormulaBuilder_generateRuleScopeFunction(_1,_2,_3,_4){if(_4==null)_4=true;var _5=isc.SB.create(),_6=_1.text,_7=_1.formulaVars;var _8=isc.MathFunction.getRegisteredFunctions();if(_8&&_8.length>0){_5.append("var functions=isc.MathFunction.getRegisteredFunctionIndex();\n");_6=this.$279x(_6)}
var _9=isc.Canvas.getAllRuleScopeDataSources(_2),_10=this.getRuleScopeUsedFields(_1,_2,null,_9),_11=this.getRuleScopeUsedKeys(_1,_2,null,_9),_12=this.getRuleScopeLocalFields(_1,_3),_13=this.getRuleScopeLocalDateFields(_1,_3);if(_9){for(var i=0;i<_9.length;i++){var _15=_9[i];if(_15.$197d)_15.destroy()}}
_5.append("var nullVars = [];\n");var _16=[];for(var i=0;i<_10.length;i++){var _17=_10[i],_18=_17.split(".")[0];if(!_16.contains(_18)){_16.add(_18)}}
if(_16.length>0||!isc.isA.emptyObject(_12)){for(var i=0;i<_16.length;i++){var _19=_16[i];_5.append("var ",_19,"={},v;\n");for(var j=0;j<_10.length;j++){var _21=_10[j],_22=_21.split("."),_18=(_22.length>1?_22[0]:null);if(_18&&_18==_19&&_22.length>1){var _17=_22.slice(1,_22.length).join(".");_5.append("v=isc.DS.getPathValue(record,'",_21,"');\n");_5.append("isc.DS.setPathValue(",_19,",'"+_17+"',null,(v!=null?(isc.isA.Date(v)?v:parseFloat(v)):null));\n")}}}
for(var _23 in _12){var _24=_23 in _13;_5.append("var ",_23,"=",_24?"":"parseFloat(","component.getValue('"+_23+"')",_24?"":")",";\n")}
_5.append("\n");var _25=function(_30,_31){if(_31.contains(".")){_5.append("var $237z=isc.DS.getPathValue(record,'",_31,"');")}else _5.append("var $237z="+_30+";");_5.append("if ($237z == null || ","(component && $237z == component.badFormulaResultValue) || ","(!component && $237z == '.')) ","nullVars.add('",_30,"');\n")};for(var i=0;i<_10.length;i++){var _21=_10[i];_25(_21,_21);if(_1.allowEscapedKeys){_6=this.handleKeyExp(_6,_21,"escaped",_21);_6=this.handleKeyExp(_6,_21,"braced",_21)}}
for(var _23 in _12){_25(_23,_23);if(_1.allowEscapedKeys){_6=this.handleKeyExp(_6,_23,"escaped",_23);_6=this.handleKeyExp(_6,_23,"braced",_23)}}
for(var i=0;i<_11.length;i++){var _21=_11[i],_26=_21.replace(".","_");_5.append("var ",_26,"=isc.DS.getPathValue(record,'",_7[_21],"');\n");_5.append("if (",_26," == null || (component && ",_26," == component.badFormulaResultValue) || (!component && ",_26," == '.')) nullVars.add('",_21,"');");_6=this.handleKeyExp(_6,_21,"escaped",_26);_6=this.handleKeyExp(_6,_21,"braced",_26)}}
if(_4){_5.append("try{\n")}
_5.append("var value=",_6,";");if(_4){var _27="Attempt to evaluate formulaFunction "+_6+" failed. Error message:";_5.append("\n} catch (e) { (component||isc).logWarn(",_27.asSource(true)," + e.message)}\n")}
_5.append("if (!isFinite(value) || nullVars.length > 0) return (component && component.badFormulaResultValue) || '.'; ","return value;");var _28=_5.release(false);var _29;if(_4){try{_29=isc.$aq("record,component",_28)}catch(e){this.logWarn("Error attempting to convert formula text '"+_6+"' to a function:"+e.message);_29=isc.$aq("record,component","return null;")}}else{_29=isc.$aq("record,component",_28)}
return _29},isc.A.remapBadVars=function isc_c_FormulaBuilder_remapBadVars(_1,_2,_3,_4){var _5=this.hasLetterKeyVars(_2);for(var i=0;i<_1.length;i++){var _7=_1[i],_8=_3.text||"";_3.text=this.handleKeyExp(_8,_7,"simple",_4,_5);if(_3.allowEscapedKeys){_3.text=this.handleKeyExp(_3.text,_7,"escaped",_4,_5);_3.text=this.handleKeyExp(_3.text,_7,"braced",_4,_5)}
isc.logWarn("Formula variable "+_7+" refers to missing field "+_2[_7]);delete _2[_7]}});isc.B._maxIndex=isc.C+20;isc.ClassFactory.defineClass("SummaryBuilder","FormulaBuilder");isc.A=isc.SummaryBuilder.getPrototype();isc.A.builderTypeText="Summary";isc.A.canEditAttributeName="canEditSummary";isc.A.fieldType="text";isc.A.testButtonHoverContents="Click to test the summary";isc.A.testButtonHoverContents_cantTest="You cannot test the summary at this time.";isc.A.autoHideCheckBoxLabel="Auto hide fields used in Summary";isc.A.helpTextIntro="Building Summary Columns";isc.A.allowBasicMultiCharKeys=false;isc.A=isc.SummaryBuilder.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.insertEscapedKeys=true;isc.B.push(isc.A.setSummary=function isc_SummaryBuilder_setSummary(_1){this.setValue(_1)},isc.A.setInitialValue=function isc_SummaryBuilder_setInitialValue(){var _1;if(this.editMode&&this.field.userSummary){_1=this.field.userSummary.text;if(this.field.userSummary.allowBasicMultiCharKeys){this.allowBasicMultiCharKeys=this.field.userSummary.allowBasicMultiCharKeys}}
this.setValue(_1)},isc.A.remapFormulaText=function isc_SummaryBuilder_remapFormulaText(_1){var _2=this.getValue(),_3=this.field.userSummary;if(!_2||!_3)return;var _4=this.getClass(),_5=_3.summaryVars;if(!_4.hasLetterKeyVars(_5))return;var _6=this.allowBasicMultiCharKeys,_7=this.$249k(_1);for(var _8 in _5){var _9=_7[_5[_8]];if(!_9)continue;var _10=_9.mappingKey;if(_4.handleKeyExp(_2,_8,"braced",null,true)){_2=_4.handleKeyExp(_2,_8,"braced","#{"+_10+"}",true)}
if(_8.length>1&&!_6)continue;if(_4.handleKeyExp(_2,_8,"escaped",null,true)){_2=_4.handleKeyExp(_2,_8,"escaped","#{"+_10+"}",true)}}
this.setValue(_2)},isc.A.getUniqueFieldName=function isc_SummaryBuilder_getUniqueFieldName(){return this.getNewUniqueFieldName("summaryField")},isc.A.getHoverText=function isc_SummaryBuilder_getHoverText(){var _1=isc.SB.create(),_2=this.getTestRecord(),_3=this.getAvailableFields(),_4=_3[0],_5=_4.name,_6=_4?_4.title||_4.name:null,_7=_3[1],_8=_7?_7.name:null,_9=_7?_7.title||_7.name:null;_1.append("<b>",this.helpTextIntro,"</b> <P>");_1.append("Summary columns are user-created fields that combine dynamic-values from other fields in the current record with static text specified by the user.<P>");_1.append("Dynamic-values are specified by prefixing a mapping-key from the table opposite with #");if(this.getFields().length>26)_1.append(", or by using #{key} when the key is 2 or more characters long,");_1.append(" and everything else is copied directly into the output.<P>");if(this.dataSource){_1.append("For example, in the current DataSource, key <b>A</b> maps to field <i>",_6,"</i> and <b>B</b> is <i>",!_7?"missing":_9,"</i>.<P>");_1.append("So, if we enter the Summary format-string as:<P>","<i>#A is relative to #B</i><P>","then example output using the current data would look like:<P>");if(_2){var _10,_11;if(!_7)_11="{missing}";if(!this.component){_10=_2[_5];if(_7)_11=_2[_8]}else{var _12=this.component,_13=_12.shouldIncludeHiliteInSummaryField("sample",_5);_10=_13?_12.getStandaloneFieldValue(_2,_5):_12.getFormattedValue(_2,_5,_12.getRawValue(_2,_5));if(_7){var _14=_12.shouldIncludeHiliteInSummaryField("sample",_8);_11=_14?_12.getStandaloneFieldValue(_2,_8):_12.getFormattedValue(_2,_8,_12.getRawValue(_2,_8))}}
_1.append("<i>",_10," is relative to ",_11,"</i><P>")}}
return _1.release(false)},isc.A.$249m=function isc_SummaryBuilder__shouldReplaceMappingKey(){return!this.useSingleLetterKey},isc.A.getAvailableFields=function isc_SummaryBuilder_getAvailableFields(){if(this.availableFields)return this.availableFields;var _1=this.availableFields=[],_2=this.useSingleLetterKey,_3=this.field,_4=this.getFields(),_5;if(!_4)return _1;if(this.localComponent){_5=this.localComponent.getLocalId()+".values."}
for(var i=0,j=0;i<_4.getLength();i++){var _8=isc.addProperties({},_4.get(i));if(_3){if(_3.name==_8.name)continue;if(_8.userSummary){var _9=false,_10=_8.userSummary.summaryVars||{};for(var _11 in _10){if(_10[_11]==_3.name){_9=true;break}}
if(_9)continue}}
_8.mappingKey=_2?isc.FormulaBuilder.mappingKeyForIndex(j++):_8.name;if(_5&&_8.mappingKey.startsWith(_5)){_8.mappingKey=_8.mappingKey.replace(_5,"")}
if(!_8.title)_8.title=isc.DataSource.getAutoTitle(_8.name);_1.add(_8)}
var _10=_3&&_3.userSummary?_3.userSummary.summaryVars:{};var _12=[];for(var _13 in _10){var _14=_1.find("mappingKey",_13),_15=_1.find("name",_10[_13]);if(_15==null){_12.add(_13);continue}
if(this.$249m(_13))continue;if(_14)_14.mappingKey=_15.mappingKey;_15.mappingKey=_13}
if(_12.length>0){var _16=this.component&&this.component.missingSummaryFieldValue||"-";isc.SummaryBuilder.remapBadVars(_12,_10,_3.userSummary,_16)}
isc.FormulaBuilder.sortFields(_1,true,_2,this.targetRuleScope);isc.SummaryBuilder.applyHeaderSpanTitles(this,_1);return _1},isc.A.getUsedFields=function isc_SummaryBuilder_getUsedFields(_1){var _2=[],_3=this.getValue(),_4=this.useSingleLetterKey,_5=this.allowBasicMultiCharKeys,_6=this.getAvailableFields().duplicate();isc.FormulaBuilder.sortFields(_6,!!_1,_4,this.targetRuleScope);for(var i=0;i<_6.length;i++){var _8=_6.get(i);if(isc.SummaryBuilder.fieldIsUsed(_3,_8.mappingKey,_5,_4))
{_2.add(_8)}}
return _2},isc.A.getCompleteValueObject=function isc_SummaryBuilder_getCompleteValueObject(){var _1=this.getUsedFields(),_2=this.generateFunction(),_3={$652:_2,type:this.fieldType,userSummary:{text:this.getValue()}},_4=_3.userSummary;if(this.allowBasicMultiCharKeys)_4.allowBasicMultiCharKeys=true;if(this.useSingleLetterKey&&_1&&_1.length>0){_4.summaryVars={};for(var i=0;i<_1.length;i++){var _6=_1.get(i);_4.summaryVars[_6.mappingKey]=_6.name}}
return _3},isc.A.getBasicValueObject=function isc_SummaryBuilder_getBasicValueObject(){var _1=this.$176q();if(this.allowBlankFormula&&_1.text=="")_1=null;else if(this.targetRuleScope)delete _1.formulaVars;return _1},isc.A.$176q=function isc_SummaryBuilder__getBasicValueObject(_1){var _2=this.getUsedFields(),_3={text:this.getValue(),summaryVars:{}};if(this.allowBasicMultiCharKeys)_3.allowBasicMultiCharKeys=true;if(_1&&this.targetRuleScope)_3.targetRuleScope=this.targetRuleScope;if(!this.targetRuleScope){for(var i=0;i<_2.length;i++){var _5=_2.get(i);_3.summaryVars[_5.mappingKey]=_5.name}}
return _3},isc.A.generateFunction=function isc_SummaryBuilder_generateFunction(){if(this.targetRuleScope){return this.getClass().generateRuleScopeFunction(this.$176q(),this.targetRuleScope)}
return this.getClass().generateFunction(this.$176q(true),this.getUsedFields(),this.component)},isc.A.initWidget=function isc_SummaryBuilder_initWidget(){this.Super("initWidget",arguments)});isc.B._maxIndex=isc.C+13;isc.A=isc.SummaryBuilder;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.testFunction=function isc_c_SummaryBuilder_testFunction(_1,_2,_3,_4,_5){var _6={};try{_6.component=_3;_6.record=this.getTestRecord(_3,_4,_5,_2.targetRuleScope);if(_2.text==""){_6.emptyTestValue=true;return _6}
_6.jsFunction=(_2.targetRuleScope?this.generateRuleScopeFunction(_2,_2.targetRuleScope):this.generateFunction(_2,_4,_3));_6.result=_6.jsFunction(_6.record,_1.name,_3)}catch(err){if(!_6.jsFunction)_6.failedGeneration=true;_6.failedExecution=true;_6.errorText=err.message}
return _6},isc.A.fieldIsUsed=function isc_c_SummaryBuilder_fieldIsUsed(_1,_2,_3){if(!_1||!_2)return false;if(this.handleKeyExp(_1,_2,"braced"))return true;if(_2.length>1&&!_3)return false;return this.handleKeyExp(_1,_2,"escaped")},isc.A.getFormulaVarsFromFormula=function isc_c_SummaryBuilder_getFormulaVarsFromFormula(_1,_2){var _3=[];while(_1.length){var _4=_1.match(/#([A-Za-z][A-Za-z0-9_.]*)/),_5=_1.match(/#{(\s*)([A-Za-z][A-Za-z0-9_.]*)(\s*)}/);var _6=null;if(_5&&(!_4||_4.index>_5.index)){_6=_5[2];var _7=_5.index+2+_5[1].length
_1=_1.substring(_7)}else if(_4){_6=_4[1],_1=_1.substring(_4.index+_6.length);if(_4[1].length>1&&!_2)_6=null}else{break}
if(_6)_3.add(_6)}
return _3},isc.A.replaceMissingVars=function isc_c_SummaryBuilder_replaceMissingVars(_1,_2,_3,_4){var _5=_4?"[A-Z]":"[A-Za-z_]",_6=_5+(_4?"[A-Z]?":"[A-Za-z0-9_.]*");var _7=_1&&_1.missingSummaryFieldValue||"-";_2=_2.replace(new RegExp("#(\{"+_6+"\}|"+_5+")","g"),_7);if(_3){_2=_2.replace(new RegExp("#("+_6+")","g"),_7)}
return _2},isc.A.generateFunction=function isc_c_SummaryBuilder_generateFunction(_1,_2,_3){var _4=isc.SB.create(),_5=_1.text,_6=_1.allowBasicMultiCharKeys,_7=this.hasLetterKeyVars(_1.summaryVars),_8=_1.replaceMissingVars,_9=this.getFieldDetailsFromValue(_5,_1.summaryVars,_2,_3,_6),_10=_9.usedFields;if(_8==null)_8=true;isc.FormulaBuilder.sortFields(_10,false,_7);if(_10.length>0){for(var i=0;i<_10.length;i++){var _12=_10.get(i),_13=_12.name,_14="isc.DataSource.getPathValue(record,'"+_13+"')";_4.append("var includeHilites = component ? ","component.shouldIncludeHiliteInSummaryField(fieldName,'",_13,"') :","false;\n");_4.append("var ");_4.append(_12.mappingKey,"= (component ?","(includeHilites ? ","component.getStandaloneFieldValue(record, '",_13,"') :","component.getFormattedValue(record, '",_13,"',component.getRawValue(record,'",_13,"'))) :",_12.userFormula?"component?component.getFormulaFieldValue(field, record):"+_14:_12.userSummary?"component?component.getSummaryFieldValue(field, record):"+_14:_14,")\n");_4.append(";\n");var _15="'+"+_12.mappingKey+"+'";_5=this.handleKeyExp(_5,_12.mappingKey,"braced",_15,_7);if(_12.mappingKey.length==1||_1.allowBasicMultiCharKeys){_5=this.handleKeyExp(_5,_12.mappingKey,"escaped",_15,_7)}}
_4.append("\n")}
if(_8){_5=this.replaceMissingVars(_3,_5,_1.allowBasicMultiCharKeys,_7)}
if(_5.substr(0,2)=="'+"){_5=_5.substr(2)}else if(_5.substr(0,1)!="'"){_5="'"+_5}
if(_5.substr(_5.length-2)=="+'"){_5=_5.substr(0,_5.length-2)}else if(_5.substr(_5.length-1)!="'"){_5=_5+"'"}
_4.append("return ",_5,";");return isc.$aq("record,fieldName,component",_4.release(false))},isc.A.getRuleScopeUsedFields=function isc_c_SummaryBuilder_getRuleScopeUsedFields(_1,_2,_3){var _4=_1.text,_5=[];var _6=new RegExp("#\{(["+isc.$ag+"a-zA-Z.]+)\}","g"),_7;do{_7=_6.exec(_4);var _8=_7&&_7[1];if(_8&&_8.contains(".")){_5.add(_8)}}while(_7);if(!_3){var _9=isc.Canvas.getAllRuleScopeDataSources(_2);for(var i=0;i<_9.length;i++){var _11=_9[i],_12=_11.getFieldNames();for(var j=0;j<_12.length;j++){var _14=_12[j],_15=_11.getField(_14),_16=_15.criteriaPath;var _17=(_11.criteriaBasePath&&!_11.criteriaBasePath.startsWith("$")?_11.criteriaBasePath:(_11.$229f?_11.tagName:_11.ID)),_18=_16||_17+"."+_14,_19=this.fieldIsUsed(_4,_18,_1.allowEscapedKeys);if(_19&&!_5.contains(_18)){_5.add(_18)}}
if(_11.$197d)_11.destroy()}}
return _5},isc.A.getRuleScopeLocalFields=function isc_c_SummaryBuilder_getRuleScopeLocalFields(_1,_2){var _3=_1.text,_4={};if(_2){var _5=_2.getItems?_2.getItems():(_2.getUserFields?_2.getUserFields():(_2.getAllFields?_2.getAllFields():isc.getKeys(_2)));if(_5){var _6=_2.ID+".values.";for(var i=0;i<_5.length;i++){var _8=_5[i].name;if(this.fieldIsUsed(_3,_8,_1.allowEscapedKeys)){_4[_8]=_6+_8}}}}
return _4},isc.A.generateRuleScopeFunction=function isc_c_SummaryBuilder_generateRuleScopeFunction(_1,_2,_3,_4){var _5=isc.SB.create(),_6=_1.text,_7=this.getRuleScopeUsedFields(_1,_2),_8=this.getRuleScopeLocalFields(_1,_3);if(!isc.isAn.emptyObject(_8)){_5.append("if (component) {\n");_5.append("\trecord = isc.addProperties({}, record); record[component.ID] = {}; record[component.ID].values={};\n");for(var _9 in _8){_5.append("\trecord[component.ID].values."+_9+"=component.getValue('"+_9+"');\n")}
_5.append("}\n")}
_5.append("var ruleScopeComponent");if(_2){var _10=isc.isA.Canvas(_2)?_2.getID():_2;_5.append(" = window['"+_10+"']")}
_5.append(";");var _11=this;var _12=function(_9,_20,_19){var _13="isc.DataSource.getPathValue(record,'"+_20+"')",_14="isc.DS.$249t(record,'"+_20+"', ruleScopeComponent)",_15=isc.FormulaBuilder.mappingKeyForIndex(_19);_5.append("var includeHilites = component && !isc.isA.DynamicForm(component) ? ","component.shouldIncludeHiliteInSummaryField(fieldName,'",_20,"') :","false;\n");_5.append("var ");_5.append(_15,"= (component ?","(includeHilites ? ","component.getStandaloneFieldValue(record, '",_20,"') :","component.getFormattedValue(record, '",_20,"', (isc.isA.ListGrid(component)?isc.getRawValue(record, '",_20,"'):isc.DS.getPathValue(record, '",_20,"')))) :","(ruleScopeComponent ? ",_14," : ",_13,")",")\n");_5.append(";\n");var _16=_9,_17="'+("+_15+"!=null?"+_15+":'')+'";_6=_11.handleKeyExp(_6,_16,"braced",_17);if(_15.length==1||_1.allowBasicMultiCharKeys){_6=_11.handleKeyExp(_6,_16,"escaped",_17)}};if(_7.length>0){for(var i=0;i<_7.length;i++){var _9=_7.get(i);_12(_9,_9,i)}
_5.append("\n")}
var _19=_7.length;for(var _9 in _8){_12(_9,_8[_9],_19++)}
_6=this.replaceMissingVars(_3,_6,_1.allowBasicMultiCharKeys);if(_6.substr(0,2)=="'+"){_6=_6.substr(2)}else if(_6.substr(0,1)!="'"){_6="'"+_6}
if(_6.substr(_6.length-2)=="+'"){_6=_6.substr(0,_6.length-2)}else if(_6.substr(_6.length-1)!="'"){_6=_6+"'"}
_5.append("return ",_6,";");return isc.$aq("record,fieldName,component",_5.release(false))},isc.A.remapBadVars=function isc_c_SummaryBuilder_remapBadVars(_1,_2,_3,_4){var _5=this.hasLetterKeyVars(_2);for(var i=0;i<_1.length;i++){var _7=_1[i],_8=_3.text||"";_3.text=this.handleKeyExp(_8,_7,"braced",_4,_5);if(_7.length==1||_3.allowBasicMultiCharKeys){_3.text=this.handleKeyExp(_3.text,_7,"escaped",_4,_5)}
isc.logWarn("Summary variable "+_7+" refers to missing field "+_2[_7]);delete _2[_7]}});isc.B._maxIndex=isc.C+9;isc.defineClass("HiliteRule","HLayout");isc.A=isc.HiliteRule.getPrototype();isc.A.height=1;isc.A.overflow="visible";isc.A.clauseConstructor="FilterClause";isc.A.clauseDefaults={fieldPickerWidth:"*",overflow:"visible",clauseDefaults:{canEditField:function(){return true}},operatorPickerWidth:140,valueItemWidth:130,excludeNonFilterableFields:false,getDefaultOptionDataSource:function(_1){if(this.creator&&this.creator.rootDataSource){return this.creator.rootDataSource}
var _2=this.dataSource;if(_2&&_2.isHiliteCriteriaDS)return null;return _2}};isc.A.hiliteFormDefaults={_constructor:"DynamicForm",numCols:6,colWidths:[60,60,60,60,60,40],overflow:"visible"};isc.A.colorFieldTitle="Color";isc.A.advancedClauseLayoutDefaults={_constructor:"HLayout",membersMargin:4,defaultLayoutAlign:"center",overflow:"visible"};isc.A.advancedClauseLabelDefaults={_constructor:"Label",autoParent:"advancedClauseLayout",width:"*",overflow:"hidden",height:22,valign:"center",wrap:false,padding:1,styleName:"staticTextItemLite"};isc.A.advancedClauseEditButtonDefaults={_constructor:"ImgButton",autoParent:"advancedClauseLayout",width:18,height:18,layoutAlign:"center",src:"[SKINIMG]/actions/edit.png",showRollOver:false,showDown:false,showDisabled:false,click:function(){this.creator.editAdvancedRule()}};isc.A.iconBaseStyle="icon";isc.A.iconSize=16;isc.A.showRemoveButton=true;isc.A.removeButtonPrompt="Remove";isc.A.removeButtonDefaults={_constructor:isc.ImgButton,width:18,height:18,layoutAlign:"center",src:"[SKIN]/actions/remove.png",showRollOver:false,showDown:false,showDisabled:false,hoverWidth:80,click:function(){this.creator.remove()}};isc.A.foregroundColorTitle="Text";isc.A.backgroundColorTitle="Background";isc.A.iconFieldTitle="Icon";isc.A.iconFieldDefaults={type:"SelectItem",width:"*",defaultValue:null,valueMap:{"":""},valueIcons:{"":isc.Canvas.$wz},disabled:true,showIf:function(){return!this.isDisabled()}};isc.A=isc.HiliteRule.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_HiliteRule_initWidget(){if(isc.isA.String(this.dataSource))this.dataSource=isc.DS.getDataSource(this.dataSource);if(!this.isAdvanced&&this.hilite){var _1=this.hilite.fieldName;var _2=this.hilite.criteria||{};var _3=!_2.criteria&&_2.fieldName==_1;this.isAdvanced=!_3||isc.isAn.Array(_1);if(this.isAdvanced){if(!isc.isAn.Array(_1)){this.fieldName=this.hilite.fieldName=[this.hilite.fieldName]}
if(!_2.criteria){this.hilite.criteria={_constructor:"AdvancedCriteria",operator:"and",criteria:[_2]}}}}
if(this.hilite)this.checkHiliteProperties(this.hilite);if(this.isAdvanced){var _4=isc.DataSource.getAdvancedCriteriaDescription(this.hilite.criteria,this.dataSource);var _5=(_4.indexOf(isc.FilterBuilder.missingFieldPrompt)>=0);this.membersMargin=2;this.addAutoChild("advancedClauseLayout",{height:this.advancedRuleHeight});this.addAutoChild("removeButton",{autoParent:"advancedClauseLayout",baseStyle:this.iconBaseStyle,width:this.iconSize,height:this.iconSize});this.addAutoChild("advancedClauseLabel",{contents:_4,prompt:_4,disabled:_5?true:false});this.addAutoChild("advancedClauseEditButton",{disabled:_5?true:false,baseStyle:this.iconBaseStyle,width:this.iconSize,height:this.iconSize,iconSize:this.iconSize})}else{var _6=this.dataSource.getField(this.fieldName);if(_6==null)_6=this.dataSource.getFieldForDataPath(this.fieldName);var _5=(_6==null);this.addAutoChild("clause",{dataSource:this.dataSource,fieldDataSource:this.fieldDataSource,field:this.dataSource.getField(this.fieldName),fieldName:this.fieldName,criterion:this.hilite?this.hilite.criteria:null,showRemoveButton:this.showRemoveButton,missingField:_5,remove:function(){this.creator.remove()},iconBaseStyle:this.removeIconBaseStyle,iconSize:this.removeIconSize});this.addMember(this.clause);var _7={disabled:_5?true:false,items:[{name:"textColor",title:this.foregroundColorTitle,type:"ColorItem",width:"*"},{name:"backgroundColor",title:this.backgroundColorTitle,type:"ColorItem",width:"*"}]};if(!this.hiliteIcons){var _8=this.hiliteFormDefaults;if(_8.titleOrientation=="top"){_7.numCols=_8.numCols?_8.numCols-1:_8.numCols;_7.colWidths=_8.colWidths.getRange(0,_7.numCols-1)}else{_7.numCols=_8.numCols?_8.numCols-2:_8.numCols;_7.colWidths=_8.colWidths.getRange(0,_7.numCols-2)}}
this.addAutoChild("hiliteForm",_7);if(this.hilite){this.hiliteForm.setValues({textColor:this.hilite.textColor,backgroundColor:this.hilite.backgroundColor})}
var _9=this.clause.field;if(_9&&_9.type=="boolean"){var _10=this.hiliteForm.getItem("textColor");_10.disable()}
var _11=isc.addProperties({},this.iconFieldDefaults,this.iconFieldProperties,{name:"icon",title:this.iconFieldTitle});if(this.hiliteIcons){this.hiliteIcons.map(function(_12){_11.disabled=false;_11.valueMap[_12]="";_11.valueIcons[_12]=_12})}
var _12=this.hilite?this.hilite.icon:null;if(_12&&!_11.valueMap[_12]){_11.disabled=false;_11.valueMap[_12]="";_11.valueIcons[_12]=_12}
if(this.hiliteIcons){this.hiliteForm.addItem(_11);this.hiliteForm.setValue("icon",this.hilite?this.hilite.icon:"")}
this.addMember(this.hiliteForm);this.iconField=this.hiliteForm.getField("icon")}},isc.A.checkHiliteProperties=function isc_HiliteRule_checkHiliteProperties(_1){if(!_1)return;if(_1.cssText){var _2=_1.cssText.split(";");for(var i=0;i<_2.length;i++){var _4=_2[i],_5=_4.split(":");if(_5[0]=="textColor"&&!_1.textColor)
_1.textColor=_5[1];else if(_5[0]=="backgroundColor"&&!_1.backgroundColor)
_1.backgroundColor=_5[1]}}else if(_1.textColor||_1.backgroundColor){_1.cssText="";if(_1.textColor)
_1.cssText+="color:"+_1.textColor+";";if(_1.backgroundColor)
_1.cssText+="background-color:"+_1.backgroundColor+";"}},isc.A.remove=function isc_HiliteRule_remove(){this.markForDestroy()},isc.A.getHilite=function isc_HiliteRule_getHilite(){if(this.isAdvanced){return this.hilite}
if(this.missingField)return this.hilite;var _1=this.hilite=isc.addProperties(this.hilite||{},{fieldName:this.fieldName}),_2=this.hiliteForm.getValue("icon"),_3=this.hiliteForm.getValue("textColor"),_4=this.hiliteForm.getValue("backgroundColor"),_5=this.clause.getCriterion();if(!_5&&!_2&&!_3&&!_4){return null}
if(_5&&!_5._constructor)_5._constructor="AdvancedCriteria";_1.criteria=_5;_1.icon=_2;if(_3!=null||_4!=null)_1.cssText="";if(_3!=null){_1.textColor=_3;_1.cssText+="color:"+_3+";"}
if(_4!=null){_1.backgroundColor=_4;_1.cssText+="background-color:"+_4+";"}
if(this.hilite&&this.hilite.id)_1.id=this.hilite.id;return _1},isc.A.editAdvancedRule=function isc_HiliteRule_editAdvancedRule(){var _1=this.getID()+".editAdvancedRuleReply(hilite)";this.advancedHiliteDialog=isc.Window.create({title:isc.AdvancedHiliteEditor.getInstanceProperty("title"),width:805,height:1,isModal:true,showModalMask:true,showResizer:true,autoSize:true,autoCenter:true,items:[isc.AdvancedHiliteEditor.create({width:"100%",height:"100%",dataSource:this.fieldDataSource?null:this.dataSource,fieldDataSource:this.fieldDataSource,rootDataSource:this.rootDataSource,hilite:this.hilite,hiliteIcons:this.hiliteIcons,hiliteCanReplaceValue:this.hiliteCanReplaceValue,hiliteReplaceValueFieldTitle:this.hiliteReplaceValueFieldTitle,callback:_1})]});this.advancedHiliteDialog.show()},isc.A.editAdvancedRuleReply=function isc_HiliteRule_editAdvancedRuleReply(_1){this.advancedHiliteDialog.hide();this.advancedHiliteDialog.markForDestroy();if(_1){this.hilite=_1;var _2=isc.DataSource.getAdvancedCriteriaDescription(this.hilite.criteria,this.dataSource);this.advancedClauseLabel.setContents(_2);this.advancedClauseLabel.setPrompt(_2)}});isc.B._maxIndex=isc.C+6;isc.defineClass("HiliteEditor","VLayout");isc.A=isc.HiliteEditor.getPrototype();isc.A.membersMargin=5;isc.A.mainLayoutDefaults={_constructor:"HLayout",membersMargin:5,overflow:"visible"};isc.A.fieldLayoutDefaults={_constructor:"VLayout",autoParent:"mainLayout",width:1,overflow:"visible"};isc.A.fieldListDefaults={_constructor:"ListGrid",height:"*",autoFitData:"both",autoFitMaxWidth:300,autoFitMaxRecords:5,selectionType:"none",showRollOver:true,width:1,autoFitFieldWidths:true,autoFitWidthApproach:"both",autoFitExpandField:"title",autoParent:"fieldLayout",showHoverComponents:true,detailField:"prompt",hoverMode:"detailField",canHover:true,recordClick:function(_1,_2){this.creator.addRule(_2)}};isc.A.availableFieldsColumnTitle="Available Fields";isc.A.ruleLayoutDefaults={_constructor:"VLayout",membersMargin:1,padding:1,width:"*",overflow:"auto",autoParent:"mainLayout"};isc.A.hiliteRuleDefaults={_constructor:"HiliteRule",defaultLayoutAlign:"bottom"};isc.A.hiliteButtonsDefaults={layoutAlign:"right",_constructor:"HLayout",membersMargin:8,height:1};isc.A.hiliteButtonsSpacerDefaults={_constructor:"LayoutSpacer",width:"*",autoParent:"hiliteButtons"};isc.A.addAdvancedRuleButtonDefaults={_constructor:"IAutoFitButton",autoParent:"hiliteButtons",align:"center",click:function(){this.creator.addAdvancedRule()}};isc.A.addAdvancedRuleButtonTitle="Add Advanced Rule";isc.A.saveButtonDefaults={_constructor:"IAutoFitButton",autoParent:"hiliteButtons",click:function(){this.creator.saveHilites()}};isc.A.saveButtonTitle="Save";isc.A.cancelButtonDefaults={_constructor:"IAutoFitButton",autoParent:"hiliteButtons",click:function(){this.creator.completeEditing()}};isc.A.cancelButtonTitle="Cancel";isc.A.defaultWidth=900;isc.A.defaultHeight=300;isc.A=isc.HiliteEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.advancedRuleHeight=22;isc.B.push(isc.A.initWidget=function isc_HiliteEditor_initWidget(){this.Super("initWidget",arguments);if(isc.Browser.isDesktop){this.addAutoChildren(["mainLayout","fieldLayout"]);this.addAutoChild("fieldList",{fields:[{name:"name",showIf:"false"},{name:"title",title:this.availableFieldsColumnTitle}]})}else{var _1=this,_2=isc.addProperties({showFilterEditor:true},this.fieldListProperties,this.fieldListDefaults,{recordClick:function(_3,_4){_1.addRule(_4);this.hide()}});this.fieldList=isc.DynamicForm.create({fields:[{name:"fieldList",showTitle:false,type:"SelectItem",pickListProperties:_2}]});this.addMember(this.fieldList);this.addAutoChildren(["mainLayout","fieldLayout"])}
this.addAutoChildren(["ruleLayout","hiliteButtons","hiliteButtonsSpacer"]);this.addAutoChild("addAdvancedRuleButton",{title:this.addAdvancedRuleButtonTitle});this.addAutoChild("saveButton",{title:this.saveButtonTitle});this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});this.setDataSource(this.dataSource);this.setHilites(this.hilites)},isc.A.setHiliteIcons=function isc_HiliteEditor_setHiliteIcons(_1){this.hiliteIcons=_1},isc.A.setDataSource=function isc_HiliteEditor_setDataSource(_1){this.dataSource=_1;if(this.fieldDataSource&&!this.fieldDataSource.$782){this.setupFieldList()}else if(this.dataSource){this.getClientOnlyFieldDS()}else{this.logWarn("No DataSource present, can't edit hilites")}
this.fieldList.markForRedraw()},isc.A.setFieldDataSource=function isc_HiliteEditor_setFieldDataSource(_1){this.fieldDataSource=_1;this.setupFieldList()},isc.A.setupFieldList=function isc_HiliteEditor_setupFieldList(){var _1=this.fieldList;var _2=[{name:"name",showIf:"false"},{name:"title",title:this.availableFieldsColumnTitle},{name:"type",showIf:"false"},{name:"showInSimpleEditor",showIf:"false"},{name:"canFilter",showIf:"false"},{name:"allowAsAdvancedTarget",showIf:"false"}];if(isc.ListGrid.isA(_1)){_1.showFilterEditor=true;_1.setDataSource(this.fieldDataSource);_1.setFields(_2)}else{_1=this.fieldList.getField("fieldList");_1.setOptionDataSource(this.fieldDataSource);_1.pickListFields=_2}
var _3={_constructor:"AdvancedCriteria",operator:"or",criteria:[{fieldName:"showInSimpleEditor",operator:"equals",value:true},{fieldName:"showInSimpleEditor",operator:"isNull"}]};_1.fetchData(_3)},isc.A.getClientOnlyFieldDS=function isc_HiliteEditor_getClientOnlyFieldDS(){var _1=isc.getValues(this.dataSource.getFields());var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i];if(!_4.hidden&&_4.canHilite!=false&&this.dataSource.fields[_4.name]!=null)
{if(_4.summaryTitle!=null){_4=isc.addProperties({},_4,{title:_4.summaryTitle})}
_2.add(_4)}}
this.fieldDataSource=isc.DataSource.create({$782:true,isClientOnlyFieldDS:true,fields:[{name:"name",showIf:"false"},{name:"title",title:this.availableFieldsColumnTitle},{name:"type",showIf:"false"},{name:"showInSimpleEditor",type:"boolean",showIf:"false"},{name:"canFilter",type:"boolean",showIf:"false"},{name:"allowAsAdvancedTarget",type:"boolean",showIf:"false"}],cacheData:_2,clientOnly:true});this.setupFieldList()},isc.A.addRule=function isc_HiliteEditor_addRule(_1){var _2=this.createAutoChild("hiliteRule",{rootDataSource:this.rootDataSource,width:"100%",fieldName:_1.dataPath||_1.name,dataSource:this.dataSource,fieldDataSource:this.fieldDataSource,hiliteIcons:this.hiliteIcons});this.showNewHilite(_2)},isc.A.removeRule=function isc_HiliteEditor_removeRule(_1){if(isc.isA.Number(_1))_1=this.ruleLayout.getMember(_1);if(!isc.isA.HiliteRule(_1))return;this.ruleLayout.members.remove(_1);_1.destroy()},isc.A.showNewHilite=function isc_HiliteEditor_showNewHilite(_1){this.ruleLayout.addMember(_1)},isc.A.addAdvancedRule=function isc_HiliteEditor_addAdvancedRule(){var _1=this.getID()+".addAdvancedRuleReply(hilite)";this.advancedHiliteDialog=isc.Window.create({title:isc.AdvancedHiliteEditor.getInstanceProperty("title"),width:805,isModal:true,showModalMask:true,showResizer:true,canDragResize:true,autoSize:true,autoCenter:true,items:[isc.AdvancedHiliteEditor.create({width:"100%",height:"100%",rootDataSource:this.rootDataSource,dataSource:this.fieldDataSource&&!this.fieldDataSource.$782?null:this.dataSource,fieldDataSource:this.fieldDataSource,hiliteIcons:this.hiliteIcons,hiliteCanReplaceValue:this.hiliteCanReplaceValue,hiliteReplaceValueFieldTitle:this.hiliteReplaceValueFieldTitle,callback:_1})]});this.advancedHiliteDialog.show()},isc.A.addAdvancedRuleReply=function isc_HiliteEditor_addAdvancedRuleReply(_1){this.advancedHiliteDialog.hide();this.advancedHiliteDialog.markForDestroy();if(!_1)return;var _2=this.createAutoChild("hiliteRule",{rootDataSource:this.rootDataSource,width:"100%",advancedRuleHeight:this.advancedRuleHeight,isAdvanced:true,dataSource:this.dataSource,fieldDataSource:this.fieldDataSource,fieldName:_1.fieldName,hilite:_1,hiliteIcons:this.hiliteIcons,hiliteCanReplaceValue:this.hiliteCanReplaceValue,hiliteReplaceValueFieldTitle:this.hiliteReplaceValueFieldTitle});this.showNewHilite(_2)},isc.A.clearHilites=function isc_HiliteEditor_clearHilites(){for(var i=this.ruleLayout.members.length-1;i>=0;i--)
this.removeRule(this.ruleLayout.getMember(i))},isc.A.setHilites=function isc_HiliteEditor_setHilites(_1){_1=this.hilites=_1||[];this.$119b=this.hilites.duplicate();for(var i=0;i<_1.length;i++){var _3=_1[i],_4=_3.cssText?_3.cssText.replaceAll(" ",""):null,_5=_4?_4.split(";"):[""],_6=_3.textColor,_7=_3.backgroundColor;if(_4){for(var j=0;j<_5.length;j++){var _9=_5[j],_10=_9&&_9.length>0?_9.split(":"):[];if(_10&&_10[0]=="background-color"&&!_7){_3.backgroundColor=_10[1]}
if(_10&&_10[0]=="color"&&!_6){_3.textColor=_10[1]}}}
var _11=false;if(this.dataSource){var _12=isc.DataSource.getAdvancedCriteriaDescription(_3.criteria,this.dataSource);_11=_12.contains(isc.FilterBuilder.missingFieldPrompt)}
var _13=(_3.canEdit!=false||this.creator.editingOn);var _14=this.createAutoChild("hiliteRule",{rootDataSource:this.rootDataSource,fieldName:_3.fieldName,hilite:_3,dataSource:this.dataSource,fieldDataSource:this.fieldDataSource,missingField:_11,hiliteIcons:this.hiliteIcons,showRemoveButton:_13,advancedRuleHeight:this.advancedRuleHeight});if(!_13)_14.disable();this.showNewHilite(_14)}},isc.A.saveHilites=function isc_HiliteEditor_saveHilites(_1){var _2=this.getHilites();if((!_2||_2.length==0)&&(!this.$119b||this.$119b.length==0))return;this.completeEditing(_2)},isc.A.getHilites=function isc_HiliteEditor_getHilites(){var _1=this.ruleLayout.members,_2=[];for(var i=0;i<_1.length;i++){var _4=_1[i],_5=_4.getHilite();if(_5==null)continue;_2.add(_5)}
return _2},isc.A.getHiliteState=function isc_HiliteEditor_getHiliteState(){var _1=this.getHilites();if(_1==null||_1.length==0)return null;return"("+isc.JSON.encode(_1,{dateFormat:"logicalDateConstructor"})+")"},isc.A.completeEditing=function isc_HiliteEditor_completeEditing(_1){if(this.logIsInfoEnabled())this.logInfo("returning hilites: "+isc.echoFull(_1));if(this.callback)this.fireCallback(this.callback,"hilites",[_1])});isc.B._maxIndex=isc.C+17;isc.defineClass("AdvancedHiliteEditor","VStack");isc.A=isc.AdvancedHiliteEditor.getPrototype();isc.A.padding=10;isc.A.membersMargin=10;isc.A.filterBuilderDefaults={_constructor:"FilterBuilder",isGroup:true,padding:8,maxHeight:200,overflow:"visible"};isc.A.filterGroupTitle="Filter";isc.A.hiliteFormDefaults={_constructor:"DynamicForm",isGroup:true,extraSpace:4,padding:8,width:"100%",numCols:8,colWidths:[200,150,100,150,100,150,40,50]};isc.A.appearanceGroupTitle="Appearance";isc.A.targetFieldsItemTitle="Target Field(s)";isc.A.hiliteButtonsDefaults={_constructor:isc.HLayout,membersMargin:8,height:1};isc.A.hiliteButtonsSpacerDefaults={_constructor:"LayoutSpacer",width:"*",autoParent:"hiliteButtons"};isc.A.saveButtonDefaults={_constructor:"IAutoFitButton",autoParent:"hiliteButtons",click:function(){this.creator.saveHilite()}};isc.A.saveButtonTitle="Save";isc.A.cancelButtonDefaults={_constructor:"IAutoFitButton",autoParent:"hiliteButtons",click:function(){this.creator.cancelEditing()}};isc.A.cancelButtonTitle="Cancel";isc.A.defaultWidth=900;isc.A.defaultHeight=600;isc.A.visibilityMode="multiple";isc.A.invalidHilitePrompt="Enter at least one rule, a color or icon, and a target field, or press 'Cancel' to abandon changes.";isc.A.title="Advanced Highlight Editor";isc.A.iconFieldDefaults=isc.HiliteRule.getInstanceProperty("iconFieldDefaults");isc.defer("isc.AdvancedHiliteEditor.addProperties({foregroundColorTitle: isc.HiliteRule.getInstanceProperty('foregroundColorTitle'),backgroundColorTitle: isc.HiliteRule.getInstanceProperty('backgroundColorTitle'),iconFieldTitle: isc.HiliteRule.getInstanceProperty('iconFieldTitle')})");isc.A=isc.AdvancedHiliteEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_AdvancedHiliteEditor_initWidget(){this.Super("initWidget",arguments);var _1=this.getDataSource(),_2=this;this.addAutoChild("filterBuilder",{groupTitle:this.filterGroupTitle,dataSource:_1,fieldDataSource:this.fieldDataSource,inheritedClauseProperties:{rootDataSource:this.rootDataSource,getDefaultOptionDataSource:function(_12){if(this.rootDataSource){return this.rootDataSource}
var _1=this.Super("getDefaultOptionDataSource",arguments);if(_1&&_1.isHiliteCriteriaDS)return null;return _1}},fieldNameChanged:function(_14){this.Super("fieldNameChanged",arguments);_2.fieldChosen(_14.getFieldName(true))}});var _3=isc.addProperties({},this.iconFieldDefaults,this.iconFieldProperties,{name:"icon",width:"*",title:this.iconFieldTitle});if(this.hiliteIcons){this.hiliteIcons.map(function(_4){_3.disabled=false;_3.valueMap[_4]="";_3.valueIcons[_4]=_4})}
var _4=this.hilite?this.hilite.icon:null;if(_4&&!_3.valueMap[_4]){_3.disabled=false;_3.valueMap[_4]="";_3.valueIcons[_4]=_4}
var _5=[{title:this.targetFieldsItemTitle,name:"fieldName",multiple:true,allowMultiSelect:true,type:"select",width:"*"},{title:this.foregroundColorTitle,name:"textColor",type:"color",width:"*"},{title:this.backgroundColorTitle,name:"backgroundColor",type:"color",width:"*"}];if(this.hiliteIcons)_5.add(_3);var _6={groupTitle:this.appearanceGroupTitle};if(this.hiliteCanReplaceValue){_6.numCols=10;_6.colWidths=[200,150,100,150,150,150,100,150,40,50];if(this.hiliteReplaceValueFieldTitle==null){this.hiliteReplaceValueFieldTitle=isc.ListGrid.getInstanceProperty("hiliteReplaceValueFieldTitle")}
_5.addAt({title:this.hiliteReplaceValueFieldTitle,name:"replacementValue",type:"text"},2)}
var _7=this.addAutoChild("hiliteForm",_6);this.iconField=_7.getField("icon");if(this.fieldDataSource){_5[0]=isc.addProperties({},_5[0],{valueField:"name",displayField:"title",optionDataSource:this.fieldDataSource,optionCriteria:{_constructor:"AdvancedCriteria",operator:"or",criteria:[{fieldName:"allowAsAdvancedTarget",operator:"equals",value:true}]}});delete _5[0].defaultDynamicValue;this.hiliteForm.addItems(_5)}else{var _8=this.fieldNames||_1.getFieldNames(),_9=this.fieldMap={};for(var i=0;i<_8.length;i++){var _11=_8[i],_12=_1.getField(_11),_13=_12.title;if(_12.hidden)continue;_13=_13?_13:_11;_9[_11]=_13}
this.fieldMap=_9;_5[0].valueMap=_9;this.hiliteForm.addItems(_5)}
this.addAutoChildren(["hiliteButtons","hiliteButtonsSpacer"]);this.addAutoChild("saveButton",{title:this.saveButtonTitle});this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});this.addMembers([this.filterBuilder,this.hiliteForm,this.hiliteButtons]);if(this.hilite!=null){this.filterBuilder.setCriteria(this.hilite.criteria);this.hiliteForm.editRecord(this.hilite)}},isc.A.fieldChosen=function isc_AdvancedHiliteEditor_fieldChosen(_1){if(_1&&this.hiliteForm.getValue("fieldName")==null){this.hiliteForm.setValue("fieldName",_1)}},isc.A.saveHilite=function isc_AdvancedHiliteEditor_saveHilite(){this.hiliteForm.setValue("criteria",this.filterBuilder.getCriteria());var _1=this.hiliteForm.getValues();if(_1.criteria.criteria==null||_1.criteria.criteria.length==0||(!_1.textColor&&!_1.backgroundColor&&!_1.icon&&!_1.replacementValue)||_1.fieldName==null)
{isc.say(this.invalidHilitePrompt);return}
var _2="";if(_1.textColor&&_1.textColor!=""){_2+="color:"+_1.textColor+";"}
if(_1.backgroundColor&&_1.backgroundColor!=""){_2+="background-color:"+_1.backgroundColor+";"}
_1.cssText=_2;if(this.hilite&&this.hilite.id)_1.id=this.hilite.id;this.completeEditing(_1)},isc.A.cancelEditing=function isc_AdvancedHiliteEditor_cancelEditing(){this.completeEditing(null)},isc.A.completeEditing=function isc_AdvancedHiliteEditor_completeEditing(_1){if(this.callback)this.fireCallback(this.callback,["hilite"],[_1])});isc.B._maxIndex=isc.C+5;isc.defineClass("MultiGroupPanel","Layout");isc.A=isc.MultiGroupPanel.getPrototype();isc.A.vertical=true;isc.A.overflow="visible";isc.A.addLevelButtonTitle="Add Level";isc.A.deleteLevelButtonTitle="Delete Level";isc.A.copyLevelButtonTitle="Copy Level";isc.A.invalidListPrompt="Columns may only be used once: '${title}' is used multiple times.";isc.A.propertyFieldTitle="Column";isc.A.groupingFieldTitle="Grouping";isc.A.firstGroupLevelTitle="Group by";isc.A.otherGroupLevelTitle="Then by";isc.A.topLayoutDefaults={_constructor:"HLayout",overflow:"visible",height:1,align:"left",defaultLayoutAlign:"center",membersMargin:5,extraSpace:5};isc.A.addLevelButtonDefaults={_constructor:"IButton",icon:"[SKINIMG]actions/add.png",autoFit:true,autoParent:"topLayout",click:"this.creator.addLevel()"};isc.A.deleteLevelButtonDefaults={_constructor:"IButton",icon:"[SKINIMG]actions/remove.png",autoFit:true,autoParent:"topLayout",click:"this.creator.deleteSelectedLevel()"};isc.A.copyLevelButtonDefaults={_constructor:"IButton",icon:"[SKINIMG]RichTextEditor/copy.png",autoFit:true,autoParent:"topLayout",click:"this.creator.copySelectedLevel()"};isc.A.levelUpButtonTitle="Move Level Up";isc.A.levelUpButtonDefaults={_constructor:"ImgButton",src:"[SKINIMG]TransferIcons/up.png",height:22,width:24,imageType:"center",showRollOver:false,showDown:false,showFocused:false,autoParent:"topLayout",click:"this.creator.moveSelectedLevelUp();"};isc.A.iconBaseStyle="icon";isc.A.levelDownButtonTitle="Move Level Down";isc.A.levelDownButtonDefaults={_constructor:"ImgButton",src:"[SKINIMG]TransferIcons/down.png",height:22,width:24,imageType:"center",showRollOver:false,showDown:false,showFocused:false,autoParent:"topLayout",click:"this.creator.moveSelectedLevelDown()"};isc.A.optionsGridDefaults={_constructor:"ListGrid",width:"100%",height:"*",canSort:false,canReorderFields:false,canResizeFields:false,canEdit:true,canEditNew:true,selectionType:"single",selectionProperty:"$73s",canEditCell:function(_1,_2){var _3=this.getRecord(_1);if(_2==2){if(!this.creator.verifyGroupingModeAvailableField(_3,_1))return false}
return this.Super("canEditCell",arguments)},recordDoubleClick:function(_1,_2,_3,_4,_5,_6,_7){this.creator.getGroupingModeAvailableField(_2,_3)},sorterContextClick:function(){return false},defaultFields:[{name:"groupSequence",title:"&nbsp;",showTitle:false,canEdit:false,width:80,canHide:false,showDefaultContextMenu:false,formatCellValue:function(_1,_2,_3,_4,_5){return _3==0?_5.creator.firstGroupLevelTitle:_5.creator.otherGroupLevelTitle}},{name:"property",title:" ",type:"select",defaultToFirstOption:true,showDefaultContextMenu:false,changed:"item.grid.creator.getGroupingModeAvailableField(null, null)"},{name:"grouping",title:" ",width:100,showDefaultContextMenu:false,defaultToFirstOption:true,type:"text",editorType:"select",displayField:"groupingTitle",changed:function(_1,_2,_3){var _4=_2.valueMap||_2.editorValueMap;_1.setValue("groupingTitle",_4[_3])}},{name:"groupingTitle",showIf:"false",showDefaultContextMenu:false}],recordClick:function(_1,_2,_3){this.creator.setButtonStates()},bodyKeyPress:function(_1){if(_1.keyName=="Delete"&&this.anySelected())this.removeSelectedData();else this.Super("bodyKeyPress",arguments)},extraSpace:5};isc.A.propertyFieldNum=1;isc.A.directionFieldNum=2;isc.A.topAutoChildren=["topLayout","addLevelButton","deleteLevelButton","copyLevelButton"];isc.A=isc.MultiGroupPanel.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getNumLevels=function isc_MultiGroupPanel_getNumLevels(){return this.optionsGrid.data.length},isc.A.getGroup=function isc_MultiGroupPanel_getGroup(){var _1=this.optionsGrid,_2=isc.shallowClone(_1.data),_3=_1.getEditRow(),_4=isc.isA.Number(_3)?_1.getEditValues(_3):null;if(_4)_2[_3]=isc.addProperties(_2[_3],_4);return this.getGroupSpecifiers(_2)},isc.A.validate=function isc_MultiGroupPanel_validate(){var _1=this.optionsGrid,_2=_1.data,_3=[];for(var i=0;i<_2.length;i++){var _5=_2.get(i);if(_3.contains(_5.property)){var _6=this,_7=this.optionsGrid.getField("property").valueMap[_5.property],_8=this.invalidListPrompt.evalDynamicString(this,{title:_7});isc.warn(_8,function(){_6.recordFailedValidation(_5,i)});return false}
_3.add(_5.property)}
return true},isc.A.recordFailedValidation=function isc_MultiGroupPanel_recordFailedValidation(_1){var _2=this.optionsGrid,_3=(isc.isA.Number(_1)?_1:_2.getRecordIndex(_1)),_1=(!isc.isA.Number(_1)?_1:_2.data.get(_1));_2.selectSingleRecord(_1);_2.startEditing(_3,1)},isc.A.getGroupSpecifiers=function isc_MultiGroupPanel_getGroupSpecifiers(_1){return this.optionsGrid.removeSelectionMarkers(_1)},isc.A.setInitialGrouping=function isc_MultiGroupPanel_setInitialGrouping(_1){for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3.grouping||_3.groupingMode){var _4=this.fields.find("name",_3.property),_5=this.$117p(_4)||{};_3.groupingTitle=_5[_3.grouping||_3.groupingMode]}}
this.optionsGrid.setData(_1)},isc.A.initWidget=function isc_MultiGroupPanel_initWidget(){this.Super("initWidget",arguments);this.$74x=this.maxLevels;this.addAutoChildren(this.topAutoChildren);var _1=isc.addProperties({prompt:this.levelUpButtonTitle},this.levelUpButtonDefaults,this.levelUpButtonProperties),_2=isc.addProperties({prompt:this.levelDownButtonTitle},this.levelDownButtonDefaults,this.levelDownButtonProperties);_1.imageWidth=this.iconSize||_1.imageWidth||_1.width;_1.imageHeight=this.iconSize||_1.imageHeight||_1.height
_2.imageWidth=this.iconSize||_2.imageWidth||_2.width,_2.imageHeight=this.iconSize||_2.imageHeight||_2.height
if(this.iconBaseStyle)_1.baseStyle=_2.baseStyle=this.iconBaseStyle;this.addAutoChild("levelUpButton",_1);this.addAutoChild("levelDownButton",_2);this.addAutoChild("optionsGrid");this.setGroupFields();this.setGroupingMode();this.setButtonTitles();this.addMember(this.topLayout);this.addMember(this.optionsGrid);this.setButtonStates();if(this.initialGrouping)this.setInitialGrouping(this.initialGrouping);else this.addLevel()},isc.A.setButtonTitles=function isc_MultiGroupPanel_setButtonTitles(_1){if(this.addLevelButton)this.addLevelButton.setTitle(this.addLevelButtonTitle);if(this.deleteLevelButton)this.deleteLevelButton.setTitle(this.deleteLevelButtonTitle);if(this.copyLevelButton)this.copyLevelButton.setTitle(this.copyLevelButtonTitle)},isc.A.setButtonStates=function isc_MultiGroupPanel_setButtonStates(){var _1=this.getNumLevels(),_2=this.maxLevels,_3=this.optionsGrid,_4=_3.anySelected(),_5=_3.getRecordIndex(_3.getSelectedRecord());if(this.addLevelButton)this.addLevelButton.setDisabled(_1>=_2);if(this.deleteLevelButton)this.deleteLevelButton.setDisabled(!_4);if(this.copyLevelButton)this.copyLevelButton.setDisabled(!_4||_1>=_2);if(this.levelUpButton)this.levelUpButton.setDisabled(!_4||_5==0);if(this.levelDownButton)this.levelDownButton.setDisabled(!_4||_5==_1-1)},isc.A.setFields=function isc_MultiGroupPanel_setFields(_1){if(isc.DataSource&&isc.isA.DataSource(_1))_1=isc.getValues(_1.getFields());this.fields=_1;this.setGroupFields();this.optionsGrid.refreshFields();this.setButtonStates()},isc.A.setGroupFields=function isc_MultiGroupPanel_setGroupFields(){var _1=[];this.optionsGrid.getField("property").title=this.propertyFieldTitle;if(!this.fields)return;for(var i=0;i<this.fields.length;i++){var _3=this.fields[i];if(this.optionsGrid.$58g(_3))_1.add(_3)}
this.fields=_1;var _4=this.fields?this.fields.getValueMap("name","title"):{none:"No fields"},_5=isc.getKeys(_4).length;for(var _6 in _4){if(isc.DataSource&&(!_4[_6]||isc.isAn.emptyString(_4[_6])))
_4[_6]=isc.DataSource.getAutoTitle(_6)}
this.optionsGrid.setValueMap("property",_4);if(!this.$74x||this.maxLevels>_5)this.maxLevels=_5},isc.A.setGroupingMode=function isc_MultiGroupPanel_setGroupingMode(){var _1=this.optionsGrid.getField("grouping");_1.title=this.groupingFieldTitle;_1.valueMap=this.getGroupingModeFirstItem()},isc.A.getGroupingModeFirstItem=function isc_MultiGroupPanel_getGroupingModeFirstItem(){var _1=this.optionsGrid.getField("grouping");var _2=this.fields?this.fields[0]:null;_1.editorValueMap=this.$117p(_2)},isc.A.$117p=function isc_MultiGroupPanel__getFieldGroupingModes(_1){if(!_1)return null;if(!this.$117q)this.$117q={};var _2=this.$117q[_1.name];if(!_2){_2=_1.groupingModes?_1.groupingModes:(!_1.getGroupValue?(_1.$62?(_1.$62.getGroupingModes?_1.$62.getGroupingModes():_1.$62.groupingModes):null):null);this.$117q[_1.name]=_2}
return _2},isc.A.getGroupingModeAvailableField=function isc_MultiGroupPanel_getGroupingModeAvailableField(_1,_2){if(!this.fields)return;var _3=this.optionsGrid,_4=_3.getEditRow(),_5=isc.isA.Number(_4)?_3.getEditValues(_4):null;var _6=(_2==null)?_4:_2;var _7=(_1==null)?_5.property:_1.property;for(var i=0;i<this.fields.length;i++){var _9=this.fields[i];if(_7==_9.name){var _10=this.$117p(_9);if(_10!=null){_3.setValueMap("grouping",_10);if(_2==null){if(_9.groupingMode!=null){_3.setEditValue(_6,2,_9.groupingMode)}else if(_9.defaultGroupingMode!=null){_3.setEditValue(_6,2,_9.defaultGroupingMode)}else{_3.setEditValue(_6,2,_10[0])}
_3.refreshCell(_6,2)}}else{_3.setEditorValueMap("grouping",null);_3.setEditValue(_6,2,null);_3.refreshCell(_6,2)}
break}}},isc.A.verifyGroupingModeAvailableField=function isc_MultiGroupPanel_verifyGroupingModeAvailableField(_1,_2){var _3=this.optionsGrid,_4=isc.isA.Number(_2)?_3.getEditValues(_2):null;var _5=(typeof _4.property==='undefined')?_1.property:_4.property;for(var i=0;i<this.fields.length;i++){var _7=this.fields[i];if(_5==_7.name){var _8=this.$117p(_7);if(_8!=null){var _9=isc.getKeys(_8).length;if(_9==1){return false}else{return true}}else{return false}}}
return true},isc.A.addLevel=function isc_MultiGroupPanel_addLevel(){var _1=this.optionsGrid,_2=_1.getRecordIndex(_1.getSelectedRecord()),_3=_1.getField("property"),_4=_2>=0?_2+1:_1.data.length,_5={property:isc.firstKey(_3.valueMap)};_1.data.addAt(_5,_4);this.editRecord(_4);this.setButtonStates();this.fireChangeEvent();this.getGroupingModeAvailableField(_5,null)},isc.A.deleteSelectedLevel=function isc_MultiGroupPanel_deleteSelectedLevel(){var _1=this.optionsGrid,_2=_1.getRecordIndex(_1.getSelectedRecord());if(_2>=0){_1.data.removeAt(_2);this.setButtonStates();this.fireChangeEvent()}},isc.A.copySelectedLevel=function isc_MultiGroupPanel_copySelectedLevel(){var _1=this.optionsGrid,_2=_1.getEditRow(),_3=_1.getRecordIndex(_1.getSelectedRecord()),_4=isc.shallowClone(_1.getEditedRecord(_3));if(_3>=0){_1.data.addAt(_4,_3+1);this.editRecord(_3+1);this.setButtonStates();this.fireChangeEvent();this.getGroupingModeAvailableField(_4,null);_1.setEditValue(_3+1,2,_4.groupingMode);_1.refreshCell(_3+1,2)}},isc.A.editRecord=function isc_MultiGroupPanel_editRecord(_1){this.optionsGrid.selectSingleRecord(_1);this.optionsGrid.startEditing(_1,this.propertyFieldNum)},isc.A.moveSelectedLevelUp=function isc_MultiGroupPanel_moveSelectedLevelUp(){var _1=this.optionsGrid,_2=_1.getRecordIndex(_1.getSelectedRecord());if(_2>0){_1.data.slide(_2,_2-1);this.optionsGrid.selectSingleRecord(_2-1);this.setButtonStates();this.fireChangeEvent()}},isc.A.moveSelectedLevelDown=function isc_MultiGroupPanel_moveSelectedLevelDown(){var _1=this.optionsGrid,_2=_1.getRecordIndex(_1.getSelectedRecord());if(_2>=0&&_2<_1.data.length-1){_1.data.slide(_2,_2+1);this.optionsGrid.selectSingleRecord(_2+1);this.setButtonStates();this.fireChangeEvent()}},isc.A.fireChangeEvent=function isc_MultiGroupPanel_fireChangeEvent(){this.groupChanged(isc.shallowClone(this.getGroup()))},isc.A.groupChanged=function isc_MultiGroupPanel_groupChanged(_1){});isc.B._maxIndex=isc.C+24;isc.defineClass("MultiGroupDialog","Window");isc.A=isc.MultiGroupDialog;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.askForGrouping=function isc_c_MultiGroupDialog_askForGrouping(_1,_2,_3,_4){var _5=isc.isAn.Array(_1)?_1:isc.DataSource&&isc.isA.DataSource(_1)?isc.getValues(_1.getFields()):isc.isA.DataBoundComponent(_1)?_1.getAllFields():null;if(!_5)return;var _6=[];if((typeof _2==='undefined')||(_2==null)){_6=_2}else{for(var i=0;i<_2.length;i++){var _8=_2[i];for(var _9=0;_9<_5.length;_9++){var _10=_5[_9];if(_8==_10.name){var _11={property:_10.name,grouping:_10.groupingMode};_6.add(_11)}}}}
var _12=isc.addProperties({autoDraw:true,fields:_5,initialGrouping:_6,callback:_3},_4);isc.MultiGroupDialog.create(_12)});isc.B._maxIndex=isc.C+1;isc.A=isc.MultiGroupDialog.getPrototype();isc.A.isModal=true;isc.A.width=600;isc.A.height=300;isc.A.canDragResize=true;isc.A.vertical=true;isc.A.autoCenter=true;isc.A.showMinimizeButton=false;isc.A.mainLayoutDefaults={_constructor:"VLayout",width:"100%",height:"100%",layoutMargin:5};isc.A.multiGroupPanelDefaults={_constructor:"MultiGroupPanel",width:"100%",height:"*",autoParent:"mainLayout"};isc.A.title="Group";isc.A.applyButtonTitle="Apply";isc.A.cancelButtonTitle="Cancel";isc.A.bottomLayoutDefaults={_constructor:"HLayout",width:"100%",height:1,align:"right",membersMargin:5,autoParent:"mainLayout"};isc.A.applyButtonDefaults={_constructor:"IButton",autoFit:true,autoParent:"bottomLayout",click:"this.creator.apply()"};isc.A.cancelButtonDefaults={_constructor:"IButton",autoFit:true,autoParent:"bottomLayout",click:"this.creator.cancel()"};isc.A.bottomAutoChildren=["bottomLayout","applyButton","cancelButton"];isc.A=isc.MultiGroupDialog.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$783=["fields","initialGrouping","maxLevels","invalidListPrompt","addLevelButtonTitle","addLevelButtonDefaults","addLevelButtonProperties","deleteLevelButtonTitle","deleteLevelButtonDefaults","deleteLevelButtonProperties","levelUpButtonTitle","levelDownButtonTitle","copyLevelButtonTitle","copyLevelButtonDefaults","copyLevelButtonProperties","optionsGridDefaults","optionsGridProperties","firstGroupLevelTitle","propertyFieldTitle","groupingFieldTitle","otherGroupLevelTitle"];isc.A.$105k=["addLevelButtonTitle","deleteLevelButtonTitle","levelUpButtonTitle","levelDownButtonTitle","copyLevelButtonTitle","firstGroupLevelTitle","propertyFieldTitle","groupingFieldTitle","otherGroupLevelTitle","invalidListPrompt"];isc.A.$105l=["applyButtonTitle","cancelButtonTitle","title"];isc.B.push(isc.A.initWidget=function isc_MultiGroupDialog_initWidget(){this.Super("initWidget",arguments);this.copyUnsetProperties();this.addAutoChild("mainLayout");this.addAutoChild("multiGroupPanel",this.getPassthroughProperties());this.addAutoChildren(this.bottomAutoChildren);this.addItem(this.mainLayout);this.optionsGrid=this.multiGroupPanel.optionsGrid;this.setButtonStates()},isc.A.getPassthroughProperties=function isc_MultiGroupDialog_getPassthroughProperties(){var _1=this.$783,_2={};for(var i=0;i<_1.length;i++){var _4=_1[i];if(this[_4]!=null)_2[_4]=this[_4]}
return _2},isc.A.copyUnsetProperties=function isc_MultiGroupDialog_copyUnsetProperties(){var _1=this.$105k,_2={};for(var i=0;i<_1.length;i++){var _4=_1[i];if(isc.MultiGroupPanel.getInstanceProperty(_4)==null){_2[_4]=isc.MultiSortPanel.getInstanceProperty(_4)}}
isc.MultiGroupPanel.addProperties(_2);_1=this.$105l;_2={};for(var i=0;i<_1.length;i++){var _4=_1[i];if(isc.MultiGroupDialog.getInstanceProperty(_4)==null){_2[_4]=isc.MultiSortDialog.getInstanceProperty(_4)}}
isc.MultiGroupDialog.addProperties(_2)},isc.A.setButtonStates=function isc_MultiGroupDialog_setButtonStates(){this.multiGroupPanel.setButtonStates();this.applyButton.setTitle(this.applyButtonTitle);this.cancelButton.setTitle(this.cancelButtonTitle)},isc.A.getNumLevels=function isc_MultiGroupDialog_getNumLevels(){return this.multiGroupPanel.getNumLevels()},isc.A.getGroup=function isc_MultiGroupDialog_getGroup(){return this.multiGroupPanel.getGroup()},isc.A.validate=function isc_MultiGroupDialog_validate(){return this.multiGroupPanel.validate()},isc.A.closeClick=function isc_MultiGroupDialog_closeClick(){this.cancel();return false},isc.A.cancel=function isc_MultiGroupDialog_cancel(){this.hide();this.markForDestroy()},isc.A.apply=function isc_MultiGroupDialog_apply(){if(this.optionsGrid.getEditRow()!=null)this.optionsGrid.endEditing();if(!this.validate())return;if(this.callback){var _1=isc.shallowClone(this.getGroup());this.fireCallback(this.callback,"grouping",[_1])}
this.hide();this.markForDestroy()});isc.B._maxIndex=isc.C+10;isc.A=isc.ListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.iconPadding=3;isc.A.$64o="</tr></tbody></table>";isc.A.$39=";";isc.A.writeTreeCellTable=true;isc.A.$12c="checkbox";isc.A.showNodeIcons=true;isc.A.$34r="absmiddle";isc.A.canDropSiblingAfterLastNode=true;isc.B.push(isc.A.getTreeCellHoverHTML=function isc_ListGrid_getTreeCellHoverHTML(_1,_2,_3){var _4=this.getCellCSSText(_1,_2,_3);var _5=this.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_3);this.$240z=true;var _6=this.$342(_5,_1,_2,_3,false,this.baseStyle,_4).join(isc.emptyString);delete this.$240z;return["<table><tr>",_6,"</tr></table>"].join(isc.emptyString)},isc.A.getInnerCellHeight=function isc_ListGrid_getInnerCellHeight(){return this.cellHeight-isc.Element.$yo(this.baseStyle)},isc.A.getTreeCellValue=function isc_ListGrid_getTreeCellValue(_1,_2,_3,_4,_5){if(_2==null||Array.isLoading(_2)){return _1}
var _6=this.$35k||this.data;var _7=this.getIconPadding(_2);if(this.writeTreeCellTable){var _8=_6.getLevel(_2,_3),_9=isc.TreeGrid.$82d(),_10=this.getCellCSSText(_2,_3,_4),_11=this.$240z?this.baseStyle:this.getCellStyle(_2,_3,_4);_9[1]=_11;_9[3]=(this.$127g()?"table-layout:fixed;width:100%;"+(_10!=null?_10:""):_10);if(_9[3]!=null&&!_9[3].endsWith(this.$39))_9[3]+=this.$39;_9[9]=_10;_9[11]=_11;var _12=this.getIndentHTML(_8,_2,_3,true);_9[5]=_12[1];_9[13]=_12[0];var _13=this.$342(_1,_2,_3,_4,this.shouldShowOpenerIcon(),_11,_10,_9,7);if(_13){if(_13[1].endsWith(";")&&_13[2].startsWith(";")){_13[2]=_13[2].substring(1)}}
for(var i=0,j=15;i<_13.length;i++){_9[j]=_13[i];j++}
_9[j]=this.$64o;return _9.join(isc.emptyString)}else{var _8=_6.getLevel(_2);var _9=["<DIV style='display:table-cell;vertical-align:middle;margin:0px;padding:0px;width:",,"px;'>",,"</DIV><DIV style='display:table-cell;vertical-align:middle;margin:0px;padding:0px;width:",,"px;'>",,"</DIV><DIV style='display:table-cell;vertical-align:middle;margin:0px;",(isc.Page.isRTL()?"padding-left:1px;padding-right:":"padding-right:1px;padding-left:"),,"px;' ",,,,">",,,,"</DIV>"];var _12=this.getIndentHTML(_8,_2,_3,true),_16=_12[1];_9[1]=_16;_9[3]=_12[0];var _17=0;var _18=isc.emptyString;if(this.shouldShowOpenerIcon()){var _19=this.getOpenIcon(_3),_20=this.showConnectors?this.getConnectorIconWidth(_2):this.getOpenerIconWidth(_2),_21=this.showConnectors?this.getInnerCellHeight():this.getOpenerIconHeight(_2),_22=(_3!=null?this.$34l+_3:null),_23=this.showConnectors?this.getConnectorPadding(_2):(this.openIconPadding||0);if(_19){_18=this.getIconHTML(_19,_22,_20,_23,_21);_17+=_23}else{_18=this.$348(_20||this.iconSize)}
_17+=_20}
var _24=this.$739(_2,_3),_25=_24||this.getExtraIcon(_2),_26=(_3!=null?this.$349+_3:null),_27=(_24!=null?this.$65a():this.iconSize),_28=this.extraIconGap,_29=isc.emptyString;if(_25){_29=this.getIconHTML(_25,_26,_27,_28);_17+=_27+_28}
var _30=this.getIcon(_2,_3),_31=this.getFolderIconID(_3),_32=isc.emptyString;if(_30!=null){_32=this.getIconHTML(_30,_31,_2.iconSize,_7);_17+=(_2.iconSize||this.iconSize)}
_9[5]=_17;_9[7]=_18+_29+_32;_9[10]=1;if(isc.Canvas.ariaEnabled()||this.$127g()){_9[12]=" id='";_9[13]=this.$170d(_3);_9[14]="'"}else{_9[12]=_9[13]=_9[14]=null}
if(this.$127g()){var _33=this.getTreeFieldInnerWidth(_4)
-(_17+_16);_9[16]="<div style='width:"+_33+"px;overflow:hidden;"+isc.Browser.$114w+":ellipsis' $114y='true'>";_9[17]=_1;_9[18]="</div>"}else{_9[16]=_9[18]=null;_9[17]=_1}
return _9.join(isc.emptyString)}},isc.A.getFolderIconID=function isc_ListGrid_getFolderIconID(_1){return _1!=null?this.getCanvasName()+this.$34n+_1:null},isc.A.shouldShowOpenerIcon=function isc_ListGrid_shouldShowOpenerIcon(){return this.showOpener||this.showConnectors},isc.A.$170d=function isc_ListGrid__getTreeCellValueID(_1){return this.ID+"_valueCell"+_1},isc.A.$253i=function isc_ListGrid__getTreeCellTitle_InnerCellCSSText(_1){if(_1==null)_1=isc.emptyString;else _1+=";";if(!this.wrapCells)_1+="white-space:nowrap;";return _1},isc.A.$253j=function isc_ListGrid__getOverflowEllipsisCSSText(){return"overflow:hidden;"+isc.Browser.$114w+":ellipsis;"},isc.A.$342=function isc_ListGrid__getTreeCellTitleArray(_1,_2,_3,_4,_5,_6,_7,_8,_9){var _10=0;var _11=this.getIconPadding(_2);if(_7==null)_7=this.getCellCSSText(_2,_3,_4);_7=this.$253i(_7);if(_6==null)_6=this.getCellStyle(_2,_3,_4);var _12=isc.TreeGrid.$82e();_12[1]=_7;_12[3]=_6;if(_5){var _13=this.getOpenIcon(_3),_14=this.showConnectors?this.getConnectorIconWidth(_2):this.getOpenerIconWidth(_2),_15=this.showConnectors?this.getInnerCellHeight():this.getOpenerIconHeight(_2),_16=(_3!=null?this.$34l+_3:null),_17=this.showConnectors?this.getConnectorPadding(_2):(this.openIconPadding||0);if(_13){_12[5]=this.getIconHTML(_13,_16,_14,_17,_15);_10+=_14+_17}else{_12[5]=this.$348(_14||this.iconSize);_10+=_14}}else _12[5]=null;var _18=this.$739(_2),_19=_18||this.getExtraIcon(_2),_20=(_3!=null?this.$349+_3:null),_21=(_18!=null?this.$65a():this.iconSize),_22=this.extraIconGap,_23=this.getIcon(_2,_3,_6==this.baseStyle),_24=this.getFolderIconID(_3);if(_19){_12[6]=this.getIconHTML(_19,_20,_21,_22);_10+=_21+_22}else _12[6]=null;_12[7]=this.getIconHTML(_23,_24,_2.iconSize,_11);_10+=_23==null?0:(_2.iconSize||this.iconSize)+_11;if(isc.Canvas.ariaEnabled()){_12[9]=" id='"+this.$170d(_3)+"'"}else{_12[9]=null}
_12[11]=_7;if(this.$127g()){_12[11]+=this.$253j()}
_12[13]=1;_12[15]=_6;if(isc.Browser.isIE&&isc.Browser.version<10&&!this.wrapCells){_12[17]="<NOBR>";_12[19]="</NOBR>"}else if(this.$127g()&&isc.Browser.isMoz&&isc.Browser.version<21){_12[17]="<div style='overflow:hidden;text-overflow:ellipsis' $114y='true'>";_12[19]="</div>"}else{_12[19]=_12[17]=null}
_12[18]=_1;if(_8){_8[_9]=_10}
return _12},isc.A.getIconPadding=function isc_ListGrid_getIconPadding(_1){if(this.iconPaddingProperty!=null&&_1!=null&&_1[this.iconPaddingProperty]!=null)
{return _1[this.iconPaddingProperty]}
if(this.folderIconPadding!=null&&this.data&&this.data.isFolder&&this.data.isFolder(_1))
{return this.folderIconPadding}
return this.iconPadding},isc.A.$127g=function isc_ListGrid__fixTitleWidth(){var _1=this.getTreeFieldNum(),_2=this.fields[_1]&&this.fields[_1].frozen,_3=_2?(this.frozenBody&&this.frozenBody.$941):(this.body&&this.body.$941);return this.fixedFieldWidths&&!_3},isc.A.getTreeFieldNum=function isc_ListGrid_getTreeFieldNum(){return this.$34t},isc.A.$59a=function isc_ListGrid__getFollowingSiblingLevels(_1,_2){return this.data.$59a(_1)},isc.A.getIndentHTML=function isc_ListGrid_getIndentHTML(_1,_2,_3,_4){var _5;if(this.data.isMultiLinkTree&&this.data.isMultiLinkTree()){_5=this.data.getNodeLocator(_3)}
var _6=_1;if(!this.showRoot)_6--;var _7=(this.showOpener?(this.showConnectors?this.getConnectorIconWidth(_2):this.getOpenerIconWidth(_2)):this.indentSize),_8=this.isPrinting||isc.Browser.isIE||isc.Browser.isOpera||isc.Browser.isEdge,_9=(_8?1:0);if(this.showConnectors&&this.showFullConnectors){var _10=this.$59a(_5||_2,_1);_10.remove(_1);if(!this.showRoot)_10.remove(0);if(_10.length!=0){if(!this.$59c){var _11="ancestor",_12="ancestor_selected";if(this.isRTL()){_11+="_rtl";_12+="_rtl"}
var _13=isc.Img.urlForState(this.connectorImage,null,null,_11),_14=isc.Img.urlForState(this.connectorImage,null,null,_12),_15=this.getIconHTML(_13,null,this.getConnectorIconWidth(_2),null,this.getInnerCellHeight()),_16=this.getIconHTML(_14,null,this.getConnectorIconWidth(_2),null,this.getInnerCellHeight());this.$59c=_15;this.$190b=_16}
var _17=this.$348(_7),_18=isc.StringBuffer.create(isc.emptyString),_19=this.showSelectedOpener&&this.isSelected(_2,_3);_18.append("<NOBR>");var _20=(this.showRoot?0:1);for(var i=_20;i<_1;i++){if(_10.contains(i)){if(_8&&_20==i)_18.append(this.$348(1));_18.append(_19?this.$190b:this.$59c)}else{_18.append(_17)}
_9+=_7}
_18.append("</NOBR>");_18=_18.release(false);if(_4)
return[_18,_9];else
return _18}}
_9=_6*_7;if(_8)_9=Math.max(1,_9);var _22=this.$348(_9);if(isc.Browser.isIE9||(isc.Browser.isStrict&&(isc.Browser.isIE7||isc.Browser.isIE8))){_22="<NOBR>"+_22+"</NOBR>"}
if(_4){return[_22,_9]}else{return _22}},isc.A.$348=function isc_ListGrid__indentHTML(_1){if(_1==0)return isc.emptyString;var _2=isc.TreeGrid.$35c;if(_2==null)_2=isc.TreeGrid.$35c={};if(_2[_1]==null)_2[_1]=isc.Canvas.spacerHTML(_1,1);return _2[_1]},isc.A.$739=function isc_ListGrid__getCheckboxIcon(_1,_2){var _3=null;if(this.selectionAppearance==this.$12c){var _4=this.selectionManager.isSelected(_1,_2)?true:false;var _5=(_4&&this.showPartialSelection&&this.selectionManager.isPartiallySelected(_1))?true:false;_3=_5?(this.checkboxFieldPartialImage||this.booleanPartialImage):_4?(this.checkboxFieldTrueImage||this.booleanTrueImage):(this.checkboxFieldFalseImage||this.booleanFalseImage);if(this.disabled||_1.enabled===false){if(_3!=isc.Canvas.$5w)_3=isc.Img.urlForState(_3,null,null,"Disabled")}else if(!this.body.canSelectRecord(_1)){if(this.showDisabledSelectionCheckbox){if(_3!=isc.Canvas.$5w)_3=isc.Img.urlForState(_3,null,null,"Disabled")}else{if(this.leaveSelectionCheckboxGap){_3=isc.Canvas.$wz}else{_3=null}}}
if(_3==isc.Canvas.$5w){_3=isc.Canvas.$wz}}
return _3},isc.A.getExtraIcon=function isc_ListGrid_getExtraIcon(_1){return null},isc.A.getIcon=function isc_ListGrid_getIcon(_1,_2,_3){if(isc.isA.Number(_1)){_2=_1;_1=this.data.get(_1)}
if(!_1)return null;var _4=this.$35k||this.data,_5=_1[this.customIconProperty],_6=(_5!=null),_7=_4.isFolder(_1),_8=(_7&&this.showFolderIcons!=null)?!this.showFolderIcons:!this.showNodeIcons;if(_8)return null;if(!_6){if(_7)_5=this.folderIcon;else _5=this.nodeIcon}
if(_3){var _9=isc.Media.getStockIconKeyForSrc(this.folderIcon,null,this);if(_9){var _10=isc.Media.getStockIconSrc(_9);var _11=isc.Canvas.$1861(_10);if(_11&&_11.svg)_3=false}}
var _12;if(_7){var _13;if(_4.isMultiLinkTree()){_13=_4.getNodeLocator(_2)}
var _14=_3?false:(this.lastDropFolder==_1&&_1.$347),_15=_3?false:!!_4.isOpen(_13||_1),_16=_4.getLoadState(_1)==isc.Tree.LOADING;if(_16&&this.showLoadingIcons){return this.loadingIcon}else if(_14){if(_1.dropIcon!=null){_5=_1.dropIcon}else{var _17=this.shouldShowDropIconForCell(_1);if(_17)_12=this.dropIconSuffix}}else if(_15){if(_1.openedIcon!=null)_5=_1.openedIcon;else{var _18;if(_6){_18=_1[this.customIconOpenProperty];if(_18==null)_18=this.showCustomIconOpen}else{_18=this.showOpenIcons}
if(_18)_12=this.openIconSuffix;else if(!_6)_12=this.closedIconSuffix}}else{if(!_6){_12=this.closedIconSuffix}}}
if(!_3&&this.isSelected(_1,_2,true)){var _19;if(_6){_19=_1[this.customIconSelectedProperty];if(_19==null)_19=this.showCustomIconSelected}else{_19=this.showSelectedIcons}
if(_19){if(_12==null||isc.isAn.emptyString(_12))_12=this.selectedIconSuffix;else _12+="_"+this.selectedIconSuffix}}
var _5=isc.Img.urlForState(_5,false,false,_12);var _9=isc.Media.getStockIconKeyForSrc(_5,null,this);if(_9){_5=isc.Media.getStockIconSrc(_9)}
var _11=isc.Canvas.$1861(_5);var _20=_11!=null;if(_20&&!_11.cssClass&&_11.svg){_11.cssClass=this.iconBaseStyle;_5=isc.Canvas.$2166(_11);return _5==null?null:isc.Img.urlForState(_5,false,false,_12)}
return _5},isc.A.shouldShowDropIconForCell=function isc_ListGrid_shouldShowDropIconForCell(_1){var _2,_3=(_1[this.customIconProperty]!=null);if(_3){_2=_1[this.customIconDropProperty];if(_2==null)_2=this.showCustomIconDrop}else{_2=this.showDropIcons}
return _2},isc.A.$117g=function isc_ListGrid__getIconHTMLCacheKey(_1,_2,_3,_4){return _1+"#w="+_2+",extraRightMargin="+_3+",h="+_4},isc.A.getIconHTML=function isc_ListGrid_getIconHTML(_1,_2,_3,_4,_5,_6){if(_1==null)return isc.emptyString;if(isc.isAn.Object(_1)){_1=isc.Img.urlForState(_1)}
if(_3==null)_3=this.iconSize;if(_5==null)_5=_3;var _6=null;var _7=isc.Canvas.$1861(_1);var _8=_7!=null;if(_8&&_7.svg&&!_7.cssClass){_6=this.iconBaseStyle}
if(this.$35a==null){this.$35a={}}
var _9=this.$35a.iconHTML;if(_9==null)_9=this.$35a.iconHTML={};var _10=!isc.Media.enableTreeIconCaching?null:this.$117g(_1,_3,_4,_5),_11=_10&&_9[_10];if(_11==null){var _12;if(_4){_12=(this.isRTL()?"margin-left:":"margin-right:")+_4+"px"}
_11=this.$wf({src:_1,width:_3,height:_5,name:_2,align:this.$34r,extraCSSText:_12,generateSpan:isc.Canvas.$123e,cssClass:_6});if(isc.Media.enableTreeIconCaching)_9[_10]=_11}
_11[_11.$187e]=_2;return _11.join(isc.$ad)},isc.A.dropTreeNode=function isc_ListGrid_dropTreeNode(){if(!this.willAcceptDrop())return false;var _1=this.$35k||this.data;var _2=isc.EH.dragTarget.cloneDragData(),_3=this.getEventRecordNum(null,true),_4=this.getRecordDropPosition(_3),_5=_3<0?null:this.data.get(_3),_6=this.getDropFolder();var _7;if(_1.isANodeLocator(_6)){_7=_6;_6=_6.node}
if(!_5)_5=_6;var _8=isc.EH.dragTarget.getData(),_9=(isc.isA.Tree(_8)&&isc.isA.Tree(_1)&&_8.getRoot()==_1.getRoot());for(var i=0;i<_2.length;i++){var _11=_2[i];if(_1.isMultiLinkTree()&&!_1.allowDuplicateChildren){for(var n=i+1;n<_2.length;n++){if(_2[n].node==_11.node){isc.warn(this.cantDragMultipleNodeOccurencesMessage);return false}}}
var _13=(_1.findChildNum(_6,_1.getName(_11))!=-1);var _14=_9&&this.canReorderRecords&&_6==_1.getParent(_11);if(_13&&!_14&&(!_1.isMultiLinkTree()||!_1.allowDuplicateChildren)){this.logInfo("already a child named: "+_1.getName(_11)+" under parent: "+(_1.isMultiLinkTree()?_1.getPathForOpenListIndex(_3):_1.getPath(_6)));isc.warn(this.parentAlreadyContainsChildMessage);return false}
var _15=_1.isMultiLinkTree()?_11.node:_11;if(_15[this.data.idField]&&_6&&this.data.isInAncestorChain(_15[this.data.idField],_6))
{isc.warn(this.childCannotBeItsOwnAncestorMessage);return false}}
var _16=null;if(this.canReorderRecords){var _17=this.getEventRecordNum(null,false);if(_3<0||(!this.canDropRootNodes&&_17==-2)){_6=_5;_16=_1.getChildren(_6).getLength()}else if(_5==_6){_16=0}else{_16=(_4==isc.ListGrid.BEFORE?0:1)+_1.getChildren(_6).indexOf(_5)}}
var _18=_4;if(this.onFolderDrop!=null&&(this.onFolderDrop(_2,_6,_16,_18,isc.EH.dragTarget)==false))return false;this.folderDrop(_2,_7||_6,_16,isc.EH.dragTarget);_1.openFolder(_7||_6);return false},isc.A.folderDrop=function isc_ListGrid_folderDrop(_1,_2,_3,_4,_5){this.transferNodes(_1,_2,_3,_4,_5)},isc.A.transferNodes=function isc_ListGrid_transferNodes(_1,_2,_3,_4,_5){if(!this.$67u("transferNodes",_1,_2,_3,_4,_5)){return}
var _6=this.$35k||this.data;_2=_2||_6.root;var _7;if(_6.isANodeLocator(_2)){_7=_2;_2=_7.node}
if(_6.isMultiLinkTree()){if(_6.isRoot(_2)){_7=_6.createNodeLocator(_2,null,null,_6.pathDelim)}
this.$102q(_6.isANodeLocator(_7))}
var _8=_4.getData(),_9=(isc.isA.Tree(_8)&&isc.isA.Tree(_6)&&_8.getRoot()==_6.getRoot());var _10=this.getDataSource(),_11=_4.getDataSource();if(_9&&(this.dragDataAction!=isc.TreeGrid.COPY&&this.dragDataAction!=isc.TreeGrid.CLONE))
{if(_10!=null&&_6!=null&&isc.ResultTree&&isc.isA.ResultTree(_6))
{this.$67k[0].noRemove=true;var _12=isc.rpc.startQueue();var _13=_8.getChildren(_2);var _14,_15;if(_3!=null){if(_3<_13.getLength()){_14=_13.get(_3)}}
if(_14==_15){_14=_13.last()}
var _16;var _17=isc.ResultSet.getLoadingMarker();var _18=[];var _19=0;if(_6.isMultiLinkTree()){for(var i=0;i<_1.length;i++){var _21=_1[i];for(var j=0;j<i;j++){var _23=_1[j].node;if(_21.parentId==_23[_6.idField]){_1.removeAt(i);_1.addAt(_21,j);break}}}
for(var i=0;i<_1.length;i++){this.$102q(_6.isANodeLocator(_1[i]));delete _1[i].$204e;if(_1[i].parentId==_2[_6.idField]){var _24=_8.getLinkRecord(_1[i]);var _25=_6.allowDuplicateChildren&&_24?_24[_8.linkPositionField]:_8.getChildren(_2).indexOf(_1[i].node);if(_25<_3){_19--}
_1[i].$204e=_19}}}
for(var i=0;i<_1.length;i++){var _26=_1[i];if(_26==null)continue;if(this.shouldSaveLocally()||(!_6.isMultiLinkTree()&&_6.getParent(_26)==_2))
{if(_3!=null){_8.moveBefore(_26,_16||_14)}}else{var _27=_1[i]["_isOpen_"+_6.ID];_26=isc.addProperties({},_6.getCleanNodeData(_26,true,false));var _28=isc.addProperties({},_26);if(_27!=null)_26["_isOpen_"+_6.ID]=_27;_26[_6.parentIdField]=_2[_6.idField];var _29=null,_30=null,_31=_6.getChildren(_2);if(_3==null){_29=_31.last();if(_29==_17){_29=null}}else{if(_3>0){_29=_31.get(_3-1);if(_29==_17){_29=null}}
if(_3<_31.getLength()){_30=_31.get(_3)}}
if(!_8.isMultiLinkTree()){this.updateDataViaDataSource(_26,_10,{oldValues:_28,parentNode:_6.getParent(_1[i]),position:_3,nodeLocator:_6.isMultiLinkTree()?_1[i]:null,newParentNode:_2,dragTree:_8,draggedNode:_26,draggedNodeList:_1,dropNeighbor:_29,dropIndex:_3},_4)}else{var _32=isc.DataSource.get(_8.linkDataSource),_24=_8.getLinkRecord(_1[i]),_33=_1[i].parentId,_34=_8.$201l(_33);var _35=i+(_1[i].$204e?_1[i].$204e:0)
var _36={clientContext:{isDragMove:true,oldParentNode:_34,oldParentNodeLocator:_8.$202h(_1[i]),nodeLocator:_1[i],newParentNode:_2,newParentNodeLocator:_7,position:_3+_35,sourceRootValue:_8.rootValue,sourceTree:_8},parameters:{isDragMove:true}}
if(_8.linkDataRemoveOperation){_36.operationId=_8.linkDataRemoveOperation}
_32.removeData(_24,null,_36);var _37=isc.addProperties({},_24);_37[_6.parentIdField]=_2[_6.idField];var _38=null;if(_6.allowDuplicateChildren){_38=_3}else{if(!_29){if(_30){var _39=_6.getLinkRecord(_2[_6.idField],_30[_6.idField]);_38=_39[_6.linkPositionField]}
if(_38!=null){_38-=1}else{_38=_6.firstPositionValue}}else{var _40=_6.getLinkRecord(_2[_6.idField],_29[_6.idField]);_38=_40[_6.linkPositionField];if(_38!=null){_38+=1}}}
_37[_6.linkPositionField]=_38==null?null:_38+_19+i;_32=isc.DataSource.get(_6.linkDataSource);if(_6.linkDataAddOperation){_36.operationId=_6.linkDataAddOperation}else{delete _36.operationId}
var _41=_32.getPrimaryKeyFieldNames();for(var k=0;k<_41.length;k++){delete _37[_41[k]]}
_32.addData(_37,function(_65,_63,_66){},_36);if(_8.autoUpdateSiblingNodesOnDrag){var _33=_1[i].parentId,_34=_8.$201l(_33),_43=_8.getChildren(_34),_44=_2,_45=_44[_6.idField],_46=_7,_32=isc.DataSource.get(_8.linkDataSource);var _41=_32.getPrimaryKeyFieldNames();var _47=this.getChildOrdinalPosition(_8,_1[i],_34);for(var j=_47+1;j<_43.length;j++){var _48=_43[j][_8.idField];var _24=_8.getLinkRecord(_33,_48,j);if(_24){for(var q=0;q<_1.length;q++){var _50=true;var _51=_8.getLinkRecord(_1[q]);if(!_51){continue}
for(var k=0;k<_41.length;k++){if(_24[_41[k]]!=_51[_41[k]]){_50=false;break}}
if(_50){break}}
if(!_50){var _52={$_parentId:_33,$_childId:_48,$_position:j};var _53=_18.find(_52);if(!_53){_53=isc.addProperties(_52,_24);_53.$_delta=0;_18.add(_53)}
_53.$_delta-=1}}}
_32=isc.DataSource.get(_6.linkDataSource);var _41=_32.getPrimaryKeyFieldNames();var _54=_6.getChildren(_44);if(_3!=0){for(var j=_3;j<_54.length;j++){var _48=_54[j][_6.idField];var _24=_6.getLinkRecord(_45,_48,j);for(var q=0;q<_1.length;q++){var _50=true;var _51=_8.getLinkRecord(_1[q]);if(!_51){continue}
for(var k=0;k<_41.length;k++){if(_24[_41[k]]!=_51[_41[k]]){_50=false;break}}
if(_50){break}}
if(!_50){var _52={$_parentId:_45,$_childId:_48,$_position:j};var _53=_18.find(_52);if(!_53){_53=isc.addProperties(_52,_24);_53.$_delta=0;_18.add(_53)}
_53.$_delta+=1}}}}}}}
if(_8.autoUpdateSiblingNodesOnDrag){delete _36.operationId;for(var i=0;i<_18.length;i++){var _55=_18[i];delete _55.$_parentId;delete _55.$_childId;delete _55.$_position;_55[_6.linkPositionField]+=_55.$_delta;delete _55.$_delta;_32.updateData(_55,function(_65,_63,_66){},_36)}}}else{if(_4!=this)_4.$1779(_1);var _13=_8.getChildren(_2);var _14,_15;if(_3!=null){if(_3<_13.getLength()){_14=_13.get(_3)}}
if(_8.isMultiLinkTree()){_8.$203l=[];for(var i=0;i<_1.length;i++){this.$102q(_8.isANodeLocator(_1[i]));_8.$203l.add(_8.getLinkRecord(_1[i]))}}
var _56=_8.isMultiLinkTree()?_7:_2;if(_14==null){_8.moveList(_1,_56,_3)}else{_8.moveListBefore(_1,_14,_56)}
if(_8.isMultiLinkTree()){delete _8.$203l}}}else if(_10!=null){var _57;if(this.dragRecategorize=="always"||this.dragRecategorize!="never"&&(_11!=null&&_11!=_10&&_6!=null&&isc.ResultTree&&isc.isA.ResultTree(_6)&&_4.dragDataAction==isc.TreeGrid.MOVE))
{var _58=_11.getTreeRelationship(_10);if(_58!=null&&_58.parentIdField){var _59=false,_60=_11.getPrimaryKeyFields();for(var _61 in _60){if(_61==_58.parentIdField){this.logWarn("dragRecategorize: data source has dataSource:"+_11.getID()+". foreignKey relationship with target dataSource "+_10.getID()+" is based on primary key which cannot be modified.");_59=true}}
if(!_59)_57=true;this.logInfo("Recategorizing dropped nodes in dataSource:"+_11.getID())}
this.$67k[0].noRemove=true;var _12=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){var _26={};var _62=_11.getPrimaryKeyFieldNames();for(var j=0;j<_62.length;j++){_26[_62[j]]=_1[i][_62[j]]}
if(_57){_26[_58.parentIdField]=_2[_58.idField]}
isc.addProperties(_26,this.getDropValues(_26,_11,_2,_3,_4));this.updateDataViaDataSource(_26,_11,null,_4)}}else{if(_4!=this)_4.$1779(_1);if(isc.isA.Tree(_8)&&_4.dragDataAction==isc.TreeGrid.MOVE){_1=_8.getCleanNodeData(_1,_4.dataSource==null)}
var _12=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){var _63=_1[i],_64=_6;if(_64){_63[_64.parentIdField]=_2[_64.idField]}
isc.addProperties(_63,this.getDropValues(_63,_11,_2,_3,_4));if(isc.isA.Tree(this.data)&&this.data.isMultiLinkTree()){this.$202r(_63,_11,_4,null,_3,_7)}else{this.$61d(_63,_11,_4,null,_3,_2)}}}}else{if(_4!=this)_4.$1779(_1);for(var i=0;i<_1.length;i++){if(isc.isA.Tree(this.data)&&this.data.isMultiLinkTree()){this.$202r(_1[i],_11,_4,null,_3,_7)}else{this.$61d(_1[i],_11,_4,null,_3,_2)}}}
if(!this.$67l){isc.Log.logDebug("Invoking transferDragData from inside transferNodes - no server queries needed?","dragDrop");_4.transferDragData(this.$67n,this);if(_10){if(!this.$67o)isc.rpc.sendQueue()}}
this.$67m=false},isc.A.getChildOrdinalPosition=function isc_ListGrid_getChildOrdinalPosition(_1,_2,_3){var _4;if(_1.isANodeLocator(_2)){_4=_2;_2=_2.node}
if(this.allowDuplicateChildren){return _4?_4.position:0}
var _5=_1.getChildren(_3);if(!_5)return-1;return _5.indexOf(_2)},isc.A.$202r=function isc_ListGrid__addMultiLinkIfNotDuplicate(_1,_2,_3,_4,_5,_6,_7){var _8=this.getDataSource(),_9=isc.DataSource.get(this.data.linkDataSource),_10=_8&&_8.getPrimaryKeyFields(),_11=this,_12=_3.data,_13=isc.isA.Tree(_12)?_12:null;var _14=this.data;if(this.creator&&this.creator.data&&this.creator.data.columnTree){_14=this.creator.data}
var _15=_1.node;if(this.addOperation){isc.addProperties(_22,{operationId:this.addOperation})}
if(this.$202s(_1,_6.node,_5)){if(this.duplicateDragMessage!=null)isc.warn(this.duplicateDragMessage);isc.Log.logDebug("Found client-side duplicate, adding '"+_15[isc.firstKey(_15)]+"' to exception list","dragDrop");this.$67n.add(isc.Tree.isANodeLocator(_15)?_15:this.getCleanRecordData(_15));return false}
var _16=isc.addProperties({},_13.getLinkRecord(_1));_16[_14.parentIdField]=_6.node[_14.idField];_16[_14.linkPositionField]=_5;var _17=this.$202t(_15);if(!_8){if(!_17){_14.data.add(_15)}
_14.linkData.add(_16);var _18=_14.$201l(_1.node[_14.idField])||_15;var _19=_14.$201l(_6.node[_14.idField]);_14.$201j([_19,_18],_14.idField,_14.parentIdField,_14.linkPositionField,_14.rootValue,_14.isFolderProperty,_6,false,_16,true)}else{var _20=_9&&_9.getPrimaryKeyFields();if(_20){for(var _21 in _20){delete _16[_21]}}
var _22={nodeLocator:_1,newParentNodeLocator:_6,position:_5,sourceRootValue:_13?_13.rootValue:null,targetRootValue:_14.rootValue}
if(_8&&_2==_8){if(_10&&isc.firstKey(_10)!=null){var _23=isc.applyMask(_15,_10)}else{_23=this.getCleanRecordData(_15)}}else if(_8&&_10&&isc.firstKey(_10)!=null){_23=isc.applyMask(_15,_10)}else{_23=this.getCleanRecordData(_15)}
_8.fetchData(_23,function(_24,_25,_26){if(!_25||_25.length==0){_8.addData(_15,function(_24,_25,_26){_3.$67w(_24,_25,_26);_9.addData(_16,function(_27,_25,_28){},_22)},_22)}else{_9.addData(_16,function(_27,_25,_28){},_22)}},{sendNoQueue:true})}});isc.evalBoundary;isc.B.push(isc.A.$202s=function isc_ListGrid__isDuplicateMultiLinkOnClient(_1,_2,_3){this.$102q(isc.isA.Tree(this.data)&&this.data.isMultiLinkTree());var _4=this.data;if(!isc.Tree.isANodeLocator(_1)){return false}
var _5=_4.$201n(_1.node[_4.idField]);if(!_5){return false}
var _6=false;for(var i=0;i<_5.positions.length;i++){if(_5.positions[i].parentId==_2[_4.idField]){if(!_4.allowDuplicateChildren||_5.positions[i].position==_3)
{_6=true;break}}}
return _6},isc.A.$202t=function isc_ListGrid__nodeExistsOnClient(_1){return!!this.data.$201l(_1[this.data.idField])},isc.A.getDropFolder=function isc_ListGrid_getDropFolder(_1){if(_1==null)_1=this.getEventRecordNum(null,true);var _2=this.$35k||this.data,_3=(_1<0?null:_2.get(_1)),_4;var _5=false;if(_1<0){if(this.canDropInEmptyArea==false)return;var _6=_2.getLength();if(_6>0&&this.dropEventAdjacentToLastNode()){var _7=_2.get(_6-1),_8=_2.getParent(_7);while(_8&&!this.isValidDropFolder(_8)){_8=_2.getParent(_8)}
if(_8!=null){_5=true;_3=_8}}
if(_3==null){if(!this.canDropRootNodes)return;_3=_2.getRoot()}}
if(_2.isMultiLinkTree()){_4=_2.getNodeLocator(_1)}
if(_2.isRoot(_3)){return!!_4?_2.createNodeLocator(_2.getRoot(),null,null,_2.pathDelim):_2.getRoot()}
var _9=_2.isFolder(_3);if(!this.canReorderRecords){if(_9){return _4||_3}else{if(!!_4){return _2.$202h(_4)}else{return _2.getParent(_3)}}}
if(_5){return _4||_3}
var _10=this.getRecordDropPosition(_3);if(!_9||_10==isc.ListGrid.BEFORE||_10==isc.ListGrid.AFTER&&(!_2.isOpen(_4||_3)||!_2.hasChildren(_3)))
{var _11=_2.getParent(_4||_3);if(_9&&!this.canDropRootNodes&&_2.isRoot(_11)){return _4||_3}
if(!_4){return _11}else{return _2.$202h(_4)}}else{return _4||_3}},isc.A.isValidDropFolder=function isc_ListGrid_isValidDropFolder(_1){return _1&&(_1.canAcceptDrop==null||_1.canAcceptDrop==true)},isc.A.dropEventAdjacentToLastNode=function isc_ListGrid_dropEventAdjacentToLastNode(){if(!this.canDropSiblingAfterLastNode)return false;var _1=this.getTotalRows()-1;if(_1==-1)return false;var _2=this.getRowTop(_1)+this.getDrawnRowHeight(_1),_3=this.body.getOffsetY();return _3>_2&&_3<(_2+this.getDropEndSpace()/2)});isc.B._maxIndex=isc.C+31;isc.defineClass("Shuttle","HLayout");isc.A=isc.Shuttle.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.sourceGridConstructor="ListGrid";isc.A.sourceGridDefaults={isGroup:true,showFilterEditor:true,dragDataAction:"none",canDragRecordsOut:true,canAcceptDroppedRecords:true,canReorderRecords:false,recordDrop:function(_1,_2,_3,_4){if(_4==this.creator.targetGrid){this.creator.deselectRecords(_1,true)}else{return this.Super("recordDrop",arguments)}}};isc.A.targetGridConstructor="ListGrid";isc.A.targetGridDefaults={isGroup:true,canShowFilterEditor:false,dragDataAction:"none",canDragRecordsOut:true,canAcceptDroppedRecords:true,canReorderRecords:false,recordDrop:function(_1,_2,_3,_4){if(_4==this.creator.sourceGrid){this.creator.selectRecords(_1,true)}else{return this.Super("recordDrop",arguments)}}};isc.A.sourceGridTitle="Unselected Values";isc.A.targetGridTitle="Selected Values";isc.A.addMissingPlaceholders=true;isc.A.missingPlaceholderAttribute="_isMissingPlaceholder";isc.A.loadingPlaceholderAttribute="_isLoadingPlaceholder";isc.A.controlBarConstructor="VLayout";isc.A.controlBarDefaults={align:"center",defaultLayoutAlign:"center",width:50,membersMargin:10};isc.A.selectAllButtonIcon="[SKINIMG]TransferIcons/right_all.png";isc.A.selectAllButtonWidth=24;isc.A.selectAllButtonHeight=22;isc.A.incompleteDataWarning="Unable to select all - the data set does not have all matching records loaded from the dataSource.";isc.A.selectAllButtonConstructor="ImgButton";isc.A.selectAllButtonDefaults={showDown:false,click:function(){var _1=this.creator.sourceGrid;if(!_1.data.allMatchingRowsCached()){isc.warn(this.creator.incompleteDataWarning);return}
var _2=_1.data.getRange(0,_1.getTotalRows());this.creator.selectRecords(_2,true)}};isc.A.selectButtonConstructor="ImgButton";isc.A.selectButtonIcon="[SKINIMG]TransferIcons/right.png";isc.A.selectButtonWidth=24;isc.A.selectButtonHeight=22;isc.A.selectButtonDefaults={showDown:false,click:function(){var _1=this.creator.sourceGrid.getSelectedRecords();this.creator.selectRecords(_1,true)}};isc.A.deselectButtonConstructor="ImgButton";isc.A.deselectButtonIcon="[SKINIMG]TransferIcons/left.png";isc.A.deselectButtonWidth=24;isc.A.deselectButtonHeight=22;isc.A.deselectButtonDefaults={showDown:false,click:function(){var _1=this.creator.targetGrid.getSelectedRecords();this.creator.deselectRecords(_1,true)}};isc.A.deselectAllButtonIcon="[SKINIMG]TransferIcons/left_all.png";isc.A.deselectAllButtonWidth=24;isc.A.deselectAllButtonHeight=22;isc.A.deselectAllButtonConstructor="ImgButton";isc.A.deselectAllButtonDefaults={showDown:false,click:function(){this.creator.clearSelection(true)}};isc.B.push(isc.A.getValueFieldName=function isc_Shuttle_getValueFieldName(){var _1=this.valueField;if(_1==null&&this.dataSource){_1=this.getDataSource().getPrimaryKeyFieldName()}
if(_1==null&&!this.$278p){this.logWarn("Shuttle requires either an explicit valueField or a dataSource with a primary key field");this.$278p=true}
return _1},isc.A.setImplicitCriteria=function isc_Shuttle_setImplicitCriteria(_1){this.implicitCriteria=_1;this.updateGrids()},isc.A.getImplicitCriteria=function isc_Shuttle_getImplicitCriteria(){return this.implicitCriteria},isc.A.selectRecords=function isc_Shuttle_selectRecords(_1,_2){if(_1==null)return;if(this.selectedRecords==null){this.selectedRecords=[]}
var _3=this.getValueFieldName();for(var i=0;i<_1.length;i++){var _5=_1[i],_6=_5[_3];this.$252y(_6);var _7=this.selectedRecords.findIndex(_3,_6);if(_7==-1)_7=this.selectedRecords.length;this.selectedRecords.set(_7,_5)}
this.updateGrids();if(_2)this.selectionUpdated()},isc.A.deselectRecords=function isc_Shuttle_deselectRecords(_1,_2){if(_1==null)return;if(this.selectedRecords==null){this.selectedRecords=[]}
this.selectedRecords.removeList(_1);var _3=this.getValueFieldName();for(var i=0;i<_1.length;i++){var _5=_1[_3];this.$252y(_5)}
this.updateGrids();if(_2)this.selectionUpdated()},isc.A.clearSelection=function isc_Shuttle_clearSelection(_1){var _2=this.targetGrid;var _3=_2.data.getRange(0,_2.getTotalRows());this.deselectRecords(_3,_1);delete this.$252z},isc.A.selectionUpdated=function isc_Shuttle_selectionUpdated(){},isc.A.setSelectedByValue=function isc_Shuttle_setSelectedByValue(_1,_2){if(_1==null||_1.length==0){return}
var _3=isc.RPCManager.startQueue()
var _4=_1;_1=_1.duplicate();var _5=this.getValueFieldName();if(_2){if(this.targetGrid.data){for(var i=0;i<_1.length;i++){if(this.targetGrid.data.find(_5,_1[i])){_1[i]=null}}
_1.removeEmpty()}
if(_1.length==0){if(!_3)isc.RPCManager.sendQueue();return}
var _7=!this.sourceGrid.data||!this.sourceGrid.data.lengthIsKnown||!this.sourceGrid.data.lengthIsKnown(),_8=[];if(!_7){var _9=this.sourceGrid.data;var _10=_9.allRows;if(_10!=null)_9=_10;for(var i=0;i<_1.length;i++){var _11=_9.find(_5,_1[i]);if(_11!=null){_8.add(isc.addProperties({},_11));_1[i]=null}}
if(_8.length!=_1.length){_7=true}}
if(_8.length>0){this.selectRecords(_8)}
if(_7){for(var i=0;i<_1.length;i++){if(this.valuesFetchInProgress(_1))_1[i]=null}
_1.removeEmpty();if(_1.length>0){this.$2520(_1);var _12={clientContext:{requestedValues:_1}};if(this.filterContext)isc.addProperties(_12,this.filterContext);if(this.fetchOperation!=null)_12.operationId=this.fetchOperation;if(this.textMatchStyle!=null)_12.textMatchStyle=this.textMatchStyle;var _13=this.getDataSource().combineCriteria(this.getImplicitCriteria(),{operator:"inSet",fieldName:_5,value:_1},"and",this.textMatchStyle);this.getDataSource().fetchData(_13,{target:this,methodName:"fetchMissingValuesForSelectionReply"},_12)}}}else{var _14=[];var _15=this.targetGrid.data||[];for(var i=0;i<_1.length;i++){this.$252y(_1);var _16=_15.find(_5,_1[i]);if(_16!=null){_14.add(_16)}else{_16={};_16[_5]=_1[i];_14.add(_16)}}
this.deselectRecords(_14)}
if(!_3)isc.RPCManager.sendQueue()},isc.A.fetchMissingValuesForSelectionReply=function isc_Shuttle_fetchMissingValuesForSelectionReply(_1,_2,_3){var _4=_3.clientContext.requestedValues,_5=false;var _6=this.getValueFieldName();for(var i=0;i<_4.length;i++){var _8=_2.find(_6,_4[i]);if(this.valuesFetchInProgress(_4[i])){_5=true;if(this.addMissingPlaceholders&&_8==null){_8={};_8[this.missingPlaceholderAttribute]=true;_8.valueField=_4[i];_2.add(_8)}}else{_2.removeWhere(this.getValueFieldName(),_4[i])}}
if(_2.length>0){this.selectRecords(_2)}
if(_5&&!this.valuesFetchInProgress()){this.valuesFetchComplete()}},isc.A.$2520=function isc_Shuttle__addToFetchingValues(_1){if(this.$252z==null){this.$252z=[]}
this.$252z.addList(_1)},isc.A.$252y=function isc_Shuttle__clearFetchingValue(_1){if(!this.$252z)return;this.$252z.remove(_1)},isc.A.valuesFetchInProgress=function isc_Shuttle_valuesFetchInProgress(_1){if(_1==null){return this.$252z&&this.$252z.length>0}else{return this.$252z&&this.$252z.indexOf(_1)!=-1}},isc.A.valuesFetchComplete=function isc_Shuttle_valuesFetchComplete(){},isc.A.getSelectedRecords=function isc_Shuttle_getSelectedRecords(_1){var _2=[];_2.addList(this.selectedRecords);if(_1&&this.$252z){var _3=this.getValueFieldName();for(var i=0;i<this.$252z.length;i++){var _5={};_5[this.loadingPlaceholderAttribute]=true;_5[_3]=this.$252z[i];_2.add(_5)}}
return _2},isc.A.getSelectedValues=function isc_Shuttle_getSelectedValues(_1){var _2=this.getSelectedRecords(_1);return _2&&_2.getProperty(this.getValueFieldName())},isc.A.updateGrids=function isc_Shuttle_updateGrids(){var _1=this.selectedRecords||[];this.targetGrid.setData(_1);var _2=this.getSourceGridImplicitCriteria();var _3=!this.sourceGrid.dataObjectSupportsFilter(this.sourceGrid.data);this.sourceGrid.setImplicitCriteria(_2);if(_3){var _4=isc.addProperties({},this.filterContext);this.sourceGrid.fetchData(this.sourceGrid.getCriteria(),{target:this,methodName:"sourceGridFetchComplete"},_4)}},isc.A.sourceGridFetchComplete=function isc_Shuttle_sourceGridFetchComplete(_1,_2,_3){},isc.A.getSourceGridImplicitCriteria=function isc_Shuttle_getSourceGridImplicitCriteria(){var _1=this.getImplicitCriteria();var _2=this.selectedRecords||[];var _3=this.getDataSource();var _4=this.getValueFieldName();if(_4==null){this.logWarn("Shuttle requires a valueField");return}
if(_2.length>0){var _5=_2.getProperty(this.getValueFieldName());var _6={operator:"notInSet",fieldName:_4,value:_5};_1=_3.combineCriteria(_1,_6,"and","substring")}
return _1},isc.A.$278q=function isc_Shuttle__createClientOnlyDataSource(){this.dataSource=isc.DataSource.create({_generated:true,clientOnly:true,fields:[{name:this.getValueFieldName(),primaryKey:true}],dropUnknownCriteria:false,cacheData:this.data?this.data.duplicate():[]})},isc.A.initWidget=function isc_Shuttle_initWidget(){var _1=window.isc_supportsMultiPickerItem;if(!_1){this.logWarn("Shuttle is not supported in this build");return}
if(this.dataSource==null){this.$278q()}else if(this.data!=null){this.logWarn("Shuttle instantiated with both dataSource and data properties. The static data object will be ignored and options will be retrieved by fetching against the dataSource.")}
var _2={textMatchStyle:this.textMatchStyle,fetchOperation:this.fetchOperation,groupTitle:this.sourceGridTitle,fields:(this.fields?isc.clone(this.fields):null),dataSource:this.dataSource}
var _3=isc.addProperties({},this.sourceGridDefaults,this.sourceGridProperties);if(this.sortField&&_3.sortField==null){_2.sortField=this.sortField}
if(this.sortDirection&&_3.sortDirection==null){_2.sortField=this.sortDirection}
if(this.initialSort&&_3.initialSort==null){_2.initialSort=this.initialSort}
this.sourceGrid=this.createAutoChild("sourceGrid",_2);var _4={groupTitle:this.targetGridTitle,fields:(this.fields?isc.clone(this.fields):null),dataSource:this.dataSource};var _5=isc.addProperties({},this.targetGridDefaults,this.targetGridProperties);if(this.sortField&&_5.sortField==null){_4.sortField=this.sortField}
if(this.sortDirection&&_5.sortDirection==null){_4.sortField=this.sortDirection}
if(this.initialSort&&_5.initialSort==null){_4.initialSort=this.initialSort}
this.targetGrid=this.createAutoChild("targetGrid",_4);this.selectAllButton=this.createAutoChild("selectAllButton",{width:this.selectAllButtonWidth,height:this.selectAllButtonHeight,src:this.selectAllButtonIcon});this.selectButton=this.createAutoChild("selectButton",{width:this.selectButtonWidth,height:this.selectButtonHeight,src:this.selectButtonIcon});this.deselectButton=this.createAutoChild("deselectButton",{width:this.deselectButtonWidth,height:this.deselectButtonHeight,src:this.deselectButtonIcon});this.deselectAllButton=this.createAutoChild("deselectAllButton",{width:this.deselectAllButtonWidth,height:this.deselectAllButtonHeight,src:this.deselectAllButtonIcon});this.controlBar=this.createAutoChild("controlBar",{members:[this.selectAllButton,this.selectButton,this.deselectButton,this.deselectAllButton]});this.setMembers([this.sourceGrid,this.controlBar,this.targetGrid]);this.updateGrids();if(this.selectedValues!=null&&this.selectedRecords==null){this.setSelectedByValue(this.selectedValues)}
delete this.selectedValues;return this.Super("initWidget",arguments)});isc.B._maxIndex=isc.C+20;isc.Shuttle.registerStringMethods({selectionUpdated:""});isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('Grids');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._Grids_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('Grids module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;if(isc.Page)isc.Page.handleEvent(null,"moduleLoaded",{moduleName:'Grids',loadTime:(isc._moduleEnd-isc._moduleStart)});}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'Grids'.");}
