igniteui-webcomponents-datasources 3.2.3 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1140,26 +1140,26 @@
1140
1140
  try {
1141
1141
  for (var _b = tslib_1.__values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
1142
1142
  var summary = _c.value;
1143
- if (summary.operand == igniteuiWebcomponentsCore.SummaryOperand.Count && (ignoreCount || countExists)) {
1143
+ if (summary.operand == igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
1144
1144
  continue;
1145
1145
  }
1146
1146
  if (!first) {
1147
1147
  result += ", ";
1148
1148
  }
1149
1149
  switch (summary.operand) {
1150
- case igniteuiWebcomponentsCore.SummaryOperand.Average:
1150
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Average:
1151
1151
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
1152
1152
  break;
1153
- case igniteuiWebcomponentsCore.SummaryOperand.Min:
1153
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Min:
1154
1154
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
1155
1155
  break;
1156
- case igniteuiWebcomponentsCore.SummaryOperand.Max:
1156
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Max:
1157
1157
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
1158
1158
  break;
1159
- case igniteuiWebcomponentsCore.SummaryOperand.Sum:
1159
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Sum:
1160
1160
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
1161
1161
  break;
1162
- case igniteuiWebcomponentsCore.SummaryOperand.Count:
1162
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count:
1163
1163
  result += "$count as $__count";
1164
1164
  countExists = true;
1165
1165
  break;
@@ -1191,19 +1191,19 @@
1191
1191
  var summary = _c.value;
1192
1192
  var summaryName = summary.propertyName;
1193
1193
  switch (summary.operand) {
1194
- case igniteuiWebcomponentsCore.SummaryOperand.Average:
1194
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Average:
1195
1195
  summaryName += "Average";
1196
1196
  break;
1197
- case igniteuiWebcomponentsCore.SummaryOperand.Min:
1197
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Min:
1198
1198
  summaryName += "Min";
1199
1199
  break;
1200
- case igniteuiWebcomponentsCore.SummaryOperand.Max:
1200
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Max:
1201
1201
  summaryName += "Max";
1202
1202
  break;
1203
- case igniteuiWebcomponentsCore.SummaryOperand.Sum:
1203
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Sum:
1204
1204
  summaryName += "Sum";
1205
1205
  break;
1206
- case igniteuiWebcomponentsCore.SummaryOperand.Count:
1206
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count:
1207
1207
  summaryName = "$__count";
1208
1208
  break;
1209
1209
  }
@@ -3035,26 +3035,26 @@
3035
3035
  try {
3036
3036
  for (var _b = tslib_1.__values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
3037
3037
  var summary = _c.value;
3038
- if (summary.operand == igniteuiWebcomponentsCore.SummaryOperand.Count && (ignoreCount || countExists)) {
3038
+ if (summary.operand == igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
3039
3039
  continue;
3040
3040
  }
3041
3041
  if (!first) {
3042
3042
  result += ", ";
3043
3043
  }
3044
3044
  switch (summary.operand) {
3045
- case igniteuiWebcomponentsCore.SummaryOperand.Average:
3045
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Average:
3046
3046
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
3047
3047
  break;
3048
- case igniteuiWebcomponentsCore.SummaryOperand.Min:
3048
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Min:
3049
3049
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
3050
3050
  break;
3051
- case igniteuiWebcomponentsCore.SummaryOperand.Max:
3051
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Max:
3052
3052
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
3053
3053
  break;
3054
- case igniteuiWebcomponentsCore.SummaryOperand.Sum:
3054
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Sum:
3055
3055
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
3056
3056
  break;
3057
- case igniteuiWebcomponentsCore.SummaryOperand.Count:
3057
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count:
3058
3058
  result += "$count as $__count";
3059
3059
  countExists = true;
3060
3060
  break;
@@ -3086,19 +3086,19 @@
3086
3086
  var summary = _c.value;
3087
3087
  var summaryName = summary.propertyName;
3088
3088
  switch (summary.operand) {
3089
- case igniteuiWebcomponentsCore.SummaryOperand.Average:
3089
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Average:
3090
3090
  summaryName += "Average";
3091
3091
  break;
3092
- case igniteuiWebcomponentsCore.SummaryOperand.Min:
3092
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Min:
3093
3093
  summaryName += "Min";
3094
3094
  break;
3095
- case igniteuiWebcomponentsCore.SummaryOperand.Max:
3095
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Max:
3096
3096
  summaryName += "Max";
3097
3097
  break;
3098
- case igniteuiWebcomponentsCore.SummaryOperand.Sum:
3098
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Sum:
3099
3099
  summaryName += "Sum";
3100
3100
  break;
3101
- case igniteuiWebcomponentsCore.SummaryOperand.Count:
3101
+ case igniteuiWebcomponentsCore.DataSourceSummaryOperand.Count:
3102
3102
  summaryName = "$__count";
3103
3103
  break;
3104
3104
  }
@@ -4,4 +4,4 @@
4
4
  https://www.infragistics.com/legal/license/igultimate-eula
5
5
  GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
6
6
  */
7
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("igniteui-webcomponents-core"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","igniteui-webcomponents-core","tslib"],t):t((e=e||self)["igniteui-webcomponents-datasources"]={},e.igniteuiWebcomponentsCore,e.tslib_1)}(this,(function(e,t,r){"use strict";var i=function(){function e(e,t){this._name=null,this._isNullable=!1,this._type=null,this.name=e,this.type=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNullable",{get:function(){return this._isNullable},set:function(e){this._isNullable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e},enumerable:!0,configurable:!0}),e}();function o(e){return Array.from(t.fromEnum(e))}function n(e){var t,i;try{for(var o=r.__values(e),n=o.next();!n.done;n=o.next()){return n.value}}catch(e){t={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}throw new Error("Iterable contained no elements, expected at least one")}var s=function(){function e(){}return Object.defineProperty(e.prototype,"first",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this._last},enumerable:!0,configurable:!0}),e.prototype.addFirst=function(e){if(null==this._first)this._first=new a(e),this._last=this._first;else{var t=this._first;this._first=new a(e),this._first.next=t,t.prev=this._first}},e.prototype.addLast=function(e){if(null==this._last)this._first=new a(e),this._last=this._first;else{var t=this._last;this._last=new a(e),this._last.prev=t,t.next=this._last}},e.prototype.removeFirst=function(){this.remove(this.first)},e.prototype.clear=function(){this._first=null,this._last=null},e.prototype.contains=function(e){for(var t=this.first;null!=t;){if(t.value===e)return!0;t=t.next}return!1},e.prototype.removeValue=function(e){for(var t=this.first;null!=t;){if(t.value===e)return void this.remove(t);t=t.next}},e.prototype.remove=function(e){this._first==e&&(this._first=e.next,null!=e.next&&(e.next.prev=null)),this._last==e&&(this._last=e.prev,null!=e.prev&&(e.prev.next=null)),null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e.next=null,e.prev=null},e}(),a=function(){function e(e){void 0!==e&&(this.value=e)}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prev",{get:function(){return this._prev},set:function(e){this._prev=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"next",{get:function(){return this._next},set:function(e){this._next=e},enumerable:!0,configurable:!0}),e}(),u=function(){function e(e,t){this._properties=null,this._primaryKey=null,this._name=null,this.name=e,this.loadProperties(t),this.loadPrimaryKey(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return null==this._properties&&(this._properties=new Map),this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryKey",{get:function(){return null==this._primaryKey&&(this._primaryKey=[]),this._primaryKey},enumerable:!0,configurable:!0}),e.prototype.loadProperties=function(e){for(var r=o(e.elements()),n=r.length,s=t.XName.get("Name",""),a=t.XName.get("Type",""),u=0;u<n;u++){var p=r[u];if("Property"==p.name.localName){var l=p.attribute(s).value,c=p.attribute(a).value;this.properties.set(l,new i(l,c))}}},e.prototype.loadPrimaryKey=function(e){for(var r=o(e.elements()),i=r.length,n=t.XName.get("Name",""),s=0;s<i;s++){var a=r[s];if("Key"==a.name.localName)for(var u=o(a.elements()),p=u.length,l=0;l<p;l++){var c=u[l];"PropertyRef"==c.name.localName&&this.primaryKey.push(c.attribute(n).value)}}},e}(),p=function(){function e(e,t){if(this._entityName=null,this._entityNamespace=null,this._entityType=null,this._name=null,this.name=e,this.entityType=t,t.indexOf(".")>=0){var r=t.split(".");if(2==r.length)this.entityNamespace=r[0],this.entityName=r[1];else{var i=t.lastIndexOf(".");this.entityNamespace=t.substr(0,i),this.entityName=t.substr(i+1)}}else this.entityNamespace=t,this.entityName=t}return Object.defineProperty(e.prototype,"entityName",{get:function(){return this._entityName},set:function(e){this._entityName=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entityNamespace",{get:function(){return this._entityNamespace},set:function(e){this._entityNamespace=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entityType",{get:function(){return this._entityType},set:function(e){this._entityType=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),e}(),l=function(){function e(e,r,i,o,n){if(this._actualData=null,this._schema=null,this._pageIndex=0,this._groupInformation=null,this._summaryInformation=null,null==e)this._actualData=null;else{var s=e.value.length;this._actualData=[];for(var a=new Set,u=0;u<r.propertyNames.length;u++)r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeValue&&r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeOffsetValue||a.add(r.propertyNames[u]);for(var p=void 0,l=function(t){for(var r=e.value[t],i=new Map,o=Array.from(Object.keys(r)),n=o.map((function(e){return r[e]})),s=0;s<o.length;s++)p=n[s],a.has(o[s])&&(p=new Date(p)),i.set(o[s],p);c._actualData[t]=i},c=this,h=0;h<s;h++)l(h)}this._schema=r,this._groupInformation=i,this._summaryInformation=o,this._pageIndex=n}return e.prototype.count=function(){return this._actualData.length},e.prototype.getItemAtIndex=function(e){return this._actualData[e]},e.prototype.getItemValueAtIndex=function(e,t){var r=this._actualData[e];return r.has(t)?r.get(t):null},e.prototype.pageIndex=function(){return this._pageIndex},e.prototype.schema=function(){return this._schema},e.prototype.getGroupInformation=function(){return this._groupInformation},e.prototype.getSummaryInformation=function(){return this._summaryInformation},e}(),c=function(){function e(e,t,r){this._entities=null,this._entitySets=null,this._namespace=null,this.namespace=e,this.loadEntities(t),this.loadEntitySets(r)}return Object.defineProperty(e.prototype,"entities",{get:function(){return null==this._entities&&(this._entities=new Map),this._entities},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entitySets",{get:function(){return null==this._entitySets&&(this._entitySets=new Map),this._entitySets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},set:function(e){this._namespace=e},enumerable:!0,configurable:!0}),e.prototype.loadEntities=function(e){for(var r=e,i=r.length,o=t.XName.get("Name",""),n=0;n<i;n++){var s=r[n],a=new u(s.attribute(o).value,s);this.entities.set(a.name,a)}},e.prototype.loadEntitySets=function(e){for(var r=e,i=r.length,o=t.XName.get("Name",""),n=t.XName.get("EntityType",""),s=0;s<i;s++){var a=r[s],u=new p(a.attribute(o).value,a.attribute(n).value);this.entitySets.set(u.name,u)}},e}(),h=function(){function e(r){if(this._entityTypeSchemaNamespace=null,this._entitySetSchemaNamespace=null,this._schema=null,null!=r){var i=t.XDocument.parse(r),s=o(n(t.fromEnum(n(t.fromEnum(i.elements())).elements())).elements1(t.XName.get("Schema",e.nS.namespaceName)));if(null!=s){for(var a=null,u=null,p=s.length,l=t.XName.get("EntityContainer",e.nS.namespaceName),h=t.XName.get("EntitySet",e.nS.namespaceName),f=t.XName.get("Namespace",""),d=t.XName.get("EntityType",e.nS.namespaceName),m=0;m<p;m++){if(s[m].nodeType==t.XmlNodeType.Element){var y=s[m];if(null==a){var g=o(y.elements1(l));null!=g&&g.length>0&&null!=(a=o(t.typeCast(t.XElement.$type,g[0]).elements1(h)))&&(this._entitySetSchemaNamespace=y.attribute(f).value)}null==u&&null!=(u=o(y.elements1(d)))&&(this._entityTypeSchemaNamespace=y.attribute(f).value)}}null!=a&&null!=u&&(this.schema=new c(this._entityTypeSchemaNamespace,u,a))}}}return Object.defineProperty(e.prototype,"schema",{get:function(){return this._schema},set:function(e){this._schema=e},enumerable:!0,configurable:!0}),e.prototype.getODataDataSourceSchema=function(e){var i,o,n,s;if(null==this.schema)return null;var a=[],u=[],p=[],l=this.schema.entitySets.get(e);if(null!=l){var c=this.schema.entities.get(l.entityName);if(null!=c){try{for(var h=r.__values(c.properties.values()),f=h.next();!f.done;f=h.next()){var d=f.value;a.push(d.name),"Edm.String"==d.type?u.push(t.DataSourceSchemaPropertyType.StringValue):"Edm.Int16"==d.type||"Edm.Int32"==d.type?u.push(t.DataSourceSchemaPropertyType.IntValue):"Edm.Double"==d.type?u.push(t.DataSourceSchemaPropertyType.DoubleValue):"Edm.Single"==d.type?u.push(t.DataSourceSchemaPropertyType.SingleValue):"Edm.Boolean"==d.type?u.push(t.DataSourceSchemaPropertyType.BooleanValue):"Edm.Byte"==d.type?u.push(t.DataSourceSchemaPropertyType.ShortValue):"Edm.DateTime"==d.type||"Edm.DateTimeOffset"==d.type?u.push(t.DataSourceSchemaPropertyType.DateTimeValue):"Edm.Int64"==d.type?u.push(t.DataSourceSchemaPropertyType.LongValue):"Edm.Decimal"==d.type?u.push(t.DataSourceSchemaPropertyType.DecimalValue):"Edm.SByte"==d.type?u.push(t.DataSourceSchemaPropertyType.ShortValue):u.push(t.DataSourceSchemaPropertyType.ObjectValue)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}try{for(var m=r.__values(c.primaryKey),y=m.next();!y.done;y=m.next()){var g=y.value;p.push(g)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(n)throw n.error}}}}return new t.ODataDataSourceSchema(a,u,p)},e.nS=t.XNamespace.get("http://docs.oasis-open.org/odata/ns/edm"),e}(),f=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(i,e),i.$t=t.markType(i,"ODataVirtualDataSourceProviderTaskDataHolder",t.AsyncVirtualDataSourceProviderTaskDataHolder.$type),i}(t.AsyncVirtualDataSourceProviderTaskDataHolder),d=function(e){function i(i){var o,n,s=e.call(this,i)||this;if(s._baseUri=null,s._entitySet=null,s._sortDescriptions=null,s._groupDescriptions=null,s._filterExpressions=null,s._summaryDescriptions=null,s._desiredPropeties=null,s._enableJsonp=!0,s._isAggregationSupported=!1,s._groupInformation=null,s._summaryInformation=null,s._filterString=null,s._selectedString=null,s.doWork=s.doWork.bind(s),s._baseUri=i.baseUri,s._entitySet=i.entitySet,s._sortDescriptions=i.sortDescriptions,s._groupDescriptions=i.groupDescriptions,null!=s._groupDescriptions&&s._groupDescriptions.size()>0){s._sortDescriptions=new t.SortDescriptionCollection;try{for(var a=r.__values(s.iter(i.sortDescriptions)),u=a.next();!u.done;u=a.next()){var p=u.value;s._sortDescriptions.add(p)}}catch(e){o={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}for(var l=0;l<s._groupDescriptions.size();l++)s._sortDescriptions.insert(l,s._groupDescriptions.get(l))}return s._filterExpressions=i.filterExpressions,s._desiredPropeties=i.propertiesRequested,s._summaryDescriptions=i.summaryDescriptions,s._summaryScope=i.summaryScope,s._enableJsonp=i.enableJsonp,s._isAggregationSupported=i.isAggregationSupported,window.setTimeout(s.doWork,100),s}return r.__extends(i,e),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"desiredProperties",{get:function(){return this._desiredPropeties},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){e.prototype.initialize.call(this)},i.prototype.getTaskDataHolder=function(){return new f},i.prototype.getCompletedTaskData=function(t,r){e.prototype.getCompletedTaskData.call(this,t,r)},i.prototype.removeCompletedTaskData=function(t,r){e.prototype.removeCompletedTaskData.call(this,t,r)},i.prototype.getTasksData=function(t){e.prototype.getTasksData.call(this,t)},i.prototype.iter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterFilter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterSummaries=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.processCompletedTask=function(e,t,r,o){var n,s=this,a=null,u=-1,p=e.task;try{if(p.hasErrors)return void this.retryIndex(r,t);r==i.schemaRequestIndex?u=(a=p.result)["@odata.count"]:a=p.result}catch(e){return void this.retryIndex(r,t)}if(this.actualCount=u>=0?u:a["@odata.count"],null!=(n=this.actualSchema))this.finishProcessingCompletedTask(p,r,n,a);else{var l=0;this.resolveSchema((function(e){s.actualSchema=e,!s._isAggregationSupported||0===s._groupDescriptions.size()&&0===s._summaryDescriptions.size()?s.finishProcessingCompletedTask(p,r,e,a):(s._groupDescriptions.size()>0&&(l++,s.resolveGroupInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))),s._summaryDescriptions.size()>0&&(l++,s.resolveSummaryInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))))}),(function(){s.retryIndex(r,t)}))}},i.prototype.finishProcessingCompletedTask=function(e,t,r,i){var o,n,s,a,u=this;this.actualSchema=r,o=this.executionContext,s=this._groupInformation,a=this._summaryInformation,n=this.pageLoaded;var p=null;if(null!=i?(p=new l(i,r,s,a,t),!this.isLastPage(t)&&p.count()>0&&!this.populatedActualPageSize&&(this.populatedActualPageSize=!0,this.actualPageSize=p.count())):p=new l(null,r,s,a,t),null!=this.pageLoaded)if(null!=this.executionContext){if(null==o||null==n)return void this.shutdown();o.execute((function(){return n(p,u.actualCount,u.actualPageSize)}))}else{if(null==n)return void this.shutdown();n(p,this.actualCount,this.actualPageSize)}},i.prototype.resolveGroupInformation=function(e,i){var o,n,s=this;if(null==this._groupInformation){var a,u="",p="",l="";if(null!=this._groupDescriptions&&0!=this._groupDescriptions.size()){if(a=this._filterString,this.updateFilterString(),null!=this._groupDescriptions){var c=!0;try{for(var h=r.__values(this.iter(this._groupDescriptions)),f=h.next();!f.done;f=h.next()){var d=f.value;c?c=!1:(u+=", ",p+=", "),p+=d.propertyName,d.direction===t.ListSortDirection.Descending?u+=d.propertyName+" desc":u+=d.propertyName+" asc"}}catch(e){o={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(o)throw o.error}}}if(this._summaryScope===t.DataSourceSummaryScope.Both||this._summaryScope===t.DataSourceSummaryScope.Groups){var m=this.getSummaryQueryParameters(!0);t.stringIsNullOrEmpty(m)||(l=", "+m)}var y=this._entitySet+"?$orderby="+u+"&$apply=";t.stringIsNullOrEmpty(a)||(y+="filter("+a+")/"),y+="groupby(("+p+"), aggregate($count as $__count"+l+"))";try{var g=[],_=function(t,r){return s.groupSuccess(t,r,e,i,g)},v=function(t){return s.groupError(t,e,i,g)},b={requestUri:this._baseUri+"/"+y,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){odatajs.oData.request(b,_,v)})()}catch(e){i()}}else e(null)}else e(this._groupInformation)},i.prototype.groupError=function(e,t,r,i){this._groupInformation=null},i.prototype.groupSuccess=function(e,t,i,o,n){var s,a,u=[];try{for(var p=r.__values(this.iter(this._groupDescriptions)),l=p.next();!l.done;l=p.next()){var c=l.value;u.push(c.propertyName)}}catch(e){s={error:e}}finally{try{l&&!l.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}if(e&&e.value&&e.value.length>0)for(var h=0;h<e.value.length;h++)this.addGroup(n,u,u,0,e.value[h]);this._groupInformation=n,i(this._groupInformation)},i.prototype.addGroup=function(e,i,o,n,s){var a,u,p=[];try{for(var l=r.__values(i),c=l.next();!c.done;c=l.next()){var h=c.value;s[h]&&p.push(s[h])}}catch(e){a={error:e}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}var f=0;s.$__count&&(f=t.Convert.toInt321(s.$__count));var d=null;this._summaryScope!=t.DataSourceSummaryScope.Both&&this._summaryScope!=t.DataSourceSummaryScope.Groups||(d=this.createSummaryResults(s));var m=new t.DefaultSectionInformation(n,n+(f-1),o,p,d);e.push(m)},i.prototype.resolveSummaryInformation=function(e,r){var i=this;if(null==this._summaryInformation){var o,n;if(null!=this._summaryDescriptions&&0!=this._summaryDescriptions.size()&&this._summaryScope!=t.DataSourceSummaryScope.Groups&&this._summaryScope!=t.DataSourceSummaryScope.None){o=this._filterString,this.updateFilterString(),n=this.getSummaryQueryParameters(!1);var s=this._entitySet+"?$apply=";t.stringIsNullOrEmpty(o)||(s+="filter("+o+")/"),s+="aggregate("+n+")";try{var a=[],u=function(t,o){return i.summarySuccess(t,o,e,r,a)},p=function(t){return i.summaryError(t,e,r,a)},l={requestUri:this._baseUri+"/"+s,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){odatajs.oData.request(l,u,p)})()}catch(e){r()}}else e(null)}else e(this._summaryInformation)},i.prototype.summarySuccess=function(e,t,r,i,o){e&&e.value&&e.value.length>0&&(o=this.createSummaryResults(e.value[0])),this._summaryInformation=o,r(this._summaryInformation)},i.prototype.summaryError=function(e,t,r,i){this._summaryInformation=null},i.prototype.getSummaryQueryParameters=function(e){var i,o,n="";if(null!=this._summaryDescriptions){var s=!0,a=!1;try{for(var u=r.__values(this.iterSummaries(this._summaryDescriptions)),p=u.next();!p.done;p=u.next()){var l=p.value;if(l.operand!=t.SummaryOperand.Count||!e&&!a){switch(s||(n+=", "),l.operand){case t.SummaryOperand.Average:n+=l.propertyName+" with average as "+l.propertyName+"Average";break;case t.SummaryOperand.Min:n+=l.propertyName+" with min as "+l.propertyName+"Min";break;case t.SummaryOperand.Max:n+=l.propertyName+" with max as "+l.propertyName+"Max";break;case t.SummaryOperand.Sum:n+=l.propertyName+" with sum as "+l.propertyName+"Sum";break;case t.SummaryOperand.Count:n+="$count as $__count",a=!0}s=!1}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return n},i.prototype.createSummaryResults=function(e){var i,o,n=[];try{for(var s=r.__values(this.iterSummaries(this._summaryDescriptions)),a=s.next();!a.done;a=s.next()){var u=a.value,p=u.propertyName;switch(u.operand){case t.SummaryOperand.Average:p+="Average";break;case t.SummaryOperand.Min:p+="Min";break;case t.SummaryOperand.Max:p+="Max";break;case t.SummaryOperand.Sum:p+="Sum";break;case t.SummaryOperand.Count:p="$__count"}var l=null;e&&e[p]&&(l=e[p]);var c=new t.DefaultSummaryResult(u.propertyName,u.operand,l);n.push(c)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},i.prototype.resolveSchema=function(e,t){var r=this,i=this._baseUri,o=new XMLHttpRequest;o.onreadystatechange=function(){var i,n;4===o.readyState&&(200===o.status?(i=o.responseText,n=new h(i).getODataDataSourceSchema(r._entitySet),e(n)):t())},o.open("Get",i+"/$metadata"),o.send()},i.prototype.makeTaskForRequest=function(e,o){var n,s,a;a=this.actualPageSize,this.sortDescriptions;var u=this._baseUri;u+="/"+this._entitySet;var p=!1;if(this.updateFilterString(),null!=this._filterString&&(p?u+="&":(p=!0,u+="?"),u+="$filter="+this._filterString),null!=this.sortDescriptions){var l=null;try{for(var c=r.__values(this.iter(this.sortDescriptions)),h=c.next();!h.done;h=c.next()){var f=h.value;null==l?l="":l+=", ",f.direction==t.ListSortDirection.Descending?l+=f.propertyName+" desc":l+=f.propertyName}}catch(e){n={error:e}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}null!=l&&(p?u+="&":(p=!0,u+="?"),u+="$orderby="+l)}if(null!=this.desiredProperties&&this.desiredProperties.length>0){for(var d="",m=!0,y=this.desiredProperties,g=0;g<y.length;g++){m?m=!1:d+=", ",d+=y[g]}p?u+="&":(p=!0,u+="?"),u+="$select="+d}var _=new t.AsyncVirtualDataTask;e.index==i.schemaRequestIndex?this.executeRequest(u,p,0,a,_):this.executeRequest(u,p,e.index*a,a,_),e.taskHolder=new t.AsyncDataSourcePageTaskHolder,e.taskHolder.task=_,this.tasks.add(e)},i.prototype.updateFilterString=function(){var e,i;if(null!=this.filterExpressions&&this.filterExpressions.size()>0&&null==this._filterString){var o="",n=!0;try{for(var s=r.__values(this.iterFilter(this.filterExpressions)),a=s.next();!a.done;a=s.next()){var u=a.value;n?n=!1:o+=" AND ";var p=new t.ODataDataSourceFilterExpressionVisitor(0);p.visit(u);var l=p.toString();this.filterExpressions.size()>1&&(l="("+l+")"),o+=l}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}this._filterString=o}},i.prototype.executeRequest=function(e,t,r,i,o){var n=this;t?e+="&":(t=!0,e+="?");var s,a=function(e,t){return n.success(o,e,t)},u=function(e){return n.error(o,e)},p={requestUri:e+="$skip="+r+"&$top="+i+"&$count=true",enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};s=function(){odatajs.oData.request(p,a,u)},o.run=s},i.prototype.success=function(e,t,r){e.result=t,e.isCompleted=!0},i.prototype.error=function(e,t){e.isCompleted=!0,e.hasErrors=!0},i.prototype.createBatchRequest=function(e){for(var r=[],i=0;i<e.length;i++){var o=e[i],n={"Content-Type":"application/json","odata-version":"4.0"};o.transactionType===t.TransactionType.Add?r.push({method:"POST",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this._entitySet,headers:n,body:o.value}):o.transactionType===t.TransactionType.Update?(o.version&&(n["If-Match"]=o.version),r.push({method:"PATCH",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this.getRequestUriWithKey(o.id),headers:n,body:o.value})):o.transactionType===t.TransactionType.Delete&&(o.version&&(n["If-Match"]=o.version),r.push({method:"DELETE",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this.getRequestUriWithKey(o.id),headers:n}))}var s={requestUri:this._baseUri+"/$batch",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requests:r})},a=this;odatajs.oData.request(s,(function(e){if(e&&e.responses)if(e.responses.length>0){for(var t=!0,i=[],o=function(o){if(200!==e.responses[o].status&&204!==e.responses[o].status){t=!1;var n=r.filter((function(t){return t.id==e.responses[o].id}))[0];if(n){var s=n.method+" request failed with code "+e.responses[o].status;i.push(s),console.error(s)}return"break"}},n=0;n<e.responses.length;n++){if("break"===o(n))break}t?a.batchCompleted(!0,!0,null):a.batchCompleted(!1,!0,i)}else a.batchCompleted(!1,!0,null)}),(function(e){var t=[];e&&e.message&&t.push(e.message),a.batchCompleted(!1,!0,t)}))},i.prototype.getRequestUriWithKey=function(e){for(var t="",r=Object.keys(e),i=0;i<r.length;i++)i>0&&(t+=","),t+=r[i]+"="+e[r[i]];return this._entitySet+"("+t+")"},i.schemaRequestIndex=-1,i}(t.AsyncVirtualDataSourceProviderWorker),m=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._baseUri=null,t._entitySet=null,t._sortDescriptions=null,t._filterExpressions=null,t._propertiesRequested=null,t._groupDescriptions=null,t._summaryDescriptions=null,t}return r.__extends(i,e),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){this._baseUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){this._entitySet=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},set:function(e){this._sortDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},set:function(e){this._filterExpressions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},set:function(e){this._groupDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},set:function(e){this._summaryDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryscope},set:function(e){this._summaryscope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProviderWorkerSettings",t.AsyncVirtualDataSourceDataProviderWorkerSettings.$type),i}(t.AsyncVirtualDataSourceDataProviderWorkerSettings),y=function(e){function i(){var r=e.call(this)||this;return r._worker=null,r._requests=new s,r._callback=null,r._pageLoaded=null,r._pageSizeRequested=50,r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r.schemaChanged=null,r._currentFullCount=0,r._currentSchema=null,r._executionContext=null,r._updateNotifier=null,r._deferAutoRefresh=!1,r._sortDescriptions=null,r._groupDescriptions=null,r._propertiesRequested=null,r._filterExpressions=null,r._summaryDescriptions=null,r._enableJsonp=!0,r._schemaFetchQueued=!1,r._autoRefreshQueued=!1,r._batchCompleted=null,r._sortDescriptions=new t.SortDescriptionCollection,r._sortDescriptions.onChanged=function(){return r.sortDescriptions_CollectionChanged(null,null)},r._groupDescriptions=new t.SortDescriptionCollection,r._groupDescriptions.onChanged=function(){return r.groupDescriptions_CollectionChanged(null,null)},r._filterExpressions=new t.FilterExpressionCollection,r._filterExpressions.onChanged=function(){return r.filterExpressions_CollectionChanged(null,null)},r._summaryDescriptions=new t.SummaryDescriptionCollection,r._summaryDescriptions.onChanged=function(){return r.summaryDescriptions_CollectionChanged(null,null)},r}return r.__extends(i,e),i.prototype.filterExpressions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.sortDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.groupDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.summaryDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.addPageRequest=function(e,r){this.deferAutoRefresh||(null!=this._worker&&this._worker.isShutdown&&(this._worker=null,this._callback=null),null==this._worker&&this.createWorker(),r==t.DataSourcePageRequestPriority.High?this._requests.addFirst(e):this._requests.addLast(e),this._worker.addPageRequest(e,r)||(this._worker=null,this._callback=null,this.addPageRequest(e,r)))},i.prototype.createWorker=function(){if(this.valid()){this._callback=t.runOn(this,this.raisePageLoaded);var e=this.getWorkerSettings();this._worker=new d(e)}},i.prototype.valid=function(){return null!=this.entitySet&&null!=this.baseUri},i.prototype.getWorkerSettings=function(){var e,t=this;return(e=new m).baseUri=t._baseUri,e.entitySet=t._entitySet,e.pageSizeRequested=t._pageSizeRequested,e.timeoutMilliseconds=t._timeoutMilliseconds,e.pageLoaded=t._callback,e.batchCompleted=t._batchCompleted,e.executionContext=t._executionContext,e.sortDescriptions=t._sortDescriptions,e.groupDescriptions=t._groupDescriptions,e.filterExpressions=t._filterExpressions,e.propertiesRequested=t._propertiesRequested,e.summaryDescriptions=t._summaryDescriptions,e.summaryScope=t._summaryScope,e.enableJsonp=t._enableJsonp,e.isAggregationSupported=t.isAggregationSupported,e},i.prototype.removePageRequest=function(e){for(var t=this._requests.first;null!=t;)t.value==e&&this._requests.remove(t),t=t.next;null!=this._worker&&this._worker.removePageRequest(e)},i.prototype.removeAllPageRequests=function(){this._requests.clear(),null!=this._worker&&this._worker.removeAllPageRequests()},i.prototype.close=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageLoaded",{get:function(){return this._pageLoaded},set:function(e){this._pageLoaded=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.raisePageLoaded=function(e,r,i){if(null!=this._pageLoaded){if(this._currentFullCount=r,null==this._currentSchema){var o=null;null!=e&&(o=e.schema()),this._currentSchema=o,null!=this.schemaChanged&&this.schemaChanged(this,new t.DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema,this._currentFullCount))}e.pageIndex()!=d.schemaRequestIndex&&this._pageLoaded(e,r,i)}},i.prototype.killWorker=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageSizeRequested",{get:function(){return this._pageSizeRequested},set:function(e){this._pageSizeRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,t!=this._entitySet&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){this._timeoutMilliseconds=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.getItemValue=function(e,t){var r=e;return r.has(t)?r.get(t):null},i.prototype.setItemValue=function(e,t,r){},i.prototype.removeItem=function(e){},i.prototype.addItem=function(e){},Object.defineProperty(i.prototype,"actualCount",{get:function(){return this._currentFullCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"actualSchema",{get:function(){return this._currentSchema},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"executionContext",{get:function(){return this._executionContext},set:function(e){this._executionContext=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"updateNotifier",{get:function(){return this._updateNotifier},set:function(e){this._updateNotifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deferAutoRefresh",{get:function(){return this._deferAutoRefresh},set:function(e){this._deferAutoRefresh=e,this._deferAutoRefresh||this.queueAutoRefresh(),this._deferAutoRefresh&&this.valid()&&null==this._currentSchema&&this.queueSchemaFetch()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupported",{get:function(){return this.isAggregationSupported},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryScope},set:function(e){this._summaryScope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"notifyUsingSourceIndexes",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isItemIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isKeyIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.notifySetItem=function(e,t,r){null!=this.updateNotifier&&this.updateNotifier.notifySetItem(e,t,r)},i.prototype.notifyClearItems=function(){null!=this.updateNotifier&&this.updateNotifier.notifyClearItems()},i.prototype.notifyInsertItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyInsertItem(e,t)},i.prototype.notifyRemoveItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyRemoveItem(e,t)},i.prototype.queueSchemaFetch=function(){this._schemaFetchQueued||null!=this.executionContext&&(this._schemaFetchQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doSchemaFetchInternal)))},i.prototype.doSchemaFetchInternal=function(){this._schemaFetchQueued&&(this._schemaFetchQueued=!1,this.schemaFetchInternal())},i.prototype.schemaFetchInternal=function(){this.schemaFetchInternalOverride()},i.prototype.schemaFetchInternalOverride=function(){this.deferAutoRefresh&&(this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this.addSchemaRequest())},i.prototype.addSchemaRequest=function(){this._worker.addPageRequest(d.schemaRequestIndex,t.DataSourcePageRequestPriority.High)},i.prototype.queueAutoRefresh=function(){this.deferAutoRefresh||this._autoRefreshQueued||null!=this.executionContext&&(this._autoRefreshQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doRefreshInternal)))},i.prototype.doRefreshInternal=function(){this.deferAutoRefresh?this._autoRefreshQueued=!1:this._autoRefreshQueued&&(this._autoRefreshQueued=!1,this.refreshInternal())},i.prototype.refreshInternal=function(){this.refreshInternalOverride()},i.prototype.refreshInternalOverride=function(){this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this._worker.addPageRequest(0,t.DataSourcePageRequestPriority.Normal)},i.prototype.flushAutoRefresh=function(){this.doRefreshInternal()},i.prototype.refresh=function(){this.refreshInternal()},i.prototype.indexOfItem=function(e){return-1},i.prototype.indexOfKey=function(e){return-1},i.prototype.resolveSchemaPropertyType=function(e){if(null==this.actualSchema)return t.DataSourceSchemaPropertyType.ObjectValue;if(t.stringContains(e,"."))return t.DataSourceSchemaPropertyType.ObjectValue;for(var r=0;r<this.actualSchema.propertyNames.length;r++){if(this.actualSchema.propertyNames[r]==e)return this.actualSchema.propertyTypes[r]}return t.DataSourceSchemaPropertyType.ObjectValue},i.prototype.createBatchRequest=function(e){this._worker&&this._worker.createBatchRequest(e)},Object.defineProperty(i.prototype,"batchCompleted",{get:function(){return this._batchCompleted},set:function(e){this._batchCompleted=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProvider",t.Base.$type,[t.IDataSourceVirtualDataProvider_$type]),i}(t.Base),g=function(e){function i(){var t,r=e.call(this)||this;return r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r._isAggregationSupportedByServer=!1,r._enableJsonp=!0,r.dataProvider=((t=new y).executionContext=r.executionContext,t.enableJsonp=r.enableJsonp,t.isAggregationSupported=r.isGroupingSupported,t),r.externalDataSource=r,r}return r.__extends(i,e),i.prototype.onBaseUriChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.baseUri=this.baseUri),this.queueAutoRefresh()},Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&this.onBaseUriChanged(t,this._baseUri)},enumerable:!0,configurable:!0}),i.prototype.onEntitySetChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.entitySet=this.entitySet),this.queueAutoRefresh()},Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,this._entitySet!=t&&this.onEntitySetChanged(t,this._entitySet)},enumerable:!0,configurable:!0}),i.prototype.onTimeoutMillisecondsChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.timeoutMilliseconds=this.timeoutMilliseconds)},Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){var t=this._timeoutMilliseconds;this._timeoutMilliseconds=e,t!=this._timeoutMilliseconds&&this.onTimeoutMillisecondsChanged(t,this._timeoutMilliseconds)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupportedOverride",{get:function(){return this.isAggregationSupportedByServer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupportedByServer",{get:function(){return this._isAggregationSupportedByServer},set:function(e){this._isAggregationSupportedByServer=e,null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.isAggregationSupported=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e,null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.enableJsonp=e)},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var e=new i;e.executionContext=this.executionContext,e.includeSummaryRowsInSection=this.includeSummaryRowsInSection,e.isSectionCollapsable=this.isSectionCollapsable,e.isSectionExpandedDefault=this.isSectionExpandedDefault,e.isSectionSummaryRowsAtBottom=this.isSectionSummaryRowsAtBottom,e.primaryKey=this.primaryKey,e.propertiesRequested=this.propertiesRequested,e.sectionHeaderDisplayMode=this.sectionHeaderDisplayMode,e.shouldEmitSectionFooters=this.shouldEmitSectionFooters,e.shouldEmitSectionHeaders=this.shouldEmitSectionHeaders,e.shouldEmitShiftedRows=this.shouldEmitShiftedRows,e.summaryScope=this.summaryScope;for(var t=0;t<this.groupDescriptions.size();t++)e.groupDescriptions.add(this.groupDescriptions.get(t));for(t=0;t<this.sortDescriptions.size();t++)e.sortDescriptions.add(this.sortDescriptions.get(t));for(t=0;t<this.filterExpressions.size();t++)e.filterExpressions.add(this.filterExpressions.get(t));for(t=0;t<this.summaryDescriptions.size();t++)e.summaryDescriptions.add(this.summaryDescriptions.get(t));return e.pageSizeRequested=this.pageSizeRequested,e.maxCachedPages=this.maxCachedPages,e.baseUri=this.baseUri,e.entitySet=this.entitySet,e.timeoutMilliseconds=this.timeoutMilliseconds,e.isAggregationSupportedByServer=this.isAggregationSupportedByServer,e.enableJsonp=this.enableJsonp,e},i}(t.VirtualDataSource),_=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(i,e),i.$t=t.markType(i,"ODataVirtualDataSourceProviderTaskDataHolder",t.AsyncVirtualDataSourceProviderTaskDataHolder.$type),i}(t.AsyncVirtualDataSourceProviderTaskDataHolder),v=function(){function e(e,r,i,o,n){if(this._actualData=null,this._schema=null,this._pageIndex=0,this._groupInformation=null,this._summaryInformation=null,null==e)this._actualData=null;else{var s=e.items.length;this._actualData=[];for(var a=new Set,u=0;u<r.propertyNames.length;u++)r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeValue&&r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeOffsetValue||a.add(r.propertyNames[u]);for(var p=void 0,l=function(t){for(var r=e.items[t],i=new Map,o=Array.from(Object.keys(r)),n=o.map((function(e){return r[e]})),s=0;s<o.length;s++)p=n[s],a.has(o[s])&&(p=new Date(p)),i.set(o[s],p);c._actualData[t]=i},c=this,h=0;h<s;h++)l(h)}this._schema=r,this._groupInformation=i,this._summaryInformation=o,this._pageIndex=n}return e.prototype.count=function(){return this._actualData.length},e.prototype.getItemAtIndex=function(e){return this._actualData[e]},e.prototype.getItemValueAtIndex=function(e,t){var r=this._actualData[e];return r.has(t)?r.get(t):null},e.prototype.pageIndex=function(){return this._pageIndex},e.prototype.schema=function(){return this._schema},e.prototype.getGroupInformation=function(){return this._groupInformation},e.prototype.getSummaryInformation=function(){return this._summaryInformation},e}(),b=function(e){function i(i){var o,n,s=e.call(this,i)||this;if(s._baseUri=null,s._entitySet=null,s._sortDescriptions=null,s._groupDescriptions=null,s._filterExpressions=null,s._summaryDescriptions=null,s._desiredPropeties=null,s._enableJsonp=!0,s._isAggregationSupported=!1,s._provideFullCount=null,s._provideOrderByParameter=null,s._provideFilterParameter=null,s._provideAggregationParameter=null,s._provideAggregatedCount=null,s._providePagingParameter=null,s._provideDesiredPropertiesParameter=null,s._provideUri=null,s._performFetch=null,s._fixedFullCount=-1,s._groupInformation=null,s._summaryInformation=null,s._filterString=null,s._selectedString=null,s.doWork=s.doWork.bind(s),s._baseUri=i.baseUri,s._entitySet=i.entitySet,s._sortDescriptions=i.sortDescriptions,s._groupDescriptions=i.groupDescriptions,null!=s._groupDescriptions&&s._groupDescriptions.size()>0){s._sortDescriptions=new t.SortDescriptionCollection;try{for(var a=r.__values(s.iter(i.sortDescriptions)),u=a.next();!u.done;u=a.next()){var p=u.value;s._sortDescriptions.add(p)}}catch(e){o={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}for(var l=0;l<s._groupDescriptions.size();l++)s._sortDescriptions.insert(l,s._groupDescriptions.get(l))}return s._filterExpressions=i.filterExpressions,s._desiredPropeties=i.propertiesRequested,s._summaryDescriptions=i.summaryDescriptions,s._fixedFullCount=i.fixedFullCount,s._summaryScope=i.summaryScope,s._enableJsonp=i.enableJsonp,s._provideFullCount=i.provideFullCount,s._performFetch=i.performFetch,s._provideAggregationParameter=i.provideAggregationParameter,s._provideFilterParameter=i.provideFilterParameter,s._provideOrderByParameter=i.provideOrderByParameter,s._provideUri=i.provideUri,s._providePagingParameter=i.providePagingParameter,s._provideDesiredPropertiesParameter=i.provideDesiredPropertiesParameter,s._provideItems=i.provideItems,s._provideAggregatedCount=i.provideAggregatedCount,s._provideItems||(s._provideItems=function(e){return e?e.items:null}),s._provideFullCount||(s._provideFullCount=function(e){return e.fullCount?e.fullCount:s._fixedFullCount>=0?s._fixedFullCount:0}),s._provideOrderByParameter||(s._provideOrderByParameter=function(e,t,r){e.push({name:"orderBy",value:encodeURIComponent(t)})}),s._providePagingParameter||(s._providePagingParameter=function(e,t,r){e.push({name:"skip",value:t}),e.push({name:"take",value:r})}),s._provideAggregationParameter||(s._provideAggregationParameter=function(e,t,r,i,o,n){e.push({name:"groupBy",value:r}),e.push({name:"aggregate",value:"count"})}),s._provideUri||(s._provideUri=function(e,t,r){var i=e;i+="/"+t,r.length>0&&(i+="?");for(var o="",n=0;n<r.length;n++)n>0&&(o+="&"),o+=r[n].name+"="+r[n].value;return i+o}),s._isAggregationSupported=i.isAggregationSupported,window.setTimeout(s.doWork,100),s}return r.__extends(i,e),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"desiredProperties",{get:function(){return this._desiredPropeties},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){e.prototype.initialize.call(this)},i.prototype.getTaskDataHolder=function(){return new _},i.prototype.getCompletedTaskData=function(t,r){e.prototype.getCompletedTaskData.call(this,t,r)},i.prototype.removeCompletedTaskData=function(t,r){e.prototype.removeCompletedTaskData.call(this,t,r)},i.prototype.getTasksData=function(t){e.prototype.getTasksData.call(this,t)},i.prototype.iter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterFilter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterSummaries=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.processCompletedTask=function(e,t,r,o){var n,s=this,a=null,u=-1,p=e.task;try{if(p.hasErrors)return void this.retryIndex(r,t);r==i.schemaRequestIndex?(a=p.result,u=this._provideFullCount(a)):a=p.result}catch(e){return void this.retryIndex(r,t)}if(this.actualCount=u>=0?u:this._provideFullCount(a),null!=(n=this.actualSchema))this.finishProcessingCompletedTask(p,r,n,a);else{var l=0;this.resolveSchema((function(e){s.actualSchema=e,!s._isAggregationSupported||0===s._groupDescriptions.size()&&0===s._summaryDescriptions.size()?s.finishProcessingCompletedTask(p,r,e,a):(s._groupDescriptions.size()>0&&(l++,s.resolveGroupInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))),s._summaryDescriptions.size()>0&&(l++,s.resolveSummaryInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))))}),(function(){s.retryIndex(r,t)}))}},i.prototype.finishProcessingCompletedTask=function(e,t,r,i){var o,n,s,a,u=this;this.actualSchema=r,o=this.executionContext,s=this._groupInformation,a=this._summaryInformation,n=this.pageLoaded;var p=null;if(null!=i?(p=new v(i,r,s,a,t),!this.isLastPage(t)&&p.count()>0&&!this.populatedActualPageSize&&(this.populatedActualPageSize=!0,this.actualPageSize=p.count())):p=new v(null,r,s,a,t),null!=this.pageLoaded)if(null!=this.executionContext){if(null==o||null==n)return void this.shutdown();o.execute((function(){return n(p,u.actualCount,u.actualPageSize)}))}else{if(null==n)return void this.shutdown();n(p,this.actualCount,this.actualPageSize)}},i.prototype.resolveGroupInformation=function(e,i){var o,n,s=this;if(null==this._groupInformation){var a,u="",p="",l="";if(null!=this._groupDescriptions&&0!=this._groupDescriptions.size())if(null!=this._provideAggregationParameter){if(a=this._filterString,this.updateFilterString(),null!=this._groupDescriptions){var c=!0;try{for(var h=r.__values(this.iter(this._groupDescriptions)),f=h.next();!f.done;f=h.next()){var d=f.value;c?c=!1:(u+=", ",p+=", "),p+=d.propertyName,d.direction===t.ListSortDirection.Descending?u+=d.propertyName+" desc":u+=d.propertyName+" asc"}}catch(e){o={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(o)throw o.error}}}if(this._summaryScope===t.DataSourceSummaryScope.Both||this._summaryScope===t.DataSourceSummaryScope.Groups){var m=this.getSummaryQueryParameters(!0);t.stringIsNullOrEmpty(m)||(l=", "+m)}var y=[];this._provideOrderByParameter&&this._provideOrderByParameter(y,u,this._groupDescriptions),this._provideFilterParameter&&null!=a&&this._provideFilterParameter(y,a,this._filterExpressions),this._provideAggregationParameter&&this._provideAggregationParameter(y,!0,p,this._groupDescriptions,l,this._summaryDescriptions);var g=this._provideUri(this._baseUri,this._entitySet,y);try{var _=[],v=function(t,r){return s.groupSuccess(t,r,e,i,_)},b=function(t){return s.groupError(t,e,i,_)},S={requestUri:g,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){s.fetchUri(S,v,b)})()}catch(e){i()}}else e(null);else e(null)}else e(this._groupInformation)},i.prototype.fetchUri=function(e,t,r){this._performFetch?this._performFetch(e,t,r):fetch(e.requestUri,{method:e.method,headers:e.headers}).then((function(e){e.json().then((function(r){t(r,e)}))})).catch((function(e){r(e)}))},i.prototype.groupError=function(e,t,r,i){this._groupInformation=null},i.prototype.groupSuccess=function(e,t,i,o,n){var s,a,u=[];try{for(var p=r.__values(this.iter(this._groupDescriptions)),l=p.next();!l.done;l=p.next()){var c=l.value;u.push(c.propertyName)}}catch(e){s={error:e}}finally{try{l&&!l.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}var h=this._provideItems(e);if(h&&h.length>0)for(var f=0;f<h.length;f++)this.addGroup(n,u,u,0,h[f]);this._groupInformation=n,i(this._groupInformation)},i.prototype.addGroup=function(e,i,o,n,s){var a,u,p=[];try{for(var l=r.__values(i),c=l.next();!c.done;c=l.next()){var h=c.value;s[h]&&p.push(s[h])}}catch(e){a={error:e}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}var f=0;if(this._provideAggregatedCount)this._provideAggregatedCount(s);else s.aggregatedCount&&(f=t.Convert.toInt321(s.aggregatedCount));var d=null;this._summaryScope!=t.DataSourceSummaryScope.Both&&this._summaryScope!=t.DataSourceSummaryScope.Groups||(d=this.createSummaryResults(s));var m=new t.DefaultSectionInformation(n,n+(f-1),o,p,d);e.push(m)},i.prototype.resolveSummaryInformation=function(e,r){var i=this;if(null==this._summaryInformation){var o,n;if(null!=this._summaryDescriptions&&0!=this._summaryDescriptions.size()&&this._summaryScope!=t.DataSourceSummaryScope.Groups&&this._summaryScope!=t.DataSourceSummaryScope.None){o=this._filterString,this.updateFilterString(),n=this.getSummaryQueryParameters(!1);var s=[];this._provideFilterParameter&&null!=o&&this._provideFilterParameter(s,o,this._filterExpressions),this._provideAggregationParameter&&this._provideAggregationParameter(s,!0,null,null,n,this._summaryDescriptions);var a=this._provideUri(this._baseUri,this._entitySet,s);try{var u=[],p=function(t,o){return i.summarySuccess(t,o,e,r,u)},l=function(t){return i.summaryError(t,e,r,u)},c={requestUri:a,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){i.fetchUri(c,p,l)})()}catch(e){r()}}else e(null)}else e(this._summaryInformation)},i.prototype.summarySuccess=function(e,t,r,i,o){e&&e.value&&e.value.length>0&&(o=this.createSummaryResults(e.value[0])),this._summaryInformation=o,r(this._summaryInformation)},i.prototype.summaryError=function(e,t,r,i){this._summaryInformation=null},i.prototype.getSummaryQueryParameters=function(e){var i,o,n="";if(null!=this._summaryDescriptions){var s=!0,a=!1;try{for(var u=r.__values(this.iterSummaries(this._summaryDescriptions)),p=u.next();!p.done;p=u.next()){var l=p.value;if(l.operand!=t.SummaryOperand.Count||!e&&!a){switch(s||(n+=", "),l.operand){case t.SummaryOperand.Average:n+=l.propertyName+" with average as "+l.propertyName+"Average";break;case t.SummaryOperand.Min:n+=l.propertyName+" with min as "+l.propertyName+"Min";break;case t.SummaryOperand.Max:n+=l.propertyName+" with max as "+l.propertyName+"Max";break;case t.SummaryOperand.Sum:n+=l.propertyName+" with sum as "+l.propertyName+"Sum";break;case t.SummaryOperand.Count:n+="$count as $__count",a=!0}s=!1}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return n},i.prototype.createSummaryResults=function(e){var i,o,n=[];try{for(var s=r.__values(this.iterSummaries(this._summaryDescriptions)),a=s.next();!a.done;a=s.next()){var u=a.value,p=u.propertyName;switch(u.operand){case t.SummaryOperand.Average:p+="Average";break;case t.SummaryOperand.Min:p+="Min";break;case t.SummaryOperand.Max:p+="Max";break;case t.SummaryOperand.Sum:p+="Sum";break;case t.SummaryOperand.Count:p="$__count"}var l=null;e&&e[p]&&(l=e[p]);var c=new t.DefaultSummaryResult(u.propertyName,u.operand,l);n.push(c)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},i.prototype.resolveSchemaFromItems=function(e){var r=new t.LocalDataSource;return r.dataSource=e,r.flushAutoRefresh(),r.actualSchema},i.prototype.resolveSchema=function(e,t){var r=this;if(this._provideItems&&this._providePagingParameter){var i=function(i){var o=r._provideItems(i);if(o&&o.length>0){var n=r.resolveSchemaFromItems(o);e(n)}else t("could not find items to resolve schema")},o=function(e){return t(e)},n=[];this._providePagingParameter&&this._providePagingParameter(n,0,this.actualPageSize);var s=this._provideUri(this._baseUri,this._entitySet,n);try{var a={requestUri:s,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){r.fetchUri(a,i,o)})()}catch(e){t(e)}}else t("required providers for items and paging are not specified")},i.prototype.makeTaskForRequest=function(e,o){var n,s,a,u=[];a=this.actualPageSize,this.sortDescriptions;if(this.updateFilterString(),null!=this._filterString&&this._provideFilterParameter&&this._provideFilterParameter(u,this._filterString,this._filterExpressions),null!=this.sortDescriptions){var p=null;try{for(var l=r.__values(this.iter(this.sortDescriptions)),c=l.next();!c.done;c=l.next()){var h=c.value;null==p?p="":p+=", ",h.direction==t.ListSortDirection.Descending?p+=h.propertyName+" desc":p+=h.propertyName}}catch(e){n={error:e}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(n)throw n.error}}null!=p&&this._provideOrderByParameter&&this._provideOrderByParameter(u,p,this._sortDescriptions)}if(null!=this.desiredProperties&&this.desiredProperties.length>0){for(var f="",d=!0,m=this.desiredProperties,y=0;y<m.length;y++){d?d=!1:f+=", ",f+=m[y]}this._provideDesiredPropertiesParameter&&this._provideDesiredPropertiesParameter(u,f,this._desiredPropeties)}this._providePagingParameter&&(e.index==i.schemaRequestIndex?this._providePagingParameter(u,0,a):this._providePagingParameter(u,e.index*a,a));var g=new t.AsyncVirtualDataTask,_=this._provideUri(this._baseUri,this._entitySet,u);e.index==i.schemaRequestIndex?this.executeRequest(_,!1,0,a,g):this.executeRequest(_,!1,e.index*a,a,g),e.taskHolder=new t.AsyncDataSourcePageTaskHolder,e.taskHolder.task=g,this.tasks.add(e)},i.prototype.updateFilterString=function(){var e,i;if(null!=this.filterExpressions&&this.filterExpressions.size()>0&&null==this._filterString){var o="",n=!0;try{for(var s=r.__values(this.iterFilter(this.filterExpressions)),a=s.next();!a.done;a=s.next()){var u=a.value;n?n=!1:o+=" AND ";var p=new t.ODataDataSourceFilterExpressionVisitor(0);p.visit(u);var l=p.toString();this.filterExpressions.size()>1&&(l="("+l+")"),o+=l}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}this._filterString=o}},i.prototype.executeRequest=function(e,t,r,i,o){var n,s=this,a=function(e,t){return s.success(o,e,t)},u=function(e){return s.error(o,e)},p={requestUri:e,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};n=function(){s.fetchUri(p,a,u)},o.run=n},i.prototype.success=function(e,t,r){e.result=t,e.isCompleted=!0},i.prototype.error=function(e,t){e.isCompleted=!0,e.hasErrors=!0},i.prototype.createBatchRequest=function(e){},i.prototype.getRequestUriWithKey=function(e){for(var t="",r=Object.keys(e),i=0;i<r.length;i++)i>0&&(t+=","),t+=r[i]+"="+e[r[i]];return this._entitySet+"("+t+")"},i.schemaRequestIndex=-1,i}(t.AsyncVirtualDataSourceProviderWorker),S=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._baseUri=null,t._entitySet=null,t._sortDescriptions=null,t._filterExpressions=null,t._propertiesRequested=null,t._groupDescriptions=null,t._summaryDescriptions=null,t._fixedFullCount=-1,t._provideFullCount=null,t._provideOrderByParameter=null,t._provideFilterParameter=null,t._provideAggregationParameter=null,t._provideAggregatedCount=null,t._provideUri=null,t._providePagingParameter=null,t._provideDesiredPropertiesParameter=null,t._performFetch=null,t}return r.__extends(i,e),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){this._baseUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){this._entitySet=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},set:function(e){this._sortDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},set:function(e){this._filterExpressions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},set:function(e){this._groupDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},set:function(e){this._summaryDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryscope},set:function(e){this._summaryscope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"RestVirtualDataSourceDataProviderWorkerSettings",t.AsyncVirtualDataSourceDataProviderWorkerSettings.$type),i}(t.AsyncVirtualDataSourceDataProviderWorkerSettings),P=function(e){function i(){var r=e.call(this)||this;return r._worker=null,r._requests=new s,r._callback=null,r._pageLoaded=null,r._pageSizeRequested=50,r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r.schemaChanged=null,r._currentFullCount=0,r._currentSchema=null,r._executionContext=null,r._updateNotifier=null,r._deferAutoRefresh=!1,r._sortDescriptions=null,r._groupDescriptions=null,r._propertiesRequested=null,r._filterExpressions=null,r._summaryDescriptions=null,r._enableJsonp=!0,r._fixedFullCount=-1,r._provideFullCount=null,r._provideOrderByParameter=null,r._provideFilterParameter=null,r._provideAggregationParameter=null,r._provideAggregatedCount=null,r._provideUri=null,r._performFetch=null,r._providePagingParameter=null,r._provideDesiredPropertiesParameter=null,r._schemaFetchQueued=!1,r._autoRefreshQueued=!1,r._sortDescriptions=new t.SortDescriptionCollection,r._sortDescriptions.onChanged=function(){return r.sortDescriptions_CollectionChanged(null,null)},r._groupDescriptions=new t.SortDescriptionCollection,r._groupDescriptions.onChanged=function(){return r.groupDescriptions_CollectionChanged(null,null)},r._filterExpressions=new t.FilterExpressionCollection,r._filterExpressions.onChanged=function(){return r.filterExpressions_CollectionChanged(null,null)},r._summaryDescriptions=new t.SummaryDescriptionCollection,r._summaryDescriptions.onChanged=function(){return r.summaryDescriptions_CollectionChanged(null,null)},r}return r.__extends(i,e),i.prototype.filterExpressions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.sortDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.groupDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.summaryDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.addPageRequest=function(e,r){this.deferAutoRefresh||(null!=this._worker&&this._worker.isShutdown&&(this._worker=null,this._callback=null),null==this._worker&&this.createWorker(),r==t.DataSourcePageRequestPriority.High?this._requests.addFirst(e):this._requests.addLast(e),this._worker.addPageRequest(e,r)||(this._worker=null,this._callback=null,this.addPageRequest(e,r)))},i.prototype.createWorker=function(){if(this.valid()){this._callback=t.runOn(this,this.raisePageLoaded);var e=this.getWorkerSettings();this._worker=new b(e)}},i.prototype.valid=function(){return null!=this.entitySet&&null!=this.baseUri},i.prototype.getWorkerSettings=function(){var e,t=this;return(e=new S).baseUri=t._baseUri,e.entitySet=t._entitySet,e.pageSizeRequested=t._pageSizeRequested,e.timeoutMilliseconds=t._timeoutMilliseconds,e.pageLoaded=t._callback,e.executionContext=t._executionContext,e.sortDescriptions=t._sortDescriptions,e.groupDescriptions=t._groupDescriptions,e.filterExpressions=t._filterExpressions,e.propertiesRequested=t._propertiesRequested,e.summaryDescriptions=t._summaryDescriptions,e.summaryScope=t._summaryScope,e.enableJsonp=t._enableJsonp,e.isAggregationSupported=t.isAggregationSupported,e.performFetch=t.performFetch,e.provideAggregationParameter=t.provideAggregationParameter,e.provideAggregatedCount=t.provideAggregatedCount,e.provideDesiredPropertiesParameter=t.provideDesiredPropertiesParameter,e.provideFilterParameter=t.provideFilterParameter,e.provideFullCount=t.provideFullCount,e.provideItems=t.provideItems,e.provideOrderByParameter=t.provideOrderByParameter,e.providePagingParameter=t.providePagingParameter,e.provideUri=t.provideUri,e.fixedFullCount=t.fixedFullCount,e},i.prototype.removePageRequest=function(e){for(var t=this._requests.first;null!=t;)t.value==e&&this._requests.remove(t),t=t.next;null!=this._worker&&this._worker.removePageRequest(e)},i.prototype.removeAllPageRequests=function(){this._requests.clear(),null!=this._worker&&this._worker.removeAllPageRequests()},i.prototype.close=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageLoaded",{get:function(){return this._pageLoaded},set:function(e){this._pageLoaded=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.raisePageLoaded=function(e,r,i){if(null!=this._pageLoaded){if(this._currentFullCount=r,null==this._currentSchema){var o=null;null!=e&&(o=e.schema()),this._currentSchema=o,null!=this.schemaChanged&&this.schemaChanged(this,new t.DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema,this._currentFullCount))}e.pageIndex()!=b.schemaRequestIndex&&this._pageLoaded(e,r,i)}},i.prototype.killWorker=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageSizeRequested",{get:function(){return this._pageSizeRequested},set:function(e){this._pageSizeRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,t!=this._entitySet&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){this._timeoutMilliseconds=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.getItemValue=function(e,t){var r=e;return r.has(t)?r.get(t):null},Object.defineProperty(i.prototype,"actualCount",{get:function(){return this._currentFullCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"actualSchema",{get:function(){return this._currentSchema},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"executionContext",{get:function(){return this._executionContext},set:function(e){this._executionContext=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"updateNotifier",{get:function(){return this._updateNotifier},set:function(e){this._updateNotifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deferAutoRefresh",{get:function(){return this._deferAutoRefresh},set:function(e){this._deferAutoRefresh=e,this._deferAutoRefresh||this.queueAutoRefresh(),this._deferAutoRefresh&&this.valid()&&null==this._currentSchema&&this.queueSchemaFetch()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupported",{get:function(){return this.isAggregationSupported},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryScope},set:function(e){this._summaryScope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"notifyUsingSourceIndexes",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isItemIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isKeyIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.notifySetItem=function(e,t,r){null!=this.updateNotifier&&this.updateNotifier.notifySetItem(e,t,r)},i.prototype.notifyClearItems=function(){null!=this.updateNotifier&&this.updateNotifier.notifyClearItems()},i.prototype.notifyInsertItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyInsertItem(e,t)},i.prototype.notifyRemoveItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyRemoveItem(e,t)},i.prototype.queueSchemaFetch=function(){this._schemaFetchQueued||null!=this.executionContext&&(this._schemaFetchQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doSchemaFetchInternal)))},i.prototype.doSchemaFetchInternal=function(){this._schemaFetchQueued&&(this._schemaFetchQueued=!1,this.schemaFetchInternal())},i.prototype.schemaFetchInternal=function(){this.schemaFetchInternalOverride()},i.prototype.schemaFetchInternalOverride=function(){this.deferAutoRefresh&&(this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this.addSchemaRequest())},i.prototype.addSchemaRequest=function(){this._worker.addPageRequest(b.schemaRequestIndex,t.DataSourcePageRequestPriority.High)},i.prototype.queueAutoRefresh=function(){this.deferAutoRefresh||this._autoRefreshQueued||null!=this.executionContext&&(this._autoRefreshQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doRefreshInternal)))},i.prototype.doRefreshInternal=function(){this.deferAutoRefresh?this._autoRefreshQueued=!1:this._autoRefreshQueued&&(this._autoRefreshQueued=!1,this.refreshInternal())},i.prototype.refreshInternal=function(){this.refreshInternalOverride()},i.prototype.refreshInternalOverride=function(){this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this._worker.addPageRequest(0,t.DataSourcePageRequestPriority.Normal)},i.prototype.flushAutoRefresh=function(){this.doRefreshInternal()},i.prototype.refresh=function(){this.refreshInternal()},i.prototype.indexOfItem=function(e){return-1},i.prototype.indexOfKey=function(e){return-1},i.prototype.resolveSchemaPropertyType=function(e){if(null==this.actualSchema)return t.DataSourceSchemaPropertyType.ObjectValue;if(t.stringContains(e,"."))return t.DataSourceSchemaPropertyType.ObjectValue;for(var r=0;r<this.actualSchema.propertyNames.length;r++){if(this.actualSchema.propertyNames[r]==e)return this.actualSchema.propertyTypes[r]}return t.DataSourceSchemaPropertyType.ObjectValue},i.prototype.setItemValue=function(e,t,r){},i.prototype.removeItem=function(e){},i.prototype.addItem=function(e){},i.prototype.createBatchRequest=function(e){null!=this._worker&&this._worker.createBatchRequest(e)},Object.defineProperty(i.prototype,"batchCompleted",{get:function(){return this._batchCompleted},set:function(e){this._batchCompleted=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProvider",t.Base.$type,[t.IDataSourceVirtualDataProvider_$type]),i}(t.Base),D=function(e){function t(){var t,r=e.call(this)||this;return r._baseUri=null,r._isFilteringSupportedByServer=!1,r._entitySet=null,r._timeoutMilliseconds=1e4,r._isAggregationSupportedByServer=!1,r._enableJsonp=!0,r._fixedFullCount=-1,r._provideFullCount=null,r._provideOrderByParameter=null,r._provideFilterParameter=null,r._provideAggregationParameter=null,r._provideAggregatedCount=null,r._provideUri=null,r._performFetch=null,r._providePagingParameter=null,r._provideDesiredPropertiesParameter=null,r.dataProvider=((t=new P).executionContext=r.executionContext,t.enableJsonp=r.enableJsonp,t.isAggregationSupported=r.isGroupingSupported,t),r.externalDataSource=r,r}return r.__extends(t,e),t.prototype.onBaseUriChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.baseUri=this.baseUri,this.queueAutoRefresh())},Object.defineProperty(t.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&this.onBaseUriChanged(t,this._baseUri)},enumerable:!0,configurable:!0}),t.prototype.onEntitySetChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.entitySet=this.entitySet,this.queueAutoRefresh()),this.queueAutoRefresh()},Object.defineProperty(t.prototype,"isFilteringSupportedByServer",{get:function(){return this._isFilteringSupportedByServer},set:function(e){this._isFilteringSupportedByServer=e},enumerable:!0,configurable:!0}),t.prototype.get_isFilteringSupported=function(){return!!this._isFilteringSupportedByServer},Object.defineProperty(t.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,this._entitySet!=t&&this.onEntitySetChanged(t,this._entitySet)},enumerable:!0,configurable:!0}),t.prototype.onTimeoutMillisecondsChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.timeoutMilliseconds=this.timeoutMilliseconds)},Object.defineProperty(t.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){var t=this._timeoutMilliseconds;this._timeoutMilliseconds=e,t!=this._timeoutMilliseconds&&this.onTimeoutMillisecondsChanged(t,this._timeoutMilliseconds)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSortingSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFilteringSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isGroupingSupportedOverride",{get:function(){return this.isAggregationSupportedByServer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAggregationSupportedByServer",{get:function(){return this._isAggregationSupportedByServer},set:function(e){this._isAggregationSupportedByServer=e,this.actualDataProvider&&(this.actualDataProvider.isAggregationSupported=this.isAggregationSupportedByServer)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e,this.actualDataProvider&&(this.actualDataProvider.enableJsonp=this.enableJsonp)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e,this.actualDataProvider&&(this.actualDataProvider.provideFullCount=this.provideFullCount,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideOrderByParameter=this.provideOrderByParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideFilterParameter=this.provideFilterParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideAggregationParameter=this.provideAggregationParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e,this.actualDataProvider&&(this.actualDataProvider.provideAggregatedCount=this.provideAggregatedCount,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e,this.actualDataProvider&&(this.actualDataProvider.provideUri=this.provideUri,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e,this.actualDataProvider&&(this.actualDataProvider.performFetch=this.performFetch,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e,this.actualDataProvider&&(this.actualDataProvider.providePagingParameter=this.providePagingParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideDesiredPropertiesParameter=this.provideDesiredPropertiesParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e,this.actualDataProvider&&(this.actualDataProvider.provideItems=this.provideItems,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t;e.executionContext=this.executionContext,e.includeSummaryRowsInSection=this.includeSummaryRowsInSection,e.isSectionCollapsable=this.isSectionCollapsable,e.isSectionExpandedDefault=this.isSectionExpandedDefault,e.isSectionSummaryRowsAtBottom=this.isSectionSummaryRowsAtBottom,e.primaryKey=this.primaryKey,e.propertiesRequested=this.propertiesRequested,e.sectionHeaderDisplayMode=this.sectionHeaderDisplayMode,e.shouldEmitSectionFooters=this.shouldEmitSectionFooters,e.shouldEmitSectionHeaders=this.shouldEmitSectionHeaders,e.shouldEmitShiftedRows=this.shouldEmitShiftedRows,e.summaryScope=this.summaryScope;for(var r=0;r<this.groupDescriptions.size();r++)e.groupDescriptions.add(this.groupDescriptions.get(r));for(r=0;r<this.sortDescriptions.size();r++)e.sortDescriptions.add(this.sortDescriptions.get(r));for(r=0;r<this.filterExpressions.size();r++)e.filterExpressions.add(this.filterExpressions.get(r));for(r=0;r<this.summaryDescriptions.size();r++)e.summaryDescriptions.add(this.summaryDescriptions.get(r));return e.pageSizeRequested=this.pageSizeRequested,e.maxCachedPages=this.maxCachedPages,e.baseUri=this.baseUri,e.entitySet=this.entitySet,e.timeoutMilliseconds=this.timeoutMilliseconds,e.isAggregationSupportedByServer=this.isAggregationSupportedByServer,e.enableJsonp=this.enableJsonp,e.fixedFullCount=this.fixedFullCount,e.provideAggregationParameter=this.provideAggregationParameter,e.provideAggregatedCount=this.provideAggregatedCount,e.provideFilterParameter=this.provideFilterParameter,e.provideFullCount=this.provideFullCount,e.provideOrderByParameter=this.provideOrderByParameter,e.provideUri=this.provideUri,e.performFetch=this.performFetch,e.providePagingParameter=this.providePagingParameter,e.provideItems=this.provideItems,e.provideDesiredPropertiesParameter=this.provideDesiredPropertiesParameter,e},t}(t.VirtualDataSource);e.Entity=u,e.EntityProperty=i,e.EntitySet=p,e.LinkedList=s,e.LinkedListNode=a,e.ODataDataSourcePage=l,e.ODataSchemaProvider=h,e.ODataVirtualDataSource=g,e.ODataVirtualDataSourceDataProvider=y,e.ODataVirtualDataSourceDataProviderWorker=d,e.ODataVirtualDataSourceDataProviderWorkerSettings=m,e.ODataVirtualDataSourceProviderTaskDataHolder=f,e.RestVirtualDataSource=D,e.RestVirtualDataSourceDataProvider=P,e.RestVirtualDataSourceDataProviderWorker=b,e.RestVirtualDataSourceDataProviderWorkerSettings=S,e.RestVirtualDataSourcePage=v,e.RestVirtualDataSourceProviderTaskDataHolder=_,e.Schema=c,e.first=n,e.toArray=o,Object.defineProperty(e,"__esModule",{value:!0})}));
7
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("igniteui-webcomponents-core"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","igniteui-webcomponents-core","tslib"],t):t((e=e||self)["igniteui-webcomponents-datasources"]={},e.igniteuiWebcomponentsCore,e.tslib_1)}(this,(function(e,t,r){"use strict";var i=function(){function e(e,t){this._name=null,this._isNullable=!1,this._type=null,this.name=e,this.type=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isNullable",{get:function(){return this._isNullable},set:function(e){this._isNullable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e},enumerable:!0,configurable:!0}),e}();function o(e){return Array.from(t.fromEnum(e))}function n(e){var t,i;try{for(var o=r.__values(e),n=o.next();!n.done;n=o.next()){return n.value}}catch(e){t={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}throw new Error("Iterable contained no elements, expected at least one")}var s=function(){function e(){}return Object.defineProperty(e.prototype,"first",{get:function(){return this._first},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return this._last},enumerable:!0,configurable:!0}),e.prototype.addFirst=function(e){if(null==this._first)this._first=new a(e),this._last=this._first;else{var t=this._first;this._first=new a(e),this._first.next=t,t.prev=this._first}},e.prototype.addLast=function(e){if(null==this._last)this._first=new a(e),this._last=this._first;else{var t=this._last;this._last=new a(e),this._last.prev=t,t.next=this._last}},e.prototype.removeFirst=function(){this.remove(this.first)},e.prototype.clear=function(){this._first=null,this._last=null},e.prototype.contains=function(e){for(var t=this.first;null!=t;){if(t.value===e)return!0;t=t.next}return!1},e.prototype.removeValue=function(e){for(var t=this.first;null!=t;){if(t.value===e)return void this.remove(t);t=t.next}},e.prototype.remove=function(e){this._first==e&&(this._first=e.next,null!=e.next&&(e.next.prev=null)),this._last==e&&(this._last=e.prev,null!=e.prev&&(e.prev.next=null)),null!=e.prev&&(e.prev.next=e.next),null!=e.next&&(e.next.prev=e.prev),e.next=null,e.prev=null},e}(),a=function(){function e(e){void 0!==e&&(this.value=e)}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"prev",{get:function(){return this._prev},set:function(e){this._prev=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"next",{get:function(){return this._next},set:function(e){this._next=e},enumerable:!0,configurable:!0}),e}(),u=function(){function e(e,t){this._properties=null,this._primaryKey=null,this._name=null,this.name=e,this.loadProperties(t),this.loadPrimaryKey(t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return null==this._properties&&(this._properties=new Map),this._properties},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"primaryKey",{get:function(){return null==this._primaryKey&&(this._primaryKey=[]),this._primaryKey},enumerable:!0,configurable:!0}),e.prototype.loadProperties=function(e){for(var r=o(e.elements()),n=r.length,s=t.XName.get("Name",""),a=t.XName.get("Type",""),u=0;u<n;u++){var p=r[u];if("Property"==p.name.localName){var l=p.attribute(s).value,c=p.attribute(a).value;this.properties.set(l,new i(l,c))}}},e.prototype.loadPrimaryKey=function(e){for(var r=o(e.elements()),i=r.length,n=t.XName.get("Name",""),s=0;s<i;s++){var a=r[s];if("Key"==a.name.localName)for(var u=o(a.elements()),p=u.length,l=0;l<p;l++){var c=u[l];"PropertyRef"==c.name.localName&&this.primaryKey.push(c.attribute(n).value)}}},e}(),p=function(){function e(e,t){if(this._entityName=null,this._entityNamespace=null,this._entityType=null,this._name=null,this.name=e,this.entityType=t,t.indexOf(".")>=0){var r=t.split(".");if(2==r.length)this.entityNamespace=r[0],this.entityName=r[1];else{var i=t.lastIndexOf(".");this.entityNamespace=t.substr(0,i),this.entityName=t.substr(i+1)}}else this.entityNamespace=t,this.entityName=t}return Object.defineProperty(e.prototype,"entityName",{get:function(){return this._entityName},set:function(e){this._entityName=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entityNamespace",{get:function(){return this._entityNamespace},set:function(e){this._entityNamespace=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entityType",{get:function(){return this._entityType},set:function(e){this._entityType=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),e}(),l=function(){function e(e,r,i,o,n){if(this._actualData=null,this._schema=null,this._pageIndex=0,this._groupInformation=null,this._summaryInformation=null,null==e)this._actualData=null;else{var s=e.value.length;this._actualData=[];for(var a=new Set,u=0;u<r.propertyNames.length;u++)r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeValue&&r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeOffsetValue||a.add(r.propertyNames[u]);for(var p=void 0,l=function(t){for(var r=e.value[t],i=new Map,o=Array.from(Object.keys(r)),n=o.map((function(e){return r[e]})),s=0;s<o.length;s++)p=n[s],a.has(o[s])&&(p=new Date(p)),i.set(o[s],p);c._actualData[t]=i},c=this,h=0;h<s;h++)l(h)}this._schema=r,this._groupInformation=i,this._summaryInformation=o,this._pageIndex=n}return e.prototype.count=function(){return this._actualData.length},e.prototype.getItemAtIndex=function(e){return this._actualData[e]},e.prototype.getItemValueAtIndex=function(e,t){var r=this._actualData[e];return r.has(t)?r.get(t):null},e.prototype.pageIndex=function(){return this._pageIndex},e.prototype.schema=function(){return this._schema},e.prototype.getGroupInformation=function(){return this._groupInformation},e.prototype.getSummaryInformation=function(){return this._summaryInformation},e}(),c=function(){function e(e,t,r){this._entities=null,this._entitySets=null,this._namespace=null,this.namespace=e,this.loadEntities(t),this.loadEntitySets(r)}return Object.defineProperty(e.prototype,"entities",{get:function(){return null==this._entities&&(this._entities=new Map),this._entities},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"entitySets",{get:function(){return null==this._entitySets&&(this._entitySets=new Map),this._entitySets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"namespace",{get:function(){return this._namespace},set:function(e){this._namespace=e},enumerable:!0,configurable:!0}),e.prototype.loadEntities=function(e){for(var r=e,i=r.length,o=t.XName.get("Name",""),n=0;n<i;n++){var s=r[n],a=new u(s.attribute(o).value,s);this.entities.set(a.name,a)}},e.prototype.loadEntitySets=function(e){for(var r=e,i=r.length,o=t.XName.get("Name",""),n=t.XName.get("EntityType",""),s=0;s<i;s++){var a=r[s],u=new p(a.attribute(o).value,a.attribute(n).value);this.entitySets.set(u.name,u)}},e}(),h=function(){function e(r){if(this._entityTypeSchemaNamespace=null,this._entitySetSchemaNamespace=null,this._schema=null,null!=r){var i=t.XDocument.parse(r),s=o(n(t.fromEnum(n(t.fromEnum(i.elements())).elements())).elements1(t.XName.get("Schema",e.nS.namespaceName)));if(null!=s){for(var a=null,u=null,p=s.length,l=t.XName.get("EntityContainer",e.nS.namespaceName),h=t.XName.get("EntitySet",e.nS.namespaceName),f=t.XName.get("Namespace",""),d=t.XName.get("EntityType",e.nS.namespaceName),m=0;m<p;m++){if(s[m].nodeType==t.XmlNodeType.Element){var y=s[m];if(null==a){var g=o(y.elements1(l));null!=g&&g.length>0&&null!=(a=o(t.typeCast(t.XElement.$type,g[0]).elements1(h)))&&(this._entitySetSchemaNamespace=y.attribute(f).value)}null==u&&null!=(u=o(y.elements1(d)))&&(this._entityTypeSchemaNamespace=y.attribute(f).value)}}null!=a&&null!=u&&(this.schema=new c(this._entityTypeSchemaNamespace,u,a))}}}return Object.defineProperty(e.prototype,"schema",{get:function(){return this._schema},set:function(e){this._schema=e},enumerable:!0,configurable:!0}),e.prototype.getODataDataSourceSchema=function(e){var i,o,n,s;if(null==this.schema)return null;var a=[],u=[],p=[],l=this.schema.entitySets.get(e);if(null!=l){var c=this.schema.entities.get(l.entityName);if(null!=c){try{for(var h=r.__values(c.properties.values()),f=h.next();!f.done;f=h.next()){var d=f.value;a.push(d.name),"Edm.String"==d.type?u.push(t.DataSourceSchemaPropertyType.StringValue):"Edm.Int16"==d.type||"Edm.Int32"==d.type?u.push(t.DataSourceSchemaPropertyType.IntValue):"Edm.Double"==d.type?u.push(t.DataSourceSchemaPropertyType.DoubleValue):"Edm.Single"==d.type?u.push(t.DataSourceSchemaPropertyType.SingleValue):"Edm.Boolean"==d.type?u.push(t.DataSourceSchemaPropertyType.BooleanValue):"Edm.Byte"==d.type?u.push(t.DataSourceSchemaPropertyType.ShortValue):"Edm.DateTime"==d.type||"Edm.DateTimeOffset"==d.type?u.push(t.DataSourceSchemaPropertyType.DateTimeValue):"Edm.Int64"==d.type?u.push(t.DataSourceSchemaPropertyType.LongValue):"Edm.Decimal"==d.type?u.push(t.DataSourceSchemaPropertyType.DecimalValue):"Edm.SByte"==d.type?u.push(t.DataSourceSchemaPropertyType.ShortValue):u.push(t.DataSourceSchemaPropertyType.ObjectValue)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}try{for(var m=r.__values(c.primaryKey),y=m.next();!y.done;y=m.next()){var g=y.value;p.push(g)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(n)throw n.error}}}}return new t.ODataDataSourceSchema(a,u,p)},e.nS=t.XNamespace.get("http://docs.oasis-open.org/odata/ns/edm"),e}(),f=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(i,e),i.$t=t.markType(i,"ODataVirtualDataSourceProviderTaskDataHolder",t.AsyncVirtualDataSourceProviderTaskDataHolder.$type),i}(t.AsyncVirtualDataSourceProviderTaskDataHolder),d=function(e){function i(i){var o,n,s=e.call(this,i)||this;if(s._baseUri=null,s._entitySet=null,s._sortDescriptions=null,s._groupDescriptions=null,s._filterExpressions=null,s._summaryDescriptions=null,s._desiredPropeties=null,s._enableJsonp=!0,s._isAggregationSupported=!1,s._groupInformation=null,s._summaryInformation=null,s._filterString=null,s._selectedString=null,s.doWork=s.doWork.bind(s),s._baseUri=i.baseUri,s._entitySet=i.entitySet,s._sortDescriptions=i.sortDescriptions,s._groupDescriptions=i.groupDescriptions,null!=s._groupDescriptions&&s._groupDescriptions.size()>0){s._sortDescriptions=new t.SortDescriptionCollection;try{for(var a=r.__values(s.iter(i.sortDescriptions)),u=a.next();!u.done;u=a.next()){var p=u.value;s._sortDescriptions.add(p)}}catch(e){o={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}for(var l=0;l<s._groupDescriptions.size();l++)s._sortDescriptions.insert(l,s._groupDescriptions.get(l))}return s._filterExpressions=i.filterExpressions,s._desiredPropeties=i.propertiesRequested,s._summaryDescriptions=i.summaryDescriptions,s._summaryScope=i.summaryScope,s._enableJsonp=i.enableJsonp,s._isAggregationSupported=i.isAggregationSupported,window.setTimeout(s.doWork,100),s}return r.__extends(i,e),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"desiredProperties",{get:function(){return this._desiredPropeties},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){e.prototype.initialize.call(this)},i.prototype.getTaskDataHolder=function(){return new f},i.prototype.getCompletedTaskData=function(t,r){e.prototype.getCompletedTaskData.call(this,t,r)},i.prototype.removeCompletedTaskData=function(t,r){e.prototype.removeCompletedTaskData.call(this,t,r)},i.prototype.getTasksData=function(t){e.prototype.getTasksData.call(this,t)},i.prototype.iter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterFilter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterSummaries=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.processCompletedTask=function(e,t,r,o){var n,s=this,a=null,u=-1,p=e.task;try{if(p.hasErrors)return void this.retryIndex(r,t);r==i.schemaRequestIndex?u=(a=p.result)["@odata.count"]:a=p.result}catch(e){return void this.retryIndex(r,t)}if(this.actualCount=u>=0?u:a["@odata.count"],null!=(n=this.actualSchema))this.finishProcessingCompletedTask(p,r,n,a);else{var l=0;this.resolveSchema((function(e){s.actualSchema=e,!s._isAggregationSupported||0===s._groupDescriptions.size()&&0===s._summaryDescriptions.size()?s.finishProcessingCompletedTask(p,r,e,a):(s._groupDescriptions.size()>0&&(l++,s.resolveGroupInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))),s._summaryDescriptions.size()>0&&(l++,s.resolveSummaryInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))))}),(function(){s.retryIndex(r,t)}))}},i.prototype.finishProcessingCompletedTask=function(e,t,r,i){var o,n,s,a,u=this;this.actualSchema=r,o=this.executionContext,s=this._groupInformation,a=this._summaryInformation,n=this.pageLoaded;var p=null;if(null!=i?(p=new l(i,r,s,a,t),!this.isLastPage(t)&&p.count()>0&&!this.populatedActualPageSize&&(this.populatedActualPageSize=!0,this.actualPageSize=p.count())):p=new l(null,r,s,a,t),null!=this.pageLoaded)if(null!=this.executionContext){if(null==o||null==n)return void this.shutdown();o.execute((function(){return n(p,u.actualCount,u.actualPageSize)}))}else{if(null==n)return void this.shutdown();n(p,this.actualCount,this.actualPageSize)}},i.prototype.resolveGroupInformation=function(e,i){var o,n,s=this;if(null==this._groupInformation){var a,u="",p="",l="";if(null!=this._groupDescriptions&&0!=this._groupDescriptions.size()){if(a=this._filterString,this.updateFilterString(),null!=this._groupDescriptions){var c=!0;try{for(var h=r.__values(this.iter(this._groupDescriptions)),f=h.next();!f.done;f=h.next()){var d=f.value;c?c=!1:(u+=", ",p+=", "),p+=d.propertyName,d.direction===t.ListSortDirection.Descending?u+=d.propertyName+" desc":u+=d.propertyName+" asc"}}catch(e){o={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(o)throw o.error}}}if(this._summaryScope===t.DataSourceSummaryScope.Both||this._summaryScope===t.DataSourceSummaryScope.Groups){var m=this.getSummaryQueryParameters(!0);t.stringIsNullOrEmpty(m)||(l=", "+m)}var y=this._entitySet+"?$orderby="+u+"&$apply=";t.stringIsNullOrEmpty(a)||(y+="filter("+a+")/"),y+="groupby(("+p+"), aggregate($count as $__count"+l+"))";try{var g=[],_=function(t,r){return s.groupSuccess(t,r,e,i,g)},v=function(t){return s.groupError(t,e,i,g)},b={requestUri:this._baseUri+"/"+y,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){odatajs.oData.request(b,_,v)})()}catch(e){i()}}else e(null)}else e(this._groupInformation)},i.prototype.groupError=function(e,t,r,i){this._groupInformation=null},i.prototype.groupSuccess=function(e,t,i,o,n){var s,a,u=[];try{for(var p=r.__values(this.iter(this._groupDescriptions)),l=p.next();!l.done;l=p.next()){var c=l.value;u.push(c.propertyName)}}catch(e){s={error:e}}finally{try{l&&!l.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}if(e&&e.value&&e.value.length>0)for(var h=0;h<e.value.length;h++)this.addGroup(n,u,u,0,e.value[h]);this._groupInformation=n,i(this._groupInformation)},i.prototype.addGroup=function(e,i,o,n,s){var a,u,p=[];try{for(var l=r.__values(i),c=l.next();!c.done;c=l.next()){var h=c.value;s[h]&&p.push(s[h])}}catch(e){a={error:e}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}var f=0;s.$__count&&(f=t.Convert.toInt321(s.$__count));var d=null;this._summaryScope!=t.DataSourceSummaryScope.Both&&this._summaryScope!=t.DataSourceSummaryScope.Groups||(d=this.createSummaryResults(s));var m=new t.DefaultSectionInformation(n,n+(f-1),o,p,d);e.push(m)},i.prototype.resolveSummaryInformation=function(e,r){var i=this;if(null==this._summaryInformation){var o,n;if(null!=this._summaryDescriptions&&0!=this._summaryDescriptions.size()&&this._summaryScope!=t.DataSourceSummaryScope.Groups&&this._summaryScope!=t.DataSourceSummaryScope.None){o=this._filterString,this.updateFilterString(),n=this.getSummaryQueryParameters(!1);var s=this._entitySet+"?$apply=";t.stringIsNullOrEmpty(o)||(s+="filter("+o+")/"),s+="aggregate("+n+")";try{var a=[],u=function(t,o){return i.summarySuccess(t,o,e,r,a)},p=function(t){return i.summaryError(t,e,r,a)},l={requestUri:this._baseUri+"/"+s,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){odatajs.oData.request(l,u,p)})()}catch(e){r()}}else e(null)}else e(this._summaryInformation)},i.prototype.summarySuccess=function(e,t,r,i,o){e&&e.value&&e.value.length>0&&(o=this.createSummaryResults(e.value[0])),this._summaryInformation=o,r(this._summaryInformation)},i.prototype.summaryError=function(e,t,r,i){this._summaryInformation=null},i.prototype.getSummaryQueryParameters=function(e){var i,o,n="";if(null!=this._summaryDescriptions){var s=!0,a=!1;try{for(var u=r.__values(this.iterSummaries(this._summaryDescriptions)),p=u.next();!p.done;p=u.next()){var l=p.value;if(l.operand!=t.DataSourceSummaryOperand.Count||!e&&!a){switch(s||(n+=", "),l.operand){case t.DataSourceSummaryOperand.Average:n+=l.propertyName+" with average as "+l.propertyName+"Average";break;case t.DataSourceSummaryOperand.Min:n+=l.propertyName+" with min as "+l.propertyName+"Min";break;case t.DataSourceSummaryOperand.Max:n+=l.propertyName+" with max as "+l.propertyName+"Max";break;case t.DataSourceSummaryOperand.Sum:n+=l.propertyName+" with sum as "+l.propertyName+"Sum";break;case t.DataSourceSummaryOperand.Count:n+="$count as $__count",a=!0}s=!1}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return n},i.prototype.createSummaryResults=function(e){var i,o,n=[];try{for(var s=r.__values(this.iterSummaries(this._summaryDescriptions)),a=s.next();!a.done;a=s.next()){var u=a.value,p=u.propertyName;switch(u.operand){case t.DataSourceSummaryOperand.Average:p+="Average";break;case t.DataSourceSummaryOperand.Min:p+="Min";break;case t.DataSourceSummaryOperand.Max:p+="Max";break;case t.DataSourceSummaryOperand.Sum:p+="Sum";break;case t.DataSourceSummaryOperand.Count:p="$__count"}var l=null;e&&e[p]&&(l=e[p]);var c=new t.DefaultSummaryResult(u.propertyName,u.operand,l);n.push(c)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},i.prototype.resolveSchema=function(e,t){var r=this,i=this._baseUri,o=new XMLHttpRequest;o.onreadystatechange=function(){var i,n;4===o.readyState&&(200===o.status?(i=o.responseText,n=new h(i).getODataDataSourceSchema(r._entitySet),e(n)):t())},o.open("Get",i+"/$metadata"),o.send()},i.prototype.makeTaskForRequest=function(e,o){var n,s,a;a=this.actualPageSize,this.sortDescriptions;var u=this._baseUri;u+="/"+this._entitySet;var p=!1;if(this.updateFilterString(),null!=this._filterString&&(p?u+="&":(p=!0,u+="?"),u+="$filter="+this._filterString),null!=this.sortDescriptions){var l=null;try{for(var c=r.__values(this.iter(this.sortDescriptions)),h=c.next();!h.done;h=c.next()){var f=h.value;null==l?l="":l+=", ",f.direction==t.ListSortDirection.Descending?l+=f.propertyName+" desc":l+=f.propertyName}}catch(e){n={error:e}}finally{try{h&&!h.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}null!=l&&(p?u+="&":(p=!0,u+="?"),u+="$orderby="+l)}if(null!=this.desiredProperties&&this.desiredProperties.length>0){for(var d="",m=!0,y=this.desiredProperties,g=0;g<y.length;g++){m?m=!1:d+=", ",d+=y[g]}p?u+="&":(p=!0,u+="?"),u+="$select="+d}var _=new t.AsyncVirtualDataTask;e.index==i.schemaRequestIndex?this.executeRequest(u,p,0,a,_):this.executeRequest(u,p,e.index*a,a,_),e.taskHolder=new t.AsyncDataSourcePageTaskHolder,e.taskHolder.task=_,this.tasks.add(e)},i.prototype.updateFilterString=function(){var e,i;if(null!=this.filterExpressions&&this.filterExpressions.size()>0&&null==this._filterString){var o="",n=!0;try{for(var s=r.__values(this.iterFilter(this.filterExpressions)),a=s.next();!a.done;a=s.next()){var u=a.value;n?n=!1:o+=" AND ";var p=new t.ODataDataSourceFilterExpressionVisitor(0);p.visit(u);var l=p.toString();this.filterExpressions.size()>1&&(l="("+l+")"),o+=l}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}this._filterString=o}},i.prototype.executeRequest=function(e,t,r,i,o){var n=this;t?e+="&":(t=!0,e+="?");var s,a=function(e,t){return n.success(o,e,t)},u=function(e){return n.error(o,e)},p={requestUri:e+="$skip="+r+"&$top="+i+"&$count=true",enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};s=function(){odatajs.oData.request(p,a,u)},o.run=s},i.prototype.success=function(e,t,r){e.result=t,e.isCompleted=!0},i.prototype.error=function(e,t){e.isCompleted=!0,e.hasErrors=!0},i.prototype.createBatchRequest=function(e){for(var r=[],i=0;i<e.length;i++){var o=e[i],n={"Content-Type":"application/json","odata-version":"4.0"};o.transactionType===t.TransactionType.Add?r.push({method:"POST",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this._entitySet,headers:n,body:o.value}):o.transactionType===t.TransactionType.Update?(o.version&&(n["If-Match"]=o.version),r.push({method:"PATCH",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this.getRequestUriWithKey(o.id),headers:n,body:o.value})):o.transactionType===t.TransactionType.Delete&&(o.version&&(n["If-Match"]=o.version),r.push({method:"DELETE",id:"r"+i,atomicityGroup:"g1",url:this._baseUri+"/"+this.getRequestUriWithKey(o.id),headers:n}))}var s={requestUri:this._baseUri+"/$batch",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requests:r})},a=this;odatajs.oData.request(s,(function(e){if(e&&e.responses)if(e.responses.length>0){for(var t=!0,i=[],o=function(o){if(200!==e.responses[o].status&&204!==e.responses[o].status){t=!1;var n=r.filter((function(t){return t.id==e.responses[o].id}))[0];if(n){var s=n.method+" request failed with code "+e.responses[o].status;i.push(s),console.error(s)}return"break"}},n=0;n<e.responses.length;n++){if("break"===o(n))break}t?a.batchCompleted(!0,!0,null):a.batchCompleted(!1,!0,i)}else a.batchCompleted(!1,!0,null)}),(function(e){var t=[];e&&e.message&&t.push(e.message),a.batchCompleted(!1,!0,t)}))},i.prototype.getRequestUriWithKey=function(e){for(var t="",r=Object.keys(e),i=0;i<r.length;i++)i>0&&(t+=","),t+=r[i]+"="+e[r[i]];return this._entitySet+"("+t+")"},i.schemaRequestIndex=-1,i}(t.AsyncVirtualDataSourceProviderWorker),m=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._baseUri=null,t._entitySet=null,t._sortDescriptions=null,t._filterExpressions=null,t._propertiesRequested=null,t._groupDescriptions=null,t._summaryDescriptions=null,t}return r.__extends(i,e),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){this._baseUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){this._entitySet=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},set:function(e){this._sortDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},set:function(e){this._filterExpressions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},set:function(e){this._groupDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},set:function(e){this._summaryDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryscope},set:function(e){this._summaryscope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProviderWorkerSettings",t.AsyncVirtualDataSourceDataProviderWorkerSettings.$type),i}(t.AsyncVirtualDataSourceDataProviderWorkerSettings),y=function(e){function i(){var r=e.call(this)||this;return r._worker=null,r._requests=new s,r._callback=null,r._pageLoaded=null,r._pageSizeRequested=50,r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r.schemaChanged=null,r._currentFullCount=0,r._currentSchema=null,r._executionContext=null,r._updateNotifier=null,r._deferAutoRefresh=!1,r._sortDescriptions=null,r._groupDescriptions=null,r._propertiesRequested=null,r._filterExpressions=null,r._summaryDescriptions=null,r._enableJsonp=!0,r._schemaFetchQueued=!1,r._autoRefreshQueued=!1,r._batchCompleted=null,r._sortDescriptions=new t.SortDescriptionCollection,r._sortDescriptions.onChanged=function(){return r.sortDescriptions_CollectionChanged(null,null)},r._groupDescriptions=new t.SortDescriptionCollection,r._groupDescriptions.onChanged=function(){return r.groupDescriptions_CollectionChanged(null,null)},r._filterExpressions=new t.FilterExpressionCollection,r._filterExpressions.onChanged=function(){return r.filterExpressions_CollectionChanged(null,null)},r._summaryDescriptions=new t.SummaryDescriptionCollection,r._summaryDescriptions.onChanged=function(){return r.summaryDescriptions_CollectionChanged(null,null)},r}return r.__extends(i,e),i.prototype.filterExpressions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.sortDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.groupDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.summaryDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.addPageRequest=function(e,r){this.deferAutoRefresh||(null!=this._worker&&this._worker.isShutdown&&(this._worker=null,this._callback=null),null==this._worker&&this.createWorker(),r==t.DataSourcePageRequestPriority.High?this._requests.addFirst(e):this._requests.addLast(e),this._worker.addPageRequest(e,r)||(this._worker=null,this._callback=null,this.addPageRequest(e,r)))},i.prototype.createWorker=function(){if(this.valid()){this._callback=t.runOn(this,this.raisePageLoaded);var e=this.getWorkerSettings();this._worker=new d(e)}},i.prototype.valid=function(){return null!=this.entitySet&&null!=this.baseUri},i.prototype.getWorkerSettings=function(){var e,t=this;return(e=new m).baseUri=t._baseUri,e.entitySet=t._entitySet,e.pageSizeRequested=t._pageSizeRequested,e.timeoutMilliseconds=t._timeoutMilliseconds,e.pageLoaded=t._callback,e.batchCompleted=t._batchCompleted,e.executionContext=t._executionContext,e.sortDescriptions=t._sortDescriptions,e.groupDescriptions=t._groupDescriptions,e.filterExpressions=t._filterExpressions,e.propertiesRequested=t._propertiesRequested,e.summaryDescriptions=t._summaryDescriptions,e.summaryScope=t._summaryScope,e.enableJsonp=t._enableJsonp,e.isAggregationSupported=t.isAggregationSupported,e},i.prototype.removePageRequest=function(e){for(var t=this._requests.first;null!=t;)t.value==e&&this._requests.remove(t),t=t.next;null!=this._worker&&this._worker.removePageRequest(e)},i.prototype.removeAllPageRequests=function(){this._requests.clear(),null!=this._worker&&this._worker.removeAllPageRequests()},i.prototype.close=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageLoaded",{get:function(){return this._pageLoaded},set:function(e){this._pageLoaded=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.raisePageLoaded=function(e,r,i){if(null!=this._pageLoaded){if(this._currentFullCount=r,null==this._currentSchema){var o=null;null!=e&&(o=e.schema()),this._currentSchema=o,null!=this.schemaChanged&&this.schemaChanged(this,new t.DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema,this._currentFullCount))}e.pageIndex()!=d.schemaRequestIndex&&this._pageLoaded(e,r,i)}},i.prototype.killWorker=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageSizeRequested",{get:function(){return this._pageSizeRequested},set:function(e){this._pageSizeRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,t!=this._entitySet&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){this._timeoutMilliseconds=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.getItemValue=function(e,t){var r=e;return r.has(t)?r.get(t):null},i.prototype.setItemValue=function(e,t,r){},i.prototype.removeItem=function(e){},i.prototype.addItem=function(e){},Object.defineProperty(i.prototype,"actualCount",{get:function(){return this._currentFullCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"actualSchema",{get:function(){return this._currentSchema},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"executionContext",{get:function(){return this._executionContext},set:function(e){this._executionContext=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"updateNotifier",{get:function(){return this._updateNotifier},set:function(e){this._updateNotifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deferAutoRefresh",{get:function(){return this._deferAutoRefresh},set:function(e){this._deferAutoRefresh=e,this._deferAutoRefresh||this.queueAutoRefresh(),this._deferAutoRefresh&&this.valid()&&null==this._currentSchema&&this.queueSchemaFetch()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupported",{get:function(){return this.isAggregationSupported},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryScope},set:function(e){this._summaryScope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"notifyUsingSourceIndexes",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isItemIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isKeyIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.notifySetItem=function(e,t,r){null!=this.updateNotifier&&this.updateNotifier.notifySetItem(e,t,r)},i.prototype.notifyClearItems=function(){null!=this.updateNotifier&&this.updateNotifier.notifyClearItems()},i.prototype.notifyInsertItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyInsertItem(e,t)},i.prototype.notifyRemoveItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyRemoveItem(e,t)},i.prototype.queueSchemaFetch=function(){this._schemaFetchQueued||null!=this.executionContext&&(this._schemaFetchQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doSchemaFetchInternal)))},i.prototype.doSchemaFetchInternal=function(){this._schemaFetchQueued&&(this._schemaFetchQueued=!1,this.schemaFetchInternal())},i.prototype.schemaFetchInternal=function(){this.schemaFetchInternalOverride()},i.prototype.schemaFetchInternalOverride=function(){this.deferAutoRefresh&&(this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this.addSchemaRequest())},i.prototype.addSchemaRequest=function(){this._worker.addPageRequest(d.schemaRequestIndex,t.DataSourcePageRequestPriority.High)},i.prototype.queueAutoRefresh=function(){this.deferAutoRefresh||this._autoRefreshQueued||null!=this.executionContext&&(this._autoRefreshQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doRefreshInternal)))},i.prototype.doRefreshInternal=function(){this.deferAutoRefresh?this._autoRefreshQueued=!1:this._autoRefreshQueued&&(this._autoRefreshQueued=!1,this.refreshInternal())},i.prototype.refreshInternal=function(){this.refreshInternalOverride()},i.prototype.refreshInternalOverride=function(){this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this._worker.addPageRequest(0,t.DataSourcePageRequestPriority.Normal)},i.prototype.flushAutoRefresh=function(){this.doRefreshInternal()},i.prototype.refresh=function(){this.refreshInternal()},i.prototype.indexOfItem=function(e){return-1},i.prototype.indexOfKey=function(e){return-1},i.prototype.resolveSchemaPropertyType=function(e){if(null==this.actualSchema)return t.DataSourceSchemaPropertyType.ObjectValue;if(t.stringContains(e,"."))return t.DataSourceSchemaPropertyType.ObjectValue;for(var r=0;r<this.actualSchema.propertyNames.length;r++){if(this.actualSchema.propertyNames[r]==e)return this.actualSchema.propertyTypes[r]}return t.DataSourceSchemaPropertyType.ObjectValue},i.prototype.createBatchRequest=function(e){this._worker&&this._worker.createBatchRequest(e)},Object.defineProperty(i.prototype,"batchCompleted",{get:function(){return this._batchCompleted},set:function(e){this._batchCompleted=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProvider",t.Base.$type,[t.IDataSourceVirtualDataProvider_$type]),i}(t.Base),g=function(e){function i(){var t,r=e.call(this)||this;return r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r._isAggregationSupportedByServer=!1,r._enableJsonp=!0,r.dataProvider=((t=new y).executionContext=r.executionContext,t.enableJsonp=r.enableJsonp,t.isAggregationSupported=r.isGroupingSupported,t),r.externalDataSource=r,r}return r.__extends(i,e),i.prototype.onBaseUriChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.baseUri=this.baseUri),this.queueAutoRefresh()},Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&this.onBaseUriChanged(t,this._baseUri)},enumerable:!0,configurable:!0}),i.prototype.onEntitySetChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.entitySet=this.entitySet),this.queueAutoRefresh()},Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,this._entitySet!=t&&this.onEntitySetChanged(t,this._entitySet)},enumerable:!0,configurable:!0}),i.prototype.onTimeoutMillisecondsChanged=function(e,r){null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.timeoutMilliseconds=this.timeoutMilliseconds)},Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){var t=this._timeoutMilliseconds;this._timeoutMilliseconds=e,t!=this._timeoutMilliseconds&&this.onTimeoutMillisecondsChanged(t,this._timeoutMilliseconds)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupportedOverride",{get:function(){return this.isAggregationSupportedByServer},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupportedByServer",{get:function(){return this._isAggregationSupportedByServer},set:function(e){this._isAggregationSupportedByServer=e,null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.isAggregationSupported=e)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e,null!==t.typeCast(y.$type,this.actualDataProvider)&&(this.actualDataProvider.enableJsonp=e)},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var e=new i;e.executionContext=this.executionContext,e.includeSummaryRowsInSection=this.includeSummaryRowsInSection,e.isSectionCollapsable=this.isSectionCollapsable,e.isSectionExpandedDefault=this.isSectionExpandedDefault,e.isSectionSummaryRowsAtBottom=this.isSectionSummaryRowsAtBottom,e.primaryKey=this.primaryKey,e.propertiesRequested=this.propertiesRequested,e.sectionHeaderDisplayMode=this.sectionHeaderDisplayMode,e.shouldEmitSectionFooters=this.shouldEmitSectionFooters,e.shouldEmitSectionHeaders=this.shouldEmitSectionHeaders,e.shouldEmitShiftedRows=this.shouldEmitShiftedRows,e.summaryScope=this.summaryScope;for(var t=0;t<this.groupDescriptions.size();t++)e.groupDescriptions.add(this.groupDescriptions.get(t));for(t=0;t<this.sortDescriptions.size();t++)e.sortDescriptions.add(this.sortDescriptions.get(t));for(t=0;t<this.filterExpressions.size();t++)e.filterExpressions.add(this.filterExpressions.get(t));for(t=0;t<this.summaryDescriptions.size();t++)e.summaryDescriptions.add(this.summaryDescriptions.get(t));return e.pageSizeRequested=this.pageSizeRequested,e.maxCachedPages=this.maxCachedPages,e.baseUri=this.baseUri,e.entitySet=this.entitySet,e.timeoutMilliseconds=this.timeoutMilliseconds,e.isAggregationSupportedByServer=this.isAggregationSupportedByServer,e.enableJsonp=this.enableJsonp,e},i}(t.VirtualDataSource),_=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(i,e),i.$t=t.markType(i,"ODataVirtualDataSourceProviderTaskDataHolder",t.AsyncVirtualDataSourceProviderTaskDataHolder.$type),i}(t.AsyncVirtualDataSourceProviderTaskDataHolder),v=function(){function e(e,r,i,o,n){if(this._actualData=null,this._schema=null,this._pageIndex=0,this._groupInformation=null,this._summaryInformation=null,null==e)this._actualData=null;else{var s=e.items.length;this._actualData=[];for(var a=new Set,u=0;u<r.propertyNames.length;u++)r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeValue&&r.propertyTypes[u]!=t.DataSourceSchemaPropertyType.DateTimeOffsetValue||a.add(r.propertyNames[u]);for(var p=void 0,l=function(t){for(var r=e.items[t],i=new Map,o=Array.from(Object.keys(r)),n=o.map((function(e){return r[e]})),s=0;s<o.length;s++)p=n[s],a.has(o[s])&&(p=new Date(p)),i.set(o[s],p);c._actualData[t]=i},c=this,h=0;h<s;h++)l(h)}this._schema=r,this._groupInformation=i,this._summaryInformation=o,this._pageIndex=n}return e.prototype.count=function(){return this._actualData.length},e.prototype.getItemAtIndex=function(e){return this._actualData[e]},e.prototype.getItemValueAtIndex=function(e,t){var r=this._actualData[e];return r.has(t)?r.get(t):null},e.prototype.pageIndex=function(){return this._pageIndex},e.prototype.schema=function(){return this._schema},e.prototype.getGroupInformation=function(){return this._groupInformation},e.prototype.getSummaryInformation=function(){return this._summaryInformation},e}(),b=function(e){function i(i){var o,n,s=e.call(this,i)||this;if(s._baseUri=null,s._entitySet=null,s._sortDescriptions=null,s._groupDescriptions=null,s._filterExpressions=null,s._summaryDescriptions=null,s._desiredPropeties=null,s._enableJsonp=!0,s._isAggregationSupported=!1,s._provideFullCount=null,s._provideOrderByParameter=null,s._provideFilterParameter=null,s._provideAggregationParameter=null,s._provideAggregatedCount=null,s._providePagingParameter=null,s._provideDesiredPropertiesParameter=null,s._provideUri=null,s._performFetch=null,s._fixedFullCount=-1,s._groupInformation=null,s._summaryInformation=null,s._filterString=null,s._selectedString=null,s.doWork=s.doWork.bind(s),s._baseUri=i.baseUri,s._entitySet=i.entitySet,s._sortDescriptions=i.sortDescriptions,s._groupDescriptions=i.groupDescriptions,null!=s._groupDescriptions&&s._groupDescriptions.size()>0){s._sortDescriptions=new t.SortDescriptionCollection;try{for(var a=r.__values(s.iter(i.sortDescriptions)),u=a.next();!u.done;u=a.next()){var p=u.value;s._sortDescriptions.add(p)}}catch(e){o={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}for(var l=0;l<s._groupDescriptions.size();l++)s._sortDescriptions.insert(l,s._groupDescriptions.get(l))}return s._filterExpressions=i.filterExpressions,s._desiredPropeties=i.propertiesRequested,s._summaryDescriptions=i.summaryDescriptions,s._fixedFullCount=i.fixedFullCount,s._summaryScope=i.summaryScope,s._enableJsonp=i.enableJsonp,s._provideFullCount=i.provideFullCount,s._performFetch=i.performFetch,s._provideAggregationParameter=i.provideAggregationParameter,s._provideFilterParameter=i.provideFilterParameter,s._provideOrderByParameter=i.provideOrderByParameter,s._provideUri=i.provideUri,s._providePagingParameter=i.providePagingParameter,s._provideDesiredPropertiesParameter=i.provideDesiredPropertiesParameter,s._provideItems=i.provideItems,s._provideAggregatedCount=i.provideAggregatedCount,s._provideItems||(s._provideItems=function(e){return e?e.items:null}),s._provideFullCount||(s._provideFullCount=function(e){return e.fullCount?e.fullCount:s._fixedFullCount>=0?s._fixedFullCount:0}),s._provideOrderByParameter||(s._provideOrderByParameter=function(e,t,r){e.push({name:"orderBy",value:encodeURIComponent(t)})}),s._providePagingParameter||(s._providePagingParameter=function(e,t,r){e.push({name:"skip",value:t}),e.push({name:"take",value:r})}),s._provideAggregationParameter||(s._provideAggregationParameter=function(e,t,r,i,o,n){e.push({name:"groupBy",value:r}),e.push({name:"aggregate",value:"count"})}),s._provideUri||(s._provideUri=function(e,t,r){var i=e;i+="/"+t,r.length>0&&(i+="?");for(var o="",n=0;n<r.length;n++)n>0&&(o+="&"),o+=r[n].name+"="+r[n].value;return i+o}),s._isAggregationSupported=i.isAggregationSupported,window.setTimeout(s.doWork,100),s}return r.__extends(i,e),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"desiredProperties",{get:function(){return this._desiredPropeties},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){e.prototype.initialize.call(this)},i.prototype.getTaskDataHolder=function(){return new _},i.prototype.getCompletedTaskData=function(t,r){e.prototype.getCompletedTaskData.call(this,t,r)},i.prototype.removeCompletedTaskData=function(t,r){e.prototype.removeCompletedTaskData.call(this,t,r)},i.prototype.getTasksData=function(t){e.prototype.getTasksData.call(this,t)},i.prototype.iter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterFilter=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.iterSummaries=function(e){var t;return r.__generator(this,(function(r){switch(r.label){case 0:t=0,r.label=1;case 1:return t<e.size()?[4,e.get(t)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.processCompletedTask=function(e,t,r,o){var n,s=this,a=null,u=-1,p=e.task;try{if(p.hasErrors)return void this.retryIndex(r,t);r==i.schemaRequestIndex?(a=p.result,u=this._provideFullCount(a)):a=p.result}catch(e){return void this.retryIndex(r,t)}if(this.actualCount=u>=0?u:this._provideFullCount(a),null!=(n=this.actualSchema))this.finishProcessingCompletedTask(p,r,n,a);else{var l=0;this.resolveSchema((function(e){s.actualSchema=e,!s._isAggregationSupported||0===s._groupDescriptions.size()&&0===s._summaryDescriptions.size()?s.finishProcessingCompletedTask(p,r,e,a):(s._groupDescriptions.size()>0&&(l++,s.resolveGroupInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))),s._summaryDescriptions.size()>0&&(l++,s.resolveSummaryInformation((function(t){0===--l&&s.finishProcessingCompletedTask(p,r,e,a)}),(function(){s.retryIndex(r,t)}))))}),(function(){s.retryIndex(r,t)}))}},i.prototype.finishProcessingCompletedTask=function(e,t,r,i){var o,n,s,a,u=this;this.actualSchema=r,o=this.executionContext,s=this._groupInformation,a=this._summaryInformation,n=this.pageLoaded;var p=null;if(null!=i?(p=new v(i,r,s,a,t),!this.isLastPage(t)&&p.count()>0&&!this.populatedActualPageSize&&(this.populatedActualPageSize=!0,this.actualPageSize=p.count())):p=new v(null,r,s,a,t),null!=this.pageLoaded)if(null!=this.executionContext){if(null==o||null==n)return void this.shutdown();o.execute((function(){return n(p,u.actualCount,u.actualPageSize)}))}else{if(null==n)return void this.shutdown();n(p,this.actualCount,this.actualPageSize)}},i.prototype.resolveGroupInformation=function(e,i){var o,n,s=this;if(null==this._groupInformation){var a,u="",p="",l="";if(null!=this._groupDescriptions&&0!=this._groupDescriptions.size())if(null!=this._provideAggregationParameter){if(a=this._filterString,this.updateFilterString(),null!=this._groupDescriptions){var c=!0;try{for(var h=r.__values(this.iter(this._groupDescriptions)),f=h.next();!f.done;f=h.next()){var d=f.value;c?c=!1:(u+=", ",p+=", "),p+=d.propertyName,d.direction===t.ListSortDirection.Descending?u+=d.propertyName+" desc":u+=d.propertyName+" asc"}}catch(e){o={error:e}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(o)throw o.error}}}if(this._summaryScope===t.DataSourceSummaryScope.Both||this._summaryScope===t.DataSourceSummaryScope.Groups){var m=this.getSummaryQueryParameters(!0);t.stringIsNullOrEmpty(m)||(l=", "+m)}var y=[];this._provideOrderByParameter&&this._provideOrderByParameter(y,u,this._groupDescriptions),this._provideFilterParameter&&null!=a&&this._provideFilterParameter(y,a,this._filterExpressions),this._provideAggregationParameter&&this._provideAggregationParameter(y,!0,p,this._groupDescriptions,l,this._summaryDescriptions);var g=this._provideUri(this._baseUri,this._entitySet,y);try{var _=[],v=function(t,r){return s.groupSuccess(t,r,e,i,_)},b=function(t){return s.groupError(t,e,i,_)},S={requestUri:g,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){s.fetchUri(S,v,b)})()}catch(e){i()}}else e(null);else e(null)}else e(this._groupInformation)},i.prototype.fetchUri=function(e,t,r){this._performFetch?this._performFetch(e,t,r):fetch(e.requestUri,{method:e.method,headers:e.headers}).then((function(e){e.json().then((function(r){t(r,e)}))})).catch((function(e){r(e)}))},i.prototype.groupError=function(e,t,r,i){this._groupInformation=null},i.prototype.groupSuccess=function(e,t,i,o,n){var s,a,u=[];try{for(var p=r.__values(this.iter(this._groupDescriptions)),l=p.next();!l.done;l=p.next()){var c=l.value;u.push(c.propertyName)}}catch(e){s={error:e}}finally{try{l&&!l.done&&(a=p.return)&&a.call(p)}finally{if(s)throw s.error}}var h=this._provideItems(e);if(h&&h.length>0)for(var f=0;f<h.length;f++)this.addGroup(n,u,u,0,h[f]);this._groupInformation=n,i(this._groupInformation)},i.prototype.addGroup=function(e,i,o,n,s){var a,u,p=[];try{for(var l=r.__values(i),c=l.next();!c.done;c=l.next()){var h=c.value;s[h]&&p.push(s[h])}}catch(e){a={error:e}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}var f=0;if(this._provideAggregatedCount)this._provideAggregatedCount(s);else s.aggregatedCount&&(f=t.Convert.toInt321(s.aggregatedCount));var d=null;this._summaryScope!=t.DataSourceSummaryScope.Both&&this._summaryScope!=t.DataSourceSummaryScope.Groups||(d=this.createSummaryResults(s));var m=new t.DefaultSectionInformation(n,n+(f-1),o,p,d);e.push(m)},i.prototype.resolveSummaryInformation=function(e,r){var i=this;if(null==this._summaryInformation){var o,n;if(null!=this._summaryDescriptions&&0!=this._summaryDescriptions.size()&&this._summaryScope!=t.DataSourceSummaryScope.Groups&&this._summaryScope!=t.DataSourceSummaryScope.None){o=this._filterString,this.updateFilterString(),n=this.getSummaryQueryParameters(!1);var s=[];this._provideFilterParameter&&null!=o&&this._provideFilterParameter(s,o,this._filterExpressions),this._provideAggregationParameter&&this._provideAggregationParameter(s,!0,null,null,n,this._summaryDescriptions);var a=this._provideUri(this._baseUri,this._entitySet,s);try{var u=[],p=function(t,o){return i.summarySuccess(t,o,e,r,u)},l=function(t){return i.summaryError(t,e,r,u)},c={requestUri:a,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){i.fetchUri(c,p,l)})()}catch(e){r()}}else e(null)}else e(this._summaryInformation)},i.prototype.summarySuccess=function(e,t,r,i,o){e&&e.value&&e.value.length>0&&(o=this.createSummaryResults(e.value[0])),this._summaryInformation=o,r(this._summaryInformation)},i.prototype.summaryError=function(e,t,r,i){this._summaryInformation=null},i.prototype.getSummaryQueryParameters=function(e){var i,o,n="";if(null!=this._summaryDescriptions){var s=!0,a=!1;try{for(var u=r.__values(this.iterSummaries(this._summaryDescriptions)),p=u.next();!p.done;p=u.next()){var l=p.value;if(l.operand!=t.DataSourceSummaryOperand.Count||!e&&!a){switch(s||(n+=", "),l.operand){case t.DataSourceSummaryOperand.Average:n+=l.propertyName+" with average as "+l.propertyName+"Average";break;case t.DataSourceSummaryOperand.Min:n+=l.propertyName+" with min as "+l.propertyName+"Min";break;case t.DataSourceSummaryOperand.Max:n+=l.propertyName+" with max as "+l.propertyName+"Max";break;case t.DataSourceSummaryOperand.Sum:n+=l.propertyName+" with sum as "+l.propertyName+"Sum";break;case t.DataSourceSummaryOperand.Count:n+="$count as $__count",a=!0}s=!1}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}return n},i.prototype.createSummaryResults=function(e){var i,o,n=[];try{for(var s=r.__values(this.iterSummaries(this._summaryDescriptions)),a=s.next();!a.done;a=s.next()){var u=a.value,p=u.propertyName;switch(u.operand){case t.DataSourceSummaryOperand.Average:p+="Average";break;case t.DataSourceSummaryOperand.Min:p+="Min";break;case t.DataSourceSummaryOperand.Max:p+="Max";break;case t.DataSourceSummaryOperand.Sum:p+="Sum";break;case t.DataSourceSummaryOperand.Count:p="$__count"}var l=null;e&&e[p]&&(l=e[p]);var c=new t.DefaultSummaryResult(u.propertyName,u.operand,l);n.push(c)}}catch(e){i={error:e}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return n},i.prototype.resolveSchemaFromItems=function(e){var r=new t.LocalDataSource;return r.dataSource=e,r.flushAutoRefresh(),r.actualSchema},i.prototype.resolveSchema=function(e,t){var r=this;if(this._provideItems&&this._providePagingParameter){var i=function(i){var o=r._provideItems(i);if(o&&o.length>0){var n=r.resolveSchemaFromItems(o);e(n)}else t("could not find items to resolve schema")},o=function(e){return t(e)},n=[];this._providePagingParameter&&this._providePagingParameter(n,0,this.actualPageSize);var s=this._provideUri(this._baseUri,this._entitySet,n);try{var a={requestUri:s,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};(function(){r.fetchUri(a,i,o)})()}catch(e){t(e)}}else t("required providers for items and paging are not specified")},i.prototype.makeTaskForRequest=function(e,o){var n,s,a,u=[];a=this.actualPageSize,this.sortDescriptions;if(this.updateFilterString(),null!=this._filterString&&this._provideFilterParameter&&this._provideFilterParameter(u,this._filterString,this._filterExpressions),null!=this.sortDescriptions){var p=null;try{for(var l=r.__values(this.iter(this.sortDescriptions)),c=l.next();!c.done;c=l.next()){var h=c.value;null==p?p="":p+=", ",h.direction==t.ListSortDirection.Descending?p+=h.propertyName+" desc":p+=h.propertyName}}catch(e){n={error:e}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(n)throw n.error}}null!=p&&this._provideOrderByParameter&&this._provideOrderByParameter(u,p,this._sortDescriptions)}if(null!=this.desiredProperties&&this.desiredProperties.length>0){for(var f="",d=!0,m=this.desiredProperties,y=0;y<m.length;y++){d?d=!1:f+=", ",f+=m[y]}this._provideDesiredPropertiesParameter&&this._provideDesiredPropertiesParameter(u,f,this._desiredPropeties)}this._providePagingParameter&&(e.index==i.schemaRequestIndex?this._providePagingParameter(u,0,a):this._providePagingParameter(u,e.index*a,a));var g=new t.AsyncVirtualDataTask,_=this._provideUri(this._baseUri,this._entitySet,u);e.index==i.schemaRequestIndex?this.executeRequest(_,!1,0,a,g):this.executeRequest(_,!1,e.index*a,a,g),e.taskHolder=new t.AsyncDataSourcePageTaskHolder,e.taskHolder.task=g,this.tasks.add(e)},i.prototype.updateFilterString=function(){var e,i;if(null!=this.filterExpressions&&this.filterExpressions.size()>0&&null==this._filterString){var o="",n=!0;try{for(var s=r.__values(this.iterFilter(this.filterExpressions)),a=s.next();!a.done;a=s.next()){var u=a.value;n?n=!1:o+=" AND ";var p=new t.ODataDataSourceFilterExpressionVisitor(0);p.visit(u);var l=p.toString();this.filterExpressions.size()>1&&(l="("+l+")"),o+=l}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}this._filterString=o}},i.prototype.executeRequest=function(e,t,r,i,o){var n,s=this,a=function(e,t){return s.success(o,e,t)},u=function(e){return s.error(o,e)},p={requestUri:e,enableJsonpCallback:this._enableJsonp,method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"},data:null};n=function(){s.fetchUri(p,a,u)},o.run=n},i.prototype.success=function(e,t,r){e.result=t,e.isCompleted=!0},i.prototype.error=function(e,t){e.isCompleted=!0,e.hasErrors=!0},i.prototype.createBatchRequest=function(e){},i.prototype.getRequestUriWithKey=function(e){for(var t="",r=Object.keys(e),i=0;i<r.length;i++)i>0&&(t+=","),t+=r[i]+"="+e[r[i]];return this._entitySet+"("+t+")"},i.schemaRequestIndex=-1,i}(t.AsyncVirtualDataSourceProviderWorker),S=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._baseUri=null,t._entitySet=null,t._sortDescriptions=null,t._filterExpressions=null,t._propertiesRequested=null,t._groupDescriptions=null,t._summaryDescriptions=null,t._fixedFullCount=-1,t._provideFullCount=null,t._provideOrderByParameter=null,t._provideFilterParameter=null,t._provideAggregationParameter=null,t._provideAggregatedCount=null,t._provideUri=null,t._providePagingParameter=null,t._provideDesiredPropertiesParameter=null,t._performFetch=null,t}return r.__extends(i,e),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){this._baseUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){this._entitySet=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},set:function(e){this._sortDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},set:function(e){this._filterExpressions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},set:function(e){this._groupDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},set:function(e){this._summaryDescriptions=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryscope},set:function(e){this._summaryscope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"RestVirtualDataSourceDataProviderWorkerSettings",t.AsyncVirtualDataSourceDataProviderWorkerSettings.$type),i}(t.AsyncVirtualDataSourceDataProviderWorkerSettings),P=function(e){function i(){var r=e.call(this)||this;return r._worker=null,r._requests=new s,r._callback=null,r._pageLoaded=null,r._pageSizeRequested=50,r._baseUri=null,r._entitySet=null,r._timeoutMilliseconds=1e4,r.schemaChanged=null,r._currentFullCount=0,r._currentSchema=null,r._executionContext=null,r._updateNotifier=null,r._deferAutoRefresh=!1,r._sortDescriptions=null,r._groupDescriptions=null,r._propertiesRequested=null,r._filterExpressions=null,r._summaryDescriptions=null,r._enableJsonp=!0,r._fixedFullCount=-1,r._provideFullCount=null,r._provideOrderByParameter=null,r._provideFilterParameter=null,r._provideAggregationParameter=null,r._provideAggregatedCount=null,r._provideUri=null,r._performFetch=null,r._providePagingParameter=null,r._provideDesiredPropertiesParameter=null,r._schemaFetchQueued=!1,r._autoRefreshQueued=!1,r._sortDescriptions=new t.SortDescriptionCollection,r._sortDescriptions.onChanged=function(){return r.sortDescriptions_CollectionChanged(null,null)},r._groupDescriptions=new t.SortDescriptionCollection,r._groupDescriptions.onChanged=function(){return r.groupDescriptions_CollectionChanged(null,null)},r._filterExpressions=new t.FilterExpressionCollection,r._filterExpressions.onChanged=function(){return r.filterExpressions_CollectionChanged(null,null)},r._summaryDescriptions=new t.SummaryDescriptionCollection,r._summaryDescriptions.onChanged=function(){return r.summaryDescriptions_CollectionChanged(null,null)},r}return r.__extends(i,e),i.prototype.filterExpressions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.sortDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.groupDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.summaryDescriptions_CollectionChanged=function(e,t){this.queueAutoRefresh()},i.prototype.addPageRequest=function(e,r){this.deferAutoRefresh||(null!=this._worker&&this._worker.isShutdown&&(this._worker=null,this._callback=null),null==this._worker&&this.createWorker(),r==t.DataSourcePageRequestPriority.High?this._requests.addFirst(e):this._requests.addLast(e),this._worker.addPageRequest(e,r)||(this._worker=null,this._callback=null,this.addPageRequest(e,r)))},i.prototype.createWorker=function(){if(this.valid()){this._callback=t.runOn(this,this.raisePageLoaded);var e=this.getWorkerSettings();this._worker=new b(e)}},i.prototype.valid=function(){return null!=this.entitySet&&null!=this.baseUri},i.prototype.getWorkerSettings=function(){var e,t=this;return(e=new S).baseUri=t._baseUri,e.entitySet=t._entitySet,e.pageSizeRequested=t._pageSizeRequested,e.timeoutMilliseconds=t._timeoutMilliseconds,e.pageLoaded=t._callback,e.executionContext=t._executionContext,e.sortDescriptions=t._sortDescriptions,e.groupDescriptions=t._groupDescriptions,e.filterExpressions=t._filterExpressions,e.propertiesRequested=t._propertiesRequested,e.summaryDescriptions=t._summaryDescriptions,e.summaryScope=t._summaryScope,e.enableJsonp=t._enableJsonp,e.isAggregationSupported=t.isAggregationSupported,e.performFetch=t.performFetch,e.provideAggregationParameter=t.provideAggregationParameter,e.provideAggregatedCount=t.provideAggregatedCount,e.provideDesiredPropertiesParameter=t.provideDesiredPropertiesParameter,e.provideFilterParameter=t.provideFilterParameter,e.provideFullCount=t.provideFullCount,e.provideItems=t.provideItems,e.provideOrderByParameter=t.provideOrderByParameter,e.providePagingParameter=t.providePagingParameter,e.provideUri=t.provideUri,e.fixedFullCount=t.fixedFullCount,e},i.prototype.removePageRequest=function(e){for(var t=this._requests.first;null!=t;)t.value==e&&this._requests.remove(t),t=t.next;null!=this._worker&&this._worker.removePageRequest(e)},i.prototype.removeAllPageRequests=function(){this._requests.clear(),null!=this._worker&&this._worker.removeAllPageRequests()},i.prototype.close=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageLoaded",{get:function(){return this._pageLoaded},set:function(e){this._pageLoaded=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.raisePageLoaded=function(e,r,i){if(null!=this._pageLoaded){if(this._currentFullCount=r,null==this._currentSchema){var o=null;null!=e&&(o=e.schema()),this._currentSchema=o,null!=this.schemaChanged&&this.schemaChanged(this,new t.DataSourceDataProviderSchemaChangedEventArgs(this._currentSchema,this._currentFullCount))}e.pageIndex()!=b.schemaRequestIndex&&this._pageLoaded(e,r,i)}},i.prototype.killWorker=function(){null!=this._worker&&(this._worker.shutdown(),this._worker=null,this._callback=null)},Object.defineProperty(i.prototype,"pageSizeRequested",{get:function(){return this._pageSizeRequested},set:function(e){this._pageSizeRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,t!=this._entitySet&&(this.queueAutoRefresh(),this.valid()&&this.deferAutoRefresh&&this.queueSchemaFetch())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){this._timeoutMilliseconds=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),i.prototype.getItemValue=function(e,t){var r=e;return r.has(t)?r.get(t):null},Object.defineProperty(i.prototype,"actualCount",{get:function(){return this._currentFullCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"actualSchema",{get:function(){return this._currentSchema},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"executionContext",{get:function(){return this._executionContext},set:function(e){this._executionContext=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"updateNotifier",{get:function(){return this._updateNotifier},set:function(e){this._updateNotifier=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"deferAutoRefresh",{get:function(){return this._deferAutoRefresh},set:function(e){this._deferAutoRefresh=e,this._deferAutoRefresh||this.queueAutoRefresh(),this._deferAutoRefresh&&this.valid()&&null==this._currentSchema&&this.queueSchemaFetch()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isSortingSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isGroupingSupported",{get:function(){return this.isAggregationSupported},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isFilteringSupported",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isAggregationSupported",{get:function(){return this._isAggregationSupported},set:function(e){this._isAggregationSupported=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"sortDescriptions",{get:function(){return this._sortDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"groupDescriptions",{get:function(){return this._groupDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"propertiesRequested",{get:function(){return this._propertiesRequested},set:function(e){this._propertiesRequested=e,this.queueAutoRefresh()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"filterExpressions",{get:function(){return this._filterExpressions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryDescriptions",{get:function(){return this._summaryDescriptions},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"summaryScope",{get:function(){return this._summaryScope},set:function(e){this._summaryScope=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"notifyUsingSourceIndexes",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isItemIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isKeyIndexLookupSupported",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.notifySetItem=function(e,t,r){null!=this.updateNotifier&&this.updateNotifier.notifySetItem(e,t,r)},i.prototype.notifyClearItems=function(){null!=this.updateNotifier&&this.updateNotifier.notifyClearItems()},i.prototype.notifyInsertItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyInsertItem(e,t)},i.prototype.notifyRemoveItem=function(e,t){null!=this.updateNotifier&&this.updateNotifier.notifyRemoveItem(e,t)},i.prototype.queueSchemaFetch=function(){this._schemaFetchQueued||null!=this.executionContext&&(this._schemaFetchQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doSchemaFetchInternal)))},i.prototype.doSchemaFetchInternal=function(){this._schemaFetchQueued&&(this._schemaFetchQueued=!1,this.schemaFetchInternal())},i.prototype.schemaFetchInternal=function(){this.schemaFetchInternalOverride()},i.prototype.schemaFetchInternalOverride=function(){this.deferAutoRefresh&&(this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this.addSchemaRequest())},i.prototype.addSchemaRequest=function(){this._worker.addPageRequest(b.schemaRequestIndex,t.DataSourcePageRequestPriority.High)},i.prototype.queueAutoRefresh=function(){this.deferAutoRefresh||this._autoRefreshQueued||null!=this.executionContext&&(this._autoRefreshQueued=!0,this.executionContext.enqueueAction(t.runOn(this,this.doRefreshInternal)))},i.prototype.doRefreshInternal=function(){this.deferAutoRefresh?this._autoRefreshQueued=!1:this._autoRefreshQueued&&(this._autoRefreshQueued=!1,this.refreshInternal())},i.prototype.refreshInternal=function(){this.refreshInternalOverride()},i.prototype.refreshInternalOverride=function(){this.removeAllPageRequests(),this.killWorker(),this.createWorker(),this._worker.addPageRequest(0,t.DataSourcePageRequestPriority.Normal)},i.prototype.flushAutoRefresh=function(){this.doRefreshInternal()},i.prototype.refresh=function(){this.refreshInternal()},i.prototype.indexOfItem=function(e){return-1},i.prototype.indexOfKey=function(e){return-1},i.prototype.resolveSchemaPropertyType=function(e){if(null==this.actualSchema)return t.DataSourceSchemaPropertyType.ObjectValue;if(t.stringContains(e,"."))return t.DataSourceSchemaPropertyType.ObjectValue;for(var r=0;r<this.actualSchema.propertyNames.length;r++){if(this.actualSchema.propertyNames[r]==e)return this.actualSchema.propertyTypes[r]}return t.DataSourceSchemaPropertyType.ObjectValue},i.prototype.setItemValue=function(e,t,r){},i.prototype.removeItem=function(e){},i.prototype.addItem=function(e){},i.prototype.createBatchRequest=function(e){null!=this._worker&&this._worker.createBatchRequest(e)},Object.defineProperty(i.prototype,"batchCompleted",{get:function(){return this._batchCompleted},set:function(e){this._batchCompleted=e},enumerable:!0,configurable:!0}),i.$t=t.markType(i,"ODataVirtualDataSourceDataProvider",t.Base.$type,[t.IDataSourceVirtualDataProvider_$type]),i}(t.Base),D=function(e){function t(){var t,r=e.call(this)||this;return r._baseUri=null,r._isFilteringSupportedByServer=!1,r._entitySet=null,r._timeoutMilliseconds=1e4,r._isAggregationSupportedByServer=!1,r._enableJsonp=!0,r._fixedFullCount=-1,r._provideFullCount=null,r._provideOrderByParameter=null,r._provideFilterParameter=null,r._provideAggregationParameter=null,r._provideAggregatedCount=null,r._provideUri=null,r._performFetch=null,r._providePagingParameter=null,r._provideDesiredPropertiesParameter=null,r.dataProvider=((t=new P).executionContext=r.executionContext,t.enableJsonp=r.enableJsonp,t.isAggregationSupported=r.isGroupingSupported,t),r.externalDataSource=r,r}return r.__extends(t,e),t.prototype.onBaseUriChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.baseUri=this.baseUri,this.queueAutoRefresh())},Object.defineProperty(t.prototype,"baseUri",{get:function(){return this._baseUri},set:function(e){var t=this._baseUri;this._baseUri=e,t!=this._baseUri&&this.onBaseUriChanged(t,this._baseUri)},enumerable:!0,configurable:!0}),t.prototype.onEntitySetChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.entitySet=this.entitySet,this.queueAutoRefresh()),this.queueAutoRefresh()},Object.defineProperty(t.prototype,"isFilteringSupportedByServer",{get:function(){return this._isFilteringSupportedByServer},set:function(e){this._isFilteringSupportedByServer=e},enumerable:!0,configurable:!0}),t.prototype.get_isFilteringSupported=function(){return!!this._isFilteringSupportedByServer},Object.defineProperty(t.prototype,"entitySet",{get:function(){return this._entitySet},set:function(e){var t=this._entitySet;this._entitySet=e,this._entitySet!=t&&this.onEntitySetChanged(t,this._entitySet)},enumerable:!0,configurable:!0}),t.prototype.onTimeoutMillisecondsChanged=function(e,t){this.actualDataProvider&&(this.actualDataProvider.timeoutMilliseconds=this.timeoutMilliseconds)},Object.defineProperty(t.prototype,"timeoutMilliseconds",{get:function(){return this._timeoutMilliseconds},set:function(e){var t=this._timeoutMilliseconds;this._timeoutMilliseconds=e,t!=this._timeoutMilliseconds&&this.onTimeoutMillisecondsChanged(t,this._timeoutMilliseconds)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSortingSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFilteringSupportedOverride",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isGroupingSupportedOverride",{get:function(){return this.isAggregationSupportedByServer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAggregationSupportedByServer",{get:function(){return this._isAggregationSupportedByServer},set:function(e){this._isAggregationSupportedByServer=e,this.actualDataProvider&&(this.actualDataProvider.isAggregationSupported=this.isAggregationSupportedByServer)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableJsonp",{get:function(){return this._enableJsonp},set:function(e){this._enableJsonp=e,this.actualDataProvider&&(this.actualDataProvider.enableJsonp=this.enableJsonp)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fixedFullCount",{get:function(){return this._fixedFullCount},set:function(e){this._fixedFullCount=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideFullCount",{get:function(){return this._provideFullCount},set:function(e){this._provideFullCount=e,this.actualDataProvider&&(this.actualDataProvider.provideFullCount=this.provideFullCount,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideOrderByParameter",{get:function(){return this._provideOrderByParameter},set:function(e){this._provideOrderByParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideOrderByParameter=this.provideOrderByParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideFilterParameter",{get:function(){return this._provideFilterParameter},set:function(e){this._provideFilterParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideFilterParameter=this.provideFilterParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideAggregationParameter",{get:function(){return this._provideAggregationParameter},set:function(e){this._provideAggregationParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideAggregationParameter=this.provideAggregationParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideAggregatedCount",{get:function(){return this._provideAggregatedCount},set:function(e){this._provideAggregatedCount=e,this.actualDataProvider&&(this.actualDataProvider.provideAggregatedCount=this.provideAggregatedCount,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideUri",{get:function(){return this._provideUri},set:function(e){this._provideUri=e,this.actualDataProvider&&(this.actualDataProvider.provideUri=this.provideUri,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"performFetch",{get:function(){return this._performFetch},set:function(e){this._performFetch=e,this.actualDataProvider&&(this.actualDataProvider.performFetch=this.performFetch,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providePagingParameter",{get:function(){return this._providePagingParameter},set:function(e){this._providePagingParameter=e,this.actualDataProvider&&(this.actualDataProvider.providePagingParameter=this.providePagingParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideDesiredPropertiesParameter",{get:function(){return this._provideDesiredPropertiesParameter},set:function(e){this._provideDesiredPropertiesParameter=e,this.actualDataProvider&&(this.actualDataProvider.provideDesiredPropertiesParameter=this.provideDesiredPropertiesParameter,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"provideItems",{get:function(){return this._provideItems},set:function(e){this._provideItems=e,this.actualDataProvider&&(this.actualDataProvider.provideItems=this.provideItems,this.queueAutoRefresh())},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t;e.executionContext=this.executionContext,e.includeSummaryRowsInSection=this.includeSummaryRowsInSection,e.isSectionCollapsable=this.isSectionCollapsable,e.isSectionExpandedDefault=this.isSectionExpandedDefault,e.isSectionSummaryRowsAtBottom=this.isSectionSummaryRowsAtBottom,e.primaryKey=this.primaryKey,e.propertiesRequested=this.propertiesRequested,e.sectionHeaderDisplayMode=this.sectionHeaderDisplayMode,e.shouldEmitSectionFooters=this.shouldEmitSectionFooters,e.shouldEmitSectionHeaders=this.shouldEmitSectionHeaders,e.shouldEmitShiftedRows=this.shouldEmitShiftedRows,e.summaryScope=this.summaryScope;for(var r=0;r<this.groupDescriptions.size();r++)e.groupDescriptions.add(this.groupDescriptions.get(r));for(r=0;r<this.sortDescriptions.size();r++)e.sortDescriptions.add(this.sortDescriptions.get(r));for(r=0;r<this.filterExpressions.size();r++)e.filterExpressions.add(this.filterExpressions.get(r));for(r=0;r<this.summaryDescriptions.size();r++)e.summaryDescriptions.add(this.summaryDescriptions.get(r));return e.pageSizeRequested=this.pageSizeRequested,e.maxCachedPages=this.maxCachedPages,e.baseUri=this.baseUri,e.entitySet=this.entitySet,e.timeoutMilliseconds=this.timeoutMilliseconds,e.isAggregationSupportedByServer=this.isAggregationSupportedByServer,e.enableJsonp=this.enableJsonp,e.fixedFullCount=this.fixedFullCount,e.provideAggregationParameter=this.provideAggregationParameter,e.provideAggregatedCount=this.provideAggregatedCount,e.provideFilterParameter=this.provideFilterParameter,e.provideFullCount=this.provideFullCount,e.provideOrderByParameter=this.provideOrderByParameter,e.provideUri=this.provideUri,e.performFetch=this.performFetch,e.providePagingParameter=this.providePagingParameter,e.provideItems=this.provideItems,e.provideDesiredPropertiesParameter=this.provideDesiredPropertiesParameter,e},t}(t.VirtualDataSource);e.Entity=u,e.EntityProperty=i,e.EntitySet=p,e.LinkedList=s,e.LinkedListNode=a,e.ODataDataSourcePage=l,e.ODataSchemaProvider=h,e.ODataVirtualDataSource=g,e.ODataVirtualDataSourceDataProvider=y,e.ODataVirtualDataSourceDataProviderWorker=d,e.ODataVirtualDataSourceDataProviderWorkerSettings=m,e.ODataVirtualDataSourceProviderTaskDataHolder=f,e.RestVirtualDataSource=D,e.RestVirtualDataSourceDataProvider=P,e.RestVirtualDataSourceDataProviderWorker=b,e.RestVirtualDataSourceDataProviderWorkerSettings=S,e.RestVirtualDataSourcePage=v,e.RestVirtualDataSourceProviderTaskDataHolder=_,e.Schema=c,e.first=n,e.toArray=o,Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -10,7 +10,7 @@ import { ODataSchemaProvider } from "./ODataSchemaProvider";
10
10
  import { ODataDataSourceFilterExpressionVisitor } from "igniteui-webcomponents-core";
11
11
  import { ListSortDirection } from "igniteui-webcomponents-core";
12
12
  import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
13
- import { SummaryOperand } from "igniteui-webcomponents-core";
13
+ import { DataSourceSummaryOperand } from "igniteui-webcomponents-core";
14
14
  import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
15
15
  import { DefaultSummaryResult } from "igniteui-webcomponents-core";
16
16
  import { TransactionType } from "igniteui-webcomponents-core";
@@ -371,26 +371,26 @@ export let ODataVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
371
371
  let first = true;
372
372
  let countExists = false;
373
373
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
374
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
374
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
375
375
  continue;
376
376
  }
377
377
  if (!first) {
378
378
  result += ", ";
379
379
  }
380
380
  switch (summary.operand) {
381
- case SummaryOperand.Average:
381
+ case DataSourceSummaryOperand.Average:
382
382
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
383
383
  break;
384
- case SummaryOperand.Min:
384
+ case DataSourceSummaryOperand.Min:
385
385
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
386
386
  break;
387
- case SummaryOperand.Max:
387
+ case DataSourceSummaryOperand.Max:
388
388
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
389
389
  break;
390
- case SummaryOperand.Sum:
390
+ case DataSourceSummaryOperand.Sum:
391
391
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
392
392
  break;
393
- case SummaryOperand.Count:
393
+ case DataSourceSummaryOperand.Count:
394
394
  result += "$count as $__count";
395
395
  countExists = true;
396
396
  break;
@@ -405,19 +405,19 @@ export let ODataVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
405
405
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
406
406
  let summaryName = summary.propertyName;
407
407
  switch (summary.operand) {
408
- case SummaryOperand.Average:
408
+ case DataSourceSummaryOperand.Average:
409
409
  summaryName += "Average";
410
410
  break;
411
- case SummaryOperand.Min:
411
+ case DataSourceSummaryOperand.Min:
412
412
  summaryName += "Min";
413
413
  break;
414
- case SummaryOperand.Max:
414
+ case DataSourceSummaryOperand.Max:
415
415
  summaryName += "Max";
416
416
  break;
417
- case SummaryOperand.Sum:
417
+ case DataSourceSummaryOperand.Sum:
418
418
  summaryName += "Sum";
419
419
  break;
420
- case SummaryOperand.Count:
420
+ case DataSourceSummaryOperand.Count:
421
421
  summaryName = "$__count";
422
422
  break;
423
423
  }
@@ -9,7 +9,7 @@ import { Convert } from "igniteui-webcomponents-core";
9
9
  import { ODataDataSourceFilterExpressionVisitor } from "igniteui-webcomponents-core";
10
10
  import { ListSortDirection } from "igniteui-webcomponents-core";
11
11
  import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
12
- import { SummaryOperand } from "igniteui-webcomponents-core";
12
+ import { DataSourceSummaryOperand } from "igniteui-webcomponents-core";
13
13
  import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
14
14
  import { DefaultSummaryResult } from "igniteui-webcomponents-core";
15
15
  import { LocalDataSource } from "igniteui-webcomponents-core";
@@ -485,26 +485,26 @@ export let RestVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
485
485
  let first = true;
486
486
  let countExists = false;
487
487
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
488
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
488
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
489
489
  continue;
490
490
  }
491
491
  if (!first) {
492
492
  result += ", ";
493
493
  }
494
494
  switch (summary.operand) {
495
- case SummaryOperand.Average:
495
+ case DataSourceSummaryOperand.Average:
496
496
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
497
497
  break;
498
- case SummaryOperand.Min:
498
+ case DataSourceSummaryOperand.Min:
499
499
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
500
500
  break;
501
- case SummaryOperand.Max:
501
+ case DataSourceSummaryOperand.Max:
502
502
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
503
503
  break;
504
- case SummaryOperand.Sum:
504
+ case DataSourceSummaryOperand.Sum:
505
505
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
506
506
  break;
507
- case SummaryOperand.Count:
507
+ case DataSourceSummaryOperand.Count:
508
508
  result += "$count as $__count";
509
509
  countExists = true;
510
510
  break;
@@ -519,19 +519,19 @@ export let RestVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
519
519
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
520
520
  let summaryName = summary.propertyName;
521
521
  switch (summary.operand) {
522
- case SummaryOperand.Average:
522
+ case DataSourceSummaryOperand.Average:
523
523
  summaryName += "Average";
524
524
  break;
525
- case SummaryOperand.Min:
525
+ case DataSourceSummaryOperand.Min:
526
526
  summaryName += "Min";
527
527
  break;
528
- case SummaryOperand.Max:
528
+ case DataSourceSummaryOperand.Max:
529
529
  summaryName += "Max";
530
530
  break;
531
- case SummaryOperand.Sum:
531
+ case DataSourceSummaryOperand.Sum:
532
532
  summaryName += "Sum";
533
533
  break;
534
- case SummaryOperand.Count:
534
+ case DataSourceSummaryOperand.Count:
535
535
  summaryName = "$__count";
536
536
  break;
537
537
  }
@@ -11,7 +11,7 @@ import { ODataSchemaProvider } from "./ODataSchemaProvider";
11
11
  import { ODataDataSourceFilterExpressionVisitor } from "igniteui-webcomponents-core";
12
12
  import { ListSortDirection } from "igniteui-webcomponents-core";
13
13
  import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
14
- import { SummaryOperand } from "igniteui-webcomponents-core";
14
+ import { DataSourceSummaryOperand } from "igniteui-webcomponents-core";
15
15
  import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
16
16
  import { DefaultSummaryResult } from "igniteui-webcomponents-core";
17
17
  import { TransactionType } from "igniteui-webcomponents-core";
@@ -508,26 +508,26 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
508
508
  try {
509
509
  for (var _b = tslib_1.__values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
510
510
  var summary = _c.value;
511
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
511
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
512
512
  continue;
513
513
  }
514
514
  if (!first) {
515
515
  result += ", ";
516
516
  }
517
517
  switch (summary.operand) {
518
- case SummaryOperand.Average:
518
+ case DataSourceSummaryOperand.Average:
519
519
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
520
520
  break;
521
- case SummaryOperand.Min:
521
+ case DataSourceSummaryOperand.Min:
522
522
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
523
523
  break;
524
- case SummaryOperand.Max:
524
+ case DataSourceSummaryOperand.Max:
525
525
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
526
526
  break;
527
- case SummaryOperand.Sum:
527
+ case DataSourceSummaryOperand.Sum:
528
528
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
529
529
  break;
530
- case SummaryOperand.Count:
530
+ case DataSourceSummaryOperand.Count:
531
531
  result += "$count as $__count";
532
532
  countExists = true;
533
533
  break;
@@ -559,19 +559,19 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
559
559
  var summary = _c.value;
560
560
  var summaryName = summary.propertyName;
561
561
  switch (summary.operand) {
562
- case SummaryOperand.Average:
562
+ case DataSourceSummaryOperand.Average:
563
563
  summaryName += "Average";
564
564
  break;
565
- case SummaryOperand.Min:
565
+ case DataSourceSummaryOperand.Min:
566
566
  summaryName += "Min";
567
567
  break;
568
- case SummaryOperand.Max:
568
+ case DataSourceSummaryOperand.Max:
569
569
  summaryName += "Max";
570
570
  break;
571
- case SummaryOperand.Sum:
571
+ case DataSourceSummaryOperand.Sum:
572
572
  summaryName += "Sum";
573
573
  break;
574
- case SummaryOperand.Count:
574
+ case DataSourceSummaryOperand.Count:
575
575
  summaryName = "$__count";
576
576
  break;
577
577
  }
@@ -10,7 +10,7 @@ import { Convert } from "igniteui-webcomponents-core";
10
10
  import { ODataDataSourceFilterExpressionVisitor } from "igniteui-webcomponents-core";
11
11
  import { ListSortDirection } from "igniteui-webcomponents-core";
12
12
  import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
13
- import { SummaryOperand } from "igniteui-webcomponents-core";
13
+ import { DataSourceSummaryOperand } from "igniteui-webcomponents-core";
14
14
  import { DataSourceSummaryScope } from "igniteui-webcomponents-core";
15
15
  import { DefaultSummaryResult } from "igniteui-webcomponents-core";
16
16
  import { LocalDataSource } from "igniteui-webcomponents-core";
@@ -622,26 +622,26 @@ var RestVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (funct
622
622
  try {
623
623
  for (var _b = tslib_1.__values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
624
624
  var summary = _c.value;
625
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
625
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
626
626
  continue;
627
627
  }
628
628
  if (!first) {
629
629
  result += ", ";
630
630
  }
631
631
  switch (summary.operand) {
632
- case SummaryOperand.Average:
632
+ case DataSourceSummaryOperand.Average:
633
633
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
634
634
  break;
635
- case SummaryOperand.Min:
635
+ case DataSourceSummaryOperand.Min:
636
636
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
637
637
  break;
638
- case SummaryOperand.Max:
638
+ case DataSourceSummaryOperand.Max:
639
639
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
640
640
  break;
641
- case SummaryOperand.Sum:
641
+ case DataSourceSummaryOperand.Sum:
642
642
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
643
643
  break;
644
- case SummaryOperand.Count:
644
+ case DataSourceSummaryOperand.Count:
645
645
  result += "$count as $__count";
646
646
  countExists = true;
647
647
  break;
@@ -673,19 +673,19 @@ var RestVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (funct
673
673
  var summary = _c.value;
674
674
  var summaryName = summary.propertyName;
675
675
  switch (summary.operand) {
676
- case SummaryOperand.Average:
676
+ case DataSourceSummaryOperand.Average:
677
677
  summaryName += "Average";
678
678
  break;
679
- case SummaryOperand.Min:
679
+ case DataSourceSummaryOperand.Min:
680
680
  summaryName += "Min";
681
681
  break;
682
- case SummaryOperand.Max:
682
+ case DataSourceSummaryOperand.Max:
683
683
  summaryName += "Max";
684
684
  break;
685
- case SummaryOperand.Sum:
685
+ case DataSourceSummaryOperand.Sum:
686
686
  summaryName += "Sum";
687
687
  break;
688
- case SummaryOperand.Count:
688
+ case DataSourceSummaryOperand.Count:
689
689
  summaryName = "$__count";
690
690
  break;
691
691
  }
@@ -5,7 +5,7 @@
5
5
  GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
6
6
  */
7
7
 
8
- import { fromEnum, XName, DataSourceSchemaPropertyType, XDocument, XmlNodeType, typeCast, XElement, ODataDataSourceSchema, XNamespace, AsyncVirtualDataSourceProviderTaskDataHolder, markType, AsyncVirtualDataSourceProviderWorker, SortDescriptionCollection, ListSortDirection, DataSourceSummaryScope, stringIsNullOrEmpty, Convert, DefaultSectionInformation, SummaryOperand, DefaultSummaryResult, AsyncVirtualDataTask, AsyncDataSourcePageTaskHolder, ODataDataSourceFilterExpressionVisitor, TransactionType, AsyncVirtualDataSourceDataProviderWorkerSettings, Base, FilterExpressionCollection, SummaryDescriptionCollection, DataSourcePageRequestPriority, runOn, DataSourceDataProviderSchemaChangedEventArgs, stringContains, IDataSourceVirtualDataProvider_$type, VirtualDataSource, LocalDataSource } from 'igniteui-webcomponents-core';
8
+ import { fromEnum, XName, DataSourceSchemaPropertyType, XDocument, XmlNodeType, typeCast, XElement, ODataDataSourceSchema, XNamespace, AsyncVirtualDataSourceProviderTaskDataHolder, markType, AsyncVirtualDataSourceProviderWorker, SortDescriptionCollection, ListSortDirection, DataSourceSummaryScope, stringIsNullOrEmpty, Convert, DefaultSectionInformation, DataSourceSummaryOperand, DefaultSummaryResult, AsyncVirtualDataTask, AsyncDataSourcePageTaskHolder, ODataDataSourceFilterExpressionVisitor, TransactionType, AsyncVirtualDataSourceDataProviderWorkerSettings, Base, FilterExpressionCollection, SummaryDescriptionCollection, DataSourcePageRequestPriority, runOn, DataSourceDataProviderSchemaChangedEventArgs, stringContains, IDataSourceVirtualDataProvider_$type, VirtualDataSource, LocalDataSource } from 'igniteui-webcomponents-core';
9
9
 
10
10
  class EntityProperty {
11
11
  constructor(name, schemaType) {
@@ -861,26 +861,26 @@ let ODataVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
861
861
  let first = true;
862
862
  let countExists = false;
863
863
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
864
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
864
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
865
865
  continue;
866
866
  }
867
867
  if (!first) {
868
868
  result += ", ";
869
869
  }
870
870
  switch (summary.operand) {
871
- case SummaryOperand.Average:
871
+ case DataSourceSummaryOperand.Average:
872
872
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
873
873
  break;
874
- case SummaryOperand.Min:
874
+ case DataSourceSummaryOperand.Min:
875
875
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
876
876
  break;
877
- case SummaryOperand.Max:
877
+ case DataSourceSummaryOperand.Max:
878
878
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
879
879
  break;
880
- case SummaryOperand.Sum:
880
+ case DataSourceSummaryOperand.Sum:
881
881
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
882
882
  break;
883
- case SummaryOperand.Count:
883
+ case DataSourceSummaryOperand.Count:
884
884
  result += "$count as $__count";
885
885
  countExists = true;
886
886
  break;
@@ -895,19 +895,19 @@ let ODataVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
895
895
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
896
896
  let summaryName = summary.propertyName;
897
897
  switch (summary.operand) {
898
- case SummaryOperand.Average:
898
+ case DataSourceSummaryOperand.Average:
899
899
  summaryName += "Average";
900
900
  break;
901
- case SummaryOperand.Min:
901
+ case DataSourceSummaryOperand.Min:
902
902
  summaryName += "Min";
903
903
  break;
904
- case SummaryOperand.Max:
904
+ case DataSourceSummaryOperand.Max:
905
905
  summaryName += "Max";
906
906
  break;
907
- case SummaryOperand.Sum:
907
+ case DataSourceSummaryOperand.Sum:
908
908
  summaryName += "Sum";
909
909
  break;
910
- case SummaryOperand.Count:
910
+ case DataSourceSummaryOperand.Count:
911
911
  summaryName = "$__count";
912
912
  break;
913
913
  }
@@ -2366,26 +2366,26 @@ let RestVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
2366
2366
  let first = true;
2367
2367
  let countExists = false;
2368
2368
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
2369
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
2369
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
2370
2370
  continue;
2371
2371
  }
2372
2372
  if (!first) {
2373
2373
  result += ", ";
2374
2374
  }
2375
2375
  switch (summary.operand) {
2376
- case SummaryOperand.Average:
2376
+ case DataSourceSummaryOperand.Average:
2377
2377
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
2378
2378
  break;
2379
- case SummaryOperand.Min:
2379
+ case DataSourceSummaryOperand.Min:
2380
2380
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
2381
2381
  break;
2382
- case SummaryOperand.Max:
2382
+ case DataSourceSummaryOperand.Max:
2383
2383
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
2384
2384
  break;
2385
- case SummaryOperand.Sum:
2385
+ case DataSourceSummaryOperand.Sum:
2386
2386
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
2387
2387
  break;
2388
- case SummaryOperand.Count:
2388
+ case DataSourceSummaryOperand.Count:
2389
2389
  result += "$count as $__count";
2390
2390
  countExists = true;
2391
2391
  break;
@@ -2400,19 +2400,19 @@ let RestVirtualDataSourceDataProviderWorker = /*@__PURE__*/ (() => {
2400
2400
  for (let summary of this.iterSummaries(this._summaryDescriptions)) {
2401
2401
  let summaryName = summary.propertyName;
2402
2402
  switch (summary.operand) {
2403
- case SummaryOperand.Average:
2403
+ case DataSourceSummaryOperand.Average:
2404
2404
  summaryName += "Average";
2405
2405
  break;
2406
- case SummaryOperand.Min:
2406
+ case DataSourceSummaryOperand.Min:
2407
2407
  summaryName += "Min";
2408
2408
  break;
2409
- case SummaryOperand.Max:
2409
+ case DataSourceSummaryOperand.Max:
2410
2410
  summaryName += "Max";
2411
2411
  break;
2412
- case SummaryOperand.Sum:
2412
+ case DataSourceSummaryOperand.Sum:
2413
2413
  summaryName += "Sum";
2414
2414
  break;
2415
- case SummaryOperand.Count:
2415
+ case DataSourceSummaryOperand.Count:
2416
2416
  summaryName = "$__count";
2417
2417
  break;
2418
2418
  }
@@ -5,7 +5,7 @@
5
5
  GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
6
6
  */
7
7
 
8
- import { fromEnum, XName, DataSourceSchemaPropertyType, XDocument, XmlNodeType, typeCast, XElement, ODataDataSourceSchema, XNamespace, markType, AsyncVirtualDataSourceProviderTaskDataHolder, SortDescriptionCollection, ListSortDirection, DataSourceSummaryScope, stringIsNullOrEmpty, Convert, DefaultSectionInformation, SummaryOperand, DefaultSummaryResult, AsyncVirtualDataTask, AsyncDataSourcePageTaskHolder, ODataDataSourceFilterExpressionVisitor, TransactionType, AsyncVirtualDataSourceProviderWorker, AsyncVirtualDataSourceDataProviderWorkerSettings, FilterExpressionCollection, SummaryDescriptionCollection, DataSourcePageRequestPriority, runOn, DataSourceDataProviderSchemaChangedEventArgs, stringContains, Base, IDataSourceVirtualDataProvider_$type, VirtualDataSource, LocalDataSource } from 'igniteui-webcomponents-core';
8
+ import { fromEnum, XName, DataSourceSchemaPropertyType, XDocument, XmlNodeType, typeCast, XElement, ODataDataSourceSchema, XNamespace, markType, AsyncVirtualDataSourceProviderTaskDataHolder, SortDescriptionCollection, ListSortDirection, DataSourceSummaryScope, stringIsNullOrEmpty, Convert, DefaultSectionInformation, DataSourceSummaryOperand, DefaultSummaryResult, AsyncVirtualDataTask, AsyncDataSourcePageTaskHolder, ODataDataSourceFilterExpressionVisitor, TransactionType, AsyncVirtualDataSourceProviderWorker, AsyncVirtualDataSourceDataProviderWorkerSettings, FilterExpressionCollection, SummaryDescriptionCollection, DataSourcePageRequestPriority, runOn, DataSourceDataProviderSchemaChangedEventArgs, stringContains, Base, IDataSourceVirtualDataProvider_$type, VirtualDataSource, LocalDataSource } from 'igniteui-webcomponents-core';
9
9
  import { __values, __extends, __generator } from 'tslib';
10
10
 
11
11
  var EntityProperty = /** @class */ /*@__PURE__*/ (function () {
@@ -1137,26 +1137,26 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
1137
1137
  try {
1138
1138
  for (var _b = __values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
1139
1139
  var summary = _c.value;
1140
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
1140
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
1141
1141
  continue;
1142
1142
  }
1143
1143
  if (!first) {
1144
1144
  result += ", ";
1145
1145
  }
1146
1146
  switch (summary.operand) {
1147
- case SummaryOperand.Average:
1147
+ case DataSourceSummaryOperand.Average:
1148
1148
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
1149
1149
  break;
1150
- case SummaryOperand.Min:
1150
+ case DataSourceSummaryOperand.Min:
1151
1151
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
1152
1152
  break;
1153
- case SummaryOperand.Max:
1153
+ case DataSourceSummaryOperand.Max:
1154
1154
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
1155
1155
  break;
1156
- case SummaryOperand.Sum:
1156
+ case DataSourceSummaryOperand.Sum:
1157
1157
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
1158
1158
  break;
1159
- case SummaryOperand.Count:
1159
+ case DataSourceSummaryOperand.Count:
1160
1160
  result += "$count as $__count";
1161
1161
  countExists = true;
1162
1162
  break;
@@ -1188,19 +1188,19 @@ var ODataVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (func
1188
1188
  var summary = _c.value;
1189
1189
  var summaryName = summary.propertyName;
1190
1190
  switch (summary.operand) {
1191
- case SummaryOperand.Average:
1191
+ case DataSourceSummaryOperand.Average:
1192
1192
  summaryName += "Average";
1193
1193
  break;
1194
- case SummaryOperand.Min:
1194
+ case DataSourceSummaryOperand.Min:
1195
1195
  summaryName += "Min";
1196
1196
  break;
1197
- case SummaryOperand.Max:
1197
+ case DataSourceSummaryOperand.Max:
1198
1198
  summaryName += "Max";
1199
1199
  break;
1200
- case SummaryOperand.Sum:
1200
+ case DataSourceSummaryOperand.Sum:
1201
1201
  summaryName += "Sum";
1202
1202
  break;
1203
- case SummaryOperand.Count:
1203
+ case DataSourceSummaryOperand.Count:
1204
1204
  summaryName = "$__count";
1205
1205
  break;
1206
1206
  }
@@ -3032,26 +3032,26 @@ var RestVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (funct
3032
3032
  try {
3033
3033
  for (var _b = __values(this.iterSummaries(this._summaryDescriptions)), _c = _b.next(); !_c.done; _c = _b.next()) {
3034
3034
  var summary = _c.value;
3035
- if (summary.operand == SummaryOperand.Count && (ignoreCount || countExists)) {
3035
+ if (summary.operand == DataSourceSummaryOperand.Count && (ignoreCount || countExists)) {
3036
3036
  continue;
3037
3037
  }
3038
3038
  if (!first) {
3039
3039
  result += ", ";
3040
3040
  }
3041
3041
  switch (summary.operand) {
3042
- case SummaryOperand.Average:
3042
+ case DataSourceSummaryOperand.Average:
3043
3043
  result += summary.propertyName + " with average as " + summary.propertyName + "Average";
3044
3044
  break;
3045
- case SummaryOperand.Min:
3045
+ case DataSourceSummaryOperand.Min:
3046
3046
  result += summary.propertyName + " with min as " + summary.propertyName + "Min";
3047
3047
  break;
3048
- case SummaryOperand.Max:
3048
+ case DataSourceSummaryOperand.Max:
3049
3049
  result += summary.propertyName + " with max as " + summary.propertyName + "Max";
3050
3050
  break;
3051
- case SummaryOperand.Sum:
3051
+ case DataSourceSummaryOperand.Sum:
3052
3052
  result += summary.propertyName + " with sum as " + summary.propertyName + "Sum";
3053
3053
  break;
3054
- case SummaryOperand.Count:
3054
+ case DataSourceSummaryOperand.Count:
3055
3055
  result += "$count as $__count";
3056
3056
  countExists = true;
3057
3057
  break;
@@ -3083,19 +3083,19 @@ var RestVirtualDataSourceDataProviderWorker = /** @class */ /*@__PURE__*/ (funct
3083
3083
  var summary = _c.value;
3084
3084
  var summaryName = summary.propertyName;
3085
3085
  switch (summary.operand) {
3086
- case SummaryOperand.Average:
3086
+ case DataSourceSummaryOperand.Average:
3087
3087
  summaryName += "Average";
3088
3088
  break;
3089
- case SummaryOperand.Min:
3089
+ case DataSourceSummaryOperand.Min:
3090
3090
  summaryName += "Min";
3091
3091
  break;
3092
- case SummaryOperand.Max:
3092
+ case DataSourceSummaryOperand.Max:
3093
3093
  summaryName += "Max";
3094
3094
  break;
3095
- case SummaryOperand.Sum:
3095
+ case DataSourceSummaryOperand.Sum:
3096
3096
  summaryName += "Sum";
3097
3097
  break;
3098
- case SummaryOperand.Count:
3098
+ case DataSourceSummaryOperand.Count:
3099
3099
  summaryName = "$__count";
3100
3100
  break;
3101
3101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-webcomponents-datasources",
3
- "version": "3.2.3",
3
+ "version": "3.5.0",
4
4
  "description": "Reference custom data providers for the Ignite UI Web Components data source.",
5
5
  "homepage": "https://github.com/IgniteUI/igniteui-webcomponents-datasources",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "tslib": "^2.3.1"
19
19
  },
20
20
  "peerDependencies": {
21
- "igniteui-webcomponents-core": "3.2.3"
21
+ "igniteui-webcomponents-core": "3.5.0"
22
22
  },
23
23
  "sideEffects": false,
24
24
  "typings": "igniteui-webcomponents-datasources.d.ts",