1234567891011121314 |
- /**
- * IBM Confidential OCO Source Materials IBM Business Platform: CA Reporting
- * (C) Copyright IBM Corp. 2018
- *
- * The source code for this program is not published or otherwise divested of
- * its trade secrets, irrespective of what has been deposited with the U.S.
- * Copyright Office
- */
- define("bi/classicviewer/nls/ClassicViewerMessages",{root:!0,cs:!0,cy:!0,da:!0,de:!0,es:!0,fi:!0,fr:!0,gl:!0,hr:!0,hu:!0,it:!0,ja:!0,kk:!0,ko:!0,nb:!0,nl:!0,no:!0,pl:!0,pt:!0,"pt-br":!0,ro:!0,ru:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-cn":!0,"zh-tw":!0}),define("bi/classicviewer/nls/root/ClassicViewerMessages",{classicviewer_welcome:"Reporting",viewer_welcome:"Reporting",invalid_refresh:"Browser refresh is not supported."}),define("bi/classicviewer/nls/StringResource",["i18n!bi/classicviewer/nls/ClassicViewerMessages","bi/glass/utils/Lexicon"],function(localeResources,Lexicon){"use strict";var lexicon=new Lexicon({data:localeResources,verbose:!0}),StringResources=function(){};return StringResources.prototype.get=function(key,interpolationOptions){return lexicon.translate(key,interpolationOptions)},new StringResources}),define("text!bi/authoring/res/DatasetList.xml",[],function(){return'<!--\n IBM Confidential \n OCO Source Materials\n IBM Cognos Products: rs\n (C) Copyright IBM Corp. 2020\n The source code for this program is not published or otherwise divested of its trade secrets, irrespective of what has been deposited with the U.S. Copyright Office.\n-->\n<report useStyleVersion="11.5" expressionLocale="en-us">\n <modelPath/>\n <drillBehavior modelBasedDrillThru="false"/>\n <queries>\n <query name="">\n <source>\n <model/>\n </source>\n <selection/>\n </query>\n </queries>\n <layouts>\n <layout>\n <reportPages>\n <page name="Page1">\n <style>\n <defaultStyles>\n <defaultStyle refStyle="pg"/>\n </defaultStyles>\n </style>\n <pageBody>\n <style>\n <defaultStyles>\n <defaultStyle refStyle="pb"/>\n </defaultStyles>\n </style>\n <contents>\n <list refQuery="" horizontalPagination="true" rowsPerPage="100">\n <style>\n <defaultStyles>\n <defaultStyle refStyle="ls"/>\n </defaultStyles>\n <CSS value="border-collapse:collapse;height: 100%"/>\n </style>\n </list>\n </contents>\n </pageBody>\n </page>\n </reportPages>\n </layout>\n </layouts>\n <XMLAttributes>\n <XMLAttribute output="no" name="RS_openInPageDesign" value="default"/>\n </XMLAttributes>\n</report>\n'}),define("bi/authoring/utils/pat/rsLaunchParameters",["jquery","text!bi/authoring/res/DatasetList.xml"],function($,datasetList){var getOpenerLaunchParameters=function(v_bParent){var v_oOpenerLaunchParameters;try{v_oOpenerLaunchParameters=v_bParent?window.opener.parent.require("bi/authoring/utils/pat/rsLaunchParameters"):window.opener.require("bi/authoring/utils/pat/rsLaunchParameters")}catch(e){}return v_oOpenerLaunchParameters},rsLaunchParameters={m_oParameterMap:{},m_oTemplates:{DatasetList:datasetList}};return rsLaunchParameters.GetTemplate=function(v_sTemplate){return this.m_oTemplates[v_sTemplate]},rsLaunchParameters.Store=function(v_oData,v_bJSONEncode,v_bUseParent){var v_sKey=(v_bUseParent?"-":"")+Date.now().toString();if(v_bJSONEncode){var v_oAdd=new Map,v_aRemove=[];Object.keys(v_oData).forEach(function(key){"object"!=typeof v_oData[key]||void 0==v_oData[key]||"function"==typeof v_oData[key].toString&&v_oData[key].toString().indexOf("Window")>=0||(v_oAdd.set("JSON_"+key,JSON.stringify(v_oData[key])),v_aRemove.push(key))});for(var idx=0;idx<v_aRemove.length;++idx)delete v_oData[v_aRemove[idx]];v_oAdd.forEach(function(value,key){v_oData[key]=value})}return this.m_oParameterMap[v_sKey]=v_oData,v_sKey},rsLaunchParameters.UseParent=function(){return{Store:function(v_oData,v_bJSONEncode){return this.Store(v_oData,v_bJSONEncode,!0)}.bind(this),GetTemplate:this.GetTemplate.bind(this)}},rsLaunchParameters.Retrieve=function(v_sKey){var v_oReturn;if(v_sKey){var v_oOpenerLaunchParameters=getOpenerLaunchParameters(0==v_sKey.indexOf("-"));if(v_oOpenerLaunchParameters){if(v_oReturn=v_oOpenerLaunchParameters.m_oParameterMap[v_sKey]){var v_oNonExtendable={};for(var p in v_oReturn)v_oReturn.hasOwnProperty(p)&&v_oReturn[p]&&"function"==typeof v_oReturn[p].toString&&v_oReturn[p].toString().indexOf("Window")>=0&&(v_oNonExtendable[p]=v_oReturn[p],delete v_oReturn[p]);try{v_oReturn=$.extend(!0,{},v_oReturn)}catch(e){console.log("rsLaunchParameters.Retrieve failed to extend launch parameters")}for(var p in v_oNonExtendable)v_oReturn[p]=v_oNonExtendable[p];var v_oParsed={};for(var p in v_oReturn)if(0==p.indexOf("JSON_")&&v_oReturn.hasOwnProperty(p)){var v_sP=p.slice(5);v_oParsed[v_sP]=JSON.parse(v_oReturn[p])}for(var p in v_oParsed)v_oParsed.hasOwnProperty(p)&&(v_oReturn[p]=v_oParsed[p],delete v_oReturn["JSON_"+p])}delete v_oOpenerLaunchParameters.m_oParameterMap[v_sKey]}}return v_oReturn},rsLaunchParameters}),define("bi/authoring/utils/pat/rsPromptParameters",[],function(){"use strict";function xmlEncode(v_sString){return v_sString.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}function addClassicViewerPrompts(v_elForm,v_aPromptParameters){for(var i=0;i<v_aPromptParameters.length;i++){var v_oParameter=v_aPromptParameters[i];if(Array.isArray(v_oParameter.value))for(var j=0;j<v_oParameter.value.length;j++){var v_elInput=v_elForm.appendChild(document.createElement("input"));v_elInput.type="hidden",v_elInput.name=v_oParameter.name,v_elInput.value=v_oParameter.value[j]}else{var v_elInput=v_elForm.appendChild(document.createElement("input"));v_elInput.type="hidden",v_elInput.name=v_oParameter.name,v_elInput.value=v_oParameter.value}}}function buildSelectOptionXML(v_oValue){return'<selectOption useValue="'+xmlEncode(v_oValue.use.toString())+'"'+(v_oValue.hasOwnProperty("display")?' displayValue="'+xmlEncode(v_oValue.display.toString())+'"':"")+"/>"}function buildBoundRangeXML(v_oValue){return'<selectBoundRange><start useValue="'+xmlEncode(v_oValue.boundRange.start.use.toString())+'"'+(v_oValue.boundRange.start.hasOwnProperty("display")?' displayValue="'+xmlEncode(v_oValue.boundRange.start.display.toString())+'"':"")+'/><end useValue="'+xmlEncode(v_oValue.boundRange.end.use.toString())+'"'+(v_oValue.boundRange.end.hasOwnProperty("display")?' displayValue="'+xmlEncode(v_oValue.boundRange.end.display.toString())+'"':"")+"/></selectBoundRange>"}function buildUnboundedEndRangeXML(v_oValue){return'<selectUnboundedEndRange><start useValue="'+xmlEncode(v_oValue.unboundedEndRange.start.use.toString())+'"'+(v_oValue.unboundedEndRange.start.hasOwnProperty("display")?' displayValue="'+xmlEncode(v_oValue.unboundedEndRange.start.display.toString())+'"':"")+"/></selectUnboundedEndRange>"}function buildUnboundedStartRangeXML(v_oValue){return'<selectUnboundedStartRange><end useValue="'+xmlEncode(v_oValue.unboundedStartRange.end.use.toString())+'"'+(v_oValue.unboundedStartRange.end.hasOwnProperty("display")?' displayValue="'+xmlEncode(v_oValue.unboundedStartRange.end.display.toString())+'"':"")+"/></selectUnboundedStartRange>"}function convertPromptValuesToXML(v_aValues){for(var v_sXMLValues="",i=0;i<v_aValues.length;i++){var v_oValue=v_aValues[i];if(v_oValue.hasOwnProperty("use"))v_sXMLValues+=buildSelectOptionXML(v_oValue);else if(v_oValue.hasOwnProperty("boundRange")){if(!(v_oValue.boundRange.start&&v_oValue.boundRange.start.hasOwnProperty("use")&&v_oValue.boundRange.end&&v_oValue.boundRange.end.hasOwnProperty("use"))){console.log("rsPromptParameters.convertPromptValuesToXML ... unexpected boundRange format.");break}v_sXMLValues+=buildBoundRangeXML(v_oValue)}else if(v_oValue.hasOwnProperty("unboundedEndRange")){if(!v_oValue.unboundedEndRange.start||!v_oValue.unboundedEndRange.start.hasOwnProperty("use")){console.log("rsPromptParameters.convertPromptValuesToXML ... unexpected unboundedEndRange format.");break}v_sXMLValues+=buildUnboundedEndRangeXML(v_oValue)}else if(v_oValue.hasOwnProperty("unboundedStartRange")){if(!v_oValue.unboundedStartRange.end||!v_oValue.unboundedStartRange.end.hasOwnProperty("use")){console.log("rsPromptParameters.convertPromptValuesToXML ... unexpected unboundStartRange format.");break}v_sXMLValues+=buildUnboundedStartRangeXML(v_oValue)}}return v_sXMLValues}function convertComplexParameterToClassicViewerXML(v_oPromptParametersXML,v_aComplexParameterObject){for(var i=0;i<v_aComplexParameterObject.length;i++){var v_oPromptParameter=v_aComplexParameterObject[i],v_sName=v_oPromptParameter.name,v_aValues=v_oPromptParameter.value,v_sValues=convertPromptValuesToXML(Array.isArray(v_aValues)?v_aValues:[v_aValues]);v_sName&&v_sValues&&(v_oPromptParametersXML[v_sName]||(v_oPromptParametersXML[v_sName]=[]),v_oPromptParametersXML[v_sName].push(v_sValues))}}function addClassicViewerPromptsComplex(v_elForm,v_aPromptParametersComplex){for(var v_oPromptParametersXML={},i=0;i<v_aPromptParametersComplex.length;i++){var v_aComplexParameterObject;try{v_aComplexParameterObject=JSON.parse(v_aPromptParametersComplex[i]),Array.isArray(v_aComplexParameterObject)||(v_aComplexParameterObject=[v_aComplexParameterObject])}catch(e){return console.log("rsPromptParameters.addClassicViewerPromptsComplex ... invalid promptParameters input : "+v_aPromptParametersComplex[i]),v_aComplexParameterObject=void 0,""}convertComplexParameterToClassicViewerXML(v_oPromptParametersXML,v_aComplexParameterObject)}for(var v_sName in v_oPromptParametersXML)if(v_oPromptParametersXML.hasOwnProperty(v_sName)){for(var v_sXMLValues="",i=0;i<v_oPromptParametersXML[v_sName].length;i++)v_sXMLValues+=v_oPromptParametersXML[v_sName][i];v_sXMLValues="<selectChoices>"+v_sXMLValues+"</selectChoices>";var v_elInput=v_elForm.appendChild(document.createElement("input"));v_elInput.type="hidden",v_elInput.name="p_"+v_sName,v_elInput.value=v_sXMLValues}}function valueToSimpleJson(v_oValue){switch(v_oValue.type){case"simpleParmValueItem":delete v_oValue.type,delete v_oValue.inclusive;break;case"boundRangeParmValueItem":v_oValue={boundRange:{start:v_oValue.start,end:v_oValue.end}};break;case"unboundedStartRangeParmValueItem":v_oValue={unboundedStartRange:{end:v_oValue.end}};break;case"unboundedEndRangeParmValueItem":v_oValue={unboundedEndRange:{start:v_oValue.start}}}return v_oValue}function groupPromptParamters(v_oPromptParameters,v_oPromptParametersComplex){var v_aPromptParametersComplex;if("string"==typeof v_oPromptParametersComplex)try{v_oPromptParametersComplex=JSON.parse(v_oPromptParametersComplex)}catch(e){return void console.log("rsPromptParameters.groupPromptParamters ... invalid promptParameters input : "+v_oPromptParametersComplex)}v_oPromptParameters||(v_oPromptParameters={}),v_oPromptParametersComplex&&(Array.isArray(v_oPromptParametersComplex)?v_aPromptParametersComplex=v_oPromptParametersComplex:"string"==typeof v_oPromptParametersComplex.name?v_aPromptParametersComplex=[v_oPromptParametersComplex]:Object.keys(v_oPromptParametersComplex).forEach(function(key){v_oPromptParameters[key]=v_oPromptParametersComplex[key]}));for(var i=0;v_aPromptParametersComplex&&i<v_aPromptParametersComplex.length;++i){var v_aPromptParametersComplexObject;try{v_aPromptParametersComplexObject="string"==typeof v_aPromptParametersComplex[i]?JSON.parse(v_aPromptParametersComplex[i]):v_aPromptParametersComplex[i],Array.isArray(v_aPromptParametersComplexObject)||(v_aPromptParametersComplexObject=[v_aPromptParametersComplexObject])}catch(e){return void console.log("rsPromptParameters.groupPromptParamters ... invalid promptParameters input : "+v_aPromptParametersComplex[i])}for(var j=0;j<v_aPromptParametersComplexObject.length;j++){var v_oPromptParameter=v_aPromptParametersComplexObject[j],v_sName=v_oPromptParameter.name,v_aValues=[];if(v_oPromptParameter.value&&(v_aValues=Array.isArray(v_oPromptParameter.value)||"number"==typeof v_oPromptParameter.value.length?v_oPromptParameter.value:[v_oPromptParameter.value]),v_sName&&v_aValues){v_oPromptParameters[v_sName]||(v_oPromptParameters[v_sName]=[]);for(var k=0;k<v_aValues.length;++k){var v_oValue=valueToSimpleJson(v_aValues[k]);v_oValue.hasOwnProperty("use")&&v_oPromptParameters[v_sName].push({use:v_oValue.use,display:v_oValue.hasOwnProperty("display")?v_oValue.display:v_oValue.use}),v_oValue.hasOwnProperty("boundRange")?v_oValue.boundRange.start&&v_oValue.boundRange.start.hasOwnProperty("use")&&v_oValue.boundRange.end&&v_oValue.boundRange.end.hasOwnProperty("use")?v_oPromptParameters[v_sName].push({boundRange:{start:{use:v_oValue.boundRange.start.use,display:v_oValue.boundRange.start.hasOwnProperty("display")?v_oValue.boundRange.start.display:v_oValue.boundRange.start.use},end:{use:v_oValue.boundRange.end.use,display:v_oValue.boundRange.end.hasOwnProperty("display")?v_oValue.boundRange.end.display:v_oValue.boundRange.end.use}}}):console.log("rsPromptParameters.groupPromptParamters ... unexpected boundRange format"):v_oValue.hasOwnProperty("unboundedEndRange")?v_oValue.unboundedEndRange.start&&v_oValue.unboundedEndRange.start.hasOwnProperty("use")?v_oPromptParameters[v_sName].push({unboundedEndRange:{start:{use:v_oValue.unboundedEndRange.start.use,display:v_oValue.unboundedEndRange.start.hasOwnProperty("display")?v_oValue.unboundedEndRange.start.display:v_oValue.unboundedEndRange.start.use}}}):console.log("rsPromptParameters.groupPromptParamters ... unexpected unboundedEndRange format."):v_oValue.hasOwnProperty("unboundedStartRange")&&(v_oValue.unboundedStartRange.end&&v_oValue.unboundedStartRange.end.hasOwnProperty("use")?v_oPromptParameters[v_sName].push({unboundedStartRange:{end:{use:v_oValue.unboundedStartRange.end.use,display:v_oValue.unboundedStartRange.end.hasOwnProperty("display")?v_oValue.unboundedStartRange.end.display:v_oValue.unboundedStartRange.end.use}}}):console.log("rsPromptParameters.groupPromptParamters ... unexpected unboundedStartRange format."))}}}}return v_oPromptParameters}function emitValue(v_sTtype,v_oValue){var v_aValue=[];return void 0!==v_oValue&&(v_aValue.push("<bus:"),v_aValue.push(v_sTtype),v_aValue.push(' xsi:type="xsd:string"'),null===v_oValue?v_aValue.push(' xsi:nil="true"/>'):(v_aValue.push(">"),v_aValue.push(xmlEncode(v_oValue.toString())),v_aValue.push("</bus:"),v_aValue.push(v_sTtype),v_aValue.push(">"))),v_aValue.join("")}function emitUseDisplay(v_oValue){return emitValue("use",v_oValue.use)+emitValue("display",v_oValue.display)}function buildSimpleParmValue(v_oValue){return'<item xsi:type="bus:simpleParmValueItem"><bus:inclusive xsi:type="xsd:boolean">true</bus:inclusive>'+emitUseDisplay(v_oValue)+"</item>"}function buildBoundRangeParmValue(v_oValue){return'<item xsi:type="bus:boundRangeParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive><bus:start xsi:type="bus:simpleParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>'+emitUseDisplay(v_oValue.boundRange.start)+'</bus:start><bus:end xsi:type="bus:simpleParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>'+emitUseDisplay(v_oValue.boundRange.end)+"</bus:end></item>"}function buildUnboundedEndRangeParmValue(v_oValue){return'<item xsi:type="bus:unboundedEndRangeParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive><bus:start xsi:type="bus:simpleParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>'+emitUseDisplay(v_oValue.unboundedEndRange.start)+"</bus:start></item>"}function buildUnboundedStartRangeParmValue(v_oValue){return'<item xsi:type="bus:unboundedStartRangeParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive><bus:end xsi:type="bus:simpleParmValueItem"><bus:inclusive xsi:type="xs:boolean">true</bus:inclusive>'+emitUseDisplay(v_oValue.unboundedStartRange.end)+"</bus:end></item>"}function buildBusParameterValues(v_oPromptParameters,v_oPromptParametersComplex,v_sParamsTagName){var v_sParameterValues="<bus:"+(v_sParamsTagName||"parameterValues")+' xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:parameterValue[]" xsi:type="SOAP-ENC:Array">',v_oPromptParameters=groupPromptParamters(v_oPromptParameters,v_oPromptParametersComplex);for(var v_sName in v_oPromptParameters)if(v_oPromptParameters.hasOwnProperty(v_sName)){v_sParameterValues+='<item xsi:type="bus:parameterValue">',v_sParameterValues+='<bus:name xsi:type="xsd:string">'+xmlEncode(v_sName)+"</bus:name>",v_sParameterValues+='<bus:value xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parmValueItem[]">';for(var v_aCurParams=v_oPromptParameters[v_sName],v_iCurParamsLen=v_aCurParams.length,i=0;v_iCurParamsLen>i;i++){var v_oValue=v_aCurParams[i];v_oValue.hasOwnProperty("use")?v_sParameterValues+=buildSimpleParmValue(v_oValue):v_oValue.hasOwnProperty("boundRange")?v_sParameterValues+=buildBoundRangeParmValue(v_oValue):v_oValue.hasOwnProperty("unboundedEndRange")?v_sParameterValues+=buildUnboundedEndRangeParmValue(v_oValue):v_oValue.hasOwnProperty("unboundedStartRange")&&(v_sParameterValues+=buildUnboundedStartRangeParmValue(v_oValue))}v_sParameterValues+="</bus:value>",v_sParameterValues+="</item>"}return v_sParameterValues+="</bus:"+(v_sParamsTagName||"parameterValues")+">"}function convertValueToBoundedRangeFormat(v_oValue){v_oValue.boundRange={start:{use:v_oValue.start.use,display:v_oValue.start.display},end:{use:v_oValue.end.use,display:v_oValue.end.display}},delete v_oValue.start,delete v_oValue.end}function convertValueToUnboundedStartRangeFormat(v_oValue){v_oValue.unboundedStartRange={end:{use:v_oValue.end.use,display:v_oValue.end.display}},delete v_oValue.end}function convertValueToUnboundedEndRangeFormat(v_oValue){v_oValue.unboundedEndRange={start:{use:v_oValue.start.use,display:v_oValue.start.display}},delete v_oValue.start}return{cvAddPromptParameters:function(v_elForm,v_aPromptParameters,v_aPromptParametersComplex){console.log("rsPromptParameters.cvAddPromptParameters ..."),addClassicViewerPrompts(v_elForm,v_aPromptParameters),addClassicViewerPromptsComplex(v_elForm,v_aPromptParametersComplex)},rsBuildPromptParameters:function(v_oPromptParameters,v_oPromptParametersComplex,v_sParamsTagName){return v_oPromptParameters||v_oPromptParametersComplex?buildBusParameterValues(v_oPromptParameters,v_oPromptParametersComplex,v_sParamsTagName):""},rsBuildParameterUrl:function(v_oUrlMap,v_oPromptParameters){var v_aPromptParameters=Array.isArray(v_oPromptParameters)?v_oPromptParameters:[v_oPromptParameters];v_aPromptParameters.forEach(function(v_oPara){if("undefined"!=typeof v_oPara){var v_aValues=Array.isArray(v_oPara.value)?v_oPara.value:[v_oPara.value];v_aValues.forEach(function(v_oValue){switch(v_oValue.type){case"boundRangeParmValueItem":convertValueToBoundedRangeFormat(v_oValue);break;case"unboundedStartRangeParmValueItem":convertValueToUnboundedStartRangeFormat(v_oValue);break;case"unboundedEndRangeParmValueItem":convertValueToUnboundedEndRangeFormat(v_oValue)}delete v_oValue.type,delete v_oValue.inclusive})}}),v_oUrlMap.promptParameters=v_oPromptParameters?JSON.stringify(v_aPromptParameters):null},convertParameterArrayToObject:function(v_aParameters){var v_oParameters={};return v_aParameters&&v_aParameters.length>0&&v_aParameters.forEach(function(v_oParameter){v_oParameter&&v_oParameter.name&&(v_oParameters[v_oParameter.name]=v_oParameter.value)}),v_oParameters}}}),define("bi/authoring/utils/rsPerformance",["q"],function(Q){"use strict";var v_oRsPerformance={M_sPerformanceLogServerHost:void 0,M_sKitVersion:"no kit version",M_bKitVersionIsCached:!1,summarizeInteractiveViewerRun:function(v_oView){this._commonSummarize(v_oView,[{start:"rsContextMenuActions.onSelectItem",end:"rsContentView.render"},{start:"rsContentView.render",end:"rsContentView._onRSApplicationReady"},{start:"rsContentView._onRSApplicationReady",end:"rsContentView.onViewBeforeDraw"},{start:"rsContentView.onViewBeforeDraw",end:"rsContentView.onViewAfterDraw"},{start:"rsContextMenuActions.onSelectItem",end:"rsContentView.onViewAfterDraw"},{start:"authoring-selectItemAndDraw-start",end:"authoring-selectItemAndDraw-stop"}])},summarizeClassicViewerRun:function(v_oView){this._commonSummarize(v_oView,[{start:"rsContextMenuActions.onSelectItem",end:"cvContentView.render"},{start:"cvContentView.render",end:"cvContentView.getViewerConfiguration"},{start:"cvContentView.getViewerConfiguration",end:"cvContentView.onReportStatusComplete"},{start:"cvContentView.onReportStatusComplete",end:"cvContentView._onClassicViewerLoaded"},{start:"rsContextMenuActions.onSelectItem",end:"cvContentView._onClassicViewerLoaded"},{start:"authoring-selectItemAndDraw-start",end:"authoring-selectItemAndDraw-stop"}])},_commonSummarize:function(v_oView,v_aStartEndNames){try{if(this.getEntriesByName("rsContextMenuActions.onSelectItem","mark").length<1)return;v_aStartEndNames.forEach(function(v_o){var v_sName=v_o.start+"->"+v_o.end;try{this.measure(v_sName,v_o.start,v_o.end)}catch(e){}},this);for(var v_aPerformanceFields=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],v_oPerformanceOut={timing:{}},iframe=v_oView.m_iframeAuthoring||v_oView.m_iframeClassicViewer,v_oPerformanceIn=iframe.contentWindow.performance,iPField=0;iPField<v_aPerformanceFields.length;++iPField){var v_sField=v_aPerformanceFields[iPField];void 0!==v_oPerformanceIn.timing[v_sField]&&(v_oPerformanceOut.timing[v_sField]=v_oPerformanceIn.timing[v_sField])}var v_oPerformanceSummary={userAgent:window.navigator.userAgent,urlPath:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")+window.location.pathname,reportName:v_oView.cmProperties.defaultName,date:Date.now(),measures:[],rsWindowPerformance:v_oPerformanceOut};if(this.getEntriesByType("measure").forEach(function(v_oEntry){console.info("rsperf: performance.measure %s %s ms",v_oEntry.name,v_oEntry.duration),v_oPerformanceSummary.measures.push({name:v_oEntry.name,duration:v_oEntry.duration})}),this.clearMeasures(),this.clearMarks(),this.M_sPerformanceLogServerHost){var qPromiseFromValueForLint=Q;Q.all([this.getKitVersion(v_oView.glassContext),this.getPerformanceUUID(v_oView.glassContext),qPromiseFromValueForLint(v_oPerformanceSummary),qPromiseFromValueForLint(v_oView.glassContext)]).then(function(v_aResults){this.sendPerformanceRecordToHost.apply(this,v_aResults)}.bind(this))["catch"](function(){console.info("rsperf: failed to get kit and uuid for logging")}).done(function(v_oResult){console.info("rsperf: _commonSummarized finished")})}else this.getKitVersion(v_oView.glassContext)["catch"](function(err){console.info("rsperf: error while getting kit version")}).done(function(version){console.info("rsperf: kit version %s (cached: %s)",version,this.M_bKitVersionIsCached.toString())}.bind(this))}catch(err){console.warn("_commonSummarize failed with an exception:\n%s",err&&err.toString()||"unknown err"),this.clearMeasures(),this.clearMarks()}},getKitVersion:function(v_oGlassContext){var deferred=Q.defer();return this.M_sKitVersion?(this.M_bKitVersionIsCached=!0,deferred.resolve(this.M_sKitVersion),deferred.promise):(v_oGlassContext.services.ajax.ajax({url:window.location.pathname+"cmplst.txt",type:"GET",dataType:"text"}).fail(function(err){console.warn("getKitVersion() failed "),this.M_sKitVersion="error cannot get kit version",deferred.reject(this.M_sKitVersion)}.bind(this)).done(function(resp){var v_aMatches=resp.match(/^kit_version=\s*((?:\d+.)+\d+)\s*$/m);v_aMatches?this.M_sKitVersion=v_aMatches[1]:this.M_sKitVersion="could not find kit version",deferred.resolve(this.M_sKitVersion)}.bind(this)),deferred.promise)},getPerformanceUUID:function(v_oGlassContext){var deferred=Q.defer();return v_oGlassContext.services.ajax.ajax({url:this.M_sPerformanceLogServerHost+"/_uuids",type:"GET",dataType:"json"}).fail(function(jqXHR,err){deferred.reject("uuid_failed")}).done(function(resp){deferred.resolve(resp.uuids[0])}),deferred.promise},sendPerformanceRecordToHost:function(v_sKit,v_sUuid,v_oRecord,v_oGlassContext){var deferred=Q.defer();return v_oRecord.kitVersion=v_sKit,v_oRecord.kitVersionCached=this.M_bKitVersionIsCached,v_oGlassContext.services.ajax.ajax({headers:{Accept:"application/json","Content-Type":"application/json"},url:this.M_sPerformanceLogServerHost+"/toddtest/"+v_sUuid,type:"PUT",data:JSON.stringify(v_oRecord)}).fail(function(err){console.log("error sendPerformanceRecordToHost: %s",err),deferred.reject(err)}).done(function(result){console.log("succeed sendPerformanceRecordToHost: %s",result),deferred.resolve(result)}),deferred.promise}};return["mark","measure","getEntriesByName","getEntriesByType","clearMeasures","clearMarks"].forEach(function(fname){window.performance[fname]?this[fname]=window.performance[fname].bind(window.performance):-1!=["getEntriesByName","getEntriesByType"].indexOf(fname)?this[fname]=function(){return[]}:this[fname]=function(){}},v_oRsPerformance),v_oRsPerformance}),define("bi/authoring/utils/rsCommon",["jquery","q","doT","bi/commons/utils/Utils","bi/authoring/utils/pat/rsPromptParameters"],function($,Q,dot,Utils,rsPromptParameters){"use strict";function findPromptParameters(options){var v_oPromptParameters;for(var v_sKey in options)if(options.hasOwnProperty(v_sKey)&&v_sKey.length>2&&0==v_sKey.indexOf("p_")&&options[v_sKey]){var v_sName=v_sKey.substring(2);v_oPromptParameters||(v_oPromptParameters={}),v_oPromptParameters[v_sName]||(v_oPromptParameters[v_sName]=[]);for(var v_aOptions=Array.isArray(options[v_sKey])?options[v_sKey]:[options[v_sKey]],i=0;i<v_aOptions.length;i++)v_oPromptParameters[v_sName].push({use:v_aOptions[i],display:v_aOptions[i]})}return v_oPromptParameters}function findPromptParametersComplex(options){return options.promptParameters}function isOutputForDownload(v_sOutputFormat){return-1!==["spreadsheetML","xlsxData","CSV","XML"].indexOf(v_sOutputFormat)}function convertToArrayImpl(v_oParameterValues){var v_aParameterValues=[];if(null!=v_oParameterValues)for(var v_sKey in v_oParameterValues)v_oParameterValues.hasOwnProperty(v_sKey)&&v_oParameterValues[v_sKey]&&v_aParameterValues.push(v_oParameterValues[v_sKey]);return v_aParameterValues}function useViewer(options){var v_bIsViewer=!1;if("dataSet2"===options.type)v_bIsViewer=!1;else switch(options.action){case"edit":v_bIsViewer=!1;break;case"run":case"viewOutput":v_bIsViewer=!0;break;default:(options.isViewer||options.cmProperties&&"output"==options.cmProperties.type)&&(v_bIsViewer=!0)}return v_bIsViewer}return{reject:function(deferred,msg,tag){console.log((tag?tag+": ":"")+msg),deferred.reject(new Error(msg))},isObjectOfType:function(cmProperties,v_oType){if(cmProperties){if(Array.isArray(v_oType)){for(var idx=0;idx<v_oType.length;++idx)if(this.isObjectOfType(cmProperties,v_oType[idx]))return!0;return!1}if(cmProperties.base&&cmProperties.base[0].type===v_oType)return!0;switch(cmProperties.type){case v_oType:return!0;case"reportVersion":return cmProperties.parent&&(cmProperties.parent[0].type==v_oType||"reportView"==cmProperties.parent[0].type&&cmProperties.parent[0].base[0].type==v_oType);case"output":return cmProperties.parent&&(cmProperties.parent[0].parent[0].type==v_oType||"reportView"==cmProperties.parent[0].parent[0].type&&cmProperties.parent[0].parent[0].base[0].type==v_oType)}}return!1},createTemplateParameters:function(v_oRSParameters){var v_oTemplateParameters={};return v_oTemplateParameters.rsUrl="pat/rsapp.htm",v_oTemplateParameters.rsParameters=JSON.stringify(v_oRSParameters),v_oTemplateParameters},convertToArray:function(v_oParameterValues){return convertToArrayImpl(v_oParameterValues)},extractGlassSettings:function(options){var glassSettings;return("undefined"!=typeof options.ui_appbar||"undefined"!=typeof options.ui_navbar)&&(glassSettings={},"undefined"!=typeof options.ui_appbar&&options.ui_appbar!==!0&&(glassSettings.ui_appbar=!1),"undefined"!=typeof options.ui_navbar&&options.ui_navbar!==!0&&(glassSettings.ui_navbar=!1)),glassSettings},isOutputFormatAllowed:function(v_sOutputFormat,glassContext){switch(v_sOutputFormat){case"CSV":return glassContext.hasCapability("canGenerateCSVOutput");case"XML":return glassContext.hasCapability("canGenerateXMLOutput");case"PDF":return glassContext.hasCapability("canGeneratePDFOutput");case"spreadsheetML":case"xlsxData":return glassContext.hasCapability("canGenerateXLSOutput")}return!0},createRSParameters:function(options,glassContext){var v_sGatewayUrl="../v1/disp",v_sCafContextId=glassContext&&glassContext.cafContextId||"",v_sStoreId=options.cmProperties&&options.cmProperties.id,v_sReportStoreId="",v_sModuleStoreId=options.moduleId,v_sModuleSearchPath=options.moduleSearchPath,v_sPackageSearchPath="",v_sType=options.type||"";options.isNew?this.isObjectOfType(options.cmProperties,"package")?v_sPackageSearchPath=options.cmProperties.searchPath+"/model[last()]":v_sStoreId&&(v_sModuleStoreId=v_sStoreId,v_sModuleSearchPath=options.cmProperties.searchPath):v_sReportStoreId=v_sStoreId;var v_bIsViewer=useViewer(options),v_sFormat=options.format,v_bRunInAdvancedViewer=options.cmProperties&&"undefined"!=typeof options.cmProperties.runInAdvancedViewer?!!options.cmProperties.runInAdvancedViewer:!0;if(options.rsFinalRunOptions=options.rsFinalRunOptions||{},void 0===options.rsFinalRunOptions.prompt&&void 0!==options.prompt&&(options.rsFinalRunOptions.prompt=options.prompt),!options.rsFinalRunOptions.globalParameters){var v_oParameterValues=null;glassContext&&glassContext.services&&glassContext.services.userProfile&&glassContext.services.userProfile.userProfileSettings&&(v_oParameterValues=glassContext.services.userProfile.userProfileSettings.parameter_values);var v_aParameterValues=convertToArrayImpl(v_oParameterValues);options.rsFinalRunOptions.globalParameters=JSON.stringify(v_aParameterValues)}v_sFormat&&!options.rsFinalRunOptions.format&&(options.rsFinalRunOptions.format=v_sFormat),options.rsFinalRunOptions.format&&!options.rsFinalRunOptions.Download&&(options.rsFinalRunOptions.Download=isOutputForDownload(options.rsFinalRunOptions.format).toString()),options.editSpecification?options.rsFinalRunOptions.editSpecification=options.editSpecification:options.m_oLaunchParameters&&options.m_oLaunchParameters.editSpecification&&(options.rsFinalRunOptions.editSpecification=options.m_oLaunchParameters.editSpecification),options.rsFinalRunOptions.isApplication=options.isApplication;var v_oRSParameters={parentType:"RSFrame",rs_UIProfile:options.UIProfile,reportStoreID:v_sReportStoreId,gateway:v_sGatewayUrl,isViewer:v_bIsViewer,model:v_sPackageSearchPath,module:v_sModuleStoreId,moduleSearchPath:v_sModuleSearchPath,htmlContainerPath:document.location.pathname,productLocale:glassContext.services.userProfile.preferences.productLocale||"en",contentLocale:glassContext.services.userProfile.preferences.contentLocale||"en-us",runInAdvancedViewer:v_bRunInAdvancedViewer,cafcontextid:v_sCafContextId,type:v_sType,rsFinalRunOptions:options.objRef?{format:v_sFormat||"HTML",Download:isOutputForDownload(v_sFormat).toString(),bidi:void 0!=options.bidi?!!options.bidi:void 0,a11y:void 0!=options.a11y?!!options.a11y:void 0,prompt:void 0!=options.prompt?!!options.prompt:void 0,globalParameters:options.rsFinalRunOptions.globalParameters,editSpecification:options.rsFinalRunOptions.editSpecification,isApplication:!!options.rsFinalRunOptions.isApplication}:options.rsFinalRunOptions,parameterValuesXML:options.parameterValuesXML,cmProperties:options.cmProperties,outputSpec:options.outputSpec,glassSettings:this.extractGlassSettings(options)};options.contentLocale&&(v_oRSParameters.rsFinalRunOptions.contentLocale=options.contentLocale),"run"!=options.action||this.isOutputFormatAllowed(options.rsFinalRunOptions.format,glassContext)||(v_oRSParameters.closePerspective=!0),v_oRSParameters.startingTemplate=options.startingTemplate,v_oRSParameters.isSlideout=options.isSlideout,v_oRSParameters.promptResponse=options.promptResponse;var v_oPromptParameters=findPromptParameters(options),v_oPromptParametersComplex=findPromptParametersComplex(options),v_sParameterValues=rsPromptParameters.rsBuildPromptParameters(v_oPromptParameters,v_oPromptParametersComplex);
- return v_sParameterValues&&(v_oRSParameters.parameterValuesXML=v_sParameterValues),v_oRSParameters},_hackFindPlugin:function(appView,id){var plugin;return id&&appView&&(plugin=appView.registeredPlugins[id]),plugin},hackLockGlass:function(appView){appView&&(appView.$(".navbar").addClass("disabled"),appView.$(".appbar").addClass("disabled"))},hackUnlockGlass:function(appView){appView&&(appView.$(".navbar").removeClass("disabled"),appView.$(".appbar").removeClass("disabled"))},getAuthoringApplicationFromIFrame:function(iFrame){return iFrame&&iFrame.contentWindow&&iFrame.contentWindow.Application},F_XMLEncode:function(v_sString){return v_sString.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")},decodeAndMoveCMProperties:function(options){if(options&&options.cmPropStr&&!options.cmProperties){var v_oCmProperties;try{v_oCmProperties=JSON.parse(options.cmPropStr)}catch(e){v_oCmProperties=null}v_oCmProperties&&(options.cmProperties=v_oCmProperties)}if(delete options.cmPropStr,options&&options.reportPropStr&&!options.reportProperties){var v_oReportProperties;try{v_oReportProperties=JSON.parse(options.reportPropStr)}catch(e){v_oReportProperties=null}v_oReportProperties&&(options.reportProperties=v_oReportProperties)}delete options.reportPropStr},decodeAndMoveRSOptions:function(options){if(options&&options.rsEncodedOptions){var v_oRsOptions=JSON.parse(options.rsEncodedOptions);Object.keys(v_oRsOptions).forEach(function(v_sKey){options[v_sKey]=v_oRsOptions[v_sKey]}),delete options.rsEncodedOptions}},M_aConvertList:["isViewer","isNew","isApplication","a11y","bidi","runInAdvancedViewer","prompt","rsFinalRunOptions","promptParameters","ui_appbar","ui_navbar"],convertStringQSToValues:function(options,glassContext,trimURLParameterValues){var v_bStringOnlyQS=glassContext.getCoreSvc(".FeatureChecker").checkValue("ba-glass","stringOnlyQS","enabled");if(v_bStringOnlyQS)for(var propertyName in options)if(options[propertyName])if(-1!=this.M_aConvertList.indexOf(propertyName)){if("object"==typeof options[propertyName])this.convertStringQSToValues(options[propertyName],glassContext);else if("string"==typeof options[propertyName])if("true"===options[propertyName])options[propertyName]=!0;else if("false"===options[propertyName])options[propertyName]=!1;else{var v_numberValue=Number(options[propertyName]);options[propertyName]=isNaN(v_numberValue)?options[propertyName]:v_numberValue}}else 0==propertyName.indexOf("p_")&&trimURLParameterValues===!0&&(options[propertyName]=options[propertyName].trim())},getAvailableOutputs:function(glassContext,v_oOutputProperties){return glassContext.getSvc(".Content").then(function(v_oContentSvc){var v_sCMQueryUrl=v_oContentSvc.getBaseObjectsURL()+"/"+v_oOutputProperties.parent[0].id+"/outputs?fields=dataDescriptor,parent,locale,format,permissions,ancestors,lastPage";return v_oContentSvc.get(v_sCMQueryUrl,{})})},getContent:function(options,v_oContentView,rsShareHelper){var v_oCmProperties,v_bOnlyBookmarkContent=options&&"bookmark"==options.mode,v_oReturn={};if(v_oContentView.cmProperties){if(v_oReturn=rsShareHelper.buildShareUrlMap(v_oContentView),v_oCmProperties={id:v_oContentView.cmProperties.id,type:v_oContentView.cmProperties.type,defaultName:v_oContentView.cmProperties.defaultName,permissions:v_oContentView.cmProperties.permissions},"output"==v_oContentView.cmProperties.type){if(v_oContentView.cmProperties.ancestors){var v_sReportName=v_oContentView.cmProperties.ancestors[v_oContentView.cmProperties.ancestors.length-2].defaultName;v_oCmProperties.defaultName=v_sReportName+" - "+v_oContentView.cmProperties.modificationTime.substring(0,10)+" - "+v_oContentView.cmProperties.format}v_oCmProperties.modificationTime=v_oContentView.cmProperties.modificationTime,v_oCmProperties.format=v_oContentView.cmProperties.format,v_oContentView.cmProperties.parent&&v_oContentView.cmProperties.parent.length>0&&(v_oCmProperties.parent=[{id:v_oContentView.cmProperties.parent[0].id,type:v_oContentView.cmProperties.parent[0].type}]),v_oContentView.reportProperties&&(v_oReturn.reportPropStr=JSON.stringify({id:v_oContentView.reportProperties.id,type:v_oContentView.reportProperties.type,defaultName:v_oContentView.reportProperties.defaultName})),v_oReturn.type="output",delete v_oReturn.objRef}v_oReturn.cmPropStr=JSON.stringify(v_oCmProperties)}return v_oContentView.id&&(v_oReturn.id=v_oContentView.id),v_bOnlyBookmarkContent?delete v_oReturn.promptParameters:v_oReturn.application=v_oContentView.getApplicationContent(v_oReturn,v_oCmProperties),v_oReturn}}}),define("bi/authoring/utils/rsIFrameManager",["jquery","q","bi/authoring/utils/rsCommon"],function($,Q,rsCommon){"use strict";function isMyParentTheTopWindow(w){try{return Boolean(w.parent==w.top)}catch(e){return!1}}var rsIFrameManager={};return rsIFrameManager.m_iNewFrameId=1,rsIFrameManager.F_LaunchRS=function(v_oParameters,v_oGlassContext,v_oLaunchParameters){console.info("rsperf: rsIFrameManager.F_LaunchRS ..."),this.m_oLaunchParameters=v_oLaunchParameters?v_oLaunchParameters:null;var v_bPrelaunchTest=!1;if(v_bPrelaunchTest&&this.F_PreLaunch(v_oGlassContext),this.m_oPrelaunchRSPromise&&"datasets"!==v_oGlassContext.currentAppView.currentContentView.perspective){console.time("rsIFrameManager.F_LaunchRS->f_relaunchRSIFrameInView");var v_oIFramePromise=this.m_oPrelaunchRSPromise;if(this.m_oPrelaunchRSPromise=null,console.time("rsperf: Waiting for RS relaunch"),v_oIFramePromise.isFulfilled())return this.f_relaunchRSIFrameInView(v_oParameters,v_oLaunchParameters,v_oIFramePromise.inspect().value);var v_oRelaunchDeferred=Q.defer();return v_oIFramePromise.then(this.f_relaunchRSIFrameInView.bind(this,v_oParameters,v_oLaunchParameters)).done(function(v_idIFrameAuthoring){v_oRelaunchDeferred.resolve(v_idIFrameAuthoring)}),v_oRelaunchDeferred.promise}console.time("rsperf: Launch RS->OnRSApplicationReadyForObservers");var v_oLaunchDeferred=Q.defer();return this.f_launchRS(v_oGlassContext,v_oParameters,this.f_onLaunchReadyForObservers.bind(this,v_oGlassContext,v_oLaunchDeferred),v_oLaunchDeferred.reject.bind(v_oLaunchDeferred,new Error("rsIFrameManager: error during f_launchRS"))),v_oLaunchDeferred.promise},rsIFrameManager.f_relaunchRSIFrameInView=function(v_oParameters,v_oLaunchParameters,v_iframeAuthoring){console.timeEnd("rsIFrameManager.F_LaunchRS->f_relaunchRSIFrameInView");var v_oIFrameLaunchedDeferred=Q.defer();console.timeEnd("rsperf: Waiting for RS relaunch"),console.time("rsperf: Launch from prelaunch RS->OnRSApplicationReadyForObservers"),v_iframeAuthoring.OnRSApplicationReadyForObservers=function(){v_oIFrameLaunchedDeferred.resolve(v_iframeAuthoring.id),console.timeEnd("rsperf: Launch from prelaunch RS->OnRSApplicationReadyForObservers")}.bind(this);var v_oRsParameters=JSON.parse(v_oParameters.rsParameters);return v_iframeAuthoring.contentWindow.Application.Relaunch(v_oRsParameters,v_oLaunchParameters),v_oIFrameLaunchedDeferred.promise},rsIFrameManager.f_getBodyRect=function(el){var v_elScrollable=document.documentElement,v_oRect=el.getBoundingClientRect(),v_oBodyRect=document.body.getBoundingClientRect();return{top:v_oRect.top-v_oBodyRect.top+(v_elScrollable.scrollTop?v_elScrollable.scrollTop:0),left:v_oRect.left-v_oBodyRect.left+(v_elScrollable.scrollLeft?v_elScrollable.scrollLeft:0),width:v_oRect.width,height:v_oRect.height}},rsIFrameManager.F_PositionAndSizeIFrame=function($elContainer,v_iframeAuthoring){function f_getZIndex(v_el){for(var v_elCur=v_el;v_elCur&&"#document"!=v_elCur.nodeName;){var v_oStyle=v_elCur.ownerDocument.defaultView.getComputedStyle(v_elCur,null),v_iValue=parseInt(v_oStyle.zIndex,10);if(!isNaN(v_iValue)&&0!==v_iValue)return v_iValue;v_elCur=v_elCur.parentNode}return 0}var v_oRect=this.f_getBodyRect($elContainer.get(0));v_iframeAuthoring.style.top=v_oRect.top+"px",v_iframeAuthoring.style.left=v_oRect.left+"px",v_iframeAuthoring.style.width=v_oRect.width+"px",v_iframeAuthoring.style.height=v_oRect.height+"px",v_iframeAuthoring.style.zIndex=f_getZIndex($elContainer.get(0))+1,v_iframeAuthoring.style.visibility="visible"},rsIFrameManager.F_HideIFrame=function(v_iframeAuthoring){v_iframeAuthoring.style.top="-5000px",v_iframeAuthoring.style.left="-5000px",v_iframeAuthoring.style.zIndex=-1,v_iframeAuthoring.style.visibility="hidden"},rsIFrameManager.F_DetachIFrame=function(v_iframeAuthoring){var v_oApplication=v_iframeAuthoring.contentWindow.Application;v_oApplication&&v_oApplication.DetachFromGlass(),this.m_divRSFrameHolder.removeChild(v_iframeAuthoring)},rsIFrameManager.f_createRSIFrame=function(v_oParameters){var v_aHTML=[];return v_aHTML.push('<iframe title="RSIframe" src="'),isMyParentTheTopWindow(window)?v_aHTML.push(v_oParameters.rsUrl):v_aHTML.push(v_oParameters.rsUrl+"?v="+Math.random()),v_aHTML.push('" style="border:none;top:-5000px;left:-5000px;width:1024px;height:768px;position:absolute;visibility:hidden" data-rsparameters="'),v_aHTML.push(this.f_HTMLAttributeEncode(v_oParameters.rsParameters)),v_aHTML.push('" allowfullscreen="true"/>'),v_aHTML.join("")},rsIFrameManager.f_onLaunchReadyForObservers=function(v_oGlassContext,v_oDeferred,v_iframeAuthoring){console.timeEnd("rsperf: Launch RS->OnRSApplicationReadyForObservers");var v_oApplication=v_iframeAuthoring.contentWindow.Application;v_oApplication.GlassContext=v_oGlassContext,v_oApplication.LaunchParameters=this.m_oLaunchParameters,v_oDeferred.resolve(v_iframeAuthoring.id)},rsIFrameManager.f_HTMLEncode=function(s){return s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},rsIFrameManager.f_HTMLAttributeEncode=function(s){return this.f_HTMLEncode(s).replace(/'/g,"'").replace(/"/g,""")},rsIFrameManager.f_prelaunchRS=function(v_oGlassContext,v_fnOnLaunched,v_fnOnLaunchError){console.time("rsperf: prelaunch RS");var v_oRsParameters=rsCommon.createRSParameters({},v_oGlassContext);v_oRsParameters.prelaunchRS=!0,this.f_launchRS(v_oGlassContext,rsCommon.createTemplateParameters(v_oRsParameters),this.f_onPrelaunchRSReadyForObservers.bind(this,v_oGlassContext,v_fnOnLaunched),v_fnOnLaunchError)},rsIFrameManager.f_launchRS=function(v_oGlassContext,v_oParameters,v_fnOnLaunched,v_fnOnLaunchError){this.m_divRSFrameHolder||($("body").prepend('<div style="position:absolute;top:0px;left:0px;visibility:hidden"></div>'),this.m_divRSFrameHolder=$("body").find("div").get(0));var $divRSFrameHolder=$(this.m_divRSFrameHolder);$divRSFrameHolder.prepend(this.f_createRSIFrame(v_oParameters));var v_iframeAuthoring=$divRSFrameHolder.find("iframe").get(0);v_iframeAuthoring.id="rsIFrameManager_"+this.m_iNewFrameId++,v_iframeAuthoring.OnRSApplicationReadyForObservers=v_fnOnLaunched.bind(null,v_iframeAuthoring),v_iframeAuthoring.onerror=v_fnOnLaunchError},rsIFrameManager.f_onPrelaunchRSReadyForObservers=function(v_oGlassContext,v_fnOnLaunched,v_iframeAuthoring){var v_oApplication=v_iframeAuthoring.contentWindow.Application;v_oApplication.GlassContext=v_oGlassContext,v_oApplication.LaunchParameters=this.m_oLaunchParameters,v_oApplication.SharedState.Get("isAppLoaded")?this.f_onPrelaunchAppLoaded(v_iframeAuthoring,v_fnOnLaunched):v_oApplication.SharedState.AddObserver("rsIFrameManager","isAppLoaded",this.f_onPrelaunchAppLoaded.bind(this,v_iframeAuthoring,v_fnOnLaunched,!0))},rsIFrameManager.f_onPrelaunchAppLoaded=function(v_iframeAuthoring,v_fnOnLaunched,v_bRemoveObserver){if(console.timeEnd("rsperf: prelaunch RS"),v_bRemoveObserver){var v_oApplication=v_iframeAuthoring.contentWindow.Application;v_oApplication.SharedState.RemoveObserver("rsIFrameManager","isAppLoaded")}setTimeout(v_fnOnLaunched.bind(null,v_iframeAuthoring),0)},rsIFrameManager.F_PreLaunch=function(v_oGlassContext){if(!this.m_oPrelaunchRSPromise){var v_oDefer=Q.defer();this.m_oPrelaunchRSPromise=v_oDefer.promise,this.f_prelaunchRS(v_oGlassContext,function(v_idIFrameAuthoring){v_oDefer.resolve(v_idIFrameAuthoring)}.bind(this),v_oDefer.resolve.bind(v_oDefer,null))}},rsIFrameManager}),define("bi/authoring/nls/AuthoringMessages",{root:!0,cs:!0,cy:!0,da:!0,de:!0,es:!0,fi:!0,fr:!0,gl:!0,hr:!0,hu:!0,it:!0,ja:!0,kk:!0,ko:!0,nb:!0,nl:!0,no:!0,pl:!0,pt:!0,"pt-br":!0,ro:!0,ru:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-cn":!0,"zh-tw":!0}),define("bi/authoring/nls/root/AuthoringMessages",{no_output_format_capability:"The user does not have the assigned capability to generate %{outputFormat} output.",authoring_welcome:"Reporting",report_view_of:"Report view of %{reportName}",no_action_available:"You are currently not authorized to access this object.",viewer_welcome:"Reporting",dataset_welcome:"Data set",powerplay_view_of:"PowerPlay view of %{reportName}"}),define("bi/authoring/nls/StringResource",["i18n!bi/authoring/nls/AuthoringMessages","bi/glass/utils/Lexicon"],function(localeResources,Lexicon){"use strict";var lexicon=new Lexicon({data:localeResources,verbose:!0}),StringResources=function(){};return StringResources.prototype.get=function(key,interpolationOptions){return lexicon.translate(key,interpolationOptions)},new StringResources}),define("bi/authoring/utils/rsOpenHelper",["jquery","q","bi/authoring/utils/rsIFrameManager","bi/authoring/utils/rsCommon","bi/authoring/nls/StringResource","bi/commons/utils/LegacyUtils","bi/authoring/utils/pat/rsLaunchParameters","bi/authoring/utils/pat/rsPromptParameters"],function($,Q,rsIFrameManager,rsCommon,StringResource,LegacyUtils,rsLaunchParameters,rsPromptParameters){"use strict";function getLegacyUtils(){return legacyUtils||(legacyUtils=LegacyUtils,legacyUtils.getLegacyLaunchUrl||(legacyUtils.getLegacyLaunchUrl=function(glassContext,tool,object,action){var qParms=this._getLaunchParms(glassContext,tool,object);return qParms["ui.action"]=action,this._getUrl(qParms)}.bind(LegacyUtils))),legacyUtils}function getLegacyLaunchUrl(oOpenSpec){var tool="query"==oOpenSpec.cmProperties.type?"QueryStudio":"AnalysisStudio",searchPath='storeID("'+oOpenSpec.cmProperties.id+'")',v_sLaunchURL=getLegacyUtils().getLegacyLaunchUrl(oOpenSpec.glassContext,tool,searchPath,"edit");void 0!=oOpenSpec.urlMap.prompt&&(v_sLaunchURL=v_sLaunchURL+"&prompt="+(oOpenSpec.urlMap.prompt?"true":"false"));var v_sParameterValuesXML=oOpenSpec.urlMap.parameterValuesXML;return!v_sParameterValuesXML&&oOpenSpec.urlMap.parameterValuesJSON&&(v_sParameterValuesXML=rsPromptParameters.rsBuildPromptParameters(null,oOpenSpec.urlMap.parameterValuesJSON,"parameters")),v_sParameterValuesXML&&(v_sLaunchURL=v_sLaunchURL+"&ui.drillThroughTargetParameterValues="+encodeURIComponent(v_sParameterValuesXML)),v_sLaunchURL}function runActiveReportInNewWindow(urlMap){var deferred=Q.defer(),v_sCmPath='storeID("'+urlMap.id+'")',v_sA11y=urlMap.a11y?"&"+encodeURIComponent("system.http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures")+"=true":"",v_sBidi=urlMap.bidi?"&"+encodeURIComponent("biDirectional.http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled")+"=true":"",v_sPrompt=void 0!=urlMap.prompt?"&run.prompt="+urlMap.prompt:"",v_sUri="v1/disp?b_action=cognosViewer&ui.action=run&ui.object="+v_sCmPath+v_sPrompt+v_sA11y+v_sBidi;try{var v_oWin=window.open(v_sUri,"","");v_oWin.focus(),deferred.resolve(v_oWin)}catch(e){rsCommon.reject(deferred,"Failed to opend window: "+e.toString(),"rsOpenHelper.runActiveReportInNewWindow")}finally{return deferred.promise}}function isActiveReport(cmProperties){return rsCommon.isObjectOfType(cmProperties,"interactiveReport")}function isDataSet2(cmProperties){return rsCommon.isObjectOfType(cmProperties,"dataSet2")}function isReport_ish(cmProperties){return rsCommon.isObjectOfType(cmProperties,["report","reportView","reportTemplate","interactiveReport","dataSet2","query","analysis"])}function loadCmProperties(v_oUrlMap,v_oCmProperties){v_oCmProperties&&(v_oUrlMap.cmProperties=v_oCmProperties,v_oUrlMap.id=v_oCmProperties.id,v_oUrlMap.type=v_oCmProperties.type)}function getType(v_sId,glassContext){var v_sSearchPathUrl="v1/search_path?searchPath="+encodeURIComponent("storeID('"+v_sId+"')")+"&fields=type";return glassContext.services.fetch.get(v_sSearchPathUrl).then(function(v_oCmInfoResponse){return v_oCmInfoResponse.data.data[0].type})}function determineDefaultAction(v_sActionId,v_oCmProperties,glassContext,urlMap){if(urlMap&&(urlMap.m_oPromptContext||urlMap.m_oLaunchParameters&&urlMap.m_oLaunchParameters.promptContext))return glassContext.hasCapability("canUseCognosViewer")?"run":"none";var v_sAction;if(v_oCmProperties&&v_oCmProperties.defaultPortalAction){var v_bDefault=!0;v_sAction=v_oCmProperties.defaultPortalAction;var v_sType=v_oCmProperties.type;switch(v_sActionId){case"com.ibm.bi.authoring.run":case"com.ibm.bi.contentApps.action.runAs":case"com.ibm.bi.authoringContrib.runBtn":v_sAction="run",v_bDefault=!1;break;default:v_sActionId&&-1==v_sActionId.indexOf("com.ibm.bi.contentApps.defaultAction.")&&(v_sAction="edit",v_bDefault=!1)}switch(v_sType){case"dataSet2":v_sAction=-1!=v_oCmProperties.permissions.indexOf("read")&&glassContext.hasCapability("canUseMyDataSets")?"edit":null;break;case"reportTemplate":v_sAction=-1!=v_oCmProperties.permissions.indexOf("read")&&glassContext.hasCapability("canUseReportStudio")?"edit":null;break;case"reportView":"edit"==v_sAction&&(v_sAction=v_bDefault?"run":null);default:var v_sStudioCapability,v_bIsLegacy=!1;switch(v_sType){case"query":v_sStudioCapability="canUseQueryStudio",v_bIsLegacy=!0;break;case"analysis":v_sStudioCapability="canUseAnalysisStudio",v_bIsLegacy=!0;break;default:v_sStudioCapability="canUseReportStudio"}if(v_bIsLegacy&&"edit"==v_sAction){var v_bTool=LegacyUtils.canUseLegacyTool(glassContext,"query"==v_sType?"QueryStudio":"AnalysisStudio");v_sAction=v_bTool?"legacy":"run"}switch(v_sAction){case"edit":case"legacy":-1!=v_oCmProperties.permissions.indexOf("read")&&glassContext.hasCapability(v_sStudioCapability)||(v_sAction=-1!=v_oCmProperties.permissions.indexOf("execute")&&v_bDefault?"run":null);break;case"run":-1==v_oCmProperties.permissions.indexOf("execute")&&(v_sAction=-1!=v_oCmProperties.permissions.indexOf("read")&&v_bDefault?"viewOutput":null);break;case"viewOutput":-1==v_oCmProperties.permissions.indexOf("read")&&(v_sAction=-1!=v_oCmProperties.permissions.indexOf("execute")&&v_bDefault?"run":null);break;default:v_sAction=null}"run"!=v_sAction&&"viewOutput"!=v_sAction||glassContext.hasCapability("canUseCognosViewer")||(v_sAction=null)}}else urlMap&&urlMap.isNew&&(v_sAction=urlMap.isViewer?glassContext.hasCapability("canUseCognosViewer")?"run":"none":"authoring"==urlMap.perspective?glassContext.hasCapability("canUseReportStudio")?"edit":"none":"datasets"==urlMap.perspective&&glassContext.hasCapability("canUseMyDataSets")?"edit":"none");return v_sAction}function determineAction(v_oOpenSpec){var v_sAction,v_sCreateType,v_bAllowLegacy=!0;switch(v_oOpenSpec.actionId){case"com.ibm.bi.authoring.run":case"com.ibm.bi.contentApps.action.runAs":v_sAction="run";break;case"com.ibm.bi.authoring.createReportFromModule":case"com.ibm.bi.authoring.createReportFromPackage":v_sCreateType="report",v_sAction="edit";break;case"com.ibm.bi.datasets.createDataSetFromModule":case"com.ibm.bi.datasets.createDataSetFromPackage":v_sCreateType="dataSet2",v_sAction="edit";break;case"com.ibm.bi.authoring.convertToReport":v_sAction="edit",v_bAllowLegacy=!1;break;default:v_sAction=v_oOpenSpec.urlMap.action}var sObjectType=v_oOpenSpec.urlMap.cmProperties?v_oOpenSpec.urlMap.cmProperties.type:void 0;switch(sObjectType){case"reportVersion":case"output":v_sAction=v_oOpenSpec.glassContext.hasCapability("canUseCognosViewer")?"viewOutput":"none";break;default:switch(v_sAction){case"run":case"edit":case"viewOutput":(v_oOpenSpec.urlMap.isNew||!isReport_ish(v_oOpenSpec.urlMap.cmProperties))&&(v_sAction=v_oOpenSpec.glassContext.hasCapability("dataSet2"==v_sCreateType?"canUseMyDataSets":"canUseReportStudio")?"edit":"none"),"edit"!=v_sAction||"query"!=sObjectType&&"analysis"!=sObjectType||!v_bAllowLegacy||(v_sAction=LegacyUtils.canUseLegacyTool(v_oOpenSpec.glassContext,"query"==sObjectType?"QueryStudio":"AnalysisStudio")?"legacy":"run");break;case"default":case void 0:v_sAction=determineDefaultAction(v_oOpenSpec.actionId,v_oOpenSpec.urlMap.cmProperties,v_oOpenSpec.glassContext,v_oOpenSpec.urlMap),v_oOpenSpec.defaultAction=!0;break;default:v_sAction=null}}v_oOpenSpec.urlMap.action=v_sAction}function prepareUrlMap(v_oOpenSpec,v_oCmProperties){var urlMap=v_oOpenSpec.urlMap||{};rsCommon.convertStringQSToValues(urlMap,v_oOpenSpec.glassContext,v_oOpenSpec.trimURLParameterValues);var dataset=!1;switch(v_oOpenSpec.actionId){case"com.ibm.bi.datasets.createDataSetFromModule":case"com.ibm.bi.datasets.createDataSetFromPackage":urlMap.startingTemplate="DatasetList",dataset=!0,urlMap.isNew=!0;break;case"com.ibm.bi.contentApps.defaultAction.dataSet2":case"com.ibm.bi.datasets.editDataset":dataset=!0;break;case"com.ibm.bi.authoring.createReportFromModule":case"com.ibm.bi.authoring.createReportFromPackage":urlMap.isNew=!0;break;default:dataset=isDataSet2(v_oCmProperties)||!v_oCmProperties&&"datasets"==urlMap.perspective,urlMap.isNew=!isReport_ish(v_oCmProperties)}return loadCmProperties(urlMap,v_oCmProperties),urlMap.isApplication=isActiveReport(v_oCmProperties),!urlMap.perspective&&dataset&&(urlMap.perspective="datasets"),urlMap.UIProfile="datasets"==urlMap.perspective?"TitanDataset":"Titan",rsCommon.decodeAndMoveRSOptions(urlMap),v_oOpenSpec.urlMap=urlMap,determineAction(v_oOpenSpec),v_oOpenSpec}function convertToObjectFromCmOptionsArray(aCmOptions){if(!aCmOptions||!Array.isArray(aCmOptions))return aCmOptions;var oReturn={};return aCmOptions.forEach(function(oOption){"undefined"==typeof oReturn[oOption.name]?oReturn[oOption.name]=oOption.value:Array.isArray(oReturn[oOption.name])?oReturn[oOption.name].push(oOption.value):oReturn[oOption.name]=[oReturn[oOption.name],oOption.value]}),oReturn}function convertCmOptionsToSimpleArray(cmProperties){cmProperties.options=convertToObjectFromCmOptionsArray(cmProperties.options),cmProperties.base&&cmProperties.base.length>0&&cmProperties.base[0]&&(cmProperties.base[0].options=convertToObjectFromCmOptionsArray(cmProperties.base[0].options))}function getCMInfoForOpen(cmProperties,v_aProperties,glassContext){var deferred=Q.defer(),v_sReportViewUrl="v1/objects/"+cmProperties.id,v_aFields=[];v_aProperties.forEach(function(v_sField){v_aFields.push(v_sField)}),v_aFields.join(",");var v_sReportViewPropsUrl=v_sReportViewUrl.concat("?fields=",v_aFields.join(","));return glassContext.services.ajax.ajax({url:v_sReportViewPropsUrl,type:"GET",dataType:"json"}).fail(function(err){console.log("rsOpenHelper.getCMInfo ... FAILED"),deferred.reject(err)}).done(function(resp){if(!resp||!resp.data||resp.data.length<=0)return void rsCommon.reject(deferred,"unexpected response","rsOpenHelper.getCMInfoForOpen");var v_oData=resp.data[0];convertCmOptionsToSimpleArray(v_oData),convertCmOptionsToSimpleArray(cmProperties);var v_oCurrentCmProperties=cmProperties;for(var v_sProperty in v_oCurrentCmProperties)v_oCurrentCmProperties.hasOwnProperty(v_sProperty)&&void 0==v_oData[v_sProperty]&&(v_oData[v_sProperty]=v_oCurrentCmProperties[v_sProperty]);deferred.resolve(v_oData)}),deferred.promise}function f_determineMissingProperties(v_aProperties,v_oCmProperties){for(var v_aMissingProperties=[],len=v_aProperties.length,i=0;len>i;++i){var v_sProperty=v_aProperties[i];"undefined"==typeof v_oCmProperties[v_sProperty]&&v_aMissingProperties.push(v_sProperty)}return v_aMissingProperties}function extractProperties(v_aPropertiesSpec,type){var v_aProperties;if(v_aPropertiesSpec){v_aProperties=[];for(var idx=0;idx<v_aPropertiesSpec.length;++idx)type&&v_aPropertiesSpec[idx].type&&!v_aPropertiesSpec[idx].type.includes(type)||v_aProperties.push(v_aPropertiesSpec[idx].property)}return v_aProperties}function retreiveCMInfo(v_oCmProperties,glassContext,v_aPropertiesSpec){var deferred=Q.defer();if(v_oCmProperties&&v_oCmProperties.id&&!v_oCmProperties.type)return getType(v_oCmProperties.id,glassContext).then(function(v_sType){return v_oCmProperties.type=v_sType,retreiveCMInfo(v_oCmProperties,glassContext,v_aPropertiesSpec)});switch(v_oCmProperties?v_oCmProperties.type:"none"){case void 0:rsCommon.reject(deferred,"Missing properties or id","rsOpenHelper.retreiveCMInfo");break;case"none":deferred.resolve(void 0);break;case"output":var v_aRequestProperties=f_determineMissingProperties(extractProperties(v_aPropertiesSpec,"output")||m_aOutputProperties,v_oCmProperties);getCMInfoForOpen(v_oCmProperties,v_aRequestProperties,glassContext).then(function(v_oOutput){if(v_aPropertiesSpec)deferred.resolve(v_oOutput);else{var v_oCmProperties={id:v_oOutput.parent[0].id};getCMInfoForOpen(v_oCmProperties,m_aReportVersionProperties,glassContext).then(function(v_oVersion){v_oOutput.parent[0]=v_oVersion;var v_oCmProperties={id:v_oVersion.parent[0].id};getCMInfoForOpen(v_oCmProperties,["id","defaultName","type","base.type"],glassContext).then(function(v_oReport){v_oVersion.parent[0]=v_oReport,deferred.resolve(v_oOutput)})})}})["catch"](function(err){console.log("rsOpenHelper.retreiveCMInfo ... FAILED"),deferred.reject(err)});break;case"reportVersion":var v_aRequestProperties=f_determineMissingProperties(extractProperties(v_aPropertiesSpec,"reportVersion")||m_aReportVersionProperties,v_oCmProperties);getCMInfoForOpen(v_oCmProperties,v_aRequestProperties,glassContext).then(function(v_oVersion){if(v_aPropertiesSpec)deferred.resolve(v_oVersion);else{var v_oCmProperties={id:v_oVersion.parent[0].id};getCMInfoForOpen(v_oCmProperties,["id","defaultName","type","base.type"],glassContext).then(function(v_oReport){v_oVersion.parent[0]=v_oReport,deferred.resolve(v_oVersion)})}})["catch"](function(err){console.log("rsOpenHelper.retreiveCMInfo ... FAILED"),deferred.reject(err)});break;case"report":case"reportView":case"reportTemplate":case"interactiveReport":case"dataSet2":case"query":case"analysis":var v_aRequestProperties=f_determineMissingProperties(extractProperties(v_aPropertiesSpec,"report")||m_aProperties,v_oCmProperties),v_bNeedBase=!v_aPropertiesSpec&&"reportView"==v_oCmProperties.type;if(v_bNeedBase)for(var l=v_aRequestProperties.length,i=0;l>i;++i)v_aRequestProperties.push("base."+v_aRequestProperties[i]);else"report"!=v_oCmProperties.type||v_oCmProperties.metadataModelPackage&&v_oCmProperties.metadataModelPackage[0]&&v_oCmProperties.metadataModelPackage[0].effectiveUserCapabilities||v_aRequestProperties.push("metadataModelPackage.effectiveUserCapabilities");v_aRequestProperties.length>0?getCMInfoForOpen(v_oCmProperties,v_aRequestProperties,glassContext)["catch"](function(err){console.log("rsOpenHelper.retreiveCMInfo ... FAILED"),deferred.reject(err)}).then(function(v_oUpdatedCmProperties){deferred.resolve(v_oUpdatedCmProperties)}):deferred.resolve(v_oCmProperties);break;default:var v_aRequestProperties=f_determineMissingProperties(extractProperties(v_aPropertiesSpec,null)||["type","searchPath"],v_oCmProperties);v_aRequestProperties.length>0?getCMInfoForOpen(v_oCmProperties,v_aRequestProperties,glassContext)["catch"](function(err){console.log("rsOpenHelper.retreiveCMInfo ... FAILED"),deferred.reject(err)}).then(function(v_oUpdatedCmProperties){deferred.resolve(v_oUpdatedCmProperties)}):deferred.resolve(v_oCmProperties)}return deferred.promise}function isOutputFormatSupportedInAdvancedViewer(v_sOutputFormat){return-1!==["HTML","PDF","spreadsheetML","xlsxData","CSV","XML"].indexOf(v_sOutputFormat)}function isOutputForDownload(v_sOutputFormat){return-1!==["spreadsheetML","xlsxData","CSV","XML"].indexOf(v_sOutputFormat)}function getValueFromFieldIfDefined(v_o,v_sField){return v_o&&"undefined"!=typeof v_o[v_sField]&&null!==v_o[v_sField]?{value:v_o[v_sField]}:void 0}function getFirstValueFromArrayFieldIfDefined(v_o,v_sField){var o=getValueFromFieldIfDefined(v_o,v_sField);if(o){var a=o.value;if(!(a.length<1))return{value:Array.isArray(a)?a[0]:a}}}function determineRunInAdvancedViewer(v_oProperties){var o=getValueFromFieldIfDefined(v_oProperties,"runInAdvancedViewer");return o?o.value:!1}function isRunInAdvancedViewer(v_oOpenSpec,v_sFormat){var v_bRunInAdvancedViewer=!1,v_oCmProperties=v_oOpenSpec.urlMap.cmProperties;return determineRunInAdvancedViewer(v_oCmProperties&&v_oCmProperties.base?v_oCmProperties.base[0]:v_oCmProperties)&&(v_bRunInAdvancedViewer=!0),v_bRunInAdvancedViewer&&v_sFormat&&!isOutputFormatSupportedInAdvancedViewer(v_sFormat)&&(v_bRunInAdvancedViewer=!1),v_bRunInAdvancedViewer}function consolidateAndReconcileRunOptions(v_oOpenSpec){var urlMap=v_oOpenSpec.urlMap,v_oCmBaseProperties=urlMap.cmProperties&&urlMap.cmProperties.base?urlMap.cmProperties.base[0]:null,v_oCmProperties=urlMap.cmProperties||{},v_oPreferences=v_oOpenSpec.glassContext.services.userProfile.preferences;if(void 0==urlMap.format){var v_sFormat=v_oPreferences.format,o=getFirstValueFromArrayFieldIfDefined(v_oCmBaseProperties&&v_oCmBaseProperties.options,"outputFormat");o&&(v_sFormat=o.value||v_sFormat),o=getFirstValueFromArrayFieldIfDefined(v_oCmProperties.options,"outputFormat"),o&&(v_sFormat=o.value||v_sFormat),(isActiveReport(v_oCmProperties)||!rsCommon.isOutputFormatAllowed(v_sFormat,v_oOpenSpec.glassContext))&&(v_sFormat="HTML"),o=getValueFromFieldIfDefined(v_oOpenSpec.runOptions,"format"),o&&(v_sFormat=o.value||v_sFormat),urlMap.format=v_sFormat}if(void 0==urlMap.a11y){var v_bA11y=v_oPreferences.accessibilityFeatures,o=getValueFromFieldIfDefined(v_oCmBaseProperties&&v_oCmBaseProperties.options,"http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures");o&&(v_bA11y=o.value||v_bA11y),o=getValueFromFieldIfDefined(v_oCmProperties.options,"http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures"),o&&(v_bA11y=o.value||v_bA11y),urlMap.a11y=v_bA11y}if(void 0==urlMap.bidi&&(urlMap.bidi=v_oPreferences.biDirectionalFeaturesEnabled),urlMap.Download=isOutputForDownload(urlMap.format)?"true":"false",void 0==urlMap.prompt){var v_bPrompt;o=getValueFromFieldIfDefined(v_oCmBaseProperties&&v_oCmBaseProperties.options,"prompt"),o&&(v_bPrompt=o.value),o=getValueFromFieldIfDefined(v_oCmProperties.options,"prompt"),o&&(v_bPrompt=o.value),o=urlMap.m_oLaunchParameters&&urlMap.m_oLaunchParameters.RunOptions?getValueFromFieldIfDefined(urlMap.m_oLaunchParameters.RunOptions,"Prompt"):getValueFromFieldIfDefined(urlMap,"Prompt"),o&&(v_bPrompt="string"==typeof o.value?"true"===o.value:!!o.value),o=getValueFromFieldIfDefined(v_oOpenSpec.runOptions,"prompt"),o&&(v_bPrompt=o.value),urlMap.prompt=v_bPrompt}}function getActiveReportOutputURL(v_oCMProperties,v_oOutputProperties){var v_sReportId,v_sOutputId;return v_oOutputProperties?(v_sReportId=v_oCMProperties.id,v_sOutputId=v_oOutputProperties.id):"output"==v_oCMProperties.type?(v_sReportId=v_oCMProperties.parent[0].parent[0].id,v_sOutputId=v_oCMProperties.id):(v_sReportId=v_oCMProperties.id,v_sOutputId="default"),"v1/disp/repository/sid/cm/rid/"+v_sReportId+"/oid/"+v_sOutputId+"/content/mht/content"}function openUrlViaForm(sHref,bNewWindow){var v_nDrillForm;try{var v_sTarget="_self";if(bNewWindow&&(v_sTarget="rsTarget"+Date.now(),!window.open("",v_sTarget)))return!1;var v_aUrlParts=sHref.split("?");if(v_nDrillForm=document.body.appendChild(document.createElement("form")),v_nDrillForm.setAttribute("name","drillForm"),v_nDrillForm.setAttribute("method","post"),v_nDrillForm.setAttribute("action",decodeURIComponent(v_aUrlParts[0])),v_nDrillForm.setAttribute("target",v_sTarget),v_nDrillForm.style.display="none",2==v_aUrlParts.length)for(var v_aParams=v_aUrlParts[1].split("&"),i=0;i<v_aParams.length;i++){var v_aPair=v_aParams[i].split("="),v_nFormField=v_nDrillForm.appendChild(document.createElement("input"));v_nFormField.setAttribute("type","hidden"),v_nFormField.setAttribute("name",decodeURIComponent(v_aPair[0])),v_nFormField.setAttribute("value",decodeURIComponent(v_aPair[1]))}v_nDrillForm.submit()}catch(e){return v_nDrillForm&&document.body.removeChild(v_nDrillForm),!1}return document.body.removeChild(v_nDrillForm),!0}function launchViewSavedOutputApp(v_oOpenSpec,deferred){v_oOpenSpec.href?(openUrlViaForm(v_oOpenSpec.href,!0),
- deferred.resolve()):v_oOpenSpec.glassContext.openAppView(v_oOpenSpec.urlMap.perspective,{content:v_oOpenSpec.urlMap}).then(function(){deferred.resolve()})}function launchEditOrRunApp(v_oOpenSpec,deferred){var urlMap=v_oOpenSpec.urlMap;if("run"==urlMap.action&&urlMap.isApplication&&"classicviewer"==urlMap.perspective)return runActiveReportInNewWindow(urlMap).then(function(v_activeReportResult){deferred.resolve(v_activeReportResult)})["catch"](function(err){console.log("launchEditOrRunApp rejected"),deferred.reject(err)}),deferred.promise;if("authoring"==urlMap.perspective){var v_oRSParameters=rsCommon.createRSParameters(urlMap,v_oOpenSpec.glassContext),v_oIFrameTemplateParameters=rsCommon.createTemplateParameters(v_oRSParameters);urlMap.launchPromise=rsIFrameManager.F_LaunchRS(v_oIFrameTemplateParameters,v_oOpenSpec.glassContext),urlMap.m_oRSParameters=v_oRSParameters}v_oOpenSpec.glassContext.openAppView(urlMap.perspective,{content:urlMap}).fail(function(err){console.log(" rsOpenHelper.launchEditOrRunApp - openingAppView ... FAILED"),deferred.reject(err)}).done(function(v_oResult){deferred.resolve(v_oResult)})}function launchApp(v_oOpenSpec){var deferred=Q.defer();switch(v_oOpenSpec.urlMap.action){case"none":v_oOpenSpec.glassContext.showToast(StringResource.get("no_action_available"),{type:"warning",btnLabel:"OK"}),deferred.resolve();break;case"viewOutput":launchViewSavedOutputApp(v_oOpenSpec,deferred);break;case"run":case"edit":launchEditOrRunApp(v_oOpenSpec,deferred);break;case"legacy":var v_sLaunchUrl=getLegacyLaunchUrl(v_oOpenSpec);openUrlViaForm(v_sLaunchUrl,!0)?deferred.resolve():rsCommon.reject(deferred,"Could not launch a new tab.","rsOpenHelper.launchApp");break;default:rsCommon.reject(deferred,"Unexpected action "+v_oOpenSpec.urlMap.action+".","rsOpenHelper.launchApp")}return deferred.promise}function getSavedOutput(v_oGlassContext,v_oCmProperties,format,contentLocale){return"output"==v_oCmProperties.type?Q.resolve(v_oCmProperties):v_oGlassContext.getSvc(".Content").then(function(v_oContentSvc){var v_sFormatHint='"'+(format||"")+'"',v_sLocaleHint='"'+(contentLocale||"")+'"',v_sSearchPath='defaultOutput(storeID("'+v_oCmProperties.id+'"),'+v_sFormatHint+","+v_sLocaleHint+")",v_sCMQueryUrl=v_oContentSvc.getSearchPathUrl(v_sSearchPath)+"&fields=dataDescriptor,parent,locale,format,permissions,ancestors,lastPage";return v_oContentSvc.get(v_sCMQueryUrl,{}).then(function(v_oSavedOutputResp){if(v_oSavedOutputResp&&v_oSavedOutputResp.data&&v_oSavedOutputResp.data.length>0){var v_oOutput=v_oSavedOutputResp.data[0];if("reportVersion"==v_oCmProperties.type)return v_oOutput.parent[0]=v_oCmProperties,v_oOutput;var v_sCMQueryUrl=v_oContentSvc.getBaseObjectsURL()+"/"+v_oOutput.parent[0].id+"?fields=decoratedSpecification,id,parent";return v_oContentSvc.get(v_sCMQueryUrl,{}).then(function(v_oVersionResponse){var v_oVersion=v_oVersionResponse.data[0];return v_oVersion.parent[0]=v_oCmProperties,v_oOutput.parent[0]=v_oVersion,v_oOutput})}return null})})}function resolveUrlMapForSavedOutput(v_oOpenSpec){return v_oOpenSpec.urlMap.action?"viewOutput"!=v_oOpenSpec.urlMap.action?Q.resolve(v_oOpenSpec):getSavedOutput(v_oOpenSpec.glassContext,v_oOpenSpec.urlMap.cmProperties,v_oOpenSpec.urlMap.format,v_oOpenSpec.urlMap.contentLocale).fail(function(err){return Q.resolve(null)}).then(function(v_oOutput){if(v_oOutput&&"output"==v_oOutput.type&&"dataSet"!=v_oOutput.format){var v_bActiveReport=isActiveReport(v_oOutput),v_sActiveReportOutputHref=v_bActiveReport?getActiveReportOutputURL(v_oOutput):null;if(v_sActiveReportOutputHref&&(!v_oOutput.dataDescriptor||"interactive"!=v_oOutput.dataDescriptor.type))return v_oOpenSpec.href=v_sActiveReportOutputHref,Q.resolve(v_oOpenSpec);var v_oUrlMap=v_oOpenSpec.urlMap;return rsCommon.getAvailableOutputs(v_oOpenSpec.glassContext,v_oOutput).then(function(v_oSavedOutputFormats){if(!v_oSavedOutputFormats||!v_oSavedOutputFormats.data||v_oSavedOutputFormats.data.length<=0)return Q.reject(new Error("unexpected response for rsCommon.getAvailableOutputs"));v_oUrlMap.perspective="classicviewer",(v_oOutput.dataDescriptor&&"interactive"==v_oOutput.dataDescriptor.type||"PDF"==v_oOutput.format)&&(v_oUrlMap.perspective="authoring",v_oUrlMap.outputSpec=v_oOutput.parent[0].decoratedSpecification),v_oOpenSpec.glassContext.isEmbedded()&&(v_oUrlMap.perspective+="_embedded"),v_bActiveReport?delete v_oUrlMap.format:v_oUrlMap.format=v_oOutput.format||v_oUrlMap.format;for(var v_oOutputLookup={},i=0;i<v_oSavedOutputFormats.data.length;++i){var v_oAltOutput=v_oSavedOutputFormats.data[i];v_oAltOutput.locale==v_oOutput.locale&&(v_oOutputLookup[v_oAltOutput.format]=v_oAltOutput)}return v_oUrlMap.outputFormatLookup=v_oOutputLookup,v_oUrlMap.reportProperties={id:v_oOutput.parent[0].parent[0].id,type:v_oOutput.parent[0].parent[0].type},loadCmProperties(v_oUrlMap,v_oOutput),v_oUrlMap.objRef=v_oOutput.id,delete v_oUrlMap.pathRef,Q.resolve(v_oOpenSpec)})}var v_aPermissions=v_oOpenSpec.urlMap.cmProperties.permissions,v_sCmType=v_oOpenSpec.urlMap.cmProperties.type;switch(v_sCmType){case"query":case"analysis":if(-1!=v_aPermissions.indexOf("execute")){var v_bRead=-1!=v_aPermissions.indexOf("read"),v_bCapability=v_oOpenSpec.glassContext.hasCapability("query"==v_sCmType?"canUseQueryStudio":"canUseAnalysisStudio"),v_bTool=LegacyUtils.canUseLegacyTool(v_oOpenSpec.glassContext,"query"==v_sCmType?"QueryStudio":"AnalysisStudio");v_oOpenSpec.urlMap.action=v_bRead&&v_bCapability&&v_bTool?"legacy":"run"}else v_oOpenSpec.urlMap.action="none";break;default:v_oOpenSpec.urlMap.action="none",-1!=v_aPermissions.indexOf("execute")&&v_oOpenSpec.glassContext.hasCapability("canUseCognosViewer")&&(v_oOpenSpec.urlMap.action="run"),"none"==v_oOpenSpec.urlMap.action&&v_oOpenSpec.defaultAction&&-1!=v_aPermissions.indexOf("read")&&v_oOpenSpec.glassContext.hasCapability("canUseReportStudio")&&(v_oOpenSpec.urlMap.action="edit")}return Q.resolve(v_oOpenSpec)}):Q.reject()}function resolveUrlMapForEditRun(v_oOpenSpec){if("viewOutput"==v_oOpenSpec.urlMap.action)return Q.resolve(v_oOpenSpec);if(!v_oOpenSpec.urlMap.perspective)if(isDataSet2(v_oOpenSpec.urlMap.cmProperties))v_oOpenSpec.urlMap.perspective="datasets";else{var v_bRunInAdvancedViewer=isRunInAdvancedViewer(v_oOpenSpec,v_oOpenSpec.urlMap.format);v_oOpenSpec.urlMap.perspective=v_bRunInAdvancedViewer||"edit"==v_oOpenSpec.urlMap.action?"authoring":"classicviewer"}return v_oOpenSpec.glassContext.isEmbedded()&&(v_oOpenSpec.urlMap.perspective+="_embedded"),consolidateAndReconcileRunOptions(v_oOpenSpec),Q.resolve(v_oOpenSpec)}function resolveUrlMap(v_oOpenSpec){return retreiveCMInfo(v_oOpenSpec.cmProperties,v_oOpenSpec.glassContext).then(prepareUrlMap.bind(null,v_oOpenSpec)).then(resolveUrlMapForSavedOutput).then(resolveUrlMapForEditRun).then(function(v_oResolvedSpec){return v_oResolvedSpec.urlMap.rsResolved=!0,v_oResolvedSpec})}function processHref(sHref,deferred,glassContext){var v_oPerspective,v_oCurrentContentView=glassContext&&glassContext.currentAppView?glassContext.currentAppView.currentContentView:null;if(v_oCurrentContentView){if(v_oPerspective={perspective:v_oCurrentContentView.perspective,id:v_oCurrentContentView.id},!openUrlViaForm(sHref,!0))return void rsCommon.reject(deferred,"Could not launch a new tab.","rsOpenHelper.processHref")}else v_oPerspective={perspective:"home"},openUrlViaForm(sHref,!1);deferred.resolve(v_oPerspective)}var legacyUtils=null,m_aProperties=["ancestors","defaultDescription","defaultName","defaultPortalAction","id","modificationTime","options","owner","parent","permissions","routingServerGroup","runInAdvancedViewer","searchPath","format","type"],m_aOutputProperties=["ancestors","dataDescriptor","defaultName","burstKey","id","modificationTime","owner","parent","permissions","searchPath","type","format","locale","lastPage"],m_aReportVersionProperties=["decoratedSpecification","id","parent"];return{isReport_ish:isReport_ish,openView:function(v_oOpenSpec){var deferred=Q.defer();return resolveUrlMap(v_oOpenSpec).then(launchApp)["catch"](function(err){console.log("rsOpenHelper.openView ... FAILED"),deferred.reject(err)}).done(function(v_oLaunchResult){deferred.resolve(v_oLaunchResult)}),deferred.promise},retrieveCmProperties:function(v_oGlassContext,v_oCmProperties,v_sStoreId){var deferred=Q.defer();return v_sStoreId?(v_oCmProperties||(v_oCmProperties={}),v_oCmProperties.id||(v_oCmProperties.id=v_sStoreId),v_oCmProperties.id!=v_sStoreId&&(v_oCmProperties.id=v_sStoreId),retreiveCMInfo(v_oCmProperties,v_oGlassContext).done(function(cmProperties){deferred.resolve(cmProperties)})):deferred.resolve(v_oCmProperties),deferred.promise},getPerspective:function(v_oOpenSpec){var deferred=Q.defer();return v_oOpenSpec.urlMap?v_oOpenSpec.glassContext.getCoreSvc(".Config").getConfigValue("RS.TrimURLParameterValues").done(function(result){v_oOpenSpec.trimURLParameterValues="true"===result,resolveUrlMap(v_oOpenSpec)["catch"](function(err){console.log("rsOpenHelper.getPerspective ... FAILED"),deferred.reject(err)}).done(function(v_oOpenSpecResolved){if(v_oOpenSpecResolved)if(v_oOpenSpecResolved.urlMap&&"legacy"==v_oOpenSpecResolved.urlMap.action){if(v_oOpenSpec.urlMap.launchParametersKey){var v_oLaunchParameters=rsLaunchParameters.Retrieve(v_oOpenSpec.urlMap.launchParametersKey);delete v_oOpenSpec.urlMap.launchParametersKey,$.extend(!0,v_oOpenSpec.urlMap,v_oLaunchParameters)}processHref(getLegacyLaunchUrl(v_oOpenSpec),deferred,v_oOpenSpec.glassContext)}else v_oOpenSpecResolved.href?processHref(v_oOpenSpecResolved.href,deferred):deferred.resolve(v_oOpenSpecResolved.urlMap);else deferred.reject()})}.bind(this)):rsCommon.reject(deferred,"urlMap is missing","rsOpenHelper.getPerspective"),deferred.promise},determineDefaultAction:determineDefaultAction,resolveUrlMap:resolveUrlMap,updateCmProperties:function(v_oView,v_sStoreId){return delete v_oView.cmProperties,delete v_oView.reportProperties,this.retrieveCmProperties(v_oView.glassContext,null,v_sStoreId).then(function(v_oCmProperties){v_oView.cmProperties=v_oCmProperties,v_oView.id=v_oCmProperties.id,v_oView.type=v_oCmProperties.type;var v_oBaseReport;switch(v_oCmProperties.type){case"output":v_oBaseReport=v_oCmProperties.parent[0].parent[0];break;case"reportVersion":v_oBaseReport=v_oCmProperties.parent[0]}v_oBaseReport&&(v_oView.reportProperties={id:v_oBaseReport.id,type:v_oBaseReport.type})}.bind(this))},retreiveCMInfo:retreiveCMInfo}}),define("bi/authoring/utils/rsShareHelper",["bi/authoring/utils/pat/rsPromptParameters","bi/authoring/utils/rsOpenHelper","bi/authoring/utils/rsCommon","jquery","q"],function(rsPromptParameters,OpenHelper,rsCommon,$,Q){"use strict";function createShareUrl(v_oOpenSpec,v_oCmProperties){var v_oUrlMap={};v_oOpenSpec&&v_oOpenSpec.contentView&&(v_oUrlMap=$.extend(v_oUrlMap,rsCommon.extractGlassSettings(v_oOpenSpec.contentView)));var v_sObjRef=v_oCmProperties.id;switch(v_oCmProperties.type){case"dataSet2":v_oUrlMap.objRef=v_sObjRef;break;case"output":v_oUrlMap.objRef=v_oCmProperties.burstKey?v_sObjRef:v_oCmProperties.parent[0].id;break;default:if(v_oUrlMap.objRef=v_sObjRef,"current"===v_oOpenSpec.mode&&v_oOpenSpec.glassContext.currentAppView){var v_oCurrentContentView=v_oOpenSpec.glassContext.currentAppView.currentContentView;if(v_oCurrentContentView)switch(v_oCurrentContentView.perspective){case"authoring":var v_oApplication=v_oCurrentContentView.getAuthoringApplication&&v_oCurrentContentView.getAuthoringApplication();if(v_oApplication)if(v_oApplication.SharedState.Get("isViewer")){v_oUrlMap.action="run";var v_sObjectType=v_oApplication.SharedState.Get("objectType");if("interactiveReport"!=v_sObjectType){var v_sViewer=v_oApplication.SharedState.Get("viewer");switch(v_sViewer.toUpperCase()){case"HTML":v_oUrlMap.format="HTML";break;case"PDF":v_oUrlMap.format="PDF"}}}else v_oUrlMap.action="edit";else v_oUrlMap.action=v_oCurrentContentView.action||(v_oCurrentContentView.isViewer?"run":"edit"),"edit"!=v_oUrlMap.action&&(v_oUrlMap.format=v_oCurrentContentView.format);break;case"classicviewer":v_oUrlMap.action="run";var v_sOutputFormat;v_sOutputFormat=v_oCurrentContentView.m_oRVFormParameters&&v_oCurrentContentView.m_oRVFormParameters["run.outputFormat"]?v_oCurrentContentView.m_oRVFormParameters["run.outputFormat"]:v_oCurrentContentView.format,v_oUrlMap.format=v_sOutputFormat||"HTML"}}}return v_oUrlMap}function retrievePromptParameters(v_oOpenSpec,v_oUrlMap){if("current"==v_oOpenSpec.mode&&v_oOpenSpec.glassContext.currentAppView){var v_oCurrentContentView=v_oOpenSpec.glassContext.currentAppView.currentContentView;if(v_oCurrentContentView){var v_oApplication=v_oCurrentContentView.getAuthoringApplication&&v_oCurrentContentView.getAuthoringApplication();if("classicviewer"==v_oCurrentContentView.perspective||v_oApplication&&v_oApplication.SharedState.Get("isViewer")){var v_aParameters=v_oCurrentContentView.getParameterValues(!0);v_aParameters&&v_aParameters.length>0&&(v_oUrlMap.prompt=!1,rsPromptParameters.rsBuildParameterUrl(v_oUrlMap,v_aParameters))}}}return v_oUrlMap}function buildShareUrl(v_oOpenSpec,v_oCmProperties){var v_oUrlMap=createShareUrl(v_oOpenSpec,v_oCmProperties);return retrievePromptParameters(v_oOpenSpec,v_oUrlMap)}function prepareShareUrlMap(v_oOpenSpec){var deferred=Q.defer();return OpenHelper.retreiveCMInfo(v_oOpenSpec.cmProperties,v_oOpenSpec.glassContext,M_aShareProperties).then(buildShareUrl.bind(null,v_oOpenSpec)).fail(function(err){console.log("OpenHelper.prepareShareUrlMap ... FAILED"),deferred.reject(err)}).done(function(v_oUrlMap){deferred.resolve(v_oUrlMap)}),deferred.promise}var M_aShareProperties=[{property:"id",type:null},{property:"type",type:null},{property:"burstKey",type:["output"]},{property:"parent",type:null}];return{getShareUrlMap:function(v_oOpenSpec){var deferred=Q.defer();return prepareShareUrlMap(v_oOpenSpec)["catch"](function(err){console.log("rsShareHelper.getShareUrlMap ... FAILED"),deferred.reject(err)}).done(function(v_oUrlMap){deferred.resolve(v_oUrlMap)}),deferred.promise},buildShareUrlMap:function(v_oContentView){var v_oCmProperties=v_oContentView.cmProperties,glassContext=v_oContentView.glassContext,v_oOpenSpec={mode:"current",glassContext:glassContext,contentView:v_oContentView};return buildShareUrl(v_oOpenSpec,v_oCmProperties)},isShareable:function(v_oCurrentContentView,v_bEmbed){var v_bShareable=!1;if(v_oCurrentContentView&&v_oCurrentContentView.canRun()){var v_oAuthoringApp=v_oCurrentContentView.getAuthoringApplication();"datasets"==v_oCurrentContentView.perspective?v_bShareable=!v_bEmbed:("classicviewer"==v_oCurrentContentView.perspective||v_oAuthoringApp&&v_oAuthoringApp.SharedState.Get("isViewer"))&&v_oAuthoringApp&&v_oAuthoringApp.SharedState.Get("storeID")&&(v_bShareable=!0)}return v_bShareable}}}),define("bi/authoring/utils/U_Blocker",[],function(){var m_divEventBlocker,K_iKeyTab=9,f_stopTabKey=function(e){e.keyCode==K_iKeyTab&&(e.preventDefault(),e.stopPropagation())},U_Blocker={};return U_Blocker.F_ShowEventBlocker=function(v_iZIndex){return m_divEventBlocker||(m_divEventBlocker=document.body.appendChild(document.createElement("DIV")),m_divEventBlocker.onkeydown=f_stopTabKey,m_divEventBlocker.style.position="absolute",m_divEventBlocker.style.left="0",m_divEventBlocker.style.top="0",m_divEventBlocker.style.width="100%",m_divEventBlocker.style.height="100%"),m_divEventBlocker.style.zIndex=v_iZIndex,m_divEventBlocker.style.visibility="visible",m_divEventBlocker},U_Blocker.F_HideEventBlocker=function(){m_divEventBlocker&&(m_divEventBlocker.style.visibility="hidden",["onmousedown","onmouseup","onmousemove","onclick","ondblclick","onmouseover","onmouseout"].forEach(function(s){this[s]=null},m_divEventBlocker))},U_Blocker}),define("bi/authoring/utils/U_Object",[],function(){var U_Object={};return U_Object.F_IsEmpty=function(o){for(var s in o)return!1;return!0},U_Object.F_ToValueArray=Object.values?function(o){return Object.values(o)}:function(o){var a=[];for(var s in o)a.push(o[s]);return a},U_Object.F_GetLength=function(o){var i=0;for(var s in o)i++;return i},U_Object.F_Copy=Object.assign?function(o){return Object.assign({},o)}:function(o){var v_oCopy={};for(var s in o)v_oCopy[s]=o[s];return v_oCopy},U_Object.F_TypeOf=function(v){var s=typeof v;if("object"==s){if(!v)return"null";if(Array.isArray(v))return"array"}return s},U_Object.F_Clone=function(o){switch(this.F_TypeOf(o)){case"number":case"string":case"boolean":case"undefined":return o;case"object":var v_oClone={};for(var s in o)o.hasOwnProperty(s)&&(v_oClone[s]=this.F_Clone(o[s]));return v_oClone;case"array":for(var v_aClone=[],v_iLength=o.length,i=0;v_iLength>i;i++)v_aClone[i]=this.F_Clone(o[i]);return v_aClone;case"function":}},U_Object.F_Subtract=function(o1,o2){var v_oNew=this.F_Copy(o1);for(var s in o2)delete v_oNew[s];return v_oNew},U_Object.F_Compare=function(o1,o2){if(this.F_GetLength(o1)!=this.F_GetLength(o2))return!1;for(var v_sPropName in o1){if("undefined"==typeof o2[v_sPropName])return!1;var v_oVal1=o1[v_sPropName],v_oVal2=o2[v_sPropName],v_bEqual=!1;switch(typeof o1[v_sPropName]){case"object":v_bEqual=this.F_Compare(v_oVal1,v_oVal2);break;case"function":v_bEqual=v_oVal1.toString()===v_oVal2.toString();break;default:v_bEqual=v_oVal1===v_oVal2}if(!v_bEqual)return!1}return!0},U_Object}),define("bi/authoring/utils/U_ClearableTimeout",[],function(){var f_timeoutHandler=function(v_fn,v_oTimeoutHandle){null!==v_oTimeoutHandle.m_iTimeoutId&&(v_oTimeoutHandle.m_iTimeoutId=null,v_fn())},U_ClearableTimeout={};return U_ClearableTimeout.F_Create=function(v_fn,v_iTimeout){var v_oTimeoutHandle={};return v_oTimeoutHandle.m_iTimeoutId=setTimeout(f_timeoutHandler.bind(this,v_fn,v_oTimeoutHandle),v_iTimeout),v_oTimeoutHandle},U_ClearableTimeout.F_Clear=function(v_oTimeoutHandle){if(v_oTimeoutHandle.m_iTimeoutId){var v_iTimeoutId=v_oTimeoutHandle.m_iTimeoutId;v_oTimeoutHandle.m_iTimeoutId=null,clearTimeout(v_iTimeoutId)}},U_ClearableTimeout}),define("bi/authoring/utils/rsPromptHandler",["bi/authoring/utils/pat/rsLaunchParameters","bi/authoring/utils/U_Blocker","bi/authoring/utils/U_Object","bi/authoring/utils/U_ClearableTimeout"],function(rsLaunchParameters,U_Blocker,U_Object,U_ClearableTimeout){var rsPromptHandler={};return rsPromptHandler.k_iPollPromptWindow=1e3,rsPromptHandler.m_oPromptListeners={},rsPromptHandler.m_oPromptWindows={},rsPromptHandler.m_iPromptId=0,rsPromptHandler.f_getPromptId=function(){return++this.m_iPromptId},rsPromptHandler.f_createSoapPromptLaunchParameters=function(v_docSOAPResponse,v_fnOkCallback){return this.f_createPromptLaunchParameters(v_docSOAPResponse,null,v_fnOkCallback)},rsPromptHandler.f_createPromptLaunchParameters=function(v_docSOAPResponse,v_oRequest,v_fnOkCallback){var v_oLaunchParameters={promptFnOkCallback:v_fnOkCallback,reportXML:null};return v_docSOAPResponse&&(v_oLaunchParameters.promptSOAPResponse=(new XMLSerializer).serializeToString(v_docSOAPResponse)),v_oRequest&&(v_oLaunchParameters.promptRequest=v_oRequest),v_oLaunchParameters},rsPromptHandler.f_createRestPromptLaunchParameters=function(v_oRequest,v_fnOkCallback){return this.f_createPromptLaunchParameters(null,v_oRequest,v_fnOkCallback)},rsPromptHandler.f_prompting_OkCallback=function(v_sPromptId,v_oResponse,v_oAttachments,v_sParameters,v_oOpener){var pdsState={v_sClientContext:v_sPromptId,response:v_oResponse,attachments:v_oAttachments,parameters:v_sParameters,opener:v_oOpener},v_oOpener=null;"Cancel"!=pdsState.state&&(pdsState.parameters,this.m_oPromptListeners[pdsState.v_sClientContext].F_SetPromptCallbackResponse&&this.m_oPromptListeners[pdsState.v_sClientContext].F_SetPromptCallbackResponse(pdsState.response,pdsState.attachments),v_oOpener=pdsState.opener);var v_sClientContext=pdsState.v_sClientContext;if(!v_sClientContext)for(var s in this.m_oPromptWindows)v_sClientContext=s;if(this.m_iLastPromptTimeoutId&&(U_ClearableTimeout.F_Clear(this.m_iLastPromptTimeoutId),this.m_iLastPromptTimeoutId=null),setTimeout(function(v_sClientContext){this.f_fireOnPromptingComplete(v_sClientContext),v_oOpener&&v_oOpener.close()}.bind(rsPromptHandler,v_sClientContext),0),delete this.m_oPromptWindows[v_sClientContext],U_Object.F_IsEmpty(this.m_oPromptWindows))U_Blocker.F_HideEventBlocker();else for(var s in this.m_oPromptWindows){this.m_oPromptWindows[s].focus();break}},rsPromptHandler.F_DoPrompting=function(v_oListener,v_docSOAPResponse,v_oGlassContext){var v_frmPrompting,v_sUrl,v_oLaunchParameters,v_sPromptId=this.f_getPromptId();v_oLaunchParameters=this.f_createSoapPromptLaunchParameters(v_docSOAPResponse,this.f_prompting_OkCallback.bind(this,v_sPromptId)),v_oLaunchParameters.promptOutputPages=v_oListener.getOutputPages(v_docSOAPResponse);var v_oContext={urlMap:{perspective:"authoring",isViewer:!0,UIProfile:"Titan",promptResponse:"promptPage",ui_appbar:!1,ui_navbar:!1,launchParametersKey:rsLaunchParameters.Store(v_oLaunchParameters)}};return v_sUrl=v_oGlassContext.getUrl(v_oContext),this.f_launchPrompt(v_oListener,v_sUrl,v_frmPrompting,v_oLaunchParameters,v_sPromptId)},rsPromptHandler.f_onPromptBlockerMouseDown=function(){for(var s in this.m_oPromptWindows)return void this.m_oPromptWindows[s].focus();U_Blocker.F_HideEventBlocker()},rsPromptHandler.f_launchPrompt=function(v_oListener,v_sUrl,v_frmPrompting,v_oLaunchParameters,v_sPromptId){var v_elBlocker=U_Blocker.F_ShowEventBlocker(1e6);return v_elBlocker.onmousedown=this.f_onPromptBlockerMouseDown.bind(this),this.m_oPromptListeners[v_sPromptId]=v_oListener,this.m_oPromptWindows[v_sPromptId]=window.open(v_sUrl,v_frmPrompting?v_frmPrompting.target:"_blank","directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=600,width=1000"),Boolean(this.m_oPromptWindows[v_sPromptId])?(this.m_oPromptWindows[v_sPromptId].focus(),v_frmPrompting&&v_frmPrompting.submit(),v_oLaunchParameters&&(v_oLaunchParameters.promptOpener=this.m_oPromptWindows[v_sPromptId]),this.m_iLastPromptTimeoutId=U_ClearableTimeout.F_Create(this.f_checkPromptingWindowState.bind(this,v_sPromptId),this.k_iPollPromptWindow),!0):(U_Blocker.F_HideEventBlocker(),!1)},rsPromptHandler.f_checkPromptingWindowState=function(v_sPromptId){if(this.m_iLastPromptTimeoutId=null,this.m_oPromptWindows[v_sPromptId]){var v_bWindowClosed=!1;try{v_bWindowClosed=this.m_oPromptWindows[v_sPromptId].closed}catch(e){v_bWindowClosed=!0}if(v_bWindowClosed){if(delete this.m_oPromptWindows[v_sPromptId],U_Object.F_IsEmpty(this.m_oPromptWindows))U_Blocker.F_HideEventBlocker();else for(var s in this.m_oPromptWindows){this.m_oPromptWindows[s].focus();break}setTimeout(this.f_fireOnPromptingComplete.bind(this,v_sPromptId),0)}else this.m_iLastPromptTimeoutId=U_ClearableTimeout.F_Create(this.f_checkPromptingWindowState.bind(this,v_sPromptId),this.k_iPollPromptWindow)}},rsPromptHandler.f_OnUnLoad=function(v_fOnUnLoad){for(var v_sPromptId in this.m_oPromptWindows){var v_bWindowClosed=!1;try{v_bWindowClosed=this.m_oPromptWindows[v_sPromptId].closed}catch(e){v_bWindowClosed=!0}if(!v_bWindowClosed)try{this.m_oPromptWindows[v_sPromptId].close()}catch(e){}delete this.m_oPromptWindows[v_sPromptId]}v_fOnUnLoad&&v_fOnUnLoad()},rsPromptHandler.f_fireOnPromptingComplete=function(v_sClientContext){this.m_oPromptListeners[v_sClientContext]&&this.m_oPromptListeners[v_sClientContext].F_OnServerPromptingComplete&&this.m_oPromptListeners[v_sClientContext].F_OnServerPromptingComplete(),delete this.m_oPromptListeners[v_sClientContext]},rsPromptHandler.F_DoRestPrompting=function(v_oListener,v_oRequest,v_oGlassContext){var v_iPromptId=this.f_getPromptId(),v_oLaunchParameters=this.f_createRestPromptLaunchParameters(v_oRequest,this.f_prompting_OkCallback.bind(this,v_iPromptId)),v_oContext={urlMap:{perspective:"authoring",isViewer:!0,UIProfile:"Titan",promptResponse:"url",ui_appbar:!1,ui_navbar:!1,launchParametersKey:rsLaunchParameters.Store(v_oLaunchParameters,!0)}},v_sUrl=v_oGlassContext.getUrl(v_oContext);return this.f_launchPrompt(v_oListener,v_sUrl,null,v_oLaunchParameters,v_iPromptId)},window.onunload=rsPromptHandler.f_OnUnLoad.bind(rsPromptHandler,window.onunload),rsPromptHandler}),define("bi/classicviewer/cvContentView",["bi/glass/app/ContentView","jquery","q","bi/classicviewer/nls/StringResource","bi/commons/utils/Utils","bi/authoring/utils/pat/rsLaunchParameters","bi/authoring/utils/pat/rsPromptParameters","bi/authoring/utils/rsPerformance","bi/authoring/utils/rsCommon","bi/authoring/utils/rsOpenHelper","bi/authoring/utils/rsShareHelper","bi/authoring/utils/rsPromptHandler","bi/admin/common/utils/parameters/ParameterValues"],function(ContentView,$,Q,StringResource,Utils,rsLaunchParameters,rsPromptParameters,rsPerformance,rsCommon,rsOpenHelper,rsShareHelper,rsPromptHandler,ParameterValues){"use strict";var classicViewerGatewaySuffix="v1/disp",promptPageEndpoint="/rds/promptPage/report/",cvFormFields=["cv.navlinks","cv.header","cv.toolbar","cv.selection","cv.drill","cv.contextInfo","cv.contextmenu","cv.id","cv.responseFormat","cv.rsProfile","cv.showFaultPage","cv.useAjax","cv.reuseConversation","cv.promptForDownload","cv.gateway","cv.webcontent","cv.keepWindowOpen","ui.action","ui.cafcontextid","ui.conversation","ui.spec","ui.errURL","ui.routingServerGroup","ui.name","ui.object","run.outputFormat","run.outputLocale","run.outputPageDefinition","run.outputPageOrientation","run.verticalElements","run.horizontalElements","run.prompt","run.xslURL","run.data","specification.editSpecification","modelPath","m_tracking","parameterValues","reuseResults","keepIterators","rs_aliases","authenticitytoken","specificationType","system.http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures","biDirectional.http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled","generic.anyURI.runOptionEnum#globalParameters","isTitan","IncludePerformance"],g_reDefaultOutput=/^defaultOutput\((.*),\s*'[^']*'\s*,\s*'[^']*'\s*\)/,cvContentView=ContentView.extend({init:function(options,appView){rsCommon.decodeAndMoveCMProperties(options),rsCommon.convertStringQSToValues(options,options.glassContext),rsCommon.decodeAndMoveRSOptions(options),cvContentView.inherited("init",this,arguments),this.m_sTitle=StringResource.get("classicviewer_welcome"),this.m_oAppView=appView;try{var v_oLaunchParameters=rsLaunchParameters.Retrieve(this.launchParametersKey);if(!v_oLaunchParameters&&window.opener&&!window.opener.closed&&window.opener.RSParameters)var v_sLaunchParametersKey=window.opener.RSParameters.launchParametersKey,v_oLaunchParameters=rsLaunchParameters.Retrieve(v_sLaunchParametersKey);else window.parent&&options.launchParametersRef&&window.parent[options.launchParametersRef]&&(this.m_oPromptContext=window.parent[options.launchParametersRef].promptContext);v_oLaunchParameters&&$.extend(!0,this,v_oLaunchParameters)}catch(e){console.log("cvContentView.init() - Call to window.opener failed, assume it doesn't exist")}this.m_bFullyInitialized=!1,this.m_sCreateCallback="cvCreateCallback"+Date.now()},_postInit:function(){if(!this.m_bFullyInitialized){this.m_bFullyInitialized=!0;var options=this;if("output"==options.type&&options.cmProperties&&options.cmProperties.parent&&options.cmProperties.parent[0]&&options.cmProperties.parent[0].parent){var v_sReportName=options.cmProperties.parent[0].parent[0].defaultName;this.m_sTitle=v_sReportName+" - "+options.cmProperties.modificationTime.substring(0,10)+" - "+options.cmProperties.format}else options.cmProperties&&options.cmProperties.defaultName?this.m_sTitle=options.cmProperties.defaultName:options.defaultName&&(this.m_sTitle=options.defaultName);options.rsFinalRunOptions&&("undefined"!=typeof options.rsFinalRunOptions.format&&(options.format=options.rsFinalRunOptions.format),"undefined"!=typeof options.rsFinalRunOptions.locale&&(options.locale=options.rsFinalRunOptions.locale),"undefined"!=typeof options.rsFinalRunOptions.prompt&&(options.prompt=options.rsFinalRunOptions.prompt),"undefined"!=typeof options.rsFinalRunOptions.a11y&&(options.a11y=options.rsFinalRunOptions.a11y),"undefined"!=typeof options.rsFinalRunOptions.bidi&&(options.bidi=options.rsFinalRunOptions.bidi),"undefined"!=typeof options.rsFinalRunOptions.editSpecification&&(options.editSpecification=options.rsFinalRunOptions.editSpecification),delete options.rsFinalRunOptions),this.m_oRVFormParameters={},cvFormFields.forEach(function(v_sFormField){"undefined"!=typeof options[v_sFormField]&&(this.m_oRVFormParameters[v_sFormField]=options[v_sFormField])},this),options.format&&!this.m_oRVFormParameters["run.outputFormat"]&&(this.m_oRVFormParameters["run.outputFormat"]=options.format),options.contentLocale&&(this.m_oRVFormParameters["run.outputLocale"]=options.contentLocale),"undefined"!=typeof options.prompt?this.m_oRVFormParameters["run.prompt"]="string"==typeof options.prompt?"true"==options.prompt:!!options.prompt:this.m_oRVFormParameters["run.prompt"]=!0,"undefined"!=typeof options.a11y&&(this.m_oRVFormParameters["system.http://developer.cognos.com/ceba/constants/systemOptionEnum#accessibilityFeatures"]=!!options.a11y),"undefined"!=typeof options.bidi&&(this.m_oRVFormParameters["biDirectional.http://developer.cognos.com/ceba/constants/biDirectionalOptionEnum#biDirectionalFeaturesEnabled"]=!!options.bidi),"undefined"!=typeof options.editSpecification&&(this.m_oRVFormParameters["specification.editSpecification"]=options.editSpecification),this.m_oRVFormParameters["ui.reuseWindow"]=!0,this.m_oRVFormParameters["cv.createCallback"]=this.m_sCreateCallback,options.parameterValuesJSON?this.m_oRVFormParameters.parameterValues=rsPromptParameters.rsBuildPromptParameters(null,options.parameterValuesJSON):options.parameterValuesXML&&(this.m_oRVFormParameters.parameterValues=options.parameterValuesXML),this.m_aPromptParameters=[];for(var v_sKey in options)options.hasOwnProperty(v_sKey)&&0==v_sKey.indexOf("p_")&&options[v_sKey]&&this.m_aPromptParameters.push({name:v_sKey,value:options[v_sKey]});this.m_aPromptParametersComplex=[],options.promptParameters&&(this.m_aPromptParametersComplex=Array.isArray(options.promptParameters)?options.promptParameters:[options.promptParameters]);var v_sSearchPath=this.getSearchPath(),v_sStoreId=this.cmProperties&&this.cmProperties.id,v_sReportSearchPath=v_sSearchPath||(v_sStoreId?'storeID("'+v_sStoreId+'")':"");if(this.m_oRVFormParameters["ui.object"]=v_sReportSearchPath,this.m_oRVFormParameters["ui.object"]||(this.m_oRVFormParameters["cv.id"]="RS"),"output"==this.type){this.m_oRVFormParameters["ui.action"]="view";for(var v_sProp in this.m_oRVFormParameters)"run."==v_sProp.substring(0,4)&&delete this.m_oRVFormParameters[v_sProp]}else this.m_oRVFormParameters["ui.object"]?(this.m_oRVFormParameters["ui.action"]="run",delete this.m_oRVFormParameters["ui.spec"]):this.m_oRVFormParameters["ui.spec"]?(this.m_oRVFormParameters["ui.action"]="runSpecification",delete this.m_oRVFormParameters["ui.object"]):(delete this.m_oRVFormParameters["ui.action"],delete this.m_oRVFormParameters["ui.spec"],delete this.m_oRVFormParameters["ui.object"],this.glassContext.showToast(StringResource.get("invalid_refresh"),{type:"error"}));this.m_oRVFormParameters["cv.header"]=!1,this.m_oRVFormParameters["cv.toolbar"]=!1,this.m_oRVFormParameters["cv.keepWindowOpen"]=!0,this.m_oRVFormParameters.isTitan=!0,this.glassContext&&this.glassContext.services&&this.glassContext.services.userProfile&&this.glassContext.services.userProfile.userProfileSettings&&this.glassContext.services.userProfile.userProfileSettings.parameter_values&&(this.m_oRVFormParameters["generic.anyURI.runOptionEnum#globalParameters"]=ParameterValues.toXML(this.glassContext.services.userProfile.userProfileSettings.parameter_values))}},showWaitIndicator:function(){this.m_elDivViewerContainer.style.visibility="hidden",this.m_elDivStartUp.style.visibility="visible"},hideWaitIndicator:function(){this.m_elDivStartUp.style.visibility="hidden",this.m_elDivViewerContainer.style.visibility="visible"},_getNameFromViewer:function(){var v_oViewer=this.getCognosViewer();return v_oViewer&&v_oViewer.envParams&&v_oViewer.envParams["ui.name"]},getTitle:function(){
- return this.m_sTitle},getIcon:function(){return"common-report"},getIconTooltip:function(){return StringResource.get("classicviewer_welcome")},getReportStoreId:function(){return rsCommon.isObjectOfType(this.cmProperties,"output")?this.cmProperties.parent[0].parent[0].id:this.cmProperties&&this.cmProperties.id},getSearchPath:function(){return this.cmProperties&&this.cmProperties.searchPath},getType:function(){var v_sType=this.cmProperties&&this.cmProperties.type;if(!v_sType){var v_oCV=this.getCognosViewer();v_sType=v_oCV&&v_oCV.envParams["ui.objectClass"]}return v_sType},getTimeStamp:function(){return(new Date).toUTCString()},updateButtons:function(){var v_bRead=!0;this.cmProperties&&this.cmProperties.permissions&&-1==this.cmProperties.permissions.indexOf("read")&&(v_bRead=!1);var v_bShowEdit=!1;if(this.glassContext.hasCapability("canUseReportStudio")&&this.getReportStoreId()&&v_bRead&&(v_bShowEdit=!0),this.cmProperties&&"reportView"==this.cmProperties.type?v_bShowEdit=!1:this.cmProperties&&"report"==this.cmProperties.type&&this.cmProperties.metadataModelPackage&&this.cmProperties.metadataModelPackage[0]&&this.cmProperties.metadataModelPackage[0].effectiveUserCapabilities&&-1===this.cmProperties.metadataModelPackage[0].effectiveUserCapabilities.indexOf("canUseReportStudio")&&(v_bShowEdit=!1),"output"==this.type||this.cmProperties&&"output"==this.cmProperties.type){var v_bRun=-1!=this.cmProperties.permissions.indexOf("execute");this._setDisplayForPlugins(v_bRun,["com.ibm.bi.classicviewer.outputBtn"]),this._setDisplayForPlugins(!1,["com.ibm.bi.classicviewer.saveBtn","com.ibm.bi.classicviewer.editBtn","com.ibm.bi.classicviewer.runMenu","com.ibm.bi.classicviewer.previousReportBtn"])}else{var v_bHasStoreId=!!this.getReportStoreId(),v_sPluginId="com.ibm.bi.classicviewer.editBtn";this._setDisplayForPlugins(v_bShowEdit,[v_sPluginId]),this._setDisplayForPlugins(v_bHasStoreId,["com.ibm.bi.classicviewer.saveBtn"]),this._setDisplayForPlugins(v_bHasStoreId,["com.ibm.bi.classicviewer.runMenu"]),this._setDisplayForPlugins(!1,["com.ibm.bi.classicviewer.previousReportBtn","com.ibm.bi.classicviewer.outputBtn"])}},_showViewer:function(){this.hideWaitIndicator(),this.updateButtons(),delete window.OnErrorPage},show:function(){if(this.m_bDeactivated=void 0,cvContentView.inherited("show",this,arguments),this.m_aFnCallbacks)for(var fnCallback;this.m_aFnCallbacks.length>0;)(fnCallback=this.m_aFnCallbacks.shift())()},_setEnabledForPlugins:function(v_bEnabled,v_aPluginIds){v_aPluginIds.forEach(function(v_sPluginId){var v_oPlugin=this.findPlugin(v_sPluginId);v_oPlugin?v_bEnabled?v_oPlugin.enable():v_oPlugin.disable():console.log("could not find plugin: %s",v_sPluginId)},this.glassContext)},_setDisplayForPlugins:function(v_bShow,v_aPluginIds){v_aPluginIds.forEach(function(v_sPluginId){var v_oPlugin=this.findPlugin(v_sPluginId);v_oPlugin?v_bShow?v_oPlugin.show():v_oPlugin.hide():console.log("could not find plugin: %s",v_sPluginId)},this.glassContext)},_isInternetExplorer:function(){var v_sAgent=navigator.userAgent.toLowerCase(),v_fIEVersion=-1!=v_sAgent.search(/trident\/([0-9]+\.[0-9]+)/)?parseFloat(RegExp.$1):0;return v_fIEVersion>=7},removePdfClass:function(){this._isInternetExplorer()&&this.m_elDivViewerContainer.classList.remove("PdfViewer")},addPdfClass:function(){this._isInternetExplorer()&&this.m_elDivViewerContainer.classList.add("PdfViewer")},onReportStatusComplete:function(){rsPerformance.mark("cvContentView.onReportStatusComplete"),console.timeEnd("rsperf: render->reportStatusComplete"),this.getReportStoreId()&&this._setEnabledForPluginsLazily(!0,["com.ibm.bi.classicviewer.saveBtn","com.ibm.bi.classicviewer.runMenu"]);var v_oCognosViewer=this.getCognosViewer();v_oCognosViewer&&"PDF"==v_oCognosViewer.outputFormat?(this.addPdfClass(),this.m_iFramePDF=this.m_iframeClassicViewer.contentDocument.querySelector("iframe")):(this.removePdfClass(),delete this.m_iFramePDF)},onReportStatusPrompting:function(){if(this.getReportStoreId()){this._setEnabledForPluginsLazily(!1,["com.ibm.bi.classicviewer.saveBtn","com.ibm.bi.classicviewer.runMenu"]);var v_sCSSSelectors=".clsTextWidget, .clsSelectDateEditBox, .clsSelectDateYearEditBox, .clsSelectDateEditBox, .clsSelectDateYearEditBox",v_nlPromptingControl=this.m_iframeClassicViewer.contentDocument.querySelectorAll(v_sCSSSelectors),v_sCSSAllSelectors=v_sCSSSelectors+", .bp";if(v_nlPromptingControl.length>0){var v_aSelectors=v_sCSSAllSelectors.split(", "),bFound=v_aSelectors.includes("."+this.m_iframeClassicViewer.contentDocument.activeElement.className);0==bFound&&v_nlPromptingControl[0].focus()}}},_setEnabledForPluginsLazily:function(v_bEnabled,v_aPluginIds){this.m_bDeactivated?(this.m_aFnCallbacks||(this.m_aFnCallbacks=[]),this.m_aFnCallbacks.push(function(){this._setEnabledForPlugins(v_bEnabled,v_aPluginIds)}.bind(this))):this._setEnabledForPlugins(v_bEnabled,v_aPluginIds)},getViewerConfiguration:function(){return console.timeEnd("rsperf: render->getViewerConfiguration"),rsPerformance.mark("cvContentView.getViewerConfiguration"),{httpRequestCallbacks:{reportStatus:{complete:this.onReportStatusComplete.bind(this),prompting:this.onReportStatusPrompting.bind(this)}}}},render:function(){if(this.rsResolved)return this._render();!this.cmProperties&&this.objRef&&(this.cmProperties={id:this.objRef,type:this.type});var v_oOpenSpec={cmProperties:this.cmProperties,glassContext:this.glassContext,urlMap:this};return rsOpenHelper.resolveUrlMap(v_oOpenSpec).then(function(v_oResolvedOpenSpec){return $.extend(this,v_oResolvedOpenSpec.urlMap),this._render()}.bind(this))},_cleanPromptContext:function(){delete window.OnReportOutput,delete window.OnErrorPage,delete window.FinishCollectPrompts,this.m_oPromptContext.promptOpener.close()},_render:function(){this._postInit(),this.updateButtons();var deferred=$.Deferred();console.timeEnd("rsperf: onSelectItem->render"),console.time("rsperf: render->loadIframe"),rsPerformance.mark("cvContentView.render"),this.$el.empty();var v_aWaiting=document.getElementsByClassName("loadingIndicatorContainer"),v_oWaiting=v_aWaiting&&v_aWaiting.length>0?v_aWaiting.item(0):null;return this.m_elDivStartUp=document.createElement("div"),this.m_elDivStartUp.innerHTML=v_oWaiting?v_oWaiting.outerHTML:"",this.$el.append(this.m_elDivStartUp),this.m_elDivViewerContainer=document.createElement("div"),this.m_elDivViewerContainer.style.width="100%",this.m_elDivViewerContainer.style.height="100%",this.m_elDivViewerContainer.style.position="absolute",this.m_elDivViewerContainer.style.visibility="hidden",this.$el.append(this.m_elDivViewerContainer),this.m_iframeClassicViewer=document.createElement("iframe"),this.m_iframeClassicViewer.name=this.m_iframeClassicViewer.title=this.id||"_classicViewer",this.m_iframeClassicViewer.src="about:blank",this.m_iframeClassicViewer.style.border="none",this.m_iframeClassicViewer.style.width="100%",this.m_iframeClassicViewer.style.height="100%",this.m_iframeClassicViewer.style.position="absolute",this.m_oAppView.$(".navbar").addClass("narrow"),console.time("rsperf: render->getViewerConfiguration"),window.getViewerConfiguration=this.getViewerConfiguration.bind(this),console.time("rsperf: render->reportStatusComplete"),this.m_oPromptContext&&this.m_oPromptContext.promptOpener&&this.getReportStoreId()?(window.OnReportOutput=function(){this.m_oPromptContext.promptOpenerShown||(this._showViewer(),this.m_oPromptContext.promptOpener.show(),this.m_oPromptContext.promptOpenerShown=!0)}.bind(this),window.OnErrorPage=function(code,message,details){if(this.m_oPromptContext.promptFnErrorCallback){var error={code:code,message:message,details:details};this.m_oPromptContext.promptFnErrorCallback(error)}else this.m_oPromptContext.promptFnCancelCallback&&this.m_oPromptContext.promptFnCancelCallback();this._cleanPromptContext()}.bind(this),window.FinishCollectPrompts=function(success){success?this.m_oPromptContext.promptFnOkCallback1?(console.log("promptContext.promptFnOkCallback1"),this.m_oPromptContext.promptFnOkCallback1(),this._cleanPromptContext()):(console.log("promptContext.promptFnOkCallback"),this.glassContext.getSvc(".Prompting").then(function(promptingSvc){promptingSvc.getPromptAnswers(this.m_oPromptContext.promptRDSId).then(function(values){this.m_oPromptContext.promptFnOkCallback(values),this._cleanPromptContext()}.bind(this))}.bind(this))):(this.m_oPromptContext.promptFnCancelCallback&&this.m_oPromptContext.promptFnCancelCallback(),this._cleanPromptContext())}.bind(this),this.glassContext.services.ajax.ajax({url:classicViewerGatewaySuffix+promptPageEndpoint+this.getReportStoreId(),type:"GET",dataType:"xml"}).done(function(xmlDoc,status,jqXHR){this.m_oPromptContext.promptRDSId=xmlDoc.getElementsByTagNameNS("http://developer.cognos.com/schemas/rds/types/2","promptID").item(0).textContent,this.m_oPromptContext.promptOpener.id=this.m_oPromptContext.promptRDSId;var v_sParameterValues=rsPromptParameters.rsBuildPromptParameters(null,this.m_oPromptContext.parameters);this.glassContext.services.ajax.ajax({type:"PUT",url:"v1/objects/"+this.m_oPromptContext.promptRDSId,data:JSON.stringify({type:"runTimeState",state:v_sParameterValues}),headers:{Accept:"application/json","Content-Type":"application/json"}}).done(function(){this._createAndSubmitCollectParameterValuesForm(this.getReportStoreId(),xmlDoc.getElementsByTagNameNS("http://developer.cognos.com/schemas/rds/types/2","url").item(0).textContent),deferred.resolve(this.$el)}.bind(this))}.bind(this))):(this.m_iframeClassicViewer.onload=this._onLoad.bind(this),this.loadClassicViewer(),deferred.resolve(this.$el)),this.m_elDivViewerContainer.appendChild(this.m_iframeClassicViewer),deferred.promise()},_onClassicViewerCreated:function(v_sCV){this.m_iframeClassicViewer&&this.m_iframeClassicViewer.contentWindow&&(this.m_oCognosViewer=this.m_iframeClassicViewer.contentWindow[v_sCV]),this._onClassicViewerLoaded()},_onClassicViewerLoaded:function(){if(console.timeEnd("rsperf: render->loadIframe"),console.timeEnd("rsperf: total_RunReport"),rsPerformance.mark("cvContentView._onClassicViewerLoaded"),rsPerformance.mark("authoring-selectItemAndDraw-stop"),this.isViewerLoaded()){var v_oCognosViewer=this.getCognosViewer();if(v_oCognosViewer){if(this.m_iframeClassicViewer.contentWindow.onunload=this._release.bind(this),this.original_executeBackURL=this.m_iframeClassicViewer.contentWindow.executeBackURL,this.m_iframeClassicViewer.contentWindow.executeBackURL=this.executeBackURL.bind(this),this.original_doSingleDrill=this.m_iframeClassicViewer.contentWindow.doSingleDrill,this.m_iframeClassicViewer.contentWindow.doSingleDrill=this.doSingleDrill.bind(this),this.m_iframeClassicViewer.contentWindow.rsGoToHandler=this.gotoHandler.bind(this),this.m_iframeClassicViewer.contentWindow.f_restorePDF=this.f_restorePDF.bind(this),this.original_addDrillEnvironmentFormFields=this.m_iframeClassicViewer.contentWindow.addDrillEnvironmentFormFields,this.m_iframeClassicViewer.contentWindow.addDrillEnvironmentFormFields=this.addDrillEnvironmentFormFields.bind(this),this.glassContext&&this.glassContext.isDevInstall&&this.glassContext.isDevInstall()&&rsPerformance.summarizeClassicViewerRun(this),v_oCognosViewer.updateNewBrowserWindow&&this.m_iframeClassicViewer.contentWindow.getFormWarpRequest){var form=this.m_iframeClassicViewer.contentWindow.getFormWarpRequest(),v_sBackURL=v_oCognosViewer.m_bIgnoreCloseWindow?"":form?form["ui.backURL"].value:"";"javascript:window.close();"==v_sBackURL&&(v_oCognosViewer.updateNewBrowserWindow=function(){this.glassContext.closeAppView("classicviewer",this.id)}.bind(this))}v_oCognosViewer.focusBackToContent=function(evt){this.glassContext.accessibilityController.setFocusToAppbar()}.bind(this),v_oCognosViewer.focusBackToMainContent=function(evt){this.setFocus()}.bind(this)}this._showViewer()}this.m_iframeClassicViewer.onload=null},createLaunchSpec:function(v_oCmObject,format,method,locale,sPrompt){format=-1!=format.indexOf("HTML")?"HTML":format;var v_oLaunchSpec={format:format,objRef:v_oCmObject.id,type:v_oCmObject.type,contentLocale:locale};switch(method){case"execute":case"run":v_oLaunchSpec.action="run";break;case"view":case"viewOutput":v_oLaunchSpec.action="viewOutput";break;case"edit":v_oLaunchSpec.action="edit"}switch(sPrompt){case"yes":case"true":v_oLaunchSpec.prompt=!0;break;case"no":case"false":v_oLaunchSpec.prompt=!1}return v_oLaunchSpec},addDrillEnvironmentFormFields:function(drillForm,oCV){this.original_addDrillEnvironmentFormFields(drillForm,oCV),this.m_iframeClassicViewer&&this.m_iframeClassicViewer.contentWindow&&this.m_iframeClassicViewer.contentWindow.createFormField&&drillForm.appendChild(this.m_iframeClassicViewer.contentWindow.createFormField("cv.keepWindowOpen","true"))},gotoHandler:function(drillType,drill){"authoredDrillthru"==drillType?this._authoredDrillHandler(drill):this._packageDrillHandler(drill)},_packageDrillHandler:function(drillForm){this._sendDrillThroughRequest({packageDrill:!0},drillForm)},_authoredDrillHandler:function(drill){for(var target,args,method,format,locale,bookmark,sourceContext,objectPaths,cvId,sPrompt,dynamicDrill,v_aObj=[],v_aParams=[],v_oDrillDoc=this.parseXML(drill),v_nDrillNode=v_oDrillDoc&&v_oDrillDoc.documentElement.firstChild;v_nDrillNode;){switch(v_nDrillNode.nodeName){case"param":switch(v_nDrillNode.getAttribute("name")){case"action":method=this.getNodeText(v_nDrillNode);break;case"format":format=this.getNodeText(v_nDrillNode);break;case"locale":locale=this.getNodeText(v_nDrillNode);break;case"target":var v_sTarget=this.getNodeText(v_nDrillNode),v_aMatch=v_sTarget.match(g_reDefaultOutput);v_aMatch&&v_aMatch.length>1&&(v_sTarget=v_aMatch[1]),v_aObj.push("obj"),v_aObj.push(v_sTarget);break;case"prompt":sPrompt=this.getNodeText(v_nDrillNode);break;case"dynamicDrill":dynamicDrill=this.getNodeText(v_nDrillNode);break;case"showInNewWindow":target="false"==this.getNodeText(v_nDrillNode)?"":"_blank";break;case"executionParameters":break;case"metadataModel":break;case"sourceContext":sourceContext=this.getNodeText(v_nDrillNode);break;case"bookmark":bookmark=this.getNodeText(v_nDrillNode);break;case"objectPaths":objectPaths=this.getNodeText(v_nDrillNode)}break;case"drillParameters":for(var v_nParamNode=v_nDrillNode.firstChild;v_nParamNode;){if("param"==v_nParamNode.nodeName){var v_sName=v_nParamNode.getAttribute("name"),v_sValue=this.getNodeText(v_nParamNode);v_aParams.push([v_sName,v_sValue])}v_nParamNode=v_nParamNode.nextSibling}}v_nDrillNode=v_nDrillNode.nextSibling}args=[v_aObj],cvId=this.getCognosViewer().getId(),this.doSingleDrill(target,args.concat(v_aParams),method,format,locale,bookmark,sourceContext,objectPaths,cvId,sPrompt,dynamicDrill)},doSingleDrill:function(target,args,method,format,locale,bookmark,sourceContext,objectPaths,cvId,sPrompt,dynamicDrill){var v_oArguments={target:target,args:args,method:method,format:format,locale:locale,bookmark:bookmark,sourceContext:sourceContext,objectPaths:objectPaths,cvId:cvId,sPrompt:sPrompt,dynamicDrill:dynamicDrill};this.showWaitIndicator(),this.getCognosViewer().sendDrillThroughRequest=this._sendDrillThroughRequest.bind(this,v_oArguments),this.original_doSingleDrill(target,args,method,format,locale,bookmark,sourceContext,objectPaths,cvId,sPrompt,dynamicDrill)},_htmlDecode:function(v_sText){var v_oDoc=(new DOMParser).parseFromString("<div>"+v_sText+"</div>","text/html");return v_oDoc.documentElement.textContent},_sendDrillThroughRequest:function(v_oDrillArguments,v_elViewerDrillForm){for(var v_sAction=v_elViewerDrillForm.action,v_iIdx=v_sAction.indexOf("?"),v_sURL=v_iIdx>0?v_sAction.substring(0,v_iIdx):v_sAction,v_aData=[],v_nlInputs=v_elViewerDrillForm.elements,idx=0;idx<v_nlInputs.length;++idx){var v_nInput=v_nlInputs[idx];"INPUT"===v_nInput.nodeName&&v_aData.push(v_nInput.name+"="+encodeURIComponent(v_nInput.value))}v_aData.push("cv.drillServiceOnly=true");var v_oRequest={type:"POST",url:v_sAction,dataType:"xml",data:v_aData.join("&")};this.glassContext.services.ajax.ajax(v_oRequest).fail(function(x,http,z){var v_sMsg=null;if(http&&"function"==typeof http.getResponseHeader&&0==http.getResponseHeader("Content-Type").indexOf("text/html")){var v_aMatch=http.responseText.match(/<ERROR_CODE>(.*)<\/ERROR_CODE><ERROR_MSG>(.*)<\/ERROR_MSG>/);v_aMatch&&v_aMatch.length>=3&&(v_sMsg=this._htmlDecode(v_aMatch[2]),console.error("cvContentView._sendDrillThroughRequest "+v_aMatch[1]+":"+v_sMsg))}this.hideWaitIndicator(),this.glassContext.showToast(v_sMsg||"Unexpected error on drill request",{type:"error"})}.bind(this)).then(this._drillServiceResponse.bind(this,v_oDrillArguments,v_sURL))},getOutputPages:function(v_nDrillServiceResponse){var v_nDetails=v_nDrillServiceResponse.querySelector("Envelope>Body result>details"),v_aElements=this._getChildElementsByXsiType(v_nDetails,"bus:asynchDetailReportOutput"),v_nOutputPages=v_aElements.length>0?v_aElements[0]:null,v_nPage=v_nOutputPages.querySelector("item");return v_nPage?v_nPage.textContent:""},F_SetPromptCallbackResponse:function(v_sResponse,v_oAttachments){if(v_sResponse){var v_nResponse=this.parseXML(v_sResponse);this._promptDeferred&&this._promptDeferred.resolve(v_nResponse)}else this._promptDeferred.reject({state:"Cancel"})},_drillServiceResponse:function(v_oDrillArguments,v_sUrl,v_oResponseData,v_sStatus,v_oXHR){var v_nDrillServiceResponse=v_oResponseData,v_nStatus=v_nDrillServiceResponse.querySelector("Envelope>Body result>status"),v_sStatus=v_nStatus&&v_nStatus.textContent;if("working"==v_sStatus||"stillWorking"==v_sStatus)return void this._wait(v_nDrillServiceResponse,v_sUrl).fail(function(){console.error("cvContentView._drillServiceResponse wait failed"),this.hideWaitIndicator(),this.glassContext.showToast("Unexpected error on drill request",{type:"error"})}.bind(this)).then(this._drillServiceResponse.bind(this,v_oDrillArguments,v_sUrl));var v_nDetails=v_nDrillServiceResponse.querySelector("Envelope>Body result>details"),v_aElements=this._getChildElementsByXsiType(v_nDetails,"bus:asynchDetailReportStatus"),v_nReportStatus=v_aElements.length>0?v_aElements[0]:null;return v_nStatus=v_nReportStatus?v_nReportStatus.querySelector("status"):null,v_sStatus=v_nStatus&&v_nStatus.textContent,"prompting"==v_sStatus?void this._prompt(v_nDrillServiceResponse).fail(function(err){this.hideWaitIndicator(),err&&"Cancel"==err.state||(console.error("cvContentView._drillServiceResponse prompt failed"),this.glassContext.showToast(err.message,{type:"error"}))}.bind(this)).then(this._drillServiceResponse.bind(this,v_oDrillArguments,v_sUrl)):void this._doDrill(v_oDrillArguments,v_nDrillServiceResponse)},_wait:function(v_nDrillServiceResponse,v_sUrl){var v_nBody=v_nDrillServiceResponse.querySelector("Envelope>Body"),v_nResponse=v_nBody.querySelector("runSpecificationResponse,runResponse,waitResponse");v_nResponse&&v_nBody.removeChild(v_nResponse);var v_nWait=v_nDrillServiceResponse.createElementNS("http://developer.cognos.com/schemas/reportService/1","rs:wait");v_nBody.appendChild(v_nWait),this._addCafContextID(v_nDrillServiceResponse);var v_nDocElem=v_nDrillServiceResponse.documentElement,v_sWait=v_nDocElem.outerHTML||(new XMLSerializer).serializeToString(v_nDocElem),v_oRequest={type:"POST",url:v_sUrl,dataType:"xml",contentType:"text/xml; charset=UTF-8",headers:{SOAPAction:"http://www.ibm.com/xmlns/prod/cognos/reportService/201712/.absolute"},data:v_sWait};return this.glassContext.services.ajax.ajax(v_oRequest)},_addCafContextID:function(v_nSoapRequest){var v_oCognosViewer=this.getCognosViewer();if(v_oCognosViewer){var v_sCAF=v_oCognosViewer.getCAFContext();if(v_sCAF){var v_nBiBusHeader=v_nSoapRequest.querySelector("Envelope>Header>biBusHeader");if(v_nBiBusHeader){var v_nCAF=v_nBiBusHeader.querySelector("CAF");v_nCAF||(v_nCAF=v_nSoapRequest.createElement("bus:CAF"),v_nCAF.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:type","bus:CAF"),v_nBiBusHeader.appendChild(v_nCAF));var v_nContextID=v_nCAF.querySelector("contextID");v_nContextID||(v_nContextID=v_nSoapRequest.createElement("bus:contextID"),v_nContextID.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:type","xs:string"),v_nCAF.appendChild(v_nContextID)),v_nContextID.textContent=v_sCAF}}}},_prompt:function(v_nDrillServiceResponse){return this._promptDeferred=$.Deferred(),rsPromptHandler.F_DoPrompting(this,v_nDrillServiceResponse,this.glassContext),this._promptDeferred.promise()},_extractOption:function(v_nDrillThroughDetails,v_sType,v_sName){for(var v_oValue,v_nOptions=v_nDrillThroughDetails&&v_nDrillThroughDetails.querySelector("options"),v_aXMLOptions=this._getChildElementsByXsiType(v_nOptions,v_sType),idx=0;idx<v_aXMLOptions.length;++idx){var v_nOption=v_aXMLOptions[idx],v_nName=v_nOption.querySelector("name");if(v_nName&&v_nName.textContent==v_sName){var v_nValue=v_nOption.querySelector("value");if(v_nValue)if("SOAP-ENC:Array"==v_nValue.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance","type")){v_oValue=[];for(var v_nChildren=v_nValue.childNodes,idx=0;idx<v_nChildren.length;++idx){var v_nChild=v_nChildren.item(idx);v_nChild.nodeType==Node.ELEMENT_NODE&&v_oValue.push(v_nChild.textContent)}}else v_oValue=v_nValue.textContent;break}}return v_oValue},_extractPackageDrillArguments:function(v_oDrillArguments,v_nDrillThroughDetails){v_oDrillArguments.args=[];var v_nNode=v_nDrillThroughDetails.querySelector("target"),v_sNode=v_nNode?v_nNode.textContent:"";v_oDrillArguments.args.push(["obj",v_sNode]),v_oDrillArguments.target="";var v_aFormat=this._extractOption(v_nDrillThroughDetails,"bus:runOptionStringArray","outputFormat");v_oDrillArguments.format=v_aFormat&&v_aFormat.length>0?v_aFormat[0]:"",v_nNode=v_nDrillThroughDetails.querySelector("action");var v_sNode=v_nNode?v_nNode.textContent:"";v_oDrillArguments.method=v_sNode,v_oDrillArguments.locale=this.cmProperties&&"output"==this.cmProperties.type?this.cmProperties.locale:this.contentLocale||"",v_oDrillArguments.sPrompt=this._extractOption(v_nDrillThroughDetails,"bus:runOptionBoolean","prompt")},_doDrill:function(v_oDrillArguments,v_nDrillServiceResponse){var v_nDetails=v_nDrillServiceResponse.querySelector("Envelope>Body result>details"),v_aElements=this._getChildElementsByXsiType(v_nDetails,"bus:asynchDetailDrillThroughRequest"),v_nDrillThroughDetails=v_aElements.length>0?v_aElements[0]:null;v_oDrillArguments.packageDrill&&v_nDrillThroughDetails&&this._extractPackageDrillArguments(v_oDrillArguments,v_nDrillThroughDetails);var v_bDrillThoughNewWindow="_blank"==v_oDrillArguments.target?!0:!1,v_sSearchPath=v_oDrillArguments.args[0][1],v_oCurrentThisContext=this;this._getCMInfo(v_sSearchPath).then(function(v_oCmObject){var v_sDrillTargetId=v_oCmObject.id,v_oLaunchSpec=this.createLaunchSpec(v_oCmObject,v_oDrillArguments.format,v_oDrillArguments.method,v_oDrillArguments.locale,v_oDrillArguments.sPrompt),v_oDrillContext={},v_sEditSpecification=this._extractOption(v_nDrillThroughDetails,"bus:specificationOptionXMLEncodedXML","editSpecification");v_sEditSpecification&&v_sEditSpecification.length>0&&(v_oDrillContext.editSpecification=v_sEditSpecification);var v_nParameters=v_nDrillThroughDetails&&v_nDrillThroughDetails.querySelector("parameters");if(v_nParameters){var v_sParameterXML=(new XMLSerializer).serializeToString(v_nParameters);v_sParameterXML&&v_sParameterXML.length>0&&(v_oDrillContext.parameterValuesXML=v_sParameterXML)}var v_oGlass=this.glassContext,v_oGlassSettings=rsCommon.extractGlassSettings(this);if(v_bDrillThoughNewWindow){v_oLaunchSpec.launchParametersKey=rsLaunchParameters.Store(v_oDrillContext);var v_oUrlMap={objRef:v_sDrillTargetId,rsEncodedOptions:JSON.stringify(v_oLaunchSpec)};v_oUrlMap=$.extend(v_oUrlMap,v_oGlassSettings),v_oUrlMap.closeWindowOnLastView=!0,v_oUrlMap.prefetchsvc="disabled";var v_sUrl=this.glassContext.getUrl({urlMap:v_oUrlMap}),newWindow=window.open(v_sUrl,"_blank");newWindow&&newWindow.focus(),this.f_restorePDF(),this.hideWaitIndicator()}else v_oLaunchSpec=$.extend(v_oLaunchSpec,v_oDrillContext),v_oLaunchSpec=$.extend(v_oLaunchSpec,v_oGlassSettings),v_oGlass.closeAppView("authoring",v_sDrillTargetId).then(v_oGlass.closeAppView.bind(v_oGlass,"classicviewer",v_sDrillTargetId)).then(v_oGlass.openAppView.bind(v_oGlass,void 0,{content:v_oLaunchSpec})).then(function(targetAppView){return targetAppView.onViewRendered()}).then(function(){this.f_restorePDF(),this.hideWaitIndicator()}.bind(this))}.bind(this))["catch"](function(err){var v_sSearchPath=err.message,v_sMessage="Content Manager did not return information for '"+v_sSearchPath+"'";v_oCurrentThisContext.glassContext.showToast(v_sMessage,{type:"error"}),console.warn("cvContentView.sendDrillThroughRequest could NOT load: %s",err)}).bind(this)},_getChildElementsByXsiType:function(v_nNode,v_sXsiType){var v_aResult=[];if(v_nNode)for(var v_nChildren=v_nNode.childNodes,idx=0;idx<v_nChildren.length;++idx){var v_nChild=v_nChildren.item(idx);v_nChild.nodeType==Node.ELEMENT_NODE&&v_nChild.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance","type")==v_sXsiType&&v_aResult.push(v_nChild)}return v_aResult},f_restorePDF:function(){if(this.m_iFramePDF){var src=this.m_iFramePDF.src;this.m_iFramePDF.src=src}},f_convertParametersfromXmlToJsonStr:function(v_nParameters){for(var v_aParameters=[],v_nChildNode=v_nParameters.firstChild;v_nChildNode;){var v_oParameter={};if("param"===v_nChildNode.nodeName){v_oParameter.name=v_nChildNode.getAttribute("name"),v_oParameter.name=v_oParameter.name.slice(2),v_oParameter.value=[];for(var v_nSelectDoc=this.parseXML(v_nChildNode.textContent),v_aSelectOptionNodes=v_nSelectDoc.getElementsByTagName("selectOption"),i=0;i<v_aSelectOptionNodes.length;i++){var v_oValue={};v_aSelectOptionNodes[i].hasAttribute("displayValue")&&(v_oValue.display=v_aSelectOptionNodes[i].getAttribute("displayValue")),v_oValue.use=v_aSelectOptionNodes[i].getAttribute("useValue"),v_oParameter.value.push(v_oValue)}v_nChildNode=v_nChildNode.nextSibling,v_aParameters.push(v_oParameter)}}return JSON.stringify(v_aParameters)},_getCMInfo:function(v_sSearchPath){var v_sSearchPathUrl="v1/search_path?searchPath="+encodeURIComponent(v_sSearchPath)+"&fields=id,type";return this.glassContext.services.fetch.get(v_sSearchPathUrl).then(function(v_oCmInfoResponse){return v_oCmInfoResponse.data.data[0]})["catch"](function(v_oErr){throw console.log('cvContentView.getCMInfo FAILED for "%s"',v_sSearchPathUrl),new Error(v_sSearchPath)})},_extractCmPathTermFromCmPathUrl:function(v_sCmPathUrl){for(var v_sQuery=v_sCmPathUrl.split("?",2)[1],v_aFields=v_sQuery.split("&"),i=0;i<v_aFields.length;++i){var v_aNameValue=v_aFields[i].split("=",2),v_sName=v_aNameValue[0],v_sValue=v_aNameValue[1];if("path"==v_sName)return decodeURIComponent(v_sValue)}},executeBackURL:function(s_CVId){var v_oCognosViewer=this.getCognosViewer(),form=this.m_iframeClassicViewer.contentDocument.getElementById("formWarpRequest"+(s_CVId?s_CVId:"")),v_sBackURL=v_oCognosViewer.m_bIgnoreCloseWindow?"":form["ui.backURL"].value,v_nClassicViewerDialogFrame=this.m_iframeClassicViewer.contentDocument.getElementById("CMODAL_FRAME");v_oCognosViewer.modalShown&&v_nClassicViewerDialogFrame&&v_nClassicViewerDialogFrame.CModal&&(v_nClassicViewerDialogFrame.CModal.hide(),v_oCognosViewer.modalShown=!1),"javascript:window.close();"==v_sBackURL?this.glassContext.closeAppView("classicviewer",this.id):this.original_executeBackURL(s_CVId),v_oCognosViewer.m_bIgnoreCloseWindow=void 0},_createAndSubmitCollectParameterValuesForm:function(v_sStoreId,v_sUrl){v_sUrl=decodeURIComponent(v_sUrl);var v_sParameters=v_sUrl.slice(v_sUrl.indexOf("?")),v_elForm=document.createElement("form");v_elForm.target=this.m_iframeClassicViewer.name,v_elForm.method="post",v_elForm.action=classicViewerGatewaySuffix+v_sParameters,v_elForm.style.display="none",document.body.appendChild(v_elForm),v_elForm.submit(),document.body.removeChild(v_elForm)},_onLoad:function(){this.isViewerLoaded()?this._onClassicViewerLoaded():this.m_fOnLoadHandler?(this.m_fOnLoadHandler(),this.m_fOnLoadHandler=null):this._showViewer()},_createAndSubmitNewForm:function(){var v_elForm=document.createElement("form");v_elForm.target=this.m_iframeClassicViewer.name,v_elForm.method="post",v_elForm.action=classicViewerGatewaySuffix,v_elForm.style.display="none";var v_elInput=v_elForm.appendChild(document.createElement("input"));if(v_elInput.type="hidden",v_elInput.name="b_action",v_elInput.value="cognosViewer",Object.keys(this.m_oRVFormParameters).forEach(function(key){var v_elInput=v_elForm.appendChild(document.createElement("input"));v_elInput.type="hidden",v_elInput.name=key,v_elInput.value=this.m_oRVFormParameters[key]},this),rsPromptParameters.cvAddPromptParameters(v_elForm,this.m_aPromptParameters,this.m_aPromptParametersComplex),document.body.appendChild(v_elForm),"true"==this.m_oRVFormParameters.IncludePerformance){for(var v_saFormData=[],i=0;i<v_elForm.elements.length;i++){var v_sElementName=v_elForm.elements[i].name,v_sElementValue=v_elForm.elements[i].value;v_saFormData.push(encodeURIComponent(v_sElementName)+"="+encodeURIComponent(v_sElementValue))}var v_sPostData=v_saFormData.join("&").replace(/%20/g,"+"),v_http=new XMLHttpRequest,v_sBaseURI=v_elForm.action;v_http.onreadystatechange=function(){if(4==this.readyState&&200==this.status){var v_nClassicViewerIframe=document.getElementsByName("_classicViewer")[0],v_nIframeDocument=v_nClassicViewerIframe.contentDocument,v_sHeadWithBase='<head><base href="'+v_sBaseURI+'">',v_sHtmlText=v_http.responseText.replace(/<head>/,v_sHeadWithBase);v_nIframeDocument.open(),v_nIframeDocument.write(v_sHtmlText),v_nIframeDocument.close()}},v_http.open(v_elForm.method,v_elForm.action),v_http.setRequestHeader("Cache-Control","max-age=0"),v_http.setRequestHeader("Upgrade-Insecure-Requests","1"),v_http.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"),v_http.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),v_http.setRequestHeader("X-CA-IPA","1"),v_http.send(v_sPostData)}else v_elForm.submit();document.body.removeChild(v_elForm)},_setLocalSessionData:function(key,data){"undefined"!=typeof Storage?localStorage.setItem(key,data):console.log("Sorry! No Web Storage support...")},loadClassicViewer:function(){this.m_fOnLoadHandler=this._createAndSubmitNewForm.bind(this),window.OnErrorPage=function(){this._showViewer()}.bind(this),window[this.m_sCreateCallback]=this._onClassicViewerCreated.bind(this);var v_oMRU;"output"==this.getType()?this.reportProperties&&(v_oMRU=$.extend(!0,{},this.reportProperties)):this.cmProperties&&(v_oMRU=$.extend(!0,{},this.cmProperties)),v_oMRU&&(console.log("add to MRU"),this.glassContext.getSvc(".Content").then(function(contentSvc){contentSvc.addToMRU(v_oMRU)}));var v_oGlassActionToInstrumentationEventType={run:"Ran Process",viewOutput:"Read Object"},v_sInstrumentationType=v_oGlassActionToInstrumentationEventType[this.action];if(v_sInstrumentationType&&this.glassContext){var v_oInstrumentationService=this.glassContext.getCoreSvc(".Instrumentation");if(v_oInstrumentationService&&v_oInstrumentationService.enabled){var v_sType,v_sId;if("output"==this.type&&this.cmProperties){var v_oVersionedAncestor=this.cmProperties.parent[0].parent[0];v_oVersionedAncestor=v_oVersionedAncestor.base||v_oVersionedAncestor,v_sType=v_oVersionedAncestor.type,v_sId=v_oVersionedAncestor.id}else v_sType=this.type,v_sId=this.id;var v_oEvent={type:v_sInstrumentationType,objectType:v_sType,object:v_sId,"custom.viewer":"classic","custom.outputFormat":this.format,milestoneName:v_sInstrumentationType+"_"+v_sType};v_sInstrumentationType===v_oGlassActionToInstrumentationEventType.run&&(v_oEvent.processType="Run a Report"),v_oInstrumentationService.track(v_oEvent)}}},getCognosViewer:function(){if(this.m_oCognosViewer)return this.m_oCognosViewer;var v_oViewer=null;return this.m_iframeClassicViewer&&this.m_iframeClassicViewer.contentWindow&&(v_oViewer=this.m_iframeClassicViewer.contentWindow.oCV_NS_||this.m_iframeClassicViewer.contentWindow.oCVRS||this.m_iframeClassicViewer.contentWindow.oCV_THIS_,v_oViewer&&(this.m_oCognosViewer=v_oViewer)),
- v_oViewer},isViewerLoaded:function(){return this.getCognosViewer()||this.m_iframeClassicViewer&&this.m_iframeClassicViewer.contentWindow&&this.m_iframeClassicViewer.contentWindow.oCV},getContent:function(options){return rsCommon.getContent(options,this,rsShareHelper)},getApplicationContent:function(v_oContent,v_oCmProperties){var application={};return application.storeID=this.cmProperties&&this.cmProperties.id,application.cmSearchPath=!rsCommon.isObjectOfType(this.cmProperties,"output")&&this.getSearchPath(),application.reportName=this.getTitle(),application.isModified=!1,application.type=this.cmProperties&&this.cmProperties.type||void 0,application},parseXML:function(v_sXML){if(window.DOMParser)return(new window.DOMParser).parseFromString(v_sXML,"text/xml");if("undefined"!=typeof window.ActiveXObject&&new window.ActiveXObject("Microsoft.XMLDOM")){var xmlDoc=new window.ActiveXObject("Microsoft.XMLDOM");return xmlDoc.async="false",xmlDoc.loadXML(v_sXML),xmlDoc}return null},getParametersFromViewer:function(){var v_aGlassParameters=[];try{if(this.getCognosViewer())for(var v_sXMLParameters=this.getCognosViewer().getExecutionParameters(),v_oDoc=this.parseXML(v_sXMLParameters),v_nChildNode=v_oDoc.documentElement.firstChild;v_nChildNode;){if("item"==v_nChildNode.nodeName){for(var v_oGlassParamStruct={name:"",value:[]},v_nItemChildNode=v_nChildNode.firstChild;v_nItemChildNode;){switch(v_nItemChildNode.nodeName){case"bus:name":v_oGlassParamStruct.name=this.getNodeText(v_nItemChildNode);break;case"bus:value":for(var v_nValueNode=v_nItemChildNode.firstChild;v_nValueNode;){if("item"==v_nValueNode.nodeName){var v_oGlassParamValue=this.getValuesFromBusValueNode(v_nValueNode.getAttribute("xsi:type"),v_nValueNode.childNodes);v_oGlassParamStruct.value.push(v_oGlassParamValue)}v_nValueNode=v_nValueNode.nextSibling}}v_nItemChildNode=v_nItemChildNode.nextSibling}v_aGlassParameters.push(v_oGlassParamStruct)}v_nChildNode=v_nChildNode.nextSibling}}catch(err){console.log("cvContentView.getParametersFromViewer failed (%s) ",err.message)}return v_aGlassParameters},getParameterValues:function(bStripCredentials){var v_aParameterValues=this.getParametersFromViewer();if(bStripCredentials&&v_aParameterValues){var v_aParameters=[];v_aParameterValues.length>0&&(v_aParameterValues.forEach(function(v_oParameter){bStripCredentials&&v_oParameter&&v_oParameter.name&&0==v_oParameter.name.indexOf("credential:")||v_aParameters.push(v_oParameter)}),v_aParameterValues=v_aParameters)}return v_aParameterValues},getValuesFromBusValueNode:function(v_sType,v_nlNodeList){var v_oGlassParamValue={},v_oStartEnd={};v_oGlassParamValue.type=v_sType.substring(4);for(var j=0;j<v_nlNodeList.length;j++){var v_nNode=v_nlNodeList[j],v_bStart=!1;switch(v_oStartEnd={},v_nNode.nodeName){case"bus:start":v_bStart=!0;case"bus:end":for(var v_nChildNode=v_nNode.firstChild;v_nChildNode;){switch(v_nChildNode.nodeName){case"bus:inclusive":v_oStartEnd.inclusive="true"==this.getNodeText(v_nChildNode)?!0:!1;break;case"bus:display":v_oStartEnd.display=this.getNodeText(v_nChildNode);break;case"bus:use":v_oStartEnd.use=this.getNodeText(v_nChildNode)}v_nChildNode=v_nChildNode.nextSibling}v_bStart?v_oGlassParamValue.start=v_oStartEnd:v_oGlassParamValue.end=v_oStartEnd;break;case"bus:inclusive":v_oGlassParamValue.inclusive="true"==this.getNodeText(v_nNode)?!0:!1;break;case"bus:display":v_oGlassParamValue.display=this.getNodeText(v_nNode);break;case"bus:use":v_oGlassParamValue.use=this.getNodeText(v_nNode)}}return void 0!==v_oGlassParamValue.inclusive||void 0===v_oGlassParamValue.start&&void 0===v_oGlassParamValue.end||(v_oGlassParamValue.inclusive=!0),v_oGlassParamValue},getNodeText:function(v_nNode){var ATTRIBUTE_NODE=2;return v_nNode&&(v_nNode.nodeType==ATTRIBUTE_NODE?v_nNode.nodeValue:v_nNode.textContent)},deactivate:function(){this.m_bDeactivated=!0,this.glassContext.unlockGlass()},_release:function(){var v_oViewer=this.getCognosViewer();if(v_oViewer){this.m_oCognosViewer=null;try{v_oViewer.getKeepSessionAlive()||(v_oViewer.release(),delete window[this.m_sCreateCallback])}catch(e){}}this.m_oAppView=null},canRun:function(){return!0},getParameters:function(){var v_aParameters=this.getParametersFromViewer();return rsPromptParameters.convertParameterArrayToObject(v_aParameters)},updateGlobalParameters:function(v_oNewGlobalParameters,v_oGlassContext){var v_oCognosViewer=this.getCognosViewer();if(v_oCognosViewer&&v_oCognosViewer.updateGlobalParameters&&v_oNewGlobalParameters){var v_aGlobalParametersDelta=rsCommon.convertToArray(v_oNewGlobalParameters);v_oCognosViewer.updateGlobalParameters(JSON.stringify(v_aGlobalParametersDelta))}},getShareableItemsForCollaboration:function(){if(this.m_bFullyInitialized&&this.m_iframeClassicViewer){var doc=this.m_iframeClassicViewer.contentDocument,body=doc.body;return[{el:body,label:this.m_sTitle}]}return[]},setFocus:function(){if(this.isViewerLoaded()){var doc=this.m_iframeClassicViewer.contentWindow.document,rvContent=doc.getElementById("RVContent"+this.getCognosViewer().getId());if(rvContent){var el=this.getFirstFocus(rvContent);el&&el.focus()}}else cvContentView.inherited("setFocus",this,arguments)},getFirstFocus:function(v_elTop,v_elParent){for(var v_elFocus,v_elParent=v_elParent||v_elTop,v_iLength=v_elParent.childNodes.length,i=0;v_iLength>i&&!v_elFocus;i++){var v_elChild=v_elParent.childNodes[i],v_bDisabled=v_elChild.disabled||v_elChild.getAttribute&&("true"==v_elChild.getAttribute("disabled")||"true"==v_elChild.getAttribute("aria-disabled"));v_bDisabled&&!this.isToolbarButton(v_elChild)||!v_elChild.style||"hidden"==v_elChild.style.visibility||"none"==v_elChild.style.display||(v_elFocus="INPUT"==v_elChild.nodeName&&"radio"==v_elChild.type?this.getCheckedOrFirstRadioButtonInGroup(v_elTop,v_elChild.getAttribute("name")):this.isOKToFocus(v_elChild)?v_elChild:this.getFirstFocus(v_elTop,v_elChild))}return v_elFocus},isToolbarButton:function(el){if(el.getAttribute){var v_sRole=el.getAttribute("role");if("button"==v_sRole||"combobox"==v_sRole)for(;el;el=el.parentNode)if(el.getAttribute&&"toolbar"==el.getAttribute("role"))return!0}return!1},getCheckedOrFirstRadioButtonInGroup:function(v_elContainer,v_sRadioGroupName){for(var v_elRadioChecked,v_elFirstRadio,nl=v_elContainer.getElementsByTagName("INPUT"),v_iLength=nl.length,i=0;v_iLength>i;i++){var v_el=nl.item(i);if("radio"==v_el.type&&v_el.name==v_sRadioGroupName&&(v_elFirstRadio||(v_elFirstRadio=v_el),1==v_el.checked)){v_elRadioChecked=v_el;break}}return v_elRadioChecked||v_elFirstRadio},isOKToFocus:function(v_el){var v_iTabindex=parseInt(v_el.getAttribute("tabIndex"));return v_iTabindex>=0||("INPUT"==v_el.nodeName||"BUTTON"==v_el.nodeName||"TEXTAREA"==v_el.nodeName)&&-1!=v_iTabindex}});return cvContentView}),define("bi/classicviewer/plugins/cvAppButtonActions",["bi/glass/app/plugins/ButtonActionInterface"],function(ButtonActionInterface){"use strict";var ClassicViewerButtonActionInterface=ButtonActionInterface.extend({onPress:function(context){console.log("cvAppButtonActions pressed"),console.log("context.target.plugin.itemSpec.id: %s",context.target.plugin.itemSpec.id);var v_sId=context.target.plugin.itemSpec.id;switch(v_sId){case"com.ibm.bi.classicviewer.editBtn":this.runAuthoring(context);break;case"com.ibm.bi.classicviewer.previousReportBtn":var v_oCognosViewer=context.glassContext.currentAppView.currentContentView.getCognosViewer();v_oCognosViewer.rvMainWnd.executePreviousReport(-1);break;default:console.log("Unhandled label: "+v_sId)}},runAuthoring:function(context){var v_sStoreId=context.glassContext.currentAppView.currentContentView.getReportStoreId(),v_oOpenAppViewContent={action:"edit",cmProperties:{id:v_sStoreId}},v_aParameters=context.glassContext.currentAppView.currentContentView.getParameterValues();v_aParameters&&v_aParameters.length>0&&(v_oOpenAppViewContent.promptParameters=JSON.stringify(v_aParameters)),context.glassContext.openAppView("authoring",{content:v_oOpenAppViewContent}).then(function(){context.glassContext.closeAppView("classicviewer",v_sStoreId)})}});return ClassicViewerButtonActionInterface}),define("bi/classicviewer/plugins/cvAppMenuActions",["bi/glass/app/plugins/MenuActionInterface"],function(MenuActionInterface){"use strict";var ClassicViewerMenu=MenuActionInterface.extend({onSelectItem:function(context){var v_sMenuItem=context.target.itemId;console.log("cvAppMenuActions.onSelectItem selected item %s",v_sMenuItem);var v_oCognosViewer=context.glassContext.currentAppView.currentContentView.getCognosViewer();if(v_oCognosViewer)switch(v_sMenuItem){case"com.ibm.bi.classicviewer.keepVersion_Save":v_oCognosViewer.getRV().SaveReport(!0);break;case"com.ibm.bi.classicviewer.keepVersion_ReportView":v_oCognosViewer.getRV().SaveAsReportView(!0);break;default:console.log("unhandled menu item")}}});return ClassicViewerMenu}),define("bi/classicviewer/plugins/cvAppRunMenuActions",["bi/glass/app/plugins/MenuActionInterface","bi/authoring/utils/rsOpenHelper"],function(MenuActionInterface,OpenHelper){"use strict";var ClassicViewerRunMenu=MenuActionInterface.extend({onSelectItem:function(context){var v_sMenuItem=context.target.itemId,v_oView=context.glassContext.currentAppView.currentContentView,v_oCognosViewer=v_oView.getCognosViewer();if(v_oCognosViewer)switch(console.log("cvAppRunMenu.onSelectItem selected item "+v_sMenuItem),v_sMenuItem){case"com.ibm.bi.classicviewer.run_html":v_oCognosViewer.getRV().viewReport("HTML");break;case"com.ibm.bi.classicviewer.run_pdf":v_oCognosViewer.getRV().viewReport("PDF");break;case"com.ibm.bi.classicviewer.run_excel2007":v_oCognosViewer.getRV().viewReport("spreadsheetML");break;case"com.ibm.bi.classicviewer.run_excel2007data":v_oCognosViewer.getRV().viewReport("xlsxData");break;case"com.ibm.bi.classicviewer.run_csv":v_oCognosViewer.getRV().viewReport("CSV");break;case"com.ibm.bi.classicviewer.run_xml":v_oCognosViewer.getRV().viewReport("XML");break;case"com.ibm.bi.classicviewer.reset_run":v_oCognosViewer.getRV().RunReport();break;default:console.warn("Unhandled item: "+v_sMenuItem)}},isItemVisible:function(context){console.log("cvAppRunMenu.isItemVisible");var v_sMenuItem=context.target.itemId;switch(console.log("v_sMenuItem: "+v_sMenuItem),v_sMenuItem){case"com.ibm.bi.classicviewer.run_csv":return context.glassContext.hasCapability("canGenerateCSVOutput");case"com.ibm.bi.classicviewer.run_xml":return context.glassContext.hasCapability("canGenerateXMLOutput");case"com.ibm.bi.classicviewer.run_pdf":return context.glassContext.hasCapability("canGeneratePDFOutput");case"com.ibm.bi.classicviewer.run_excel2007":case"com.ibm.bi.classicviewer.run_excel2007data":return context.glassContext.hasCapability("canGenerateXLSOutput");default:return!0}}});return ClassicViewerRunMenu}),define("bi/classicviewer/plugins/cvAppSaveMenuActions",["bi/glass/app/plugins/MenuActionInterface"],function(MenuActionInterface){"use strict";var ClassicViewerSaveMenu=MenuActionInterface.extend({onSelectItem:function(context){var v_sMenuItem=context.target.itemId,v_oCognosViewer=context.glassContext.currentAppView.currentContentView.getCognosViewer();if(v_oCognosViewer)switch(v_oCognosViewer.m_bIgnoreCloseWindow=void 0,console.log("cvAppSaveMenuActions.onSelectItem selected item %s",v_sMenuItem),v_sMenuItem){case"com.ibm.bi.classicviewer.keepVersion_Save":v_oCognosViewer.m_bIgnoreCloseWindow=!0,v_oCognosViewer.getRV().SaveReport(!0);break;case"com.ibm.bi.classicviewer.keepVersion_ReportView":v_oCognosViewer.m_bIgnoreCloseWindow=!0,v_oCognosViewer.getRV().SaveAsReportView(!0);break;default:console.log("unhandled menu item")}},isItemVisible:function(context){var v_sMenuItem=context.target.itemId,v_oCognosViewer=context.glassContext.currentAppView.currentContentView.getCognosViewer();if(!v_oCognosViewer)return!1;var v_bResult;switch(v_sMenuItem){case"com.ibm.bi.classicviewer.keepVersion_Save":var m_oCmProperties=context.glassContext.currentAppView.currentContentView.cmProperties;v_bResult=m_oCmProperties&&-1!=m_oCmProperties.permissions.indexOf("write");break;case"com.ibm.bi.classicviewer.keepVersion_ReportView":var m_oCmProperties=context.glassContext.currentAppView.currentContentView.cmProperties;v_bResult=!m_oCmProperties||v_oCognosViewer.envParams&&"reportView"===v_oCognosViewer.envParams["ui.objectClass"]?!1:!0;break;default:v_bResult=!0}return v_bResult}});return ClassicViewerSaveMenu}),define("bi/classicviewer/plugins/cvContextMenuActions",["bi/glass/app/plugins/MenuActionInterface","jquery"],function(MenuActionInterface,$){"use strict";var cvContextMenuActions=MenuActionInterface.extend({onSelectItem:function(context){console.log("cvContextMenuActions.onSelectItem");var v_oFirstSelectedContext=context.target.activeObject.aSelectedContext[0],v_oContent={id:v_oFirstSelectedContext.id,selectedContext:$.extend(!0,{},v_oFirstSelectedContext)};context.glassContext.openAppView("classicviewer",{content:v_oContent})},isItemVisible:function(context){console.log("cvContextMenuActions.isItemVisible");var v_aSelectedContext=context.target.activeObject.aSelectedContext;if(1!==v_aSelectedContext.length)return console.log("aSelectedContext.length: %d",context.target.activeObject.aSelectedContext.length),!1;var v_oFirstSelectedContext=v_aSelectedContext[0],v_aReportTypes=["report","interactiveReport","query","reportTemplate"],v_bReportType=-1!==v_aReportTypes.indexOf(v_oFirstSelectedContext.type),v_aPermissions=v_oFirstSelectedContext.permissions;return v_bReportType&&"com.ibm.bi.classicviewer.viewerDefaultRunAction"==context.target.itemId?-1!=v_aPermissions.indexOf("execute"):!1}});return cvContextMenuActions}),define("js/classicviewer/bundle",function(){});
|