com.smartclient.public.sc.modules.ISC_DataBinding.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smartgwt Show documentation
Show all versions of smartgwt Show documentation
SmartGWT - GWT API's for SmartClient
The newest version!
/*
* Isomorphic SmartClient
* Version SC_SNAPSHOT-2011-08-08 (2011-08-08)
* Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
* "SmartClient" is a trademark of Isomorphic Software, Inc.
*
* [email protected]
*
* http://smartclient.com/license
*/
if(window.isc&&window.isc.module_Core&&!window.isc.module_DataBinding){isc.module_DataBinding=1;isc._moduleStart=isc._DataBinding_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log && isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={ message:'DataBinding 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(!isc.Comm)isc.defineClass("Comm");isc.A=isc.Comm;isc.A.XML_BACKREF_PREFIX="$$BACKREF$$:";isc.A.$36r=/^([_:A-Za-z])([_:.A-Za-z0-9]|-)*$/;isc.A.serializeBackrefs=true;isc.A=isc.Comm;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.xmlSerialize=function isc_c_Comm_xmlSerialize(_1,_2,_3){return isc.Comm.$ew(_1,_2,_3?"":null)}
,isc.A.$ew=function isc_c_Comm__xmlSerialize(_1,_2,_3,_4){var _5=_1!=null;if(!_4||!_4.objRefs){_4=isc.addProperties({},_4);_4.objRefs={obj:[],path:[]};if(!_4.objPath){if(_2&&_2.getID)_4.objPath=_2.getID();else _4.objPath=""}
if(_1==null){if(isc.isA.Class(_2))_1=_2.getClassName();else if(isc.isAn.Array(_2))_1="Array";else if(isc.isA.Object(_2))_1=_2.$schemaId||"Object";else _1="ISC_Auto"}}
if(_2==null){if(isc.Comm.xmlSchemaMode||!isc.Comm.$850){return isc.Comm.$ex(_1,"")}else{return isc.Comm.$ex(_1,null,"nil")}}
if(isc.isA.String(_2)){return isc.Comm.$ex(_1,isc.makeXMLSafe(_2),(isc.Comm.xmlSchemaMode?"string":null))}
if(isc.isA.Function(_2)){if(_2.iscAction)return isc.StringMethod.$41u(_2.iscAction);return null}
if(_2==window){this.logWarn("Serializer encountered the window object at path: "+_4.objPath+" - returning null for this slot.");return null}
if(isc.RPCManager.preserveTypes){if(isc.isA.Number(_2)||isc.isA.SpecialNumber(_2)){if(_2.toString().contains("."))
return isc.Comm.$ex(_1,_2,"double");return isc.Comm.$ex(_1,_2,"long")}
if(isc.isA.Boolean(_2))return isc.Comm.$ex(_1,_2,"boolean")}else{if(isc.isA.Number(_2)||isNaN(_2)){return isc.Comm.$ex(_1,_2)}
if(isc.isA.Boolean(_2))return isc.Comm.$ex(_1,_2)}
var _6=isc.JSONEncoder.$zl(_4.objRefs,_2);if(_6!=null&&_4.objPath.contains(_6)){var _7=_4.objPath.substring(_6.length,_6.length+1);if(_7=="."||_7=="["||_7=="]"){if(this.serializeBackrefs){return isc.Comm.$36u(_1)+isc.Comm.XML_BACKREF_PREFIX+_6+isc.Comm.$36v(_1)}
return isc.emptyString}}
isc.JSONEncoder.$zm(_4.objRefs,_2,_4.objPath);if(isc.isA.Function(_2.$ew)){return _2.$ew(_1,null,null,_3,_4.objRefs,_4.objPath)}else if(isc.isA.Class(_2)){this.logWarn("Attempt to serialize class of type: "+_2.getClassName()+" at path: "+_4.objPath+" - returning null for this slot.");return null}
var _8=_4.isRoot==false?false:true;if(isc.isAn.Array(_2))
return isc.Comm.$36s(_1,_2,_4.objPath,_4.objRefs,_3,_8);var _9;if(_2.getSerializeableFields){_9=_2.getSerializeableFields([],[])}else{_9=_2}
return isc.Comm.$36t(_1,_9,_4.objPath,_4.objRefs,_3,_8)}
,isc.A.$36s=function isc_c_Comm__xmlSerializeArray(_1,_2,_3,_4,_5,_6){var _7=isc.Comm.$36u(_1,"List",null,null,null,_6);for(var i=0,_9=_2.length;i<_9;i++){var _10=_2[i];var _11={objRefs:_4,objPath:isc.JSONEncoder.$zp(_3,i),isRoot:false};_7=isc.StringBuffer.concat(_7,(_5!=null?isc.StringBuffer.concat("\r",_5,"\t"):""),isc.Comm.$ew((_10!=null?_10.$schemaId:null)||"elem",_10,(_5!=null?isc.StringBuffer.concat(_5,"\t"):null),_11))}
_7=isc.StringBuffer.concat(_7,(_5!=null?isc.StringBuffer.concat("\r",_5):""),isc.Comm.$36v(_1));return _7}
,isc.A.$36w=function isc_c_Comm__isValidXMLIdentifier(_1){return isc.Comm.xmlSchemaMode||_1.match(this.$36r)}
,isc.A.$36t=function isc_c_Comm__xmlSerializeObject(_1,_2,_3,_4,_5,_6){if(isc.isAn.Instance(_2))_1=_2.getClassName();else if(_2._constructor&&_2._constructor!="AdvancedCriteria"&&_2._constructor!="RelativeDate")_1=_2._constructor;var _7=isc.Comm.$36u(_1,"Object",null,null,null,_6);var _8;_2=isc.JSONEncoder.$42b(_2);for(var _9 in _2){if(_9==null)continue;if(_9==isc.gwtRef)continue;if(_9.startsWith('$'))continue;var _10=_2[_9];if(_10===_8)continue;if(isc.isA.Function(_10)&&!_10.iscAction)continue;var _11=_9.toString();var _12={objRefs:_4,objPath:isc.JSONEncoder.$zp(_3,_9),isRoot:false};_7=isc.StringBuffer.concat(_7,(_5!=null?isc.StringBuffer.concat("\r",_5,"\t"):""),isc.Comm.$ew(_11,_10,(_5!=null?isc.StringBuffer.concat(_5,"\t"):null),_12))}
_7=isc.StringBuffer.concat(_7,(_5!=null?isc.StringBuffer.concat("\r",_5):""),isc.Comm.$36v(_1));return _7}
,isc.A.$36x=function isc_c_Comm__getPrefix(_1,_2){if(_1[_2]!=null){return _1[_2]}else{if(_1.$36y==null)_1.$36y=0;return(_1[_2]="ns"+_1.$36y++)}}
,isc.A.$36u=function isc_c_Comm__xmlOpenTag(_1,_2,_3,_4,_5,_6){var _7=isc.SB.create();var _8=_3!=null;if(_3!=null&&isc.isAn.Object(_4)){_8=false;_4=this.$36x(_4,_3)}
var _9='';if(!this.$36w(_1)){_9=' _isc_name="'+isc.makeXMLSafe(_1)+'"';_1="Object"}
if(_3){_4=_4||"schNS";_7.append("<",_4,":",_1);if(_8)_7.append(" xmlns:",_4,"=\"",_3,"\"")}else{_7.append("<",_1)}
if(_9)_7.append(_9);if(_6&&!this.omitXSI){_7.append(" xmlns:xsi=\"http://www.w3.org/2000/10/XMLSchema-instance\"")}
if(_2&&!this.omitXSI){_7.append(" xsi:type=\"xsd:",isc.makeXMLSafe(_2),"\"")}
if(!_5)_7.append(">");return _7.toString()}
,isc.A.$36v=function isc_c_Comm__xmlCloseTag(_1,_2,_3){if(_2!=null&&isc.isAn.Object(_3)){_3=this.$36x(_3,_2)}
if(!this.$36w(_1))_1="Object";if(_2){_3=_3||"schNS";return isc.SB.concat("",_3,":",_1,">")}else{return isc.SB.concat("",_1,">")}}
,isc.A.$ex=function isc_c_Comm__xmlValue(_1,_2,_3,_4,_5){if(_3=="base64Binary"){_2=""}
if(_3=="nil"){return isc.Comm.$36u(_1,null,_4,_5,true)+" xsi:nil=\"true\"/>"}
return isc.StringBuffer.concat(isc.Comm.$36u(_1,_3,_4,_5),_2,isc.Comm.$36v(_1,_4,_5))}
);isc.B._maxIndex=isc.C+9;isc.defineClass("XMLDoc").addMethods({addPropertiesOnCreate:false,init:function(_1,_2){this.nativeDoc=_1;this.namespaces=_2;this.documentElement=this.nativeDoc.documentElement},hasParseError:function(){if(isc.Browser.isIE){var _1=this.nativeDoc.parseError;return _1!=null&&_1!=0}
return this.nativeDoc.documentElement&&this.nativeDoc.documentElement.tagName=="parsererror"},addNamespaces:function(_1){this.namespaces=this.$363(_1);if(this.$364){var _2=isc.xml.xmlResponses.find("ID",this.$364);if(_2)_2.xmlNamespaces=this.namespaces}},$363:function(_1){if(_1==null)return this.namespaces;if(this.namespaces==null)return _1;return isc.addProperties({},this.namespaces,_1)},selectNodes:function(_1,_2,_3){return isc.xml.selectNodes(this.nativeDoc,_1,this.$363(_2),_3)},selectString:function(_1,_2){return isc.xml.selectString(this.nativeDoc,_1,this.$363(_2))},selectNumber:function(_1,_2){return isc.xml.selectNumber(this.nativeDoc,_1,this.$363(_2))},selectScalar:function(_1,_2,_3){return isc.xml.selectScalar(this.nativeDoc,_1,this.$363(_2),_3)},selectScalarList:function(_1,_2){return isc.xml.selectScalarList(this.nativeDoc,_1,this.$363(_2))},getElementById:function(_1){return this.nativeDoc.getElementById(_1)},getElementsByTagName:function(_1){return this.nativeDoc.getElementsByTagName(_1)}});isc.XMLDoc.getPrototype().toString=function(){return"[XMLDoc <"+this.documentElement.tagName+">]"};isc.defineClass("XMLTools").addClassProperties({httpProxyURL:"[ISOMORPHIC]/HttpProxy"});isc.A=isc.XMLTools;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.xmlResponses=[];isc.A.$365=0;isc.A.xmlDOMConstructors=["MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];isc.A.mozAnchorBug=isc.Browser.isMoz&&(isc.Browser.geckoVersion<20080205)&&window.location.href.indexOf("#")!=-1;isc.A.$pa="*";isc.A.$366=":";isc.A.$27c="List";isc.A.$45s="xmlToJS";isc.A.$45t="type";isc.A.$367="xsi:type";isc.A.$71v="ref";isc.A.$gy="number";isc.A.$71f="xmlns:";isc.A.$45u={nil:"xsi:nil","null":"xsi:null",type:"xsi:type"};isc.A.xsiNamespaces=["http://www.w3.org/2001/XMLSchema-instance","http://www.w3.org/1999/XMLSchema-instance"];isc.A.$45v="nil";isc.A.$45w="null";isc.A.$18r="false";isc.A.$w0="0";isc.A.$ho="[";isc.A.useClientXML=true;isc.B.push(isc.A.loadXML=function isc_c_XMLTools_loadXML(_1,_2,_3){_3=_3||{};_3.operationType=_3.operationType||"loadXML";this.getXMLResponse(isc.addProperties({actionURL:_1,httpMethod:"GET",callback:_2},_3))}
,isc.A.getXMLResponse=function isc_c_XMLTools_getXMLResponse(_1){_1.$37b=_1.callback;_1.callback={target:this,methodName:"$37c"};_1.httpMethod=_1.httpMethod||"POST";this.logInfo("loading XML from: "+_1.actionURL,"xmlComm");isc.rpc.sendProxied(_1)}
,isc.A.$37c=function isc_c_XMLTools__getXMLResponseReply(_1,_2,_3){if(_1.isStructured){this.fireCallback(_3.$37b,"xmlDoc,xmlText,rpcResponse,rpcRequest",[null,null,_1,_3]);return}
var _4=_1.httpResponseText,_5=this.parseXML(_4);if(this.logIsInfoEnabled("xmlComm")){this.logInfo("XML reply with text: "+(this.logIsDebugEnabled("xmlComm")?_4:this.echoLeaf(_4)),"xmlComm")}
var _6=this.xmlResponses;var _7=isc.Log.logViewer;if(this.logIsDebugEnabled("xmlComm")||(isc.Page.isLoaded()&&_7&&_7.logWindowLoaded()))
{var _8=this.$365++;_6.add({ID:_8,text:_4});if(_5)_5.$364=_8;if(_6.length>10)_6.shift();if(_7&&_7.logWindowLoaded()&&_7._logWindow!=null){_7._logWindow.updateCommWatcher()}}else{_6.length=0}
this.fireCallback(_3.$37b,"xmlDoc,xmlText,rpcResponse,rpcRequest",[_5,_4,_1,_3])}
,isc.A.parseXML=function isc_c_XMLTools_parseXML(_1,_2){if(_1==null)return;_1=this.trimXMLStart(_1);var _3;if(!isc.Browser.isIE){try{if((this.mozAnchorBug||this.useAnchorWorkaround)&&this.useAnchorWorkaround!==false)
{var _4="";if(!isc.Page.isLoaded()){document.write(_4)}else{isc.Element.insertAdjacentHTML(document.getElementsByTagName("body")[0],"beforeEnd",_4)}
var _5=document.getElementById("isc_parseXMLFrame");var _6=_5.contentWindow;window.isc.xmlSource=_1;_6.location.href="javascript:top.isc.parsedXML="+"new top.isc.XMLTools.getXMLParser().parseFromString(top.isc.xmlSource, 'text/xml')";_3=window.isc.parsedXML;isc.xmlSource=isc.parsedXML=null;_5.parentNode.removeChild(_5)}else{_3=this.getXMLParser().parseFromString(_1,"text/xml")}}catch(e){if(!_2)this.$37d(this.echo(e));return null}
if(!_2&&_3.documentElement&&_3.documentElement.tagName=="parsererror")
{this.$37d(_3.documentElement.textContent);return null}
return isc.XMLDoc.create(_3)}
_3=this.getXMLParser();if(!_3){this.$37a("XMLTools.parseXML()");return}
_3.loadXML(_1);if(_3.parseError!=0){var _7=_3.parseError;if(!_2){this.$37d("\rReason: "+_7.reason+"Line number: "+_7.line+", character: "+_7.linepos+"\rLine contents: "+_7.srcText+(!isc.isA.emptyString(_7.url)?"\rSource URL: "+_7.url:""))}
return null}
return isc.XMLDoc.create(_3)}
,isc.A.trimXMLStart=function isc_c_XMLTools_trimXMLStart(_1){if(_1.indexOf(""));if(_2){_1=_1.substring(_2[0].length)}}
if(isc.Browser.isIE&&_1.indexOf(""));if(_2){_1=_1.substring(_2[0].length)}}
return _1}
,isc.A.$37d=function isc_c_XMLTools__logParseError(_1,_2){this.logWarn("Error parsing XML: "+_1+(this.logIsDebugEnabled("parseXML")?"\rXML was:\r"+_2+"\rTrace:"+this.getStackTrace():""),"parseXML")}
,isc.A.getXMLParser=function isc_c_XMLTools_getXMLParser(){if(!isc.Browser.isIE){if(!this.$37e)this.$37e=new DOMParser();return this.$37e}
var _1;if(this.$37f){_1=new ActiveXObject(this.$37f)}else{for(var i=0;i0)_23=_24}
if(!_3||_17==null||_17.type==null){if(this.logIsDebugEnabled(this.$45s)){this.logDebug("applying schemaless transform at: "+(_3?_3.ID:"[schemaless]")+"."+_21,"xmlToJS")}
_22=this.toJS(_23,null,null,_4,_5)}else{var _25=_3.getSchema(_17.type);if(_25!=null){var _26=_17.propertiesOnly?{propertiesOnly:true}:_5;_22=this.toJS(_23,null,_25,_4,_26);if(this.logIsDebugEnabled(this.$45s)){this.logDebug("complexType field: "+this.echoLeaf(_17)+" got value: "+this.echoLeaf(_22),"xmlToJS")}}else{if(isc.isAn.Array(_23)){_22=[];for(var j=0;j<_23.length;j++){_22.add(_3.validateFieldValue(_17,this.getElementText(_23[j])))}}else{_22=_3.validateFieldValue(_17,this.getElementText(_23))}
if(this.logIsDebugEnabled(this.$45s)){this.logDebug("simpleType field: "+this.echoLeaf(_17)+" got value: "+this.echoLeaf(_22),"xmlToJS")}}}
if(_17&&_17.multiple){if(_22==null||isc.isA.emptyString(_22))_22=[];else if(!isc.isAn.Array(_22))_22=[_22]}
if(_8[_21]){if(!isc.isAn.Array(_8[_21]))_8[_21]=[_8[_21]];if(_17&&_17.multiple&&isc.isAn.Array(_22)){_8[_21].addList(_22)}else{_8[_21].add(_22)}}else{_8[_21]=_22}}
if(!_19){var _28=this.getElementText(_1),_29=_5.textContentProperty||(_3?_3.textContentProperty:"xmlTextContent");if(_3){_17=_3.getTextContentField();if(_17)_28=_3.validateFieldValue(_17,_28)}
if(_28!=null&&!isc.isAn.emptyString(_28)){_8[_29]=_28}}
if(_4&&_3&&(_3.instanceConstructor||_3.Constructor)){var _30=_3.instanceConstructor||_3.Constructor;if(_5!=null&&_5.propertiesOnly){_8._constructor=_30}else if(isc.ClassFactory.getClass(_30)!=null){return isc.ClassFactory.newInstance(_30,_8)}}
return _8}
,isc.A.getExplicitType=function isc_c_XMLTools_getExplicitType(_1,_2){if(_1==null||this.isTextNode(_1))return;var _3=this.getXSIAttribute(_1,this.$45t);if(_3){if(_3.contains(isc.colon))_3=_3.substring(_3.indexOf(isc.colon)+1);return _3}
if(_2)_3=_1.getAttribute("constructor");return _3}
,isc.A.isRefElement=function isc_c_XMLTools_isRefElement(_1){if(_1==null||this.isTextNode(_1)){return false}
var _2=_1.getAttribute(this.$71v);if(_2&&_1.attributes.length==1&&!this.hasElementChildren(_1))return _2}
,isc.A.toComponents=function isc_c_XMLTools_toComponents(_1,_2){if(isc.DS.get("Canvas")==null){this.logWarn("Can't find schema for Canvas - make sure you've loaded"+" component schema via jsp tag"+" or by some other mechanism")}
if(isc.isA.String(_1)){var _3=this.parseXML(_1,true);if(_3.hasParseError()){this.logWarn("xml failed to parse xmlDoc, wrapping in root node");_3=this.parseXML(""+_1+" ")}
_1=_3}
return this.toJS(_1,null,null,true,_2)}
,isc.A.getFieldValue=function isc_c_XMLTools_getFieldValue(_1,_2,_3,_4,_5){if(_1.ownerDocument==null)return _1[_2];_3=_3||(_4?_4.getField(_2):isc.emptyObject);try{var _6;if(_3.valueXPath){var _7=(_4?_4.getSchema(_3.type):isc.DS.get(_3.type));if(_7){var _8=isc.xml.selectNodes(_1,_3.valueXPath,_5),_9=isc.xml.toJS(_8,null,_7);if(!_3.multiple&&_9.length==1)_9=_9[0];return _9}else{_6=isc.xml.selectScalar(_1,_3.valueXPath,_5)}}else{_6=isc.xml.getXMLFieldValue(_1,_2)}
_4=_4||isc.DS.get("Object");_6=_4.validateFieldValue(_3,_6);return _6}catch(e){this.logWarn("error getting value for field: '"+_2+(_3.valueXPath?"', valueXPath: '"+_3.valueXPath:"")+"' in record: "+this.echo(_1)+"\r: "+this.echo(e)+this.getStackTrace());return null}}
,isc.A.getXMLFieldValue=function isc_c_XMLTools_getXMLFieldValue(_1,_2){var _3=_1.getAttribute(_2);if(_3!=null)return _3;var _4=_1.getElementsByTagName(_2)[0];if(_4==null)return null;return(isc.Browser.isIE?_4.text:_4.textContent)}
,isc.A.$37g=function isc_c_XMLTools__hasDataAttributes(_1){for(var _2 in _1){if(_2==this.$367)continue;return true}
return false}
,isc.A.getAttributes=function isc_c_XMLTools_getAttributes(_1,_2,_3,_4,_5){_3=_3||{};var _6;if(_2){if(!isc.isAn.Array(_2))_2=[_2];for(var i=0;i<_2.length;i++){var _8=_2[i];if(_4&&_3[_8]!==_6)continue;var _9=_1.getAttribute(_8);if(_9==null||isc.isAn.emptyString(_9))continue;if(_5&&_5.getField(_8)){_9=_5.validateFieldValue(_5.getField(_8),_9)}
_3[_8]=_9}
return _3}
var _10=_1.attributes;if(_10!=null){for(var i=0;i<_10.length;i++){var _11=_10[i],_8=_11.name;if(_4&&_3[_8]!==_6)continue;if(isc.startsWith(_8,this.$71f)&&_5&&_5.dropNamespaceDeclarations)continue;var _9=_11.value;if(_9==null||isc.isAn.emptyString(_9))continue;if(_5&&_5.getField(_8)){_9=_5.validateFieldValue(_5.getField(_8),_9)}
_3[_8]=_9}}
return _3}
,isc.A.getXSIAttribute=function isc_c_XMLTools_getXSIAttribute(_1,_2){var _3;if(isc.Browser.isOpera){for(var i=0;i4000)return _1.textContent;return _3}
,isc.A.isTextNode=function isc_c_XMLTools_isTextNode(_1){if(_1==null)return false;var _2=_1.nodeType;return(_2==3||_2==4||_2==8)}
,isc.A.hasElementChildren=function isc_c_XMLTools_hasElementChildren(_1){return this.firstElementChild(_1)!=null}
,isc.A.firstElementChild=function isc_c_XMLTools_firstElementChild(_1){if(_1==null||(_1.hasChildNodes!=null&&_1.hasChildNodes()==false))return null;var _2=_1.childNodes;if(!_2)return null;var _3=_2.length;for(var i=0;i<_3;i++){var _5=_2[i];if(!this.isTextNode(_5))return _5}
return null}
,isc.A.setAttributes=function isc_c_XMLTools_setAttributes(_1,_2){var _3;for(var _4 in _2){var _5=_2[_4];if(_5==null){_1.removeAttribute(_4);continue}
if(isc.Browser.isIE&&(_5===true||_5===false)){_5=isc.emptyString+_5}
_1.setAttribute(_4,_2[_4])}}
,isc.A.$37h=function isc_c_XMLTools__makeIEDefaultNamespaces(_1,_2){var _3=isc.SB.create(),_4=_1.documentElement,_2=_2||isc.emptyObject,_5;if(!_2["default"]){_5=this.$45x(_4);if(_5)_3.append('xmlns:default="',_5,'" ')}
var _6=_1.documentElement.attributes;for(var i=0;i<_6.length;i++){var _8=_6[i],_9=_8.prefix;if(_9=="xmlns"&&_9!=_8.name){if(_2[_8.baseName]!=null)continue;_3.append(_8.name,'="',_8.value,'" ')}}
return _3.toString()}
,isc.A.$45x=function isc_c_XMLTools__deriveDefaultNamespace(_1){var _2=this.logIsDebugEnabled("xmlSelect");if((_1.prefix==null||isc.isAn.emptyString(_1.prefix))&&_1.namespaceURI)
{if(_2){this.logWarn("using docElement ns, prefix: "+_1.prefix,"xmlSelect")}
return _1.namespaceURI}else if(_1.firstChild){var _3
for(var i=0;i<_1.childNodes.length;i++){var _5=_1.childNodes[i];if(_5.nodeType==3)continue;var _6=_5.namespaceURI;if(!_6)break;if(_5.prefix==null||isc.isAn.emptyString(_5.prefix)){_3=_5.namespaceURI;break}}
if(_3!=null){if(_2){this.logDebug("using default namespace detected on child: "+_3,"xmlSelect")}}
if(_3==null&&_1.namespaceURI){_3=_1.namespaceURI;if(_2){this.logDebug("using document element's namespace as default namespace: "+_3,"xmlSelect")}}
if(!_3)_3="http://openuri.org/defaultNamespace";return _3}}
,isc.A.selectObjects=function isc_c_XMLTools_selectObjects(_1,_2,_3){if(isc.contains("|")){var _4=_2.split(/|/),_5=[];for(var i=0;i<_4.length;i++){_5.addList(this.selectObjects(_4[i],_1))}
return _5}
var _7=isc.isAn.Array(_1)?_1:[_1];if(_2!=isc.slash){if(isc.startsWith(_2,isc.slash))_2=_2.substring(1);var _8=_2.split(/[\/@]/);_7=this.$37i(_8,_7,isc.slash)}
if(_3&&_7.length<=1)return _7[0];return _7}
,isc.A.$37i=function isc_c_XMLTools__selectObjects(_1,_2,_3){var _4=_1[0];_1=_1.length>1?_1.slice(1):null;if(_2==null)return null;var _5,_6=_4,_7=_4.indexOf(this.$ho);if(_7!=-1){_6=_4.substring(0,_7);_5=_4.substring(_7+1,_4.length-1)}
var _8=[];for(var i=0;i<_2.length;i++){var _10=_2[i];if(_6!=isc.star){_10=_10[_6]}else{var _11=isc.getValues(_10);_10=[];for(var i=0;i<_11.length;i++){if(!isc.isAn.Array(_11[i]))_10.add(_11[i]);else _10.addList(_11[i])}}
if(_10==null)continue;if(!isc.isAn.Array(_10)){_8.add(_10)}else{_8.addList(_10)}}
if(_5){var _12=this.$37j(_8,_5);_8=_12}
if(_1==null||_1.length==0)return _8;_3+=_4+isc.slash;return this.$37i(_1,_8,_3)}
,isc.A.$37j=function isc_c_XMLTools__applyPredicateExpression(_1,_2){var _3=parseInt(_2);if(!isNaN(_3)){return[_1[_3-1]]}
if(_2=="last()")return[_1.last()];var _4=_2.match(/^([a-zA-Z_0-9:\-\.\(\)]*)\s*(<|>|!=|=|<=|>=|)\s*(.*)$/),_5,_6,_7;if(_4==null){if(!_2.match(/^[a-zA-Z_0-9:\-\.]*$/)){this.logWarn("couldn't parse predicate expression: "+_2);return null}
_5=_2}else{_5=_4[1],_6=_4[2],_7=_4[3]}
if(_6=="=")_6="==";if(_7=="true()")_7=true;else if(_7=="false()")_7=false;if(_5=="position()")_5="position";var _8=new Function("item,position","return "+(_5!="position"?"item.":"")+_5+(_6?_6+_7:""));var _9=[];for(var i=0;i<_1.length;i++){if(_8(_1[i],i+1))_9.add(_1[i])}
return _9}
,isc.A.selectNodes=function isc_c_XMLTools_selectNodes(_1,_2,_3,_4){if(isc.isA.String(_1)){_1=this.parseXML(_1)}
if(isc.Browser.isSafari&&(isc.Browser.isApollo||(isc.Browser.safariVersion<522)))
{this.$37a("XPath");return this.safariSelectNodes(_1,_2,_3,_4)}
if(isc.isAn.XMLDoc(_1)){return _1.selectNodes(_2,_3,_4)}
var _5=isc.timestamp();var _6=this.$37k(_1,_2,_3,_4);var _7=isc.timestamp();if(this.logIsInfoEnabled("xmlSelect")){this.logInfo("selectNodes: expression: "+_2+" returned "+this.echoLeaf(_6)+": "+(_7-_5)+"ms","xmlSelect")}
return _6}
,isc.A.safariSelectNodes=function isc_c_XMLTools_safariSelectNodes(_1,_2,_3,_4){var _5=[];if(!_2){return null}
var _6=_2.substring(_2.indexOf(":")+1);var _7;if(_6.endsWith("/*")){_7=true;_6=_6.substring(0,_6.indexOf("/*"))}
var _8=_1.getElementsByTagName(_6);if(_7&&_8.length>0){var _9=_8[0];_8=_9.childNodes}
for(var i=0;i<_8.length;i++){if(_8[i].nodeType==3)continue;_5.add(_8[i])}
if(_7&&_5.length==1)_5=_5[0];return _5}
,isc.A.$37l=function isc_c_XMLTools__generateNamespaces(_1,_2,_3){if(_1==null)return isc.emptyString;if(_2==null)_2=isc.getKeys(_1);var _4=isc.SB.create(),_3=(_3!=null?"\n"+_3:"");for(var i=0;i<_2.length;i++){var _6=_2[i];_4.append(_3," xmlns:",_6,'="',_1[_6],'"')}
return _4.toString()}
,isc.A.$53z=function isc_c_XMLTools__getDefaultNamespace(_1){var _2=_1.lookupNamespaceURI("");if(isc.Browser.isSafari&&(_2==null||_2=="")){_2=_1.getAttribute("xmlns")}
if(_2==null)_2=_1.namespaceURI;if(_2==null)_2="";return _2}
,isc.A.$37k=function isc_c_XMLTools__selectNodes(_1,_2,_3,_4){if(_1==null)return;var _5=_1.ownerDocument;if(_5==null&&_1.documentElement){_5=_1;_1=_5.documentElement}
if(_5==null)return null;if(isc.Browser.isIE){if(isc.Browser.version>5.5){_5.setProperty("SelectionLanguage","XPath");var _6=this.$37h(_5,_3);if(_3)_6+=this.$37l(_3);if(this.logIsDebugEnabled("xmlSelect")){this.logDebug("selectNodes: expression: "+_2+", using namespaces: "+_6,"xmlSelect")}
_5.setProperty("SelectionNamespaces",_6)}
if(_4)return _1.selectSingleNode(_2);var _7=_1.selectNodes(_2);return this.$37m(_7)}
var _8=_5.createNSResolver(_5.documentElement),_9=this.$53z(_5.documentElement);if(this.logIsDebugEnabled("xmlSelect")){this.logDebug("Using namespaces: "+isc.echo(_3)+", defaultNamespace: '"+_9+"'","xmlSelect")}
var _10=function(_12){if(_3&&_3[_12])return _3[_12];if(_12=="default")return _9;return _8.lookupNamespaceURI(_12)};var _11=_5.evaluate(_2,_1,_10,0,null);if(_4)return _11.iterateNext();return this.$37m(_11)}
,isc.A.$37m=function isc_c_XMLTools__nodeListToArray(_1){var _2=[];if(isc.Browser.isIE||_1.iterateNext==null){for(var i=0;i<_1.length;i++){_2.add(_1.item(i))}}else{var _4;while(_4=_1.iterateNext()){_2.add(_4)}}
return _2}
,isc.A.getElementChildren=function isc_c_XMLTools_getElementChildren(_1){var _2=[],_3=_1.childNodes;for(var i=0;i<_3.length;i++){var _5=_3[i];if(this.isTextNode(_5))continue;_2.add(_5)}
return _2}
,isc.A.selectString=function isc_c_XMLTools_selectString(_1,_2,_3){return this.selectScalar(_1,_2,_3)}
,isc.A.selectNumber=function isc_c_XMLTools_selectNumber(_1,_2,_3){return this.selectScalar(_1,_2,_3,true)}
,isc.A.selectScalar=function isc_c_XMLTools_selectScalar(_1,_2,_3,_4){if(isc.isA.String(_1))_1=this.parseXML(_1);if(isc.isAn.XMLDoc(_1))return _1.selectScalar(_2,_3,_4);var _5;if(isc.Browser.isSafari&&isc.Browser.isApollo||(isc.Browser.safariVersion<522)){var _6=_2.substring(_2.indexOf(":")+1);_5=_1.getElementsByTagName(_6)[0]}else{_5=this.selectNodes(_1,_2,_3,true)}
if(_5==null)return null;var _7=this.getElementText(_5);return _4?parseInt(_7):_7}
,isc.A.selectScalarList=function isc_c_XMLTools_selectScalarList(_1,_2,_3){if(isc.isA.String(_1))_1=this.parseXML(_1);if(isc.isAn.XMLDoc(_1))return _1.selectScalarList(_2,_3);var _4=this.selectNodes(_1,_2,_3);for(var i=0;i<_4.length;i++){_4[i]=_4[i].nodeValue}
return _4}
,isc.A.transformNodes=function isc_c_XMLTools_transformNodes(_1,_2){if(isc.isAn.XMLDoc(_1))_1=_1.nativeDoc;if(isc.isAn.XMLDoc(_2))_2=_2.nativeDoc;if(isc.Browser.isIE){return _1.transformNode(_2)}
var _3=new XSLTProcessor();_3.importStylesheet(_2);if(isc.Browser.isMoz&&this.mozAnchorBug&&isc.Browser.geckoVersion<20051107){var _4=document.implementation.createDocument("","test",null);var _5=_3.transformToFragment(_1,_4);return new XMLSerializer().serializeToString(_5)}
var _6=_3.transformToDocument(_1);return new XMLSerializer().serializeToString(_6)}
,isc.A.serializeToString=function isc_c_XMLTools_serializeToString(_1){this.$37n=this.$37n||isc.xml.parseXML('\r'+' \r'+' \r'+'\r'+' \r'+' \r'+' ');return this.transformNodes(_1,this.$37n)}
,isc.A.loadXMLSchema=function isc_c_XMLTools_loadXMLSchema(_1,_2,_3,_4,_5){_3=_3||{};_3.operationType=_3.operationType||"loadXMLSchema";this.loadWSDL(_1,_2,_3,_4,_5,true)}
,isc.A.loadWSDL=function isc_c_XMLTools_loadWSDL(_1,_2,_3,_4,_5,_6){if(!this.$37o){var _7=isc.Page.getIsomorphicClientDir()+"schema/schemaTranslator.xsl";_7=_7.replace(/https?:\/\/[^\/]*\//,"/");this.$37o="LOADING";isc.xml.loadXML(_7,function(_9,_10,_11){isc.xml.logDebug("schema translator loaded");if(isc.Browser.isMoz&&_11.xmlHttpRequest&&_11.xmlHttpRequest.responseXML)
{isc.xml.$37o=isc.XMLDoc.create(_11.xmlHttpRequest.responseXML)}else{isc.xml.$37o=_9}
isc.xml.loadWSDL(_1,_2,_3,_4,_5,_6)});return}
_3=_3||{};_3.operationType=_3.operationType||"loadWSDL";var _8={location:_1,callback:_2,autoLoadImports:_4,wsProperties:_5||{},returnSchemaSet:_6};isc.xml.loadXML(_1,function(_9,_10,_11,_12){_8.rpcResponse=_11;_8.rpcRequest=_12;isc.xml.$37p(_9,_8)},_3)}
,isc.A.loadWSDLFromXML=function isc_c_XMLTools_loadWSDLFromXML(_1,_2,_3,_4,_5){if(isc.isA.String(_1))_1=isc.xml.parseXML(_1);this.$37p(_1,{callback:_2,autoLoadImports:_3,wsProperties:_4,returnSchemaSet:_5})}
,isc.A.$37p=function isc_c_XMLTools__loadSchemaReply(_1,_2){if(!isc.isAn.XMLDoc(this.$37o)){this.logInfo("deferred schema translator, schema translator not loaded","xmlComm");isc.Timer.setTimeout({methodName:"$37p",target:this,args:[_1,_2]});return}
this.logInfo("transforming schema: "+this.echoLeaf(_1)+" with translator "+this.echoLeaf(this.$37o),"xmlComm");var _3=this.transformNodes(_1,this.$37o);if(this.logIsDebugEnabled("xmlComm")){this.logWarn("XML service definition is: \n"+_3)}
var _4=_2.wsProperties,_5=_4.initiator;if(_4.captureXML){_4.xmlSource=_3;if(_5)_5.addImportXMLSource(_3,_2.location)}
if(this.useClientXML){var _1=isc.xml.parseXML(_3),_6=this.$37m(_1.documentElement.childNodes),_7=this.toJS(_6,null,null,true);this.$37q(_2);return}
this.logInfo("about to call serverToJS with: "+this.echoLeaf(_3)+", callback: "+this.echo(_2.callback),"xmlComm");this.serverToJS(_3,function(){isc.Log.logWarn("serverToJS returned");isc.xml.$37q(_2)})}
,isc.A.$37q=function isc_c_XMLTools__loadSchemaToJSReply(_1){var _2;if(_1.returnSchemaSet){_2=isc.SchemaSet.$37r}else{_2=isc.WebService.$37r||isc.SchemaSet.$37r}
isc.WebService.$37r=isc.SchemaSet.$37r=null;_2.location=_1.location;if(_1.wsProperties)_2.setProperties(_1.wsProperties);var _3=(isc.isA.WebService(_2)?"service":"schemaSet")+",rpcRequest";var _4=[_2,_1.rpcRequest];if(_1.autoLoadImports&&_2.loadImports){var _5=this;_2.loadImports(function(){_5.$41k(_1.callback,_3,_4)})}else{this.$41k(_1.callback,_3,_4)}}
,isc.A.$41k=function isc_c_XMLTools__completeLoad(_1,_2,_3){this.fireCallback(_1,_2,_3)}
,isc.A.getCompleteSource=function isc_c_XMLTools_getCompleteSource(_1,_2,_3){var _4=_1.importSources;if(!_4)return"";_4=_4.getProperty("xmlText");_4.unshift(_1.xmlSource);_4=this.map("trimXMLStart",_4);var _5=_4.join("\n");if(_3){this.fireCallback(_2,"source",[_5]);return}
this.toJSCode(_5,function(_6,_7){this.fireCallback(_2,"source",[_7])})}
);isc.B._maxIndex=isc.C+53;isc.xml=isc.XML=isc.XMLTools;isc.defineClass("DataSource");isc.DS=isc.DataSource;isc.A=isc.DataSource;isc.A.dataSourceObjectSuffix="DS";isc.A._dataSources={};isc.A.$54v={};isc.A.$54w={};isc.A.$532="element";isc.A.$45t="type";isc.A.TABLE="table";isc.A.VIEW="view";isc.A.loaderURL="[ISOMORPHIC]/DataSourceLoader";isc.A.$37t="";isc.A.$37u="";isc.A.$51y=" ";isc.A.$37v="";isc.A=isc.DataSource;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$748="ref:";isc.A.serializeTimeAsDatetime=false;isc.A.$78d=[];isc.A.maxResponsesToCache=100;isc.A.offlineMessage="This data not available while offline";isc.B.push(isc.A.isLoaded=function isc_c_DataSource_isLoaded(_1){if(!_1)return false;if(isc.isA.DataSource(_1)||this._dataSources[_1])return true;return false}
,isc.A.getDataSource=function isc_c_DataSource_getDataSource(_1,_2,_3,_4){if(!_1)return null;if(isc.isA.DataSource(_1))return _1;if(isc.startsWith(_1,this.$748)){_1=_1.substring(4)}
if(_4&&isc.WebService){if(_4==isc.DS.$532)return this.$54v[_1];if(_4==isc.DS.$45t)return this.$54w[_1];return null}
var _5=this._dataSources[_1];if(!_5){_5=this.$37x(_1,_2);if(_5)_5.ID=_1}
if(_5){if(_2){this.fireCallback(_2,"ds",[_5],_5)}
return _5}
if(_2){this.loadSchema(_1,_2,_3)}
return null}
,isc.A.loadSchema=function isc_c_DataSource_loadSchema(_1,_2,_3){this.logWarn("Attempt to load schema for DataSource '"+_1+"'. This dataSource cannot be found. To load DataSources from the server without "+"explicit inclusion in your application requires optional SmartClient server "+"support - not present in this build.");return null}
,isc.A.get=function isc_c_DataSource_get(_1,_2,_3,_4){return this.getDataSource(_1,_2,_3,_4)}
,isc.A.$37x=function isc_c_DataSource__loadDataSource(_1,_2){if(_2)return null;if(_1!=isc.auto&&this.logIsDebugEnabled()){this.logDebug("isc.DataSource '"+_1+"' not present")}
return null}
,isc.A.getRegisteredDataSources=function isc_c_DataSource_getRegisteredDataSources(){return isc.getKeys(this._dataSources)}
,isc.A.isRegistered=function isc_c_DataSource_isRegistered(_1){if(this._dataSources[_1])return true;return false}
,isc.A.getForeignFieldName=function isc_c_DataSource_getForeignFieldName(_1){var _2=_1.foreignKey,_3=_2.indexOf(".");if(_3==-1)return _2;return _2.substring(_3+1)}
,isc.A.getForeignDSName=function isc_c_DataSource_getForeignDSName(_1,_2){var _3=_1.foreignKey,_4=_3.indexOf(".");if(_4==-1)return isc.isA.String(_2)?_2:_2.ID;return _3.substring(0,_4)}
,isc.A.registerDataSource=function isc_c_DataSource_registerDataSource(_1){if(this.logIsInfoEnabled()){this.logInfo("Registered new isc.DataSource '"+_1.ID+"'")}
if(_1.ID){var _2=this._dataSources[_1.ID];if(!_2||!_1.schemaNamespace){this._dataSources[_1.ID]=_1}}
if(isc.Schema&&isc.isA.Schema(_1)){if(isc.isAn.XSElement(_1))this.$54v[_1.ID]=_1;else if(isc.isAn.XSComplexType(_1))this.$54w[_1.ID]=_1;return}
var _3=_1.getLocalFields(true);var _4=this.$37z=(this.$37z||{});for(var _5 in _3){var _6=_3[_5];if(_6.foreignKey==null)continue;var _7=this.getForeignDSName(_6,_1);if(isc.DS.isRegistered(_7)){isc.DS.get(_7).addChildDataSource(_1)}else{if(_4[_7]==null){_4[_7]=[]}
_4[_7].add(_1)}}
var _8=_4[_1.ID];if(_8!=null){_1.map("addChildDataSource",_8);_4[_1.ID]=null}
var _9=this.$370=this.$370||{};if(_1.childRelations){for(var i=0;i<_1.childRelations.length;i++){var _11=_1.childRelations[i],_12=_11.dsName,_13=isc.DS.get(_12);if(_13){this.$371(_1,_13,_11)}else{if(_9[_12]==null){_9[_12]=[]}
_11.parentDS=_1.ID;_9[_12].add(_11)}}}
var _14=_9[_1.ID];if(_14){for(var i=0;i<_14.length;i++){var _11=_14[i];this.$371(isc.DS.get(_11.parentDS),_1,_11)}}}
,isc.A.$371=function isc_c_DataSource__addChildRelation(_1,_2,_3){_1.addChildDataSource(_2);if(!_3.fieldName)return;var _4=_2.getField(_3.fieldName);if(!_4.foriegnKey){_4.foreignKey=_1.ID+"."+_1.getPrimaryKeyFieldNames()[0]}}
,isc.A.getInheritanceDistance=function isc_c_DataSource_getInheritanceDistance(_1,_2){var _3=isc.ClassFactory.getClass(_1),_4=isc.ClassFactory.getClass(_2);if(_3==null||_4==null){this.logWarn("Invalid superclass and/or subclass argument provided");return-1}
if(!_4.isA(_1)){this.logWarn(_2+" is not a subclass of "+_1);return-1}
for(var _5=0;_4!=_3;_5++){_4=_4.getSuperClass()}
return _5}
,isc.A.isSimpleTypeValue=function isc_c_DataSource_isSimpleTypeValue(_1){if(_1!=null&&(!isc.isAn.Object(_1)||isc.isA.Date(_1)))return true;return false}
,isc.A.getNearestSchema=function isc_c_DataSource_getNearestSchema(_1){if(_1==null)return null;var _2;if(isc.isA.String(_1))_2=_1;else{_2=isc.isAn.Instance(_1)?_1.getClassName():_1._constructor||_1.type||_1.$schemaId}
var _3=isc.DS.get(_2);var _4=isc.ClassFactory.getClass(_2);if(_4!=null){var _5=null;while(_3==null&&(_4=_4.getSuperClass())!=null&&_4!=_5)
{_3=isc.DS.get(_4.getClassName());_5=_4}}
return _3||isc.DS.get("Object")}
,isc.A.getNearestSchemaClass=function isc_c_DataSource_getNearestSchemaClass(_1){if(_1==null)return null;var _2;while(_2==null){var _1=isc.DS.get(_1);if(_1==null)return null;_2=isc.ClassFactory.getClass(_1._constructor||_1.Constructor||_1.type);if(_2!=null)return _2;_1=_1.inheritsFrom;if(!_1)return null}
return null}
,isc.A.$372=function isc_c_DataSource__getStandardOperationType(_1){switch(_1){case"fetch":case"select":case"filter":return"fetch";case"add":case"insert":return"add";case"update":return"update";case"remove":case"delete":return"remove";default:return _1}}
,isc.A.isClientOnly=function isc_c_DataSource_isClientOnly(_1){if(isc.isA.String(_1))_1=this.getDataSource(_1);if(!_1)return false;return _1.clientOnly}
,isc.A.makeDefaultOperation=function isc_c_DataSource_makeDefaultOperation(_1,_2,_3){var _4=isc.rpc.app();if(isc.isA.DataSource(_1))_1=_1.ID;if(!_1){_1="auto"}else if(_3){var _5=isc.DataSource.get(_1);if(isc.isA.DataSource(_5)){if(!_5.createdOperations)_5.createdOperations={};var _6=_5.createdOperations[_3];if(_6==null){_6={ID:_3,dataSource:_1,type:_2,filterType:"paged",loadDataOnDemand:true};_5.createdOperations[_3]=_6;return _6}}}
if(_4.operations==null)_4.operations={};_3=_3||_1+"_"+_2;var _6=_4.operations[_3];if(_6==null){_6={ID:_3,dataSource:_1,type:_2,filterType:"paged",loadDataOnDemand:true,source:"auto"};_4.operations[_3]=_6}
return _6}
,isc.A.handleUpdate=function isc_c_DataSource_handleUpdate(_1,_2){if(!this.isUpdateOperation(_2.operationType))return;var _3=this.get(_2.dataSource);_3.updateCaches(_1,_2)}
,isc.A.isUpdateOperation=function isc_c_DataSource_isUpdateOperation(_1){if(_1=="add"||_1=="update"||_1=="remove"||_1=="replace"||_1=="delete"||_1=="insert")return true}
,isc.A.getUpdatedData=function isc_c_DataSource_getUpdatedData(_1,_2,_3){var _4=this.get(_1.dataSource);return _4.getUpdatedData(_1,_2,_3)}
,isc.A.filterCriteriaForFormValues=function isc_c_DataSource_filterCriteriaForFormValues(_1){if(isc.DS.isAdvancedCriteria(_1))return _1;var _2={};for(var _3 in _1){var _4=_1[_3];if(_4==null||isc.is.emptyString(_4))continue;if(isc.isAn.Array(_4)){if(_4.length==0)continue;for(var i=0;i<_4.length;i++){var _6=_4[i];if(isc.isAn.emptyString(_6))continue}}
_2[_3]=_4}
return _2}
,isc.A.checkEmptyCriteria=function isc_c_DataSource_checkEmptyCriteria(_1,_2){if((_2||this.isAdvancedCriteria(_1))&&_1.criteria){if(_1.criteria.length==0)return null;for(var i=_1.criteria.length-1;i>=0;i--){var _4=_1.criteria[i],_5=false;if(!_4)_5=true;else{if(!_4.criteria){if(isc.isA.emptyObject(_4))_5=true}else{var _6=this.checkEmptyCriteria(_4,true);if(_6)_1.criteria[i]=_6;else _5=true}}
if(_5)_1.criteria.removeAt(i)}}
return _1}
,isc.A.load=function isc_c_DataSource_load(_1,_2,_3){if(!isc.isAn.Array(_1))_1=[_1];if(_1.length<=0){this.logWarn("No DataSource IDs passed in.");return}
var _4=[];for(var i=0;i<_1.length;i++){if(!this.isLoaded(_1[i])||_3)_4.add(_1[i])}
var _6=_4.join(","),_7=isc.DataSource.loaderURL+"?dataSource="+_6,_8=_1;;if(_4.length>0){isc.RPCManager.send(null,function(_9,_10,_11){if(_9.httpResponseCode==404){isc.warn("The DataSourceLoader servlet is not installed.");return null}
eval(_10);if(_2)this.fireCallback(_2,["dsID"],[_8])},{actionURL:_7,httpMethod:"GET",willHandleError:true})}else{this.logWarn("DataSource(s) already loaded: "+_1.join(",")+"\nUse forceReload to reload such DataSources");if(_2)this.fireCallback(_2,["dsID"],[_8])}}
,isc.A.getSortBy=function isc_c_DataSource_getSortBy(_1){if(!isc.isA.Array(_1))_1=[_1];var _2=[];for(var i=0;i<_1.length;i++){var _4=_1.get(i);_2.add((_4.direction=="descending"?"-":"")+_4.property)}
return _2}
,isc.A.getSortSpecifiers=function isc_c_DataSource_getSortSpecifiers(_1){if(!isc.isA.Array(_1))_1=[_1];var _2=[];for(var i=0;i<_1.length;i++){var _4=_1.get(i),_5="ascending",_6=_4;if(_4.substring(0,1)=="-"){_5="descending";_6=_4.substring(1)}
_2.add({property:_6,direction:_5})}
return _2}
,isc.A.isAdvancedCriteria=function isc_c_DataSource_isAdvancedCriteria(_1,_2){if(!_1)return false;if(!_2){return(_1&&_1._constructor=="AdvancedCriteria")}
if(!isc.isA.DataSource(_2))_2=this.get(_2);if(_1._constructor=="AdvancedCriteria")return true;if(_2.getField("fieldName")||_2.getField("operator"))return false;if(_2.getField(_1.fieldName)&&_2.getSearchOperator(_1.operator)){return true}
if(_1.fieldName&&_1.value&&(_1.operator&&_2.getSearchOperator(_1.operator))){return true}
var _3;if(_1.operator!=_3){var _4=_2.getSearchOperator(_1.operator);if(_4!=null&&(_4.isAnd||_4.isOr)){return true}}
return false}
,isc.A.getCriteriaFields=function isc_c_DataSource_getCriteriaFields(_1,_2,_3){if(_2&&!isc.isA.DataSource(_2))_2=this.get(_2);if(_3||(_2?_2.isAdvancedCriteria(_1):this.isAdvancedCriteria(_1)))
{var _4=[];this.$74s(_1,_4);return _4}
return isc.getKeys(_1)}
,isc.A.$74s=function isc_c_DataSource__getAdvancedCriteriaFields(_1,_2){if(_1.criteria){for(var i=0;i<_1.criteria.length;i++){isc.DS.$74s(_1.criteria[i],_2)}}else{_2.add(_1.fieldName)}}
,isc.A.cacheResponse=function isc_c_DataSource_cacheResponse(_1,_2){if(isc.Offline){var _3=isc.Offline.serialize(isc.Offline.trimRequest(_1));var _4=this.$78d.findIndex("requestKey",_3);if(_4!=-1){this.$78d.set(_4,_2)}else{if(this.$78d.length>=this.maxResponsesToCache){this.$78d.removeAt(0)}
this.$78d.add({requestKey:_3,dsResponse:_2})}}}
,isc.A.getCachedResponse=function isc_c_DataSource_getCachedResponse(_1){if(isc.Offline){var _2=isc.Offline.serialize(isc.Offline.trimRequest(_1));return this.$78d.find("requestKey",_2)}
return null}
);isc.B._maxIndex=isc.C+31;isc.A=isc.DataSource.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.addGlobalId=true;isc.A.dataFormat="iscServer";isc.A.callbackParam="callback";isc.A.preventHTTPCaching=true;isc.A.sendExtraFields=true;isc.A.transformResponseToJS=true;isc.A.supportsRequestQueuing=true;isc.A.copyLocalResults=true;isc.A.criteriaPolicy="dropOnShortening";isc.A.showPrompt=true;isc.A.autoDeriveTitles=true;isc.A.canMultiSort=true;isc.A.nullStringValue="";isc.A.nullIntegerValue=0;isc.A.nullFloatValue=0.0;isc.A.nullBooleanValue=false;isc.A.nullDateValue=new Date(0);isc.A.cacheMaxAge=60;isc.A.cacheLastFetchTime=0;isc.A.autoCacheAllData=false;isc.A.autoConvertRelativeDates=true;isc.B.push(isc.A.setCacheAllData=function isc_DataSource_setCacheAllData(_1){if(!_1){if(this.cacheAllData==true){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("setCacheAllData(false): clearing the cache and any "+"deferred requests","cacheAllData")}
this.cacheAllData=false;delete this.$85n;this.invalidateCache();this.clearDeferredRequests()}}else{if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("setCacheAllData(true): invalidate the cache","cacheAllData")}
this.cacheAllData=true;this.$85n=isc.timestamp();this.invalidateCache()}}
,isc.A.cacheNeedsRefresh=function isc_DataSource_cacheNeedsRefresh(){var _1=new Date().getTime(),_2=((_1-this.cacheLastFetchTime)/1000),_3=(this.cacheLastFetchTime==0||_2>this.cacheMaxAge);if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("cacheNeedsRefresh returns "+_3,"cacheAllData")}
return _3}
,isc.A.setCacheData=function isc_DataSource_setCacheData(_1,_2){if(this.cacheAllData||this.clientOnly){if(_2){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("setCacheData: invalidating the cache","cacheAllData")}
this.invalidateCache();this.clearDeferredRequests()}
this.cacheData=this.testData=_1;this.cacheLastFetchTime=new Date().getTime();if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("setCacheData: cacheData has been set","cacheAllData")}}}
,isc.A.clearDeferredRequests=function isc_DataSource_clearDeferredRequests(_1){if(!this.$498)return;_1=_1||"any";if(!isc.isAn.Array(_1))_1=[_1];if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("clearDeferredRequests: "+this.$498.length+" requests, "+"clearing those of type "+isc.echoAll(_1),"cacheAllData")}
if(_1.contains("any"))delete this.$498;else{if(this.$498){var _2=this.$498;for(var i=_2.length;i>=0;i--){var _4=_2[i].operationType||"fetch";if(_1.contains(_4))this.$498.removeAt(i)}
if(this.$498.length==0)delete this.$498}}}
,isc.A.processDeferredRequests=function isc_DataSource_processDeferredRequests(){if(!this.$498)return;if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("processDeferredRequests: processing "+this.$498.length+" deferred requests","cacheAllData")}
var _1=this.$498;this.clearDeferredRequests();for(var i=0;i<_1.length;i++){this.sendDSRequest(_1[i])}}
,isc.A.invalidateCache=function isc_DataSource_invalidateCache(){if(!this.cacheAllData&&!this.clientOnly)return;if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("invalidateCache: invalidating client-side cache","cacheAllData")}
delete this.cacheData;delete this.testData;this.cacheLastFetchTime=0;if(this.cacheResultSet){this.cacheResultSet.destroy();delete this.cacheResultSet}}
,isc.A.setClientOnly=function isc_DataSource_setClientOnly(_1){if(_1){this.clientOnly=true
if(this.cacheAllData){if(this.cacheResultSet){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("setClientOnly: sourcing from client-cache","cacheAllData")}
this.cacheData=this.testData=this.cacheResultSet.getAllRows()}}else{this.clearDeferredRequests();this.invalidateCache();this.performDSOperation("fetch")}}}
,isc.A.hasAllData=function isc_DataSource_hasAllData(){if(this.cacheResultSet)return this.cacheResultSet.lengthIsKnown();else return false}
,isc.A.convertRelativeDates=function isc_DataSource_convertRelativeDates(_1,_2,_3,_4){if(!_1)return null;if(!this.isAdvancedCriteria(_1)&&_1.operator==null){return _1}
var _5=isc.RelativeDate,_6=isc.clone(_1);_4=_4||new Date();if(_3==null)_3=isc.DateChooser?isc.DateChooser.firstDayOfWeek:0;if(_6.criteria&&isc.isAn.Array(_6.criteria)){var _7=_6.criteria;for(var i=_7.length-1;i>=0;i--){var _9=_7[i];if(!_9){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Removing NULL subcriteria...","relativeDates")}
_6.criteria.removeAt(i)}else{if(_9.criteria&&isc.isAn.Array(_9.criteria)){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Calling convertRelativeDates from convertRelativeDates "+"- data is:\n\n"+isc.echoFull(_9)+"\n\n"+"criteria is: \n\n"+isc.echoFull(_1),"relativeDates")}
_6.criteria[i]=this.convertRelativeDates(_9,_2,_3,_4);if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Called convertRelativeDates from convertRelativeDates "+"- data is\n\n"+isc.echoFull(_6.criteria[i]),"relativeDates")}}else{_6.criteria[i]=this.mapRelativeDate(_9,_4)}}}}else{_6=this.mapRelativeDate(_6,_4)}
if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Returning from convertRelativeDates - result is:\n\n"+isc.echoFull(_6)+"\n\n"+"original criteria is: \n\n"+isc.echoFull(_1),"relativeDates")}
return _6}
,isc.A.mapRelativeDate=function isc_DataSource_mapRelativeDate(_1,_2){var _3=isc.addProperties({},_1),_4,_5;_2=_2||new Date();var _6=_3.fieldName,_7=_6?this.getField(_6):null,_8=_7?_7.type:null;var _9=isc.SimpleType.inheritsFrom(_8,"date")&&!isc.SimpleType.inheritsFrom(_8,"datetime");if(_3.value&&isc.isAn.Object(_3.value)&&_3.value._constructor=="RelativeDate")
{_5=_3.value.value;_3.value=isc.DateUtil.getAbsoluteDate(_5,_2,_3.value.rangePosition,_9)}else{if(_3.start&&isc.isAn.Object(_3.start)&&_3.start._constructor=="RelativeDate")
{_5=_3.start.value;_3.start=_4=isc.DateUtil.getAbsoluteDate(_5,_2,"start",_9)}
if(_3.end&&isc.isAn.Object(_3.end)&&_3.end._constructor=="RelativeDate")
{_5=_3.end.value;_3.end=isc.DateUtil.getAbsoluteDate(_5,_2,"end",_9)}}
return _3}
);isc.B._maxIndex=isc.C+10;isc.A=isc.DataSource.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$41v="Action";isc.A.resultBatchSize=150;isc.A.$2j=[];isc.A.canExport=true;isc.A.defaultTitleFieldNames=["title","label","name","id"];isc.A.textContentProperty="xmlTextContent";isc.A.$dq="Defaults";isc.A.$dr="Properties";isc.A.$375="name";isc.A.$45t="type";isc.A.dropUnknownCriteria=true;isc.A.$45y="startsWith";isc.A.$19q="substring";isc.A.$50i="exact";isc.A.$50j="iscServer";isc.B.push(isc.A.init=function isc_DataSource_init(){if(this.serverType=="sql")this.dataFormat="iscServer";if(this.dataFormat=="iscServer"&&(this.serviceNamespace!=null||this.recordXPath!=null))this.dataFormat="xml";this.canQueueRequests=(this.dataFormat=="iscServer"||this.clientOnly);if(this.testData&&!this.cacheData)this.cacheData=this.testData;else if(this.clientOnly&&this.cacheData&&!this.testData)
this.testData=this.cacheData;if(this.ID==null&&this.id!=null)this.ID=this.id;if(this.name==null)this.name=this.ID;var _1=isc.DS.get(this.ID);if(_1&&_1.builtinSchema)return _1;var _2=window[this.ID];if(this.addGlobalId&&this.addGlobalId!=isc.$ae&&(!_2||(!isc.isA.ClassObject(_2)&&isc.isA.DataSource(_2))))
{isc.ClassFactory.addGlobalID(this)}
var _3=this.fields;if(isc.isAn.Array(_3)){var _4={};for(var i=0;i<_3.length;i++){var _6=_3[i];if(_6.includeFrom!=null){var _7=_6.includeFrom.split(".");if(_7==null||_7.length!=2){this.logWarn("Field has includeFrom specified as :"+_6.includeFrom+" format not understood - clearing this property");_6.includeFrom=null}else{if(_6.name==null)_6.name=_7[1]}}
if(_4[_6.name]!=null){this.logWarn("field.name collision: first field: "+this.echo(_4[_6.name])+", discarded field: "+this.echo(_6));continue}
_4[_6.name]=_6}
this.fields=_4}
if(this.dataSourceType==isc.DataSource.VIEW)this.initViewSources();isc.DataSource.registerDataSource(this)}
,isc.A.destroy=function isc_DataSource_destroy(){var _1=this.ID,_2=isc.DS;if(_1&&this==window[_1])window[_1]=null;if(_2._dataSources[_1]==this)_2._dataSources[_1]=null;if(_2.$54v[_1]==this)_2.$54v[_1]=null;if(_2.$54w[_1]==this)_2.$54w[_1]=null}
,isc.A.getResultSet=function isc_DataSource_getResultSet(_1){var _2=isc.ClassFactory.getClass(this.resultSetClass||isc.ResultSet);if(!isc.isA.Class(_2)){this.logWarn("getResultSet(): Unrecognized 'resultSetClass' property:"+_2+", returning a standard isc.ResultSet.");_2=isc.ResultSet}
return _2.create(_1,{$31k:true})}
,isc.A.dataChanged=function(dsResponse,dsRequest){}
,isc.A.updateCaches=function isc_DataSource_updateCaches(_1,_2){if(_2==null){_2={operationType:_1.operationType,dataSource:this};if(_1.clientContext!=null){_2.clientContext=_1.clientContext}}
var _3=_1.data,_4=_1.invalidateCache,_5=_1.httpResponseCode;if(!_3&&!_4&&!(_5>=200&&_5<300)){this.logWarn("Empty results returned on '"+_2.operationType+"' on dataSource '"+_2.dataSource+"', unable to update resultSet(s) on DataSource "+this.ID+". Return affected records to ensure cache consistency.");return}
if(this.cacheAllData&&this.hasAllData()){this.invalidateCache()}
this.dataChanged(_1,_2)}
,isc.A.getLegalChildTags=function isc_DataSource_getLegalChildTags(){var _1=this.getFieldNames(),_2=[];for(var i=0;i<_1.length;i++){if(this.fieldIsComplexType(_1[i]))_2.add(_1[i])}
return _2}
,isc.A.getOperationBinding=function isc_DataSource_getOperationBinding(_1,_2){if(_1==null||this.operationBindings==null)return this;if(isc.isAn.Object(_1)){var _3=_1;_1=_3.operationType;_2=_3.operationId}
var _4;if(_2){var _5=this.operationBindings.find("operationId",_2);if(_5)return _5}
if(_1){var _5=this.operationBindings.find("operationType",_1);if(_5)return _5}
return this}
,isc.A.getDataFormat=function isc_DataSource_getDataFormat(_1,_2){return this.getOperationBinding(_1,_2).dataFormat||this.dataFormat}
,isc.A.shouldBypassCache=function isc_DataSource_shouldBypassCache(_1,_2){var _3=this.getOperationBinding(_1,_2).preventHTTPCaching;if(_3==null)_3=this.preventHTTPCaching;return _3}
,isc.A.copyRecord=function isc_DataSource_copyRecord(_1){if(_1==null)return null;var _2={};var _3=this.getFieldNames(false);for(var i=0;i<_3.length;i++){var _5=_3.get(i);var _6=_1[_5];var _7=this.getField(_5);if(isc.isA.Date(_6)){var _8=new Date();_8.setTime(_6.getTime());_8.logicalDate=_6.logicalDate;_8.logicalTime=_6.logicalTime;_2[_5]=_8}else if(isc.isAn.Array(_6)&&_7.multiple==true&&_7.type==null)
{var _9=[];for(var j=0;j<_6.length;j++){if(isc.isA.Date(_6[j])){var _8=new Date();_8.setTime(_6[j].getTime());_8.logicalDate=_6[j].logicalDate;_8.logicalTime=_6[j].logicalTime;_9[j]=_8}else{_9[j]=_6[j]}}
_2[_5]=_9}else{_2[_5]=_6}}
return _2}
,isc.A.copyRecords=function isc_DataSource_copyRecords(_1){if(_1==null)return null;var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i];var _5=this.copyRecord(_4);_2[i]=_5}
return _2}
,isc.A.transformRequest=function isc_DataSource_transformRequest(_1){return _1.data}
,isc.A.getUpdatedData=function isc_DataSource_getUpdatedData(_1,_2,_3){var _4=_2.data;if(_3&&_2.status==0&&(_4==null||(isc.isA.Array(_4)&&_4.length==0)||isc.isAn.emptyString(_4)))
{this.logInfo("dsResponse for successful operation of type "+_1.operationType+" did not return updated record[s]. Using submitted request data to update"+" ResultSet cache.","ResultSet");var _5=_1.data;if(_1.data&&isc.isAn.Object(_1.data)){if(_1.operationType=="update"){_4=isc.addProperties({},_1.oldValues);if(isc.isAn.Array(_5)){_4=isc.addProperties(_4,_5[0])}else{_4=isc.addProperties(_4,_5)}
_4=[_4]}else{if(!isc.isAn.Array(_5))_5=[_5];_4=[];for(var i=0;i<_5.length;i++){_4[i]=isc.addProperties({},_5[i])}}
if(this.logIsDebugEnabled("ResultSet")){this.logDebug("Submitted data to be integrated into the cache:"+this.echoAll(_4),"ResultSet")}}}
return _4}
,isc.A.serializeFields=function isc_DataSource_serializeFields(_1,_2){if(!_1&&_2!=null)_1=_2.data;if(!_1)return _1;if(isc.DS.isSimpleTypeValue(_1))return _1;if(isc.isAn.Array(_1)){var _3=[];for(var i=0;i<_1.length;i++){_3[i]=this.serializeFields(_1[i],_2)}
return _3}else if(this.isAdvancedCriteria(_1)){return this.serializeAdvancedCriteria(_1)}
_1=isc.addProperties({},_1);if(_1.__ref)delete _1.__ref;var _5=this.getFields();for(var _6 in _5){if(!isc.isAn.Object(_1[_6]))continue;var _7=_5[_6],_8=_7.type,_9=_8!=null?isc.DataSource.get(_8):null;if(_9&&_9.serializeFields){_1[_6]=_9.serializeFields(_1[_6])}else if(isc.isA.Date(_1[_6])){if(isc.SimpleType.getBaseType(_7.type)=="date"&&!isc.SimpleType.inheritsFrom(_7.type,"datetime"))
{_1[_6].logicalDate=true}else if(isc.SimpleType.getBaseType(_7.type)=="time"){_1[_6].logicalTime=true}}}
return _1}
,isc.A.serializeAdvancedCriteria=function isc_DataSource_serializeAdvancedCriteria(_1){_1=isc.clone(_1);if(_1.criteria){for(var i=0;i<_1.criteria.length;i++){_1.criteria[i]=this.serializeAdvancedCriteria(_1.criteria[i])}}else{if(isc.isA.Date(_1.value)||isc.isA.Date(_1.start)||isc.isA.Date(_1.end)){var _3=this.getField(_1.fieldName);if(_3!=null){if(isc.SimpleType.getBaseType(_3.type)=="date"&&!isc.SimpleType.inheritsFrom(_3.type,"datetime"))
{if(_1.value)_1.value.logicalDate=true;if(_1.start)_1.start.logicalDate=true;if(_1.end)_1.end.logicalDate=true}else if(isc.SimpleType.getBaseType(_3.type)=="time"){if(_1.value)_1.value.logicalTime=true;if(_1.start)_1.start.logicalTime=true;if(_1.end)_1.end.logicalTime=true}}}}
return _1}
,isc.A.getDataProtocol=function isc_DataSource_getDataProtocol(_1){var _2=this.getOperationBinding(_1),_3=this.getWebService(_1);return(_2.dataProtocol!=null?_2.dataProtocol:isc.isA.WebService(_3)?"soap":this.dataProtocol||"getParams")}
,isc.A.$754=function isc_DataSource__storeCustomRequest(_1){if(!this.$624)this.$624={};this.$624[_1.requestId]=_1}
,isc.A.getServiceInputs=function isc_DataSource_getServiceInputs(_1){var _2=this.getOperationBinding(_1),_3=this.getWebService(_1),_4=this.getWSOperation(_1);this.addDefaultCriteria(_1,_2);_1.originalData=_1.data;this.$754(_1);this.applySendExtraFields(_1);if(!this.clientOnly){if(this.fulfilledFromOffline(_1))return{dataProtocol:"clientCustom"};_1.unconvertedDSRequest=isc.shallowClone(_1)}
if(this.autoConvertRelativeDates==true){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Calling convertRelativeDates from getServiceInputs "+"- data is\n\n"+isc.echoFull(_6))}
var _5=this.convertRelativeDates(_1.data);if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Called convertRelativeDates from getServiceInputs "+"- data is\n\n"+isc.echoFull(_6))}
_1.data=_5}
var _6=this.transformRequest(_1);if(_6!==_1){_1.data=_6}
var _7=this.getDataProtocol(_1),_8=_7=="clientCustom";if(_8){return{dataProtocol:"clientCustom"}}else{delete this.$624[_1.requestId]}
if(isc.isA.WebService(_3)){if(_1.wsOperation==null&&isc.isAn.Object(_4)){_1.wsOperation=_4.name}
this.logInfo("web service: "+_3+", wsOperation: "+this.echoLeaf(_4),"xmlBinding")}
_1.$85o=isc.timestamp();var _9=this.getDataURL(_1);_9=_1.actionURL||_1.dataURL||_9;if(_1.useHttpProxy==null){_1.useHttpProxy=this.$du(_2.useHttpProxy,this.useHttpProxy)}
var _10,_11=_2.defaultParams||this.defaultParams,_12=_1.params;if(_11||_12){_10=isc.addProperties({},_11,_12)}
var _13=_7=="getParams"||_7=="postParams";if(_13){_10=isc.addProperties(_10||{},_1.data)}
if(_13){if(_10)_10=this.serializeFields(_10,_1);return{actionURL:_9,httpMethod:_1.httpMethod||(_7=="getParams"?"GET":"POST"),params:_10}}
var _14={actionURL:_9,httpMethod:_1.httpMethod||"POST"};if(_10)_14.params=_10;if(_7=="postMessage"){_14.data=(_1.data||"").toString()}
if(_7=="postXML"||_7=="soap"){var _15=this.getSerializeFlags(_1);var _16=_14.data=this.getXMLRequestBody(_1);_14.contentType=_1.contentType||"text/xml";this.logDebug("XML post requestBody is: "+_16,"xmlBinding")}
if(_7=="soap"){var _17=this.$du(_2.soapAction,_4.soapAction);if(_17==null)_17='""';_14.httpHeaders=isc.addProperties({SOAPAction:_17},_1.httpHeaders);var _18=isc.isA.WebService(_3)&&this.$du(_2.spoofResponses,this.spoofResponses);if(_18){_14.spoofedResponse=_3.getSampleResponse(_4.name);this.logInfo("Using spoofed response:\n"+_14.spoofedResponse,"xmlBinding")}}
if(this.logIsDebugEnabled("xmlBinding")){this.logDebug("serviceInputs are: "+this.echo(_14),"xmlBinding")}
return _14}
,isc.A.addDefaultCriteria=function isc_DataSource_addDefaultCriteria(_1,_2){var _3=_2.defaultCriteria||this.defaultCriteria;if(!_3)return;_3=isc.addProperties({},_3);if(_3&&_1.operationType=="fetch"){if(this.isAdvancedCriteria(_1.data)){var _4=this.mineCriteriaFieldNames(_1.data);for(var _5 in _3){if(_4.contains(_5))delete _3[_5]}}
if(isc.getValues(_3).length>0){_1.data=isc.DataSource.combineCriteria(_1.data,_3,"and",null)}}}
,isc.A.mineCriteriaFieldNames=function isc_DataSource_mineCriteriaFieldNames(_1){var _2=[];if(!_1.criteria)return _2;for(var i=0;i<_1.criteria.length;i++){if(_1.criteria[i].criteria){_2.addList(this.mineCriteriaFieldNames(_1.criteria[i]))}else{_2.add(_1.criteria[i].fieldName)}}
return _2}
,isc.A.applySendExtraFields=function isc_DataSource_applySendExtraFields(_1){if(!this.sendExtraFields){var _2=_1.data;if(!isc.isAn.Array(_2))_2=[_2];for(var i=0;i<_2.length;i++){var _4=_2[i];if(!isc.isAn.Object(_4))continue;for(var _5 in _4){if(!this.getField(_5))delete _4[_5]}}}}
,isc.A.processResponse=function isc_DataSource_processResponse(_1,_2){var _3=this.$624[_1];if(_3==null){this.logWarn("DataSource.processResponse(): Unable to find request corresponding to ID "+_1+", taking no action.");return}
delete this.$624[_1];if(_2.status==null)_2.status=0;if(_2.status==0){var _4=_2.data;if(_4==null)_2.data=_4=[];if(_2.startRow==null)_2.startRow=_3.startRow||0;if(_2.endRow==null)_2.endRow=_2.startRow+_4.length;if(_2.totalRows==null){_2.totalRows=Math.max(_2.endRow,_4.length)}}
this.$38b(_4,_2,_3)}
,isc.A.$50e=function isc_DataSource__handleClientOnlyReply(_1,_2,_3){var _4=this.cacheAllData&&!this.clientOnly&&this.cacheResultSet?this.cacheResultSet.getAllRows():null,_5=this.getClientOnlyResponse(_3._dsRequest,_4),_6=_3._dsRequest;this.$38b(_2,_5,_6,_1,_3)}
,isc.A.$38a=function isc_DataSource__handleCustomReply(_1,_2,_3){var _4={data:_2,startRow:0,endRow:0,totalRows:0,status:0};var _5=_3._dsRequest;this.$38b(_2,_4,_5,_1,_3)}
,isc.A.$377=function isc_DataSource__handleJSONReply(_1,_2,_3){var _4=_3._dsRequest,_5=this.getOperationBinding(_4).recordXPath||this.recordXPath;if((_1.$38c||_1.$69j)&&this.logIsDebugEnabled("xmlBinding")){this.logDebug("Raw response data: "+this.echoFull(_2),"xmlBinding")}
var _6=_2;if(_2){if(_5){_2=isc.xml.selectObjects(_2,_5);this.logInfo("JSON recordXPath: '"+_5+"', selected: "+this.echoLeaf(_2),"xmlBinding")}
_2=this.recordsFromObjects(_2);if(this.logIsDebugEnabled("xmlBinding")){this.logDebug("Validated dsResponse.data: "+isc.echoFull(_2),"xmlBinding")}
var _7={data:_2,startRow:_4.startRow||0,status:0};_7.endRow=_7.startRow+Math.max(0,_2.length);_7.totalRows=Math.max(_7.endRow,_2.length)}else{var _8=_1.status;if(_8==0||_8==null)_8=-1;var _7={status:_8,data:_1.data}}
this.$38b(_6,_7,_4,_1,_3)}
,isc.A.$69k=function isc_DataSource__handleCSVTextReply(_1,_2,_3){if(_1.status!=0)return;var _4=_1.data.split(/[\r\n]+/);var _5=_4[0].split(",");_5=_5.map(function(_12){return _12.trim()});var _6=[];for(var i=1;i<_4.length;i++){var _8=_4[i].split(",");var _9={};for(var j=0;j<_8.length;j++){var _11=_8[j];if(_11!=null)_11=_11.trim();if(isc.startsWith(_11,"\""))_11=_11.substring(1);if(isc.endsWith(_11,"\""))_11=_11.substring(0,_11.length-1);_9[_5[j]]=_11}
_6.add(_9)}
_1.$69j=true;this.$377(_1,_6,_3)}
,isc.A.$379=function(rpcResponse,jsonText,rpcRequest){if(rpcResponse.status>=0){var evalText=jsonText;if(rpcRequest.transport!="scriptInclude"&&evalText!=null){var re;if(this.jsonPrefix){re=new RegExp(/^\s*/);evalText=evalText.replace(re,"");if(evalText.startsWith(this.jsonPrefix)){evalText=evalText.substring(this.jsonPrefix.length)}else{this.logInfo("DataSource specifies jsonPrefix, but not present in "+"response returned from server. Processing response anyway.")}}
if(this.jsonSuffix){re=new RegExp(/\s*$/)
evalText=evalText.replace(re,"");if(evalText.endsWith(this.jsonSuffix)){evalText=evalText.substring(0,(evalText.length-this.jsonSuffix.length))}else{this.logInfo("DataSource specifies jsonSuffix, but not present in "+"response returned from server. Processing response anyway.")}}}
if(evalText&&evalText.match(/^\s*\{/)){evalText="var evalText = "+evalText+";evalText;"}
try{var jsonObjects=isc.eval(evalText)}catch(e){rpcResponse.status=-1;rpcResponse.data="Error: server returned invalid JSON response";this.logWarn("Error evaluating JSON: "+e.toString()+", JSON text:\r"+jsonText)}
if(jsonObjects==null){rpcResponse.status=-1;rpcResponse.data="Error: server returned invalid JSON response";this.logWarn("Evaluating JSON reply resulted in empty value. JSON text:\r"+this.echo(jsonText))}
rpcResponse.$38c=true}
this.$377(rpcResponse,jsonObjects,rpcRequest)}
,isc.A.recordsFromObjects=function isc_DataSource_recordsFromObjects(_1){if(!isc.isAn.Array(_1))_1=[_1];if(this.skipJSONValidation)return _1;for(var i=0;i<_1.length;i++){_1[i]=this.validateJSONRecord(_1[i])}
return _1}
,isc.A.validateJSONRecord=function isc_DataSource_validateJSONRecord(_1){var _2=this.getFieldNames(),_3={};for(var i=0;i<_2.length;i++){var _5=_2[i],_6=this.getField(_5),_7;if(_6.valueXPath){_7=isc.xml.selectObjects(_1,_6.valueXPath,true)}else{_7=_1[_5]}
if(_6.getFieldValue){if(!isc.isA.Function(_6.getFieldValue)){isc.Func.replaceWithMethod(_6,"getFieldValue","record,value,field,fieldName")}
_7=_6.getFieldValue(_1,_7,_6,_5)}
var _8;if(_7!=_8){_3[_5]=this.validateFieldValue(_6,_7)}}
if(this.dropExtraFields)return _3;for(var i=0;i<_2.length;i++){var _5=_2[i];_1[_5]=_3[_5]}
return _1}
,isc.A.getMessageSerializer=function isc_DataSource_getMessageSerializer(_1,_2){var _3=this.getOperationBinding(_1,_2);if(_3.wsOperation){var _4=this.getWebService(_1,_2);return _4.getMessageSerializer(_3.wsOperation)}
return this}
,isc.A.getXMLRequestBody=function isc_DataSource_getXMLRequestBody(_1,_2){if(isc.$cv)arguments.$cw=this;var _3=isc.SB.create(),_4=this.getDataProtocol(_1);if(_4=="soap"){_3.append(this.getSoapStart(_1),"\r");_3.append(this.getSoapBody(_1,_2));_3.append("\r",this.getSoapEnd(_1))}else{if(this.messageStyle=="template"){_3.append(this.$38d(_1))}else{var _5=this.getMessageSerializer(_1);var _2=this.getSerializeFlags(_1,_2);_3.append(_5.xmlSerialize(_1.data,_2))}}
if(this.logIsDebugEnabled("xmlComm")){this.logDebug("outbound XML message: "+_3,"xmlComm")}
return _3.toString()}
,isc.A.$38d=function isc_DataSource__createTemplatedRequestBody(_1){var _2=isc.SB.create(),_3=this.soapBodyTemplate,_4;_4=_3.evalDynamicString(this,_1);return _4}
,isc.A.getSchemaSet=function isc_DataSource_getSchemaSet(){return isc.SchemaSet.get(this.schemaNamespace)}
,isc.A.hasWSDLService=function isc_DataSource_hasWSDLService(_1){return isc.isA.WebService(this.getWebService(_1))}
,isc.A.getWebService=function isc_DataSource_getWebService(_1){var _2=this.getOperationBinding(_1),_3=(_1?_1.serviceNamespace:null)||_2.serviceNamespace||this.serviceNamespace,_4=(_1?_1.serviceName:null)||_2.serviceName||this.serviceName;var _5;if(_4)_5=isc.WebService.getByName(_4,_3);else _5=isc.WebService.get(_3);if((_3!=null||_4!=null)&&_5==null){this.logWarn("Could not find WebService definition: "+(_4?"serviceName: "+_4:"")+(_3?" serviceNamespace: "+_3:"")+this.getStackTrace())}
return _5||this}
,isc.A.getWSOperation=function isc_DataSource_getWSOperation(_1){var _2=this.getOperationBinding(_1),_3=(isc.isAn.Object(_1)?_1.wsOperation:null)||_2.wsOperation||this.wsOperation,_4=this.getWebService(_1);if(_3!=null&&isc.isA.WebService(_4)){var _5=_4.getOperation(_3);if(!_5){isc.logWarn("DataSource.getWSOperation() : could not retrieve the operation "+_3)}
return _5}
return this}
,isc.A.getDataURL=function isc_DataSource_getDataURL(_1){var _2=this.getOperationBinding(_1);if(_2!=this&&_2.dataURL)return _2.dataURL;if(this.dataURL!=null)return this.dataURL;if(this.hasWSDLService(_1)){var _3=this.getWebService(_1);return _3.getDataURL(this.getWSOperation(_1).name)}
return this.dataURL}
,isc.A.getGlobalNamespaces=function isc_DataSource_getGlobalNamespaces(_1){var _2=this.getWebService(_1),_3=this.globalNamespaces;if(_2&&_2.globalNamespaces){_3=isc.addProperties({},_3,_2.globalNamespaces)}
return _3}
,isc.A.getSoapStart=function isc_DataSource_getSoapStart(_1){var _2=this.getWebService(_1);if(_2.getSoapStart)return _2.getSoapStart(_1);return isc.SB.concat(isc.DataSource.$37t,isc.xml.$37l(this.getGlobalNamespaces(_1),null," "),">",isc.DataSource.$37u,this.getSoapHeader(_1),isc.DataSource.$51y)}
,isc.A.getSoapHeader=function isc_DataSource_getSoapHeader(_1){var _2=this.getWebService(_1);if(_2.getSoapHeader)return _2.getSoapHeader(_1);var _3=_1.headerData||_2.getHeaderData(_1);if(!_3)return;this.logDebug("headerData is: "+this.echo(_3),"xmlBinding");var _4=_2.getInputHeaderSchema(this.getWSOperation(_1))||isc.emptyObject;var _5="",_6=_1.useFlatHeaderFields;for(var _7 in _3){var _8=_4[_7];if(_8!=null){if(isc.isA.DataSource(_8)){_5+=_8.xmlSerialize(_3[_7],{useFlatFields:_6})}else{_5+="\r "+this.$38g(_7,_8,_3[_7],_8.partNamespace)}}else{this.logWarn("headerData passed for SOAP header partName: "+_7+", no schema available, not outputting")}}
return _5}
,isc.A.getSoapBody=function isc_DataSource_getSoapBody(_1,_2){if(isc.$cv)arguments.$cw=this;var _3=isc.SB.create(),_4=this.getWebService(_1),_5=this.getSoapStyle(_1),_6=this.getWSOperation(_1),_7=this.xmlNamespaces?isc.makeReverseMap(this.xmlNamespaces):null,_2=isc.addProperties({nsPrefixes:isc.addProperties({},_7)},_2),_8=_2.generateResponse?_4.getResponseMessage(_6.name):_4.getRequestMessage(_6.name),_9=_2.bodyPartNames||_4.getBodyPartNames(_6.name,_2.generateResponse);_2=this.getSerializeFlags(_1,_2);isc.Comm.omitXSI=_6.inputEncoding!="encoded";var _10=isc.Comm.xmlSchemaMode;isc.Comm.xmlSchemaMode=true;var _11=" ";if(_5=="rpc"){_3.append("\n",_11,isc.Comm.$36u(_6.name,null,_6.inputNamespace,"opNS",true),">");_11+=" "}
this.logInfo("soap:body parts in use: '"+_9+"', soapStyle: "+_5,"xmlSerialize");if(this.logIsDebugEnabled("xmlSerialize")){this.logDebug("SOAP data is: "+this.echoFull(_1.data),"xmlSerialize")}
for(var i=0;i<_9.length;i++){var _13=_9[i];var _14=_9.length<2&&_5=="document"?_1.data:(_1.data?_1.data[_13]:null);var _15=_8.getMessagePart(_13,_14,_2,_11);_3.append("\r"+_11+_15)}
if(_5=="rpc"){_3.append("\n"," ",isc.Comm.$36v(_6.name,_6.inputNamespace,"opNS"))}
isc.Comm.omitXSI=null;isc.Comm.xmlSchemaMode=_10;return isc.SB.concat(" ",isc.DS.$37v,this.outputNSPrefixes(_2.nsPrefixes," "),">",_3.toString(),"\r ",isc.DS.$51z)}
,isc.A.getMessagePart=function isc_DataSource_getMessagePart(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;var _5=this.getPartField(_1),_6=this.getSchema(_5.type,_5.xsElementRef?"element":null),_7=this.logIsInfoEnabled("xmlSerialize");if(isc.isA.DataSource(_6)){if(_7){this.logInfo("soap:body part '"+_1+"' is complex type with schema: "+_6+" has value: "+(this.logIsDebugEnabled("xmlSerialize")?this.echo(_2):this.echoLeaf(_2)),"xmlSerialize")}
var _8=_5.xsElementRef?null:_1;return _6.xmlSerialize(_2,_3,_4,_8)}else{if(_2!=null&&!isc.DS.isSimpleTypeValue(_2)){_2=_2[_5.name]||_2[_1]||_2}
if(_7){this.logInfo("soap:body part '"+_1+"' is of simple type '"+_5.type+"'"+" has value: '"+this.echoLeaf(_2)+"'","xmlSerialize")}
var _9=this.getType(_5.type),_10=_5.partNamespace;if(!_10&&_9&&_9.schemaNamespace){_10=_9.schemaNamespace}
return this.$38g(_5.name||_1,_5,_2,_10,_3)}}
,isc.A.getPartField=function isc_DataSource_getPartField(_1){var _2=isc.getValues(this.getFields()).find("partName",_1);if(_2!=null)return _2;return this.getField(_1)}
,isc.A.getSoapEnd=function isc_DataSource_getSoapEnd(_1){var _2=this.getWebService(_1);if(_2.getSoapEnd)return _2.getSoapEnd(_1);return isc.DataSource.$37w}
,isc.A.getSoapStyle=function isc_DataSource_getSoapStyle(_1){if(!this.hasWSDLService(_1))return"document";return this.getWebService(_1).getSoapStyle(this.getWSOperation(_1).name)}
,isc.A.getSerializeFlags=function isc_DataSource_getSerializeFlags(_1,_2){_2=isc.addProperties({soapStyle:this.getSoapStyle(_1)},_2);var _3=this.getOperationBinding(_1);_2.flatData=this.$du(_1.useFlatFields,_3.useFlatFields,this.useFlatFields);_2.recursiveFlatFields=this.$du(_1.recursiveFlatFields,_3.recursiveFlatFields,this.recursiveFlatFields);_2.textContentProperty=this.$du(_1.textContentProperty,_3.textContentProperty);_2.dsRequest=_1;_2.startRowTag=_3.startRowTag||this.startRowTag;_2.endRowTag=_3.endRowTag||this.endRowTag;return _2}
,isc.A.xmlSerialize=function isc_DataSource_xmlSerialize(_1,_2,_3,_4){if(!_2)_2={};if(_2.useFlatFields)_2.flatData=true;var _5=this.getSchemaSet(),_6=(_2.qualifyAll==null);if(_5&&_5.qualifyAll){_2.qualifyAll=true}
var _7;if(_2.nsPrefixes==null){var _8=this.xmlNamespaces?isc.makeReverseMap(this.xmlNamespaces):null;_2.nsPrefixes=isc.addProperties({},_8);_7=true}
var _9=isc.Comm.xmlSchemaMode;isc.Comm.xmlSchemaMode=true;var _10;if(isc.Comm.omitXSI==null){_10=isc.Comm.omitXSI=true}
var _11=this.$ew(_1,_2,_3,_4,_7);if(_6)_2.qualifyAll=null;isc.Comm.xmlSchemaMode=_9;if(_10)isc.Comm.omitXSI=null;return _11}
,isc.A.$ew=function isc_DataSource__xmlSerialize(_1,_2,_3,_4,_5){if(isc.$cv)arguments.$cw=this;if(this.logIsDebugEnabled("xmlSerialize")){this.logDebug("schema: "+this+" serializing: "+this.echo(_1)+" with flags: "+this.echo(_2),"xmlSerialize")}
var _6=this.mustQualify||_2.qualifyAll,_4=_4||this.tagName||this.ID;var _7;if(_1!=null&&(_1._constructor||isc.isAn.Instance(_1))){var _7=isc.isAn.Instance(_1)?_1.Class:_1._constructor}
if(isc.DS.isSimpleTypeValue(_1)){if(isc.isA.String(_1)&&isc.startsWith(_1,"ref:")){return"<"+_4+" ref=\""+_1.substring(4)+"\"/>"}
this.logDebug("simple type value: "+this.echoLeaf(_1)+" passed to xmlSerialize on "+this,"xmlSerialize");return isc.Comm.$ew(_4||this.tagName||this.ID,_1)}
if(isc.isAn.Instance(_1))_1=_1.getSerializeableFields();if(isc.isAn.Array(_1)&&!this.canBeArrayValued)return this.map("xmlSerialize",_1,_2,_3).join("\n");var _8=isc.SB.create(),_3=_3||"";_8.append("\r",_3);var _9;if(_6){_9=(this.isA("XSComplexType")?_2.parentSchemaNamespace:null)||this.schemaNamespace}
_8.append(isc.Comm.$36u(_4,this.ID,_9,_2.nsPrefixes,true));_1=this.serializeAttributes(_1,_8,_2);if(_7&&_4!=_7){_8.append(" constructor=\"",_7,"\"")}
var _10;if(_1!=null){_10=this.xmlSerializeFields(_1,_2,_3+" ")}
if(_5){_8.append(this.outputNSPrefixes(_2.nsPrefixes,_3+" "))}
var _11=this.$45z;this.$45z=null;if(_10==null||isc.isAn.emptyString(_10)){_8.append("/>");return _8.toString()}
_8.append(">",_10,(_11?"":"\r"+_3));_8.append(isc.Comm.$36v(_4,_9,_2.nsPrefixes));return _8.toString()}
,isc.A.outputNSPrefixes=function isc_DataSource_outputNSPrefixes(_1,_2){delete _1.$36y;_1=isc.makeReverseMap(_1);var _3=isc.xml.$37l(_1,null,_2+" ");return _3}
,isc.A.serializeAttributes=function isc_DataSource_serializeAttributes(_1,_2,_3){var _4=this.getFieldNames(),_5=true;for(var i=0;i<_4.length;i++){var _7=_4[i],_8=this.getField(_7);if(_8.xmlAttribute&&((_1&&_1[_7]!=null)||_8.xmlRequired)){if(_5){_1=isc.addProperties({},_1);_5=false}
var _9=_1[_7];if(_3&&_3.spoofData)_9=this.getSpoofedData(_8);_2.append(" ",_7,"=\"",this.$38f(_8,_9),"\"");delete _1[_7]}}
return _1}
,isc.A.xmlSerializeFields=function isc_DataSource_xmlSerializeFields(_1,_2,_3){var _4=isc.SB.create(),_2=_2||isc.emptyObject,_5=_2.flatData,_6=_2.spoofData,_3=_3||"";var _1=isc.addProperties({},_1);if(_1.__ref!=null)delete _1.__ref;var _7=this.getFields();for(var _8 in _7){var _9=this.getField(_8),_10=_1[_8],_11=this.fieldIsComplexType(_8);var _12=_1[_8];if(_2.startRowTag==_9.name&&_12==null){_12=_2.dsRequest?_2.dsRequest.startRow:null}else if(_2.endRowTag==_9.name&&_12==null){_12=_2.dsRequest?_2.dsRequest.endRow:null}else if(_11&&_5&&_12==null){_12=_1}
var _13=(_9.xmlRequired&&!_9.xmlAttribute)||(_1[_8]!=null||(_6&&!_9.xmlAttribute));if(_5&&_11){var _14=this.getSchema(_9.type),_15=isc.clone(_2.nsPrefixes),_16=_14.xmlSerializeFields(_12,_2);if(_16!=null&&!isc.isAn.emptyString(_16)){_13=true}
_2.nsPrefixes=_15}
if(_13){if(_5&&_11&&_1[_8]!=null&&!isc.DS.isSimpleTypeValue(_1[_8])&&!_2.recursiveFlatFields)
{_2=isc.addProperties({},_2);_2.flatData=false}
_4.append(this.xmlSerializeField(_8,_12,_2,_3))}
if(!_5&&_1[_8]!=null)delete _1[_8]}
if(!_5&&!isc.isA.Schema(this)){for(var _8 in _1){_4.append(this.xmlSerializeField(_8,_1[_8],_2,_3))}}
return _4.toString()}
,isc.A.xmlSerializeField=function isc_DataSource_xmlSerializeField(_1,_2,_3,_4){var _5=isc.SB.create(),_6=this.getField(_1);if(_6==null&&(_1.startsWith("_")||_1.startsWith("$")))return;var _7=(_6?_6.type:null),_8=_3&&_3.flatData,_9=_3&&_3.spoofData,_4=_4||"";if(_9)_2=this.getSpoofedData(_6);if(this.logIsDebugEnabled("xmlSerialize")){this.logDebug("serializing fieldName: "+_1+" with type: "+_7+" with value: "+this.echo(_2),"xmlSerialize")}
var _10=((_6&&_6.mustQualify)||_3.qualifyAll?this.getSchemaSet().schemaNamespace:null);var _11=_3.textContentProperty||this.textContentProperty,_12=this.getTextContentField();if(_1==_11&&(_12!=null||!this.hasXMLElementFields(_11)))
{this.$45z=true;return this.$38f(_12,_2)}
if(_7==this.$41v&&_2!=null){if(_2.iscAction){_2=_2.iscAction}else if(isc.isA.StringMethod(_2)){_2=_2.value}}
var _13=isc.Comm.$36u(_1,_6?_6.type:null,_10,_3.nsPrefixes),_14=isc.Comm.$36v(_1,_10,_3.nsPrefixes);var _15=isc.isAn.Array(_2)?_2:[_2];if(this.fieldIsComplexType(_1)){var _16=_3.parentSchemaNamespace;_3.parentSchemaNamespace=this.schemaNamespace;var _17=this.getFieldDataSource(_6,_6&&_6.xsElementRef?"element":null);if(_6.multiple){_5.append("\r",_4,_13);for(var i=0;i<_15.length;i++){_5.append(_17.xmlSerialize(_15[i],_3,_4+" ",_6.childTagName))}
_5.append("\r",_4,_14)}else if(_17.canBeArrayValued&&isc.isAn.Array(_2)){_5.append(_17.xmlSerialize(_2,_3,_4,_1))}else{for(var i=0;i<_15.length;i++){var _2=_15[i];if(_2==null){_5.append("\r",_4)
_5.append(_13,_14)}else if(isc.DS.isSimpleTypeValue(_2)){if(isc.isA.String(_2)&&isc.startsWith(_2,"ref:")){_5.append("\r",_4)
_5.append(_13);var _19=(_6?_6.childTagName||_6.type:"value");_5.append("<",_19," ref=\"",_2.substring(4),"\"/>");_5.append(_14)}else{this.logWarn("simple type value "+this.echoLeaf(_2)+" passed to complex field '"+_6.name+"'","xmlSerialize");_5.append("\r",_4)
_5.append(isc.Comm.xmlSerialize(_1,_2))}}else{_5.append(_17.xmlSerialize(_2,_3,_4,_1))}}}
_3.parentSchemaNamespace=_16}else if(_6!=null){if(_6.xsElementRef){var _20=this.getType(_6.type);if(_20&&_20.schemaNamespace)
{_10=_20.schemaNamespace}}
if(_6.multiple){_5.append("\r",_4,_13,"\r");for(var i=0;i<_15.length;i++){_5.append(this.$38g(_6.childTagName,_6,_15[i],_10,_3),"\r",_4)}
_5.append("\r",_4,_14,"\r")}else{for(var i=0;i<_15.length;i++){_5.append("\r",_4,this.$38g(_1,_6,_15[i],_10,_3))}}}else{for(var i=0;i<_15.length;i++){if(_15[i]==null||isc.isAn.emptyObject(_15[i])){_5.append("\r",_4,_13,_14)}else{_5.append("\r",_4,isc.Comm.$ew(_1,_15[i],_4,{isRoot:false}))}}}
return _5.toString()}
,isc.A.$38g=function isc_DataSource__serializeSimpleTypeTag(_1,_2,_3,_4,_5){var _6=_2.type,_5=_5||{};if(isc.isAn.Object(_3)&&!isc.isA.Function(_3.$ew)){return isc.Comm.xmlSerialize(_1||null,_3)}else{var _6=this.$38h(_6);if(_3==null&&_2.nillable){var _7=_1||"value";return isc.Comm.$36u(_7,null,_4,_5.nsPrefixes,true)+" xsi:nil=\"true\"/>"}
if(isc.isA.Date(_3)){_3=_3.toSchemaDate(_2.type)}else if(_3!=null&&_3.$ew){return _3.$ew(_1,_6,_4)}else{_3=isc.makeXMLSafe(_3)}
return isc.Comm.$ex(_1||"value",_3,_6,_4,_5.nsPrefixes)}}
,isc.A.$38f=function isc_DataSource__serializeSimpleTypeValue(_1,_2){if(isc.isA.Date(_2)){return _2.toSchemaDate(_1?_1.type:null)}else{return isc.makeXMLSafe(_2)}}
,isc.A.$38h=function isc_DataSource__getXMLSchemaType(_1){switch(_1){case"integer":return"int";case"number":return"long";default:return _1}}
,isc.A.xmlSerializeSample=function isc_DataSource_xmlSerializeSample(){return this.xmlSerialize({},{spoofData:true})}
,isc.A.getSpoofedData=function isc_DataSource_getSpoofedData(_1){if(!_1)return"textValue";if(this.getSchema(_1.type)!=null)return{};if(_1.multiple){_1={type:_1.type};return[this.getSpoofedData(_1),this.getSpoofedData(_1)]}
if(_1.valueMap){var _2=!isc.isAn.Array(_1.valueMap)?isc.getKeys(_1.valueMap):_1.valueMap;return _2[Math.round(Math.random()*(_2.length-1))]}
var _3=isc.SimpleType.getBaseType(_1.type);switch(_3){case"boolean":return(Math.random()>0.5);case"integer":case"int":case"number":var _4=0,_5=10;if(_1.validators){var _6=_1.validators.find("type","integerRange");if(_6){this.logWarn(_1.name+" has "+_6.type+" validator "+" with min "+_6.min+" and max "+_6.max);_4=_6.min||0;_5=_6.max||Math.min(_4,10);if(_4>_5)_4=_5}}
return Math.round(_4+(Math.random()*(_5-_4)));case"float":case"decimal":case"double":var _4=0,_5=10,_7=2;if(_1.validators){var _6=_1.validators.find("type","floatRange");if(_6){this.logWarn(_1.name+" has "+_6.type+" validator "+" with min "+_6.min+" and max "+_6.max);_4=_6.min||0;_5=_6.max||Math.min(_4,10);if(_4>_5)_4=_5}
var _8=_1.validators.find("type","floatPrecision");if(_8){_7=_8.precision||2}}
return(_4+(Math.random()*(_5-_4))).toFixed(_7);case"date":case"time":case"datetime":var _9=new Date();if(_1.validators){var _6=_1.validators.find("type","dateRange");if(_6){this.logWarn(_1.name+" has "+_6.type+" validator "+" with min "+_6.min+" and max "+_6.max);if(_6.min)_9=_6.min;else if(_6.max)_9=_6.max}}
return _9;default:return"textValue"}}
,isc.A.getSerializeableFields=function isc_DataSource_getSerializeableFields(_1,_2){var _3=this.Super("getSerializeableFields",arguments);var _4=_3.fields;_4=isc.getValues(_4);for(var i=0;i<_4.length;i++){var _6=_4[i]=isc.addProperties({},_4[i]);var _7=_6.validators;if(_7){_6.validators=_7.findAll("_generated",null);if(_6.validators==null)delete _6.validators}}
_3.fields=_4;return _3}
,isc.A.$378=function isc_DataSource__handleXMLReply(_1,_2,_3,_4){var _5=_1,_6=_4._dsRequest,_7=this.getOperationBinding(_6),_8;if(_3.status<0){var _9=_2||_3.data;this.$38b(_9,{status:_3.status,data:_9},_6,_3,_4);return}
if(_5){if(_7.wsOperation){var _10=this.getWebService(_6),_8=_10.getOutputNamespaces(_7.wsOperation);_5.addNamespaces(_8)}
_5.addNamespaces(this.xmlNamespaces);_5.addNamespaces(_7.xmlNamespaces)}
var _11=isc.addProperties({},_8,this.xmlNamespaces,_7.xmlNamespaces);this.dsResponseFromXML(_5,_6,_11,{target:this,methodName:"$57b",xmlData:_5,dsRequest:_6,rpcRequest:_4,rpcResponse:_3})}
,isc.A.$57b=function isc_DataSource__completeHandleXMLReply(_1,_2){this.$38b(_2.xmlData,_1,_2.dsRequest,_2.rpcResponse,_2.rpcRequest)}
,isc.A.dsResponseFromXML=function isc_DataSource_dsResponseFromXML(_1,_2,_3,_4){if(_1){this.selectRecords(_1,_2,{target:this,methodName:"$57c",dsRequest:_2,callback:_4,xmlData:_1,xmlNamespaces:_3})}else{this.$57c([],_2,_3,_4)}}
,isc.A.$57c=function isc_DataSource__completeDSResponseFromXML(_1,_2,_3,_4){if(!_4&&_2.callback)_4=_2.callback;if(_2.xmlNamespaces)_3=_2.xmlNamespaces;if(_2.dsRequest)_2=_2.dsRequest;if(_3==null)_3=this.xmlNamespaces;var _5={data:_1,startRow:_2.startRow||0,status:0};_5.endRow=_5.startRow+Math.max(0,_1.length-1);_5.totalRows=Math.max(_5.endRow,_1.length);var _6=_4.xmlData;if(_6){if(this.totalRowsXPath){_5.totalRows=isc.xml.selectNumber(_6,this.totalRowsXPath,_3,true)}
if(this.startRowXPath){_5.startRow=isc.xml.selectNumber(_6,this.startRowXPath,_3,true);_5.endRow=_5.startRow+Math.max(0,_1.length-1)}
if(this.endRowXPath){_5.endRow=isc.xml.selectNumber(_6,this.endRowXPath,_3,true);if(!this.startRowXPath){_5.startRow=_5.endRow-Math.max(0,_1.length-1)}}
if(this.statusXPath){_5.status=parseInt(isc.xml.selectScalar(_6,this.statusXPath,_3,true))}
if(this.errorSchema){_5.errors=this.errorSchema.selectRecords(_6,_2)}}
if(_4)this.fireCallback(_4,"dsResponse",[_5,_4])
return _5}
,isc.A.selectRecords=function isc_DataSource_selectRecords(_1,_2,_3){var _4=this.selectRecordElements(_1,_2);var _5=this.getOperationBinding(_2),_6=this.getSchema(_5.responseDataSchema)||this;return _6.recordsFromXML(_4,_3)}
,isc.A.recordsFromXML=function isc_DataSource_recordsFromXML(_1,_2){if(_1&&!isc.isAn.Array(_1)){if(_1.length!=null)_1=isc.xml.$37m(_1);else _1=[_1]}
if(_1&&this.transformResponseToJS){if(_1.length>this.resultBatchSize){var _3={startingRow:0,callback:_2,elements:_1};return this.$57d(_3)}
var _4=this.dropExtraFields?this.getFieldNames():null;_1=isc.xml.toJS(_1,_4,this);if(this.logIsDebugEnabled("xmlBinding")){this.logDebug("transformed response: "+this.echoFull(_1)+"xmlBinding")}}
if(_2){this.fireCallback(_2,"records",[_1,_2])}
return _1}
,isc.A.$57d=function isc_DataSource__asyncRecordsFromXML(_1){var _2=_1.elements,_3=_1.startingRow,_4=_1.callback,_5=Math.min(_2.length,_3+this.resultBatchSize),_6=this.dropExtraFields?this.getFieldNames():null;if(!_1.$57e){_1.$57e=isc.xml.toJS(_2.slice(_3,_5+1),_6,this)}else{var _7=isc.xml.toJS(_2.slice(_3,_5+1),_6,this);_1.$57e.addList(_7)}
if(_5<_2.length){_1.startingRow=_5+1;this.delayCall("$57d",[_1])}else if(_4){this.fireCallback(_4,"records",[_1.$57e,_4])}}
,isc.A.selectRecordElements=function isc_DataSource_selectRecordElements(_1,_2){if(isc.isA.String(_1))_1=isc.xml.parseXML(_1);var _3=this.getOperationBinding(_2);var _4=_3==this?null:_3.recordXPath,_5=_3==this?null:_3.recordName,_6=this.recordXPath,_7=this.recordName;if(_4==null&&(_5!=null||(_6==null&&_7!=null))&&this.hasWSDLService(_2))
{var _8=this.getWebService(_2);return _8.selectByType(_1,_3.wsOperation||this.wsOperation,_5||_7)}
var _9=_4||_6,_10;if(_9){_10=isc.xml.selectNodes(_1,_9,this.xmlNamespaces);this.logDebug("applying XPath: "+_9+(this.xmlNamespaces?" with namespaces: "+this.echo(this.xmlNamespaces):"")+" got "+(_10?_10.length:null)+" elements","xmlBinding")}else{_10=[];var _11=_5||_7||this.ID;var _12=_1.getElementsByTagName(_11);for(var i=0;i<_12.length;i++)_10.add(_12[i]);this.logDebug("getting elements of tag name: "+_11+" got "+_10.length+" elements","xmlBinding")}
return _10}
,isc.A.$38b=function isc_DataSource__completeResponseProcessing(_1,_2,_3,_4,_5){if(!_2){_2={status:_4.status,httpResponseCode:_4.httpResponseCode}}
if(_4!=null&&_5!=null){_2.httpResponseCode=_4.httpResponseCode;_2.transactionNum=_4.transactionNum;_2.clientContext=_5.clientContext}else{_2.clientContext=_3.clientContext}
if(this.logIsInfoEnabled("xmlBinding")){this.logInfo("dsResponse is: "+this.echo(_2),"xmlBinding")}
_2.context=_5;var _6=this.transformResponse(_2,_3,_1);_2=_6||_2;_2.startRow=this.$52v(_2.startRow,0);var _7=_2.endRow;if(_7==null){if(_2.status<0)_7=0;else if(isc.isAn.Array(_2.data))_7=_2.data.length;else _7=1}
_2.endRow=this.$52v(_7);_2.totalRows=this.$52v(_2.totalRows,_2.endRow);if(this.useOfflineStorage&&_2.status==0&&!this.clientOnly){isc.DataSource.cacheResponse(_3,_2);if(isc.Offline&&!_2.fromOfflineCache){if(_3.unconvertedDSRequest){isc.Offline.storeResponse(_3.unconvertedDSRequest,_2)}else{isc.Offline.storeResponse(_3,_2)}}}
if(_3&&_3.resultSet){if(_2.status==isc.RPCResponse.STATUS_OFFLINE){_3.resultSet.$78c=true}else{_3.resultSet.$78c=false}}else if(_3&&_3.resultTree){if(_2.status==isc.RPCResponse.STATUS_OFFLINE){_3.resultTree.$78c=true}else{_3.resultTree.$78c=false}}
if(_2.relatedUpdates!=null){for(var i=0;i<_2.relatedUpdates.length;i++){if(_2.relatedUpdates[i].operationType==null){_2.relatedUpdates[i].operationType=_2.operationType}
isc.DS.get(_2.relatedUpdates[i].dataSource).updateCaches(_2.relatedUpdates[i],null)}}
this.fireResponseCallbacks(_2,_3,_4,_5)}
);isc.evalBoundary;isc.B.push(isc.A.fireResponseCallbacks=function isc_DataSource_fireResponseCallbacks(_1,_2,_3,_4){if(!_1.clientContext)_1.clientContext={};if(_1.status>=0){isc.DataSource.handleUpdate(_1,_2)}else if(!_2.willHandleError){isc.RPCManager.$a0(_1,_2)}
var _5=[_2.$376,_2.afterFlowCallback],_6=[];for(var i=0;i<_5.length;i++){var _8=_5[i];if(_6.contains(_8)){this.logWarn("Suppressed duplicate callback: "+_8);continue}
var _9=this.fireCallback(_8,"dsResponse,data,dsRequest",[_1,_1.data,_2]);if(_4&&_4.willHandleError&&_9===false){this.logDebug("performOperationReply: Further processing cancelled by callback");break}
if(_3){var _10=isc.RPCManager.getTransaction(_3.transactionNum);if(_10&&_10.suspended)return}}}
,isc.A.$52v=function isc_DataSource__parseNumber(_1,_2){if(_1==null)return _2;if(!isc.isA.String(_1))return _1;var _3=parseInt(_1);if(isNaN(_3))return _2!=null?_2:_1;else return _3}
,isc.A.transformResponse=function isc_DataSource_transformResponse(_1,_2,_3){return _1}
,isc.A.getFieldValue=function isc_DataSource_getFieldValue(_1,_2,_3){var _4=isc.xml.getFieldValue(_1,_2,_3,this,this.xmlNamespaces);if(!_3.getFieldValue)return _4;if(!isc.isA.Function(_3.getFieldValue)){isc.Func.replaceWithMethod(_3,"getFieldValue","record,value,field,fieldName")}
return _3.getFieldValue(_1,_4,_3,_2)}
,isc.A.validateFieldValue=function isc_DataSource_validateFieldValue(_1,_2){if(!isc.Validator)return _2;var _3=_1.validators;if(!_3)return _2;if(!isc.isAn.Array(_3)){this.$2j[0]=_3;_3=this.$2j}
var _4=_2;for(var i=0;i<_3.length;i++){var _6=_3[i];var _7=isc.Validator.processValidator(_1,_6,_2,null,null);if(!_7){this.logWarn(this.ID+"."+_1.name+": value: "+this.echoLeaf(_2)+" failed on validator: "+this.echo(_6));return _2}
var _8;if(_6.resultingValue!==_8){_2=_6.resultingValue;_6.resultingValue=_8}
if(!_7&&_6.stopIfFalse)break}
this.$2j.length=0;return _2}
,isc.A.getCriteriaFields=function isc_DataSource_getCriteriaFields(_1){return isc.DS.getCriteriaFields(_1,this)}
,isc.A.$74s=function isc_DataSource__getAdvancedCriteriaFields(_1,_2){return isc.DS.$74s(_1,_2)}
,isc.A.fetchRecord=function isc_DataSource_fetchRecord(_1,_2,_3){var _4={},_5=this.getPrimaryKeyField();if(_5==null){this.logWarn("This datasource has no primary key field. Ignoring fetchRecord call");return}
var _6=_5.name;var _7;if(isc.isAn.Object(_1)&&_1[_6]!==_7){_4=_1}else{_4[_6]=_1}
return this.fetchData(_4,_2,_3)}
,isc.A.fetchData=function isc_DataSource_fetchData(_1,_2,_3){this.performDSOperation("fetch",_1,_2,_3)}
,isc.A.filterData=function isc_DataSource_filterData(_1,_2,_3){if(!_3)_3={};if(_3.textMatchStyle==null)_3.textMatchStyle="substring";this.performDSOperation("fetch",_1,_2,_3)}
,isc.A.exportClientData=function isc_DataSource_exportClientData(_1,_2){return isc.DataSource.exportClientData(_1,_2)}
,isc.A.exportData=function isc_DataSource_exportData(_1,_2){if(!_2)_2={};if(this.canExport==false){isc.logWarn("Exporting is disabled for this DataSource. Set "+"DataSource.canExport to true to enable it.");return}
if(_2.exportAs&&_2.exportAs.toLowerCase()=="json"){isc.logWarn("Export to JSON is not allowed from a client call - set "+"operationBinding.exportAs on your DataSource instead.");return}
if(_2.textMatchStyle==null)_2.textMatchStyle="substring";var _3={};_3.exportResults=true;_3.exportAs=_2.exportAs||"csv";_3.exportDelimiter=_2.exportDelimiter||",";_3.exportTitleSeparatorChar=_2.exportTitleSeparatorChar||"";_3.exportFilename=_2.exportFilename||"Results."+(_3.exportAs=="ooxml"?"xlsx":_3.exportAs);_2.exportFilename=_3.exportFilename;_3.exportDisplay=_2.exportDisplay||"download";_3.lineBreakStyle=_2.lineBreakStyle||"default";_3.exportFields=this.getExportableDSFields(_2.exportFields||this.getVisibleDSFields());_3.exportHeader=_2.exportHeader;_3.exportFooter=_2.exportFooter;_3.exportFieldTitles=_2.exportFieldTitles;if(!_3.exportFieldTitles){var _4=_3.exportFields;var _5={};for(var i=0;i<_4.length;i++){var _7=_4[i];var _8;if(isc.isA.String(_7)){_8=_7;_7=this.getField(_8)}
if(_7){if(_7.hidden)continue;_5[_7.name]=_7.exportTitle||_7.title}else{_5[_8]=_8}}
_3.exportFieldTitles=_5}
_2.downloadResult=true;_2.downloadToNewWindow=_2.exportDisplay=="window"?true:false;if(_2.downloadToNewWindow){if(_3.exportFilename.endsWith(".xml")&&_3.exportAs!="xml"){_3.exportFilename=_3.exportFilename+".txt"}
_2.download_filename=_2.exportFilename;_1.download_filename=_2.download_filename}
_2.showPrompt=false;_2.parameters=_3;this.performDSOperation("fetch",_1,null,_2)}
,isc.A.getVisibleDSFields=function isc_DataSource_getVisibleDSFields(){var _1=[];var _2=this.fields;if(!isc.isAn.Array(_2)){_2=[];for(var _3 in this.fields){_2.add(this.fields[_3])}}
for(var i=0;i<_2.length;i++){var _5=_2.get(i);if(!_5.hidden)_1.add(_5.name)}
return _1}
,isc.A.getExportableDSFields=function isc_DataSource_getExportableDSFields(_1){var _2=[];if(this.canExport){for(var i=0;i<_1.length;i++){var _4=this.getField(_1[i]);if(_4&&_4.canExport!=false)
_2.add(_4.name)}}
return _2}
,isc.A.getClientOnlyDataSource=function isc_DataSource_getClientOnlyDataSource(_1,_2,_3,_4){var _5=_1,_6=_2,_7=this;if(this.cacheAllData&&this.hasAllData()){var _8=isc.DataSource.create({inheritsFrom:_7,clientOnly:true,useParentFieldOrder:true,testData:this.cacheResultSet.getAllRows()},_4);_7.fireCallback(_6,"dataSource",[_8]);return _8}else{this.fetchData(_5,function(_10,_11){var _9=_10.totalRows;_7.fetchData(_5,function(_10,_11){var _8=isc.DataSource.create({inheritsFrom:_7,clientOnly:true,useParentFieldOrder:true,testData:_11},_4);_7.fireCallback(_6,"dataSource",[_8])},isc.addProperties({},_3,{startRow:0,endRow:_9}))},isc.addProperties({},_3,{startRow:0,endRow:0}))}}
,isc.A.addData=function isc_DataSource_addData(_1,_2,_3){if(isc.Offline&&isc.Offline.isOffline()&&this.contactsServer()){isc.logWarn("Data cannot be saved because you are not online");return}
this.performDSOperation("add",_1,_2,_3)}
,isc.A.updateData=function isc_DataSource_updateData(_1,_2,_3){if(isc.Offline&&isc.Offline.isOffline()&&this.contactsServer()){isc.logWarn("Data cannot be saved because you are not online");return}
this.performDSOperation("update",_1,_2,_3)}
,isc.A.removeData=function isc_DataSource_removeData(_1,_2,_3){if(isc.Offline&&isc.Offline.isOffline()&&this.contactsServer()){isc.logWarn("Data cannot be saved because you are not online");return}
var _4=this.getPrimaryKeyFields(),_1=isc.applyMask(_1,_4);this.performDSOperation("remove",_1,_2,_3)}
,isc.A.contactsServer=function isc_DataSource_contactsServer(){return!this.clientOnly&&this.dataProtocol!="clientCustom"}
,isc.A.validateData=function isc_DataSource_validateData(_1,_2,_3){if(!_3)_3={};_3=isc.addProperties(_3,{willHandleError:true});if(_3.validationMode==null)_3.validationMode="full";return this.performDSOperation("validate",_1,_2,_3)}
,isc.A.performCustomOperation=function isc_DataSource_performCustomOperation(_1,_2,_3,_4){if(!_4)_4={};isc.addProperties(_4,{operationId:_1});this.performDSOperation("custom",_2,_3,_4)}
,isc.A.$625=function isc_DataSource__getNextRequestId(){if(!this.$626)this.$626=[this.getID(),"$627"];this.$626[2]=isc.DataSource.$625();return this.$626.join(isc.emptyString)}
,isc.A.performDSOperation=function isc_DataSource_performDSOperation(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;var _5=isc.addProperties({operationType:_1,dataSource:this.ID,data:_2,callback:_3,requestId:this.$625()},_4);if(_5.sortBy!=null){if(!isc.isAn.Array(_5.sortBy))_5.sortBy=[_5.sortBy];if(isc.isAn.Object(_5.sortBy[0])){_5.sortBy=isc.DS.getSortBy(_5.sortBy)}
for(var i=0;i<_5.sortBy.length;i++){var _7=_5.sortBy[i];if(!isc.isA.String(_7))continue;var _8=this.getField(_7.charAt(0)=="-"?_7.substring(1):_7);if(_8&&_8.canSortClientOnly)_5.sortBy[i]=null}
_5.sortBy.removeEmpty();if(_5.sortBy.length==0)delete _5.sortBy}
return this.sendDSRequest(_5)}
,isc.A.sendDSRequest=function isc_DataSource_sendDSRequest(_1){isc.addDefaults(_1,this.getOperationBinding(_1.operationType).requestProperties);isc.addDefaults(_1,this.requestProperties);var _2=this.getDataFormat(_1);if(_2=="iscServer"&&!this.clientOnly&&!isc.hasOptionalModule("SCServer")){if(this.dataURL==null&&this.testFileName==null){this.logError("DataSource: "+this.ID+": attempt to use DataSource of type iscServer without SmartClient Server option."+" Please either set clientOnly: true for one-time fetch against"+" dataURL/testFileName or upgrade to SmartClient Pro, Power or Enterprise");return}
this.logInfo("Switching to clientOnly - no SmartClient Server installed.");this.clientOnly=true}
if(_1.bypassCache==null){_1.bypassCache=this.shouldBypassCache(_1)}
if(_1.showPrompt==null){_1.showPrompt=this.showPrompt}
if(!this.cacheAllData&&this.autoCacheAllData&&_1.downloadResult!=true&&_1.operationType=="fetch"&&_1.startRow==null&&_1.endRow==null&&(_1.data==null||isc.isAn.emptyObject(_1.data)))
{if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("sendDSRequest: switching on cacheAllData","cacheAllData")}
this.cacheAllData=true;this.$85n=isc.timestamp()}
if(this.fetchingClientOnlyData(_1))return;if(this.logIsDebugEnabled()){this.logDebug("Outbound DSRequest: "+this.echo(_1))}
_1.$376=_1.callback;var _3=_1.operationType;if((_3=="update"||_3=="add")&&(this.sparseUpdates||this.noNullUpdates))
{_1.data=this.$708(_1.data,this);this.$79c(_1.data,_1.oldValues,_3,this)}
if(_2=="iscServer"){this.$754(_1);_1.unconvertedDSRequest=isc.shallowClone(_1);if(this.autoConvertRelativeDates==true){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Calling convertRelativeDates from sendDSRequest "+"- data is\n\n"+isc.echoFull(_4))}
var _4=this.convertRelativeDates(_1.data);if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Called convertRelativeDates from sendDSRequest "+"- data is\n\n"+isc.echoFull(_4))}
_1.data=_4}
var _5=this.transformRequest(_1);if(_5!==_1){_4=_1.data=_5}
var _6=this.getDataProtocol(_1);if(_6=="clientCustom")return;if((!this.clientOnly&&(!this.cacheAllData||_1.downloadResult))||(_1.cachingAllData||(this.cacheAllData&&_1.operationType&&_1.operationType!="fetch")))
{if(this.logIsInfoEnabled("cacheAllData")&&_1.cachingAllData){this.logInfo("sendDSRequest: processing cacheAllData request","cacheAllData")}
this.addDefaultCriteria(_1,this.getOperationBinding(_1));this.applySendExtraFields(_1);var _7=this.getOperationBinding(_1);if(_7==null)_7={};var _8=_7.defaultParams||this.defaultParams;if(_8){_1.data=isc.addProperties({},_8,_1.data)}
_4=_1.data;return this.performSCServerOperation(_1,_4)}}
var _9=this.getServiceInputs(_1);var _10=(this.cacheAllData&&_1.operationType=="fetch"&&!_1.cachingAllData&&!_1.downloadResult);if(_9.dataProtocol=="clientCustom"&&!_10)return;var _11=isc.addProperties({},_1,_9);_11._dsRequest=_1;if(_9.data==null)_11.data=null;if(this.clientOnly||_10){_11.clientOnly=true;_11.callback={target:this,methodName:"$50e"};isc.RPC.sendRequest(_11);return}
var _12=this.getOperationBinding(_1);_11.transport=_12.dataTransport||this.dataTransport;if(_11.transport=="scriptInclude"){_11.callback={target:this,methodName:"$377"};if(!_11.callbackParam){_11.callbackParam=_12.callbackParam||this.callbackParam}
isc.rpc.sendRequest(_11);return}
var _2=this.getDataFormat(_1);if(_2=="xml"){var _13=_11.spoofedResponse;if(!_13){_11.callback={target:this,method:this.$378};isc.xml.getXMLResponse(_11)}else{var _14=this;isc.Timer.setTimeout(function(){_14.$378(isc.xml.parseXML(_13),_13,{status:0,httpResponseCode:200,data:_13},_11)})}}else if(_2=="json"){_11.callback={target:this,method:this.$379};isc.rpc.sendProxied(_11)}else if(_2=="csv"){_11.callback={target:this,method:this.$69k};isc.rpc.sendProxied(_11)}else{_11.serverOutputAsString=true;_11.callback={target:this,method:this.$38a};isc.rpc.sendProxied(_11)}}
,isc.A.$79c=function isc_DataSource__applySparseAndNoNullUpdates(_1,_2,_3,_4){var _5=_4||this;if(!_5.noNullUpdates){if(!_5.sparseUpdates)return;if(_2==null)return}
var _6={__ref:true,$81y:true,$29a:true};for(var _7 in _1){if(isc.isA.Function(_1[_7]))continue;if(_6[_7]==true)continue;if(isc.isAn.Instance(_1[_7])||isc.isA.Class(_1[_7]))continue;var _8=_1[_7];if(_5.noNullUpdates&&_8===null){if(_3=="add"&&_5.omitNullDefaultsOnAdd==true){delete _1[_7]}else{var _9=_5.getField(_7),_10;if(_9&&_9.nullReplacementValue!==_10){_1[_7]=_9.nullReplacementValue}else{var _11=isc.SimpleType.getBaseType(_9.type,_5);if(_11=="integer"){_1[_7]=_5.nullIntegerValue}else if(_11=="float"){_1[_7]=_5.nullFloatValue}else if(_11=="date"||_11=="time"){_1[_7]=_5.nullDateValue}else if(_11=="boolean"){_1[_7]=_5.nullBooleanValue}else{_1[_7]=_5.nullStringValue}}}}else if(_5.sparseUpdates&&_3=="update"){if(_2==null)continue;var _12=_2[_7];if(_12==null&&!(_8==null))continue;if(_5!=null){var _9=_5.getField(_7);if(_9&&_9.primaryKey)continue}
if(isc.isA.Date(_8)&&Date.compareDates(_8,_12)==0){delete _1[_7]}else if(isc.isAn.Array(_8)){for(var i=0;i<_8.length;i++){this.$79c(_8[i],_12[i],_3,_9==null?null:isc.DataSource.get(_9.type));var _14=0;for(var _15 in _8[i])_14++;if(_14==0)delete _8[i]}
var _16=false;for(var i=0;i<_8.length;i++){if(_8[i]!=null){_16=true;break}}
if(!_16)delete _1[_7]}else if(isc.isAn.Object(_8)){this.$79c(_8,_12,_3,_9==null?null:isc.DataSource.get(_9.type));var _14=0;for(var _15 in _8)_14++;if(_14==0)delete _1[_7]}else if(_8==_12){delete _1[_7]}}}}
,isc.A.$708=function isc_DataSource__cloneValues(_1,_2,_3){if(_1==null)return;var _4=_2?_2.deepCloneOnEdit:this.deepCloneOnEdit,_5=_4==null?isc.DataSource.deepCloneOnEdit:_4;if(isc.isAn.Array(_1)){var _6=[];for(var i=0;i<_1.length;i++){var _8=_1[i];if(isc.isA.Function(_8))continue;if(isc.isAn.Instance(_1[_10])||isc.isA.Class(_1[_10]))continue;if(_8==null||isc.isA.String(_8)||isc.isA.Boolean(_8)||isc.isA.Number(_8))
{_6[_6.length]=_8}else if(isc.isA.Date(_8)){_6[_6.length]=new Date(_8.getTime())}else if(isc.isAn.Object(_8)){_6[_6.length]=this.$708(_8,_2,_3)}}
return _6}
var _6={};if(_1.$42c!=null){_1=isc.JSONEncoder.$42b(_1)}
var _9={__ref:true,$81y:true,$29a:true};if(isc.DataSource.cloneValuesSafely){if(!_3)_3=[];if(_3.contains(_1)){_6=_1;return}
_3.add(_1)}
for(var _10 in _1){if(isc.isA.Function(_1[_10]))continue;if(_9[_10]==true)continue;if(isc.isAn.Instance(_1[_10])||isc.isA.Class(_1[_10]))continue;var _11=_1[_10];if(isc.isA.Date(_11)){_6[_10]=_11.duplicate()}else if(isc.isAn.Object(_11)){var _12=_2?_2.getField(_10):null;if(!_12){_6[_10]=_1[_10]}else{if(_12.deepCloneOnEdit==true||(_12.deepCloneOnEdit==null&&_5))
{if(isc.DataSource.cloneValuesSafely){if(_3.contains(_11)){_6[_10]=_1[_10];continue}
_3.add(_11)}
_6[_10]=this.$708(_11,isc.DataSource.get(_12.type))}else{_6[_10]=_1[_10]}}}else{_6[_10]=_1[_10]}}
return _6}
,isc.A.fulfilledFromOffline=function isc_DataSource_fulfilledFromOffline(_1){var _2=_1.unconvertedDSRequest?_1.unconvertedDSRequest:_1;if(this.useOfflineStorage&&isc.Offline){var _3=_1.dataSource+"."+_1.operationType;if(isc.Offline.isOffline()){var _4=isc.Offline.getResponse(_2);this.logInfo("currently offline, for request: "+_3+" found cached response: "+this.echoLeaf(_4),"offline");if(this.useOfflineResponse&&!this.useOfflineResponse(_2,_4)){this.logInfo("User-written useOfflineResponse() method returned false; "+"not using cached response","offline");_4=null}
this.processOfflineResponse(_1,_4);return true}else if(_2.useOfflineCache||_2.useOfflineCacheOnly){var _4=isc.Offline.getResponse(_2);if(_4!=null){this.logInfo("request: "+_3+", returning cached offline response","offline");if(this.useOfflineResponse&&!this.useOfflineResponse(_2,_4)){this.logInfo("User-written useOfflineResponse() method returned false; "+"not using cached response","offline");_4=null}
this.processOfflineResponse(_1,_4);return true}else if(_1.useOfflineCacheOnly){this.logInfo("request: "+_3+": useOfflineCacheOnly: no response available","offline");this.processOfflineResponse(_1);return true}
this.logInfo("request: "+_3+", no cached response, proceeding with network request","offline")}}
return false}
,isc.A.processOfflineResponse=function isc_DataSource_processOfflineResponse(_1,_2){if(!_2)_2={status:isc.RPCResponse.STATUS_OFFLINE,data:isc.DataSource.offlineMessage,clientContext:_1.clientContext};_2.isCachedResponse=true;this.fireResponseCallbacks(_2,_1)}
,isc.A.performSCServerOperation=function isc_DataSource_performSCServerOperation(_1,_2){this.logWarn("Attempt to perform iscServer request requires options SmartClient server "+"support - not present in this build.\nRequest details:"+this.echo(_1));return}
,isc.A.getSchema=function isc_DataSource_getSchema(_1,_2){var _3=this.getSchemaSet();if(_3!=null){var _4=_3.getSchema(_1,_2);if(_4!=null)return _4}
var _5=this.getWebService();if(isc.isA.WebService(_5))return _5.getSchema(_1,_2);return isc.DS.get(_1,null,null,_2)}
,isc.A.getTitle=function isc_DataSource_getTitle(){return this.title||this.ID}
,isc.A.getPluralTitle=function isc_DataSource_getPluralTitle(){return this.pluralTitle||(this.getTitle()+"s")}
,isc.A.getTitleField=function isc_DataSource_getTitleField(){if(this.titleField==null){var _1=isc.getKeys(this.getFields());var _2=_1.map("toLowerCase");for(var i=0;i0&&isc.isAn.Object(_2.get(0))}
,isc.A.getFieldDataSource=function isc_DataSource_getFieldDataSource(_1,_2){if(!_1)return null;if(this.fieldIsAnonDataSource(_1)){if(!_1.$67z){var _3=isc.DataSource.create({"class":"DataSource",fields:_1.fields});_1.$67z=_3}
return _1.$67z}
return _1.type!=null?this.getSchema(_1.type,_2):null}
,isc.A.findTagOfType=function isc_DataSource_findTagOfType(_1,_2,_3){var _4=this.getFieldNames();for(var i=0;i<_4.length;i++){var _6=_4[i],_7=this.getField(_6);if(_7.type==_1)return[this,_6,_2,_3];if(this.fieldIsComplexType(_6)){var _8=this.getFieldDataSource(_7),_9=_8.findTagOfType(_1,this,_6);if(_9)return _9}}}
,isc.A.getTextContentField=function isc_DataSource_getTextContentField(){return this.getField(this.textContentProperty)}
,isc.A.hasXMLElementFields=function isc_DataSource_hasXMLElementFields(_1){_1=_1||this.textContentProperty;var _2=this.getFieldNames();for(var i=0;i<_2.length;i++){if(_2[i]==_1)continue;if(this.getField(_2[i]).xmlAttribute)continue;return true}
return false}
,isc.A.getGroups=function isc_DataSource_getGroups(){var _1=this;while(_1.groups==null&&_1.hasSuperDS())_1=_1.superDS();return _1.groups}
,isc.A.getObjectField=function isc_DataSource_getObjectField(_1,_2,_3){if(!_1)return null;var _4=this.getLocalFields(),_5=isc.getKeys(_4).reverse(),_6=isc.DataSource.getNearestSchemaClass(_1);if(_3==null)_3={};var _7=-1,_8=null;for(var i=0;i<_5.length;i++){var _10=_5[i],_11=_4[_10],_12;if(isc.endsWith(_10,this.$dr)||isc.endsWith(_10,this.$dq))continue;if(!_2&&(_3[_10]||_11.advanced||_11.inapplicable||_11.hidden||(_11.visibility!=null&&_11.visibility=="internal")))
{_3[_10]=_10;continue}
if(!_6&&_11.type==_1)return _10;if(_6&&_6.isA(_11.type)){_12=isc.DS.getInheritanceDistance(_11.type,_1);if(_8==null||_12<_7){_8=_10;_7=_12}}}
if(_8!=null){if(_7==0||!this.hasSuperDS()){return _8}else{var _13=this.superDS().getObjectField(_1,_2,_3);if(_13){var _14=this.getField(_13).type,_15=isc.DS.getInheritanceDistance(_14,_1)}
return(_13&&(_15<_7))?_13:_8}}else if(this.hasSuperDS()){return this.superDS().getObjectField(_1,_2,_3)}
return null}
,isc.A.getLocalPrimaryKeyFields=function isc_DataSource_getLocalPrimaryKeyFields(){if(!this.primaryKeys){this.primaryKeys={};var _1=this.getFields();for(var _2 in _1){var _3=_1[_2];if(_3.primaryKey){this.primaryKeys[_2]=_3}}}
return this.primaryKeys}
,isc.A.filterPrimaryKeyFields=function isc_DataSource_filterPrimaryKeyFields(_1){var _2=this.getPrimaryKeyFields();return isc.applyMask(_1,isc.getKeys(_2))}
,isc.A.filterDSFields=function isc_DataSource_filterDSFields(_1){var _2=this.getFields();return isc.applyMask(_1,isc.getKeys(_2))}
,isc.A.recordHasAllKeys=function isc_DataSource_recordHasAllKeys(_1){var _2=this.getPrimaryKeyFields();for(var _3 in _2){if(_1[_3]==null)return false}
return true}
,isc.A.getForeignKeysByRelation=function isc_DataSource_getForeignKeysByRelation(_1,_2){var _3=this.getForeignKeyFields(_2);if(!_3)return{};var _4={};for(var _5 in _3){var _6=_3[_5];var _7=isc.DataSource.getForeignFieldName(_6);var _8=_1[_7];if(_8||_8===0)_4[_5]=_8}
return _4}
,isc.A.getPrimaryKeyFields=function isc_DataSource_getPrimaryKeyFields(){if(!this.mergedPrimaryKeys){this.mergedPrimaryKeys={};if(this.hasSuperDS()){isc.addProperties(this.mergedPrimaryKeys,this.superDS().getPrimaryKeyFields())}
isc.addProperties(this.mergedPrimaryKeys,this.getLocalPrimaryKeyFields())}
return this.mergedPrimaryKeys}
,isc.A.getForeignKeyFields=function isc_DataSource_getForeignKeyFields(_1){if(isc.isA.DataSource(_1))_1=_1.ID;var _2=this.getFields();if(!_2)return null;var _3={};for(var _4 in _2){var _5=_2[_4];if(_5.foreignKey){if(_1){var _6=isc.DataSource.getForeignDSName(_5,(_1||this));if(_6!=_1)continue}
_3[_5.name]=_5}}
return _3}
,isc.A.getLocalPrimaryKeyFieldNames=function isc_DataSource_getLocalPrimaryKeyFieldNames(){var _1=this.getLocalPrimaryKeyFields();var _2=[];for(var _3 in _1){_2.add(_3)}
return _2}
,isc.A.getPrimaryKeyFieldNames=function isc_DataSource_getPrimaryKeyFieldNames(){return isc.getKeys(this.getPrimaryKeyFields())}
,isc.A.getPrimaryKeyField=function isc_DataSource_getPrimaryKeyField(){var _1=this.getPrimaryKeyFields();for(var _2 in _1){return _1[_2]}}
,isc.A.getPrimaryKeyFieldName=function isc_DataSource_getPrimaryKeyFieldName(){return this.getPrimaryKeyFieldNames()[0]}
,isc.A.addChildDataSource=function isc_DataSource_addChildDataSource(_1){var _2=this.$38m=(this.$38m||[]);_2.add(_1)}
,isc.A.getChildDataSources=function isc_DataSource_getChildDataSources(){return this.$38m}
,isc.A.getChildDataSource=function isc_DataSource_getChildDataSource(_1){var _2=this.getChildDataSources();if(_2==null)return null;var _3;for(var i=0;i<_2.length;i++){if(!_2[i]||(_1&&_2[i]==this))continue;if(!_3){_3=_2[i]}else if(_3!=_2[i]){this.logInfo("getChildDatasource(): This DataSource has multiple child "+"DataSources defined making getChildDataSource() ambiguous. Returning the "+"first child dataSource only - call getChildDataSources() to retrieve a "+"complete list.");break}}
return _3}
,isc.A.getTreeRelationship=function isc_DataSource_getTreeRelationship(_1,_2){if(isc.isA.String(_1))_1=this.getSchema(_1);var _3=this.getFields();if(_2==null){for(var _4 in _3){var _5=_3[_4];if(_5.foreignKey!=null){if(!_1||(_1.getID()==isc.DataSource.getForeignDSName(_5,this)))
{_2=_4;break}}}}
var _6;if(_2==null&&_1){_2=_6=isc.getKeys(this.fields).intersect(isc.getKeys(_1.fields))[0];this.logWarn("no foreign key declaration, guessing tree relationship "+"is on field name: "+_2+" which occurs in both DataSources")}
var _7;if(_2)_7=_3[_2];if(_7==null){this.logDebug("getTreeRelationship(): Unable to find foreignKeyField."+"foreignKeyFieldName specified as:"+_2)}
if(!_1){if(!_7)_1=this;else{var _8=isc.DataSource.getForeignDSName(_7,this);_1=this.getSchema(_8)}}
if(!_6)_6=_7?isc.DataSource.getForeignFieldName(_7):null;if(_6==null){var _9=_1.getPrimaryKeyFieldNames();if(isc.isAn.Array(_9)){if(_9.length>1){this.logWarn("getTreeRelationship: dataSource '"+_1.ID+"' has multi-field primary key, which is not "+"supported for tree viewing. Using field '"+_9[0]+"' as the only primary key field")}
_9=_9[0]}
_6=_9}
var _10;var _11;if(this.childrenField)_11=this.childrenField;for(_4 in _3){var _7=_3[_4];if(_7.isFolderProperty)_10=_4;if(_7.childrenProperty)_11=_4;if(_11==_4&&(_7.multiple==null)){_7.multiple=true}}
var _12={childDS:this,parentDS:_1,isFolderProperty:_10}
if(_2){_12.parentIdField=_2;_12.idField=_6}
if(_11)_12.childrenProperty=_11;if(_11==null&&_2==null){this.logInfo("getTreeRelationship(): No specified foreignKeyField or childrenProperty.")}
if(_1==this){var _13=_2?this.getField(_2).rootValue:null;if(_13==null)_12.rootValue=null;else _12.rootValue=_13}
return _12}
,isc.A.combineFieldOrders=function isc_DataSource_combineFieldOrders(_1,_2,_3){var _4=[];this.$38n(_2,0,_1,_4,_3);for(var _5 in _1){var _6=_1[_5],_7=_2.findIndex(this.$375,_5);if(_7!=-1){var _8=_2[_7],_9=this.combineFieldData(_8);if(_3==null||_3(_9,this))_4.add(_9);this.$38n(_2,_7+1,_1,_4,_3)}else{if(_3==null||_3(_6,this)){_4.add(isc.addProperties({},_6))}}}
return _4}
,isc.A.$38n=function isc_DataSource__addNonDSFields(_1,_2,_3,_4,_5){for(var i=_2;i<_1.length;i++){var _7=_1[i];if(_7.name!=null&&_3[_7.name]!=null)return;if(_5==null||!_5(_7,this))continue;isc.SimpleType.addTypeDefaults(_7);_4.add(_7)}}
,isc.A.combineFieldData=function isc_DataSource_combineFieldData(_1,_2){var _3;if(isc.isAn.Object(_2))_3=_2;else _3=this.getField(_2||_1.name);return isc.DataSource.combineFieldData(_1,_3)}
,isc.A.$38l=function isc_DataSource__addTypeDefaults(_1){if(_1==null)_1=this.fields;for(var _2 in _1){var _3=_1[_2];if(_3&&_3.required==null&&_3.xmlRequired!=null&&_3.xmlNonEmpty!=null)
{_3.required=_3.xmlRequired&&_3.xmlNonEmpty}
if(_3&&(_3.childrenProperty||_3.name==this.childrenField)){if(!_3.type)_3.type=this.ID}
isc.SimpleType.addTypeDefaults(_3,this);this.$75f(_3)}}
,isc.A.$75f=function isc_DataSource__addFieldValidators(_1){var _2={type:"required"};if(_1.required){var _3=isc.addProperties({},_2),_4=_1.requiredMessage||this.requiredMessage;if(_4!=null)_3.errorMessage=_4;if(!_1.validators){_1.validators=[_3]}else{if(!isc.isAn.Array(_1.validators)){_1.validators=[_1.validators]}
if(_1.validators.$69){_1.validators=_1.validators.duplicate()}
_1.validators.add(_3)}}}
,isc.A.$63p=function isc_DataSource__autoDeriveTitles(){if(!this.autoDeriveTitles)return;for(var _1 in this.fields){var _2=this.fields[_1];if(_2.title!=null)continue;_2.title=this.getAutoTitle(_1);_2.$76s=true}}
,isc.A.getAutoTitle=function isc_DataSource_getAutoTitle(_1){return isc.DataSource.getAutoTitle(_1)}
,isc.A.getType=function isc_DataSource_getType(_1){if(this.schemaNamespace){var _2=isc.SchemaSet.get(this.schemaNamespace),_3=_2.getSimpleType(_1);if(_3)return _3}
var _3=isc.SimpleType.getType(_1);if(_3!=null)return _3;if(this.types&&this.types[_1])return this.types[_1];return null}
,isc.A.firstCacheAllDataRequest=function isc_DataSource_firstCacheAllDataRequest(_1){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("firstCacheAllDataRequest: refreshing cache","cacheAllData")}
this.$498=[_1];if(this.$839==null){var _2=this.transformRequest,_3=this.transformResponse,_4=this.$ba;if(_4){if(_4.transformRequest){_2=this[isc.$ah+"transformRequest"]}
if(_4.transformResponse){_3=this[isc.$ah+"transformResponse"]}}
this.transformServerRequest=_2;this.transformServerResponse=_3;this.addMethods({transformRequest:function(_1){var _5=(_1.cachingAllData||(_1.operationType&&_1.operationType!="fetch"));if(!_5)return _1;return this.transformServerRequest(_1)},transformResponse:function(_9,_1,_10){var _5=(_1.cachingAllData||(_1.operationType&&_1.operationType!="fetch"));if(!_5){var _6=this.$85n,_7=_1.$85o;if(!_6||!_7||_7>=_6)
return _9}
return this.transformServerResponse(_9,_1,_10)}});this.$839=true}
this.cacheResultSet=isc.ResultSet.create({dataSource:this,fetchMode:"local",allRows:this.cacheData?this.cacheData:null,cachingAllData:true,dataArrived:function(_9,_10){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("cacheAllData - cacheResultSet.dataArrived: startRow/endRow: "+_9+"/"+_10)}
if(this.lengthIsKnown()){var _8=this.getDataSource();if(_8.cacheResultSet==null)return;_8.cacheLastFetchTime=new Date().getTime();if(_8.clientOnly)_8.testData=_8.cacheData=this.getAllRows();_8.processDeferredRequests()}}});if(!this.cacheData){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("firstCacheAllDataRequest: issuing fetch","cacheAllData")}
this.cacheResultSet.get(0);return true}else{if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("firstCacheAllDataRequest: updating last fetch time","cacheAllData")}
this.cacheLastFetchTime=new Date().getTime();if(this.clientOnly)this.testData=this.cacheData;this.processDeferredRequests()}}
,isc.A.fetchingClientOnlyData=function isc_DataSource_fetchingClientOnlyData(_1){if(_1.cachingAllData){return false}
if(_1.downloadResult){return false}
var _2=(this.useTestDataFetch==null?(this.clientOnly==true&&this.cacheAllData!=true&&(this.dataURL!=null||this.testFileName!=null)):this.useTestDataFetch);if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("fetchingClientOnlyData: useTestDataFetch is "+_2,"cacheAllData")}
if(this.clientOnly){_1.clientOnly=true;if(this.testData&&!this.cacheData)this.cacheData=this.testData;else if(this.cacheData&&!this.testData)this.testData=this.cacheData}
if(this.$498){this.$498.add(_1);return true}
if(_2==false&&this.clientOnly&&(this.testFileName||this.dataURL))
_2=true;if(!_2&&((this.cacheAllData&&this.cacheNeedsRefresh())||(this.clientOnly&&!this.testData&&(this.dataURL!=null&&this.testDataFile!=null))))
{return this.firstCacheAllDataRequest(_1)}else{if(this.clientOnly&&!this.testData&&(this.testFileName||this.dataURL)||(this.cacheAllData&&this.cacheNeedsRefresh())){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("fetchingClientOnlyData: issuing oneTimeDS fetch","cacheAllData")}
this.$498=[_1];var _3=this.dataURL||this.testFileName;var _4=this.getDataFormat(_1);if(_4=="iscServer")_4=_3.match(/\.xml$/i)?"xml":"json";var _5=this.getOperationBinding(_1);var _6=this.transformRequest,_7=this.transformResponse,_8=this.$ba;if(_8){if(_8.transformRequest){_6=this[isc.$ah+"transformRequest"]}
if(_8.transformResponse){_7=this[isc.$ah+"transformResponse"]}}
var _9=_5.recordName||this.recordName||(this.inheritsFrom?(isc.isA.String(this.inheritsFrom)?this.inheritsFrom:this.inheritsFrom.ID):this.ID);var _10=isc.DataSource.create({ID:this.ID+"$499",inheritsFrom:this.ID,dataURL:_3,dataFormat:_4,recordXPath:this.recordXPath,transformRequest:_6,transformResponse:_7,recordName:_9,showPrompt:this.showPrompt});this.logInfo("clientOnly datasource performing one-time "+_4+" fetch via: "+_3);this.addProperties({transformRequest:isc.DataSource.getInstanceProperty("transformRequest"),transformResponse:isc.DataSource.getInstanceProperty("transformResponse")});var _11=this;if(this.cacheAllData){_10.cacheAllData=false}
_10.sendDSRequest({operationType:"fetch",willHandleError:true,callback:function(_13,_14){var _12;if(_13.status!=isc.DSResponse.STATUS_SUCCESS){_11.logWarn("one-time fetch failed with status: "+_13.status+" and messsage: "+(_14?_14:"N/A")+". Initializing an empty Array as testData.");_12=[]}else{_11.logInfo("One-time fetch complete: "+(_14?_14.length:"null")+" records");_12=_11.initializeSequenceFields(_14)}
if(_11.cacheAllData){_11.cacheLastFetchTime=new Date().getTime();_11.cacheResultSet=isc.ResultSet.create({dataSource:_11.ID,fetchMode:"local",allRows:_12});_11.cacheLastFetchTime=new Date().getTime()}
if(_11.clientOnly){_11.cacheData=_11.testData=_12}
_11.processDeferredRequests();_10.destroy()}});return true}}}
);isc.evalBoundary;isc.B.push(isc.A.getClientOnlyResponse=function isc_DataSource_getClientOnlyResponse(_1,_2){_2=_2||this.testData;if(_2&&!this.testData&&this.clientOnly)
this.cacheData=this.testData=_2;if(!_2||isc.isA.String(_2)){if(isc.isA.String(_2)){this.logInfo(this.ID+" datasource: using testData property as data");this.cacheData=this.testData=isc.eval(_2)}else if(window[this.ID+"TestData"]){this.logInfo(this.ID+" datasource: using "+this.ID+"TestData object as data");this.cacheData=this.testData=window[this.ID+"TestData"]}else{this.logInfo(this.ID+" datasource: testData property and "+this.ID+"TestData object not found, using empty list as data");this.cacheData=this.testData=[]}
_2=this.testData}
var _3=_1.operationType,_4={status:0};switch(_3){case"fetch":case"select":case"filter":var _5=_1.data;if(isc.isAn.Array(_5))_5=_5[0];var _6=this.applyFilter(_2,_5,_1),_7=_6;if(_1.startRow!=null){var _8=_1.startRow,_9=_1.endRow,_10=_6.length;var _11=_1.sortBy;if(_11){if(!isc.isAn.Array(_11))_11=[_11];if(isc.isAn.Object(_11[0])){_11=isc.DS.getSortBy(_11)}
var _12=[];for(var i=0;i<_11.length;i++){var _14=true;if(_11[i].startsWith("-")){_11[i]=_11[i].substring(1);_14=false}
_12[i]=_14}
_6.sortByProperties(_11,_12)}
_9=Math.min(_9,_10-1);_7=_6.slice(_8,_9+1);_4.startRow=_8;_4.endRow=_9;_4.totalRows=_10}
if(this.copyLocalResults){for(var i=0;i<_7.length;i++){_7[i]=isc.addProperties({},_7[i])}}
_4.data=_7;break;case"remove":case"delete":var _15=this.findByKeys(_1.data,_2);if(_15==-1){this.logWarn("clientOnly remove operation: Unable to find record matching criteria:"+this.echo(_1.data))}else{_2.removeAt(_15);_4.data=isc.addProperties({},_1.data)}
break;case"add":case"insert":var _16=isc.addProperties({},_1.data);_16=this.applySequenceFields(_16);_2.add(_16);_4.data=isc.addProperties({},_16);break;case"replace":case"update":var _15=this.findByKeys(_1.data,_2);if(_15==-1){this.logWarn("clientOnly update operation: Unable to find record matching criteria:"+this.echo(_1.data))}else{var _16=_2[_15];isc.addProperties(_16,_1.data);_4.data=isc.addProperties({},_16)}
break;case"validate":default:break}
return _4}
,isc.A.getNextSequenceValue=function isc_DataSource_getNextSequenceValue(_1){var _2=this.testData,_3=0;for(var i=0;i<_2.length;i++){var _5=_2[i][_1.name];if(_5!=null&&_5>_3)_3=_5}
return _3+1}
,isc.A.applySequenceFields=function isc_DataSource_applySequenceFields(_1){if(!this.clientOnly){return}
var _2=this.getFields();for(var _3 in _2){var _4=_2[_3];if((_4.type=="sequence"||_4.primaryKey)&&_1[_3]==null){_1[_3]=this.getNextSequenceValue(_4)}}
return _1}
,isc.A.initializeSequenceFields=function isc_DataSource_initializeSequenceFields(_1){if(!isc.isAn.Array(_1))return;var _2=this.getFields();var _3=[];for(var _4 in _2){if(_2[_4].type=="sequence"||_2[_4].primaryKey)_3.add(_4)}
for(var i=0;i<_1.length;i++){for(var j=0;j<_3.length;j++){var _4=_3[j];if(_1[i][_4]==null)_1[i][_4]=i}}
return _1}
,isc.A.findByKeys=function isc_DataSource_findByKeys(_1,_2,_3,_4){return _2.findByKeys(_1,this,_3,_4)}
,isc.A.applyFilter=function isc_DataSource_applyFilter(_1,_2,_3){var _4=[];if(!_1||_1.length==0)return _4;if(this.isAdvancedCriteria(_2)){return this.recordsMatchingAdvancedFilter(_1,_2,_3)}
return this.recordsMatchingFilter(_1,_2,_3)}
,isc.A.recordsMatchingFilter=function isc_DataSource_recordsMatchingFilter(_1,_2,_3){var _4=isc.getKeys(_2),_5=_4.length,_6=[],_7,_8,_9,_10,_11,j;if(_3&&_3.operation&&this.operationBindings){var _13=_3.operation;if(_13.ID==_13.dataSource+"_"+_13.type){var _14=this.operationBindings.find({operationId:null,operationType:_13.type})}else{var _14=this.operationBindings.find({operationId:_3.operation.ID,operationType:_13.type})}
if(_14){var _15=_14.customCriteriaFields;if(isc.isA.String(_15)){_15=_15.split(",");for(var k=0;k<_15.length;k++){_15[k]=_15[k].replace(/^\s+|\s+$/g,'')}}}}
for(var i=0,l=_1.length;i0}
return this.recordsMatchingFilter([_1],_2,_3).length>0}
,isc.A.fieldMatchesFilter=function isc_DataSource_fieldMatchesFilter(_1,_2,_3){if(isc.isAn.Array(_2)){if(_2.contains(_1))return true;return false}
if(isc.isA.Date(_1)&&isc.isA.Date(_2)){if(_2.logicalDate)
return(Date.compareLogicalDates(_1,_2)==0);return(Date.compareDates(_1,_2)==0)}
if(!isc.isA.String(_1)&&!isc.isA.String(_2)){if(this.logIsDebugEnabled()){this.logDebug("Direct compare: "+_1+"=="+_2)}
return(_1==_2)}
if(_2==null)_2=isc.emptyString;if(_1==null)_1=isc.emptyString;if(!isc.isA.String(_1))_1=_1.toString();if(!isc.isA.String(_2))_2=_2.toString();if(!this.filterIsCaseSensitive){_1=_1.toLocaleLowerCase();_2=_2.toLocaleLowerCase()}
var _4;if(_3)_4=_3.textMatchStyle;if(!this.supportsTextMatchStyle(_4)){if(!this.$63c)this.$63c={};if(!this.$63c[_4]){this.logWarn("Text match style specified as '"+_4+"': This is not supported for"+" this dataSource - performing a substring match instead");this.$63c[_4]=true}
_4=this.getTextMatchStyle(_4)}
if(_4==this.$45y){return isc.startsWith(_1,_2)}else if(_4==this.$19q){return isc.contains(_1,_2)}else{return _1==_2}}
,isc.A.supportsTextMatchStyle=function isc_DataSource_supportsTextMatchStyle(_1,_2){if(!this.clientOnly&&(this.dataFormat!=this.$50j))return true;return(_1==null||_1==this.$19q||_1==this.$50i||_1==this.$45y)}
,isc.A.getTextMatchStyle=function isc_DataSource_getTextMatchStyle(_1){if(_1==null)_1=this.$50i;if(!this.supportsTextMatchStyle(_1)){_1=this.$19q}
return _1}
,isc.A.compareTextMatchStyle=function isc_DataSource_compareTextMatchStyle(_1,_2){_1=this.getTextMatchStyle(_1);_2=this.getTextMatchStyle(_2);if(_1==_2)return 0;if(_1==this.$50i)return 1;if(_2==this.$50i)return-1;if(_1==this.$45y)return 1;return-1}
,isc.A.compareCriteria=function isc_DataSource_compareCriteria(_1,_2,_3,_4){if(this.logIsInfoEnabled()){this.logInfo("Comparing criteria, oldCriteria:\n"+this.echo(_2)+"\nnewCriteria:\n"+this.echo(_1)+", policy: "+(_4||this.criteriaPolicy))}
if(_2==null)return-1;var _5=this.getTextMatchStyle(_3?_3.textMatchStyle:null);if(this.isAdvancedCriteria(_1)||this.isAdvancedCriteria(_2)){var _6,_7;if(this.isAdvancedCriteria(_1)){if(this.isAdvancedCriteria(_2)){_7=this.compareAdvancedCriteria(_1,_2,_3)}else{var j=0;for(var i in _2)j++;if(j==0)_7=1}
if(_7==_6){_2=isc.DataSource.convertCriteria(_2,_5);_7=this.compareAdvancedCriteria(_1,_2,_3)}}else{_1=isc.DataSource.convertCriteria(_1,_5);_7=this.compareAdvancedCriteria(_1,_2,_3)}
if(_7==_6)_7=-1;_4=_4||this.criteriaPolicy;if(_4=="dropOnShortening"){return _7}else{return _7==0?0:-1}}
_4=_4||this.criteriaPolicy;if(_4=="dropOnShortening"){if(_5==this.$50i){return this.dropOnFieldChange(_1,_2,_3)}else{return this.dropOnShortening(_1,_2,_3)}}else{return this.dropOnChange(_1,_2,_3)}}
,isc.A.dropOnChange=function isc_DataSource_dropOnChange(_1,_2,_3){if(isc.getKeys(_2).length!=isc.getKeys(_1).length)return-1;for(var _4 in _2){var _5=_2[_4],_6=_1[_4];if(isc.isAn.Array(_5)){if(!isc.isAn.Array(_6))return-1;if(_5.length!=_6.length)return-1;if(_5.intersect(_6).length!=_5.length)
{return-1}}else if(isc.isA.Date(_5)&&isc.isA.Date(_6))
{if(_5.getTime()!=_6.getTime())return-1}else if(_5!=_6){return-1}}
return 0}
,isc.A.dropOnFieldChange=function isc_DataSource_dropOnFieldChange(_1,_2,_3){var _4=isc.getKeys(_1),_5=isc.getKeys(_2),_6=_4.length-_5.length;if(_6<0)return-1;for(var _7 in _2){var _8=_2[_7],_9=_1[_7];if(_9==null)return-1;if(isc.isAn.Array(_8)){if(!isc.isAn.Array(_9))return-1;if(_8.length!=_9.length)return-1;if(_8.intersect(_9).length!=_8.length)
{return-1}}else if(isc.isA.Date(_8)&&isc.isA.Date(_9))
{if(_8.getTime()!=_9.getTime())return-1}else if(_8!=_9){return-1}}
if(_6>0){_4.removeList(_5);for(var i=0;i<_4.length;i++){if(this.getField(_4[i])==null)return-1}
return 1}
return 0}
,isc.A.dropOnShortening=function isc_DataSource_dropOnShortening(_1,_2,_3){var _4=isc.getKeys(_1),_5=isc.getKeys(_2),_6=_4.length-_5.length;if(_6<0)return-1;var _7=0;for(var _8 in _2){var _9=_2[_8],_10=_1[_8];if(_10==null)return-1;if(this.getField(_8)==null&&_9!=_10)
return-1;if(isc.isAn.Array(_9)){if(!isc.isAn.Array(_10))return-1;if(_9.length!=_10.length)return-1;if(_9.intersect(_10).length!=_9.length)
{return-1}}else if(isc.isA.String(_9)){if(!isc.isA.String(_10))return-1;if(_10.indexOf(_9)==-1)return-1;if(_9.length>_10.length)return-1;if(_9.length<_10.length)_7=1}else if(isc.isA.Date(_9)&&isc.isA.Date(_10))
{if(_9.getTime()!=_10.getTime())return-1}else if(_9!=_10){return-1}}
if(_6>0){_4.removeList(_5);for(var i=0;i<_4.length;i++){if(this.getField(_4[i])==null)return-1}
return 1}
return _7}
);isc.B._maxIndex=isc.C+164;isc.A=isc.DataSource;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$628=0;isc.A.$71l={sum:function(_1,_2,_3){var _4=0;for(var i=0;i<_2.length;i++){var _6=_1[_2[i].name],_7=parseFloat(_6);if(isc.isA.Number(_7)&&_7==_6){_4+=_7}else{if(_6!=null&&_6!=isc.emptyString){return null}}}
return _4},avg:function(_1,_2,_3){var _4=0,_5=0;for(var i=0;i<_2.length;i++){var _7=_1[_2[i].name],_8=parseFloat(_7);if(isc.isA.Number(_8)&&(_8==_7)){_5+=1;_4+=_8}else{if(_7!=null&&_7!=isc.emptyString){return null}}}
return _5>0?_4/ _5:null},max:function(_1,_2,_3){var _4,_5;for(var i=0;i<_2.length;i++){var _7=_1[_2[i].name];if(isc.isA.Date(_7)){if(_5)return null;if(_4==null)_4=_7.duplicate();else if(_4.getTime()<_7.getTime())_4=_7.duplicate()}else{_5=true;var _8=parseFloat(_7);if(isc.isA.Number(_8)&&(_8==_7)){if(_4==null)_4=_8;else if(_4<_7)_4=_8}else{if(_7!=null&&_7!=isc.emptyString){return null}}}}
return _4},min:function(_1,_2,_3){var _4,_5
for(var i=0;i<_2.length;i++){var _7=_1[_2[i].name];if(isc.isA.Date(_7)){if(_5)return null;if(_4==null)_4=_7.duplicate();if(_7.getTime()<_4.getTime())_4=_7.duplicate()}else{if(_7==null||_7==isc.emptyString)continue;_5=true;var _8=parseFloat(_7);if(isc.isA.Number(_8)&&(_8==_7)){if(_4==null)_4=_8;else if(_4>_7)_4=_8}else{return null}}}
return _4},multiplier:function(_1,_2,_3){var _4=0;for(var i=0;i<_2.length;i++){var _6=_1[_2[i].name],_7=parseFloat(_6);if(isc.isA.Number(_7)&&(_7==_6)){if(i==0)_4=_7;else _4=(_4*_7)}else{return null}}
return _4}};isc.B.push(isc.A.addSearchOperator=function isc_c_DataSource_addSearchOperator(_1){if(!_1||!_1.ID){isc.logWarn("Attempted to add null search operator, or operator with no ID");return}
if(!isc.DataSource.$57z)isc.DataSource.$57z={};var _2=isc.DataSource.$57z,_3;if(_2[_1.ID]!==_3){isc.logWarn("Attempted to add existing operator "+_1.ID+" - replacing")}
isc.DataSource.$57z[_1.ID]=_1}
,isc.A.getSearchOperators=function isc_c_DataSource_getSearchOperators(){return isc.DataSource.$57z}
,isc.A.setTypeOperators=function isc_c_DataSource_setTypeOperators(_1,_2){if(!_2)return;if(!isc.isAn.Array(_2))_2=[_2];if(!isc.DataSource.$570)isc.DataSource.$570={};isc.DataSource.$570[_1||"_all_"]=_2}
,isc.A.$625=function isc_c_DataSource__getNextRequestId(){return this.$628++}
,isc.A.getAutoTitle=function isc_c_DataSource_getAutoTitle(_1,_2){_2=_2||/[_\$]/g;if(!_1)return"";if(!isc.isA.String(_1))_1=_1.toString();var _3;_4=_1.replace(_2," ");var _4=_4.replace(/^\s+|\s+$/g,"");if(_4==_4.toUpperCase()||_4==_4.toLowerCase()){_4=_4.toLowerCase();var _5=true;_3="";for(var i=0;i<_4.length;i++){var _7=_4.substr(i,1);if(_5){_7=_7.toUpperCase();_5=false}
if(_7==' ')_5=true;_3=_3+_7}}else{_3=_4.substr(0,1).toUpperCase();var _8=_4.substr(0,1)==_4.substr(0,1).toUpperCase();var _9=false;for(var i=1;i<_4.length;i++){var _7=_4.substr(i,1);if(_9&&_7==_7.toLowerCase()){_9=false;_3=_3.substr(0,_3.length-1)+" "+_3.substr(_3.length-1)}
if(_8&&_7==_7.toUpperCase()){_9=true}
if(!_8&&_7==_7.toUpperCase()){_3=_3+" "}
_8=_7==_7.toUpperCase();_3=_3+_7}}
return _3}
,isc.A.convertCriteria=function isc_c_DataSource_convertCriteria(_1,_2){var _3={_constructor:"AdvancedCriteria",operator:"and"}
var _4=[];for(var _5 in _1){var _6=this.getCriteriaOperator(_1[_5],_2);if(isc.isA.Array(_1[_5])){var _7={_constructor:"AdvancedCriteria",operator:"or",criteria:[]}
for(var i=0;i<_1[_5].length;i++){_7.criteria.add({fieldName:_5,operator:_6,value:_1[_5][i]})}
_4.add(_7)}else{_4.add({fieldName:_5,operator:_6,value:_1[_5]})}}
_3.criteria=_4;return _3}
,isc.A.getCriteriaOperator=function isc_c_DataSource_getCriteriaOperator(_1,_2){var _3;if(isc.isA.Number(_1)||isc.isA.Date(_1)||isc.isA.Boolean(_1)){_3="equals"}else if(_2=="equals"||_2=="exact"){_3="iEquals"}else if(_2=="startsWith"){_3="iStartsWith"}else{_3="iContains"}
return _3}
,isc.A.combineCriteria=function isc_c_DataSource_combineCriteria(_1,_2,_3,_4,_5){if(!_1)return _2;if(!_2)return _1;if(!_3)_3="and";if(_3!="and"&&_3!="or"){isc.logWarn("combineCriteria called with invalid outerOperator '"+_3+"'");return null}
var _6,_7;if(!_5&&_1._constructor!="AdvancedCriteria"&&_2._constructor!="AdvancedCriteria"&&_3=="and")
{for(var _8 in _1){if(_2[_8]!=_6){_7=true;break}}}else{_7=true}
if(!_7){return isc.addProperties({},_1,_2)}
var _9,_10;if(_5||_1._constructor=="AdvancedCriteria"){_9=_1}else{_9=isc.DataSource.convertCriteria(_1,_4)}
if(_5||_2._constructor=="AdvancedCriteria"){_10=_2}else{_10=isc.DataSource.convertCriteria(_2,_4)}
var _11={operator:_3};if(!_5){_11._constructor="AdvancedCriteria"}
if(_9.operator==_3&&_10.operator==_3){_11.criteria=[];_11.criteria.addAll(_9.criteria);_11.criteria.addAll(_10.criteria)}else{_11.criteria=[_9,_10]}
return _11}
,isc.A.simplifyAdvancedCriteria=function isc_c_DataSource_simplifyAdvancedCriteria(_1,_2){if(!this.isAdvancedCriteria(_1)){return _1}
_1=this.$79a(_1,_2);if(_1==null)return null;_1._constructor="AdvancedCriteria";return _1}
,isc.A.$79a=function isc_c_DataSource__simplifyAdvancedCriteria(_1,_2){var _3=_1.operator;if(_3=="and"||_3=="or"){var _4=_1.criteria;if(_4==null||_4.length==0){if(_2)return null;return _1}
if(_4.length==1){_1=_4[0];return this.$79a(_1,true)}
var _5=[];for(var i=0;i<_4.length;i++){var _7=_4[i];_7=this.$79a(_7,true);if(_7!=null){if(_7.operator==_3){_5.addList(_7.criteria)}else{_5.add(_7)}}}
if(_5.length==0&&_2)return null;if(_5.length==1)return _5[0];_1.criteria=_5;return _1}else{return _1}}
,isc.A.combineFieldData=function isc_c_DataSource_combineFieldData(_1,_2){if(_2==null)return _1;for(var _3 in _2){if(_3=="validators"&&_1.validators!=null&&_2.validators!=_1.validators)
{if(_2.validators.$69){if(isc.SimpleType.getBaseType(_1.type)!=isc.SimpleType.getBaseType(_2.type))
{continue}}
for(var i=0;i<_2.validators.length;i++){var _5=_2.validators[i];if(!_1.validators.contains(_5)){if(_1.validators.$69){_1.validators=_1.validators.duplicate()}
_1.validators.add(_5)}}
continue}
if(_1[_3]!=null)continue;if(_3=="name")continue;_1[_3]=_2[_3]}
return _1}
,isc.A.applyRecordSummaryFunction=function isc_c_DataSource_applyRecordSummaryFunction(_1,_2,_3,_4){if(!_2||!_3)return;if(isc.isA.String(_1)){if(this.$71l[_1]){_1=this.$71l[_1]}else{_1=isc.Func.expressionToFunction("record,fields,summaryField",_1)}}
if(isc.isA.Function(_1))return _1(_2,_3,_4)}
,isc.A.registerRecordSummaryFunction=function isc_c_DataSource_registerRecordSummaryFunction(_1,_2){if(isc.isA.String(_2)){_2=isc.Func.expressionToFunction("record,fields,summaryField",_2)}
this.$71l[_1]=_2}
,isc.A.exportClientData=function isc_c_DataSource_exportClientData(_1,_2){var _3=_2||{},_4=_3&&_3.exportAs?_3.exportAs:"csv",_5=_3&&_3.exportFilename?_3.exportFilename:"export",_6=_3&&_3.exportDisplay?_3.exportDisplay:"download";var _7={showPrompt:false,transport:"hiddenFrame",exportResults:true,downloadResult:true,downloadToNewWindow:(_6=="window"),download_filename:(_6=="window"?_5:null)};var _8={exportAs:_3.exportAs,exportDelimiter:_3.exportDelimiter,exportFields:_3.exportFields,exportHeader:_3.exportHeader,exportFooter:_3.exportFooter,exportTitleSeparatorChar:_3.exportTitleSeparatorChar,lineBreakStyle:_3.lineBreakStyle};isc.DMI.callBuiltin({methodName:"downloadClientExport",arguments:[_1,_4,_5,_6,_8],requestParams:_7})}
);isc.B._maxIndex=isc.C+14;isc.A=isc.DataSource.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.supportsAdvancedCriteria=function isc_DataSource_supportsAdvancedCriteria(){if(this.clientOnly||this.cacheData)return true;if(this.willHandleAdvancedCriteria!=null)return this.willHandleAdvancedCriteria;return false}
,isc.A.isAdvancedCriteria=function isc_DataSource_isAdvancedCriteria(_1){return isc.DS.isAdvancedCriteria(_1,this)}
,isc.A.addSearchOperator=function isc_DataSource_addSearchOperator(_1,_2){if(!_1||!_1.ID){isc.logWarn("Attempted to add null search operator, or operator with no ID");return}
isc.DataSource.addSearchOperator(_1);if(!this.$570)this.$570={$58d:true};if(_2){for(var _3=0;_3(_18?_10.toLowerCase():_10))
return false}else{if((_18?_11.toLowerCase():_11)>=(_18?_10.toLowerCase():_10))
return false}}
return true};var _19=function(_62,_63,_64,_65,_66,_67){var _11=_63[_64],_20=_62;if(isc.isA.Number(_11))_11=""+_11;if(!isc.isA.String(_11)){return _66.negate}
if(_11==null)return _67.$59v?_67.$59u:_66.negate;if(_20==null)_20="";if(isc.isA.Number(_20))_20=""+_20;if(!isc.isA.String(_20)||!isc.isA.String(_11))return _66.negate;if(_66.caseInsensitive){_11=_11.toLowerCase();_20=_20.toLowerCase()}
if(_66.startsWith)var _21=isc.startsWith(_11,_20);else if(_66.endsWith)_21=isc.endsWith(_11,_20);else if(_66.equals)_21=(_11==_20);else _21=isc.contains(_11,_20);if(_66.negate)return!_21;else return _21};var _22=function(_62,_63,_64,_65,_66){var _23=(_63[_64]==null);if(_66.negate)return!_23;else return _23};var _24=function(_62,_63,_64,_65,_66){var _25;var _17;if(_62===_17)return false;if(isc.isA.Date(_62)||isc.isA.Date(_63[_64]))return false;if(_66.caseInsensitive)_25=new RegExp(_62,"i");else _25=new RegExp(_62);return _25.test(_63[_64])};var _26=function(_62,_63,_64,_65,_66,_67){if(_62==null)_62=[]
else if(!isc.isAn.Array(_62))_62=[_62];if(!isc.isA.Date(_63[_64])){var _27=_62.contains(_63[_64])}else{_27=false;for(var i=0;i<_62.length;i++){if(isc.isA.Date(_62[i])&&Date.compareDates(_62[i],_63[_64])==0){_27=true;break}}}
if(_66.negate)return!_27;else return _27};var _29=function(_62,_63,_64,_65,_66,_67){if(_62==null)return true;var _30=(_63[_62]==_63[_64]);if(isc.isA.Date(_63[_62])&&isc.isA.Date(_63[_64])){_30=(Date.compareDates(_63[_62],_63[_64])==0)}
if(_66.negate)return!_30;else return _30};var _31=function(_62,_63,_64,_65,_66,_67){if(_62==null)return true;return _8(_63[_62],_63,_64,_65,_66,_67)};var _32=function(_62,_63,_64,_65,_66,_67){if(_62==null)return true;return _19(_63[_62],_63,_64,_65,_66,_67)};var _33=function(_62,_63,_64,_65){if(!_63.criteria)_63.criteria=[];if(!isc.isAn.Array(_63.criteria)){isc.logWarn("AdvancedCriteria: boolean compareCriteria found "+"where old subcriteria was not an array");return-1}
if(!_62.criteria)_62.criteria=[];if(!isc.isAn.Array(_62.criteria)){isc.logWarn("AdvancedCriteria: boolean compareCriteria found "+"where new subcriteria was not an array");return-1}
var _34,_35=0,_36=_63.criteria.length,_37=_62.criteria.length;if(_37>_36&&_64.isOr){return-1}
var _38=isc.clone(_63.criteria);var _39=isc.clone(_62.criteria);for(var i=0;i<_36;i++){var _40=_38[i];var _41=i>_37?null:_39[i];if(!_41||(_41&&_41.fieldName!=_40.fieldName||_41.operator!=_40.operator||_41.processed==true)){_41=null;for(var j=0;j<_37;j++){if(_39[j].processed)continue;if(_39[j].fieldName==_40.fieldName&&_39[j].operator==_40.operator){_41=_39[j];break}}}
if(_41&&_40){_41.processed=true;_34=_65.compareAdvancedCriteria(_41,_40)}else{if(_40&&!_41){if(_64.isOr)_34=1;if(_64.isAnd)_34=-1;if(_64.isNot)_34=-1}}
if(_64.isAnd&&_34==-1)return-1;if(_64.isOr&&_34==-1)return-1;if(_64.isNot&&_34==1)return-1;if(_34!=0)_35=1}
for(var i=0;i<_37;i++){if(!_39[i].processed){if(_64.isOr)return-1;if(_64.isAnd)return 1;if(_64.isNot)return-1}}
return _35};var _43=function(_62,_63,_64,_65){if(_62.fieldName==_63.fieldName){var _6=(_62.value==_63.value);if(isc.isA.Date(_62.value)&&isc.isA.Date(_63.value)){var _7=_65.getField(_62.fieldName);if(_7&&_7.type=="datetime"){_6=(Date.compareDates(_62.value,_63.value)==0)}else{_6=(Date.compareLogicalDates(_62.value,_63.value)==0)}}
if(_6){return 0}else{return-1}}else{return-1}};var _44=function(_62,_63,_64){if(_62.fieldName==_63.fieldName){if(_64.upperBounds&&_64.lowerBounds){if((_62.start==_63.start)||(isc.isA.Date(_62.start)&&isc.isA.Date(_63.start)&&Date.compareDates(_62.start,_63.start)==0)){if((_62.end==_63.end)||(isc.isA.Date(_62.end)&&isc.isA.Date(_63.end)&&Date.compareDates(_62.end,_63.end)==0)){return 0}}}else{if((_62.value==_63.value)||(isc.isA.Date(_62.value)&&isc.isA.Date(_63.value)&&Date.compareDates(_62.value,_63.value)==0)){return 0}}
var _45=_62.start==null?_62.value:_62.start,_46=_63.start==null?_63.value:_63.start,_47=_62.start==null?_62.value:_62.end,_48=_63.start==null?_63.value:_63.end;var _14,_49;var _50=true,_51=true,_52=true,_53=true;if(_46==null)_50=false;if(_48==null)_51=false;if(_45==null)_52=false;if(_47==null)_53=false;if(_64.lowerBounds&&!_64.upperBounds&&!_52&&!_50){return 0}
if(_64.lowerBounds&&!_64.upperBounds&&(_45>_46||(_52&&!_50))){return 1}
if(_64.upperBounds&&!_64.lowerBounds&&!_53&&!_51){return 0}
if(_64.upperBounds&&!_64.lowerBounds&&(_47<_48||(_53&&!_51))){return 1}
if(_64.lowerBounds&&_64.upperBounds){if(_45>=_46&&_45<=_48&&_47<=_48&&_47>=_46){return 1}
if((_52&&!_50)||(_53&&!_51)){return 1}
if(!_52&&!_50&&!_53&&!_50){return 0}}}
return-1};var _54=function(_62,_63,_64){var _55=_63.value;var _56=_62.value;if(isc.isA.Number(_55))_55=""+_55;if(isc.isA.Number(_56))_56=""+_56;if(!isc.isA.String(_55)||!isc.isA.String(_56))return-1;if(_64.caseInsensitive){_55=_55.toLowerCase();_56=_56.toLowerCase()}
if(_62.fieldName==_63.fieldName&&_62.value==_63.value&&!_64.equals)
{return 0}
if(_64.equals){if((_55==_56&&!_64.negate)||(_55!=_56&&_64.negate))
{return 0}
return-1}
if(_64.startsWith&&!_64.negate&&_56.length>_55.length&&isc.startsWith(_56,_55))
{return 1}
if(_64.startsWith&&_64.negate&&_55.length>_56.length&&isc.startsWith(_55,_56))
{return 1}
if(_64.endsWith&&!_64.negate&&_56.length>_55.length&&isc.endsWith(_56,_55))
{return 1}
if(_64.endsWith&&_64.negate&&_55.length>_56.length&&isc.endsWith(_55,_56))
{return 1}
if(!_64.startsWith&&!_64.endsWith&&!_64.negate&&_56.length>_55.length&&isc.contains(_56,_55))
{return 1}
if(!_64.startsWith&&!_64.endsWith&&_64.negate&&_55.length>_56.length&&isc.contains(_55,_56))
{return 1}
return-1};var _57=function(_62,_63,_64){if(_62.fieldName==_63.fieldName)return 0;else return-1};var _58=function(_62,_63,_64){if(_62.value==_63.value&&_62.fieldName==_63.fieldName){return 0}else{return-1}};var _59=function(_62,_63,_64){if(_62.fieldName==_63.fieldName){if(!isc.isAn.Array(_63.value)||!isc.isAn.Array(_62.value)){return-1}
if(_62.value.equals(_63.value)){return 0}
if(!_64.negate&&_63.value.containsAll(_62.value)){return 1}
if(_64.negate&&_62.value.containsAll(_63.value)){return 1}}
return-1};var _60=function(_62,_63,_64){if(_62.value==_63.value&&_62.fieldName==_63.fieldName){return 0}else{return-1}};var _61=[{ID:"equals",titleProperty:"equalsTitle",negate:false,valueType:"fieldType",condition:_5,compareCriteria:_43,symbol:"==",wildCard:"*",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"notEqual",titleProperty:"notEqualTitle",negate:true,valueType:"fieldType",condition:_5,compareCriteria:_43,symbol:"!",wildCard:"*",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"greaterThan",titleProperty:"greaterThanTitle",lowerBounds:true,valueType:"fieldType",condition:_8,compareCriteria:_44,symbol:">",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"lessThan",titleProperty:"lessThanTitle",upperBounds:true,valueType:"fieldType",condition:_8,compareCriteria:_44,symbol:"<",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"greaterOrEqual",titleProperty:"greaterOrEqualTitle",lowerBounds:true,inclusive:true,valueType:"fieldType",condition:_8,compareCriteria:_44,symbol:">=",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"lessOrEqual",titleProperty:"lessOrEqualTitle",upperBounds:true,inclusive:true,valueType:"fieldType",condition:_8,compareCriteria:_44,symbol:"<=",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"between",titleProperty:"betweenTitle",lowerBounds:true,upperBounds:true,hidden:true,valueType:"valueRange",condition:_8,compareCriteria:_44,getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"iBetween",titleProperty:"iBetweenTitle",lowerBounds:true,upperBounds:true,hidden:true,valueType:"valueRange",condition:_8,caseInsensitive:true,compareCriteria:_44,getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"betweenInclusive",titleProperty:"betweenInclusiveTitle",lowerBounds:true,upperBounds:true,valueType:"valueRange",inclusive:true,condition:_8,compareCriteria:_44,symbol:"...",getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"iBetweenInclusive",titleProperty:"iBetweenInclusiveTitle",lowerBounds:true,upperBounds:true,valueType:"valueRange",inclusive:true,condition:_8,compareCriteria:_44,symbol:"...",caseInsensitive:true,getCriterion:function(_62,_63){var _21={fieldName:_62,operator:this.ID};if(isc.isA.RelativeDateItem(_63))
_21.value=_63.getRelativeDate()||_63.getValue();else _21.value=_63.getValue();return _21}},{ID:"iEquals",titleProperty:"iEqualsTitle",equals:true,caseInsensitive:true,valueType:"fieldType",condition:_19,symbol:"==",wildCard:"*",compareCriteria:_54},{ID:"iContains",titleProperty:"iContainsTitle",caseInsensitive:true,valueType:"fieldType",condition:_19,symbol:"~",compareCriteria:_54},{ID:"iStartsWith",titleProperty:"iStartsWithTitle",startsWith:true,caseInsensitive:true,valueType:"fieldType",condition:_19,symbol:"^",compareCriteria:_54},{ID:"iEndsWith",titleProperty:"iEndsWithTitle",endsWith:true,caseInsensitive:true,valueType:"fieldType",condition:_19,symbol:"|",compareCriteria:_54},{ID:"contains",titleProperty:"containsTitle",hidden:true,valueType:"fieldType",condition:_19,symbol:"~",compareCriteria:_54},{ID:"startsWith",titleProperty:"startsWithTitle",startsWith:true,hidden:true,valueType:"fieldType",condition:_19,symbol:"^",compareCriteria:_54},{ID:"endsWith",titleProperty:"endsWithTitle",endsWith:true,hidden:true,valueType:"fieldType",condition:_19,symbol:"|",compareCriteria:_54},{ID:"iNotEqual",titleProperty:"iNotEqualTitle",caseInsensitive:true,equals:true,negate:true,valueType:"fieldType",condition:_19,symbol:"!",wildCard:"*",compareCriteria:_54},{ID:"iNotContains",titleProperty:"iNotContainsTitle",caseInsensitive:true,negate:true,valueType:"fieldType",condition:_19,symbol:"!~",compareCriteria:_54},{ID:"iNotStartsWith",titleProperty:"iNotStartsWithTitle",startsWith:true,caseInsensitive:true,negate:true,valueType:"fieldType",condition:_19,symbol:"!^",compareCriteria:_54},{ID:"iNotEndsWith",titleProperty:"iNotEndsWithTitle",endsWith:true,caseInsensitive:true,negate:true,valueType:"fieldType",condition:_19,symbol:"!@",compareCriteria:_54},{ID:"notContains",titleProperty:"notContainsTitle",negate:true,hidden:true,valueType:"fieldType",condition:_19,symbol:"!~",compareCriteria:_54},{ID:"notStartsWith",titleProperty:"notStartsWithTitle",startsWith:true,negate:true,hidden:true,valueType:"fieldType",condition:_19,symbol:"!^",compareCriteria:_54},{ID:"notEndsWith",titleProperty:"notEndsWithTitle",endsWith:true,negate:true,hidden:true,valueType:"fieldType",condition:_19,symbol:"!@",compareCriteria:_54},{ID:"isNull",titleProperty:"isNullTitle",valueType:"none",condition:_22,symbol:"#",compareCriteria:_57},{ID:"notNull",titleProperty:"notNullTitle",negate:true,valueType:"none",condition:_22,symbol:"!#",compareCriteria:_57},{ID:"regexp",titleProperty:"regexpTitle",hidden:true,valueType:"custom",condition:_24,symbol:"/regex/",compareCriteria:_58},{ID:"iregexp",titleProperty:"iregexpTitle",hidden:true,caseInsensitive:true,valueType:"custom",condition:_24,symbol:"/regex/",compareCriteria:_58},{ID:"inSet",titleProperty:"inSetTitle",hidden:true,valueType:"valueSet",condition:_26,compareCriteria:_59,symbol:"=(",closingSymbol:")",valueSeparator:"|",processValue:function(_62,_63){return _62.split(this.valueSeparator)}},{ID:"notInSet",titleProperty:"notInSetTitle",negate:true,hidden:true,valueType:"valueSet",condition:_26,compareCriteria:_59,symbol:"!=(",closingSymbol:")",valueSeparator:"|",processValue:function(_62,_63){return _62.split(this.valueSeparator)}},{ID:"equalsField",titleProperty:"equalsFieldTitle",valueType:"fieldName",condition:_29,symbol:"=.",compareCriteria:_60,processValue:function(_62,_63){if(!_63)return _62;var _7=_63.getField(_62);if(_7)return _62;_7=_63.getFieldByTitle(_62);if(_7)return _7.name;return null}},{ID:"notEqualField",titleProperty:"notEqualFieldTitle",negate:true,valueType:"fieldName",condition:_29,compareCriteria:_60},{ID:"greaterThanField",titleProperty:"greaterThanFieldTitle",lowerBounds:true,valueType:"fieldName",condition:_31,compareCriteria:_60},{ID:"lessThanField",titleProperty:"lessThanFieldTitle",upperBounds:true,valueType:"fieldName",condition:_31,compareCriteria:_60},{ID:"greaterOrEqualField",titleProperty:"greaterOrEqualFieldTitle",lowerBounds:true,inclusive:true,valueType:"fieldName",condition:_31,compareCriteria:_60},{ID:"lessOrEqualField",titleProperty:"lessOrEqualFieldTitle",upperBounds:true,inclusive:true,valueType:"fieldName",condition:_31,compareCriteria:_60},{ID:"containsField",titleProperty:"containsFieldTitle",hidden:true,valueType:"fieldName",condition:_32,compareCriteria:_60},{ID:"startsWithField",titleProperty:"startsWithTitleField",startsWith:true,hidden:true,valueType:"fieldName",condition:_32,compareCriteria:_60},{ID:"endsWithField",titleProperty:"endsWithTitleField",endsWith:true,hidden:true,valueType:"fieldName",condition:_32,compareCriteria:_60},{ID:"and",titleProperty:"andTitle",isAnd:true,valueType:"criteria",condition:_1,symbol:" and ",compareCriteria:_33},{ID:"not",titleProperty:"notTitle",isNot:true,valueType:"criteria",condition:_1,compareCriteria:_33},{ID:"or",titleProperty:"orTitle",isOr:true,valueType:"criteria",condition:_1,symbol:" or ",compareCriteria:_33}];for(var _3=0;_3<_61.length;_3++){isc.DataSource.addSearchOperator(_61[_3])}
isc.DataSource.setTypeOperators(null,["equals","notEqual","lessThan","greaterThan","lessOrEqual","greaterOrEqual","between","betweenInclusive","isNull","notNull","inSet","notInSet","equalsField","notEqualField","greaterThanField","lessThanField","greaterOrEqualField","lessOrEqualField","and","or","not","inSet","notInSet"]);isc.DataSource.setTypeOperators("text",["regexp","iregexp","contains","startsWith","endsWith","iEquals","iNotEqual","iBetween","iBetweenInclusive","iContains","iStartsWith","iEndsWith","notContains","notStartsWith","notEndsWith","iNotContains","iNotStartsWith","iNotEndsWith","containsField","startsWithField","endsWithField"]);isc.DataSource.setTypeOperators("integer",["iContains","iStartsWith","iEndsWith","iNotContains","iNotStartsWith","iNotEndsWith","containsField","startsWithField","endsWithField"]);isc.DataSource.setTypeOperators("float",["iContains","iStartsWith","iEndsWith","iNotContains","iNotStartsWith","iNotEndsWith","containsField","startsWithField","endsWithField"])};isc.$571();isc.DataSource.create({ID:"Object",fields:{},addGlobalId:false});isc.DataSource.create({ID:"ValueMap",addGlobalId:false,builtinSchema:true,canBeArrayValued:true,fields:{},$cp:"ID",$450:"id",xmlToJS:function(_1,_2){if(_1==null||isc.xml.elementIsNil(_1))return null;var _3=isc.xml.getElementChildren(_1),_4=isc.xml.getAttributes(_1),_5=!isc.isAn.emptyObject(_4);for(var i=0;i<_3.length;i++){var _7=_3[i],_8=_1.getAttribute(this.$cp)||_1.getAttribute(this.$450),_9=isc.xml.getElementText(_7);if(_8!=null&&_9!=null){_5=true;_4[_8]=_9}else if(_8!=null){_4[_8]=_8}else if(_9!=null){_4[_9]=_9}else{_4[isc.emptyString]=isc.emptyString}}
if(_5)return _4;return isc.getValues(_4)},xmlSerializeFields:function(_1,_2,_3){if(_1==null||isc.DS.isSimpleTypeValue(_1)){return this.Super("xmlSerializeFields",arguments)}
var _4=isc.SB.create(),_3=(_3||"")+" ";if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){var _6=_1[i];_4.append("\r",_3,"",isc.makeXMLSafe(_6)," ")}}else{for(var _7 in _1){var _6=_1[_7];_4.append("\r",_3,"",isc.makeXMLSafe(_6)," ")}}
return _4.toString()}});isc.ClassFactory.defineInterface("DataModel");isc.DataModel.addInterfaceMethods({getDataSource:function(){if(isc.isA.String(this.dataSource))this.dataSource=isc.DS.get(this.dataSource);return this.dataSource},getOperationId:function(_1){var _2=this.getOperation(_1);return _2==null?null:(isc.isA.String(_2)?_2:_2.ID)},getOperation:function(_1){var _2=isc.rpc.getDefaultApplication(),_3,_4;var _5=_1+"Operation";if(this[_5]){_3=this[_5];if(isc.isAn.Object(_3))return _3;_4=_3}
if(_4==null||isc.isA.String(_4)){var _6=this.getDataSource();if(_6==null){this.logWarn("can't getOperation for type: "+_1+", no "+_5+" specified, and no dataSource to "+"create an auto-operation");return null}
this.logInfo("creating auto-operation for operationType: "+_1);_3=isc.DataSource.makeDefaultOperation(_6,_1,_4);_4=_3.ID;this[_5]=_4}
return _3}});isc.defineClass("XJSONDataSource","DataSource");isc.A=isc.XJSONDataSource.getPrototype();isc.A.dataFormat="json";isc.A.dataTransport="scriptInclude";isc.defineClass("Schema","DataSource");isc.A=isc.Schema.getPrototype();isc.A.dataFormat="xml";isc.A.dropNamespaceDeclarations=true;isc.A.addGlobalId=false;isc.defineClass("WSDLMessage","Schema");isc.A=isc.WSDLMessage.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.getWSOperation=function isc_WSDLMessage_getWSOperation(_1){var _2=this.getWebService(_1);if(_1&&_1.wsOperation)return _2.getOperation(_1.wsOperation);else return _2.getOperationForMessage(this.ID.substring(8))}
);isc.B._maxIndex=isc.C+1;isc.defineClass("XSElement","Schema");isc.defineClass("XSComplexType","Schema");isc.defineClass("SchemaSet").addMethods({init:function(){this.ns.ClassFactory.addGlobalID(this);var _1=this.schemaNamespace,_2=isc.SchemaSet.schemaSets,_3=_2[_1];if(_3==null||((_3.schema==null&&_3.schema.length==0)&&(this.schema!=null&&this.schema.length!=0)))
{_2[_1]=this}
var _4=this.serviceNamespace;if(this.schema){this.$530={};this.$531={};this.$693={};for(var i=0;i=isc.Page.getWidth()||_3+this.size>=isc.Page.getHeight()){this.hide();return}
if(isNaN(_2))_2=0;if(isNaN(_3))_3=0;this.setLeft(_2);this.setTop(_3);if(!_1&&!this.isVisible())this.show()},initWidget:function(){this.Super("initWidget",arguments);this.$38x(true);this.$38y=isc.Page.setEvent("mouseMove",this.getID()+".$38x()");this.$69s=isc.Page.setEvent("mouseOut",this.getID()+".hide()");this.bringToFront()},destroy:function(){isc.Page.clearEvent("mouseMove",this.$38y);isc.Page.clearEvent("mouseOut",this.$69s);this.Super("destroy",arguments)}};isc.A.promptCursor=isc.Browser.isSafari||(isc.Browser.isMoz&&isc.Browser.geckoVersion<20051111)||(isc.Browser.isIE&&isc.Browser.minorVersion<=5.5)?"wait":"progress";isc.A.fetchDataPrompt="Finding records that match your criteria...";isc.A.getViewRecordsPrompt="Loading record...";isc.A.showPrompt=false;isc.A.neverShowPrompt=false;isc.A.actionURL="[ISOMORPHIC]/IDACall";isc.A.defaultTransport="xmlHttpRequest";isc.A.dataEncoding="XML";isc.A.preserveTypes=true;isc.A.credentialsURL=isc.Page.getIsomorphicDir()+"login/loginSuccessMarker.html";isc.A.loginWindowSettings="WIDTH=550,HEIGHT=250";isc.A.maxLoginPageLength=1048576;isc.A.$38z=Array.create({addTrack:function(_1,_2){this.$451=_1;this.add(_1,_2);this.$451=null},setLastChanged:function(_1){this.$451=_1},clearLastChanged:function(){this.$451=null},getLastChanged:function(){return this.$451}});isc.A.$452=0;isc.A.$410=[];isc.B.push(isc.A.getTransactions=function isc_c_RPCManager_getTransactions(){return this.$38z}
);isc.B._maxIndex=isc.C+1;isc.A=isc.RPCManager;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.allowCrossDomainCalls=false;isc.A.$380=0;isc.A.onLine=!isc.isOffline();isc.A.loginStatusCodeMarker="