/*! Copyright 2010-2020 SpryMedia Ltd. This source file is free software, available under the following license: MIT license - http://datatables.net/license/mit This source file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. For details please refer to: http://www.datatables.net FixedColumns 3.3.1 漏2010-2020 SpryMedia Ltd - datatables.net/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,e,g){c instanceof String&&(c=String(c));for(var q=c.length,k=0;k=this.s.iRightColumns&&(d=c(this.dom.clone.right.body).find("[data-dt-row="+a+"][data-dt-column="+b+"]"));return d&&d.length?d[0]:(new c.fn.dataTable.Api(this.s.dt)).cell(a,b).node()},_fnConstruct:function(a){var b=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+p.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else if(""===this.s.dt.oScroll.sX)this.s.dt.oInstance.oApi._fnLog(this.s.dt, 1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else{this.s=c.extend(!0,this.s,p.defaults,a);a=this.s.dt.oClasses;this.dom.grid.dt=c(this.s.dt.nTable).parents("div."+a.sScrollWrapper)[0];this.dom.scroller=c("div."+a.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var d,h=!1;c(this.s.dt.nTableWrapper).on("mousedown.DTFC",function(a){0===a.button&&(h=!0,c(g).one("mouseup", function(){h=!1}))});c(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",function(){h||(d="main")}).on("scroll.DTFC",function(a){!d&&a.originalEvent&&(d="main");if("main"===d||"key"===d)0')[0], d=b.childNodes[0],h=b.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(b,this.dom.grid.dt);b.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=b;0b.clientWidth&&(c.x=!0);a.offsetHeight>b.clientHeight&&(c.y=!0);return c},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);c(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=this.s.iRightColumns)){var b,c=[];for(b=this.s.iTableColumns-this.s.iRightColumns;b=this.s.iLeftColumns)){var b,c=[];for(b=0;bthead",a.header);k.empty();var n=0;for(m=g.length;nthead",a.header)[0]);n=0;for(m=g.length;ntbody>tr",f.dom.body).css("height","auto"); null!==a.body&&(c(a.body).remove(),a.body=null);a.body=c(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=e.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*e.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");c(">thead>tr",a.body).empty();c(">tfoot",a.body).remove();var u=c("tbody",a.body)[0];c(u).empty();if(0thead>tr",a.body)[0];for(l=0;ltbody>tr",f.dom.body).each(function(a){a=!1===f.s.dt.oFeatures.bServerSide?f.s.dt.aiDisplay[f.s.dt._iDisplayStart+a]:a;var b=f.s.dt.aoData[a].anCells||c(this).children("td, th"),e=this.cloneNode(!1);e.removeAttribute("id");e.setAttribute("data-dt-row",a);for(l=0;ltbody>tr",f.dom.body).each(function(a){r=this.cloneNode(!0);r.className+=" DTFC_NoData";c("td",r).html("");u.appendChild(r)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";e.oScroller!==q&&(m=e.oScroller.dom.force,b.forcer?b.forcer.style.height=m.style.height:(b.forcer=m.cloneNode(!0),b.liner.appendChild(b.forcer)));b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody", f.dom.body,a.body);if(null!==e.nTFoot){if(h){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=c(this.dom.footer).clone(!0,!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);g=this._fnCopyLayout(e.aoFooter,d,!0);b=c(">tfoot",a.footer);b.empty();n=0;for(m=g.length;ntfoot",a.footer)[0]),n=0,m=g.length;n< m;n++)for(t=0,k=g[n].length;tthead",a.header)[0]);c(b).each(function(a){v=d[a];this.style.width=f.s.aiInnerWidths[v]+"px"});null!==f.s.dt.nTFoot&&(b=e.oApi._fnGetUniqueThs(e,c(">tfoot",a.footer)[0]),c(b).each(function(a){v=d[a];this.style.width=f.s.aiInnerWidths[v]+"px"}))},_fnGetTrNodes:function(a){for(var b=[],c=0,e=a.childNodes.length;c"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();e=this._fnGetTrNodes(e);b=this._fnGetTrNodes(d);var f=[];d=0;for(a=b.length;dg?k:g;"semiauto"==this.s.sHeightMatch&&(e[d]._DTTC_iHeight=g);f.push(g)}d=0;for(a=b.length;d").css({position:"absolute",top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");u=a[0].clientWidth===a[0].offsetWidth&&0!==this._fnDTOverflow().bar;a.remove()}return u}});p.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};p.version="3.3.1";k.Api.register("fixedColumns()",function(){return this});k.Api.register("fixedColumns().update()",function(){return this.iterator("table", function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});k.Api.register("fixedColumns().relayout()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});k.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&a._oFixedColumns.fnRecalculateHeight(this.row(b).node())})});k.Api.register("fixedColumns().rowIndex()",function(a){a=c(a);return a.parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[a.index()]: this.row(a).index()});k.Api.register("fixedColumns().cellIndex()",function(a){a=c(a);if(a.parents(".DTFC_Cloned").length){var b=a.parent().index();b=this.rows({page:"current"}).indexes()[b];a=a.parents(".DTFC_LeftWrapper").length?a.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+a.index();return{row:b,column:this.column.index("toData",a),columnVisible:a}}return this.cell(a).index()});k.Api.registerPlural("cells().fixedNodes()","cell().fixedNode()",function(){return this.iterator("cell", function(a,b,c){return a._oFixedColumns?a._oFixedColumns.fnToFixedNode(b,c):this.cell(b,c).node()},1)});c(g).on("init.dt.fixedColumns",function(a,b){if("dt"===a.namespace){a=b.oInit.fixedColumns;var d=k.defaults.fixedColumns;if(a||d)d=c.extend({},a,d),!1!==a&&new p(b,d)}});c.fn.dataTable.FixedColumns=p;return c.fn.DataTable.FixedColumns=p});