if(!nexacro.ExcelExportObject){nexacro.ExcelExportProgressEventInfo=function(_a,_b,_c,_d,_e,_f){this.id=this.eventid=_b||"onprogress";this.fromobject=_a;this.fromreferenceobject=_f;this.itemindex=_c;this.itemtype=_d;this.recordindex=_e;};var _pExportEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.ExcelExportProgressEventInfo);nexacro.ExcelExportProgressEventInfo.prototype=_pExportEventInfo;_pExportEventInfo._type_name="ExcelExportProgressEventInfo";delete _pExportEventInfo;nexacro.ExcelExportEventInfo=function(_a,_b,_c,_d){this.id=this.eventid=_b||"onsuccess";this.fromobject=_a;this.fromreferenceobject=_d;this.url=_c;};var _pExcelExportEventInfo=nexacro._createPrototype(nexacro.Event,nexacro.ExcelExportEventInfo);nexacro.ExcelExportEventInfo.prototype=_pExcelExportEventInfo;_pExcelExportEventInfo._type_name="ExcelExportEventInfo";delete _pExcelExportEventInfo;nexacro.ExcelExportErrorEventInfo=function(_a,_b,_c,_d,_e,_f){this.id=this.eventid=_b||"onerror";this.fromobject=_a;this.fromreferenceobject=_e;this.errortype=_c;this.errormsg=_d;this.statuscode=_f;};var _pExportErrorEventInfo=nexacro._createPrototype(nexacro.ErrorEventInfo,nexacro.ExcelExportErrorEventInfo);nexacro.ExcelExportErrorEventInfo.prototype=_pExportErrorEventInfo;_pExportErrorEventInfo._type_name="ExcelExportErrorEventInfo";delete _pExportErrorEventInfo;nexacro.ExcelExportObject=function(_a,_b){this.id=this.name=_a;if(!_b){_b=application.getActiveForm();if(!_b){var _c=application.mainframe._window;var _d=_c.getCurrentFocusPaths();var _e=(_d?_d.length:0);for(var _f=0;_f<_e;_f++ ){var _g=_d[_f];if(!_g){continue;}if(_g._is_form){_b=_g;break;}}}}this.parent=_b;this.activepagename="";this.exportactivemode="active";this.exporteventtype="itemrecord";this.exportfilename="";this.exportmessagealert="";this.exportmessagecomplete="";this.exportmessageprocess="";this.exportmessageready="";this.exportopenmode="noopen";this._exporttype=nexacro.ExportTypes.EXCEL;this.exporttype=nexacro.ExportTypes.EXCEL;this.exportuitype="none";this.templatefilename="";this.commdataformat="";this.commcompress="none";this.exporturl="";this._exportuitype=0;this._exporturl="";this._commcompress=false;this._commdataformat=2;this._grids=[];this._dataset=[];this._xml=[];this._allRowCount=0;this._progress_pos=0;this._uniqueIndex=0;this._fileURL="";this._itemsIndex=0;this._argsParam=null;this._exportBar;this._tempSaveMethod=null;this.onsuccess=new nexacro.EventListener("onsuccess");this.onprogress=new nexacro.EventListener("onprogress");this.onerror=new nexacro.EventListener("onerror");this._handle=null;nexacro._create_filedownload_handle(nexacro._emptyFn,this);this._event_list={"onsuccess":1,"onerror":1,"onprogress":1};};var _pExcelExport=nexacro.ExcelExportObject.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.ExcelExportObject);_pExcelExport._type_name="ExportObject";_pExcelExport.excelTypeTable={EXCEL:0x0100,EXCEL97:0x0110,EXCEL2007:0x0120,HANCELL2010:0x0400,HANCELL2014:0x0410,256:0x0100,272:0x0110,288:0x0120,1024:0x0400,1040:0x0410};_pExcelExport.on_created=nexacro._emptyFn;_pExcelExport.set_templatefilename=function(_a){if(_a!=this.templatefilename){this.templatefilename=_a;}return _a;};_pExcelExport.set_commdataformat=function(_a){if(_a!=this.commdataformat){this.commdataformat=_a;switch(_a.toString().toUpperCase()){case "XML":this._commdataformat=0;break;case "BINARY":this._commdataformat=1;break;default:this._commdataformat=2;break;}}return _a;};_pExcelExport.set_commcompress=function(_a){if(_a!=this.commcompress){this.commcompress=_a;switch(_a.toString().toUpperCase()){case "COMPRESS":this._commcompress=true;break;default:this._commcompress=false;break;}}return _a;};_pExcelExport.set_exporturl=function(_a){if(_a!=this.exporturl){this.exporturl=_a;this._exporturl=application._getServiceLocation(_a,this.parent._getFormBaseUrl());}return _a;};_pExcelExport.set_name=function(_a){this.id=this.name=_a;};_pExcelExport.set_exporttype=function(_a){if(_a!=this.exporttype){this.exporttype=_a;var _b=this.excelTypeTable[(_a+"").toUpperCase()];if(!_b){_b=256;}this._exporttype=_b;}return _a;};_pExcelExport.set_activepagename=function(_a){if(_a!=this.activepagename){this.activepagename=_a;}return _a;};_pExcelExport.set_exportactivemode=function(_a){if(_a!=this.exportactivemode){this.exportactivemode=_a;}return _a;};_pExcelExport.set_exporteventtype=function(_a){if(_a!=this.exporteventtype){this.exporteventtype=_a;}return _a;};_pExcelExport.set_exportopenmode=function(_a){if(_a!=this.exportopenmode){this.exportopenmode=_a;}return _a;};_pExcelExport.set_exportfilename=function(_a){if(_a!=this.exportfilename){this.exportfilename=_a;}return _a;};_pExcelExport.set_exportmessagealert=function(_a){if(_a!=this.exportmessagealert){this.exportmessagealert=_a;}return _a;};_pExcelExport.set_exportuitype=function(_a){if(_a!=this.exportuitype){this.exportuitype=_a;switch(_a){case "exportprogress":this._exportuitype=1;break;case "statusbar":this._exportuitype=2;break;default:this._exportuitype=0;break;}}return _a;};_pExcelExport.set_exportmessageready=function(_a){if(_a!=this.exportmessageready){this.exportmessageready=_a;}return _a;};_pExcelExport.set_exportmessageprocess=function(_a){if(_a!=this.exportmessageprocess){this.exportmessageprocess=_a;}return _a;};_pExcelExport.set_exportmessagecomplete=function(_a){if(_a!=this.exportmessagecomplete){this.exportmessagecomplete=_a;}return _a;};_pExcelExport.addExportItem=function(_a,_b,_c){var _d= -1;var _e;if(arguments.length==2){if(_a&&_b&&_b instanceof nexacro.ExportItem){_e=_b;_e.parent=this;_e._setEventHandler("onprogress",this.on_notify_onprogress,this);_e._setEventHandler("onsuccess",this.on_notify_onsuccess,this);_e._setEventHandler("onerror",this.on_notify_onerror,this);}else{return -1;}}else{if(_a&&_b&&_a==this._getItemType(_b)){_e=new nexacro.ExportItem(this.id+"item"+this._uniqueIndex++ ,this);_e._setEventHandler("onprogress",this.on_notify_onprogress,this);_e._setEventHandler("onsuccess",this.on_notify_onsuccess,this);_e._setEventHandler("onerror",this.on_notify_onerror,this);var _f=arguments.length;switch(_f){case 11:arguments[10]&&_e.set_acceptstyle(arguments[10]);case 10:arguments[9]&&_e.set_exportsize(arguments[9]);case 9:arguments[8]&&_e["set_exceptstyle"](arguments[8]);case 8:arguments[7]&&_e["set_exportimage"](arguments[7]);case 7:arguments[6]&&_e["set_exportvalue"](arguments[6]);case 6:arguments[5]&&_e["set_exportmerge"](arguments[5]);case 5:arguments[4]&&_e["set_exportselect"](arguments[4]);case 4:arguments[3]&&_e["set_exporthead"](arguments[3]);case 3:arguments[2]&&_e["set_range"](arguments[2]);case 2:arguments[1]&&_e["set_source"](arguments[1]);break;}}else{return -1;}}switch(_a){case nexacro.ExportItemTypes.GRID:_e.set_type(_a);_d=this._grids.push(_e)-1;break;case nexacro.ExportItemTypes.DATA:break;case nexacro.ExportItemTypes.XML:break;}return _d;};_pExcelExport.clear=function(){var _a=0;_a+=this._grids.length;_a+=this._dataset.length;_a+=this._xml.length;this._grids=[];this._dataset=[];this._xml=[];return _a;};_pExcelExport.clearExportItems=function(_a){var _b;switch(_a){case nexacro.ExportItemTypes.GRID:_b=this._grids.length;this._grids.length=0;this._grids=[];break;}if(_b==0){this._uniqueIndex=0;}return _b;};_pExcelExport.count=function(){var _a=0;_a+=this._grids.length;_a+=this._dataset.length;_a+=this._xml.length;return _a;};_pExcelExport.countExportItems=function(_a){var _b=0;switch(_a){case nexacro.ExportItemTypes.GRID:_b+=this._grids.length;break;}return _b;};_pExcelExport.delExportItem=function(_a,_b){var _c=false;switch(_a){case nexacro.ExportItemTypes.GRID:if(this._grids.splice(_b,1).length>0){_c=true;}break;}return _c;};_pExcelExport.getExportItem=function(_a,_b){var _c=null;switch(_a){case nexacro.ExportItemTypes.GRID:_c=this._grids[_b];break;}return _c?_c:null;};_pExcelExport.setExportItem=function(_a,_b,_c){if(!_c||!(_c instanceof nexacro.ExportItem)){return false;}var _d=false;switch(_a){case nexacro.ExportItemTypes.GRID:if(_b> -1&&_b0){if(this.exportmessagealert!=""){alert(this.exportmessagealert);}_c[0]._gridItemExport(this);}break;}return _b;};_pExcelExport.exportData=function(_a){this._argsParam=_a;var _b= -1;if(!this.exporturl){return _b;}var _c=this._grids;var _d=this._gCount=_c.length;this._allCount=_d;if(this._allCount>0&&this.exportmessagealert!=""){alert(this.exportmessagealert);}var _e;for(_e=0;_e<_d;_e++ ){this._allRowCount+=_c[_e].source._getGridRowCount();}if(_d>0){_c[0]._gridItemExport(this);}return this.count();};_pExcelExport.destroy=function(){if(this._exportBar){this._exportBar.destroy();this._exportBar=null;}this._excel_suppress_info=null;this._merge_datas=null;this._grids.length=0;this._dataset.length=0;this._xml.length=0;this.parent.removeChild(this.id);this.parent=null;return true;};_pExcelExport.on_fire_onprogress=function(_a,_b){var _c=this.onprogress;if(_c&&_c._has_handlers){_c._fireEvent(this,_b);}};_pExcelExport.on_fire_onsuccess=function(_a,_b){var _c=this.onsuccess;if(_c&&_c._has_handlers){_c._fireEvent(this,_b);}};_pExcelExport.on_fire_onerror=function(_a,_b){var _c=this.onerror;var _d;if(_c&&_c._has_handlers){_d=_c._fireEvent(this,_b);}return _d;};_pExcelExport.on_notify_onprogress=function(_a,_b){this.on_fire_onprogress(_a,_b);return false;};_pExcelExport.on_notify_onsuccess=function(_a,_b){this.on_fire_onsuccess(_a,_b);return false;};_pExcelExport.on_notify_onerror=function(_a,_b){this.on_fire_onerror(_a,_b);return false;};_pExcelExport._getItemType=function(_a){var _b;switch(_a&&_a._type_name){case "Grid":_b=nexacro.ExportItemTypes.GRID;break;case "Dataset":break;case "Xml":break;}return _b;};_pExcelExport._getProcessStr=function(_a,_b,_c){var _d="";_d=this.exportmessageprocess.replace("%d",_a);_d=_d.replace("%d",_b);_d=_d.replace("%d",_c);return _d;};_pExcelExport._getForm=function(){if(this.parent instanceof nexacro.Form){return this.parent;}return null;};_pExcelExport._getExportBar=function(_a){var _b=this._getForm();var _c="_exportBar";var _d=_b[_c];if(_d){_d.destroy();}_d=new nexacro.ExportProgress(_c,"absolute",0,0,10,10,null,null,_b);_b.addChild(_d.name,_d);_d._uitype=_a;if(_d.createComponent(true)){_d.on_created();}return _d;};delete _pExcelExport;nexacro.ExportItem=function(_a,_b){this.id=this.name=_a;this.parent=_b||null;this.acceptstyle="";this.exceptstyle="";this.exporthead="allband";this._exporthead="";this.exportimage="none";this.exportmerge="suppress";this._exportmerge=1;this.exportselect="allrecord";this.exportvalue="allstyle";this.exportsize="width";this.range="";this.source="";this.type="";this._applyA=true;this._applyB=true;this._applyC=true;this._applyF=true;this._applyHead=true;this._applySumm=true;this._applyL=false;this._d_BLColor="";this._seq=1;this._preStartRow=0;this._startRow=0;this._eof=false;this._instanceId="";this._a_ct=0;this._bg_ct=0;this._c_ct=0;this._f_ct=0;this._l_ct=0;this._t_ct=0;this._sm_ct=0;this._g_ct=0;this._s_ct=0;this._stylecache={};this._selectcount=0;this._merge_datas=null;this._excel_suppress_info={};this._temp_enableevent=this._temp_treeIndexes=this._temp__treeStates=null;this._tmpSuppressInfos;this._event_list={"onsuccess":1,"onprogress":1,"onerror":1};};var _pItem=nexacro.ExportItem.prototype=nexacro._createPrototype(nexacro.EventSinkObject,nexacro.ExportItem);_pItem._type_name="ExportItem";_pItem._suppress_align_table={"first":"top","first,over":"top","middle":"middle","middle,over":"middle","last":"bottom","last,over":"bottom"};_pItem.set_acceptstyle=function(_a){if(_a!=this.acceptstyle){this.acceptstyle=_a;switch(_a.toLowerCase()){case "cellline":this._applyL=true;break;}}return _a;};_pItem.set_exceptstyle=function(_a){if(_a!=this.exceptstyle){this.exceptstyle=_a;var _b=_a.replace(/ /g,"").split(",");var _c=_b.length;for(var _d=0;_d<_c;_d++ ){switch(_b[_d].toLowerCase()){case "align":this._applyA=false;break;case "background":this._applyB=false;break;case "color":this._applyC=false;break;case "font":this._applyF=false;break;}}}return _a;};_pItem.set_exporthead=function(_a){if(_a!=this.exporthead){this.exporthead=_a;var _b=_a.replace(/ /g,"").split(",");var _c=_b.length;for(var _d=0;_d<_c;_d++ ){switch(_b[_d].toLowerCase()){case "nohead":this._applyHead=false;break;case "nosumm":this._applySumm=false;break;default:this._applySumm=true;this._applySumm=true;break;}}}if(!this._applyHead||!this._applySumm){if(!this._applyHead&&!this._applySumm){this._exporthead="nohead, nosumm";}else if(!this._applyHead){this._exporthead="nohead";}else{this._exporthead="nosumm";}}else{this._exporthead="allband";}return _a;};_pItem.set_exportimage=function(_a){if(_a!=this.exportimage){this.exportimage=_a;}return _a;};_pItem.set_exportmerge=function(_a){if(_a!=this.exportmerge){this.exportmerge=_a;switch(_a){case "nosuppress":this._exportmerge=0;break;case "merge":this._exportmerge=2;break;default:this._exportmerge=1;break;}}return _a;};_pItem.set_exportselect=function(_a){if(_a!=this.exportselect){this.exportselect=_a;}return _a;};_pItem.set_exportvalue=function(_a){if(_a!=this.exportvalue){this.exportvalue=_a;}return _a;};_pItem.set_range=function(_a){if(_a!=this.range){this.range=_a;}return _a;};_pItem.set_source=function(_a){if(_a!=this.source){this.source=_a;}return _a;};_pItem.set_type=function(_a){if(_a!=this.type){this.type=_a;}return _a;};_pItem.set_exportsize=function(_a){if(_a!=this.exportsize){this.exportsize=_a;}return _a;};_pItem.on_fire_onprogress=function(_a,_b,_c,_d){var _e=this.parent.onprogress;if(_e&&_e._has_handlers){var _f=new nexacro.ExcelExportProgressEventInfo(_a,"onprogress",_b,_c,_d,this);_e._fireEvent(this,_f);}};_pItem.on_fire_onsuccess=function(_a,_b,_c){var _d=this.parent.onsuccess;if(_d&&_d._has_handlers){var _e=new nexacro.ExcelExportEventInfo(_a,"onsuccess",_c,this);_d._fireEvent(this,_e);}};_pItem.on_fire_onerror=function(_a,_b,_c,_d){var _e=this.parent.onerror;if(_e&&_e._has_handlers){var _f=new nexacro.ExcelExportErrorEventInfo(_a,"onerror",_b,_c,this,_d);_e._fireEvent(this,_f);}};_pItem._getWindow=function(){var _a=this.parent.parent;if(_a._is_form){return _a._getWindow();}return null;};_pItem._getWindowHandle=function(){var _a=this.parent.parent;if(_a._is_form){return _a._getWindowHandle();}return null;};_pItem._getCellStyle=function(_a,_b,_c,_d,_e){var _f;var _g=_e=="selected"?true:false;switch(_d){case "align":_f=_a._query_pseudo_align(_b,_a.displaytype,_e);break;case "background":_f=_a._query_pseudo_background(_b,_c,_g,_e);break;case "border":_f=_a._query_pseudo_border(_b,false,"normal",0);break;case "color":_f=_a._query_pseudo_color(_b,_c,_g,_e);break;case "font":_f=_a._query_pseudo_font(_b,_g,_e);break;case "gradation":_f=_a._query_pseudo_gradation(_b,_c,_g,_e);break;}return _f;};_pItem._getCellText=function(_a){var _b=_a.subcells;if(_b.length){return _b[0]._getDisplayText();}return _a._getDisplayText();};_pItem._getCellTextBody=function(_a,_b,_c){var _d=_a._curFormat._bodycells;var _e;var _f=_d[_c]._subcells;if(_f.length>0){_e=_f[0]._getDisplayText(_b);}else{_e=_d[_c]._getDisplayText(_b);}return _e;};_pItem._find_styleName=function(_a,_b,_c,_d,_e){var _f="";var _g="";var _h=0;var _i= -1;if(_c){_i=_a.findRow("value",_c,_e);if(_i> -1){_g=_a.getColumn(_i,0);if(_g==_b){_f=_a.getColumn(_i,1);}else{return this._find_styleName(_a,_b,_c,_d,_i+1);}}else{_h=_a.getRowCount();_f=_b+ ++_d;_a.addRow();_a.setColumn(_h,"type",_b);_a.setColumn(_h,"name",_f);_a.setColumn(_h,"value",_c);}}return [_f,_d];};_pItem._getFitValue=function(_a){if(!_a){return;}var _b=[];var _c=_a._value;_b=_c.split(" ");return _b.join(",");};_pItem._getFitFontValue=function(_a){if(!_a){return;}var _b;_b=_a.type+","+_a.size+","+_a.face;return _b;};_pItem._getHEXtoRGB=function(_a){var _b;if(typeof _a=="object"){_b=this._getHexColor(_a._value.split(" ")[0]);}else{_b=this._getHexColor(_a);}var _c=[];if(_b===""){_b=_a._value;}else{if(_b.indexOf("#")> -1){_c.push(parseInt(_b.substring(1,3),16));_c.push(parseInt(_b.substring(3,5),16));_c.push(parseInt(_b.substring(5,7),16));_b=_c.join(",");}else{var _d=_b.indexOf("(");var _e=_b.indexOf(")");_c=_b.substring(_d+1,_e-1).split(",");_c.pop();_b=_c.join(",");}}return _b;};_pItem._makeforDsStyle=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){var _j;var _k="";if(this._applyA){_j=this._find_styleName(_a,"align",_b,this._a_ct);style_name=_j[0];this._a_ct=_j[1];_k+="align:"+style_name+",";}if(this._applyB){_j=this._find_styleName(_a,"background",_c,this._bg_ct);style_name=_j[0];this._bg_ct=_j[1];_k+="background:"+style_name+",";}if(this._applyC){_j=this._find_styleName(_a,"color",_d,this._c_ct);style_name=_j[0];this._c_ct=_j[1];_k+="color:"+style_name+",";}if(this._applyF){_j=this._find_styleName(_a,"font",_e,this._f_ct);style_name=_j[0];this._f_ct=_j[1];_k+="font:"+style_name+",";}_j=this._find_styleName(_a,"line",_f,this._l_ct);style_name=_j[0];this._l_ct=_j[1];_k+="line:"+style_name+",";_j=this._find_styleName(_a,"type",_g,this._t_ct);style_name=_j[0];this._t_ct=_j[1];_k+="type:"+style_name;if(_h>1){_j=this._find_styleName(_a,"rowsuppress",_h,this._sm_ct);style_name=_j[0];this._sm_ct=_j[1];_k+=",rowsuppress:"+style_name;}if(_i>1){_j=this._find_styleName(_a,"colsuppress",_i,this._sm_ct);style_name=_j[0];this._sm_ct=_j[1];_k+=",colsuppress:"+style_name;}_j=this._find_styleName(_a,"style",_k,this._s_ct);style_name=_j[0];this._s_ct=_j[1];return style_name;};_pItem._checkExpr=function(_a){if(_a&&_a._bindtype!=0){return true;}return false;};_pItem._checkGradation=function(_a){if(_a._value.match(/@gradation/)){return true;}return false;};_pItem._getHexColor=function(_a){var _b=nexacro._xreNamedColorList[_a];if(_b){return _b;}len=_a.length;if(_a.substring(0,1)=='#'){if(len==7){return _a;}if(len==9){return _a.substr(0,7);}}if(_a.substring(0,2)=="0x"){if(len==8){return "#"+_a.substring(2);}if(len==10){return "#"+_a.substring(2,8);}}return "";};_pItem._getGradationColor=function(_a){var _b;var _c;var _d=[];if(_a){_b=_a._value;if(_b!=""){_b=this._getHexColor(_a.start_color);_c=this._getHexColor(_a.end_color);if(_b.indexOf("#")> -1){var _e=_b+_c;if(this._stylecache[_e]){return this._stylecache[_e];}else{_d.push(Math.round((parseInt(_b.substring(1,3),16)+parseInt(_c.substring(1,3),16))/2));_d.push(Math.round((parseInt(_b.substring(3,5),16)+parseInt(_c.substring(3,5),16))/2));_d.push(Math.round((parseInt(_b.substring(5),16)+parseInt(_c.substring(5),16))/2));_b=_d.join(",");this._stylecache[_e]=_b;}}return _b;}}return "";};_pItem._getCellBodyStyle=function(_a,_b,_c){var _d;var _e;var _f;var _g;var _h;var _i;var _j;var _k;var _l;var _m;var _n;var _o="";var _p=this._ds_style;var _q=false;var _r=_a.displaytype._value;var _s;var _t;_d=_a._stylecache["alignnormal"+_r];_e=_a._stylecache["backgroundfalsefalsenormal"];_g=_a._stylecache["colorfalsefalsenormal"];_i=_a._stylecache["fontfalsenormal"];if(this._applyL){_j=_a._stylecache["linefalsebothn"];if(!_j){_j=_a.style.line;if(!_j){_j=_a._query_pseudo_border(0,false,"normal",0);}}}_f=_a._stylecache["backgroundtruefalsenormal"];_h=_a._stylecache["colortruefalsenormal"];if(!_d&&!_e&&!_g&&!_i){_f=_a.style.background2;if(!_f){_f=_a._query_pseudo_background(0,true,false,"normal");}_h=_a.style.color2;if(!_h){_h=_a._query_pseudo_color(0,true,false,"normal");}}if(!_d){_d=_a.style.align;if(!_d){_d=_a._query_pseudo_align(0,_r,"normal");}}if(!_e){_e=_a.style.background;if(!_e){_e=_a._query_pseudo_background(0,false,false,"normal");}}if(!_g){_g=_a.style.color;if(!_g){_g=_a._query_pseudo_color(0,false,false,"normal");}}if(!_i){_i=_a.style.font;if(!_i){_i=_a._query_pseudo_font(0,false,"normal");}}var _u=this._getFitValue(_d);if(this._checkGradation(_e)){_k=_a._stylecache["gradationfalsefalsenormal"];if(!_k){_k=_a.style.gradation;if(!_k){_k=_a._query_pseudo_gradation(0,false,false,"normal");}}var _z=this._getGradationColor(_k);}else{var _z=this._getHEXtoRGB(_e);}var _v=this._getHEXtoRGB(_g);var _w=this._getFitFontValue(_i);var _x="";if(this._applyL&&_j){if(_j.right_style!="none"&&_j._right_width!=0){var _aa=this._getHEXtoRGB(_j.right_color)+(_j.right_style=="solid"?"":","+_j.right_style);_x="empty:empty:"+_aa+":"+_aa;}else{_x="empty:empty:empty:empty";}}else{_x="empty:empty:empty:empty";}if(this._checkExpr(_d)){_u=undefined;}else{this._stylecache[_b+"align"]=_u;}if(this._checkExpr(_e)){_z=undefined;}else{this._stylecache[_b+"background0"]=_z;}if(this._checkExpr(_g)){_v=undefined;}else{this._stylecache[_b+"color0"]=_v;}if(this._checkExpr(_i)){_w=undefined;}else{this._stylecache[_b+"font"]=_w;}if(this._checkExpr(_j)){_aa=undefined;}else{this._stylecache[_b+"line"]=_x;}if(_f){if(this._checkGradation(_f)){_l=_a._stylecache["gradationtruefalsenormal"];if(!_l){_l=_a.style.gradation2;if(!_l){_l=_a._query_pseudo_gradation(0,true,false,"normal");}}var _s=this._getGradationColor(_l);}else{var _s=this._getHEXtoRGB(_f);}if(this._checkExpr(_f)){_s=undefined;}else{this._stylecache[_b+"background1"]=_s;}if(_z!=_s){_q=true;}}else{this._stylecache[_b+"background1"]=_s=_z;}if(_h){var _t=this._getHEXtoRGB(_h);if(this._checkExpr(_h)){_t=undefined;}else{this._stylecache[_b+"color1"]=_t;}if(_v!=_t){_q=true;}}else{this._stylecache[_b+"color1"]=_t=_v;}var _y=this._getFixedCellType(_a,0);_m=this._makeforDsStyle(_p,_u,_z,_v,_w,_x,_y);if(_q){_n=this._makeforDsStyle(_p,_u,_s,_t,_w,_x,_y);}subCell=_a._subcells;subL=subCell.length;if(subL){var _ab="";for(var _ac=0;_ac";for(var _ag=0,_ah=_ac.length;_ag<_ah;_ag++ ){_i+='';}_i+="";for(var _ag=0,_ai=_ad?_ad.length:0;_ag<_ai;_ag++ ){_i+='';}for(var _ag=0,_ai=_ae?_ae.length:0;_ag<_ai;_ag++ ){_i+='';}for(var _ag=0,_ai=_af?_af.length:0;_ag<_ai;_ag++ ){_i+='';}_i+="";if(_d>0&&this._applyHead){_r=_c[0].parent._find_gridpseudo_obj("cellline","normal",null,"line");_s=_r.right_color?this._getHEXtoRGB(_r.right_color)+(_r.right_style=="solid"?"":","+_r.right_style):"empty";_i+="";for(var _ag=0;_ag<_d;_ag++ ){_x=_c[_ag];_aa=this._getCellStyle(_x, -1,false,"background","normal");if(this._checkGradation(_aa)){_ab=this._getCellStyle(_x, -1,false,"gradation","normal");_k=this._getGradationColor(_ab);}else{_k=this._getHEXtoRGB(_aa);}_l=this._getFitValue(this._getCellStyle(_x, -1,false,"align","normal"));_m=this._getFitFontValue(this._getCellStyle(_x, -1,false,"font","normal"));_n=this._getHEXtoRGB(this._getCellStyle(_x, -1,false,"color","normal"));if(this._applyL&&_x.style.line){_o=this._getCellStyle(_x, -1,false,"border","normal");if(_o.right_style!="none"&&_o._right_width!=0){_p=this._getHEXtoRGB(_o.right_color)+(_o.right_style=="solid"?"":","+_o.right_style);}else{_p="empty";}}else{_p=_s;}var _aj=this._getFixedCellType(_x, -1);_y=_x._subcells;_z=_y.length;if(_z){for(var _ak=0;_ak<_z;_ak++ ){_q=this._getSubCellLine(_y[_ak],_s,_p,_x._rowspan-1,_x._colspan-1);_w=this._makeforDsStyle(_j,_l,_k,_n,_m,_q,_aj);_i+=this._modifyFormat(_y[_ak],_w,null, -1,_x);}}else{var _al=false;_q="empty:empty:"+_p+":"+_p;var _am=null;var _an=0;var _ao=0;if(this._exportmerge==1){if(!!_a._checkFakeMerge(_x, -1)){_q=this._makeFakeLine(_x._fakemerge_infos[1],_p,true);_am="";var _ap=this._merge_datas&&this._merge_datas[ -1+"_"+_ag];if(_ap){if(_ap.isFakeStart){_am=nexacro._encodeXml(_x._getDisplayText( -1));if(_l!="left,top"){var _aq=_l.split(",");var _ar=_ap[_aq[1]]+"_"+_ap[_aq[0]];if(this._merge_datas[_ar]){this._merge_datas[_ar].disPlayText=_am;this._merge_datas[_ar].showText=true;}else{this._merge_datas[_ar]={disPlayText:_am,showText:true};}}_am="";}else if(_ap.showText){_am=_ap.disPlayText;}}}}else if(this._exportmerge==2){var _ap=this._merge_datas&&this._merge_datas[ -1+"_"+_ag];if(_ap){if(_ap.isFakeStart){_am="rowspan=\""+_ap.rowspan+"\" colspan=\""+_ap.colspan+"\" ";}else{_al=true;}}}if(!_al){_w=this._makeforDsStyle(_j,_l,_k,_n,_m,_q,_aj);_i+=this._modifyFormat(_x,_w,null, -1,false,_am);}}}_i+="";}if(_f>0){_i+="";_t=_e[0].parent._find_gridpseudo_obj("cellline","normal",null,"line");this._d_BLColor=_u=_t.right_color?this._getHEXtoRGB(_t.right_color)+(_t.right_style=="solid"?"":","+_t.right_style):"empty";for(var _ag=0;_ag<_f;_ag++ ){_x=_e[_ag];_i+=this._getCellBodyStyle(_x,_ag,_u);}_i+="";}if(_h>0&&this._applySumm){_i+="";for(var _ag=0;_ag<_h;_ag++ ){_x=_g[_ag];_aa=this._getCellStyle(_x, -2,false,"background","normal");if(this._checkGradation(_aa)){_ab=this._getCellStyle(_x, -2,false,"gradation","normal");_k=this._getGradationColor(_ab);}else{_k=this._getHEXtoRGB(_aa);}_l=this._getFitValue(this._getCellStyle(_x, -2,false,"align","normal"));_m=this._getFitFontValue(this._getCellStyle(_x, -2,false,"font","normal"));_n=this._getHEXtoRGB(this._getCellStyle(_x, -2,false,"color","normal"));if(!_s){_r=_c[0].parent._find_gridpseudo_obj("cellline","normal",null,"line");_s=this._getHEXtoRGB(_r.right_color)+(_r.right_style=="solid"?"":","+_r.right_style);}if(this._applyL&&_x.style.line){_o=this._getCellStyle(_x, -2,false,"border","normal");if(_o.right_style!="none"&&_o._right_width!=0){_p=this._getHEXtoRGB(_o.right_color)+(_o.right_style=="solid"?"":","+_o.right_style);}else{_p="empty";}}else{_p=_s;}var _aj=this._getFixedCellType(_x, -2);_y=_x._subcells;_z=_y.length;if(_z){for(var _ak=0;_ak<_z;_ak++ ){_q=this._getSubCellLine(_y[_ak],_s,_p,_x._rowspan-1,_x._colspan-1);_w=this._makeforDsStyle(_j,_l,_k,_n,_m,_q,_aj);_i+=this._modifyFormat(_y[_ak],_w,null, -2,_x);}}else{var _al=false;_q="empty:"+_p+":"+_p+":empty";var _am=null;if(this._exportmerge==1){if(!!_a._checkFakeMerge(_x, -2)){_q=this._makeFakeLine(_x._fakemerge_infos[0],_p);_am="";var _ap=this._merge_datas&&this._merge_datas[ -2+"_"+_ag];if(_ap){if(_ap.isFakeStart){_am=nexacro._encodeXml(_x._getDisplayText( -2));if(_l!="left,top"){var _aq=_l.split(",");var _ar=_ap[_aq[1]]+"_"+_ap[_aq[0]];if(this._merge_datas[_ar]){this._merge_datas[_ar].disPlayText=_am;this._merge_datas[_ar].showText=true;}else{this._merge_datas[_ar]={disPlayText:_am,showText:true};}_am="";}}else if(_ap.showText){_am=_ap.disPlayText;}}}}else if(this._exportmerge==2){if(!!_a._checkFakeMerge(_x, -2)){var _ap=this._merge_datas&&this._merge_datas[ -2+"_"+_ag];if(_ap){if(_ap.isFakeStart){_am="rowspan=\""+_ap.rowspan+"\" colspan=\""+_ap.colspan+"\" ";}else{_al=true;}}}}if(!_al){_w=this._makeforDsStyle(_j,_l,_k,_n,_m,_q,_aj);_i+=this._modifyFormat(_x,_w,null, -2,false,_am);}}}_i+="";}_i+="";return _i;};_pItem._getForm=function(){return this.parent.parent;};_pItem._eventExport=function(_a,_b,_c,_d){var _e=_a.exporteventtype;var _f=_a._itemsIndex;var _g=_a._exportBar;if(_e!="none"){var _h=_c+1;var _i="";var _j=_h==this._bodyRowCnt;var _k=_a._progress_pos+_h;if(_e=="item"&&_j){this.on_fire_onprogress(_a,_f,this.type,_d==null?_c:_d);if(_g){_i=_a._getProcessStr(_f+1,_k,_a._allRowCount);_g._set_text(_i);_g._set_pos((_f+1)/_a._allCount*100);}}else if(_e=="itemrecord"){this.on_fire_onprogress(_a,_f,this.type,_d==null?_c:_d);if(_g){_i=_a._getProcessStr(_f+1,_h,this._bodyRowCnt);_g._set_text(_i);_g._set_pos(_h/this._bodyRowCnt*100);}}else if(_e=="totalrecord"){this.on_fire_onprogress(_a,_f,this.type,_d==null?_c:_d);if(_g){_i=_a._getProcessStr(_f+1,_k,_a._allRowCount);_g._set_text(_i);_g._set_pos(_k/_a._allRowCount*100);}}if(_k==_a._allRowCount&&_a.exportmessagecomplete!=""){if(_g){_g._set_text(_a.exportmessagecomplete);}}if(_j&&_g){_a._progress_pos=_k;}}};_pItem._updateBarPos=function(_a,_b){if(_b!="none"&&_a._exportuitype){var _c=_a._itemsIndex;var _d=_a._exportBar;_a._progress_pos+=this._startRow-this._preStartRow;var _e="";var _f=this._startRow==this._bodyRowCnt;if(_b=="item"&&_f){_e=_a._getProcessStr(_c+1,_a._progress_pos,_a._allRowCount);_d._set_text(_e);_d._set_pos((_c+1)/_a._allCount*100);}else if(_b=="itemrecord"){_e=_a._getProcessStr(_c+1,this._startRow,this._bodyRowCnt);_d._set_text(_e);_d._set_pos(this._startRow/this._bodyRowCnt*100);}else if(_b=="totalrecord"){_e=_a._getProcessStr(_c+1,_a._progress_pos,_a._allRowCount);_d._set_text(_e);_d._set_pos(_a._progress_pos/_a._allRowCount*100);}if(_a._progress_pos==_a._allRowCount&&_a.exportmessagecomplete!=""){_d._set_text(_a.exportmessagecomplete);}}};_pItem._rollbackSuppressInfo=function(){var _a=this.source._curFormat._bodycells;var _b=this._tmpSuppressInfos&&this._tmpSuppressInfos.length;for(var _c=0;_c<_b;_c++ ){_a[_c]._suppress_infos=this._tmpSuppressInfos.shift();}};_pItem._gridSuppressUpdate=function(_a,_b){var _c=_a._curFormat._bodycells;var _d=_c.length;this._tmpSuppressInfos=[];for(var _e=0;_e<_d;_e++ ){this._tmpSuppressInfos.push(_c[_e]._suppress_infos);}_a._analyzeSuppress(true);for(var _e=0;_e<_b;_e++ ){_a._suppressUpdateRow(_e,0);}};_pItem._gridExportContinue=function(_a){var _b=this.source;var _c=this._ds_command;_c.setColumn(0,"command","export");_c.setColumn(0,"type",_a._exporttype);_c.setColumn(0,"item",_b.id);_c.setColumn(0,"seq",this._seq);_c.setColumn(0,"startrow",this._startRow);_c.setColumn(0,"instanceid",this._instanceId);_c.setColumn(0,"url",_a._fileURL);_c.setColumn(0,"summarytype",_b.summarytype);_c.setColumn(0,"range",this.range);_c.setColumn(0,"exportsize",this.exportsize);_c.setColumn(0,"exporthead",this._exporthead);_c.setColumn(0,"exportimage",this.exportimage);_c.setColumn(0,"exportfilename",_a.exportfilename);_c.setColumn(0,"format","");var _d=this._ds_style;var _e=this._ds_style2;if(!_e){var _e=new Dataset("STYLE2");this._ds_style2=_e;_e.addColumn("type","String",10);_e.addColumn("name","String",32);_e.addColumn("value","String",1024);}else{this._ds_style2.clearData();}delete this._ds_cell;var _f=new Dataset("CELL");this._ds_cell=_f;var _g=_b.getCellCount("body");var _h=this._bodyRowCnt;var _i;var _j;var _k=null;if(_g>0){var _l=0;var _m=0;for(var _n=0;_n<_g;_n++ ){_f.addColumn("Column"+_n,"String",256);}var _o=this._partitionRow+this._startRow;if(_o>=_h){_o=_h;this._eof=true;var _k=this.parent._argsParam;}var _p=_b._curFormat._bodycells;var _q;var _r=0;var _s;for(var _t=this._startRow;_t<_o;_t++ ){_s=0;var _u;var _v=false;for(var _w=0;_w<_g;_w++ ){_v=_v||_b.isSelectedCell(_w,"body",_t, -9);}var _x=this.exportselect=="selectrecord";if(_v||!_x){var _y=_f.addRow();if(_x){this._eventExport(_a,this.type,_t,this._selectcount++ );}else{this._eventExport(_a,this.type,_t);}}else{continue;}var _z=_t%2;var _aa=0;_q=false;var _ab=(this.exportvalue=="selectstyle");for(var _w=0;_w<_g;_w++ ){_q=_b.isSelectedCell(_w,"body",_t, -9);if(_q){var _ac=false;}else{if(_x){_ac=true;}}var _ad;var _ae;var _af;var _ag;var _ah;var _ai=_b._bodyBand;var _aj=_p[_w];var _ak=_aj._suppress_infos;var _al="";var _am="normal";var _an=this._stylecache[_w+"align"];var _ao=this._stylecache[_w+"line"];var _ap,_aq,_ar;if(_q&&_ab){_am="selected";_ap="";_aq="";_ar="";}else{if(_ac){_ap="255,255,255";_aq="255,255,255";var _as=this._d_BLColor;_ao=_as+":"+_as+":"+_as+":"+_as;sFlag=true;}else{_ap=this._stylecache[_w+"background"+_z];_aq=this._stylecache[_w+"color"+_z];}_ar=this._stylecache[_w+"font"];}var _at=false;if(_ap){_ad=_ap;}else{_at=true;_ad=nexacro._nvl(this._getHEXtoRGB(this._getCellStyle(_aj,_t,_z,"background",_am)),"");}if(_an){_ae=_an;}else{_at=true;_ae=nexacro._nvl(this._getFitValue(this._getCellStyle(_aj,_t,_z,"align",_am)),"");}if(_aq){_ag=_aq;}else{_at=true;_ag=nexacro._nvl(this._getHEXtoRGB(this._getCellStyle(_aj,_t,_z,"color",_am)),"");}if(_ar){_af=_ar;}else{_at=true;_af=nexacro._nvl(this._getFitFontValue(this._getCellStyle(_aj,_t,_z,"font",_am)),"");}var _au,_as,_av,_aw,_ax;_au=false;_av=_aw=null;var _ay=0;var _az=0;switch(this._exportmerge){case 0:break;case 1:if(_aj.suppress>0){_at=_au=true;if(_ak[_t].border_proc){_aw="empty";}}_b._checkFakeMerge(_aj,_t);if(_aj._fakemerge_infos){var _ba=_aj._fakemerge_infos[_t+2];if(_ba){_at=_au=true;switch(_ba){case "bottomfake":_aw="empty";break;case "rightbottomfake":_av=_aw="empty";break;case "rightfake":_av="empty";break;}}}break;case 2:if(_aj.suppress>0){_at=_au=true;var _bb=_w+"count";var _bc=this._excel_suppress_info;if(!_bc[_bb]){_bc[_bb]=0;_ae=_ae.split(",")[0]+", "+this._suppress_align_table[_aj.suppressalign];}if(_ak[_t].border_proc){this._excel_suppress_info[_bb]++ ;}else{_ay= ++_bc[_bb];_bc[_bb]=0;}}var _bd=this._merge_datas&&this._merge_datas[_t+"_"+_w];if(_bd&&_bd.isFakeEnd){_at=_au=true;_ay=_bd.rowspan;_az=_bd.colspan;}break;}if(!_au&&_ao){_ah=_ao;}else{if(this._applyL){var _be=this._getCellStyle(_aj,_t,_z,"border",_am);_ax=this._getHEXtoRGB(_be.right_color)+(_be.right_style=="solid"?"":","+_be.right_style);if(!_av){_av=_ax;}if(!_aw){_aw=_ax;}}else{_aw=_av="empty";}_ah="empty:empty:"+_av+":"+_aw;}if(this._applyA){_j=this._find_styleName(_d,"align",_ae,this._a_ct);_i=_j[0];if(this._a_ct!=_j[1]){_j=this._find_styleName(_e,"align",_ae,this._a_ct);}this._a_ct=_j[1];_al+="align:"+_i+",";}if(this._applyB){_j=this._find_styleName(_d,"background",_ad,this._bg_ct);_i=_j[0];if(this._bg_ct!=_j[1]){_j=this._find_styleName(_e,"background",_ad,this._bg_ct);}this._bg_ct=_j[1];_al+="background:"+_i+",";}if(this._applyC){_j=this._find_styleName(_d,"color",_ag,this._c_ct);_i=_j[0];if(this._c_ct!=_j[1]){_j=this._find_styleName(_e,"color",_ag,this._c_ct);}this._c_ct=_j[1];_al+="color:"+_i+",";}if(this._applyF){_j=this._find_styleName(_d,"font",_af,this._f_ct);_i=_j[0];if(this._f_ct!=_j[1]){_j=this._find_styleName(_e,"font",_af,this._f_ct);}this._f_ct=_j[1];_al+="font:"+_i+",";}_j=this._find_styleName(_d,"line",_ah,this._l_ct);_i=_j[0];if(this._l_ct!=_j[1]){_j=this._find_styleName(_e,"line",_ah,this._l_ct);}this._l_ct=_j[1];_al+="line:"+_i+",";var _bf=this._getFixedCellType(_aj,_t);_j=this._find_styleName(_d,"type",_bf,this._t_ct);_i=_j[0];if(this._t_ct!=_j[1]){_j=this._find_styleName(_e,"type",_bf,this._t_ct);}this._t_ct=_j[1];_al+="type:"+_i;var _bg=false;if(_bf.indexOf("date")> -1&&(this._checkExpr(_aj.locale)||this._checkExpr(_aj.mask))){_at=true;if(_aj.mask=="LONGDATE"){_bg=true;}}if(_ay){_j=this._find_styleName(_d,"rowsuppress",_ay,this._sm_ct);_i=_j[0];if(this._sm_ct!=_j[1]){_j=this._find_styleName(_e,"rowsuppress",_ay,this._sm_ct);}this._sm_ct=_j[1];_al+=",rowsuppress:"+_i;}if(_az){_j=this._find_styleName(_d,"colsuppress",_az,this._sm_ct);_i=_j[0];if(this._sm_ct!=_j[1]){_j=this._find_styleName(_e,"colsuppress",_az,this._sm_ct);}this._sm_ct=_j[1];_al+=",colsuppress:"+_i;}_j=this._find_styleName(_d,"style",_al,this._s_ct);_i=_j[0];if(this._s_ct!=_j[1]){_j=this._find_styleName(_e,"style",_al,this._s_ct);}this._s_ct=_j[1];var _bh=this._getCellTextBody(_b,_t,_w);_u=_ac?"":_bh;if(_bg){_aj.mask="SHORTDATE";_u=_aj._getDisplayText_date(_t);_aj.mask="LONGDATE";}var _bi=_b.getCellProperty("body",_w,"displaytype");if(_bi=="image"){var _bj=this.exportimage.toLowerCase();if(_bj=="url"||_bj=="image"){var _bk=this._getCellTextBody(_b,_t,_w);if(_bk){var _bl=nexacro._getURIValue(_bk);_u=nexacro._getImageLocation(_bl,this._getForm()._getFormBaseUrl());}else{_u=_bk;}}else{_u="";}}var _bm=String.fromCharCode(29);if(this._exportmerge==1){if(_aj.suppress>0){if(_ak[_t].text_proc){_u="";}}if(!!_b._checkFakeMerge(_aj,_t)){_u="";var _bd=this._merge_datas&&this._merge_datas[_t+"_"+_w];if(_bd){if(_bd.isFakeStart){if(_ae=="left,top"){_u=_bh;}else{var _bn=_ae.split(",");var _bo=_bd[_bn[1]]+"_"+_bd[_bn[0]];if(this._merge_datas[_bo]){this._merge_datas[_bo].disPlayText=_bh;this._merge_datas[_bo].showText=true;}else{this._merge_datas[_bo]={disPlayText:_bh,showText:true};}}}else if(_bd.showText){_u=_bd.disPlayText;}}}}_f.setColumn(_y,"Column"+(_w+_s),nexacro._nvl(_u,"")+_bm+(_at||(_q&&_ab)?_i:""));if(_aj._subcells.length){var _bp=_aj._subcells;var _bq=_bp.length;var _br=_aj._rowspan-1;var _bs=_aj._colspan-1;var _bt="";var _be=this._getCellStyle(_aj,_t,_z,"border",_am);var _as=this._d_BLColor;if(this._applyL){_ax=this._getHEXtoRGB(_be.right_color)+(_be.right_style=="solid"?"":","+_be.right_style);}else{_ax=_as;}var _bu;var _bv;var _bw;var _bx;for(var _by=0;_by<_bq;_by++ ){var _bz=_bp[_by]._col;var _ca=_bp[_by]._row;if(_bz==_bs){_bw=_ax;}else{_bw="empty";}if(_bz==0){_bu=_as;}else{_bu="empty";}if(_ca==_br){_bx=_ax;}else{_bx="empty";}if(_ca==0){_bv=_as;}else{_bv="empty";}_bt=_bu+":"+_bv+":"+_bw+":"+_bx;var _bf=this._getFixedCellType(_bp[_by],0);_i=this._makeforDsStyle(_d,_ae,_ad,_ag,_af,_bt,_bf);if(_by!=0){_f.addColumn("Column"+(_n+_s),"String",256);_s++ ;}_f.setColumn(_y,"Column"+(_w+_s),_bp[_by]._getDisplayText(_t)+_bm+_i);}}}_r++ ;}this._preStartRow=this._startRow;this._startRow=_o;}_c.setColumn(0,"eof",this._eof);if(this._ds_response){delete this._ds_response;}this._ds_response=new Dataset("RESPONSE");this._transaction(this.id,_a._exporturl,"COMMAND=_ds_command STYLE=_ds_style2 CELL=_ds_cell","_ds_response=RESPONSE",_k,"_exportCallback",true,_a._commdataformat,_a._commcompress);this._updateBarPos(_a,_a.exporteventtype);};_pItem._exportCallback=function(_a,_b,_c){var _d=this.source;var _e=this.parent;var _f=_e._exportBar;if(_b<0){_c=nexacro._decodeXml(_c);this.on_fire_onerror(_e,"ObjectError",_c,_b);nexacro._stopTransaction(this,0);if(_f){_f._hide();_f._set_pos(0);_f._set_text("");}if(_d._hasTree){_d.set_treeinitstatus("collapse,null");nexacro.Grid.prototype._recreate_contents_all=_e._tempSaveMethod;_e._tempSaveMethod=null;_d._treeIndexes=this._temp_treeIndexes;_d._treeStates=this._temp__treeStates;_d.enableevent=this._temp_enableevent;this._temp_enableevent=this._temp_treeIndexes=this._temp__treeStates=null;}}else{var _g=this._ds_response.getColumn(0,"item");this._instanceId=this._ds_response.getColumn(0,"instanceid");var _h=this._ds_response.getColumn(0,"url");if(_h!=null&&_h!=""){_e._fileURL=_h;}var _i=_e._itemsIndex;var _j=_i+1==_e._allCount;var _k=this._startRow==this._bodyRowCnt;this._seq++ ;if(_k){if(_j){if(_f){_f._hide();_f._set_pos(0);_f._set_text("");}this._rollbackSuppressInfo();this._tmpSuppressInfos=null;_e._fileURL="";_e._allRowCount=0;_e._progress_pos=0;_e._itemsIndex=0;var _l;if(_h!=null&&_h!=""){var _m=_h.lastIndexOf("/");if(_m== -1){_m=_h.lastIndexOf("\\");}if(_m!= -1){_l=_h.substring(_m+1);}}this.on_fire_onsuccess(_e,this,_h);nexacro._download(_h,_e._handle,_l);}else{_e._itemsIndex++ ;if(_e._itemsIndex==_e._gCount){}else{_e._grids[_e._itemsIndex]._gridItemExport(_e);}}this._instanceId="";this._startRow=0;this._seq=1;this._eof=false;this._selectcount=0;if(_d._hasTree){_d.set_treeinitstatus("collapse,null");nexacro.Grid.prototype._recreate_contents_all=_e._tempSaveMethod;_e._tempSaveMethod=null;_d._treeIndexes=this._temp_treeIndexes;_d._treeStates=this._temp__treeStates;_d.enableevent=this._temp_enableevent;this._temp_enableevent=this._temp_treeIndexes=this._temp__treeStates=null;}}else{this._gridExportContinue(_e);}}};_pItem._makeMergeDatas=function(_a,_b,_c){var _d=_b;var _e=this._merge_datas={};var _f,_g,_h,_i;var _j,_k,_l,_m,_n,_o;_l=_k=_m=_n=_o=0;var _p,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z;var _aa=_a._getGridRowCount()-1;for(var _ab=0,_ac=_a._fake_mergecell_arr.length;_ab<_ac;_ab++ ){_j=_a._fake_mergecell_arr[_ab];if(_j.start_subrow!=null){_n=_j.start_subrow;}if(_j.end_subrow!=null){_m=_j.end_subrow;}if(_j.end_row>_aa){_l=_k=_aa;_m=_d-1;}else{_l=_k=_j.end_row;_m=_j.end_subrow;}if(_j.start_row== -1){_d=_a._curFormat._headrows?_a._curFormat._headrows.length:0;_k=_z=0;}else if(_j.start_row== -2){_d=_a._curFormat._summrows?_a._curFormat._summrows.length:0;_k=_z=0;}else{_z=_j.start_row;}_p=(_d*_k+_j.end_subrow)-(_d*_z+_n)+1;_q=_j.end_column-_j.start_column+1;var _o=((_d*_z+_n+1)+(_d*_k+_j.end_subrow+1))/2<<0;_r=_j.start_row;_s=(_o-1)/_d<<0;_t=_l;_x=_c*_n+_j.start_column;_y=_c*_j.end_subrow+_j.end_column;_u=((_o-1)%_d*_c+_j.start_column)<<0;_v=((_o-1)%_d*_c+(_j.start_column+_j.end_column)/2)<<0;_w=((_o-1)%_d*_c+_j.end_column)<<0;if(_j.start_row<0){_s=_j.start_row;}_e[_r+"_"+_x]={isFakeStart:true,left:_u,center:_v,right:_w,top:_r,middle:_s,bottom:_t,rowspan:_p,colspan:_q};_e[_t+"_"+_y]={isFakeEnd:true,rowspan:_p,colspan:_q};}};_pItem._gridItemExport=function(_a){var _b=_a._exportuitype;if(_a.exporteventtype!="none"&&_b){var _q=_a._exportBar;if(!_q||_q._uitype!=_b){_q=_a._exportBar=_a._getExportBar(_b);_q.progressbar.style.set_bartype("normal");_q.progressbar.style.set_barcolor("darkorange");var _r=_a._getProcessStr(_a.count(),_a._allRowCount,_a._allRowCount);_r=nexacro._getLongerStr(_r,_a.exportmessagecomplete,_a.exportmessageready);var _s=nexacro._getTextSize(_r,_q.currentstyle.font);_q._textWidth=_s[0];_q._textHeight=_s[1];}if(_a._itemsIndex==0&&_a.exportmessageready!=""){_q._set_text(_a.exportmessageready);}_q._show();}var _c=this.source;var _d=_c._curFormat._cols?_c._curFormat._cols.length:0;var _e=_c._curFormat._bodyrows?_c._curFormat._bodyrows.length:0;if(_c._hasTree){_a._tempSaveMethod=nexacro.Grid.prototype._recreate_contents_all;nexacro.Grid.prototype._recreate_contents_all=nexacro._emptyFn;this._temp_enableevent=_c.enableevent;_c.enableevent=false;this._temp_treeIndexes=_c._treeIndexes.slice(0);this._temp__treeStates=_c._treeStates.slice(0);_c.set_treeinitstatus("expand,all");}if(_c._is_use_fakemerge){this._makeMergeDatas(_c,_e,_d);}var _f=new Dataset("STYLE");this._ds_style=_f;_f.addColumn("type","String",10);_f.addColumn("name","String",32);_f.addColumn("value","String",1024);var _g=new Dataset("COMMAND");this._ds_command=_g;_g.addColumn("command","String",32);_g.addColumn("type","int",32);_g.addColumn("item","String",256);_g.addColumn("seq","int");_g.addColumn("startrow","int",32);_g.addColumn("eof","boolean",32);_g.addColumn("instanceid","String",256);_g.addColumn("url","String",256);_g.addColumn("summarytype","String",256);_g.addColumn("range","String",32);_g.addColumn("exportsize","String",32);_g.addColumn("exporthead","String",32);_g.addColumn("exportimage","String",32);_g.addColumn("exportfilename","String",32);_g.addColumn("format","String",1024*1024);_g.addRow();_g.setColumn(0,"command","export");_g.setColumn(0,"type",_a._exporttype);_g.setColumn(0,"item",_c.id);_g.setColumn(0,"seq",this._seq);_g.setColumn(0,"startrow",this._startRow);_g.setColumn(0,"instanceid",this._instanceId);_g.setColumn(0,"url",_a._fileURL);_g.setColumn(0,"summarytype",_c.summarytype);_g.setColumn(0,"range",this.range);var _h=this.exportselect=="selectrecord";var _i=_c.selecttype!=("area"||"multiarea"||"treecell")?true:false;if(_i){if(_h){if(this._exporthead==""){this._exporthead="nohead, nosumm";this._applyHead=false;this._applySumm=false;}this._exportmerge=false;}}else{this._exporthead="nohead, nosumm";this._applyHead=false;this._applySumm=false;}_g.setColumn(0,"exportsize",this.exportsize);_g.setColumn(0,"exporthead",this._exporthead);_g.setColumn(0,"exportimage",this.exportimage);_g.setColumn(0,"exportfilename",_a.exportfilename);var _j=nexacro._replaceAll(this._makeFormat(_c)," ","");_g.setColumn(0,"format",_j);var _k=new Dataset("CELL");this._ds_cell=_k;var _l=_c.getCellCount("body");var _m=this._bodyRowCnt=_c._getGridRowCount();var _n;var _o;if(this._exportmerge&&_c._is_use_suppress&&_m>_c._bodyBand._get_rows().length){this._gridSuppressUpdate(_c,_m);}var _p=null;if(_l>0){var _t=0;var _u="";var _v=_m/5;for(var _w=0;_w<_l;_w++ ){_k.addColumn("Column"+_w,"String",256);_u+=this._getCellTextBody(_c,0,_w);_u+=this._getCellTextBody(_c,_v*2,_w);_u+=this._getCellTextBody(_c,_v*3,_w);_u+=this._getCellTextBody(_c,_v*4,_w);_u+=this._getCellTextBody(_c,_m-1,_w);}_u=_u.length+1;var _x=this._partitionRow=parseInt(23000/_u);if(_x>=_m){_x=_m;this._eof=true;var _p=this.parent._argsParam;}else{_x=parseInt(_x/2);}var _y=_c._curFormat._bodycells;var _z=(this.exportvalue=="selectstyle");var _aa;var _ab;for(var _ac=0;_ac<_x;_ac++ ){_ab=0;var _ad;var _ae=false;for(var _af=0;_af<_l;_af++ ){_ae=_ae||_c.isSelectedCell(_af,"body",_ac, -9);}if(_ae||!_h){var _ag=_k.addRow();if(_h){this._eventExport(_a,this.type,_ac,this._selectcount++ );}else{this._eventExport(_a,this.type,_ac);}}else{continue;}var _ah=_ac%2;_aa=false;for(var _af=0;_af<_l;_af++ ){_aa=_c.isSelectedCell(_af,"body",_ac, -9);if(_aa){var _ai=false;}else{if(_h){_ai=true;}}var _aj,_ak,_al,_am,_an;var _ao=_c._bodyBand;var _ap=_y[_af];var _aq=_ap._suppress_infos;var _n="";var _ar="normal";var _as=false;var _at=this._stylecache[_af+"align"];var _au=this._stylecache[_af+"line"];var _av,_aw,_ax;if(_aa&&_z){_ar="selected";_av="";_aw="";_ax="";}else{if(_ai){_av="255,255,255";_aw="255,255,255";var _ay=this._d_BLColor;_au=_ay+":"+_ay+":"+_ay+":"+_ay;_as=true;}else{_av=this._stylecache[_af+"background"+_ah];_aw=this._stylecache[_af+"color"+_ah];}_ax=this._stylecache[_af+"font"];}if(_av){_aj=_av;}else{_as=true;_aj=nexacro._nvl(this._getHEXtoRGB(this._getCellStyle(_ap,_ac,_ah,"background",_ar)),"");}if(_at){_ak=_at;}else{_as=true;_ak=nexacro._nvl(this._getFitValue(this._getCellStyle(_ap,_ac,_ah,"align",_ar)),"");}if(_aw){_am=_aw;}else{_as=true;_am=nexacro._nvl(this._getHEXtoRGB(this._getCellStyle(_ap,_ac,_ah,"color",_ar)),"");}if(_ax){_al=_ax;}else{_as=true;_al=nexacro._nvl(this._getFitFontValue(this._getCellStyle(_ap,_ac,_ah,"font",_ar)),"");}var _az,_ay,_ba,_bb,_bc;_az=false;_ba=_bb=null;var _bd=0;var _be=0;switch(this._exportmerge){case 0:break;case 1:if(_ap.suppress>0){_as=_az=true;if(_aq[_ac].border_proc){_bb="empty";}}_c._checkFakeMerge(_ap,_ac);if(_ap._fakemerge_infos){var _bf=_ap._fakemerge_infos[_ac+2];if(_bf){_as=_az=true;switch(_bf){case "bottomfake":_bb="empty";break;case "rightbottomfake":_ba=_bb="empty";break;case "rightfake":_ba="empty";break;}}}break;case 2:if(_ap.suppress>0){_as=_az=true;var _bg=_af+"count";var _bh=this._excel_suppress_info;if(!_bh[_bg]){_bh[_bg]=0;_ak=_ak.split(",")[0]+", "+this._suppress_align_table[_ap.suppressalign];}if(_aq[_ac].border_proc){this._excel_suppress_info[_bg]++ ;}else{_bd= ++_bh[_bg];_bh[_bg]=0;}}var _bi=this._merge_datas&&this._merge_datas[_ac+"_"+_af];if(_bi&&_bi.isFakeEnd){_as=_az=true;_bd=_bi.rowspan;_be=_bi.colspan;}break;}if(!_az&&_au){_an=_au;}else{if(this._applyL){var _bj=this._getCellStyle(_ap,_ac,_ah,"border",_ar);_bc=this._getHEXtoRGB(_bj.right_color)+(_bj.right_style=="solid"?"":","+_bj.right_style);if(!_ba){_ba=_bc;}if(!_bb){_bb=_bc;}}else{_bb=_ba="empty";}_an="empty:empty:"+_ba+":"+_bb;}var _bk=this._getFixedCellType(_ap,_ac);_n=this._makeforDsStyle(_f,_ak,_aj,_am,_al,_an,_bk,_bd,_be);var _bl=false;if(_bk.indexOf("date")> -1&&(this._checkExpr(_ap.locale)||this._checkExpr(_ap.mask))){_as=true;if(_ap.mask=="LONGDATE"){_bl=true;}}var _bm=this._getCellTextBody(_c,_ac,_af);_ad=_ai?"":_bm;if(_bl){_ap.mask="SHORTDATE";_ad=_ap._getDisplayText_date(_ac);_ap.mask="LONGDATE";}var _bn=_c.getCellProperty("body",_af,"displaytype");if(_bn=="image"){var _bo=this.exportimage.toLowerCase();if(_bo=="url"||_bo=="image"){var _bp=this._getCellTextBody(_c,_ac,_af);if(_bp){var _bq=nexacro._getURIValue(_bp);_ad=nexacro._getImageLocation(_bq,this._getForm()._getFormBaseUrl());}else{_ad=_bp;}}else{_ad="";}}var _br=String.fromCharCode(29);if(this._exportmerge==1){if(_ap.suppress>0){if(_aq[_ac].text_proc){_ad="";}}if(!!_c._checkFakeMerge(_ap,_ac)){_ad="";var _bi=this._merge_datas&&this._merge_datas[_ac+"_"+_af];if(_bi){if(_bi.isFakeStart){if(_ak=="left,top"){_ad=_bm;}else{var _bs=_ak.split(",");var _bt=_bi[_bs[1]]+"_"+_bi[_bs[0]];if(this._merge_datas[_bt]){this._merge_datas[_bt].disPlayText=_bm;this._merge_datas[_bt].showText=true;}else{this._merge_datas[_bt]={disPlayText:_bm,showText:true};}}}else if(_bi.showText){_ad=_bi.disPlayText;}}}}_k.setColumn(_ag,"Column"+(_af+_ab),nexacro._nvl(_ad,"")+_br+(_as||(_aa&&_z)?_n:""));if(_ap._subcells.length){var _bu=_ap._subcells;var _bv=_bu.length;var _bw=_ap._rowspan-1;var _bx=_ap._colspan-1;var _by="";var _bj=this._getCellStyle(_ap,_ac,_ah,"border",_ar);var _ay=this._d_BLColor;if(this._applyL){_bc=this._getHEXtoRGB(_bj.right_color)+(_bj.right_style=="solid"?"":","+_bj.right_style);}else{_bc=_ay;}var _bz;var _ca;var _cb;var _cc;for(var _cd=0;_cd<_bv;_cd++ ){var _ce=_bu[_cd]._col;var _cf=_bu[_cd]._row;if(_ce==_bx){_cb=_bc;}else{_cb="empty";}if(_ce==0){_bz=_ay;}else{_bz="empty";}if(_cf==_bw){_cc=_bc;}else{_cc="empty";}if(_cf==0){_ca=_ay;}else{_ca="empty";}_by=_bz+":"+_ca+":"+_cb+":"+_cc;var _bk=this._getFixedCellType(_bu[_cd],0);_n=this._makeforDsStyle(_f,_ak,_aj,_am,_al,_by,_bk);if(_cd!=0){_k.addColumn("Column"+(_w+_ab),"String",256);_ab++ ;}_k.setColumn(_ag,"Column"+(_af+_ab),_bu[_cd]._getDisplayText(_ac)+_br+_n);}}}}this._preStartRow=this._startRow;this._startRow=_x;}else{this._eof=true;_p=this.parent._argsParam;}_g.setColumn(0,"eof",this._eof);if(this._ds_response){delete this._ds_response;}this._ds_response=new Dataset("RESPONSE");this._transaction(this.id,_a._exporturl,"COMMAND=_ds_command STYLE=_ds_style CELL=_ds_cell","_ds_response=RESPONSE",_p,"_exportCallback",true,_a._commdataformat,_a._commcompress);return true;};_pItem._transaction=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){this._load_manager=new nexacro.LoadManager(this);var _j=application._getServiceObject(_b,true);this._load_manager.loadDataModule(_b,_a,_c,_d,_e,_f,_g,_h,_i,_j);};_pItem._stopTransaction=function(){nexacro.Form.prototype._stopTransaction.apply(this,arguments);};_pItem._getDatasetObject=function(_a){var _b=this[_a];var _c=this.parent.parent;if(_b==null&&_c){_b=_c._getDatasetObject(_a);}if(_b==null){_b=application[_a];}return _b;};_pItem._waitCursor=nexacro._emptyFn;_pItem._removeUrl=function(_a){if(_a&&_a.length){var _b=_a.indexOf("'");var _c= -1;if(_b> -1){_c=_a.lastIndexOf("'");_a=_a.substring(_b+1,_c);}_b=_a.indexOf("(");if(_b> -1){_c=_a.lastIndexOf(")");_a=_a.substring(_b+1,_c);}}return _a;};delete _pItem;nexacro.ExportProgress=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.PopupComponent.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._uitype=0;this.visible=false;this.progressbar=null;this._textWidth=0;this._textHeight=0;};var _pExportProgress=nexacro.ExportProgress.prototype=nexacro._createPrototype(nexacro.PopupComponent,nexacro.ExportProgress);_pExportProgress._type_name="ExportProgress";_pExportProgress.on_apply_custom_pseudo=function(_a){var _b=this.currentstyle;var _c=this.on_find_CurrentStyle_font(_a);if(_b.font!=_c){_b.font=_c;this.on_apply_style_font(_c);}var _d=this.on_find_CurrentStyle_color(_a);if(_b.color!=_d){_b.color=_d;this.on_apply_style_color(_d);}var _e=this.on_find_CurrentStyle_align(_a);if(_e!=_b.align){_b.align=_e;this.on_apply_style_align(_e);}};_pExportProgress.on_apply_style_color=function(_a){if(this._text_elem){if(_a){this._text_elem.setElementColor(_a);}else{this._text_elem.setElementColor("");}}};_pExportProgress.on_apply_style_font=function(_a){if(this._text_elem){this._text_elem.setElementFont(_a);}};_pExportProgress.on_apply_style_align=function(_a){if(this._text_elem&&_a){var _b=_a.halign==""?"center":_a._halign;var _c=_a.valign==""?"middle":_a._valign;this._text_elem.setElementAlignXY(_b,_c);}};_pExportProgress.on_create_contents=function(){var _a=this.getElement();if(_a){switch(this._uitype){case 1:var _b=this._text_elem=new nexacro.TextBoxElement(_a);this.progressbar=new nexacro.ProgressBarCtrl("progressbar","absolute",0,0,1,1,null,null,this);this.progressbar.createComponent();_b.setElementColor(this.currentstyle.color);_b.setElementFont(this.currentstyle.font);var _c=this.currentstyle.align.halign==""?"center":this.currentstyle.align._halign;var _d=this.currentstyle.align.valign==""?"middle":this.currentstyle.align._valign;_b.setElementAlignXY(_c,_d);break;case 2:this.progressbar=application.mainframe.statusbar;break;}}};_pExportProgress.on_created_contents=function(){switch(this._uitype){case 1:var _a=this._text_elem;if(_a){_a.create();}if(this.progressbar){this.progressbar.on_created();}break;case 2:break;}};_pExportProgress.on_change_containerRect=function(_a,_b){switch(this._uitype){case 1:this._text_elem.setElementPosition(0,0);this._text_elem.setElementSize(this._textWidth,this._textHeight);this.progressbar.move(null,null,_a,20,0,0);case 2:break;}};_pExportProgress.on_destroy_contents=function(){switch(this._uitype){case 1:var _a=this._text_elem;if(_a){_a.destroy();this._text_elem=null;}this.progressbar.destroy();this.progressbar=null;case 2:this._text_elem=null;this.progressbar=null;break;}};_pExportProgress.set_visible=function(_a){if(this.visible!=_a){this.visible=_a;var _b=this._control_element;_b.setElementVisible(_a);if(this.visible){var _c=this._getResultPseudo(this._status,this._pseudo);this._updateControl(_b,_c);this._updateContents(_b,_c);}if(this.visible){nexacro._resetVML(this);}}};_pExportProgress._getWindow=function(){return nexacro.Component.prototype._getWindow.call(this);};_pExportProgress.on_fire_onlbuttondown=function(_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l){return true;};_pExportProgress._on_keydown=function(_a,_b,_c,_d,_e){if(_b==nexacro.Event.KEY_TAB){_a._event_stop=true;}else if(_b==nexacro.Event.KEY_ESC){nexacro._stopTransaction(this,2);}return true;};_pExportProgress._show=function(){if(!this._is_created||!this.parent){return;}var _a=this._getWindow();if(_a){var _b,_c,_d,_e;_b=_a.getLeft();_c=_a.getTop();if(_a.frame){var _f=_a.frame;_d=_f.getOffsetWidth();_e=_f.getOffsetHeight();}else{_d=_a.getClientWidth();_e=_a.getClientHeight();}var _g=_a._getCaptureComp(true,true,this);if(_g!=this){_a._setCaptureLock(this,true,true);}var _h=this.currentstyle.padding;var _i=0;var _j=0;var _k=0;var _l=0;if(this._uitype==1){_i=(this._textWidth<100?100:this._textWidth)+_h.left+_h.right;_j=this._textHeight+_h.top+_h.bottom+22;_k=Math.round((_d-_i)/2);_l=Math.round((_e-_j)/2);}this._adjustPosition(_k,_l,null,null,_i,_j);this.on_update_position(true,true);var _m=this._control_element;if(_m){_m.setElementPosition(_k,_l);_m.setElementSize(_i,_j);this._updateClientSize(_m);}this.set_visible(true);}};_pExportProgress._hide=function(){var _a=this.parent._getWindow();if(_a){_a._releaseCaptureLock(this);if(nexacro._resize_popup_inbound==true){var _b=this._control_element;if(_b){_b.setElementSize(1,1);this._updateClientSize(_b);}}}if(this._is_created&&this._is_alive){this.set_visible(false);}};nexacro._getLongerStr=function(_a,_b,_c){var _d=arguments.length;if(_d<2){return;}var _e=arguments[0];for(var _f=1;_f<_d;_f++ ){if(_e.length