@boldreports/javascript-reporting-controls
Version:
The Bold Reports by Syncfusion controls for JavaScript contains ReportViewer and ReportDesigner HTML5 and JavaScript reporting controls for enterprise web development
10 lines • 726 kB
JavaScript
/*!
* filename: bold.report-viewer.min.js
* version : 9.1.15
* Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
(function(n){typeof define=="function"&&define.amd?define(["./../common/bold.reports.widgets.min"],n):n()})(function(){(function($,ej,undefined){ej.widget("boldReportViewer","ej.ReportViewer",{_rootCSS:"e-reportviewer",element:null,model:null,validTags:["div"],defaults:{reportServiceUrl:"",exportServiceUrl:"",reportServerId:"",reportCacheID:"",serviceAuthorizationToken:"",embedToken:"",reportViewerClientId:"",reportViewerId:"",reportPath:"",enableVirtualEvaluation:!1,smartRendering:!1,renderClassicUI:!1,reportServerUrl:"",dataSources:[],parameters:[],extendedAttributes:{},exportSettings:{CommonOptions:{ImageQuality:2,UsePrintSizes:!1},PDFOptions:{EnableComplexScript:!1,PdfConformanceLevel:0,Security:{UserPassword:""}},ExcelOptions:{ExcelSaveType:4,ExcelSheetProtection:0,ReadOnlyRecommended:!1,DisableCellFormat:0,LayoutOption:0,PasswordToOpen:null,PasswordToModify:null,IncludeRawData:!1},WordOptions:{FormatType:2,ProtectionType:0,LayoutOption:0,ParagraphSpacing:{Top:1,Bottom:1},EncryptionPassword:null,ProtectionPassword:null},exportOptions:255,customItems:[],hideExportItemList:[],CsvOptions:{Qualifier:'"',FieldDelimiter:",",UseFormattedValues:!1},HTMLOptions:{HidePageSeparator:!1},PPTOptions:{FormatType:0,EncryptionPassword:null},SecurityOptions:{EnableProtection:!1,Protect:null,Edit:null}},ImageQuality:null,toolbarSettings:{items:118783,toolbars:3,showToolbar:!0,autoHide:!0,autoHideDelay:5,templateId:"",click:"",showTooltip:!0,customGroups:[],customItems:[]},customToolbars:[],locale:"en-US",localeSettings:{dateFormat:"",timeFormat:"",timeZone:""},printMode:!1,sizeToReportContent:!1,renderMode:3,printOption:"Default",enablePageCache:!1,enablePageVirtualization:!1,pageSettings:{height:0,width:0,orientation:null,pageUnits:null,paperSize:null,margins:{top:0,right:0,bottom:0,left:0},isMarginZero:!1,hidePageOrientation:!1,hidePagePaperSizes:[]},rdlPageSettings:{height:0,width:0,paperOrientation:null,pageUnits:null,paperSize:null,margins:{top:0,right:0,bottom:0,left:0}},processingMode:"remote",toolbarRenderMode:"Native",zoomFactor:1,isResponsive:!0,reportLoaded:null,reportCanceled:null,ajaxBeforeLoad:null,ajaxLoad:null,ajaxSuccess:null,ajaxError:null,toolbarRendering:null,cacheCleared:null,toolBarItemClick:null,renderingBegin:null,parameterChange:null,beforeParameterAdd:null,renderingComplete:null,reportError:null,showError:null,reportExport:null,exportProgressChanged:null,printProgressChanged:null,exportItemClick:null,drillThrough:null,hyperlink:null,reportPrint:null,viewReportClick:null,destroy:null,tenantName:null,enableParameterBlockScroller:!0,enableOnScrollNavigation:/windows phone| android | iphone/i.test(navigator.userAgent.toLowerCase())?!0:!1,enableDatasourceBlockScroller:!0,enableNotificationBar:!0,enableDropDownSearch:!1,showExceptionsInDialog:!1,enableAnimation:!0,autoRender:!0,isDataRendered:!1,enableRequestLimiting:!1,cacheSettings:{mode:"Live",expiredAfter:0},parameterSettings:{delimiterChar:",",dateTimePickerType:"Default",minDateTime:null,maxDateTime:null,weekStartDay:0,enableVirtualScrolling:!1,popupHeight:"152px",popupWidth:"auto",itemWidth:"185px",labelWidth:"110px",attributes:{},hideParameterBlock:!1,hideTooltip:!1,enablePopupResize:!1,showPanel:!1,dropdownFilterType:"Contains",timeDisplayFormat:"",dateTimeFormat:"",timeInterval:30,accessInternalValue:!1,showRequiredFieldIndicator:!1,optionalPromptMessage:"",optionalGroupSettings:[],position:"top",dateStartLevel:"",dateDepthLevel:"",hideTooltipDropdown:!0,dropdownShowSelectedValues:!1},parameterUpdateStateChange:null,waitingPopupTemplate:null,customBrandSettings:{hideHelpLink:!1,customDomain:"https://help.boldreports.com",customBrandName:"Bold Reports",customLinks:[{name:"ESLicenseMessage",url:"/licensing/license-token/"}]}},dataTypes:{dataSources:"array",parameters:"array",toolbarSettings:{showToolbar:"boolean"}},_dataVisualization:[],_gotoPageTemplate:null,_renderClassicUI:!1,_dataVisualItemCount:0,_currentPageDataVisualization:[],_currentPageWidgetName:null,_currentDropdownText:null,_dataSources:null,_reportParametersModel:[],_reloadParams:[],_multiSelectParameters:[],_svg:!0,_performanceMetrics:{ParseTime:0,EvaluateTime:0,LayoutTime:0,RenderTime:0,TimeProcessing:0,DataRetrievedTime:0,TimeDataRetrieval:0,AdditionalInfo:null},_reportViewerToken:null,_sessionToken:null,_isFileStore:!1,_serviceType:"Default",_dataRefresh:!1,_isForwardDirection:!1,_isSelectedPage:!1,_refresh:!1,_isPageSetupValueChange:!1,_isToolbarClick:!1,_currnetDocMapNodeId:null,_currentBookmarkInfo:null,_isPopupClick:!1,_printMode:!1,_pageSetup:!1,_pageModel:null,_isprint:!1,_cancelPrintExport:!1,_pageCacheAutoReloadCount:0,_currentPage:1,_pageLayoutPage:1,_machineCulture:null,_reportParameters:null,_paramInfo:null,_reportDataSources:null,_customParameters:[],_reporDataSets:null,_isRDLC:!1,_zoomLevel:2,_preZoomVal:1,_actionUrl:null,_isDocumentMap:!1,_isPageDocMap:!1,_isDrillThroughReport:!1,_pageDocMapFlag:!1,_childReportToken:null,_parents:[],_parentPageXY:null,_browserInfo:null,_serverActionInfo:null,_isDevice:!1,_zoomVal:1,_originX:0,_originY:0,_paperName:null,_excelFormat:null,_wordFormat:null,_isClassicExport:!1,_isPercentHeight:-1,_isPercentWidth:-1,_isHeight:!1,_currentTogglePosition:0,_isWidth:!1,_isDesign:!1,_paperOrientation:null,_pageUnits:null,_legendPointNames:null,_updateParam:null,_isFitToPage:!1,_isFitToWidth:!1,_isDataLabel:!1,_pageCache:[],_printData:[],_printPageCache:[],_scrollHeight:0,_localeObj:null,_licenseMessage:null,_warningMessage:null,_touchScreen:{startPoint:0,endPoint:0},_isPinchZoom:!1,_pageImagesCache:null,_reportImages:{},_enableSearchText:!1,_paperSetup:{paperHeight:null,paperWidth:null,MarginTop:0,MarginRight:0,MarginBottom:0,MarginLeft:0},_limitRecordSetup:{currentFetchLimit:0,defaultFetchLimit:null,isReportDataLimited:!1},_reportAction:{reportLoad:"ReportLoad",getDataSourceCredential:"GetDataSourceCredential",validateDSCredential:"ValidateDSCredential",updateDSCredential:"UpdateDSCredential",getParameters:"GetParameters",setParameters:"SetParameters",updateParameters:"UpdateParameters",updateDataSource:"UpdateDataSource",getPageModel:"GetPageModel",getPrintModel:"GetPrintModel",drillDown:"DrillDown",clearCache:"ClearCache",documentMap:"DocumentMap",drillThrough:"DrillThrough",sorting:"Sorting",exporting:"Export",clearObjects:"ClearObjects",getImages:"GetImages",updateValue:"UpdateValue",getSearchPages:"GetSearchPages"},_elementsRendered:null,_searchText:null,_searchPageIndexs:[],_searchTextDivCollection:[],_searchTextDivIndex:0,_focusedSearchTextIndex:0,_searchTextPageIndex:0,_isPageRendered:!1,_parameterCacheKey:null,_isReportCacheRefresh:!1,_isHorizontalParamBlock:!0,_paramBlockPosition:"top",_isToolbarActive:!1,_pageCreation:"Default",_renderPageLimit:0,_isPageCreationInProgress:!1,_ondemandTotalPage:0,_isLoadMoreAdditionalPages:!1,_localeSettings:null,_zoomValue:null,_externalExportInProgressType:[],_tags:[{tag:"parameters",attr:["",[{tag:"parameter",attr:["name","labels","values","nullable"]}]]},{tag:"dataSources",attr:["",[{tag:"datasource",attr:["name","value"]}]]}],_setModel:function(n){var r=!1,e=!1,t,o,f,i,u,s;this._parents.length>0&&this._parents.pop();for(t in n)switch(t){case"reportPath":case"enableVirtualEvaluation":case"smartRendering":case"reportServerUrl":case"renderClassicUI":r=!0;case"reportServiceUrl":this._actionUrl=this.model.reportServiceUrl+"/PostReportAction";this._actionUrl=this._getMultiTenantUrl(this._actionUrl,!0);r=!0;break;case"dataSources":r=!0;break;case"parameters":r=!0;break;case"processingMode":e=!0;break;case"zoomFactor":this._isCustomToolbar()?(this._resetPage(),this._zoomContainer(n[t],!1)):(o=this._getej2Instance(this._id+"_toolbar_zoom"),f=[.5,.75,1,1.25,1.5,2,4],f.indexOf(n[t])!==-1&&o.selectItemsByIndices(f.indexOf(n[t])));break;case"printMode":this._updatePreviewLayout(n[t],!1);break;case"toolbarSettings":this._updateToolbarmodel();break;case"locale":this._setCultureInfoEJ2();break;case"renderMode":this._reInit();break;case"reportViewerId":this._reportViewerToken=this.model.reportViewerId?this.model.reportViewerId:this._reportViewerToken;break;case"pageSettings":for(i in n[t])switch(i){case"height":this._paperSetup.paperHeight=n[t][i];this._paperName="Custom";break;case"width":this._paperSetup.paperWidth=n[t][i];this._paperName="Custom";break;case"orientation":this._paperOrientation=n[t][i];break;case"pageUnits":this._pageUnits=n[t][i];break;case"paperSize":this._paperName=n[t][i];break;case"margins":for(u in n[t][i])switch(u){case"top":this._paperSetup.MarginTop=n[t][i][u];break;case"bottom":this._paperSetup.MarginBottom=n[t][i][u];break;case"left":this._paperSetup.MarginLeft=n[t][i][u];break;case"right":this._paperSetup.MarginRight=n[t][i][u]}}this._setPageSettings();this._printMode&&(s=this._printMode?"_getPreviewModel":"_getPageModel",this._ajaxCallMethod(this._reportAction.getPageModel,s,!1));break;case"waitingPopupTemplate":this.model.waitingPopupTemplate=n[t]}e&&!r&&this.model.reportServiceUrl&&this.doAjaxPost("POST",this._actionUrl,JSON.stringify({reportAction:this._reportAction.getDataSourceCredential,dataSources:this.model.dataSources,parameters:this.model.parameters}),"_getDataSourceCredential");this.model.reportPath?r&&this.model.reportServiceUrl&&this._ajaxCallMethod(this._reportAction.clearCache,"_reportReload",!1):(this._initViewer(),this._setPageSize(0,0,0,0))},_reInit:function(){this._destroy();this._init()},_destroyEJ2Objects:function(n){for(var r,t,u=$(n).find(".e-control"),i=0;i<u.length;i++)if(r=u.eq(i),t=r[0].ej2_instances?r[0].ej2_instances[0]:null,t&&!t.isDestroyed)try{t.destroy()}catch(f){}},_destroy:function(){var i=$("#"+this._id+"_viewer_alert_dialog"),n=this.element.find("#"+this._id+"_toolbarContainer"),e=$("#"+this._id+"_nativePropertiesContainer"),r=$("#"+this._id+"_exportSetup"),u=$("#"+this._id+"_printPageSetup"),f=$("#"+this._id+"_confirm_dialog"),t=$("#"+this._id+"_ejtreeView"),o=$("#"+this._id+"_ondemand_progressbar"),s=$("#"+this._id+"_ondemand_progressbar_panel");!ej.isNullOrUndefined(n)&&n.length>0&&n[0].ej2_instances[0]&&(this._destroyEJ2Objects(n),n[0].ej2_instances[0].destroy(),n[0].remove());$("#"+this._id+"_nativeRightToolbarContainer")[0]!=undefined&&$("#"+this._id+"_nativeRightToolbarContainer")[0].remove();!ej.isNullOrUndefined(e)&&e.length>0&&e[0]&&(this._destroyEJ2Objects(e),$("#"+this._id+"_accordionContainer")[0]!=undefined&&$("#"+this._id+"_accordionContainer")[0].ej2_instances[0].destroy(),$("#"+this._id+"_nativePropertiesContainer")[0].remove());!ej.isNullOrUndefined(i)&&i.length>0&&i[0].ej2_instances[0]&&(this._destroyEJ2Objects(i),i[0].ej2_instances[0].destroy(),$("#"+this._id+"_viewer_alert_dialog").remove());!ej.isNullOrUndefined(o)&&o.length>0&&o[0].ej2_instances[0]&&!ej.isNullOrUndefined(s)&&(this._destroyEJ2Objects(o),$("#"+this._id+"_ondemand_progressbar").remove(),s[0].remove());this.model.toolbarRenderMode=="Classic"&&(!ej.isNullOrUndefined(r)&&r.length>0&&r[0].ej2_instances[0]&&(this._destroyEJ2Objects(r),r[0].ej2_instances[0].destroy()),!ej.isNullOrUndefined(u)&&u.length>0&&u[0].ej2_instances[0]&&(this._destroyEJ2Objects(u),u[0].ej2_instances[0].destroy()),!ej.isNullOrUndefined(f)&&f.length>0&&f[0].ej2_instances[0]&&(this._destroyEJ2Objects(f),f[0].ej2_instances[0].destroy()));!ej.isNullOrUndefined(t)&&t.length>0&&t[0].ej2_instances[0]&&(this._destroyEJ2Objects(t),t[0].ej2_instances[0].destroy(),t[0].remove());this._destroyEJ2Objects(this.element);$("#"+this._id+"_toolbar_export-popup")[0]!=undefined&&($("#"+this._id+"_toolbar_export-popup")[0].ej2_instances[0].destroy(),$("#"+this._id+"_toolbar_export-popup")[0].remove());$("#"+this._id+"_toolbar_zoom_popup")[0]!=undefined&&($("#"+this._id+"_toolbar_zoom_popup")[0].ej2_instances[0].destroy(),$("#"+this._id+"_toolbar_zoom_popup")[0].remove());$("#"+this._id+"_toolbar_pagefit-popup")[0]!=undefined&&($("#"+this._id+"_toolbar_pagefit-popup")[0].ej2_instances[0].destroy(),$("#"+this._id+"_toolbar_pagefit-popup")[0].remove());$("#"+this._id+"_pageInfoPopup").remove();$("#"+this._id+"_printPageIframe").remove();this.element.find("#"+this._id+"_licensing_msgContainer").remove();$(this.element).find(".e-reportviewer-viewer").remove();this._ajaxCallMethod(this._reportAction.clearCache,"_clearCurrentServerCache",!1)},_destroyExistingObj:function(){$("#"+this._id+"_printPageSetup").remove();this._parents.length>0&&this._parents.pop()},_hidePageView:function(){$("#"+this._id+"_pageviewOuterContainer").css("display","none")},_destroyPageItems:function(){var t=$("#"+this._id+"_pageviewheaderContainer"),i=$("#"+this._id+"_pageviewfooterContainer"),r=$("#"+this._id+"_pageviewbodyContainer"),n=n=$("#"+this._id+"_pageviewContainer").find(".e-control");n&&n.length>0&&(this._destroyEJ2Objects(n),n.prevObject&&n.prevObject.length>0&&this._resetTagStyle(n.prevObject));n=null;t.length>0&&(t.empty(),this._resetTagStyle(t.parent()));i.length>0&&(i.empty(),this._resetTagStyle(i.parent()));r.length>0&&(r.empty(),this._resetTagStyle(r.parent()))},_resetTagStyle:function(n){n.css({"border-color":"transparent","background-color":"transparent","border-style":"none","border-width":"0pt","background-image":"none"})},_init:function(){var n,t,i,r;this._svg=window.SVGSVGElement?!0:!1;this._actionUrl=this.model.reportServiceUrl+"/PostReportAction";this._actionUrl=this._getMultiTenantUrl(this._actionUrl,!0);this._reportViewerToken=this.model.reportViewerId?this.model.reportViewerId:this._reportViewerToken;this._browserInfo=ej.browserInfo();this.element.hasClass("e-rptdesigner")&&(this._isDesign=!0,this.model.enableRequestLimiting=!1);ejs.base.cldrData&&ejs.base.cldrData.main&&this.model.localeSettings&&(n=ejs.base.cldrData.main[this.model.locale],n&&n.dates&&n.dates.calendars&&n.dates.calendars.gregorian&&(n=n.dates.calendars.gregorian,this.model.localeSettings.dateFormat&&(this.model.localeSettings.dateFormat=n.dateFormats?n.dateFormats.short:null),this.model.localeSettings.timeFormat&&(this.model.localeSettings.timeFormat=n.timeFormats?n.timeFormats.short:null)));this._destroyExistingObj();this._renderViewer();this._initViewer();t=$("#"+this._id+"_e_gotoparent");t.length>1&&(i=this._getej2Instance(this._id+"_toolbarContainer"),r=document.getElementById(this._id+"_e_gotoparent"),i.hideItem(r,!0));this.model.reportServiceUrl?this._ajaxCallMethod(this._reportAction.reportLoad,"_reportLoaded",!1):this.model.toolbarRenderMode!="Native"||this._isDesign||this.model.reportServiceUrl.trim()===""||this._renderErrorMsg(this._getLocaleString("errorMessage","reportLoadAjaxFailureMsg"),"notSpecified");this.model.cacheSettings==null||this.model.cacheSettings.mode!=ej.ReportViewer.ReportCacheMode.Cache||this.model.enableRequestLimiting||(this.model.enableRequestLimiting=!0)},_initViewer:function(){var n,t,i;this._wireEvents();this.toolbarRenderMode!="Native"||this._isCustomToolbar()||$("#"+this._id+"_toolbarContainer")[0]==undefined||$("#"+this._id+"_toolbarContainer")[0].style==undefined||($("#"+this._id+"_toolbarContainer.e-native-toolbar")[0].style.marginTop="20px");$("#"+this._id+"_warningMsgContainer").css({display:"none"});$("#"+this._id+"_toolbarContainer.e-native-toolbar").css({display:"","margin-top":"20px"});this._initToolbarEJ2();this._destroyPageItems();this._resetPageNumber(!1);this._clearPageCache();this._showException(!1);this._currentPage=1;this._pageLayoutPage=this._currentPage;this._setPageSettings();this._isDocumentMap=!1;this._printMode=this.model.printMode;this._isPageDocMap=!1;this._pageDocMapFlag=!1;this._viewReportEnableDisable(!1);this._findDispose();n=this.model.toolbarSettings;n.templateId||(this.model.toolbarRenderMode=="Classic"?this._showToolbar(n.showToolbar):(this._showHorizontalToolbar(n.toolbars&ej.ReportViewer.Toolbars.Horizontal),this._showVerticalToolbar(n.toolbars&ej.ReportViewer.Toolbars.Vertical)),this._showPrintButton(n.items&ej.ReportViewer.ToolbarItems.Print),this._showRefreshButton(n.items&ej.ReportViewer.ToolbarItems.Refresh),this._showFindButton(n.items&ej.ReportViewer.ToolbarItems.Find),this._showStopButton(!1),this._showZoomControl(n.items&ej.ReportViewer.ToolbarItems.Zoom),this._showFittoPage(n.items&ej.ReportViewer.ToolbarItems.FittoPage),this._showExportControls(n.items&ej.ReportViewer.ToolbarItems.Export),this._showPrintPageSetupButton(n.items&ej.ReportViewer.ToolbarItems.PageSetup),this._showPerformanceMetricsButton(n.items&ej.ReportViewer.ToolbarItems.Analytics),this._showLimitRecordButton(n.items&ej.ReportViewer.ToolbarItems.LimitRecordSetup),this._updateExportItemVisibility(),this.model.toolbarRenderMode=="Classic"?this._showExportSetupButton(n.items&ej.ReportViewer.ToolbarItems.ExportSetup):n.items&ej.ReportViewer.ToolbarItems.PageSetup||n.items&ej.ReportViewer.ToolbarItems.ExportSetup&&(this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.Pdf||this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.Word||this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.Excel||this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.PPT||this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.Html||this.model.exportSettings.exportOptions&ej.ReportViewer.ExportOptions.CSV)?this._showSettingsButton(n.items&ej.ReportViewer.ToolbarItems.Settings):this._showSettingsButton(0),this._showPageNavigationControls(n.items&ej.ReportViewer.ToolbarItems.PageNavigation),this._showParameterBlock(n.items&ej.ReportViewer.ToolbarItems.Parameters),this._showPreviewButton(n.items&ej.ReportViewer.ToolbarItems.PrintLayout),this._showDrillThrough(this._parents.length>0),this._showDocumentMap(!1),this._destroyDocumentMapTree(),this._enableToolbarGroupSeparator());this._pageCreation!="Default"&&this._renderProgressBarOnDemand();this._showViewerBlock(!1);this._setContainerSize();this.model.reportServiceUrl&&this.model.reportPath?this._showloadingIndicator(!0):this._showloadingIndicator(!1);this._refresh&&(t=this._getej2Instance(this._id+"_ondemand_progressbar"),i=$("#"+this._id+"_ondemand_progressbar_percentage"),ej.isNullOrUndefined(t)||ej.isNullOrUndefined(i)||(i[0].innerHTML="0%",t.value=0))},_setPageSettings:function(){var r=!1,t=0,i=0,n;this._paperName=null;this._paperOrientation=null;this._pageUnits=null;this._paperSetup.paperHeight=0;this._paperSetup.paperWidth=0;this._paperSetup.MarginBottom=0;this._paperSetup.MarginLeft=0;this._paperSetup.MarginRight=0;this._paperSetup.MarginTop=0;this.model.pageSettings&&this.model.pageSettings.height>0&&(i=this.model.pageSettings.height,r=!0,this._isPageSetupValueChange=!0);this.model.pageSettings&&this.model.pageSettings.width>0&&(t=this.model.pageSettings.width,r=!0,this._isPageSetupValueChange=!0);this.model.pageSettings.paperSize?(this._paperName=this.model.pageSettings.paperSize,this._isPageSetupValueChange=!0,n=this._getPaperSize(this._paperName),r&&(t>0&&(n.width=t),i>0&&(n.height=i)),this._paperOrientation=this.model.pageSettings.orientation=="Landscape"?"Landscape":"Portrait",this._pageUnits=this.model.pageSettings.pageUnits=="Centimeters"?"Centimeters":"Inches",this.model.pageSettings.orientation=="Landscape"?(this._paperSetup.paperHeight=n.height<n.width?n.height:n.width,this._paperSetup.paperWidth=n.height<n.width?n.width:n.height):(this._paperSetup.paperHeight=n.height,this._paperSetup.paperWidth=n.width)):r&&(t>0&&(this._paperSetup.paperWidth=t),i>0&&(this._paperSetup.paperHeight=i),this._paperName="Custom");this.model.pageSettings&&this.model.pageSettings.margins&&(this.model.pageSettings.margins.left>0&&(this._paperSetup.MarginLeft=this.model.pageSettings.margins.left,this._isPageSetupValueChange=!0),this.model.pageSettings.margins.right>0&&(this._paperSetup.MarginRight=this.model.pageSettings.margins.right,this._isPageSetupValueChange=!0),this.model.pageSettings.margins.bottom>0&&(this._paperSetup.MarginBottom=this.model.pageSettings.margins.bottom,this._isPageSetupValueChange=!0),this.model.pageSettings.margins.top>0&&(this._paperSetup.MarginTop=this.model.pageSettings.margins.top,this._isPageSetupValueChange=!0))},_createEJ2DropDownList:function(n,t,i,r,u,f,e,o,s,h){var c=new ejs.dropdowns.DropDownList({cssClass:n,width:t,placeholder:u,allowFiltering:f,enableVirtualization:o,allowResize:h,filterType:e,height:i,htmlAttributes:r});return s&&(c.beforeOpen=this._beforePopupOpen,c.change=this._paramsChangeEventEj2,c.close=this._paramsChangeEventEj2),c},_createEJ2MultiSelect:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){var p="CheckBox",w=!1,y;return ej.isNullOrUndefined(v)||(p=ej.isNullOrUndefined(v.mode)?p:v.mode,w=ej.isNullOrUndefined(v.allowCustomValue)?w:v.allowCustomValue),o&&ejs.dropdowns.MultiSelect.Inject(ejs.dropdowns.VirtualScroll),y=new ejs.dropdowns.MultiSelect({cssClass:"e-js e-reportviewer-param e-reportviewer-drpdown",width:n,height:t,placeholder:u,delimiterChar:a,value:r,allowFiltering:f,enableVirtualization:o,allowResize:s,filterType:e,showDropDownIcon:!0,height:"28px",showSelectAll:!0,mode:p,htmlAttributes:i,popupHeight:c,locale:this.model.locale,allowCustomValue:w}),l!="auto"&&(y.popupWidth=l),h&&(y.change=this._paramsChangeEventEj2,y.beforeOpen=this._beforePopupOpen,y.close=this._paramsChangeEventEj2),y.beforeSelectAll=function(n){n.ignoreSelectEvent=!0;y.isSelectAll=n.isChecked},y},_createEJ2Button:function(n){return new ejs.buttons.Button({content:n})},_createEJ2RadioButton:function(n,t,i,r){return new ejs.buttons.RadioButton({name:n,checked:t,cssClass:i,label:r})},_createEJ2NumericText:function(n,t,i,r,u,f,e,o,s){var h=new ejs.inputs.NumericTextBox({cssClass:"e-reportviewer-numerictextbox",decimals:n,strictMode:t,width:i,min:r,enabled:u,value:o,step:s});return f!=null&&(h.blur=f),e!=null&&(h.max=e),h},_createEJ2CheckBox:function(n,t,i){return new ejs.buttons.CheckBox({cssClass:n,size:t,checked:i})},_createEJ2MaskEdit:function(n,t,i){var r=new ejs.inputs.MaskedTextBox({width:n,enabled:t});return i!=undefined&&(r.value=i),r},_createEJ2ToolTip:function(n){return new ejs.popups.Tooltip({content:n,cssClass:"e-reportviewer-tooltip"})},_createEJ2Dialog:function(n,t,i,r,u,f,e,o,s){var h=new ejs.popups.Dialog({width:n,header:t,allowDragging:i,height:r,isModal:f,showCloseIcon:u,minHeight:s});return e!=undefined&&o!=undefined&&(h.position={X:e,Y:o}),h},_createEJ2ToastDialog:function(n,t,i){var u=this,r;return i==="externalExport"?(r=new ejs.notifications.Toast({title:n,content:t,target:$("#"+this._id+"_viewerContentContainer")[0],position:{X:"Right",Y:"Bottom"},newestOnTop:!0,showCloseButton:!0,timeOut:0,animation:{hide:{effect:"SlideRightOut"},show:{effect:"SlideRightIn"}}}),this._isDevice||(r.width=350)):(r=new ejs.notifications.Toast({content:t,target:$("#"+this._id+"_viewerContentContainer")[0],position:{X:"Right",Y:"Bottom"},newestOnTop:!0,icon:"e-circle-info",showCloseButton:!1,showProgressBar:!0,buttons:[{model:{content:this._getLocaleString("toastDialogContent","cacheReloadButtonText")},click:function(){u._toastReloadClick(u)}}],animation:{hide:{effect:"SlideRightOut"},show:{effect:"SlideRightIn"}}}),r.close=function(n){u._closeToastDialog(u,n)},this._isDevice||(r.width=410,r.height=100,r.dataBind())),r},_renderProgressBarOnDemand:function(){var n=ej.buildTag("div.e-reportviewer-ondemand-progressbarpanel","",{"z-index":parseInt($(".e-reportviewer-viewer .e-native-toolbar").css("z-index"))+1},{id:this._id+"_ondemand_progressbar_panel",tabindex:"0"}),t=ej.buildTag("div.e-reportviewer-ondemand-progressbardiv","",{display:"flex"},{id:this._id+"_ondemand_progressbar_div",tabindex:"0"}),r=ej.buildTag("span.e-reportviewer-ondemand-progressbarlabel",this._getLocaleString("progressMessage","creatingTheDocumentMessage"),{},{id:this._id+"_ondemand_readylabel"}),u=ej.buildTag("span.e-reportviewer-ondemand-progressbarpercentage","0%",{},{id:this._id+"_ondemand_progressbar_percentage"}),f=ej.buildTag("div.e-reportviewer-ondemand-progressbar","",{},{id:this._id+"_ondemand_progressbar"}),f=ej.buildTag("div.e-reportviewer-ondemand-progressbar","",{},{id:this._id+"_ondemand_progressbar"}),e='<a href="javascript:" class="e-reportviewer-ondemand-progressbar-cancel" id="'+this._id+'_ondemand_cancel">'+this._getLocaleString("progressMessage","cancelText")+"<\/a>",i;t.append(f);t.append(u);n.append(r);n.append(t);n.append(e);$("#"+this._id+"_reportviewerContainer").append(n);i=new ejs.progressbar.ProgressBar({value:1,trackThickness:8,progressThickness:8,minimum:0,width:"180px",height:"48px",maximum:100,cornerRadius:"Round",trackColor:"#e5e7eb",progressColor:"#4f46e5"});i.appendTo($("#"+this._id+"_ondemand_progressbar")[0]);this._on($("#"+this._id+"_ondemand_cancel"),"click",function(){this._cancelOnDemandProcess()})},_toastReloadClick:function(n){n._showPrintExportProgressIndicator(!1);n._showNavigationIndicator(!1);n._showloadingIndicator(!0,"RENDERING","","")},_closeToastDialog:function(n){n._showloadingIndicator(!0,"RENDERING","","");this._currentPage=1;n._loadReportFromBegin(!0);this._pageCacheAutoReloadCount<3&&(n._loadReportFromBegin(!0),this._pageCacheAutoReloadCount++)},_createEJ2MessageComponentInstance:function(n,t,i){return new ejs.notifications.Message({cssClass:n,severity:t,showCloseIcon:i})},_getej2Instance:function(n,t){var r=$("#"+n)[0],u,i;if(r&&r.ej2_instances){if(ej.isNullOrUndefined(t))return r.ej2_instances[0];for(u=r.ej2_instances,i=0;i<u.length;i++)if(u[i].getModuleName()==t)return u[i]}},_enableToolbarGroupSeparator:function(){var t,i,n,f,r,u;if(this.model.toolbarRenderMode=="Classic"&&(t=$("#"+this._id+"_toolbarContainer"),!ej.isNullOrUndefined(t)))for(i=[["_e_gotofirst","_e_gotoprevious","_e_gotonext","_e_gotolast","_e_labelpageno","_e_labeltotalpageno"],["_e_zoomout","_e_zoomin","_e_zoom","_e_pagefit"],["_e_gotoparent","_e_refresh","_e_stop"],["_e_export"],["_e_preview","_e_print"],["_e_exportsetup","_e_pagesetup"],["_e_documentmap","_e_parameter","_e_findtext","_e_find","_e_performance"]],n=0;n<i.length;n++){for(f=!1,r=0;r<i[n].length;r++)if(u=t.find("#"+this._id+i[n][r]),!ej.isNullOrUndefined(u)&&!ej.isNullOrUndefined(u.css("display"))&&u.css("display").toUpperCase()==="FLEX"){f=!0;break}f||t.find("#"+this._id+"_toolbar_group"+(n+1)).css("display","none")}},_renderEJ2ToolBar:function(n){var t,i,f,r,u,e;if(this.model.toolbarSettings.templateId)u=$("#"+this.model.toolbarSettings.templateId),n.append(u),e=new ejs.navigations.Toolbar({isResponsive:!0,enableSeparator:!0,cssClass:"e-rptviewer-toolbar e-report-responsive-toolbar",height:u.height(),click:this.model.toolbarSettings.click}),e.appendTo("#"+this.model.toolbarSettings.templateId),u.css("display","block");else{t=ej.buildTag("div.e-classic-toolbar","",{},{id:this._id+"_toolbarContainer",tabindex:"0"});n.append(t);i=this._isMobileDevice()?new ejs.navigations.Toolbar({overflowMode:"Popup",items:[{prefixIcon:"e-viewer-icons print",id:this._id+"_toolbar_print",content:this._getLocaleString("toolbar","print","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_print","data-content":this._getLocaleString("toolbar","print","headerText"),"aria-label":this._getLocaleString("toolbar","print","headerText")}},{prefixIcon:"e-viewer-icons export",id:this._id+"_toolbar_export",content:this._getLocaleString("toolbar","exportformat","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_export","data-content":this._getLocaleString("toolbar","exportformat","headerText"),"aria-label":this._getLocaleString("toolbar","exportformat","headerText")}},{prefixIcon:"e-viewer-icons export-setup",id:this._id+"_toolbar_exportsetup",content:this._getLocaleString("toolbar","exportsetup","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_exportsetup","data-content":this._getLocaleString("toolbar","exportsetup","headerText"),"aria-label":this._getLocaleString("toolbar","exportsetup","headerText")}},{prefixIcon:"e-viewer-icons zoom-out",id:this._id+"_toolbar_zoomout",content:this._getLocaleString("toolbar","zoomOut","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_zoomout","data-content":this._getLocaleString("toolbar","zoomOut","headerText"),"aria-label":this._getLocaleString("toolbar","zoomOut","headerText")}},{prefixIcon:"e-viewer-icons zoom-in",id:this._id+"_toolbar_zoomin",content:this._getLocaleString("toolbar","zoomIn","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_zoomin","data-content":this._getLocaleString("toolbar","zoomIn","headerText"),"aria-label":this._getLocaleString("toolbar","zoomIn","headerText")}},{prefixIcon:"e-viewer-icons zoom-to-fit",id:this._id+"_toolbar_pagefit",content:this._getLocaleString("toolbar","fittopage","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_pagefit","data-content":this._getLocaleString("toolbar","fittopage","headerText"),"aria-label":this._getLocaleString("toolbar","fittopage","headerText")}},{id:this._id+"_toolbar_findtext",type:"Input",template:new ejs.inputs.TextBox({width:80,cssClass:"e-search-box"}),htmlAttributes:{id:this._id+"_e_findtext","class":this._id+"_toolbar_item","data-content":this._getLocaleString("toolbar","find","headerText"),"aria-label":this._getLocaleString("toolbar","find","headerText")}},{prefixIcon:"e-viewer-icons search",id:this._id+"_toolbar_find",content:this._getLocaleString("toolbar","find","headerText"),htmlAttributes:{id:this._id+"_e_find","class":this._id+"_toolbar_item","data-content":this._getLocaleString("toolbar","find","headerText"),"aria-label":this._getLocaleString("toolbar","find","headerText")}},{prefixIcon:"e-viewer-icons refresh",id:this._id+"_toolbar_refresh",content:this._getLocaleString("toolbar","refresh","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_refresh","data-content":this._getLocaleString("toolbar","refresh","headerText"),"aria-label":this._getLocaleString("toolbar","refresh","headerText")}},{prefixIcon:"e-viewer-icons parameter",id:this._id+"_toolbar_parameter",content:this._getLocaleString("toolbar","parameter","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_parameter","data-content":this._getLocaleString("toolbar","parameter","headerText"),"aria-label":this._getLocaleString("toolbar","parameter","headerText")}},{prefixIcon:"e-viewer-icons first-page",id:this._id+"_toolbar_gotofirst",content:this._getLocaleString("toolbar","first","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotofirst","data-content":this._getLocaleString("toolbar","first","headerText"),"aria-label":this._getLocaleString("toolbar","first","headerText")}},{prefixIcon:"e-viewer-icons chevron-left",id:this._id+"_toolbar_gotoprevious",content:this._getLocaleString("toolbar","previous","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotoprevious","data-content":this._getLocaleString("toolbar","previous","headerText"),"aria-label":this._getLocaleString("toolbar","previous","headerText")}},{id:this._id+"_toolbar_gotoPage",type:"Input",template:this._gotoPageTemplate,htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_labelpageno"}},{type:"div",template:"<div><span id='"+this._id+"_toolbar_labelpageno' style=font-size:14px;> <\/span><\/div>",htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_labeltotalpageno"}},{prefixIcon:"e-viewer-icons chevron-right",id:this._id+"_toolbar_gotonext",content:this._getLocaleString("toolbar","next","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotonext","data-content":this._getLocaleString("toolbar","next","headerText"),"aria-label":this._getLocaleString("toolbar","next","headerText")}},{prefixIcon:"e-viewer-icons last-page",id:this._id+"_toolbar_gotolast",content:this._getLocaleString("toolbar","last","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotolast","data-content":this._getLocaleString("toolbar","last","headerText"),"aria-label":this._getLocaleString("toolbar","last","headerText")}},]}):new ejs.navigations.Toolbar({overflowMode:"Popup",width:"100%",height:"48px",items:[{prefixIcon:"e-viewer-icons first-page",id:this._id+"_toolbar_gotofirst",content:this._getLocaleString("toolbar","first","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotofirst","data-content":this._getLocaleString("toolbar","first","headerText"),"aria-label":this._getLocaleString("toolbar","first","headerText")},overflow:"none",tabIndex:0},{prefixIcon:"e-viewer-icons chevron-left",id:this._id+"_toolbar_gotoprevious",content:this._getLocaleString("toolbar","previous","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotoprevious","data-content":this._getLocaleString("toolbar","previous","headerText"),"aria-label":this._getLocaleString("toolbar","previous","headerText")},overflow:"none",tabIndex:0},{prefixIcon:"e-viewer-icons chevron-right",id:this._id+"_toolbar_gotonext",content:this._getLocaleString("toolbar","next","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotonext","data-content":this._getLocaleString("toolbar","next","headerText"),"aria-label":this._getLocaleString("toolbar","next","headerText")},overflow:"none",tabIndex:0},{prefixIcon:"e-viewer-icons last-page",id:this._id+"_toolbar_gotolast",content:this._getLocaleString("toolbar","last","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotolast","data-content":this._getLocaleString("toolbar","last","headerText"),"aria-label":this._getLocaleString("toolbar","last","headerText")},overflow:"none",tabIndex:0},{id:this._id+"_toolbar_gotoPage",type:"Input",template:this._gotoPageTemplate,htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_labelpageno"},overflow:"Show",tabIndex:0},{type:"div",template:"<div><span style=font-size:14px;><\/span> <span id='"+this._id+"_toolbar_labelpageno' style=font-size:14px;> <\/span><\/div>",htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_labeltotalpageno"},overflow:"Show",tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group1",htmlAttributes:{id:this._id+"_toolbar_group1"}},{prefixIcon:"e-viewer-icons zoom-out",id:this._id+"_toolbar_zoomout",content:this._getLocaleString("toolbar","zoomOut","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_zoomout","data-content":this._getLocaleString("toolbar","zoomOut","headerText"),"aria-label":this._getLocaleString("toolbar","zoomOut","headerText")},overflow:"none",tabIndex:0},{prefixIcon:"e-viewer-icons zoom-in",id:this._id+"_toolbar_zoomin",content:this._getLocaleString("toolbar","zoomIn","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_zoomin","data-content":this._getLocaleString("toolbar","zoomIn","headerText"),"aria-label":this._getLocaleString("toolbar","zoomIn","headerText")},overflow:"none",tabIndex:0},{template:"<input id='"+this._id+"_toolbar_zoom' style='text-align: center'><\/input>",htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_zoom"},type:"Input",overflow:"Show",tabIndex:0},{prefixIcon:"e-viewer-icons zoom-to-fit",id:this._id+"_toolbar_pagefit",content:this._getLocaleString("toolbar","fittopage","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_pagefit","data-content":this._getLocaleString("toolbar","fittopage","headerText"),"aria-label":this._getLocaleString("toolbar","fittopage","headerText")},click:e,tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group2",htmlAttributes:{id:this._id+"_toolbar_group2"}},{prefixIcon:"e-viewer-icons undo",id:this._id+"_toolbar_gotoparent",content:this._getLocaleString("toolbar","back","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_gotoparent","data-content":this._getLocaleString("toolbar","back","headerText"),"aria-label":this._getLocaleString("toolbar","back","headerText")},tabIndex:0},{prefixIcon:"e-viewer-icons refresh",id:this._id+"_toolbar_refresh",content:this._getLocaleString("toolbar","refresh","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_refresh","data-content":this._getLocaleString("toolbar","refresh","headerText"),"aria-label":this._getLocaleString("toolbar","refresh","headerText")},overflow:"none",tabIndex:0},{prefixIcon:"e-viewer-icons circle-close",id:this._id+"_toolbar_stop",content:this._getLocaleString("toolbar","stop","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_stop","data-content":this._getLocaleString("toolbar","stop","headerText"),"aria-label":this._getLocaleString("toolbar","stop","headerText")},tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group3",htmlAttributes:{id:this._id+"_toolbar_group3"}},{prefixIcon:"e-viewer-icons export",id:this._id+"_toolbar_export",content:this._getLocaleString("toolbar","exportformat","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_export","data-content":this._getLocaleString("toolbar","exportformat","headerText"),"aria-label":this._getLocaleString("toolbar","exportformat","headerText")},overflow:"Show",click:u,tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group4",htmlAttributes:{id:this._id+"_toolbar_group4"}},{prefixIcon:"e-viewer-icons print-layout",id:this._id+"_toolbar_preview",content:this._getLocaleString("toolbar","printLayout","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_preview","data-content":this._getLocaleString("toolbar","printLayout","headerText"),"aria-label":this._getLocaleString("toolbar","printLayout","headerText")},tabIndex:0},{prefixIcon:"e-viewer-icons print",id:this._id+"_toolbar_print",content:this._getLocaleString("toolbar","print","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_print","data-content":this._getLocaleString("toolbar","print","headerText"),"aria-label":this._getLocaleString("toolbar","print","headerText")},tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group5",htmlAttributes:{id:this._id+"_toolbar_group5"}},{prefixIcon:"e-viewer-icons export-setup",id:this._id+"_toolbar_exportsetup",content:this._getLocaleString("toolbar","exportsetup","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_exportsetup","data-content":this._getLocaleString("toolbar","exportsetup","headerText"),"aria-label":this._getLocaleString("toolbar","exportsetup","headerText")},tabIndex:0},{prefixIcon:"e-viewer-icons page-setup",id:this._id+"_toolbar_pagesetup",content:this._getLocaleString("toolbar","pagesetup","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_pagesetup","data-content":this._getLocaleString("toolbar","pagesetup","headerText"),"aria-label":this._getLocaleString("toolbar","pagesetup","headerText")},tabIndex:0},{type:"Separator",id:this._id+"_toolbar_group6",htmlAttributes:{id:this._id+"_toolbar_group6"}},{prefixIcon:"e-viewer-icons sidebar",id:this._id+"_toolbar_documentmap",content:this._getLocaleString("toolbar","stop","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_documentmap","data-content":this._getLocaleString("toolbar","documentMap","headerText"),"aria-label":this._getLocaleString("toolbar","documentMap","headerText")},tabIndex:0},{prefixIcon:"e-viewer-icons parameter",id:this._id+"_toolbar_parameter",content:this._getLocaleString("toolbar","parameter","headerText"),htmlAttributes:{"class":this._id+"_toolbar_item",id:this._id+"_e_parameter","data-content":this._getLocaleString("toolbar","parameter","headerText"),"aria-label":this._getLocaleString("toolbar","parameter","headerText")},overflow:"Show",tabIndex:0},{id:this._id+"_toolbar_findtext",type:"Input",template:new ejs.inputs.TextBox({width:80,cssClass:"e-search-box"}),htmlAttributes:{id:this._id+"_e_findtext","class":this._id+"_toolbar_item","data-content":this._getLocaleString("toolbar","find","headerText"),"aria-label":this._getLocaleString("toolbar","find","headerText")},overflow:"Show",tabIndex:0},{prefixIcon:"e-viewer-icons search",id:this._id+"_toolbar_find",content:this._getLocaleString("toolbar","find","headerText"),htmlAttributes:{id:this._id+"_e_find","class":this._id+"_toolbar_item","data-content":this._getLocaleString("toolbar","find","headerText"),"aria-label":this._getLocaleString("toolbar","find","headerText")},overflow:"Show",tabIndex:0},{prefixIcon:"e-viewer-icons performance",id:this._id+"_toolbar_performance",content:this._getLocaleString("toolbar","performance","headerText"),htmlAttributes:{id:this._id+"_e_performance","class":this._id+"_toolbar_item","data-content":this._getLocaleString("toolbar","performance","headerText"),"aria-label":this._getLocaleString("toolbar","performance","headerText")},tabIndex:0}]});i.appendTo("#"+t[0].id);function u(n){n.cancel=!0}function e(n){n.cancel=!0}f=["50%","75%","100%","125%","150%","200%","400%"];r=this._createEJ2DropDownList("e-reportviewer-drpdown","85px","27px",{"aria-disabled":"false",role:"listbox","aria-label":this._getLocaleString("toolbar","zoom","headerText")});r.change=this._zoomValChange;r.dataSource=f;r.appendTo("#"+this._id+"_toolbar_zoom");this._initExportMenu();this._initEJ2FitToPageMenu();this._onToolbarRendering({target:t});this._customEJ2ToolbarRendering(i);i.clicked=$.proxy(this._toolbarClick,this)}},_customEJ2ToolbarRendering:function(n){function e(n,t){return n.items.findIndex(function(n){return n.id===t&&n.type==="Separator"})}for(var u,o,g,h,c,r,t,f,nt,tt,l,a=$.extend(!0,[],this.model.toolbarSettings.customItems),v=$.extend(!0,[],this.model.toolbarSettings.customGroups),s=[],y=0,p=1,w=1,b=1,k=1,d=1,i=0;i<v.length;i++)(v[i].appendTo!="VerticalToolbar"||this.model.toolbarRenderMode=="Classic")&&s.push(v[i]);for(s.sort(this._sortComparer),u=[],i=0;i<a.length;i++)(a[i].appendTo!="VerticalToolbar"||this.model.toolbarRenderMode=="Classic")&&u.push(a[i]);for(u.sort(this._sortComparer),o=0;o<s.length;o++){switch(this.model.toolbarSettings.customGroups[o].groupIndex){case 1:t=this._id+"_toolbar_group1";r=n.items.findIndex(function(n){return n.id===t&&n.type==="Separator"});break;case 2:t=this._id+"_toolbar_group2";r=n.items.findIndex(function(n){return n.id===t&&n.type==="Separator"});break;case 3:t=this._id+"_toolbar_group3";r=n.items.findIndex(function(n){return n.id===t&&n.type==="Separator"});break;case 4:t=this._id+"_toolbar_group4";r=n.items.findIndex(function(n){return n.id===t&&n.type==="Separator"});break;case 5:case undefined:r=n.items.length}for(g=[{type:"Separator"}],n.addItems(g,r),h=0;h<s[o].items.length;h++)c=s[o].items[h].type,l=this._getEJ2ToolbarElement(s[o].items[h],c),n.addItems(l,r+1)}for(i=0;i<u.length;i++){c=u[i].type;switch(u[i].groupIndex){case 0:t=this._id+"_toolbar_group1";u[i].index>5?(r=e(n,t),f=r):f=u[i].index+y;y++;break;case 1:t=this._id+"_toolbar_group1";nt=e(n,t);u[i].index>5?(t=this._id+"_toolbar_group2",r=e(n,t),f=r):f=u[i].index+p+nt;p++;break;case 2:t=this._id+"_toolbar_group2";tt=e(n,t);u[i].index>4?(t=this._id+"_toolbar_group3",r=e(n,t),f=r):f=u[i].index+w+tt;w++;break;case 3:u[i].index>2?(t=this._id+"_toolbar_group4",r=e(n,t),f=r):(t=this._id+"_toolbar_group3",r=e(n,t),f=u[i].index+b+r);b++;break;case 4:u[i].index>3?(t=this._id+"_toolbar_group5",r=e(n,t),f=r):(t=this._id+"_toolbar_group4",r=e(n,t),f=u[i].index+k+r);k++;break;case 5:u[i].index>3?(t=this._id+"_toolbar_group6",r=e(n,t),f=r):(t=this._id+"_toolbar_group5",r=e(n,t),f=u[i].index+d+r);d++;break;default:f=n.items.length}l=this._getEJ2ToolbarElement(u[i],c);n.addItems(l,f)}},_sortComparer:function(n,t){return t.index-n.index},_getEJ2ToolbarElement:function(n,t){var i,r;switch(t){case ej.ReportViewer.InputElement.Default:i=[{cssClass:n.cssClass+" e-customoption",prefixIcon:n.prefixIcon,id:this._id+"_toolbar_"+n.id,htmlAttributes:{id:this._id+"_e_"+n.id,"class":this._id+"_toolbar_item","aria-label":n.id,header:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.header,content:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.content,value:n.id,cssClass:n.cssClass},overflow:n.overflow,tabIndex:0}];break;case ej.ReportViewer.InputElement.Textbox:n.value==undefined&&(n.value="");i=[{template:"<input type='text' id='"+this._id+"_toolbar_"+n.id+"' value='"+n.value+"'><\/input>",cssClass:n.cssClass+" e-customoption",htmlAttributes:{id:this._id+"_e_"+n.id,"class":this._id+"_toolbar_item","aria-disabled":"false",role:"textbox","aria-label":n.id,header:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.header,content:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.content,value:n.id,cssClass:n.cssClass},overflow:n.overflow,type:"Input",tabIndex:0}];break;case ej.ReportViewer.InputElement.Dropdown:i=[{template:"<input id='"+this._id+"_toolbar_"+n.id+"'><\/input>",cssClass:n.cssClass+" e-customoption",htmlAttributes:{id:this._id+"_e_"+n.id,"class":this._id+"_toolbar_item",header:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.header,content:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.content,value:n.id,cssClass:n.cssClass},overflow:n.overflow,type:"Input",tabIndex:0}];r=this._createEJ2DropDownList();r.cssClass="e-reportviewer-drpdown";r.value=n.value;r.htmlAttributes={"aria-disabled":"false",role:"combobox","aria-label":n.id};r.appendTo("#"+this._id+"_toolbar_"+n.id);break;case ej.ReportViewer.InputElement.Button:i=[{template:"<button id='"+this._id+"_toolbar_"+n.id+"' class='e-btn'><span class='e-btn-icon e-icons "+n.prefixIcon+"'><\/span>"+n.content+"<\/button>",cssClass:n.cssClass+" e-customoption",htmlAttributes:{id:this._id+"_e_"+n.id,"class":this._id+"_toolbar_item","aria-label":n.id,header:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.header,content:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.content,value:n.id,cssClass:n.cssClass},overflow:n.overflow,tabIndex:0}];break;default:i=[{template:n.template,cssClass:n.cssClass+" e-customoption",htmlAttributes:{id:this._id+"_e_"+n.id,"class":this._id+"_toolbar_item",header:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.header,content:ej.isNullOrUndefined(n.tooltip)?null:n.tooltip.content,value:n.id,cssClass:n.cssClass},overflow:n.overflow,tabIndex:0}]}return i[0].align=n.align!=undefined?n.align:this.model.toolbarRenderMode=="Native"?"center":"Left",i},_appendEJ2ToolbarItems:function(n,t){var i,r,u,f,e;switch(t){case"pdf":i=ej.buildTag("li.e-reportviewer-popupli e-pdf e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","Pdf")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-pdf","",{cursor:"pointer"},{id:this._id+"_toolbar_pdficon"});r=ej.buildTag("span .e-reportviewer-popupspan e-pdf","",{"margin-left":"10px"},{id:this._id+"_toolbar_"+t});r.append(this._getLocaleString("toolbar","exportformat","Pdf"));i.append(u);i.append(r);break;case"xls":i=ej.buildTag("li.e-reportviewer-popupli e-excel e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","Excel")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-excel","",{cursor:"pointer"},{id:this._id+"_toolbar_excelicon"});r=ej.buildTag("span .e-reportviewer-popupspan e-excel","",{"margin-left":"10px"},{id:this._id+"_toolbar_"+t});r.append(this._getLocaleString("toolbar","exportformat","Excel"));i.append(u);i.append(r);break;case"word":i=ej.buildTag("li.e-reportviewer-popupli e-word e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","Word")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-word","",{cursor:"pointer"},{id:this._id+"_toolbar_wordicon"});r=ej.buildTag("span .e-reportviewer-popupspan e-word","",{"margin-left":"10px"},{id:this._id+"_toolbar_"+t});r.append(this._getLocaleString("toolbar","exportformat","Word"));i.append(u);i.append(r);break;case"html":i=ej.buildTag("li.e-reportviewer-popupli e-html e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","Html")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-html","",{cursor:"pointer"},{id:this._id+"_toolbar_htmlicon"});r=ej.buildTag("span .e-reportviewer-popupspan e-html","",{"margin-left":"10px"},{id:this._id+"_toolbar_"+t});r.append(this._getLocaleString("toolbar","exportformat","Html"));i.append(u);i.append(r);break;case"ppt":i=ej.buildTag("li.e-reportviewer-popupli e-ppt e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","PPT")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-powerpoint","",{cursor:"pointer"},{id:this._id+"_toolbar_ppticon"});r=ej.buildTag("span .e-reportviewer-popupspan e-ppt","",{"margin-left":"10px"},{id:this._id+"_toolbar_"+t});r.append(this._getLocaleString("toolbar","exportformat","PPT"));i.append(u);i.append(r);break;case"csv":i=ej.buildTag("li.e-reportviewer-popupli e-csv e-reportviewer-tab-focus-none","",{},{id:this._id+"_toolbar_li_"+t,"aria-disabled":"false",role:"menuitem","aria-label":this._getLocaleString("toolbar","exportformat","CSV")+" "+this._getLocaleString("toolbar","exportformat","headerText")});u=ej.buildTag("span.e-viewer-icons export-csv","",{cursor:"pointer"},{id:this._id+"_toolbar_csvico