/*!@license
* Infragistics.Web.ClientUI infragistics.olapflatdatasource.js 14.1.20141.1020
*
* Copyright (c) 2011-2014 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends:
*     jquery-1.4.4.js
*     jquery.ui.core.js
*     jquery.ui.widget.js
*     infragistics.util.js
*/
$.ig=$.ig||{};(function($){var $$t={};$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["AbstractEnumerable:a","Object:b","Type:c","Boolean:d","ValueType:e","Void:f","String:g","IComparable:h","Number:i","Number:j","Single:k","Number:l","String:m","Array:n","RegExp:o","RuntimeTypeHandle:p","MethodInfo:q","MethodBase:r","MemberInfo:s","ParameterInfo:t","TypeCode:u","Enum:v","ConstructorInfo:w","IEnumerable:x","IEnumerator:y","Func$1:z","MulticastDelegate:aa","IntPtr:ab","AbstractEnumerator:ac","IEnumerable$1:ad","IEnumerator$1:ae","ICollection$1:af","IList$1:ag","IArrayList:ah","Array:ai","ICollection:aj","CompareCallback:ak","List$1:al","IList:am","IDisposable:an","IArray:ao","Script:ap","Date:aq","Date:ar","Number:as","Func$3:at","Action$1:au","IDictionary$2:aw","Dictionary$2:ax","IDictionary:ay","Dictionary:az","IEqualityComparer$1:a0","KeyValuePair$2:a1","NotImplementedException:a2","Error:a3","GenericEnumerable$1:a4","GenericEnumerator$1:a5","INotifyCollectionChanged:a6","NotifyCollectionChangedEventHandler:a7","NotifyCollectionChangedEventArgs:a8","EventArgs:a9","NotifyCollectionChangedAction:ba","ObservableCollection$1:bd","INotifyPropertyChanged:be","PropertyChangedEventHandler:bf","PropertyChangedEventArgs:bg","Delegate:bh","ReadOnlyCollection$1:bj","NameValueCollection:bl","IOrderedEnumerable$1:bu","Enumerable:bz","Func$2:b0","SortedList$1:b1","Math:b2","Number:b3","Number:b4","Number:b5","Number:b6","Number:b7","Number:b8","Number:b9","ArgumentNullException:ca","AggregateException:cn","ArgumentException:co","AsyncCompletedEventArgs:cq","ListSortDirection:cs","Environment:cu","InvalidOperationException:cv","Debug:cw","ICredentials:cz","NetworkCredential:c0","Uri:c1","UploadStringCompletedEventHandler:c2","UploadStringCompletedEventArgs:c3","WebClient:c4","Encoding:c5","UTF8Encoding:c6","UnicodeEncoding:c7","WebHeaderCollection:c8","Task$1:c9","Task:da","JQueryPromise:db","Action:dc","TaskStatus:dd","TaskCompletionSource$1:de","JQueryDeferred:df","JQuery:dg","JQueryObject:dh","Element:di","ElementAttributeCollection:dj","ElementCollection:dk","WebStyle:dl","ElementNodeType:dm","Document:dn","EventListener:dp","IElementEventHandler:dq","ElementEventHandler:dr","ElementAttribute:ds","JQueryPosition:dt","JQueryCallback:du","JQueryEvent:dv","JQueryUICallback:dw","FaultCode:dx","FaultException:dy","FaultReason:dz","FaultException$1:d0","StringBuilder:d1","TaskFactory:d4","Tuple$2:d5","JavaScriptSerializer:d6","XObject:f9","XmlNode:ga","XmlNodeList:gb","XmlNamedNodeMap:gc","XmlNodeType:gd","XmlDocument:ge","XmlElement:gf","XmlLinkedNode:gg","XmlAttribute:gh","XmlUtils:gi","XAttribute:gj","XNode:gk","XContainer:gl","XElement:gm","XName:gn","XNamespace:go","XDocument:gp"]);$.ig.util.defType("TaskStatus:dd","Enum",{init:function(){$.ig.$ep.init.call(this)},$type:new $.ig.Type("TaskStatus",$.ig.$ep.$type)},true);$.ig.util.defType("ListSortDirection:cs","Enum",{init:function(){$.ig.$ep.init.call(this)},$type:new $.ig.Type("ListSortDirection",$.ig.$ep.$type)},true);$.ig.util.defType("NotifyCollectionChangedAction:ba","Enum",{init:function(){$.ig.$ep.init.call(this)},$type:new $.ig.Type("NotifyCollectionChangedAction",$.ig.$ep.$type)},true);$.ig.util.defType("AbstractEnumerable:a","Object",{a:null,init:function(a){$.ig.$op.init.call(this);this.a=a},getEnumerator:function(){return new $$t.ac(this.a().getEnumerator())},$type:new $.ig.Type("AbstractEnumerable",$.ig.$ot,[$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("AbstractEnumerator:ac","Object",{a:null,init:function(a){$.ig.$op.init.call(this);this.a=a},current:function(){return this.a.current()},moveNext:function(){return this.a.moveNext()},reset:function(){this.a.reset()},$type:new $.ig.Type("AbstractEnumerator",$.ig.$ot,[$.ig.IEnumerator.prototype.$type])},true);$.ig.util.defType("IEnumerable$1:ad","Object",{$type:new $.ig.Type("IEnumerable$1",null,[$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("ICollection$1:af","Object",{$type:new $.ig.Type("ICollection$1",null,[$$t.$ad.$type.specialize(0),$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("IList$1:ag","Object",{$type:new $.ig.Type("IList$1",null,[$$t.$af.$type.specialize(0),$$t.$ad.$type.specialize(0),$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("IArrayList:ah","Object",{$type:new $.ig.Type("IArrayList",null)},true);$.ig.util.defType("List$1:al","Object",{$t:null,__inner:null,init:function($t,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}this.e={};this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.__inner=new $.ig.Array},init1:function($t,initNumber,a){this.e={};this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.__inner=new $.ig.Array;if(this.b(0,a)){return}var c=a.getEnumerator();while(c.moveNext()){var b=c.current();this.add1(b)}},init2:function($t,initNumber,a){this.e={};this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.__inner=new $.ig.Array},o:function(a,b){this.__inner[a]=b},j:function(a,b){this.__inner.insert(a,b)},f:function(a){this.__inner.add(a)},m:function(a){this.__inner.removeAt(a)},h:function(){this.__inner.clear()},item:function(a,b){if(arguments.length===2){this.o(a,b);return b}else{return this.__inner[a]}},indexOf:function(a){return this.__inner.indexOf(a)},insert:function(a,b){this.j(a,b)},removeAt:function(a){this.m(a)},count:function(){return this.__inner.length},isReadOnly:function(){return false},add1:function(a){this.f(a)},clear:function(){this.h()},contains1:function(a){return this.__inner.contains(a)},copyTo:function(a,b){for(var c=0;c<this.__inner.length;c++){a[b+c]=this.__inner[c]}},remove1:function(a){var b=this.indexOf(a);if(b<0){return false}this.m(b);return true},getEnumerator:function(){var $self=this;var $iter=function(){return function(){return{$state:0,$this:$self,$current:null,$a:null,$b:null,current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$b=this.$this.__inner.getEnumerator();this.$state=4;break;case 2:this.$a=this.$b.current();this.$current=this.$a;this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$b.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}()};return new $.ig.GenericEnumerator$1(this.$t,$iter())},asArrayList:function(){return this.__inner},b:function(a,collection_){var b=$.ig.util.cast($$t.$ah.$type,collection_);if(b!=null){this.__inner.insertRange1(a,b.asArrayList());return true}var c=$.ig.util.cast($$t.$ao.$type,collection_);if(c!=null){this.__inner.insertRange(a,c.asArray());return true}var d=$.ig.util.cast($$t.$ag.$type.specialize(this.$t),collection_);if(d!=null){for(var e=0;e<d.count();e++){this.__inner.insert(a+e,d.item(e))}return true}var f=$.isArray(collection_)?collection_:null;if(f!=null){this.__inner.insertRange(a,f);return true}return false},insertRange1:function(a,b){if(this.b(a,b)){return}var c=0;var e=b.getEnumerator();while(e.moveNext()){var d=e.current();this.__inner.insert(a+c,d);c++}},insertRange:function(a,b){if(this.b(a,b)){return}var c=0;var e=b.getEnumerator();while(e.moveNext()){var d=e.current();this.__inner.insert(a+c,d);c++}},removeRange:function(a,b){this.__inner.splice(a,b)},copyTo1:function(a,b){this.__inner.copyTo(a,b)},isFixedSize:function(){return false},add:function(a){this.f(a);return this.__inner.length-1},contains:function(a){return this.__inner.contains(a)},indexOf1:function(a){return this.__inner.indexOf(a)},insert1:function(a,b){this.j(a,b)},remove:function(a){var b=this.indexOf1(a);this.m(b)},sort:function(){var $self=this;var a=null;if($self.$t==Number){a=function(b,c){var d=b;var e=c;if(d<e){return-1}if(d==e){return 0}return 1}}else if($self.$t==$.ig.Single.prototype.$type){a=function(b,c){var d=b;var e=c;if(d<e){return-1}if(d==e){return 0}return 1}}else if($self.$t==$.ig.Number.prototype.$type){a=function(b,c){var d=b;var e=c;if(d<e){return-1}if(d==e){return 0}return 1}}else if($self.$t==$$t.$aq.$type){a=function(b,c){var d=b;var e=c;if(d.getTime()<e.getTime()){return-1}if(d.getTime()==e.getTime()){return 0}return 1}}else{a=function(b,c){return b.compareTo(c)}}$self.r(a)},r:function(a){this.__inner.sort(a)},sort1:function(a){var $self=this;$self.__inner.sort(function(b,c){var d=b;var e=c;return a(d,e)})},_capacity:0,capacity:function(value){if(arguments.length===1){this._capacity=value;return value}else{return this._capacity}},addRange:function(a){var c=a.getEnumerator();while(c.moveNext()){var b=c.current();this.__inner.add(b)}},toArray:function(){return this.__inner.slice(0)},forEach:function(a){},isSynchronized:function(){return true},e:null,syncRoot:function(){return this.e},$type:new $.ig.Type("List$1",$.ig.$ot,[$$t.$ag.$type.specialize(0),$$t.$ah.$type,$.ig.IList.prototype.$type])},true);$.ig.util.defType("KeyValuePair$2:a1","ValueType",{$tKey:null,$tValue:null,init:function($tKey,$tValue,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}this.$tKey=$tKey;this.$tValue=$tValue;this.$type=this.$type.specialize(this.$tKey,this.$tValue);$.ig.ValueType.prototype.init.call(this)},a:null,c:null,init1:function($tKey,$tValue,initNumber,a,b){this.$tKey=$tKey;this.$tValue=$tValue;this.$type=this.$type.specialize(this.$tKey,this.$tValue);$.ig.ValueType.prototype.init.call(this);this.a=a;this.c=b},key:function(){return this.a},value:function(){return this.c},$type:new $.ig.Type("KeyValuePair$2",$.ig.ValueType.prototype.$type)},true);$.ig.util.defType("IDictionary$2:aw","Object",{$type:new $.ig.Type("IDictionary$2",null,[$$t.$af.$type.specialize($$t.$a1.$type.specialize(this.$tKey,this.$tValue)),$$t.$ad.$type.specialize($$t.$a1.$type.specialize(this.$tKey,this.$tValue)),$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("Dictionary$2:ax","Object",{$tKey:null,$tValue:null,__inner:null,__keys:null,init:function($tKey,$tValue,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}this.g=null;this._useToString=false;this.a=false;this._needsEnsure=false;this.$tKey=$tKey;this.$tValue=$tValue;this.$type=this.$type.specialize(this.$tKey,this.$tValue);$.ig.$op.init.call(this);this.__inner=new $.ig.Dictionary(0);this.__keys=new $.ig.Dictionary(0)},init1:function($tKey,$tValue,initNumber,a){this.g=null;this._useToString=false;this.a=false;this._needsEnsure=false;this.$tKey=$tKey;this.$tValue=$tValue;this.$type=this.$type.specialize(this.$tKey,this.$tValue);$.ig.$op.init.call(this);this.__inner=new $.ig.Dictionary(1,a);this.__keys=new $.ig.Dictionary(0)},g:null,init2:function($tKey,$tValue,initNumber,a){this.g=null;this._useToString=false;this.a=false;this._needsEnsure=false;this.$tKey=$tKey;this.$tValue=$tValue;this.$type=this.$type.specialize(this.$tKey,this.$tValue);$.ig.$op.init.call(this);this.__inner=new $.ig.Dictionary(0);this.__keys=new $.ig.Dictionary(0);this.g=a},count:function(){return this.__inner.count()},item:function(a,b){if(arguments.length===2){this.__inner.item(this.i(a),b);this.__keys.item(this.i(a),a);return b}else{return this.__inner.item(this.i(a))}},length:function(){return this.__inner.length()},containsKey:function(a){return this.__inner.containsKey(this.i(a))},remove:function(a){var b=this.i(a);if(!this.__keys.containsKey(b)){return false}this.__inner.remove(b);this.__keys.remove(b);return true},clear:function(){this.__inner.clear();this.__keys.clear()},_useToString:false,a:false,_needsEnsure:false,j:function(key_){if(!this.a){this.a=true;this._needsEnsure=typeof key_=="object";if(!this._needsEnsure){this._useToString=!key_.getHashCode}}},i:function(key_){this.j(key_);if(this._needsEnsure){$.ig.util.ensureUniqueId(key_)}if(this.g!=null){return this.g.getHashCode(key_).toString()}if(this._useToString){return key_.toString()}else{return key_.getHashCode().toString()}},add:function(a,b){this.__inner.item(this.i(a),b);this.__keys.item(this.i(a),a)},tryGetValue:function(a,b){if(!this.__inner.containsKey(this.i(a))){b=null;return{ret:false,value:b}}b=this.__inner.item(this.i(a));return{ret:true,value:b};return{value:b}},keys:function(){var $self=this;var $iter=function(){return function(){return{$state:0,$this:$self,$current:null,$a:null,$b:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$b=this.$this.__keys.values().getEnumerator();this.$state=4;break;case 2:this.$a=this.$b.current();this.$current=this.$a;this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$b.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}()};return new $.ig.GenericEnumerable$1(this.$tKey,$iter)},values:function(){var $self=this;var $iter=function(){return function(){return{$state:0,$this:$self,$current:null,$a:null,$b:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$b=this.$this.__inner.values().getEnumerator();this.$state=4;break;case 2:this.$a=this.$b.current();this.$current=this.$a;this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$b.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}()};return new $.ig.GenericEnumerable$1(this.$tValue,$iter)},isReadOnly:function(){return false},add1:function(a){this.add(a.key(),a.value())},contains:function(a){return this.containsKey(a.key())},copyTo:function(a,b){throw new $$t.a2},remove1:function(a){this.remove(a.key());return true},f:function(){var $self=this;var $iter=function(){return function(){return{$state:0,$this:$self,$current:null,$a:null,$b:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$b=this.$this.__keys.values().getEnumerator();this.$state=4;break;case 2:this.$a=this.$b.current();this.$current=new $$t.a1(this.$tKey,this.$tValue,1,this.$a,this.$this.__inner.item(this.$this.i(this.$a)));this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$b.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}()};return new $.ig.GenericEnumerable$1($$t.$a1.$type.specialize(this.$tKey,this.$tValue),$iter)},getEnumerator:function(){return this.f().getEnumerator()},$type:new $.ig.Type("Dictionary$2",$.ig.$ot,[$.ig.IDictionary$2.prototype.$type.specialize(0,1),$.ig.IDictionary.prototype.$type])},true);$.ig.util.defType("GenericEnumerable$1:a4","Object",{$t:null,a:null,init:function($t,a){this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.a=a},getEnumerator:function(){return new $$t.a5(this.$t,this.a().getEnumerator())},$type:new $.ig.Type("GenericEnumerable$1",$.ig.$ot,[$$t.$ad.$type.specialize(0)])},true);$.ig.util.defType("IEnumerator$1:ae","Object",{$type:new $.ig.Type("IEnumerator$1",null,[$.ig.IEnumerator.prototype.$type])},true);$.ig.util.defType("GenericEnumerator$1:a5","Object",{$t:null,a:null,init:function($t,a){this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.a=a},current:function(){return this.a.current()},moveNext:function(){return this.a.moveNext()},reset:function(){this.a.reset()},$type:new $.ig.Type("GenericEnumerator$1",$.ig.$ot,[$$t.$ae.$type.specialize(0)])},true);$.ig.util.defType("INotifyCollectionChanged:a6","Object",{$type:new $.ig.Type("INotifyCollectionChanged",null)},true);$.ig.util.defType("NotifyCollectionChangedEventArgs:a8","EventArgs",{init:function(initNumber,a){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}$$t.$a9.init.call(this);this.f=a;this.c=new $$t.al($.ig.$op.$type,0);this.b=new $$t.al($.ig.$op.$type,0)},init1:function(initNumber,a,b,c){var $self=this;$$t.$a9.init.call(this);this.f=a;this.c=new $$t.al($.ig.$op.$type,0);if(this.f==1||this.f==2){this.c.add(b);this.i=c}if(this.f!=1){this.b=function(){var $ret=new $$t.al($.ig.$op.$type,0);$ret.add(b);return $ret}()}else{this.b=new $$t.al($.ig.$op.$type,0)}this.h=c},init2:function(initNumber,a,b,c,d){var $self=this;$$t.$a9.init.call(this);this.f=a;this.h=d;this.i=d;this.b=function(){var $ret=new $$t.al($.ig.$op.$type,0);$ret.add(b);return $ret}();this.c=function(){var $ret=new $$t.al($.ig.$op.$type,0);$ret.add(c);return $ret}()},f:null,action:function(){return this.f},b:null,newItems:function(){return this.b},h:0,newStartingIndex:function(){return this.h},c:null,oldItems:function(){return this.c},i:0,oldStartingIndex:function(){return this.i},$type:new $.ig.Type("NotifyCollectionChangedEventArgs",$$t.$a9.$type)},true);$.ig.util.defType("ObservableCollection$1:bd","List$1",{$t:null,init:function($t,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}this.$t=$t;this.$type=this.$type.specialize(this.$t);$$t.$al.init.call(this,this.$t)},init1:function($t,initNumber,a){this.$t=$t;this.$type=this.$type.specialize(this.$t);$$t.$al.init1.call(this,this.$t,1,a)},init2:function($t,initNumber,a){this.$t=$t;this.$type=this.$type.specialize(this.$t);$$t.$al.init2.call(this,this.$t,2,a)},o:function(a,b){var c=this.__inner[a];$$t.$al.o.call(this,a,b);if(this.propertyChanged!=null){this.t(new $$t.bg("Item[]"))}if(this.collectionChanged!=null){var d=new $$t.a8(2,2,b,c,a);this.s(d)}},h:function(){$$t.$al.h.call(this);if(this.propertyChanged!=null){this.t(new $$t.bg("Count"));this.t(new $$t.bg("Item[]"))}if(this.collectionChanged!=null){var a=new $$t.a8(0,4);this.s(a)}},j:function(a,b){$$t.$al.j.call(this,a,b);if(this.propertyChanged!=null){this.t(new $$t.bg("Count"));this.t(new $$t.bg("Item[]"))}if(this.collectionChanged!=null){var c=new $$t.a8(1,0,b,a);this.s(c)}},f:function(a){$$t.$al.f.call(this,a);if(this.propertyChanged!=null){this.t(new $$t.bg("Count"));this.t(new $$t.bg("Item[]"))}if(this.collectionChanged!=null){var b=new $$t.a8(1,0,a,this.count()-1);this.s(b)}},m:function(a){var b=this.__inner[a];$$t.$al.m.call(this,a);if(this.propertyChanged!=null){this.t(new $$t.bg("Count"));this.t(new $$t.bg("Item[]"))}if(this.collectionChanged!=null){var c=new $$t.a8(1,1,b,a);this.s(c)}},collectionChanged:null,propertyChanged:null,t:function(a){if(this.propertyChanged!=null){this.propertyChanged(this,a)}},s:function(a){if(this.collectionChanged!=null){this.collectionChanged(this,a)}},$type:new $.ig.Type("ObservableCollection$1",$$t.$al.$type.specialize(0),[$$t.$a6.$type,$$t.$be.$type])},true);$.ig.util.defType("ReadOnlyCollection$1:bj","Object",{$t:null,init:function($t,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}this.c={};this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this)},init1:function($t,initNumber,a){this.c={};this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.$op.init.call(this);this.a=a},a:null,item:function(a,b){if(arguments.length===2){this.a.item(a,b);return b}else{return this.a.item(a)}},indexOf:function(a){return this.a.indexOf(a)},insert:function(a,b){},removeAt:function(a){},count:function(){return this.a.count()},isReadOnly:function(){return true},add1:function(a){},clear:function(){},contains1:function(a){return this.a.contains(a)},copyTo:function(a,b){this.a.copyTo(a,b)},remove1:function(a){return false},getEnumerator:function(){return this.a.getEnumerator()},isFixedSize:function(){return true},add:function(a){return-1},contains:function(a){return this.a.contains(a)},indexOf1:function(a){return this.a.indexOf(a)},insert1:function(a,b){},remove:function(a){},copyTo1:function(a,b){this.a.copyTo(a,b)},b:function(){return this.a},isSynchronized:function(){return true},c:null,syncRoot:function(){return this.c},$type:new $.ig.Type("ReadOnlyCollection$1",$.ig.$ot,[$$t.$ag.$type.specialize(0),$.ig.IList.prototype.$type])},true);$.ig.util.defType("NameValueCollection:bl","Object",{a:null,init:function(){$.ig.$op.init.call(this);this.a=new $$t.ax(String,String,0)},item:function(a,b){if(arguments.length===2){if(this.a.containsKey(a)){this.a.item(a,b)}else{this.a.add(a,b)}return b}else{if(this.a.containsKey(a)){return this.a.item(a)}else{return null}}},$type:new $.ig.Type("NameValueCollection",$.ig.$ot)},true);$.ig.util.defType("IOrderedEnumerable$1:bu","Object",{$type:new $.ig.Type("IOrderedEnumerable$1",null,[$$t.$ad.$type.specialize(0),$.ig.IEnumerable.prototype.$type])},true);$.ig.util.defType("Enumerable:bz","Object",{init:function(){$.ig.$op.init.call(this)},where$1:function($tSource,a){var $self=this;var $iter=function(){return function($tSource,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=7;break;case 2:this.$b=this.$c.current();this.$state=3;break;case 3:if(a(this.$b)){this.$state=4}else{this.$state=6}break;case 4:this.$current=this.$b;this.$state=5;return true;case 5:this.$state=6;break;case 6:this.$state=7;break;case 7:if(this.$c.moveNext()){this.$state=2}else{this.$state=8}break;case 8:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,a)};return new $.ig.GenericEnumerable$1($tSource,$iter)},where$11:function($tSource,a){var $self=this;var $iter=function(){return function($tSource,a){return{$state:0,$this:$self,$current:null,$b:0,$c:null,$d:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$b=0;this.$state=1;break;case 1:this.$d=this.$this.getEnumerator();this.$state=7;break;case 2:this.$c=this.$d.current();this.$state=3;break;case 3:if(a(this.$c,this.$b)){this.$state=4}else{this.$state=6}break;case 4:this.$current=this.$c;this.$state=5;return true;case 5:this.$state=6;break;case 6:this.$b++;this.$state=7;break;case 7:if(this.$d.moveNext()){this.$state=2}else{this.$state=8}break;case 8:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,a)};return new $.ig.GenericEnumerable$1($tSource,$iter)},select$2:function($tSource,$tResult,a){var $self=this;var $iter=function(){return function($tSource,$tResult,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=4;break;case 2:this.$b=this.$c.current();this.$current=a(this.$b);this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$c.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,$tResult,a)};return new $.ig.GenericEnumerable$1($tResult,$iter)},selectMany$2:function($tSource,$tResult,a){var $self=this;var $iter=function(){return function($tSource,$tResult,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,$d:null,$e:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=8;break;case 2:this.$b=this.$c.current();this.$state=3;break;case 3:this.$e=a(this.$b).getEnumerator();this.$state=6;break;case 4:this.$d=this.$e.current();this.$current=this.$d;this.$state=5;return true;case 5:this.$state=6;break;case 6:if(this.$e.moveNext()){this.$state=4}else{this.$state=7}break;case 7:this.$state=8;break;case 8:if(this.$c.moveNext()){this.$state=2}else{this.$state=9}break;case 9:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,$tResult,a)};return new $.ig.GenericEnumerable$1($tResult,$iter)},ofType$1:function($tResult){var $self=this;var $iter=function(){return function($tResult){return{$state:0,$this:$self,$current:null,$a:null,$b:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$b=this.$this.getEnumerator();this.$state=7;break;case 2:this.$a=this.$b.current();this.$state=3;break;case 3:if($.ig.util.cast($tResult,this.$a)!==null){this.$state=4}else{this.$state=6}break;case 4:this.$current=this.$a;this.$state=5;return true;case 5:this.$state=6;break;case 6:this.$state=7;break;case 7:if(this.$b.moveNext()){this.$state=2}else{this.$state=8}break;case 8:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tResult)};return new $.ig.GenericEnumerable$1($tResult,$iter)},last$1:function($tSource){var a=$.ig.util.cast($$t.$ag.$type.specialize($tSource),this);if(a!=null){return a.item(a.count()-1)}var b=null;var d=this.getEnumerator();while(d.moveNext()){var c=d.current();b=c}return b},first$1:function($tSource){var b=this.getEnumerator();while(b.moveNext()){var a=b.current();return a}return null},firstOrDefault$1:function($tSource){var b=this.getEnumerator();while(b.moveNext()){var a=b.current();return a}return null},orderBy$2:function($tSource,$tKey,a){var $self=this;var b=new $$t.b1($tSource,$self);b.sort1(function(c,d){var e=c;var f=d;var g=a(e);var h=a(f);if($.ig.util.cast($$t.$h.$type,g)!==null){return $.ig.util.cast($$t.$h.$type,g).compareTo(h)}else{return g.toString().compareTo(h.toString())}});return b},orderByDescending$2:function($tSource,$tKey,a){var $self=this;var b=new $$t.b1($tSource,$self);b.sort1(function(c,d){var e=d;var f=c;var g=a(e);var h=a(f);if($.ig.util.cast($$t.$h.$type,g)!==null){return $.ig.util.cast($$t.$h.$type,g).compareTo(h)}else{return g.toString().compareTo(h.toString())}});return b},toList$1:function($tSource){var a=new $$t.al($tSource,1,this);return a},d:function(a,b){var $self=this;var $iter=function(){return function(a,b){return{$state:0,$this:$self,$current:null,$c:0,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=a;this.$state=5;break;case 2:this.$current=this.$c;this.$state=3;return true;case 3:this.$state=4;break;case 4:this.$c++;this.$state=5;break;case 5:if(this.$c<b){this.$state=2}else{this.$state=6}break;case 6:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}(a,b)};return new $.ig.GenericEnumerable$1($.ig.Number.prototype.$type,$iter)},concat$1:function($tSource,a){var $self=this;var $iter=function(){return function($tSource,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,$d:null,$e:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=4;break;case 2:this.$b=this.$c.current();this.$current=this.$b;this.$state=3;return true;case 3:this.$state=4;break;case 4:if(this.$c.moveNext()){this.$state=2}else{this.$state=5}break;case 5:this.$state=6;break;case 6:this.$e=a.getEnumerator();this.$state=9;break;case 7:this.$d=this.$e.current();this.$current=this.$d;this.$state=8;return true;case 8:this.$state=9;break;case 9:if(this.$e.moveNext()){this.$state=7}else{this.$state=10}break;case 10:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,a)};return new $.ig.GenericEnumerable$1($tSource,$iter)},max:function(){var a=true;var b=0;var d=this.getEnumerator();while(d.moveNext()){var c=d.current();if(a){a=false;b=c}else{b=Math.max(b,c)}}return b},max$1:function($tSource,a){return this.select$2($tSource,$.ig.Number.prototype.$type,a).max()},min:function(){var a=true;var b=0;var d=this.getEnumerator();while(d.moveNext()){var c=d.current();if(a){a=false;b=c}else{b=Math.min(b,c)}}return b},min$1:function($tSource,a){return this.select$2($tSource,$.ig.Number.prototype.$type,a).max()},count$1:function($tSource){var a=0;var c=this.getEnumerator();while(c.moveNext()){var b=c.current();a++}return a},reverse$1:function($tSource){var $self=this;var $iter=function(){return function($tSource){return{$state:0,$this:$self,$current:null,$a:null,$b:0,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$a=new $$t.al($tSource,1,this.$this);this.$state=1;break;case 1:this.$b=this.$a.count()-1;this.$state=5;break;case 2:this.$current=this.$a.__inner[this.$b];this.$state=3;return true;case 3:this.$state=4;break;case 4:this.$b--;this.$state=5;break;case 5:if(this.$b>0){this.$state=2}else{this.$state=6}break;case 6:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource)};return new $.ig.GenericEnumerable$1($tSource,$iter)},cast$1:function($tResult){if(this==null){throw new $$t.ca("source")}var a=$.ig.util.cast($$t.$ad.$type.specialize($tResult),this);if(a!=null){return a}var b=new $$t.al($tResult,0);var d=this.getEnumerator();while(d.moveNext()){var c=d.current();if($.ig.util.cast($tResult,c)!==null){b.add1(c)}else{b.add1(null)}}return b},take$1:function($tSource,a){var $self=this;var $iter=function(){return function($tSource,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=9;break;case 2:this.$b=this.$c.current();this.$state=3;break;case 3:if(a>0){this.$state=4}else{this.$state=6}break;case 4:a--;this.$current=this.$b;this.$state=5;return true;case 5:this.$state=8;break;case 6:this.$state=-2;return false;case 7:this.$state=8;break;case 8:this.$state=9;break;case 9:if(this.$c.moveNext()){this.$state=2}else{this.$state=10}break;case 10:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,a)};return new $.ig.GenericEnumerable$1($tSource,$iter)},skip$1:function($tSource,a){var $self=this;var $iter=function(){return function($tSource,a){return{$state:0,$this:$self,$current:null,$b:null,$c:null,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$c=this.$this.getEnumerator();this.$state=8;break;case 2:this.$b=this.$c.current();this.$state=3;break;case 3:if(a<=0){this.$state=4}else{this.$state=6}break;case 4:this.$current=this.$b;this.$state=5;return true;case 5:this.$state=7;break;case 6:a--;this.$state=7;break;case 7:this.$state=8;break;case 8:if(this.$c.moveNext()){this.$state=2}else{this.$state=9}break;case 9:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}($tSource,a)};return new $.ig.GenericEnumerable$1($tSource,$iter)},any$1:function($tSource){var b=this.getEnumerator();while(b.moveNext()){var a=b.current();return true}return false},contains$1:function($tSource,value_){var a=this.getEnumerator();while(a.moveNext()){var item_=a.current();if(item_===value_){return true}}return false},union$1:function($tSource,a){return null},toArray$1:function($tSource){var a=new $$t.al($tSource,1,this);return a.asArrayList()},elementAt$1:function($tSource,a){var b=$.ig.util.cast($$t.$ag.$type.specialize($tSource),this);if(b!=null){return b.item(a)
}return this.skip$1($tSource,a).first$1($tSource)},sum:function(){var a=0;var c=this.getEnumerator();while(c.moveNext()){var b=c.current();a+=b}return a},sum$1:function($tSource,a){return this.select$2($tSource,Number,a).sum()},$type:new $.ig.Type("Enumerable",$.ig.$ot)},true);$.ig.util.defType("SortedList$1:b1","List$1",{$tElement:null,init:function($tElement,a){this.$tElement=$tElement;this.$type=this.$type.specialize(this.$tElement);$$t.$al.init1.call(this,this.$tElement,1,a)},getEnumerator:function(){return $$t.$al.getEnumerator.call(this)},$type:new $.ig.Type("SortedList$1",$$t.$al.$type.specialize(0),[$$t.$bu.$type.specialize(0)])},true);$.ig.util.defType("IArray:ao","Object",{$type:new $.ig.Type("IArray",null)},true);$.ig.util.defType("AggregateException:cn","Error",{init:function(initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}$$t.$a3.init.call(this)},init1:function(initNumber,a){$$t.$a3.init1.call(this,1,a)},init2:function(initNumber,a,b){$$t.$a3.init2.call(this,2,a,b)},$type:new $.ig.Type("AggregateException",$$t.$a3.$type)},true);$.ig.util.defType("ArgumentException:co","Error",{init:function(initNumber,a){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}$$t.$a3.init1.call(this,1,a)},init1:function(initNumber,a,b){$$t.$a3.init1.call(this,1,a)},$type:new $.ig.Type("ArgumentException",$$t.$a3.$type)},true);$.ig.util.defType("ArgumentNullException:ca","Error",{init:function(a){$$t.$a3.init1.call(this,1,a+" cannot be null.")},$type:new $.ig.Type("ArgumentNullException",$$t.$a3.$type)},true);$.ig.util.defType("AsyncCompletedEventArgs:cq","EventArgs",{d:null,b:false,f:null,init:function(a,b,c){$$t.$a9.init.call(this);this.b=b;this.d=a;this.f=c},error:function(){return this.d},cancelled:function(){return this.b},userState:function(){return this.f},h:function(){if(this.error()!=null){throw this.error()}},$type:new $.ig.Type("AsyncCompletedEventArgs",$$t.$a9.$type)},true);$.ig.util.defType("Environment:cu","Object",{init:function(){$.ig.$op.init.call(this)},a:function(){return"\n"},$type:new $.ig.Type("Environment",$.ig.$ot)},true);$.ig.util.defType("InvalidOperationException:cv","Error",{init:function(initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}$$t.$a3.init1.call(this,1,"Invalid operation")},init1:function(initNumber,a){$$t.$a3.init1.call(this,1,a)},$type:new $.ig.Type("InvalidOperationException",$$t.$a3.$type)},true);$.ig.util.defType("Debug:cw","Object",{init:function(){$.ig.$op.init.call(this)},b:function(a,b){},c:function(a){},a:function(a){},$type:new $.ig.Type("Debug",$.ig.$ot)},true);$.ig.util.defType("ICredentials:cz","Object",{$type:new $.ig.Type("ICredentials",null)},true);$.ig.util.defType("NetworkCredential:c0","Object",{init:function(initNumber,a,b){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}$$t.$c0.init1.call(this,1,a,b,String.empty())},init1:function(initNumber,a,b,c){$.ig.$op.init.call(this);this.c(a);this.b(b);this.a(c)},getCredential:function(a,b){return this},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("NetworkCredential",$.ig.$ot,[$$t.$cz.$type])},true);$.ig.util.defType("UploadStringCompletedEventArgs:c3","AsyncCompletedEventArgs",{i:null,init:function(a,b,c,d){$$t.$cq.init.call(this,b,c,d);this.i=a},result:function(){this.h();return this.i},$type:new $.ig.Type("UploadStringCompletedEventArgs",$$t.$cq.$type)},true);$.ig.util.defType("WebClient:c4","Object",{init:function(){$.ig.$op.init.call(this);this.c(new $$t.c8)},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},uploadStringCompleted:null,h:function(a,b,c,d){var $self=this;$self.e(a,b,c).i(function(e){if($self.uploadStringCompleted!=null){var f=null;var g=null;try{f=e.m()}catch(e_){g=e_}$self.uploadStringCompleted($self,new $$t.c3(f,g,e.g()==6,d))}})},e:function(a,b,c){var url_=a.value();var method_=b;var data_=c;var contentType_=this.c().item("Content-Type");var credentials_=this.a();var d=$.ig.util.ajax(url_,contentType_,data_,method_,credentials_);return new $$t.c9(String,d,null)},g:function(a,b,c,d){a.e(b)},f:function(a,b,c,d){a.d(new $$t.a3(1,d))},$type:new $.ig.Type("WebClient",$.ig.$ot)},true);$.ig.util.defType("WebHeaderCollection:c8","NameValueCollection",{init:function(){$$t.$bl.init.call(this)},$type:new $.ig.Type("WebHeaderCollection",$$t.$bl.$type)},true);$.ig.util.defType("FaultCode:dx","Object",{init:function(a){$.ig.$op.init.call(this);this.a(a)},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("FaultCode",$.ig.$ot)},true);$.ig.util.defType("FaultException:dy","Error",{init:function(a,b,c){$$t.$a3.init.call(this);this.reason(a);this.code(b);this.action(c)},_action:null,action:function(value){if(arguments.length===1){this._action=value;return value}else{return this._action}},_code:null,code:function(value){if(arguments.length===1){this._code=value;return value}else{return this._code}},_reason:null,reason:function(value){if(arguments.length===1){this._reason=value;return value}else{return this._reason}},$type:new $.ig.Type("FaultException",$$t.$a3.$type)},true);$.ig.util.defType("FaultException$1:d0","FaultException",{$tDetail:null,init:function($tDetail,a,b,c,d){this.$tDetail=$tDetail;this.$type=this.$type.specialize(this.$tDetail);$$t.$dy.init.call(this,b,c,d);this.detail(a)},_detail:null,detail:function(value){if(arguments.length===1){this._detail=value;return value}else{return this._detail}},$type:new $.ig.Type("FaultException$1",$$t.$dy.$type)},true);$.ig.util.defType("FaultReason:dz","Object",{a:null,init:function(a){$.ig.$op.init.call(this);this.a=a},toString:function(){return this.a},$type:new $.ig.Type("FaultReason",$.ig.$ot)},true);$.ig.util.defType("StringBuilder:d1","Object",{_internal:null,internal:function(value){if(arguments.length===1){this._internal=value;return value}else{return this._internal}},init:function(){$.ig.$op.init.call(this);this._internal=[]},d:function(str_){this._internal.push(str_);return this},e:function(a){var str_=a.b();this._internal.push(str_);return this},c:function(chr_){this._internal.push(chr_);return this},f:function(str_){this._internal.push(str_+String.fromCharCode(10));return this},g:function(index_,chr_){this._internal.splice(index_,0,chr_);return this},h:function(index_,str_){this._internal.splice(index_,0,str_);return this},i:function(startIndex_,length_){this._internal.splice(startIndex_,length_);return this},b:function(){return this._internal.join("")},$type:new $.ig.Type("StringBuilder",$.ig.$ot)},true);$.ig.util.defType("NotImplementedException:a2","Error",{init:function(){$$t.$a3.init1.call(this,1,"not implemented")},$type:new $.ig.Type("NotImplementedException",$$t.$a3.$type)},true);$.ig.util.defType("Encoding:c5","Object",{init:function(){$.ig.$op.init.call(this)},uTF8:function(){if($$t.$c5.g==null){$$t.$c5.g=new $$t.c6}return $$t.$c5.g},unicode:function(){if($$t.$c5.f==null){$$t.$c5.f=new $$t.c7}return $$t.$c5.f},getString:function(a,b,c){return""},getBytes2:function(a,b,c,d,e){},getBytes:function(a,b,c){var d=new Array(this.getByteCount(a,b,c));this.getBytes2(a,b,c,d,0);return d},getBytes1:function(a){if(a==null){throw new $$t.ca("input")}var b=new Array(a.length);for(var c=0;c<a.length;c++){b[c]=a.charAt(c)}return this.getBytes(b,0,b.length)},getByteCount:function(a,b,c){},$type:new $.ig.Type("Encoding",$.ig.$ot)},true);$.ig.util.defType("UnicodeEncoding:c7","Encoding",{init:function(){$$t.$c5.init.call(this)},getString:function(bytes_,a,b){var c="";for(var i_=a;i_<b;i_=i_+2){if(bytes_[i_]==0){break}if(i_+1>=b){c=c+"�"}else{var d=bytes_[i_].toString(16);var e=bytes_[i_+1].toString(16);var f=$.ig.Number.prototype.parseInt(e+d,16);c=c+String.fromCharCode(f)}}return c},getByteCount:function(a,b,c){return 0},getBytes2:function(a,b,c,d,e){return 0},getBytes:function(a,b,c){return $$t.$c5.getBytes.call(this,a,b,c)},getBytes1:function(input_){var a=new Array(input_.length*2);for(var i_=0;i_<input_.length;i_++){var hex_=input_.charCodeAt(i_).toString(16).padLeft(4,"0");a[2*i_]=$.ig.Number.prototype.parseInt(hex_.substr(2),16);a[2*i_+1]=$.ig.Number.prototype.parseInt(hex_.substr(0,2),16)}return a},$type:new $.ig.Type("UnicodeEncoding",$$t.$c5.$type)},true);$.ig.util.defType("UTF8Encoding:c6","Encoding",{init:function(){$$t.$c5.init.call(this)},getString:function(bytes_,a,b){var ret_="";for(var i_=a;i_<b;i_++){if(bytes_[i_]==0){break}ret_=ret_+String.fromCharCode(bytes_[i_])}ret_=decodeURIComponent(escape(ret_));return ret_},getByteCount:function(a,b,c){return 0},getBytes2:function(a,b,c,d,e){return 0},getBytes:function(a,b,c){return $$t.$c5.getBytes.call(this,a,b,c)},getBytes1:function(input_){var a=new Array(input_.length);var inputUTF8_=unescape(encodeURIComponent(input_));for(var i_=0;i_<inputUTF8_.length;i_++){a[i_]=inputUTF8_.charCodeAt(i_)}return a},$type:new $.ig.Type("UTF8Encoding",$$t.$c5.$type)},true);$.ig.util.defType("Task:da","Object",{_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:false,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},init:function(initNumber,a){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}$$t.$da.init1.call(this,1,a,null)},init1:function(initNumber,a,b){var $self=this;$.ig.$op.init.call(this);var c=function(){};var d=function(e){if(e==null){$self.b(true)}else{$self.a(new $$t.cn(2,"Exception occurred during task execution",e))}};this.c(a.done(c).fail(d));this.d(b)},g:function(){if(this.b()){return 6}switch(this.c().state()){case"pending":return 0;case"resolved":return 5;case"rejected":return 7;default:return 0}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},e:function(a){var $self=this;var b=function(){return a($self)};var c=function(d){return a($self)};var d=$self.c().done(b).fail(c);return new $$t.da(0,d)},f:function($tNewResult,a){var $self=this;var b=new $$t.de($tNewResult,0);var c=function(){try{var d=a($self);b.e(d)}catch(e_){b.d(e_)}};var d=function(e){return c()};var e=function(f){return c()};$self.c().done(d).fail(e);return b.b()},$type:new $.ig.Type("Task",$.ig.$ot)},true);$.ig.util.defType("Task$1:c9","Task",{$tResult:null,init:function($tResult,a,b){var $self=this;this.h=false;this.$tResult=$tResult;this.$type=this.$type.specialize(this.$tResult);$$t.$da.init1.call(this,1,a,b);var c=function(d){var e=d;$self.l=e;$self.h=true};var d=function(e){$self.h=true};this.c().done(c).fail(d)},h:false,l:null,m:function(){if(!this.h){throw"Result is not ready yet"}if(this.a()!=null){throw this.a()}return this.l},i:function(a){var $self=this;return $$t.$da.e.call($self,function(b){return a(b)})},j:function($tNewResult,a){var $self=this;var b=function(c){return a(c)};return $self.k($.ig.$op.$type,b).k($tNewResult,function(c){return c.m()})},k:function($tNewResult,a){return $$t.$da.f.call(this,$tNewResult,a)},$type:new $.ig.Type("Task$1",$$t.$da.$type)},true);$.ig.util.defType("TaskCompletionSource$1:de","Object",{$tResult:null,_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},init:function($tResult,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}this.$tResult=$tResult;this.$type=this.$type.specialize(this.$tResult);$$t.$de.init1.call(this,this.$tResult,1,null)},init1:function($tResult,initNumber,a){this.$tResult=$tResult;this.$type=this.$type.specialize(this.$tResult);$.ig.$op.init.call(this);this.a($.ig.util.deferred());this.b(new $$t.c9(this.$tResult,this.a().promise(),a))},c:function(){this.a().reject(null)},d:function(a){this.a().reject(a)},e:function(a){this.a().resolve(a)},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},$type:new $.ig.Type("TaskCompletionSource$1",$.ig.$ot)},true);$.ig.util.defType("TaskFactory:d4","Object",{init:function(){$.ig.$op.init.call(this)},c:function(a,b){var $self=this;return new $$t.da(0,$self.b($self.a(a)).always(function(){return b(a)}))},d:function($tResult,a,b){var $self=this;var c=new $$t.de($tResult,0);$self.b($self.a(a)).always(function(){try{var d=b(a);c.e(d)}catch(e_){c.d(e_)}});return c.b()},e:function($tAntecedentResult,$tResult,a,b){var $self=this;var c=function(d){return b(d)};return $self.d($.ig.$op.$type,a,c).j($tResult,function(d){return d.m()})},a:function(a){var b=new Array(a.length);for(var c=0;c<a.length;c++){b[c]=a[c].c()}return b},b:function(a){var promises_=a;var b=function(p){function whenAll(){var whenDeffered=$.ig.util.deferred();if(arguments.length===0){whenDeffered.resolve();return whenDeffered}var count=arguments.length;var resolve=true;for(var i=0;i<arguments.length;i++){arguments[i].done(function(){resolve=resolve&&true}).fail(function(){resolve=resolve&&false}).always(function(){count--;if(count<=0){if(resolve){whenDeffered.resolve()}else{whenDeffered.reject()}}})}return whenDeffered}return whenAll.apply($,p)}(promises_);return b},$type:new $.ig.Type("TaskFactory",$.ig.$ot)},true);$.ig.util.defType("Tuple$2:d5","Object",{$t1:null,$t2:null,_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},init:function($t1,$t2,a,b){this.$t1=$t1;this.$t2=$t2;this.$type=this.$type.specialize(this.$t1,this.$t2);$.ig.$op.init.call(this);this.a(a);this.b(b)},$type:new $.ig.Type("Tuple$2",$.ig.$ot)},true);$.ig.util.defType("Uri:c1","Object",{init:function(a){$.ig.$op.init.call(this);this.value(a)},_value:null,value:function(value){if(arguments.length===1){this._value=value;return value}else{return this._value}},$type:new $.ig.Type("Uri",$.ig.$ot)},true);$.ig.util.defType("JavaScriptSerializer:d6","Object",{init:function(){$.ig.$op.init.call(this)},a:function(a){var text_=a;return JSON.parse(text_)},b:function(a){var value_=a;return JSON.stringify(value_)},$type:new $.ig.Type("JavaScriptSerializer",$.ig.$ot)},true);$.ig.util.defType("XObject:f9","Object",{init:function(a){$.ig.$op.init.call(this);this.backingNode(a)},_backingNode:null,backingNode:function(value){if(arguments.length===1){this._backingNode=value;return value}else{return this._backingNode}},c:function(){},toString:function(){if(this.backingNode()!=null){return $$t.$gi.xmlNodeToString(this.backingNode())}else{return""}},$type:new $.ig.Type("XObject",$.ig.$ot)},true);$.ig.util.defType("XAttribute:gj","XObject",{init:function(a){$$t.$f9.init.call(this,a)},e:function(a){this.backingNode(this.backingNode().cloneNode(true));a.setAttributeNode(this.backingNode())},c:function(){return 2},d:function(){return $$t.$gi.b(this.backingNode())},$type:new $.ig.Type("XAttribute",$$t.$f9.$type)},true);$.ig.util.defType("XNode:gk","XObject",{init:function(a){$$t.$f9.init.call(this,a)},$type:new $.ig.Type("XNode",$$t.$f9.$type)},true);$.ig.util.defType("XContainer:gl","XNode",{init:function(a){$$t.$gk.init.call(this,a)},h:function(a){var b=null;for(var c=0;c<this.backingNode().childNodes.length;c++){var d=this.backingNode().childNodes.item(c);if(d.nodeType==1&&$$t.$gi.d(d)==a.c()&&d.namespaceURI==a.d()){b=d}}if(b==null){return null}else{return new $$t.gm(0,b)}},d:function(){return this.f(null)},e:function(a){return this.f(a)},f:function(a){var b=new $$t.al($$t.$gm.$type,0);for(var c=0;c<this.backingNode().childNodes.length;c++){var d=this.backingNode().childNodes.item(c);if(d.nodeType==1){var e=false;if(a!=null){if($$t.$gi.d(d)==a.c()&&d.namespaceURI==a.d()){e=true}}else{e=true}if(e){b.add1(new $$t.gm(0,d))}}}return b},g:function(a){var b=this.backingNode();var c;if($.ig.util.cast($$t.$gp.$type,this)!==null){c=this.backingNode()}else{c=this.backingNode().ownerDocument}if($.ig.util.cast($$t.$gj.$type,a)!==null){a.e(b)}else if($.ig.util.cast($$t.$gm.$type,a)!==null){a.j(b,c)}},$type:new $.ig.Type("XContainer",$$t.$gk.$type)},true);$.ig.util.defType("XDocument:gp","XContainer",{init:function(initNumber,a){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}$$t.$gl.init.call(this,a)},init1:function(initNumber){$$t.$gl.init.call(this,$$t.$gi.j())},c:function(){return 9},i:function(a){return new $$t.gp(0,$$t.$gi.n(a))},$type:new $.ig.Type("XDocument",$$t.$gl.$type)},true);$.ig.util.defType("XElement:gm","XContainer",{init:function(initNumber,a){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break;case 2:this.init2.apply(this,arguments);break}return}$$t.$gl.init.call(this,a)},init1:function(initNumber,a){$$t.$gm.init2.call(this,2,a,null)},init2:function(initNumber,a,b){$$t.$gl.init.call(this,$$t.$gi.o(a.c(),a.d()));var c=b==null?"":b.toString();this.i(c)},i:function(a){if(arguments.length===1){$$t.$gi.h(this.backingNode(),a);return a}else{return $$t.$gi.c(this.backingNode())}},c:function(){return 1},l:function(){return $$t.$gn.e($$t.$gi.d(this.backingNode()),this.backingNode().namespaceURI)},k:function(a){return new $$t.gj($$t.$gi.i(this.backingNode(),a.c(),a.d()))},j:function(a,b){if(this.backingNode().ownerDocument!=b){this.backingNode($$t.$gi.p(b,this.backingNode()))}a.appendChild(this.backingNode())},$type:new $.ig.Type("XElement",$$t.$gl.$type)},true);$.ig.util.defType("XmlUtils:gi","Object",{init:function(){$.ig.$op.init.call(this)},a:function(){return!!window.DOMParser},m:function(a){var text_=a;return(new DOMParser).parseFromString(text_,"text/xml")},l:function(a){var text_=a;return function(xml){var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(xml);return xmlDoc}(text_)},f:function(a){var node_=a;return(new XMLSerializer).serializeToString(node_)},e:function(a){var node_=a;return node_.xml},k:function(){return new ActiveXObject("Microsoft.XMLDOM")},n:function(a){if($$t.$gi.a()){return $$t.$gi.m(a)}else{return $$t.$gi.l(a)}},xmlNodeToString:function(a){if($$t.$gi.a()){return $$t.$gi.f(a)}else{return $$t.$gi.e(a)}},j:function(){var a;if($$t.$gi.a()){a=$$t.$gi.m("<dummy/>");a.removeChild(a.documentElement)}else{a=$$t.$gi.k()}return a},o:function(a,b){var doc_=$$t.$gi.j();if($$t.$gi.a()){return doc_.createElementNS(b,a)}else{var name_=a;var namespaceURI_=b;return doc_.createNode(1,name_,namespaceURI_)}},c:function(a){if($$t.$gi.a()){return a.textContent}else{var node_=a;return node_.text}},h:function(a,b){if($$t.$gi.a()){a.textContent=b}else{var node_=a;var text_=b;node_.text=text_}},p:function(a,b){if($$t.$gi.a()){return a.importNode(b,true)}else{return b}},d:function(a){if($$t.$gi.a()){return a.localName}else{var node_=a;return node_.baseName}},i:function(a,b,c){if($$t.$gi.a()){return a.getAttributeNodeNS(c,b)}else{var elem_=a;var ln_=b;var nn_=c;return elem_.attributes.getQualifiedItem(ln_,nn_)}},b:function(a){if($$t.$gi.a()){return a.nodeValue}else{var attr_=a;return attr_.value}},$type:new $.ig.Type("XmlUtils",$.ig.$ot)},true);$.ig.util.defType("XName:gn","Object",{a:null,b:null,init:function(a,b){$.ig.$op.init.call(this);this.a=a;this.b=b},c:function(){return this.a},d:function(){return this.b},f:function(){return $$t.$go.c(this.b)},e:function(a,b){return new $$t.gn(a,b)},$type:new $.ig.Type("XName",$.ig.$ot)},true);$.ig.util.defType("XNamespace:go","Object",{a:null,init:function(a){$.ig.$op.init.call(this);this.a=a},c:function(a){return new $$t.go(a)},d:function(){return $$t.$go.c("http://www.w3.org/2000/xmlns/")},b:function(){return this.a},$type:new $.ig.Type("XNamespace",$.ig.$ot)},true);$$t.$dd.created=0;$$t.$dd.ranToCompletion=5;$$t.$dd.canceled=6;$$t.$dd.faulted=7;$$t.$cs.ascending=0;$$t.$cs.descending=1;$$t.$ba.add=0;$$t.$ba.remove=1;$$t.$ba.replace=2;$$t.$ba.reset=4;$$t.$c5.g=null;$$t.$c5.f=null;$.ig.util.extCopy($.ig.Queryable,[[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ICollection$1,$.ig.IEnumerable$1,$.ig.IList$1,$.ig.List$1,$.ig.IEnumerable,$.ig.ICollection,$.ig.IList,$.ig.Array,$.ig.Dictionary,$.ig.XmlNodeList,$.ig.XmlNamedNodeMap,$.ig.AbstractEnumerable,$.ig.IDictionary$2,$.ig.Dictionary$2,$.ig.GenericEnumerable$1,$.ig.ReadOnlyCollection$1,$.ig.Stack$1,$.ig.IOrderedEnumerable$1],["asQueryable"]]]);$.ig.util.extCopy($.ig.Enumerable,[[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ICollection$1,$.ig.IEnumerable$1,$.ig.IList$1,$.ig.List$1,$.ig.IDictionary$2,$.ig.Dictionary$2,$.ig.GenericEnumerable$1,$.ig.ReadOnlyCollection$1,$.ig.Stack$1,$.ig.IOrderedEnumerable$1],["where$1","where$11","select$2","selectMany$2","last$1","first$1","firstOrDefault$1","orderBy$2","orderByDescending$2","toList$1","concat$1","max","max$1","min","min$1","count$1","reverse$1","take$1","skip$1","any$1","contains$1","union$1","toArray$1","elementAt$1","sum","sum$1"]],[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ICollection$1,$.ig.IEnumerable$1,$.ig.IList$1,$.ig.List$1,$.ig.IEnumerable,$.ig.ICollection,$.ig.IList,$.ig.Array,$.ig.Dictionary,$.ig.XmlNodeList,$.ig.XmlNamedNodeMap,$.ig.AbstractEnumerable,$.ig.IDictionary$2,$.ig.Dictionary$2,$.ig.GenericEnumerable$1,$.ig.ReadOnlyCollection$1,$.ig.Stack$1,$.ig.IOrderedEnumerable$1],["ofType$1","cast$1"]]])})(jQuery);$.ig=$.ig||{};(function($){var $$t={};$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["ICoreOlapElement:a","String:b","Object:c","Type:d","Boolean:e","ValueType:f","Void:g","RuntimeTypeHandle:h","MethodInfo:i","MethodBase:j","MemberInfo:k","ParameterInfo:l","TypeCode:m","Enum:n","Number:o","IComparable:p","Number:q","Single:r","Number:s","ConstructorInfo:t","String:u","Array:v","RegExp:w","Cube:x","CubeType:y","Date:z","Date:aa","Number:ab","Catalog:ac","Dimension:ad","DimensionType:ae","KpiDimension:af","HierarchyOrigin:ai","AggregatorType:aj","CardinalityType:ak","MemberType:al","Hierarchy:am","Kpi:an","Level:ao","Measure:ap","KpiMeasure:aq","MeasureGroup:ar","MeasureGroupDimension:as","Member:at","Nullable$1:au","OlapResult:av","IList$1:aw","ICollection$1:ax","IEnumerable$1:ay","IEnumerable:az","IEnumerator:a0","IEnumerator$1:a1","OlapResultAxis:a2","PositionResolver$2:a3","List$1:a4","IArrayList:a5","Array:a6","ICollection:a7","CompareCallback:a8","MulticastDelegate:a9","IntPtr:ba","IList:bb","IDisposable:bc","IArray:bd","Script:be","Func$3:bf","Action$1:bg","PositionItemInfo$2:bh","Dictionary$2:bi","IDictionary$2:bj","IDictionary:bk","Dictionary:bl","IEqualityComparer$1:bm","KeyValuePair$2:bn","NotImplementedException:bo","Error:bp","IHierarchicalPositionItem$2:bq","IPositionItem$2:br","IPosition$2:bs","Math:bt","Number:bu","Number:bv","Number:bw","Number:bx","Number:by","Number:bz","Number:b0","Enumerable:b1","Func$2:b2","IOrderedEnumerable$1:b3","SortedList$1:b4","ArgumentNullException:b5","EventHandler$1:b6","Delegate:b7","ListSortDirection:b8","OlapResultTuple:b9","ReadOnlyCollection$1:ca","OlapResultAxisMember:cb","OlapResultCell:cc","IConnection:cd","IOlapDataProviderFactory:ce","IOlapDiscoverDataProvider:cf","Task$1:cg","Task:ch","JQueryPromise:ci","Action:cj","AggregateException:ck","TaskStatus:cl","TaskCompletionSource$1:cm","JQueryDeferred:cn","JQuery:co","JQueryObject:cp","Element:cq","ElementAttributeCollection:cr","ElementCollection:cs","WebStyle:ct","ElementNodeType:cu","Document:cv","EventListener:cw","IElementEventHandler:cx","ElementEventHandler:cy","ElementAttribute:cz","JQueryPosition:c0","JQueryCallback:c1","JQueryEvent:c2","JQueryUICallback:c3","IOlapExecuteCommandProvider:c4","HeaderCellsLayoutOrientation:c5","LevelSpanManager:c6","SpanSource:c7","ITableViewHeadersFactory:c8","TableViewHeadersFactory:c9","ArrayListCollection$1:da","INotifyCollectionChanged:db","NotifyCollectionChangedEventHandler:dc","NotifyCollectionChangedEventArgs:dd","EventArgs:de","NotifyCollectionChangedAction:df","TableViewHeaderCellSource:dg","OlapTableViewHeaderCell:dh","TableCompactViewHeadersFactory:di","TableViewImpl:dj","TableViewSettings:dk","ResultHeaderSorter:dl","ResultSorter$1:dm","AxisTupleVisitor:dn","LevelSortDirection:dp","LevelSortBehavior:dq","AxisHeaderSortingVisitor:dr","TupleSortDirection:ds","ResultColumnValueSorter:dt","AxisValueSortingVisitor:du","OlapTableViewResultCell:dv","OlapResultView:dw","InvalidOperationException:dx","ResultViewHelper:dy","IOlapDataSource:dz","OlapMetadataTreeItem:d0","OlapMetadataTreeItemType:d1","MeasureListLocation:d2","MeasureList:d3","OlapDataSource:d4","DataSourceBaseOptions:d5","CubeMetaItemsCache:d6","MeasureGroupMetaItemsCache:d7","Tuple$2:d8","NotSupportedException:d9","PositionInfo:ea","TaskExtensions:eb","AxisElement:ec","AxisDefinitionParser:ed","Debug:ee","TaskFactory:ef","MetaTreeHelper:eg","HierarchyItemPosition:eh","CoreOlapElementParser:el","KeyValueItem:eu","HierarchyFilterView:ev","FilterMember:ew","INotifyPropertyChanged:ex","PropertyChangedEventHandler:ey","PropertyChangedEventArgs:ez","FilterMemberStateChangedEventArgs:e0","DataSourceBase:e1","jQueryUtils:e2","OlapUtilities:e3","OlapTableView:e4","AbstractEnumerable:e5","Func$1:e6","AbstractEnumerator:e7","GenericEnumerable$1:e8","GenericEnumerator$1:e9"]);$.ig.util.defType("LevelSortBehavior","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("LevelSortBehavior",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("OlapMetadataTreeItemType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("OlapMetadataTreeItemType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("MeasureListLocation","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("MeasureListLocation",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("HeaderCellsLayoutOrientation","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("HeaderCellsLayoutOrientation",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("MemberType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("MemberType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("CardinalityType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("CardinalityType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("AggregatorType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("AggregatorType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("HierarchyOrigin","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("HierarchyOrigin",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("DimensionType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("DimensionType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("CubeType","Enum",{init:function(){$.ig.Enum.prototype.init.call(this)},$type:new $.ig.Type("CubeType",$.ig.Enum.prototype.$type)},true);$.ig.util.defType("ICoreOlapElement","Object",{$type:new $.ig.Type("ICoreOlapElement",null)},true);$.ig.util.defType("Cube","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_catalogName:null,catalogName:function(value){if(arguments.length===1){this._catalogName=value;return value}else{return this._catalogName}},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_cubeType:null,cubeType:function(value){if(arguments.length===1){this._cubeType=value;return value}else{return this._cubeType}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_lastProcessed:null,lastProcessed:function(value){if(arguments.length===1){this._lastProcessed=value;return value}else{return this._lastProcessed}},_lastUpdated:null,lastUpdated:function(value){if(arguments.length===1){this._lastUpdated=value;return value}else{return this._lastUpdated}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},uniqueName:function(a){if(arguments.length===1){this.name(a);return a}else{return this.name()}},$type:new $.ig.Type("Cube",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Catalog","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},$type:new $.ig.Type("Catalog",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Dimension","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_dimensionType:null,dimensionType:function(value){if(arguments.length===1){this._dimensionType=value;return value}else{return this._dimensionType}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_defaultHierarchy:null,defaultHierarchy:function(value){if(arguments.length===1){this._defaultHierarchy=value;return value}else{return this._defaultHierarchy}},$type:new $.ig.Type("Dimension",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("KpiDimension","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},$type:new $.ig.Type("KpiDimension",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Hierarchy","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_defaultHierarchy:null,defaultHierarchy:function(value){if(arguments.length===1){this._defaultHierarchy=value;return value}else{return this._defaultHierarchy}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_defaultMember:null,defaultMember:function(value){if(arguments.length===1){this._defaultMember=value;return value}else{return this._defaultMember}},_allMember:null,allMember:function(value){if(arguments.length===1){this._allMember=value;
return value}else{return this._allMember}},_dimensionUniqueName:null,dimensionUniqueName:function(value){if(arguments.length===1){this._dimensionUniqueName=value;return value}else{return this._dimensionUniqueName}},_hierarchyOrigin:null,hierarchyOrigin:function(value){if(arguments.length===1){this._hierarchyOrigin=value;return value}else{return this._hierarchyOrigin}},_hierarchyDisplayFolder:null,hierarchyDisplayFolder:function(value){if(arguments.length===1){this._hierarchyDisplayFolder=value;return value}else{return this._hierarchyDisplayFolder}},$type:new $.ig.Type("Hierarchy",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Kpi","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_measureGroupName:null,measureGroupName:function(value){if(arguments.length===1){this._measureGroupName=value;return value}else{return this._measureGroupName}},_kpiDisplayFolder:null,kpiDisplayFolder:function(value){if(arguments.length===1){this._kpiDisplayFolder=value;return value}else{return this._kpiDisplayFolder}},_kpiValue:null,kpiValue:function(value){if(arguments.length===1){this._kpiValue=value;return value}else{return this._kpiValue}},_kpiGoal:null,kpiGoal:function(value){if(arguments.length===1){this._kpiGoal=value;return value}else{return this._kpiGoal}},_kpiStatus:null,kpiStatus:function(value){if(arguments.length===1){this._kpiStatus=value;return value}else{return this._kpiStatus}},_kpiTrend:null,kpiTrend:function(value){if(arguments.length===1){this._kpiTrend=value;return value}else{return this._kpiTrend}},_kpiStatusGraphic:null,kpiStatusGraphic:function(value){if(arguments.length===1){this._kpiStatusGraphic=value;return value}else{return this._kpiStatusGraphic}},_kpiTrendGraphic:null,kpiTrendGraphic:function(value){if(arguments.length===1){this._kpiTrendGraphic=value;return value}else{return this._kpiTrendGraphic}},_kpiWeight:null,kpiWeight:function(value){if(arguments.length===1){this._kpiWeight=value;return value}else{return this._kpiWeight}},_parentKpiName:null,parentKpiName:function(value){if(arguments.length===1){this._parentKpiName=value;return value}else{return this._parentKpiName}},_currentTimeMember:null,currentTimeMember:function(value){if(arguments.length===1){this._currentTimeMember=value;return value}else{return this._currentTimeMember}},$type:new $.ig.Type("Kpi",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Level","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_depth:0,depth:function(value){if(arguments.length===1){this._depth=value;return value}else{return this._depth}},_hierarchyUniqueName:null,hierarchyUniqueName:function(value){if(arguments.length===1){this._hierarchyUniqueName=value;return value}else{return this._hierarchyUniqueName}},_dimensionUniqueName:null,dimensionUniqueName:function(value){if(arguments.length===1){this._dimensionUniqueName=value;return value}else{return this._dimensionUniqueName}},_membersCount:0,membersCount:function(value){if(arguments.length===1){this._membersCount=value;return value}else{return this._membersCount}},_levelOrigin:0,levelOrigin:function(value){if(arguments.length===1){this._levelOrigin=value;return value}else{return this._levelOrigin}},_levelOrderingProperty:null,levelOrderingProperty:function(value){if(arguments.length===1){this._levelOrderingProperty=value;return value}else{return this._levelOrderingProperty}},$type:new $.ig.Type("Level",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("Measure","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_measureGroupName:null,measureGroupName:function(value){if(arguments.length===1){this._measureGroupName=value;return value}else{return this._measureGroupName}},_aggregatorType:null,aggregatorType:function(value){if(arguments.length===1){this._aggregatorType=value;return value}else{return this._aggregatorType}},_defaultFormatString:null,defaultFormatString:function(value){if(arguments.length===1){this._defaultFormatString=value;return value}else{return this._defaultFormatString}},_measureDisplayFolder:null,measureDisplayFolder:function(value){if(arguments.length===1){this._measureDisplayFolder=value;return value}else{return this._measureDisplayFolder}},$type:new $.ig.Type("Measure",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("KpiMeasure","Measure",{init:function(a,b){$.ig.Measure.prototype.init.call(this);this.uniqueName(a);this.caption(b)},_graphic:null,graphic:function(value){if(arguments.length===1){this._graphic=value;return value}else{return this._graphic}},createKpiValueMeasure:function(a){return new $.ig.KpiMeasure(a.kpiValue(),a.caption()+" Value")},createKpiGoalMeasure:function(a){return new $.ig.KpiMeasure(a.kpiGoal(),a.caption()+" Goal")},createKpiWeightMeasure:function(a){return new $.ig.KpiMeasure(a.kpiWeight(),a.caption()+" Weight")},createKpiStatusMeasure:function(a){var b=new $.ig.KpiMeasure(a.kpiStatus(),a.caption()+" Status");b.graphic(a.kpiStatusGraphic());return b},createKpiTrendMeasure:function(a){var b=new $.ig.KpiMeasure(a.kpiTrend(),a.caption()+" Trend");b.graphic(a.kpiTrendGraphic());return b},$type:new $.ig.Type("KpiMeasure",$.ig.Measure.prototype.$type)},true);$.ig.util.defType("MeasureGroup","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_cubeName:null,cubeName:function(value){if(arguments.length===1){this._cubeName=value;return value}else{return this._cubeName}},_catalogName:null,catalogName:function(value){if(arguments.length===1){this._catalogName=value;return value}else{return this._catalogName}},uniqueName:function(a){if(arguments.length===1){this.name(a);return a}else{return this.name()}},$type:new $.ig.Type("MeasureGroup",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("MeasureGroupDimension","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_cubeName:null,cubeName:function(value){if(arguments.length===1){this._cubeName=value;return value}else{return this._cubeName}},_catalogName:null,catalogName:function(value){if(arguments.length===1){this._catalogName=value;return value}else{return this._catalogName}},_measureGroupName:null,measureGroupName:function(value){if(arguments.length===1){this._measureGroupName=value;return value}else{return this._measureGroupName}},_dimensionUniqueName:null,dimensionUniqueName:function(value){if(arguments.length===1){this._dimensionUniqueName=value;return value}else{return this._dimensionUniqueName}},_measureGroupCardinality:null,measureGroupCardinality:function(value){if(arguments.length===1){this._measureGroupCardinality=value;return value}else{return this._measureGroupCardinality}},_dimensionCardinality:null,dimensionCardinality:function(value){if(arguments.length===1){this._dimensionCardinality=value;return value}else{return this._dimensionCardinality}},_isDimensionVisible:false,isDimensionVisible:function(value){if(arguments.length===1){this._isDimensionVisible=value;return value}else{return this._isDimensionVisible}},_isFactDimension:false,isFactDimension:function(value){if(arguments.length===1){this._isFactDimension=value;return value}else{return this._isFactDimension}},_dimensionPath:null,dimensionPath:function(value){if(arguments.length===1){this._dimensionPath=value;return value}else{return this._dimensionPath}},_dimensionGranularity:null,dimensionGranularity:function(value){if(arguments.length===1){this._dimensionGranularity=value;return value}else{return this._dimensionGranularity}},$type:new $.ig.Type("MeasureGroupDimension",$.ig.Object.prototype.$type)},true);$.ig.util.defType("Member","Object",{init:function(){$.ig.Object.prototype.init.call(this);var a=$.ig.util.toNullable($.ig.Number.prototype.$type,null);this.scope(a)},_cubeName:null,cubeName:function(value){if(arguments.length===1){this._cubeName=value;return value}else{return this._cubeName}},_catalogName:null,catalogName:function(value){if(arguments.length===1){this._catalogName=value;return value}else{return this._catalogName}},_dimensionUniqueName:null,dimensionUniqueName:function(value){if(arguments.length===1){this._dimensionUniqueName=value;return value}else{return this._dimensionUniqueName}},_hierarchyUniqueName:null,hierarchyUniqueName:function(value){if(arguments.length===1){this._hierarchyUniqueName=value;return value}else{return this._hierarchyUniqueName}},_levelUniqueName:null,levelUniqueName:function(value){if(arguments.length===1){this._levelUniqueName=value;return value}else{return this._levelUniqueName}},_levelDepth:0,levelDepth:function(value){if(arguments.length===1){this._levelDepth=value;return value}else{return this._levelDepth}},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_memberType:null,memberType:function(value){if(arguments.length===1){this._memberType=value;return value}else{return this._memberType}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_childrenCardinality:0,childrenCardinality:function(value){if(arguments.length===1){this._childrenCardinality=value;return value}else{return this._childrenCardinality}},_parentLevel:0,parentLevel:function(value){if(arguments.length===1){this._parentLevel=value;return value}else{return this._parentLevel}},_parentUniqueName:null,parentUniqueName:function(value){if(arguments.length===1){this._parentUniqueName=value;return value}else{return this._parentUniqueName}},_description:null,description:function(value){if(arguments.length===1){this._description=value;return value}else{return this._description}},_scope:$.ig.util.toNullable($.ig.Number.prototype.$type,null),scope:function(value){if(arguments.length===1){this._scope=value;return value}else{return this._scope}},$type:new $.ig.Type("Member",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("OlapResult","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_isEmpty:false,isEmpty:function(value){if(arguments.length===1){this._isEmpty=value;return value}else{return this._isEmpty}},_axes:null,axes:function(value){if(arguments.length===1){this._axes=value;return value}else{return this._axes}},_cells:null,cells:function(value){if(arguments.length===1){this._cells=value;return value}else{return this._cells}},$type:new $.ig.Type("OlapResult",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapResultAxis","Object",{init:function(a,b){$.ig.Object.prototype.init.call(this);this.tuples(a.toList$1($.ig.OlapResultTuple.prototype.$type));this.tupleSize(b);this.positionResolver(new $.ig.PositionResolver$2(String,$.ig.Object.prototype.$type,a,b))},_positionResolver:null,positionResolver:function(value){if(arguments.length===1){this._positionResolver=value;return value}else{return this._positionResolver}},clone:function(){var $self=this;var a=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);var c=$self.tuples().getEnumerator();while(c.moveNext()){var b=c.current();a.add(b.clone())}return function(){var $ret=new $.ig.OlapResultAxis(a,$self.tupleSize());$ret.name($self.name());return $ret}()},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_tupleSize:0,tupleSize:function(value){if(arguments.length===1){this._tupleSize=value;return value}else{return this._tupleSize}},_tuples:null,tuples:function(value){if(arguments.length===1){this._tuples=value;return value}else{return this._tuples}},$type:new $.ig.Type("OlapResultAxis",$.ig.Object.prototype.$type)},true);$.ig.util.defType("IPosition$2","Object",{$type:new $.ig.Type("IPosition$2",null)},true);$.ig.util.defType("OlapResultTuple","Object",{init:function(a){$.ig.Object.prototype.init.call(this);this.members(new $.ig.ReadOnlyCollection$1($.ig.OlapResultAxisMember.prototype.$type,1,a))},_members:null,members:function(value){if(arguments.length===1){this._members=value;return value}else{return this._members}},getItems:function(){return this.members()},itemsCount:function(){return this.members().count()},indexOf:function(a){return this.members().indexOf(a)},item:function(a){return this.members().item(a)},isEmpty:function(){return false},clone:function(){var a=new $.ig.List$1($.ig.OlapResultAxisMember.prototype.$type,0);var c=this.members().getEnumerator();while(c.moveNext()){var b=c.current();a.add(b.clone())}var d=new $.ig.OlapResultTuple(a);var f=a.getEnumerator();while(f.moveNext()){var e=f.current();e.position(d)}return d},$type:new $.ig.Type("OlapResultTuple",$.ig.Object.prototype.$type,[$.ig.IPosition$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)])},true);$.ig.util.defType("IPositionItem$2","Object",{$type:new $.ig.Type("IPositionItem$2",null)},true);$.ig.util.defType("IHierarchicalPositionItem$2","Object",{$type:new $.ig.Type("IHierarchicalPositionItem$2",null,[$.ig.IPositionItem$2.prototype.$type.specialize(0,1)])},true);$.ig.util.defType("OlapResultAxisMember","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.properties(new $.ig.Dictionary$2(String,String,0));this.ordinal(-1)},_uniqueName:null,uniqueName:function(value){if(arguments.length===1){this._uniqueName=value;return value}else{return this._uniqueName}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_levelUniqueName:null,levelUniqueName:function(value){if(arguments.length===1){this._levelUniqueName=value;return value}else{return this._levelUniqueName}},_hierarchyUniqueName:null,hierarchyUniqueName:function(value){if(arguments.length===1){this._hierarchyUniqueName=value;return value}else{return this._hierarchyUniqueName}},_levelNumber:0,levelNumber:function(value){if(arguments.length===1){this._levelNumber=value;return value}else{return this._levelNumber}},_displayInfo:null,displayInfo:function(value){if(arguments.length===1){this._displayInfo=value;return value}else{return this._displayInfo}},e:function(){return this.displayInfo()&~65536&~131072},drilledDown:function(){return(this.displayInfo()&65536)==65536},parentSameAsPrev:function(){return(this.displayInfo()&131072)==131072},_properties:null,properties:function(value){if(arguments.length===1){this._properties=value;return value}else{return this._properties}},_position:null,position:function(value){if(arguments.length===1){this._position=value;return value}else{return this._position}},key:function(){return this.uniqueName()},sortKey:function(){if(this.ordinal()>-1){return this.ordinal()}var a=parseFloat(this.caption());if(!isNaN(a)){return a}return this.caption()},_ordinal:0,ordinal:function(value){if(arguments.length===1){this._ordinal=value;return value}else{return this._ordinal}},hierarchyKey:function(){return this.hierarchyUniqueName()},hierarchyLevelKey:function(){return this.levelUniqueName()},parentKey:function(){var $self=this;var a;(function(){var $ret=$self.properties().tryGetValue("PARENT_UNIQUE_NAME",a);a=$ret.value;return $ret.ret})();return a},depth:function(){return this.levelNumber()},isExpandable:function(){return this.e()>0},clone:function(){var a=new $.ig.OlapResultAxisMember;a.caption(this.caption());a.displayInfo(this.displayInfo());a.hierarchyUniqueName(this.hierarchyUniqueName());a.levelNumber(this.levelNumber());a.levelUniqueName(this.levelUniqueName());a.ordinal(this.ordinal());var c=this.properties().getEnumerator();while(c.moveNext()){var b=c.current();a.properties().add(b.key(),b.value())}a.uniqueName(this.uniqueName());a.position(this.position());return a},$type:new $.ig.Type("OlapResultAxisMember",$.ig.Object.prototype.$type,[$.ig.IHierarchicalPositionItem$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)])},true);$.ig.util.defType("OlapResultCell","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.properties(new $.ig.Dictionary$2(String,$.ig.Object.prototype.$type,0))},_cellOrdinal:0,cellOrdinal:function(value){if(arguments.length===1){this._cellOrdinal=value;return value}else{return this._cellOrdinal}},_properties:null,properties:function(value){if(arguments.length===1){this._properties=value;return value}else{return this._properties}},clone:function(){var $self=this;var a=function(){var $ret=new $.ig.OlapResultCell;$ret.cellOrdinal($self.cellOrdinal());return $ret}();var c=$self.properties().getEnumerator();while(c.moveNext()){var b=c.current();a.properties().add(b.key(),b.value())}return a},$type:new $.ig.Type("OlapResultCell",$.ig.Object.prototype.$type)},true);$.ig.util.defType("IConnection","Object",{$type:new $.ig.Type("IConnection",null)},true);$.ig.util.defType("IOlapDataProviderFactory","Object",{$type:new $.ig.Type("IOlapDataProviderFactory",null)},true);$.ig.util.defType("IOlapDiscoverDataProvider","Object",{$type:new $.ig.Type("IOlapDiscoverDataProvider",null)},true);$.ig.util.defType("IOlapExecuteCommandProvider","Object",{$type:new $.ig.Type("IOlapExecuteCommandProvider",null)},true);$.ig.util.defType("LevelSpanManager","Object",{b:null,init:function(a){$.ig.Object.prototype.init.call(this);this.c(a);this.b=new Array(a)},_c:0,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},a:function(a,b){var $self=this;var c=$self.b[a];if(c==null){c=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.SpanSource.prototype.$type,0);$self.b[a]=c}var d;if(!function(){var $ret=c.tryGetValue(b,d);d=$ret.value;return $ret.ret}()){d=new $.ig.SpanSource;if(b>0){var e;if(function(){var $ret=c.tryGetValue(b-1,e);e=$ret.value;return $ret.ret}()){d.a(e);e.e()}}c.add(b,d)}return d},$type:new $.ig.Type("LevelSpanManager",$.ig.Object.prototype.$type)},true);$.ig.util.defType("SpanSource","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.c=1},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},c:0,d:function(a){if(arguments.length===1){if(this.c!=a){var b=a-this.c;if(this.a()!=null){this.a().d(this.a().d()+b)}this.c=a}return a}else{return this.c}},b:false,e:function(){if(!this.b){this.b=true;this.d(this.d()+1)}},$type:new $.ig.Type("SpanSource",$.ig.Object.prototype.$type)},true);$.ig.util.defType("ITableViewHeadersFactory","Object",{$type:new $.ig.Type("ITableViewHeadersFactory",null)},true);$.ig.util.defType("TableViewHeadersFactory","Object",{_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_d:false,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},init:function(a,b,c,d,e){$.ig.Object.prototype.init.call(this);this.b(a);this.a(b);this.c(c);this.d(d);this.e(e)},createHeaderCells:function(){var $self=this;if($self.b().positionResolver().hasUnregisterdPositions()){$self.b().positionResolver().completeRegisterPositions()}var a=$self.b().positionResolver().rootPositionInfo();var b=new $.ig.List$1($.ig.IList$1.prototype.$type.specialize($.ig.TableViewHeaderCellSource.prototype.$type),0);for(var c=0;c<a.positionSize();c++){b.add(new $.ig.List$1($.ig.TableViewHeaderCellSource.prototype.$type,0))}$.ig.TableViewHeadersFactory.prototype.createHeaderCells2(a,a.positionItemDepthMin(),b,$self.d(),$self.e());var d=new $.ig.ArrayListCollection$1($.ig.OlapTableViewHeaderCell.prototype.$type);var e=0;for(var f=0;f<a.positionSize();f++){var g=b.item(f);var h=0;var i=0;var k=g.getEnumerator();while(k.moveNext()){var j=k.current();var l;var m;var n;var o;if($self.c()==$.ig.HeaderCellsLayoutOrientation.prototype.horizontal){l=h;m=j.b().d();n=j.a().positionItemDepth()+e;o=j.c().d()}else{n=h;o=j.b().d();l=j.a().positionItemDepth()+e;m=j.c().d()}var p=$self.b().tuples().__inner[j.a().positionIndex()];var q=p.item(j.a().positionItemIndex());var r=$self.b().tuples().__inner[j.k()];if($self.a().positionResolver().hasUnregisterdPositions()){$self.a().positionResolver().completeRegisterPositions()}var s=$self.a().positionResolver().getPositionIndex(r);var t=function(){var $ret=new $.ig.OlapTableViewHeaderCell;$ret.axisName($self.b().name());$ret.hierarchyNumber(j.a().positionItemIndex());$ret.levelNumber(j.a().positionItemDepth());$ret.caption(q.caption());$ret.columnIndex(l);$ret.columnSpan(m);$ret.isExpanded(j.f());$ret.isExpandable(j.e());$ret.tupleIndex(s);$ret.memberIndex(j.a().positionItemIndex());$ret.rowIndex(n);$ret.rowSpan(o);return $ret}();if(!j.g()){h=h+j.b().d()}i=Math.max(i,j.a().positionItemDepth());d.add(t)}e+=i+1}return d},createHeaderCells2:function(a,b,c,d,e){var $self=this;var f=new $.ig.LevelSpanManager(a.positionSize());var h=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(i){return i.positionItemDepth()==b}).getEnumerator();while(h.moveNext()){var g=h.current();var i;var j;(function(){var $ret=$.ig.TableViewHeadersFactory.prototype.createHeaderCells1(a,g,c,f,d,e,i,j);i=$ret.headerCellSource;j=$ret.totalSpan;return $ret.ret})()}},h:function(a,b,c,d,e,f){var $self=this;var g=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(h){return h.positionItemDepth()==a.positionItemDepthMin()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type));if(g.count()>0){var i=g.getEnumerator();while(i.moveNext()){var h=i.current();var j;var k;(function(){var $ret=$.ig.TableViewHeadersFactory.prototype.createHeaderCells1(a,h,b,c,d,f,j,k);j=$ret.headerCellSource;k=$ret.totalSpan;return $ret.ret})();e.b().d(e.b().d()+k);if(j.g()){e.b().d(e.b().d()+1)}}e.b().d(e.b().d()-1)}else{f.add(a.positionIndex())}e.k(a.positionIndex())},createHeaderCells1:function(a,b,c,d,e,f,g,h){var $self=this;var i=c.item(b.positionItemIndex());var j=d.a(b.positionItemIndex(),b.positionItemDepth());var k=function(){var $ret=new $.ig.TableViewHeaderCellSource;$ret.c(j);$ret.a(b);$ret.e(b.isExpandable());return $ret}();g=k;if(e){i.add(k);$.ig.TableViewHeadersFactory.prototype.h(b,c,d,true,k,f)}var l=null;if(b.isExpanded()){l=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(m){return m.parentKey()==b.key()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}if(l!=null&&l.count()>0){var m=function(){var $ret=new $.ig.TableViewHeaderCellSource;$ret.g(true);$ret.a(b);$ret.e(b.isExpandable());return $ret}();i.add(m);var o=l.getEnumerator();while(o.moveNext()){var n=o.current();var p;var q;(function(){var $ret=$.ig.TableViewHeadersFactory.prototype.createHeaderCells1(a,n,c,d,e,f,p,q);p=$ret.headerCellSource;q=$ret.totalSpan;return $ret.ret})();m.b().d(m.b().d()+q);if(p.g()){m.b().d(m.b().d()+1)}}m.b().d(m.b().d()-1);k.f(true);k.e(false);m.f(true);k.d(m);if(!e){i.add(k);$.ig.TableViewHeadersFactory.prototype.h(b,c,d,false,k,f)}m.k(k.k());g=m;h=k.b().d()+m.b().d()-1}else{if(b.isExpanded()){k.e(false)}if(!e){i.add(k);$.ig.TableViewHeadersFactory.prototype.h(b,c,d,false,k,f)}h=k.b().d()}return{headerCellSource:g,totalSpan:h}},$type:new $.ig.Type("TableViewHeadersFactory",$.ig.Object.prototype.$type,[$.ig.ITableViewHeadersFactory.prototype.$type])},true);$.ig.util.defType("TableCompactViewHeadersFactory","Object",{_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_d:false,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},init:function(a,b,c,d,e){$.ig.Object.prototype.init.call(this);this.b(a);this.a(b);this.c(c);this.d(d);this.e(e)},createHeaderCells:function(){var $self=this;if($self.b().positionResolver().hasUnregisterdPositions()){$self.b().positionResolver().completeRegisterPositions()}var a=$self.b().positionResolver().rootPositionInfo();var b=new $.ig.List$1($.ig.IList$1.prototype.$type.specialize($.ig.TableViewHeaderCellSource.prototype.$type),0);for(var c=0;c<a.positionSize();c++){b.add(new $.ig.List$1($.ig.TableViewHeaderCellSource.prototype.$type,0))}$.ig.TableCompactViewHeadersFactory.prototype.createHeaderCells2(a,a.positionItemDepthMin(),b,$self.d(),$self.e());var d=new $.ig.ArrayListCollection$1($.ig.OlapTableViewHeaderCell.prototype.$type);var e=0;for(var f=0;f<a.positionSize();f++){var g=b.item(f);var h=0;var i=0;var k=g.getEnumerator();while(k.moveNext()){var j=k.current();var l;var m;var n;var o;if($self.c()==$.ig.HeaderCellsLayoutOrientation.prototype.horizontal){l=h;m=j.b().d();n=e;o=1}else{n=h;o=j.b().d();l=e;m=1}var p=$self.b().tuples().__inner[j.a().positionIndex()];var q=p.item(j.a().positionItemIndex());var r=$self.b().tuples().__inner[j.k()];if($self.a().positionResolver().hasUnregisterdPositions()){$self.a().positionResolver().completeRegisterPositions()}var s=$self.a().positionResolver().getPositionIndex(r);var t=function(){var $ret=new $.ig.OlapTableViewHeaderCell;$ret.axisName($self.b().name());$ret.hierarchyNumber(j.a().positionItemIndex());$ret.levelNumber(j.a().positionItemDepth());$ret.caption(q.caption());$ret.columnIndex(l);$ret.columnSpan(m);$ret.isExpanded(j.f());$ret.isExpandable(j.e());$ret.tupleIndex(s);$ret.memberIndex(j.a().positionItemIndex());$ret.rowIndex(n);$ret.rowSpan(o);return $ret}();if(!j.g()){h=h+j.b().d()}d.add(t)}e+=i+1}return d},createHeaderCells2:function(a,b,c,d,e){var $self=this;var f=new $.ig.LevelSpanManager(a.positionSize());var h=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(i){return i.positionItemDepth()==b}).getEnumerator();while(h.moveNext()){var g=h.current();var i;var j;(function(){var $ret=$.ig.TableCompactViewHeadersFactory.prototype.createHeaderCells1(a,g,c,f,d,e,i,j);i=$ret.headerCellSource;j=$ret.totalSpan;return $ret.ret})()}},h:function(a,b,c,d,e,f){var $self=this;var g=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(h){return h.positionItemDepth()==a.positionItemDepthMin()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type));if(g.count()>0){var i=g.getEnumerator();while(i.moveNext()){var h=i.current();var j;var k;(function(){var $ret=$.ig.TableCompactViewHeadersFactory.prototype.createHeaderCells1(a,h,b,c,d,f,j,k);j=$ret.headerCellSource;k=$ret.totalSpan;return $ret.ret})();e.b().d(e.b().d()+k);if(j.d()!=null){e.b().d(e.b().d()+1)}}e.b().d(e.b().d()-1)}else{f.add(a.positionIndex())}e.k(a.positionIndex())},createHeaderCells1:function(a,b,c,d,e,f,g,h){var $self=this;var i=c.item(b.positionItemIndex());var j=d.a(b.positionItemIndex(),b.positionItemDepth());var k=function(){var $ret=new $.ig.TableViewHeaderCellSource;$ret.c(j);$ret.a(b);$ret.e(b.isExpandable());return $ret}();g=k;if(e){i.add(k);$.ig.TableCompactViewHeadersFactory.prototype.h(b,c,d,true,k,f)}var l=null;if(b.isExpanded()){l=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(m){return m.parentKey()==b.key()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}if(l!=null&&l.count()>0){var m=function(){var $ret=new $.ig.TableViewHeaderCellSource;$ret.g(true);$ret.a(b);$ret.e(b.isExpandable());return $ret}();var o=l.getEnumerator();while(o.moveNext()){var n=o.current();var p;var q;(function(){var $ret=$.ig.TableCompactViewHeadersFactory.prototype.createHeaderCells1(a,n,c,d,e,f,p,q);p=$ret.headerCellSource;q=$ret.totalSpan;return $ret.ret})();m.b().d(m.b().d()+q);if(p.d()!=null){m.b().d(m.b().d()+1)}}m.b().d(m.b().d()-1);k.f(true);k.e(true);k.d(m);if(!e){i.add(k);$.ig.TableCompactViewHeadersFactory.prototype.h(b,c,d,false,k,f)}m.k(k.k());h=k.b().d()+m.b().d()-1}else{if(b.isExpanded()){k.e(false)}if(!e){i.add(k);$.ig.TableCompactViewHeadersFactory.prototype.h(b,c,d,false,k,f)}h=k.b().d()}return{headerCellSource:g,totalSpan:h}},$type:new $.ig.Type("TableCompactViewHeadersFactory",$.ig.Object.prototype.$type,[$.ig.ITableViewHeadersFactory.prototype.$type])},true);$.ig.util.defType("TableViewHeaderCellSource","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.b(new $.ig.SpanSource);this.c(new $.ig.SpanSource)},_g:false,g:function(value){if(arguments.length===1){this._g=value;return value}else{return this._g}},_j:0,j:function(value){if(arguments.length===1){this._j=value;return value}else{return this._j}},_h:0,h:function(value){if(arguments.length===1){this._h=value;return value}else{return this._h}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_k:0,k:function(value){if(arguments.length===1){this._k=value;return value}else{return this._k}},_i:0,i:function(value){if(arguments.length===1){this._i=value;return value}else{return this._i}},_f:false,f:function(value){if(arguments.length===1){this._f=value;return value}else{return this._f}},_e:false,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},$type:new $.ig.Type("TableViewHeaderCellSource",$.ig.Object.prototype.$type)},true);
$.ig.util.defType("TableViewImpl","Object",{init:function(a,b,c,d){var $self=this;$.ig.Object.prototype.init.call(this);if(a==null){throw new $.ig.ArgumentNullException("result")}this.result(a);this.originalResult(a);if(d==null){this.viewSettings(new $.ig.TableViewSettings)}else{this.viewSettings(d)}this.hasColumns(b);this.hasRows(c);this.columnSortDirections(new $.ig.ArrayListCollection$1($.ig.TupleSortDirection.prototype.$type));this.columnSortDirections().collectionChanged=$.ig.Delegate.prototype.combine(this.columnSortDirections().collectionChanged,function(e,f){$self.i(true)});this.levelSortDirections(new $.ig.ArrayListCollection$1($.ig.LevelSortDirection.prototype.$type));this.levelSortDirections().collectionChanged=$.ig.Delegate.prototype.combine(this.levelSortDirections().collectionChanged,function(e,f){$self.i(true)});this.appliedColumnSortDirections(new $.ig.List$1($.ig.TupleSortDirection.prototype.$type,0));this.appliedLevelSortDirections(new $.ig.List$1($.ig.LevelSortDirection.prototype.$type,0));this.appliedSortDirectionsMap(new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type)),0))},_viewSettings:null,viewSettings:function(value){if(arguments.length===1){this._viewSettings=value;return value}else{return this._viewSettings}},_result:null,result:function(value){if(arguments.length===1){this._result=value;return value}else{return this._result}},_originalResult:null,originalResult:function(value){if(arguments.length===1){this._originalResult=value;return value}else{return this._originalResult}},_hasRows:false,hasRows:function(value){if(arguments.length===1){this._hasRows=value;return value}else{return this._hasRows}},_hasColumns:false,hasColumns:function(value){if(arguments.length===1){this._hasColumns=value;return value}else{return this._hasColumns}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_h:false,h:function(value){if(arguments.length===1){this._h=value;return value}else{return this._h}},_i:false,i:function(value){if(arguments.length===1){this._i=value;return value}else{return this._i}},l:null,k:null,o:null,rowHeaders:function(a){if(arguments.length===1){this.l=a;return a}else{if(!this.h()||this.i()){this.initialize()}return this.l}},columnHeaders:function(a){if(arguments.length===1){this.k=a;return a}else{if(!this.h()||this.i()){this.initialize()}return this.k}},resultCells:function(a){if(arguments.length===1){this.o=a;return a}else{if(!this.h()||this.i()){this.initialize()}return this.o}},_columnSortDirections:null,columnSortDirections:function(value){if(arguments.length===1){this._columnSortDirections=value;return value}else{return this._columnSortDirections}},_levelSortDirections:null,levelSortDirections:function(value){if(arguments.length===1){this._levelSortDirections=value;return value}else{return this._levelSortDirections}},_appliedColumnSortDirections:null,appliedColumnSortDirections:function(value){if(arguments.length===1){this._appliedColumnSortDirections=value;return value}else{return this._appliedColumnSortDirections}},_appliedLevelSortDirections:null,appliedLevelSortDirections:function(value){if(arguments.length===1){this._appliedLevelSortDirections=value;return value}else{return this._appliedLevelSortDirections}},_appliedSortDirectionsMap:null,appliedSortDirectionsMap:function(value){if(arguments.length===1){this._appliedSortDirectionsMap=value;return value}else{return this._appliedSortDirectionsMap}},initialize:function(){var $self=this;$self.d(null);$self.c(null);$self.rowHeaders(null);$self.columnHeaders(null);$self.resultCells(null);$self.result($self.originalResult());if($self.result().isEmpty()){$self.i(false);$self.h(true);return}if($self.levelSortDirections().count()>0){var a=new $.ig.ResultHeaderSorter($self.result(),$self.hasRows(),$self.hasColumns(),$self.levelSortDirections());$self.result(a.b());$self.appliedLevelSortDirections(a.h());$self.appliedSortDirectionsMap(a.g())}else{$self.appliedLevelSortDirections(new $.ig.List$1($.ig.LevelSortDirection.prototype.$type,0));$self.appliedSortDirectionsMap(new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type)),0))}if($self.hasRows()&&$self.columnSortDirections().count()>0){if($self.appliedLevelSortDirections().count()>0){if($self.originalResult().axes().item(0).positionResolver().hasUnregisterdPositions()){$self.originalResult().axes().item(0).positionResolver().completeRegisterPositions()}if($self.result().axes().item(0).positionResolver().hasUnregisterdPositions()){$self.result().axes().item(0).positionResolver().completeRegisterPositions()}var b=new $.ig.List$1($.ig.TupleSortDirection.prototype.$type,2,$self.columnSortDirections().count());var c=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,1,$self.appliedColumnSortDirections().count());var e=$self.columnSortDirections().getEnumerator();while(e.moveNext()){var d=e.current();var f=$self.originalResult().axes().item(0).tuples().__inner[d.tupleIndex()];var g=$self.result().axes().item(0).positionResolver().getPositionIndex(f);var h=new $.ig.TupleSortDirection;h.sortDirection(d.sortDirection());h.tupleIndex(g);h.comparer(d.comparer());b.add(h);c.item(g,d.tupleIndex())}var i=new $.ig.ResultColumnValueSorter($self.result(),$self.hasRows(),$self.hasColumns(),b);$self.result(i.b());var k=i.g().getEnumerator();while(k.moveNext()){var j=k.current();j.tupleIndex(c.item(j.tupleIndex()))}$self.appliedColumnSortDirections(i.g())}else{var l=new $.ig.ResultColumnValueSorter($self.result(),$self.hasRows(),$self.hasColumns(),$self.columnSortDirections());$self.result(l.b());$self.appliedColumnSortDirections(l.g())}}else{$self.appliedColumnSortDirections(new $.ig.List$1($.ig.TupleSortDirection.prototype.$type,0))}var m=0;var n=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,0);var o=1;if($self.hasColumns()){var p=$self.result().axes().item(m);var q=$self.originalResult().axes().item(m);var r=$self.u(p,q);for(var s=0;s<r.count();s++){var t=r.item(s);n.add(t,s)}m++;o=p.tuples().count()}var u=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,0);if($self.hasRows()){var v=$self.result().axes().item(m);var w=$self.originalResult().axes().item(m);var x=$self.v(v,w);for(var y=0;y<x.count();y++){var z=x.item(y);u.add(z,y)}}var aa=new $.ig.ArrayListCollection$1($.ig.OlapTableViewResultCell.prototype.$type);for(var ab=0;ab<$self.result().cells().count();ab++){var ac=$self.result().cells().item(ab);var ad;(function(){var $ret=ac.properties().tryGetValue("Value",ad);ad=$ret.value;return $ret.ret})();var ae;(function(){var $ret=ac.properties().tryGetValue("FmtValue",ae);ae=$ret.value;return $ret.ret})();var af=ac.cellOrdinal();if($self.hasColumns()){var ag=af%o;var ah=n.item(ag);if(ag!=ah){var ai=$.ig.intDivide(af,o);af=ai*o+ah}}if($self.hasRows()){var aj=$.ig.intDivide(af,o);var ak=u.item(aj);if(aj!=ak){var al=af%o;af=ak*o+al}}aa.add(function(){var $ret=new $.ig.OlapTableViewResultCell;$ret.value(ad);$ret.formattedValue(ae);$ret.cellOrdinal(af);$ret.resultCellIndex(ab);return $ret}());$self.resultCells(aa)}$self.i(false);$self.h(true)},u:function(a,b){var c=new $.ig.List$1($.ig.Number.prototype.$type,0);if(this.viewSettings().a()){this.c(new $.ig.TableCompactViewHeadersFactory(a,b,$.ig.HeaderCellsLayoutOrientation.prototype.horizontal,this.viewSettings().c(),c))}else{this.c(new $.ig.TableViewHeadersFactory(a,b,$.ig.HeaderCellsLayoutOrientation.prototype.horizontal,this.viewSettings().c(),c))}this.columnHeaders(this.c().createHeaderCells());return c},v:function(a,b){var c=new $.ig.List$1($.ig.Number.prototype.$type,0);if(this.viewSettings().b()){this.d(new $.ig.TableCompactViewHeadersFactory(a,b,$.ig.HeaderCellsLayoutOrientation.prototype.vertical,this.viewSettings().d(),c))}else{this.d(new $.ig.TableViewHeadersFactory(a,b,$.ig.HeaderCellsLayoutOrientation.prototype.vertical,this.viewSettings().d(),c))}this.rowHeaders(this.d().createHeaderCells());return c},$type:new $.ig.Type("TableViewImpl",$.ig.Object.prototype.$type)},true);$.ig.util.defType("TableViewSettings","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_c:false,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_d:false,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_b:false,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:false,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("TableViewSettings",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapResultView","Object",{init:function(a,b,c,d){$.ig.Object.prototype.init.call(this);if(a==null){throw new $.ig.ArgumentNullException("result")}this.result(a);this.visibleResult(b);this.hasColumns(c);this.hasRows(d)},_result:null,result:function(value){if(arguments.length===1){this._result=value;return value}else{return this._result}},_visibleResult:null,visibleResult:function(value){if(arguments.length===1){this._visibleResult=value;return value}else{return this._visibleResult}},_hasRows:false,hasRows:function(value){if(arguments.length===1){this._hasRows=value;return value}else{return this._hasRows}},_hasColumns:false,hasColumns:function(value){if(arguments.length===1){this._hasColumns=value;return value}else{return this._hasColumns}},c:function(a,b,c,d,e){var $self=this;var f=0;var g=null;var h=1;if(e){g=a.axes().item(f);h=g.tuples().count();f++}var i=null;var j=1;if(d){i=a.axes().item(f);j=i.tuples().count()}var k=1;if(b!=null){k=b.tuples().count()}var l=1;if(c!=null){l=c.tuples().count()}var m=new Array(k*l);if(a.cells().count()>0){var n=0;var o=a.cells().item(n);for(var p=0;p<j;p++){var q=$.ig.intDivide(o.cellOrdinal(),h);if(q!=p){continue}var r=0;if(b!=null&&i!=null){var s=i.tuples().__inner[p];r=b.positionResolver().getPositionIndex(s)}if(r==-1){while(q==p){n++;if(n<a.cells().count()){o=a.cells().item(n);q=$.ig.intDivide(o.cellOrdinal(),h)}else{break}}continue}var t=o.cellOrdinal()%h;for(var u=0;u<h;u++){if(t!=u){continue}var v=-1;if(c==null||g==null){v=0}else{var w=g.tuples().__inner[u];v=c.positionResolver().getPositionIndex(w)}if(v==-1){n++;if(n<a.cells().count()){o=a.cells().item(n);q=$.ig.intDivide(o.cellOrdinal(),h);if(q>p){break}t=o.cellOrdinal()%h}continue}var x=o.clone();x.cellOrdinal(r*l+v);m[x.cellOrdinal()]=x;n++;if(n<a.cells().count()){o=a.cells().item(n);q=$.ig.intDivide(o.cellOrdinal(),h);if(q>p){break}t=o.cellOrdinal()%h}}}}var y=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,0);for(var aa=0;aa<m.length;aa++){var z=m[aa];if(z!=null){y.add(z)}}var ab=new $.ig.List$1($.ig.OlapResultAxis.prototype.$type,0);if(e){ab.add(c)}if(d){ab.add(b)}return function(){var $ret=new $.ig.OlapResult;$ret.axes(ab);$ret.cells(y);$ret.isEmpty(!d&&!e&&y.count()==0);return $ret}()},a:function(a,b,c){var $self=this;var d=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);if(c){for(var e=0;e<b.count();e++){var f=b.item(e);d.add(a.tuples().__inner[f].clone())}}else{var g=0;var h=b.item(g);for(var i=0;i<a.tuples().count();i++){if(i==h){g++;if(g<b.count()){h=b.item(g)}}else{d.add(a.tuples().__inner[i].clone())}}}var j=function(){var $ret=new $.ig.OlapResultAxis(d,a.tupleSize());$ret.name(a.name());return $ret}();return j},expandTupleMember:function(a,b,c){var $self=this;var d=$self.f(a,b,c,$self.visibleResult());if(d==null){return null}if(!d.isExpandable()){throw new $.ig.InvalidOperationException(1,"The position is not expandable.")}if(d.isExpanded()){return $self}var e=$self.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(f){return f.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var f=$self.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(g){return g.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var g=a=="Axis0"&&!$self.hasColumns()||a=="Axis1"&&$self.hasRows();var h=e.tuples().__inner[b];var i=f.positionResolver().getPositionIndex(h);var j=$self.l(a,i,c,$self.result());if(j.count()==0){return null}var k=null;var l=null;if(g){k=$self.a(f,j,true);if($self.hasColumns()){l=$self.visibleResult().axes().item(0)}}else{l=$self.a(f,j,true);if($self.hasRows()){k=$self.visibleResult().axes().item(1)}}var m=$self.c($self.result(),k,l,$self.hasRows(),$self.hasColumns());var n=$self.b($self.visibleResult(),m,f.name());return new $.ig.OlapResultView($self.result(),n,$self.hasColumns(),$self.hasRows())},collapseTupleMember:function(a,b,c){var $self=this;var d=$self.f(a,b,c,$self.visibleResult());if(d==null){return null}if(!d.isExpandable()){throw new $.ig.InvalidOperationException(1,"The position is not expandable.")}if(!d.isExpanded()){return $self}var e=$self.l(a,b,c,$self.visibleResult());if(e.count()==0){return null}var f=$self.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(g){return g.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var g=a=="Axis0"&&!$self.hasColumns()||a=="Axis1"&&$self.hasRows();var h=null;var i=null;if(g){h=$self.a(f,e,false);if($self.hasColumns()){i=$self.visibleResult().axes().item(0)}}else{i=$self.a(f,e,false);if($self.hasRows()){h=$self.visibleResult().axes().item(1)}}var j=$self.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(k){return k.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var k=j.tuples().__inner[b];if(j.positionResolver().hasUnregisterdPositions()){j.positionResolver().completeRegisterPositions()}var l=j.positionResolver().getHostPositionItemInfo(k,c);var m=l.item(k.item(c).key());m.isExpanded(false);var n=$self.c($self.visibleResult(),h,i,$self.hasRows(),$self.hasColumns());return new $.ig.OlapResultView($self.result(),n,$self.hasColumns(),$self.hasRows())},extend:function(a,b){var $self=this;var c=$self.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(d){return d.name()==b}).first$1($.ig.OlapResultAxis.prototype.$type);var d=b=="Axis0"&&!$self.hasColumns()||b=="Axis1"&&$self.hasRows();var e=null;var f=null;var g=null;var h=false;if(d){e=c;if($self.hasColumns()){f=$self.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=b}).first$1($.ig.OlapResultAxis.prototype.$type);g=$self.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=b}).first$1($.ig.OlapResultAxis.prototype.$type);h=f.tuples().count()!=g.tuples().count()}}else{f=c;if($self.hasRows()){e=$self.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=b}).first$1($.ig.OlapResultAxis.prototype.$type);g=$self.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=b}).first$1($.ig.OlapResultAxis.prototype.$type);h=e.tuples().count()!=g.tuples().count()}}var i=null;var j=null;if(g!=null&&h){var k=$self.c($self.result(),e,f,$self.hasRows(),$self.hasColumns());i=$self.b(k,a,b);j=$self.b(k,a,b)}else{i=$self.b($self.result(),a,b);j=$self.b($self.visibleResult(),a,b)}return new $.ig.OlapResultView(i,j,$self.hasColumns(),$self.hasRows())},b:function(a,b,c){var $self=this;var d=a.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(e){return e.name()==c}).first$1($.ig.OlapResultAxis.prototype.$type);if(d==null){return null}var e=b.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(f){return f.name()==c}).first$1($.ig.OlapResultAxis.prototype.$type);var f=c=="Axis0"&&!$self.hasColumns()||c=="Axis1"&&$self.hasRows();var g=null;var h=null;if(f){if($self.hasColumns()){g=a.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=c}).first$1($.ig.OlapResultAxis.prototype.$type);h=b.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=c}).first$1($.ig.OlapResultAxis.prototype.$type)}}else{if($self.hasRows()){g=a.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=c}).first$1($.ig.OlapResultAxis.prototype.$type);h=b.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(i){return i.name()!=c}).first$1($.ig.OlapResultAxis.prototype.$type)}}var i=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);var k=d.tuples().getEnumerator();while(k.moveNext()){var j=k.current();i.add(j.clone())}var m=e.tuples().getEnumerator();while(m.moveNext()){var l=m.current();i.add(l)}var n=e.tuples().count();var o=h!=null&&h.tuples().count()>0?h.tuples().count():1;var p=d.tuples().count()>0?d.tuples().count():1;var q=g!=null&&g.tuples().count()>0?g.tuples().count():1;var r=p*q;var s=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,0);if(f){var u=a.cells().getEnumerator();while(u.moveNext()){var t=u.current();s.add(t.clone())}var v=new Array(n*q);var w=p*q;var y=b.cells().getEnumerator();while(y.moveNext()){var x=y.current();var z=x.clone();var aa=$self.m(z.cellOrdinal(),g,h);var ab=$.ig.intDivide(z.cellOrdinal(),o);z.cellOrdinal(ab*q+aa);z.cellOrdinal(z.cellOrdinal()+r);v[z.cellOrdinal()-w]=z}for(var ac=0;ac<v.length;ac++){var ad=v[ac];if(ad!=null){s.add(ad)}}}else{var ae=new Array(q*(p+n));var ag=a.cells().getEnumerator();while(ag.moveNext()){var af=ag.current();var ah=af.clone();var ai=$.ig.intDivide(ah.cellOrdinal(),p);ah.cellOrdinal(ah.cellOrdinal()+ai*n);ae[ah.cellOrdinal()]=ah}var ak=b.cells().getEnumerator();while(ak.moveNext()){var aj=ak.current();var al=aj.clone();var am=$self.n(al.cellOrdinal(),g,h,n);var an=$.ig.intDivide(aj.cellOrdinal(),n);if(am!=an){}var ao=al.cellOrdinal()%n;al.cellOrdinal(am*n+ao);al.cellOrdinal(al.cellOrdinal()+(am+1)*p);ae[al.cellOrdinal()]=al}for(var aq=0;aq<ae.length;aq++){var ap=ae[aq];if(ap!=null){s.add(ap)}}}var ar=new $.ig.OlapResult;ar.axes(new $.ig.List$1($.ig.OlapResultAxis.prototype.$type,0));var as=function(){var $ret=new $.ig.OlapResultAxis(i,d.tupleSize());$ret.name(d.name());return $ret}();if(f){if(g!=null){ar.axes().add(g)}ar.axes().add(as)}else{ar.axes().add(as);if(g!=null){ar.axes().add(g)}}ar.cells(s);ar.isEmpty(!$self.hasColumns()&&!$self.hasRows()&&s.count()==0);return ar},m:function(a,b,c){if(c==null){return 0}var d=a%c.tuples().count();var e=c.tuples().__inner[d];var f=b.positionResolver().getPositionIndex(e);return f},n:function(a,b,c,d){if(c==null){return 0}var e=$.ig.intDivide(a,d);var f=c.tuples().__inner[e];var g=b.positionResolver().getPositionIndex(f);return g},l:function(a,b,c,d){var $self=this;var e=d.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(f){return f.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var f=e.tuples().__inner[b];var g=f.item(c);if(e.positionResolver().hasUnregisterdPositions()){e.positionResolver().completeRegisterPositions()}var h=e.positionResolver().h(g,$.ig.ListSortDirection.prototype.ascending);if(h!=null){return h.toList$1($.ig.Number.prototype.$type)}return null},f:function(a,b,c,d){var $self=this;var e=d.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(f){return f.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var f=e.tuples().__inner[b];var g=f.item(c);if(e.positionResolver().hasUnregisterdPositions()){e.positionResolver().completeRegisterPositions()}var h=e.positionResolver().getHostPositionItemInfo(f,c);var i;(function(){var $ret=h.tryGetValue(g.key(),i);i=$ret.value;return $ret.ret})();return i},$type:new $.ig.Type("OlapResultView",$.ig.Object.prototype.$type)},true);$.ig.util.defType("ResultViewHelper","Object",{init:function(){$.ig.Object.prototype.init.call(this)},e:function(a,b,c,d,e){$.ig.ResultViewHelper.prototype.d(a,b,c,true,e.visibleResult());$.ig.ResultViewHelper.prototype.d(a,b,c,true,e.result())},f:function(a,b,c){var $self=this;var d=b.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(e){return e.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var e=c.visibleResult().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(f){return f.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);$.ig.ResultViewHelper.prototype.b(d.positionResolver(),e.positionResolver());var f=b.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(g){return g.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);var g=c.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(h){return h.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);$.ig.ResultViewHelper.prototype.b(f.positionResolver(),g.positionResolver())},d:function(a,b,c,d,e){var $self=this;var f=e.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(g){return g.name()==a}).first$1($.ig.OlapResultAxis.prototype.$type);if(f.positionResolver().hasUnregisterdPositions()){f.positionResolver().completeRegisterPositions()}$.ig.ResultViewHelper.prototype.c(b,c,d,f.positionResolver())},c:function(a,b,c,d){if(d.hasUnregisterdPositions()){d.completeRegisterPositions()}var e=d.positions().__inner[a];var f=d.getHostPositionItemInfo(e,b);var g=f.item(e.item(b).key());g.isExpanded(c)},b:function(a,b){if(a.hasUnregisterdPositions()){a.completeRegisterPositions()}if(b.hasUnregisterdPositions()){b.completeRegisterPositions()}$.ig.ResultViewHelper.prototype.a(a.rootPositionInfo(),b.rootPositionInfo())},a:function(a,b){var $self=this;var d=a.getEnumerator();while(d.moveNext()){var c=d.current();var e=c.value();var f;if(function(){var $ret=b.tryGetValue(c.key(),f);f=$ret.value;return $ret.ret}()){if(e.isExpanded()!=true){f.isExpanded(false)}if(f.count()>0){$.ig.ResultViewHelper.prototype.a(e,f)}}}},$type:new $.ig.Type("ResultViewHelper",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapTableViewHeaderCell","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.columnSpan(1);this.rowSpan(1)},_id:null,id:function(value){if(arguments.length===1){this._id=value;return value}else{return this._id}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_isExpanded:false,isExpanded:function(value){if(arguments.length===1){this._isExpanded=value;return value}else{return this._isExpanded}},_isExpandable:false,isExpandable:function(value){if(arguments.length===1){this._isExpandable=value;return value}else{return this._isExpandable}},_rowIndex:0,rowIndex:function(value){if(arguments.length===1){this._rowIndex=value;return value}else{return this._rowIndex}},_rowSpan:0,rowSpan:function(value){if(arguments.length===1){this._rowSpan=value;return value}else{return this._rowSpan}},_columnIndex:0,columnIndex:function(value){if(arguments.length===1){this._columnIndex=value;return value}else{return this._columnIndex}},_columnSpan:0,columnSpan:function(value){if(arguments.length===1){this._columnSpan=value;return value}else{return this._columnSpan}},_axisName:null,axisName:function(value){if(arguments.length===1){this._axisName=value;return value}else{return this._axisName}},_tupleIndex:0,tupleIndex:function(value){if(arguments.length===1){this._tupleIndex=value;return value}else{return this._tupleIndex}},_memberIndex:0,memberIndex:function(value){if(arguments.length===1){this._memberIndex=value;return value}else{return this._memberIndex}},_levelNumber:0,levelNumber:function(value){if(arguments.length===1){this._levelNumber=value;return value}else{return this._levelNumber}},_hierarchyNumber:0,hierarchyNumber:function(value){if(arguments.length===1){this._hierarchyNumber=value;return value}else{return this._hierarchyNumber}},toString:function(){return this.caption()},$type:new $.ig.Type("OlapTableViewHeaderCell",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapTableViewResultCell","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_value:null,value:function(value){if(arguments.length===1){this._value=value;return value}else{return this._value}},_formattedValue:null,formattedValue:function(value){if(arguments.length===1){this._formattedValue=value;return value}else{return this._formattedValue}},_cellOrdinal:0,cellOrdinal:function(value){if(arguments.length===1){this._cellOrdinal=value;return value}else{return this._cellOrdinal}},_resultCellIndex:0,resultCellIndex:function(value){if(arguments.length===1){this._resultCellIndex=value;return value}else{return this._resultCellIndex}},$type:new $.ig.Type("OlapTableViewResultCell",$.ig.Object.prototype.$type)},true);$.ig.util.defType("ArrayListCollection$1","Object",{$t:null,init:function($t){this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.Object.prototype.init.call(this);this.inner(new $.ig.Array)},_inner:null,inner:function(value){if(arguments.length===1){this._inner=value;return value}else{return this._inner}},collectionChanged:null,indexOf:function(a){return this.inner().indexOf(a)},insert:function(a,b){this.inner().insert(a,b);this.d(a,b)},removeAt:function(a){var b=this.inner()[a];this.inner().removeAt(a);this.e(a,b)},item:function(a,b){if(arguments.length===2){this.inner()[a]=b;return b}else{return this.inner()[a]}},add:function(a){this.inner().add(a);this.d(this.inner().length-1,a)},clear:function(){this.inner().clear();this.c()},contains:function(a){return this.inner().contains(a)},copyTo:function(a,b){throw new $.ig.NotImplementedException},count:function(){return this.inner().length},isReadOnly:function(){return false},remove:function(a){var b=this.inner().indexOf(a);if(b>=0){this.inner().removeAt(b);this.e(b,a);return true}return false},b:function(){var $self=this;var $iter=function(){return function(){return{$state:0,$this:$self,$current:null,$a:0,getEnumerator:function(){if(this.$state===-1){this.$state=0}return this},current:function(){return this.$current},moveNext:function(){do{switch(this.$state){case 0:this.$state=1;break;case 1:this.$a=0;this.$state=5;break;case 2:this.$current=this.$this.inner()[this.$a];this.$state=3;return true;case 3:this.$state=4;break;case 4:this.$a++;this.$state=5;break;case 5:if(this.$a<this.$this.inner().length){this.$state=2}else{this.$state=6}break;case 6:this.$state=-2;break;case-2:return false}}while(this.$state>0)}}}()};return new $.ig.GenericEnumerable$1(this.$t,$iter)},getEnumerator:function(){return this.b().getEnumerator()},d:function(a,b){if(this.collectionChanged!=null){var c=new $.ig.NotifyCollectionChangedEventArgs(1,$.ig.NotifyCollectionChangedAction.prototype.add,b,a);this.collectionChanged(this,c)}},e:function(a,b){if(this.collectionChanged!=null){var c=new $.ig.NotifyCollectionChangedEventArgs(1,$.ig.NotifyCollectionChangedAction.prototype.remove,b,a);this.collectionChanged(this,c)}},c:function(){if(this.collectionChanged!=null){var a=new $.ig.NotifyCollectionChangedEventArgs(1,$.ig.NotifyCollectionChangedAction.prototype.reset,null,-1);this.collectionChanged(this,a)}},$type:new $.ig.Type("ArrayListCollection$1",$.ig.Object.prototype.$type,[$.ig.IList$1.prototype.$type.specialize(0),$.ig.INotifyCollectionChanged.prototype.$type])},true);$.ig.util.defType("IOlapDataSource","Object",{$type:new $.ig.Type("IOlapDataSource",null)},true);$.ig.util.defType("MeasureList","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_name:null,name:function(value){if(arguments.length===1){this._name=value;return value}else{return this._name}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},uniqueName:function(a){if(arguments.length===1){this.name(a);return a}else{return this.name()}},_measures:null,measures:function(value){if(arguments.length===1){this._measures=value;return value}else{return this._measures}},$type:new $.ig.Type("MeasureList",$.ig.Object.prototype.$type,[$.ig.ICoreOlapElement.prototype.$type])},true);$.ig.util.defType("OlapMetadataTreeItem","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_item:null,item:function(value){if(arguments.length===1){this._item=value;return value}else{return this._item}},_type:null,type:function(value){if(arguments.length===1){this._type=value;return value}else{return this._type}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_children:null,children:function(value){if(arguments.length===1){this._children=value;return value}else{return this._children}},e:function(a){if(this.children()==null){this.children(new Array(1));this.children()[0]=a;return}var b=new Array(this.children().length+1);$.ig.Array.prototype.copy(this.children(),0,b,0,this.children().length);b[this.children().length]=a;this.children(b)},$type:new $.ig.Type("OlapMetadataTreeItem",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapDataSource","Object",{ac:null,ab:null,ag:0,j:null,g:null,init:function(a){var $self=this;this.ac=new $.ig.List$1($.ig.PositionInfo.prototype.$type,0);this.ab=new $.ig.List$1($.ig.PositionInfo.prototype.$type,0);this.af=new $.ig.List$1(String,0);$.ig.Object.prototype.init.call(this);this.u(new $.ig.List$1($.ig.AxisElement.prototype.$type,0));this.w(new $.ig.List$1($.ig.AxisElement.prototype.$type,0));this.v(new $.ig.List$1($.ig.AxisElement.prototype.$type,0));this.o(false);this.al(null);this.t(false);this.aj(null);this.isInitialized(false);this.m(false);this.s(false);this.n(false);this.r(false);this.q(false);this.p(false);this.catalogs(new $.ig.ArrayListCollection$1($.ig.Catalog.prototype.$type));this.cubes(new $.ig.ArrayListCollection$1($.ig.Cube.prototype.$type));this.measureGroups(new $.ig.ArrayListCollection$1($.ig.MeasureGroup.prototype.$type));this.rowAxis(new $.ig.ArrayListCollection$1($.ig.ICoreOlapElement.prototype.$type));this.columnAxis(new $.ig.ArrayListCollection$1($.ig.ICoreOlapElement.prototype.$type));this.filters(new $.ig.ArrayListCollection$1($.ig.Hierarchy.prototype.$type));this.measures(new $.ig.ArrayListCollection$1($.ig.Measure.prototype.$type));this.measureListLocation($.ig.MeasureListLocation.prototype.columns);this.measureListIndex(-1);this.sourceOptions(a);this.result(function(){var $ret=new $.ig.OlapResult;$ret.isEmpty(true);return $ret}())},_isInitialized:false,isInitialized:function(value){if(arguments.length===1){this._isInitialized=value;return value}else{return this._isInitialized}},_catalogs:null,catalogs:function(value){if(arguments.length===1){this._catalogs=value;return value}else{return this._catalogs}},_cubes:null,cubes:function(value){if(arguments.length===1){this._cubes=value;return value}else{return this._cubes}},_cube:null,cube:function(value){if(arguments.length===1){this._cube=value;return value}else{return this._cube}},_measureGroup:null,measureGroup:function(value){if(arguments.length===1){this._measureGroup=value;return value}else{return this._measureGroup}},_measureGroups:null,measureGroups:function(value){if(arguments.length===1){this._measureGroups=value;return value}else{return this._measureGroups}},_sourceOptions:null,sourceOptions:function(value){if(arguments.length===1){this._sourceOptions=value;return value}else{return this._sourceOptions}},dataProviderFactory:function(a){if(arguments.length===1){this.g=a;return a}else{if(this.g==null){this.g=this.h()}return this.g}},_metadataTree:null,metadataTree:function(value){if(arguments.length===1){this._metadataTree=value;return value}else{return this._metadataTree}},_rowAxis:null,rowAxis:function(value){if(arguments.length===1){this._rowAxis=value;return value}else{return this._rowAxis}},_columnAxis:null,columnAxis:function(value){if(arguments.length===1){this._columnAxis=value;return value}else{return this._columnAxis}},_filters:null,filters:function(value){if(arguments.length===1){this._filters=value;return value}else{return this._filters}},_measures:null,measures:function(value){if(arguments.length===1){this._measures=value;return value}else{return this._measures}},measureListIndex:function(a){if(arguments.length===1){if(this.ag!=a){this.p(true);
this.ag=a;this.az();this.p(false)}return a}else{return this.ag}},measureListLocation:function(a){if(arguments.length===1){if(this.j!=a){this.ax();this.j=a;this.az()}return a}else{return this.j}},_result:null,result:function(value){if(arguments.length===1){this._result=value;return value}else{return this._result}},_l:null,l:function(value){if(arguments.length===1){this._l=value;return value}else{return this._l}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_u:null,u:function(value){if(arguments.length===1){this._u=value;return value}else{return this._u}},_w:null,w:function(value){if(arguments.length===1){this._w=value;return value}else{return this._w}},_v:null,v:function(value){if(arguments.length===1){this._v=value;return value}else{return this._v}},af:null,_o:false,o:function(value){if(arguments.length===1){this._o=value;return value}else{return this._o}},_al:null,al:function(value){if(arguments.length===1){this._al=value;return value}else{return this._al}},_t:false,t:function(value){if(arguments.length===1){this._t=value;return value}else{return this._t}},_aj:null,aj:function(value){if(arguments.length===1){this._aj=value;return value}else{return this._aj}},_m:false,m:function(value){if(arguments.length===1){this._m=value;return value}else{return this._m}},_s:false,s:function(value){if(arguments.length===1){this._s=value;return value}else{return this._s}},_n:false,n:function(value){if(arguments.length===1){this._n=value;return value}else{return this._n}},_r:false,r:function(value){if(arguments.length===1){this._r=value;return value}else{return this._r}},_q:false,q:function(value){if(arguments.length===1){this._q=value;return value}else{return this._q}},_p:false,p:function(value){if(arguments.length===1){this._p=value;return value}else{return this._p}},getMembersOfLevel:function(a){},getMembersOfHierarchy:function(a){},getMembersOfMember:function(a){},setCube:function(a){if(!this.isInitialized()){throw new $.ig.InvalidOperationException(1,"Data source is not initialized.")}return this.an(a)},setMeasureGroup:function(a){if(!this.isInitialized()){throw new $.ig.InvalidOperationException(1,"Data source is not initialized.")}return this.ao(a)},getCoreElement:function(a,b){if(b==$.ig.MeasureList.prototype.$type){var c;if(this.measureListLocation()==$.ig.MeasureListLocation.prototype.columns){c=this.columnAxis()}else{c=this.rowAxis()}var d=null;var f=c.getEnumerator();while(f.moveNext()){var e=f.current();d=$.ig.util.cast($.ig.MeasureList.prototype.$type,e);if(d!=null){break}}return d}else{return this.getCoreElements(a,b).firstOrDefault$1($.ig.ICoreOlapElement.prototype.$type)}},getCoreElements:function(a,b){var $self=this;if(b==$.ig.Dimension.prototype.$type){return $self.a($.ig.Dimension.prototype.$type,$self.c().n().where$1($.ig.Dimension.prototype.$type,function(c){return a(c)}))}if(b==$.ig.Hierarchy.prototype.$type){return $self.a($.ig.Hierarchy.prototype.$type,$self.c().o().where$1($.ig.Hierarchy.prototype.$type,function(c){return a(c)}))}if(b==$.ig.Level.prototype.$type){return $self.a($.ig.Level.prototype.$type,$self.c().r().where$1($.ig.Level.prototype.$type,function(c){return a(c)}))}if(b==$.ig.Measure.prototype.$type){return $self.a($.ig.Measure.prototype.$type,$self.c().s().where$1($.ig.Measure.prototype.$type,function(c){return a(c)}))}if(b==$.ig.KpiMeasure.prototype.$type){return $self.a($.ig.KpiMeasure.prototype.$type,$self.c().q().where$1($.ig.KpiMeasure.prototype.$type,function(c){return a(c)}))}if(b==$.ig.Kpi.prototype.$type){return $self.a($.ig.Kpi.prototype.$type,$self.c().p().where$1($.ig.Kpi.prototype.$type,function(c){return a(c)}))}throw new $.ig.NotSupportedException(0,"Supported types are Dimension, Hierarchy, Level and Measure")},expandTupleMember:function(a,b,c){var $self=this;var d=$self.d(a,$self.result());if(d==null){throw new $.ig.InvalidOperationException(1,"No axis found for the specified index.")}var e=$self.ac.where$1($.ig.PositionInfo.prototype.$type,function(f){return f.c()==a&&f.b()==b&&f.a()==c}).firstOrDefault$1($.ig.PositionInfo.prototype.$type);if(e==null){e=function(){var $ret=new $.ig.PositionInfo;$ret.c(a);$ret.a(c);$ret.b(b);return $ret}();$self.ac.add(e)}else{$self.ac.remove(e)}},collapseTupleMember:function(a,b,c){var $self=this;var d=$self.d(a,$self.result());if(d==null){throw new $.ig.InvalidOperationException(1,"No axis found for the specified index.")}var e=$self.ac.where$1($.ig.PositionInfo.prototype.$type,function(f){return f.c()==a&&f.b()==b&&f.a()==c}).firstOrDefault$1($.ig.PositionInfo.prototype.$type);if(e==null){e=function(){var $ret=new $.ig.PositionInfo;$ret.c(a);$ret.a(c);$ret.b(b);return $ret}();$self.ab.add(e)}else{$self.ac.remove(e)}},clearPendingChanges:function(){this.ab.clear();this.ac.clear()},update:function(){var $self=this;if($self.t()){return $self.aj()}$self.t(true);if($self.ac.count()>0){var a=$self.as($self.ac);$self.aj(a.continueWithTask$1($.ig.OlapResult.prototype.$type,function(b){return $self.ai()}))}else{$self.aj($self.ai())}var b=$self.aj();$self.aj().i(function(c){$self.t(false);$self.aj(null)});return b},initialize:function(){var $self=this;if($self.o()){return $self.al()}$self.o(true);$self.al($self.am());var a=$self.al();$self.al().i(function(b){$self.o(false);$self.al(null)});return a},addFilterMember:function(a,b){var $self=this;var c;var d=function(){var $ret=$self.b(a,c);c=$ret.filtersCollection;return $ret.ret}();if(d==null){d=new $.ig.AxisElement(a,function(){var $ret=new $.ig.ArrayListCollection$1(String);$ret.add(b);return $ret}());c.add(d)}else{if(!d.a().contains(b)){d.a().add(b);if($self.af.contains(b)){$self.af.remove(b)}else{$self.af.add(b)}}}},getFilterMemberNames:function(a){var $self=this;var b;var c=function(){var $ret=$self.b(a,b);b=$ret.filtersCollection;return $ret.ret}();if(c!=null){return $self.a(String,c.a())}return new $.ig.ArrayListCollection$1(String)},removeFilterMember:function(a,b){var $self=this;var c;var d=function(){var $ret=$self.b(a,c);c=$ret.filtersCollection;return $ret.ret}();if(d==null){return}if(d.a().remove(b)){if($self.af.contains(b)){$self.af.remove(b)}else{$self.af.add(b)}}},removeAllFilterMembers:function(a){var $self=this;var b;var c=function(){var $ret=$self.b(a,b);b=$ret.filtersCollection;return $ret.ret}();if(c==null){return}for(var d=c.a().count()-1;d>=0;d--){var e=c.a().item(d);c.a().removeAt(d);if($self.af.contains(e)){$self.af.remove(e)}else{$self.af.add(e)}}},getProviderDefaultProperties:function(){var a=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);return a},getProviderDefaultRestrictions:function(){var a=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);return a},tryGetMember:function(a,b){var $self=this;return{ret:function(){var $ret=$self.c().f(a,b);b=$ret.member;return $ret.ret}(),member:b};return{member:b}},tryGetMembersForLevel:function(a,b){var $self=this;return{ret:function(){var $ret=$self.c().h(a,b);b=$ret.members;return $ret.ret}(),members:b};return{members:b}},am:function(){},ai:function(){},h:function(){},ah:function(){},an:function(a){var $self=this;if(String.isNullOrEmpty(a)){if(a==null){throw new $.ig.ArgumentNullException("cubeName")}throw new $.ig.InvalidOperationException(1,"cubeName cannot be empty.")}var b=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);if($self.cube()!=null){if($self.cube().name()==a){b.e($self.metadataTree());return b.b()}$self.au()}var d=$self.cubes().getEnumerator();while(d.moveNext()){var c=d.current();if(c.name()==a){$self.cube(c);break}}var e=$self.ah();if(!$self.isInitialized()){var f=$self.sourceOptions().measureGroup();if(!String.isNullOrEmpty(f)){return e.continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(g){return $self.ao(f)})}}return e.continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(g){return $self.ao(null)})},ak:function(){var $self=this;var a=null;var b=null;var c=null;var d=new $.ig.List$1($.ig.AxisElement.prototype.$type,0);if(!String.isNullOrEmpty($self.sourceOptions().columns())){var e=new $.ig.AxisDefinitionParser($self.sourceOptions().columns());a=e.c()}if(!String.isNullOrEmpty($self.sourceOptions().rows())){var f=new $.ig.AxisDefinitionParser($self.sourceOptions().rows());b=f.c()}if(!String.isNullOrEmpty($self.sourceOptions().filters())){var g=new $.ig.AxisDefinitionParser($self.sourceOptions().filters());c=g.c()}if(a!=null&&a.count()>0){var i=a.getEnumerator();while(i.moveNext()){var h=i.current();$self.at($.ig.ICoreOlapElement.prototype.$type,h.b(),$self.columnAxis(),$.ig.Hierarchy.prototype.$type);$self.u().add(h);if(h.a().count()>0){d.add(h);var k=h.a().getEnumerator();while(k.moveNext()){var j=k.current();$self.af.add(j)}}}}if(b!=null&&b.count()>0){var m=b.getEnumerator();while(m.moveNext()){var l=m.current();$self.at($.ig.ICoreOlapElement.prototype.$type,l.b(),$self.rowAxis(),$.ig.Hierarchy.prototype.$type);$self.w().add(l);if(l.a().count()>0){d.add(l);var o=l.a().getEnumerator();while(o.moveNext()){var n=o.current();$self.af.add(n)}}}}if(c!=null&&c.count()>0){var q=c.getEnumerator();while(q.moveNext()){var p=q.current();$self.at($.ig.Hierarchy.prototype.$type,p.b(),$self.filters(),$.ig.Hierarchy.prototype.$type);$self.v().add(p);if(p.a().count()>0){d.add(p);var s=p.a().getEnumerator();while(s.moveNext()){var r=s.current();$self.af.add(r)}}}}var t=null;if(!String.isNullOrEmpty($self.sourceOptions().measures())){var u=new $.ig.AxisDefinitionParser($self.sourceOptions().measures());t=u.c()}if(t!=null&&t.count()>0){var w=t.getEnumerator();while(w.moveNext()){var v=w.current();$self.at($.ig.Measure.prototype.$type,v.b(),$self.measures(),$.ig.Measure.prototype.$type)}}if($self.m()||$self.s()||$self.n()||$self.r()||$self.p()){if(d.count()>0){var x=new Array(d.count());for(var y=0;y<d.count();y++){var z=d.item(y).b();x[y]=$self.getMembersOfHierarchy(z)}var aa=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);var ab=new $.ig.TaskFactory;ab.c(x,function(ac){$self.ai().i(function(ad){$self.aw();aa.e($self.metadataTree())})});return aa.b()}return $self.ai().continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(ac){$self.aw();var ad=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);ad.e($self.metadataTree());return ad.b()})}$self.aw();var ac=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);ac.e($self.metadataTree());return ac.b()},aq:function(a){var $self=this;var b=$self.dataProviderFactory().createDataProvider();var c=$self.getProviderDefaultRestrictions();var d=$self.getProviderDefaultProperties();var e=b.discoverCubesAsync(d,c).j($.ig.IList$1.prototype.$type.specialize($.ig.Cube.prototype.$type),function(f){$self.cubes($self.a($.ig.Cube.prototype.$type,f.m()));return $self.cubes()});return e},ar:function(){var $self=this;var a=$self.dataProviderFactory().createDataProvider();var b=$self.getProviderDefaultRestrictions();var c=$self.getProviderDefaultProperties();var d=a.discoverMeasureGroupsAsync(c,b).j($.ig.IList$1.prototype.$type.specialize($.ig.MeasureGroup.prototype.$type),function(e){$self.measureGroups($self.a($.ig.MeasureGroup.prototype.$type,e.m()));return $self.measureGroups()});return d},aw:function(){this.isInitialized(true)},au:function(){this.cube(null);this.measureGroups(new $.ig.ArrayListCollection$1($.ig.MeasureGroup.prototype.$type));this.filters().clear();this.rowAxis().clear();this.columnAxis().clear();this.measures().clear();this.c(null);this.av()},av:function(){this.measureGroup(null);this.metadataTree(null)},ao:function(a){var $self=this;if($self.cube()==null){throw new $.ig.InvalidOperationException(1,"Data source has no Cube set.")}var b=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);if($self.measureGroup()!=null){if($self.measureGroup().name()==a){b.e($self.metadataTree());return b.b()}$self.av()}if(!String.isNullOrEmpty(a)&&$self.measureGroups().count()==0){var c=$self.ar().continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(d){if($self.measureGroups().count()==0){return $self.ao(null)}return $self.ao(a)});return c}var e=$self.measureGroups().getEnumerator();while(e.moveNext()){var d=e.current();if(d.name()==a){$self.measureGroup(d);break}}$self.metadataTree($self.k(a));b.e($self.metadataTree());return b.b()},k:function(a){var $self=this;var b=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.cube);$ret.caption($self.cube().caption());$ret.item($self.cube());return $ret}();var c;var d;var e;var f=true;if(String.isNullOrEmpty(a)||$self.measureGroups()==null){c=$self.c().n();d=$self.c().s();e=$self.c().p()}else{f=false;c=$self.c().a().getMeasureGroupDimensions(a);d=$self.c().a().getMeasureGroupMeasures(a);e=$self.c().a().getMeasureGroupKpis(a)}var g=$.ig.MetaTreeHelper.prototype.getDimensionMetaItems(c,d,e,$self.c().o(),$self.c().r(),f,$self.c());$.ig.MetaTreeHelper.prototype.setMetaItemChildren(b,g);return b},d:function(a,b){var $self=this;if(b!=null&&b.axes().count()>0){return b.axes().where$1($.ig.OlapResultAxis.prototype.$type,function(c){return c.name()==a}).firstOrDefault$1($.ig.OlapResultAxis.prototype.$type)}return null},ay:function(a,b){var $self=this;switch(a.action()){case $.ig.NotifyCollectionChangedAction.prototype.add:var d=a.newItems().getEnumerator();while(d.moveNext()){var c=d.current();var e=$.ig.util.cast($.ig.Hierarchy.prototype.$type,c);if(e!=null){if($self.isInitialized()){b.add(new $.ig.AxisElement(e.uniqueName(),new $.ig.ArrayListCollection$1(String)))}}}break;case $.ig.NotifyCollectionChangedAction.prototype.remove:var g=a.oldItems().getEnumerator();while(g.moveNext()){var f=g.current();var h=$.ig.util.cast($.ig.Hierarchy.prototype.$type,f);if(h!=null){var i=b.where$1($.ig.AxisElement.prototype.$type,function(j){return j.b()==h.uniqueName()}).firstOrDefault$1($.ig.AxisElement.prototype.$type);if(i!=null){var j=new $.ig.List$1(String,0);for(var k=0;k<i.a().count();k++){j.add(i.a().item(k))}for(var l=0;l<j.count();l++){var m=j.item(l);$self.removeFilterMember(i.b(),m)}b.remove(i)}}else{var n=$.ig.util.cast($.ig.MeasureList.prototype.$type,f);if(n!=null){if(!$self.r()&&!$self.q()&&!$self.p()){$self.measures().clear()}}}}break}},a0:function(a,b){var $self=this;switch(a.action()){case $.ig.NotifyCollectionChangedAction.prototype.add:var d=a.newItems().getEnumerator();while(d.moveNext()){var c=d.current();var e=$.ig.util.cast($.ig.Hierarchy.prototype.$type,c);if(e!=null){var f=$.ig.util.cast($.ig.MeasureList.prototype.$type,b.where$1($.ig.ICoreOlapElement.prototype.$type,function(g){return $.ig.util.cast($.ig.MeasureList.prototype.$type,g)!==null}).firstOrDefault$1($.ig.ICoreOlapElement.prototype.$type));if(f!=null&&$self.measureListIndex()>=a.newStartingIndex()){$self.measureListIndex($self.measureListIndex()+1)}}}break;case $.ig.NotifyCollectionChangedAction.prototype.remove:var h=a.oldItems().getEnumerator();while(h.moveNext()){var g=h.current();var i=$.ig.util.cast($.ig.Hierarchy.prototype.$type,g);if(i!=null){var j=$.ig.util.cast($.ig.MeasureList.prototype.$type,b.where$1($.ig.ICoreOlapElement.prototype.$type,function(k){return $.ig.util.cast($.ig.MeasureList.prototype.$type,k)!==null}).firstOrDefault$1($.ig.ICoreOlapElement.prototype.$type));if(j!=null&&$self.measureListIndex()>a.oldStartingIndex()){$self.measureListIndex($self.measureListIndex()-1)}}}break}},az:function(){var $self=this;var a;if($self.measureListLocation()==$.ig.MeasureListLocation.prototype.columns){a=$self.columnAxis()}else{a=$self.rowAxis()}var b=null;var c=0;var e=a.getEnumerator();while(e.moveNext()){var d=e.current();b=$.ig.util.cast($.ig.MeasureList.prototype.$type,d);if(b!=null){break}c++}if($self.measures().count()>1){if(b==null){b=function(){var $ret=new $.ig.MeasureList;$ret.measures($self.measures());return $ret}();if($self.measureListIndex()<0||$self.measureListIndex()>a.count()){$self.ag=a.count();a.add(b)}else{a.insert($self.measureListIndex(),b)}}else{if(c!=$self.measureListIndex()){a.removeAt(c);if($self.measureListIndex()>a.count()){$self.ag=a.count();a.add(b)}else{a.insert($self.measureListIndex(),b)}}}}else{if(b!=null){a.removeAt(c)}}},ae:function(){return this.ac},ad:function(){return this.ab},at:function($tItem,a,b,c){var $self=this;var d=function(e){return e.uniqueName()==a};var e=$self.getCoreElement(d,c);if(e!=null&&!b.contains($.ig.Object.prototype.$type,e)){b.add(e)}},as:function(a){var $self=this;var b=new $.ig.List$1(String,0);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();var e=$self.d(c.c(),$self.result()).tuples().__inner[c.b()].members().item(c.a());var f=$self.getCoreElement(function(g){return g.hierarchyUniqueName()==e.hierarchyUniqueName()&&g.depth()==e.levelNumber()+1},$.ig.Level.prototype.$type);if(f!=null&&!$self.c().b(f.uniqueName())&&!b.contains(f.uniqueName())){b.add(f.uniqueName())}}if(b.count()>0){var g=new Array(b.count());for(var h=0;h<b.count();h++){g[h]=$self.getMembersOfLevel(b.item(h))}return(new $.ig.TaskFactory).d($.ig.Array.prototype.$type,g,function(i){return i})}var i=new $.ig.TaskCompletionSource$1($.ig.Array.prototype.$type,0);i.e(new Array(0));return i.b()},ax:function(){var a;if(this.measureListLocation()==$.ig.MeasureListLocation.prototype.columns){a=this.columnAxis()}else{a=this.rowAxis()}if(a==null){return}var b=null;var c=0;var e=a.getEnumerator();while(e.moveNext()){var d=e.current();b=$.ig.util.cast($.ig.MeasureList.prototype.$type,d);if(b!=null){break}c++}if(b!=null){this.q(true);a.removeAt(c)}},a:function($t,a){var b=new $.ig.ArrayListCollection$1($t);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();b.add(c)}return b},b:function(a,b){var $self=this;var c=$self.u().where$1($.ig.AxisElement.prototype.$type,function(d){return d.b()==a}).firstOrDefault$1($.ig.AxisElement.prototype.$type);if(c!=null){b=$self.u();return{ret:c,filtersCollection:b}}c=$self.w().where$1($.ig.AxisElement.prototype.$type,function(d){return d.b()==a}).firstOrDefault$1($.ig.AxisElement.prototype.$type);if(c!=null){b=$self.w();return{ret:c,filtersCollection:b}}c=$self.v().where$1($.ig.AxisElement.prototype.$type,function(d){return d.b()==a}).firstOrDefault$1($.ig.AxisElement.prototype.$type);if(c!=null){b=$self.v();return{ret:c,filtersCollection:b}}b=null;return{ret:null,filtersCollection:b};return{filtersCollection:b}},$type:new $.ig.Type("OlapDataSource",$.ig.Object.prototype.$type,[$.ig.IOlapDataSource.prototype.$type])},true);$.ig.util.defType("PositionInfo","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:0,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:0,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("PositionInfo",$.ig.Object.prototype.$type)},true);$.ig.util.defType("CubeMetaItemsCache","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.m=new $.ig.Dictionary$2(String,$.ig.Tuple$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.Member.prototype.$type),0);this.i=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Member.prototype.$type,0);this.l=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.Member.prototype.$type),0);this.k=new $.ig.Dictionary$2(String,$.ig.Measure.prototype.$type,0);this.j=new $.ig.Dictionary$2(String,$.ig.KpiMeasure.prototype.$type,0)},m:null,i:null,l:null,k:null,j:null,_s:null,s:function(value){if(arguments.length===1){this._s=value;return value}else{return this._s}},_q:null,q:function(value){if(arguments.length===1){this._q=value;return value}else{return this._q}},_n:null,n:function(value){if(arguments.length===1){this._n=value;return value}else{return this._n}},_o:null,o:function(value){if(arguments.length===1){this._o=value;return value}else{return this._o}},_r:null,r:function(value){if(arguments.length===1){this._r=value;return value}else{return this._r}},_p:null,p:function(value){if(arguments.length===1){this._p=value;return value}else{return this._p}},_t:null,t:function(value){if(arguments.length===1){this._t=value;return value}else{return this._t}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},b:function(a){return this.l.containsKey(a)},u:function(a){var $self=this;var b;if(!function(){var $ret=$self.m.tryGetValue(a.uniqueName(),b);b=$ret.value;return $ret.ret}()){var c=$self.m.count();b=new $.ig.Tuple$2($.ig.Number.prototype.$type,$.ig.Member.prototype.$type,c,a);$self.m.item(a.uniqueName(),b);$self.i.item(c,a);var d;if(!function(){var $ret=$self.l.tryGetValue(a.levelUniqueName(),d);d=$ret.value;return $ret.ret}()){d=new $.ig.ArrayListCollection$1($.ig.Member.prototype.$type);$self.l.item(a.levelUniqueName(),d)}d.add(a)}return b.a()},g:function(a,b){var $self=this;var c;if(function(){var $ret=$self.m.tryGetValue(a,c);c=$ret.value;return $ret.ret}()){b=c.a();return{ret:true,memberOrdinal:b}}b=-1;return{ret:false,memberOrdinal:b};return{memberOrdinal:b}},f:function(a,b){var $self=this;var c;if(function(){var $ret=$self.m.tryGetValue(a,c);c=$ret.value;return $ret.ret}()){b=c.b();return{ret:true,member:b}}b=null;return{ret:false,member:b};return{member:b}},e:function(a,b){var $self=this;return{ret:function(){var $ret=$self.i.tryGetValue(a,b);b=$ret.value;return $ret.ret}(),member:b};return{member:b}},h:function(a,b){var $self=this;return{ret:function(){var $ret=$self.l.tryGetValue(a,b);b=$ret.value;return $ret.ret}(),members:b};return{members:b}},d:function(a,b){var $self=this;if(!function(){var $ret=$self.k.tryGetValue(a,b);b=$ret.value;return $ret.ret}()){b=$self.s().where$1($.ig.Measure.prototype.$type,function(c){return c.uniqueName()==a}).firstOrDefault$1($.ig.Measure.prototype.$type);if(b==null){return{ret:false,measure:b}}$self.k.add(a,b)}return{ret:true,measure:b};return{measure:b}},c:function(a,b){var $self=this;if(!function(){var $ret=$self.j.tryGetValue(a,b);b=$ret.value;return $ret.ret}()){b=$self.q().where$1($.ig.KpiMeasure.prototype.$type,function(c){return c.uniqueName()==a}).firstOrDefault$1($.ig.KpiMeasure.prototype.$type);if(b==null){return{ret:false,measure:b}}$self.j.add(a,b)}return{ret:true,measure:b};return{measure:b}},$type:new $.ig.Type("CubeMetaItemsCache",$.ig.Object.prototype.$type)},true);$.ig.util.defType("MetaTreeHelper","Object",{init:function(){$.ig.Object.prototype.init.call(this)},getDimensionMetaItems:function(a,b,c,d,e,f,g){var $self=this;var h=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);var i=new $.ig.HierarchyItemPosition;i.a(0);i.b(0);var j=new $.ig.List$1($.ig.Hierarchy.prototype.$type,0);var l=d.getEnumerator();while(l.moveNext()){var k=l.current();j.add(k)}var m=new $.ig.List$1($.ig.Level.prototype.$type,0);var o=e.getEnumerator();while(o.moveNext()){var n=o.current();m.add(n)}var q=a.getEnumerator();while(q.moveNext()){var p=q.current();var r=$.ig.MetaTreeHelper.prototype.e(j,m,p,i);if(p.dimensionType()!=$.ig.DimensionType.prototype.measure){var s=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.dimension);$ret.caption(p.caption());$ret.item(p);return $ret}();$.ig.MetaTreeHelper.prototype.setMetaItemChildren(s,r);h.add(s)}else{var t=$.ig.MetaTreeHelper.prototype.b(b,p);h.insert(0,t);if(c.count$1($.ig.Kpi.prototype.$type)>0){var u=function(){var $ret=new $.ig.KpiDimension;$ret.caption("Kpis");return $ret}();var v=$.ig.MetaTreeHelper.prototype.a(c,u,g);v.type($.ig.OlapMetadataTreeItemType.prototype.kpiRoot);h.insert(1,v)}}}return h},setMetaItemChildren:function(a,b){if(b.count()>0){var c=new Array(b.count());for(var d=0;d<b.count();d++){c[d]=b.item(d)}a.children(c)}},e:function(a,b,c,d){var $self=this;var e=new $.ig.Dictionary$2(String,$.ig.Tuple$2.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type)),0);var f=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);var g=a.item(d.a());while(g.dimensionUniqueName()!=c.uniqueName()){d.a(d.a()+1);g=a.item(d.a())}while(g.dimensionUniqueName()==c.uniqueName()){var h=null;if(!String.isNullOrEmpty(g.hierarchyDisplayFolder())){var i=String.empty();var j=$.ig.MetaTreeHelper.prototype.c(g.hierarchyDisplayFolder());for(var k=0;k<j.length;k++){var l=j[k];i+=l+"\\";var m;if(!function(){var $ret=e.tryGetValue(i,m);m=$ret.value;return $ret.ret}()){var n=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.group);$ret.caption(l);return $ret}();m=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),n,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));e.add(i,m);if(h!=null){h.b().add(n)}else{f.add(n)}}h=m}}var o;switch(g.hierarchyOrigin()){case $.ig.HierarchyOrigin.prototype.systemEnabled:o=$.ig.OlapMetadataTreeItemType.prototype.systemEnabledHierarchy;break;case $.ig.HierarchyOrigin.prototype.userDefined:o=$.ig.OlapMetadataTreeItemType.prototype.userDefinedHierarchy;break;default:o=$.ig.OlapMetadataTreeItemType.prototype.parentChildHierarchy;break}var p=$.ig.MetaTreeHelper.prototype.f(b,g,d);var q=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type(o);$ret.caption(g.caption());$ret.item(g);return $ret}();$.ig.MetaTreeHelper.prototype.setMetaItemChildren(q,p);if(h!=null){h.b().add(q)}else{f.add(q)}if(d.a()+1>=a.count()){break}d.a(d.a()+1);g=a.item(d.a())}var s=e.values().getEnumerator();while(s.moveNext()){var r=s.current();var t=r.a();$.ig.MetaTreeHelper.prototype.setMetaItemChildren(t,r.b())}return f},f:function(a,b,c){var $self=this;var d=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);if(a==null||a.count()==0){return d}var e=a.item(c.b());while(e.hierarchyUniqueName()!=b.uniqueName()){c.b(c.b()+1);e=a.item(c.b())}while(e.hierarchyUniqueName()==b.uniqueName()){var f;switch(e.depth()){case 0:case 1:f=$.ig.OlapMetadataTreeItemType.prototype.level1;break;case 2:f=$.ig.OlapMetadataTreeItemType.prototype.level2;break;case 3:f=$.ig.OlapMetadataTreeItemType.prototype.level3;break;case 4:f=$.ig.OlapMetadataTreeItemType.prototype.level4;break;default:f=$.ig.OlapMetadataTreeItemType.prototype.level5;break}var g=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type(f);$ret.caption(e.caption());$ret.item(e);return $ret}();d.add(g);if(c.b()+1>=a.count()){break}c.b(c.b()+1);e=a.item(c.b())}return d},b:function(a,b){var $self=this;var c=new $.ig.Dictionary$2(String,$.ig.Tuple$2.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type)),0);var d=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.measure);$ret.caption(b.caption());$ret.item(b);return $ret}();var e=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),d,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));var g=a.getEnumerator();while(g.moveNext()){var f=g.current();if($.ig.util.cast($.ig.KpiMeasure.prototype.$type,f)!==null){continue}var h=e;if(!String.isNullOrEmpty(f.measureGroupName())){if(!function(){var $ret=c.tryGetValue(f.measureGroupName(),h);h=$ret.value;return $ret.ret}()){var i=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.group);$ret.caption(f.measureGroupName());return $ret}();h=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),i,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));c.add(f.measureGroupName(),h);e.b().add(h.a())}}var j=h;if(!String.isNullOrEmpty(f.measureDisplayFolder())){var k=f.measureGroupName();var l=$.ig.MetaTreeHelper.prototype.c(f.measureDisplayFolder());for(var m=0;m<l.length;m++){var n=l[m];k+="\\"+n;var o;if(!function(){var $ret=c.tryGetValue(k,o);o=$ret.value;return $ret.ret}()){var p=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.group);$ret.caption(n);return $ret}();o=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),p,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));c.add(k,o);j.b().add(p)}j=o}}var q=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.measure);$ret.caption(f.caption());$ret.item(f);return $ret}();j.b().add(q)}var r=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);var t=e.b().where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(u){return u.type()==$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(u){return u.caption()}).getEnumerator();while(t.moveNext()){var s=t.current();r.add(s)}var v=e.b().where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(w){return w.type()!=$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(w){return w.caption()}).getEnumerator();while(v.moveNext()){var u=v.current();r.add(u)}$.ig.MetaTreeHelper.prototype.setMetaItemChildren(d,r);var x=c.values().getEnumerator();while(x.moveNext()){var w=x.current();var y=w.b();var z=y.where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(aa){return aa.type()==$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(aa){return aa.caption()}).toList$1($.ig.OlapMetadataTreeItem.prototype.$type);var aa=y.where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(ab){return ab.type()!=$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(ab){return ab.caption()}).toList$1($.ig.OlapMetadataTreeItem.prototype.$type);var ab=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);for(var ac=0;ac<z.count();ac++){ab.add(z.item(ac))}for(var ad=0;ad<aa.count();ad++){ab.add(aa.item(ad))}var ae=w.a();$.ig.MetaTreeHelper.prototype.setMetaItemChildren(ae,ab)}return d},a:function(a,b,c){var $self=this;var d=new $.ig.Dictionary$2(String,$.ig.Tuple$2.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type)),0);var e=c.s().toList$1($.ig.Measure.prototype.$type);c.s(e);var f=new $.ig.List$1($.ig.KpiMeasure.prototype.$type,0);c.q(f);var g=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.kpiRoot);$ret.caption(b.caption());$ret.item(b);return $ret}();var h=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),g,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));var j=a.getEnumerator();while(j.moveNext()){var i=j.current();var k=h;if(!String.isNullOrEmpty(i.kpiDisplayFolder())){var l=String.empty();var m=$.ig.MetaTreeHelper.prototype.c(i.kpiDisplayFolder());for(var n=0;n<m.length;n++){var o=m[n];l+="\\"+o;var p;if(!function(){var $ret=d.tryGetValue(l,p);p=$ret.value;return $ret.ret}()){var q=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.group);$ret.caption(o);return $ret}();p=new $.ig.Tuple$2($.ig.OlapMetadataTreeItem.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.OlapMetadataTreeItem.prototype.$type),q,new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0));d.add(l,p);k.b().add(q)}k=p}}var r=function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.type($.ig.OlapMetadataTreeItemType.prototype.kpi);$ret.caption(i.caption());$ret.item(i);return $ret}();if(!String.isNullOrEmpty(i.kpiValue())){var s=null;
var t=$.ig.OlapMetadataTreeItemType.prototype.measure;var u="Value";if(!function(){var $ret=c.d(i.kpiValue(),s);s=$ret.measure;return $ret.ret}()){t=$.ig.OlapMetadataTreeItemType.prototype.kpiValue;s=$.ig.KpiMeasure.prototype.createKpiValueMeasure(i);e.add(s);f.add(s)}else{u+=" ("+s.caption()+")"}r.e(function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.caption(u);$ret.item(s);$ret.type(t);return $ret}())}if(!String.isNullOrEmpty(i.kpiGoal())){var v=null;var w=$.ig.OlapMetadataTreeItemType.prototype.measure;var x="Goal";if(!function(){var $ret=c.d(i.kpiGoal(),v);v=$ret.measure;return $ret.ret}()){w=$.ig.OlapMetadataTreeItemType.prototype.kpiGoal;v=$.ig.KpiMeasure.prototype.createKpiGoalMeasure(i);e.add(v);f.add(v)}else{x+=" ("+v.caption()+")"}r.e(function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.caption(x);$ret.item(v);$ret.type(w);return $ret}())}if(!String.isNullOrEmpty(i.kpiStatus())){var y=$.ig.KpiMeasure.prototype.createKpiStatusMeasure(i);e.add(y);f.add(y);r.e(function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.caption("Status");$ret.item(y);$ret.type($.ig.OlapMetadataTreeItemType.prototype.kpiStatus);return $ret}())}if(!String.isNullOrEmpty(i.kpiTrend())){var z=$.ig.KpiMeasure.prototype.createKpiTrendMeasure(i);e.add(z);f.add(z);r.e(function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.caption("Trend");$ret.item(z);$ret.type($.ig.OlapMetadataTreeItemType.prototype.kpiTrend);return $ret}())}if(!String.isNullOrEmpty(i.kpiWeight())){var aa=$.ig.KpiMeasure.prototype.createKpiWeightMeasure(i);e.add(aa);f.add(aa);r.e(function(){var $ret=new $.ig.OlapMetadataTreeItem;$ret.caption("Weight");$ret.item(aa);$ret.type($.ig.OlapMetadataTreeItemType.prototype.kpiWeight);return $ret}())}k.b().add(r)}var ab=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);var ad=h.b().where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(ae){return ae.type()==$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(ae){return ae.caption()}).getEnumerator();while(ad.moveNext()){var ac=ad.current();ab.add(ac)}var af=h.b().where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(ag){return ag.type()!=$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(ag){return ag.caption()}).getEnumerator();while(af.moveNext()){var ae=af.current();ab.add(ae)}$.ig.MetaTreeHelper.prototype.setMetaItemChildren(g,ab);var ah=d.values().getEnumerator();while(ah.moveNext()){var ag=ah.current();var ai=ag.b();var aj=ai.where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(ak){return ak.type()==$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(ak){return ak.caption()}).toList$1($.ig.OlapMetadataTreeItem.prototype.$type);var ak=ai.where$1($.ig.OlapMetadataTreeItem.prototype.$type,function(al){return al.type()!=$.ig.OlapMetadataTreeItemType.prototype.group}).orderBy$2($.ig.OlapMetadataTreeItem.prototype.$type,String,function(al){return al.caption()}).toList$1($.ig.OlapMetadataTreeItem.prototype.$type);var al=new $.ig.List$1($.ig.OlapMetadataTreeItem.prototype.$type,0);for(var am=0;am<aj.count();am++){al.add(aj.item(am))}for(var an=0;an<ak.count();an++){al.add(ak.item(an))}var ao=ag.a();$.ig.MetaTreeHelper.prototype.setMetaItemChildren(ao,al)}return g},c:function(a){var b=a.split("\\");return b},$type:new $.ig.Type("MetaTreeHelper",$.ig.Object.prototype.$type)},true);$.ig.util.defType("HierarchyItemPosition","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_a:0,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_b:0,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},$type:new $.ig.Type("HierarchyItemPosition",$.ig.Object.prototype.$type)},true);$.ig.util.defType("DataSourceBaseOptions","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_cube:null,cube:function(value){if(arguments.length===1){this._cube=value;return value}else{return this._cube}},_measureGroup:null,measureGroup:function(value){if(arguments.length===1){this._measureGroup=value;return value}else{return this._measureGroup}},_measures:null,measures:function(value){if(arguments.length===1){this._measures=value;return value}else{return this._measures}},_filters:null,filters:function(value){if(arguments.length===1){this._filters=value;return value}else{return this._filters}},_columns:null,columns:function(value){if(arguments.length===1){this._columns=value;return value}else{return this._columns}},_rows:null,rows:function(value){if(arguments.length===1){this._rows=value;return value}else{return this._rows}},$type:new $.ig.Type("DataSourceBaseOptions",$.ig.Object.prototype.$type)},true);$.ig.util.defType("AxisDefinitionParser","Object",{init:function(a){$.ig.Object.prototype.init.call(this);this.d(-1);this.k(a)},_a:false,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_g:null,g:function(value){if(arguments.length===1){this._g=value;return value}else{return this._g}},_d:0,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_k:null,k:function(value){if(arguments.length===1){this._k=value;return value}else{return this._k}},b:function(){if(this.d()==this.k().length-1){return false}var a=-1;var b=-1;var c=false;while(this.d()+1<this.k().length){this.d(this.d()+1);var d=this.k().substr(this.d(),1);switch(d){case $.ig.AxisDefinitionParser.prototype.e:if(a==-1){a=this.d()}break;case $.ig.AxisDefinitionParser.prototype.f:b=this.d();while(this.d()+1<this.k().length){d=this.k().substr(this.d()+1,1);switch(d){case $.ig.AxisDefinitionParser.prototype.f:b=this.d()+1;break;case $.ig.AxisDefinitionParser.prototype.h:if($.ig.AxisDefinitionParser.prototype.f==this.k().substr(this.d(),1)){c=true}break;case $.ig.AxisDefinitionParser.prototype.i:case $.ig.AxisDefinitionParser.prototype.j:c=true;break}if(c){break}this.d(this.d()+1)}c=true;break;case $.ig.AxisDefinitionParser.prototype.h:c=true;break;case $.ig.AxisDefinitionParser.prototype.i:this.a(true);break;case $.ig.AxisDefinitionParser.prototype.j:$.ig.Debug.prototype.a(this.a());c=true;this.a(false);break}if(c){c=false;if(a>-1&&b>-1){break}}}if(this.d()==this.k().length-1){if(b==-1||a==-1){return false}}var e=this.k().substr(a,b-a+1).trim();this.g(e);return true},c:function(){var a=new $.ig.List$1($.ig.AxisElement.prototype.$type,0);var b=null;while(this.b()){if(!this.a()){b=new $.ig.ArrayListCollection$1(String);var c=new $.ig.AxisElement(this.g(),b);a.add(c)}else if(b!=null){b.add(this.g())}}return a},$type:new $.ig.Type("AxisDefinitionParser",$.ig.Object.prototype.$type)},true);$.ig.util.defType("CoreOlapElementParser","Object",{init:function(a){$.ig.Object.prototype.init.call(this);this.c(-1);this.h(a)},_f:null,f:function(value){if(arguments.length===1){this._f=value;return value}else{return this._f}},_c:0,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_h:null,h:function(value){if(arguments.length===1){this._h=value;return value}else{return this._h}},a:function(){if(this.c()==this.h().length-1){return false}var a=-1;var b=-1;var c=false;while(this.c()+1<this.h().length){this.c(this.c()+1);var d=this.h().substr(this.c(),1);switch(d){case $.ig.CoreOlapElementParser.prototype.d:if(a==-1){a=this.c()}break;case $.ig.CoreOlapElementParser.prototype.e:b=this.c();while(this.c()+1<this.h().length){d=this.h().substr(this.c()+1,1);switch(d){case $.ig.CoreOlapElementParser.prototype.e:b=this.c()+1;break;case $.ig.CoreOlapElementParser.prototype.g:c=true;break}if(c){break}this.c(this.c()+1)}break;case $.ig.CoreOlapElementParser.prototype.g:c=true;break}if(c){c=false;if(a>-1&&b>-1){break}}}if(this.c()==this.h().length-1){if(b==-1||a==-1){return false}}var e=this.h().substr(a,b-a+1).trim();this.f(e);return true},b:function(){var a=new $.ig.List$1(String,0);while(this.a()){a.add(this.f())}return a},$type:new $.ig.Type("CoreOlapElementParser",$.ig.Object.prototype.$type)},true);$.ig.util.defType("KeyValueItem","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},$type:new $.ig.Type("KeyValueItem",$.ig.Object.prototype.$type)},true);$.ig.util.defType("AxisElement","Object",{init:function(a,b){$.ig.Object.prototype.init.call(this);this.b(a);this.a(b)},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("AxisElement",$.ig.Object.prototype.$type)},true);$.ig.util.defType("MeasureGroupMetaItemsCache","Object",{a:null,c:null,b:null,j:null,d:null,h:null,f:null,init:function(a,b,c,d){$.ig.Object.prototype.init.call(this);this.a=new $.ig.Dictionary$2(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Dimension.prototype.$type),0);this.c=new $.ig.Dictionary$2(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Measure.prototype.$type),0);this.b=new $.ig.Dictionary$2(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Kpi.prototype.$type),0);this.j=d;this.d=a;this.h=b;this.f=c},getMeasureGroupDimensions:function(a){var $self=this;var b;if(!function(){var $ret=$self.a.tryGetValue(a,b);b=$ret.value;return $ret.ret}()){var c=new $.ig.List$1(String,0);var e=$self.j.getEnumerator();while(e.moveNext()){var d=e.current();if(d.measureGroupName()==a){c.add(d.dimensionUniqueName())}}var f=new $.ig.List$1($.ig.Dimension.prototype.$type,0);var h=$self.d.getEnumerator();while(h.moveNext()){var g=h.current();if(c.contains(g.uniqueName())||g.dimensionType()==$.ig.DimensionType.prototype.measure){f.add(g)}}$self.a.add(a,f);b=f}return b},getMeasureGroupMeasures:function(a){var $self=this;var b;if(!function(){var $ret=$self.c.tryGetValue(a,b);b=$ret.value;return $ret.ret}()){var c=new $.ig.List$1($.ig.Measure.prototype.$type,0);var e=$self.h.getEnumerator();while(e.moveNext()){var d=e.current();if(d.measureGroupName()==a){c.add(d)}}$self.c.add(a,c);b=c}return b},getMeasureGroupKpis:function(a){var $self=this;var b;if(!function(){var $ret=$self.b.tryGetValue(a,b);b=$ret.value;return $ret.ret}()){var c=new $.ig.List$1($.ig.Kpi.prototype.$type,0);var e=$self.f.getEnumerator();while(e.moveNext()){var d=e.current();if(d.measureGroupName()==a){c.add(d)}}$self.b.add(a,c);b=c}return b},$type:new $.ig.Type("MeasureGroupMetaItemsCache",$.ig.Object.prototype.$type)},true);$.ig.util.defType("PositionItemInfo$2","Dictionary$2",{$tKey:null,$tSortKey:null,init:function($tKey,$tSortKey,a,b,c,d){this.q=new $.ig.Dictionary$2(this.$tKey,$.ig.Object.prototype.$type,0);this.$tKey=$tKey;this.$tSortKey=$tSortKey;this.$type=this.$type.specialize(this.$tKey,this.$tSortKey);$.ig.Dictionary$2.prototype.init.call(this,this.$tKey,$.ig.PositionItemInfo$2.prototype.$type.specialize(this.$tKey,this.$tSortKey));this.positionItem(a);this.positionIndex(b);this.positionItemIndex(c);this.positionItemDepth(0);this.positionItemDepthMin(-1);this.positionItemDepthMax(Number.MAX_VALUE);this.positionSize(d);if(a!=null){this.positionItemDepth(this.positionItem().depth());this.key(this.positionItem().key());this.parentKey(this.positionItem().parentKey());this.hierarchyKey(this.positionItem().hierarchyKey());this.hierarchyLevelKey(this.positionItem().hierarchyLevelKey());this.sortKey(this.positionItem().sortKey());this.caption(this.positionItem().caption())}},l:function(a,b,c,d){return new $.ig.PositionItemInfo$2(this.$tKey,this.$tSortKey,a,b,c,d)},_positionItemDepthMin:0,positionItemDepthMin:function(value){if(arguments.length===1){this._positionItemDepthMin=value;return value}else{return this._positionItemDepthMin}},_positionItemDepthMax:0,positionItemDepthMax:function(value){if(arguments.length===1){this._positionItemDepthMax=value;return value}else{return this._positionItemDepthMax}},_positionItem:null,positionItem:function(value){if(arguments.length===1){this._positionItem=value;return value}else{return this._positionItem}},_positionIndex:0,positionIndex:function(value){if(arguments.length===1){this._positionIndex=value;return value}else{return this._positionIndex}},_positionItemDepth:0,positionItemDepth:function(value){if(arguments.length===1){this._positionItemDepth=value;return value}else{return this._positionItemDepth}},_positionItemIndex:0,positionItemIndex:function(value){if(arguments.length===1){this._positionItemIndex=value;return value}else{return this._positionItemIndex}},_positionSize:0,positionSize:function(value){if(arguments.length===1){this._positionSize=value;return value}else{return this._positionSize}},_key:null,key:function(value){if(arguments.length===1){this._key=value;return value}else{return this._key}},_parentKey:null,parentKey:function(value){if(arguments.length===1){this._parentKey=value;return value}else{return this._parentKey}},_hierarchyKey:null,hierarchyKey:function(value){if(arguments.length===1){this._hierarchyKey=value;return value}else{return this._hierarchyKey}},_hierarchyLevelKey:null,hierarchyLevelKey:function(value){if(arguments.length===1){this._hierarchyLevelKey=value;return value}else{return this._hierarchyLevelKey}},_caption:null,caption:function(value){if(arguments.length===1){this._caption=value;return value}else{return this._caption}},_sortKey:null,sortKey:function(value){if(arguments.length===1){this._sortKey=value;return value}else{return this._sortKey}},_isExpandable:false,isExpandable:function(value){if(arguments.length===1){this._isExpandable=value;return value}else{return this._isExpandable}},_isExpanded:false,isExpanded:function(value){if(arguments.length===1){this._isExpanded=value;return value}else{return this._isExpanded}},m:function(a,b,c){var d=false;if(this.positionItemIndex()==-1){d=true}else{if(c!=null){if(a.item(this.positionItemIndex()).key()!=null){var e=c.item(this.positionItemIndex());d=a.item(this.positionItemIndex()).key().equals(e.key())}}}if(this.positionItemIndex()+1==this.positionSize()){return d}var f=this.n(a,b,this.positionItemIndex()+1,c);return d&&f},ab:function(a,b){},q:null,n:function(a,b,c,d){var $self=this;var e;var f=a.item(c);if(!$self.containsKey(f.key())){var g=$self.l(f,b,c,$self.positionSize());g.isExpandable(f.isExpandable());if($self.q.containsKey(g.key())){$self.q.remove(g.key());g.isExpanded(true)}if(f.parentKey()!=null){var h=null;if(function(){var $ret=$self.tryGetValue(f.parentKey(),h);h=$ret.value;return $ret.ret}()){h.isExpanded(true)}else{if(!$self.q.containsKey(f.parentKey())){$self.q.add(f.parentKey(),null)}}}e=g.m(a,b,d);$self.add(f.key(),g);if($self.positionItemDepthMin()==-1){$self.positionItemDepthMin(f.depth())}else{$self.positionItemDepthMin(Math.min($self.positionItemDepthMin(),f.depth()))}if($self.positionItemDepthMax()==Number.MAX_VALUE){$self.positionItemDepthMax(f.depth())}else{$self.positionItemDepthMax(Math.max($self.positionItemDepthMax(),f.depth()))}$self.ab(a,g)}else{var i=$self.item(f.key());e=i.m(a,b,d)}return e},getIndex2:function(a){var b=new Array(a.count());for(var c=0;c<b.length;c++){b[c]=a.item(c).key()}return this.getIndex(b)},getIndex:function(a){return this.s(a,a.length)},s:function(a,b){var $self=this;if($self.positionItemIndex()==b-1){return $self.positionIndex()}var c;if(!function(){var $ret=$self.tryGetValue(a[$self.positionItemIndex()+1],c);c=$ret.value;return $ret.ret}()){return-1}if(c.count()==0){return c.positionIndex()}return c.s(a,b)},$type:new $.ig.Type("PositionItemInfo$2",$.ig.Dictionary$2.prototype.$type.specialize(0,1))},true);$.ig.util.defType("PositionResolver$2","Object",{$tKey:null,$tSortKey:null,k:0,b:null,t:null,u:null,init:function($tKey,$tSortKey,a,b){this.k=0;this.$tKey=$tKey;this.$tSortKey=$tSortKey;this.$type=this.$type.specialize(this.$tKey,this.$tSortKey);$.ig.Object.prototype.init.call(this);this.positions(a.toList$1($.ig.IPosition$2.prototype.$type.specialize(this.$tKey,this.$tSortKey)));this.positionSize(b)},getPositionIndexCompleted:null,_positions:null,positions:function(value){if(arguments.length===1){this._positions=value;return value}else{return this._positions}},_positionSize:0,positionSize:function(value){if(arguments.length===1){this._positionSize=value;return value}else{return this._positionSize}},rootPositionInfo:function(){if(this.b==null){this.b=this.d(this.positionSize())}return this.b},d:function(a){return new $.ig.PositionItemInfo$2(this.$tKey,this.$tSortKey,null,-1,-1,a)},hasUnregisterdPositions:function(){return this.k<this.positions().count()},completeRegisterPositions:function(){if(this.hasUnregisterdPositions()){this.o(null)}},resolveParentPositionItem:function(a,b){b=-1;var c=$.ig.util.cast($.ig.IHierarchicalPositionItem$2.prototype.$type.specialize(this.$tKey,this.$tSortKey),a);if(c==null||c.parentKey()==null){return{ret:null,parentPositionIndex:b}}var d=c.position().indexOf(c);var e=new Array(c.position().itemsCount());for(var f=0;f<c.position().itemsCount();f++){e[f]=c.position().item(f).key()}e[d]=c.parentKey();b=this.rootPositionInfo().getIndex(e);if(b==-1){return{ret:null,parentPositionIndex:b}}var g=this.positions().__inner[b];var h=g.item(d);return{ret:h,parentPositionIndex:b};return{parentPositionIndex:b}},getHostPositionItemInfo:function(a,b){var $self=this;var c=$self.rootPositionInfo();var d=a.item(b);for(var e=0;e<b;e++){var f;if(function(){var $ret=c.tryGetValue(a.item(e).key(),f);f=$ret.value;return $ret.ret}()){c=f}else{c=null;break}}if(c==null){return null}if(!c.containsKey(d.key())){return null}return c},h:function(a,b){var $self=this;if($self.rootPositionInfo().count()==0){return null}var c=$self.rootPositionInfo();var d=a.position().indexOf(a);for(var e=0;e<d;e++){var f;if(function(){var $ret=c.tryGetValue(a.position().item(e).key(),f);f=$ret.value;return $ret.ret}()){c=f}else{c=null;break}}if(c==null){return null}if(!c.containsKey(a.key())){return null}var g=new $.ig.List$1($.ig.Number.prototype.$type,0);$self.s(a.key(),c,g);if(b==$.ig.ListSortDirection.prototype.descending){g.sort1(function(h,i){if(h==i){return 0}if(h>i){return-1}return 1});return g}g.sort1(function(h,i){if(h==i){return 0}if(h>i){return 1}return-1});return g},s:function(a,b,c){var $self=this;var e=b.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize($self.$tKey,$self.$tSortKey),function(f){return a.equals(f.parentKey())}).getEnumerator();while(e.moveNext()){var d=e.current();if(d.count()==0){c.add(d.positionIndex())}else{$self.r(d,c)}if(!d.isExpanded()){continue}if(d.positionItemDepth()<b.positionItemDepthMax()){$self.s(d.key(),b,c)}}},r:function(a,b){var $self=this;var d=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize($self.$tKey,$self.$tSortKey),function(e){return e.parentKey()==null}).getEnumerator();while(d.moveNext()){var c=d.current();if(c.count()==0){b.add(c.positionIndex())}else{$self.r(c,b)}if(!c.isExpanded()){continue}if(c.positionItemDepth()<a.positionItemDepthMax()){$self.s(c.key(),a,b)}}},getChildren:function(a,b){var $self=this;if($self.hasUnregisterdPositions()){$self.completeRegisterPositions()}var c=$self.getHostPositionItemInfo(a,b);var d=a.item(b);return c.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize($self.$tKey,$self.$tSortKey),function(e){return d.key().equals(e.parentKey())})},isMemberExpanded:function(a){var $self=this;if($self.hasUnregisterdPositions()){$self.completeRegisterPositions()}var b=$self.getPositionIndex(a.position());if(b==-1||$self.rootPositionInfo().count()==0){return $.ig.util.toNullable(Boolean,null)}var c=a.position().indexOf(a);var d=$self.rootPositionInfo();for(var e=0;e<c;e++){var f;if(function(){var $ret=d.tryGetValue(a.position().item(e).key(),f);f=$ret.value;return $ret.ret}()){d=f}else{d=null;break}}if(d==null){return $.ig.util.toNullable(Boolean,null)}if(!d.containsKey(a.key())){return $.ig.util.toNullable(Boolean,null)}var g=null;var h=d.values().getEnumerator();while(h.moveNext()){if(a.key().equals(h.current().parentKey())){g=h.current();break}}return $.ig.util.toNullable(Boolean,g!=null)},getPositionIndex:function(a){if(a==null){return-1}if(a.itemsCount()!=this.positionSize()){return-1}if(a.isEmpty()&&this.positions().count()==1&&this.positions().__inner[0].isEmpty()){return 0}if(this.k>0){var b=this.m(a);if(b>-1){return b}if(this.k==this.positions().count()){return-1}}return this.o(a)},m:function(a){if(a.isEmpty()&&this.positions().count()==1&&this.positions().__inner[0].isEmpty()){return 0}return this.rootPositionInfo().getIndex2(a.getItems().toList$1($.ig.IPositionItem$2.prototype.$type.specialize(this.$tKey,this.$tSortKey)))},o:function(a){var b=a==null;var c=-1;for(var d=this.k;d<this.positions().count();d++){var e=this.positions().__inner[d];var f=this.rootPositionInfo().m(e,d,a);this.k++;if(c==-1&&f){c=d;if(!b){break}}}return c},$type:new $.ig.Type("PositionResolver$2",$.ig.Object.prototype.$type)},true);$.ig.util.defType("LevelSortDirection","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.sortBehavior($.ig.LevelSortBehavior.prototype.system)},_levelUniqueName:null,levelUniqueName:function(value){if(arguments.length===1){this._levelUniqueName=value;return value}else{return this._levelUniqueName}},_sortDirection:null,sortDirection:function(value){if(arguments.length===1){this._sortDirection=value;return value}else{return this._sortDirection}},_sortBehavior:null,sortBehavior:function(value){if(arguments.length===1){this._sortBehavior=value;return value}else{return this._sortBehavior}},$type:new $.ig.Type("LevelSortDirection",$.ig.Object.prototype.$type)},true);$.ig.util.defType("TaskExtensions","Object",{init:function(){$.ig.Object.prototype.init.call(this)},continueWithTask$1:function($tResult,a){var $self=this;var b=new $.ig.TaskCompletionSource$1($tResult,0);$self.e(function(c){if(c.a()==null){try{a(c).i(function(d){if(d.a()==null){b.e(d.m());return}b.d(d.a())})}catch(e_){var d;d=e_;b.d(d)}}else{b.d(c.a())}});return b.b()},continueWithTask$2:function($tResult1,$tResult2,a){var $self=this;return $self.continueWithTask$1($tResult2,function(b){return a(b)})},$type:new $.ig.Type("TaskExtensions",$.ig.Object.prototype.$type)},true);$.ig.util.defType("HierarchyFilterView","Object",{d:null,c:null,e:null,init:function(a){this.e=new $.ig.Dictionary$2(String,$.ig.FilterMember.prototype.$type,0);$.ig.Object.prototype.init.call(this);this.hierarchy(a);this.c=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.FilterMember.prototype.$type),0);this.d=new $.ig.Dictionary$2(String,$.ig.FilterMember.prototype.$type,0)},filterMemberExpansionChanged:null,filterMemberSelectionChanged:null,_hierarchy:null,hierarchy:function(value){if(arguments.length===1){this._hierarchy=value;return value}else{return this._hierarchy}},addFiltersForMembers:function(a){var c=a.getEnumerator();while(c.moveNext()){var b=c.current();this.addFilterForMember(b)}},addFilterForMember:function(a){var $self=this;if(!$self.d.containsKey(a.uniqueName())){var b=new $.ig.FilterMember(a);b.propertyChanged=$.ig.Delegate.prototype.combine(b.propertyChanged,$self.o.runOn($self));b.selectionChanged=$.ig.Delegate.prototype.combine(b.selectionChanged,$self.p.runOn($self));var c;if(!function(){var $ret=$self.c.tryGetValue(a.levelDepth(),c);c=$ret.value;return $ret.ret}()){c=new $.ig.List$1($.ig.FilterMember.prototype.$type,0);$self.c.add(a.levelDepth(),c)}$self.d.add(a.uniqueName(),b);$self.e.add(a.uniqueName(),b);c.add(b);$self.j(b);$self.m(b)}},tryGetFilterMember:function(a,b){var $self=this;return{ret:function(){var $ret=$self.d.tryGetValue(a,b);b=$ret.value;return $ret.ret}(),filterMember:b};return{filterMember:b}},getRootFilterMembers:function(){var a=-1;var c=this.c.keys().getEnumerator();while(c.moveNext()){var b=c.current();if(a==-1){a=b}else{a=Math.min(b,a)}}if(a==-1){return null}return this.c.item(a)},getSelectedFilterItems:function(){var a=this.getRootFilterMembers();var b=new $.ig.List$1($.ig.FilterMember.prototype.$type,0);var c=0;var e=a.getEnumerator();while(e.moveNext()){var d=e.current();if(d.isSelected().hasValue()==true&&d.isSelected().value()==true){c++}}if(c==a.count()){return b}var g=a.getEnumerator();while(g.moveNext()){var f=g.current();if(f.isSelected().hasValue()==false){this.n(f,b)}else if(f.isSelected().hasValue()==true&&f.isSelected().value()==true){b.add(f)}}return b},p:function(a,b){if(this.filterMemberSelectionChanged!=null){this.filterMemberSelectionChanged(this,new $.ig.FilterMemberStateChangedEventArgs(a))}},o:function(a,b){if(b.propertyName()=="IsExpanded"){if(this.filterMemberExpansionChanged!=null){this.filterMemberExpansionChanged(this,new $.ig.FilterMemberStateChangedEventArgs(a))}}},n:function(a,b){if(a.isSelected().hasValue()==true&&a.isSelected().value()==true){b.add(a)}else{if(a.children()==null){return}var d=a.children().getEnumerator();while(d.moveNext()){var c=d.current();this.n(c,b)}}},m:function(a){var $self=this;var b=a.member().parentUniqueName();if(String.isNullOrEmpty(b)){return}var c;if(function(){var $ret=$self.d.tryGetValue(b,c);c=$ret.value;return $ret.ret}()){c.n(a);if(c.isSelected().hasValue()==true&&c.isSelected().value()==false){a.isSelected($.ig.util.toNullable($.ig.Boolean.prototype.$type,false))}}},j:function(a){var $self=this;var b=a.member().levelDepth();var c;if(function(){var $ret=$self.c.tryGetValue(b+1,c);c=$ret.value;return $ret.ret}()){var e=c.getEnumerator();while(e.moveNext()){var d=e.current();if(d.member().parentUniqueName()==a.member().uniqueName()){a.n(d)}}}},$type:new $.ig.Type("HierarchyFilterView",$.ig.Object.prototype.$type)},true);$.ig.util.defType("FilterMember","Object",{l:$.ig.util.toNullable($.ig.Boolean.prototype.$type,null),c:false,e:false,d:false,init:function(a){this.e=false;this.d=false;$.ig.Object.prototype.init.call(this);var b=$.ig.util.toNullable($.ig.Boolean.prototype.$type,true);this.l=b;this.member(a);this.k(0);this.j(0)},selectionChanged:null,propertyChanged:null,_parent:null,parent:function(value){if(arguments.length===1){this._parent=value;return value}else{return this._parent}},_member:null,member:function(value){if(arguments.length===1){this._member=value;return value}else{return this._member}},isExpandable:function(){return this.member().childrenCardinality()>0},isExpanded:function(a){if(arguments.length===1){if(this.c!=a){this.c=a;this.o("IsExpanded")}return a}else{return this.c}},isSelected:function(a){if(arguments.length===1){var b=a;var c=$.ig.util.toNullable($.ig.Boolean.prototype.$type,null);if($.ig.util.nullableEquals(this.l,b)==false){var d=this.l;this.l=a;if(!this.d){if(this.l.hasValue()==true){if(this.children()!=null){var f=this.children().getEnumerator();while(f.moveNext()){var e=f.current();e.e=true;e.isSelected(this.l);e.e=false}}}}if(this.parent()!=null){if(d.hasValue()==true&&d.value()==false){if(this.l.hasValue()==false){this.p(true)}this.q(false)}else if(d.hasValue()==false){if(this.l.hasValue()==true&&this.l.value()==false){this.q(true)}this.p(false)}else{if(this.l.hasValue()==true&&this.l.value()==false){this.q(true)}else if(this.l.hasValue()==false){this.p(true)}}if(!this.e){this.parent().d=true;var g=this.parent().k();var h=this.parent().j();var i=this.parent().children().count();if(h==0){if(g==0){this.parent().isSelected($.ig.util.toNullable($.ig.Boolean.prototype.$type,true))}else if(g==i){this.parent().isSelected($.ig.util.toNullable($.ig.Boolean.prototype.$type,false))}else{this.parent().isSelected(c)}}else{this.parent().isSelected(c)}this.parent().d=false}}this.o("IsSelected");if(!this.e&&!this.d){if(this.selectionChanged!=null){this.selectionChanged(this,$.ig.EventArgs.prototype.empty)}}}return a}else{return this.l}},q:function(a){if(a){this.parent().k(this.parent().k()+1)}else{this.parent().k(this.parent().k()-1)}},p:function(a){if(a){this.parent().j(this.parent().j()+1)}else{this.parent().j(this.parent().j()-1)}},_children:null,children:function(value){if(arguments.length===1){this._children=value;return value}else{return this._children}},n:function(a){if(this.children()==null){this.children(new $.ig.List$1($.ig.FilterMember.prototype.$type,0))}a.parent(this);this.children().add(a);this.o("Children")},_k:0,k:function(value){if(arguments.length===1){this._k=value;return value}else{return this._k}},_j:0,j:function(value){if(arguments.length===1){this._j=value;return value}else{return this._j}},o:function(a){if(this.propertyChanged!=null){this.propertyChanged(this,new $.ig.PropertyChangedEventArgs(a))}},$type:new $.ig.Type("FilterMember",$.ig.Object.prototype.$type,[$.ig.INotifyPropertyChanged.prototype.$type])},true);$.ig.util.defType("FilterMemberStateChangedEventArgs","EventArgs",{init:function(a){$.ig.EventArgs.prototype.init.call(this);this.filterMember(a)},_filterMember:null,filterMember:function(value){if(arguments.length===1){this._filterMember=value;return value}else{return this._filterMember}},$type:new $.ig.Type("FilterMemberStateChangedEventArgs",$.ig.EventArgs.prototype.$type)},true);$.ig.util.defType("ResultSorter$1","Object",{$t:null,_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_d:false,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_c:false,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},init:function($t,a,b,c){this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.Object.prototype.init.call(this);this.a(a);this.d(b);this.c(c)},b:function(){},e:function(a,b,c){a.e();var d=a.d();var e=new Array(d.count());for(var f=0;f<d.count();f++){var g=d.item(f);c.add(g,f)}for(var h=0;h<d.count();h++){var i=d.item(h);var j=b.tuples().__inner[i];e[h]=j}return new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,1,e)},$type:new $.ig.Type("ResultSorter$1",$.ig.Object.prototype.$type)},true);$.ig.util.defType("ResultHeaderSorter","ResultSorter$1",{f:null,_h:null,h:function(value){if(arguments.length===1){this._h=value;return value}else{return this._h}},_g:null,g:function(value){if(arguments.length===1){this._g=value;return value}else{return this._g}},init:function(a,b,c,d){$.ig.ResultSorter$1.prototype.init.call(this,$.ig.AxisHeaderSortingVisitor.prototype.$type,a,b,c);this.f=new $.ig.Dictionary$2(String,$.ig.LevelSortDirection.prototype.$type,1,d.count());var f=d.getEnumerator();while(f.moveNext()){var e=f.current();this.f.item(e.levelUniqueName(),e)}},b:function(){var $self=this;$self.h(new $.ig.List$1($.ig.LevelSortDirection.prototype.$type,0));$self.g(new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type)),0));if($self.a().isEmpty()){return $self.a()}var a=new $.ig.List$1($.ig.OlapResultAxis.prototype.$type,0);var b=0;var c=1;var d=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,0);var e=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,0);if($self.c()){var f=$self.a().axes().item(b);var g=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type),0);var h=new $.ig.AxisHeaderSortingVisitor(f,$self.f,$self.h(),g);var i=$self.e(h,f,d);var j=function(){var $ret=new $.ig.OlapResultAxis(i,f.tupleSize());$ret.name(f.name());return $ret}();a.add(j);$self.g().item(f.name(),g);c=f.tuples().count();b++}if($self.d()){var k=$self.a().axes().item(b);var l=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type),0);var m=new $.ig.AxisHeaderSortingVisitor(k,$self.f,$self.h(),l);var n=$self.e(m,k,e);var o=function(){var $ret=new $.ig.OlapResultAxis(n,k.tupleSize());
$ret.name(k.name());return $ret}();a.add(o);$self.g().item(k.name(),l)}var p=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,2,$self.a().cells().count());var r=$self.a().cells().getEnumerator();while(r.moveNext()){var q=r.current();var s=q.clone();var t=s.cellOrdinal();if($self.c()){var u=t%c;var v=d.item(u);if(u!=v){var w=$.ig.intDivide(t,c);t=w*c+v}}if($self.d()){var x=$.ig.intDivide(t,c);var y=e.item(x);if(x!=y){var z=t%c;t=y*c+z}}s.cellOrdinal(t);p.add(s)}var aa=function(){var $ret=new $.ig.OlapResult;$ret.isEmpty($self.a().isEmpty());$ret.axes(a);$ret.cells(p);return $ret}();return aa},$type:new $.ig.Type("ResultHeaderSorter",$.ig.ResultSorter$1.prototype.$type.specialize($.ig.AxisHeaderSortingVisitor.prototype.$type))},true);$.ig.util.defType("AxisTupleVisitor","Object",{_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},init:function(a){$.ig.Object.prototype.init.call(this);this.a(a)},e:function(){var $self=this;if($self.a().positionResolver().hasUnregisterdPositions()){$self.a().positionResolver().completeRegisterPositions()}$self.d(new $.ig.List$1($.ig.Number.prototype.$type,2,$self.a().tuples().count()));var a=$self.a().positionResolver().rootPositionInfo();var b=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(c){return c.positionItemDepth()==a.positionItemDepthMin()});var d=$self.c(a,b).getEnumerator();while(d.moveNext()){var c=d.current();$self.f(a,c)}},b:function(a,b){},c:function(a,b){},f:function(a,b){var $self=this;var c=b.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(d){return d.positionItemDepth()==b.positionItemDepthMin()});if(c.count$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))>0){var e=c.getEnumerator();while(e.moveNext()){var d=e.current();$self.f(b,d)}}else{$self.d().add(b.positionIndex())}var f=$self.b(a,b);var h=f.getEnumerator();while(h.moveNext()){var g=h.current();$self.f(a,g)}},$type:new $.ig.Type("AxisTupleVisitor",$.ig.Object.prototype.$type)},true);$.ig.util.defType("AxisHeaderSortingVisitor","AxisTupleVisitor",{h:null,i:null,g:null,init:function(a,b,c,d){$.ig.AxisTupleVisitor.prototype.init.call(this,a);this.h=b;this.i=c;this.g=d},b:function(a,b){var $self=this;var c=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(d){return d.parentKey()==b.key()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type));if(c.count()>0){var d=c.item(0);var e;if(function(){var $ret=$self.h.tryGetValue(d.hierarchyLevelKey(),e);e=$ret.value;return $ret.ret}()){if(e.sortBehavior()==$.ig.LevelSortBehavior.prototype.system){c=e.sortDirection()==$.ig.ListSortDirection.prototype.ascending?c.orderBy$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),$.ig.Object.prototype.$type,function(f){return f.sortKey()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)):c.orderByDescending$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),$.ig.Object.prototype.$type,function(f){return f.sortKey()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}else{c=e.sortDirection()==$.ig.ListSortDirection.prototype.ascending?c.orderBy$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),String,function(f){return f.caption()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)):c.orderByDescending$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),String,function(f){return f.caption()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}if(!$self.i.select$2($.ig.LevelSortDirection.prototype.$type,String,function(f){return f.levelUniqueName()}).contains$1(String,e.levelUniqueName())){$self.i.add(e)}var f;if(!function(){var $ret=$self.g.tryGetValue(d.positionItemIndex(),f);f=$ret.value;return $ret.ret}()){f=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type,0);$self.g.add(b.positionItemIndex(),f)}f.item(b.positionItemDepth(),e.sortDirection())}}return c},c:function(a,b){var $self=this;var c=b.toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type));if(c.count()>0){var d=c.item(0);var e;if(d.hierarchyLevelKey()!=null&&function(){var $ret=$self.h.tryGetValue(d.hierarchyLevelKey(),e);e=$ret.value;return $ret.ret}()){if(e.sortBehavior()==$.ig.LevelSortBehavior.prototype.system){c=e.sortDirection()==$.ig.ListSortDirection.prototype.ascending?c.orderBy$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),$.ig.Object.prototype.$type,function(f){return f.sortKey()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)):c.orderByDescending$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),$.ig.Object.prototype.$type,function(f){return f.sortKey()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}else{c=e.sortDirection()==$.ig.ListSortDirection.prototype.ascending?c.orderBy$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),String,function(f){return f.caption()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type)):c.orderByDescending$2($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),String,function(f){return f.caption()}).toList$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type))}$self.i.add(e);var f;if(!function(){var $ret=$self.g.tryGetValue(d.positionItemIndex(),f);f=$ret.value;return $ret.ret}()){f=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.ListSortDirection.prototype.$type,0);$self.g.add(a.positionItemIndex(),f)}f.item(a.positionItemDepth(),e.sortDirection())}}return c},$type:new $.ig.Type("AxisHeaderSortingVisitor",$.ig.AxisTupleVisitor.prototype.$type)},true);$.ig.util.defType("ResultColumnValueSorter","ResultSorter$1",{f:null,_g:null,g:function(value){if(arguments.length===1){this._g=value;return value}else{return this._g}},init:function(a,b,c,d){$.ig.ResultSorter$1.prototype.init.call(this,$.ig.AxisValueSortingVisitor.prototype.$type,a,b,c);this.f=d},b:function(){var $self=this;$self.g(new $.ig.List$1($.ig.TupleSortDirection.prototype.$type,0));if(!$self.d()||$self.a().isEmpty()){return $self.a()}var a=new $.ig.List$1($.ig.OlapResultAxis.prototype.$type,0);var b=0;var c=null;var d=1;if($self.c()){c=$self.a().axes().item(b);d=c.tuples().count();a.add(c.clone());b++}var e=$self.a().axes().item(b);var f=$self.a().axes().item(b).tuples().count();var g=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Object.prototype.$type,1,$self.a().cells().count());var i=$self.a().cells().getEnumerator();while(i.moveNext()){var h=i.current();var j=null;if(function(){var $ret=h.properties().tryGetValue("Value",j);j=$ret.value;return $ret.ret}()){g.item(h.cellOrdinal(),j)}else{(function(){var $ret=h.properties().tryGetValue("FmtValue",j);j=$ret.value;return $ret.ret})();g.item(h.cellOrdinal(),j)}}var k=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.TupleSortDirection.prototype.$type,$.ig.Array.prototype.$type),2,$self.f.count());var m=$self.f.getEnumerator();while(m.moveNext()){var l=m.current();var n;if(c!=null&&l.memberNames()!=null){if(c.positionResolver().hasUnregisterdPositions()){c.positionResolver().completeRegisterPositions()}n=c.positionResolver().rootPositionInfo().getIndex(l.memberNames());l.tupleIndex(n)}else{n=l.tupleIndex()}if(n>-1&&n<d){var o=new Array(f);for(var p=0;p<f;p++){var q=null;(function(){var $ret=g.tryGetValue(p*d+n,q);q=$ret.value;return $ret.ret})();o[p]=q}k.add(new $.ig.KeyValuePair$2($.ig.TupleSortDirection.prototype.$type,$.ig.Array.prototype.$type,1,l,o));$self.g().add(l)}}var r=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.Number.prototype.$type,0);var s=new $.ig.AxisValueSortingVisitor(e,k);var t=$self.e(s,e,r);var u=function(){var $ret=new $.ig.OlapResultAxis(t,e.tupleSize());$ret.name(e.name());return $ret}();a.add(u);var v=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,2,$self.a().cells().count());var x=$self.a().cells().getEnumerator();while(x.moveNext()){var w=x.current();var y=w.clone();var z=y.cellOrdinal();var aa=$.ig.intDivide(z,d);var ab=r.item(aa);if(aa!=ab){var ac=z%d;z=ab*d+ac}y.cellOrdinal(z);v.add(y)}var ad=function(){var $ret=new $.ig.OlapResult;$ret.isEmpty($self.a().isEmpty());$ret.axes(a);$ret.cells(v);return $ret}();return ad},$type:new $.ig.Type("ResultColumnValueSorter",$.ig.ResultSorter$1.prototype.$type.specialize($.ig.AxisValueSortingVisitor.prototype.$type))},true);$.ig.util.defType("AxisValueSortingVisitor","AxisTupleVisitor",{g:null,init:function(a,b){$.ig.AxisTupleVisitor.prototype.init.call(this,a);this.g=b},b:function(a,b){var $self=this;var c=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(d){return d.parentKey()==b.key()});return $self.c(a,c)},c:function(a,b){var positionItemInfos_=b.toArray$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type));if(positionItemInfos_.length>0){var tupleSortDirections_=this.g.toArray$1($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.TupleSortDirection.prototype.$type,$.ig.Array.prototype.$type));var sortFunction=function(tupleSortDirections){var compareCells=function(comparer,cell1,cell2){var result=comparer(cell1,cell2);if(result<0){return-1}if(result>0){return 1}return!isNaN(parseFloat(result))&&isFinite(result)?result:0};return function(o1,o2){var i,length,tupleSortDirection,cells,direction,cell1,cell2,arr1=[],arr2=[];for(i=0;i<tupleSortDirections.length;i++){tupleSortDirection=tupleSortDirections[i].key();cells=tupleSortDirections[i].value();if(tupleSortDirection.sortDirection()===$.ig.ListSortDirection.prototype.ascending){direction=1}else{direction=-1}comparer=tupleSortDirection.comparer();cell1=cells[o1.positionIndex()];cell2=cells[o2.positionIndex()];if(tupleSortDirections.length===1){arr1=direction*compareCells(comparer,cell1,cell2);arr2=direction*compareCells(comparer,cell2,cell1)}else{arr1.push(direction*compareCells(comparer,cell1,cell2));arr2.push(direction*compareCells(comparer,cell2,cell1))}}if(arr1<arr2){return-1}if(arr1>arr2){return 1}return 0}};positionItemInfos_.sort(sortFunction(tupleSortDirections_))}return positionItemInfos_},$type:new $.ig.Type("AxisValueSortingVisitor",$.ig.AxisTupleVisitor.prototype.$type)},true);$.ig.util.defType("TupleSortDirection","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_tupleIndex:0,tupleIndex:function(value){if(arguments.length===1){this._tupleIndex=value;return value}else{return this._tupleIndex}},_memberNames:null,memberNames:function(value){if(arguments.length===1){this._memberNames=value;return value}else{return this._memberNames}},_sortDirection:null,sortDirection:function(value){if(arguments.length===1){this._sortDirection=value;return value}else{return this._sortDirection}},_comparer:null,comparer:function(value){if(arguments.length===1){this._comparer=value;return value}else{return this._comparer}},$type:new $.ig.Type("TupleSortDirection",$.ig.Object.prototype.$type)},true);$.ig.util.defType("DataSourceBase","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_dataSource:null,dataSource:function(value){if(arguments.length===1){this._dataSource=value;return value}else{return this._dataSource}},isInitialized:function(){return this.dataSource().isInitialized()},_isModified:false,isModified:function(value){if(arguments.length===1){this._isModified=value;return value}else{return this._isModified}},_isUpdating:false,isUpdating:function(value){if(arguments.length===1){this._isUpdating=value;return value}else{return this._isUpdating}},initialize:function(){var promise_=this.dataSource().initialize().c();var $this=this;if(!this._isInitializedAttached){this._isInitializedAttached=true;promise_.always(function(result){var args={error:null,metadataTreeRoot:null};if(this.state()==="rejected"){args.error=result}else{args.metadataTreeRoot=result}$($this).trigger("initialized",args);$this._isInitializedAttached=false})}return promise_},cubes:function(){return this.dataSource().cubes().inner()},cube:function(){return this.dataSource().cube()},setCube:function(a){var $self=this;return $self.dataSource().setCube(a).j($.ig.OlapMetadataTreeItem.prototype.$type,function(b){return b.m()}).c()},metadataTree:function(){return this.dataSource().metadataTree()},addRowItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null){this.dataSource().rowAxis().add(a);this.isModified(true)}},insertRowItem:function(a,b){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,b)!==null){this.dataSource().rowAxis().insert(a,b);this.isModified(true)}},removeRowItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null||$.ig.util.cast($.ig.MeasureList.prototype.$type,a)!==null){this.dataSource().rowAxis().remove(a);this.isModified(true)}},addColumnItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null){this.dataSource().columnAxis().add(a);this.isModified(true)}},insertColumnItem:function(a,b){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,b)!==null){this.dataSource().columnAxis().insert(a,b);this.isModified(true)}},removeColumnItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null||$.ig.util.cast($.ig.MeasureList.prototype.$type,a)!==null){this.dataSource().columnAxis().remove(a);this.isModified(true)}},addFilterItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null){this.dataSource().filters().add(a);this.isModified(true)}},insertFilterItem:function(a,b){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,b)!==null){this.dataSource().filters().insert(a,b);this.isModified(true)}},removeFilterItem:function(a){if($.ig.util.cast($.ig.Hierarchy.prototype.$type,a)!==null){this.dataSource().filters().remove(a);this.isModified(true)}},addMeasureItem:function(a){if($.ig.util.cast($.ig.Measure.prototype.$type,a)!==null){this.dataSource().measures().add(a);this.isModified(true)}},insertMeasureItem:function(a,b){if($.ig.util.cast($.ig.Measure.prototype.$type,b)!==null){this.dataSource().measures().insert(a,b);this.isModified(true)}},removeMeasureItem:function(a){if($.ig.util.cast($.ig.Measure.prototype.$type,a)!==null){this.dataSource().measures().remove(a);this.isModified(true)}},setMeasureListIndex:function(a){this.dataSource().measureListIndex(a);this.isModified(true)},setMeasureListLocation:function(a){switch(a){case"rows":this.dataSource().measureListLocation($.ig.MeasureListLocation.prototype.rows);break;case"columns":this.dataSource().measureListLocation($.ig.MeasureListLocation.prototype.columns);break;default:break}this.isModified(true)},getMeasureListLocation:function(){switch(this.dataSource().measureListLocation()){case $.ig.MeasureListLocation.prototype.rows:return"rows";break;case $.ig.MeasureListLocation.prototype.columns:return"columns";break;default:return null;break}},expandTupleMember:function(a,b,c){this.dataSource().expandTupleMember(a,b,c)},collapseTupleMember:function(a,b,c){this.dataSource().collapseTupleMember(a,b,c)},rowAxis:function(){return this.dataSource().rowAxis().inner()},columnAxis:function(){return this.dataSource().columnAxis().inner()},filters:function(){return this.dataSource().filters().inner()},measures:function(){return this.dataSource().measures().inner()},result:function(){return this.dataSource().result()},bindCollectionChanged:function(a){var options_=a;var ds_=this.dataSource();var attachCollectionChanged=function(collection,handler){collection.collectionChanged=$.ig.Delegate.prototype.combine(collection.collectionChanged,handler)};if($.isFunction(options_["filters"])){attachCollectionChanged(ds_._filters,options_["filters"])}if($.isFunction(options_["rowAxis"])){attachCollectionChanged(ds_._rowAxis,options_["rowAxis"])}if($.isFunction(options_["columnAxis"])){attachCollectionChanged(ds_._columnAxis,options_["columnAxis"])}if($.isFunction(options_["measures"])){attachCollectionChanged(ds_._measures,options_["measures"])}},unbindCollectionChanged:function(a){var options_=a;var ds_=this.dataSource();unbindCollectionChanged=function(collection,handler){collection.collectionChanged=$.ig.Delegate.prototype.remove(collection.collectionChanged,handler)};if($.isFunction(options_["filters"])){unbindCollectionChanged(ds_._filters,options_["filters"])}if($.isFunction(options_["rowAxis"])){unbindCollectionChanged(ds_._rowAxis,options_["rowAxis"])}if($.isFunction(options_["columnAxis"])){unbindCollectionChanged(ds_._columnAxis,options_["columnAxis"])}if($.isFunction(options_["measures"])){unbindCollectionChanged(ds_._measures,options_["measures"])}},clearPendingChanges:function(){this.dataSource().clearPendingChanges()},update:function(){var promise_=this.dataSource().update().c();var $this=this;if(!this.isUpdating()){this.isUpdating(true);promise_.always(function(result){var args={error:null,result:null};if(this.state()==="rejected"){args.error=result}else{args.result=result}$this.isUpdating(false);$this.isModified(false);$($this).trigger("updated",args)})}return promise_},getCoreElement:function(a,b){return this.dataSource().getCoreElement(a,b)},getCoreElements:function(a,b){return this.dataSource().getCoreElements(a,b).inner()},getMembersOfHierarchy:function(a){return this.dataSource().getMembersOfHierarchy(a).c()},getMembersOfLevel:function(a){return this.dataSource().getMembersOfLevel(a).c()},tryGetMember:function(a){var $self=this;var b;if(function(){var $ret=$self.dataSource().tryGetMember(a,b);b=$ret.member;return $ret.ret}()){return b}return null},tryGetMembersForLevel:function(a){var $self=this;var b=new $.ig.ArrayListCollection$1($.ig.Member.prototype.$type);var c=function(){var $ret=$self.dataSource().tryGetMembersForLevel(a,b);b=$ret.members;return $ret.ret}();return c?b.inner():new $.ig.ArrayListCollection$1($.ig.Member.prototype.$type).inner()},getMembersOfMember:function(a){return this.dataSource().getMembersOfMember(a).c()},addFilterMember:function(a,b){this.dataSource().addFilterMember(a,b);this.isModified(true)},removeAllFilterMembers:function(a){this.dataSource().removeAllFilterMembers(a);this.isModified(true)},getFilterMemberNames:function(a){return this.dataSource().getFilterMemberNames(a).inner()},getDimension:function(a){var $self=this;return $self.dataSource().getCoreElement(function(b){return b.uniqueName()==a},$.ig.Dimension.prototype.$type)},getHierarchy:function(a){var $self=this;return $self.dataSource().getCoreElement(function(b){return b.uniqueName()==a},$.ig.Hierarchy.prototype.$type)},getLevel:function(a){var $self=this;return $self.dataSource().getCoreElement(function(b){return b.uniqueName()==a},$.ig.Level.prototype.$type)},getMeasure:function(a){var $self=this;return $self.dataSource().getCoreElement(function(b){return b.uniqueName()==a},$.ig.Measure.prototype.$type)},getMeasureList:function(){return this.dataSource().getCoreElement(null,$.ig.MeasureList.prototype.$type)},$type:new $.ig.Type("DataSourceBase",$.ig.Object.prototype.$type)},true);$.ig.util.defType("jQueryUtils","Object",{init:function(){$.ig.Object.prototype.init.call(this)},c:function($t,a){if(a==null){return null}var jsObject_=a;var dict_=new $.ig.Dictionary$2(String,$t,0);(function(obj,dict){var tempDict=$.ig.Dictionary.prototype.getDictionary(obj);var keys=tempDict.keys();while(keys.moveNext()){var key=keys.current();var value=tempDict.item(key);dict.add(key,value)}})(jsObject_,dict_);return dict_},i:function($t,a){if(a==null){return null}var dict_=a;return dict_.__inner.proxy},convertToObjectDictionary:function(a){return $.ig.jQueryUtils.prototype.c($.ig.Object.prototype.$type,a)},convertToStringDictionary:function(a){return $.ig.jQueryUtils.prototype.c(String,a)},convertFromObjectDictionary:function(a){return $.ig.jQueryUtils.prototype.i($.ig.Object.prototype.$type,a)},convertFromStringDictionary:function(a){return $.ig.jQueryUtils.prototype.i(String,a)},createJavascriptObject:function(){return{}},getJavascriptObjectProperty:function(a,b){var jsObject_=a;var property_=b;return jsObject_[property_]},setJavascriptObjectProperty:function(a,b,c){var jsObject_=a;var property_=b;var value_=c;jsObject_[property_]=value_},getJavascriptObjectMethodResult:function(a,b,c){c=Array.prototype.slice.call(arguments,2);var jsObject_=a;var method_=b;var args_=c;return jsObject_[method_].call(jsObject_,args_)},$type:new $.ig.Type("jQueryUtils",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapUtilities","Object",{init:function(){$.ig.Object.prototype.init.call(this)},dateMemberProvider:function(a,b,c,d){if(String.isNullOrEmpty(a)||String.isNullOrEmpty(b)){return null}var propName_=b;var datePartFormat_=d;var format_=c;var yearProvider_;var semesterProvider_;var quarterProvider_;var monthProvider_;a=a.toLowerCase();switch(a){case"year":if(datePartFormat_==null){datePartFormat_="yyyy"}if(format_==null){return function(item){return $.ig.formatter(new Date(item[propName_]),"date",datePartFormat_)}}return function(item){return format_.replace("{0}",$.ig.formatter(new Date(item[propName_]),"date",datePartFormat_))};case"semester":if(format_==null){format_="H{0}"}yearProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("year",b,null,null);return function(item){var year=yearProvider_(item);return format_.replace("{0}",Math.floor(new Date(item[propName_]).getMonth()/6)+1).replace("{1}",year)};case"quarter":if(format_==null){format_="Q{0}"}yearProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("year",b,null,null);semesterProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("semester",b,null,null);return function(item){var year=yearProvider_(item);var semester=semesterProvider_(item);return format_.replace("{0}",Math.floor(new Date(item[propName_]).getMonth()/3)+1).replace("{1}",semester).replace("{2}",year)};case"month":if(datePartFormat_==null){datePartFormat_="MMMM"}if(format_==null){return function(item){return $.ig.formatter(new Date(item[propName_]),"date",datePartFormat_)}}yearProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("year",b,null,null);semesterProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("semester",b,null,null);quarterProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("quarter",b,null,null);return function(item){var year=yearProvider_(item);var semester=semesterProvider_(item);var quarter=quarterProvider_(item);return format_.replace("{0}",$.ig.formatter(new Date(item[propName_]),"date",datePartFormat_)).replace("{1}",quarter).replace("{2}",semester).replace("{3}",year)};case"date":if(datePartFormat_==null){datePartFormat_="MM/dd/yyyy"}if(format_==null){return function(item){return $.ig.formatter(new Date(item[propName_]),"date",datePartFormat_)}}yearProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("year",b,null,null);semesterProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("semester",b,null,null);quarterProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("quarter",b,null,null);monthProvider_=$.ig.OlapUtilities.prototype.dateMemberProvider("month",b,null,null);return function(item){var year=yearProvider_(item);var semester=semesterProvider_(item);var quarter=quarterProvider_(item);var month=monthProvider_(item);return format_.replace("{0}",$.ig.formatter(new Date(item[propName_]),"date",datePartFormat_)).replace("{1}",month).replace("{2}",quarter).replace("{3}",semester).replace("{4}",year)}}return null},getDateHierarchy:function(a,b,c,d,e,f){var $self=this;if(String.isNullOrEmpty(a)){return null}if(b==null||b.length==0){b=function(){var $ret=new Array;$ret.add("year");$ret.add("quarter");$ret.add("month");$ret.add("date");return $ret}()}else{for(var g=0;g<b.length;g++){b[g]=b[g].toLowerCase()}}if(c==null){c="Dates"}if(d==null){d=c}var res_=null;var name_=c;var caption_=d;var rootCaption_=f;var dateParts_=b;if(e==null){e=new Array(b.length);for(var h=0;h<e.length;h++){var i=b[h];e[h]=i.substr(0,1).toUpperCase()+i.substr(1,i.length)+"s"}}var captions_=e;var memberProviders_=new Array(b.length);for(var j=0;j<b.length;j++){var k=b[j];memberProviders_[j]=$.ig.OlapUtilities.prototype.dateMemberProvider(k,a,null,null)}var levelsMetadata=[];var levelOffset=0;if(rootCaption_!=null&&rootCaption_!=""){levelOffset=1;levelsMetadata[0]={name:rootCaption_,caption:rootCaption_,memberProvider:function(item){return rootCaption_}}}for(var i=0;i<memberProviders_.length;i++){levelsMetadata[i+levelOffset]={name:dateParts_[i],caption:captions_[i],memberProvider:memberProviders_[i]}}res_={name:name_,caption:caption_,levels:levelsMetadata};return res_},sumAggregator:function(a,b){var propName_=a;var precision_=b;return function(items,cellMetadata){var sum=0,areAllNullOrUndefined=true,value;for(var i=0;i<items.length;i++){value=items[i][propName_];if(value!==null&&value!==undefined){areAllNullOrUndefined=false;sum+=value}}if(areAllNullOrUndefined)return null;if(precision_!=null){return sum.toFixed(precision_)}return sum}},avgAggregator:function(a,b){var propName_=a;var precision_=b;return function(items,cellMetadata){if(precision_==null){precision_=2}var sum=0,count=0,areAllNullOrUndefined=true,value;for(var i=0;i<items.length;i++){value=items[i][propName_];if(value!==null&&value!==undefined){areAllNullOrUndefined=false;sum+=value;count++}}if(areAllNullOrUndefined)return null;return(sum/count).toFixed(precision_)}},minAggregator:function(a){var propName_=a;return function(items,cellMetadata){var result=items[0][propName_];for(var i=1;i<items.length;i++){result=Math.min(result,items[i][propName_])}return result}},maxAggregator:function(a){var propName_=a;return function(items,cellMetadata){var result=items[0][propName_];for(var i=1;i<items.length;i++){result=Math.max(result,items[i][propName_])}return result}},countAggregator:function(){return function(items,cellMetadata){return items.length}},$type:new $.ig.Type("OlapUtilities",$.ig.Object.prototype.$type)},true);$.ig.util.defType("OlapTableView","Object",{a:null,init:function(a,b,c,d){$.ig.Object.prototype.init.call(this);var e=this.b(d);this.a=new $.ig.TableViewImpl(a,b,c,e)},rowHeaders:function(){if(this.a.rowHeaders()==null){return null}return this.a.rowHeaders().inner()},columnHeaders:function(){if(this.a.columnHeaders()==null){return null}return this.a.columnHeaders().inner()},resultCells:function(){if(this.a.resultCells()==null){return null}return this.a.resultCells().inner()},columnSortDirections:function(a){if(arguments.length===1){this.a.columnSortDirections().clear();var c=a.getEnumerator();while(c.moveNext()){var b=c.current();var d=this.d(b);this.a.columnSortDirections().add(d)}return a}else{var a=new $.ig.Array;var c=this.a.columnSortDirections().getEnumerator();while(c.moveNext()){var b=c.current();a.add(this.n(b))}return a}},appliedColumnSortDirections:function(){var a=new $.ig.Array;var c=this.a.appliedColumnSortDirections().getEnumerator();while(c.moveNext()){var b=c.current();a.add(this.n(b))}return a},levelSortDirections:function(a){if(arguments.length===1){this.a.levelSortDirections().clear();var c=a.getEnumerator();while(c.moveNext()){var b=c.current();var d=this.c(b);this.a.levelSortDirections().add(d)}return a}else{var a=new $.ig.Array;var c=this.a.levelSortDirections().getEnumerator();while(c.moveNext()){var b=c.current();a.add(this.m(b))}return a}},appliedLevelSortDirections:function(){var a=new $.ig.Array;var c=this.a.appliedLevelSortDirections().getEnumerator();while(c.moveNext()){var b=c.current();a.add(this.m(b))}return a},appliedSortDirectionsMap:function(){var resultMap_=$.ig.jQueryUtils.prototype.createJavascriptObject();var a=this.a.appliedSortDirectionsMap().getEnumerator();while(a.moveNext()){var i_=a.current();var axisMap_=$.ig.jQueryUtils.prototype.createJavascriptObject();var b=i_.value().getEnumerator();while(b.moveNext()){var j_=b.current();var hierarchyMap_=$.ig.jQueryUtils.prototype.createJavascriptObject();var c=j_.value().getEnumerator();while(c.moveNext()){var k_=c.current();var sortDirection_=k_.value()==$.ig.ListSortDirection.prototype.ascending?"ascending":"descending";hierarchyMap_[k_.key()]=sortDirection_}axisMap_[j_.key()]=hierarchyMap_}resultMap_[i_.key()]=axisMap_}return resultMap_},initialize:function(){this.a.initialize()},b:function(a){var $self=this;var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"isParentInFrontForColumns");var c=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"isParentInFrontForRows");var d=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"compactColumnHeaders");var e=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"compactRowHeaders");return function(){var $ret=new $.ig.TableViewSettings;$ret.c(b);$ret.d(c);$ret.a(d);$ret.b(e);return $ret}()},d:function(o_){var $self=this;var a=$.ig.util.cast($.ig.Array.prototype.$type,$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(o_,"memberNames"));var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(o_,"tupleIndex");var c=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(o_,"sortDirection");var d=$.ig.ListSortDirection.prototype.ascending;if(!String.isNullOrEmpty(c)){c=c.toLowerCase();if(c=="descending"){d=$.ig.ListSortDirection.prototype.descending}}var comparer_=null;if($.isFunction(o_.comparer)){comparer_=o_.comparer}else{comparer_=function(o1,o2){return parseFloat(o1||-Infinity)-parseFloat(o2||-Infinity)}}return function(){var $ret=new $.ig.TupleSortDirection;$ret.memberNames(a);$ret.tupleIndex(b);$ret.sortDirection(d);$ret.comparer(comparer_);return $ret}()},n:function(a){var b=$.ig.jQueryUtils.prototype.createJavascriptObject();$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"memberNames",a.memberNames());$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"tupleIndex",a.tupleIndex());$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"sortDirection",a.sortDirection()==$.ig.ListSortDirection.prototype.ascending?"ascending":"descending");if(a.comparer()!=null){$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"comparer",a.comparer())}return b},c:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"levelUniqueName");var c=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"sortDirection");var d=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"sortBehavior");if(!String.isNullOrEmpty(b)){var e=new $.ig.LevelSortDirection;e.sortDirection($.ig.ListSortDirection.prototype.ascending);e.sortBehavior($.ig.LevelSortBehavior.prototype.system);e.levelUniqueName(b);if(!String.isNullOrEmpty(c)){c=c.toLowerCase();if(c=="descending"){e.sortDirection($.ig.ListSortDirection.prototype.descending)}}if(!String.isNullOrEmpty(d)){d=d.toLowerCase();if(d=="alphabetical"){e.sortBehavior($.ig.LevelSortBehavior.prototype.alphabetical)}}return e}else{return null}},m:function(a){var b=$.ig.jQueryUtils.prototype.createJavascriptObject();$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"levelUniqueName",a.levelUniqueName());$.ig.jQueryUtils.prototype.setJavascriptObjectProperty(b,"sortDirection",a.sortDirection()==$.ig.ListSortDirection.prototype.ascending?"ascending":"descending");return b},$type:new $.ig.Type("OlapTableView",$.ig.Object.prototype.$type)},true);$.ig.LevelSortBehavior.prototype.alphabetical=0;$.ig.LevelSortBehavior.prototype.system=1;$.ig.OlapMetadataTreeItemType.prototype.cube=0;$.ig.OlapMetadataTreeItemType.prototype.dimension=1;
$.ig.OlapMetadataTreeItemType.prototype.group=2;$.ig.OlapMetadataTreeItemType.prototype.userDefinedHierarchy=3;$.ig.OlapMetadataTreeItemType.prototype.systemEnabledHierarchy=4;$.ig.OlapMetadataTreeItemType.prototype.parentChildHierarchy=5;$.ig.OlapMetadataTreeItemType.prototype.measure=6;$.ig.OlapMetadataTreeItemType.prototype.level1=7;$.ig.OlapMetadataTreeItemType.prototype.level2=8;$.ig.OlapMetadataTreeItemType.prototype.level3=9;$.ig.OlapMetadataTreeItemType.prototype.level4=10;$.ig.OlapMetadataTreeItemType.prototype.level5=11;$.ig.OlapMetadataTreeItemType.prototype.kpiRoot=12;$.ig.OlapMetadataTreeItemType.prototype.kpi=13;$.ig.OlapMetadataTreeItemType.prototype.kpiValue=14;$.ig.OlapMetadataTreeItemType.prototype.kpiGoal=15;$.ig.OlapMetadataTreeItemType.prototype.kpiStatus=16;$.ig.OlapMetadataTreeItemType.prototype.kpiTrend=17;$.ig.OlapMetadataTreeItemType.prototype.kpiWeight=18;$.ig.MeasureListLocation.prototype.rows=0;$.ig.MeasureListLocation.prototype.columns=1;$.ig.HeaderCellsLayoutOrientation.prototype.horizontal=0;$.ig.HeaderCellsLayoutOrientation.prototype.vertical=1;$.ig.MemberType.prototype.unknown=0;$.ig.MemberType.prototype.regular=1;$.ig.MemberType.prototype.all=2;$.ig.MemberType.prototype.measure=3;$.ig.MemberType.prototype.formula=4;$.ig.CardinalityType.prototype.one=0;$.ig.CardinalityType.prototype.many=1;$.ig.AggregatorType.prototype.unknown=0;$.ig.AggregatorType.prototype.sum=1;$.ig.AggregatorType.prototype.count=2;$.ig.AggregatorType.prototype.min=3;$.ig.AggregatorType.prototype.max=4;$.ig.AggregatorType.prototype.average=5;$.ig.AggregatorType.prototype.variance=6;$.ig.AggregatorType.prototype.std=7;$.ig.AggregatorType.prototype.distinctCount=8;$.ig.AggregatorType.prototype.none=9;$.ig.AggregatorType.prototype.averageOfChildren=10;$.ig.AggregatorType.prototype.firstNonEmpty=13;$.ig.AggregatorType.prototype.lastNonEmpty=14;$.ig.AggregatorType.prototype.byAccount=15;$.ig.AggregatorType.prototype.calculated=127;$.ig.HierarchyOrigin.prototype.userDefined=1;$.ig.HierarchyOrigin.prototype.systemEnabled=2;$.ig.HierarchyOrigin.prototype.systemInternal=4;$.ig.DimensionType.prototype.unknown=0;$.ig.DimensionType.prototype.time=1;$.ig.DimensionType.prototype.measure=2;$.ig.DimensionType.prototype.other=3;$.ig.DimensionType.prototype.quantitative=5;$.ig.DimensionType.prototype.accounts=6;$.ig.DimensionType.prototype.customers=7;$.ig.DimensionType.prototype.products=8;$.ig.DimensionType.prototype.scenario=9;$.ig.DimensionType.prototype.utility=10;$.ig.DimensionType.prototype.currency=11;$.ig.DimensionType.prototype.rates=12;$.ig.DimensionType.prototype.channel=13;$.ig.DimensionType.prototype.promotion=14;$.ig.DimensionType.prototype.organization=15;$.ig.DimensionType.prototype.billOfMaterials=16;$.ig.DimensionType.prototype.geography=17;$.ig.CubeType.prototype.cube=0;$.ig.CubeType.prototype.dimension=1;$.ig.CubeType.prototype.unknown=2;$.ig.AxisDefinitionParser.prototype.e="[";$.ig.AxisDefinitionParser.prototype.f="]";$.ig.AxisDefinitionParser.prototype.i="{";$.ig.AxisDefinitionParser.prototype.j="}";$.ig.AxisDefinitionParser.prototype.h=",";$.ig.CoreOlapElementParser.prototype.d="[";$.ig.CoreOlapElementParser.prototype.e="]";$.ig.CoreOlapElementParser.prototype.g=".";$.ig.CoreOlapElementParser.prototype.i="&";$.ig.util.extCopy($.ig.TaskExtensions,[[[$.ig.Task,$.ig.Task$1],["continueWithTask$1","continueWithTask$2"]]]);$.ig.util.extCopy($.ig.Queryable,[[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ArrayListCollection$1],["asQueryable"]]]);$.ig.util.extCopy($.ig.Enumerable,[[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ArrayListCollection$1],["where$1","where$11","select$2","selectMany$2","last$1","first$1","firstOrDefault$1","orderBy$2","orderByDescending$2","toList$1","concat$1","max","max$1","min","min$1","count$1","reverse$1","take$1","skip$1","any$1","contains$1","union$1","toArray$1","elementAt$1","sum","sum$1"]],[[$.ig.SortedList$1,$.ig.IGrouping$2,$.ig.ArrayListCollection$1],["ofType$1","cast$1"]]])})(jQuery);$.ig=$.ig||{};(function($){var $$t={};$.ig.$currDefinitions=$$t;$.ig.util.bulkDefine(["IFlatDataAxisProvider:a","OlapResultAxis:b","Object:c","Type:d","Boolean:e","ValueType:f","Void:g","String:h","IComparable:i","Number:j","Number:k","Single:l","Number:m","String:n","Array:o","RegExp:p","RuntimeTypeHandle:q","MethodInfo:r","MethodBase:s","MemberInfo:t","ParameterInfo:u","TypeCode:v","Enum:w","ConstructorInfo:x","PositionResolver$2:y","List$1:z","IList$1:aa","ICollection$1:ab","IEnumerable$1:ac","IEnumerable:ad","IEnumerator:ae","IEnumerator$1:af","IArrayList:ag","Array:ah","ICollection:ai","CompareCallback:aj","MulticastDelegate:ak","IntPtr:al","IList:am","IDisposable:an","IArray:ao","Script:ap","Date:aq","Date:ar","Number:as","Func$3:at","Action$1:au","PositionItemInfo$2:av","Dictionary$2:aw","IDictionary$2:ax","IDictionary:ay","Dictionary:az","IEqualityComparer$1:a0","KeyValuePair$2:a1","NotImplementedException:a2","Error:a3","IHierarchicalPositionItem$2:a4","IPositionItem$2:a5","IPosition$2:a6","Math:a7","Number:a8","Number:a9","Number:ba","Number:bb","Number:bc","Number:bd","Number:be","Enumerable:bf","Func$2:bg","IOrderedEnumerable$1:bh","SortedList$1:bi","ArgumentNullException:bj","EventHandler$1:bk","Delegate:bl","ListSortDirection:bm","Nullable$1:bn","OlapResultTuple:bo","ReadOnlyCollection$1:bp","OlapResultAxisMember:bq","Task$1:br","Task:bs","JQueryPromise:bt","Action:bu","AggregateException:bv","TaskStatus:bw","TaskCompletionSource$1:bx","JQueryDeferred:by","JQuery:bz","JQueryObject:b0","Element:b1","ElementAttributeCollection:b2","ElementCollection:b3","WebStyle:b4","ElementNodeType:b5","Document:b6","EventListener:b7","IElementEventHandler:b8","ElementEventHandler:b9","ElementAttribute:ca","JQueryPosition:cb","JQueryCallback:cc","JQueryEvent:cd","JQueryUICallback:ce","FlatDataAxisProvider:cf","FlatDataProvider:cg","IFlatDataProvider:ch","IOlapDiscoverDataProvider:ci","TableMetadata:cj","RowMetadata:ck","DataSourceMetadata:cl","CubeMetadata:cm","MeasuresDimensionMetadata:cn","ArrayListCollection$1:co","INotifyCollectionChanged:cp","NotifyCollectionChangedEventHandler:cq","NotifyCollectionChangedEventArgs:cr","EventArgs:cs","NotifyCollectionChangedAction:ct","KeyValueItem:cu","Level:cv","ICoreOlapElement:cw","InvalidOperationException:cx","Hierarchy:cy","HierarchyOrigin:cz","Member:c0","MemberType:c1","TaskFactory:c2","OlapResult:c3","AxisElement:c4","DataMemberMetadata:c5","Measure:c6","AggregatorType:c7","CellMetadata:c8","OlapResultCell:c9","KeyListPair$1:da","Cube:db","CubeType:dc","MeasureMetadata:dd","Dimension:de","DimensionType:df","DimensionMetadata:dg","HierarchyMetadata:dh","LevelMetadata:di","FlatDataAxisProviderHelper:dj","CubeMetaItemsCache:dk","MeasureGroupMetaItemsCache:dl","MeasureGroupDimension:dm","CardinalityType:dn","Kpi:dp","Tuple$2:dq","KpiMeasure:dr","MeasureList:ds","FlatDataPartialAxisProvider:dt","FlatDataSourceImpl:du","OlapDataSource:dv","IOlapDataSource:dw","OlapMetadataTreeItem:dx","OlapMetadataTreeItemType:dy","MeasureListLocation:dz","MeasureGroup:d0","DataSourceBaseOptions:d1","IOlapDataProviderFactory:d2","OlapResultView:d3","NotSupportedException:d4","PositionInfo:d5","TaskExtensions:d6","AxisDefinitionParser:d7","Debug:d8","MetaTreeHelper:d9","HierarchyItemPosition:ea","KpiDimension:eb","FlatDataSourceOptions:ec","IFlatDataProviderFactory:ed","DefaultFlatDataProviderFactory:ee","ResultViewHelper:ef","CoreOlapElementParser:eg","ArgumentException:eh","OlapFlatDataSource:ei","DataSourceBase:ej","jQueryUtils:ek","AbstractEnumerable:em","Func$1:en","AbstractEnumerator:eo","GenericEnumerable$1:ep","GenericEnumerator$1:eq"]);$.ig.util.defType("IFlatDataAxisProvider","Object",{$type:new $.ig.Type("IFlatDataAxisProvider",null)},true);$.ig.util.defType("FlatDataAxisProvider","Object",{h:null,c:null,a:null,init:function(a,b,c){var $self=this;this.i=null;this.b=null;this.f=false;this.g=false;$.ig.Object.prototype.init.call(this);this.a=c;this.d(a);this.h=b.select$2($.ig.ICoreOlapElement.prototype.$type,$.ig.ICoreOlapElement.prototype.$type,function(d){return d}).toList$1($.ig.ICoreOlapElement.prototype.$type);this.c=new $.ig.FlatDataAxisProviderHelper(a,b.count(),c)},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_axis:null,axis:function(value){if(arguments.length===1){this._axis=value;return value}else{return this._axis}},e:function(){return this.c.c()},i:null,b:null,f:false,g:false,n:function(a){var $self=this;if($self.axis()!=null){$self.b=$self.axis();$self.i=a.select$2($.ig.ICoreOlapElement.prototype.$type,$.ig.ICoreOlapElement.prototype.$type,function(b){return b}).toList$1($.ig.ICoreOlapElement.prototype.$type);$self.f=true}else{$self.c=new $.ig.FlatDataAxisProviderHelper($self.d(),a.count(),$self.a);$self.h=a}},o:function(){if(this.axis()!=null){this.g=true}},j:function(a){var $self=this;$self.f=false;var b=$self.i;var c=$self.b;var d=new $.ig.TaskCompletionSource$1($.ig.OlapResultAxis.prototype.$type,0);var e=new $.ig.List$1(String,0);for(var f=0;f<$self.h.count();f++){var g=$self.h.item(f);if($.ig.util.cast($.ig.MeasureList.prototype.$type,g)!==null){e.add($self.d().d().a().b().c());continue}e.add(g.uniqueName())}$self.h=b;var h=new $.ig.List$1(String,0);var i=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);for(var j=0;j<$self.h.count();j++){var k=$self.h.item(j);if($.ig.util.cast($.ig.MeasureList.prototype.$type,k)!==null){h.add($self.d().d().a().b().c());continue}h.add(k.uniqueName());i.add(new $.ig.KeyValuePair$2(String,$.ig.Number.prototype.$type,1,k.uniqueName(),0))}var l=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);if(e.count()>0){var m=-1;for(var n=0;n<h.count();n++){if(n==e.count()||e.item(n)!=h.item(n)){break}m=n}if(m<i.count()-1){for(var o=m+1;o<i.count();o++){l.add(i.item(o))}}else{l=i}var p=new Array($self.h.count());var q=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);$self.c.l(l).i(function(r){return $self.p(m,b,p,r.m(),q,c.name(),d,true)});return d.b()}return $self.generateAxis(a)},generateAxis:function(a){var $self=this;if($self.g||$self.f){var b=null;if($self.g){b=$self.k(a)}if($self.f){b=$self.j(a)}return b}var c=new $.ig.TaskCompletionSource$1($.ig.OlapResultAxis.prototype.$type,0);if($self.axis()!=null){c.e($self.axis());return c.b()}var d=new Array($self.h.count());var e=new $.ig.List$1(String,0);var f=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);var g=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);var h=$self.h;for(var i=0;i<$self.h.count();i++){var j=$self.h.item(i);if($.ig.util.cast($.ig.MeasureList.prototype.$type,j)!==null){e.add($self.d().d().a().b().c());continue}e.add(j.uniqueName());g.add(new $.ig.KeyValuePair$2(String,$.ig.Number.prototype.$type,1,j.uniqueName(),0))}var k=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);var l=$self.d().e().d();k=g;$self.c.l(k).i(function(m){$self.c.n(h,0,d,m.m(),l,null,f);$self.axis(function(){var $ret=new $.ig.OlapResultAxis(f,h.count());$ret.name(a);return $ret}());c.e($self.axis())});return c.b()},p:function(a,b,c,d,e,f,g,h){var $self=this;var i=$self.e();if(h){$self.c=new $.ig.FlatDataAxisProviderHelper($self.d(),b.count(),$self.a)}if(a>-1&&i.rootPositionInfo().count()>0){$self.c.o(b,a,i.rootPositionInfo(),c,d,e)}else{var j=$self.d().e().d().where$1($.ig.RowMetadata.prototype.$type,function(k){return!k.a()}).toList$1($.ig.RowMetadata.prototype.$type);$self.c.n(b,0,c,d,j,null,e)}$self.axis(function(){var $ret=new $.ig.OlapResultAxis(e,b.count());$ret.name(f);return $ret}());g.e($self.axis())},l:function(a){if(this.axis()==null){throw new $.ig.InvalidOperationException(0)}var c=a.getEnumerator();while(c.moveNext()){var b=c.current();this.c.d(b.key(),b.value())}},m:function(a){var b=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.OlapResultTuple.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type)),0);var d=a.e().getEnumerator();while(d.moveNext()){var c=d.current();var e=a.getTupleRowsMetadata(c);b.add(new $.ig.KeyValuePair$2($.ig.OlapResultTuple.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type),1,c,e))}this.l(b)},k:function(a){var $self=this;$self.g=false;var b=new $.ig.TaskCompletionSource$1($.ig.OlapResultAxis.prototype.$type,0);var c=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.OlapResultTuple.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type)),0);var d=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);for(var e=0;e<$self.c.c().positions().count();e++){var f=$self.c.c().positions().__inner[e];var g=$self.d().u(f.members().toArray$1($.ig.OlapResultAxisMember.prototype.$type),f.itemsCount()).where$1($.ig.RowMetadata.prototype.$type,function(h){return!h.a()}).toList$1($.ig.RowMetadata.prototype.$type);if(g.count()>0){d.add(f)}c.add(new $.ig.KeyValuePair$2($.ig.OlapResultTuple.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type),1,f,g))}if(c.count()>0){$self.l(c)}var h=new Array($self.h.count());var i=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);for(var j=0;j<$self.h.count();j++){var k=$self.h.item(j);if($.ig.util.cast($.ig.MeasureList.prototype.$type,k)!==null){continue}i.add(new $.ig.KeyValuePair$2(String,$.ig.Number.prototype.$type,1,k.uniqueName(),0))}$self.c.l(i).i(function(l){return $self.p($self.h.count()-1,$self.h,h,l.m(),new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0),a,b,false)});return b.b()},getTupleRowsMetadata:function(a){return this.c.i(a)},$type:new $.ig.Type("FlatDataAxisProvider",$.ig.Object.prototype.$type,[$.ig.IFlatDataAxisProvider.prototype.$type])},true);$.ig.util.defType("FlatDataAxisProviderHelper","Object",{a:null,e:null,_h:null,h:function(value){if(arguments.length===1){this._h=value;return value}else{return this._h}},init:function(a,b,c){$.ig.Object.prototype.init.call(this);this.a=c;this.b(a);this.e=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type),0);this.c(new $.ig.PositionResolver$2(String,$.ig.Object.prototype.$type,new $.ig.List$1($.ig.IPosition$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),0),b));this.h(this.c().positions())},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},i:function(a){var $self=this;var b=null;var c=$self.c().getPositionIndex(a);if(c>-1){(function(){var $ret=$self.e.tryGetValue(c,b);b=$ret.value;return $ret.ret})()}return b},d:function(a,b){var c=this.c().getPositionIndex(a);if(c==-1){this.e.add(this.h().count(),b);this.h().add(a);return true}this.e.item(c,b);return false},o:function(a,b,c,d,e,f){var $self=this;var g=c.positionItemDepthMin();var i=c.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(j){return j.positionItemDepth()==g}).getEnumerator();while(i.moveNext()){var h=i.current();if(h.positionItemIndex()==b||h.count()==0){if(h.count()==0){b=h.positionItemIndex()}$self.m(c,h,d,a,b,e,f)}else{var j=h.positionItem();var k=j.clone();var l=new Array(a.count());$.ig.Array.prototype.copy(d,0,l,0,a.count());l[h.positionItemIndex()]=k;$self.o(a,b,h,l,e,f)}}},m:function(a,b,c,d,e,f,g){var $self=this;var h=b.positionItem();var i=h.clone();var j=new Array(d.count());$.ig.Array.prototype.copy(c,0,j,0,d.count());j[b.positionItemIndex()]=i;var k=$self.b().u(j,b.positionItemIndex()+1).toList$1($.ig.RowMetadata.prototype.$type);if(k.count()>0){if(e<d.count()-1){$self.n(d,e+1,j,f,k,null,g)}else{var l=new $.ig.OlapResultTuple(j);var m=k.where$1($.ig.RowMetadata.prototype.$type,function(n){return!n.a()}).toList$1($.ig.RowMetadata.prototype.$type);var n=$self.c().getPositionIndex(l);if(n==-1){$self.e.add($self.h().count(),m);$self.h().add(l)}else{$self.h().item(n,l)}for(var p=0;p<j.length;p++){var o=j[p];o.position(l)}if(m.count()>0){g.add(l)}}if(b.isExpanded()){var r=a.values().where$1($.ig.PositionItemInfo$2.prototype.$type.specialize(String,$.ig.Object.prototype.$type),function(s){return s.parentKey()==b.key()}).getEnumerator();while(r.moveNext()){var q=r.current();$self.m(a,q,c,d,e,f,g)}}}},n:function(a,b,c,d,e,f,g){var $self=this;var h=a.item(b);if($.ig.util.cast($.ig.Hierarchy.prototype.$type,h)!==null){var i=d.item(h.uniqueName());if(f!=null){i=i.where$1($.ig.Member.prototype.$type,function(j){return j.parentUniqueName()==f})}var k=i.getEnumerator();while(k.moveNext()){var j=k.current();var l;(function(){var $ret=$self.b().i(j.uniqueName(),l);l=$ret.memberId;return $ret.ret})();var m=e.where$1($.ig.RowMetadata.prototype.$type,function(n){return n.d(j.levelUniqueName())==l}).toList$1($.ig.RowMetadata.prototype.$type);if(m.count()>0){var n=new Array(a.count());$.ig.Array.prototype.copy(c,0,n,0,a.count());var o=new $.ig.OlapResultAxisMember;o.caption(j.caption());o.hierarchyUniqueName(j.hierarchyUniqueName());o.levelNumber(j.levelDepth());o.levelUniqueName(j.levelUniqueName());o.uniqueName(j.uniqueName());o.displayInfo(j.childrenCardinality());o.properties().add("PARENT_UNIQUE_NAME",j.parentUniqueName());o.properties().add("memberId",l.toString());n[b]=o;if(b==a.count()-1){var p=m.where$1($.ig.RowMetadata.prototype.$type,function(q){return!q.a()}).toList$1($.ig.RowMetadata.prototype.$type);var q=new $.ig.OlapResultTuple(n);var r=$self.c().getPositionIndex(q);if(r==-1){$self.e.add($self.h().count(),p);$self.h().add(q)}else{$self.h().item(r,q)}for(var t=0;t<n.length;t++){var s=n[t];s.position(q)}if(p.count()>0){g.add(q)}}else{$self.n(a,b+1,n,d,m,null,g)}}}}else if($.ig.util.cast($.ig.MeasureList.prototype.$type,h)!==null){var u=h;var w=u.measures().getEnumerator();while(w.moveNext()){var v=w.current();var x=new Array(a.count());$.ig.Array.prototype.copy(c,0,x,0,a.count());var y=new $.ig.OlapResultAxisMember;y.caption(v.caption());var z=$self.j($self.b().d().a().b().c());y.hierarchyUniqueName(z);y.levelNumber(0);y.uniqueName(v.uniqueName());x[b]=y;if(b==a.count()-1){var aa=new $.ig.OlapResultTuple(x);var ab=e.where$1($.ig.RowMetadata.prototype.$type,function(ac){return!ac.a()}).toList$1($.ig.RowMetadata.prototype.$type);var ac=$self.c().getPositionIndex(aa);if(ac==-1){$self.e.add($self.h().count(),ab);$self.h().add(aa)}else{$self.h().item(ac,aa)}for(var ae=0;ae<x.length;ae++){var ad=x[ae];ad.position(aa)}if(ab.count()>0){g.add(aa)}}else{$self.n(a,b+1,x,d,e,null,g)}}}},l:function(a){var $self=this;var b=$self.a;if(a.count()==0){var c=new $.ig.TaskCompletionSource$1($.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type)),0);c.e(new $.ig.Dictionary$2(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type),0));return c.b()}var d=new $.ig.Dictionary$2(String,$.ig.Level.prototype.$type,0);for(var e=0;e<a.count();e++){var f=a.item(e).key();var g=a.item(e).value();var h=b.r().where$1($.ig.Level.prototype.$type,function(i){return i.hierarchyUniqueName()==f&&i.depth()==g}).firstOrDefault$1($.ig.Level.prototype.$type);if(!d.containsKey(f)){d.add(f,h)}}return $self.k(d)},j:function(a){if(a.substr(0,1)!="["){a="["+a}if(a.substr(a.length-1,1)!="]"){a+="]"}return a},k:function(a){var $self=this;var b=$self.a;var c=new $.ig.Dictionary$2(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type),0);var d=new $.ig.List$1(String,0);var f=a.getEnumerator();while(f.moveNext()){var e=f.current();var g=e.value().uniqueName();var h;if(function(){var $ret=b.h(g,h);h=$ret.members;return $ret.ret}()){c.add(e.key(),h)}else{d.add(e.key())}}if(d.count()==0){var i=new $.ig.TaskCompletionSource$1($.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type)),0);i.e(c);return i.b()}var j=new Array(d.count());var k=0;var m=d.getEnumerator();while(m.moveNext()){var l=m.current();var n=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);n.add(function(){var $ret=new $.ig.KeyValueItem;$ret.a("LEVEL_UNIQUE_NAME");$ret.b(a.item(l).uniqueName());return $ret}());j[k]=$self.b().discoverMembersAsync(null,n);k++}var o=new $.ig.TaskFactory;return o.d($.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type)),j,function(p){return $self.g(p,d,c)})},g:function(a,b,c){for(var d=0;d<b.count();d++){var e=b.__inner[d];if(!c.containsKey(e)){var f=a[d].m();var h=f.getEnumerator();while(h.moveNext()){var g=h.current();this.a.u(g)}c.add(e,f)}}return c},f:function(a,b){var $self=this;var c=new $.ig.Dictionary$2(String,$.ig.Level.prototype.$type,0);for(var d=0;d<b.count();d++){var e=a[d];if(e.a()!=null||e.b()){return null}var f=b.item(d);var g=e.m().where$1($.ig.Level.prototype.$type,function(h){return h.depth()==f}).firstOrDefault$1($.ig.Level.prototype.$type);if(g!=null&&!c.containsKey(g.hierarchyUniqueName())){c.add(g.hierarchyUniqueName(),g)}}return c},$type:new $.ig.Type("FlatDataAxisProviderHelper",$.ig.Object.prototype.$type)},true);$.ig.util.defType("FlatDataPartialAxisProvider","Object",{b:null,d:null,a:null,init:function(a,b,c,d){$.ig.Object.prototype.init.call(this);this.c(a);this.b=new $.ig.FlatDataAxisProviderHelper(a,b.count(),d);this.a=c;this.d=b},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_axis:null,axis:function(value){if(arguments.length===1){this._axis=value;return value}else{return this._axis}},generateAxis:function(a){var $self=this;var b=new $.ig.TaskCompletionSource$1($.ig.OlapResultAxis.prototype.$type,0);if($self.axis()!=null){b.e($self.axis());return b.b()}var c=new Array($self.a.position().itemsCount());var d=new $.ig.List$1($.ig.OlapResultTuple.prototype.$type,0);var e=$self.a.position().indexOf($self.a);var f=$self.a.position();var g=new $.ig.List$1($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.Number.prototype.$type),0);for(var h=0;h<$self.a.position().itemsCount();h++){if(h<e){c[h]=$self.a.position().members().item(h).clone()}else if(h==e){if($.ig.util.cast($.ig.MeasureList.prototype.$type,$self.d.item(h))!==null){continue}var i=f.members().item(h);g.add(new $.ig.KeyValuePair$2(String,$.ig.Number.prototype.$type,1,i.hierarchyUniqueName(),i.depth()+1))}else{if($.ig.util.cast($.ig.MeasureList.prototype.$type,$self.d.item(h))!==null){continue}var j=f.members().item(h);g.add(new $.ig.KeyValuePair$2(String,$.ig.Number.prototype.$type,1,j.hierarchyUniqueName(),j.depth()))}}$self.b.l(g).i(function(k){var l=$self.c().u(f.members().toArray$1($.ig.OlapResultAxisMember.prototype.$type),e+1).toList$1($.ig.RowMetadata.prototype.$type);$self.b.n($self.d,e,c,k.m(),l,$self.a.uniqueName(),d);$self.axis(function(){var $ret=new $.ig.OlapResultAxis(d,f.itemsCount());$ret.name(a);return $ret}());b.e($self.axis())});return b.b()},getTupleRowsMetadata:function(a){return this.b.i(a)},e:function(){return this.b.h()},$type:new $.ig.Type("FlatDataPartialAxisProvider",$.ig.Object.prototype.$type,[$.ig.IFlatDataAxisProvider.prototype.$type])},true);$.ig.util.defType("IFlatDataProvider","Object",{$type:new $.ig.Type("IFlatDataProvider",null,[$.ig.IOlapDiscoverDataProvider.prototype.$type])},true);$.ig.util.defType("FlatDataProvider","Object",{v:null,x:null,z:null,ab:null,n:null,p:null,r:null,j:null,k:null,ad:null,q:null,l:null,_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},init:function(a,b){var $self=this;this.r=new $.ig.Dictionary$2(String,$.ig.Number.prototype.$type,0);this.j=new $.ig.Dictionary$2(String,$.ig.DataMemberMetadata.prototype.$type,0);this.k=new $.ig.Dictionary$2(String,$.ig.DataMemberMetadata.prototype.$type,0);this.m=new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type),0);$.ig.Object.prototype.init.call(this);this.ah(a);this.d(b);this.e(new $.ig.TableMetadata(a));if(b.a()!=null){if(b.a().b()==null){b.a().b(function(){var $ret=new $.ig.MeasuresDimensionMetadata;$ret.b("Measures");$ret.c("Measures");return $ret}())}else{if(String.isNullOrEmpty(b.a().b().b())){b.a().b().b("Measures")}if(String.isNullOrEmpty(b.a().b().c())){b.a().b().c("Measures")}}}},_ah:null,ah:function(value){if(arguments.length===1){this._ah=value;return value}else{return this._ah}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},discoverCatalogsAsync:function(a,b){throw new $.ig.NotImplementedException},discoverCubesAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Cube.prototype.$type),0);if(this.v==null){this.v=this.w()}c.e(this.v);return c.b()},discoverDimensionsAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Dimension.prototype.$type),0);if(this.x==null){this.x=this.y()}c.e(this.x);return c.b()},discoverHierarchiesAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Hierarchy.prototype.$type),0);if(this.z==null){this.z=this.aa()}c.e(this.z);return c.b()},discoverLevelsAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Level.prototype.$type),0);var d=this.s(a,b);c.e(d);return c.b()},s:function(a,b){var $self=this;if($self.ab==null){$self.n=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.Level.prototype.$type),0);$self.ab=$self.ac()}var c=null;var d=null;if(b!=null){c=b.where$1($.ig.KeyValueItem.prototype.$type,function(e){return e.a()=="HIERARCHY_UNIQUE_NAME"}).firstOrDefault$1($.ig.KeyValueItem.prototype.$type);d=b.where$1($.ig.KeyValueItem.prototype.$type,function(e){return e.a()=="LEVEL_UNIQUE_NAME"}).firstOrDefault$1($.ig.KeyValueItem.prototype.$type)}var e;if(c!=null){e=$self.ab.where$1($.ig.Level.prototype.$type,function(f){return f.hierarchyUniqueName()==c.b()})}else{e=$self.ab.toList$1($.ig.Level.prototype.$type)}if(d!=null){e=e.where$1($.ig.Level.prototype.$type,function(f){return f.uniqueName()==d.b()})}return e},discoverMeasuresAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Measure.prototype.$type),0);if(this.ad==null){this.q=new $.ig.Dictionary$2(String,$.ig.Func$3.prototype.$type.specialize($.ig.IEnumerable.prototype.$type,$.ig.CellMetadata.prototype.$type,$.ig.Object.prototype.$type),0);this.ad=this.ae(this.q)}c.e(this.ad);return c.b()},discoverMeasureGroupsAsync:function(a,b){throw new $.ig.NotImplementedException},discoverMeasureGroupDimensionsAsync:function(a,b){throw new $.ig.NotImplementedException},discoverMembersAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Member.prototype.$type),0);var d=this.t(a,b);c.e(d);return c.b()},discoverKpisAsync:function(a,b){var c=new $.ig.TaskCompletionSource$1($.ig.IEnumerable$1.prototype.$type.specialize($.ig.Kpi.prototype.$type),0);c.e(new $.ig.List$1($.ig.Kpi.prototype.$type,0));return c.b()},t:function(a,b){var $self=this;if($self.l==null){$self.l=new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.Member.prototype.$type),0)}var c=b.where$1($.ig.KeyValueItem.prototype.$type,function(d){return d.a()=="HIERARCHY_UNIQUE_NAME"}).firstOrDefault$1($.ig.KeyValueItem.prototype.$type);var d=b.where$1($.ig.KeyValueItem.prototype.$type,function(e){return e.a()=="LEVEL_UNIQUE_NAME"}).firstOrDefault$1($.ig.KeyValueItem.prototype.$type);var e=b.where$1($.ig.KeyValueItem.prototype.$type,function(f){return f.a()=="MEMBER_UNIQUE_NAME"}).firstOrDefault$1($.ig.KeyValueItem.prototype.$type);if($self.ab==null){$self.ab=$self.ac()}var f=null;var g=$self.ab;if(c!=null){g=g.where$1($.ig.Level.prototype.$type,function(h){return h.hierarchyUniqueName()==c.b()}).toList$1($.ig.Level.prototype.$type)}if(d!=null){var h=g.where$1($.ig.Level.prototype.$type,function(i){return i.uniqueName()==d.b()}).first$1($.ig.Level.prototype.$type);var i=h.hierarchyUniqueName();var j=h.depth();var k=0;if(e!=null){k=1}g=g.where$1($.ig.Level.prototype.$type,function(l){return l.hierarchyUniqueName()==i&&l.depth()<=j+k}).toList$1($.ig.Level.prototype.$type)}else if(e!=null){throw new $.ig.InvalidOperationException(1,"LEVEL_UNIQUE_NAME restriction is required for MEMBER_UNIQUE_NAME restriction.")}f=new Array(g.count());for(var l=0;l<g.count();l++){f[l]=g.item(l)}var m=null;if(f.length>0){var n=f[0];var o=$self.z.where$1($.ig.Hierarchy.prototype.$type,function(p){return p.uniqueName()==n.hierarchyUniqueName()}).first$1($.ig.Hierarchy.prototype.$type);var p=$self.e().d();$self.al(f,0,".",null,o,p);if(c!=null&&d==null&&e==null){var q=new $.ig.List$1($.ig.Member.prototype.$type,0);for(var r=0;r<f.length;r++){var s=f[r];var t;if(!function(){var $ret=$self.l.tryGetValue(s.uniqueName(),t);t=$ret.value;return $ret.ret}()){}var v=t.values().getEnumerator();while(v.moveNext()){var u=v.current();q.add(u)}}m=q}else{n=f[f.length-1];if(e==null){var w;if(!function(){var $ret=$self.l.tryGetValue(n.uniqueName(),w);w=$ret.value;return $ret.ret}()){}m=w.values()}else{var x;if(!function(){var $ret=$self.l.tryGetValue(n.uniqueName(),x);x=$ret.value;return $ret.ret}()){}var y=new $.ig.List$1($.ig.Member.prototype.$type,0);var aa=x.values().getEnumerator();while(aa.moveNext()){var z=aa.current();if(z.parentUniqueName()==e.b()){y.add(z)}}m=y}}}else{m=new $.ig.List$1($.ig.Member.prototype.$type,0)}return m},ak:function(a,b,c){var $self=this;var d=new $.ig.List$1($.ig.Task.prototype.$type,0);if(a!=null){d.add(a.generateAxis("Axis0"))}if(b!=null){var e=a==null?"Axis0":"Axis1";d.add(b.generateAxis(e))}if(d.count()>0){var f=new Array(d.count());for(var g=0;g<d.count();g++){f[g]=d.item(g)}var h=new $.ig.TaskFactory;return h.d($.ig.OlapResult.prototype.$type,f,function(i){return $self.c(a,b,c)})}var i=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);var j=$self.c(null,null,c);i.e(j);return i.b()},am:function(a){var $self=this;var b=new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type)),0);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();if(c.a().count()>0){for(var e=0;e<c.a().count();e++){var f=c.a().item(e);var g;if(function(){var $ret=$self.j.tryGetValue(f,g);g=$ret.value;return $ret.ret}()){var h;if(!function(){var $ret=b.tryGetValue(c.b(),h);h=$ret.value;return $ret.ret}()){h=new $.ig.Dictionary$2($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type),0);b.add(c.b(),h)}var i;if(!function(){var $ret=h.tryGetValue(g.a().levelDepth(),i);i=$ret.value;return $ret.ret}()){i=new $.ig.Dictionary$2(String,$.ig.DataMemberMetadata.prototype.$type,0);h.add(g.a().levelDepth(),i)}if(!i.containsKey(f)){i.add(f,g)}}}}}var j=new $.ig.Dictionary$2(String,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type),0);var l=b.getEnumerator();while(l.moveNext()){var k=l.current();var m=k.value();var n=m.orderBy$2($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type)),$.ig.Number.prototype.$type,function(o){return o.key()}).select$2($.ig.KeyValuePair$2.prototype.$type.specialize($.ig.Number.prototype.$type,$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type)),$.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type),function(o){return o.value()
}).toList$1($.ig.IDictionary$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type));for(var o=n.count()-1;o>=0;o--){var p=n.item(o).select$2($.ig.KeyValuePair$2.prototype.$type.specialize(String,$.ig.DataMemberMetadata.prototype.$type),$.ig.DataMemberMetadata.prototype.$type,function(q){return q.value()}).toList$1($.ig.DataMemberMetadata.prototype.$type);for(var q=0;q<p.count();q++){var r=p.item(q);var s=r.a().levelDepth();if(s>0){var t;if(!function(){var $ret=m.tryGetValue(s-1,t);t=$ret.value;return $ret.ret}()||!t.containsKey(r.a().parentUniqueName())){var u;if(!function(){var $ret=j.tryGetValue(r.a().parentUniqueName(),u);u=$ret.value;return $ret.ret}()){u=new $.ig.Dictionary$2(String,$.ig.DataMemberMetadata.prototype.$type,0);j.add(r.a().parentUniqueName(),u)}u.add(r.a().uniqueName(),r)}}}}var v=n.item(0);var w=v.values().first$1($.ig.DataMemberMetadata.prototype.$type);if(!String.isNullOrEmpty(w.a().parentUniqueName())){w=$self.j.item(w.a().parentUniqueName())}var x=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);x.add(function(){var $ret=new $.ig.KeyValueItem;$ret.a("LEVEL_UNIQUE_NAME");$ret.b(w.a().levelUniqueName());return $ret}());var y=$self.t(null,x).toList$1($.ig.Member.prototype.$type);for(var z=0;z<y.count();z++){var aa=y.item(z);if(!v.containsKey(aa.uniqueName())&&!j.containsKey(aa.uniqueName())){j.add(aa.uniqueName(),new $.ig.Dictionary$2(String,$.ig.DataMemberMetadata.prototype.$type,0))}}}var ac=$self.m.keys().getEnumerator();while(ac.moveNext()){var ab=ac.current();var ad;if(function(){var $ret=$self.j.tryGetValue(ab,ad);ad=$ret.value;return $ret.ret}()){for(var ae=0;ae<ad.d().count();ae++){var af=ad.d().item(ae);if(af.a()){af.h()}}}}$self.m=j;var ah=$self.m.keys().getEnumerator();while(ah.moveNext()){var ag=ah.current();var ai;if(function(){var $ret=$self.j.tryGetValue(ag,ai);ai=$ret.value;return $ret.ret}()){if(!$self.g(ai)){for(var aj=0;aj<ai.d().count();aj++){var ak=ai.d().item(aj);ak.f()}}}}var am=$self.m.keys().getEnumerator();while(am.moveNext()){var al=am.current();var an;if(function(){var $ret=$self.j.tryGetValue(al,an);an=$ret.value;return $ret.ret}()){var ao=$self.m.item(al).values().toList$1($.ig.DataMemberMetadata.prototype.$type);for(var ap=0;ap<ao.count();ap++){var aq=ao.item(ap);for(var ar=0;ar<aq.d().count();ar++){var as=aq.d().item(ar);if(as.a()){as.h()}}}}}},g:function(a){var $self=this;var b=a.a().parentUniqueName();while(!String.isNullOrEmpty(b)){if($self.m.containsKey(b)){return true}var c;if(function(){var $ret=$self.j.tryGetValue(b,c);c=$ret.value;return $ret.ret}()){b=c.a().parentUniqueName()}else{return false}}return false},m:null,u:function(a,b){var $self=this;var c=null;var d=-1;for(var e=0;e<b;e++){var f=a[e];var g=null;var h;if(function(){var $ret=$self.h(f.uniqueName(),h);h=$ret.memberMetadata;return $ret.ret}()){g=h.d()}if(g!=null){if(c==null||c.count()>g.count()){d=e;c=g}}}if(c==null){c=$self.e().d().toList$1($.ig.RowMetadata.prototype.$type)}var i=c;for(var j=0;j<b;j++){if(j!=d){var k=a[j];var l;if(function(){var $ret=k.properties().tryGetValue("memberId",l);l=$ret.value;return $ret.ret}()){var m=k.levelUniqueName();var n=$.ig.Number.prototype.parseInt(l);i=i.where$1($.ig.RowMetadata.prototype.$type,function(o){return o.d(m)==n})}}}return i},i:function(a,b){var $self=this;return{ret:function(){var $ret=$self.r.tryGetValue(a,b);b=$ret.value;return $ret.ret}(),memberId:b};return{memberId:b}},h:function(a,b){var $self=this;return{ret:function(){var $ret=$self.j.tryGetValue(a,b);b=$ret.value;return $ret.ret}(),memberMetadata:b};return{memberMetadata:b}},a:function($t,a){var b=new $.ig.ArrayListCollection$1($t);var d=a.getEnumerator();while(d.moveNext()){var c=d.current();b.add(c)}return b},c:function(a,b,c){var $self=this;var d=null;if(a!=null){d=a.axis()}var e=null;if(b!=null){e=b.axis()}var f=$self.f(d,e,c);var g=f[0];var h=f[1];var i=null;var j=-1;var k=null;var l=new $.ig.Dictionary$2(String,$.ig.Number.prototype.$type,0);var m=new $.ig.Array;var n=new $.ig.Array;var o=new $.ig.Array;for(var p=0;p<c.count();p++){l.add(c.item(p).uniqueName(),p);m.add(c.item(p))}if(g=="none"&&c.count()>0){i=c.item(0).uniqueName();j=l.item(i);k=$self.q.item(i)}if(d==null&&e==null){var q=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,0);if(k!=null){var r=$self.e().d().where$1($.ig.RowMetadata.prototype.$type,function(s){return!s.a()});var s=new $.ig.Array;var u=r.select$2($.ig.RowMetadata.prototype.$type,$.ig.Object.prototype.$type,function(v){return v.e()}).getEnumerator();while(u.moveNext()){var t=u.current();s.add(t)}if(s.length>0){var v=new $.ig.CellMetadata(0,0,0,j,n,o,m);var w=k(s,v);if(w!=null){var x=new $.ig.OlapResultCell;x.cellOrdinal(0);x.properties().add("Value",w);x.properties().add("FmtValue",w.toString());q.add(x)}}}return $self.b(null,null,q)}if(e!=null){var y=e.tuples();for(var z=0;z<y.count();z++){n.add(y.__inner[z])}}if(d!=null){var aa=d.tuples();for(var ab=0;ab<aa.count();ab++){o.add(aa.__inner[ab])}}var ac=1;if(d!=null){ac=d.tuples().count()}var ad=1;if(e!=null){ad=e.tuples().count()}var ae=new $.ig.List$1($.ig.OlapResultCell.prototype.$type,0);for(var af=0;af<ad;af++){var ag=null;var ah=null;if(e!=null){ah=e.tuples().__inner[af];ag=b.getTupleRowsMetadata(ah);if(g=="rows"){i=ah.members().item(h).uniqueName();j=l.item(i);k=$self.q.item(i)}}for(var ai=0;ai<ac;ai++){var aj=ag;var ak=null;var al=null;if(d!=null){al=d.tuples().__inner[ai];ak=a.getTupleRowsMetadata(al);if(g=="columns"){i=al.members().item(h).uniqueName();j=l.item(i);k=$self.q.item(i)}}if(aj!=null){if(ak!=null){aj=$self.ag(aj,ak,ah,al,h)}}else{aj=ak}if(k!=null){var am=af*ac+ai;var an=new $.ig.CellMetadata(af,ai,am,j,n,o,m);var ao=new $.ig.Array;var aq=aj.select$2($.ig.RowMetadata.prototype.$type,$.ig.Object.prototype.$type,function(ar){return ar.e()}).getEnumerator();while(aq.moveNext()){var ap=aq.current();ao.add(ap)}if(ao.length>0){var ar=k(ao,an);if(ar!=null){var as=new $.ig.OlapResultCell;as.cellOrdinal(am);as.properties().add("Value",ar.toString());as.properties().add("FmtValue",ar.toString());ae.add(as)}}}}}var at=$self.b(d,e,ae);return at},b:function(a,b,c){var $self=this;var d=function(){var $ret=new $.ig.OlapResult;$ret.axes(new $.ig.List$1($.ig.OlapResultAxis.prototype.$type,0));return $ret}();if(a!=null){d.axes().add(a)}if(b!=null){d.axes().add(b)}d.cells(c);d.isEmpty(b==null&&a==null&&c.count()==0);return d},ag:function(a,b,c,d,e){var $self=this;if(b.count()<a.count()){a=b;d=c}for(var f=0;f<d.members().count();f++){if(f!=e){var g=d.members().item(f);var h;if(function(){var $ret=g.properties().tryGetValue("memberId",h);h=$ret.value;return $ret.ret}()){var i=$.ig.Number.prototype.parseInt(h);a=a.where$1($.ig.RowMetadata.prototype.$type,function(j){return j.d(g.levelUniqueName())==i}).toList$1($.ig.RowMetadata.prototype.$type)}}}return a},f:function(a,b,c){var $self=this;var d=$self.aj($self.d().a().b().c());var e="none";var f=-1;if(c.count()>0){if(a!=null&&a.tuples().count()>0){var g=a.tuples().__inner[0];for(var h=0;h<g.members().count();h++){var i=g.members().item(h);if(i.hierarchyUniqueName()==d){e="columns";f=h;break}}}if(e=="none"){if(b!=null&&b.tuples().count()>0){var j=b.tuples().__inner[0];for(var k=0;k<j.members().count();k++){var l=j.members().item(k);if(l.hierarchyUniqueName()==d){e="rows";f=k;break}}}}}return function(){var $ret=new Array;$ret.add(e);$ret.add(f);return $ret}()},al:function(a,b,c,d,e,f){var $self=this;var g=a[b];var h=$self.p.item(g.uniqueName());var i=$self.ab.where$1($.ig.Level.prototype.$type,function(j){return j.hierarchyUniqueName()==e.uniqueName()&&j.depth()==g.depth()+1}).firstOrDefault$1($.ig.Level.prototype.$type);var j=null;if(d!=null){j=d.uniqueName()}var k;if(!function(){var $ret=$self.l.tryGetValue(g.uniqueName(),k);k=$ret.value;return $ret.ret}()){k=new $.ig.Dictionary$2(String,$.ig.Member.prototype.$type,0);$self.l.add(g.uniqueName(),k)}var l=new $.ig.List$1($.ig.KeyListPair$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type),0);var m=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.RowMetadata.prototype.$type),0);var o=f.getEnumerator();while(o.moveNext()){var n=o.current();var p=h(n.e());if(p!=null){var q;if(!function(){var $ret=m.tryGetValue(p,q);q=$ret.value;return $ret.ret}()){q=new $.ig.List$1($.ig.RowMetadata.prototype.$type,0);m.add(p,q);l.add(new $.ig.KeyListPair$1($.ig.RowMetadata.prototype.$type,1,p,q))}q.add(n)}}for(var r=0;r<l.count();r++){var s=l.item(r).b();var t=l.item(r).a();var u=c+"&"+$self.aj(s);var v=g.uniqueName()+u;var w;var x;var y;if(!function(){var $ret=k.tryGetValue(v,w);w=$ret.value;return $ret.ret}()){w=new $.ig.Member;w.caption(s);w.dimensionUniqueName(g.dimensionUniqueName());w.hierarchyUniqueName(g.hierarchyUniqueName());w.levelDepth(g.depth());w.levelUniqueName(g.uniqueName());w.name(s);w.parentLevel(g.depth()-1);w.parentUniqueName(j);w.uniqueName(v);if(i!=null){w.childrenCardinality(1)}if(d!=null){d.childrenCardinality(d.childrenCardinality()+1)}k.add(v,w);x=$self.r.count();$self.r.add(w.uniqueName(),x);y=new $.ig.DataMemberMetadata(w,u,x,k.count());$self.j.add(w.uniqueName(),y);$self.k.add(w.uniqueName(),y);for(var z=0;z<t.count();z++){var aa=t.item(z);aa.g(g.uniqueName(),x);y.h(aa)}}if(b+1<a.length){$self.al(a,b+1,u,w,e,t)}}if(d!=null){d.childrenCardinality(l.count())}},aj:function(a){if(a.substr(0,1)!="["){a="["+a}if(a.substr(a.length-1,1)!="]"){a+="]"}return a},af:null,o:null,w:function(){var a=new $.ig.List$1($.ig.Cube.prototype.$type,0);if(this.d()==null||this.d().a()==null){return a}var b=new $.ig.Cube;b.caption(this.d().a().c());b.name(this.d().a().e());b.description(this.d().a().d());a.add(b);return a},ae:function(a){var b=new $.ig.List$1($.ig.Measure.prototype.$type,0);if(this.d()==null||this.d().a()==null||this.d().a().b()==null||this.d().a().b().a()==null){return b}var c=this.d().a().b().c();var e=this.d().a().b().a().getEnumerator();while(e.moveNext()){var d=e.current();var f=new $.ig.Measure;f.caption(d.e());f.defaultFormatString(d.d());f.measureDisplayFolder(d.c());f.name(d.f());f.uniqueName(this.aj(c)+"."+this.aj(d.f()));b.add(f);a.item(f.uniqueName(),d.b())}return b},y:function(){if(this.v==null){this.v=this.w()}var a=new $.ig.List$1($.ig.Dimension.prototype.$type,0);if(this.d()==null||this.d().a()==null){return a}var b=new $.ig.Dimension;b.dimensionType($.ig.DimensionType.prototype.measure);b.caption(this.d().a().b().b());b.uniqueName(this.aj(this.d().a().b().c()));a.add(b);if(this.d().a().a()==null){return a}this.af=new $.ig.List$1($.ig.DimensionMetadata.prototype.$type,0);var d=this.d().a().a().getEnumerator();while(d.moveNext()){var c=d.current();this.af.add(c);var e=new $.ig.Dimension;e.caption(c.b());e.defaultHierarchy(c.c());e.uniqueName(this.aj(c.e()));e.name(c.e());e.description(c.d());a.add(e)}return a},aa:function(){var $self=this;if($self.x==null){$self.x=$self.y()}var a=new $.ig.List$1($.ig.Hierarchy.prototype.$type,0);if($self.d()==null||$self.d().a()==null){return a}var b=new $.ig.Hierarchy;b.uniqueName($self.aj($self.d().a().b().c()));b.dimensionUniqueName($self.aj($self.d().a().b().c()));a.add(b);if($self.d().a().a()==null){return a}$self.o=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.HierarchyMetadata.prototype.$type),0);for(var c=0;c<$self.af.count();c++){var d=$self.af.item(c);if(d.a()!=null){var e;if(!function(){var $ret=$self.o.tryGetValue(d.e(),e);e=$ret.value;return $ret.ret}()){e=new $.ig.List$1($.ig.HierarchyMetadata.prototype.$type,0);$self.o.add(d.e(),e)}var g=d.a().getEnumerator();while(g.moveNext()){var f=g.current();e.add(f);var h=new $.ig.Hierarchy;h.caption(f.b());h.description(f.c());h.dimensionUniqueName($self.aj(d.e()));h.hierarchyDisplayFolder(f.d());h.name(f.e());h.uniqueName(h.dimensionUniqueName()+"."+$self.aj(h.name()));a.add(h)}}}return a},ac:function(){var $self=this;if($self.z==null){$self.z=$self.aa()}$self.p=new $.ig.Dictionary$2(String,$.ig.Func$2.prototype.$type.specialize($.ig.Object.prototype.$type,String),0);var a=new $.ig.List$1($.ig.Level.prototype.$type,0);if($self.d()==null||$self.d().a()==null){return a}var b=new $.ig.Level;b.hierarchyUniqueName($self.aj($self.d().a().b().c()));b.uniqueName(b.hierarchyUniqueName()+".[MeasuresLevel]");b.depth(-1);a.add(b);if($self.d().a().a()==null){return a}var c=new $.ig.HierarchyMetadata;c.e($self.d().a().b().c());c.b($self.d().a().b().b());var d=new $.ig.List$1($.ig.HierarchyMetadata.prototype.$type,0);d.add(c);for(var e=0;e<$self.af.count();e++){var f=$self.af.item(e);var g;if(function(){var $ret=$self.o.tryGetValue(f.e(),g);g=$ret.value;return $ret.ret}()){for(var h=0;h<g.count();h++){d.add(g.item(h))}}}for(var i=0;i<d.count();i++){var j=d.item(i);if(j.a()==null){continue}var k=$self.z.item(i);for(var l=0;l<j.a().count();l++){var m=j.a().item(l);var n=new $.ig.Level;n.caption(m.b());n.depth(l);n.dimensionUniqueName(k.dimensionUniqueName());n.hierarchyUniqueName(k.uniqueName());n.name(m.c());n.uniqueName(k.uniqueName()+"."+$self.aj(n.name()));a.add(n);var o;if(!function(){var $ret=$self.n.tryGetValue(k.uniqueName(),o);o=$ret.value;return $ret.ret}()){o=new $.ig.List$1($.ig.Level.prototype.$type,0);$self.n.add(k.uniqueName(),o)}o.add(n);$self.p.item(n.uniqueName(),m.a())}}return a},$type:new $.ig.Type("FlatDataProvider",$.ig.Object.prototype.$type,[$.ig.IFlatDataProvider.prototype.$type])},true);$.ig.util.defType("KeyListPair$1","Object",{$t:null,_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},init:function($t,initNumber){if(initNumber>0){switch(initNumber){case 1:this.init1.apply(this,arguments);break}return}this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.Object.prototype.init.call(this);this.b(String.empty());this.a(new $.ig.List$1(this.$t,0))},init1:function($t,initNumber,a,b){this.$t=$t;this.$type=this.$type.specialize(this.$t);$.ig.Object.prototype.init.call(this);this.b(a);this.a(b)},$type:new $.ig.Type("KeyListPair$1",$.ig.Object.prototype.$type)},true);$.ig.util.defType("CellMetadata","Object",{init:function(a,b,c,d,e,f,g){$.ig.Object.prototype.init.call(this);this.rowIndex(a);this.columnIndex(b);this.cellOrdinal(c);this.measureIndex(d);this.rowTuples(e);this.columnTuples(f);this.measures(g)},_rowIndex:0,rowIndex:function(value){if(arguments.length===1){this._rowIndex=value;return value}else{return this._rowIndex}},_columnIndex:0,columnIndex:function(value){if(arguments.length===1){this._columnIndex=value;return value}else{return this._columnIndex}},_cellOrdinal:0,cellOrdinal:function(value){if(arguments.length===1){this._cellOrdinal=value;return value}else{return this._cellOrdinal}},_measureIndex:0,measureIndex:function(value){if(arguments.length===1){this._measureIndex=value;return value}else{return this._measureIndex}},_rowTuples:null,rowTuples:function(value){if(arguments.length===1){this._rowTuples=value;return value}else{return this._rowTuples}},_columnTuples:null,columnTuples:function(value){if(arguments.length===1){this._columnTuples=value;return value}else{return this._columnTuples}},_measures:null,measures:function(value){if(arguments.length===1){this._measures=value;return value}else{return this._measures}},$type:new $.ig.Type("CellMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("CubeMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.a(new $.ig.ArrayListCollection$1($.ig.DimensionMetadata.prototype.$type))},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("CubeMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("MeasuresDimensionMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("MeasuresDimensionMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("DataMemberMetadata","Object",{init:function(a,b,c,d){$.ig.Object.prototype.init.call(this);this.a(a);this.g(b);this.e(c);this.f(d);this.d(new $.ig.List$1($.ig.RowMetadata.prototype.$type,0))},_e:0,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_g:null,g:function(value){if(arguments.length===1){this._g=value;return value}else{return this._g}},_f:0,f:function(value){if(arguments.length===1){this._f=value;return value}else{return this._f}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},c:function(){var $self=this;return $self.d().where$1($.ig.RowMetadata.prototype.$type,function(a){return a.a()==false}).toList$1($.ig.RowMetadata.prototype.$type)},h:function(a){this.d().add(a)},b:function(a){if(this.d().remove(a)){return true}return false},$type:new $.ig.Type("DataMemberMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("DataSourceMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("DataSourceMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("DimensionMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("DimensionMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("HierarchyMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("HierarchyMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("LevelMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this)},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("LevelMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("MeasureMetadata","Object",{init:function(){$.ig.Object.prototype.init.call(this);this.a($.ig.AggregatorType.prototype.sum)},_b:null,b:function(value){if(arguments.length===1){this._b=value;return value}else{return this._b}},_a:null,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},_d:null,d:function(value){if(arguments.length===1){this._d=value;return value}else{return this._d}},_f:null,f:function(value){if(arguments.length===1){this._f=value;return value}else{return this._f}},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_c:null,c:function(value){if(arguments.length===1){this._c=value;return value}else{return this._c}},$type:new $.ig.Type("MeasureMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("RowMetadata","Object",{b:null,c:0,init:function(a){$.ig.Object.prototype.init.call(this);this.b=new $.ig.Dictionary$2(String,$.ig.Number.prototype.$type,0);this.c=0;this.a(false);this.e(a)},g:function(a,b){if(this.b.containsKey(a)){return}this.b.item(a,b)},d:function(a){var $self=this;var b;(function(){var $ret=$self.b.tryGetValue(a,b);b=$ret.value;return $ret.ret})();return b},f:function(){this.c++;this.a(true)},h:function(){this.c--;this.a(this.c>0)},_e:null,e:function(value){if(arguments.length===1){this._e=value;return value}else{return this._e}},_a:false,a:function(value){if(arguments.length===1){this._a=value;return value}else{return this._a}},$type:new $.ig.Type("RowMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("TableMetadata","Object",{e:null,a:null,c:null,f:0,init:function(a){$.ig.Object.prototype.init.call(this);var b=0;var c=$.ig.util.cast($.ig.IList.prototype.$type,a);if(c!=null){b=c.count()}else{var e=a.getEnumerator();while(e.moveNext()){var d=e.current();b++}}this.c=new $.ig.List$1($.ig.RowMetadata.prototype.$type,0);this.a=new Array(b);var g=a.getEnumerator();while(g.moveNext()){var f=g.current();var h=new $.ig.RowMetadata(f);this.h(h);this.c.add(h)}this.e=new $.ig.List$1(String,0)},d:function(){return this.c},b:function(){return this.a},g:function(){return this.f},h:function(a){if(this.f==this.a.length){this.i()}this.a[this.f++]=a},j:function(a,b){if(this.f==this.a.length){this.i()}$.ig.Array.prototype.copy(this.a,a,this.a,a+1,this.f-a);this.a[a]=b;this.f++},k:function(a){var $self=this;$self.f--;$.ig.Array.prototype.copy($self.a,a+1,$self.a,a,$self.f-a);(function(){var $ret=$.ig.Array.prototype.resize$1($.ig.RowMetadata.prototype.$type,$self.a,$self.f);$self.a=$ret.array;return $ret.ret})()},i:function(){var a=new Array(this.f+1);$.ig.Array.prototype.copy(this.a,0,a,0,this.f);this.a=a},$type:new $.ig.Type("TableMetadata",$.ig.Object.prototype.$type)},true);$.ig.util.defType("FlatDataSourceImpl","OlapDataSource",{a3:null,dataProvider:function(){if(this.a3==null){this.a3=this.dataProviderFactory().createDataProvider()}return this.a3},init:function(a){this.a7=new $.ig.List$1($.ig.FlatDataAxisProvider.prototype.$type,0);$.ig.OlapDataSource.prototype.init.call(this,a);this.flatDataSourceOptions(a);this.dataProviderFactory(a.dataProviderFactory())},h:function(){return new $.ig.DefaultFlatDataProviderFactory(this.flatDataSourceOptions().itemsSource(),this.flatDataSourceOptions().dataSourceMetadata())},_flatDataSourceOptions:null,flatDataSourceOptions:function(value){if(arguments.length===1){this._flatDataSourceOptions=value;return value}else{return this._flatDataSourceOptions}},am:function(){var $self=this;var a=new $.ig.TaskCompletionSource$1($.ig.OlapMetadataTreeItem.prototype.$type,0);if($self.isInitialized()){a.e($self.metadataTree());return a.b()}$self.columnAxis().collectionChanged=$.ig.Delegate.prototype.combine($self.columnAxis().collectionChanged,$self.bb.runOn($self));$self.rowAxis().collectionChanged=$.ig.Delegate.prototype.combine($self.rowAxis().collectionChanged,$self.bf.runOn($self));$self.filters().collectionChanged=$.ig.Delegate.prototype.combine($self.filters().collectionChanged,$self.bc.runOn($self));$self.measures().collectionChanged=$.ig.Delegate.prototype.combine($self.measures().collectionChanged,$self.bd.runOn($self));return $self.aq(null).continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(b){return $self.an($self.cubes().first$1($.ig.Cube.prototype.$type).name())}).continueWithTask$1($.ig.OlapMetadataTreeItem.prototype.$type,function(b){return $self.ak()})},ah:function(){var $self=this;var a=$self.dataProvider();var b=new $.ig.List$1($.ig.Task.prototype.$type,0);b.add(a.discoverDimensionsAsync(null,null));b.add(a.discoverHierarchiesAsync(null,null));b.add(a.discoverLevelsAsync(null,null));b.add(a.discoverMeasuresAsync(null,null));b.add(a.discoverKpisAsync(null,null));var c=new Array(b.count());b.copyTo(c,0);var d=new $.ig.CubeMetaItemsCache;$self.c(d);var e=new $.ig.TaskFactory;return e.c(c,function(f){var g=f[0];var h=f[1];var i=f[2];var j=f[3];var k=f[4];d.s(j.m());d.n(g.m());d.o(h.m());d.r(i.m());d.p(k.m())})},bh:function(a,b){var c=0;var d=this.measureListIndex();if(a){var e=this.a2(c);if(e!=null&&this.measureListLocation()==$.ig.MeasureListLocation.prototype.columns){if(d>-1){var f=e.e().rootPositionInfo();if(f!=null){this.be(f,d-1)}}}c++}if(b){var g=this.a2(c);if(g!=null&&this.measureListLocation()==$.ig.MeasureListLocation.prototype.rows){if(d>-1){var h=g.e().rootPositionInfo();if(h!=null){this.be(h,d-1)}}}}},be:function(a,b){if(a.positionItemIndex()==b){a.clear()}else{var d=a.values().getEnumerator();while(d.moveNext()){var c=d.current();this.be(c,b)}}},ai:function(){var $self=this;var a=$self.a8();if(!String.isNullOrEmpty(a)){var b=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);b.d(new $.ig.InvalidOperationException(1,a));return b.b()}var c=$self.columnAxis().count()>0;var d=$self.rowAxis().count()>0;if(!d&&!c&&$self.measures().count()==0){var e=function(){var $ret=new $.ig.OlapResult;$ret.isEmpty(true);return $ret}();var f=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);f.e(e);$self.l(new $.ig.OlapResultView(e,e,false,false));$self.result(e);$self.clearPendingChanges();return f.b()}var g=$self.m();var h=$self.s();var i=$self.r()||$self.p();var j=$self.n();var k=$self.ae().count()>0;var l=$self.ad().count()>0;var m=$self.af.count()>0;if(!g&&!h&&!i&&!j&&!k&&!l&&!m){var n=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);n.e($self.result());return n.b()}if($self.r()){$self.bh(c,d)}var o=null;var p=null;var q=0;var r="Axis0";var s=$self.m();if($self.r()&&c&&$self.measureListIndex()>-1&&$self.measureListLocation()==$.ig.MeasureListLocation.prototype.columns){s=true}o=$self.a1($self.columnAxis(),s,q);$self.m(false);if(o!=null){q++;r="Axis1"}var t=$self.s();if($self.r()&&d&&$self.measureListIndex()>-1&&$self.measureListLocation()==$.ig.MeasureListLocation.prototype.rows){t=true}p=$self.a1($self.rowAxis(),t,q);$self.s(false);if(p!=null){if(p.axis()!=null){p.axis().name(r)}q++}$self.r(false);$self.n(false);var u=new $.ig.List$1($.ig.AxisElement.prototype.$type,0);var w=$self.u().getEnumerator();while(w.moveNext()){var v=w.current();u.add(v)}var y=$self.w().getEnumerator();while(y.moveNext()){var x=y.current();u.add(x)}var aa=$self.v().getEnumerator();while(aa.moveNext()){var z=aa.current();u.add(z)}var ab=$self.a9(u,c,d,k,l,o,p);return ab},a9:function(a,b,c,d,e,f,g){var $self=this;if($self.af.count()>0){$self.dataProvider().am(a);var i=$self.a7.getEnumerator();while(i.moveNext()){var h=i.current();h.o()}$self.af.clear()}$self.a6(b,c);$self.ba(b,c,true);if(d||e){var j=null;if(b){var k=$self.ae();var l=k.where$1($.ig.PositionInfo.prototype.$type,function(m){return m.c()=="Axis0"}).toList$1($.ig.PositionInfo.prototype.$type);if(l.count()>0){var m=l.item(0);k.remove(m);var n=$self.result().axes().item(0).tuples().__inner[m.b()];var o=n.members().item(m.a());var p=new $.ig.FlatDataPartialAxisProvider($self.dataProvider(),$self.columnAxis(),o,$self.c());var q=p.generateAxis("Axis0");j=q.continueWithTask$1($.ig.OlapResult.prototype.$type,function(r){var s=$self.dataProvider().ak(p,g,$self.measures());return s});j=j.continueWithTask$2($.ig.OlapResult.prototype.$type,$.ig.OlapResult.prototype.$type,function(r){if($self.d("Axis0",r.m()).tuples().count()==0){o.displayInfo(0)}var s=$self.l();$self.l($self.l().extend(r.m(),"Axis0"));$self.result($self.l().visibleResult());$.ig.ResultViewHelper.prototype.f("Axis0",s,$self.l());$.ig.ResultViewHelper.prototype.e(m.c(),m.b(),m.a(),true,$self.l());f.m(p);f.axis($self.d("Axis0",$self.result()));var t=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);t.e($self.l().visibleResult());$.ig.ResultViewHelper.prototype.c(m.b(),m.a(),true,f.e());return t.b()})}}if(c){var r=b?"Axis1":"Axis0";var s=$self.ae();var t=s.where$1($.ig.PositionInfo.prototype.$type,function(u){return u.c()==r}).toList$1($.ig.PositionInfo.prototype.$type);if(d&&t.count()>0){var u=t.item(0);s.remove(u);var v=$self.result().axes().where$1($.ig.OlapResultAxis.prototype.$type,function(w){return w.name()==r}).first$1($.ig.OlapResultAxis.prototype.$type).tuples().__inner[u.b()];var w=v.members().item(u.a());var x;var y=new $.ig.FlatDataPartialAxisProvider($self.dataProvider(),$self.rowAxis(),w,$self.c());if(j!=null){x=j.continueWithTask$1($.ig.OlapResultAxis.prototype.$type,function(z){return y.generateAxis(r)})}else{x=y.generateAxis(r)}j=x.continueWithTask$1($.ig.OlapResult.prototype.$type,function(z){var aa=$self.dataProvider().ak(f,y,$self.measures());return aa});j=j.continueWithTask$2($.ig.OlapResult.prototype.$type,$.ig.OlapResult.prototype.$type,function(z){if($self.l()==null){$self.l(new $.ig.OlapResultView($self.result(),$self.result(),b,c))}var aa=$self.l().hasColumns()?"Axis1":"Axis0";if($self.d(aa,z.m()).tuples().count()==0){w.displayInfo(0)}var ab=$self.l();$self.l($self.l().extend(z.m(),aa));$self.result($self.l().visibleResult());$.ig.ResultViewHelper.prototype.f(aa,ab,$self.l());$.ig.ResultViewHelper.prototype.e(u.c(),u.b(),u.a(),true,$self.l());var ac=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);ac.e($self.l().visibleResult());g.m(y);g.axis($self.d(aa,$self.result()));$.ig.ResultViewHelper.prototype.c(u.b(),u.a(),true,g.e());return ac.b()})}}if(j!=null){return j}var z=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);z.e($self.result());return z.b()}else{var aa=new $.ig.TaskCompletionSource$1($.ig.OlapResult.prototype.$type,0);if(f==null&&g==null&&$self.measures().count()==0){var ab=function(){var $ret=new $.ig.OlapResult;$ret.isEmpty(true);return $ret}();$self.result(ab);aa.e($self.result());return aa.b()}var ac=$self.dataProvider().ak(f,g,$self.measures());return ac.continueWithTask$2($.ig.OlapResult.prototype.$type,$.ig.OlapResult.prototype.$type,function(ad){$self.l(new $.ig.OlapResultView(ad.m(),ad.m(),b,c));$self.result($self.l().visibleResult());$self.clearPendingChanges();aa.e($self.result());return aa.b()})}},a8:function(){var $self=this;var a=new $.ig.Dictionary$2(String,String,0);for(var b=0;b<$self.columnAxis().count();b++){var c=$self.columnAxis().item(b);if($.ig.util.cast($.ig.MeasureList.prototype.$type,c)!==null){continue}if(!a.containsKey(c.uniqueName())){a.add(c.uniqueName(),"columns")}else{return"the "+c.uniqueName()+" hierarchy is used twice in columns"}}for(var d=0;d<$self.rowAxis().count();d++){var e=$self.rowAxis().item(d);if($.ig.util.cast($.ig.MeasureList.prototype.$type,e)!==null){continue}if(!a.containsKey(e.uniqueName())){a.add(e.uniqueName(),"rows")}else{return"the "+e.uniqueName()+" hierarchy is used in rows and in columns"}}for(var f=0;f<$self.filters().count();f++){var g=$self.filters().item(f);var h;if(!function(){var $ret=a.tryGetValue(g.uniqueName(),h);h=$ret.value;return $ret.ret}()){a.add(g.uniqueName(),"filters")}else{return"the "+g.uniqueName()+" hierarchy is used in filters and in "+h}}for(var i=0;i<$self.measures().count();i++){var j=$self.measures().item(i);var k;if(!function(){var $ret=a.tryGetValue(j.uniqueName(),k);k=$ret.value;return $ret.ret}()){a.add(j.uniqueName(),"measures")}else{if(k=="measures"){return"the "+j.uniqueName()+" measure is used twice in measures"}return"the "+j.uniqueName()+" measure is used in measures and in "+k}}return null},a6:function(a,b){var $self=this;
var c=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.PositionInfo.prototype.$type),0);var d=$self.l();var e=$self.ae();for(var f=0;f<e.count();f++){var g=e.item(f);var h;if(!function(){var $ret=c.tryGetValue(g.c(),h);h=$ret.value;return $ret.ret}()){h=new $.ig.List$1($.ig.PositionInfo.prototype.$type,0);c.add(g.c(),h)}if($self.l()==null){$self.l(new $.ig.OlapResultView($self.result(),$self.result(),a,b))}var i=$self.l().expandTupleMember(g.c(),g.b(),g.a());if(i!=null){h.add(g);$self.l(i);$self.result($self.l().visibleResult())}}var k=c.getEnumerator();while(k.moveNext()){var j=k.current();var m=j.value().getEnumerator();while(m.moveNext()){var l=m.current();e.remove(l)}}var n=0;var o="Axis0";if(a){var p=c.keys().where$1(String,function(q){return q==o}).firstOrDefault$1(String)!=null;var q=$self.a2(n);if(q!=null&&p){var r=c.item(o);if(r.count()>0){$.ig.ResultViewHelper.prototype.f(o,d,$self.l());var t=r.getEnumerator();while(t.moveNext()){var s=t.current();$.ig.ResultViewHelper.prototype.e(o,s.b(),s.a(),true,$self.l());$.ig.ResultViewHelper.prototype.c(s.b(),s.a(),true,q.e())}var u=$self.d(o,$self.result());q.axis(u);$.ig.ResultViewHelper.prototype.b(u.positionResolver(),q.e())}}n++;o="Axis1"}if(b){var v=c.keys().where$1(String,function(w){return w==o}).firstOrDefault$1(String)!=null;var w=$self.a2(n);if(w!=null&&v){var x=c.item(o);if(x.count()>0){$.ig.ResultViewHelper.prototype.f(o,d,$self.l());var z=x.getEnumerator();while(z.moveNext()){var y=z.current();$.ig.ResultViewHelper.prototype.e(o,y.b(),y.a(),true,$self.l());$.ig.ResultViewHelper.prototype.c(y.b(),y.a(),true,w.e())}var aa=$self.d(o,$self.result());w.axis(aa);$.ig.ResultViewHelper.prototype.b(aa.positionResolver(),w.e())}}}return e.count()>0},ba:function(a,b,c){var $self=this;if($self.result()!=null){var d=$self.ad();var e=new $.ig.Dictionary$2(String,$.ig.IList$1.prototype.$type.specialize($.ig.PositionInfo.prototype.$type),0);var f=$self.l();for(var g=0;g<d.count();g++){var h=d.item(g);var i;if(!function(){var $ret=e.tryGetValue(h.c(),i);i=$ret.value;return $ret.ret}()){i=new $.ig.List$1($.ig.PositionInfo.prototype.$type,0);e.add(h.c(),i)}i.add(h);if(c){if($self.l()==null){$self.l(new $.ig.OlapResultView($self.result(),$self.result(),a,b))}else{$self.l($self.l().collapseTupleMember(h.c(),h.b(),h.a()));$self.result($self.l().visibleResult())}}}var j=0;var k="Axis0";if(a){var l=e.keys().where$1(String,function(m){return m==k}).firstOrDefault$1(String)!=null;var m=$self.a2(j);if(m!=null&&l){var n=e.item(k);if(n.count()>0){$.ig.ResultViewHelper.prototype.f(k,f,$self.l());var p=n.getEnumerator();while(p.moveNext()){var o=p.current();$.ig.ResultViewHelper.prototype.c(o.b(),o.a(),false,m.e())}var q=$self.d(k,$self.result());m.axis(q)}}j++;k="Axis1"}if(b){var r=e.keys().where$1(String,function(s){return s==k}).firstOrDefault$1(String)!=null;var s=$self.a2(j);if(s!=null&&r){var t=e.item(k);if(t.count()>0){$.ig.ResultViewHelper.prototype.f(k,f,$self.l());var v=t.getEnumerator();while(v.moveNext()){var u=v.current();$.ig.ResultViewHelper.prototype.c(u.b(),u.a(),false,s.e())}var w=$self.d(k,$self.result());s.axis(w)}}}d.clear()}},a1:function(a,b,c){var d=null;if(a.count()>0){d=this.a2(c);if(b){if(d!=null){d.n(a)}else{d=new $.ig.FlatDataAxisProvider(this.dataProvider(),a,this.c());this.bg(c,d)}}}return d},bg:function(a,b){this.a7.item(a,b)},a2:function(a){if(a<this.a7.count()){return this.a7.item(a)}return null},getMembersOfLevel:function(a){var $self=this;var b=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);b.add(function(){var $ret=new $.ig.KeyValueItem;$ret.a("LEVEL_UNIQUE_NAME");$ret.b(a);return $ret}());var c=$self.dataProvider().discoverMembersAsync(null,b);c.i(function(d){var f=d.m().getEnumerator();while(f.moveNext()){var e=f.current();$self.c().u(e)}});return c},getMembersOfHierarchy:function(a){var $self=this;var b=new $.ig.CoreOlapElementParser(a);var c=b.b();if(c.count()<2){throw new $.ig.ArgumentException(1,"Specified value: "+a+" is not valid.",a)}var d=new $.ig.KeyValueItem;d.a("HIERARCHY_UNIQUE_NAME");d.b(c.item(0)+"."+c.item(1));var e=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);e.add(d);var f=$self.dataProvider().discoverMembersAsync(null,e);f.i(function(g){var i=g.m().getEnumerator();while(i.moveNext()){var h=i.current();$self.c().u(h)}});return f},getMembersOfMember:function(a){var $self=this;var b=new $.ig.CoreOlapElementParser(a);var c=b.b();var d=new $.ig.KeyValueItem;if(c.count()<3){throw new $.ig.ArgumentException(1,"Specified value: "+a+" is not valid.",a)}switch(c.count()){case 1:d.a("DIMENSION_UNIQUE_NAME");d.b(c.item(0));break;case 2:d.a("HIERARCHY_UNIQUE_NAME");d.b(c.item(0)+"."+c.item(1));break;default:d.a("LEVEL_UNIQUE_NAME");d.b(c.item(0)+"."+c.item(1)+"."+c.item(2));break}var e=new $.ig.List$1($.ig.KeyValueItem.prototype.$type,0);e.add(d);e.add(function(){var $ret=new $.ig.KeyValueItem;$ret.a("MEMBER_UNIQUE_NAME");$ret.b(a);return $ret}());var f=$self.dataProvider().discoverMembersAsync(null,e);f.i(function(g){var i=g.m().getEnumerator();while(i.moveNext()){var h=i.current();$self.c().u(h)}});return f},bb:function(a,b){this.m(true);this.bi(0,this.columnAxis(),this.rowAxis());this.ay(b,this.u());this.a0(b,this.columnAxis());if(b.action()!=$.ig.NotifyCollectionChangedAction.prototype.reset&&this.columnAxis()!=null){var c=Math.max(b.newStartingIndex(),b.oldStartingIndex());this.bj("Axis0",c)}},bf:function(a,b){this.s(true);this.bi(1,this.rowAxis(),this.columnAxis());this.ay(b,this.w());this.a0(b,this.rowAxis());if(b.action()!=$.ig.NotifyCollectionChangedAction.prototype.reset&&this.rowAxis()!=null){var c=this.columnAxis()==null?"Axis0":"Axis1";var d=Math.max(b.newStartingIndex(),b.oldStartingIndex());this.bj(c,d)}},a7:null,bi:function(a,b,c){if(b.count()>0){if(c.count()>0){if(this.a7.count()<2){this.a7.insert(a,null)}}else{if(this.a7.count()==0){this.a7.insert(0,null)}}}else{if(this.a7.count()>0){if(this.a7.count()>1){this.a7.removeAt(a)}else{this.a7.removeAt(0)}}}},bj:function(a,b){var c=this.ae();var d=this.ad();for(var e=d.count()-1;e>=0;e--){var f=d.item(e);if(f.c()==a&&f.a()>=b){d.removeAt(e)}}for(var g=c.count()-1;g>=0;g--){var h=c.item(g);if(h.c()==a&&h.a()>=b){c.removeAt(g)}}},bc:function(a,b){this.n(true);this.ay(b,this.v())},bd:function(a,b){this.r(true);this.az()},$type:new $.ig.Type("FlatDataSourceImpl",$.ig.OlapDataSource.prototype.$type)},true);$.ig.util.defType("IFlatDataProviderFactory","Object",{$type:new $.ig.Type("IFlatDataProviderFactory",null,[$.ig.IOlapDataProviderFactory.prototype.$type])},true);$.ig.util.defType("DefaultFlatDataProviderFactory","Object",{b:null,a:null,init:function(a,b){$.ig.Object.prototype.init.call(this);this.b=a;this.a=b},createDataProvider:function(){return new $.ig.FlatDataProvider(this.b,this.a)},$type:new $.ig.Type("DefaultFlatDataProviderFactory",$.ig.Object.prototype.$type,[$.ig.IFlatDataProviderFactory.prototype.$type])},true);$.ig.util.defType("FlatDataSourceOptions","DataSourceBaseOptions",{init:function(){$.ig.DataSourceBaseOptions.prototype.init.call(this)},_itemsSource:null,itemsSource:function(value){if(arguments.length===1){this._itemsSource=value;return value}else{return this._itemsSource}},_dataSourceMetadata:null,dataSourceMetadata:function(value){if(arguments.length===1){this._dataSourceMetadata=value;return value}else{return this._dataSourceMetadata}},_dataProviderFactory:null,dataProviderFactory:function(value){if(arguments.length===1){this._dataProviderFactory=value;return value}else{return this._dataProviderFactory}},$type:new $.ig.Type("FlatDataSourceOptions",$.ig.DataSourceBaseOptions.prototype.$type)},true);$.ig.util.defType("OlapFlatDataSource","DataSourceBase",{a5:null,init:function(a){this.a5=null;$.ig.DataSourceBase.prototype.init.call(this);if(a==null){throw new $.ig.ArgumentNullException("options")}this.a5=a;this.a7(this.a5)},a3:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"metadata");if(b==null){throw new $.ig.InvalidOperationException(1,"metadata is null or undefined.")}var c=new $.ig.DataSourceMetadata;var d=this.a2(b);c.a(d);return c},a2:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"cube");if(b==null){throw new $.ig.InvalidOperationException(1,"metadata.cube is null or undefined.")}var c=new $.ig.CubeMetadata;c.e($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(b,"name"));if(String.isNullOrEmpty(c.e())){throw new $.ig.InvalidOperationException(1,"cube.name is null, empty or undefined")}c.c($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(b,"caption"));if(String.isNullOrEmpty(c.c())){c.c(c.e())}c.b(this.a4(b));c.d($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(b,"description"));c.a(this.ay(b));return c},a4:function(a){var $self=this;var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"measuresDimension");if(b==null){return null}var c=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(b,"caption");var d=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(b,"name");var e=function(){var $ret=new $.ig.MeasuresDimensionMetadata;$ret.b(c);$ret.c(d);return $ret}();e.a($self.a1(b));return e},ay:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"dimensions");if(b==null){return null}var c=new $.ig.ArrayListCollection$1($.ig.DimensionMetadata.prototype.$type);for(var d=0;d<b.length;d++){var e=new $.ig.DimensionMetadata;c.add(e);var f=b[d];e.e($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"name"));if(String.isNullOrEmpty(e.e())){throw new $.ig.InvalidOperationException(1,"dimension.name is null, empty or undefined")}e.b($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"caption"));if(String.isNullOrEmpty(e.b())){e.b(e.e())}e.c($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"defaultHierarchy"));e.a(this.az(f));e.d($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"description"))}return c},a1:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"measures");if(b==null){return null}var c=new $.ig.ArrayListCollection$1($.ig.MeasureMetadata.prototype.$type);for(var d=0;d<b.length;d++){var e=new $.ig.MeasureMetadata;c.add(e);var f=b[d];e.f($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"name"));if(String.isNullOrEmpty(e.f())){throw new $.ig.InvalidOperationException(1,"measure.name is null, empty or undefined")}e.e($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"caption"));if(String.isNullOrEmpty(e.e())){e.e(e.f())}e.d($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"displayFormat"));e.c($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"displayFolder"));e.b($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"aggregator"));if(e.b()==null){throw new $.ig.InvalidOperationException(1,"aggregator is null or undefined for measureMetadata: "+e.f())}}return c},az:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"hierarchies");if(b==null){return null}var c=new $.ig.ArrayListCollection$1($.ig.HierarchyMetadata.prototype.$type);for(var d=0;d<b.length;d++){var e=new $.ig.HierarchyMetadata;c.add(e);var f=b[d];e.e($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"name"));if(String.isNullOrEmpty(e.e())){throw new $.ig.InvalidOperationException(1,"hierarchy.hierarchyName is null, empty or undefined")}e.b($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"caption"));if(String.isNullOrEmpty(e.b())){e.b(e.e())}e.d($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"displayFolder"));e.a(this.a0(f));if(e.a()==null||e.a().count()==0){throw new $.ig.InvalidOperationException(1,"levelKeys is null, empty or undefined for hierarchyMetadata: "+e.e())}}return c},a0:function(a){var b=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty(a,"levels");if(b==null){return null}var c=new $.ig.ArrayListCollection$1($.ig.LevelMetadata.prototype.$type);for(var d=0;d<b.length;d++){var e=new $.ig.LevelMetadata;c.add(e);var f=b[d];e.c($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"name"));if(String.isNullOrEmpty(e.c())){throw new $.ig.InvalidOperationException(1,"level.name is null, empty or undefined")}e.b($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"caption"));if(String.isNullOrEmpty(e.b())){e.b(e.c())}e.a($.ig.jQueryUtils.prototype.getJavascriptObjectProperty(f,"memberProvider"));if(e.a()==null){throw new $.ig.InvalidOperationException(1,"levelMetadata.memberProvider is null or undefined")}}return c},a7:function(a){var options_=a;var schema_=this.a6(a);var dataSource=options_.dataSource;if(!options_.dataSource&&options_.dataSourceUrl){options_.dataSource=options_.dataSourceUrl}var dataOptions={callback:this.dataSourceDataResolved,callee:this,dataSource:options_.dataSource,defaultChildrenDataProperty:options_.bindings.childDataProperty,responseDataType:options_.responseDataType,localSchemaTransform:options_.dataSourceType&&options_.dataSourceType==="xml"?true:false,schema:schema_};if(options_.dataSourceType){dataOptions.type=options_.dataSourceType}if(options_.responseDataKey){dataOptions.responseDataKey=options_.responseDataKey}if(!(options_.dataSource instanceof $.ig.DataSource)){options_.dataSource=new $.ig.DataSource(dataOptions)}options_.dataSource.dataBind(this.dataSourceDataResolved,this)},dataSourceDataResolved:function(){var $self=this;var a=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty($self.a5,"dataSource");if(a==null){throw new $.ig.InvalidOperationException(1,"dataSource is null or undefined")}var b=$self.a3($self.a5);var c=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty($self.a5,"measures");var d=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty($self.a5,"filters");var e=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty($self.a5,"columns");var f=$.ig.jQueryUtils.prototype.getJavascriptObjectProperty($self.a5,"rows");var g=$.ig.jQueryUtils.prototype.getJavascriptObjectMethodResult(a,"data");var h=function(){var $ret=new $.ig.FlatDataSourceOptions;$ret.measures(c);$ret.filters(d);$ret.columns(e);$ret.rows(f);$ret.itemsSource(g);$ret.dataSourceMetadata(b);return $ret}();$self.dataSource(new $.ig.FlatDataSourceImpl(h))},a6:function(a){var options_=a;var schema_=null;var schema={},opt=options_,bindings=options_.bindings;if(bindings==null){opt.bindings={};schema.text={name:"Text",type:"string"};opt.bindings.textKey="Text";schema.value={name:"Value",type:"string"};opt.bindings.valueKey="Value";schema.imageUrl={name:"ImageUrl",type:"string"};opt.bindings.imageUrlKey="ImageUrl";schema.navigateUrl={name:"NavigateUrl",type:"string"};opt.bindings.navigateUrlKey="NavigateUrl";schema.childData={name:"Nodes",type:"object"};opt.bindings.childDataProperty="Nodes";schema.target={name:"Target",type:"string"};opt.bindings.targetKey="Target";bindings=opt.bindings}else if(opt.dataSourceType==="xml"){if(bindings.searchFieldXPath){schema.searchField=bindings.searchFieldXPath}}schema.fields=[];if(bindings.textKey){schema.fields.push({name:bindings.textKey,type:"string",xpath:bindings.textXPath});schema.textKey=bindings.textKey}if(bindings.valueKey){schema.fields.push({name:bindings.valueKey,type:"string",xpath:bindings.valueXPath});schema.valueKey=bindings.valueKey}if(bindings.navigateUrlKey){schema.fields.push({name:bindings.navigateUrlKey,type:"string",xpath:bindings.navigateUrlXPath});schema.navigateUrlKey=bindings.navigateUrlKey}if(bindings.imageUrlKey){schema.fields.push({name:bindings.imageUrlKey,type:"string",xpath:bindings.imageUrlXPath});schema.imageUrlKey=bindings.imageUrlKey}if(bindings.targetKey){schema.fields.push({name:bindings.targetKey,type:"string"});schema.targetKey=bindings.targetKey}if(bindings.expandedKey){schema.fields.push({name:"Expanded",type:"boolean"});schema.expandedKey=bindings.expandedKey}if(bindings.primaryKey){schema.fields.push({name:bindings.primaryKey,type:"string"});schema.primaryKey=bindings.primaryKey}if(bindings.childDataProperty){schema.fields.push({name:bindings.childDataProperty,type:"object",xpath:bindings.childDataXPath});schema.childDataProperty=bindings.childDataProperty}if(!schema.searchField&&opt.responseDataKey){schema.searchField=opt.responseDataKey}schema_=schema;return schema_},$type:new $.ig.Type("OlapFlatDataSource",$.ig.DataSourceBase.prototype.$type)},true);$.ig.FlatDataProvider.prototype.ai="(All)";$.ig.util.extCopy($.ig.TaskExtensions,[[[$.ig.Task,$.ig.Task$1],["continueWithTask$1","continueWithTask$2"]]]);$.ig.util.extCopy($.ig.Queryable,[[[$.ig.SortedList$1,$.ig.IGrouping$2],["asQueryable"]]]);$.ig.util.extCopy($.ig.Enumerable,[[[$.ig.SortedList$1,$.ig.IGrouping$2],["where$1","where$11","select$2","selectMany$2","last$1","first$1","firstOrDefault$1","orderBy$2","orderByDescending$2","toList$1","concat$1","max","max$1","min","min$1","count$1","reverse$1","take$1","skip$1","any$1","contains$1","union$1","toArray$1","elementAt$1","sum","sum$1"]],[[$.ig.SortedList$1,$.ig.IGrouping$2],["ofType$1","cast$1"]]])})(jQuery);(function($){$(document).ready(function(){var wm=$("#__ig_wm__").length>0?$("#__ig_wm__"):$('<div id="__ig_wm__"></div>').appendTo(document.body);wm.css({position:"fixed",bottom:0,right:0,zIndex:1e3}).addClass("ui-igtrialwatermark")})})(jQuery);