// tableau_v8.js (function(){var ss={version:'0.7.4.0',isUndefined:function(o){return(o===undefined);},isNull:function(o){return(o===null);},isNullOrUndefined:function(o){return(o===null)||(o===undefined);},isValue:function(o){return(o!==null)&&(o!==undefined);}};var Type=Function;var originalRegistrationFunctions={registerNamespace:{isPrototype:false,func:Type.registerNamespace},registerInterface:{isPrototype:true,func:Type.prototype.registerInterface},registerClass:{isPrototype:true,func:Type.prototype.registerClass},registerEnum:{isPrototype:true,func:Type.prototype.registerEnum}};var tab={};var tabBootstrap={};Type.registerNamespace=function(name){if(name==="tableauSoftware"){window.tableauSoftware=window.tableauSoftware||{};}};Type.prototype.registerInterface=function(name){};Type.prototype.registerEnum=function(name,flags){for(var field in this.prototype){this[field]=this.prototype[field];}};Type.prototype.registerClass=function(name,baseType,interfaceType){var that=this;this.prototype.constructor=this;this.__baseType=baseType||Object;if(baseType){this.__basePrototypePending=true;this.__setupBase=function(){Type$setupBase(that);};this.initializeBase=function(instance,args){Type$initializeBase(that,instance,args);};this.callBaseMethod=function(instance,name,args){Type$callBaseMethod(that,instance,name,args);};}};function Type$setupBase(that){if(that.__basePrototypePending){var baseType=that.__baseType;if(baseType.__basePrototypePending){baseType.__setupBase();} for(var memberName in baseType.prototype){var memberValue=baseType.prototype[memberName];if(!that.prototype[memberName]){that.prototype[memberName]=memberValue;}} delete that.__basePrototypePending;delete that.__setupBase;}} function Type$initializeBase(that,instance,args){if(that.__basePrototypePending){that.__setupBase();} if(!args){that.__baseType.apply(instance);} else{that.__baseType.apply(instance,args);}} function Type$callBaseMethod(that,instance,name,args){var baseMethod=that.__baseType.prototype[name];if(!args){return baseMethod.apply(instance);} else{return baseMethod.apply(instance,args);}}function restoreTypeSystem(){for(var regFuncName in originalRegistrationFunctions){if(!originalRegistrationFunctions.hasOwnProperty(regFuncName)){continue;} var original=originalRegistrationFunctions[regFuncName];var typeOrPrototype=original.isPrototype?Type.prototype:Type;if(original.func){typeOrPrototype[regFuncName]=original.func;} else{delete typeOrPrototype[regFuncName];}}} ss.Delegate=function Delegate$(){};ss.Delegate.registerClass('Delegate');ss.Delegate.empty=function(){};ss.Delegate._contains=function Delegate$_contains(targets,object,method){for(var i=0;i','g'),'>');$0=$0.replace(new RegExp('"','g'),'"');$0=$0.replace(new RegExp("'",'g'),''');$0=$0.replace(new RegExp('/','g'),'/');return $0;} tab.WindowHelper=function(window){this.$4=window;} tab.WindowHelper.close=function(window){window.close();} tab.WindowHelper.getOpener=function(window){return window.opener;} tab.WindowHelper.getLocation=function(window){return window.location;} tab.WindowHelper.setLocationHref=function(window,href){window.location.href=href;} tab.WindowHelper.locationReplace=function(window,url){window.location.replace(url);} tab.WindowHelper.reload=function(w,foreGet){w.location.reload(foreGet);} tab.WindowHelper.requestAnimationFrame=function(action){return tab.WindowHelper.$5(action);} tab.WindowHelper.cancelAnimationFrame=function(animationId){tab.WindowHelper.$6(animationId);} tab.WindowHelper.$7=function(){var $0=0;tab.WindowHelper.$5=function($p1_0){var $1_0=new Date().getTime();var $1_1=Math.max(0,16-($1_0-$0));$0=$1_0+$1_1;var $1_2=window.setTimeout(function(){$p1_0();},$1_1);return $1_2;};} tab.WindowHelper.prototype={$4:null,get_pageXOffset:function(){return tab.WindowHelper.$2(this.$4);},get_pageYOffset:function(){return tab.WindowHelper.$3(this.$4);},get_innerWidth:function(){return tab.WindowHelper.$0(this.$4);},get_innerHeight:function(){return tab.WindowHelper.$1(this.$4);}} tab.EscapingUtil.registerClass('tab.EscapingUtil');tab.WindowHelper.registerClass('tab.WindowHelper');tab.WindowHelper.$0=null;tab.WindowHelper.$1=null;tab.WindowHelper.$2=null;tab.WindowHelper.$3=null;tab.WindowHelper.$5=null;tab.WindowHelper.$6=null;(function(){if(('innerWidth'in window)){tab.WindowHelper.$0=function($p1_0){return $p1_0.innerWidth;};}else{tab.WindowHelper.$0=function($p1_0){return $p1_0.document.documentElement.offsetWidth;};}if(('innerHeight'in window)){tab.WindowHelper.$1=function($p1_0){return $p1_0.innerHeight;};}else{tab.WindowHelper.$1=function($p1_0){return $p1_0.document.documentElement.offsetHeight;};}if(ss.isValue(window.self.pageXOffset)){tab.WindowHelper.$2=function($p1_0){return $p1_0.pageXOffset;};}else{tab.WindowHelper.$2=function($p1_0){return $p1_0.document.documentElement.scrollLeft;};}if(ss.isValue(window.self.pageYOffset)){tab.WindowHelper.$3=function($p1_0){return $p1_0.pageYOffset;};}else{tab.WindowHelper.$3=function($p1_0){return $p1_0.document.documentElement.scrollTop;};}var $0=['ms','moz','webkit','o'];var $1=null;var $2=null;for(var $3=0;$3<$0.length&&$1==null;++$3){var $4=$0[$3];var $5=$4+'RequestAnimationFrame';if(($5 in window)){$1=$5;}$5=$4+'CancelAnimationFrame';if(($5 in window)){$2=$5;}$5=$4+'CancelRequestAnimationFrame';if(($5 in window)){$2=$5;}}if($1!=null){tab.WindowHelper.$5=function($p1_0){return window[$1]($p1_0);};}else{tab.WindowHelper.$7();}if($2!=null){tab.WindowHelper.$6=function($p1_0){window[$2]($p1_0);};}else{tab.WindowHelper.$6=function($p1_0){window.clearTimeout($p1_0);};}})(); Type.registerNamespace('tab');tab.$create__SheetInfoImpl=function(name,sheetType,index,size,workbook,url,isActive,isHidden){var $o={};$o.$0=name;$o.$5=sheetType;$o.$1=index;$o.$6=size;$o.$2=workbook;$o.$3=url;$o.$7=isActive;$o.$4=isHidden;return $o;} tab.$create_JavaScriptApi$1=function(name,objectType,position,size){var $o={};$o.$1=name;$o.$0=objectType;$o.$2=position;$o.$3=size;return $o;} tab._ApiCommand=function(name,sourceId,handlerId,parameters){this.$1=name;this.$3=sourceId;this.$2=handlerId;this.$4=parameters;} tab._ApiCommand.$B=function($p0){var $0;var $1=$p0.indexOf(',');if($1<0){$0=$p0;return new tab._ApiCommand($0,null,null,null);}$0=$p0.substr(0,$1);var $2;var $3=$p0.substr($1+1);$1=$3.indexOf(',');if($1<0){$2=$3;return new tab._ApiCommand($0,$2,null,null);}$2=$3.substr(0,$1);var $4;var $5=$3.substr($1+1);$1=$5.indexOf(',');if($1<0){$4=$5;return new tab._ApiCommand($0,$2,$4,null);}$4=$5.substr(0,$1);var $6=$5.substr($1+1);return new tab._ApiCommand($0,$2,$4,$6);} tab._ApiCommand.prototype={$1:null,$2:null,$3:null,$4:null,get_$5:function(){return this.$1;},get_$6:function(){return this.$2;},get_$7:function(){return this.$3;},get_$8:function(){return this.$4;},get_$9:function(){return !this.get_$A().indexOf('api.',0);},get_$A:function(){return this.$1;},$C:function(){var $0=[];$0.push(this.$1);$0.push(this.$3);$0.push(this.$2);if(ss.isValue(this.$4)){$0.push(this.$4);}return $0.join(',');}} tab._apiServerResultParser=function(serverResult){var $0=JSON.parse(serverResult);this.$0=$0['api.commandResult'];this.$1=$0['api.commandData'];} tab._apiServerResultParser.prototype={$0:null,$1:null,get__result:function(){return this.$0;},get__data:function(){return this.$1;}} tab.JavaScriptApi$3=function(serverResult){var $0=JSON.parse(serverResult);this.$0=$0['api.workbookName'];this.$1=$0['api.worksheetName'];this.$2=$0['api.commandData'];} tab.JavaScriptApi$3.prototype={$0:null,$1:null,$2:null,get_$3:function(){return this.$0;},get_$4:function(){return this.$1;},get_$5:function(){return this.$2;}} tab._CommandReturnHandler=function(commandName,successCallbackTiming,successCallback,errorCallback){this.$0=commandName;this.$2=successCallback;this.$1=successCallbackTiming;this.$3=errorCallback;} tab._CommandReturnHandler.prototype={$0:null,$1:0,$2:null,$3:null,get__commandName:function(){return this.$0;},get__successCallback:function(){return this.$2;},get__successCallbackTiming:function(){return this.$1;},get__errorCallback:function(){return this.$3;}} tab._CrossDomainMessageRouter=function(){} tab._CrossDomainMessageRouter.$6=function(){if(tab._Utility.$10()){window.addEventListener('message', tab._CrossDomainMessageRouter.$B(), false);}else if(tab._Utility.$F()){document.attachEvent('onmessage', tab._CrossDomainMessageRouter.$B());window.attachEvent('onmessage', tab._CrossDomainMessageRouter.$B());}else{window.onmessage = tab._CrossDomainMessageRouter.$B();}tab._CrossDomainMessageRouter.$0=tab._CrossDomainMessageRouter.$1=0;} tab._CrossDomainMessageRouter.$7=function($p0){var $0='handler'+tab._CrossDomainMessageRouter.$0;if(ss.isValue($p0.get_handlerId())||ss.isValue(tab._CrossDomainMessageRouter.$2[$p0.get_handlerId()])){throw tab.JavaScriptApi$4._createInternalError("Handler '"+$p0.get_handlerId()+"' is already registered.");}tab._CrossDomainMessageRouter.$0++;$p0.set_handlerId($0);tab._CrossDomainMessageRouter.$2[$0]=$p0;$p0.add_customViewsListLoad(tab._CrossDomainMessageRouter.$9);$p0.add_stateReadyForQuery(tab._CrossDomainMessageRouter.$A);} tab._CrossDomainMessageRouter.$8=function($p0){if(ss.isValue($p0.get_handlerId())||ss.isValue(tab._CrossDomainMessageRouter.$2[$p0.get_handlerId()])){delete tab._CrossDomainMessageRouter.$2[$p0.get_handlerId()];$p0.remove_customViewsListLoad(tab._CrossDomainMessageRouter.$9);$p0.remove_stateReadyForQuery(tab._CrossDomainMessageRouter.$A);}} tab._CrossDomainMessageRouter._sendCommand=function($p0,$p1,$p2){var $0=$p0.get_iframe();var $1=$p0.get_handlerId();if(!tab._Utility.$E()||ss.isNullOrUndefined($0)||ss.isNullOrUndefined($0.contentWindow)){return;}var $2='cmd'+tab._CrossDomainMessageRouter.$1;tab._CrossDomainMessageRouter.$1++;var $3=tab._CrossDomainMessageRouter.$3[$1];if(ss.isNullOrUndefined($3)){$3={};tab._CrossDomainMessageRouter.$3[$1]=$3;}$3[$2]=$p2;var $4=$p2.get__commandName();if($4==='api.ShowCustomViewCommand'){var $8=tab._CrossDomainMessageRouter.$4[$1];if(ss.isNullOrUndefined($8)){$8={};tab._CrossDomainMessageRouter.$4[$1]=$8;}$8[$2]=$p2;}var $5=null;if(ss.isValue($p1)){$5=tab.JsonUtil.toJson($p1,false,'');}var $6=new tab._ApiCommand($4,$2,$1,$5);var $7=$6.$C();$0.contentWindow.postMessage($7,$p0.get_serverRoot());} tab._CrossDomainMessageRouter.$9=function($p0){var $0=$p0.get_handlerId();var $1=tab._CrossDomainMessageRouter.$4[$0];if(ss.isNullOrUndefined($1)){return;}var $dict1=$1;for(var $key2 in $dict1){var $2={key:$key2,value:$dict1[$key2]};var $3=$2.value;if(ss.isValue($3.get__successCallback())){$3.get__successCallback()(null);}}delete tab._CrossDomainMessageRouter.$4[$0];} tab._CrossDomainMessageRouter.$A=function($p0){var $0=tab._CrossDomainMessageRouter.$5[$p0.get_handlerId()];if(tab._Utility.$1($0)){return;}while($0.length>0){var $1=$0.pop();if(ss.isValue($1)){$1();}}} tab._CrossDomainMessageRouter.$B=function(){return function($p1_0){ tab._CrossDomainMessageRouter.$C($p1_0);};} tab._CrossDomainMessageRouter.$C=function($p0){if(ss.isNullOrUndefined($p0.data)){return;}var $0=tab._ApiCommand.$B($p0.data);var $1=$0.get_$A();var $2=$0.get_$6();var $3=tab._CrossDomainMessageRouter.$2[$2];if(ss.isNullOrUndefined($3)||$3.get_handlerId()!==$0.get_$6()){$3=new tab.JavaScriptApi$0();}if($0.get_$9()){if($0.get_$7()==='xdomainSourceId'){$3.handleEventNotification($0.get_$5(),$0.get_$8());}else{tab._CrossDomainMessageRouter.$D($0);}}else{tab._CrossDomainMessageRouter.$E($1,$p0,$3);}} tab._CrossDomainMessageRouter.$D=function($p0){var $0=tab._CrossDomainMessageRouter.$3[$p0.get_$6()];var $1=(ss.isValue($0))?$0[$p0.get_$7()]:null;if(ss.isNullOrUndefined($1)){return;}delete $0[$p0.get_$7()];if($p0.get_$5()!==$1.get__commandName()){return;}var $2=new tab._apiServerResultParser($p0.get_$8());var $3=$2.get__data();if($2.get__result()==='api.success'){switch($1.get__successCallbackTiming()){case 0:if(ss.isValue($1.get__successCallback())){$1.get__successCallback()($3);}break;case 1:var $4=function(){ if(ss.isValue($1.get__successCallback())){$1.get__successCallback()($3);}};var $5=tab._CrossDomainMessageRouter.$5[$p0.get_$6()];if(ss.isNullOrUndefined($5)){$5=[];tab._CrossDomainMessageRouter.$5[$p0.get_$6()]=$5;}$5.push($4);break;default:throw tab.JavaScriptApi$4._createInternalError('Unknown timing value: '+$1.get__successCallbackTiming());}}else if(ss.isValue($1.get__errorCallback())){var $6=$2.get__result()==='api.remotefailed';$1.get__errorCallback()($6,$3);}} tab._CrossDomainMessageRouter.$E=function($p0,$p1,$p2){if($p0==='tableau.loadIndicatorsLoaded'){var $dict1=tab._CrossDomainMessageRouter.$2;for(var $key2 in $dict1){var $0={key:$key2,value:$dict1[$key2]};if(tab._Utility.$0(tab._CrossDomainMessageRouter.$2,$0.key)&&$0.value.get_iframe().contentWindow===$p1.source){$0.value.hideLoadIndicators();break;}}}else if($p0==='layoutInfoReq'){tab._CrossDomainMessageRouter.$F($p1.source);}else if($p0==='tableau.completed'||$p0==='completed'||$p0==='layoutInfoReq'){$p2.handleVizLoad();}} tab._CrossDomainMessageRouter.$F=function($p0){if(!tab._Utility.$E()){return;}var $0=new tab.WindowHelper(window.self);var $1=(ss.isValue($0.get_innerWidth()))?$0.get_innerWidth():document.documentElement.offsetWidth;var $2=(ss.isValue($0.get_innerHeight()))?$0.get_innerHeight():document.documentElement.offsetHeight;var $3=(ss.isValue($0.get_pageXOffset()))?$0.get_pageXOffset():document.documentElement.scrollLeft;var $4=(ss.isValue($0.get_pageYOffset()))?$0.get_pageYOffset():document.documentElement.scrollTop;var $5=[];$5.push('layoutInfoResp');$5.push($3);$5.push($4);$5.push($1);$5.push($2);$p0.postMessage($5.join(','),'*');} tab.JavaScriptApi$0=function(){} tab.JavaScriptApi$0.prototype={$0:null,add_customViewsListLoad:function($p0){this.$1=ss.Delegate.combine(this.$1,$p0);},remove_customViewsListLoad:function($p0){this.$1=ss.Delegate.remove(this.$1,$p0);},$1:null,add_stateReadyForQuery:function($p0){this.$2=ss.Delegate.combine(this.$2,$p0);},remove_stateReadyForQuery:function($p0){this.$2=ss.Delegate.remove(this.$2,$p0);},$2:null,get_iframe:function(){return null;},get_handlerId:function(){return this.$0;},set_handlerId:function($p0){this.$0=$p0;return $p0;},get_serverRoot:function(){return '*';},hideLoadIndicators:function(){},handleVizLoad:function(){},handleEventNotification:function($p0,$p1){},$3:function(){this.$1(null);this.$2(null);}} tab._Enums=function(){} tab._Enums.$0=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.PeriodType,true);} tab._Enums.$1=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.DateRangeType,true);} tab._Enums.$2=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.FilterUpdateType,true);} tab._Enums.$3=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.SelectionUpdateType,true);} tab._Enums.$4=function($p0){var $0=(ss.isValue($p0))?$p0.toString():'';return tab._Enums.$8($0,'',tableauSoftware.SelectionUpdateType,false)!=null;} tab._Enums.$5=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.NullOption,true);} tab._Enums.$6=function($p0,$p1){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,$p1,tableauSoftware.SheetSizeBehavior,true);} tab._Enums.$7=function($p0){var $0=(ss.isValue($p0))?$p0:'';return tab._Enums.$8($0,'',tableauSoftware.TableauEventName,false);} tab._Enums.$8=function($p0,$p1,$p2,$p3){if(ss.isValue($p0)){var $0=$p0.toString().toUpperCase();var $dict1=$p2;for(var $key2 in $dict1){var $1={key:$key2,value:$dict1[$key2]};var $2=$1.value.toString().toUpperCase();if($0===$2){return $1.value;}}}if($p3){throw tab.JavaScriptApi$4._createInvalidParameter($p1);}return null;} tab._ApiBootstrap=function(){} tab._ApiBootstrap.initialize=function(){tab._CrossDomainMessageRouter.$6();} tab._CustomViewImpl=function(workbookImpl,name){this.$2=workbookImpl;this.$3=name;this.$6=false;this.$7=false;this.$8=false;} tab._CustomViewImpl._getAsync=function($p0){var $0=new tab._Deferred();$0.resolve($p0.get__customViewImpl().get_$9());return $0.get_promise();} tab._CustomViewImpl._createNew=function($p0,$p1,$p2){var $0=new tab._CustomViewImpl($p0,$p1['name']);$0.$6=$p1['isPublic'];$0.$5=$p1['_sessionUrl'];var $1=$p1['owner'];$0.$4=$1['friendlyName'];$0.$7=false;if($p2!=null&&$p2===$p1['id']){$0.$7=true;}$0.$1=$p1;return $0;} tab._CustomViewImpl._removeAsync=function($p0,$p1){var $0=new tab._Deferred();var $1={};$1['api.customViewParam']=$p1.$1;var $2=tab._CustomViewImpl.$11('api.RemoveCustomViewCommand',$0,function($p1_0){ $p1.$8=true;var $1_0=$p1_0;tab._CustomViewImpl._processCustomViews($p0,$1_0);$0.resolve($p1.get_$9());});$p0._sendCommand($1,$2);return $0.get_promise();} tab._CustomViewImpl._saveNewAsync=function($p0,$p1){var $0=new tab._Deferred();var $1={};$1['api.customViewName']=$p1;var $2=tab._CustomViewImpl.$11('api.SaveNewCustomViewCommand',$0,function($p1_0){ tab._CustomViewImpl._processCustomViewUpdate($p0,$p1_0,true);var $1_0=null;if(ss.isValue($p0.get__updatedCustomViews())){$1_0=$p0.get__updatedCustomViews().get_item(0);}$0.resolve($1_0);});$p0._sendCommand($1,$2);return $0.get_promise();} tab._CustomViewImpl._showCustomViewAsync=function($p0,$p1){var $0=new tab._Deferred();var $1={};if(ss.isValue($p1)){$1['api.customViewParam']=$p1;}var $2=tab._CustomViewImpl.$11('api.ShowCustomViewCommand',$0,function($p1_0){ var $1_0=$p0.get__activeCustomView();$0.resolve($1_0);});$p0._sendCommand($1,$2);return $0.get_promise();} tab._CustomViewImpl._makeCurrentCustomViewDefaultAsync=function($p0){var $0=new tab._Deferred();var $1={};var $2=tab._CustomViewImpl.$11('api.MakeCurrentCustomViewDefaultCommand',$0,function($p1_0){ var $1_0=$p0.get__activeCustomView();$0.resolve($1_0);});$p0._sendCommand($1,$2);return $0.get_promise();} tab._CustomViewImpl._getCustomViewsAsync=function($p0){var $0=new tab._Deferred();var $1=new tab._CommandReturnHandler('api.FetchCustomViewsCommand',0,function($p1_0){ var $1_0=$p1_0;tab._CustomViewImpl._processCustomViews($p0,$1_0);$0.resolve($p0.get__customViews()._toApiCollection());},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._create('serverError',$p1_1));});$p0._sendCommand(null,$1);return $0.get_promise();} tab._CustomViewImpl._processCustomViews=function($p0,$p1){tab._CustomViewImpl._processCustomViewUpdate($p0,$p1,false);} tab._CustomViewImpl._processCustomViewUpdate=function($p0,$p1,$p2){if($p2){$p0.set__updatedCustomViews(new tab._Collection());}$p0.set__currentCustomView(null);var $0=null;if(ss.isValue($p1['currentView'])){var $2=$p1['currentView'];$0=$2['name'];}var $1=null;if(ss.isValue($p1['defaultId'])){$1=$p1['defaultId'];}if($p2&&ss.isValue($p1['newView'])){var $3=tab._CustomViewImpl._createNew($p0,$p1['newView'],$1);$p0.get__updatedCustomViews()._add($3.get_$C(),$3.get_$9());}$p0.set__removedCustomViews($p0.get__customViews());$p0.set__customViews(new tab._Collection());if(ss.isValue($p1['list'])){var $4=$p1['list'];if($4.length>0){for(var $5=0;$5<$4.length;$5++){var $6=tab._CustomViewImpl._createNew($p0,$4[$5],$1);$p0.get__customViews()._add($6.get_$C(),$6.get_$9());if($p0.get__removedCustomViews()._has($6.get_$C())){$p0.get__removedCustomViews()._remove($6.get_$C());}else if($p2){if(!$p0.get__updatedCustomViews()._has($6.get_$C())){$p0.get__updatedCustomViews()._add($6.get_$C(),$6.get_$9());}}if(ss.isValue($0)&&$6.get_$C()===$0){$p0.set__currentCustomView($6.get_$9());}}}}} tab._CustomViewImpl.$11=function($p0,$p1,$p2){var $0=function($p1_0,$p1_1){ $p1.reject(tab.JavaScriptApi$4._create('serverError',$p1_1));};return new tab._CommandReturnHandler($p0,0,$p2,$0);} tab._CustomViewImpl.prototype={$0:null,$1:null,$2:null,$3:null,$4:null,$5:null,$6:false,$7:false,$8:false,get_$9:function(){if(this.$0==null){this.$0=new tableauSoftware.CustomView(this);}return this.$0;},get_$A:function(){return this.$2.get__workbook();},get_$B:function(){return this.$5;},get_$C:function(){return this.$3;},set_$C:function($p0){if(this.$8){throw tab.JavaScriptApi$4._create('staleDataReference','Stale data');}this.$3=$p0;return $p0;},get_$D:function(){return this.$4;},get_$E:function(){return this.$6;},set_$E:function($p0){if(this.$8){throw tab.JavaScriptApi$4._create('staleDataReference','Stale data');}this.$6=$p0;return $p0;},get_$F:function(){return this.$7;},$10:function(){if(this.$8||ss.isNullOrUndefined(this.$1)){throw tab.JavaScriptApi$4._create('staleDataReference','Stale data');}this.$1['isPublic']=this.$6;this.$1['isDefault']=this.$7;this.$1['name']=this.$3;var $0=new tab._Deferred();var $1={};$1['api.customViewParam']=this.$1;var $2=tab._CustomViewImpl.$11('api.UpdateCustomViewCommand',$0,ss.Delegate.create(this,function($p1_0){ tab._CustomViewImpl._processCustomViewUpdate(this.$2,$p1_0,true);$0.resolve(this.get_$9());}));this.$2._sendCommand($1,$2);return $0.get_promise();},_showAsync:function(){if(this.$8||ss.isNullOrUndefined(this.$1)){throw tab.JavaScriptApi$4._create('staleDataReference','Stale data');}return tab._CustomViewImpl._showCustomViewAsync(this.$2,this.$1);},$12:function($p0){return (this.$4!==$p0.$4||this.$5!==$p0.$5||this.$6!==$p0.$6||this.$7!==$p0.$7);}} tab._DashboardImpl=function(sheetInfoImpl,workbookImpl){this.$18=new tab._Collection();this.$19=new tab._Collection();tab._DashboardImpl.initializeBase(this,[sheetInfoImpl,workbookImpl]);} tab._DashboardImpl.prototype={$17:null,get_$8:function(){return this.get_$1A();},get_$1A:function(){if(this.$17==null){this.$17=new tableauSoftware.Dashboard(this);}return this.$17;},get_$1B:function(){return this.$18;},get_$1C:function(){return this.$19;},$1D:function($p0,$p1,$p2){this.$19=new tab._Collection();this.$18=new tab._Collection();var $0={};for(var $1=0;$1<$p1.length;$1++){$0[$p1[$1]]=$1;}for(var $2=0;$2<$p0.length;$2++){var $3=$p0[$2];var $4=$3.$1;if(ss.isNullOrUndefined($4)){continue;}var $5=null;if($p0[$2].$0==='worksheet'){var $7=ss.isNullOrUndefined($0[$4]);var $8=this.$18.get__length();var $9=tab.$create_SheetSize('automatic',null,null);var $A='';if(!$7){$A=$p2[$0[$4]];}var $B=tab.$create__SheetInfoImpl($4,'worksheet',$8,$9,this.get_$C(),$A,false,$7);var $C=new tab._WorksheetImpl($B,this.get_$B(),this);$5=$C.get_$1A();this.$18._add($4,$C.get_$1A());}var $6=new tableauSoftware.DashboardObject($3,this.get_$1A(),$5);this.$19._add($2.toString(),$6);}}} tab.JavaScriptApi$2=function(name,isPrimary){this.$2=new tab._Collection();this.$1=name;this.$3=isPrimary;} tab.JavaScriptApi$2.$9=function($p0){if(!$p0.get_$10()&&ss.isNullOrUndefined($p0.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}var $0=new tab._Deferred();var $1={};$1['api.worksheetName']=$p0.get_$9();if(ss.isValue($p0.get_$1B())){$1['api.dashboardName']=$p0.get_$1B().get_$9();}var $2=new tab._CommandReturnHandler('api.GetDataSourcesCommand',0,function($p1_0){ var $1_0=$p1_0;var $1_1=tab.JavaScriptApi$2.$D($1_0);$p0.set__dataSources($1_1);$0.resolve($1_1._toApiCollection());},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});$p0.get_$B()._sendCommand($1,$2);return $0.get_promise();} tab.JavaScriptApi$2.$A=function($p0,$p1){if(!$p0.get_$10()&&ss.isNullOrUndefined($p0.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}var $0=new tab._Deferred();var $1={};$1['api.worksheetName']=$p0.get_$9();if(ss.isValue($p0.get_$1B())){$1['api.dashboardName']=$p0.get_$1B().get_$9();}var $2=new tab._CommandReturnHandler('api.GetDataSourcesCommand',0,function($p1_0){ var $1_0=$p1_0;var $1_1=tab.JavaScriptApi$2.$D($1_0);$p0.set__dataSources($1_1);for(var $1_2=0;$1_2<$1_1.get__length();$1_2++){var $1_3=$1_1.get_item($1_2);if($1_3.getName()===$p1){$0.resolve($1_3);}}$0.reject(tab.JavaScriptApi$4._create('serverError','datasource not found'));},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});$p0.get_$B()._sendCommand($1,$2);return $0.get_promise();} tab.JavaScriptApi$2.$B=function($p0){if(ss.isValue($p0)&&ss.isValue(tab.JavaScriptApi$2.$0[$p0])){return tab.JavaScriptApi$2.$0[$p0];}return 'NONE';} tab.JavaScriptApi$2.$D=function($p0){var $0=$p0.primaryDatasource;var $1=$p0.parametersDatasource;var $2=new tab._Collection();var $3=null;var $4=$p0.dataSourceList;for(var $5=0;$5<$4.length;$5++){var $6=$4[$5];if($6.name===$1){continue;}var $7=$6.name===$0;var $8=new tab.JavaScriptApi$2($6.name,$7);if($7){$3=$8;}else{$2._add($6.name,$8.get_$5());}for(var $9=0;$9<$6.fieldList.length;$9++){var $A=$6.fieldList[$9];var $B;var $C;if(ss.isValue($A.baseColumnName)){continue;}if(ss.isValue($A.columnList)){var $D=$A.columnList;for(var $E=0,$F=$D.length;$E<$F;$E++){var $10=$D[$E];$B=tab.JavaScriptApi$2.$E($10.fieldRole);$C=tab.JavaScriptApi$2.$B($10.aggregation);var $11=new tableauSoftware.Field($8.get_$5(),$10.name,$B,$C);$8.$C($11);}}else{$B=tab.JavaScriptApi$2.$E($A.defaultFieldRole);$C=tab.JavaScriptApi$2.$B($A.defaultAggregation);var $12=new tableauSoftware.Field($8.get_$5(),$A.name,$B,$C);$8.$C($12);}}}if(ss.isValue($3)){$2._addToFirst($3.get_$6(),$3.get_$5());}return $2;} tab.JavaScriptApi$2.$E=function($p0){if(ss.isValue($p0)){if($p0==='dimension'){return 'dimension';}else if($p0==='measure'){return 'measure';}}return 'unknown';} tab.JavaScriptApi$2.prototype={$1:null,$3:false,$4:null,get_$5:function(){if(this.$4==null){this.$4=new tableauSoftware.DataSource(this);}return this.$4;},get_$6:function(){return this.$1;},get_$7:function(){return this.$2;},get_$8:function(){return this.$3;},$C:function($p0){this.$2._add($p0.getName(),$p0);}} tab._DeferredUtil=function(){} tab._DeferredUtil.$0=function($p0){var $0;if($p0 instanceof tableauSoftware.Promise){$0=$p0;}else{if(ss.isValue($p0)&&typeof($p0.valueOf)==='function'){$p0=$p0.valueOf();}if(tab._DeferredUtil.$4($p0)){var $1=new tab._DeferredImpl();($p0).then(ss.Delegate.create($1,$1.resolve),ss.Delegate.create($1,$1.reject));$0=$1.get_promise();}else{$0=tab._DeferredUtil.$2($p0);}}return $0;} tab._DeferredUtil.$1=function($p0){return tab._DeferredUtil.$0($p0).then(function($p1_0){ return tab._DeferredUtil.$3($p1_0);},null);} tab._DeferredUtil.$2=function($p0){var $0=new tab._PromiseImpl(function($p1_0,$p1_1){ try{return tab._DeferredUtil.$0((ss.isValue($p1_0))?$p1_0($p0):$p0);}catch($1_0){return tab._DeferredUtil.$3($1_0);}});return $0;} tab._DeferredUtil.$3=function($p0){var $0=new tab._PromiseImpl(function($p1_0,$p1_1){ try{return (ss.isValue($p1_1))?tab._DeferredUtil.$0($p1_1($p0)):tab._DeferredUtil.$3($p0);}catch($1_0){return tab._DeferredUtil.$3($1_0);}});return $0;} tab._DeferredUtil.$4=function($p0){return ss.isValue($p0)&&typeof($p0.then)==='function';} tab._CollectionImpl=function(){this.$0=[];this.$1={};} tab._CollectionImpl.prototype={get__length:function(){return this.$0.length;},get__rawArray:function(){return this.$0;},_get:function($p0){var $0=this.$4($p0);if(ss.isValue(this.$1[$0])){return this.$1[$0];}return undefined;},_has:function($p0){return ss.isValue(this._get($p0));},_add:function($p0,$p1){this.$3($p0,$p1);var $0=this.$4($p0);this.$0.push($p1);this.$1[$0]=$p1;},_addToFirst:function($p0,$p1){this.$3($p0,$p1);var $0=this.$4($p0);this.$0.unshift($p1);this.$1[$0]=$p1;},_remove:function($p0){var $0=this.$4($p0);if(ss.isValue(this.$1[$0])){var $1=this.$1[$0];delete this.$1[$0];for(var $2=0;$2=$2&&$1<=$3){return true;}}else if(this.$4==='integer'||this.$4==='float'){var $4=$p0;var $5=this.$6[0].value;var $6=this.$6[this.$6.length-1].value;if($4>=$5&&$4<=$6){return true;}}}return false;},_getParameterName:function(){return this.$1;}} tab._SheetImpl=function(sheetInfoImpl,workbookImpl){this.$0=sheetInfoImpl.$0;this.$1=sheetInfoImpl.$1;this.$2=sheetInfoImpl.$7;this.$3=sheetInfoImpl.$4;this.$4=sheetInfoImpl.$5;this.$5=sheetInfoImpl.$6;this.$6=sheetInfoImpl.$3;this.$7=workbookImpl;} tab._SheetImpl.$14=function($p0){if(ss.isValue($p0)){return tab._Utility.$9($p0);}return $p0;} tab._SheetImpl.$15=function($p0){var $0=tab._Enums.$6($p0.behavior,'size.behavior');var $1=$p0.minSize;if(ss.isValue($1)){$1=tab.$create_Size(tab._SheetImpl.$14($p0.minSize.width),tab._SheetImpl.$14($p0.minSize.height));}var $2=$p0.maxSize;if(ss.isValue($2)){$2=tab.$create_Size(tab._SheetImpl.$14($p0.maxSize.width),tab._SheetImpl.$14($p0.maxSize.height));}return tab.$create_SheetSize($0,$1,$2);} tab._SheetImpl.prototype={$0:null,$1:0,$2:false,$3:false,$4:null,$5:null,$6:null,$7:null,get_$9:function(){return this.$0;},get_$A:function(){return this.$1;},get_$B:function(){return this.$7;},get_$C:function(){return this.$7.get__workbook();},get_$D:function(){if(this.$3){throw tab.JavaScriptApi$4._createNoUrlForHiddenWorksheet();}return this.$6;},get_$E:function(){return this.$5;},get_$F:function(){return this.$3;},get_$10:function(){return this.$2;},set_$10:function($p0){this.$2=$p0;return $p0;},get_$11:function(){return this.$4==='dashboard';},get_$12:function(){return this.$4;},$13:function($p0){$p0=tab._SheetImpl.$15($p0);if(this.$4==='worksheet'&&$p0.behavior!=='automatic'){throw tab.JavaScriptApi$4._createInvalidSizeBehaviorOoWorksheet();}var $0=new tab._Deferred();if(this.$5.behavior===$p0.behavior&&$p0.behavior==='automatic'){$0.resolve($p0);return $0.get_promise();}var $1=this.$16($p0);var $2={};$2['api.setSheetSizeName']=this.$0;$2['api.minWidth']=$1['api.minWidth'];$2['api.minHeight']=$1['api.minHeight'];$2['api.maxWidth']=$1['api.maxWidth'];$2['api.maxHeight']=$1['api.maxHeight'];var $3=new tab._CommandReturnHandler('api.SetSheetSizeCommand',1,ss.Delegate.create(this,function($p1_0){ this.get_$B()._update(ss.Delegate.create(this,function(){ var $2_0=this.get_$B().get__publishedSheets()._get(this.get_$9()).getSize();$0.resolve($2_0);}));}),function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this.$7._sendCommand($2,$3);return $0.get_promise();},$16:function($p0){var $0=null;if(ss.isNullOrUndefined($p0)||ss.isNullOrUndefined($p0.behavior)||($p0.behavior!=='automatic'&&ss.isNullOrUndefined($p0.minSize)&&ss.isNullOrUndefined($p0.maxSize))){throw tab.JavaScriptApi$4._createInvalidSheetSizeParam();}var $1=0;var $2=0;var $3=0;var $4=0;var $5={};$5['api.minWidth']=0;$5['api.minHeight']=0;$5['api.maxWidth']=0;$5['api.maxHeight']=0;if($p0.behavior==='automatic'){$0=tab.$create_SheetSize('automatic',undefined,undefined);}else if($p0.behavior==='atmost'){if(ss.isNullOrUndefined($p0.maxSize)||ss.isNullOrUndefined($p0.maxSize.width)||ss.isNullOrUndefined($p0.maxSize.height)){throw tab.JavaScriptApi$4._createMissingMaxSize();}if($p0.maxSize.width<0||$p0.maxSize.height<0){throw tab.JavaScriptApi$4._createInvalidSizeValue();}$5['api.maxWidth']=$p0.maxSize.width;$5['api.maxHeight']=$p0.maxSize.height;$0=tab.$create_SheetSize('atmost',undefined,$p0.maxSize);}else if($p0.behavior==='atleast'){if(ss.isNullOrUndefined($p0.minSize)||ss.isNullOrUndefined($p0.minSize.width)||ss.isNullOrUndefined($p0.minSize.height)){throw tab.JavaScriptApi$4._createMissingMinSize();}if($p0.minSize.width<0||$p0.minSize.height<0){throw tab.JavaScriptApi$4._createInvalidSizeValue();}$5['api.minWidth']=$p0.minSize.width;$5['api.minHeight']=$p0.minSize.height;$0=tab.$create_SheetSize('atleast',$p0.minSize,undefined);}else if($p0.behavior==='range'){if(ss.isNullOrUndefined($p0.minSize)||ss.isNullOrUndefined($p0.maxSize)||ss.isNullOrUndefined($p0.minSize.width)||ss.isNullOrUndefined($p0.maxSize.width)||ss.isNullOrUndefined($p0.minSize.height)||ss.isNullOrUndefined($p0.maxSize.height)){throw tab.JavaScriptApi$4._createMissingMinMaxSize();}if($p0.minSize.width<0||$p0.minSize.height<0||$p0.maxSize.width<0||$p0.maxSize.height<0||$p0.minSize.width>$p0.maxSize.width||$p0.minSize.height>$p0.maxSize.height){throw tab.JavaScriptApi$4._createInvalidRangeSize();}$5['api.minWidth']=$p0.minSize.width;$5['api.minHeight']=$p0.minSize.height;$5['api.maxWidth']=$p0.maxSize.width;$5['api.maxHeight']=$p0.maxSize.height;$0=tab.$create_SheetSize('range',$p0.minSize,$p0.maxSize);}else if($p0.behavior==='exactly'){if(ss.isValue($p0.minSize)&&ss.isValue($p0.maxSize)&&ss.isValue($p0.minSize.width)&&ss.isValue($p0.maxSize.width)&&ss.isValue($p0.minSize.height)&&ss.isValue($p0.maxSize.height)){$1=$p0.minSize.width;$2=$p0.minSize.height;$3=$p0.maxSize.width;$4=$p0.maxSize.height;if($1!==$3||$2!==$4){throw tab.JavaScriptApi$4._createSizeConflictForExactly();}}else if(ss.isValue($p0.minSize)&&ss.isValue($p0.minSize.width)&&ss.isValue($p0.minSize.height)){$1=$p0.minSize.width;$2=$p0.minSize.height;$3=$1;$4=$2;}else if(ss.isValue($p0.maxSize)&&ss.isValue($p0.maxSize.width)&&ss.isValue($p0.maxSize.height)){$3=$p0.maxSize.width;$4=$p0.maxSize.height;$1=$3;$2=$4;}$5['api.minWidth']=$1;$5['api.minHeight']=$2;$5['api.maxWidth']=$3;$5['api.maxHeight']=$4;$0=tab.$create_SheetSize('exactly',tab.$create_Size($1,$2),tab.$create_Size($3,$4));}this.$5=$0;return $5;}} tab.JavaScriptApi$4=function(){} tab.JavaScriptApi$4._create=function($p0,$p1){var $0=new Error($p1);$0.tableauSoftwareErrorCode=$p0;return $0;} tab.JavaScriptApi$4._createInternalError=function($p0){if(ss.isValue($p0)){return tab.JavaScriptApi$4._create('internalError','Internal error. Please contact Tableau support with the following information: '+$p0);}else{return tab.JavaScriptApi$4._create('internalError','Internal error. Please contact Tableau support');}} tab.JavaScriptApi$4._createServerError=function($p0){return tab.JavaScriptApi$4._create('serverError',$p0);} tab.JavaScriptApi$4._createNotActiveSheet=function(){return tab.JavaScriptApi$4._create('notActiveSheet','Operation not allowed on non-active sheet');} tab.JavaScriptApi$4._createInvalidCustomViewName=function($p0){return tab.JavaScriptApi$4._create('invalidCustomViewName','Invalid custom view name: '+$p0);} tab.JavaScriptApi$4._createInvalidParameter=function($p0){return tab.JavaScriptApi$4._create('invalidParameter','Invalid parameter: '+$p0);} tab.JavaScriptApi$4._createInvalidFilterFieldNameOrValue=function($p0){return tab.JavaScriptApi$4._create('invalidFilterFieldNameOrValue','Invalid filter field name or value: '+$p0);} tab.JavaScriptApi$4._createInvalidDateParameter=function($p0){return tab.JavaScriptApi$4._create('invalidDateParameter','Invalid date parameter: '+$p0);} tab.JavaScriptApi$4._createNullOrEmptyParameter=function($p0){return tab.JavaScriptApi$4._create('nullOrEmptyParameter','Parameter cannot be null or empty: '+$p0);} tab.JavaScriptApi$4._createMissingMaxSize=function(){return tab.JavaScriptApi$4._create('missingMaxSize','Missing maxSize for SheetSizeBehavior.ATMOST');} tab.JavaScriptApi$4._createMissingMinSize=function(){return tab.JavaScriptApi$4._create('missingMinSize','Missing minSize for SheetSizeBehavior.ATLEAST');} tab.JavaScriptApi$4._createMissingMinMaxSize=function(){return tab.JavaScriptApi$4._create('missingMinMaxSize','Missing minSize or maxSize for SheetSizeBehavior.RANGE');} tab.JavaScriptApi$4._createInvalidRangeSize=function(){return tab.JavaScriptApi$4._create('invalidSize','Missing minSize or maxSize for SheetSizeBehavior.RANGE');} tab.JavaScriptApi$4._createInvalidSizeValue=function(){return tab.JavaScriptApi$4._create('invalidSize','Size value cannot be less than zero');} tab.JavaScriptApi$4._createInvalidSheetSizeParam=function(){return tab.JavaScriptApi$4._create('invalidSize','Invalid sheet size parameter');} tab.JavaScriptApi$4._createSizeConflictForExactly=function(){return tab.JavaScriptApi$4._create('invalidSize','Conflicting size values for SheetSizeBehavior.EXACTLY');} tab.JavaScriptApi$4._createInvalidSizeBehaviorOoWorksheet=function(){return tab.JavaScriptApi$4._create('invalidSizeBehaviorOnWorksheet','Only SheetSizeBehavior.AUTOMATIC is allowed on Worksheets');} tab.JavaScriptApi$4._createNoUrlForHiddenWorksheet=function(){return tab.JavaScriptApi$4._create('noUrlForHiddenWorksheet','Hidden worksheets do not have a URL.');} tab._Utility=function(){} tab._Utility.$0=function($p0,$p1){return $p0.hasOwnProperty($p1);} tab._Utility.$1=function($p0){return ss.isNullOrUndefined($p0)||($p0['length']||0)<=0;} tab._Utility.$2=function($p0){return typeof($p0)==='string';} tab._Utility.$3=function($p0){return typeof($p0)==='number';} tab._Utility.$4=function($p0){if(typeof($p0) === 'object' && ($p0 instanceof Date)){return true;}else if(Object.prototype.toString.call($p0) !== '[object Date]'){return false;}return !(isNaN($p0.getTime()));} tab._Utility.$5=function($p0){return !(isNaN($p0.getTime()));} tab._Utility.$6=function($p0,$p1,$p2){if(ss.isValue((Array).prototype['indexOf'])){return $p0.indexOf($p1,$p2);}$p2=($p2||0);var $0=$p0.length;if($0>0){for(var $1=$p2;$1<$0;$1++){if($p0[$1]===$p1){return $1;}}}return -1;} tab._Utility.$7=function($p0,$p1,$p2){var $0=tab._Utility.$6($p0,$p1,$p2);return $0>=0;} tab._Utility.$8=function(){var $0=window.self;while(ss.isValue($0.parent)&&$0.parent!==$0){$0=$0.parent;}return $0;} tab._Utility.$9=function($p0){if(tab._Utility.$3($p0)){return $p0;}return parseInt($p0.toString(),10);} tab._Utility.$A=function($p0,$p1){var $0=new RegExp('^(yes|y|true|t|1)$','i');if(tab._Utility.$1($p0)){return $p1;}var $1=$p0.match($0);return !tab._Utility.$1($1);} tab._Utility.$B=function($p0,$p1){var $0=new RegExp('[\\n\\t\\r]','g');return ss.isValue($p0)&&(' '+$p0.className+' ').replace($0,' ').indexOf(' '+$p1+' ')>-1;} tab._Utility.$C=function($p0,$p1,$p2){var $0=(ss.isValue($p0))?$p0.parentNode:null;$p2=($p2||document.body);while($0!=null){if(tab._Utility.$B($0,$p1)){return $0;}if($0===$p2){$0=null;}else{$0=$0.parentNode;}}return $0;} tab._Utility.$D=function(){return ss.isValue(window.JSON)&&ss.isValue(window.JSON.parse);} tab._Utility.$E=function(){return ss.isValue(window.postMessage);} tab._Utility.$F=function(){return ss.isValue(document.attachEvent);} tab._Utility.$10=function(){return ss.isValue(window.addEventListener);} tab._Utility.$11=function($p0,$p1){return ss.isValue($p0)&&$p0.nodeType===1&&$p0.tagName.toLowerCase()===$p1.toLowerCase();} tab._Utility.$12=function($p0){var $0=new ss.StringBuilder();$0.append($p0.tagName.toLowerCase());if(!tab._Utility.$1($p0.id)){$0.append('#').append($p0.id);}if(!tab._Utility.$1($p0.className)){var $1=$p0.className.split(' ');$0.append('.').append($1.join('.'));}return $0.toString();} tab._Utility.$13=function($p0){if(ss.isValue(window.getComputedStyle)){return window.getComputedStyle($p0);}else{return $p0.currentStyle;}} tab._Utility.$14=function(){return window.navigator.userAgent.indexOf('MSIE')>-1&&ss.isNullOrUndefined(window.opera);} tab._Utility.$15=function(){var $0=window.navigator.userAgent;if($0.indexOf('iPad')!==-1){return true;}if($0.indexOf('Android')!==-1){return true;}if(($0.indexOf('AppleWebKit')!==-1)&&($0.indexOf('Mobile')!==-1)){return true;}return false;} tab._Utility.$16=function($p0){var $0=0;var $1=0;while(!ss.isNullOrUndefined($p0)){$1+=$p0.offsetTop;$0+=$p0.offsetLeft;$p0=$p0.offsetParent;}return tab.$create_Point($0,$1);} tab._Utility.$17=function($p0,$p1){if($p1==='boolean'){return $p0;}if(ss.isNullOrUndefined($p0)){return null;}switch($p1){case 'date':case 'datetime':return new Date($p0);case 'integer':case 'real':if($p0==null){return Number.NaN;}return $p0;case 'cstring':case 'tuple':case 'unknown':default:return $p0;}} tab._Utility.$18=function($p0){if(ss.isNullOrUndefined($p0)){return tab.$create_DataValue(null,null,null);}return tab.$create_DataValue(tab._Utility.$17($p0.value,$p0.type),$p0.formattedValue,$p0.aliasedValue);} tab._VizImpl=function(viz,parentElement,url,options){if(!tab._Utility.$E()||!tab._Utility.$D()){throw tab.JavaScriptApi$4._create('browserNotCapable','This browser is incapable of supporting the Tableau JavaScript API.');}this.$1=viz;if(ss.isNullOrUndefined(parentElement)||parentElement.nodeType!==1){parentElement=document.body;}this.$4=new tab._VizParameters(parentElement,url,options);this.$5=this.$4.get_$B();this.$3=this.$5;if(ss.isValue(options)){this.$9=options.onFirstInteractive;}} tab._VizImpl.prototype={$0:null,$1:null,$2:null,$3:null,$4:null,$5:null,$6:null,$7:null,$8:null,$9:null,$A:false,$B:false,$C:false,add_customViewsListLoad:function($p0){this.$D=ss.Delegate.combine(this.$D,$p0);},remove_customViewsListLoad:function($p0){this.$D=ss.Delegate.remove(this.$D,$p0);},$D:null,add_stateReadyForQuery:function($p0){this.$E=ss.Delegate.combine(this.$E,$p0);},remove_stateReadyForQuery:function($p0){this.$E=ss.Delegate.remove(this.$E,$p0);},$E:null,add_$F:function($p0){this.$10=ss.Delegate.combine(this.$10,$p0);},remove_$F:function($p0){this.$10=ss.Delegate.remove(this.$10,$p0);},$10:null,add_$11:function($p0){this.$12=ss.Delegate.combine(this.$12,$p0);},remove_$11:function($p0){this.$12=ss.Delegate.remove(this.$12,$p0);},$12:null,add_$13:function($p0){this.$14=ss.Delegate.combine(this.$14,$p0);},remove_$13:function($p0){this.$14=ss.Delegate.remove(this.$14,$p0);},$14:null,add_$15:function($p0){this.$16=ss.Delegate.combine(this.$16,$p0);},remove_$15:function($p0){this.$16=ss.Delegate.remove(this.$16,$p0);},$16:null,add_$17:function($p0){this.$18=ss.Delegate.combine(this.$18,$p0);},remove_$17:function($p0){this.$18=ss.Delegate.remove(this.$18,$p0);},$18:null,add_$19:function($p0){this.$1A=ss.Delegate.combine(this.$1A,$p0);},remove_$19:function($p0){this.$1A=ss.Delegate.remove(this.$1A,$p0);},$1A:null,add_$1B:function($p0){this.$1C=ss.Delegate.combine(this.$1C,$p0);},remove_$1B:function($p0){this.$1C=ss.Delegate.remove(this.$1C,$p0);},$1C:null,add_$1D:function($p0){this.$1E=ss.Delegate.combine(this.$1E,$p0);},remove_$1D:function($p0){this.$1E=ss.Delegate.remove(this.$1E,$p0);},$1E:null,get_handlerId:function(){return this.$7;},set_handlerId:function($p0){this.$7=$p0;return $p0;},get_iframe:function(){return this.$2;},get_serverRoot:function(){return this.$4.$5;},get_$1F:function(){return this.$1;},get_$20:function(){return this.$A;},get_$21:function(){return this.$B;},get_$22:function(){return this.$2.style.display==='none';},get_$23:function(){return this.$4.$6;},get_$24:function(){return this.$3;},set_$24:function($p0){this.$3=$p0;return $p0;},get_$25:function(){return this.$3;},get_$26:function(){return this.$8.get__workbook();},get__workbookImpl:function(){return this.$8;},get_$27:function(){return this.$C;},hideLoadIndicators:function(){if(ss.isValue(this.$6)){this.$6.$5();this.$6=null;delete this.loadFeedback;}},handleVizLoad:function(){this.hideLoadIndicators();this.$3C();if(ss.isNullOrUndefined(this.$8)){this.$8=new tab._WorkbookImpl(this,ss.Delegate.create(this,function(){ this.$49();}));}else{this.$8._update(ss.Delegate.create(this,function(){ this.$49();}));}},handleEventNotification:function($p0,$p1){var $0=new tab.JavaScriptApi$3($p1);if($p0==='api.VizInteractiveEvent'){if(this.$9!=null){if(ss.isValue(this.$8)&&this.$8.get__name()===$0.get_$3()){this.$49();}}this.$43();}else if($p0==='api.MarksSelectionChangedEvent'){if(this.$10!=null){if(this.$8.get__name()===$0.get_$3()){var $1=null;var $2=this.$8.get__activeSheetImpl();if($2.get_$9()===$0.get_$4()){$1=$2;}else if($2.get_$11()){var $3=$2;$1=$3.get_$1B()._get($0.get_$4())._impl;}if(ss.isValue($1)){$1.set__selectedMarks(null);this.$10(new tab.MarksEvent('marksselection',this.$1,$1));}}}}else if($p0==='api.FilterChangedEvent'){if(this.$12!=null){if(this.$8.get__name()===$0.get_$3()){var $4=null;var $5=this.$8.get__activeSheetImpl();if($5.get_$9()===$0.get_$4()){$4=$5;}else if($5.get_$11()){var $6=$5;$4=$6.get_$1B()._get($0.get_$4())._impl;}if(ss.isValue($4)){var $7=JSON.parse($0.get_$5());var $8=$7[0];var $9=$7[1];this.$12(new tab.FilterEvent('filterchange',this.$1,$4,$8,$9));}}}}else if($p0==='api.ParameterChangedEvent'){if(this.$14!=null){if(this.$8.get__name()===$0.get_$3()){this.$8.set__lastChangedParameterImpl(null);var $A=$0.get_$5();this.$3D($A);}}}else if($p0==='api.CustomViewsListLoadedEvent'){var $B=$0.get_$5();var $C=JSON.parse($B);if(ss.isNullOrUndefined(this.$8)){this.$8=new tab._WorkbookImpl(this,ss.Delegate.create(this,function(){ this.$49();}));}if(ss.isValue(this.$8)){tab._CustomViewImpl._processCustomViews(this.$8,$C);}this.$44();if(this.$16!=null&&!$C['customViewLoaded']){this.$3E(this.$8.get__activeCustomView());}}else if($p0==='api.CustomViewUpdatedEvent'){var $D=$0.get_$5();var $E=JSON.parse($D);if(ss.isNullOrUndefined(this.$8)){this.$8=new tab._WorkbookImpl(this,ss.Delegate.create(this,function(){ this.$49();}));}if(ss.isValue(this.$8)){tab._CustomViewImpl._processCustomViewUpdate(this.$8,$E,true);}if(this.$18!=null){var $F=this.$8.get__updatedCustomViews()._toApiCollection();for(var $10=0,$11=$F.length;$10<$11;$10++){this.$3F($F[$10]);}}}else if($p0==='api.CustomViewRemovedEvent'){if(this.$1A!=null){var $12=this.$8.get__removedCustomViews()._toApiCollection();for(var $13=0,$14=$12.length;$13<$14;$13++){this.$40($12[$13]);}}}else if($p0==='api.CustomViewSetDefaultEvent'){var $15=$0.get_$5();var $16=JSON.parse($15);if(ss.isValue(this.$8)){tab._CustomViewImpl._processCustomViews(this.$8,$16);}if(this.$1C!=null){var $17=this.$8.get__updatedCustomViews()._toApiCollection();for(var $18=0,$19=$17.length;$18<$19;$18++){this.$41($17[$18]);}}}else if($p0==='api.TabSwitchEvent'){this.$8._update(ss.Delegate.create(this,function(){ if(ss.isValue(this.$0)){this.$0();}if(this.$1E!=null){if(this.$8.get__name()===$0.get_$3()){var $1_0=$0.get_$4();var $1_1=$0.get_$5();this.$42($1_0,$1_1);}}this.$49();}));}},$28:function($p0,$p1){$p0=tab._Enums.$7($p0);if($p0==='marksselection'){this.add_$F($p1);}else if($p0==='parametervaluechange'){this.add_$13($p1);}else if($p0==='filterchange'){this.add_$11($p1);}else if($p0==='customviewload'){this.add_$15($p1);}else if($p0==='customviewsave'){this.add_$17($p1);}else if($p0==='customviewremove'){this.add_$19($p1);}else if($p0==='customviewsetdefault'){this.add_$1B($p1);}else if($p0==='tabswitch'){this.add_$1D($p1);}else{throw tab.JavaScriptApi$4._create('unsupportedEventName',"Unsupported event '"+$p0+"'");}},$29:function($p0,$p1){$p0=tab._Enums.$7($p0);if($p0==='marksselection'){this.remove_$F($p1);}else if($p0==='parametervaluechange'){this.remove_$13($p1);}else if($p0==='filterchange'){this.remove_$11($p1);}else if($p0==='customviewload'){this.remove_$15($p1);}else if($p0==='customviewsave'){this.remove_$17($p1);}else if($p0==='customviewremove'){this.remove_$19($p1);}else if($p0==='customviewsetdefault'){this.remove_$1B($p1);}else if($p0==='tabswitch'){this.remove_$1D($p1);}else{throw tab.JavaScriptApi$4._create('unsupportedEventName','Unsupported event name');}},$2A:function(){var $0=this.$4.$9;if(ss.isValue($0)){$0.innerHTML='';$0.parentNode.removeChild($0);this.$4.$9=$0=null;}tab._VizManagerImpl.$3(this.$1);tab._CrossDomainMessageRouter.$8(this);},$2B:function(){this.$2.style.display='block';},$2C:function(){this.$2.style.display='none';},$2D:function(){this.$48('showExportImageDialog');},$2E:function($p0){var $0=this.$45($p0);this.$48('showExportDataDialog',$0);},$2F:function($p0){var $0=this.$45($p0);this.$48('showExportCrosstabDialog',$0);},$30:function(){this.$48('showExportPDFDialog');},$31:function(){var $0=new tab._Deferred();var $1=new tab._CommandReturnHandler('api.RevertAllCommand',1,function($p1_0){ $0.resolve();},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand(null,$1);return $0.get_promise();},$32:function(){var $0=new tab._Deferred();var $1=new tab._CommandReturnHandler('api.RefreshDataCommand',1,function($p1_0){ $0.resolve();},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand(null,$1);return $0.get_promise();},$33:function(){this.$48('showShareDialog');},$34:function(){if(this.get__workbookImpl().get__isDownloadAllowed()){this.$48('showDownloadWorkbookDialog');}else{throw tab.JavaScriptApi$4._create('downloadWorkbookNotAllowed','Download workbook is not allowed');}},$35:function(){return this.$46('pauseAutomaticUpdates');},$36:function(){return this.$46('resumeAutomaticUpdates');},$37:function(){return this.$46('toggleAutomaticUpdates');},$38:function($p0,$p1){this.$4.$3=$p0;this.$4.$4=$p1;this.$2.style.width=this.$4.$3+'px';this.$2.style.height=this.$4.$4+'px';this.$8._updateActiveSheetAsync();},$39:function($p0){this.$C=$p0;},$3A:function(){return this.$4.$9;},$3B:function(){try{tab._VizManagerImpl.$2(this.$1);}catch($0){this.$2A();throw $0;}this.$6=new tab._LoadFeedback();this.$6.$3(this.$4);this.$2=this.$4C();this.$6.$4();this.$2B();if(!tab._Utility.$E()){if(tab._Utility.$14()){this.$2.onreadystatechange=this.$4D();}else{this.$2.onload=this.$4D();}}this.$B=!this.$4.toolbar;this.$A=!this.$4.$1;tab._CrossDomainMessageRouter.$7(this);this.$47(9999);},$3C:function(){if(!tab._Utility.$E()||ss.isNullOrUndefined(this.$2)||!ss.isValue(this.$2.contentWindow)){return;}var $0=tab._Utility.$16(this.$2);var $1=[];$1.push('vizOffsetResp');$1.push($0.x);$1.push($0.y);this.$2.contentWindow.postMessage($1.join(','),'*');},_sendCommand:function($p0,$p1){tab._CrossDomainMessageRouter._sendCommand(this,$p0,$p1);},$3D:function($p0){if(this.$14!=null){this.$14(new tab.ParameterEvent('parametervaluechange',this.$1,$p0));}},$3E:function($p0){if(this.$16!=null){this.$16(new tab.CustomViewEvent('customviewload',this.$1,(ss.isValue($p0))?$p0._impl:null));}},$3F:function($p0){if(this.$18!=null){this.$18(new tab.CustomViewEvent('customviewsave',this.$1,$p0._impl));}},$40:function($p0){if(this.$1A!=null){this.$1A(new tab.CustomViewEvent('customviewremove',this.$1,$p0._impl));}},$41:function($p0){if(this.$1C!=null){this.$1C(new tab.CustomViewEvent('customviewsetdefault',this.$1,$p0._impl));}},$42:function($p0,$p1){if(this.$1E!=null){this.$1E(new tab.TabSwitchEvent('tabswitch',this.$1,$p0,$p1));}},$43:function(){if(this.$E!=null){this.$E(this);}},$44:function(){if(this.$D!=null){this.$D(this);}},$45:function($p0){if(ss.isNullOrUndefined($p0)){return null;}var $0=this.$8.$E($p0);if(ss.isNullOrUndefined($0)){throw tab.JavaScriptApi$4._createNotActiveSheet();}return $0.get_$9();},$46:function($p0){if($p0!=='pauseAutomaticUpdates'&&$p0!=='resumeAutomaticUpdates'&&$p0!=='toggleAutomaticUpdates'){throw tab.JavaScriptApi$4._createInternalError(null);}var $0={};$0['api.invokeCommandName']=$p0;var $1=new tab._Deferred();var $2=new tab._CommandReturnHandler('api.InvokeCommandCommand',0,ss.Delegate.create(this,function($p1_0){ var $1_0=$p1_0;if(ss.isValue($1_0['isAutoUpdate'])){this.$C=!$1_0['isAutoUpdate'];}$1.resolve(this.$C);}),function($p1_0,$p1_1){ $1.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand($0,$2);return $1.get_promise();},$47:function($p0){var $0='&:loadOrderID='+$p0.toString();var $1='&:apiID='+this.$7;this.$2.src=this.$5+$0+$1;},$48:function($p0,$p1){if($p0!=='showExportImageDialog'&&$p0!=='showExportDataDialog'&&$p0!=='showExportCrosstabDialog'&&$p0!=='showExportPDFDialog'&&$p0!=='showShareDialog'&&$p0!=='showDownloadWorkbookDialog'){throw tab.JavaScriptApi$4._createInternalError(null);}var $0={};$0['api.invokeCommandName']=$p0;if(ss.isValue($p1)){$0['api.invokeCommandParam']=$p1;}var $1=new tab._CommandReturnHandler('api.InvokeCommandCommand',0,null,null);this._sendCommand($0,$1);},$49:function(){if(ss.isValue(this.$9)){this.$9(new tab.TableauEvent('firstinteractive',this.$1));this.$9=null;}},$4A:function(){if(tab._Utility.$14()){if(this.$2.readyState==='complete'){this.handleVizLoad();}}else{this.handleVizLoad();}},$4B:function(){window.setTimeout(ss.Delegate.create(this,this.$4A),3000);},$4C:function(){if(ss.isNullOrUndefined(this.$3A())){return null;}var $0=document.createElement('IFrame');$0.frameBorder='0';$0.setAttribute('allowTransparency','true');$0.marginHeight='0';$0.marginWidth='0';$0.style.width=this.$4.$3+'px';$0.style.height=this.$4.$4+'px';this.$3A().appendChild($0);return $0;},$4D:function(){return ss.Delegate.create(this,function($p1_0){ this.$4B();});}} tab._VizManagerImpl=function(){} tab._VizManagerImpl.get_$1=function(){return tab._VizManagerImpl.$0.concat();} tab._VizManagerImpl.$2=function($p0){tab._VizManagerImpl.$4($p0);tab._VizManagerImpl.$0.push($p0);} tab._VizManagerImpl.$3=function($p0){for(var $0=0,$1=tab._VizManagerImpl.$0.length;$0<$1;$0++){if(tab._VizManagerImpl.$0[$0]===$p0){tab._VizManagerImpl.$0.splice($0,1);break;}}} tab._VizManagerImpl.$4=function($p0){var $0=$p0.getParentElement();for(var $1=0,$2=tab._VizManagerImpl.$0.length;$1<$2;$1++){if(tab._VizManagerImpl.$0[$1].getParentElement()===$0){var $3="Another viz is already present in element '"+tab._Utility.$12($0)+"'.";throw tab.JavaScriptApi$4._create('vizAlreadyInManager',$3);}}} tab._VizParameters=function(element,url,options){if(ss.isNullOrUndefined(element)||ss.isNullOrUndefined(url)){throw tab.JavaScriptApi$4._create('noUrlOrParentElementNotFound','URL is empty or Parent element not found');}if(ss.isNullOrUndefined(options)){options={};options.width='800px';options.height='600px';options.hideTabs=false;options.hideToolbar=false;options.onFirstInteractive=null;}else{if(ss.isNullOrUndefined(options.width)){options.width='800px';}if(ss.isNullOrUndefined(options.height)){options.height='600px';}}var $0=new ss.StringBuilder();$0.append('
');$0.append('
');var $1=document.createElement('div');$1.innerHTML=$0.toString();this.$9=$1.firstChild;element.appendChild(this.$9);$1.innerHTML='';$1=null;this.$1=!(options.hideTabs||false);this.toolbar=!(options.hideToolbar||false);this.$6=element;this.$7=options;this.$3=parseInt(this.$7.width,10);this.$4=parseInt(this.$7.height,10);this.$2=options.toolbarPosition;var $2=url.split('?');this.$A=$2[0];if($2.length===2){this.$8=$2[1];}else{this.$8='';}var $3=new RegExp('.*?[^/:]/','').exec(this.$A);if(ss.isNullOrUndefined($3)||($3[0].toLowerCase().indexOf('http://')===-1&&$3[0].toLowerCase().indexOf('https://')===-1)){throw tab.JavaScriptApi$4._create('invalidUrl','Invalid url');}this.host_url=$3[0].toLowerCase();this.$0=this.$A.replace($3[0],'');this.$0=this.$0.replace('views/','');this.$5=decodeURIComponent(this.host_url);} tab._VizParameters.prototype={$0:'',host_url:null,$1:false,toolbar:false,$2:null,$3:0,$4:0,$5:null,$6:null,$7:null,$8:null,$9:null,$A:null,get_$B:function(){return this.$D();},get_$C:function(){return this.$A;},$D:function(){var $0=[];$0.push(this.get_$C());$0.push('?');if(this.$8.length>0){$0.push(this.$8);$0.push('&');}$0.push(':embed=y');if(!this.$1){$0.push('&:tabs=n');}if(!this.toolbar){$0.push('&:toolbar=n');}else if(!ss.isNullOrUndefined(this.$2)){$0.push('&:toolbar=');$0.push(this.$2);}var $1=this.$7;var $dict1=$1;for(var $key2 in $dict1){var $2={key:$key2,value:$dict1[$key2]};if($2.key!=='embed'&&$2.key!=='height'&&$2.key!=='width'&&$2.key!=='hideTabs'&&$2.key!=='hideToolbar'&&$2.key!=='onFirstInteractive'&&$2.key!=='toolbarPosition'){$0.push('&');$0.push(encodeURIComponent($2.key));$0.push('=');$0.push(encodeURIComponent($2.value.toString()));}}return $0.join('');}} tab._WorkbookImpl=function(vizImpl,callback){this.$5=new tab._Collection();this.$7=new tab._Collection();this.$8=new tab._Collection();this.$9=new tab._Collection();this.$1=vizImpl;this.$13(callback);} tab._WorkbookImpl.$D=function($p0){if(ss.isNullOrUndefined($p0)){return null;}if(tab._Utility.$2($p0)){return $p0;}var $0=$p0;var $1=ss.Delegate.create($0,$0.getName);if(ss.isValue($1)){return $1();}return null;} tab._WorkbookImpl.$11=function($p0){var $0=[];for(var $1=0;$1<$p0.length;$1++){var $2=$p0[$1];var $3=$2.r;var $4='blank';switch($3){case 'color':case 'shape':case 'size':case 'map':$4='legend';break;case 'layout-basic':case 'layout-flow':continue;case 'filter':$4='quickFilter';break;case 'viz':$4='worksheet';break;case 'paramctrl':$4='parameterControl';break;case 'empty':$4='blank';break;case 'title':$4='title';break;case 'text':$4='text';break;case 'bitmap':$4='image';break;case 'web':$4='webPage';break;}var $5=tab.$create_Size($2.w,$2.h);var $6=tab.$create_Point($2.x,$2.y);var $7=$2.name;var $8=tab.$create_JavaScriptApi$1($7,$4,$6,$5);$0.push($8);}return $0;} tab._WorkbookImpl.$12=function($p0){if(ss.isNullOrUndefined($p0)){return tab.$create_SheetSize('automatic',null,null);}var $0=$p0.minHeight;var $1=$p0.minWidth;var $2=$p0.maxHeight;var $3=$p0.maxWidth;var $4='automatic';var $5=null;var $6=null;if(!$0&&!$1){if(!$2&&!$3){}else{$4='atmost';$6=tab.$create_Size($3,$2);}}else if(!$2&&!$3){$4='atleast';$5=tab.$create_Size($1,$0);}else if($2===$0&&$3===$1){$4='exactly';$5=tab.$create_Size($1,$0);$6=tab.$create_Size($1,$0);}else{$4='range';$5=tab.$create_Size($1,$0);$6=tab.$create_Size($3,$2);}return tab.$create_SheetSize($4,$5,$6);} tab._WorkbookImpl.prototype={$0:null,$1:null,$2:null,$3:null,$4:null,$6:null,$A:null,$B:null,$C:false,get__lastChangedParameterImpl:function(){return this.$B;},set__lastChangedParameterImpl:function($p0){this.$B=$p0;return $p0;},get__parameters:function(){return this.$A;},set__parameters:function($p0){this.$A=$p0;return $p0;},get__customViews:function(){return this.$7;},set__customViews:function($p0){this.$7=$p0;return $p0;},get__updatedCustomViews:function(){return this.$8;},set__updatedCustomViews:function($p0){this.$8=$p0;return $p0;},get__removedCustomViews:function(){return this.$9;},set__removedCustomViews:function($p0){this.$9=$p0;return $p0;},get__currentCustomView:function(){return this.$6;},set__currentCustomView:function($p0){this.$6=$p0;return $p0;},get__workbook:function(){if(ss.isNullOrUndefined(this.$0)){this.$0=new tableauSoftware.Workbook(this);}return this.$0;},get__viz:function(){return this.$1.get_$1F();},get__publishedSheets:function(){return this.$5;},get__name:function(){return this.$2;},get__activeSheetImpl:function(){return this.$3;},get__activeCustomView:function(){return this.$6;},get__isDownloadAllowed:function(){return this.$C;},set__isDownloadAllowed:function($p0){this.$C=$p0;return $p0;},$E:function($p0){if(ss.isNullOrUndefined(this.$3)){return null;}var $0=tab._WorkbookImpl.$D($p0);if(ss.isNullOrUndefined($0)){return null;}if($0===this.$3.get_$9()){return this.$3;}if(this.$3.get_$11()){var $1=this.$3;var $2=$1.get_$1B()._get($0);if(ss.isValue($2)){return $2._impl;}}return null;},_setActiveSheetAsync:function($p0){if(tab._Utility.$3($p0)){var $2=$p0;if($2=0){return this.$F(this.$5.get_item($2).$0);}else{throw tab.JavaScriptApi$4._create('indexOutOfRange','Sheet index is out of range');}}var $0=tab._WorkbookImpl.$D($p0);var $1=this.$5._get($0);if(ss.isValue($1)){return this.$F($1.$0);}else if(this.$3.get_$11()){var $3=this.$3;var $4=$3.get_$1B()._get($0);if(ss.isValue($4)){this.$4=null;var $5='';if($4.getIsHidden()){this.$4=$4._impl;}else{$5=$4._impl.get_$D();}return this.$10($4._impl.get_$9(),$5);}}throw tab.JavaScriptApi$4._create('sheetNotInWorkbook','Sheet is not found in Workbook');},_revertAllAsync:function(){var $0=new tab._Deferred();var $1=new tab._CommandReturnHandler('api.RevertAllCommand',1,function($p1_0){ $0.resolve();},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand(null,$1);return $0.get_promise();},_getCustomViewsAsync:function(){return tab._CustomViewImpl._getCustomViewsAsync(this);},_showCustomViewAsync:function($p0){if(ss.isNullOrUndefined($p0)||tab._Utility.$1($p0)){return tab._CustomViewImpl._showCustomViewAsync(this,null);}else{var $0=this.$7._get($p0);if(ss.isNullOrUndefined($0)){var $1=new tab._Deferred();$1.reject(tab.JavaScriptApi$4._createInvalidCustomViewName($p0));return $1.get_promise();}return $0._impl._showAsync();}},_removeCustomViewAsync:function($p0){if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('customViewName');}var $0=this.$7._get($p0);if(ss.isNullOrUndefined($0)){var $1=new tab._Deferred();$1.reject(tab.JavaScriptApi$4._createInvalidCustomViewName($p0));return $1.get_promise();}return tab._CustomViewImpl._removeAsync(this,$0._impl);},_rememberCustomViewAsync:function($p0){if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createInvalidParameter('customViewName');}return tab._CustomViewImpl._saveNewAsync(this,$p0);},_setActiveCustomViewAsDefaultAsync:function(){return tab._CustomViewImpl._makeCurrentCustomViewDefaultAsync(this);},_getParametersAsync:function(){return tab._ParameterImpl._getParametersAsync(this);},_changeParameterValueAsync:function($p0,$p1){return tab._ParameterImpl._changeValueAsync(this,$p0,$p1,ss.Delegate.create(this,function($p1_0){ this.$1.$3D($p1_0);}));},_update:function($p0){this.$13($p0);},_sendCommand:function($p0,$p1){this.$1._sendCommand($p0,$p1);},$F:function($p0){return this.$10($p0.$0,$p0.$3);},$10:function($p0,$p1){var $0=new tab._Deferred();if(ss.isValue(this.$3)&&$p0===this.$3.get_$9()){$0.resolve(this.$3.get_$8());return $0.get_promise();}var $1={};$1['api.switchToSheetName']=$p0;$1['api.switchToRepositoryUrl']=$p1;$1['api.oldRepositoryUrl']=this.$3.get_$D();var $2=new tab._CommandReturnHandler('api.SwitchActiveSheetCommand',0,ss.Delegate.create(this,function($p1_0){ this.$1.$0=ss.Delegate.create(this,function(){ this.$1.$0=null;$0.resolve(this.$3.get_$8());});}),function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand($1,$2);return $0.get_promise();},_updateActiveSheetAsync:function(){var $0=new tab._Deferred();var $1={};$1['api.switchToSheetName']=this.$3.get_$9();$1['api.switchToRepositoryUrl']=this.$3.get_$D();$1['api.oldRepositoryUrl']=this.$3.get_$D();var $2=new tab._CommandReturnHandler('api.UpdateActiveSheetCommand',0,ss.Delegate.create(this,function($p1_0){ $0.resolve(this.$3.get_$8());}),function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this._sendCommand($1,$2);return $0.get_promise();},$13:function($p0){var $0=new tab._CommandReturnHandler('api.GetClientInfoCommand',0,ss.Delegate.create(this,function($p1_0){ var $1_0=$p1_0;this.$14($1_0);if(ss.isValue($p0)){$p0();}}),null);this._sendCommand(null,$0);},$14:function($p0){if(ss.isValue($p0.isAutoUpdate)){this.$1.$39(!$p0.isAutoUpdate);}if(ss.isValue($p0.isDownloadAllowed)){this.set__isDownloadAllowed($p0.isDownloadAllowed);}if(ss.isValue($p0.clientUrl)){this.$1.set_$24($p0.clientUrl);}if(ss.isValue($p0.workbookName)){this.$2=$p0.workbookName;}this.$16($p0);this.$15($p0);},$15:function($p0){var $0=$p0.currentSheetName;var $1=this.$5._get($0);if(ss.isNullOrUndefined($1)&&ss.isNullOrUndefined(this.$4)){throw tab.JavaScriptApi$4._createInternalError('The active sheet was not specified in baseSheets');}if(ss.isValue(this.$3)&&this.$3.get_$9()===$0){return;}if(ss.isValue(this.$3)){this.$3.set_$10(false);var $2=this.$5._get(this.$3.get_$9());if(ss.isValue($2)){$2.$0.$7=false;}}if(ss.isValue(this.$4)){var $3=tab.$create__SheetInfoImpl(this.$4.get_$9(),'worksheet',-1,this.$4.get_$E(),this.get__workbook(),'',true,true);this.$4=null;this.$3=new tab._WorksheetImpl($3,this,null);}else{var $4=null;for(var $5=0,$6=$p0.baseSheets.length;$5<$6;$5++){if($p0.visibleSheets[$5]===$0){$4=$p0.baseSheets[$5];break;}}if(ss.isNullOrUndefined($4)){throw tab.JavaScriptApi$4._createInternalError('No base sheet was found corresponding to the active sheet.');}if($4.isDashboard){var $7=new tab._DashboardImpl($1.$0,this);this.$3=$7;var $8=tab._WorkbookImpl.$11($p0.frames);$7.$1D($8,$p0.visibleSheets,$p0.repositoryUrls);}else{this.$3=new tab._WorksheetImpl($1.$0,this,null);}$1.$0.$7=true;}this.$3.set_$10(true);},$16:function($p0){var $0=$p0.visibleSheets;var $1=$p0.repositoryUrls;var $2=$p0.baseSheets;if(ss.isNullOrUndefined($2)){return;}for(var $3=0;$3<$0.length;$3++){var $4=$2[$3];var $5=$0[$3];var $6=this.$5._get($5);var $7=tab._WorkbookImpl.$12($4);if(ss.isNullOrUndefined($6)){var $8=$5===$p0.currentSheetName;var $9=tab.$create__SheetInfoImpl($5,($4.isDashboard)?'dashboard':'worksheet',$3,$7,this.get__workbook(),$1[$3],$8,false);$6=new tableauSoftware.SheetInfo($9);this.$5._add($5,$6);}else{$6.$0.$6=$7;}}}} tab._WorksheetImpl=function(sheetInfoImpl,workbookImpl,parentDashboardImpl){this.$18=new tab._Collection();this.$20=new tab._Collection();this.$31=new tab._Collection();tab._WorksheetImpl.initializeBase(this,[sheetInfoImpl,workbookImpl]);this.$19=parentDashboardImpl;} tab._WorksheetImpl.$27=function($p0){if(ss.isNullOrUndefined($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('filterOptions');}if(ss.isNullOrUndefined($p0.min)&&ss.isNullOrUndefined($p0.max)){throw tab.JavaScriptApi$4._create('invalidParameter','At least one of filterOptions.min or filterOptions.max must be specified.');}var $0={};if(ss.isValue($p0.min)){$0.min=$p0.min;}if(ss.isValue($p0.max)){$0.max=$p0.max;}if(ss.isValue($p0.nullOption)){$0.nullOption=tab._Enums.$5($p0.nullOption,'filterOptions.nullOption');}return $0;} tab._WorksheetImpl.$28=function($p0){if(ss.isNullOrUndefined($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('filterOptions');}var $0={};$0.rangeType=tab._Enums.$1($p0.rangeType,'filterOptions.rangeType');$0.periodType=tab._Enums.$0($p0.periodType,'filterOptions.periodType');if($0.rangeType==='lastn'||$0.rangeType==='nextn'){if(ss.isNullOrUndefined($p0.rangeN)){throw tab.JavaScriptApi$4._create('missingRangeNForRelativeDateFilters','Missing rangeN field for a relative date filter of LASTN or NEXTN.');}$0.rangeN=tab._Utility.$9($p0.rangeN);}if(ss.isValue($p0.anchorDate)){if(!tab._Utility.$4($p0.anchorDate)||!tab._Utility.$5($p0.anchorDate)){throw tab.JavaScriptApi$4._createInvalidDateParameter('filterOptions.anchorDate');}$0.anchorDate=$p0.anchorDate;}return $0;} tab._WorksheetImpl.$29=function($p0){if(ss.isValue($p0['invalidFieldCaption'])){return tab.JavaScriptApi$4._create('invalidFilterFieldName',$p0['invalidFieldCaption']);}else if(ss.isValue($p0['invalidValues'])){return tab.JavaScriptApi$4._create('invalidFilterFieldValue',$p0['invalidValues']);}return null;} tab._WorksheetImpl.$2A=function($p0,$p1,$p2){return new tab._CommandReturnHandler($p0,1,function($p1_0){ var $1_0=tab._WorksheetImpl.$29($p1_0);if($1_0==null){$p2.resolve($p1);}else{$p2.reject($1_0);}},function($p1_0,$p1_1){ if($p1_0){$p2.reject(tab.JavaScriptApi$4._createInvalidFilterFieldNameOrValue($p1));}else{var $1_0=tab.JavaScriptApi$4._create('filterCannotBePerformed',$p1_1);$p2.reject($1_0);}});} tab._WorksheetImpl.$35=function($p0){if(ss.isValue($p0['invalidFields'])){return tab.JavaScriptApi$4._create('invalidSelectionFieldName',$p0['invalidFields']);}else if(ss.isValue($p0['invalidValues'])){return tab.JavaScriptApi$4._create('invalidSelectionValue',$p0['invalidValues']);}else if(ss.isValue($p0['invalidDates'])){return tab.JavaScriptApi$4._create('invalidSelectionDate',$p0['invalidDates']);}return null;} tab._WorksheetImpl.$36=function($p0){if(ss.isValue($p0)&&tab._Utility.$4($p0)){var $0=$p0.getUTCFullYear();var $1=$p0.getUTCMonth()+1;var $2=$p0.getUTCDate();return $0.toString()+'-'+$1.toString()+'-'+$2.toString();}return '';} tab._WorksheetImpl.prototype={$17:null,$19:null,get__dataSources:function(){return this.$18;},set__dataSources:function($p0){this.$18=$p0;return $p0;},get_$8:function(){return this.get_$1A();},get_$1A:function(){if(this.$17==null){this.$17=new tableauSoftware.Worksheet(this);}return this.$17;},get_$1B:function(){return this.$19;},get_$1C:function(){if(ss.isValue(this.$19)){return this.$19.get_$1A();}return null;},$1D:function(){return tab.JavaScriptApi$2.$9(this);},$1E:function(){if(!this.get_$10()&&ss.isNullOrUndefined(this.$19)){throw tab.JavaScriptApi$4._createNotActiveSheet();}this.get_$B().get__viz()._impl.$2E(this.get_$9());},$1F:function(){if(!this.get_$10()&&ss.isNullOrUndefined(this.$19)){throw tab.JavaScriptApi$4._createNotActiveSheet();}this.get_$B().get__viz()._impl.$2F(this.get_$9());},get__filters:function(){return this.$20;},set__filters:function($p0){this.$20=$p0;return $p0;},$21:function(){return tableauSoftware.Filter._getFiltersAsync(this);},$22:function($p0,$p1,$p2,$p3){return this.$2C($p0,$p1,$p2,$p3);},$23:function($p0){return this.$2B($p0);},$24:function($p0,$p1){var $0=tab._WorksheetImpl.$27($p1);return this.$2D($p0,$0);},$25:function($p0,$p1){var $0=tab._WorksheetImpl.$28($p1);return this.$2E($p0,$0);},$26:function($p0,$p1,$p2,$p3){if(ss.isNullOrUndefined($p1)&&$p2!=='all'){throw tab.JavaScriptApi$4._createInvalidParameter('values');}return this.$2F($p0,$p1,$p2,$p3);},$2B:function($p0){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('fieldName');}var $0=new tab._Deferred();var $1={};$1['api.fieldCaption']=$p0;$1['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$1['api.dashboardName']=this.get_$1B().get_$9();}var $2=tab._WorksheetImpl.$2A('api.ClearFilterCommand',$p0,$0);this.get_$B()._sendCommand($1,$2);return $0.get_promise();},$2C:function($p0,$p1,$p2,$p3){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('fieldName');}$p2=tab._Enums.$2($p2,'updateType');var $0=[];if(tab._jQueryShim.$12($p1)){for(var $4=0;$4<$p1.length;$4++){$0.push($p1[$4].toString());}}else if(ss.isValue($p1)){$0.push($p1.toString());}var $1=new tab._Deferred();var $2={};$2['api.fieldCaption']=$p0;$2['api.filterUpdateType']=$p2;$2['api.exclude']=(ss.isValue($p3)&&$p3.isExcludeMode)?true:false;if($p2!=='all'){$2['api.filterCategoricalValues']=tab.JsonUtil.toJson($0,false,'');}$2['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$2['api.dashboardName']=this.get_$1B().get_$9();}var $3=tab._WorksheetImpl.$2A('api.ApplyCategoricalFilterCommand',$p0,$1);this.get_$B()._sendCommand($2,$3);return $1.get_promise();},$2D:function($p0,$p1){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('fieldName');}if(ss.isNullOrUndefined($p1)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('filterOptions');}var $0={};$0['api.fieldCaption']=$p0;if(ss.isValue($p1.min)){if(tab._Utility.$4($p1.min)){var $3=$p1.min;if(tab._Utility.$5($3)){$0['api.filterRangeMin']=tab._WorksheetImpl.$36($3);}else{throw tab.JavaScriptApi$4._createInvalidDateParameter('filterOptions.min');}}else{$0['api.filterRangeMin']=$p1.min;}}if(ss.isValue($p1.max)){if(tab._Utility.$4($p1.max)){var $4=$p1.max;if(tab._Utility.$5($4)){$0['api.filterRangeMax']=tab._WorksheetImpl.$36($4);}else{throw tab.JavaScriptApi$4._createInvalidDateParameter('filterOptions.max');}}else{$0['api.filterRangeMax']=$p1.max;}}if(ss.isValue($p1.nullOption)){$0['api.filterRangeNullOption']=$p1.nullOption;}$0['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$0['api.dashboardName']=this.get_$1B().get_$9();}var $1=new tab._Deferred();var $2=tab._WorksheetImpl.$2A('api.ApplyRangeFilterCommand',$p0,$1);this.get_$B()._sendCommand($0,$2);return $1.get_promise();},$2E:function($p0,$p1){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createInvalidParameter('fieldName');}else if(ss.isNullOrUndefined($p1)){throw tab.JavaScriptApi$4._createInvalidParameter('filterOptions');}var $0={};$0['api.fieldCaption']=$p0;if(ss.isValue($p1)){$0['api.filterPeriodType']=$p1.periodType;$0['api.filterDateRangeType']=$p1.rangeType;if($p1.rangeType==='lastn'||$p1.rangeType==='nextn'){if(ss.isNullOrUndefined($p1.rangeN)){throw tab.JavaScriptApi$4._create('missingRangeNForRelativeDateFilters','Missing rangeN field for a relative date filter of LASTN or NEXTN.');}$0['api.filterDateRange']=$p1.rangeN;}if(ss.isValue($p1.anchorDate)){$0['api.filterDateArchorValue']=tab._WorksheetImpl.$36($p1.anchorDate);}}$0['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$0['api.dashboardName']=this.get_$1B().get_$9();}var $1=new tab._Deferred();var $2=tab._WorksheetImpl.$2A('api.ApplyRelativeDateFilterCommand',$p0,$1);this.get_$B()._sendCommand($0,$2);return $1.get_promise();},$2F:function($p0,$p1,$p2,$p3){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if(tab._Utility.$1($p0)){throw tab.JavaScriptApi$4._createNullOrEmptyParameter('fieldName');}$p2=tab._Enums.$2($p2,'updateType');var $0=null;var $1=null;if(tab._jQueryShim.$12($p1)){$0=[];var $5=$p1;for(var $6=0;$6<$5.length;$6++){$0.push($5[$6].toString());}}else if(tab._Utility.$2($p1)){$0=[];$0.push($p1.toString());}else if(ss.isValue($p1)&&ss.isValue($p1.levels)){var $7=$p1.levels;$1=[];if(tab._jQueryShim.$12($7)){var $8=$7;for(var $9=0;$9<$8.length;$9++){$1.push($8[$9].toString());}}else{$1.push($7.toString());}}else if(ss.isValue($p1)){throw tab.JavaScriptApi$4._createInvalidParameter('values');}var $2={};$2['api.fieldCaption']=$p0;$2['api.filterUpdateType']=$p2;$2['api.exclude']=(ss.isValue($p3)&&$p3.isExcludeMode)?true:false;if($0!=null){$2['api.filterHierarchicalValues']=tab.JsonUtil.toJson($0,false,'');}if($1!=null){$2['api.filterHierarchicalLevels']=tab.JsonUtil.toJson($1,false,'');}var $3=new tab._Deferred();$2['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$2['api.dashboardName']=this.get_$1B().get_$9();}var $4=tab._WorksheetImpl.$2A('api.ApplyHierarchicalFilterCommand',$p0,$3);this.get_$B()._sendCommand($2,$4);return $3.get_promise();},get__selectedMarks:function(){return this.$31;},set__selectedMarks:function($p0){this.$31=$p0;return $p0;},$32:function(){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}var $0=new tab._Deferred();var $1={};$1['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$1['api.dashboardName']=this.get_$1B().get_$9();}$1['api.filterUpdateType']='replace';var $2=new tab._CommandReturnHandler('api.SelectMarksCommand',1,function($p1_0){ $0.resolve();},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this.get_$B()._sendCommand($1,$2);return $0.get_promise();},$33:function($p0,$p1,$p2){if(!this.get_$10()&&ss.isNullOrUndefined(this.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}if($p0==null&&$p1==null){return this.$32();}if(tab._Utility.$2($p0)&&(tab._jQueryShim.$12($p1)||tab._Utility.$2($p1)||!tab._Enums.$4($p1))){return this.$37($p0,$p1,$p2);}else if(tab._jQueryShim.$12($p0)){return this.$39($p0,$p1);}else{return this.$38($p0,$p1);}},$34:function(){return tab._MarkImpl.$7(this);},$37:function($p0,$p1,$p2){var $0=[];var $1=[];var $2=[];var $3=[];var $4=[];var $5=[];this.$3A($0,$1,$2,$3,$4,$5,$p0,$p1);return this.$3C(null,$0,$1,$2,$3,$4,$5,$p2);},$38:function($p0,$p1){var $0=$p0;var $1=[];var $2=[];var $3=[];var $4=[];var $5=[];var $6=[];var $dict1=$0;for(var $key2 in $dict1){var $7={key:$key2,value:$dict1[$key2]};if($p0.hasOwnProperty($7.key)){if(!tab._jQueryShim.$11($0[$7.key])){this.$3A($1,$2,$3,$4,$5,$6,$7.key,$7.value);}}}return this.$3C(null,$1,$2,$3,$4,$5,$6,$p1);},$39:function($p0,$p1){var $0=[];var $1=[];var $2=[];var $3=[];var $4=[];var $5=[];var $6=[];for(var $7=0;$7<$p0.length;$7++){var $8=$p0[$7];if(ss.isValue($8.$0.get_$4())&&$8.$0.get_$4()>0){$6.push($8.$0.get_$4());}else{var $9=$8.$0.get_$3();for(var $A=0;$A<$9.get__length();$A++){var $B=$9.get_item($A);if($B.hasOwnProperty('fieldName')&&$B.hasOwnProperty('value')&&!tab._jQueryShim.$11($B.fieldName)&&!tab._jQueryShim.$11($B.value)){this.$3A($0,$1,$2,$3,$4,$5,$B.fieldName,$B.value);}}}}return this.$3C($6,$0,$1,$2,$3,$4,$5,$p1);},$3A:function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7){var $0=$p7;if(tab._WorksheetImpl.$30.test($p6)){this.$3B($p2,$p3,$p6,$p7);}else if(ss.isValue($0.min)||ss.isValue($0.max)){var $1={};if(ss.isValue($0.min)){if(tab._Utility.$4($0.min)){var $3=$0.min;if(tab._Utility.$5($3)){$1.min=tab._WorksheetImpl.$36($3);}else{throw tab.JavaScriptApi$4._createInvalidDateParameter('options.min');}}else{$1.min=$0.min;}}if(ss.isValue($0.max)){if(tab._Utility.$4($0.max)){var $4=$0.max;if(tab._Utility.$5($4)){$1.max=tab._WorksheetImpl.$36($4);}else{throw tab.JavaScriptApi$4._createInvalidDateParameter('options.max');}}else{$1.max=$0.max;}}if(ss.isValue($0.nullOption)){var $5=tab._Enums.$5($0.nullOption,'options.nullOption');$1.nullOption=$5;}else{$1.nullOption='allValues';}var $2=tab.JsonUtil.toJson($1,false,'');this.$3B($p4,$p5,$p6,$2);}else{this.$3B($p0,$p1,$p6,$p7);}},$3B:function($p0,$p1,$p2,$p3){var $0=[];if(tab._jQueryShim.$12($p3)){var $1=$p3;for(var $2=0;$2<$1.length;$2++){$0.push($1[$2]);}}else{$0.push($p3);}$p1.push($0);$p0.push($p2);},$3C:function($p0,$p1,$p2,$p3,$p4,$p5,$p6,$p7){var $0={};$p7=tab._Enums.$3($p7,'updateType');$0['api.worksheetName']=this.get_$9();if(ss.isValue(this.get_$1B())){$0['api.dashboardName']=this.get_$1B().get_$9();}$0['api.filterUpdateType']=$p7;if(!tab._Utility.$1($p0)){$0['api.tupleIds']=tab.JsonUtil.toJson($p0,false,'');}if(!tab._Utility.$1($p1)&&!tab._Utility.$1($p2)){$0['api.categoricalFieldCaption']=tab.JsonUtil.toJson($p1,false,'');var $3=[];for(var $4=0;$4<$p2.length;$4++){var $5=tab.JsonUtil.toJson($p2[$4],false,'');$3.push($5);}$0['api.categoricalMarkValues']=tab.JsonUtil.toJson($3,false,'');}if(!tab._Utility.$1($p3)&&!tab._Utility.$1($p4)){$0['api.hierarchicalFieldCaption']=tab.JsonUtil.toJson($p3,false,'');var $6=[];for(var $7=0;$7<$p4.length;$7++){var $8=tab.JsonUtil.toJson($p4[$7],false,'');$6.push($8);}$0['api.hierarchicalMarkValues']=tab.JsonUtil.toJson($6,false,'');}if(!tab._Utility.$1($p5)&&!tab._Utility.$1($p6)){$0['api.rangeFieldCaption']=tab.JsonUtil.toJson($p5,false,'');var $9=[];for(var $A=0;$A<$p6.length;$A++){var $B=tab.JsonUtil.toJson($p6[$A],false,'');$9.push($B);}$0['api.rangeMarkValues']=tab.JsonUtil.toJson($9,false,'');}if(tab._Utility.$1($0['api.tupleIds'])&&tab._Utility.$1($0['api.categoricalFieldCaption'])&&tab._Utility.$1($0['api.hierarchicalFieldCaption'])&&tab._Utility.$1($0['api.rangeFieldCaption'])){throw tab.JavaScriptApi$4._createInvalidParameter('fieldNameOrFieldValuesMap');}var $1=new tab._Deferred();var $2=new tab._CommandReturnHandler('api.SelectMarksCommand',1,function($p1_0){ var $1_0=tab._WorksheetImpl.$35($p1_0);if($1_0==null){$1.resolve();}else{$1.reject($1_0);}},function($p1_0,$p1_1){ $1.reject(tab.JavaScriptApi$4._createServerError($p1_1));});this.get_$B()._sendCommand($0,$2);return $1.get_promise();}} tab.JsonUtil=function(){} tab.JsonUtil.parseJson=function(jsonValue){return tab._jQueryShim.parseJSON(jsonValue);} tab.JsonUtil.toJson=function(it,pretty,indentStr){pretty=(pretty||false);indentStr=(indentStr||'');var $0=[];return tab.JsonUtil.$3(it,pretty,indentStr,$0);} tab.JsonUtil.$1=function($p0,$p1,$p2){if(ss.isValue((Array).prototype['indexOf'])){return $p0.indexOf($p1,$p2);}$p2=($p2||0);var $0=$p0.length;if($0>0){for(var $1=$p2;$1<$0;$1++){if($p0[$1]===$p1){return $1;}}}return -1;} tab.JsonUtil.$2=function($p0,$p1,$p2){var $0=tab.JsonUtil.$1($p0,$p1,$p2);return $0>=0;} tab.JsonUtil.$3=function($p0,$p1,$p2,$p3){if(tab.JsonUtil.$2($p3,$p0)){throw Error.createError('The object contains recursive reference of sub-objects',null);}if(ss.isUndefined($p0)){return 'undefined';}if($p0==null){return 'null';}var $0=tab._jQueryShim.$13($p0);if($0==='number'||$0==='boolean'){return $p0.toString();}if($0==='string'){return tab.JsonUtil.$6($p0);}$p3.push($p0);var $1;$p2=($p2||'');var $2=($p1)?$p2+'\t':'';var $3=($p0.__json__||$p0.json);if(tab._jQueryShim.$11($3)){var $6=$3;$1=$6($p0);if($p0!==$1){var $7=tab.JsonUtil.$3($1,$p1,$2,$p3);$p3.pop();return $7;}}if(ss.isValue($p0.nodeType)&&ss.isValue($p0.cloneNode)){throw Error.createError("Can't serialize DOM nodes",null);}var $4=($p1)?' ':'';var $5=($p1)?'\n':'';if(tab._jQueryShim.$12($p0)){return tab.JsonUtil.$5($p0,$p1,$p2,$p3,$2,$5);}if($0==='function'){$p3.pop();return null;}return tab.JsonUtil.$4($p0,$p1,$p2,$p3,$2,$5,$4);} tab.JsonUtil.$4=function($p0,$p1,$p2,$p3,$p4,$p5,$p6){var $0=$p0;var $1=new ss.StringBuilder('{');var $2=false;var $dict1=$0;for(var $key2 in $dict1){var $3={key:$key2,value:$dict1[$key2]};var $4;var $5;if(typeof($3.key)==='number'){$4='"'+$3.key+'"';}else if(typeof($3.key)==='string'){$4=tab.JsonUtil.$6($3.key);}else{continue;}$5=tab.JsonUtil.$3($3.value,$p1,$p4,$p3);if($5==null){continue;}if($2){$1.append(',');}$1.append($p5+$p4+$4+':'+$p6+$5);$2=true;}$1.append($p5+$p2+'}');$p3.pop();return $1.toString();} tab.JsonUtil.$5=function($p0,$p1,$p2,$p3,$p4,$p5){var $0=false;var $1=new ss.StringBuilder('[');var $2=$p0;for(var $3=0;$3<$2.length;$3++){var $4=$2[$3];var $5=tab.JsonUtil.$3($4,$p1,$p4,$p3);if($5==null){$5='undefined';}if($0){$1.append(',');}$1.append($p5+$p4+$5);$0=true;}$1.append($p5+$p2+']');$p3.pop();return $1.toString();} tab.JsonUtil.$6=function($p0){$p0 = ('"' + $p0.replace(/(["\\])/g, '\\$1') + '"');$p0=$p0.replace(new RegExp('[\u000c]','g'),'\\f');$p0=$p0.replace(new RegExp('[\u0008]','g'),'\\b');$p0=$p0.replace(new RegExp('[\n]','g'),'\\n');$p0=$p0.replace(new RegExp('[\t]','g'),'\\t');$p0=$p0.replace(new RegExp('[\r]','g'),'\\r');return $p0;} Type.registerNamespace('tableauSoftware');tab.$create_DataValue=function(value,formattedValue,aliasedValue){var $o={};$o.value=value;if(tab._Utility.$1(aliasedValue)){$o.formattedValue=formattedValue;}else{$o.formattedValue=aliasedValue;}return $o;} tab.$create_Point=function(x,y){var $o={};$o.x=x;$o.y=y;return $o;} tab.$create_Size=function(width,height){var $o={};$o.width=width;$o.height=height;return $o;} tab.$create_SheetSize=function(behavior,minSize,maxSize){var $o={};$o.behavior=(behavior||'automatic');if(ss.isValue(minSize)){$o.minSize=minSize;}if(ss.isValue(maxSize)){$o.maxSize=maxSize;}return $o;} tableauSoftware.CustomView=function(customViewImpl){this._impl=customViewImpl;} tableauSoftware.CustomView.prototype={_impl:null,getWorkbook:function(){return this._impl.get_$A();},getUrl:function(){return this._impl.get_$B();},getName:function(){return this._impl.get_$C();},setName:function(value){this._impl.set_$C(value);},getOwnerName:function(){return this._impl.get_$D();},getAdvertised:function(){return this._impl.get_$E();},setAdvertised:function(value){this._impl.set_$E(value);},getDefault:function(){return this._impl.get_$F();},saveAsync:function(){return this._impl.$10();}} tab.CustomViewEvent=function(eventName,viz,customViewImpl){tab.CustomViewEvent.initializeBase(this,[eventName,viz]);this.$2=new tab.JavaScriptApi$6(viz._impl.get__workbookImpl(),customViewImpl);} tab.CustomViewEvent.prototype={$2:null,getCustomViewAsync:function(){return tab._CustomViewImpl._getAsync(this.$2);}} tab.JavaScriptApi$6=function(workbook,customViewImpl){tab.JavaScriptApi$6.initializeBase(this,[workbook,null]);this.$2=customViewImpl;} tab.JavaScriptApi$6.prototype={$2:null,get__customViewImpl:function(){return this.$2;}} tableauSoftware.Dashboard=function(dashboardImpl){tableauSoftware.Dashboard.initializeBase(this,[dashboardImpl]);} tableauSoftware.Dashboard.prototype={_impl:null,getObjects:function(){return this._impl.get_$1C()._toApiCollection();},getWorksheets:function(){return this._impl.get_$1B()._toApiCollection();}} tableauSoftware.DashboardObject=function(frameInfo,dashboard,worksheet){if(frameInfo.$0==='worksheet'&&ss.isNullOrUndefined(worksheet)){throw tab.JavaScriptApi$4._createInternalError('worksheet parameter is required for WORKSHEET objects');}else if(frameInfo.$0!=='worksheet'&&ss.isValue(worksheet)){throw tab.JavaScriptApi$4._createInternalError('worksheet parameter should be undefined for non-WORKSHEET objects');}this.$0=frameInfo;this.$1=dashboard;this.$2=worksheet;} tableauSoftware.DashboardObject.prototype={$0:null,$1:null,$2:null,getObjectType:function(){return this.$0.$0;},getDashboard:function(){return this.$1;},getWorksheet:function(){return this.$2;},getPosition:function(){return this.$0.$2;},getSize:function(){return this.$0.$3;}} tableauSoftware.DataSource=function(impl){this.$0=impl;} tableauSoftware.DataSource.prototype={$0:null,getName:function(){return this.$0.get_$6();},getFields:function(){return this.$0.get_$7()._toApiCollection();},getIsPrimary:function(){return this.$0.get_$8();}} tableauSoftware.Field=function(dataSource,name,fieldRoleType,fieldAggrType){this.$0=dataSource;this.$1=name;this.$2=fieldRoleType;this.$3=fieldAggrType;} tableauSoftware.Field.prototype={$0:null,$1:null,$2:null,$3:null,getDataSource:function(){return this.$0;},getName:function(){return this.$1;},getRole:function(){return this.$2;},getAggregation:function(){return this.$3;}} tableauSoftware.CategoricalFilter=function(worksheetImpl,filterJson){tableauSoftware.CategoricalFilter.initializeBase(this,[worksheetImpl,filterJson]);this.$D(filterJson);} tableauSoftware.CategoricalFilter.prototype={$B:false,$C:null,getIsExcludeMode:function(){return this.$B;},getAppliedValues:function(){return this.$C;},_updateFromJson:function(filterJson){this.$D(filterJson);},$D:function($p0){this.$B=$p0.isExclude;if(ss.isValue($p0.catAppliedValues)){this.$C=[];var $enum1=ss.IEnumerator.getEnumerator($p0.catAppliedValues);while($enum1.moveNext()){var $0=$enum1.current;this.$C.push(tab._Utility.$18($0));}}}} tableauSoftware.Filter=function(worksheetImpl,filterJson){this.$1=worksheetImpl;this.$A(filterJson);} tableauSoftware.Filter._getAsync=function($p0){var $0=new tab._Deferred();var $1=$p0.get__worksheetImpl();var $2={};$2['api.worksheetName']=$1.get_$9();if(ss.isValue($1.get_$1B())){$2['api.dashboardName']=$1.get_$1B().get_$9();}$2['api.fieldName']=$p0.get__filterFieldName();$2['api.filterHierarchicalLevels']=0;var $3=new tab._CommandReturnHandler('api.GetOneFilterInfoCommand',0,function($p1_0){ var $1_0=$p1_0;var $1_1=tableauSoftware.Filter._createFilter($1,$1_0);$0.resolve($1_1);},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});$1.get_$B()._sendCommand($2,$3);return $0.get_promise();} tableauSoftware.Filter._getFiltersAsync=function($p0){if(!$p0.get_$10()&&ss.isNullOrUndefined($p0.get_$1B())){throw tab.JavaScriptApi$4._createNotActiveSheet();}var $0=new tab._Deferred();var $1={};$1['api.worksheetName']=$p0.get_$9();if(ss.isValue($p0.get_$1B())){$1['api.dashboardName']=$p0.get_$1B().get_$9();}var $2=new tab._CommandReturnHandler('api.GetFiltersListCommand',0,function($p1_0){ var $1_0=$p1_0;$p0.set__filters(tableauSoftware.Filter.$8($p0,$1_0));$0.resolve($p0.get__filters()._toApiCollection());},function($p1_0,$p1_1){ $0.reject(tab.JavaScriptApi$4._createServerError($p1_1));});$p0.get_$B()._sendCommand($1,$2);return $0.get_promise();} tableauSoftware.Filter._createFilter=function($p0,$p1){switch($p1.type){case 'C':return new tableauSoftware.CategoricalFilter($p0,$p1);case 'RD':return new tableauSoftware.RelativeDateFilter($p0,$p1);case 'H':return new tableauSoftware.HierarchicalFilter($p0,$p1);case 'Q':return new tableauSoftware.QuantitativeFilter($p0,$p1);}return null;} tableauSoftware.Filter.$8=function($p0,$p1){var $0=new tab._Collection();var $enum1=ss.IEnumerator.getEnumerator($p1.filters);while($enum1.moveNext()){var $1=$enum1.current;$0._add($1.fieldName,tableauSoftware.Filter._createFilter($p0,$1));}return $0;} tableauSoftware.Filter.$9=function($p0){switch($p0){case 'dimension':return 'dimension';case 'measure':return 'measure';}return 'unknown';} tableauSoftware.Filter.prototype={$0:null,$1:null,$2:null,$3:null,$4:null,$5:null,$6:null,$7:null,getFilterType:function(){return this.$2;},getFieldName:function(){return this.$3;},getWorksheet:function(){return this.$1.get_$1A();},getFieldAsync:function(){var $0=new tab._Deferred();if(this.$4==null){var $1=function($p1_0){ $0.reject($p1_0);return null;};var $2=ss.Delegate.create(this,function($p1_0){ this.$4=new tableauSoftware.Field($p1_0,this.$0,this.$6,this.$7);$0.resolve(this.$4);return null;});tab.JavaScriptApi$2.$A(this.$1,this.$5).then($2,$1);}else{window.setTimeout(ss.Delegate.create(this,function(){ $0.resolve(this.$4);}),0);}return $0.get_promise();},_update:function($p0){this.$A($p0);this._updateFromJson($p0);},_addFieldParams:function($p0){},$A:function($p0){this.$0=$p0.fieldName;this.$3=$p0.caption;switch($p0.type){case 'C':this.$2='categorical';break;case 'RD':this.$2='relativedate';break;case 'H':this.$2='hierarchical';break;case 'Q':this.$2='quantitative';break;}this.$4=null;this.$5=$p0.datasourceName;this.$6=tableauSoftware.Filter.$9($p0.fieldRoleType);this.$7=tab.JavaScriptApi$2.$B($p0.fieldAggrType);}} tab.FilterEvent=function(eventName,viz,worksheetImpl,fieldName,filterCaption){tab.FilterEvent.initializeBase(this,[eventName,viz,worksheetImpl]);this.$3=filterCaption;this.$4=new tab.JavaScriptApi$5(viz._impl.get__workbookImpl(),worksheetImpl,fieldName,filterCaption);} tab.FilterEvent.prototype={$3:null,$4:null,getFieldName:function(){return this.$3;},getFilterAsync:function(){return tableauSoftware.Filter._getAsync(this.$4);}} tab.JavaScriptApi$5=function(workbookImpl,worksheetImpl,fieldFieldName,filterCaption){tab.JavaScriptApi$5.initializeBase(this,[workbookImpl,worksheetImpl]);this.$2=fieldFieldName;this.$3=filterCaption;} tab.JavaScriptApi$5.prototype={$2:null,$3:null,get__filterFieldName:function(){return this.$2;},get_$4:function(){return this.$3;}} tableauSoftware.HierarchicalFilter=function(worksheetImpl,filterJson){tableauSoftware.HierarchicalFilter.initializeBase(this,[worksheetImpl,filterJson]);this.$C(filterJson);} tableauSoftware.HierarchicalFilter.prototype={$B:0,_addFieldParams:function($p0){$p0['api.filterHierarchicalLevels']=this.$B;},_updateFromJson:function(filterJson){this.$C(filterJson);},$C:function($p0){this.$B=$p0.levels;}} tableauSoftware.QuantitativeFilter=function(worksheetImpl,filterJson){tableauSoftware.QuantitativeFilter.initializeBase(this,[worksheetImpl,filterJson]);this.$10(filterJson);} tableauSoftware.QuantitativeFilter.prototype={$B:null,$C:null,$D:null,$E:null,$F:false,getMin:function(){return this.$D;},getMax:function(){return this.$E;},getIncludeNullValues:function(){return this.$F;},getDomainMin:function(){return this.$B;},getDomainMax:function(){return this.$C;},_updateFromJson:function(filterJson){this.$10(filterJson);},$10:function($p0){this.$B=tab._Utility.$18($p0.domainMinValue);this.$C=tab._Utility.$18($p0.domainMaxValue);this.$D=tab._Utility.$18($p0.minValue);this.$E=tab._Utility.$18($p0.maxValue);this.$F=$p0.includeNullValues;}} tableauSoftware.RelativeDateFilter=function(worksheetImpl,filterJson){tableauSoftware.RelativeDateFilter.initializeBase(this,[worksheetImpl,filterJson]);this.$B='year';this.$C='last';this.$D=0;this.$E(filterJson);} tableauSoftware.RelativeDateFilter.prototype={$B:null,$C:null,$D:0,getPeriod:function(){return this.$B;},getRange:function(){return this.$C;},getRangeN:function(){return this.$D;},_updateFromJson:function(filterJson){this.$E(filterJson);},$E:function($p0){this.$B=tab._Enums.$0($p0.periodType,'periodType');this.$C=tab._Enums.$1($p0.rangeType,'rangeType');this.$D=$p0.rangeN;}} tab._LoadFeedback=function(){} tab._LoadFeedback.prototype={$0:null,$1:null,$2:null,$3:function($p0){this.$0=$p0.$9;var $0=this.$0.style;this.$2=$0.display;$0.position='relative';$0.overflow='hidden';$0.display='none';var $1=[];$1.push('
');$1.push('
');var $2=document.createElement('div');$2.innerHTML=$1.join('');this.$1=$2.firstChild;this.$0.appendChild(this.$1);$2.innerHTML='';$2=null;},$4:function(){if(ss.isValue(this.$0)){this.$0.style.display=this.$2;}},$5:function(){if(ss.isValue(this.$1)){this.$1.innerHTML='';this.$1.parentNode.removeChild(this.$1);this.$1=null;}}} tableauSoftware.Mark=function(tupleIdOrPairs){this.$0=new tab._MarkImpl(tupleIdOrPairs);} tableauSoftware.Mark.prototype={$0:null,getPairs:function(){return this.$0.get_$5();}} tab.MarksEvent=function(eventName,viz,worksheetImpl){tab.MarksEvent.initializeBase(this,[eventName,viz,worksheetImpl]);this.$3=new tab.JavaScriptApi$8(viz._impl.get__workbookImpl(),worksheetImpl);} tab.MarksEvent.prototype={$3:null,getMarksAsync:function(){return tab._MarkImpl.$6(this.$3);}} tab.JavaScriptApi$8=function(workbookImpl,worksheetImpl){tab.JavaScriptApi$8.initializeBase(this,[workbookImpl,worksheetImpl]);} tableauSoftware.Pair=function(fieldName,value){this.fieldName=fieldName;this.value=value;this.formattedValue=(ss.isValue(value))?value.toString():'';} tableauSoftware.Pair.prototype={fieldName:null,value:null,formattedValue:null} tableauSoftware.Parameter=function(impl){this._impl=impl;} tableauSoftware.Parameter.prototype={_impl:null,getName:function(){return this._impl.get_$C();},getCurrentValue:function(){return this._impl.get_$D();},getDataType:function(){return this._impl.get_$E();},getAllowableValuesType:function(){return this._impl.get_$F();},getAllowableValues:function(){return this._impl.get_$10();},getMinValue:function(){return this._impl.get_$11();},getMaxValue:function(){return this._impl.get_$12();},getStepSize:function(){return this._impl.get_$13();},getDateStepPeriod:function(){return this._impl.get_$14();}} tab.ParameterEvent=function(eventName,viz,parameterName){tab.ParameterEvent.initializeBase(this,[eventName,viz]);this.$2=new tab.JavaScriptApi$7(viz._impl.get__workbookImpl(),parameterName);} tab.ParameterEvent.prototype={$2:null,getParameterName:function(){return this.$2.get__parameterName();},getParameterAsync:function(){return tab._ParameterImpl._getAsync(this.$2);}} tab.JavaScriptApi$7=function(workbookImpl,parameterName){tab.JavaScriptApi$7.initializeBase(this,[workbookImpl,null]);this.$2=parameterName;} tab.JavaScriptApi$7.prototype={$2:null,get__parameterName:function(){return this.$2;}} tableauSoftware.Sheet=function(sheetImpl){this._impl=sheetImpl;} tableauSoftware.Sheet.prototype={_impl:null,getName:function(){return this._impl.get_$9();},getIndex:function(){return this._impl.get_$A();},getWorkbook:function(){return this._impl.get_$B().get__workbook();},getSize:function(){return this._impl.get_$E();},getIsHidden:function(){return this._impl.get_$F();},getIsActive:function(){return this._impl.get_$10();},getSheetType:function(){return this._impl.get_$12();},getUrl:function(){return this._impl.get_$D();},changeSizeAsync:function(size){return this._impl.$13(size);}} tableauSoftware.SheetInfo=function(impl){this.$0=impl;} tableauSoftware.SheetInfo.prototype={$0:null,getName:function(){return this.$0.$0;},getSheetType:function(){return this.$0.$5;},getSize:function(){return this.$0.$6;},getIndex:function(){return this.$0.$1;},getUrl:function(){return this.$0.$3;},getIsActive:function(){return this.$0.$7;},getIsHidden:function(){return this.$0.$4;},getWorkbook:function(){return this.$0.$2;}} tab.TableauEvent=function(eventName,viz){this.$0=viz;this.$1=eventName;} tab.TableauEvent.prototype={$0:null,$1:null,getViz:function(){return this.$0;},getEventName:function(){return this.$1;}} tab.EventContext=function(workbookImpl,worksheetImpl){this.$0=workbookImpl;this.$1=worksheetImpl;} tab.EventContext.prototype={$0:null,$1:null,get__workbookImpl:function(){return this.$0;},get__worksheetImpl:function(){return this.$1;}} tab.TabSwitchEvent=function(eventName,viz,oldName,newName){tab.TabSwitchEvent.initializeBase(this,[eventName,viz]);this.$2=oldName;this.$3=newName;} tab.TabSwitchEvent.prototype={$2:null,$3:null,getOldSheetName:function(){return this.$2;},getNewSheetName:function(){return this.$3;}} tableauSoftware.Viz=function(parentElement,url,options){this._impl=new tab._VizImpl(this,parentElement,url,options);this._impl.$3B();} tableauSoftware.Viz.prototype={_impl:null,getAreTabsHidden:function(){return this._impl.get_$20();},getIsToolbarHidden:function(){return this._impl.get_$21();},getIsHidden:function(){return this._impl.get_$22();},getParentElement:function(){return this._impl.get_$23();},getUrl:function(){return this._impl.get_$25();},getWorkbook:function(){return this._impl.get_$26();},getAreAutomaticUpdatesPaused:function(){return this._impl.get_$27();},addEventListener:function(eventName,handler){this._impl.$28(eventName,handler);},removeEventListener:function(eventName,handler){this._impl.$29(eventName,handler);},dispose:function(){this._impl.$2A();},show:function(){this._impl.$2B();},hide:function(){this._impl.$2C();},showExportDataDialog:function(worksheetWithinDashboard){this._impl.$2E(worksheetWithinDashboard);},showExportCrossTabDialog:function(worksheetWithinDashboard){this._impl.$2F(worksheetWithinDashboard);},showExportImageDialog:function(){this._impl.$2D();},showExportPDFDialog:function(){this._impl.$30();},revertAllAsync:function(){return this._impl.$31();},refreshDataAsync:function(){return this._impl.$32();},showShareDialog:function(){this._impl.$33();},showDownloadWorkbookDialog:function(){this._impl.$34();},pauseAutomaticUpdatesAsync:function(){return this._impl.$35();},resumeAutomaticUpdatesAsync:function(){return this._impl.$36();},toggleAutomaticUpdatesAsync:function(){return this._impl.$37();},setFrameSize:function(width,height){this._impl.$38(width,height);}} tableauSoftware.VizManager=function(){} tableauSoftware.VizManager.getVizs=function(){return tab._VizManagerImpl.get_$1();} tableauSoftware.Workbook=function(workbookImpl){this.$0=workbookImpl;} tableauSoftware.Workbook.prototype={$0:null,getViz:function(){return this.$0.get__viz();},getPublishedSheetsInfo:function(){return this.$0.get__publishedSheets()._toApiCollection();},getName:function(){return this.$0.get__name();},getActiveSheet:function(){return this.$0.get__activeSheetImpl().get_$8();},getActiveCustomView:function(){return this.$0.get__activeCustomView();},activateSheetAsync:function(sheetNameOrIndex){return this.$0._setActiveSheetAsync(sheetNameOrIndex);},revertAllAsync:function(){return this.$0._revertAllAsync();},getCustomViewsAsync:function(){return this.$0._getCustomViewsAsync();},showCustomViewAsync:function(customViewName){return this.$0._showCustomViewAsync(customViewName);},removeCustomViewAsync:function(customViewName){return this.$0._removeCustomViewAsync(customViewName);},rememberCustomViewAsync:function(customViewName){return this.$0._rememberCustomViewAsync(customViewName);},setActiveCustomViewAsDefaultAsync:function(){return this.$0._setActiveCustomViewAsDefaultAsync();},getParametersAsync:function(){return this.$0._getParametersAsync();},changeParameterValueAsync:function(parameterName,value){return this.$0._changeParameterValueAsync(parameterName,value);}} tableauSoftware.Worksheet=function(impl){tableauSoftware.Worksheet.initializeBase(this,[impl]);} tableauSoftware.Worksheet.prototype={_impl:null,getDataSourcesAsync:function(){return this._impl.$1D();},getParentDashboard:function(){return this._impl.get_$1C();},getFiltersAsync:function(){return this._impl.$21();},applyFilterAsync:function(fieldName,values,updateType,options){return this._impl.$22(fieldName,values,updateType,options);},clearFilterAsync:function(fieldName){return this._impl.$23(fieldName);},applyRangeFilterAsync:function(fieldName,options){return this._impl.$24(fieldName,options);},applyRelativeDateFilterAsync:function(fieldName,options){return this._impl.$25(fieldName,options);},applyHierarchicalFilterAsync:function(fieldName,values,updateType,options){return this._impl.$26(fieldName,values,updateType,options);},clearSelectedMarksAsync:function(){return this._impl.$32();},selectMarksAsync:function(fieldNameOrFieldValuesMap,valueOrUpdateType,updateType){return this._impl.$33(fieldNameOrFieldValuesMap,valueOrUpdateType,updateType);},getSelectedMarksAsync:function(){return this._impl.$34();}} tab.WorksheetEvent=function(eventName,viz,worksheetImpl){tab.WorksheetEvent.initializeBase(this,[eventName,viz]);this.$2=worksheetImpl;} tab.WorksheetEvent.prototype={$2:null,getWorksheet:function(){return this.$2.get_$1A();}} tab._jQueryShim=function(){} tab._jQueryShim.$11=function($p0){return tab._jQueryShim.$13($p0)==='function';} tab._jQueryShim.$12=function($p0){if(ss.isValue(Array.isArray)){return Array.isArray($p0);}return tab._jQueryShim.$13($p0)==='array';} tab._jQueryShim.$13=function($p0){return ($p0==null)?String($p0):(tab._jQueryShim.$8[tab._jQueryShim.$A.call($p0)]||'object');} tab._jQueryShim.$14=function($p0){if(ss.isValue(tab._jQueryShim.$9)){return ($p0==null)?'':tab._jQueryShim.$9.call($p0);}return ($p0==null)?'':$p0.replace(tab._jQueryShim.$B,'').replace(tab._jQueryShim.$C,'');} tab._jQueryShim.parseJSON=function($p0){if(typeof($p0)!=='string'||ss.isNullOrUndefined($p0)){return null;}$p0=tab._jQueryShim.$14($p0);if(window.JSON && window.JSON.parse){return window.JSON.parse($p0);}if(tab._jQueryShim.$D.test($p0.replace(tab._jQueryShim.$E,'@').replace(tab._jQueryShim.$F,']').replace(tab._jQueryShim.$10,''))){return (new Function("return " + $p0))();}throw new Error('Invalid JSON: '+$p0);} tab._ApiCommand.registerClass('tab._ApiCommand');tab._apiServerResultParser.registerClass('tab._apiServerResultParser');tab.JavaScriptApi$3.registerClass('tab.JavaScriptApi$3');tab._CommandReturnHandler.registerClass('tab._CommandReturnHandler');tab._CrossDomainMessageRouter.registerClass('tab._CrossDomainMessageRouter');tab.JavaScriptApi$0.registerClass('tab.JavaScriptApi$0',null,tab.ICrossDomainMessageHandler);tab._Enums.registerClass('tab._Enums');tab._ApiBootstrap.registerClass('tab._ApiBootstrap');tab._CustomViewImpl.registerClass('tab._CustomViewImpl');tab._SheetImpl.registerClass('tab._SheetImpl');tab._DashboardImpl.registerClass('tab._DashboardImpl',tab._SheetImpl);tab.JavaScriptApi$2.registerClass('tab.JavaScriptApi$2');tab._DeferredUtil.registerClass('tab._DeferredUtil');tab._CollectionImpl.registerClass('tab._CollectionImpl');tab._DeferredImpl.registerClass('tab._DeferredImpl');tab._PromiseImpl.registerClass('tab._PromiseImpl');tab._MarkImpl.registerClass('tab._MarkImpl');tab._ParameterImpl.registerClass('tab._ParameterImpl');tab.JavaScriptApi$4.registerClass('tab.JavaScriptApi$4');tab._Utility.registerClass('tab._Utility');tab._VizImpl.registerClass('tab._VizImpl',null,tab.ICrossDomainMessageHandler);tab._VizManagerImpl.registerClass('tab._VizManagerImpl');tab._VizParameters.registerClass('tab._VizParameters');tab._WorkbookImpl.registerClass('tab._WorkbookImpl');tab._WorksheetImpl.registerClass('tab._WorksheetImpl',tab._SheetImpl);tab.JsonUtil.registerClass('tab.JsonUtil');tableauSoftware.CustomView.registerClass('tableauSoftware.CustomView');tab.TableauEvent.registerClass('tab.TableauEvent');tab.CustomViewEvent.registerClass('tab.CustomViewEvent',tab.TableauEvent);tab.EventContext.registerClass('tab.EventContext');tab.JavaScriptApi$6.registerClass('tab.JavaScriptApi$6',tab.EventContext);tableauSoftware.Sheet.registerClass('tableauSoftware.Sheet');tableauSoftware.Dashboard.registerClass('tableauSoftware.Dashboard',tableauSoftware.Sheet);tableauSoftware.DashboardObject.registerClass('tableauSoftware.DashboardObject');tableauSoftware.DataSource.registerClass('tableauSoftware.DataSource');tableauSoftware.Field.registerClass('tableauSoftware.Field');tableauSoftware.Filter.registerClass('tableauSoftware.Filter');tableauSoftware.CategoricalFilter.registerClass('tableauSoftware.CategoricalFilter',tableauSoftware.Filter);tab.WorksheetEvent.registerClass('tab.WorksheetEvent',tab.TableauEvent);tab.FilterEvent.registerClass('tab.FilterEvent',tab.WorksheetEvent);tab.JavaScriptApi$5.registerClass('tab.JavaScriptApi$5',tab.EventContext);tableauSoftware.HierarchicalFilter.registerClass('tableauSoftware.HierarchicalFilter',tableauSoftware.Filter);tableauSoftware.QuantitativeFilter.registerClass('tableauSoftware.QuantitativeFilter',tableauSoftware.Filter);tableauSoftware.RelativeDateFilter.registerClass('tableauSoftware.RelativeDateFilter',tableauSoftware.Filter);tab._LoadFeedback.registerClass('tab._LoadFeedback');tableauSoftware.Mark.registerClass('tableauSoftware.Mark');tab.MarksEvent.registerClass('tab.MarksEvent',tab.WorksheetEvent);tab.JavaScriptApi$8.registerClass('tab.JavaScriptApi$8',tab.EventContext);tableauSoftware.Pair.registerClass('tableauSoftware.Pair');tableauSoftware.Parameter.registerClass('tableauSoftware.Parameter');tab.ParameterEvent.registerClass('tab.ParameterEvent',tab.TableauEvent);tab.JavaScriptApi$7.registerClass('tab.JavaScriptApi$7',tab.EventContext);tableauSoftware.SheetInfo.registerClass('tableauSoftware.SheetInfo');tab.TabSwitchEvent.registerClass('tab.TabSwitchEvent',tab.TableauEvent);tableauSoftware.Viz.registerClass('tableauSoftware.Viz');tableauSoftware.VizManager.registerClass('tableauSoftware.VizManager');tableauSoftware.Workbook.registerClass('tableauSoftware.Workbook');tableauSoftware.Worksheet.registerClass('tableauSoftware.Worksheet',tableauSoftware.Sheet);tab._jQueryShim.registerClass('tab._jQueryShim');tab._ApiCommand.$0='xdomainSourceId';tab._CrossDomainMessageRouter.$0=0;tab._CrossDomainMessageRouter.$1=0;tab._CrossDomainMessageRouter.$2={};tab._CrossDomainMessageRouter.$3={};tab._CrossDomainMessageRouter.$4={};tab._CrossDomainMessageRouter.$5={};tab.JavaScriptApi$2.$0={sum:'SUM',average:'AVG',min:'MIN',max:'MAX','std-dev':'STDEV','std-dev-p':'STDEVP','var':'VAR','var-p':'VARP',count:'COUNT','count-d':'COUNTD',median:'MEDIAN',attr:'ATTR',none:'NONE',year:'YEAR',qtr:'QTR',month:'MONTH',day:'DAY',hour:'HOUR',minute:'MINUTE',second:'SECOND',week:'WEEK',weekday:'WEEKDAY','month-year':'MONTHYEAR',mdy:'MDY',end:'END','trunc-year':'TRUNC_YEAR','trunc-qtr':'TRUNC_QTR','trunc-month':'TRUNC_MONTH','trunc-week':'TRUNC_WEEK','trunc-day':'TRUNC_DAY','trunc-hour':'TRUNC_HOUR','trunc-minute':'TRUNC_MINUTE','trunc-second':'TRUNC_SECOND',quart1:'QUART1',quart3:'QUART3',skewness:'SKEWNESS',kurtosis:'KURTOSIS','in-out':'INOUT','sum-xsqr':'SUM_XSQR',user:'USER'};tab._VizManagerImpl.$0=[];tab._WorksheetImpl.$30=new RegExp('\\[[^\\]]+\\]\\.','g');tab._jQueryShim.$8={'[object Boolean]':'boolean','[object Number]':'number','[object String]':'string','[object Function]':'function','[object Array]':'array','[object Date]':'date','[object RegExp]':'regexp','[object Object]':'object'};tab._jQueryShim.$9=String.prototype.trim;tab._jQueryShim.$A=Object.prototype.toString;tab._jQueryShim.$B=new RegExp('^[\\s\\xA0]+');tab._jQueryShim.$C=new RegExp('[\\s\\xA0]+$');tab._jQueryShim.$D=new RegExp('^[\\],:{}\\s]*$');tab._jQueryShim.$E=new RegExp('\\\\(?:["\\\\\\/bfnrt]|u[0-9a-fA-F]{4})','g');tab._jQueryShim.$F=new RegExp('"[^"\\\\\\n\\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?','g');tab._jQueryShim.$10=new RegExp('(?:^|:|,)(?:\\s*\\[)+','g');tableauSoftware.Promise=tab._PromiseImpl;tab._Deferred=tab._DeferredImpl;tab._Collection=tab._CollectionImpl;tableauSoftware.DashboardObjectType={BLANK:'blank',WORKSHEET:'worksheet',QUICK_FILTER:'quickFilter',PARAMETER_CONTROL:'parameterControl',PAGE_FILTER:'pageFilter',LEGEND:'legend',TITLE:'title',TEXT:'text',IMAGE:'image',WEB_PAGE:'webPage'};tableauSoftware.FilterType={CATEGORICAL:'categorical',QUANTITATIVE:'quantitative',HIERARCHICAL:'hierarchical',RELATIVEDATE:'relativedate'};tableauSoftware.ParameterDataType={FLOAT:'float',INTEGER:'integer',STRING:'string',BOOLEAN:'boolean',DATE:'date',DATETIME:'datetime'};tableauSoftware.ParameterAllowableValuesType={ALL:'all',LIST:'list',RANGE:'range'};tableauSoftware.PeriodType={YEAR:'year',QUARTER:'quarter',MONTH:'month',WEEK:'week',DAY:'day',HOUR:'hour',MINUTE:'minute',SECOND:'second'};tableauSoftware.DateRangeType={LAST:'last',LASTN:'lastn',NEXT:'next',NEXTN:'nextn',CURR:'curr',TODATE:'todate'};tableauSoftware.SheetSizeBehavior={AUTOMATIC:'automatic',EXACTLY:'exactly',RANGE:'range',ATLEAST:'atleast',ATMOST:'atmost'};tableauSoftware.SheetType={WORKSHEET:'worksheet',DASHBOARD:'dashboard'};tableauSoftware.FilterUpdateType={ALL:'all',REPLACE:'replace',ADD:'add',REMOVE:'remove'};tableauSoftware.SelectionUpdateType={REPLACE:'replace',ADD:'add',REMOVE:'remove'};tableauSoftware.NullOption={NULL_VALUES:'nullValues',NON_NULL_VALUES:'nonNullValues',ALL_VALUES:'allValues'};tableauSoftware.ErrorCode={INTERNAL_ERROR:'internalError',SERVER_ERROR:'serverError',INVALID_PARAMETER:'invalidParameter',INVALID_URL:'invalidUrl',STALE_DATA_REFERENCE:'staleDataReference',VIZ_ALREADY_IN_MANAGER:'vizAlreadyInManager',NO_URL_OR_PARENT_ELEMENT_NOT_FOUND:'noUrlOrParentElementNotFound',INVALID_FILTER_FIELDNAME:'invalidFilterFieldName',INVALID_FILTER_FIELDVALUE:'invalidFilterFieldValue',INVALID_FILTER_FIELDNAME_OR_VALUE:'invalidFilterFieldNameOrValue',FILTER_CANNOT_BE_PERFORMED:'filterCannotBePerformed',NOT_ACTIVE_SHEET:'notActiveSheet',INVALID_CUSTOM_VIEW_NAME:'invalidCustomViewName',MISSING_RANGEN_FOR_RELATIVE_DATE_FILTERS:'missingRangeNForRelativeDateFilters',MISSING_MAX_SIZE:'missingMaxSize',MISSING_MIN_SIZE:'missingMinSize',MISSING_MINMAX_SIZE:'missingMinMaxSize',INVALID_SIZE:'invalidSize',INVALID_SIZE_BEHAVIOR_ON_WORKSHEET:'invalidSizeBehaviorOnWorksheet',SHEET_NOT_IN_WORKBOOK:'sheetNotInWorkbook',INDEX_OUT_OF_RANGE:'indexOutOfRange',DOWNLOAD_WORKBOOK_NOT_ALLOWED:'downloadWorkbookNotAllowed',NULL_OR_EMPTY_PARAMETER:'nullOrEmptyParameter',BROWSER_NOT_CAPABLE:'browserNotCapable',UNSUPPORTED_EVENT_NAME:'unsupportedEventName',INVALID_DATE_PARAMETER:'invalidDateParameter',INVALID_SELECTION_FIELDNAME:'invalidSelectionFieldName',INVALID_SELECTION_VALUE:'invalidSelectionValue',INVALID_SELECTION_DATE:'invalidSelectionDate',NO_URL_FOR_HIDDEN_WORKSHEET:'noUrlForHiddenWorksheet'};tableauSoftware.TableauEventName={FIRST_INTERACTIVE:'firstinteractive',MARKS_SELECTION:'marksselection',PARAMETER_VALUE_CHANGE:'parametervaluechange',FILTER_CHANGE:'filterchange',CUSTOM_VIEW_LOAD:'customviewload',CUSTOM_VIEW_SAVE:'customviewsave',CUSTOM_VIEW_REMOVE:'customviewremove',CUSTOM_VIEW_SET_DEFAULT:'customviewsetdefault',TAB_SWITCH:'tabswitch'};tableauSoftware.FieldRoleType={DIMENSION:'dimension',MEASURE:'measure',UNKNOWN:'unknown'};tableauSoftware.FieldAggregationType={SUM:'SUM',AVG:'AVG',MIN:'MIN',MAX:'MAX',STDEV:'STDEV',STDEVP:'STDEVP',VAR:'VAR',VARP:'VARP',COUNT:'COUNT',COUNTD:'COUNTD',MEDIAN:'MEDIAN',ATTR:'ATTR',NONE:'NONE',YEAR:'YEAR',QTR:'QTR',MONTH:'MONTH',DAY:'DAY',HOUR:'HOUR',MINUTE:'MINUTE',SECOND:'SECOND',WEEK:'WEEK',WEEKDAY:'WEEKDAY',MONTHYEAR:'MONTHYEAR',MDY:'MDY',END:'END',TRUNC_YEAR:'TRUNC_YEAR',TRUNC_QTR:'TRUNC_QTR',TRUNC_MONTH:'TRUNC_MONTH',TRUNC_WEEK:'TRUNC_WEEK',TRUNC_DAY:'TRUNC_DAY',TRUNC_HOUR:'TRUNC_HOUR',TRUNC_MINUTE:'TRUNC_MINUTE',TRUNC_SECOND:'TRUNC_SECOND',QUART1:'QUART1',QUART3:'QUART3',SKEWNESS:'SKEWNESS',KURTOSIS:'KURTOSIS',INOUT:'INOUT',SUM_XSQR:'SUM_XSQR',USER:'USER'};tableauSoftware.ToolbarPosition={TOP:'top',BOTTOM:'bottom'};restoreTypeSystem();tab._ApiBootstrap.initialize();})();