/*! * * SpreadJS Library 13.1.0 * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@grapecity.com * http://www.grapecity.com/en/licensing/grapecity/ * * */ var GC="object"==typeof GC?GC:{};GC.Spread=GC.Spread||{},GC.Spread.Sheets=GC.Spread.Sheets||{},GC.Spread.Sheets.CellState=function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})},c.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.t=function(a,b){var d,e;if(1&b&&(a=c(a)),8&b)return a;if(4&b&&"object"==typeof a&&a&&a.__esModule)return a;if(d=Object.create(null),c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&b&&"string"!=typeof a)for(e in a)c.d(d,e,function(b){return a[b]}.bind(null,e));return d},c.n=function(a){var b=a&&a.__esModule?function b(){return a.default}:function b(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="/assets/",c(c.s="./dist/plugins/cellState/cellstate.entry.js")}({"./dist/plugins/cellState/cellStateManager.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o=this&&this.__assign||function(){return o=Object.assign||function(a){var b,c,d,e;for(c=1,d=arguments.length;c-1&&(c=e[f],d.GJb(f,c.range,c.style,e),e.splice(f,1))},a.prototype.Sb=function(a,b,c){var d=this,e=d.tCb(c),f=d.FJb(e,a),g={range:a,style:b};d.vCb({index:f,cache:e,range:a,style:b}),f===-1?e.push(g):e[f]=g},a.prototype.zR=function(a){var b=this.tCb(a),c=this.io;return b.map(function(a){var b=a.range,d=a.style;return{range:q(b),style:d.clone(),state:c}})},a.prototype.Gq=function(a,b,c){var d,e,f,g=this.tCb(c),h=[];for(e=g.length,f=0;f0?h:null},a.prototype.HJb=function(a,b,c){var d,e,f,g=this,h=g.tCb(c);if(h&&h.length>0)for(d=0,e=h;d0))return n.IJb(b,c,g);if(m.io===e.CellStatesType.selected&&(f(d)||(d&m.io)>0)){for(i=m.kj.getSelections(),j=0,k=i;j0))&&!n.isValid(b,c,n.getValue(b,c,g)):m.io===e.CellStatesType.readonly?h&&m.kj.options.isProtected:(m.io&a)>0},a.prototype.xCb=function(a,b){var c=this,d=this.tCb(b);this.yCb({cache:d,sheetArea:b,collection:c}),this.uCb(r(this.kj,d,a),b)},a.prototype.toJSON=function(){var a,b,c=this,d={};for(b=0;b<=3;b++)a=c.tCb(b),a&&a.length>0&&(d[b]=s(a));return d},a.prototype.fromJSON=function(a,b,c){var d,e,f,g=this;for(g.xn=[],e=1;e<=3;e++)g.sCb(e);for(f in a)a.hasOwnProperty(f)&&(d=g.tCb(f),t(d,a[f],b,c))},a.prototype.zCb=function(a){var b=p(a,[]),c=this,d=c.kj.ITa;d.ACb(o({type:"rangeChange"},b))},a.prototype.vCb=function(a){var b=a.index,c=a.cache,d=a.range,e=a.style,f=this,g=f.kj.ITa;b!==-1&&(e=c[b].style),g.ACb({type:"add",index:b,cache:c,range:d,style:e})},a.prototype.GJb=function(a,b,c,d){var e=this,f=e.kj.ITa;f.ACb({type:"remove",index:a,range:b,style:c,cache:d})},a.prototype.yCb=function(a){var b=p(a,[]),c=this,d=c.kj.ITa;d.ACb(o({type:"clear"},b))},a.prototype.rI=function(a,b){var c,d,e=this;for(d=0;d<=3;d++)c=e.tCb(d),c&&c.length>0&&c.forEach(function(c){var d=c.range,f=d.row,g=d.rowCount;a<=f?(d.row=f+b,e.zCb({range:d,row:f})):f0&&c.forEach(function(c){var d,f=c.range,g=f.row,h=f.rowCount;a0&&c.forEach(function(c){var d=c.range,f=d.col,g=d.colCount;a<=f?(d.col=f+b,e.zCb({range:d,col:f})):f0&&c.forEach(function(c){var d,f=c.range,g=f.col,h=f.colCount;a0))for(g=0,h=f;g0&&(k=k.concat(l)));if(k.length>0){for(r=k.length,s=r-1;s>=0;s--)i.Yo(k[s].style);return i}}return null},a.prototype.destory=function(){for(var a in this.CCb)this.CCb.hasOwnProperty(a)&&this.CCb[a].BCb();delete this.CCb,delete this.kj},a.prototype.toJSON=function(){var a,b,c={};for(b in this.CCb)this.CCb.hasOwnProperty(b)&&(a=this.CCb[b],c[b]=a.toJSON());return c},a.prototype.fromJSON=function(a,b,c){var d,e,f,g=this;for(e in a)a.hasOwnProperty(e)&&(f=parseInt(e,10),d=g.getCollection(f,!0),d.fromJSON(a[f],b,c))},a.prototype.rI=function(a,b){for(var c in this.CCb)this.CCb.hasOwnProperty(c)&&this.CCb[c].rI(a,b)},a.prototype.GR=function(a,b){for(var c in this.CCb)this.CCb.hasOwnProperty(c)&&this.CCb[c].GR(a,b)},a.prototype.tI=function(a,b){for(var c in this.CCb)this.CCb.hasOwnProperty(c)&&this.CCb[c].tI(a,b)},a.prototype.HR=function(a,b){for(var c in this.CCb)this.CCb.hasOwnProperty(c)&&this.CCb[c].HR(a,b)},a}(),b.CellStateManager=l;function r(a,b,c){var d=[],e=a.getRowCount(3),f=a.getColumnCount(3);return b.forEach(function(b){d=d.concat(u(a,b.style,b.range,c,e,f))}),d}function s(a){var b,c,d,e,f,g,h,i,j,k,l=[];for(c=0,d=a.length;c0&&this.cellStates.JJb(a,b,c,d,e,f)},IJb:function(a,b,c){var d=this,e=d.ITa.hUa(c);return e&&e[a]&&e[a][b]}},g(e.Worksheet.prototype,n),e.Worksheet.$n(i,m),g(e.lUa.prototype,{ACb:function(a){var b,c=this,d=c.zTa;d&&(b=void 0,b=d.ECb?d.ECb:[],b.push(a),d.ECb=b)},FCb:function(a){var b=this;a&&a.length>0&&a.forEach(function(a){var c=a.type,d=p(a,["type"]);switch(c){case"rangeChange":b.GCb(o({},d));break;case"add":b.HCb(o({},d));break;case"clear":b.ICb(o({},d));break;case"remove":b.KJb(o({},d))}})},ICb:function(a){var b=a.cache,c=a.sheetArea,d=a.collection;d.uCb(b,c)},KJb:function(a){var b=a.cache,c=a.range,d=a.style,e=a.index;b.splice(e,0,{range:c,style:d})},HCb:function(a){var b,c=a.cache,d=a.range,e=a.style,f=a.index;f===-1?(c.forEach(function(a,c){var f=a.range,g=a.style;f===d&&g===e&&(b=c)}),c.splice(b,1)):c[f].style=e},GCb:function(a){var b=a.range,c=a.row,d=a.col,e=a.rowCount,f=a.colCount;c!==h&&(b.row=c),d!==h&&(b.col=d),e!==h&&(b.rowCount=e),f!==h&&(b.colCount=f)}}),e.lUa.$n(i,{undo:function(a){var b=a.ECb;b&&this.FCb(b)}})},"./dist/plugins/cellState/cellstate.entry.js":function(a,b,c){"use strict";function d(a){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c])}Object.defineProperty(b,"__esModule",{value:!0}),d(c("./dist/plugins/cellState/cellStateManager.js"))},Common:function(a,b){a.exports=GC.Spread},Core:function(a,b){a.exports=GC.Spread.Sheets}});