/* SmartClient Ajax RIA system Version v10.0p_2015-08-28/PowerEdition Deployment (2015-08-28) Copyright 2000 and beyond Isomorphic Software, Inc. All rights reserved. "SmartClient" is a trademark of Isomorphic Software, Inc. LICENSE NOTICE INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE SOFTWARE LICENSE AGREEMENT. If you have received this file without an Isomorphic Software license file, please see: http://www.isomorphic.com/licenses/license-power.html You are not required to accept this agreement, however, nothing else grants you the right to copy or use this software. Unauthorized copying and use of this software is a violation of international copyright law. PROPRIETARY & PROTECTED MATERIAL This software contains proprietary materials that are protected by contract and intellectual property law. YOU ARE EXPRESSLY PROHIBITED FROM ATTEMPTING TO REVERSE ENGINEER THIS SOFTWARE OR MODIFY THIS SOFTWARE FOR HUMAN READABILITY. CONTACT ISOMORPHIC For more information regarding license rights and restrictions, or to report possible license violations, please contact Isomorphic Software by email (licensing@isomorphic.com) or web (www.isomorphic.com). */ 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(window.isc&&isc.version!="v10.0p_2015-08-28/PowerEdition Deployment"){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v10.0p_2015-08-28/PowerEdition Deployment'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))} isc.ClassFactory.defineClass("TextSettings");isc.A=isc.TextSettings;isc.A.DOUBLE="double";isc.A.BACKSLASH="backslash";isc.A=isc.TextSettings.getPrototype();isc.A.fieldList=null;isc.A.fieldSeparator=",";isc.A.lineSeparator=null;isc.A.escapingMode=isc.TextSettings.BACKSLASH;isc.A=isc.TextSettings.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.getEscapingModeEscapeChar=function isc_TextSettings_getEscapingModeEscapeChar(){switch(this.escapingMode){case isc.TextSettings.DOUBLE:return"\"";break;case isc.TextSettings.BACKSLASH:return"\\";break} return""});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("TextExportSettings","TextSettings");isc.A=isc.TextExportSettings;isc.A.LEADING_SPACE="leadingSpace";isc.A.FORMULA="formula";isc.A=isc.TextExportSettings.getPrototype();isc.A.lineSeparator="\n";isc.A.quoteValues=true;isc.A.nullValueText="";isc.A.useDisplayValue=false;isc.A.forceText=null;isc.A.dateFormat=null;isc.A.dateTimeFormat=null;isc.A.timeFormat=null;isc.ClassFactory.defineClass("TextImportSettings","TextSettings");isc.A=isc.TextImportSettings;isc.A.$935=false;isc.A=isc.TextImportSettings.getPrototype();isc.A.hasHeaderLine=false;isc.A.trim=false;isc.A=isc.TextImportSettings.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.getSpecialCharactersRegExp=function isc_TextImportSettings_getSpecialCharactersRegExp(_1){var _2=this.lineSeparator?"\\"+this.lineSeparator:"(\r)?\n";_2+="|\\"+this.getEscapingModeEscapeChar()+"\"";_2+="|\\"+this.fieldSeparator;_2+="|\\\"";return new RegExp(_2,_1)},isc.A.removeUnescapedQuotes=function isc_TextImportSettings_removeUnescapedQuotes(_1){var _2=this.getEscapingModeEscapeChar();var _3=new RegExp("\\"+_2+"\"","g");var _4=_2=="\""?new RegExp("([^\"]|^)\"(?!\")","g"):new RegExp("\"\"|([^\\"+_2+"]|^)\"","g");return _1.replace(_4,"$1").replace(_3,"\"")},isc.A.addFinalLineSeparatorIfNotPresent=function isc_TextImportSettings_addFinalLineSeparatorIfNotPresent(_1){var _2=this.lineSeparator||"\n";var _3=new RegExp(_2+"$");if(!_1.match(_3,_1))_1+=_2;return _1},isc.A.parseTextAndApplyFunctions=function isc_TextImportSettings_parseTextAndApplyFunctions(_1,_2,_3){var _4=this.fieldSeparator;var _5=this.getEscapingModeEscapeChar()+"\"";var _6=this.getSpecialCharactersRegExp();var _7=0,_8=false;;for(var _9,_10=_1,_11=0;null!=(_9=_10.match(_6));_10=_10.substring(_12),_11+=_12){var _12=_9[0].length+_9.index;switch(_9[0]){case _5:break;case"\"":_8=!_8;break;default:if(_8)continue;var _13=_1.substring(_7,_11+_9.index);if(this.trim)_13=_13.trim();if(_13=="\"\""&&this.escapingMode==isc.TextSettings.DOUBLE){_13=""} _13=this.removeUnescapedQuotes(_13);_7=_11+_12;_2(_13);if(_9[0]!=_4){if(_3())_10=""} break}} return _1.substring(_7)});isc.B._maxIndex=isc.C+4;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){if(isc.Browser.isSGWT&&window.SmartGWT.isNativeJavaObject(_2)){if(_2==null)_2=null;else{if(window.SmartGWT.warnOnSerializeError){window.SmartGWT.throwUnconvertibleObjectException(_2,window.SmartGWT.serializeErrorMessage)} _2=String.asSource(_2+"")}} 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);_2=isc.JSONEncoder.$42b(_2);for(var _8 in _2){if(_8==null)continue;if(_8==isc.gwtRef||_8==isc.gwtModule)continue;if(_8.startsWith('$'))continue;var _9=_2[_8];if(isc.isA.Function(_9)&&!_9.iscAction)continue;var _10=_8.toString();var _11={objRefs:_4,objPath:isc.JSONEncoder.$zp(_3,_8),isRoot:false};_7=isc.StringBuffer.concat(_7,(_5!=null?isc.StringBuffer.concat("\r",_5,"\t"):""),isc.Comm.$ew(_10,_9,(_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.$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.release(false)},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("")}else{return isc.SB.concat("")}},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({loadXML:function(_1,_2,_3){_3=_3||{};_3.operationType=_3.operationType||"loadXML";this.getXMLResponse(isc.addProperties({actionURL:_1,httpMethod:"GET",callback:_2},_3))},getXMLResponse:function(_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)},xmlResponses:[],$365:0,trimEmptyXMLThreshold:100,$37c:function(_1,_2,_3){if(_1.isStructured&&!_3.isRestRequest){this.fireCallback(_3.$37b,"xmlDoc,xmlText,rpcResponse,rpcRequest",[null,null,_1,_3]);return} var _4=_3.isRestRequest?_1.results:_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=false;if(_4==null||(_4.length0)){_1.status=-1}else{var _7=this.xmlResponses;if(this.logIsDebugEnabled("xmlComm")||(isc.Page.isLoaded()&&isc.debugMaster)) {var _8=this.$365++;_7.add({ID:_8,text:_4});if(_5)_5.$364=_8;if(_7.length>10)_7.shift();isc.debugMaster.call("window.updateCommWatcher",[_7])}else{_7.length=0}} this.fireCallback(_3.$37b,"xmlDoc,xmlText,rpcResponse,rpcRequest",[_5,_4,_1,_3])},useIEXMLHackaround:isc.Browser.isIE,disableIEXMLHackaround:function(){this.useIEXMLHackaround=false},xmlDOMConstructors:["MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],mozAnchorBug:isc.Browser.isMoz&&(isc.Browser.geckoVersion<20080205)&&window.location.href.indexOf("#")!=-1,$167k:/xmlns:xml=(?:"http:\/\/www.w3.org\/XML\/1998\/namespace"|'http:\/\/www.w3.org\/XML\/1998\/namespace')/g,parseXML:function(_1,_2){if(_1==null)return;_1=this.trimXMLStart(_1);if(this.useIEXMLHackaround){if(this.$167k.test(_1.substring(0,1000))){_1=_1.replace(this.$167k,"")}} 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)},trimXMLStart:function(_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},$37d:function(_1,_2){this.logWarn("Error parsing XML: "+_1+(this.logIsDebugEnabled("parseXML")?"\rXML was:\r"+_2+"\rTrace:"+this.getStackTrace():""),"parseXML")},getXMLParser:function(){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||_17.type=="any"){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){if(!_8._constructor&&_3&&(_3.instanceConstructor||_3.Constructor)){_8._constructor=_3.instanceConstructor||_3.Constructor} if(!_8.scClassName&&_3&&_3.scClassName){_8.scClassName=_3.scClassName} if(_8._constructor&&(_5==null||!_5.propertiesOnly)&&isc.ClassFactory.getClass(_8._constructor)){var _30=_8._constructor;delete _8._constructor;return isc.ClassFactory.newInstance(_30,_8)}} return _8},$45t:"type",$367:"xsi:type",getExplicitType:function(_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)}else if(_2){_3=_1.getAttribute("constructor");if(_3&&!isc.DS.get(_3))_3=null} return _3},$71v:"ref",isRefElement:function(_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},toComponents:function(_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)},$gy:"number",getFieldValue:function(_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}},getXMLFieldValue:function(_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)},$37g:function(_1){for(var _2 in _1){if(_2==this.$367)continue;return true} return false},$71f:"xmlns:",getAttributes:function(_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(_8=="constructor")_8="_constructor";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},$45u:{nil:"xsi:nil","null":"xsi:null",type:"xsi:type"},xsiNamespaces:["http://www.w3.org/2001/XMLSchema-instance","http://www.w3.org/1999/XMLSchema-instance"],getXSIAttribute:function(_1,_2){var _3;if(isc.Browser.isOpera){for(var i=0;i4000)return _1.textContent;return _3},isTextNode:function(_1){if(_1==null)return false;var _2=_1.nodeType;return(_2==3||_2==4||_2==8)},hasElementChildren:function(_1){return this.firstElementChild(_1)!=null},firstElementChild:function(_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},setAttributes:function(_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])}},$37h:function(_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.release(false)},$45x:function(_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}},$ho:"[",selectObjects:function(_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);if(isc.startsWith(_2,isc.slash)){this.logWarn("Selector \"\\\\\" does not supported. It was truncated.");_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},$37i:function(_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)},$37j:function(_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=isc.$aq("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},selectNodes:function(_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},safariSelectNodes:function(_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},$37l:function(_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.release(false)},$53z:function(_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},$37k:function(_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)},$37m:function(_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},getElementChildren:function(_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},selectString:function(_1,_2,_3){return this.selectScalar(_1,_2,_3)},selectNumber:function(_1,_2,_3){return this.selectScalar(_1,_2,_3,true)},selectScalar:function(_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},selectScalarList:function(_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},transformNodes:function(_1,_2){if(isc.isAn.XMLDoc(_1))_1=_1.nativeDoc;if(isc.isAn.XMLDoc(_2))_2=_2.nativeDoc;if(isc.Browser.isIE){if(_1){return _1.transformNode(_2)} return null} 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)} if(_1){var _6=_3.transformToDocument(_1);return new XMLSerializer().serializeToString(_6)} return null},serializeToString:function(_1){this.$37n=this.$37n||isc.xml.parseXML('\r\r\r\r \r\r');return this.transformNodes(_1,this.$37n)},loadXMLSchema:function(_1,_2,_3,_4,_5){_3=_3||{};_3.operationType=_3.operationType||"loadXMLSchema";this.loadWSDL(_1,_2,_3,_4,_5,true)},loadWSDL:function(_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)},loadWSDLFromXML:function(_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})},useClientXML:true,$37p:function(_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=_1?this.$37m(_1.documentElement.childNodes):null,_7=_6?this.toJS(_6,null,null,true):null ;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)})},$37q:function(_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;if(!_2&&_1.rpcRequest.willHandleError==false)return;if(_2)_2.location=_1.location;if(_1.wsProperties&&_2)_2.setProperties(_1.wsProperties);var _3=(isc.isA.WebService(_2)?"service":"schemaSet")+",rpcRequest";var _4=[_2,_1.rpcRequest];if(_1.autoLoadImports&&_2&&_2.loadImports){var _5=this;_2.loadImports(function(){_5.$41k(_1.callback,_3,_4)})}else{this.$41k(_1.callback,_3,_4)}},$41k:function(_1,_2,_3){this.fireCallback(_1,_2,_3)},getCompleteSource:function(_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.xml=isc.XML=isc.XMLTools;isc.defineClass("DataSource");isc.DS=isc.DataSource;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.dataSourceObjectSuffix="DS";isc.A._dataSources={};isc.A.$54v={};isc.A.$54w={};isc.A.$532="element";isc.A.$45t="type";isc.A.$99u={};isc.A.$99v={};isc.A.TABLE="table";isc.A.VIEW="view";isc.A.loaderURL="[ISOMORPHIC]/DataSourceLoader";isc.A.deepCloneOnEdit=true;isc.A.DS_FN={};isc.A.$37t="=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,_4){if(!isc.isAn.Array(_1))_1=[_1];if(_1.length<=0){this.logWarn("No DataSource IDs passed in.");return} var _5=[];for(var i=0;i<_1.length;i++){if(!this.isLoaded(_1[i])||_3)_5.add(_1[i])} var _7=_5.join(","),_8=isc.DataSource.loaderURL+(isc.DataSource.loaderURL.contains("?")?"&":"?")+(_4?"loadParents=true&":"")+"dataSource="+_7,_9=_1;;if(_5.length>0){isc.RPCManager.send(null,function(_10,_11,_12){if(_10.httpResponseCode==404){isc.warn("The DataSourceLoader servlet is not installed.");return null} if(_4&&!_3)isc.DataSource.$92w=true;try{eval(_11)}catch(e){isc.logWarn("Encountered problems trying to load DataSources: "+isc.echoAll(e))} delete isc.DataSource.$92w;if(_2)this.fireCallback(_2,["dsID"],[_9])},{actionURL:_8,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"],[_9])} } ,isc.A.loadWithParents=function isc_c_DataSource_loadWithParents(_1,_2,_3){this.load(_1,_2,_3,true)} ,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((!Array.shouldSortAscending(_4.direction)?"-":"")+_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||isc.isAn.emptyObject(_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;var _3=false,_4=_2.getSearchOperator(_1.operator) ;if(_2.getField(_1.fieldName)&&_4){_3=true} else if(_2.getField("fieldName")||_2.getField("operator"))_3=false;else if(_1.fieldName&&(_1.operator&&_4)){_3=true} else if(_1.fieldName&&_1.value!=null&&_1.operator==null){_3=true}else{var _5;if(_1.operator!=_5){var _6=_4;if(_6!=null&&(_6.isAnd||_6.isOr)){_3=true} } } this.logInfo("Criteria object:"+this.echo(_1)+" not explicitly marked as AdvancedCriteria"+(_3?" but treating as Advanced based on format.":" - treating as SimpleCriteria."),"AdvancedCriteria");return _3} ,isc.A.copyCriteria=function isc_c_DataSource_copyCriteria(_1){if(_1==null)return null;return isc.clone(_1)} ,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.A.getPathValue=function isc_c_DataSource_getPathValue(_1,_2,_3){return isc.Canvas.$70o(_2,_3,_1,null,true)} ,isc.A.setPathValue=function isc_c_DataSource_setPathValue(_1,_2,_3,_4){isc.Canvas.$70n(_2,_3,_4,_1,null,true)} ,isc.A.getCombinedDataSourceFields=function isc_c_DataSource_getCombinedDataSourceFields(_1){var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i];if(isc.isA.String(_4))_4=isc.DataSource.get(_4);if(_4==null){this.logWarn("getCombinedDataSourceFields() - unable to locate dataSource:" +_1[i]);continue} var _5=_4.getID(),_6=isc.getKeys(_4.getFields());for(var j=0;j<_6.length;j++){_2[_2.length]=_5+"."+_6[j]} } return _2} ,isc.A.getFieldFromDataSources=function isc_c_DataSource_getFieldFromDataSources(_1,_2,_3){var _4=this.getDataSourceForField(_1,_2,_3);if(_4==null){if(!_3){this.logWarn("getFieldFromDataSources() - unable to find dataSource from combined field ID "+_1)} return null} var _5=_1.split("."),_6=_5[0],_7=_5[1];return _4.getField(_7)} ,isc.A.getDataSourceForField=function isc_c_DataSource_getDataSourceForField(_1,_2,_3){var _4=_1.split("."),_5=_4[0],_6=_4[1];if(_5==null||_6==null){if(!_3){this.logWarn("getDataSourceForField() passed invalid field ID:"+_1+". Expected format is to use dot-notation to indicate the dataSource plus fieldName - for example 'countryDS.countryCode'")} return null} var _7;if(_2==null)_7=isc.DataSource.get(_5);else{if(!isc.isAn.Array(_2))_2=[_2];for(var i=0;i<_2.length;i++){if(_2[i].getID()==_5){_7=_2[i];break} } } return _7} ,isc.A.$93o=function isc_c_DataSource__getDefaultValueForFieldType(_1){var _2;switch(_1){case"date":case"datetime":case"time":_2=new Date(0);break;case"float":_2=0.0;break;case"integer":_2=0;break;case"boolean":_2=false;break;case"text":default:_2="";break} return _2} ,isc.A.$93p=function isc_c_DataSource__getTypedValueAsString(_1,_2,_3){if(_3==null)_3={};if(_1==null){var _4=_3.nullValueText;if(_4!=null)return _4;_1=this.$93o(_2)} switch(_2){case"date":var _5=_3.dateFormat;return _1.toShortDate(_5);case"datetime":var _5=_3.dateTimeFormat;return _1.toShortDateTime(_5);case"time":var _5=_3.timeFormat;return isc.Time.toShortTime(_1,_5);case"float":case"integer":case"boolean":default:return _1.toString();case"text":return _1} } ,isc.A.isFlatCriteria=function isc_c_DataSource_isFlatCriteria(_1){if(!_1)return false;var _2=isc.DS.$57z[_1.operator];if(isc.isA.emptyObject(_1)||(_1.fieldName&&_2&&_2.valueType!="criteria")) {return true} if(_2&&_2.valueType=="criteria"&&_1.criteria){var _3=_1.criteria;for(var i=0;i<_3.length;i++){var _5=_3[i],_6=_5.operator?isc.DS.$57z[_5.operator]:null,_7=_6&&_6.valueType=="criteria" ;if(_7){return false} } return true} return false} ,isc.A.flattenCriteria=function isc_c_DataSource_flattenCriteria(_1){if(!_1)return null;var _2=isc.addProperties({},_1);if(_2.criteria){_2.criteria=[];this.$1241(_2.criteria,_1)} return _2} ,isc.A.$1241=function isc_c_DataSource__addSubCriteriaToList(_1,_2){if(!_2.criteria){_1.add(isc.addProperties({},_2));return} var _3=_2.criteria;for(var i=0;i<_3.length;i++){var _5=_3[i];this.$1241(_1,_5)} } ,isc.A.canFlattenCriteria=function isc_c_DataSource_canFlattenCriteria(_1){if(!_1)return false;if(isc.DataSource.isFlatCriteria(_1))return true;var _2=_1.operator;if(this.$1242(_1,_2))return true;return false} ,isc.A.$1242=function isc_c_DataSource__criteriaHasSameLogicalOperators(_1,_2){if(!_1.criteria||_1.criteria.isEmpty())return true;if(_1.operator!=_2){if(_1.criteria.length!=1||_1.criteria[0].criteria)return false} var _3=_1.criteria;for(var i=0;i<_3.length;i++){var _5=_3[i];if(!this.$1242(_5,_2))return false} return true} ,isc.A.getAdvancedCriteriaDescription=function isc_c_DataSource_getAdvancedCriteriaDescription(_1,_2){if(!isc.isAn.Array(_2)){if(!isc.isA.DataSource(_2))_2=isc.DS.getDataSource(_2);if(!_2)return"No dataSource"} var _3="";if(_1.criteria&&isc.isAn.Array(_1.criteria)){var _4=_1.operator,_5=_1.criteria;for(var i=0;i<_5.length;i++){var _7=_5[i];if(i>0)_3+=" "+_4+" ";if(_7.criteria&&isc.isAn.Array(_7.criteria)){_3+="(" _3+=isc.DataSource.getAdvancedCriteriaDescription(_7,_2);_3+=")" }else{_3+=isc.DataSource.getCriterionDescription(_7,_2)} } }else{_3+=isc.DataSource.getCriterionDescription(_1,_2)} return _3} ,isc.A.getCriterionDescription=function isc_c_DataSource_getCriterionDescription(_1,_2){if(_1==null)return"";var _3=_1.fieldName,_4=_1.operator,_5=_1.start,_6=_1.end,_7;if(isc.isAn.Array(_2)){_2=isc.DataSource.getDataSourceForField(_3,_2);_7=isc.DataSource.getFieldFromDataSources(_3,[_2])}else{if(!isc.isA.DataSource(_2))_2=isc.DS.getDataSource(_2);if(!_2)return"No DataSource";_7=_2.getField(_3);if(_7==null){_7=_2.getFieldForDataPath(_3)} } var _8=_2.getSearchOperator(_4,_7),_9=_2.getFieldOperatorMap(_7,true,_8.valueType,false),_10="" ;if(!_7){if(_1.criteria&&isc.isAn.Array(_1.criteria)){isc.logWarn("DataSource.getCriterionDescription: Passed an AdvancedCriteria - returning through getAdvancedCriteriaDescription.");return isc.DataSource.getAdvancedCriteriaDescription(_1,_2)} _10=_3+" "+isc.FilterBuilder.missingFieldPrompt+" ";isc.logWarn("DataSource.getCriterionDescription: No such field '"+_3+"' in DataSource '"+_2.ID+"'.")}else{_10=(_7.title?_7.title:_3)+" "} switch(_4) {case"lessThan":case"greaterThan":case"lessOrEqual":case"greaterOrEqual":case"between":case"notNull":_10+="is "+(_9[_4]||_4);break;case"equals":_10+="is equal to";break;case"notEqual":_10+="is not equal to";break;default:_10+=_9[_4]||_4} var _11=_1.value;if(isc.DateUtil.isRelativeDate(_11)){var _12=_7?_7.type:null,_13=false,_14=isc.SimpleType ;if(_14.inheritsFrom(_12,"date")&&!_14.inheritsFrom(_12,"datetime")){_13=true} _11=isc.DateUtil.getAbsoluteDate(_11,null,null,_13)} if(_8.valueType=="valueRange")_10+=" "+_5+" and "+_6;else if(_4!="notNull"){_10+=" ";if(isc.isA.Date(_11)){if(_11.isLogicalDate)_10+=_11.toShortDate();else _10+=_11.toShortDatetime()}else _10+=_11&&_11.toString?_11.toString():_11} return _10} ,isc.A.getLoaderURL=function isc_c_DataSource_getLoaderURL(){return isc.DataSource.loaderURL} ,isc.A.setLoaderURL=function isc_c_DataSource_setLoaderURL(_1){isc.DataSource.addClassProperties({loaderURL:_1})} ,isc.A.iscServer_strictJSONReviver=function isc_c_DataSource_iscServer_strictJSONReviver(_1,_2){if(isc.isA.String(_2)){if(_2.startsWith(isc.DataSource.$118v)){_2=parseInt(_2.substring(14));_2=new Date(_2)}else if(_2.startsWith(isc.DataSource.$105n)){_2=_2.substring(9);if(_2.indexOf(":")==-1){var _3=_2.split("-");_2=Date.parseServerDate(parseInt(_3[0]),parseInt(_3[1])-1,parseInt(_3[2]))}else{var _3=_2.split(" ");var _4=_3[0].split("-"),_5=_3[1].split(":");var _6=_5[2].indexOf(".");var _7;if(_6!=-1){_7=_5[2].substring(_6+1);_5[2]=_5[2].substring(0,_6)} var _8=new Date(28800000);_8.setUTCFullYear(_4[0]);_8.setUTCMonth(_4[1]-1);_8.setUTCDate(_4[2]);_8.setUTCHours(_5[0]);_8.setUTCMinutes(_5[1]);_8.setUTCSeconds(_5[2]);if(_7){_8.setUTCMilliseconds(_7)} _2=_8} }else if(_2.startsWith(isc.DataSource.$105o)){var _3=_2.substring(9).split(":");_2=Date.parseServerTime(parseInt(_3[0]),parseInt(_3[1]),parseInt(_3[2]))} } return _2} );isc.B._maxIndex=isc.C+56;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.patternSingleWildcard=["?","%"];isc.A.patternMultiWildcard="*";isc.A.patternEscapeChar="\\";isc.A.translatePatternOperators=false;isc.A.transformResponseToJS=true;isc.A.supportsRequestQueuing=true;isc.A.firstGeneratedSequenceValue=0;isc.A.copyLocalResults=true;isc.A.deepCopyLocalResults=false;isc.A.criteriaPolicy="dropOnShortening";isc.A.defaultTextMatchStyle="exact";isc.A.ignoreTextMatchStyleCaseSensitive=false;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.cacheAcrossOperationIds=true;isc.A.cacheMaxAge=60;isc.A.cacheLastFetchTime=0;isc.A.sendParentNode=false;isc.A.autoCacheAllData=false;isc.A.autoConvertRelativeDates=true;isc.A.showFieldsAsTree=false;isc.A.$111m={};isc.A.$111n={};isc.A.$111o={};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){if(this.cacheAllData||this.clientOnly){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.setTestData=function isc_DataSource_setTestData(_1,_2){this.setCacheData(_1,_2)} ,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.criteriaContainsDates=function isc_DataSource_criteriaContainsDates(_1){var _2=this.getCriteriaFields(_1);if(_2&&_2.length>0){for(var i=0;i<_2.length;i++){var _4=this.getField(_2[i]);if(!_4)continue;if(isc.SimpleType.inheritsFrom(_4.type,"date")||isc.SimpleType.inheritsFrom(_4.type,"datetime")){return true} } } return false} ,isc.A.convertRelativeDates=function isc_DataSource_convertRelativeDates(_1,_2,_3,_4){if(!_1)return null;if(!this.criteriaContainsDates(_1)){return _1} if(!this.isAdvancedCriteria(_1)&&_1.operator==null){return _1} var _5=isc.clone(_1);_4=_4||new Date();if(_3==null)_3=isc.DateChooser?isc.DateChooser.firstDayOfWeek:0;if(_5.criteria&&isc.isAn.Array(_5.criteria)){var _6=_5.criteria;for(var i=_6.length-1;i>=0;i--){var _8=_6[i];if(!_8){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Removing NULL subCriteria...","relativeDates")} _5.criteria.removeAt(i)}else{if(_8.criteria&&isc.isAn.Array(_8.criteria)){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Calling convertRelativeDates from convertRelativeDates - data is:\n\n"+isc.echoFull(_8)+"\n\ncriteria is: \n\n"+isc.echoFull(_1) ,"relativeDates" )} _5.criteria[i]=this.convertRelativeDates(_8,_2,_3,_4);if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Called convertRelativeDates from convertRelativeDates - data is\n\n"+isc.echoFull(_5.criteria[i]),"relativeDates")} }else{_5.criteria[i]=this.mapRelativeDate(_8,_4)} } } }else{_5=this.mapRelativeDate(_5,_4)} if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Returning from convertRelativeDates - result is:\n\n"+isc.echoFull(_5)+"\n\noriginal criteria is: \n\n"+isc.echoFull(_1) ,"relativeDates" )} return _5} ,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;var _10=isc.DateUtil.getAbsoluteDate(_5,_2,_3.value.rangePosition,_9||_3.value.logicalDate);if(!_9&&["$yesterday","$today","$tomorrow"].contains(_5)){switch(_3.operator){case"equals":_3.operator="betweenInclusive";_3.start=isc.DateUtil.getStartOf(_10,"D");_3.end=isc.DateUtil.getEndOf(_10,"D");delete _3.value;break;case"notEqual":_3._constructor="AdvancedCriteria";_3.operator="not";_3.criteria=[{operator:"betweenInclusive",fieldName:_3.fieldName,start:isc.DateUtil.getStartOf(_10,"D"),end:isc.DateUtil.getEndOf(_10,"D") } ];delete _3.value;delete _3.fieldName;break;case"lessThan":case"greaterOrEqual":_3.value=isc.DateUtil.getStartOf(_10,"D");break;case"greaterThan":case"lessOrEqual":_3.value=isc.DateUtil.getEndOf(_10,"D");break;default:_3.value=_10} }else{_3.value=_10} }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||_3.start.logicalDate)} 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||_3.end.logicalDate)} } return _3} );isc.B._maxIndex=isc.C+12;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.cloneDSRequest=isc.DataSource.$159k;isc.A.cloneDSResponse=isc.DataSource.$135y;isc.A.$110l=200;isc.A.$41v="Action";isc.A.resultBatchSize=150;isc.A.$2j=[];isc.A.emptyExportMessage="You are attempting to export an empty dataset";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.$135s="exactCase";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.cacheData||this.testData} 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)){if(isc.Canvas.validateFieldNames){isc.Canvas.$1027(_3,this)} 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} _6=this.$93t(_6);if(_6.type){var _8=this.getType(_6.type);if(_8&&_8.fieldProperties){_6=_3[i]=isc.addProperties({},_8.fieldProperties,_6)} if(!_6.format&&_8&&_8.format){_6.format=_8.format} } _4[_6.name]=_6} this.fields=_4} if(this.dataSourceType==isc.DataSource.VIEW)this.initViewSources();isc.DataSource.registerDataSource(this)} ,isc.A.$93t=function isc_DataSource__prettyField(_1){if(isc.isA.String(_1.validOperators)){_1.validOperators=[_1.validOperators]} var _2;if((_1.foreignKey) &&(_1.nillable==_2)){_1.nillable=true} return _1} ,isc.A.destroy=function isc_DataSource_destroy(){var _1=this.ID,_2=isc.DS;if(this.cacheResultSet){this.cacheResultSet.destroy();this.cacheResultSet=null} 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;this.Super("destroy",arguments)} ,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} if(_1.internalClientContext!=null){_2.internalClientContext=_1.internalClientContext} }else{_2.dataSource=_2.dataSource||_1.dataSource||this} 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.clientOnly&&this.cacheAllData&&this.hasAllData()&&!isc.isAn.Array(_3)) {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={},_3=this.getFieldNames(false);for(var i=0;i<_3.length;i++){var _5=_3.get(i),_6=_1[_5],_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],_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;delete _1.__module} 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=_3._dsRequest;var _6=function(_7){_1.clientOnlyData=_7?_7.data:null;this.$38b(_2,_7,_5,_1,_3)};if(this.copyLocalResults&&this.getClientOnlyResponse===isc.DataSource.getInstanceProperty("getClientOnlyResponse")) {this.$110m(_5,_4,_6)}else{var _7=this.getClientOnlyResponse(_5,_4);_6.call(this,_7)} } ,isc.A.$110m=function isc_DataSource__asyncGetClientOnlyResponse(_1,_2,_3){var _4=_1.operationType,_5={status:0 };if(!(_4=="fetch"||_4=="select"||_4=="filter")){_3.apply(this,[this.getClientOnlyResponse(_1,_2)]);return} _2=_2||this.testData;var _6=this.cacheData,_7=this.testData,_8=false;if(_2&&!this.testData&&this.clientOnly){_6=_7=_2;_8=true} if(!_2||isc.isA.String(_2)){if(isc.isA.String(_2)){this.logInfo(this.ID+" datasource: using testData property as data");_6=_7=isc.eval(_2);_8=true}else if(window[this.ID+"TestData"]){this.logInfo(this.ID+" datasource: using "+this.ID+"TestData object as data");_6=_7=window[this.ID+"TestData"];_8=true}else{this.logInfo(this.ID+" datasource: testData property and "+this.ID+"TestData object not found, using empty list as data");_6=_7=[];_8=true} _2=_7} var _9=_1.data;if(isc.isAn.Array(_9))_9=_9[0];var _10=this.applyFilter(_2,_9,_1),_11=_10;if(_1.startRow!=null){var _12=_1.startRow,_13=_1.endRow,_14=_10.length;var _15=isc.shallowClone(_1.sortBy);if(_15){if(!isc.isAn.Array(_15))_15=[_15];if(isc.isAn.Object(_15[0])){_15=isc.DS.getSortBy(_15) } var _16=_15.length,_17=new Array(_16),_18=new Array(_16);for(var i=0;i<_16;++i){var _20=true;if(_15[i].startsWith("-")){_15[i]=_15[i].substring(1);_20=false} _17[i]=_20;_18[i]=this} _10.sortByProperties(_15,_17,null,_18)} _13=Math.min(_13,_14);_11=_10.slice(_12,_13);_5.startRow=_12;_5.endRow=_13;_5.totalRows=_14} var _21=function(){_5.data=_11;this.$109x(_5,_4);if(_8){this.cacheData=this.testData=_2} _3.call(this,_5)};if(this.copyLocalResults){this.$110n(0,_11.length,_11,_21)}else{_21.call(this)} } ,isc.A.$110n=function isc_DataSource__asyncCopyLocalResults(_1,_2,_3,_4){var _5=_2,_6=isc.Browser.isSGWT;_2=Math.min(_2,_1+this.$110l);for(var i=_1;i<_2;++i){if(this.deepCopyLocalResults){_3[i]=isc.clone(_3[i])}else{_3[i]=isc.addProperties({},_3[i])} if(_6){_3[i][isc.gwtRef]=null;_3[i][isc.gwtModule]=null} } if(_2==_5){_4.call(this)}else{this.delayCall("$110n",[_2,_5,_3,_4],0)} } ,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")} var _7=this.getOperationBinding(_4).responseDataSchema;_2=this.recordsFromObjects(_2,_7);if(this.logIsDebugEnabled("xmlBinding")){this.logDebug("Validated dsResponse.data: "+isc.echoFull(_2),"xmlBinding")} var _8={data:_2,startRow:_4.startRow||0,status:0 };_8.endRow=_8.startRow+Math.max(0,_2.length);_8.totalRows=Math.max(_8.endRow,_2.length)}else{var _9=_1.status;if(_9==0||_9==null)_9=-1;var _8={status:_9,data:_1.data };_6=_1.results} this.$38b(_6,_8,_4,_1,_3)} ,isc.A.$69k=function isc_DataSource__handleCSVTextReply(_1,_2,_3){if(_1.status!=0)return;var _4=isc.TextImportSettings.create({hasHeaderLine:true,trim:true });isc.TextImportSettings.$935=true;var _5=this.recordsFromText(_1.data,_4);isc.TextImportSettings.$935=false;_1.$69j=true;this.$377(_1,_5,_3)} ,isc.A.$379=function(rpcResponse,jsonText,rpcRequest){if(rpcRequest.isRestRequest&&!isc.isA.String(jsonText)){var jsonObjects=jsonText}else{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.")}}} var wasInvalid=false;try{var jsonObjects;if(rpcRequest.useStrictJSON){jsonObjects=isc.Class.parseStrictJSON(evalText,rpcRequest.jsonReviver)}else{if(evalText&&evalText.match(/^\s*\{/)){evalText="var evalText = "+evalText+";evalText;"} 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);wasInvalid=true} if(jsonObjects==null&&!wasInvalid){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));jsonObjects=jsonText} rpcResponse.$38c=true}} this.$377(rpcResponse,jsonObjects,rpcRequest)},isc.A.recordsFromObjects=function isc_DataSource_recordsFromObjects(_1,_2){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],null,_2)} return _1},isc.A.validateJSONRecord=function isc_DataSource_validateJSONRecord(_1,_2,_3){if(!_1){return null} if(_3==null){_3=this} var _4=this.getFieldNames(),_5={};for(var i=0;i<_4.length;i++){var _7=_4[i],_8=_3.getField(_7),_9;if(_8.valueXPath&&!_2){_9=isc.xml.selectObjects(_1,_8.valueXPath,true)}else{_9=_1[_7]} if(_8.getFieldValue){if(!isc.isA.Function(_8.getFieldValue)){isc.Func.replaceWithMethod(_8,"getFieldValue","record,value,field,fieldName")} _9=_8.getFieldValue(_1,_9,_8,_7)} var _10;if(_9!==_10){var _11=isc.DS.get(_8.type);if(_11&&!(_11.skipJSONValidation)){if(!(isc.isAn.Array(_9))){_9=_11.validateJSONRecord(_9)}else{for(var j=0;j<_9.length;j++){_9[j]=_11.validateJSONRecord(_9[j])}}} _5[_7]=this.validateFieldValue(_8,_9)}} if(_3.dropExtraFields)return _5;for(var i=0;i<_4.length;i++){var _7=_4[i];_1[_7]=_5[_7]} 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.release(false)},isc.A.$38d=function isc_DataSource__createTemplatedRequestBody(_1){var _2=this.soapBodyTemplate,_3;_3=_2.evalDynamicString(this,_1);return _3},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(_1&&_1.$167f){_5=_1.$167f}else 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:""))} 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(this+": 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.release(false),"\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.evalBoundary;isc.B.push(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,_11=null;if(_2.xmlExplicitType){_10=true;_11=isc.Comm.omitXSI;isc.Comm.omitXSI=false}else{if(isc.Comm.omitXSI==null){_10=isc.Comm.omitXSI=true}} var _12=this.$ew(_1,_2,_3,_4,_7);if(_6)_2.qualifyAll=null;isc.Comm.xmlSchemaMode=_9;if(_10)isc.Comm.omitXSI=_11 return _12},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;if(!_2.ignoreConstructor){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} var _10;if(_2.xmlExplicitType)_10=null;else _10=this.ID;_8.append(isc.Comm.$36u(_4,_10,_9,_2.nsPrefixes,true));_1=this.serializeAttributes(_1,_8,_2);if(_7&&_4!=_7){if(isc[_7]!=null){_8.append(" constructor=\"",_7,"\"")}else{_8.append(" _constructor=\"",_7,"\"")}} var _11;if(_1!=null){_11=this.xmlSerializeFields(_1,_2,_3+(!_2||_2.indent!=false?" ":""))} if(_5){_8.append(this.outputNSPrefixes(_2.nsPrefixes,_3+(!_2||_2.indent!=false?" ":""),_2))} var _12=this.$45z;this.$45z=null;if(_11==null||isc.isAn.emptyString(_11)){_8.append("/>");return _8.release(false)} _8.append(">",_11,(_12?"":"\r"+_3));_8.append(isc.Comm.$36v(_4,_9,_2.nsPrefixes));return _8.release(false)},isc.A.outputNSPrefixes=function isc_DataSource_outputNSPrefixes(_1,_2,_3){delete _1.$36y;_1=isc.makeReverseMap(_1);var _4=isc.xml.$37l(_1,null,_2+(!_3||_3.indent!=false?" ":""));return _4},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);if(isc.isAn.Instance(_9)){if(_9.ID){_9=_9.ID}else{this.logWarn("Serializing attribute "+_7+" failed to replace object instance with ID")}} _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){delete _1.__ref;delete _1.__module} 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.release(false)},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=!_3.xmlExplicitType||this.shouldWriteSchemaType(_6)?this.$38h(_6?_6.type:null,_2):null;var _14=isc.Comm.$36u(_1,_13,_10,_3.nsPrefixes),_15=isc.Comm.$36v(_1,_10,_3.nsPrefixes);var _16=isc.isAn.Array(_2)?_2:[_2];if(!_6&&_3.schema&&_3.schema.getField){_6=_3.schema.getField(_1)} if(this.fieldIsComplexType(_1)){var _17=_3.parentSchemaNamespace;_3.parentSchemaNamespace=this.schemaNamespace;var _18=this.getFieldDataSource(_6,_6&&_6.xsElementRef?"element":null);if(_6.multiple){_5.append("\r",_4,_14);for(var i=0;i<_16.length;i++){var _20=_18;if(_16[i]!=null&&_16[i]._constructor){_20=isc.DS.get(_16[i]._constructor)||_18} _5.append(_20.xmlSerialize(_16[i],_3,_4+(!_3||_3.indent!=false?" ":""),_16[i]==null?_6.childTagName:_16[i].$97p||_6.childTagName))} _5.append("\r",_4,_15)}else if(_18.canBeArrayValued&&isc.isAn.Array(_2)){_5.append(_18.xmlSerialize(_2,_3,_4,_1))}else if(_16.length==1&&isc.isA.String(_16[0])&&isc.startsWith(_16[0],"ref:")){_14=isc.Comm.$36u(_1,_13,_10,_3.nsPrefixes,true);_5.append("\r",_4);_5.append(_14);_5.append(" ref=\"",_2.substring(4),"\"/>")}else{for(var i=0;i<_16.length;i++){var _2=_16[i];if(_2==null){_5.append("\r",_4);_5.append(_14,_15)}else if(isc.DS.isSimpleTypeValue(_2)){if(isc.isA.String(_2)&&isc.startsWith(_2,"ref:")){_5.append("\r",_4);_5.append(_14);var _21=(_6?_6.childTagName||_6.type:"value");_5.append("<",_21," ref=\"",_2.substring(4),"\"/>");_5.append(_15)}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(_18.xmlSerialize(_2,_3,_4,_1))}}} _3.parentSchemaNamespace=_17}else if(_6!=null){if(_6.xsElementRef){var _22=this.getType(_6.type);if(_22&&_22.schemaNamespace) {_10=_22.schemaNamespace}} if(_6.multiple){_5.append("\r",_4,_14,"\r");for(var i=0;i<_16.length;i++){_5.append(this.$38g(_6.childTagName,_6,_16[i],_10,_3),"\r",_4)} _5.append("\r",_4,_15,"\r")}else{for(var i=0;i<_16.length;i++){_5.append("\r",_4,this.$38g(_1,_6,_16[i],_10,_3))}}}else{for(var i=0;i<_16.length;i++){if(_16[i]==null||isc.isAn.emptyObject(_16[i])){_5.append("\r",_4,_14,_15)}else{_5.append("\r",_4,isc.Comm.$ew(_1,_16[i],_4,{isRoot:false}))}}} return _5.release(false)},isc.A.shouldWriteSchemaType=function isc_DataSource_shouldWriteSchemaType(_1){if(!_1)return true;if(_1.serializeXMLType!=null)return _1.serializeXMLType;else{return(_1.type==null||_1.type=="any")}},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=!_5.xmlExplicitType||this.shouldWriteSchemaType(_2)?this.$38h(_6,_3):null;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,!!this.trimMilliseconds)}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,_2){if(_2!=null&&(_1==null||_1=="any")){if(_2==null)return null;if(isc.isA.Date(_2)){return _2.logicalDate?"date":(_2.logicalTime?"time":"datetime")}else if(isc.isA.Number(_2)){if(parseInt(_2)==_2){return"float"}else{return"integer"}}else if(isc.isA.Boolean(_2)){return"boolean"}else if(isc.isA.String(_2)){return"text"}} 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")||_1.validators.find("_constructor","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")||_1.validators.find("_constructor","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")||_1.validators.find("_constructor","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")||_1.validators.find("_constructor","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);_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)} 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)}} 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.httpResponseText=_4.httpResponseText;_2.transactionNum=_4.transactionNum;_2.clientContext=_5.clientContext;_2.internalClientContext=_5.internalClientContext;_2.httpHeaders=_4.httpHeaders}else{_2.clientContext=_3.clientContext;_2.internalClientContext=_3.internalClientContext} 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.cacheAllData&&this.autoCacheAllData&&_3.downloadResult!=true&&_2.operationType=="fetch"&&(_3.data==null||isc.isAn.emptyObject(_3.data))&&_2.startRow==0&&_2.endRow==_2.totalRows) {if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("Response: switching on cacheAllData","cacheAllData")} this.cacheAllData=true;this.$85n=isc.timestamp()} 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}} this.fireResponseCallbacks(_2,_3,_4,_5);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} var _9=isc.DS.get(_2.relatedUpdates[i].dataSource);if(_9==null){this.logWarn("DSResponse contained relatedUpdate referencing dataSource ID:"+_2.relatedUpdates[i].dataSource+". This dataSource appears not to be present - ignoring related update.")}else{_9.updateCaches(_2.relatedUpdates[i],null)}}}},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,_3){if(_2.operationId){if(!this.operationBindings){this.logWarn("exportClientData() was passed operationId '"+_2.operationId+"', but this DataSource has no operationBindings. Delegating to the static exportClientData() method");delete _2.operationId} var _4,_5;for(var i=0;i=0&&isc.isAn.Array(_4)&&_4.length>0){_4=_4[0].fileContents}else{_4=null} this.fireCallback(_2,"dsResponse,data,dsRequest",[_3,_4,_5])},{willHandleError:true})},isc.A.hasFile=function isc_DataSource_hasFile(_1,_2){if(isc.isA.String(_1))_1=isc.DataSource.makeFileSpec(_1);this.performDSOperation("hasFile",_1,function(_3,_4,_5){if(_3.status>=0){_4=!!(isc.isAn.Array(_4)&&_4.length>0)}else{_4=false} this.fireCallback(_2,"dsResponse,data,dsRequest",[_3,_4,_5])},{willHandleError:true})},isc.A.listFiles=function isc_DataSource_listFiles(_1,_2){if(!_1)_1={};this.performDSOperation("listFiles",_1,function(_3,_4,_5){if(_3.status<0)_4=null;this.fireCallback(_2,"dsResponse,data,dsRequest",[_3,_4,_5])},{willHandleError:true})},isc.A.saveFile=function isc_DataSource_saveFile(_1,_2,_3){if(isc.isA.String(_1))_1=isc.DataSource.makeFileSpec(_1);var _4=isc.addProperties({fileContents:_2},_1);this.performDSOperation("saveFile",_4,function(_5,_6,_7){if(_5.status<0)_6=null;if(isc.isAn.Array(_6))_6=_6[0];this.fireCallback(_3,"dsResponse,data,dsRequest",[_5,_6,_7])},{willHandleError:true})},isc.A.renameFile=function isc_DataSource_renameFile(_1,_2,_3,_4,_5){if(isc.isA.String(_1))_1=isc.DataSource.makeFileSpec(_1);if(isc.isA.String(_2))_2=isc.DataSource.makeFileSpec(_2);if(!_2.fileType)_2.fileType=_1.fileType;if(!_2.fileFormat)_2.fileFormat=_1.fileFormat;if(!_2.fileName)_2.fileName=_1.fileName;this.performDSOperation("renameFile",_2,function(_6,_7,_8){if(_6.status<0)_7=null;this.fireCallback(_3,"dsResponse,data,dsRequest",[_6,_7,_8])},{willHandleError:true,oldValues:_1})},isc.A.removeFile=function isc_DataSource_removeFile(_1,_2,_3){if(isc.isA.String(_1))_1=isc.DataSource.makeFileSpec(_1);this.performDSOperation("removeFile",_1,function(_4,_5,_6){if(_4.status<0)_5=null;this.fireCallback(_2,"dsResponse,data,dsRequest",[_4,_5,_6])},{willHandleError:true})},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.shouldUseStrictJSON=function isc_DataSource_shouldUseStrictJSON(_1){if(_1&&_1.useStrictJSON!=null)return _1.useStrictJSON;if(this.useStrictJSON!=null)return this.useStrictJSON;if(isc.Browser.isIE&&isc.Browser.version>=9&&isc.RPCManager.useJSONParse_IE9&&this.dataFormat=="iscServer") {return true} return null},isc.A.shouldFallbackToEval=function isc_DataSource_shouldFallbackToEval(_1){if(_1==null)_1={};if(_1.fallbackToEval!=null)return _1.fallbackToEval;if(_1.useStrictJSON||this.useStrictJSON)return false;return(isc.Browser.isIE&&isc.Browser.version>=9&&isc.RPCManager.useJSONParse_IE9&&this.dataFormat=="iscServer")},isc.A.execute=function isc_DataSource_execute(_1){this.performDSOperation(_1.operationType||"fetch",_1.data,_1.callback,_1)},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(),$135x:_4&&_4.useStrictJSON,useStrictJSON:this.shouldUseStrictJSON(_4),$135v:_4&&_4.fallbackToEval,fallbackToEval:this.shouldFallbackToEval(_4),textMatchStyle:this.defaultTextMatchStyle},_4);isc.DataSource.recordTimingData(_5,"UI event to DSRequest creation","start",isc.EH.$117e);isc.DataSource.recordTimingData(_5,"UI event to DSRequest creation","end");isc.DataSource.recordTimingData(_5,"performDSOperation","start");_5.lastClientEventThreadCode=isc.EH.$lc;var _6=isc.EH.getLastEvent();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 _8=_5.sortBy[i];if(!isc.isA.String(_8))continue;var _9=this.getField(_8.charAt(0)=="-"?_8.substring(1):_8);if(_9&&_9.canSortClientOnly)_5.sortBy[i]=null} _5.sortBy.removeEmpty();if(_5.sortBy.length==0)delete _5.sortBy} if(this.sendParentNode==false){_5.$135w=_5.parentNode;_5.parentNode=null} return this.sendDSRequest(_5)},isc.A.translatePatternOperatorInAdvancedCriteria=function isc_DataSource_translatePatternOperatorInAdvancedCriteria(_1){if(!this.isAdvancedCriteria(_1)){return _1} var _2,_3;if(_1.criteria){if(isc.isA.Array(_1.criteria)){for(_2 in _1.criteria){_3=_1.criteria[_2];_1.criteria[_2]=this.translatePatternOperatorInAdvancedCriteria(_3)}}else{_1.criteria=this.translatePatternOperatorInAdvancedCriteria(_1.criteria)}}else{_3=_1;if(_3.operator==="matchesPattern"||_3.operator==="iMatchesPattern"||_3.operator==="containsPattern"||_3.operator==="iContainsPattern") {var _4=(_3.operator.indexOf('i')===0);var _5=(isc.isA.Array(this.patternMultiWildcard)?this.patternMultiWildcard[0]:this.patternMultiWildcard.substring(0,1));var _6=_3.fieldName;var _7=_3.value;if(isc.isA.Array(this.patternMultiWildcard)){for(var _2=1;_21){_10={_constructor:"AdvancedCriteria",operator:"and",criteria:[]};for(var _11=0;_11<_8.length;_11++){var _12=_8[_11];if(!_12||_12.length==0){continue} _9={fieldName:_6,value:_12};var _13=_11>0,_14=_8.length-1>_11;if(_13&&_14||(_3.operator==="containsPattern"||_3.operator==="iContainsPattern")){_9.operator=_4?"iContains":"contains"}if(_3.operator==='startsWithPattern'||_3.operator==='iStartsWithPattern'){_9.operator=_4?"iStartsWith":"startsWith"}if(_3.operator==='endsWithPattern'||_3.operator==='iEndsWithPattern'){_9.operator=_4?"iEndsWith":"endsWith"}else if(_13){_9.operator=_4?"iEndsWith":"endsWith"}else if(_14){_9.operator=_4?"iStartsWith":"startsWith"} _10.criteria.add(_9)}} _1=_10}} return _1},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);var _3=this.getDataProtocol(_1);if(_2=="iscServer"&&!(this.clientOnly||_3=="clientCustom")&&!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.$135u=_1.bypassCache;_1.bypassCache=this.shouldBypassCache(_1)} if(_1.showPrompt==null){_1.showPrompt=_1.downloadResult?false: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(_1.operationType=="fetch"&&this.fetchingClientOnlyData(_1))return;if(this.logIsDebugEnabled()){this.logDebug("Outbound DSRequest: "+this.echo(_1))} _1.$376=_1.callback;var _4=_1.operationType;if((_4=="update"||_4=="add")&&(this.sparseUpdates||this.noNullUpdates)) {isc.DataSource.recordTimingData(_1,"Sparse updates processing","start");_1.data=this.$708(_1.data,this);this.$79c(_1.data,_1.oldValues,_4,this);isc.DataSource.recordTimingData(_1,"Sparse updates processing","end")} if(_2=="iscServer"){this.$754(_1);_1.unconvertedDSRequest=isc.shallowClone(_1);_1.jsonReviver=isc.DataSource.iscServer_strictJSONReviver;if(this.autoConvertRelativeDates==true){if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Calling convertRelativeDates from sendDSRequest - data is\n\n"+isc.echoFull(_5))} var _5=this.convertRelativeDates(_1.data);if(this.logIsInfoEnabled("relativeDates")){this.logInfo("Called convertRelativeDates from sendDSRequest - data is\n\n"+isc.echoFull(_5))} _1.data=_5} if(this.translatePatternOperators===true&&this.isAdvancedCriteria(_1.data)){_1.data=this.translatePatternOperatorInAdvancedCriteria(_1.data)} var _6=this.transformRequest(_1);if(_6!==_1){_5=_1.data=_6} var _7=this.getDataProtocol(_1);if(_7=="clientCustom")return;delete this.$624[_1.requestId];if(_1.shouldUseCache===false||(_1.shouldUseCache!==true)&&!this.clientOnly&&(!this.cacheAllData||_1.downloadResult||_1.cachingAllData||(_1.operationType!=null&&_1.operationType!="fetch")||(_1.operationType=="fetch"&&this.cacheAllOperationId&&this.cacheAcrossOperationIds==false&&_1.operationId!=this.cacheAllOperationId))) {if(this.logIsInfoEnabled("cacheAllData")&&_1.cachingAllData){this.logInfo("sendDSRequest: processing cacheAllData request","cacheAllData")} this.addDefaultCriteria(_1,this.getOperationBinding(_1));this.applySendExtraFields(_1);var _8=this.getOperationBinding(_1);if(_8==null)_8={};var _9=_8.defaultParams||this.defaultParams;if(_9){_1.data=isc.addProperties({},_9,_1.data)} _5=_1.data;return this.performSCServerOperation(_1,_5)}} var _10=this.getServiceInputs(_1);var _11=_1.shouldUseCache===true||(this.cacheAllData&&_1.operationType=="fetch"&&!_1.cachingAllData&&!_1.downloadResult&&!(this.cacheAllOperationId&&this.cacheAcrossOperationIds==false&&_1.operationId!=this.cacheAllOperationId));if(_10.dataProtocol=="clientCustom"&&!_11)return;var _12=isc.addProperties({},_1,_10);_12._dsRequest=_1;if(_10.data==null)_12.data=null;if(this.clientOnly||_11){_12.clientOnly=true;_12.callback={target:this,methodName:"$50e"};isc.RPC.sendRequest(_12);return} var _13=this.getOperationBinding(_1);_12.transport=_13.dataTransport||this.dataTransport;if(_12.transport=="scriptInclude"){_12.callback={target:this,methodName:"$377"};if(!_12.callbackParam){_12.callbackParam=_13.callbackParam||this.callbackParam} isc.rpc.sendRequest(_12);return} var _2=this.getDataFormat(_1);if(_2=="xml"){var _14=_12.spoofedResponse;if(!_14){_12.callback={target:this,method:this.$378};isc.xml.getXMLResponse(_12)}else{var _15=this;isc.Timer.setTimeout(function(){_15.$378(isc.xml.parseXML(_14),_14,{status:0,httpResponseCode:200,data:_14},_12)})}}else if(_2=="json"){_12.callback={target:this,method:this.$379};isc.rpc.sendProxied(_12)}else if(_2=="csv"){_12.callback={target:this,method:this.$69k};isc.rpc.sendProxied(_12)}else{_12.serverOutputAsString=true;_12.callback={target:this,method:this.$38a};isc.rpc.sendProxied(_12)}},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,__module: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,__module: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}} _2.clientContext=_1.clientContext;_2.internalClientContext=_1.internalClientContext;_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.getAutoTitle(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();var _6=isc.DataSource.getNearestSchema(_1),_7=isc.DataSource.getNearestSchemaClass(_6);if(_3==null)_3={};var _8=-1,_9=null;for(var i=0;i<_5.length;i++){var _11=_5[i],_12=_4[_11],_13;if(isc.endsWith(_11,this.$dr)||isc.endsWith(_11,this.$dq))continue;if(!_2&&(_3[_11]||_12.advanced||_12.inapplicable||_12.hidden||(_12.visibility!=null&&_12.visibility=="internal"))) {_3[_11]=_11;continue} if(!_7&&_12.type==_1)return _11;if(_7&&_7.isA(_12.type)){_13=isc.DS.getInheritanceDistance(_12.type,_1);if(_9==null||_13<_8){_9=_11;_8=_13}}} if(_9!=null){if(_8==0||!this.hasSuperDS()){return _9}else{var _14=this.superDS().getObjectField(_1,_2,_3);if(_14){var _15=this.getField(_14).type,_16=isc.DS.getInheritanceDistance(_15,_1)} return(_14&&(_16<_8))?_14:_9}}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.logInfo("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,true))_4.add(_9);this.$38n(_2,_7+1,_1,_4,_3)}else{if(_3==null||_3(_6,this)){var _9=isc.addProperties({},_6);if(_9.hidden)delete _9.hidden;_4.add(_9)}}} 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,true))continue;isc.SimpleType.addTypeDefaults(_7);_4.add(_7)}},isc.A.combineFieldData=function isc_DataSource_combineFieldData(_1,_2,_3){var _4;if(isc.isAn.Object(_2))_4=_2;else _4=this.getField(_2||_1.name);return isc.DataSource.combineFieldData(_1,_4,_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",fetchOperation:this.cacheAcrossOperationIds?_1.operationId:this.cacheAllOperationId,allRows:this.cacheData?this.cacheData:null,cachingAllData:true,componentId:"(cacheAllData fetch)",componentContext:"(from: "+_1.componentId+(_1.componentContext?" <"+_1.componentContext+">)":")"),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();return true}},isc.A.getCacheData=function isc_DataSource_getCacheData(){if(this.cacheResultSet!=null){if(this.cacheResultSet.allRows)return this.cacheResultSet.allRows} if(this.cacheData!=null){return this.cacheData} if(this.testData!=null){return this.testData}},isc.A.fetchingClientOnlyData=function isc_DataSource_fetchingClientOnlyData(_1){if(_1.cachingAllData){return false} if(_1.downloadResult){return false} var _2=(this.useTestDataFetch==null?this.shouldUseTestDataFetch():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} var _3=this.cacheNeedsRefresh();if(_2==false&&this.clientOnly&&this.hasTestData()) _2=true;if(!_2&&((this.cacheAllData&&_3)||(this.clientOnly&&!this.testData&&this.hasTestData()))) {return this.firstCacheAllDataRequest(_1)}else{if(this.clientOnly&&!this.testData&&(this.testFileName||this.dataURL)||(this.cacheAllData&&_3)){if(this.logIsInfoEnabled("cacheAllData")){this.logInfo("fetchingClientOnlyData: issuing oneTimeDS fetch","cacheAllData")} this.$498=[_1];var _4=this.dataURL||this.testFileName;var _5=this.getDataFormat(_1);if(_5=="iscServer")_5=_4.match(/\.xml$/i)?"xml":"json";var _6=this.getOperationBinding(_1);var _7=this.transformRequest,_8=this.transformResponse,_9=this.$ba;if(_9){if(_9.transformRequest){_7=this[isc.$ah+"transformRequest"]} if(_9.transformResponse){_8=this[isc.$ah+"transformResponse"]}} var _10=_6.recordName||this.recordName||(this.inheritsFrom?(isc.isA.String(this.inheritsFrom)?this.inheritsFrom:this.inheritsFrom.ID):this.ID);var _11=isc[this.Class].create({ID:this.ID+"$499",inheritsFrom:this.ID,dataURL:_4,dataFormat:_5,recordXPath:this.recordXPath,transformRequest:_7,transformResponse:_8,recordName:_10,showPrompt:this.showPrompt});this.logInfo("clientOnly datasource performing one-time "+_5+" fetch via: "+_4);this.addProperties({transformRequest:isc.DataSource.getInstanceProperty("transformRequest"),transformResponse:isc.DataSource.getInstanceProperty("transformResponse")});var _12=this;if(this.cacheAllData){_11.cacheAllData=false} _11.sendDSRequest({operationType:"fetch",willHandleError:true,componentId:_1.componentId,componentContext:_1.componentContext,callback:function(_14,_15){var _13;if(_14.status!=isc.DSResponse.STATUS_SUCCESS){_12.logWarn("one-time fetch failed with status: "+_14.status+" and messsage: "+(_15?_15:"N/A")+". Initializing an empty Array as testData.");_13=[]}else{_12.logInfo("One-time fetch complete: "+(_15?_15.length:"null")+" records");_13=_12.initializeSequenceFields(_15)} if(_12.cacheAllData){_12.cacheLastFetchTime=new Date().getTime();_12.cacheResultSet=isc.ResultSet.create({dataSource:_12.ID,fetchMode:"local",allRows:_13});_12.cacheLastFetchTime=new Date().getTime()} if(_12.clientOnly){_12.cacheData=_12.testData=_13} _12.processDeferredRequests();_11.destroy()}});return true}}},isc.A.shouldUseTestDataFetch=function isc_DataSource_shouldUseTestDataFetch(){return this.clientOnly==true&&this.cacheAllData!=true&&(this.dataURL!=null||this.testFileName!=null)},isc.A.hasTestData=function isc_DataSource_hasTestData(){return this.dataURL!=null||this.testFileName!=null},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=isc.shallowClone(_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);_7=_6.slice(_8,_9);_4.startRow=_8;_4.endRow=_9;_4.totalRows=_10} if(this.copyLocalResults){var _15=isc.Browser.isSGWT;for(var i=0;i<_7.length;i++){if(this.deepCopyLocalResults){_7[i]=isc.clone(_7[i])}else{_7[i]=isc.addProperties({},_7[i])} if(_15){_7[i][isc.gwtRef]=null;_7[i][isc.gwtModule]=null}}} _4.data=_7;break;case"remove":case"delete":if(this.isMissingPrimaryKeys(_1.data)){_4.data="clientOnly remove operation failed for DataSource "+this.ID+": missing primaryKey values(s) "+this.getMissingPrimaryKeys(_1.data);_4.data="clientOnly remove operation failed: missing primaryKey value(s): "+this.getMissingPrimaryKeys(_1.data);_4.status=-1}else{var _16=this.findByKeys(_1.data,_2);if(_16==-1){this.logWarn("clientOnly remove operation: Unable to find record matching criteria:"+this.echo(_1.data));_4.data="clientOnly remove operation failed: unable to find matching record" _4.status=-1}else{_2.removeAt(_16);_4.data=isc.addProperties({},_1.data)}} break;case"add":case"insert":var _17=isc.addProperties({},_1.data);if(_17.__ref){delete _17.__ref;delete _17.__module} _17=this.applySequenceFields(_17);var _16=this.findByKeys(_17,_2);if(_16!=-1){this.logWarn("clientOnly add operation: Duplicate key: "+isc.echoAll(_17)+this.getStackTrace());_4.data="clientOnly add operation failed for DataSource "+this.ID+": Duplicate key in record "+isc.echoAll(_17)+"

"+this.getStackTrace();_4.status=-1}else{_2.add(_17);_4.data=isc.addProperties({},_17)} break;case"replace":case"update":if(this.isMissingPrimaryKeys(_1.data)){this.logWarn("clientOnly update operation: Missing primaryKey values: "+this.getMissingPrimaryKeys(_1.data));_4.data="clientOnly update operation failed for DataSource "+this.ID+": missing primaryKey values(s) "+this.getMissingPrimaryKeys(_1.data);_4.status=-1}else{var _16=this.findByKeys(_1.data,_2);if(_16==-1){this.logWarn("clientOnly update operation: Unable to find record matching criteria:"+this.echo(_1.data));_4.data="clientOnly update operation failed: unable to find matching record. Did you supply all primaryKeys?" _4.status=-1}else{var _17=_2[_16];for(var _18 in _1.data){if(_18=="__ref"||_18=="__module")continue;var _19=this.getField(_18);isc.Canvas.$70n(_18,null,_1.data[_18],_17,null,true)} _4.data=isc.addProperties({},_17)}} break;case"validate":default:break} this.$109x(_4,_3);return _4},isc.A.$109x=function isc_DataSource__trackClientOnlyChanges(_1,_2){var _3=this.getPrimaryKeyFieldName();switch(_2){case'add':if(!this.$109y){this.$109y=new Array()} this.$109y[_1.data[_3]]=_1.data;break;case'update':if(!this.$109z){this.$109z=new Array()} if(this.$109y&&this.$109y[_1.data[_3]]){this.$109y[_1.data[_3]]=_1.data}else{this.$109z[_1.data[_3]]=_1.data} break;case'remove':if(!this.$1090){this.$1090=new Array()} if(this.$109y&&this.$109y[_1.data[_3]]){this.$109y[_1.data[_3]]=null} if(this.$109z&&this.$109z[_1.data[_3]]){this.$109z[_1.data[_3]]=null} this.$1090[_1.data[_3]]=_1.data}},isc.A.getChanges=function isc_DataSource_getChanges(){var _1=new Array();var _2=this.getPrimaryKeyFieldName();if(this.$109y){for(var _3 in this.$109y){if(this.$109y[_3]!=null&&isc.isA.Object(this.$109y[_3])){this.$109y[_3][_2]=null;var _4={data:this.$109y[_3],operationType:'add'} _1.push(_4)}}} if(this.$109z){for(var _3 in this.$109z){if(this.$109z[_3]!=null&&isc.isA.Object(this.$109z[_3])){var _4={data:this.$109z[_3],operationType:'update'} _1.push(_4)}}} if(this.$1090){for(var _3 in this.$1090){if(this.$1090[_3]!=null&&isc.isA.Object(this.$1090[_3])){var _4={data:this.$1090[_3],operationType:'remove'} _1.push(_4)}}} if(this.$109y){this.$109y.splice(0,this.$109y.length)} if(this.$109z){this.$109z.splice(0,this.$109z.length)} if(this.$1090){this.$1090.splice(0,this.$1090.length)} return _1},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.contactsServer()){return _1} var _2=this.getFields();for(var _3 in _2){var _4=_2[_3];if((_4.type=="sequence"||_4.primaryKey)&&_1[_3]==null){var _5=isc.SimpleType.getType(_4.type);while(_5.inheritsFrom)_5=isc.SimpleType.getType(_5.inheritsFrom);if(_5=="date"||_5=="time"){this.logWarn("clientOnly dataSource encountered a primaryKey of date or time type for which no value was supplied for an 'add' request. Defaulting to the epoch (midnight on 1 Jan 1970)");_1[_3]=new Date(0)}else{_1[_3]=this.getNextSequenceValue(_4);if(_4.type!="sequence"){this.logWarn("clientOnly dataSource found a missing value for primaryKey field '"+_3+"' during an add request. Derived value "+_1[_3]+" from sequence processing")}}}} return _1});isc.evalBoundary;isc.B.push(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)} var _5=this.firstGeneratedSequenceValue;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+_5}} return _1},isc.A.isMissingPrimaryKeys=function isc_DataSource_isMissingPrimaryKeys(_1){return this.getMissingPrimaryKeys(_1).length>0},isc.A.getMissingPrimaryKeys=function isc_DataSource_getMissingPrimaryKeys(_1){var _2=this.getPrimaryKeyFieldNames(),_3=[],_4;if(!_1)return _2;for(var i=0;i<_2.length;i++){if(_1[_2[i]]==_4){_3.add(_2[i])}} return _3},isc.A.findByKeys=function isc_DataSource_findByKeys(_1,_2,_3,_4){if(_1==null||_2==null)return-1;var _5=this.getPrimaryKeyFieldNames(),_6={},_7=false;if(isc.ResultSet&&isc.isA.ResultSet(_2))_2=_2.localData;for(var i=0;i<_5.length;i++){_6[_5[i]]=_1[_5[i]];if(this.getField(_5[i]).type=="date"||this.getField(_5[i]).type=="time"||this.getField(_5[i]).type=="datetime") {_7=true}} if(!_7)return _2.findByKeys(_1,this,_3,_4);var _9=this.recordIndicesMatchingFilter(_2,_6,{},_3,_4);if(!_9||_9.length==0)return-1;if(_9.length>1){this.logWarn("Searching by primaryKey, found "+_9.length+" records when there should only be one - returning the first. PrimaryKey set was: "+isc.echoAll(_6))} return _9[0]},isc.A.applyFilter=function isc_DataSource_applyFilter(_1,_2,_3){var _4=[];if(!_1||_1.length==0)return _4;if(this.isAdvancedCriteria(_2)){var _5=this.normalizeAdvancedCriteria(_2);return this.recordsMatchingAdvancedFilter(_1,_5,_3)} return this.recordsMatchingFilter(_1,_2,_3)},isc.A.recordIndicesMatchingFilter=function isc_DataSource_recordIndicesMatchingFilter(_1,_2,_3,_4,_5){return this.recordsMatchingFilter(_1,_2,_3,_4,_5,true)},isc.A.recordsMatchingFilter=function isc_DataSource_recordsMatchingFilter(_1,_2,_3,_4,_5,_6){var _7=isc.getKeys(_2),_8=_7.length,_9=[],_10,_11,_12,_13,_14,j;_4=_4||0;_5=_5||_1.length;if(_3&&_3.operation&&this.operationBindings){var _16=_3.operation;if(_16.ID==_16.dataSource+"_"+_16.type){var _17=this.operationBindings.find({operationId:null,operationType:_16.type})}else{var _17=this.operationBindings.find({operationId:_3.operation.ID,operationType:_16.type})} if(_17){var _18=_17.customCriteriaFields;if(isc.isA.String(_18)){_18=_18.split(",");for(var k=0;k<_18.length;k++){_18[k]=_18[k].replace(/^\s+|\s+$/g,'')}}}} for(var i=_4;i<_5;i++){_10=_1[i];if(_10==null)continue;_11=true;for(j=0;j<_8;j++){_12=_7[j];if(_12==null)continue;var _21=this.getField(_12,true);if(_21==null)_21=this.getFieldForDataPath(_12);if(this.dropUnknownCriteria&&!_21){continue} var _22=false;if(isc.isA.List(_18)&&_18.contains(_12)){_22=true} if(!_22&&_21&&_21.customSQL)continue;_13=isc.DataSource.getPathValue(_10,_12,_21);_14=_2[_12];if(!this.fieldMatchesFilter(_13,_14,_3,(_21?_21.ignoreTextMatchStyle:null))) {_11=false;break}} if(_11)_9.add(_6?i:_10)} return _9},isc.A.recordMatchesFilter=function isc_DataSource_recordMatchesFilter(_1,_2,_3){if(this.isAdvancedCriteria(_2)){return this.recordsMatchingAdvancedFilter([_1],_2,_3).length>0} return this.recordsMatchingFilter([_1],_2,_3).length>0},isc.A.fieldMatchesFilter=function isc_DataSource_fieldMatchesFilter(_1,_2,_3,_4){var _5;if(_4){_5=this.ignoreTextMatchStyleCaseSensitive?this.$135s:this.$50i}else if(_3){_5=_3.textMatchStyle} if(isc.isAn.Array(_2)||isc.isAn.Array(_1)){if(!isc.isAn.Array(_1)){_1=[_1]} if(!isc.isAn.Array(_2)){_2=[_2]} var _6=isc.isA.Date(_2[0]);if(_5==this.$50i||_5==this.$135s||_6){if(_6){return _2.intersectDates(_1).length>0}else if(_5==this.$135s){return _2.intersect(_1).length>0}else{return _2.intersectSubstring(_1,true,this.$50i).length>0}}else{return _2.intersectSubstring(_1,true,_5).length>0}} 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(_5!=this.$135s&&this.filterIsCaseSensitive!==true){_1=_1.toLocaleLowerCase();_2=_2.toLocaleLowerCase()} if(!this.supportsTextMatchStyle(_5)){if(!this.$63c)this.$63c={};if(!this.$63c[_5]){this.logWarn("Text match style specified as '"+_5+"': This is not supported for this dataSource - performing a substring match instead");this.$63c[_5]=true} _5=this.getTextMatchStyle(_5)} if(_5==this.$45y){return isc.startsWith(_1,_2)}else if(_5==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||_1==this.$135s)},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.$135s)return 1;if(_2==this.$135s)return-1;if(_2==this.$19q)return 1;if(_1==this.$19q)return-1;if(_1==this.$50i&&_2==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++;break} if(j==0)_7=1} if(_7==_6){_2=isc.DataSource.convertCriteria(_2,_5);_7=this.compareAdvancedCriteria(_1,_2,_3)}}else{var j=0;for(var i in _1){j++;break} if(j==0){_7=-1}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||_5==this.$135s){return this.dropOnFieldChange(_1,_2,_3)}else{return this.dropOnShortening(_1,_2,_3)}}else{return this.dropOnChange(_1,_2,_3)}},isc.A.getFieldCriterion=function isc_DataSource_getFieldCriterion(_1,_2){var _3;if(_1.criteria){for(var i=0;i<_1.criteria.length;i++){_3=this.getFieldCriterion(_1.criteria[i],_2);if(_3)return _3}}else{if(_1.fieldName==_2)return _1} return null},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||this.getField(_8).ignoreTextMatchStyle)&&_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.A.compareDates=function isc_DataSource_compareDates(_1,_2,_3,_4){var _5=this.getField(_3),_6=_4?this.getField(_4):null;if((_5&&isc.SimpleType.inheritsFrom(_5.type,"datetime"))||(_6&&isc.SimpleType.inheritsFrom(_6.type,"datetime"))) {return Date.compareDates(_1,_2)}else if((_5&&isc.SimpleType.inheritsFrom(_5.type,"time"))||(_6&&isc.SimpleType.inheritsFrom(_6.type,"time"))) {return isc.Time.compareLogicalTimes(_1,_2)}else{return Date.compareLogicalDates(_1,_2)}},isc.A.compareValues=function isc_DataSource_compareValues(_1,_2,_3,_4){if(isc.isA.Date(_1)&&isc.isA.Date(_2)){return this.compareDates(_1,_2,_3)}else{var _5=_4&&_1.toLowerCase?_1.toLowerCase():_1,_6=_4&&_2.toLowerCase?_2.toLowerCase():_2;if(_5==null&&_6!=null)return 1;if(_5!=null&&_6==null)return-1;return _5>_6?-1:(_5<_6?1:(_5==_6?0:2))}},isc.A.recordsAreEqual=function isc_DataSource_recordsAreEqual(_1,_2){var _3=this.getFieldNames();for(var i=0;i<_3.length;i++){if(this.compareValues(_1[_3[i]],_2[_3[i]],_3[i])!=0){return false}} return true},isc.A.convertDataSourceCriteria=function isc_DataSource_convertDataSourceCriteria(_1,_2){return isc.DataSource.convertCriteria(_1,_2,this)});isc.B._maxIndex=isc.C+203;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.$135t={exact:"equals",exactCase:"iEquals",substring:"iContains",startsWith:"iStartsWith"};isc.A.criteriaConversion_OperatorKeepNullValue={"equals":true,"notEqual":true,"iEquals":true,"iNotEqual":true};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.A.exportFormatToFileExtensionMap={xml:"xml",json:"json",csv:"csv",xls:"xls",ooxml:"xlsx"};isc.B.push(isc.A.applyFilter=function isc_c_DataSource_applyFilter(_1,_2){var _3=[];if(!_1||_1.length==0)return _3;if(this.$901==null){this.$901=isc.DataSource.create({fields:[{name:"$902"}],dropUnknownCriteria:false,clientOnly:true})} var _4=this.$901.applyFilter(_1,_2);return _4},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")} if(!_1.getCriterion){_1.getCriterion=function(_4,_5){return _5&&_5.getCriterion()}} 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||new RegExp("[_\$]","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;var _10=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();if(_10)_7=_7.toUpperCase();_10=_7==" ";_3=_3+_7}} return _3},isc.A.convertCriteria=function isc_c_DataSource_convertCriteria(_1,_2,_3){var _4={_constructor:"AdvancedCriteria",operator:"and"} if(!_2&&_3)_2=this.$135t[_3.defaultTextMatchStyle];var _5=[];for(var _6 in _1){var _7=_3==null?null:_3.getField(_6),_8=_3==null?null:this.$135t[_3.defaultTextMatchStyle],_9=null;if(_7!=null){if(_7.ignoreTextMatchStyle){_9=_3.ignoreTextMatchStyleCaseSensitive?"equals":"iEquals"}} if(isc.isAn.Array(_1[_6])){var _10={_constructor:"AdvancedCriteria",operator:"or",criteria:[]} for(var i=0;i<_1[_6].length;i++){var _12=_1[_6][i];var _13=_9?_9:this.getCriteriaOperator(_12,_2,_8);if(_12==null&&!this.criteriaConversion_OperatorKeepNullValue[_13]){continue} _10.criteria.add({fieldName:_6,operator:_13,value:_12})} if(_10.criteria.length>0){_5.add(_10)}}else{var _12=_1[_6],_13=_9?_9:this.getCriteriaOperator(_12,_2,_8);if(_12==null&&!this.criteriaConversion_OperatorKeepNullValue[_13]){continue} _5.add({fieldName:_6,operator:_13,value:_1[_6]})}} _4.criteria=_5;return _4},isc.A.getCriteriaOperator=function isc_c_DataSource_getCriteriaOperator(_1,_2,_3){var _4;if(isc.isA.Number(_1)||isc.isA.Date(_1)||isc.isA.Boolean(_1)){_4="equals"}else if(_2=="exactCase"){_4="equals"}else if(_2=="equals"||_2=="exact"){_4="iEquals"}else if(_2=="startsWith"){_4="iStartsWith"}else{_4=_3||"iContains"} return _4},isc.A.combineCriteria=function isc_c_DataSource_combineCriteria(_1,_2,_3,_4,_5){if(!_1||isc.isAn.emptyObject(_1))return _2;if(!_2||isc.isAn.emptyObject(_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.compressNestedCriteria=function isc_c_DataSource_compressNestedCriteria(_1,_2,_3){if(!_1||isc.isAn.emptyObject(_1))return null;if(!_1.criteria||_1.criteria.length==0)return _1;if(!_2&&_1.operator){var _4=isc.DS.$57z[_1.operator];if(_4&&_4.valueType=="criteria")_2=_4.ID} _2=_2||"and";if(_1.criteria.length==1){var c=_1.criteria[0];if(c.criteria&&c.operator==_1.operator){_1=c}} if(_3&&isc.DS.canFlattenCriteria(_1)){_1=isc.DS.flattenCriteria(_1)} var _6=_1.criteria;if(_6){for(var i=0;i<_6.length;i++){var _8=_6[i];if(!_8.criteria){if(_8.fieldName&&_8.operator&&_8._constructor=="AdvancedCriteria") delete _8._constructor;_6[i]=_8}else{_6[i]=this.compressNestedCriteria(_8,_2,true)}} _6.removeEmpty();if(_6.length==1){var _9=_6[0];if(_9.criteria&&_9.operator==_1.operator){_1=_6[0]}}} if(_1.fieldName&&!_1.criteria&&_1._constructor=="AdvancedCriteria"){delete _1._constructor} return _1},isc.A.combineFieldData=function isc_c_DataSource_combineFieldData(_1,_2,_3){if(_2==null)return _1;for(var _4 in _2){if(_4=="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 _6=_2.validators[i];if(!_1.validators.contains(_6)){if(_1.validators.$69){_1.validators=_1.validators.duplicate()} _1.validators.add(_6)}} continue} if(_1[_4]!=null)continue;if(_4=="name")continue;if(!_3&&_4=="hidden")continue;_1[_4]=_2[_4]} 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.addExportFilenameExtension=function isc_c_DataSource_addExportFilenameExtension(_1,_2){if(!_2)_2="csv";if(!this.$162n){this.$162n=isc.getValues(this.exportFormatToFileExtensionMap)} var _3=this.exportFormatToFileExtensionMap[_2];if(!_3)return _1;var _4=_1.lastIndexOf(".");if(_4==-1){_1=_1+"."+_3}else{var _5=_1.substring(_4+1).toLowerCase();if(_5!=_3){if(this.$162n.contains(_5)){var _6=_1.substring(0,_4+1)+_3;this.logWarn("Extension specified in fileName: "+_1+" is incorrect for exportFormat: '"+_2+"'. Changing fileName to: "+_6);_1=_6}else{_1=_1+"."+_3}}} return _1},isc.A.exportClientData=function isc_c_DataSource_exportClientData(_1,_2,_3,_4){var _5=_2.exportContext||_2||{},_6=_5&&_5.exportAs?_5.exportAs:"csv",_7=_5&&_5.exportDisplay?_5.exportDisplay:"download",_8=_5.downloadToNewWindow!=null?_5.downloadToNewWindow:(_7=="window");var _9=_6;if(_2.operationId!=null){var _10=_4.getOperationBinding("clientExport",_2.operationId);if(_10!=null&&_10.exportAs){_9=_10.exportAs}} var _11=this.addExportFilenameExtension(_5&&_5.exportFilename?_5.exportFilename:"export",_9);var _12={showPrompt:false,transport:_5.exportToClient===false?"xmlHttpRequest":"hiddenFrame",exportResults:true,exportDisplay:_7,targetMainWindow:_5.targetMainWindow,downloadResult:!(_5.exportToClient===false),downloadToNewWindow:_8,download_filename:(_7=="window"?_11:null),params:_5.params};var _13={exportAs:_6,exportDisplay:_7,exportFilename:_11,exportPath:_5.exportPath,exportToClient:_5.exportToClient,exportToFilesystem:_5.exportToFilesystem,exportDelimiter:_5.exportDelimiter,exportFields:_5.exportFields,exportHeader:_5.exportHeader,exportHeaderless:_5.exportHeaderless,exportFooter:_5.exportFooter,exportTitleSeparatorChar:_5.exportTitleSeparatorChar,exportDefaultBGColor:_5.exportDefaultBGColor,exportAlternateRowBGColor:_5.exportAlternateRowBGColor,exportRowBGColors:_5.exportRowBGColors,exportColumnBGColors:_5.exportColumnBGColors,exportRawValues:_5.exportRawValues,exportCurrencySymbol:isc.NumberUtil.currencySymbol,lineBreakStyle:_5.lineBreakStyle};if(_5.headerSpans)_13.headerSpans=_5.headerSpans;if(_5.exportHeaderSpans)_13.exportHeaderSpans=_5.exportHeaderSpans;if(_5.exportOtherFields)_13.exportOtherFields=_5.exportOtherFields;if(_5.exportShowHeaderSpanTitles!=null){_13.exportShowHeaderSpanTitles=_5.exportShowHeaderSpanTitles} if(_5.exportSpanTitleSeparator!=null){_13.exportSpanTitleSeparator=_5.exportSpanTitleSeparator} if(_5.formulaFields)_13.formulaFields=_5.formulaFields;if(_5.formulaRemap)_13.formulaRemap=_5.formulaRemap;if(_5.exportHeaderHeight!=null){_13.exportHeaderHeight=_5.exportHeaderHeight} if(_5.exportFieldPixelWidths){_13.exportFieldPixelWidths=_5.exportFieldPixelWidths;_13.exportWidthScale=_5.exportWidthScale} _13.exportWrapHeaderTitles=_5.exportWrapHeaderTitles;if(_5.exportAlignments){_13.exportAlignments=_5.exportAlignments} if(_5.exportStreaming!=null){_13.exportStreaming=_5.exportStreaming} if(_5.exportPropertyIdentifier){_13.exportPropertyIdentifier=_5.exportPropertyIdentifier} var _14=_2.operationId;if(_4==null||_14==null){isc.DMI.callBuiltin({methodName:"downloadClientExport",arguments:[_1,_6,_11,_7,_13],requestParams:_12,callback:_3})}else{isc.addProperties(_12,{parameters:_13});_4.performClientExportOperation(_14,_1,_3,_12)}},isc.A.getSimpleErrors=function isc_c_DataSource_getSimpleErrors(_1){var _2=_1?_1.errors:null;if(isc.isAn.Array(_2)){if(_2.length>1){this.logWarn("getSimpleErrors() passed an array of error blocks - dropping all but the first set of errors.")} _2=_2[0]} if(_2==null)return null;var _3={};for(var _4 in _2){var _5=_2[_4];if(_4=="recordPath"&&!isc.isAn.Object(_5))continue;var _6=[];if(!isc.isAn.Array(_5))_5=[_5];for(var i=0;i<_5.length;i++){var _8=_5[i];if(isc.isAn.Object(_8)){_6.add(_8.errorMessage)}else if(_8!=null){_6.add(_8)}} if(_6.length>0){_3[_4]=_6}} return _3},isc.A.recordTimingData=function isc_c_DataSource_recordTimingData(_1,_2,_3,_4){if(!isc.Log.logIsInfoEnabled("RpcTabTiming")||!_1)return;if(_4==null)_4=isc.timeStamp();var _5;if(_1.clientTimingStack){_5=_1.clientTimingStack[_1.clientTimingStack.length-1]}else{_5=_1.clientTiming={name:"Client processing",start:_4,children:[]};_1.clientTimingStack=[];_1.clientTimingStack.add(_1.clientTiming)} if(!_5){isc.logWarn("Unexpected failure to find stack entry logging timing data: description: '"+_2+"', type: "+_3);return} if(_3=="start"){var _6={start:_4,name:_2,children:[]};_5.children.add(_6);_1.clientTimingStack.add(_6)}else if(_3=="end"){_5.end=_4;_1.clientTimingStack.removeAt(_1.clientTimingStack.length-1)}else{_5.children.add({millis:_4,name:_2})}});isc.B._maxIndex=isc.C+19;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.allowAdvancedCriteria===false)return false;if(this.willHandleAdvancedCriteria===false)return false;if(this.dataFormat=="iscServer")return true;return true},isc.A.isAdvancedCriteria=function isc_DataSource_isAdvancedCriteria(_1){return isc.DS.isAdvancedCriteria(_1,this)},isc.A.normalizeAdvancedCriteria=function isc_DataSource_normalizeAdvancedCriteria(_1,_2){var _3={};if(!_2){_3._constructor="AdvancedCriteria";if(_1.strictSQLFiltering)_3.strictSQLFiltering=true} if(_1.criteria){if(!isc.isAn.Array(_1.criteria)){_1.criteria=[_1.criteria]} _3.operator=_1.operator;_3.criteria=[];for(var i=0;i<_1.criteria.length;i++){_3.criteria.add(this.normalizeAdvancedCriteria(_1.criteria[i],true))}}else{if(!isc.isAn.Array(_1.value)){isc.addProperties(_3,_1)}else{var _5=this.getSearchOperator(_1.operator);if(!_5||!_5.canNormalize){isc.addProperties(_3,_1)}else{_3.operator=_5.negate?"and":"or";_3.criteria=[];for(var i=0;i<_1.value.length;i++){_3.criteria.add({fieldName:_1.fieldName,operator:_1.operator,value:_1.value[i]})}}}} if(!_3.operator&&_3.fieldName&&_3.value)_3.operator="equals";return _3},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={};if(!this.$570.$170k)this.$570.$170k={};if(_2){for(var _3=0;_30){if(_3.validOperators){_2=_2.intersect(_3.validOperators)} return _2}}} _4=isc.DataSource.$570;_3=isc.SimpleType.getType(_1);while(_3&&!_4[_3.name]){if(!_3||!_3.inheritsFrom)break;_3=isc.SimpleType.getType(_3.inheritsFrom,this)} if(_3&&_4[_3.name]){_2.addList(_4[_3.name])} _2.addList(_4["_all_"]);if(_3&&_3.validOperators){_2=_2.intersect(_3.validOperators)} _2=_2.getUniqueItems();return _2},isc.A.setTypeOperators=function isc_DataSource_setTypeOperators(_1,_2){if(!_2)return;if(!isc.isAn.Array(_2))_2=[_2];if(!this.$570)this.$570={};this.$570[_1||"_all_"]=_2;if(!this.$570.$170k)this.$570.$170k={};this.$570.$170k[_1]=false},isc.A.getFieldOperators=function isc_DataSource_getFieldOperators(_1){if(isc.isA.String(_1))_1=this.getField(_1);if(!_1)return[];if(_1&&_1.validOperators)return _1.validOperators;var _2=isc.SimpleType.getType(_1.type);var _3=_1.type||"text";if(!_2)_3="text";return this.getTypeOperators(_3)},isc.A.getFieldOperatorMap=function isc_DataSource_getFieldOperatorMap(_1,_2,_3,_4,_5){if(isc.isA.String(_1))_1=this.getField(_1);var _6={},_5=_5||this.getFieldOperators(_1);_2=_2||_1.validOperators!=null;for(var _7=0;_7<_5.length;_7++){var _8=_5[_7];var _9=this.getSearchOperator(_8);if(!_9)continue;if(_9.hidden&&!_2&&(!isc.isAn.Array(_1.validOperators)||!_1.validators.contains(_8)))continue;if(!_3||(_9.valueType==_3)==!_4){_6[_5[_7]]=_9.titleProperty==null?_9.title:isc.Operators[_9.titleProperty]}} return _6},isc.A.getTypeOperatorMap=function isc_DataSource_getTypeOperatorMap(_1,_2,_3,_4){var _5={},_6=this.getTypeOperators(_1);for(var _7=0;_7<_6.length;_7++){var _8=this.getSearchOperator(_6[_7]);if(_8&&(!_8.hidden||_2)){if(!_3||(_8.valueType==_3)==!_4) _5[_6[_7]]=_8.titleProperty==null?_8.title:isc.Operators[_8.titleProperty]}} return _5},isc.A.recordsAsText=function isc_DataSource_recordsAsText(_1,_2){if(!isc.isA.TextExportSettings(_2)){_2=isc.TextExportSettings.create(_2)} var i,_4;var _5=[];var _6=_2.fieldList;if(!_6)_6=this.getFieldNames();for(i=0;i<_6.length;i++){var _7=_6[i];_4=this.fields[_7];if(_4)_5.add(_4);else _5.add(_7)} var _8="";for(i=0;i<_1.length;i++){if(i>0)_8+=_2.lineSeparator;_8+=this.$93q(_1[i],_5,_2)} return _8},isc.A.$93q=function isc_DataSource__recordAsText(_1,_2,_3){var _4,_5;var _6=_3.forceText;var _7=_3.getEscapingModeEscapeChar();for(var i=0,_9="";i<_2.length;i++,_9+=_4){if(i>0)_9+=_3.fieldSeparator;var _10=_2[i];if(isc.isA.String(_10)){_4=_1[_10];_5="text"}else{_5=_10.type;_4=_1[_10.name];if(_10.exportForceText){_6=_10.exportForceText}} var _11=false;if(_3.useDisplayValue&&_10.name!=null){_4=this.getDisplayValue(_10.name,_4);if(_4!=null){_4=_4.toString();_11=true}} if(!_11){_4=isc.DataSource.$93p(_4,_5,_3)} if(_5=="text")switch(_6){case"leadingSpace":_4=" "+_4;break;case"formula":_4="="+_4} _4=_4.replace(/(\")/g,_7+"$1");if(_3.quoteValues)_4="\""+_4+"\""} return _9},isc.A.recordsFromText=function isc_DataSource_recordsFromText(_1,_2){if(!_1)return[];if(!isc.isA.TextImportSettings(_2)){_2=isc.TextImportSettings.create(_2)} _1=_2.addFinalLineSeparatorIfNotPresent(_1);var _3=_2.fieldList;if(!_3)_3=this.getFieldNames();if(_2.hasHeaderLine){_3=[];_1=this.$93u(_1,_2,_3)} if(_3.length==0)return[];var _4=this,_5=[];var _6={},_7=0;var _8=function(_10){if(_7<_3.length){_6[_3[_7++]]=_10}};var _9=function(){if(!isc.TextImportSettings.$935){isc.Validator.$93n=true;_4.validateJSONRecord(_6,true);isc.Validator.$93n=false} _5.add(_6);_6={};_7=0;return false};_2.parseTextAndApplyFunctions(_1,_8,_9);return _5},isc.A.$93u=function isc_DataSource__processAndRemoveHeaderLine(_1,_2,_3){var _4={},_5={};if(!isc.TextImportSettings.$935){var _6=this.getFieldNames();for(var i=0;i<_6.length;i++){var _8=this.getField(_6[i]);if(_8.name!=null)_5[_8.name.toUpperCase()]=_8;if(_8.title!=null)_4[_8.title.toUpperCase()]=_8}} var _9=function(_12){var _10=_12.toUpperCase().replace(/^(\s)*/,"").replace(/(\s)*$/,"");if(_4[_10])_3.add(_4[_10].name);else if(_5[_10])_3.add(_5[_10].name);else _3.add(_12)};var _11=function(){return true};return _2.parseTextAndApplyFunctions(_1,_9,_11)});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.evaluateCriterion=function isc_DataSource_evaluateCriterion(_1,_2){if(_2.requiresServer==true)return true;var _3=this.getSearchOperator(_2.operator);if(_3==null){isc.logWarn("Attempted to use unknown operator "+_2.operator);return false} var _4=true;if(this.$908){for(var i=0;i=(this.inclusive?1:0)){return false}} return true};var _12=function(_53,_87,_88,_89,_90){if(isc.isA.Number(_87)){_87=""+_87} if(isc.isA.Boolean(_87)){isc.logWarn("Attempt to compare a Boolean as String, testing value "+_88.value+" with operator "+this.ID+". This is an invalid comparison, so we are returning FALSE.");return false} if(isc.isA.Date(_87)){isc.logWarn("Attempt to compare a Date as String, testing value "+_88.value+" with operator "+this.ID+". This is an invalid comparison, so we are returning FALSE.");return false} if(_87!=null&&!isc.isA.String(_87)){return true} if(_87==null){if(_89.$59v){var _13=_89.getField(_53);if(_13&&(_13.type=="number"||_13.type=="integer"||_13.type=="sequence"||_13.type=="float")){if(_88.value==null||isc.isA.Number(_88.value)||isc.isA.Date(_88.value)){return(this.negate?!_89.$59u:_89.$59u)}else{return false}}else{return(this.negate?!_89.$59u:_89.$59u)}}else{return false}} var _14=_88.value||"";if(isc.isA.Number(_14)){_14=""+_14} if(!isc.isA.String(_14)||!isc.isA.String(_87)){return false} if(this.caseInsensitive){_87=_87.toLowerCase();_14=_14.toLowerCase()} var _15=false;if(this.startsWith){_15=isc.startsWith(_87,_14)}else if(this.endsWith){_15=isc.endsWith(_87,_14)}else if(this.equals){_15=(_87==_14)}else{_15=isc.contains(_87,_14)} return _15};var _16=function(_53,_87,_88,_89,_90){return(_87==null)};var _17=function(_53,_87,_88,_89,_90){if(!_88.value){return false} if(isc.isA.Date(_88.value)||isc.isA.Date(_87)||isc.DateUtil.isRelativeDate(_88.value)) {return false} var _18;if(this.caseInsensitive){_18=new RegExp(_88.value,"im")}else{_18=new RegExp(_88.value,"m")} return _18.test(_87)};var _19=function(_53,_87,_88,_89,_90,_73){if(!_89.patternEscapeChar||_89.patternEscapeChar.length>1){throw"dataSource.patternEscapeChar cannot be null or undefined"} var _20=isc.isA.Array(_89.patternSingleWildcard)?_89.patternSingleWildcard:[_89.patternSingleWildcard||"?","%"];var _21=isc.isA.Array(_89.patternMultiWildcard)?_89.patternMultiWildcard:[_89.patternMultiWildcard||"*"];var _22=false;var _23="";var _24=_88.value;for(var i=0;i<_24.length;i++){if(_24[i]===_89.patternEscapeChar){_22=true;continue} if(_22){_23+=_24[i].replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");_22=false}else{if(_21.contains(_24[i])){_23+=".*";continue} if(_20.contains(_24[i])){_23+=".";continue} _23+=_24[i]}} if(_73){_88.value="^.*"+_23+".*$"}else{_88.value="^"+_23+"$"} return _17.apply(this,[_53,_87,_88,_89,_90])};var _26=function(_53,_87,_88,_89,_90,_73){if(!_89.patternEscapeChar||_89.patternEscapeChar.length>1){throw"dataSource.patternEscapeChar cannot be null or undefined"} var _20=isc.isA.Array(_89.patternSingleWildcard)?_89.patternSingleWildcard:[_89.patternSingleWildcard||"?","%"];var _21=isc.isA.Array(_89.patternMultiWildcard)?_89.patternMultiWildcard:[_89.patternMultiWildcard||"*"];var _22=false;var _23="";var _24=_88.value;for(var i=0;i<_24.length;i++){if(_24[i]===_89.patternEscapeChar){_22=true;continue} if(_22){_23+=_24[i].replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");_22=false}else{if(_21.contains(_24[i])){_23+=".*";continue} if(_20.contains(_24[i])){_23+=".";continue} _23+=_24[i]}} _88.value="^"+_23+".*$";return _17.apply(this,[_53,_87,_88,_89,_90])};var _27=function(_53,_87,_88,_89,_90,_73){if(!_89.patternEscapeChar||_89.patternEscapeChar.length>1){throw"dataSource.patternEscapeChar cannot be null or undefined"} var _20=isc.isA.Array(_89.patternSingleWildcard)?_89.patternSingleWildcard:[_89.patternSingleWildcard||"?","%"];var _21=isc.isA.Array(_89.patternMultiWildcard)?_89.patternMultiWildcard:[_89.patternMultiWildcard||"*"];var _22=false;var _23="";var _24=_88.value;for(var i=0;i<_24.length;i++){if(_24[i]===_89.patternEscapeChar){_22=true;continue} if(_22){_23+=_24[i].replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");_22=false}else{if(_21.contains(_24[i])){_23+=".*";continue} if(_20.contains(_24[i])){_23+=".";continue} _23+=_24[i]}} _88.value="^.*"+_23+"$";return _17.apply(this,[_53,_87,_88,_89,_90])};var _28=function(_53,_87,_88,_89,_90){return _19.apply(this,[_53,_87,_88,_89,_90,true])};var _29=function(_53,_87,_88,_89,_90){var _24=_88.value||[];if(!isc.isAn.Array(_24)){_24=[_24]} if(isc.isA.Date(_87)){for(var i=0;i<_24.length;i++){var _7=isc.isA.Date(_24[i]);if(_90&&!_7&&isc.DateUtil.isRelativeDate(_24[i])){_24[i]=isc.DateUtil.getAbsoluteDate(_24[i])} if(isc.isA.Date(_24[i])&&_89.compareDates(_24[i],_87,_53)==0) {return true}}}else{return _24.contains(_87)}};var _30=function(_53,_87,_88,_89,_90){if(_88.value==null){return true} var _31=false;if(isc.isAn.Array(_87)&&isc.isAn.Array(_88.otherValue)){_31=_87.equals(_88.otherValue)}else{_31=(_88.otherValue==_87)} if(isc.isA.Date(_88.otherValue)&&isc.isA.Date(_87)){_31=(_89.compareDates(_88.otherValue,_87,_53,_88.value)==0)} return _31};var _32=function(_53,_87,_88,_89,_90){if(_88.value==null){return true} _88.value=_88.otherValue;return _12.apply(this,[_53,_87,_88,_89,_90])};var _33=function(_53,_87,_88,_89,_90){if(_88.value==null){return true} _88.value=_88.otherValue;return _2.apply(this,[_53,_87,_88,_89,_90,true])};var _34=function(_53,_87,_88,_89,_90){var _35=_88.criterion;var _36=_88.record;var _37;if(!_35.criteria){_35.criteria=[]} if(!isc.isAn.Array(_35.criteria)){isc.logWarn("AdvancedCriteria: found boolean operator where subcriteria was not an array. Subcriteria was: "+isc.echoFull(_35.criteria));return false} if(this.isNot){_89.$59u=!_89.$59u} for(var _38=0;_38<_35.criteria.length;_38++){var _39=_89.evaluateCriterion(_36,_35.criteria[_38]);if(this.isAnd&&!_39){_37=false} if(this.isNot&&_39){_37=false} if(this.isOr&&_39){_37=true} if(_37!=null){break}} if(_37==null){_37=!this.isOr} if(this.isNot){_89.$59u=!_89.$59u} return _37};var _40=function(_87,_88,_89,_90){if(!_88.criteria)_88.criteria=[];if(!isc.isAn.Array(_88.criteria)){isc.logWarn("AdvancedCriteria: boolean compareCriteria found where old subcriteria was not an array");return-1} if(!_87.criteria)_87.criteria=[];if(!isc.isAn.Array(_87.criteria)){isc.logWarn("AdvancedCriteria: boolean compareCriteria found where new subcriteria was not an array");return-1} var _41,_42=0,_43=_88.criteria.length,_44=_87.criteria.length;if(_44>_43&&_89.isOr){return-1} var _45=isc.clone(_88.criteria);var _46=isc.clone(_87.criteria);for(var i=0;i<_43;i++){var _47=_45[i];var _48=i>_44?null:_46[i];if(!_48||(_48&&_48.fieldName!=_47.fieldName||_48.operator!=_47.operator||_48.processed==true)){_48=null;for(var j=0;j<_44;j++){if(_46[j].processed)continue;if(_46[j].fieldName==_47.fieldName&&_46[j].operator==_47.operator){_48=_46[j];break}}} if(_48&&_47){_48.processed=true;_41=_90.compareAdvancedCriteria(_48,_47)}else{if(_47&&!_48){if(_89.isOr)_41=1;if(_89.isAnd)_41=-1;if(_89.isNot)_41=-1}} if(_89.isAnd&&_41==-1)return-1;if(_89.isOr&&_41==-1)return-1;if(_89.isNot&&_41==1)return-1;if(_41!=0)_42=1} for(var i=0;i<_44;i++){if(!_46[i].processed){if(_89.isOr)return-1;if(_89.isAnd)return 1;if(_89.isNot)return-1}} return _42};var _50=function(_87,_88,_89,_90){if(_87.fieldName==_88.fieldName){var _51=_90.compareValues(_87.value,_88.value,_87.fieldName)==0;if(_51){return 0}} return-1};var _52=function(_87,_88,_89,_90){var _53=_87.fieldName;if(_87.fieldName==_88.fieldName){if(_89.upperBounds&&_89.lowerBounds){if(_90.compareValues(_87.start,_88.start,_53)==0){if(_90.compareValues(_87.end,_88.end,_53)==0){return 0}}}else{if(_90.compareValues(_87.value,_88.value,_53)==0){return 0}} var _54=_87.start==null?_87.value:_87.start,_55=_88.start==null?_88.value:_88.start,_56=_87.start==null?_87.value:_87.end,_57=_88.start==null?_88.value:_88.end;var _7,_58;var _59=true,_60=true,_61=true,_62=true;if(_55==null)_59=false;if(_57==null)_60=false;if(_54==null)_61=false;if(_56==null)_62=false;if(_89.lowerBounds&&!_89.upperBounds&&!_61&&!_59){return 0} if(_89.lowerBounds&&!_89.upperBounds){if(_61&&!_59){return 1} if(_59&&!_61){return-1} var _63=_90.compareValues(_54,_55,_53);if(_63==-1){return 1}else if(_63==0){return 0}} if(_89.upperBounds&&!_89.lowerBounds&&!_62&&!_60){return 0} if(_89.upperBounds&&!_89.lowerBounds){if(_62&&!_60){return 1} if(_60&&!_62){return-1} var _63=_90.compareValues(_54,_55,_53);if(_63==1){return 1}else if(_63==0){return 0}} if(_89.lowerBounds&&_89.upperBounds){if(_90.compareValues(_54,_55,_53)<=0&&_90.compareValues(_54,_57,_53)>=0&&_90.compareValues(_56,_57,_53)>=0&&_90.compareValues(_56,_55,_53)<=0) {return 1} if((_61&&!_59)||(_62&&!_60)){return 1} if(!_61&&!_59&&!_62&&!_59){return 0}}} return-1};var _64=function(_87,_88,_89){var _65=_88.value;var _66=_87.value;if(isc.isA.Number(_65))_65=""+_65;if(isc.isA.Number(_66))_66=""+_66;if(!isc.isA.String(_65)||!isc.isA.String(_66))return-1;if(_89.caseInsensitive){_65=_65.toLowerCase();_66=_66.toLowerCase()} if(_87.fieldName==_88.fieldName&&_87.value==_88.value&&!_89.equals) {return 0} if(_89.equals){return _65==_66?0:-1} if(_89.startsWith&&!_89.negate&&_66.length>_65.length&&isc.startsWith(_66,_65)) {return 1} if(_89.startsWith&&_89.negate&&_65.length>_66.length&&isc.startsWith(_65,_66)) {return 1} if(_89.endsWith&&!_89.negate&&_66.length>_65.length&&isc.endsWith(_66,_65)) {return 1} if(_89.endsWith&&_89.negate&&_65.length>_66.length&&isc.endsWith(_65,_66)) {return 1} if(!_89.startsWith&&!_89.endsWith&&!_89.negate&&_66.length>_65.length&&isc.contains(_66,_65)) {return 1} if(!_89.startsWith&&!_89.endsWith&&_89.negate&&_65.length>_66.length&&isc.contains(_65,_66)) {return 1} return-1};var _67=function(_87,_88,_89){if(_87.fieldName==_88.fieldName){return 0} return-1};var _68=function(_87,_88,_89){if(_87.value==_88.value&&_87.fieldName==_88.fieldName){return 0} return-1};var _69=function(_87,_88,_89){var _70=_88.value,_71=_87.value,_72=_89.ID.replace("Pattern",""),_11=_72.startsWith("i"),_73=_72.contains("ontains"),_74=!_73&&_72.contains("atches"),_75=!_73&&!_74&&_72.contains("artsWith"),_76=!_73&&!_74&&!_75,_77="*",_78=true;if(!_88.value.contains(_77)&&!_87.value.contains(_77)){if(_74){_72=_11?"iEquals":"equals"} var _79=isc.DataSource.$57z[_72];var _15=_79.compareCriteria(_87,_88,_79);if(_78){isc.logWarn(_87.value+" is "+(_15==0?"equal to":(_15>0?"more":"less")+" restrictive than")+" "+_88.value)} return _15} if(_73){if(!_70.startsWith(_77))_70=_77+_70;if(!_70.endsWith(_77))_70+=_77;if(!_71.startsWith(_77))_71=_77+_71;if(!_71.endsWith(_77))_71+=_77}else if(_75){if(!_70.endsWith(_77))_70+=_77;if(!_71.endsWith(_77))_71+=_77}else if(_76){if(!_70.startsWith(_77))_77+_70;if(!_71.startsWith(_77))_77+_71} if(_11){_70=_70.toLowerCase();_71=_71.toLowerCase()} if(_87.fieldName==_88.fieldName&&_70==_71){return 0} var _80=_70.split("*"),_81=_71.split("*");if(_74){if(_81[0]!=_80[0]&&!_81[0].startsWith(_80[0])||(_81[_81.length-1]!=_80[_80.length-1]&&!_81[_81.length-1].startsWith(_80[_80.length-1]))) {return-1}} if(_81[0]!=_80[0]){if(_81[0].startsWith(_80[0])){if(_78)isc.logWarn("More restrictive - new initial string starts with old initial string");return 1}else{if(_78)isc.logWarn("Less restrictive - different initial string");return-1}} if(!_73&&_81[_81.length-1]!=_80[_80.length-1]){if(_78)isc.logWarn("Less restrictive - different end string");return-1} if(!_73&&_80.length<3&&_81.length>_80.length){if(_78)isc.logWarn("More restrictive - old value has no inner strings but new value does end string");return 1} if(_80.length>1){var _82=_80.getRange(1,_80.length-1),_83=_81.getRange(1,_81.length-1);if(_73){if(_83[0].startsWith(_82[0])&&_83[_83.length-1].startsWith(_82[_82.length-1])) {if(_83.length>=_82.length)return 1;else return-1}}else if(_75){if(_83[_83.length-1]==_82[_82.length-1]){if(_83.length>=_82.length)return 1;else return-1}} for(var i=0;i<_82.length;i++){if(!_83[i]||!_83[i].startsWith(_82[i])){if(_78)isc.logWarn("Less restrictive - different interior strings");return-1}} if(_78){isc.logWarn("More restrictive - for each old internal string, there is a new internal string that startsWith the old string")} return 1} if(_78)isc.logWarn("Less restrictive - default return value");return-1};var _84=function(_87,_88,_89){if(_87.fieldName==_88.fieldName){if(!isc.isAn.Array(_88.value)||!isc.isAn.Array(_87.value)){return-1} if(_87.value.equals(_88.value)){return 0} if(!_89.negate&&_88.value.containsAll(_87.value)){return 1} if(_89.negate&&_87.value.containsAll(_88.value)){return 1}} return-1};var _85=function(_87,_88,_89){if(_87.value==_88.value&&_87.fieldName==_88.fieldName){return 0} return-1};var _86=[{ID:"equals",titleProperty:"equalsTitle",negate:false,valueType:"fieldType",condition:_1,compareCriteria:_50,symbol:"==",wildCard:"*",canNormalize:true,getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"notEqual",titleProperty:"notEqualTitle",negate:true,valueType:"fieldType",condition:_1,compareCriteria:_50,symbol:"!",wildCard:"*",canNormalize:true,getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"greaterThan",titleProperty:"greaterThanTitle",lowerBounds:true,valueType:"fieldType",condition:_2,compareCriteria:_52,symbol:">",getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"lessThan",titleProperty:"lessThanTitle",upperBounds:true,valueType:"fieldType",condition:_2,compareCriteria:_52,symbol:"<",getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"greaterOrEqual",titleProperty:"greaterOrEqualTitle",lowerBounds:true,inclusive:true,valueType:"fieldType",condition:_2,compareCriteria:_52,symbol:">=",getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"lessOrEqual",titleProperty:"lessOrEqualTitle",upperBounds:true,inclusive:true,valueType:"fieldType",condition:_2,compareCriteria:_52,symbol:"<=",getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"between",titleProperty:"betweenTitle",lowerBounds:true,upperBounds:true,hidden:true,valueType:"valueRange",condition:_2,compareCriteria:_52,getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"iBetween",titleProperty:"iBetweenTitle",lowerBounds:true,upperBounds:true,hidden:true,valueType:"valueRange",condition:_2,caseInsensitive:true,compareCriteria:_52,getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"betweenInclusive",titleProperty:"betweenInclusiveTitle",lowerBounds:true,upperBounds:true,valueType:"valueRange",inclusive:true,condition:_2,compareCriteria:_52,symbol:"...",getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"iBetweenInclusive",titleProperty:"iBetweenInclusiveTitle",lowerBounds:true,upperBounds:true,valueType:"valueRange",inclusive:true,condition:_2,compareCriteria:_52,symbol:"...",caseInsensitive:true,getCriterion:function(_53,_87){var _15={fieldName:_53,operator:this.ID};if(isc.isA.RelativeDateItem(_87)) _15.value=_87.getRelativeDate()||_87.getValue();else _15.value=_87.getValue();return _15}},{ID:"iEquals",titleProperty:"iEqualsTitle",equals:true,caseInsensitive:true,valueType:"fieldType",condition:_12,symbol:"==",wildCard:"*",canNormalize:true,compareCriteria:_64},{ID:"iContains",titleProperty:"iContainsTitle",caseInsensitive:true,valueType:"fieldType",condition:_12,symbol:"~",canNormalize:true,compareCriteria:_64},{ID:"iStartsWith",titleProperty:"iStartsWithTitle",startsWith:true,caseInsensitive:true,valueType:"fieldType",condition:_12,symbol:"^",canNormalize:true,compareCriteria:_64},{ID:"iEndsWith",titleProperty:"iEndsWithTitle",endsWith:true,caseInsensitive:true,valueType:"fieldType",condition:_12,symbol:"|",canNormalize:true,compareCriteria:_64},{ID:"contains",titleProperty:"containsTitle",hidden:true,valueType:"fieldType",condition:_12,symbol:"~",canNormalize:true,compareCriteria:_64},{ID:"startsWith",titleProperty:"startsWithTitle",startsWith:true,hidden:true,valueType:"fieldType",condition:_12,symbol:"^",canNormalize:true,compareCriteria:_64},{ID:"endsWith",titleProperty:"endsWithTitle",endsWith:true,hidden:true,valueType:"fieldType",condition:_12,symbol:"|",canNormalize:true,compareCriteria:_64},{ID:"iNotEqual",titleProperty:"iNotEqualTitle",caseInsensitive:true,equals:true,negate:true,valueType:"fieldType",condition:_12,symbol:"!",wildCard:"*",canNormalize:true,compareCriteria:_64},{ID:"iNotContains",titleProperty:"iNotContainsTitle",caseInsensitive:true,negate:true,valueType:"fieldType",condition:_12,symbol:"!~",canNormalize:true,compareCriteria:_64},{ID:"iNotStartsWith",titleProperty:"iNotStartsWithTitle",startsWith:true,caseInsensitive:true,negate:true,valueType:"fieldType",condition:_12,symbol:"!^",canNormalize:true,compareCriteria:_64},{ID:"iNotEndsWith",titleProperty:"iNotEndsWithTitle",endsWith:true,caseInsensitive:true,negate:true,valueType:"fieldType",condition:_12,symbol:"!@",canNormalize:true,compareCriteria:_64},{ID:"notContains",titleProperty:"notContainsTitle",negate:true,hidden:true,valueType:"fieldType",condition:_12,symbol:"!~",canNormalize:true,compareCriteria:_64},{ID:"notStartsWith",titleProperty:"notStartsWithTitle",startsWith:true,negate:true,hidden:true,valueType:"fieldType",condition:_12,symbol:"!^",canNormalize:true,compareCriteria:_64},{ID:"notEndsWith",titleProperty:"notEndsWithTitle",endsWith:true,negate:true,hidden:true,valueType:"fieldType",condition:_12,symbol:"!@",canNormalize:true,compareCriteria:_64},{ID:"isNull",titleProperty:"isNullTitle",valueType:"none",condition:_16,symbol:"#",compareCriteria:_67},{ID:"notNull",titleProperty:"notNullTitle",negate:true,valueType:"none",condition:_16,symbol:"!#",compareCriteria:_67},{ID:"regexp",titleProperty:"regexpTitle",hidden:true,valueType:"custom",condition:_17,symbol:"/regex/",compareCriteria:_68},{ID:"iregexp",titleProperty:"iregexpTitle",hidden:true,caseInsensitive:true,valueType:"custom",condition:_17,symbol:"/regex/",compareCriteria:_68},{ID:"matchesPattern",titleProperty:"matchesPatternTitle",hidden:true,valueType:"custom",symbol:"==i~",wildcard:"*",condition:_19,compareCriteria:_69},{ID:"iMatchesPattern",titleProperty:"iMatchesPatternTitle",hidden:true,caseInsensitive:true,valueType:"custom",symbol:"==~",wildcard:"*",condition:_19,compareCriteria:_69},{ID:"startsWithPattern",titleProperty:"startsWithPatternTitle",hidden:true,valueType:"custom",wildcard:"*",condition:_26,compareCriteria:_69},{ID:"iStartsWithPattern",titleProperty:"iStartsWithPatternTitle",hidden:true,caseInsensitive:true,valueType:"custom",wildcard:"*",condition:_26,compareCriteria:_69},{ID:"endsWithPattern",titleProperty:"endsWithPatternTitle",hidden:true,valueType:"custom",wildcard:"*",condition:_27,compareCriteria:_69},{ID:"iEndsWithPattern",titleProperty:"iEndsWithPatternTitle",hidden:true,caseInsensitive:true,valueType:"custom",wildcard:"*",condition:_27,compareCriteria:_69},{ID:"containsPattern",titleProperty:"containsPatternTitle",hidden:true,valueType:"custom",symbol:"=i~",wildcard:"*",condition:_28,compareCriteria:_69},{ID:"iContainsPattern",titleProperty:"iContainsPatternTitle",hidden:true,caseInsensitive:true,valueType:"custom",symbol:"=~",wildcard:"*",condition:_28,compareCriteria:_69},{ID:"inSet",titleProperty:"inSetTitle",valueType:"valueSet",condition:_29,compareCriteria:_84,symbol:"=(",closingSymbol:")",valueSeparator:"|",processValue:function(_24,_87){return _24.split(this.valueSeparator)}},{ID:"notInSet",titleProperty:"notInSetTitle",negate:true,valueType:"valueSet",condition:_29,compareCriteria:_84,symbol:"!=(",closingSymbol:")",valueSeparator:"|",processValue:function(_24,_87){return _24.split(this.valueSeparator)}},{ID:"equalsField",titleProperty:"equalsFieldTitle",valueType:"fieldName",condition:_30,symbol:"=.",canNormalize:true,compareCriteria:_85,processValue:function(_24,_87){if(!_87)return _24;var _13=_87.getField(_24);if(_13)return _24;_13=_87.getFieldByTitle(_24);if(_13)return _13.name;return null}},{ID:"notEqualField",titleProperty:"notEqualFieldTitle",negate:true,valueType:"fieldName",condition:_30,canNormalize:true,compareCriteria:_85},{ID:"iEqualsField",titleProperty:"iEqualsFieldTitle",equals:true,caseInsensitive:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iNotEqualField",titleProperty:"iNotEqualFieldTitle",equals:true,caseInsensitive:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"greaterThanField",titleProperty:"greaterThanFieldTitle",lowerBounds:true,valueType:"fieldName",condition:_33,compareCriteria:_85},{ID:"lessThanField",titleProperty:"lessThanFieldTitle",upperBounds:true,valueType:"fieldName",condition:_33,compareCriteria:_85},{ID:"greaterOrEqualField",titleProperty:"greaterOrEqualFieldTitle",lowerBounds:true,inclusive:true,valueType:"fieldName",condition:_33,compareCriteria:_85},{ID:"lessOrEqualField",titleProperty:"lessOrEqualFieldTitle",upperBounds:true,inclusive:true,valueType:"fieldName",condition:_33,compareCriteria:_85},{ID:"containsField",titleProperty:"containsFieldTitle",hidden:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"startsWithField",titleProperty:"startsWithTitleField",startsWith:true,hidden:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"endsWithField",titleProperty:"endsWithTitleField",endsWith:true,hidden:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iContainsField",titleProperty:"iContainsFieldTitle",hidden:true,caseInsensitive:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iStartsWithField",titleProperty:"iStartsWithTitleField",startsWith:true,hidden:true,caseInsensitive:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iEndsWithField",titleProperty:"iEndsWithTitleField",endsWith:true,hidden:true,caseInsensitive:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"notContainsField",titleProperty:"notContainsFieldTitle",hidden:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"notStartsWithField",titleProperty:"notStartsWithTitleField",startsWith:true,hidden:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"notEndsWithField",titleProperty:"notEndsWithTitleField",endsWith:true,hidden:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iNotContainsField",titleProperty:"iNotContainsFieldTitle",hidden:true,caseInsensitive:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iNotStartsWithField",titleProperty:"iNotStartsWithTitleField",startsWith:true,hidden:true,caseInsensitive:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"iNotEndsWithField",titleProperty:"iNotEndsWithTitleField",endsWith:true,hidden:true,caseInsensitive:true,negate:true,valueType:"fieldName",condition:_32,canNormalize:true,compareCriteria:_85},{ID:"and",titleProperty:"andTitle",isAnd:true,valueType:"criteria",condition:_34,symbol:" and ",compareCriteria:_40},{ID:"not",titleProperty:"notTitle",isNot:true,valueType:"criteria",condition:_34,compareCriteria:_40},{ID:"or",titleProperty:"orTitle",isOr:true,valueType:"criteria",condition:_34,symbol:" or ",compareCriteria:_40}];for(var _38=0;_38<_86.length;_38++){isc.DataSource.addSearchOperator(_86[_38])} isc.DataSource.setTypeOperators(null,["equals","notEqual","lessThan","greaterThan","lessOrEqual","greaterOrEqual","between","betweenInclusive","isNull","notNull","equalsField","notEqualField","greaterThanField","lessThanField","greaterOrEqualField","lessOrEqualField","and","or","not"]);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","iEqualsField","iNotEqualField","iContainsField","iStartsWithField","iEndsWithField","notContainsField","notStartsWithField","notEndsWithField","iNotContainsField","iNotStartsWithField","iNotEndsWithField","matchesPattern","iMatchesPattern","containsPattern","iContainsPattern","inSet","notInSet","iStartsWithPattern"]);isc.DataSource.setTypeOperators("integer",["iContains","iStartsWith","iEndsWith","iNotContains","iNotStartsWith","iNotEndsWith","iEqualsField","iNotEqualField","containsField","startsWithField","endsWithField","iContainsField","iStartsWithField","iEndsWithField","notContainsField","notStartsWithField","notEndsWithField","iNotContainsField","iNotStartsWithField","iNotEndsWithField","inSet","notInSet"]);isc.DataSource.setTypeOperators("float",["iContains","iStartsWith","iEndsWith","iNotContains","iNotStartsWith","iNotEndsWith","iEqualsField","iNotEqualField","containsField","startsWithField","endsWithField","iContainsField","iStartsWithField","iEndsWithField","notContainsField","notStartsWithField","notEndsWithField","iNotContainsField","iNotStartsWithField","iNotEndsWithField","inSet","notInSet"])};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=_7.getAttribute(this.$cp)||_7.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||"")+(!_2||_2.indent!=false?" ":"");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.release(false)}});isc.DataSource.create({ID:"Point",addGlobalId:false,builtinSchema:true,canBeArrayValued:true,$135o:"x",$135p:"y",xmlToJS:function(_1,_2){if(_1==null||isc.xml.elementIsNil(_1))return null;var _3=isc.xml.getAttributes(_1);if(_3&&_3.x&&_3.y){return[parseInt(_3.x),parseInt(_3.y)]} var _4=isc.xml.getElementChildren(_1),_5=[];for(var i=0;i<_4.length;i++){var _7=_4[i],_8=isc.xml.getElementText(_7);if(_7.nodeName==this.$135o){_5[0]=(_8!=null?parseInt(_8):null)}else if(_7.nodeName==this.$135p){_5[1]=(_8!=null?parseInt(_8):null)}} return _5},serializeAttributes:function(_1,_2,_3){if(isc.isAn.Array(_1)&&_1.length==2){_2.append(" ","x=\"",this.$38f(null,_1[0]),"\"");_2.append(" ","y=\"",this.$38f(null,_1[1]),"\"");return null} return this.Super("serializeAttributes",arguments)}});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.promptDelay=300;isc.A.neverShowPrompt=false;isc.A.actionURL="[ISOMORPHIC]/IDACall";isc.A.screenLoaderURL="[ISOMORPHIC]/screenLoader";isc.A.ALL_GLOBALS="-ALL_GLOBALS";isc.A.defaultTransport="xmlHttpRequest";isc.A.useHttpProxy=(!isc.Browser.isApollo);isc.A.httpProxyURL="[ISOMORPHIC]/HttpProxy";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=[];isc.A.$452=0;isc.A.$410=[];isc.A.pendingRpcs=0;isc.B.push(isc.A.getTransactions=function isc_c_RPCManager_getTransactions(){return this.$38z} ,isc.A.getActiveTransactions=function isc_c_RPCManager_getActiveTransactions(){return this.$410} );isc.B._maxIndex=isc.C+2;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.$89f="text/xml";isc.A.loginStatusCodeMarker="";isc.A.$113o="return";isc.B.push(isc.A.xmlHttpRequestAvailable=function isc_c_RPCManager_xmlHttpRequestAvailable(){if(isc.Browser.isIE)return(isc.Comm.createXMLHttpRequest()!=null);return true} ,isc.A.getActionURL=function isc_c_RPCManager_getActionURL(){return isc.Page.getURL(this.actionURL)} ,isc.A.send=function isc_c_RPCManager_send(_1,_2,_3){var _4=(_3||{});isc.addProperties(_4,{data:_1,callback:_2 });return this.sendRequest(_4)} ,isc.A.$383=function isc_c_RPCManager__warnIfXmlHttpRequestUnavailable(_1){if(this.xmlHttpRequestAvailable()||!this.logIsWarnEnabled())return false;var _2="Feature "+_1+" requires the xmlHttpRequest transport which is not currently available because ActiveX is disabled. Please see the 'Features requiring ActiveX or Native support' topic in the client-side reference under Client Reference/System for more information.";this.logWarn(_2);return true} ,isc.A.sendProxied=function isc_c_RPCManager_sendProxied(_1,_2){_1.serverOutputAsString=_1.transport!="scriptInclude";if(!_1.isRestRequest)_1.sendNoQueue=true;var _3=_1.actionURL||isc.RPCManager.actionURL;var _4=(_1.useHttpProxy!=null?_1.useHttpProxy:(isc.RPCManager.useHttpProxy&&_3.startsWith("http")&&!this.isLocalURL(_3)));if(false){if(!isc.RPCManager.allowCrossDomainCalls){if(!_4&&_3.startsWith("http")&&!this.isLocalURL(_3)){isc.warn("SmartClient can't directly contact URL '"+_3+"' due to browser same-origin policy. Remove the host and port number (even if localhost) to avoid this problem, or use XJSONDataSource for JSONP protocol (which allows cross-site calls), or use the server-side HttpProxy included with SmartClient Server.
This warning may be suppressed by setting RPCManager.allowCrossDomainCalls to true.")} } } if(!_4) {if(!_2)_1.useSimpleHttp=true}else{var _5=_1.httpProxyURL||isc.XMLTools.httpProxyURL||isc.RPCManager.httpProxyURL;var _6=isc.addProperties({},_1,{actionURL:_5,isProxied:true,useSimpleHttp:true,proxiedURL:_3,params:{data:null },transport:_1.transport=="scriptInclude"?"scriptInclude":"xmlHttpRequest",httpMethod:null,data:null,contentType:null });isc.Comm.$850=true;_6.params.data=isc.Comm.xmlSerialize("data",{url:_3,httpMethod:_1.httpMethod,params:_1.params,contentType:_1.contentType,requestBody:_1.data,username:_1.username,password:_1.password,httpHeaders:_1.httpHeaders,uploadFileName:_1.uploadFileName,callbackParam:_1.transport=="scriptInclude"?_1.callbackParam:null });isc.Comm.$850=null;_1=_6} return isc.rpc.sendRequest(_1)} ,isc.A.$59w=function isc_c_RPCManager__getHostAndPort(_1){var _2=isc.Page.getProtocol(_1),_3=_1.indexOf("/",_2.length),_4=_1.substring(_2.length,_3),_5 ;var _6=_4.indexOf(":");if(_6!=-1){_5=_4.substring(_6+1);_4=_4.substring(0,_6)} return[_4,_5]} ,isc.A.isLocalURL=function isc_c_RPCManager_isLocalURL(_1){var _2=this.$59w(_1),_3=_2[0],_4=_2[1] ;if(_4==null||_4=="")_4=80;var _5=this.getWindow().location,_6=_5.hostname,_7=_5.port;if(_7==null||_7=="")_7=80;return(_3=="localhost"||_3==_6) &&_4==_7 } ,isc.A.sendRequest=function isc_c_RPCManager_sendRequest(_1){if((this.$454||!this.$453)&&!_1.doNotTrackRPC){try{_1.$138k=this.getStackTrace()}catch(e){_1.$138k="N/A due to: "+e} } if(_1.useHttpProxy&&!_1.isProxied)return this.sendProxied(_1);if(_1.canDropOnDelay&&this.delayingTransactions)return;_1=isc.addProperties({},_1);if(_1.suppressAutoDraw!==false)_1.suppressAutoDraw=true;_1.actionURL=isc.Page.getURL(_1.actionURL||_1.url||_1.URL||this.getActionURL());var _2=_1.transport;if(!_2){if(_1.useXmlHttpRequest!=null||this.useXmlHttpRequest!=null){if(_1.useXmlHttpRequest==null){if(this.useXmlHttpRequest!=null){_1.transport=this.useXmlHttpRequest?"xmlHttpRequest":"hiddenFrame"}else{_1.transport=this.defaultTransport} }else{_1.transport=_2=_1.useXmlHttpRequest?"xmlHttpRequest":"hiddenFrame"} }else{_1.transport=this.defaultTransport} } this.checkTransportAvailable(_1,(_2!=null));if(_1.useSimpleHttp==null)_1.useSimpleHttp=_1.paramsOnly;isc.addDefaults(_1,{showPrompt:this.showPrompt,promptStyle:this.promptStyle,promptCursor:this.promptCursor,useCursorTracker:this.useCursorTracker,cursorTrackerConstructor:this.cursorTrackerConstructor });_1.cursorTrackerProperties=isc.addProperties({},this.cursorTrackerDefaults,this.cursorTrackerProperties,_1.cursorTrackerProperties);if(_1.cursorTrackerProperties==null) _1.cursorTrackerProperties=this.cursorTrackerProperties;if(!_1.operation){_1.operation={ID:"custom",type:"rpc" } } var _3=this.transformRequest(_1);if(_3!==_1){_1.data=_3} if(!_1.downloadResult)this.pendingRpcs++;if(this.canQueueRequest(_1,(_2!=null))){if(!this.currentTransaction)this.currentTransaction=this.$385(_1.doNotTrackRPC);this.$386(_1,this.currentTransaction);if(!this.queuing)return this.sendQueue();return _1}else{return this.sendNoQueue(_1)} } ,isc.A.checkTransportAvailable=function isc_c_RPCManager_checkTransportAvailable(_1,_2){var _3=this.xmlHttpRequestAvailable();var _4=_1.transport||this.defaultTransport;if(!_3){if(_4=="xmlHttpRequest"){if(_2){this.logWarn("RPC/DS request specifically requesting the xmlHttpRequest transport, but xmlHttpRequest not currently available - switching transport to hiddenFrame.")}else{this.logWarn("RPCManager.defaultTransport specifies xmlHttpRequest, but xmlHttpRequest not currently available - switching transport to hiddenFrame.")} } _1.transport="hiddenFrame"} } ,isc.A.canQueueRequest=function isc_c_RPCManager_canQueueRequest(_1,_2){if(_1.doNotTrackRPC)return false;if(_1.ignoreTimeout)_1.sendNoQueue=true;var _3=_1.transport;if(_1.directSubmit||_1.downloadResult||_1.target||_1.$38j){if(_1.transport!="hiddenFrame"){if(_2){this.logWarn("request specified explicit transport: "+_3 +", but other settings (directSubmit, downloadResult, or target) mandate hiddenFrame transport, switching transport to hiddenFrame and submitting without queueing")}else{this.logInfo("Request configuration (directSubmit, downloadResult, or target) requires it to be sent using hiddenFrame transport. Will be submitted without queueing.")} _1.transport="hiddenFrame";return false} } if(_1.containsCredentials){return false } if(_1.sendNoQueue||_1.transport=="scriptInclude")return false;var _4=this.currentTransaction,_5=_4&&_4.requestData.operations.length,_6=_4&&_5>0;if(_6&&(_1.actionURL!=_4.URL)){this.logWarn("RPCRequest specified (or defaulted to) URL: "+_1.actionURL +" which is different than the URL for which the RPCManager is currently queuing: " +_4.URL+" - sending this request to server and continuing to queue");return false} if(_6&&(!!_1.useStrictJSON!=!!_4.useStrictJSON)) {this.logWarn("Attempt to queue request specified 'useStrictJSON:"+_1.useStrictJSON+". This conflicts with this setting for other queued requests - sending the request to server and continuing to queue.");return false} if(_6&&_4.transport!=_1.transport){this.logWarn("RPCRequest with conflicting transport while queuing, sending request to server and continuing to queue.");return false} if(_6&&_1.clientOnly){this.logWarn("Attempt to queue a client-only request with a pending transaction containing server-bound requests (URL: "+_4.URL+") - the client-only request will be sent immediately outside the queue and the queue preserved");return false} if(!_1.clientOnly&&_4&&_5==0){this.logWarn("Attempt to queue an RPCRequest to the server (URL: "+_1.actionURL+") with client-only requests in the queue - the client-only requests will be sent immediately, clearing the transaction, and making the queue available for this (and subsequent) server-bound requests");this.sendQueue();this.startQueue()} return true} ,isc.A.sendNoQueue=function isc_c_RPCManager_sendNoQueue(_1){var _2=this.currentTransaction;var _3=this.queuing;this.currentTransaction=this.$385(_1.doNotTrackRPC);this.$386(_1,this.currentTransaction);var _4=this.sendQueue();this.queuing=_3;this.currentTransaction=_2;return _4} ,isc.A.$385=function isc_c_RPCManager__createTransaction(_1){var _2=this.$452++;var _3={timeout:this.defaultTimeout,transactionNum:_2,operations:[],responses:[],requestData:{transactionNum:_2,operations:[]},prompt:this.defaultPrompt,showPrompt:false,doNotTrackRPC:_1,pushedToDebugMaster:false,changed:function(){if(!this.doNotTrackRPC)isc.RPCManager.pushRPCUpdate(_3)} };this.$38z.add(_3);_3.changed();return _3} ,isc.A.$386=function isc_c_RPCManager__addRequestToTransaction(_1,_2){_2.URL=_1.actionURL;if(_1.containsCredentials)_2.containsCredentials=true;if(!_2.download_filename)_2.download_filename=_1.download_filename;if(((_1.downloadResult||_1.downloadToNewWindow)&&_1.download_filename) ||_1.$38j) {_2.download_filename=_1.download_filename;if(_1.download_filename){_2.URL=this.addPathToURL(_2.URL,"/"+encodeURIComponent(_1.download_filename))} _2.ignoreError=true}else if(_1.exportFilename){_2.URL=this.addPathToURL(_2.URL,"/"+encodeURIComponent(_1.exportFilename))} if(_1.prompt&&!_2.customPromptIsSet){this.logDebug("Grabbed prompt from first request that defined one: "+_1.prompt);_2.prompt=_1.prompt;_2.customPromptIsSet=true} if(_1.showPrompt&&!_2.showPrompt&&!this.neverShowPrompt){_1.showedPrompt=true;isc.addProperties(_2,{showPrompt:true,promptStyle:_1.promptStyle,promptCursor:_1.promptCursor,useCursorTracker:_1.useCursorTracker,cursorTrackerConstructor:_1.cursorTrackerConstructor,cursorTrackerProperties:_1.cursorTrackerProperties })} if(_1.isProxied){isc.addProperties(_2,{isProxied:true,proxiedURL:_1.proxiedURL })} _2.transport=_1.transport;_2.useStrictJSON=_1.useStrictJSON;if(_1.ignoreReloginMarkers)_2.ignoreReloginMarkers=true;_2.operations.add(_1);var _3=_1.data;if(_3==null)_3="__ISC_NULL__";else if(_3==="")_3="__ISC_EMPTY_STRING__";if(!_1.clientOnly)_2.requestData.operations.add(_3);if(_2.omitNullMapValuesInResponse!==false&&_1.omitNullMapValuesInResponse!=null){_2.omitNullMapValuesInResponse=_2.requestData.omitNullMapValuesInResponse=_1.omitNullMapValuesInResponse}else{_2.omitNullMapValuesInResponse=false} if(_1.ignoreTimeout)_2.$387=true;_1.transactionNum=_2.transactionNum;if(_1.timeout||_1.timeout===0)_2.timeout=_1.timeout;_2.changed()} ,isc.A.startQueue=function isc_c_RPCManager_startQueue(_1){var _2=this.queuing;this.queuing=(_1==null?true:_1);return _2} ,isc.A.doShowPrompt=function isc_c_RPCManager_doShowPrompt(_1,_2,_3){if(this.$380++!=0)return;if(_3&&!this.$113i){isc.EH.showClickMask(null,"hard",this.unmaskedTargets?this.unmaskedTargets.duplicate():null,"blockingRPC");this.$113i=true} var _4=this;var _5=function(){if(_1.promptStyle=="dialog"&&_2!=null){isc.showPrompt(_2);_4.$388=true;if(_4.$113i){isc.EH.hideClickMask("blockingRPC");_4.$113i=null} }else{if(!_4.$113i){isc.EH.showClickMask(null,"hard",_4.unmaskedTargets?_4.unmaskedTargets.duplicate():null,"blockingRPC");_4.$113i=true} if(_1.useCursorTracker){_4.$389=isc.ClassFactory.getClass(_1.cursorTrackerConstructor) .create(_1.cursorTrackerProperties);_4.$389.show()}else{isc.EH.$m8.setCursor(_1.promptCursor)} } };if(_3){this.$113j=isc.Timer.setTimeout(_5,_3)}else{_5()} } ,isc.A.doClearPrompt=function isc_c_RPCManager_doClearPrompt(_1){if(this.$113j){isc.Timer.clear(this.$113j);this.$113j=null} if(_1.clearedPrompt)return;_1.clearedPrompt=true;if(--this.$380!=0){if(this.$380<0)this.$380=0;return} if(this.$388){isc.clearPrompt()}else{if(this.$389){this.$389.destroy();this.$389=null}else{if(isc.EH.$m8)isc.EH.$m8.setCursor(isc.Canvas.DEFAULT)} } this.$388=null;if(this.$113i){isc.EH.hideClickMask("blockingRPC");this.$113i=null} } ,isc.A.getCurrentTransactionId=function isc_c_RPCManager_getCurrentTransactionId(){return this.currentTransaction?this.currentTransaction.transactionNum:null} ,isc.A.getQueueTransactionId=function isc_c_RPCManager_getQueueTransactionId(){return this.currentTransaction?this.currentTransaction.transactionNum:null} ,isc.A.cancelQueue=function isc_c_RPCManager_cancelQueue(_1){if(_1==null){_1=this.currentTransaction} var _2=this.getTransaction(_1);if(_2==null)return;else if(_2==this.currentTransaction)this.currentTransaction=null;if(_2.showPrompt)this.doClearPrompt(_2);if(_2.transportRequest&&_2.transportRequest.abort){_2.transportRequest.abort()} _2.cancelled=true;this.clearTransaction(_2.transactionNum)} ,isc.A.getTransaction=function isc_c_RPCManager_getTransaction(_1){if(_1==null)return null;if(_1.location&&_1.document){var _2=_1;var _3=isc.HiddenFrame.$h6;for(var i=0;i<_3.length;i++){if(_2==_3[i].getHandle()){_1=_3[i].transactionNum;break} } if(_1==_2){this.logDebug("Can't find transactionNum in getTransaction from iframe");return null} } if(isc.isA.Number(_1)||isc.isA.String(_1)){_1=this.$38z.find({transactionNum:_1})} if(_1&&_1.cleared)return null;return _1} ,isc.A.getCurrentTransaction=function isc_c_RPCManager_getCurrentTransaction(){return this.currentTransaction} ,isc.A.getLastSubmittedTransaction=function isc_c_RPCManager_getLastSubmittedTransaction(){return this.$38z[this.$38z.length-1]} ,isc.A.clearTransaction=function isc_c_RPCManager_clearTransaction(_1){var _2=this.getTransaction(_1);if(_2==null){this.logWarn("clearTransaction: no such transaction: "+this.echo(_1));return} this.clearTransactionTimeout(_2);isc.Comm.closeOperationPromptWindow(_2);if(!this.$453&&isc.Page.isLoaded()){var _3=isc.LogViewer.getGlobalLogCookie();this.setTrackRPC(_3?_3.trackRPC:false);this.$453=true} _2.cleared=true;if(!this.$454)this.$38z.remove(_2);else _2.changed();isc.RPCManager.$410.remove(_2.transactionNum)} ,isc.A.setTrackRPC=function isc_c_RPCManager_setTrackRPC(_1){this.$454=_1;isc.LogViewer.setGlobalLogCookieValue("trackRPC",_1);var _2=this.getTransactions();if(!_1)this.removeClearedRPC()} ,isc.A.pushRPCUpdate=function isc_c_RPCManager_pushRPCUpdate(_1){if(!this.$454||_1.doNotTrackRPC)return;if(isc.debugTarget)isc.debugTarget.pushRPCUpdate(_1);if(_1.pushedToDebugMaster&&_1.cleared)this.$38z.remove(_1)} ,isc.A.pushBufferedTransactionsToDebugMaster=function isc_c_RPCManager_pushBufferedTransactionsToDebugMaster(){var _1=this.$38z.findAll("pushedToDebugMaster",false);if(!_1)return;for(var i=0;i<_1.length;i++){this.pushRPCUpdate(_1[i])} } ,isc.A.removeClearedRPC=function isc_c_RPCManager_removeClearedRPC(){var _1=this.$38z.findAll("cleared",true);if(_1)this.$38z.removeList(_1)} ,isc.A.delayAllPendingTransactions=function isc_c_RPCManager_delayAllPendingTransactions(){this.delayingTransactions=true;for(var i=0;i