@grapecity-software/spread-sheets-fill 18.0.3 → 18.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * SpreadJS Library 18.0.3
3
+ * SpreadJS Library 18.0.5
4
4
  *
5
5
  * Copyright(c) GrapeCity Software inc. All rights reserved.
6
6
  *
@@ -9,4 +9,4 @@
9
9
  * https://www.grapecity.com.cn/developer/spreadjs
10
10
  *
11
11
  */
12
- !function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-calc-engine","@grapecity-software/spread-sheets-core","@grapecity-software/spread-sheets-calc-engine"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),exports.Spread=t(n)):t(GC)}(function(n){!function(){"use strict";var i,r,t;function e(t){var n,n,n=r[t];return void 0!==n||(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e)),n.exports}i={"./dist/plugins/fill/drag-fill.js":function(F,t,n){var i,c,k,h,t,r,e,I,s,O,A,S,v,n,x,E,r,l,b,u,V,H,N,P,d,o,a,f,g,t,p,w,m,j,R,T,M,y,L,B,W;function $(t,n,i,r,e,o,u,s,a,l,f){var c=n?k.Events.DragDropBlock:k.Events.DragDropBlockCompleted,i={sheet:t,sheetName:t.name(),fromRow:i,fromCol:r,toRow:e,toCol:o,rowCount:u,colCount:s,copy:a,insert:l,copyOption:f};return n&&(i.cancel=!1),t.ki(c,i),i}function z(t,n,i,r){return t&&n&&n.containsRange(t)&&(!O(i)&&(1===i&&t.row===n.row&&(0,I.getRowCount)(t)===(0,I.getRowCount)(n)||0===i&&t.col===n.col&&(0,I.getColCount)(t)===(0,I.getColCount)(n))||!(O(r)||(2!==r&&3!==r||t.col!==n.col||(0,I.getColCount)(t)!==(0,I.getColCount)(n))&&(0!==r&&1!==r||t.row!==n.row||(0,I.getRowCount)(t)!==(0,I.getRowCount)(n))))}function _(t,n){var i,r,e,o,u,s,a,l,f,c,a,i=L.call(this)||this,r=i,e=n[P],o=0===e,u=o||1===e,s=n[H],a=n[V],l=a.row,f=a.col,c=(0,I.getRowCount)(a),a=(0,I.getColCount)(a);return r.Mf=t,4===(r.Ftt=n)[N]?r.Ptt=new k.Commands.JI(t,{ranges:[n[H]]}):r.Gtt=u?v(l,o?s.col:f,c,a+(0,I.getColCount)(s)):v(2===e?s.row:l,f,c+(0,I.getRowCount)(s),a),r.Utt=u?1:0,i}function C(t,n){var i,r,i=B.call(this)||this,r=i;return r.Mf=t,r.Htt=n,r.ztt=n[V],r.Vtt=n[H],r.Ytt=n[N],r.Ztt=n[P],i}function q(t,n,i,r,e,o){var u,r,e,n,u=t.getSelections();t.IA(),t.n4(n,i,r,e,!0),r=t.getSelections(),e=0<n?n:t.N9(),n=0<i?i:t.k9(),t.O6(e,n,t.R9,t.B9),t.jA(u),t.parent&&o._oldPosition&&t.parent.changeSelectionInCommandExecuting(o,null,null,r)}function U(t){var n;t.parent.repaint()}function D(t,n){var i,n,i=this;return(i=W.call(this,t,n)||this).MU=null!=(n=n.option)?n:t.lF,i}i=this&&this.__extends||(y=function(t,n){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}y(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),c=n("Common"),k=n("Core"),h=n("./dist/plugins/fill/fill.js"),t=n("./dist/plugins/fill/fill.ns.js"),r=n("CalcEngine"),e=n("Touch"),I=n("./dist/plugins/fill/utils.js"),s=!!r,O=c.Common.lt.ht,A=null,S=void 0,v=k.Ec,n=k.GC$,x=Math.max,E=Math.floor,r=k.Commands.ActionBase,l=k.Commands.CI,b=k.Commands.SI,u=k.CopyToOptions.all,V="startRange",H="fillRange",N="autoFillType",P="fillDirection",d="cancel",o="fill",a="dragDrop",f=n.isEmptyObject,g="onLayoutChanged",t=new c.Common.ResourceManager(t.SR,"Fill"),p=t.getResource.bind(t),w="gc-drag-header-mask",m="gc-drag-header-indicator",n.extend(k.Worksheet.prototype,j={fillAuto:function(t,n,i){if(!n)throw new Error(p().Exp_RangeIsNull);var r=this,e=i.fillType,o=i.series,u=i.direction,s=i.step,a=i.stop,l=new h.Wtt(r),f=i.Qtt;if(z(t,n,u?A:o,u)){r.suspendPaint(),t&&(r.rt.Ktt=t);try{4===e?l.Jtt(n,o,!1,i.withTag,i.withoutStyle,f):0===e?l.Xtt(n,u):1===e||2===e?l.qtt(1===e,n,o,s,a):3===e&&l.$tt(n,o,3,s,O(a)?A:c.Common.ct.o0(a),i.unit)}finally{r.resumePaint()}}},tBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderMaskBackColor)||k.I.fl(w).backgroundColor},nBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderIndicatorColor)||k.I.fl(m).borderTopColor}}),k.Worksheet.ch(o,{init:function(){this.tnt=new h.nnt(this)},setHost:function(t){var t;t&&((t=this.Qy())[o]||t.register(o,k.Commands[o]),t[a]||t.register(a,k.Commands[a]),this.D3(k.Events.TopRowChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(k.Events.LeftColumnChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(k.Events.ViewZoomed+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.EditStarted+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.FloatingObjectSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.ShapeSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}))},dispose:function(t){var t;!1!==t.clearCache&&(t=this).tnt&&(t.tnt.L0(),t.tnt=A),this._3(k.Events.TopRowChanged+"."+o),this._3(k.Events.LeftColumnChanged+"."+o),this._3(k.Events.ViewZoomed+"."+o),this._3(k.Events.EditStarted+"."+o),this._3(k.Events.FloatingObjectSelectionChanged+"."+o),this._3(k.Events.ShapeSelectionChanged+"."+o)},preProcessKeyDown:function(t){var n=this.R_;n&&n.close()},preProcessMouseDown:function(t){var n=this.R_;n&&n.close()},preProcessContextMenu:function(t){var n=this.R_;n&&n.close()}}),k.Workbook.ch(o,{onCultureChanged:function(){p()}}),k.Hv.ch(o,{preProcessMouseDown:function(t){var n,n,n=(0,k.jf)(this.Vv),n=n&&n.R_;n&&n.close()}}),k.Of.touch&&e.TouchEventHandler.ch(o,{preProcessManipulationStarted:function(t){var n=this.Mf.R_;n&&n.close()},preProcessTapped:function(t){var n=this.Mf.R_;n&&n.close()},preProcessDoubleTapped:function(t){var n=this.Mf.R_;n&&n.close()}}),window.gcGlobal.wf.push(function(t,n){var n;n&&!k.util.jBe(n,t)||null!=(n=t.R_)&&n.close()}),i(_,L=r),_.prototype.canExecute=function(){var t=this,n=t.Mf,t=t.Ftt,i=t[V],r=t[H];return!(!n.PT(r.row,r.col,(0,I.getRowCount)(r),(0,I.getColCount)(r),{isIgnoreFilterOutRow:!0,sheetArea:k.SheetArea.viewport})||4!==t[N]&&r.intersect(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)))},_.prototype.execute=function(){var t,n,i,r,e,o,o,t=this;if(t.canExecute()){i=(n=t.Ftt)[H],e=(r=t.Mf).parent.i4(),k.Commands.II(e),t.X5(r,!0);try{s&&r.suspendCalcService(),o=r.getSelections(),r.isDirtySuspended()||(t.ent=new l(r,n[H],u)),4===n[N]?t.int(r):t.rnt(r),r.EA(o,r.getSelections())&&r.jA(o)}finally{t.q5(r,!0),s&&r.resumeCalcService(!1),k.Commands.xI(e,n),r.Q1i&&r.Q1i(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)),o=[],r.isDirtySuspended()||(t.ont=new l(r,i,u),t.ont.yI(t.ent.bI()),o=t.ont.MI()),b(r,i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i),o,1)}}},_.prototype.int=function(t){var n,i,r,i,n,e,o,e,o,n,n=this;n.Ptt.execute(t),r=(i=n.Ftt)[V],i=i[H],n=0===n.Utt,o=(0,I.getRowCount)(r),e=(0,I.getColCount)(r),o=n?x(1,o-(0,I.getRowCount)(i)):o,n=n?e:x(1,e-(0,I.getColCount)(i)),r.equals(i)||(e=v(r.row,r.col,o,n),t.O6(x(t.N9(),e.row),x(t.k9(),e.col),t.R9,t.B9),t.IA(),t.n4(e.row,e.col,(0,I.getRowCount)(e),(0,I.getColCount)(e)))},_.prototype.rnt=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,r,T,M,n=this,i=n.Mf,r=n.Ftt,e=r[V],o=r[H],u=r[N],s=n.Gtt,f={fillType:4,series:n.Utt,withTag:!0,withoutStyle:!(i.lF&k.CopyToOptions.style)},c=i.tables,h=!1,v=new k.Range(s.row,s.col,s.rowCount,s.colCount);if(c)try{p=0===(d=r[P]),w=3===d,(g=2===d)&&(m=e.rowCount,y=0===c.AB(e.row,e.col,m,e.colCount).length)&&(h=!0,v.rowCount-=m),p&&(_=e.colCount,y=0===c.AB(e.row,e.col,e.rowCount,_).length)&&(h=!0,v.colCount-=_),w&&(_=e.colCount,1===(C=c.AB(e.row,e.col,e.rowCount,_)).length)&&(F=(D=C[0]).dataRange(),D.showFooter())&&o.row+o.rowCount-1>=D.footerIndex()&&(o.rowCount=F.rowCount-(o.row-F.row),s.rowCount=F.rowCount-(s.row-F.row)),b=[],j=[],c.yx(A,v,S,S,S,b,{applyDragFillAfterTableExpand:h,backupTableResizedArgs:j}),0<b.length&&(f.Qtt=b),n.eke=j}catch(t){return i.jT(6,t.message),void i.resumePaint()}if(1===u){if(i.fillAuto(e,s,f),i.lF&k.CopyToOptions.style&&i.Ut.eE(e.row,e.col,e.rowCount,e.colCount))for(a=0;a<o.rowCount;a++)for(l=0;l<o.colCount;l++)(R=i.vI(e.row+E(a%e.rowCount),e.col+E(l%e.colCount)))&&R.clone&&(R=R.clone()),i.CL(o.row+a,o.col+l,R)}else 0===u?(r=i.lF&~k.CopyToOptions.comment,n.ant(e,o,r)):2===u?n.ant(e,o,4320):3===u&&((T=!(1!==(0,I.getRowCount)(e)||1!==(0,I.getColCount)(e)||-1===e.row&&-1!==e.col||-1===e.col&&-1!==e.row))?n.ant(e,o,M=4251):(f.withoutStyle=!0,i.fillAuto(e,s,f)));i.O6(x(t.N9(),s.row),x(t.k9(),s.col),t.R9,t.B9),t.IA&&t.IA(),i.n4(s.row,s.col,(0,I.getRowCount)(s),(0,I.getColCount)(s))},_.prototype.ant=function(t,n,i){var r,e,t,n,o,u,s,a,l,f,c,h,t,v,d,g,n,p,t,w,r,r,m,y,_,r=this,e=r.Mf,t=e.JS(t),n=e.JS(n),o=t.row,u=t.col,s=(0,I.getRowCount)(t),a=(0,I.getColCount)(t),l=n.row,f=n.col,c=(0,I.getRowCount)(n),h=(0,I.getColCount)(n),t=r.Ftt[P],v=3===t,d=1===t,g=E(c/s),n=c%s,p=E(h/a),t=h%a;if(e.HB=!0,_=function(t,n){return e.isActualProtected()&&e.getCell(t,n).hidden()},0===r.Utt){for(w=0;w<g;w++)m=v?l+w*s:l+c-(w+1)*s,_(o,u)&&(i&=~k.CopyToOptions.formula),e.vT(o,u,m,f,s,a,i,!0,!0);0!=n&&(m=v?l+s*g:l+c-g*s-n,_(r=v?o:o+(g+1)*s-c,u)&&(i&=~k.CopyToOptions.formula),e.vT(r,u,m,f,n,a,i,!0,!0))}else{for(w=0;w<p;w++)y=d?f+w*a:f+h-(w+1)*a,_(o,u)&&(i&=~k.CopyToOptions.formula),e.Y1r=y-u,e.vT(o,u,l,y,s,a,i,!0,!0),delete e.Y1r;0!=t&&(y=d?f+a*p:f+h-p*a-t,_(o,r=d?u:u+(p+1)*a-h)&&(i&=~k.CopyToOptions.formula),e.vT(o,r,l,y,s,t,i,!0,!0))}delete e.HB,e.recalcRange(l,f,c,h)},_.prototype.undo=function(){var t,n,i,r,e,o,u,t=this,n=t.Mf,i=!1;if(t.canUndo()){t.X5(n,!0);try{s&&n.suspendCalcService(),r=n.getSelections(),e=t.Ftt,o=n.R_,u=e[H],i=4===e[N]?t.unt(n):t.snt(n),!n.cnt&&o&&o.close(),b(n,u.row,u.col,(0,I.getRowCount)(u),(0,I.getColCount)(u),t.ont?t.ont.MI():[],1,S,!0),n.EA(r,n.getSelections())&&n.jA(r)}finally{t.q5(n,!0),s&&n.resumeCalcService(!1)}}return i},_.prototype.unt=function(t){var n,i,r,i,e,n=this,i=n.Ftt[V],r=i.row,i=i.col,e=k.Commands.TI(t.name());return t.Ut.undo(n.Ftt[e]),t.O6(x(t.N9(),r),x(t.k9(),i),t.R9,t.B9),!0},_.prototype.snt=function(t){var n,i,r,e,r,o,n,i=this.Ftt,r=i[V],e=r.row,r=r.col;s&&t.suspendCalcService();try{o=k.Commands.TI(t.name()),t.Ut.undo(i[o]),t.O6(x(t.N9(),e),x(t.k9(),r),t.R9,t.B9)}finally{s&&t.resumeCalcService(!1)}return t.invalidateLayout(),!0},R=_,i(C,B=r),C.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,t=this,n=!1;if(t.canExecute()){r=(i=t.Mf).parent,e=t.Vtt,o=t.Htt,u=i.parent.i4(),k.Commands.II(u),t.XI(),t.X5(i,!0),i.QI=!0;try{s=i.getSelections(),a=void 0,l=i.rt,(f={sheet:i,sheetName:i.name(),cancel:!1})[H]=e,f[N]=t.Ytt,f[P]=t.Ztt,i.ki(k.Events.DragFillBlock,f),l.fnt=f[N],l.lnt=f[d],f[d]||(t.hnt(f),i.ki(k.Events.DragFillBlockCompleted,f)),n=!0,a=i.getSelections(),i.EA(s,a)&&i.jA(s),r&&o._oldPosition&&r.changeSelectionInCommandExecuting(o,null,null,a)}finally{t.dnt(i,e),t.q5(i,!0),i.QI=!1,k.Commands.xI(u,t.Htt)}}return n},C.prototype.hnt=function(t){var n,i,r,e,o,r,e,n=this,i=n.Mf,r=i.rt,e=n.Vtt,o=n.Ytt;r.fnt=o,r.lnt||((r={})[V]=n.ztt,r[H]=e,r[N]=5===t[N]?o:t[N],r[P]=n.Ztt,e=new R(i,r),i.suspendEvent(),e.execute(),i.resumeEvent(),n.Htt.vnt=e)},C.prototype.XI=function(){var t=this;t.Mf.isDirtySuspended()||(t.ent=new l(t.Mf,t.Vtt,u))},C.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,n=this;if(n.canUndo()){i=n.Mf,r=n.Vtt,e=i.parent,o=n.Htt,n.XI(),n.X5(i,!0);try{u=i.getSelections(),i.suspendEvent(),i.Nj=!0,s=i.parent.i4(),k.Commands.NI(s,o),i.Nj=!1,i.resumeEvent(),a=o[V],i.EA(u,[a])&&i.jA(u),e&&o._oldPosition&&e.changeSelectionInCommandExecuting(o,null,null,[a]),(0,k.handleRestoredTableResizedArgs)(null==(t=o.vnt)?void 0:t.eke)}finally{n.dnt(i,r,!0),n.q5(i,!0)}}return!0},C.prototype.dnt=function(t,n,i){var r,e,o,r=this,e=[];t.isDirtySuspended()||((o=new l(t,n,u)).yI(r.ent.bI()),e=o.MI());try{b(t,n.row,n.col,(0,I.getRowCount)(n),(0,I.getColCount)(n),e,1,S,i)}catch(t){}},T=C,i(D,W=r),D.prototype.Spn=function(){return this.MU},D.prototype.PBe=function(t){this.MU=t},D.prototype.canExecute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,l,v,d,g,p,l,t=this,n=t.Mf,i=t.tT,r=i.fromRow,e=i.fromColumn,o=(0,I.getRowCount)(i),u=i.columnCount,s=i.toRow,a=i.toColumn,l=!i.copy,f,c;if(n.tables&&n.tables.mx(n,{row:r,col:e,rowCount:o,colCount:u},n,{row:s,col:a,rowCount:o,colCount:u},l))return!1;if(!n.zT(r,e,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(s,a,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(i.cmd===k.RangeChangedAction[0]&&n.tables&&(h=!1,0<(l=n.tables.AB(r,e,o,u)).length)){for(d=(v=l[0].range()).row;d<v.row+v.rowCount;d++)if(n.isRowFilterOut(d)){h=!0;break}return!(h&&v.contains(i.mouseTargetRow,i.mouseTargetCol,1,1))}return l=t.mnt(g=0<=s&&a<0&&0<=r&&e<0&&0<o&&u<0,p=s<0&&0<=a&&r<0&&0<=e&&o<0&&0<u),n.PT(s,a,o,u,{isAllowDragInsert:l,sheetArea:k.SheetArea.viewport})&&n.PT(r,e,o,u,{isAllowDragInsert:l,sheetArea:k.SheetArea.viewport})},D.prototype.mnt=function(t,n){var i,r,i,r,e,i,e,i,i=this,r=i.tT,i=i.Mf,r=r.insert,e=i.isActualProtected(),i=i.options.protectionOptions;return!(!e||f(i)||(e=i.allowDragInsertRows,i=i.allowDragInsertColumns,!r)||!(e&&t||i&&n))},D.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,x,t=this,n=!1;if(t.canExecute()){if(i=t.Mf,e=(r=t.tT).fromRow,o=r.fromColumn,u=r.toRow,s=r.toColumn,a=r.columnCount,l=r.insert,f=r.copy,(h=$(i,!0,e,o,u,s,c=r.rowCount,a,f,l,i.lF)).cancel)return;t.XI(),g=d=v=void 0,p=c,w=a,m=i.parent.i4(),(y=i.o5())&&(p+=i.lT(u,c,!0),w+=i.lT(s,a)),k.Commands.II(m),t.X5(i,!0),i.QI=!0,_=void 0;try{this.PBe(h.copyOption);try{C=[],_={shiftCells:r.insert&&r.shiftCells===k.InsertShiftCell.down,isCopy:r.copy,isFirst:!0},i.tables&&i.tables.yx(i,new k.Range(u,s,p,w),new k.Range(e,o,c,a),A,A,A,{shiftInfo:_,backupTableResizedArgs:C}),r.Kh.eke=C}catch(t){return i.jT(6,t.message),void i.resumePaint()}r.insert?0<=o&&e<0?(v=o,g=a,D=d=s,this.Jcr(i,v,d,g)&&(i.WBe(d,g,S,{ignoreExpand:!0}),r.copy?i.copyTo(-1,d<=v?v+g:v,-1,d,-1,g,this.Spn()):(i.moveTo(-1,d<=v?v+g:v,-1,d,-1,g,this.Spn(),void 0,i.getRowCount()<1),i.deleteColumns(d<=v?v+g:v,g),v<d&&(D=d-g)),q(i,-1,D,(0,I.getSheetRowCount)(i),g,r))):0<=e&&o<0?(v=e,g=c,F=d=u,this.Kcr(i,v,d,g)&&(i.ffe(d,g,S,{ignoreExpand:!0}),r.copy?i.copyTo(d<=v?v+g:v,-1,d,-1,g,-1,this.Spn()):(i.moveTo(d<=v?v+g:v,-1,d,-1,g,-1,this.Spn(),void 0,i.getColumnCount()<1),i.deleteRows(d<=v?v+g:v,g),v<d&&(F=d-g)),q(i,F,-1,g,(0,I.getSheetColumnCount)(i),r))):0<=e&&0<=o&&(b=r.shiftCells,j=new k.Range(u,s,1,1),R=[new k.Range(e,o,c,a)],O(b)||(T={cmd:"clipboardPaste",sheetName:i.name(),clipboardHtml:"",clipboardImage:"",clipboardText:"",fromRanges:R,fromSheet:i,isCutting:!r.copy,pasteOption:0,pastedRanges:[new k.Range(u,s,c,a)],_acCell:j,_dataRange:R,_shiftCells:b,_fromDragFill:!0,_ignoreTableFooterShiftIndex:_&&_.ignoreFooterShiftIndex},i.Qy().execute(T),M=i.getSelections()[0],b===k.InsertShiftCell.down&&e<u&&!r.copy&&o===s?i.setSelection(M.row-c,M.col,M.rowCount,M.colCount):b===k.InsertShiftCell.right&&o<s&&!r.copy&&e===u&&i.setSelection(M.row,M.col-a,M.rowCount,M.colCount))):(r.copy?i.copyTo(e,o,u,s,c,a,this.Spn()):i.moveTo(e,o,u,s,c,a,this.Spn()),i&&(q(i,u,s,p,w,r),x=r.Kh,r.copy||i.isDirtySuspended()||(x.wx=t.gnt(i,x.qI,e,o,c,a)),i.isDirtySuspended()||(x.Mx=t.gnt(i,x.$I,u,s,c,a)))),n=!0}finally{i.rt.q6={},t.q5(i,!0),i.QI=!1,$(i,!1,e,o,u,s,c,a,f,l,this.Spn()),k.Commands.xI(m,r)}U(i)}return n},D.prototype.gnt=function(t,n,i,r,e,o){var u,s,u=new l(t,v(i,r,e,o),this.Spn()),s=t.tables&&t.tables.WI&&t.tables.WI(i,r,e,o);return s&&0<s.length&&(this.tT.tableNamesObj={r:i,c:r,rc:e,cc:o,tableNames:s}),u.yI(n.bI()),b(t,i,r,e,o,u.MI(),0,s),u},D.prototype.XI=function(){var t,n,t,i,r,e,o,u,s,a,o,u,r,e,t=this,n=t.Mf,t=t.tT,i=t.Kh;i=i||(t.Kh={}),s=(r=t.fromRow)<0?0:r,a=(e=t.fromColumn)<0?0:e,o=(o=t.toRow)<0?0:o,u=(u=t.toColumn)<0?0:u,r=r<0?(0,I.getSheetRowCount)(n):(0,I.getRowCount)(t),e=e<0?(0,I.getSheetColumnCount)(n):t.columnCount,t.insert||n.isDirtySuspended()||(t.copy||(i.qI=new l(n,v(s,a,r,e),this.Spn())),i.$I=new l(n,v(o,u,r,e),this.Spn())),i.pnt=n.R9,i.bnt=n.B9,i.ynt=n.ui,i.wnt=n.ci},D.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t=this;if(t.canUndo()){if(n=t.Mf,r=(i=t.tT).fromRow,e=i.fromColumn,o=i.toRow,u=i.toColumn,s=(0,I.getRowCount)(i),a=i.columnCount,!n.zT(r,e,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(o,u,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;f=i.Kh,t.X5(n,!(l=void 0)),c=n.parent.i4(),k.Commands.NI(c,i);try{i.insert?0<=e&&0<=r||(0<=e?(l=a,n&&q(n,-1,e,(0,I.getSheetRowCount)(n),l,i)):0<=r&&(l=s,n)&&q(n,r,-1,l,(0,I.getSheetColumnCount)(n),i)):(d=r<0?0:r,g=e<0?0:e,p=o<0?0:o,w=u<0?0:u,m=r<0?(0,I.getSheetRowCount)(n):s,y=e<0?(0,I.getSheetColumnCount)(n):a,n&&(q(n,r,e,s,a,i),_=i.tableNamesObj,C=[],D=[],_&&(_.r===p&&_.c===w&&_.rc===m&&_.cc===y?D=_.tableNames:C=_.tableNames),b(n,p,w,m,y,f.Mx?f.Mx.MI():[],0,C,!0),b(n,d,g,m,y,f.wx?f.wx.MI():[],0,D,!0))),n&&(-1!==f.ynt&&-1!==f.wnt&&((F=n.getSelections()[0]).contains(f.ynt,f.wnt)?n.XA(f.ynt,f.wnt):n.XA(F.row,F.col)),-2!==f.pnt&&-2!==f.bnt&&-1!==f.ynt&&-1!==f.wnt&&n.showCell(f.ynt,f.wnt,3,3),(0,k.handleRestoredTableResizedArgs)(f.eke))}finally{t.q5(n,!0)}U(n)}return!0},D.prototype.Jcr=function(t,n,i,r){var i={changeType:"addingColumns",col:i,colCount:r,canAdd:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport};return k.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingColumns",col:n,colCount:r,canDelete:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport},k.Worksheet.et(t,g,i),i.canDelete)},D.prototype.Kcr=function(t,n,i,r){var i={changeType:"addingRows",row:i,rowCount:r,canAdd:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport};return k.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingRows",row:n,rowCount:r,canDelete:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport},k.Worksheet.et(t,g,i),i.canDelete)},M=D,k.Commands[o]={canUndo:!0,execute:function(t,n,i){return k.Commands.zA(t,T,n,i)}},k.Commands[a]={canUndo:!0,execute:function(t,n,i){return k.Commands.zA(t,M,n,i)}}},"./dist/plugins/fill/drag-header-to-move/event.js":function(t,n,i){var n,w,f,a,i,m,r,e;function y(t,n){var i,r,i=t.getColumnCount();if(0!==n.col||n.colCount!==i){for(r=0;r<n.col;r++)if(t.getColumnVisible(r))return;for(r=n.col+n.colCount;r<i;r++)if(t.getColumnVisible(r))return}return 1}function _(t){var t;return t&&(null==(t=t.NMi)?void 0:t._gi)!==w.SheetType.ganttSheet}Object.defineProperty(n,"__esModule",{value:!0}),n=i("Common"),w=i("Core"),f=i("./dist/plugins/fill/utils.js"),a=n.Common.zf,i=w.GC$,m=null,r=5,i.extend(w.nk.prototype,e={QRe:function(t,n,i){var r,r,r,e,o,u,s,r,u,r,a,l,f,c,h,v,d,g,p,r=this;if(!r.a_&&(1===t.hitTestType||2===t.hitTestType)&&_(e=r.Mf)&&(o=null==(r=null==(r=e.parent)?void 0:r.options)?void 0:r.allowDragHeaderToMove)&&(0,w.needPaintSelection)(e)&&(u=e.getSelections())&&1===u.length)if(s=u[0],u=(r=e.options).colHeaderVisible,r=r.rowHeaderVisible,(o&w.AllowDragHeaderToMove.column)===w.AllowDragHeaderToMove.column&&1===t.hitTestType&&s.row<0&&0<=s.col&&u&&t.row>=e.getFreeAreaRowCount(1)){if(y(e,s))return m;if(a=s.col+s.colCount,t.col<s.col||t.col>=a)return m;for(l=e.Yy(t.colViewportIndex,1),f=s.col;f<a;f++)if((c=null==l?void 0:l.findCol(f))&&(h=c.width,c.x<=n)&&n<=c.x+h)return{action:"dragHeader",dragColumn:!0,selectRange:s}}else if((o&w.AllowDragHeaderToMove.row)===w.AllowDragHeaderToMove.row&&2===t.hitTestType&&0<=s.row&&s.col<0&&r&&t.col>=e.getFreeAreaRowCount(2)){if(s.rowCount===e.getRowCount())return m;for(v=e._y(t.rowViewportIndex,2),d=s.row+s.rowCount,g=s.row;g<d;g++)if((p=null==v?void 0:v.findRow(g))&&p.y<=i&&i<=p.y+p.height)return{action:"dragHeader",dragColumn:!1,selectRange:s}}return m},VRe:function(t){var n,i,r,r,e,e,o,e,o,i,r,n=this;n.eBe||t&&t.dragHeaderToMoveInfo&&1===(r=(i=n.Mf).Ut.getSelections()).length&&(n.rb=!0,n.eBe=!0,n.cw(t),r=r[0],e=i.Fi(),e=i.options.rightToLeft?new w.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new w.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),o=i.getRangeRect((0,f.getRowViewportIndex)(t),(0,f.getColViewportIndex)(t),r),t.dragHeaderToMoveInfo.dragColumn?o.height=(0,f.getHeight)(e):(i.options.rightToLeft&&(o.x=e.x),o.width=(0,f.getWidth)(e)),t.dragHeaderToMoveInfo.selectionRect=o,(e=n.q6).x=o.x,e.y=o.y,e.width=o.width-1,e.height=o.height-1,e.row=r.row,e.col=r.col,e.rowCount=(0,f.getRowCount)(r),e.colCount=(0,f.getColCount)(r),o=i.JS(r),i=t.row,r=t.col,(i=i<o.row?o.row:i)>=o.row+(0,f.getRowCount)(o)&&(i=o.row+(0,f.getRowCount)(o)-1),(r=r<o.col?o.col:r)>=o.col+(0,f.getColCount)(o)&&(r=o.col+(0,f.getColCount)(o)-1),e.hitRow=i,e.hitCol=r,e.rowOffset=i-o.row,e.colOffset=r-o.col,n.Rk={e9:(0,f.getRowViewportIndex)(t),r9:(0,f.getColViewportIndex)(t),Bk:(0,f.getHitTestType)(t)},n.Ok())},YRe:function(){var t,n,i,i,r,e,o,u,o,e,s,e,u,s,t=this,n=t.Mf;t.eBe&&t.rb&&(i=t.WRe(),t.q6.hitTarget=t.fk,t.q6.x=i.x,t.q6.y=i.y,t.q6.width=i.width,t.q6.height=i.height,i=t.fk.x,r=t.fk.y,u=(o=(e=(0,f.getSheetVPortBoundary)(n)).minPoint).x,o=o.y,s=(e=e.maxPoint).x,e=e.y,t.fk.x<=u?t.fk.x=u+1:t.fk.x>=s&&(t.fk.x=s-1),t.fk.y<=o?t.fk.y=o+1:t.fk.y>=e&&(t.fk.y=e-1),u=(0,f.getHitColumnIndex)(n,t.fk.x),s=(0,f.getHitRowIndex)(n,t.fk.y),t.KRe(s,u),t.fk.x=i,t.fk.y=r,t.a9())},ZRe:function(){var t,n,i,t=this,n=t.Mf;t.eBe=!1,t.i_=!0,t.zk=!0,t.t_=!1,i=n.sw,(0,f.fixHitTestInfo)(i),t.kD&&t.kD(),t.rb=!1,t.ab=!1,t.Rk=m,n.Uet=m,n.JRe=m,n.Pet=m,t.cw&&t.cw(n.sw)},KRe:function(t,n){var t,i,r,e,n,t,o,t,u,s,r,i=this;i.eBe&&(r=i.Mf,(e=i.q6).hitRow=t,e.hitCol=n,n=null!=(t=i.Int)?t:r.JS(e),i.xnt=n,t=r.Dn.XRe(),i.Int=n,o=r.parent)&&o.options.showDragDropTip&&(t?(t=r.Uet.x+r.Uet.width+5,u=r.Uet.y+r.Uet.height+5,s=r.sw,r=r.U5(),s.dragHeaderToMoveInfo.dragColumn?e.col>r.col?n.col=e.col-r.colCount:n.col=e.col:e.row>r.row?n.row=e.row-r.rowCount:n.row=e.row,o.Tw(a.j0(i.Nnt(n)),t,u)):o.iy())},WRe:function(){var t,n,i,t,r,n,e,o,e,n,u,n,s,a,l,s,t=this,n=t.Mf,i=n.sw,t=t.fk,r=i.dragHeaderToMoveInfo.selectionRect.clone(),n=(0,f.getSheetVPortBoundary)(n),e=n.minPoint,o=e.x,e=e.y,n=n.maxPoint,u=n.x,n=n.y;return i.dragHeaderToMoveInfo.dragColumn?(s=i.x-r.x,r.x=t.x-s,r.x<o?r.x=o:u<(a=(0,f.getEndX)(r))&&(r.x=u-r.width),n<(l=(0,f.getEndY)(r))&&(r.height=n-r.y)):(s=i.y-r.y,r.y=t.y-s,r.y<e?r.y=e:n<(l=(0,f.getEndY)(r))&&(r.y=n-r.height),u<(a=(0,f.getEndX)(r))&&(r.width=u-r.x)),r}})},"./dist/plugins/fill/drag-header-to-move/index.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-header-to-move/event.js"),i("./dist/plugins/fill/drag-header-to-move/render.js")},"./dist/plugins/fill/drag-header-to-move/render.js":function(t,n,i){var p,w,n,r,e;Object.defineProperty(n,"__esModule",{value:!0}),p=i("Core"),w=i("./dist/plugins/fill/utils.js"),n=p.GC$,r="black",n.extend(p.g7.prototype,e={qRe:function(t,n,i){t.save(),t.fillStyle=i||r,t.fillRect(n.x,n.y,n.width,n.height),t.restore()},$Re:function(o,u){var t,s,n,a,l,f,c,h,v,d,g,n,n,n,t=this,s=t.Mf,n=s.rt,a=s.sw,l=n.q6,f=l.hitTarget;if(l&&f)return c=l.hitCol,h=l.hitRow,v=s.nBe(),d=(0,w.getLineStyle)(s),g=8,o.save(),(n=(0,w.mergeRect)(s.Pet,s.JRe))&&(n=new p.Rect(n.x-g,n.y-g,(0,w.getWidth)(n)+2*g,(0,w.getHeight)(n)+2*g),t.O1(n,u),t.E1(s.U5(),u)),r(),n=i(),o.beginPath(),o.restore(),n;function i(){var t,n,i,r,e,e,t,e,r,t=s.Yy(0).findCol(c)||s.Yy(1).findCol(c)||s.Yy(2).findCol(c),n=s._y(0).findRow(h)||s._y(1).findRow(h)||s._y(2).findRow(h),i=!1;return a.dragHeaderToMoveInfo.dragColumn?t&&(r=t.x,e=(0,w.getWidth)(t),l.col=c,f.x>r+e/2&&(r=t.x+(0,w.getWidth)(t),l.col++),l.col<a.dragHeaderToMoveInfo.selectRange.col||l.col>a.dragHeaderToMoveInfo.selectRange.col+a.dragHeaderToMoveInfo.selectRange.colCount)&&(s.Uet=new p.Rect(r,l.y,0,(0,w.getHeight)(l)),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),e=u.y+1,(0,w.paintDragLine)(o,r-g,e,r+g,e,v,d),(0,w.paintDragLine)(o,r,l.y,r,l.y+(0,w.getHeight)(l),v,d),(0,w.paintDragLine)(o,r-g,l.y+(0,w.getHeight)(l),r+g,l.y+(0,w.getHeight)(l),v,d),i=!0):n&&(t=n.y,e=(0,w.getHeight)(n),l.row=h,f.y>t+e/2&&(t=n.y+(0,w.getHeight)(n),l.row++),l.row<a.dragHeaderToMoveInfo.selectRange.row||l.row>a.dragHeaderToMoveInfo.selectRange.row+a.dragHeaderToMoveInfo.selectRange.rowCount)&&(s.Uet=new p.Rect(l.x,t,(0,w.getWidth)(l),0),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),r=u.x+1,(0,w.paintDragLine)(o,r,t-g,r,t+g,v,d),(0,w.paintDragLine)(o,l.x,t,l.x+(0,w.getWidth)(l),t,v,d),(0,w.paintDragLine)(o,l.x+(0,w.getWidth)(l),t-g,l.x+(0,w.getWidth)(l),t+g,v,d),i=!0),i}function r(){o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),t.qRe(o,l,s.tBe())}},XRe:function(){var t,n,i,r,i,r,e,r,t,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;if(i&&i.dragHeaderToMoveInfo&&r)return i=t.J(),r=n.Fi(),e=n.rt.q6,r=n.options.rightToLeft?new p.Rect(r.Hy,r.T6,r.b6+r.F6,r.Ay+r.Iy):new p.Rect(r.b6,r.T6,r.Hy+r.zy,r.Ay+r.Iy),t=t.$Re(i,r),n.JRe=n.Uet,n.Pet=new p.Rect(e.x,e.y,(0,w.getWidth)(e),(0,w.getHeight)(e)),t}})},"./dist/plugins/fill/fill-event.js":function(t,n,i){var p,m,g,r,w,e,y,_,C,v,D,c,F,b,d,j,R,o,u,h,T,M,i,x,s,e;Object.defineProperty(n,"__esModule",{value:!0}),n.FillAction=void 0,p=i("Common"),m=i("Core"),g=i("SheetsCalc"),r=i("./dist/plugins/fill/fill-ui.js"),w=i("./dist/plugins/fill/fill.js"),e=i("./dist/plugins/fill/fill.ns.js"),y=i("CalcEngine"),_=i("./dist/plugins/fill/utils.js"),C=!!y,v=m.GC$,D=m.Ec,c=p.Common.lt.ht,F=null,b=void 0,d=Math.min,j=Math.abs,R=Math.max,o=5,u=3,h="drag",T="corner",M=p.Common.zf,i=new p.Common.ResourceManager(e.SR,"Fill"),x=i.getResource.bind(i),(e=s=n.FillAction||(n.FillAction={}))[e.smartMenuCopyCells=1]="smartMenuCopyCells",e[e.smartMenuFillSeries=2]="smartMenuFillSeries",e[e.smartMenuFillFormattingOnly=4]="smartMenuFillFormattingOnly",e[e.smartMenuFillWithoutFormatting=8]="smartMenuFillWithoutFormatting",e[e.all=1023]="all",v.extend(m.nk.prototype,{bk:function(t){var n,i,r,e,e,o,u,u,o,e,u,i,n=this;n.zk||(i=n.Mf,r=F,1===(e=i.Ut.getSelections()).length?r=e[0]:e.length<1&&(r=i.Ut.getSpan(i.ui,i.ci)),r&&(n.zk=!0,n.rb=!0,n.Mnt=r,(e=i.tables&&i.tables.find(r.row,r.col))&&(o=n.Cnt=!0,u=e.range(),o=!(e.showHeader()&&r.row===u.row||e.showFooter()&&r.row===u.row+u.rowCount-1||r.col!==u.col||r.colCount!==u.colCount)&&o)&&(n.Snt=!0,n.e_=!0,n.Tnt=e.name()),u=i.getRangeRect((0,_.getRowViewportIndex)(t),(0,_.getColViewportIndex)(t),r),(o=n.q6).x=u.x,o.y=u.y,o.width=u.width-1,o.height=u.height-1,o.row=r.row,o.col=r.col,o.rowCount=(0,_.getRowCount)(r),o.colCount=(0,_.getColCount)(r),e=i.JS(r),u=t.row,i=t.col,(u=u<e.row?e.row:u)>=e.row+(0,_.getRowCount)(e)&&(u=e.row+(0,_.getRowCount)(e)-1),(i=i<e.col?e.col:i)>=e.col+(0,_.getColCount)(e)&&(i=e.col+(0,_.getColCount)(e)-1),o.hitRow=u,o.hitCol=i,o.rowOffset=u-e.row,o.colOffset=i-e.col,n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok()))},Vk:function(){var t,n,i,r,e,o,u,r,i,s,a,t=this;t.Rk&&t.rb&&t.zk&&t.Mnt&&(n=t.fk,i=t.q6,e=(r=t.Mf.getCellRect(i.hitRow,i.hitCol)).width/2,o=r.x+e,u=r.height/2,r=r.y+u,i.hitTarget={x:n.x,y:n.y},i=t.Q9(),s=t.K9(),a=!1,(j(o-n.x)>5+e||j(r-n.y)>5+u)&&(a=!0),0<=i&&0<=s&&a&&t.Ant(i,s),t.a9())},Ant:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,c,u,f,l,c,u,t,n,o,i=this;i.zk&&i.Mnt&&(r=i.Mf,e=i.q6,o=r.o5(),u=r.U5(),s=(0,_.getSheetRowCount)(r),a=(0,_.getSheetColumnCount)(r),l=d(a-(0,_.getColCount)(e),n-e.colOffset),f=d(s-(0,_.getRowCount)(e),t-e.rowOffset),o&&(c=r.ox(n,e.colOffset+1),f-=h=r.ox(t,e.rowOffset+1,!0),0===r.getColumnWidth(l-=c)&&(l=r.r6(l)),0===r.getRowHeight(f))&&(f=r.nI(f)),-1===u.row&&-1!==u.col?(e.row=-1,e.col=R(0,l)):-1!==u.row&&-1===u.col?(e.row=R(0,f),e.col=-1):(e.row=e.row<0?-1:R(0,f),e.col=e.col<0?-1:R(0,l)),i.Snt&&(u=(c=r.tables&&r.tables.find(t,n))&&c.range(),!c||c.name()!==i.Tnt||t===u.row||c.showFooter()&&t===u.row+u.rowCount?i.e_=!1:i.e_=!0,i.e_?(e.col=u.col,i.i_=!i.isPressShiftKey):i.i_=i.isPressShiftKey),e.hitRow=t,e.hitCol=n,f=r.JS(e),o&&(l=r.lT(f.row,f.rowCount,!0),c=r.lT(f.col,f.colCount),f.rowCount+=l,f.colCount+=c,f.rowCount=d(s,f.rowCount),f.colCount=d(a,f.colCount),f.row+f.rowCount>s||f.col+f.colCount>a)||(u=i.Int)&&f.row===u.row&&f.col===u.col&&(0,_.getRowCount)(f)===(0,_.getRowCount)(u)&&(0,_.getColCount)(f)===(0,_.getColCount)(u)&&f.row>r.N9()&&f.col>r.k9()&&f.row+(0,_.getRowCount)(f)-1<r.P6()&&f.col+(0,_.getColCount)(f)-1<r.G6()||(i.xnt=f,r.Dn.o_(),i.Int=f,(t=r.parent)&&t.options.showDragDropTip&&(n=e.x+e.width+5,o=e.y+e.height+5,t.Tw(M.j0(i.Nnt(f)),n,o))))},Nnt:function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d;return t&&C?(i=(n=this.Mf).U5(),r=(0,_.getRowCount)(i),e=(0,_.getColCount)(i),o=n.getActiveRowIndex(),u=n.getActiveColumnIndex(),s=void 0,a=n.o5(),o=o<0?0:o,u=u<0?0:u,s=1===r&&1===e?y.knt(F,F,t.row-o,t.col-u,!0,!0):(h=c=f=l=void 0,d=v=0,-1===i.row&&0<=i.col?(l=c=g.BAND_INDEX_CONST,f=t.col-u,h=t.col-u+e-1,d=e):-1===i.col&&0<=i.row?(f=h=g.BAND_INDEX_CONST,l=t.row-o,c=t.row-o+r-1,v=r):0<=i.row&&0<=i.col&&(l=t.row-o,c=t.row-o+r-1,f=t.col-u,h=t.col-u+e-1,v=r,d=e),a&&(c+=n.lT(t.row,v,!0),h+=n.lT(t.col,d)),y.lJ(F,F,l,f,c,h,!0,!0,!0,!0,o,u)),n.op().unparse(n.Uw(),s,o,u)):b},kD:function(t){var n,i,r,e,o,u,u,s,a,l,f,c,h,v,u,d,g,p,p,w,p,w,w,p,w,n=this,i=!1,r="",e=!1,o=n.Mf;n.Rk=F,n.l9(),u=o.U5(),s=n.q6.row,a=n.q6.col,l=n.q6.hitRow,f=n.q6.hitCol,n.i_&&u.contains(l,f)||(u=u&&(0<(0,_.getRowCount)(u)||0<(0,_.getColCount)(u))?{r:u.row,c:u.col,rc:(0,_.getRowCount)(u),cc:(0,_.getColCount)(u)}:{r:o.ui,c:o.ci,rc:1,cc:1},!0===n.zk&&!0===n.rb&&(c=u.r,h=u.c,v=u.rc,u=u.cc,d=o.options.protectionOptions,g=o.lF,n.shiftCells=null,n.i_&&(n.shiftCells=n.Dnt?m.InsertShiftCell.right:m.InsertShiftCell.down),p={fromRow:c,fromColumn:h,rowCount:v,columnCount:u,toRow:s,toColumn:a,isDragInsert:n.i_,isDragCopy:n.t_},o.ki(m.Events.BeforeDragDrop,p),(r=p.invalidMessage)&&0!==r.length?i=!0:!n.i_||-1!==c&&-1!==h?s===c&&a===h||(p=o.GT(c,h,v,u),w=o.GT(s,a,v,u),!p&&!w||(w=!1,w=!(p||n.shiftCells!==m.InsertShiftCell.right&&n.shiftCells!==m.InsertShiftCell.down)||w)||(i=!0,r=x().Exp_ChangeMergedCell),i||C&&(o.KT(c,h,v,u)||o.KT(s,a,v,u))&&(i=!0,r=x().Exp_ChangePartOfArray),!i&&!n.t_&&(p=(p=(p=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(c,h,v,u)))&&o.dA(D(c,h,v,u),!1,m.SheetArea.viewport),w=(w=(w=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(s,a,v,u)))&&o.dA(D(s,a,v,u),!1,m.SheetArea.viewport),p||w)&&(i=!0,r=o.FT()),i)||(n.i_&&(n.Dnt?a=n.q6.hitCol:s=n.q6.hitRow),e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:h,toRow:s,toColumn:a,rowCount:v,columnCount:u,copy:n.t_,insert:n.i_,shiftCells:n.shiftCells,option:g,mouseTargetRow:l,mouseTargetCol:f})):0<=h?(n.t_&&(a<=h||h+u<=a)||!n.t_&&(a<h||h+u<a))&&((o.GT(-1,h,-1,u)||o.GT(-1,a,-1,0))&&(i=!0,r=x().Exp_ChangeMergedCell),p=d&&d.allowDragInsertColumns,!i&&o.isActualProtected()&&!0!==p&&(i=!0,r=x().Exp_ColumnReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:-1,fromColumn:h,toRow:-1,toColumn:a,rowCount:-1,columnCount:u,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))):0<=c&&h<0&&(n.t_&&(s<=c||c+v<=s)||!n.t_&&(s<c||c+v<s))&&((o.GT(c,-1,v,-1)||o.GT(s,-1,0,-1))&&(i=!0,r=x().Exp_ChangeMergedCell),i||C&&(o.KT(c,-1,v,-1)||o.KT(s,-1,0,-1))&&(i=!0,r=x().Exp_ChangePartOfArray),w=d&&d.allowDragInsertRows,!i&&o.isActualProtected()&&!0!==w&&(i=!0,r=x().Exp_RowReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:-1,toRow:s,toColumn:-1,rowCount:v,columnCount:-1,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))))),n.rb=!1,n.zk=!1,n.Snt=!1,n.Cnt=!1,n.e_=!1,n.Tnt=F,n.Mnt=F,n.i_=!1,n.t_=!1,n.Int=F,n.xnt=F,n.iy(),e||(n.q6={},o.repaint()),i&&o.jT(3,r)},wk:function(t){var n=this;!0!==n.Yk&&!0!==n.rb&&(n._nt(),n.Ktt)&&(n.rb=!0,n.Yk=!0,n.hO=!0,n.Ent=t,n.jnt=(0,_.getColViewportIndex)(t),n.Ont=(0,_.getRowViewportIndex)(t),n.Rnt=(0,_.getColViewportIndex)(t),n.Bnt(),n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok())},Bnt:function(){var t,n,i,r,n,t=this,n=(0,_.getFrozenRowCount)(t.Mf),i=(0,_.getFrozenColumnCount)(t.Mf),r=t.Lnt();0<=r&&r<n?t.Fnt=0:n<=r&&r<=(0,_.getSheetRowCount)(t.Mf)&&(t.Fnt=1),t.Pnt()?t.Gnt=1:t.Gnt=t.Ent,0<=(n=t.Unt())&&n<i?t.Hnt=0:i<=n&&n<=(0,_.getSheetColumnCount)(t.Mf)&&(t.Hnt=1),t.znt()?t.Vnt=1:t.Vnt=t.jnt},Zk:function(){var t,n,i,r,t=this;t.Rk&&t.Yk&&t.rb&&t.Ktt&&(t.Ont=t.nD(),t.Rnt=t.eD(),t.Ynt=t.Q9(),t.Znt=t.K9(),0<=t.Ynt&&0<=t.Znt&&(t.Wnt(),t.Qnt(),n=t.Mf.parent,i=!1,(r=t.Knt())&&(i=t.Jnt(t.Ktt,t.Xnt,!0)),n&&n.options.showDragFillTip&&i&&t.qnt(),t.$nt()),t.a9())},tet:function(){var t,n,i,r,e,e,o,u,s,s,a,u,l,f,c,h,v,h,v,d,g,t=this,n=t.Mf,i=t.Ktt,r=t.Xnt,e=n.parent.options.defaultDragFillType,e=t.net(3===e?5:e,3===e),o=t.eet(),u=t.Knt();return 1===e?(s=0===o||1===o?1:0,u=(a=new w.Wtt(n)).Jtt(u,s,!0),s=t.iet(o,r,i),f=(l=n.getActualStyle(s.row,s.col)).cellType||n.$f(),c=l.formatter||l._autoFormatter,h=p.Formatter&&p.Formatter.GeneralFormatter,u instanceof Date&&h&&(c=new h(p.Common.CultureManager.Fe().DateTimeFormat.shortDatePattern+" hh:mm:ss AM/PM;@","0")),h=3,(v=t.Rk)&&(h=v.Bk),v={sheet:n,row:s.row,col:s.col,sheetArea:h,quotePrefix:l.quotePrefix},f.format(u,c,d={},v)):0!==e||(s=t.iet(o,r,i),g=n.getFormula(s.row,s.col))?F:n.getText(s.row,s.col)},iet:function(t,n,i){var r,e,o,i,u,s,r=i.row,e=i.col,o=(0,_.getRowCount)(i),i=(0,_.getColCount)(i),u=D(r,e,1,1);return 3===t?(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r+o-1:r+s-1,u.col=e):1===t?(s=0===(s=(0,_.getColCount)(n)%i)?e+i-1:e+s-1,u.row=r,u.col=s):0===t?(s=0===(s=(0,_.getColCount)(n)%i)?e:e+i-s,u.row=r,u.col=s):2===t&&(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r:r+o-s,u.col=e),u},qnt:function(){var t,n,i,r,e,o,u,o,n,t=this,n=t.Mf,i;if(4===t.net()||t.znt()||t.Pnt())return t.iy(),F;u=t.eet(),o=t.Knt(),n=n.j1(o),o=t.tet(),3===u||1===u?(r=n.x+n.width+3,e=n.y+n.height+3):0===u?(r=n.x+3,e=n.y+n.height+3):2===u&&(r=n.x+n.width+3,e=n.y+3),t.Tw(o,r,e)},$nt:function(){var t=this;t.ret(),t.oet(),t.aet(),t.uet=t.Knt()},ret:function(){var t,n,t=this.Mf;this.uet&&((n=t.j1(this.uet)).x-=2,n.y-=2,n.width+=4,n.height+=4,t.Dn.O1(n))},oet:function(t){var n;this.Mf.Dn.E1(this.Ktt,F,t)},aet:function(){var t,n,i,r,i,e,t,t=this.Mf,n=t.Dn,i=this.Knt();i&&(r=n.J(),i=t.j1(i),e=t.getSelectionBorderColor(),t=(0,_.getLineStyle)(t),r.save(),r.beginPath(),n.cet(r,i,e,t),r.restore())},Qnt:function(){this.Xnt=this.dO()},znt:function(){return-1===this.Ktt.col&&-1!==this.Ktt.row},Pnt:function(){return-1===this.Ktt.row&&-1!==this.Ktt.col},lO:function(){return 4===this.bO||5===this.bO},dO:function(){var t,n,i,r,e,t=this,n=-1,i=-1,r=-1,e=-1;switch(t.bO){case 0:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.Unt()-i;break;case 1:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.fet()+1,e=t.Znt-i+1;break;case 2:n=t.Ynt,r=t.Lnt()-n,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 3:n=t.let()+1,r=t.Ynt-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 5:n=t.Ynt,r=t.let()-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 4:r=t.Pnt()?n=-1:(n=t.Ktt.row,(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.fet()-i+1}return D(n,i,r,e)},het:function(){var t=this.let();return-1!==t?this.Mf._y(this.Gnt).findRow(t):F},det:function(){return this.Mf._y(this.Ont).findRow(this.vet())},vet:function(){return this.Mf.getViewportBottomRow(this.Ont)},met:function(){var t=this.fet();return-1!==t?this.Mf.Yy(this.Vnt).findCol(t):F},pet:function(){return this.Mf.Yy(this.Rnt).findCol(this.bet())},bet:function(){return this.Mf.getViewportRightColumn(this.Rnt)},Wnt:function(){var t,n,i,r,e,o,u,s,e,r,a,l,f,c,o,u,c,f,o,u,a,l,f,o,u,a,f,u,l,h,t=this,n=t.znt(),i=t.Pnt(),r=v(t.Mf.Dg()).offset(),e=t.fk.e,o=t.fk.x,u=t.fk.y,s=e.pageX-r.left,e=e.pageY-r.top,r=!1;n||i?i?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=4:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):n&&(t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.bO=5:t.Ynt<t.Lnt()?t.bO=2:t.Ynt>t.let()&&(t.bO=3)):t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?(a=j(t.Znt-t.fet()))<(l=j(t.Ynt-t.let()))?t.bO=5:l<a?t.bO=4:(f=(f=t.het())||t.det())?u>f.y+f.height?t.bO=3:(o=(c=(c=t.met())||t.pet()).x+c.width-o,u=f.y+f.height-u,s>=c.x&&s<=c.x+c.width&&e>=f.y&&e<=f.y+f.height?t.bO=u<=o?4:5:r=!0):r=!0:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):t.Ynt<t.Lnt()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=2:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:1):t.Ynt>t.let()&&(t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=3:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:1)),(c=t.Mf.Dn.yet)&&(u=(f=t.let())+1,a=(o=t.fet())+1,l=t.Mf.getRowHeight(f,3),f=t.Mf.getColumnWidth(o,3),o=t.Mf.getRowHeight(u,3),u=t.Mf.getColumnWidth(a,3),a=c.x+c.width/2-d(10,f/2),f=c.x+c.width/2+d(10,u/2),u=c.y+c.height/2-d(10,l/2),l=c.y+c.height/2+d(10,o/2),h=!1,(h=n||i?i?a<=s&&s<=f:u<=e&&e<=l:a<=s&&s<=f&&u<=e&&e<=l)||r?(t.hO=!0,t.bO=4):t.hO=!1)},Lnt:function(){return this.Ktt?-1===this.Ktt.row?0:this.Ktt.row:-1},let:function(){var t=this;return t.Ktt?-1===t.Ktt.row?(0,_.getSheetRowCount)(t.Mf)-1:t.Ktt.row+(0,_.getRowCount)(t.Ktt)-1:-1},Unt:function(){return this.Ktt?-1===this.Ktt.col?0:this.Ktt.col:-1},fet:function(){var t=this;return t.Ktt?-1===t.Ktt.col?(0,_.getSheetColumnCount)(t.Mf)-1:t.Ktt.col+(0,_.getColCount)(t.Ktt)-1:-1},wet:function(t,n){var n,i,r,e,e,r,e,t,n=D(n.row,n.col,n.rowCount,n.colCount),i=this.Mf;return i.Ut.findSpan(t.row,t.col)&&(r=t.rowCount,e=n.rowCount,0!==Math.floor(e%r)&&(e=Math.ceil(e/r)*r,n.row+e<=i.getRowCount())&&(n.rowCount=e),r=t.colCount,e=n.colCount,0!==Math.floor(e%r))&&(t=Math.ceil(e/r)*r,n.col+t<=i.getColumnCount())&&(n.colCount=t),n},DD:function(){var t,n,i,r,e,o,u,e,o,t=this,n=t.Mf;t.Rk=F,t.l9(),t.iy(),t.Yk&&t.rb?(t.Yk=!1,t.rb=!1,(i=t.Knt())&&(!(r=t.Jnt(t.Ktt,t.Xnt))||t.hO?(t.Met(),t.Ax(i)):(e=n.rt.Ktt,o=t.wet(e,t.Xnt),u=t.net(),n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:e,fillRange:o,autoFillType:u,fillDirection:n.rt.eet()}),e=t.lnt,o=n.getSelections(),!e&&t.Cet()&&n.parent.options.showDragFillSmartTag&&1===o.length&&o[0].equals(i)&&4!==t.fnt?t.Tet(t.fnt):t.Ax(i),t.Met()))):t.Met()},IRe:function(){var t,n,i,t=this.Mf,n=s.all,i=t.getCellType(t.getActiveRowIndex(),t.getActiveColumnIndex());return"19"===(null==i?void 0:i.typeName)&&(n&=~s.smartMenuFillSeries),n=t.NMi?(n&=~s.smartMenuFillFormattingOnly)&~s.smartMenuFillWithoutFormatting:n},Tet:function(t){var n,i,i,n=this.Mf,i=n.Dn.yet,i={x:i.x+i.width,y:i.y+i.height,fillType:t,availableFillAction:this.IRe()};n.R_=new r.Aet(n.parent.j2(),n,i),n.R_.rQ()},_nt:function(){var t,n,n,i,t=this.Mf,n=t.Ut.getSelections();1===n.length?(n=n[0],(i=t.Ut.getSpans(n))&&0<i.length&&(n=t.kR(i,n)),this.Ktt=n):0<=t.ui&&0<=t.ci&&(this.Ktt=D(t.ui,t.ci,1,1))},Met:function(){this.rb=!1,this.Yk=!1},Ax:function(t){this.Mf.Dn.E1(t)},net:function(t,n){var i,r,t,e,i=this,r=i.Mf,t=t!==b?t:r.parent.options.defaultDragFillType;return i.lO()?4:5!==t?t:(e=1===(0,_.getRowCount)(i.Ktt)&&1===(0,_.getColCount)(i.Ktt)&&!i.Pnt()&&!i.znt())?i.a_&&!n?1:0:i.a_&&!n?0:1},Knt:function(){var t,n,i,r,e,t=this;return t.Ktt?t.lO()?t.Ktt:t.Xnt?(e=r=i=n=0,e=t.Iet()?(n=(2===t.bO?t.Xnt:t.Ktt).row,i=(0,_.getRowCount)(t.Ktt)+(0,_.getRowCount)(t.Xnt),r=t.Ktt.col,(0,_.getColCount)(t.Ktt)):(n=t.Ktt.row,i=(0,_.getRowCount)(t.Ktt),r=(0===t.bO?t.Xnt:t.Ktt).col,(0,_.getColCount)(t.Ktt)+(0,_.getColCount)(t.Xnt)),D(n,r,i,e)):F:F},Jnt:function(t,n,i){var r,e,o,t,r=this.Mf,e=!0,o="";return r.Ut.eE(n.row,n.col,(0,_.getRowCount)(n),(0,_.getColCount)(n))&&!(0,_.canDragFillSpan)(r,t,n)&&(e=!1,o=x().Exp_FillRangeContainsMergedCell),!(t=r.isActualProtected())&&r.dataRanges&&(t=(0,m.isAnyCellProtectedInDataRange)(r,n)),e&&t&&r.dA(n,!0,m.SheetArea.viewport)&&(e=!1,o=r.FT()),e||i||r.ki(m.Events.InvalidOperation,{sheet:r,sheetName:r.name(),invalidType:m.InvalidOperationType.dragFill,message:o,fillRange:n}),e},Cet:function(){return this.xet()||this.Net()},xet:function(){return 3===this.bO||1===this.bO},Net:function(){return 0===this.bO||2===this.bO},Iet:function(){return 2===this.bO||3===this.bO||5===this.bO},eet:function(){var t=this.bO;return 0<=t&&t<=3?t:4===t?0:5===t?2:3},VL:function(t,n,i){var r,e,o,t,u,s,a,l,f,u,r=this,e=F,o=(0,_.getRowViewportIndex)(t),t=(0,_.getColViewportIndex)(t),u=r.Mf,s=u.parent,a=u.options.rightToLeft;if(!c(o)&&!c(t)&&(s.options.allowUserDragDrop||s.options.allowUserDragFill)&&(-1!==(l=u.U5()).row||-1!==l.col)){if(0<=o&&0<=t&&1===u.Ut.getSelections().length){if(r.yD(o,t,n,i))return e;a&&(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),u=u.getRangeRect(o,t,l),e||u.x-4<n&&n<u.x+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"left"}),e||a||(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),e||u.x+u.width-4<n&&n<u.x+u.width+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"right"}),e||u.y-4<i&&i<u.y+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"top"}),e||u.y+u.height-4<i&&i<u.y+u.height+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"bottom"}),e&&(n<u.x||n>u.x+u.width||i<u.y||i>u.y+u.height)&&(e.outside=!0)}s&&s.options.allowUserDragDrop||e&&e.side!==T&&(e.side=F),s&&s.options.allowUserDragFill||e&&e.side===T&&(e.side=F)}return e},ket:function(t,n){var i,r,e,i=this,r,e=i.Mf.getSpan(t,n,3);return e?!c(i.Mf.getValue(e.row,e.col,3,0)):!c(i.Mf.getValue(t,n,3,0))},Det:function(t,n){var i,r,e,e,i,r,e=this.Mf.tables;return!(!e||0===e.all().length)&&(e=e.AB(t,n,1,1)[0])&&e.footerIndex()===t},_et:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(!e.ket(t,o)||e.Det(t,o))return!1;return!0},Eet:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(e.ket(t,o))return!1;return!0},jet:function(t,n,i,r){var e,o,u,s,a,l,f,c,h,e=this,o=e.Mf;if("left"===r){for(u=0;u<n;u++)e.ket(t,u)&&(i.searchArray[u]=!0);for(s=n-1,a=1;i.searchArray[s];)s--,a++;i.searchLength=a}if("right"===r){for(l=o.getColumnCount(),f=n;f<l;f++)e.ket(t,f)&&(i.searchArray[f-n]=!0);for(c=0,h=1;i.searchArray[c];)c++,h++;i.searchLength=h}return i},Oet:function(t,n,i,r,e){for(var o,u,s,a,l,f,c,h,v,d,o=this,u=o.Mf,s=0,a={searchArray:new Array(r),searchLength:1},l={searchArray:new Array(u.getColumnCount()-e),searchLength:1},f=i-1;n<=f&&!o.Eet(f,t.col,1,t.colCount);f--)a=o.jet(f,t.col,a,"left"),l=o.jet(f,t.col+t.colCount-1,l,"right");for(;o.Eet(i+s,t.col,1,t.colCount);){for(h=!(c=!0),a=o.jet(i+s,r,a,"left"),l=o.jet(i+s,e,l,"right"),v=r-1;v>=r-a.searchLength;v--)if(o.ket(i+s,v)){s++,c=!1;break}if(c){for(d=e+1;d<=e+l.searchLength;d++)if(o.ket(i+s,d)){s++,h=!0;break}if(!h)return s}}return s},Ret:function(t){for(var n,i,n=this,i=0;n._et(t.row+t.rowCount+i,t.col,1,t.colCount);)i++;return i},Bet:function(t){var n,i,r,e,o,n=this;return n._et(t.row+t.rowCount,t.col,1,t.colCount)?n.Ret(t):(o=t.row+t.rowCount,r=1===t.colCount?i=t.col:(i=t.col,t.col+t.colCount-1),n.Oet(t,e=0,o,i,r))},H_:function(){var t,n,i,r,r,e,o,i,r,t=this,n=t.Mf,i=n.rt.Ktt,r=t.Bet(i);0!==r&&(r=D(i.row+i.rowCount,i.col,r,i.colCount),t.bO=3,t.Xnt=r,e=t.net(),o=t.lnt,n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:i,fillRange:r,autoFillType:e,fillDirection:t.bO}),i=t.Knt(),r=n.getSelections(),!o)&&n.parent.options.showDragFillSmartTag&&1===r.length&&r[0].equals(i)&&4!==t.fnt&&t.Tet(t.fnt)}})},"./dist/plugins/fill/fill-render.js":function(t,n,i){var F,b,n,j,v;Object.defineProperty(n,"__esModule",{value:!0}),F=i("Core"),b=i("./dist/plugins/fill/utils.js"),n=F.GC$,j=Math.min,v=Math.max,n.extend(F.g7.prototype,{Let:function(t,n){var i,r,e,o,u,t,s,i,a,l,n,i=this.Mf,r=i.options.rightToLeft,e=t.x,o=t.y,u=(0,b.getWidth)(t),t=(0,b.getHeight)(t),s=i.U5(),i=i.Fi(),a=4,l=-2.5;return 2007<n&&(a=5,l=-3),n=new F.Rect(-4,-4,a,a),-1===s.col?(n.x=r?i.BA+l:i.b6,n.y=o+t+l):-1===s.row?(n.x=r?e+l:e+u+l,n.y=i.T6):(n.x=r?e+l:e+u+l,n.y=o+t+l),n},yO:function(t,n,i,r,e){var o,u,s,a,a,r,l,f,c,h,s,n,i,o=this,u=o.Mf,s=u.Fi(),a=u.parent,a=a&&a.SC,r=o.Let(r,a),l=r.x,f=r.y,c=(0,b.getWidth)(r),h=(0,b.getHeight)(r),s=s.c9(n,i);e&&!r.intersectRect(e)||r.intersectRect(s)&&(n=-1.5,(i=new F.Rect(l+(n=2007<a?-1:n),f+n,c+2,h+2)).x<s.x&&(i.width-=s.x-i.x,i.x=s.x),i.y=v(i.y,s.y),o.O1(i),t.save(),e&&!e.containsRect(r)&&(t.rect(e.x,e.y,(0,b.getWidth)(e),(0,b.getHeight)(e)),t.clip()),t.beginPath(),t.fillStyle=F.Pf.vl(u,u.getSelectionBorderColor()),t.fillRect(l,f,c,h),o.yet=new F.Rect(r.x,r.y,4,4),t.beginPath(),t.restore())},cet:function(t,n,i,r){var e=n.x,o=n.y,u=e+(0,b.getWidth)(n),n=o+(0,b.getHeight)(n);(0,b.paintDragLine)(t,e-2,o,u+1,o,i,r),(0,b.paintDragLine)(t,e-1,n,u+1,n,i,r),(0,b.paintDragLine)(t,e,o-1,e,n+1,i,r),(0,b.paintDragLine)(t,u,o-1,u,n+1,i,r)},Fet:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,c,w,m,y,_,y,u,y,f,l,C,u,D,y,l,i=this,r=i.Mf,e=r.rt,o=e.q6,u=o.hitTarget;o&&u&&(s=o.hitCol,a=o.hitRow,l=o.row,f=o.col,c=e.i_,h=r.Pet,d=r.getSelectionBorderColor(),g=(0,b.getLineStyle)(r),p=8,t.save(),!0===c?(c=r.Yy(0).findCol(s)||r.Yy(1).findCol(s)||r.Yy(2).findCol(s),w=r._y(0).findRow(a)||r._y(1).findRow(a)||r._y(2).findRow(a),-1===o.row&&-1!==o.col?c&&(m=c.x,y=(0,b.getWidth)(c),o.col=s,u.x>m+y/2&&(o.col<r.getLastFullyVisibleColumn()||o.col===r.G6())&&(m=c.x+(0,b.getWidth)(c),o.col++),(h=h&&0===(0,b.getWidth)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(m,o.y,0,(0,b.getHeight)(o)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,m-8,o.y,m+8,o.y,d,g),(0,b.paintDragLine)(t,m,o.y,m,o.y+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,o.y+(0,b.getHeight)(o),m+8,o.y+(0,b.getHeight)(o),d,g)):-1!==o.row&&-1===o.col?w&&(_=w.y,y=(0,b.getHeight)(w),o.row=a,u.y>_+y/2&&(o.row<r.getLastFullyVisibleRow()||o.row===r.P6())&&(_=w.y+(0,b.getHeight)(w),o.row++),(h=h&&0===(0,b.getHeight)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(o.x,_,(0,b.getWidth)(o),0),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,o.x,_-8,o.x,_+8,d,g),(0,b.paintDragLine)(t,o.x,_,o.x+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,o.x+(0,b.getWidth)(o),_-8,o.x+(0,b.getWidth)(o),_+8,d,g)):-1!==o.row&&-1!==o.col&&(u=r.Yy(0).findCol(f)||r.Yy(1).findCol(f)||r.Yy(2).findCol(f),y=r._y(0).findRow(l)||r._y(1).findRow(l)||r._y(2).findRow(l),w)&&c&&y&&u&&(m=u.x,_=y.y,h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),f=!1,l=r.getCellRect(a,s),(f=!e.Cnt&&l?(C=o.hitTarget.x-l.x)<j(16,r.nn(s)/4):f)?m=c.x:_=w.y,r.Uet=new F.Rect(m,_,(0,b.getWidth)(o),(0,b.getHeight)(o)),r.U5().contains(a,s)||(t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),f?((0,b.paintDragLine)(t,m-8,_,m+8,_,d,g),(0,b.paintDragLine)(t,m,_,m,_+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,_+(0,b.getHeight)(o),m+8,_+(0,b.getHeight)(o),d,g),e.Dnt=!0):((0,b.paintDragLine)(t,m,_-8,m,_+8,d,g),(0,b.paintDragLine)(t,m,_,m+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,m+(0,b.getWidth)(o),_-8,m+(0,b.getWidth)(o),_+8,d,g),e.Dnt=!1)))):(h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),u=r.U5(),l=(y=(D=(0,F.Ec)(o.row,o.col,o.rowCount,o.colCount)).union(u)).row,2<y.row&&(y.row-=3),l+y.rowCount+2<r.getRowCount()&&(y.rowCount+=3+l-y.row),i.E1(y,n)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),i.cet(t,o,d,g)),t.beginPath(),t.restore())},o_:function(){var t,n,i,r,i,e,o,u,s,a,l,f,c,s,l,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;i&&i.dragInfo&&r&&(i=t.J(),e=n.Fi(),o=n.rt.q6,u=n.j1(r),s=n.frozenTrailingColumnCount(),a=n.frozenTrailingRowCount(),l=n.getColumnCount()-s,f=n.getRowCount()-a,c=e.c9(1,1),0<s&&r.col+r.colCount<=l&&u.x+(0,b.getWidth)(u)>c.x+(0,b.getWidth)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),0<a&&r.row+r.rowCount<=f&&u.y+(0,b.getHeight)(u)>c.y+(0,b.getHeight)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),s=n.options.rightToLeft?new F.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new F.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),0<=(0,b.getWidth)(u)&&0<=(0,b.getHeight)(u)&&(o.x=u.x,o.y=u.y,o.width=(0,b.getWidth)(u),o.height=(0,b.getHeight)(u),t.Fet(i,s)),l=n.rt.i_,n.Pet=!0===l?n.Uet:new F.Rect(o.x,o.y,(0,b.getWidth)(o),(0,b.getHeight)(o)))}})},"./dist/plugins/fill/fill-ui.js":function(V,t,n){var i,H,u,N,e,s,a,o,r,l,n,f,c,h,v,d,g,p,w,m,y,_,C,P,q,D,F,b,j,R,T,M,x,L,n,k,B,W,$,I,O;function A(t,n,i,r,e,o){var t=t.Oi,u=t?"160px":"150px",t=t?"25px":"20px",u=s(a("div")).css([C,q,D,"padding",F],["block",u,t,0,0]).addClass("gc-smartMenu-item-default "+i+" ui-state-default"+l),t=s(a("div")).addClass(g).appendTo(u),i=s(a("div")).addClass("gc-menu-item-text").appendTo(u),n=s(a("input")).attr({id:n,value:e,type:"radio",name:"fill-group",style:"display:none"}).appendTo(t);return s(a("span")).text(r).appendTo(i),o?(t.addClass(d),n.prop("checked","checked")):n.prop("checked",""),u}function S(t,n,i){var t,r,t=I.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.ter=u.DialogFeatureType.fill,t.Mf=n,t.Het=s("."+w),(r=t.g$=t.Xc()).addClass(c),i&e.FillAction.smartMenuCopyCells&&A(n,"smartMenuCopyCells",f,k().CopyCells,"0",!0).appendTo(r),i&e.FillAction.smartMenuFillSeries&&A(n,"smartMenuFillSeries",f,k().FillSeries,"1").appendTo(r),i&e.FillAction.smartMenuFillFormattingOnly&&A(n,"smartMenuFillFormattingOnly",f,k().FillFormattingOnly,"2").appendTo(r),i&e.FillAction.smartMenuFillWithoutFormatting&&A(n,"smartMenuFillWithoutFormatting",f,k().FillWithoutFormatting,"3").appendTo(r),t}function E(t,n,i){var t,n,t=O.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.Mf=n,t.zet=i,n=t.Vet=t.Xc().addClass("gc-smart-tag-default "+w+" gc-no-user-select ui-widget-header"+l),t.Yet=s(a("div")).attr("class","fillSmartTag").css(m,y).appendTo(n),t.Zet=s(a("div")).attr("class","fillSmartTagDown").css([m,C],[y,"none"]).appendTo(n),t}i=this&&this.__extends||($=function(t,n){return($=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}$(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Aet=void 0,H=n("Common"),u=n("Core"),N=n("./dist/plugins/fill/fill.ns.js"),e=n("./dist/plugins/fill/fill-event.js"),s=u.GC$,a=u.mt.En,o=u.mt.gi,r=s(document),l=" btn btn-default",f="gc-fill-type-item",c="gc-fill-menu-container",h=(n="ui-state-hover ")+"gc-smartMenu-item-hover",v=n+"gc-smart-tag-hover",d="ui-icon ui-icon-check gc-check-image",g="gc-menu-item-input",p="ui-state-active gc-smart-tag-active",w="gc-tag-container",m="float",y="left",_="top",C="display",P="width",q="min-width",D="height",F="margin",b="change",j="input[type=radio]",R="mouseover",T="mouseout",M="click",x="fillTypeChanged",L="keydown.ui-fill",n=new H.Common.ResourceManager(N.SR,"Fill"),k=n.getResource.bind(n),I=u.zc,i(S,I),S.prototype.$c=function(){I.prototype.$c.call(this)},S.prototype.aY=function(){var e,t,n,e=this,t;s("."+f).bind(R,function(){s(this).addClass(h)}).bind(T,function(){s(this).removeClass(h)}).bind(M,function(){var t,n,i,r,i,t=s(this),n=e.Het,i=t.find(j),r=i[0];r.checked=!0,i.trigger(b),n.trigger(M),n.trigger(T),t.removeClass(h),i=parseInt(s(r).attr("value"),10),e.Wet(i)}),(n=e.g$.find(j)).bind(b,function(){s("."+g).removeClass(d),s(this).parent().addClass(d)})},S.prototype.Qet=function(){s("."+f).unbind(R).unbind(T).unbind(M),this.g$.find(j).unbind(b)},S.prototype.Wet=function(t){var n=this,i=n.Mf,r=i.rt;if(n.Ket!==t){n.Ket=t,i.cnt=!0,i.suspendEvent();try{u.Commands.undo.execute(i.parent,{sheetName:i.name()})}finally{i.resumeEvent()}i.cnt=!1,i.Qy().execute({cmd:"fill",sheetName:i.name(),startRange:r.Ktt,fillRange:r.Xnt,autoFillType:t,fillDirection:r.bO}),n.Het.trigger(x,t)}},S.prototype.Jet=function(){return!!s("."+c).length},B=S,O=u.zc,i(E,O),E.prototype.Xet=function(t,n,i){var r=this,e=r.Mf.Oi,n=s(n),o=r.qet,r=r.Zet,u=e?"38px":"32px",e=e?"24px":"18px";o&&o.Jet()||(t?n.addClass(v):n.removeClass(v),n.css([P,D],[t?u:e,e]),i)||(t?r.show():r.hide())},E.prototype.$et=function(){var e=this,t=e.Vet,n=u.mt.pi(),o=u.mt.Tt.safari&&(n.ipad||n.iphone);t.bind(R,function(){e.Xet(!0,this,o)}).bind(T,function(){e.Xet(!1,this,o)}),t.bind(M,function(){var t,n,i,r,n,i,t=s(this),n=e.qet,i=e.Zet,r;n&&n.Jet()?(o&&i.hide(),t.removeClass(p),e.tit()):(o&&i.show(),t.addClass(p),e.nit(),(i=(n=e.g$)&&n.find(j)[e.zet.fillType])&&!i.checked&&(i.checked=!0,s(i).trigger(b)))}),r.bind(L,function(t){27===t.keyCode&&(e.qet&&e.qet.Jet()?e.tit():e.close(),u.mt.vi(t))})},E.prototype.rQ=function(){var t=this,n=t.Vet,i=t.zet,r=t.Mf.Oi,e=r?"3px":"0px",r=r?"24px":"18px";n&&(n.css([y,_],[i.x,i.y]),t.$c(),t.$et(),t.Yet.css(F,e),t.Zet.css(D,r),t.c5())},E.prototype.nit=function(){var t,n,n,i,r,r,e,o,u,t=this,n=t.Mf;t.qet||(t.qet=new B(n.parent.j2(),n,this.zet.availableFillAction),t.g$=t.qet.Xc()),i=(n=t.Vet).css(y),r=n.css(_),r=parseFloat(r),o=t.qet,u=t.zet,o.Ket=u.fillType,isNaN(r)||(e=r+n.height()+2),t.g$.css([y,_],[i,e]),o.$c(),o.aY(),o.Het.unbind(x).bind(x,function(t,n){u.fillType=n})},E.prototype.RRe=function(){var t,n,i,r,e,i,t,i,o,t,u,n;this.rf()&&(e=-1===(i=(n=this.Mf).U5()).col?(r=n.C0(i.row+i.rowCount-1),n.S0(0)):(r=-1===i.row?n.C0(0):n.C0(i.row+i.rowCount-1),n.S0(i.col+i.colCount-1)),i=n.getRangeRect(r,e,i),t=null==(t=n.parent)?void 0:t.SC,i=n.Dn.Let(i,t),t=(o=n.Fi()).c9(r,e),u=3,i.intersectRect(t)?this.Vet.css([y,_],[i.x+3,i.y+3]):this.Vet.css(C,"none"),this.Vet.removeClass(p),n=this.qet)&&n.rf()&&n.close()},E.prototype.tit=function(){var t=this.qet;t&&(t.Qet(),t.close())},E.prototype.c5=function(){var t=this,n=t.qet,t=t.Vet;n&&(n.Jet()&&t.trigger(M),t.trigger(T))},E.prototype.close=function(){var t,n,t,t=this,n=t.Mf;t.c5(),r.unbind(L),O.prototype.close.call(this),(t=n.fg)&&(t.style.cursor="default"),!n||n.il&&n.il.XD||n.Zg()},E.prototype.lf=function(t){var n;return!(!this.Wc||!O.prototype.hf.call(this,this.Wc.get(0),t))||this.g$&&O.prototype.hf.call(this,this.g$.get(0),t)},t.Aet=E},"./dist/plugins/fill/fill.entry.js":function(t,n,i){var r,e,r=this&&this.__createBinding||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&("get"in e?n.__esModule:!e.writable&&!e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){t[r=void 0===r?i:r]=n[i]}),e=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-fill.js"),i("./dist/plugins/fill/fill-event.js"),i("./dist/plugins/fill/fill-render.js"),i("./dist/plugins/fill/drag-header-to-move/index.js"),e(i("./dist/plugins/fill/fill-ui.js"),n),e(i("./dist/plugins/fill/fill.js"),n),e(i("./dist/plugins/fill/fill.ns.js"),n)},"./dist/plugins/fill/fill.js":function(R,t,n){var i,e,h,r,T,n,k,o,tt,_,C,D,nt,I,u,O,M,u,A,S,it,rt,et,E,u,x,V,H,N,P,q,L,ot,B,W,u,n,$,z,U,n,G,K,J,Q,X,Y,Z,at,lt,ft,ct,ht,n,u,n,u,n,vt,dt,gt,pt,wt,mt,yt,_t,Ct,s,a,Dt,Ft;function ut(t){return!st(t)&&o.q8(t)}function st(t){return"string"==typeof t}function bt(t,n){return-1!==t.lastIndexOf(n)}function jt(t){var n=[t];return n.rowCount=1,n.colCount=M(t),n}function Rt(t){return t}function Tt(t,n,i,r){var n=jt(n),i=jt(i),r=jt([r]),t=t?e.Common.eit(n,i,r,!0,Rt,tt,tt,tt):e.Common.iit(n,i,r,!0,tt,tt,tt),n=t&&t[0][0];return typeof n===it?e.Common.st.E8(n,13):n}function Mt(t){return t.toLowerCase()}function l(t){this._indexes=[],this.oit=[],this.ait=[],this._type=tt,this.sit=[],this.cit=tt,this.lit=nt(t)?-1:t}function f(t){this.hit=-1,this.dit=[],this.MV=-1,this.Mf=t}function xt(){this.vit="",this.mit="",this.MV=0,this.git=1,this._padding=""}function c(t){var n,i,r,e,n=t.length,i=1;if(1<n)for(i=t[1]-t[0],e=2;e<n;e++)if(i!==(r=t[e]-t[e-1])){i=0;break}return i}function v(t,n){return 0<t?(t-1)%n:n-Math.abs(t)%n-1}function d(t){for(var n="",i=0;i<t;)n+="0",i++;return n}function g(t,n){return 12*(n.getFullYear()-t.getFullYear())+(n.getMonth()-t.getMonth())}function kt(t){return t.every(function(t){var n;return 1===t.getDate()})}function It(t){return t.every(function(t){var n,i,r,e,n=t.getFullYear(),i=t.getMonth(),r,e;return t.getDate()===new Date(n,i+1,0).getDate()})}function Ot(t){var n,i,n=0,i;return t.every(function(t){var t=t.getDate();return(n=n||t)===t})?n:0}function At(t,n){for(var i,r,e,o,i=t.length,r=!0,o=2;o<i&&(r=n===(e=g(t[o-1],t[o])));o++);return r}function St(t){return t.every(function(t){var n=t.getHours(),i=t.getMinutes(),t=t.getSeconds();return 0!==n||0!==i||0!==t})}function Et(t,n){return new Date(t,n+1,0).getDate()}function p(t){return"0"===t[0]}function Vt(n,t,i){var r,e,o,e,o,u,s,u=i?1:2,s=i?2:1;return t.every(function(t){return!!(r=t.match(n.pit))&&(e=r[u],(o=e.length)>n.yit&&p(e)&&(n.yit=o),o=parseInt(e,10),e=r[s],nt(n.cit)&&(n.cit=e),e!==n.cit?(n.wit=!0,n.cit=tt,n.sit=[]):n.sit.push(o),!0)})}function w(){}function Ht(){var t=null!==vt&&vt.apply(this,arguments)||this;return t.Mit=0,t._type=rt,t}function m(){return null!==dt&&dt.apply(this,arguments)||this}function y(){return null!==gt&&gt.apply(this,arguments)||this}function Nt(){return null!==pt&&pt.apply(this,arguments)||this}function Pt(){var t=wt.call(this)||this;return t.pit=tt,t.sit=[],t.cit=tt,t.wit=!1,t.yit=0,t._type=et,t.Cit=!1,t.Sit=!1,t.Tit=new W,t}function F(t){var n=mt.call(this)||this;return n.Ait=new B(t),n}function qt(){var t=null!==yt&&yt.apply(this,arguments)||this;return t.pit=/^\d+$/,t}function Lt(){var t=null!==_t&&_t.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)$/,t}function Bt(){var t=null!==Ct&&Ct.apply(this,arguments)||this;return t.pit=/^(\d+)(\D+.*)$/,t}function b(){var t=null!==s&&s.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)(\D+.*)$/,t}function Wt(){return null!==a&&a.apply(this,arguments)||this}function $t(){return null!==Dt&&Dt.apply(this,arguments)||this}function zt(){var t=null!==Ft&&Ft.apply(this,arguments)||this;return t.Cit=!0,t}function Ut(t){var n,i,i,t,r,e,o,n=this;n.Iit=[new $,new z,new U],n.xit=new at,n.Nit=new lt,i=V.culture(),i=V.Fe(i).isJCKCulture,t=new G(t),r=new K,e=new J,o=new Q,n.kit=i?[t,r,new Z,e,o,new X]:[t,r,e,o]}function Gt(t){t.forEach(function(t){t&&t.dispose()})}function j(t){this.Mf=t,this.Dit=!1,this._it=[]}i=this&&this.__extends||(ht=function(t,n){return(ht=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}ht(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Wtt=t.nnt=t.FillDateUnit=t.FillType=t.FillSeries=t.FillDirection=t.AutoFillType=void 0,e=n("Common"),h=n("Core"),r=n("CalcEngine"),T=n("SheetsCalc"),n=n("./dist/plugins/fill/fill.ns.js"),k=!!r,o=e.Common.lt,tt=null,_=void 0,C=Math.floor,D=h.Ec,nt=o.ht,I=o.uJ,u=e.Common.Uf,O=u.Eit,M=u.tR,u=e.Common.ct,A=u.o0,S=u.Y0,it="number",rt="date",et="string",E="default",u=new e.Common.ResourceManager(n.SR,"Fill"),x=u.getResource.bind(u),V=e.Common.CultureManager,(n=H=t.AutoFillType||(t.AutoFillType={}))[n.copyCells=0]="copyCells",n[n.fillSeries=1]="fillSeries",n[n.fillFormattingOnly=2]="fillFormattingOnly",n[n.fillWithoutFormatting=3]="fillWithoutFormatting",n[n.clearValues=4]="clearValues",n[n.auto=5]="auto",(u=N=t.FillDirection||(t.FillDirection={}))[u.left=0]="left",u[u.right=1]="right",u[u.up=2]="up",u[u.down=3]="down",(n=P=t.FillSeries||(t.FillSeries={}))[n.column=0]="column",n[n.row=1]="row",(u=q=t.FillType||(t.FillType={}))[u.direction=0]="direction",u[u.linear=1]="linear",u[u.growth=2]="growth",u[u.date=3]="date",u[u.auto=4]="auto",(n=L=t.FillDateUnit||(t.FillDateUnit={}))[n.day=0]="day",n[n.weekday=1]="weekday",n[n.month=2]="month",n[n.year=3]="year",l.prototype.jit=function(){return M(this._indexes)},l.prototype.Oit=function(){for(var t=this,n=[],i=t.oit,r,e,r=0;r<M(i);r++)e=i[r],n.push("object"===t._type?t.r0(e):e);return n},l.prototype.Rit=function(){var t,n,i,r,e,t=this,n=t._indexes;if(0<M(n)){for(r=[],e=void 0,-1===(i=t.lit)&&(i=n[0]),e=0;e<M(n);e++)r[e]=n[e]-i+1;return r}return tt},l.prototype.Bit=function(){var t=this.oit;return M(t)?t:tt},l.prototype.Eit=function(t,n,i){if(!ut(i))throw new Error(x().Exp_NumberOnly);var r=this;nt(r._type)&&(r._type=i instanceof Date?rt:it),O(r._indexes,t,n),O(r.oit,t,I(i))},l.prototype.ZP=function(t,n){var i=this,r=nt(i._type);ut(n)?(r&&(n instanceof Date?i._type=rt:i._type=it),i.oit.push(I(n))):r&&(i._type=st(n)?et:E),i._indexes.push(t),i.ait.push(n)},l.prototype.Lit=function(t){return this._type===rt?this.r0(t):t},l.prototype.r0=function(n){var i=tt;if(n instanceof Date)i=n;else if(r)try{i=r.Convert.r0(n)}catch(t){i=n}return i},ot=l,f.prototype.L0=function(){this.Mf=tt},f.prototype.Fit=function(){var t=this.Mf;return t.parent&&t.parent.Ow()||[]},f.prototype.Pit=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,n=t.length,i=!1;if(t&&0<n)for(r=Mt(t[0]),e=this.Fit(),f=l=a=s=u=o=void 0,o=0;o<e.length;o++)if(0<=(a=(s=(u=e[o]).map(Mt)).indexOf(r))){for(l=a,c=s.length,d=v=h=void 0,g=1;g<n;g++){if(v=Mt(t[g]),!(0<=(h=s.indexOf(v)))){i=!1;break}if(d=h-l+c,f){if(f!==d){i=!1;break}}else i=!0,f=d,l=h}if(p=1===n,i||p){i=!0,this.hit=a,this.dit=u,this.MV=p?1:f;break}}return i},f.prototype.Sl=function(t){var n=this.dit,i=this.hit,r=this.MV,e=n.length,o,u,u;return n[(i+r*v(t,e))%e]},B=f,xt.prototype.Sl=function(t){var t=this.MV*(t-1)+this.git,n=this._padding.length,t=""+Math.abs(t),i,r=this._padding+t,e=r.length,t=n<t.length?t:r.substr(e-n);return this.vit+t+this.mit},W=xt,w.prototype.match=function(t){return!1},w.prototype.getTargetValue=function(t,n,i,r,e){},w.prototype.resetProp=function(){},w.prototype.Git=function(t,n){return t.indexOf(n+1)},w.prototype.dispose=function(){},i(Ht,vt=u=w),i(m,dt=n=Ht),m.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=kt(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},m.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1);return new Date(r+parseInt(t/12,10),t%12,1)},$=m,i(y,gt=n),y.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=It(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},y.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),r=t%12;return new Date(n,r,Et(n,r))},z=y,i(Nt,pt=n),Nt.prototype.match=function(t){var n,i,r,e,o,u,n=!1;return St(t)||(i=this.Mit=g(t[0],t[1]),e=0<(r=Ot(t)),o=t.length,u=!0,this.Uit=r,e&&2<o&&(u=At(t,i)),n=e&&u),n},Nt.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),s;return new Date(n,t%12,this.Uit)},U=Nt,i(Pt,wt=u),Pt.prototype.resetProp=function(){this.sit=[],this.yit=0,this.cit=tt,this.wit=!1,this.Cit=!1,this.Sit=!1},Pt.prototype.getInternal=function(t){for(var n,i,r,e,n=!1,i=t[0],e=1;e<t.length;e++)if(r=t[e],1!==Math.abs(r-i)){n=!0;break}return n},i(F,mt=n=Pt),F.prototype.dispose=function(){var t=this;t.Ait&&(t.Ait.L0(),t.Ait=tt)},F.prototype.match=function(t){return this.Ait.Pit(t)},F.prototype.getTargetValue=function(t,n,i,r,e){var o,t=t.ait.length,i=this.Git(i,r),r=tt,u;return r=-1!==i?this.Ait.Sl(u=t*e+i+1):r},G=F,i(qt,yt=n),qt.prototype.match=function(t){var n=this,i,r,r;return t.every(function(t){return!!(i=t.match(n.pit))&&((r=t.length)>n.yit&&p(t)&&(n.yit=r),r=parseInt(t,10),n.sit.push(r),!0)})},qt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},K=qt,i(Lt,_t=n),Lt.prototype.match=function(t){return Vt(this,t,!1)},Lt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.vit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},J=Lt,i(Bt,Ct=n),Bt.prototype.match=function(t){return Vt(this,t,!0)},Bt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.mit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},Q=Bt,i(b,s=n),b.prototype.resetProp=function(){s.prototype.resetProp.call(this),this.Hit=tt},b.prototype.match=function(t){var n,i,r,i,n,r,e,e=this;return t.every(function(t){return!!(n=t.match(e.pit))&&(i=n[2],(r=i.length)>e.yit&&p(i)&&(e.yit=r),r=parseInt(i,10),i=n[1],nt(e.cit)&&(e.cit=i),n=n[3],nt(e.Hit)&&(e.Hit=n),i!==e.cit||n!==e.Hit?(e.wit=!0,e.cit=tt,e.Hit=tt,e.sit=[]):e.sit.push(r),!0)})},b.prototype.getTargetValue=function(t,n,i,r,e){var o=this,u=t.ait,s=o.Tit,a=c(o.sit),u=u.length,l=0!==a,n=l?0:v(n,u),i=o.Git(i,r),r=tt,f;return o.Cit=l,o.Sit=o.getInternal(t._indexes),-1!==i&&(s.vit=o.cit,s.mit=o.Hit,s.MV=a,s.git=o.sit[n],s._padding=d(o.yit),r=s.Sl(f=u*e+i+1)),r},Y=["-","_",":",".",","],i(Wt,a=X=b),Wt.prototype.resetProp=function(){a.prototype.resetProp.call(this),this.zit=tt},Wt.prototype.match=function(t){var r,e,o,r,e,o,u,s,u=this;return t.every(function(n){var t,t,t,i,t=u.zit;if(s=nt(t)?Y.some(function(t){if(bt(n,t))return u.zit=t,!0}):bt(n,t)){if(t=u.zit,t=n.lastIndexOf(t),r=n.substring(0,t+1),nt(u.cit))u.cit=r;else if(u.cit!==r)return!1;if(t=n.substr(t+1),r=t.match(i=/^(\d+)(\D+.*)$/))return e=r[1],(o=e.length)>u.yit&&p(e)&&(u.yit=o),o=parseInt(e,10),e=r[2],nt(u.Hit)&&(u.Hit=e),e!==u.Hit?(u.cit=tt,u.Hit=tt,!(u.sit=[])):(u.sit.push(o),!0)}return!1})},Z=Wt,i($t,Dt=u),$t.prototype.getTargetValue=function(t,n,i){return Tt(!0,t.Bit(),i,n)},at=$t,i(zt,Ft=u),zt.prototype.getTargetValue=function(t,n,i,r){var t=t.ait,e,o;return t[v(n,t.length)]},lt=zt,Ut.prototype.getRule=function(t,n){var i,r,e,o,u,i=[],r=this.Nit;for(t===rt?(i=this.Iit,r=this.xit):t===et?i=this.kit:t===it&&(r=this.xit),e=0;e<i.length;e++)if(u=void 0,(o=i[e]).resetProp(),o.match(n)){if(u=o.wit,nt(u)||!1===u)return o;if(!0===u)return r}return r},Ut.prototype.L0=function(){var t=this;t.Iit&&(Gt(t.Iit),t.Iit=tt),t.kit&&(Gt(t.kit),t.kit=tt),t.xit&&(t.xit.dispose(),t.xit=tt),t.Nit&&(t.Nit.dispose(),t.Nit=tt)},t.nnt=Ut,j.prototype.qtt=function(t,n,i,r,e){var o=this,t=t?1:2;nt(r)&&nt(e)?o.$tt(n,i,t):o.$tt(n,i,t,r,e,tt)},j.prototype.$tt=function(t,n,i,r,e,o){var u,s,t,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t,b,j,p,R,T,u=this,s=u.Mf,t=s.JS(t),a=t.row,l=t.col,f=t.rowCount,c=t.colCount;if(s.Ut.eE(a,l,f,c))throw new Error(x().Exp_RangeContainsMergedCell);for(m=0,_=(y=1===n)?c:f,D=y?a+f:l+c,F=(w=3<arguments.length)?1:_,b=(t=this.Mf.rt.Ktt).row===a&&t.rowCount===f&&t.col>l||t.col===l&&t.colCount===c&&t.row>a,h=C=y?a:l;h<D;h++)if(p=b&&w?a+f-1:a,(R=y?u.Vit(h,j=b&&w?l+c-1:l,1,F,n):u.Vit(p,h,F,1,n))&&R.jit())for(g=R._indexes[0],w?(p=b?R.oit[M(R.oit)-1]:R.oit[0],v=u.Yit(b,p,_,i,r,e,o),b&&(m=_-M(v),g=R._indexes[M(R._indexes)-1])):v=u.Zit(R,_,i),d=0;d<M(v);d++)T=R.Lit(v[d]),y?u.Wit(s,h,g,h,l+m+d,T,i):u.Wit(s,g,h,a+m+d,h,T,i)},j.prototype.Vit=function(t,n,i,r,e){for(var o=tt,u=this.Mf,s,a=1===e,l=a?n+r-1:t+i-1,f=a?n:t;f<=l;)ut(s=a?u.getValue(t,l):u.getValue(l,n))&&(o=o||new ot(f)).Eit(0,l,s),l--;return o},j.prototype.Yit=function(t,n,i,r,e,o,u){for(var s,a,l,f,c,h,v,s=[],a=n,f=0<=e,c=nt(o),l=0;l<i;l++)h=o<=a,v=a<=o,t&&(c||f&&h||!f&&v)?(s.unshift(a),1===r?a-=e:2===r?a/=e:3!==r||nt(u)||(a=this.Qit(!0,u,n,a,e,l+1))):!t&&(c||f&&v||!f&&h)&&(s.push(a),1===r?a+=e:2===r?a*=e:3!==r||nt(u)||(a=this.Qit(!1,u,n,a,e,l+1)));return s},j.prototype.Zit=function(t,n,i){var r=[],e,o=1===i;if(o||2===i){for(1===t.jit()&&t.ZP(t._indexes[0]+1,o?t.Lit(t.oit[0]+1):t.Oit()[0]),e=0;e<n;e++)r.push(Tt(!!o,t.Bit(),t.Rit(),e+1));return r}return tt},j.prototype.Jtt=function(t,n,i,r,e,o){var u,s,a,t,l,f,c,t,s,h,v,a,u=this,s=u.Mf,a=s.Ut,t=s.JS(t),l=t.row,f=t.col,c=t.rowCount,t=t.colCount,s=s.JS(s.rt.Ktt),h=s.row,v=s.col;if(a.GT(h,v,s.rowCount,s.colCount)||a.GT(l,f,c,t))throw new Error(x().Exp_ChangeMergedCell);return a=u.Kit(s,c,t,n,i,!(l<h||f<v),r,e,o),u.Jit&&u.Jit.IB&&(u.Jit.IB.reFilter(),delete u.Jit),a},j.prototype.Kit=function(t,n,i,r,e,o,u,s,a){var l=this,f=o?1:-1,c,h,v,d,g=t.row,p=t.col,w=t.rowCount,m=t.colCount;if(1===r){if(c=C(i/m),h=i%m,!e)for(d=1;d<c;d++)l.Mf.Y1r=d*f,v=D(g,p+d*f*m,w,m),l.Fhe(t,v,r,4,e,o,_,_,!0,u,s),l.Xit(t,v,r,4,e,o,_,_,!0,u,s),delete l.Mf.Y1r;if(e&&1<c&&0===h&&(c-=1,h=m),0<c&&0<h)return v=D(g,o?p+c*m:p-c*m+m-h,w,h),l.Fhe(t,v,r,4,e,o,tt,o?0:m-h,_,u,s),l.Xit(t,v,r,4,e,o,tt,o?0:m-h,_,u,s)}else{if(c=C(n/w),h=n%w,l.Dit||(v=D(g+f*w,p,n-w,i),l.qit(t,v,f,a)),!e)for(d=1;d<c;d++)v=D(g+d*f*w,p,w,m),l.Fhe(t,v,r,4,e,o,tt,tt,!0,u,s),l.Xit(t,v,r,4,e,o,tt,tt,!0,u,s);if(e&&1<c&&0===h&&(c-=1,h=w),0<c&&0<h)return v=D(o?g+c*w:g-c*w+w-h,p,h,m),l.Fhe(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s),l.Xit(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s)}},j.prototype.Xit=function(t,n,V,i,r,e,H,N,o,u,s){for(var a,l,P,f,c,h,v,d,q,g,L,p,B,w,W,m,y,_,C,D,F,b,$,z,U,j,R,T,M,G,x,k,c,K,I,J,Q,X,O,A,Y,S,E,Z,a=this,l=a.Mf,P=l.Ut,f=1===V,q=f?t.row:t.col,g=f?t.col:t.row,L=f?n.row:n.col,p=f?n.col:n.row,B=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,W=f?n.colCount:n.rowCount,v=0;v<B;v++){for(_=0,F=C=q+v,b=D=L+v,$=(f?N:H)||0,z=f?0:$,U=f?tt:o,j=y=m=tt;_<w;)if(M=void 0,G=R=g+_,x=T=p+_-$,f||(C=R,R=F,D=T,T=b),h=P.findSpan(C,R),M=l.getValue(C,R),(k=a.Dit)&&nt(j)&&(j=!1===e?l.getValue(g+w-1,R):l.getValue(C,R)),k||4!==i||!ut(M)&&!st(M)||l.hasFormula(C,R)||(m=m||new ot,c=ut(M)?M instanceof Date?rt:it:et,(y=y||c)!==c))if(!k&&M&&m&&m.jit()){if(d=a.$it(f,t,n,F,b,m,r,e,z,U,u,s),r&&d)return d;y=m=tt}else{if(k||!h||h&&(f?h.row:h.col)===F)if(c=x===p+W-1,K=k?j:M,r){if(k)return K;if(h&&c||!h&&(c&&e||!e&&x===p))return M}else!(x<p+W&&p<=x)||!k&&!f&&(f||o&&l.XT&&l.XT(x))||k&&-1!==a._it.indexOf(D)||a.Wit(l,C,R,D,T,K,i,u,s);h?_+=f?h.colCount:h.rowCount:_++}else m.ZP(G,M),h?_+=f?h.colCount:h.rowCount:_++;if(a.Dit)for(I=t.row,J=t.col,Q=t.rowCount,X=t.colCount,A=O=void 0,Y=!1===e?-1:1,S=1;S<Q;S++)for(O=I+Y*S,E=0;E<X;)A=J+E,Z=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),-1===a._it.indexOf(O)&&a.Wit(l,I,J,O,A,Z,i,u,s),E++;if(m&&m.jit()&&(d=a.$it(f,t,n,F,b,m,r,e,z,o,u,s),r)&&!nt(d))return d}return tt},j.prototype.Fhe=function(t,n,V,i,r,e,H,N,P,o,u){var s,a,q,l,f,c,h,v,d,L,g,B,p,W,w,$,m,y,_,C,D,F,b,j,z,U,R,T,M,x,G,k,c,c,h,I,K,J,Q,O,A,X,S,E,Y;if(!r){for(l=(q=(a=(s=this).Mf).Ut).Ehe(),L=(f=1===V)?t.row:t.col,g=f?t.col:t.row,B=f?n.row:n.col,p=f?n.col:n.row,W=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,$=f?n.colCount:n.rowCount,d=0;d<W;d++){for(_=0,F=C=L+d,b=D=B+d,j=(f?N:H)||0,z=f?0:j,U=f?tt:P,R=y=m=tt;_<w;)x=tt,G=T=g+_,k=M=p+_-j,f||(C=T,T=F,D=M,M=b),v=q.findSpan(C,T),c=a.getValueIgnoreDefault(C,T),nt(c)?_++:((c=l.getFormula(C,T))&&""!==c||(x=l.getValue(C,T)),(c=s.Dit)&&nt(R)&&(R=!1===e?l.getValue(g+w-1,T):l.getValue(C,T)),c||4!==i||!ut(x)&&!st(x)||(m=m||new ot,h=ut(x)?x instanceof Date?rt:it:et,(y=y||h)!==h)?!c&&x&&m&&m.jit()?(s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0),y=m=tt):((c||!v||v&&(f?v.row:v.col)===F)&&(h=c?R:x,!(k<p+$&&p<=k)||!c&&!f&&(f||P&&a.XT&&a.XT(k))||c&&-1!==s._it.indexOf(D)||s.Wit(a,C,T,D,M,h,i,o,u,!0)),v?_+=f?v.colCount:v.rowCount:_++):(m.ZP(G,x),v?_+=f?v.colCount:v.rowCount:_++));if(s.Dit)for(I=t.row,K=t.col,J=t.rowCount,Q=t.colCount,A=O=void 0,X=!1===e?-1:1,S=1;S<J;S++)for(O=I+X*S,E=0;E<Q;)Y=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),A=K+E,-1===s._it.indexOf(O)&&s.Wit(a,I,K,O,A,Y,i,o,u,!0),E++;m&&m.jit()&&s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0)}return tt}},j.prototype.qit=function(t,n,i,r){var e,o,u,n,s,a,n,l,f,t,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,e=this,o=e.Mf,u=o.tables,n=t.union(n),s=n.row,a=n.rowCount,n=t.row,l=t.col,f=t.rowCount,t=t.colCount;if(u)for(h=0,v=c=u.AB(n,l,f,t);h<v.length;h++){if(g=(d=v[h]).Ky,p=d.iw,w=a,r)for(m=0,y=r;m<y.length;m++)if((_=y[m]).row===g&&_.col===p){w=_.rowCount,e.Jit=d;break}if(C=d.IB,D=e._it,F=void 0,C&&C.isFiltered&&C.isFiltered()){for(b=0;b<w;b++)C.isRowFilteredOut(F=s+i*b)&&e._it.push(F);if(0<D.length){e.Dit=!0;break}}}if(j=o.IB,!0!==e.Dit&&j&&j.isFiltered&&j.isFiltered()){for(D=e._it,F=void 0,b=0;b<a;b++)j.isRowFilteredOut(F=s+i*b)&&e._it.push(F);0<D.length&&(e.Dit=!0)}},j.prototype.Wit=function(t,n,i,r,e,o,u,s,a,l){var f,c,c,c,u,f=t.Ut,c=t.isActualProtected()&&t.getCell(n,i).hidden();k&&!c&&(l?((c=f.Ehe().getExpression(n,i))&&t.hasFormula(n,i,3,!0)||!nt(t.getValueIgnoreDefault(n,i)))&&(0,h.copyDefaultFormula)(t,t,r,e,c):(t.hasFormula(n,i,3)||t.hasFormula(r,e,3))&&(t.setFormula(r,e,tt),0!==u&&4!==u||(t.getFormula(n,i)||f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression))&&T.CalcOperatorAdjustor.copyFormula(t,n,i,t,r,e,1,1,_,!0))),l||nt(t.getValueIgnoreDefault(n,i))&&!nt(f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Value))?f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression)||f.setDefaultValue(r,e,o,_,h.DefaultChangeValueType.Value):t.setValue(r,e,o),l||(c=a?0:64,s&&(c|=4224),t.vT(n,i,r,e,1,1,c=c|1024|256,_,!0),a)||(t.removeSpan(r,e,3),(u=f.findSpan(n,i))&&n===u.row&&i===u.col&&t.EL(r,e,u.rowCount,u.colCount,3))},j.prototype.$it=function(t,n,i,r,e,o,u,s,a,l,f,c,h){var v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,x,k,T,I,M,T,v=this,d=v.Mf,y=t?i.col:i.row,_=t?n.col:n.row,C=t?i.colCount:i.rowCount,D=t?n.colCount:n.rowCount;if(a=a||0,F=o.jit(),b=(y-_-a)/D,j=v.Cit(o._indexes,o.oit),R=o._type,j){for(w=[],p=0;p<F;p++)w[p]=p+1;g=F}else m=o._indexes[0],g=o._indexes[F-1]-m+1,1===F&&R!==et&&o.ZP(o._indexes[0]+1,o.Lit(o.oit[0]+1)),w=o.Rit();for(p=0;p<g;p++)if(T=o.ait,k=x=M=void 0,I=y+C-1,T=(M=(k=(M=R!==rt&&R!==et?M:d.tnt&&d.tnt.getRule(R,T))?(x=M.getTargetValue(o,g*b+p+1,w,p,b),j=M.Cit||j,T=M.Sit||!1,j&&!T):(x=Tt(!0,o.Bit(),w,g*b+p+1),j))?o._indexes[p]:m+p)+b*D,u){if(j&&(s&&T===I||!s&&T===y)||!j&&T+a===I)return o.Lit(x)}else T<y+C&&y<=T&&(t?l&&d.XT&&d.XT(r)||v.Wit(d,r,M,e,T,o.Lit(x),4,f,c,h):l&&d.XT&&d.XT(T)||v.Wit(d,M,r,T,e,o.Lit(x),4,f,c,h));return tt},j.prototype.Cit=function(t,n){var i,r,e,o,i=M(n);if(i<=1||M(t)!==i)return!1;for(r=t[1]-t[0],e=n[1]-n[0],o=2;o<i;o++)if(t[o]-t[o-1]!=r||n[o]-n[o-1]!=e)return!1;return!0},j.prototype.Xtt=function(t,n){var i=this,r=this.Mf,e=r.Ut.getSpans(),t=r.JS(t),o=t.row,u=t.col,s=t.rowCount,t=t.colCount,a,a=0===n?D(o,u+t-1,s,1):1===n?D(o,u,s,1):D(2===n?o+s-1:o,u,1,t);(a=r.nR(e,a))&&i.trt(a,o,u,s,t,n)},j.prototype.trt=function(t,n,i,r,e,o){var u=this,s=t.row,a=t.col,l=t.rowCount,f=t.colCount,c,h,v,d,g,p,w,m=u.Mf.Ut,y,g=0===o?(y=m.eE(n,i,r,e-f),p=0,w=-1*f,v=e,d=f,1):1===o?(y=m.eE(n,i+f,r,e-f),p=0,v=e,d=w=f,1):w=(d=2===o?(y=m.eE(n,i,r-l,e),p=-1*l,v=r,l):(y=m.eE(n+l,i,r-l,e),v=r,p=l),0);if(y)throw new Error(x().Exp_TargetContainsMergedCells);if(v%d!=0)throw new Error(x().Exp_MergedCellsIdentical);for(c=C(v/d),h=1;h<c;h++)u.Xit(t,D(s+h*p,a+h*w,l,f),g,0,_,_,_,_,!0)},j.prototype.Qit=function(t,n,i,r,e,o){var u,t,s,a,u=t?-1:1,t=C(o*e),s=Math.abs(e),a=S(1<n?i:r);if(0===n)a.setDate(a.getDate()+u*e);else if(1===n)for(;0<s;)a.setDate(a.getDate()+u*(0<e?1:-1)),6!==a.getDay()&&0!==a.getDay()&&s--;else 2===n?a.setMonth(a.getMonth()+u*t):a.setFullYear(a.getFullYear()+u*t);return A(a)},t.Wtt=j},"./dist/plugins/fill/fill.ns.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var i=i("./dist/plugins/fill/fill.res.en.js");n.SR={en:i}},"./dist/plugins/fill/fill.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Exp_ChangePartOfArray=n.Exp_RangeIsNull=n.Exp_CellReadOnly=n.Exp_RowReadOnly=n.Exp_ColumnReadOnly=n.Exp_ChangeMergedCell=n.Exp_FillCellsReadOnly=n.Exp_FillRangeContainsMergedCell=n.Exp_MergedCellsIdentical=n.Exp_TargetContainsMergedCells=n.Exp_RangeContainsMergedCell=n.Exp_NumberOnly=n.FillWithoutFormatting=n.FillFormattingOnly=n.FillSeries=n.CopyCells=void 0,n.CopyCells="Copy Cells",n.FillSeries="Fill Series",n.FillFormattingOnly="Fill Formatting Only",n.FillWithoutFormatting="Fill Without Formatting",n.Exp_NumberOnly="Only works for Numbers",n.Exp_RangeContainsMergedCell="Range should not have merged cells.",n.Exp_TargetContainsMergedCells="Target range should not have merged cells.",n.Exp_MergedCellsIdentical="This operation requires the merged cells to be identically sized.",n.Exp_FillRangeContainsMergedCell="Cannot fill range that contains a merged cell.",n.Exp_FillCellsReadOnly="The cells you are trying to fill are protected and therefore read-only.",n.Exp_ChangeMergedCell="Cannot change part of merged cell.",n.Exp_ColumnReadOnly="The column you are trying to change is protected and therefore read-only.",n.Exp_RowReadOnly="The row you are trying to change is protected and therefore read-only.",n.Exp_CellReadOnly="The cell you are trying to change is protected and therefore read-only.",n.Exp_RangeIsNull="range is null",n.Exp_ChangePartOfArray="Cannot change part of an array."},"./dist/plugins/fill/utils.js":function(t,n,i){var f,o,u,c,s,h;function r(t){return t.rowViewportIndex}function e(t){return t.colViewportIndex}function a(t){return t.frozenRowCount()}function l(t){return t.frozenColumnCount()}function v(t){return t.hitTestType}function d(t,n){return t.getRowCount(n)}function g(t,n){return t.getColumnCount(n)}function p(t){return t.colCount}function w(t){return t.rowCount}function m(t){return t.height}function y(t){return t.width}function _(t){var n,t,n=7,t=t.parent;return n=t?2007<t.SC?2:7:n}function C(t,n,i,r,e,o,u){var s,a,l;t.save(),o=o||h,u=u||2,n===r?(t.rect(n-2,i,7,c(e-i)),t.clip(),t.beginPath(),i<e?(i-=3,e+=3):(i+=3,e-=3),s=(0,f.Zx)(n-1,i-1,r-1,e+1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n+1,i-1,r+1,e+1,o,u)):i===e&&(t.rect(n,i-2,c(r-n),7),t.clip(),t.beginPath(),n<r?(n-=3,r+=3):(n+=3,r-=3),s=(0,f.Zx)(n-1,i-1,r+1,e-1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n-1,i+1,r+1,e+1,o,u)),s&&s.qx(t),a&&a.qx(t),l&&l.qx(t),t.strokeStyle=o,t.stroke(),t.beginPath(),t.restore()}function D(t,n,i,r,e){for(var o,u,s,o=0;o<i.rowCount;o++){for(u=0;u<i.colCount;u++){if(!(s=t.getSpan(i.row+o,i.col+u))||s.rowCount!==n.rowCount||s.colCount!==n.colCount)return!1;r&&(u+=n.colCount)}e&&(o+=n.rowCount)}return!0}function F(t,n,i){var r,e,o,u,s,a,l,f,e,u,r,r=n.row,e=n.rowCount,o=n.col,u=n.colCount,s=i.row,a=i.rowCount,l=i.col,f=i.colCount,e=r===s&&e===a,u=o===l&&u===f;return(e||u)&&!(!(r=t.getSpan(r,o))||!D(t,r,n,e,u)||t.Ut.GT(s,l,a,f))&&D(t,r,i,e,u)}function b(t){return t.x+t.width}function j(t){return t.y+t.height}function R(t,n){var i,r,r,e,r,o,i=t.rt.eD(),r=t.Yy(i);return(r=r&&r.findNearX(n,t.options.rightToLeft))?(e=t.Fi(),r=r.col,1===i&&n<e.Py&&(o=t.Sw())<r&&t.O5(r-1)||r):-1}function T(t,n){var i,i,i,r,i,e,i=t.rt.nD(),i=t._y(i);return(i=i&&i.findNearY(n,t.options.rightToLeft))?(r=t.Fi(),i=i.row,n<r.Cy&&(e=t.pw())<i&&t.j5(i-1)||i):-1}function M(t){t.dragHeaderToMoveInfo&&(t.dragHeaderToMoveInfo.dragColumn?t.rowViewportIndex<0&&(t.rowViewportIndex=0):t.colViewportIndex<0&&(t.colViewportIndex=0),t.hitTestType=3)}function x(t,n){var i,r,e,t,i,r,e,t;return t||n?!t&&n?n:t&&!n?t:(i=t.x,r=t.y,e=b(t),t=j(t),i=u(i,n.x),r=u(r,n.y),e=s(e,b(n)),t=s(t,j(n)),new f.Rect(i,r,e-i,t-r)):o}function k(t){return t.frozenColumnCount()>=t.getColumnCount()?0:0<t.frozenTrailingColumnCount()?2:1}function I(t){return t.frozenRowCount()>=t.getRowCount()?0:0<t.frozenTrailingRowCount()?2:1}function O(t){var n,i,n,r,n,e,o,t,u,s,n=t.Fi(),i,n=t.options.rightToLeft?n.c9(0,2):n.c9(0,0),r=n.x,n=n.y,e=k(t),o=I(t),t=t.Dn.uO(o,e),u,s;return{minPoint:{x:r,y:n},maxPoint:{x:b(t),y:j(t)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSheetVPortBoundary=n.mergeRect=n.fixHitTestInfo=n.getHitRowIndex=n.getHitColumnIndex=n.getEndY=n.getEndX=n.canDragFillSpan=n.hasSameSpan=n.paintDragLine=n.getLineStyle=n.getWidth=n.getHeight=n.getRowCount=n.getColCount=n.getSheetColumnCount=n.getSheetRowCount=n.getHitTestType=n.getFrozenColumnCount=n.getFrozenRowCount=n.getColViewportIndex=n.getRowViewportIndex=void 0,f=i("Core"),o=null,u=Math.min,c=Math.abs,s=Math.max,h="black",n.getRowViewportIndex=r,n.getColViewportIndex=e,n.getFrozenRowCount=a,n.getFrozenColumnCount=l,n.getHitTestType=v,n.getSheetRowCount=d,n.getSheetColumnCount=g,n.getColCount=p,n.getRowCount=w,n.getHeight=m,n.getWidth=y,n.getLineStyle=_,n.paintDragLine=C,n.hasSameSpan=D,n.canDragFillSpan=F,n.getEndX=b,n.getEndY=j,n.getHitColumnIndex=R,n.getHitRowIndex=T,n.fixHitTestInfo=M,n.mergeRect=x,n.getSheetVPortBoundary=O},Common:function(t){t.exports=n.Spread},CalcEngine:function(t){t.exports=n.Spread.CalcEngine},Core:function(t){t.exports=n.Spread.Sheets},SheetsCalc:function(t){t.exports=n.Spread.Sheets.CalcEngine},Touch:function(t){t.exports=n.Spread.Sheets.Touch}},r={},t=e("./dist/plugins/fill/fill.entry.js"),(((n=void 0===n?{}:n).Spread=n.Spread||{}).Sheets=n.Spread.Sheets||{}).Fill=t}()});
12
+ !function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-calc-engine","@grapecity-software/spread-sheets-core","@grapecity-software/spread-sheets-calc-engine"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-calc-engine"),require("@grapecity-software/spread-sheets-core"),require("@grapecity-software/spread-sheets-calc-engine"),exports.Spread=t(n)):t(GC)}(function(n){!function(){"use strict";var i,r,t;function e(t){var n,n,n=r[t];return void 0!==n||(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e)),n.exports}i={"./dist/plugins/fill/drag-fill.js":function(F,t,n){var i,c,k,h,t,r,e,I,s,O,A,S,v,n,x,E,r,l,b,u,V,H,N,P,d,o,a,f,g,t,p,w,m,j,R,T,M,y,L,B,W;function $(t,n,i,r,e,o,u,s,a,l,f){var c=n?k.Events.DragDropBlock:k.Events.DragDropBlockCompleted,i={sheet:t,sheetName:t.name(),fromRow:i,fromCol:r,toRow:e,toCol:o,rowCount:u,colCount:s,copy:a,insert:l,copyOption:f};return n&&(i.cancel=!1),t.ki(c,i),i}function z(t,n,i,r){return t&&n&&n.containsRange(t)&&(!O(i)&&(1===i&&t.row===n.row&&(0,I.getRowCount)(t)===(0,I.getRowCount)(n)||0===i&&t.col===n.col&&(0,I.getColCount)(t)===(0,I.getColCount)(n))||!(O(r)||(2!==r&&3!==r||t.col!==n.col||(0,I.getColCount)(t)!==(0,I.getColCount)(n))&&(0!==r&&1!==r||t.row!==n.row||(0,I.getRowCount)(t)!==(0,I.getRowCount)(n))))}function _(t,n){var i,r,e,o,u,s,a,l,f,c,a,i=L.call(this)||this,r=i,e=n[P],o=0===e,u=o||1===e,s=n[H],a=n[V],l=a.row,f=a.col,c=(0,I.getRowCount)(a),a=(0,I.getColCount)(a);return r.Mf=t,4===(r.Ftt=n)[N]?r.Ptt=new k.Commands.JI(t,{ranges:[n[H]]}):r.Gtt=u?v(l,o?s.col:f,c,a+(0,I.getColCount)(s)):v(2===e?s.row:l,f,c+(0,I.getRowCount)(s),a),r.Utt=u?1:0,i}function C(t,n){var i,r,i=B.call(this)||this,r=i;return r.Mf=t,r.Htt=n,r.ztt=n[V],r.Vtt=n[H],r.Ytt=n[N],r.Ztt=n[P],i}function q(t,n,i,r,e,o){var u,r,e,n,u=t.getSelections();t.IA(),t.n4(n,i,r,e,!0),r=t.getSelections(),e=0<n?n:t.N9(),n=0<i?i:t.k9(),t.O6(e,n,t.R9,t.B9),t.jA(u),t.parent&&o._oldPosition&&t.parent.changeSelectionInCommandExecuting(o,null,null,r)}function U(t){var n;t.parent.repaint()}function D(t,n){var i,n,i=this;return(i=W.call(this,t,n)||this).MU=null!=(n=n.option)?n:t.lF,i}i=this&&this.__extends||(y=function(t,n){return(y=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}y(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),c=n("Common"),k=n("Core"),h=n("./dist/plugins/fill/fill.js"),t=n("./dist/plugins/fill/fill.ns.js"),r=n("CalcEngine"),e=n("Touch"),I=n("./dist/plugins/fill/utils.js"),s=!!r,O=c.Common.lt.ht,A=null,S=void 0,v=k.Ec,n=k.GC$,x=Math.max,E=Math.floor,r=k.Commands.ActionBase,l=k.Commands.CI,b=k.Commands.SI,u=k.CopyToOptions.all,V="startRange",H="fillRange",N="autoFillType",P="fillDirection",d="cancel",o="fill",a="dragDrop",f=n.isEmptyObject,g="onLayoutChanged",t=new c.Common.ResourceManager(t.SR,"Fill"),p=t.getResource.bind(t),w="gc-drag-header-mask",m="gc-drag-header-indicator",n.extend(k.Worksheet.prototype,j={fillAuto:function(t,n,i){if(!n)throw new Error(p().Exp_RangeIsNull);var r=this,e=i.fillType,o=i.series,u=i.direction,s=i.step,a=i.stop,l=new h.Wtt(r),f=i.Qtt;if(z(t,n,u?A:o,u)){r.suspendPaint(),t&&(r.rt.Ktt=t);try{4===e?l.Jtt(n,o,!1,i.withTag,i.withoutStyle,f):0===e?l.Xtt(n,u):1===e||2===e?l.qtt(1===e,n,o,s,a):3===e&&l.$tt(n,o,3,s,O(a)?A:c.Common.ct.o0(a),i.unit)}finally{r.resumePaint()}}},tBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderMaskBackColor)||k.I.fl(w).backgroundColor},nBe:function(){var t,t;return(null==(t=null==(t=null==this?void 0:this.parent)?void 0:t.options)?void 0:t.dragHeaderIndicatorColor)||k.I.fl(m).borderTopColor}}),k.Worksheet.ch(o,{init:function(){this.tnt=new h.nnt(this)},setHost:function(t){var t;t&&((t=this.Qy())[o]||t.register(o,k.Commands[o]),t[a]||t.register(a,k.Commands[a]),this.D3(k.Events.TopRowChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(k.Events.LeftColumnChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.RRe()}),this.D3(k.Events.ViewZoomed+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.EditStarted+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.FloatingObjectSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}),this.D3(k.Events.ShapeSelectionChanged+"."+o,function(t,n){var n=n.sheet.R_;n&&n.close()}))},dispose:function(t){var t;!1!==t.clearCache&&(t=this).tnt&&(t.tnt.L0(),t.tnt=A),this._3(k.Events.TopRowChanged+"."+o),this._3(k.Events.LeftColumnChanged+"."+o),this._3(k.Events.ViewZoomed+"."+o),this._3(k.Events.EditStarted+"."+o),this._3(k.Events.FloatingObjectSelectionChanged+"."+o),this._3(k.Events.ShapeSelectionChanged+"."+o)},preProcessKeyDown:function(t){var n=this.R_;n&&n.close()},preProcessMouseDown:function(t){var n=this.R_;n&&n.close()},preProcessContextMenu:function(t){var n=this.R_;n&&n.close()}}),k.Workbook.ch(o,{onCultureChanged:function(){p()}}),k.Hv.ch(o,{preProcessMouseDown:function(t){var n,n,n=(0,k.jf)(this.Vv),n=n&&n.R_;n&&n.close()}}),k.Of.touch&&e.TouchEventHandler.ch(o,{preProcessManipulationStarted:function(t){var n=this.Mf.R_;n&&n.close()},preProcessTapped:function(t){var n=this.Mf.R_;n&&n.close()},preProcessDoubleTapped:function(t){var n=this.Mf.R_;n&&n.close()}}),window.gcGlobal.wf.push(function(t,n){var n;n&&!k.util.jBe(n,t)||null!=(n=t.R_)&&n.close()}),i(_,L=r),_.prototype.canExecute=function(){var t=this,n=t.Mf,t=t.Ftt,i=t[V],r=t[H];return!(!n.PT(r.row,r.col,(0,I.getRowCount)(r),(0,I.getColCount)(r),{isIgnoreFilterOutRow:!0,sheetArea:k.SheetArea.viewport})||4!==t[N]&&r.intersect(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)))},_.prototype.execute=function(){var t,n,i,r,e,o,o,t=this;if(t.canExecute()){i=(n=t.Ftt)[H],e=(r=t.Mf).parent.i4(),k.Commands.II(e),t.X5(r,!0);try{s&&r.suspendCalcService(),o=r.getSelections(),r.isDirtySuspended()||(t.ent=new l(r,n[H],u)),4===n[N]?t.int(r):t.rnt(r),r.EA(o,r.getSelections())&&r.jA(o)}finally{t.q5(r,!0),s&&r.resumeCalcService(!1),k.Commands.xI(e,n),r.Q1i&&r.Q1i(i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i)),o=[],r.isDirtySuspended()||(t.ont=new l(r,i,u),t.ont.yI(t.ent.bI()),o=t.ont.MI()),b(r,i.row,i.col,(0,I.getRowCount)(i),(0,I.getColCount)(i),o,1)}}},_.prototype.int=function(t){var n,i,r,i,n,e,o,e,o,n,n=this;n.Ptt.execute(t),r=(i=n.Ftt)[V],i=i[H],n=0===n.Utt,o=(0,I.getRowCount)(r),e=(0,I.getColCount)(r),o=n?x(1,o-(0,I.getRowCount)(i)):o,n=n?e:x(1,e-(0,I.getColCount)(i)),r.equals(i)||(e=v(r.row,r.col,o,n),t.O6(x(t.N9(),e.row),x(t.k9(),e.col),t.R9,t.B9),t.IA(),t.n4(e.row,e.col,(0,I.getRowCount)(e),(0,I.getColCount)(e)))},_.prototype.rnt=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,r,T,M,n=this,i=n.Mf,r=n.Ftt,e=r[V],o=r[H],u=r[N],s=n.Gtt,f={fillType:4,series:n.Utt,withTag:!0,withoutStyle:!(i.lF&k.CopyToOptions.style)},c=i.tables,h=!1,v=new k.Range(s.row,s.col,s.rowCount,s.colCount);if(c)try{p=0===(d=r[P]),w=3===d,(g=2===d)&&(m=e.rowCount,y=0===c.AB(e.row,e.col,m,e.colCount).length)&&(h=!0,v.rowCount-=m),p&&(_=e.colCount,y=0===c.AB(e.row,e.col,e.rowCount,_).length)&&(h=!0,v.colCount-=_),w&&(_=e.colCount,1===(C=c.AB(e.row,e.col,e.rowCount,_)).length)&&(F=(D=C[0]).dataRange(),D.showFooter())&&o.row+o.rowCount-1>=D.footerIndex()&&(o.rowCount=F.rowCount-(o.row-F.row),s.rowCount=F.rowCount-(s.row-F.row)),b=[],j=[],c.yx(A,v,S,S,S,b,{applyDragFillAfterTableExpand:h,backupTableResizedArgs:j}),0<b.length&&(f.Qtt=b),n.eke=j}catch(t){return i.jT(6,t.message),void i.resumePaint()}if(1===u){if(i.fillAuto(e,s,f),i.lF&k.CopyToOptions.style&&i.Ut.eE(e.row,e.col,e.rowCount,e.colCount))for(a=0;a<o.rowCount;a++)for(l=0;l<o.colCount;l++)(R=i.vI(e.row+E(a%e.rowCount),e.col+E(l%e.colCount)))&&R.clone&&(R=R.clone()),i.CL(o.row+a,o.col+l,R)}else 0===u?(r=i.lF&~k.CopyToOptions.comment,n.ant(e,o,r)):2===u?n.ant(e,o,4320):3===u&&((T=!(1!==(0,I.getRowCount)(e)||1!==(0,I.getColCount)(e)||-1===e.row&&-1!==e.col||-1===e.col&&-1!==e.row))?n.ant(e,o,M=4251):(f.withoutStyle=!0,i.fillAuto(e,s,f)));i.O6(x(t.N9(),s.row),x(t.k9(),s.col),t.R9,t.B9),t.IA&&t.IA(),i.n4(s.row,s.col,(0,I.getRowCount)(s),(0,I.getColCount)(s))},_.prototype.ant=function(t,n,i){var r,e,t,n,o,u,s,a,l,f,c,h,t,v,d,g,n,p,t,w,r,r,m,y,_,r=this,e=r.Mf,t=e.JS(t),n=e.JS(n),o=t.row,u=t.col,s=(0,I.getRowCount)(t),a=(0,I.getColCount)(t),l=n.row,f=n.col,c=(0,I.getRowCount)(n),h=(0,I.getColCount)(n),t=r.Ftt[P],v=3===t,d=1===t,g=E(c/s),n=c%s,p=E(h/a),t=h%a;if(e.HB=!0,_=function(t,n){return e.isActualProtected()&&e.getCell(t,n).hidden()},0===r.Utt){for(w=0;w<g;w++)m=v?l+w*s:l+c-(w+1)*s,_(o,u)&&(i&=~k.CopyToOptions.formula),e.vT(o,u,m,f,s,a,i,!0,!0);0!=n&&(m=v?l+s*g:l+c-g*s-n,_(r=v?o:o+(g+1)*s-c,u)&&(i&=~k.CopyToOptions.formula),e.vT(r,u,m,f,n,a,i,!0,!0))}else{for(w=0;w<p;w++)y=d?f+w*a:f+h-(w+1)*a,_(o,u)&&(i&=~k.CopyToOptions.formula),e.Y1r=y-u,e.vT(o,u,l,y,s,a,i,!0,!0),delete e.Y1r;0!=t&&(y=d?f+a*p:f+h-p*a-t,_(o,r=d?u:u+(p+1)*a-h)&&(i&=~k.CopyToOptions.formula),e.vT(o,r,l,y,s,t,i,!0,!0))}delete e.HB,e.recalcRange(l,f,c,h)},_.prototype.undo=function(){var t,n,i,r,e,o,u,t=this,n=t.Mf,i=!1;if(t.canUndo()){t.X5(n,!0);try{s&&n.suspendCalcService(),r=n.getSelections(),e=t.Ftt,o=n.R_,u=e[H],i=4===e[N]?t.unt(n):t.snt(n),!n.cnt&&o&&o.close(),b(n,u.row,u.col,(0,I.getRowCount)(u),(0,I.getColCount)(u),t.ont?t.ont.MI():[],1,S,!0),n.EA(r,n.getSelections())&&n.jA(r)}finally{t.q5(n,!0),s&&n.resumeCalcService(!1)}}return i},_.prototype.unt=function(t){var n,i,r,i,e,n=this,i=n.Ftt[V],r=i.row,i=i.col,e=k.Commands.TI(t.name());return t.Ut.undo(n.Ftt[e]),t.O6(x(t.N9(),r),x(t.k9(),i),t.R9,t.B9),!0},_.prototype.snt=function(t){var n,i,r,e,r,o,n,i=this.Ftt,r=i[V],e=r.row,r=r.col;s&&t.suspendCalcService();try{o=k.Commands.TI(t.name()),t.Ut.undo(i[o]),t.O6(x(t.N9(),e),x(t.k9(),r),t.R9,t.B9)}finally{s&&t.resumeCalcService(!1)}return t.invalidateLayout(),!0},R=_,i(C,B=r),C.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,t=this,n=!1;if(t.canExecute()){r=(i=t.Mf).parent,e=t.Vtt,o=t.Htt,u=i.parent.i4(),k.Commands.II(u),t.XI(),t.X5(i,!0),i.QI=!0;try{s=i.getSelections(),a=void 0,l=i.rt,(f={sheet:i,sheetName:i.name(),cancel:!1})[H]=e,f[N]=t.Ytt,f[P]=t.Ztt,i.ki(k.Events.DragFillBlock,f),l.fnt=f[N],l.lnt=f[d],f[d]||(t.hnt(f),i.ki(k.Events.DragFillBlockCompleted,f)),n=!0,a=i.getSelections(),i.EA(s,a)&&i.jA(s),r&&o._oldPosition&&r.changeSelectionInCommandExecuting(o,null,null,a)}finally{t.dnt(i,e),t.q5(i,!0),i.QI=!1,k.Commands.xI(u,t.Htt)}}return n},C.prototype.hnt=function(t){var n,i,r,e,o,r,e,n=this,i=n.Mf,r=i.rt,e=n.Vtt,o=n.Ytt;r.fnt=o,r.lnt||((r={})[V]=n.ztt,r[H]=e,r[N]=5===t[N]?o:t[N],r[P]=n.Ztt,e=new R(i,r),i.suspendEvent(),e.execute(),i.resumeEvent(),n.Htt.vnt=e)},C.prototype.XI=function(){var t=this;t.Mf.isDirtySuspended()||(t.ent=new l(t.Mf,t.Vtt,u))},C.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,n=this;if(n.canUndo()){i=n.Mf,r=n.Vtt,e=i.parent,o=n.Htt,n.XI(),n.X5(i,!0);try{u=i.getSelections(),i.suspendEvent(),i.Nj=!0,s=i.parent.i4(),k.Commands.NI(s,o),i.Nj=!1,i.resumeEvent(),a=o[V],i.EA(u,[a])&&i.jA(u),e&&o._oldPosition&&e.changeSelectionInCommandExecuting(o,null,null,[a]),(0,k.handleRestoredTableResizedArgs)(null==(t=o.vnt)?void 0:t.eke)}finally{n.dnt(i,r,!0),n.q5(i,!0)}}return!0},C.prototype.dnt=function(t,n,i){var r,e,o,r=this,e=[];t.isDirtySuspended()||((o=new l(t,n,u)).yI(r.ent.bI()),e=o.MI());try{b(t,n.row,n.col,(0,I.getRowCount)(n),(0,I.getColCount)(n),e,1,S,i)}catch(t){}},T=C,i(D,W=r),D.prototype.Spn=function(){return this.MU},D.prototype.PBe=function(t){this.MU=t},D.prototype.canExecute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,l,v,d,g,p,l,t=this,n=t.Mf,i=t.tT,r=i.fromRow,e=i.fromColumn,o=(0,I.getRowCount)(i),u=i.columnCount,s=i.toRow,a=i.toColumn,l=!i.copy,f,c;if(n.tables&&n.tables.mx(n,{row:r,col:e,rowCount:o,colCount:u},n,{row:s,col:a,rowCount:o,colCount:u},l))return!1;if(!n.zT(r,e,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(s,a,o,u,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(i.cmd===k.RangeChangedAction[0]&&n.tables&&(h=!1,0<(l=n.tables.AB(r,e,o,u)).length)){for(d=(v=l[0].range()).row;d<v.row+v.rowCount;d++)if(n.isRowFilterOut(d)){h=!0;break}return!(h&&v.contains(i.mouseTargetRow,i.mouseTargetCol,1,1))}return l=t.mnt(g=0<=s&&a<0&&0<=r&&e<0&&0<o&&u<0,p=s<0&&0<=a&&r<0&&0<=e&&o<0&&0<u),n.PT(s,a,o,u,{isAllowDragInsert:l,sheetArea:k.SheetArea.viewport})&&n.PT(r,e,o,u,{isAllowDragInsert:l,sheetArea:k.SheetArea.viewport})},D.prototype.mnt=function(t,n){var i,r,i,r,e,i,e,i,i=this,r=i.tT,i=i.Mf,r=r.insert,e=i.isActualProtected(),i=i.options.protectionOptions;return!(!e||f(i)||(e=i.allowDragInsertRows,i=i.allowDragInsertColumns,!r)||!(e&&t||i&&n))},D.prototype.execute=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,x,t=this,n=!1;if(t.canExecute()){if(i=t.Mf,r=t.tT,e=i.parent.i4(),o=r.fromRow,u=r.fromColumn,s=r.toRow,a=r.toColumn,l=r.columnCount,f=r.insert,c=r.copy,h=r.rowCount,k.Commands.II(e),(v=$(i,!0,o,u,s,a,h,l,c,f,i.lF)).cancel)return void k.Commands.xI(e,r);t.XI(),p=g=d=void 0,w=h,m=l,(y=i.o5())&&(w+=i.lT(s,h,!0),m+=i.lT(a,l)),t.X5(i,!0),i.QI=!0,_=void 0;try{this.PBe(v.copyOption);try{C=[],_={shiftCells:r.insert&&r.shiftCells===k.InsertShiftCell.down,isCopy:r.copy,isFirst:!0},i.tables&&i.tables.yx(i,new k.Range(s,a,w,m),new k.Range(o,u,h,l),A,A,A,{shiftInfo:_,backupTableResizedArgs:C}),r.Kh.eke=C}catch(t){return i.jT(6,t.message),void i.resumePaint()}r.insert?0<=u&&o<0?(d=u,p=l,D=g=a,this.Jcr(i,d,g,p)&&(i.WBe(g,p,S,{ignoreExpand:!0}),r.copy?i.copyTo(-1,g<=d?d+p:d,-1,g,-1,p,this.Spn()):(i.moveTo(-1,g<=d?d+p:d,-1,g,-1,p,this.Spn(),void 0,i.getRowCount()<1),i.deleteColumns(g<=d?d+p:d,p),d<g&&(D=g-p)),q(i,-1,D,(0,I.getSheetRowCount)(i),p,r))):0<=o&&u<0?(d=o,p=h,F=g=s,this.Kcr(i,d,g,p)&&(i.ffe(g,p,S,{ignoreExpand:!0}),r.copy?i.copyTo(g<=d?d+p:d,-1,g,-1,p,-1,this.Spn()):(i.moveTo(g<=d?d+p:d,-1,g,-1,p,-1,this.Spn(),void 0,i.getColumnCount()<1),i.deleteRows(g<=d?d+p:d,p),d<g&&(F=g-p)),q(i,F,-1,p,(0,I.getSheetColumnCount)(i),r))):0<=o&&0<=u&&(b=r.shiftCells,j=new k.Range(s,a,1,1),R=[new k.Range(o,u,h,l)],O(b)||(T={cmd:"clipboardPaste",sheetName:i.name(),clipboardHtml:"",clipboardImage:"",clipboardText:"",fromRanges:R,fromSheet:i,isCutting:!r.copy,pasteOption:0,pastedRanges:[new k.Range(s,a,h,l)],_acCell:j,_dataRange:R,_shiftCells:b,_fromDragFill:!0,_ignoreTableFooterShiftIndex:_&&_.ignoreFooterShiftIndex},i.Qy().execute(T),M=i.getSelections()[0],b===k.InsertShiftCell.down&&o<s&&!r.copy&&u===a?i.setSelection(M.row-h,M.col,M.rowCount,M.colCount):b===k.InsertShiftCell.right&&u<a&&!r.copy&&o===s&&i.setSelection(M.row,M.col-l,M.rowCount,M.colCount))):(r.copy?i.copyTo(o,u,s,a,h,l,this.Spn()):i.moveTo(o,u,s,a,h,l,this.Spn()),i&&(q(i,s,a,w,m,r),x=r.Kh,r.copy||i.isDirtySuspended()||(x.wx=t.gnt(i,x.qI,o,u,h,l)),i.isDirtySuspended()||(x.Mx=t.gnt(i,x.$I,s,a,h,l)))),n=!0}finally{i.rt.q6={},t.q5(i,!0),i.QI=!1,$(i,!1,o,u,s,a,h,l,c,f,this.Spn()),k.Commands.xI(e,r)}U(i)}return n},D.prototype.gnt=function(t,n,i,r,e,o){var u,s,u=new l(t,v(i,r,e,o),this.Spn()),s=t.tables&&t.tables.WI&&t.tables.WI(i,r,e,o);return s&&0<s.length&&(this.tT.tableNamesObj={r:i,c:r,rc:e,cc:o,tableNames:s}),u.yI(n.bI()),b(t,i,r,e,o,u.MI(),0,s),u},D.prototype.XI=function(){var t,n,t,i,r,e,o,u,s,a,o,u,r,e,t=this,n=t.Mf,t=t.tT,i=t.Kh;i=i||(t.Kh={}),s=(r=t.fromRow)<0?0:r,a=(e=t.fromColumn)<0?0:e,o=(o=t.toRow)<0?0:o,u=(u=t.toColumn)<0?0:u,r=r<0?(0,I.getSheetRowCount)(n):(0,I.getRowCount)(t),e=e<0?(0,I.getSheetColumnCount)(n):t.columnCount,t.insert||n.isDirtySuspended()||(t.copy||(i.qI=new l(n,v(s,a,r,e),this.Spn())),i.$I=new l(n,v(o,u,r,e),this.Spn())),i.pnt=n.R9,i.bnt=n.B9,i.ynt=n.ui,i.wnt=n.ci},D.prototype.undo=function(){var t,n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t=this;if(t.canUndo()){if(n=t.Mf,r=(i=t.tT).fromRow,e=i.fromColumn,o=i.toRow,u=i.toColumn,s=(0,I.getRowCount)(i),a=i.columnCount,!n.zT(r,e,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;if(!i.insert&&!n.zT(o,u,s,a,(0,I.getSheetRowCount)(n),(0,I.getSheetColumnCount)(n)))return!1;f=i.Kh,t.X5(n,!(l=void 0)),c=n.parent.i4(),k.Commands.NI(c,i);try{i.insert?0<=e&&0<=r||(0<=e?(l=a,n&&q(n,-1,e,(0,I.getSheetRowCount)(n),l,i)):0<=r&&(l=s,n)&&q(n,r,-1,l,(0,I.getSheetColumnCount)(n),i)):(d=r<0?0:r,g=e<0?0:e,p=o<0?0:o,w=u<0?0:u,m=r<0?(0,I.getSheetRowCount)(n):s,y=e<0?(0,I.getSheetColumnCount)(n):a,n&&(q(n,r,e,s,a,i),_=i.tableNamesObj,C=[],D=[],_&&(_.r===p&&_.c===w&&_.rc===m&&_.cc===y?D=_.tableNames:C=_.tableNames),b(n,p,w,m,y,f.Mx?f.Mx.MI():[],0,C,!0),b(n,d,g,m,y,f.wx?f.wx.MI():[],0,D,!0))),n&&(-1!==f.ynt&&-1!==f.wnt&&((F=n.getSelections()[0]).contains(f.ynt,f.wnt)?n.XA(f.ynt,f.wnt):n.XA(F.row,F.col)),-2!==f.pnt&&-2!==f.bnt&&-1!==f.ynt&&-1!==f.wnt&&n.showCell(f.ynt,f.wnt,3,3),(0,k.handleRestoredTableResizedArgs)(f.eke))}finally{t.q5(n,!0)}U(n)}return!0},D.prototype.Jcr=function(t,n,i,r){var i={changeType:"addingColumns",col:i,colCount:r,canAdd:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport};return k.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingColumns",col:n,colCount:r,canDelete:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport},k.Worksheet.et(t,g,i),i.canDelete)},D.prototype.Kcr=function(t,n,i,r){var i={changeType:"addingRows",row:i,rowCount:r,canAdd:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport};return k.Worksheet.et(t,g,i),!!i.canAdd&&(i={changeType:"deletingRows",row:n,rowCount:r,canDelete:!0,onlyCheck:!0,sheetArea:k.SheetArea.viewport},k.Worksheet.et(t,g,i),i.canDelete)},M=D,k.Commands[o]={canUndo:!0,execute:function(t,n,i){return k.Commands.zA(t,T,n,i)}},k.Commands[a]={canUndo:!0,execute:function(t,n,i){return k.Commands.zA(t,M,n,i)}}},"./dist/plugins/fill/drag-header-to-move/event.js":function(t,n,i){var n,w,f,a,i,m,r,e;function y(t,n){var i,r,i=t.getColumnCount();if(0!==n.col||n.colCount!==i){for(r=0;r<n.col;r++)if(t.getColumnVisible(r))return;for(r=n.col+n.colCount;r<i;r++)if(t.getColumnVisible(r))return}return 1}function _(t){var t;return t&&(null==(t=t.NMi)?void 0:t._gi)!==w.SheetType.ganttSheet}Object.defineProperty(n,"__esModule",{value:!0}),n=i("Common"),w=i("Core"),f=i("./dist/plugins/fill/utils.js"),a=n.Common.zf,i=w.GC$,m=null,r=5,i.extend(w.nk.prototype,e={QRe:function(t,n,i){var r,r,r,e,o,u,s,r,u,r,a,l,f,c,h,v,d,g,p,r=this;if(!r.a_&&(1===t.hitTestType||2===t.hitTestType)&&_(e=r.Mf)&&(o=null==(r=null==(r=e.parent)?void 0:r.options)?void 0:r.allowDragHeaderToMove)&&(0,w.needPaintSelection)(e)&&(u=e.getSelections())&&1===u.length)if(s=u[0],u=(r=e.options).colHeaderVisible,r=r.rowHeaderVisible,(o&w.AllowDragHeaderToMove.column)===w.AllowDragHeaderToMove.column&&1===t.hitTestType&&s.row<0&&0<=s.col&&u&&t.row>=e.getFreeAreaRowCount(1)){if(y(e,s))return m;if(a=s.col+s.colCount,t.col<s.col||t.col>=a)return m;for(l=e.Yy(t.colViewportIndex,1),f=s.col;f<a;f++)if((c=null==l?void 0:l.findCol(f))&&(h=c.width,c.x<=n)&&n<=c.x+h)return{action:"dragHeader",dragColumn:!0,selectRange:s}}else if((o&w.AllowDragHeaderToMove.row)===w.AllowDragHeaderToMove.row&&2===t.hitTestType&&0<=s.row&&s.col<0&&r&&t.col>=e.getFreeAreaRowCount(2)){if(s.rowCount===e.getRowCount())return m;for(v=e._y(t.rowViewportIndex,2),d=s.row+s.rowCount,g=s.row;g<d;g++)if((p=null==v?void 0:v.findRow(g))&&p.y<=i&&i<=p.y+p.height)return{action:"dragHeader",dragColumn:!1,selectRange:s}}return m},VRe:function(t){var n,i,r,r,e,e,o,e,o,i,r,n=this;n.eBe||t&&t.dragHeaderToMoveInfo&&1===(r=(i=n.Mf).Ut.getSelections()).length&&(n.rb=!0,n.eBe=!0,n.cw(t),r=r[0],e=i.Fi(),e=i.options.rightToLeft?new w.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new w.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),o=i.getRangeRect((0,f.getRowViewportIndex)(t),(0,f.getColViewportIndex)(t),r),t.dragHeaderToMoveInfo.dragColumn?o.height=(0,f.getHeight)(e):(i.options.rightToLeft&&(o.x=e.x),o.width=(0,f.getWidth)(e)),t.dragHeaderToMoveInfo.selectionRect=o,(e=n.q6).x=o.x,e.y=o.y,e.width=o.width-1,e.height=o.height-1,e.row=r.row,e.col=r.col,e.rowCount=(0,f.getRowCount)(r),e.colCount=(0,f.getColCount)(r),o=i.JS(r),i=t.row,r=t.col,(i=i<o.row?o.row:i)>=o.row+(0,f.getRowCount)(o)&&(i=o.row+(0,f.getRowCount)(o)-1),(r=r<o.col?o.col:r)>=o.col+(0,f.getColCount)(o)&&(r=o.col+(0,f.getColCount)(o)-1),e.hitRow=i,e.hitCol=r,e.rowOffset=i-o.row,e.colOffset=r-o.col,n.Rk={e9:(0,f.getRowViewportIndex)(t),r9:(0,f.getColViewportIndex)(t),Bk:(0,f.getHitTestType)(t)},n.Ok())},YRe:function(){var t,n,i,i,r,e,o,u,o,e,s,e,u,s,t=this,n=t.Mf;t.eBe&&t.rb&&(i=t.WRe(),t.q6.hitTarget=t.fk,t.q6.x=i.x,t.q6.y=i.y,t.q6.width=i.width,t.q6.height=i.height,i=t.fk.x,r=t.fk.y,u=(o=(e=(0,f.getSheetVPortBoundary)(n)).minPoint).x,o=o.y,s=(e=e.maxPoint).x,e=e.y,t.fk.x<=u?t.fk.x=u+1:t.fk.x>=s&&(t.fk.x=s-1),t.fk.y<=o?t.fk.y=o+1:t.fk.y>=e&&(t.fk.y=e-1),u=(0,f.getHitColumnIndex)(n,t.fk.x),s=(0,f.getHitRowIndex)(n,t.fk.y),t.KRe(s,u),t.fk.x=i,t.fk.y=r,t.a9())},ZRe:function(){var t,n,i,t=this,n=t.Mf;t.eBe=!1,t.i_=!0,t.zk=!0,t.t_=!1,i=n.sw,(0,f.fixHitTestInfo)(i),t.kD&&t.kD(),t.rb=!1,t.ab=!1,t.Rk=m,n.Uet=m,n.JRe=m,n.Pet=m,t.cw&&t.cw(n.sw)},KRe:function(t,n){var t,i,r,e,n,t,o,t,u,s,r,i=this;i.eBe&&(r=i.Mf,(e=i.q6).hitRow=t,e.hitCol=n,n=null!=(t=i.Int)?t:r.JS(e),i.xnt=n,t=r.Dn.XRe(),i.Int=n,o=r.parent)&&o.options.showDragDropTip&&(t?(t=r.Uet.x+r.Uet.width+5,u=r.Uet.y+r.Uet.height+5,s=r.sw,r=r.U5(),s.dragHeaderToMoveInfo.dragColumn?e.col>r.col?n.col=e.col-r.colCount:n.col=e.col:e.row>r.row?n.row=e.row-r.rowCount:n.row=e.row,o.Tw(a.j0(i.Nnt(n)),t,u)):o.iy())},WRe:function(){var t,n,i,t,r,n,e,o,e,n,u,n,s,a,l,s,t=this,n=t.Mf,i=n.sw,t=t.fk,r=i.dragHeaderToMoveInfo.selectionRect.clone(),n=(0,f.getSheetVPortBoundary)(n),e=n.minPoint,o=e.x,e=e.y,n=n.maxPoint,u=n.x,n=n.y;return i.dragHeaderToMoveInfo.dragColumn?(s=i.x-r.x,r.x=t.x-s,r.x<o?r.x=o:u<(a=(0,f.getEndX)(r))&&(r.x=u-r.width),n<(l=(0,f.getEndY)(r))&&(r.height=n-r.y)):(s=i.y-r.y,r.y=t.y-s,r.y<e?r.y=e:n<(l=(0,f.getEndY)(r))&&(r.y=n-r.height),u<(a=(0,f.getEndX)(r))&&(r.width=u-r.x)),r}})},"./dist/plugins/fill/drag-header-to-move/index.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-header-to-move/event.js"),i("./dist/plugins/fill/drag-header-to-move/render.js")},"./dist/plugins/fill/drag-header-to-move/render.js":function(t,n,i){var p,w,n,r,e;Object.defineProperty(n,"__esModule",{value:!0}),p=i("Core"),w=i("./dist/plugins/fill/utils.js"),n=p.GC$,r="black",n.extend(p.g7.prototype,e={qRe:function(t,n,i){t.save(),t.fillStyle=i||r,t.fillRect(n.x,n.y,n.width,n.height),t.restore()},$Re:function(o,u){var t,s,n,a,l,f,c,h,v,d,g,n,n,n,t=this,s=t.Mf,n=s.rt,a=s.sw,l=n.q6,f=l.hitTarget;if(l&&f)return c=l.hitCol,h=l.hitRow,v=s.nBe(),d=(0,w.getLineStyle)(s),g=8,o.save(),(n=(0,w.mergeRect)(s.Pet,s.JRe))&&(n=new p.Rect(n.x-g,n.y-g,(0,w.getWidth)(n)+2*g,(0,w.getHeight)(n)+2*g),t.O1(n,u),t.E1(s.U5(),u)),r(),n=i(),o.beginPath(),o.restore(),n;function i(){var t,n,i,r,e,e,t,e,r,t=s.Yy(0).findCol(c)||s.Yy(1).findCol(c)||s.Yy(2).findCol(c),n=s._y(0).findRow(h)||s._y(1).findRow(h)||s._y(2).findRow(h),i=!1;return a.dragHeaderToMoveInfo.dragColumn?t&&(r=t.x,e=(0,w.getWidth)(t),l.col=c,f.x>r+e/2&&(r=t.x+(0,w.getWidth)(t),l.col++),l.col<a.dragHeaderToMoveInfo.selectRange.col||l.col>a.dragHeaderToMoveInfo.selectRange.col+a.dragHeaderToMoveInfo.selectRange.colCount)&&(s.Uet=new p.Rect(r,l.y,0,(0,w.getHeight)(l)),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),e=u.y+1,(0,w.paintDragLine)(o,r-g,e,r+g,e,v,d),(0,w.paintDragLine)(o,r,l.y,r,l.y+(0,w.getHeight)(l),v,d),(0,w.paintDragLine)(o,r-g,l.y+(0,w.getHeight)(l),r+g,l.y+(0,w.getHeight)(l),v,d),i=!0):n&&(t=n.y,e=(0,w.getHeight)(n),l.row=h,f.y>t+e/2&&(t=n.y+(0,w.getHeight)(n),l.row++),l.row<a.dragHeaderToMoveInfo.selectRange.row||l.row>a.dragHeaderToMoveInfo.selectRange.row+a.dragHeaderToMoveInfo.selectRange.rowCount)&&(s.Uet=new p.Rect(l.x,t,(0,w.getWidth)(l),0),o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),r=u.x+1,(0,w.paintDragLine)(o,r,t-g,r,t+g,v,d),(0,w.paintDragLine)(o,l.x,t,l.x+(0,w.getWidth)(l),t,v,d),(0,w.paintDragLine)(o,l.x+(0,w.getWidth)(l),t-g,l.x+(0,w.getWidth)(l),t+g,v,d),i=!0),i}function r(){o.rect(u.x,u.y,(0,w.getWidth)(u),(0,w.getHeight)(u)),o.clip(),o.beginPath(),t.qRe(o,l,s.tBe())}},XRe:function(){var t,n,i,r,i,r,e,r,t,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;if(i&&i.dragHeaderToMoveInfo&&r)return i=t.J(),r=n.Fi(),e=n.rt.q6,r=n.options.rightToLeft?new p.Rect(r.Hy,r.T6,r.b6+r.F6,r.Ay+r.Iy):new p.Rect(r.b6,r.T6,r.Hy+r.zy,r.Ay+r.Iy),t=t.$Re(i,r),n.JRe=n.Uet,n.Pet=new p.Rect(e.x,e.y,(0,w.getWidth)(e),(0,w.getHeight)(e)),t}})},"./dist/plugins/fill/fill-event.js":function(t,n,i){var p,m,g,r,w,e,y,_,C,v,D,c,F,b,d,j,R,o,u,h,T,M,i,x,s,e;Object.defineProperty(n,"__esModule",{value:!0}),n.FillAction=void 0,p=i("Common"),m=i("Core"),g=i("SheetsCalc"),r=i("./dist/plugins/fill/fill-ui.js"),w=i("./dist/plugins/fill/fill.js"),e=i("./dist/plugins/fill/fill.ns.js"),y=i("CalcEngine"),_=i("./dist/plugins/fill/utils.js"),C=!!y,v=m.GC$,D=m.Ec,c=p.Common.lt.ht,F=null,b=void 0,d=Math.min,j=Math.abs,R=Math.max,o=5,u=3,h="drag",T="corner",M=p.Common.zf,i=new p.Common.ResourceManager(e.SR,"Fill"),x=i.getResource.bind(i),(e=s=n.FillAction||(n.FillAction={}))[e.smartMenuCopyCells=1]="smartMenuCopyCells",e[e.smartMenuFillSeries=2]="smartMenuFillSeries",e[e.smartMenuFillFormattingOnly=4]="smartMenuFillFormattingOnly",e[e.smartMenuFillWithoutFormatting=8]="smartMenuFillWithoutFormatting",e[e.all=1023]="all",v.extend(m.nk.prototype,{bk:function(t){var n,i,r,e,e,o,u,u,o,e,u,i,n=this;n.zk||(i=n.Mf,r=F,1===(e=i.Ut.getSelections()).length?r=e[0]:e.length<1&&(r=i.Ut.getSpan(i.ui,i.ci)),r&&(n.zk=!0,n.rb=!0,n.Mnt=r,(e=i.tables&&i.tables.find(r.row,r.col))&&(o=n.Cnt=!0,u=e.range(),o=!(e.showHeader()&&r.row===u.row||e.showFooter()&&r.row===u.row+u.rowCount-1||r.col!==u.col||r.colCount!==u.colCount)&&o)&&(n.Snt=!0,n.e_=!0,n.Tnt=e.name()),u=i.getRangeRect((0,_.getRowViewportIndex)(t),(0,_.getColViewportIndex)(t),r),(o=n.q6).x=u.x,o.y=u.y,o.width=u.width-1,o.height=u.height-1,o.row=r.row,o.col=r.col,o.rowCount=(0,_.getRowCount)(r),o.colCount=(0,_.getColCount)(r),e=i.JS(r),u=t.row,i=t.col,(u=u<e.row?e.row:u)>=e.row+(0,_.getRowCount)(e)&&(u=e.row+(0,_.getRowCount)(e)-1),(i=i<e.col?e.col:i)>=e.col+(0,_.getColCount)(e)&&(i=e.col+(0,_.getColCount)(e)-1),o.hitRow=u,o.hitCol=i,o.rowOffset=u-e.row,o.colOffset=i-e.col,n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok()))},Vk:function(){var t,n,i,r,e,o,u,r,i,s,a,t=this;t.Rk&&t.rb&&t.zk&&t.Mnt&&(n=t.fk,i=t.q6,e=(r=t.Mf.getCellRect(i.hitRow,i.hitCol)).width/2,o=r.x+e,u=r.height/2,r=r.y+u,i.hitTarget={x:n.x,y:n.y},i=t.Q9(),s=t.K9(),a=!1,(j(o-n.x)>5+e||j(r-n.y)>5+u)&&(a=!0),0<=i&&0<=s&&a&&t.Ant(i,s),t.a9())},Ant:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,c,u,f,l,c,u,t,n,o,i=this;i.zk&&i.Mnt&&(r=i.Mf,e=i.q6,o=r.o5(),u=r.U5(),s=(0,_.getSheetRowCount)(r),a=(0,_.getSheetColumnCount)(r),l=d(a-(0,_.getColCount)(e),n-e.colOffset),f=d(s-(0,_.getRowCount)(e),t-e.rowOffset),o&&(c=r.ox(n,e.colOffset+1),f-=h=r.ox(t,e.rowOffset+1,!0),0===r.getColumnWidth(l-=c)&&(l=r.r6(l)),0===r.getRowHeight(f))&&(f=r.nI(f)),-1===u.row&&-1!==u.col?(e.row=-1,e.col=R(0,l)):-1!==u.row&&-1===u.col?(e.row=R(0,f),e.col=-1):(e.row=e.row<0?-1:R(0,f),e.col=e.col<0?-1:R(0,l)),i.Snt&&(u=(c=r.tables&&r.tables.find(t,n))&&c.range(),!c||c.name()!==i.Tnt||t===u.row||c.showFooter()&&t===u.row+u.rowCount?i.e_=!1:i.e_=!0,i.e_?(e.col=u.col,i.i_=!i.isPressShiftKey):i.i_=i.isPressShiftKey),e.hitRow=t,e.hitCol=n,f=r.JS(e),o&&(l=r.lT(f.row,f.rowCount,!0),c=r.lT(f.col,f.colCount),f.rowCount+=l,f.colCount+=c,f.rowCount=d(s,f.rowCount),f.colCount=d(a,f.colCount),f.row+f.rowCount>s||f.col+f.colCount>a)||(u=i.Int)&&f.row===u.row&&f.col===u.col&&(0,_.getRowCount)(f)===(0,_.getRowCount)(u)&&(0,_.getColCount)(f)===(0,_.getColCount)(u)&&f.row>r.N9()&&f.col>r.k9()&&f.row+(0,_.getRowCount)(f)-1<r.P6()&&f.col+(0,_.getColCount)(f)-1<r.G6()||(i.xnt=f,r.Dn.o_(),i.Int=f,(t=r.parent)&&t.options.showDragDropTip&&(n=e.x+e.width+5,o=e.y+e.height+5,t.Tw(M.j0(i.Nnt(f)),n,o))))},Nnt:function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d;return t&&C?(i=(n=this.Mf).U5(),r=(0,_.getRowCount)(i),e=(0,_.getColCount)(i),o=n.getActiveRowIndex(),u=n.getActiveColumnIndex(),s=void 0,a=n.o5(),o=o<0?0:o,u=u<0?0:u,s=1===r&&1===e?y.knt(F,F,t.row-o,t.col-u,!0,!0):(h=c=f=l=void 0,d=v=0,-1===i.row&&0<=i.col?(l=c=g.BAND_INDEX_CONST,f=t.col-u,h=t.col-u+e-1,d=e):-1===i.col&&0<=i.row?(f=h=g.BAND_INDEX_CONST,l=t.row-o,c=t.row-o+r-1,v=r):0<=i.row&&0<=i.col&&(l=t.row-o,c=t.row-o+r-1,f=t.col-u,h=t.col-u+e-1,v=r,d=e),a&&(c+=n.lT(t.row,v,!0),h+=n.lT(t.col,d)),y.lJ(F,F,l,f,c,h,!0,!0,!0,!0,o,u)),n.op().unparse(n.Uw(),s,o,u)):b},kD:function(t){var n,i,r,e,o,u,u,s,a,l,f,c,h,v,u,d,g,p,p,w,p,w,w,p,w,n=this,i=!1,r="",e=!1,o=n.Mf;n.Rk=F,n.l9(),u=o.U5(),s=n.q6.row,a=n.q6.col,l=n.q6.hitRow,f=n.q6.hitCol,n.i_&&u.contains(l,f)||(u=u&&(0<(0,_.getRowCount)(u)||0<(0,_.getColCount)(u))?{r:u.row,c:u.col,rc:(0,_.getRowCount)(u),cc:(0,_.getColCount)(u)}:{r:o.ui,c:o.ci,rc:1,cc:1},!0===n.zk&&!0===n.rb&&(c=u.r,h=u.c,v=u.rc,u=u.cc,d=o.options.protectionOptions,g=o.lF,n.shiftCells=null,n.i_&&(n.shiftCells=n.Dnt?m.InsertShiftCell.right:m.InsertShiftCell.down),p={fromRow:c,fromColumn:h,rowCount:v,columnCount:u,toRow:s,toColumn:a,isDragInsert:n.i_,isDragCopy:n.t_},o.ki(m.Events.BeforeDragDrop,p),(r=p.invalidMessage)&&0!==r.length?i=!0:!n.i_||-1!==c&&-1!==h?s===c&&a===h||(p=o.GT(c,h,v,u),w=o.GT(s,a,v,u),!p&&!w||(w=!1,w=!(p||n.shiftCells!==m.InsertShiftCell.right&&n.shiftCells!==m.InsertShiftCell.down)||w)||(i=!0,r=x().Exp_ChangeMergedCell),i||C&&(o.KT(c,h,v,u)||o.KT(s,a,v,u))&&(i=!0,r=x().Exp_ChangePartOfArray),!i&&!n.t_&&(p=(p=(p=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(c,h,v,u)))&&o.dA(D(c,h,v,u),!1,m.SheetArea.viewport),w=(w=(w=o.isActualProtected())||(0,m.isAnyCellProtectedInDataRange)(o,new m.Range(s,a,v,u)))&&o.dA(D(s,a,v,u),!1,m.SheetArea.viewport),p||w)&&(i=!0,r=o.FT()),i)||(n.i_&&(n.Dnt?a=n.q6.hitCol:s=n.q6.hitRow),e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:h,toRow:s,toColumn:a,rowCount:v,columnCount:u,copy:n.t_,insert:n.i_,shiftCells:n.shiftCells,option:g,mouseTargetRow:l,mouseTargetCol:f})):0<=h?(n.t_&&(a<=h||h+u<=a)||!n.t_&&(a<h||h+u<a))&&((o.GT(-1,h,-1,u)||o.GT(-1,a,-1,0))&&(i=!0,r=x().Exp_ChangeMergedCell),p=d&&d.allowDragInsertColumns,!i&&o.isActualProtected()&&!0!==p&&(i=!0,r=x().Exp_ColumnReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:-1,fromColumn:h,toRow:-1,toColumn:a,rowCount:-1,columnCount:u,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))):0<=c&&h<0&&(n.t_&&(s<=c||c+v<=s)||!n.t_&&(s<c||c+v<s))&&((o.GT(c,-1,v,-1)||o.GT(s,-1,0,-1))&&(i=!0,r=x().Exp_ChangeMergedCell),i||C&&(o.KT(c,-1,v,-1)||o.KT(s,-1,0,-1))&&(i=!0,r=x().Exp_ChangePartOfArray),w=d&&d.allowDragInsertRows,!i&&o.isActualProtected()&&!0!==w&&(i=!0,r=x().Exp_RowReadOnly),i||(e=o.Qy().execute({cmd:"dragDrop",sheetName:o.name(),fromRow:c,fromColumn:-1,toRow:s,toColumn:-1,rowCount:v,columnCount:-1,copy:n.t_,insert:!0,option:g,mouseTargetRow:l,mouseTargetCol:f}))))),n.rb=!1,n.zk=!1,n.Snt=!1,n.Cnt=!1,n.e_=!1,n.Tnt=F,n.Mnt=F,n.i_=!1,n.t_=!1,n.Int=F,n.xnt=F,n.iy(),e||(n.q6={},o.repaint()),i&&o.jT(3,r)},wk:function(t){var n=this;!0!==n.Yk&&!0!==n.rb&&(n._nt(),n.Ktt)&&(n.rb=!0,n.Yk=!0,n.hO=!0,n.Ent=(0,_.getRowViewportIndex)(t),n.jnt=(0,_.getColViewportIndex)(t),n.Ont=(0,_.getRowViewportIndex)(t),n.Rnt=(0,_.getColViewportIndex)(t),n.Bnt(),n.Rk={e9:(0,_.getRowViewportIndex)(t),r9:(0,_.getColViewportIndex)(t),Bk:(0,_.getHitTestType)(t)},n.Ok())},Bnt:function(){var t,n,i,r,n,t=this,n=(0,_.getFrozenRowCount)(t.Mf),i=(0,_.getFrozenColumnCount)(t.Mf),r=t.Lnt();0<=r&&r<n?t.Fnt=0:n<=r&&r<=(0,_.getSheetRowCount)(t.Mf)&&(t.Fnt=1),t.Pnt()?t.Gnt=1:t.Gnt=t.Ent,0<=(n=t.Unt())&&n<i?t.Hnt=0:i<=n&&n<=(0,_.getSheetColumnCount)(t.Mf)&&(t.Hnt=1),t.znt()?t.Vnt=1:t.Vnt=t.jnt},Zk:function(){var t,n,i,r,t=this;t.Rk&&t.Yk&&t.rb&&t.Ktt&&(t.Ont=t.nD(),t.Rnt=t.eD(),t.Ynt=t.Q9(),t.Znt=t.K9(),0<=t.Ynt&&0<=t.Znt&&(t.Wnt(),t.Qnt(),n=t.Mf.parent,i=!1,(r=t.Knt())&&(i=t.Jnt(t.Ktt,t.Xnt,!0)),n&&n.options.showDragFillTip&&i&&t.qnt(),t.$nt()),t.a9())},tet:function(){var t,n,i,r,e,e,o,u,s,s,a,u,l,f,c,h,v,h,v,d,g,t=this,n=t.Mf,i=t.Ktt,r=t.Xnt,e=n.parent.options.defaultDragFillType,e=t.net(3===e?5:e,3===e),o=t.eet(),u=t.Knt();return 1===e?(s=0===o||1===o?1:0,u=(a=new w.Wtt(n)).Jtt(u,s,!0),s=t.iet(o,r,i),f=(l=n.getActualStyle(s.row,s.col)).cellType||n.$f(),c=l.formatter||l._autoFormatter,h=p.Formatter&&p.Formatter.GeneralFormatter,u instanceof Date&&h&&(c=new h(p.Common.CultureManager.Fe().DateTimeFormat.shortDatePattern+" hh:mm:ss AM/PM;@","0")),h=3,(v=t.Rk)&&(h=v.Bk),v={sheet:n,row:s.row,col:s.col,sheetArea:h,quotePrefix:l.quotePrefix},f.format(u,c,d={},v)):0!==e||(s=t.iet(o,r,i),g=n.getFormula(s.row,s.col))?F:n.getText(s.row,s.col)},iet:function(t,n,i){var r,e,o,i,u,s,r=i.row,e=i.col,o=(0,_.getRowCount)(i),i=(0,_.getColCount)(i),u=D(r,e,1,1);return 3===t?(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r+o-1:r+s-1,u.col=e):1===t?(s=0===(s=(0,_.getColCount)(n)%i)?e+i-1:e+s-1,u.row=r,u.col=s):0===t?(s=0===(s=(0,_.getColCount)(n)%i)?e:e+i-s,u.row=r,u.col=s):2===t&&(s=(0,_.getRowCount)(n)%o,u.row=s=0===s?r:r+o-s,u.col=e),u},qnt:function(){var t,n,i,r,e,o,u,o,n,t=this,n=t.Mf,i;if(4===t.net()||t.znt()||t.Pnt())return t.iy(),F;u=t.eet(),o=t.Knt(),n=n.j1(o),o=t.tet(),3===u||1===u?(r=n.x+n.width+3,e=n.y+n.height+3):0===u?(r=n.x+3,e=n.y+n.height+3):2===u&&(r=n.x+n.width+3,e=n.y+3),t.Tw(o,r,e)},$nt:function(){var t=this;t.ret(),t.oet(),t.aet(),t.uet=t.Knt()},ret:function(){var t,n,t=this.Mf;this.uet&&((n=t.j1(this.uet)).x-=2,n.y-=2,n.width+=4,n.height+=4,t.Dn.O1(n))},oet:function(t){var n;this.Mf.Dn.E1(this.Ktt,F,t)},aet:function(){var t,n,i,r,t,r,t,n,e,n=this.Mf,i=n.Dn,r=this.Knt();r&&(t=this.zUr(),r=null!=(t=(r=n.j1(r)).getIntersectRect(t))?t:r,t=n.getSelectionBorderColor(),n=(0,_.getLineStyle)(n),(e=i.J()).save(),e.beginPath(),i.cet(e,r,t,n),e.restore())},zUr:function(){var t,n,i,r,e,n,t,t=this.Mf,n=t.Fi(),i=n.c9(this.Ent,this.jnt),r=this.Iet()?n.c9(this.Ont,this.jnt):n.c9(this.Ent,this.Rnt),e=n.c9(t.C0(this.Ktt.row),t.S0(this.Ktt.col)),n=n.c9(t.C0(this.Ktt.row+this.Ktt.rowCount-1),t.S0(this.Ktt.col+this.Ktt.colCount-1)),t=(0,_.mergeRect)(i,r);return t=(0,_.mergeRect)(t,e),(0,_.mergeRect)(t,n)},Qnt:function(){this.Xnt=this.dO()},znt:function(){return-1===this.Ktt.col&&-1!==this.Ktt.row},Pnt:function(){return-1===this.Ktt.row&&-1!==this.Ktt.col},lO:function(){return 4===this.bO||5===this.bO},dO:function(){var t,n,i,r,e,t=this,n=-1,i=-1,r=-1,e=-1;switch(t.bO){case 0:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.Unt()-i;break;case 1:r=t.Pnt()?n=-1:(n=t.Lnt(),(0,_.getRowCount)(t.Ktt)),i=t.fet()+1,e=t.Znt-i+1;break;case 2:n=t.Ynt,r=t.Lnt()-n,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 3:n=t.let()+1,r=t.Ynt-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 5:n=t.Ynt,r=t.let()-n+1,e=t.znt()?i=-1:(i=t.Unt(),(0,_.getColCount)(t.Ktt));break;case 4:r=t.Pnt()?n=-1:(n=t.Ktt.row,(0,_.getRowCount)(t.Ktt)),i=t.Znt,e=t.fet()-i+1}return D(n,i,r,e)},het:function(){var t=this.let();return-1!==t?this.Mf._y(this.Gnt).findRow(t):F},det:function(){return this.Mf._y(this.Ont).findRow(this.vet())},vet:function(){return this.Mf.getViewportBottomRow(this.Ont)},met:function(){var t=this.fet();return-1!==t?this.Mf.Yy(this.Vnt).findCol(t):F},pet:function(){return this.Mf.Yy(this.Rnt).findCol(this.bet())},bet:function(){return this.Mf.getViewportRightColumn(this.Rnt)},Wnt:function(){var t,n,i,r,e,o,u,s,e,r,a,l,f,c,o,u,c,f,o,u,a,l,f,o,u,a,f,u,l,h,t=this,n=t.znt(),i=t.Pnt(),r=v(t.Mf.Dg()).offset(),e=t.fk.e,o=t.fk.x,u=t.fk.y,s=e.pageX-r.left,e=e.pageY-r.top,r=!1;n||i?i?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=4:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):n&&(t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.bO=5:t.Ynt<t.Lnt()?t.bO=2:t.Ynt>t.let()&&(t.bO=3)):t.Ynt>=t.Lnt()&&t.Ynt<=t.let()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?(a=j(t.Znt-t.fet()))<(l=j(t.Ynt-t.let()))?t.bO=5:l<a?t.bO=4:(f=(f=t.het())||t.det())?u>f.y+f.height?t.bO=3:(o=(c=(c=t.met())||t.pet()).x+c.width-o,u=f.y+f.height-u,s>=c.x&&s<=c.x+c.width&&e>=f.y&&e<=f.y+f.height?t.bO=u<=o?4:5:r=!0):r=!0:t.Znt<t.Unt()?t.bO=0:t.Znt>t.fet()&&(t.bO=1):t.Ynt<t.Lnt()?t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=2:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.Lnt()),t.bO=a<=l?2:1):t.Ynt>t.let()&&(t.Znt>=t.Unt()&&t.Znt<=t.fet()?t.bO=3:t.Znt<t.Unt()?(a=j(t.Znt-t.Unt()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:0):t.Znt>t.fet()&&(a=j(t.Znt-t.fet()),l=j(t.Ynt-t.let()),t.bO=a<=l?3:1)),(c=t.Mf.Dn.yet)&&(u=(f=t.let())+1,a=(o=t.fet())+1,l=t.Mf.getRowHeight(f,3),f=t.Mf.getColumnWidth(o,3),o=t.Mf.getRowHeight(u,3),u=t.Mf.getColumnWidth(a,3),a=c.x+c.width/2-d(10,f/2),f=c.x+c.width/2+d(10,u/2),u=c.y+c.height/2-d(10,l/2),l=c.y+c.height/2+d(10,o/2),h=!1,(h=n||i?i?a<=s&&s<=f:u<=e&&e<=l:a<=s&&s<=f&&u<=e&&e<=l)||r?(t.hO=!0,t.bO=4):t.hO=!1)},Lnt:function(){return this.Ktt?-1===this.Ktt.row?0:this.Ktt.row:-1},let:function(){var t=this;return t.Ktt?-1===t.Ktt.row?(0,_.getSheetRowCount)(t.Mf)-1:t.Ktt.row+(0,_.getRowCount)(t.Ktt)-1:-1},Unt:function(){return this.Ktt?-1===this.Ktt.col?0:this.Ktt.col:-1},fet:function(){var t=this;return t.Ktt?-1===t.Ktt.col?(0,_.getSheetColumnCount)(t.Mf)-1:t.Ktt.col+(0,_.getColCount)(t.Ktt)-1:-1},wet:function(t,n){var n,i,r,e,e,r,e,t,n=D(n.row,n.col,n.rowCount,n.colCount),i=this.Mf;return i.Ut.findSpan(t.row,t.col)&&(r=t.rowCount,e=n.rowCount,0!==Math.floor(e%r)&&(e=Math.ceil(e/r)*r,n.row+e<=i.getRowCount())&&(n.rowCount=e),r=t.colCount,e=n.colCount,0!==Math.floor(e%r))&&(t=Math.ceil(e/r)*r,n.col+t<=i.getColumnCount())&&(n.colCount=t),n},DD:function(){var t,n,i,r,e,o,u,e,o,t=this,n=t.Mf;t.Rk=F,t.l9(),t.iy(),t.Yk&&t.rb?(t.Yk=!1,t.rb=!1,(i=t.Knt())&&(!(r=t.Jnt(t.Ktt,t.Xnt))||t.hO?(t.Met(),t.Ax(i)):(e=n.rt.Ktt,o=t.wet(e,t.Xnt),u=t.net(),n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:e,fillRange:o,autoFillType:u,fillDirection:n.rt.eet()}),e=t.lnt,o=n.getSelections(),!e&&t.Cet()&&n.parent.options.showDragFillSmartTag&&1===o.length&&o[0].equals(i)&&4!==t.fnt?t.Tet(t.fnt):t.Ax(i),t.Met()))):t.Met()},IRe:function(){var t,n,i,t=this.Mf,n=s.all,i=t.getCellType(t.getActiveRowIndex(),t.getActiveColumnIndex());return"19"===(null==i?void 0:i.typeName)&&(n&=~s.smartMenuFillSeries),n=t.NMi?(n&=~s.smartMenuFillFormattingOnly)&~s.smartMenuFillWithoutFormatting:n},Tet:function(t){var n,i,i,n=this.Mf,i=n.Dn.yet,i={x:i.x+i.width,y:i.y+i.height,fillType:t,availableFillAction:this.IRe()};n.R_=new r.Aet(n.parent.j2(),n,i),n.R_.rQ()},_nt:function(){var t,n,n,i,t=this.Mf,n=t.Ut.getSelections();1===n.length?(n=n[0],(i=t.Ut.getSpans(n))&&0<i.length&&(n=t.kR(i,n)),this.Ktt=n):0<=t.ui&&0<=t.ci&&(this.Ktt=D(t.ui,t.ci,1,1))},Met:function(){this.rb=!1,this.Yk=!1},Ax:function(t){this.Mf.Dn.E1(t)},net:function(t,n){var i,r,t,e,i=this,r=i.Mf,t=t!==b?t:r.parent.options.defaultDragFillType;return i.lO()?4:5!==t?t:(e=1===(0,_.getRowCount)(i.Ktt)&&1===(0,_.getColCount)(i.Ktt)&&!i.Pnt()&&!i.znt())?i.a_&&!n?1:0:i.a_&&!n?0:1},Knt:function(){var t,n,i,r,e,t=this;return t.Ktt?t.lO()?t.Ktt:t.Xnt?(e=r=i=n=0,e=t.Iet()?(n=(2===t.bO?t.Xnt:t.Ktt).row,i=(0,_.getRowCount)(t.Ktt)+(0,_.getRowCount)(t.Xnt),r=t.Ktt.col,(0,_.getColCount)(t.Ktt)):(n=t.Ktt.row,i=(0,_.getRowCount)(t.Ktt),r=(0===t.bO?t.Xnt:t.Ktt).col,(0,_.getColCount)(t.Ktt)+(0,_.getColCount)(t.Xnt)),D(n,r,i,e)):F:F},Jnt:function(t,n,i){var r,e,o,t,r=this.Mf,e=!0,o="";return r.Ut.eE(n.row,n.col,(0,_.getRowCount)(n),(0,_.getColCount)(n))&&!(0,_.canDragFillSpan)(r,t,n)&&(e=!1,o=x().Exp_FillRangeContainsMergedCell),!(t=r.isActualProtected())&&r.dataRanges&&(t=(0,m.isAnyCellProtectedInDataRange)(r,n)),e&&t&&r.dA(n,!0,m.SheetArea.viewport)&&(e=!1,o=r.FT()),e||i||r.ki(m.Events.InvalidOperation,{sheet:r,sheetName:r.name(),invalidType:m.InvalidOperationType.dragFill,message:o,fillRange:n}),e},Cet:function(){return this.xet()||this.Net()},xet:function(){return 3===this.bO||1===this.bO},Net:function(){return 0===this.bO||2===this.bO},Iet:function(){return 2===this.bO||3===this.bO||5===this.bO},eet:function(){var t=this.bO;return 0<=t&&t<=3?t:4===t?0:5===t?2:3},VL:function(t,n,i){var r,e,o,t,u,s,a,l,f,u,r=this,e=F,o=(0,_.getRowViewportIndex)(t),t=(0,_.getColViewportIndex)(t),u=r.Mf,s=u.parent,a=u.options.rightToLeft;if(!c(o)&&!c(t)&&(s.options.allowUserDragDrop||s.options.allowUserDragFill)&&(-1!==(l=u.U5()).row||-1!==l.col)){if(0<=o&&0<=t&&1===u.Ut.getSelections().length){if(r.yD(o,t,n,i))return e;a&&(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),u=u.getRangeRect(o,t,l),e||u.x-4<n&&n<u.x+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"left"}),e||a||(f=r.Mf.Dn.yet)&&f.x<=n&&n<=f.x+f.width&&f.y<=i&&i<=f.y+f.height&&(e={action:h,side:T}),e||u.x+u.width-4<n&&n<u.x+u.width+4&&u.y<=i&&i<u.y+u.height&&(e={action:h,side:"right"}),e||u.y-4<i&&i<u.y+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"top"}),e||u.y+u.height-4<i&&i<u.y+u.height+4&&u.x<=n&&n<u.x+u.width&&(e={action:h,side:"bottom"}),e&&(n<u.x||n>u.x+u.width||i<u.y||i>u.y+u.height)&&(e.outside=!0)}s&&s.options.allowUserDragDrop||e&&e.side!==T&&(e.side=F),s&&s.options.allowUserDragFill||e&&e.side===T&&(e.side=F)}return e},ket:function(t,n){var i,r,e,i=this,r,e=i.Mf.getSpan(t,n,3);return e?!c(i.Mf.getValue(e.row,e.col,3,0)):!c(i.Mf.getValue(t,n,3,0))},Det:function(t,n){var i,r,e,e,i,r,e=this.Mf.tables;return!(!e||0===e.all().length)&&(e=e.AB(t,n,1,1)[0])&&e.footerIndex()===t},_et:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(!e.ket(t,o)||e.Det(t,o))return!1;return!0},Eet:function(t,n,i,r){for(var e,o,e=this,o=n;o<n+r;o++)if(e.ket(t,o))return!1;return!0},jet:function(t,n,i,r){var e,o,u,s,a,l,f,c,h,e=this,o=e.Mf;if("left"===r){for(u=0;u<n;u++)e.ket(t,u)&&(i.searchArray[u]=!0);for(s=n-1,a=1;i.searchArray[s];)s--,a++;i.searchLength=a}if("right"===r){for(l=o.getColumnCount(),f=n;f<l;f++)e.ket(t,f)&&(i.searchArray[f-n]=!0);for(c=0,h=1;i.searchArray[c];)c++,h++;i.searchLength=h}return i},Oet:function(t,n,i,r,e){for(var o,u,s,a,l,f,c,h,v,d,o=this,u=o.Mf,s=0,a={searchArray:new Array(r),searchLength:1},l={searchArray:new Array(u.getColumnCount()-e),searchLength:1},f=i-1;n<=f&&!o.Eet(f,t.col,1,t.colCount);f--)a=o.jet(f,t.col,a,"left"),l=o.jet(f,t.col+t.colCount-1,l,"right");for(;o.Eet(i+s,t.col,1,t.colCount);){for(h=!(c=!0),a=o.jet(i+s,r,a,"left"),l=o.jet(i+s,e,l,"right"),v=r-1;v>=r-a.searchLength;v--)if(o.ket(i+s,v)){s++,c=!1;break}if(c){for(d=e+1;d<=e+l.searchLength;d++)if(o.ket(i+s,d)){s++,h=!0;break}if(!h)return s}}return s},Ret:function(t){for(var n,i,n=this,i=0;n._et(t.row+t.rowCount+i,t.col,1,t.colCount);)i++;return i},Bet:function(t){var n,i,r,e,o,n=this;return n._et(t.row+t.rowCount,t.col,1,t.colCount)?n.Ret(t):(o=t.row+t.rowCount,r=1===t.colCount?i=t.col:(i=t.col,t.col+t.colCount-1),n.Oet(t,e=0,o,i,r))},H_:function(){var t,n,i,r,r,e,o,i,r,t=this,n=t.Mf,i=n.rt.Ktt,r=t.Bet(i);0!==r&&(r=D(i.row+i.rowCount,i.col,r,i.colCount),t.bO=3,t.Xnt=r,e=t.net(),o=t.lnt,n.Qy().execute({cmd:"fill",sheetName:n.name(),startRange:i,fillRange:r,autoFillType:e,fillDirection:t.bO}),i=t.Knt(),r=n.getSelections(),!o)&&n.parent.options.showDragFillSmartTag&&1===r.length&&r[0].equals(i)&&4!==t.fnt&&t.Tet(t.fnt)}})},"./dist/plugins/fill/fill-render.js":function(t,n,i){var F,b,n,j,v;Object.defineProperty(n,"__esModule",{value:!0}),F=i("Core"),b=i("./dist/plugins/fill/utils.js"),n=F.GC$,j=Math.min,v=Math.max,n.extend(F.g7.prototype,{Let:function(t,n){var i,r,e,o,u,t,s,i,a,l,n,i=this.Mf,r=i.options.rightToLeft,e=t.x,o=t.y,u=(0,b.getWidth)(t),t=(0,b.getHeight)(t),s=i.U5(),i=i.Fi(),a=4,l=-2.5;return 2007<n&&(a=5,l=-3),n=new F.Rect(-4,-4,a,a),-1===s.col?(n.x=r?i.BA+l:i.b6,n.y=o+t+l):-1===s.row?(n.x=r?e+l:e+u+l,n.y=i.T6):(n.x=r?e+l:e+u+l,n.y=o+t+l),n},yO:function(t,n,i,r,e){var o,u,s,a,a,r,l,f,c,h,s,n,i,o=this,u=o.Mf,s=u.Fi(),a=u.parent,a=a&&a.SC,r=o.Let(r,a),l=r.x,f=r.y,c=(0,b.getWidth)(r),h=(0,b.getHeight)(r),s=s.c9(n,i);e&&!r.intersectRect(e)||r.intersectRect(s)&&(n=-1.5,(i=new F.Rect(l+(n=2007<a?-1:n),f+n,c+2,h+2)).x<s.x&&(i.width-=s.x-i.x,i.x=s.x),i.y=v(i.y,s.y),o.O1(i),t.save(),e&&!e.containsRect(r)&&(t.rect(e.x,e.y,(0,b.getWidth)(e),(0,b.getHeight)(e)),t.clip()),t.beginPath(),t.fillStyle=F.Pf.vl(u,u.getSelectionBorderColor()),t.fillRect(l,f,c,h),o.yet=new F.Rect(r.x,r.y,4,4),t.beginPath(),t.restore())},cet:function(t,n,i,r){var e=n.x,o=n.y,u=e+(0,b.getWidth)(n),n=o+(0,b.getHeight)(n);(0,b.paintDragLine)(t,e-2,o,u+1,o,i,r),(0,b.paintDragLine)(t,e-1,n,u+1,n,i,r),(0,b.paintDragLine)(t,e,o-1,e,n+1,i,r),(0,b.paintDragLine)(t,u,o-1,u,n+1,i,r)},Fet:function(t,n){var i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,c,w,m,y,_,y,u,y,f,l,C,u,D,y,l,i=this,r=i.Mf,e=r.rt,o=e.q6,u=o.hitTarget;o&&u&&(s=o.hitCol,a=o.hitRow,l=o.row,f=o.col,c=e.i_,h=r.Pet,d=r.getSelectionBorderColor(),g=(0,b.getLineStyle)(r),p=8,t.save(),!0===c?(c=r.Yy(0).findCol(s)||r.Yy(1).findCol(s)||r.Yy(2).findCol(s),w=r._y(0).findRow(a)||r._y(1).findRow(a)||r._y(2).findRow(a),-1===o.row&&-1!==o.col?c&&(m=c.x,y=(0,b.getWidth)(c),o.col=s,u.x>m+y/2&&(o.col<r.getLastFullyVisibleColumn()||o.col===r.G6())&&(m=c.x+(0,b.getWidth)(c),o.col++),(h=h&&0===(0,b.getWidth)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(m,o.y,0,(0,b.getHeight)(o)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,m-8,o.y,m+8,o.y,d,g),(0,b.paintDragLine)(t,m,o.y,m,o.y+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,o.y+(0,b.getHeight)(o),m+8,o.y+(0,b.getHeight)(o),d,g)):-1!==o.row&&-1===o.col?w&&(_=w.y,y=(0,b.getHeight)(w),o.row=a,u.y>_+y/2&&(o.row<r.getLastFullyVisibleRow()||o.row===r.P6())&&(_=w.y+(0,b.getHeight)(w),o.row++),(h=h&&0===(0,b.getHeight)(h)?h:e.q6)&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),r.Uet=new F.Rect(o.x,_,(0,b.getWidth)(o),0),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),(0,b.paintDragLine)(t,o.x,_-8,o.x,_+8,d,g),(0,b.paintDragLine)(t,o.x,_,o.x+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,o.x+(0,b.getWidth)(o),_-8,o.x+(0,b.getWidth)(o),_+8,d,g)):-1!==o.row&&-1!==o.col&&(u=r.Yy(0).findCol(f)||r.Yy(1).findCol(f)||r.Yy(2).findCol(f),y=r._y(0).findRow(l)||r._y(1).findRow(l)||r._y(2).findRow(l),w)&&c&&y&&u&&(m=u.x,_=y.y,h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),i.E1(r.U5(),n)),f=!1,l=r.getCellRect(a,s),(f=!e.Cnt&&l?(C=o.hitTarget.x-l.x)<j(16,r.nn(s)/4):f)?m=c.x:_=w.y,r.Uet=new F.Rect(m,_,(0,b.getWidth)(o),(0,b.getHeight)(o)),r.U5().contains(a,s)||(t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),f?((0,b.paintDragLine)(t,m-8,_,m+8,_,d,g),(0,b.paintDragLine)(t,m,_,m,_+(0,b.getHeight)(o),d,g),(0,b.paintDragLine)(t,m-8,_+(0,b.getHeight)(o),m+8,_+(0,b.getHeight)(o),d,g),e.Dnt=!0):((0,b.paintDragLine)(t,m,_-8,m,_+8,d,g),(0,b.paintDragLine)(t,m,_,m+(0,b.getWidth)(o),_,d,g),(0,b.paintDragLine)(t,m+(0,b.getWidth)(o),_-8,m+(0,b.getWidth)(o),_+8,d,g),e.Dnt=!1)))):(h&&(v=new F.Rect(h.x-8,h.y-8,(0,b.getWidth)(h)+16,(0,b.getHeight)(h)+16),i.O1(v,n),u=r.U5(),l=(y=(D=(0,F.Ec)(o.row,o.col,o.rowCount,o.colCount)).union(u)).row,2<y.row&&(y.row-=3),l+y.rowCount+2<r.getRowCount()&&(y.rowCount+=3+l-y.row),i.E1(y,n)),t.rect(n.x,n.y,(0,b.getWidth)(n),(0,b.getHeight)(n)),t.clip(),t.beginPath(),i.cet(t,o,d,g)),t.beginPath(),t.restore())},o_:function(){var t,n,i,r,i,e,o,u,s,a,l,f,c,s,l,t=this,n=t.Mf,i=n.sw,r=n.rt.xnt;i&&i.dragInfo&&r&&(i=t.J(),e=n.Fi(),o=n.rt.q6,u=n.j1(r),s=n.frozenTrailingColumnCount(),a=n.frozenTrailingRowCount(),l=n.getColumnCount()-s,f=n.getRowCount()-a,c=e.c9(1,1),0<s&&r.col+r.colCount<=l&&u.x+(0,b.getWidth)(u)>c.x+(0,b.getWidth)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),0<a&&r.row+r.rowCount<=f&&u.y+(0,b.getHeight)(u)>c.y+(0,b.getHeight)(c)&&u.intersectRect(c)&&(u=u.getIntersectRect(c)),s=n.options.rightToLeft?new F.Rect(e.Hy,e.T6,e.b6+e.F6,e.Ay+e.Iy):new F.Rect(e.b6,e.T6,e.Hy+e.zy,e.Ay+e.Iy),0<=(0,b.getWidth)(u)&&0<=(0,b.getHeight)(u)&&(o.x=u.x,o.y=u.y,o.width=(0,b.getWidth)(u),o.height=(0,b.getHeight)(u),t.Fet(i,s)),l=n.rt.i_,n.Pet=!0===l?n.Uet:new F.Rect(o.x,o.y,(0,b.getWidth)(o),(0,b.getHeight)(o)))}})},"./dist/plugins/fill/fill-ui.js":function(V,t,n){var i,H,u,N,e,s,a,o,r,l,n,f,c,h,v,d,g,p,w,m,y,_,C,P,q,D,F,b,j,R,T,M,x,L,n,k,B,W,$,I,O;function A(t,n,i,r,e,o){var t=t.Oi,u=t?"160px":"150px",t=t?"25px":"20px",u=s(a("div")).css([C,q,D,"padding",F],["block",u,t,0,0]).addClass("gc-smartMenu-item-default "+i+" ui-state-default"+l),t=s(a("div")).addClass(g).appendTo(u),i=s(a("div")).addClass("gc-menu-item-text").appendTo(u),n=s(a("input")).attr({id:n,value:e,type:"radio",name:"fill-group",style:"display:none"}).appendTo(t);return s(a("span")).text(r).appendTo(i),o?(t.addClass(d),n.prop("checked","checked")):n.prop("checked",""),u}function S(t,n,i){var t,r,t=I.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.ter=u.DialogFeatureType.fill,t.Mf=n,t.Het=s("."+w),(r=t.g$=t.Xc()).addClass(c),i&e.FillAction.smartMenuCopyCells&&A(n,"smartMenuCopyCells",f,k().CopyCells,"0",!0).appendTo(r),i&e.FillAction.smartMenuFillSeries&&A(n,"smartMenuFillSeries",f,k().FillSeries,"1").appendTo(r),i&e.FillAction.smartMenuFillFormattingOnly&&A(n,"smartMenuFillFormattingOnly",f,k().FillFormattingOnly,"2").appendTo(r),i&e.FillAction.smartMenuFillWithoutFormatting&&A(n,"smartMenuFillWithoutFormatting",f,k().FillWithoutFormatting,"3").appendTo(r),t}function E(t,n,i){var t,n,t=O.call(this,t,o(n.parent.Ti),void 0,!0)||this;return t.Mf=n,t.zet=i,n=t.Vet=t.Xc().addClass("gc-smart-tag-default "+w+" gc-no-user-select ui-widget-header"+l),t.Yet=s(a("div")).attr("class","fillSmartTag").css(m,y).appendTo(n),t.Zet=s(a("div")).attr("class","fillSmartTagDown").css([m,C],[y,"none"]).appendTo(n),t}i=this&&this.__extends||($=function(t,n){return($=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}$(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Aet=void 0,H=n("Common"),u=n("Core"),N=n("./dist/plugins/fill/fill.ns.js"),e=n("./dist/plugins/fill/fill-event.js"),s=u.GC$,a=u.mt.En,o=u.mt.gi,r=s(document),l=" btn btn-default",f="gc-fill-type-item",c="gc-fill-menu-container",h=(n="ui-state-hover ")+"gc-smartMenu-item-hover",v=n+"gc-smart-tag-hover",d="ui-icon ui-icon-check gc-check-image",g="gc-menu-item-input",p="ui-state-active gc-smart-tag-active",w="gc-tag-container",m="float",y="left",_="top",C="display",P="width",q="min-width",D="height",F="margin",b="change",j="input[type=radio]",R="mouseover",T="mouseout",M="click",x="fillTypeChanged",L="keydown.ui-fill",n=new H.Common.ResourceManager(N.SR,"Fill"),k=n.getResource.bind(n),I=u.zc,i(S,I),S.prototype.$c=function(){I.prototype.$c.call(this)},S.prototype.aY=function(){var e,t,n,e=this,t;s("."+f).bind(R,function(){s(this).addClass(h)}).bind(T,function(){s(this).removeClass(h)}).bind(M,function(){var t,n,i,r,i,t=s(this),n=e.Het,i=t.find(j),r=i[0];r.checked=!0,i.trigger(b),n.trigger(M),n.trigger(T),t.removeClass(h),i=parseInt(s(r).attr("value"),10),e.Wet(i)}),(n=e.g$.find(j)).bind(b,function(){s("."+g).removeClass(d),s(this).parent().addClass(d)})},S.prototype.Qet=function(){s("."+f).unbind(R).unbind(T).unbind(M),this.g$.find(j).unbind(b)},S.prototype.Wet=function(t){var n=this,i=n.Mf,r=i.rt;if(n.Ket!==t){n.Ket=t,i.cnt=!0,i.suspendEvent();try{u.Commands.undo.execute(i.parent,{sheetName:i.name()})}finally{i.resumeEvent()}i.cnt=!1,i.Qy().execute({cmd:"fill",sheetName:i.name(),startRange:r.Ktt,fillRange:r.Xnt,autoFillType:t,fillDirection:r.bO}),n.Het.trigger(x,t)}},S.prototype.Jet=function(){return!!s("."+c).length},B=S,O=u.zc,i(E,O),E.prototype.Xet=function(t,n,i){var r=this,e=r.Mf.Oi,n=s(n),o=r.qet,r=r.Zet,u=e?"38px":"32px",e=e?"24px":"18px";o&&o.Jet()||(t?n.addClass(v):n.removeClass(v),n.css([P,D],[t?u:e,e]),i)||(t?r.show():r.hide())},E.prototype.$et=function(){var e=this,t=e.Vet,n=u.mt.pi(),o=u.mt.Tt.safari&&(n.ipad||n.iphone);t.bind(R,function(){e.Xet(!0,this,o)}).bind(T,function(){e.Xet(!1,this,o)}),t.bind(M,function(){var t,n,i,r,n,i,t=s(this),n=e.qet,i=e.Zet,r;n&&n.Jet()?(o&&i.hide(),t.removeClass(p),e.tit()):(o&&i.show(),t.addClass(p),e.nit(),(i=(n=e.g$)&&n.find(j)[e.zet.fillType])&&!i.checked&&(i.checked=!0,s(i).trigger(b)))}),r.bind(L,function(t){27===t.keyCode&&(e.qet&&e.qet.Jet()?e.tit():e.close(),u.mt.vi(t))})},E.prototype.rQ=function(){var t=this,n=t.Vet,i=t.zet,r=t.Mf.Oi,e=r?"3px":"0px",r=r?"24px":"18px";n&&(n.css([y,_],[i.x,i.y]),t.$c(),t.$et(),t.Yet.css(F,e),t.Zet.css(D,r),t.c5())},E.prototype.nit=function(){var t,n,n,i,r,r,e,o,u,t=this,n=t.Mf;t.qet||(t.qet=new B(n.parent.j2(),n,this.zet.availableFillAction),t.g$=t.qet.Xc()),i=(n=t.Vet).css(y),r=n.css(_),r=parseFloat(r),o=t.qet,u=t.zet,o.Ket=u.fillType,isNaN(r)||(e=r+n.height()+2),t.g$.css([y,_],[i,e]),o.$c(),o.aY(),o.Het.unbind(x).bind(x,function(t,n){u.fillType=n})},E.prototype.RRe=function(){var t,n,i,r,e,i,t,i,o,t,u,n;this.rf()&&(e=-1===(i=(n=this.Mf).U5()).col?(r=n.C0(i.row+i.rowCount-1),n.S0(0)):(r=-1===i.row?n.C0(0):n.C0(i.row+i.rowCount-1),n.S0(i.col+i.colCount-1)),i=n.getRangeRect(r,e,i),t=null==(t=n.parent)?void 0:t.SC,i=n.Dn.Let(i,t),t=(o=n.Fi()).c9(r,e),u=3,i.intersectRect(t)?this.Vet.css([y,_],[i.x+3,i.y+3]):this.Vet.css(C,"none"),this.Vet.removeClass(p),n=this.qet)&&n.rf()&&n.close()},E.prototype.tit=function(){var t=this.qet;t&&(t.Qet(),t.close())},E.prototype.c5=function(){var t=this,n=t.qet,t=t.Vet;n&&(n.Jet()&&t.trigger(M),t.trigger(T))},E.prototype.close=function(){var t,n,t,t=this,n=t.Mf;t.c5(),r.unbind(L),O.prototype.close.call(this),(t=n.fg)&&(t.style.cursor="default"),!n||n.il&&n.il.XD||n.Zg()},E.prototype.lf=function(t){var n;return!(!this.Wc||!O.prototype.hf.call(this,this.Wc.get(0),t))||this.g$&&O.prototype.hf.call(this,this.g$.get(0),t)},t.Aet=E},"./dist/plugins/fill/fill.entry.js":function(t,n,i){var r,e,r=this&&this.__createBinding||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&("get"in e?n.__esModule:!e.writable&&!e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){t[r=void 0===r?i:r]=n[i]}),e=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),i("./dist/plugins/fill/drag-fill.js"),i("./dist/plugins/fill/fill-event.js"),i("./dist/plugins/fill/fill-render.js"),i("./dist/plugins/fill/drag-header-to-move/index.js"),e(i("./dist/plugins/fill/fill-ui.js"),n),e(i("./dist/plugins/fill/fill.js"),n),e(i("./dist/plugins/fill/fill.ns.js"),n)},"./dist/plugins/fill/fill.js":function(R,t,n){var i,e,h,r,T,n,k,o,tt,_,C,D,nt,I,u,O,M,u,A,S,it,rt,et,E,u,x,V,H,N,P,q,L,ot,B,W,u,n,$,z,U,n,G,K,J,Q,X,Y,Z,at,lt,ft,ct,ht,n,u,n,u,n,vt,dt,gt,pt,wt,mt,yt,_t,Ct,s,a,Dt,Ft;function ut(t){return!st(t)&&o.q8(t)}function st(t){return"string"==typeof t}function bt(t,n){return-1!==t.lastIndexOf(n)}function jt(t){var n=[t];return n.rowCount=1,n.colCount=M(t),n}function Rt(t){return t}function Tt(t,n,i,r){var n=jt(n),i=jt(i),r=jt([r]),t=t?e.Common.eit(n,i,r,!0,Rt,tt,tt,tt):e.Common.iit(n,i,r,!0,tt,tt,tt),n=t&&t[0][0];return typeof n===it?e.Common.st.E8(n,13):n}function Mt(t){return t.toLowerCase()}function l(t){this._indexes=[],this.oit=[],this.ait=[],this._type=tt,this.sit=[],this.cit=tt,this.lit=nt(t)?-1:t}function f(t){this.hit=-1,this.dit=[],this.MV=-1,this.Mf=t}function xt(){this.vit="",this.mit="",this.MV=0,this.git=1,this._padding=""}function c(t){var n,i,r,e,n=t.length,i=1;if(1<n)for(i=t[1]-t[0],e=2;e<n;e++)if(i!==(r=t[e]-t[e-1])){i=0;break}return i}function v(t,n){return 0<t?(t-1)%n:n-Math.abs(t)%n-1}function d(t){for(var n="",i=0;i<t;)n+="0",i++;return n}function g(t,n){return 12*(n.getFullYear()-t.getFullYear())+(n.getMonth()-t.getMonth())}function kt(t){return t.every(function(t){var n;return 1===t.getDate()})}function It(t){return t.every(function(t){var n,i,r,e,n=t.getFullYear(),i=t.getMonth(),r,e;return t.getDate()===new Date(n,i+1,0).getDate()})}function Ot(t){var n,i,n=0,i;return t.every(function(t){var t=t.getDate();return(n=n||t)===t})?n:0}function At(t,n){for(var i,r,e,o,i=t.length,r=!0,o=2;o<i&&(r=n===(e=g(t[o-1],t[o])));o++);return r}function St(t){return t.every(function(t){var n=t.getHours(),i=t.getMinutes(),t=t.getSeconds();return 0!==n||0!==i||0!==t})}function Et(t,n){return new Date(t,n+1,0).getDate()}function p(t){return"0"===t[0]}function Vt(n,t,i){var r,e,o,e,o,u,s,u=i?1:2,s=i?2:1;return t.every(function(t){return!!(r=t.match(n.pit))&&(e=r[u],(o=e.length)>n.yit&&p(e)&&(n.yit=o),o=parseInt(e,10),e=r[s],nt(n.cit)&&(n.cit=e),e!==n.cit?(n.wit=!0,n.cit=tt,n.sit=[]):n.sit.push(o),!0)})}function w(){}function Ht(){var t=null!==vt&&vt.apply(this,arguments)||this;return t.Mit=0,t._type=rt,t}function m(){return null!==dt&&dt.apply(this,arguments)||this}function y(){return null!==gt&&gt.apply(this,arguments)||this}function Nt(){return null!==pt&&pt.apply(this,arguments)||this}function Pt(){var t=wt.call(this)||this;return t.pit=tt,t.sit=[],t.cit=tt,t.wit=!1,t.yit=0,t._type=et,t.Cit=!1,t.Sit=!1,t.Tit=new W,t}function F(t){var n=mt.call(this)||this;return n.Ait=new B(t),n}function qt(){var t=null!==yt&&yt.apply(this,arguments)||this;return t.pit=/^\d+$/,t}function Lt(){var t=null!==_t&&_t.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)$/,t}function Bt(){var t=null!==Ct&&Ct.apply(this,arguments)||this;return t.pit=/^(\d+)(\D+.*)$/,t}function b(){var t=null!==s&&s.apply(this,arguments)||this;return t.pit=/^(.*\D+)(\d+)(\D+.*)$/,t}function Wt(){return null!==a&&a.apply(this,arguments)||this}function $t(){return null!==Dt&&Dt.apply(this,arguments)||this}function zt(){var t=null!==Ft&&Ft.apply(this,arguments)||this;return t.Cit=!0,t}function Ut(t){var n,i,i,t,r,e,o,n=this;n.Iit=[new $,new z,new U],n.xit=new at,n.Nit=new lt,i=V.culture(),i=V.Fe(i).isJCKCulture,t=new G(t),r=new K,e=new J,o=new Q,n.kit=i?[t,r,new Z,e,o,new X]:[t,r,e,o]}function Gt(t){t.forEach(function(t){t&&t.dispose()})}function j(t){this.Mf=t,this.Dit=!1,this._it=[]}i=this&&this.__extends||(ht=function(t,n){return(ht=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}ht(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.Wtt=t.nnt=t.FillDateUnit=t.FillType=t.FillSeries=t.FillDirection=t.AutoFillType=void 0,e=n("Common"),h=n("Core"),r=n("CalcEngine"),T=n("SheetsCalc"),n=n("./dist/plugins/fill/fill.ns.js"),k=!!r,o=e.Common.lt,tt=null,_=void 0,C=Math.floor,D=h.Ec,nt=o.ht,I=o.uJ,u=e.Common.Uf,O=u.Eit,M=u.tR,u=e.Common.ct,A=u.o0,S=u.Y0,it="number",rt="date",et="string",E="default",u=new e.Common.ResourceManager(n.SR,"Fill"),x=u.getResource.bind(u),V=e.Common.CultureManager,(n=H=t.AutoFillType||(t.AutoFillType={}))[n.copyCells=0]="copyCells",n[n.fillSeries=1]="fillSeries",n[n.fillFormattingOnly=2]="fillFormattingOnly",n[n.fillWithoutFormatting=3]="fillWithoutFormatting",n[n.clearValues=4]="clearValues",n[n.auto=5]="auto",(u=N=t.FillDirection||(t.FillDirection={}))[u.left=0]="left",u[u.right=1]="right",u[u.up=2]="up",u[u.down=3]="down",(n=P=t.FillSeries||(t.FillSeries={}))[n.column=0]="column",n[n.row=1]="row",(u=q=t.FillType||(t.FillType={}))[u.direction=0]="direction",u[u.linear=1]="linear",u[u.growth=2]="growth",u[u.date=3]="date",u[u.auto=4]="auto",(n=L=t.FillDateUnit||(t.FillDateUnit={}))[n.day=0]="day",n[n.weekday=1]="weekday",n[n.month=2]="month",n[n.year=3]="year",l.prototype.jit=function(){return M(this._indexes)},l.prototype.Oit=function(){for(var t=this,n=[],i=t.oit,r,e,r=0;r<M(i);r++)e=i[r],n.push("object"===t._type?t.r0(e):e);return n},l.prototype.Rit=function(){var t,n,i,r,e,t=this,n=t._indexes;if(0<M(n)){for(r=[],e=void 0,-1===(i=t.lit)&&(i=n[0]),e=0;e<M(n);e++)r[e]=n[e]-i+1;return r}return tt},l.prototype.Bit=function(){var t=this.oit;return M(t)?t:tt},l.prototype.Eit=function(t,n,i){if(!ut(i))throw new Error(x().Exp_NumberOnly);var r=this;nt(r._type)&&(r._type=i instanceof Date?rt:it),O(r._indexes,t,n),O(r.oit,t,I(i))},l.prototype.ZP=function(t,n){var i=this,r=nt(i._type);ut(n)?(r&&(n instanceof Date?i._type=rt:i._type=it),i.oit.push(I(n))):r&&(i._type=st(n)?et:E),i._indexes.push(t),i.ait.push(n)},l.prototype.Lit=function(t){return this._type===rt?this.r0(t):t},l.prototype.r0=function(n){var i=tt;if(n instanceof Date)i=n;else if(r)try{i=r.Convert.r0(n)}catch(t){i=n}return i},ot=l,f.prototype.L0=function(){this.Mf=tt},f.prototype.Fit=function(){var t=this.Mf;return t.parent&&t.parent.Ow()||[]},f.prototype.Pit=function(t){var n,i,r,e,o,u,s,a,l,f,c,h,v,d,g,p,n=t.length,i=!1;if(t&&0<n)for(r=Mt(t[0]),e=this.Fit(),f=l=a=s=u=o=void 0,o=0;o<e.length;o++)if(0<=(a=(s=(u=e[o]).map(Mt)).indexOf(r))){for(l=a,c=s.length,d=v=h=void 0,g=1;g<n;g++){if(v=Mt(t[g]),!(0<=(h=s.indexOf(v)))){i=!1;break}if(d=h-l+c,f){if(f!==d){i=!1;break}}else i=!0,f=d,l=h}if(p=1===n,i||p){i=!0,this.hit=a,this.dit=u,this.MV=p?1:f;break}}return i},f.prototype.Sl=function(t){var n=this.dit,i=this.hit,r=this.MV,e=n.length,o,u,u;return n[(i+r*v(t,e))%e]},B=f,xt.prototype.Sl=function(t){var t=this.MV*(t-1)+this.git,n=this._padding.length,t=""+Math.abs(t),i,r=this._padding+t,e=r.length,t=n<t.length?t:r.substr(e-n);return this.vit+t+this.mit},W=xt,w.prototype.match=function(t){return!1},w.prototype.getTargetValue=function(t,n,i,r,e){},w.prototype.resetProp=function(){},w.prototype.Git=function(t,n){return t.indexOf(n+1)},w.prototype.dispose=function(){},i(Ht,vt=u=w),i(m,dt=n=Ht),m.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=kt(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},m.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1);return new Date(r+parseInt(t/12,10),t%12,1)},$=m,i(y,gt=n),y.prototype.match=function(t){var n,i,r,e,n=this.Mit=g(t[0],t[1]),i=It(t),r=t.length,e=!0;return i&&2<r&&(e=At(t,n)),i&&e},y.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),r=t%12;return new Date(n,r,Et(n,r))},z=y,i(Nt,pt=n),Nt.prototype.match=function(t){var n,i,r,e,o,u,n=!1;return St(t)||(i=this.Mit=g(t[0],t[1]),e=0<(r=Ot(t)),o=t.length,u=!0,this.Uit=r,e&&2<o&&(u=At(t,i)),n=e&&u),n},Nt.prototype.getTargetValue=function(t,n){var i,t=t.ait[0],r=t.getFullYear(),e,o,u,t=t.getMonth()+this.Mit*(n-1),n=r+parseInt(t/12,10),s;return new Date(n,t%12,this.Uit)},U=Nt,i(Pt,wt=u),Pt.prototype.resetProp=function(){this.sit=[],this.yit=0,this.cit=tt,this.wit=!1,this.Cit=!1,this.Sit=!1},Pt.prototype.getInternal=function(t){for(var n,i,r,e,n=!1,i=t[0],e=1;e<t.length;e++)if(r=t[e],1!==Math.abs(r-i)){n=!0;break}return n},i(F,mt=n=Pt),F.prototype.dispose=function(){var t=this;t.Ait&&(t.Ait.L0(),t.Ait=tt)},F.prototype.match=function(t){return this.Ait.Pit(t)},F.prototype.getTargetValue=function(t,n,i,r,e){var o,t=t.ait.length,i=this.Git(i,r),r=tt,u;return r=-1!==i?this.Ait.Sl(u=t*e+i+1):r},G=F,i(qt,yt=n),qt.prototype.match=function(t){var n=this,i,r,r;return t.every(function(t){return!!(i=t.match(n.pit))&&((r=t.length)>n.yit&&p(t)&&(n.yit=r),r=parseInt(t,10),n.sit.push(r),!0)})},qt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},K=qt,i(Lt,_t=n),Lt.prototype.match=function(t){return Vt(this,t,!1)},Lt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.vit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},J=Lt,i(Bt,Ct=n),Bt.prototype.match=function(t){return Vt(this,t,!0)},Bt.prototype.getTargetValue=function(t,n,i,r,e){var o=t.ait,u=this.Tit,s=c(this.sit),o=o.length,a=0!==s,n=a?0:v(n,o),i=this.Git(i,r),r=tt,l;return this.Cit=a,this.Sit=this.getInternal(t._indexes),-1!==i&&(u.mit=this.cit,u.MV=s,u.git=this.sit[n],u._padding=d(this.yit),r=u.Sl(l=o*e+i+1)),r},Q=Bt,i(b,s=n),b.prototype.resetProp=function(){s.prototype.resetProp.call(this),this.Hit=tt},b.prototype.match=function(t){var n,i,r,i,n,r,e,e=this;return t.every(function(t){return!!(n=t.match(e.pit))&&(i=n[2],(r=i.length)>e.yit&&p(i)&&(e.yit=r),r=parseInt(i,10),i=n[1],nt(e.cit)&&(e.cit=i),n=n[3],nt(e.Hit)&&(e.Hit=n),i!==e.cit||n!==e.Hit?(e.wit=!0,e.cit=tt,e.Hit=tt,e.sit=[]):e.sit.push(r),!0)})},b.prototype.getTargetValue=function(t,n,i,r,e){var o=this,u=t.ait,s=o.Tit,a=c(o.sit),u=u.length,l=0!==a,n=l?0:v(n,u),i=o.Git(i,r),r=tt,f;return o.Cit=l,o.Sit=o.getInternal(t._indexes),-1!==i&&(s.vit=o.cit,s.mit=o.Hit,s.MV=a,s.git=o.sit[n],s._padding=d(o.yit),r=s.Sl(f=u*e+i+1)),r},Y=["-","_",":",".",","],i(Wt,a=X=b),Wt.prototype.resetProp=function(){a.prototype.resetProp.call(this),this.zit=tt},Wt.prototype.match=function(t){var r,e,o,r,e,o,u,s,u=this;return t.every(function(n){var t,t,t,i,t=u.zit;if(s=nt(t)?Y.some(function(t){if(bt(n,t))return u.zit=t,!0}):bt(n,t)){if(t=u.zit,t=n.lastIndexOf(t),r=n.substring(0,t+1),nt(u.cit))u.cit=r;else if(u.cit!==r)return!1;if(t=n.substr(t+1),r=t.match(i=/^(\d+)(\D+.*)$/))return e=r[1],(o=e.length)>u.yit&&p(e)&&(u.yit=o),o=parseInt(e,10),e=r[2],nt(u.Hit)&&(u.Hit=e),e!==u.Hit?(u.cit=tt,u.Hit=tt,!(u.sit=[])):(u.sit.push(o),!0)}return!1})},Z=Wt,i($t,Dt=u),$t.prototype.getTargetValue=function(t,n,i){return Tt(!0,t.Bit(),i,n)},at=$t,i(zt,Ft=u),zt.prototype.getTargetValue=function(t,n,i,r){var t=t.ait,e,o;return t[v(n,t.length)]},lt=zt,Ut.prototype.getRule=function(t,n){var i,r,e,o,u,i=[],r=this.Nit;for(t===rt?(i=this.Iit,r=this.xit):t===et?i=this.kit:t===it&&(r=this.xit),e=0;e<i.length;e++)if(u=void 0,(o=i[e]).resetProp(),o.match(n)){if(u=o.wit,nt(u)||!1===u)return o;if(!0===u)return r}return r},Ut.prototype.L0=function(){var t=this;t.Iit&&(Gt(t.Iit),t.Iit=tt),t.kit&&(Gt(t.kit),t.kit=tt),t.xit&&(t.xit.dispose(),t.xit=tt),t.Nit&&(t.Nit.dispose(),t.Nit=tt)},t.nnt=Ut,j.prototype.qtt=function(t,n,i,r,e){var o=this,t=t?1:2;nt(r)&&nt(e)?o.$tt(n,i,t):o.$tt(n,i,t,r,e,tt)},j.prototype.$tt=function(t,n,i,r,e,o){var u,s,t,a,l,f,c,h,v,d,g,p,w,m,y,_,C,D,F,t,b,j,p,R,T,u=this,s=u.Mf,t=s.JS(t),a=t.row,l=t.col,f=t.rowCount,c=t.colCount;if(s.Ut.eE(a,l,f,c))throw new Error(x().Exp_RangeContainsMergedCell);for(m=0,_=(y=1===n)?c:f,D=y?a+f:l+c,F=(w=3<arguments.length)?1:_,b=(t=this.Mf.rt.Ktt).row===a&&t.rowCount===f&&t.col>l||t.col===l&&t.colCount===c&&t.row>a,h=C=y?a:l;h<D;h++)if(p=b&&w?a+f-1:a,(R=y?u.Vit(h,j=b&&w?l+c-1:l,1,F,n):u.Vit(p,h,F,1,n))&&R.jit())for(g=R._indexes[0],w?(p=b?R.oit[M(R.oit)-1]:R.oit[0],v=u.Yit(b,p,_,i,r,e,o),b&&(m=_-M(v),g=R._indexes[M(R._indexes)-1])):v=u.Zit(R,_,i),d=0;d<M(v);d++)T=R.Lit(v[d]),y?u.Wit(s,h,g,h,l+m+d,T,i):u.Wit(s,g,h,a+m+d,h,T,i)},j.prototype.Vit=function(t,n,i,r,e){for(var o=tt,u=this.Mf,s,a=1===e,l=a?n+r-1:t+i-1,f=a?n:t;f<=l;)ut(s=a?u.getValue(t,l):u.getValue(l,n))&&(o=o||new ot(f)).Eit(0,l,s),l--;return o},j.prototype.Yit=function(t,n,i,r,e,o,u){for(var s,a,l,f,c,h,v,s=[],a=n,f=0<=e,c=nt(o),l=0;l<i;l++)h=o<=a,v=a<=o,t&&(c||f&&h||!f&&v)?(s.unshift(a),1===r?a-=e:2===r?a/=e:3!==r||nt(u)||(a=this.Qit(!0,u,n,a,e,l+1))):!t&&(c||f&&v||!f&&h)&&(s.push(a),1===r?a+=e:2===r?a*=e:3!==r||nt(u)||(a=this.Qit(!1,u,n,a,e,l+1)));return s},j.prototype.Zit=function(t,n,i){var r=[],e,o=1===i;if(o||2===i){for(1===t.jit()&&t.ZP(t._indexes[0]+1,o?t.Lit(t.oit[0]+1):t.Oit()[0]),e=0;e<n;e++)r.push(Tt(!!o,t.Bit(),t.Rit(),e+1));return r}return tt},j.prototype.Jtt=function(t,n,i,r,e,o){var u,s,a,t,l,f,c,t,s,h,v,a,u=this,s=u.Mf,a=s.Ut,t=s.JS(t),l=t.row,f=t.col,c=t.rowCount,t=t.colCount,s=s.JS(s.rt.Ktt),h=s.row,v=s.col;if(a.GT(h,v,s.rowCount,s.colCount)||a.GT(l,f,c,t))throw new Error(x().Exp_ChangeMergedCell);return a=u.Kit(s,c,t,n,i,!(l<h||f<v),r,e,o),u.Jit&&u.Jit.IB&&(u.Jit.IB.reFilter(),delete u.Jit),a},j.prototype.Kit=function(t,n,i,r,e,o,u,s,a){var l=this,f=o?1:-1,c,h,v,d,g=t.row,p=t.col,w=t.rowCount,m=t.colCount;if(1===r){if(c=C(i/m),h=i%m,!e)for(d=1;d<c;d++)l.Mf.Y1r=d*f,v=D(g,p+d*f*m,w,m),l.Fhe(t,v,r,4,e,o,_,_,!0,u,s),l.Xit(t,v,r,4,e,o,_,_,!0,u,s),delete l.Mf.Y1r;if(e&&1<c&&0===h&&(c-=1,h=m),0<c&&0<h)return v=D(g,o?p+c*m:p-c*m+m-h,w,h),l.Fhe(t,v,r,4,e,o,tt,o?0:m-h,_,u,s),l.Xit(t,v,r,4,e,o,tt,o?0:m-h,_,u,s)}else{if(c=C(n/w),h=n%w,l.Dit||(v=D(g+f*w,p,n-w,i),l.qit(t,v,f,a)),!e)for(d=1;d<c;d++)v=D(g+d*f*w,p,w,m),l.Fhe(t,v,r,4,e,o,tt,tt,!0,u,s),l.Xit(t,v,r,4,e,o,tt,tt,!0,u,s);if(e&&1<c&&0===h&&(c-=1,h=w),0<c&&0<h)return v=D(o?g+c*w:g-c*w+w-h,p,h,m),l.Fhe(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s),l.Xit(t,v,r,4,e,o,o?0:w-h,tt,!0,u,s)}},j.prototype.Xit=function(t,n,V,i,r,e,H,N,o,u,s){for(var a,l,P,f,c,h,v,d,q,g,L,p,B,w,W,m,y,_,C,D,F,b,$,z,U,j,R,T,M,G,x,k,c,K,I,J,Q,X,O,A,Y,S,E,Z,a=this,l=a.Mf,P=l.Ut,f=1===V,q=f?t.row:t.col,g=f?t.col:t.row,L=f?n.row:n.col,p=f?n.col:n.row,B=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,W=f?n.colCount:n.rowCount,v=0;v<B;v++){for(_=0,F=C=q+v,b=D=L+v,$=(f?N:H)||0,z=f?0:$,U=f?tt:o,j=y=m=tt;_<w;)if(M=void 0,G=R=g+_,x=T=p+_-$,f||(C=R,R=F,D=T,T=b),h=P.findSpan(C,R),M=l.getValue(C,R),(k=a.Dit)&&nt(j)&&(j=!1===e?l.getValue(g+w-1,R):l.getValue(C,R)),k||4!==i||!ut(M)&&!st(M)||l.hasFormula(C,R)||(m=m||new ot,c=ut(M)?M instanceof Date?rt:it:et,(y=y||c)!==c))if(!k&&M&&m&&m.jit()){if(d=a.$it(f,t,n,F,b,m,r,e,z,U,u,s),r&&d)return d;y=m=tt}else{if(k||!h||h&&(f?h.row:h.col)===F)if(c=x===p+W-1,K=k?j:M,r){if(k)return K;if(h&&c||!h&&(c&&e||!e&&x===p))return M}else!(x<p+W&&p<=x)||!k&&!f&&(f||o&&l.XT&&l.XT(x))||k&&-1!==a._it.indexOf(D)||a.Wit(l,C,R,D,T,K,i,u,s);h?_+=f?h.colCount:h.rowCount:_++}else m.ZP(G,M),h?_+=f?h.colCount:h.rowCount:_++;if(a.Dit)for(I=t.row,J=t.col,Q=t.rowCount,X=t.colCount,A=O=void 0,Y=!1===e?-1:1,S=1;S<Q;S++)for(O=I+Y*S,E=0;E<X;)A=J+E,Z=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),-1===a._it.indexOf(O)&&a.Wit(l,I,J,O,A,Z,i,u,s),E++;if(m&&m.jit()&&(d=a.$it(f,t,n,F,b,m,r,e,z,o,u,s),r)&&!nt(d))return d}return tt},j.prototype.Fhe=function(t,n,V,i,r,e,H,N,P,o,u){var s,a,q,l,f,c,h,v,d,L,g,B,p,W,w,$,m,y,_,C,D,F,b,j,z,U,R,T,M,x,G,k,c,c,h,I,K,J,Q,O,A,X,S,E,Y;if(!r){for(l=(q=(a=(s=this).Mf).Ut).Ehe(),L=(f=1===V)?t.row:t.col,g=f?t.col:t.row,B=f?n.row:n.col,p=f?n.col:n.row,W=f?t.rowCount:t.colCount,w=f?t.colCount:t.rowCount,$=f?n.colCount:n.rowCount,d=0;d<W;d++){for(_=0,F=C=L+d,b=D=B+d,j=(f?N:H)||0,z=f?0:j,U=f?tt:P,R=y=m=tt;_<w;)x=tt,G=T=g+_,k=M=p+_-j,f||(C=T,T=F,D=M,M=b),v=q.findSpan(C,T),c=a.getValueIgnoreDefault(C,T),nt(c)?_++:((c=l.getFormula(C,T))&&""!==c||(x=l.getValue(C,T)),(c=s.Dit)&&nt(R)&&(R=!1===e?l.getValue(g+w-1,T):l.getValue(C,T)),c||4!==i||!ut(x)&&!st(x)||(m=m||new ot,h=ut(x)?x instanceof Date?rt:it:et,(y=y||h)!==h)?!c&&x&&m&&m.jit()?(s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0),y=m=tt):((c||!v||v&&(f?v.row:v.col)===F)&&(h=c?R:x,!(k<p+$&&p<=k)||!c&&!f&&(f||P&&a.XT&&a.XT(k))||c&&-1!==s._it.indexOf(D)||s.Wit(a,C,T,D,M,h,i,o,u,!0)),v?_+=f?v.colCount:v.rowCount:_++):(m.ZP(G,x),v?_+=f?v.colCount:v.rowCount:_++));if(s.Dit)for(I=t.row,K=t.col,J=t.rowCount,Q=t.colCount,A=O=void 0,X=!1===e?-1:1,S=1;S<J;S++)for(O=I+X*S,E=0;E<Q;)Y=!1===e?l.getValue(g+w-1,A):l.getValue(I,A),A=K+E,-1===s._it.indexOf(O)&&s.Wit(a,I,K,O,A,Y,i,o,u,!0),E++;m&&m.jit()&&s.$it(f,t,n,F,b,m,r,e,z,U,o,u,!0)}return tt}},j.prototype.qit=function(t,n,i,r){var e,o,u,n,s,a,n,l,f,t,c,h,v,d,g,p,w,m,y,_,C,D,F,b,j,e=this,o=e.Mf,u=o.tables,n=t.union(n),s=n.row,a=n.rowCount,n=t.row,l=t.col,f=t.rowCount,t=t.colCount;if(u)for(h=0,v=c=u.AB(n,l,f,t);h<v.length;h++){if(g=(d=v[h]).Ky,p=d.iw,w=a,r)for(m=0,y=r;m<y.length;m++)if((_=y[m]).row===g&&_.col===p){w=_.rowCount,e.Jit=d;break}if(C=d.IB,D=e._it,F=void 0,C&&C.isFiltered&&C.isFiltered()){for(b=0;b<w;b++)C.isRowFilteredOut(F=s+i*b)&&e._it.push(F);if(0<D.length){e.Dit=!0;break}}}if(j=o.IB,!0!==e.Dit&&j&&j.isFiltered&&j.isFiltered()){for(D=e._it,F=void 0,b=0;b<a;b++)j.isRowFilteredOut(F=s+i*b)&&e._it.push(F);0<D.length&&(e.Dit=!0)}},j.prototype.Wit=function(t,n,i,r,e,o,u,s,a,l){var f,c,c,c,u,f=t.Ut,c=t.isActualProtected()&&t.getCell(n,i).hidden();k&&!c&&(l?((c=f.Ehe().getExpression(n,i))&&t.hasFormula(n,i,3,!0)||!nt(t.getValueIgnoreDefault(n,i)))&&(0,h.copyDefaultFormula)(t,t,r,e,c):(t.hasFormula(n,i,3)||t.hasFormula(r,e,3))&&(t.setFormula(r,e,tt),0!==u&&4!==u||(t.getFormula(n,i)||f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression))&&T.CalcOperatorAdjustor.copyFormula(t,n,i,t,r,e,1,1,_,!0))),l||nt(t.getValueIgnoreDefault(n,i))&&!nt(f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Value))?f.getDefaultValue(n,i,tt,h.DefaultChangeValueType.Expression)||f.setDefaultValue(r,e,o,_,h.DefaultChangeValueType.Value):t.setValue(r,e,o),l||(c=a?0:64,s&&(c|=4224),t.vT(n,i,r,e,1,1,c=c|1024|256,_,!0),a)||(t.removeSpan(r,e,3),(u=f.findSpan(n,i))&&n===u.row&&i===u.col&&t.EL(r,e,u.rowCount,u.colCount,3))},j.prototype.$it=function(t,n,i,r,e,o,u,s,a,l,f,c,h){var v,d,g,p,w,m,y,_,C,D,F,b,j,R,T,M,x,k,T,I,M,T,v=this,d=v.Mf,y=t?i.col:i.row,_=t?n.col:n.row,C=t?i.colCount:i.rowCount,D=t?n.colCount:n.rowCount;if(a=a||0,F=o.jit(),b=(y-_-a)/D,j=v.Cit(o._indexes,o.oit),R=o._type,j){for(w=[],p=0;p<F;p++)w[p]=p+1;g=F}else m=o._indexes[0],g=o._indexes[F-1]-m+1,1===F&&R!==et&&o.ZP(o._indexes[0]+1,o.Lit(o.oit[0]+1)),w=o.Rit();for(p=0;p<g;p++)if(T=o.ait,k=x=M=void 0,I=y+C-1,T=(M=(k=(M=R!==rt&&R!==et?M:d.tnt&&d.tnt.getRule(R,T))?(x=M.getTargetValue(o,g*b+p+1,w,p,b),j=M.Cit||j,T=M.Sit||!1,j&&!T):(x=Tt(!0,o.Bit(),w,g*b+p+1),j))?o._indexes[p]:m+p)+b*D,u){if(j&&(s&&T===I||!s&&T===y)||!j&&T+a===I)return o.Lit(x)}else T<y+C&&y<=T&&(t?l&&d.XT&&d.XT(r)||v.Wit(d,r,M,e,T,o.Lit(x),4,f,c,h):l&&d.XT&&d.XT(T)||v.Wit(d,M,r,T,e,o.Lit(x),4,f,c,h));return tt},j.prototype.Cit=function(t,n){var i,r,e,o,i=M(n);if(i<=1||M(t)!==i)return!1;for(r=t[1]-t[0],e=n[1]-n[0],o=2;o<i;o++)if(t[o]-t[o-1]!=r||n[o]-n[o-1]!=e)return!1;return!0},j.prototype.Xtt=function(t,n){var i=this,r=this.Mf,e=r.Ut.getSpans(),t=r.JS(t),o=t.row,u=t.col,s=t.rowCount,t=t.colCount,a,a=0===n?D(o,u+t-1,s,1):1===n?D(o,u,s,1):D(2===n?o+s-1:o,u,1,t);(a=r.nR(e,a))&&i.trt(a,o,u,s,t,n)},j.prototype.trt=function(t,n,i,r,e,o){var u=this,s=t.row,a=t.col,l=t.rowCount,f=t.colCount,c,h,v,d,g,p,w,m=u.Mf.Ut,y,g=0===o?(y=m.eE(n,i,r,e-f),p=0,w=-1*f,v=e,d=f,1):1===o?(y=m.eE(n,i+f,r,e-f),p=0,v=e,d=w=f,1):w=(d=2===o?(y=m.eE(n,i,r-l,e),p=-1*l,v=r,l):(y=m.eE(n+l,i,r-l,e),v=r,p=l),0);if(y)throw new Error(x().Exp_TargetContainsMergedCells);if(v%d!=0)throw new Error(x().Exp_MergedCellsIdentical);for(c=C(v/d),h=1;h<c;h++)u.Xit(t,D(s+h*p,a+h*w,l,f),g,0,_,_,_,_,!0)},j.prototype.Qit=function(t,n,i,r,e,o){var u,t,s,a,u=t?-1:1,t=C(o*e),s=Math.abs(e),a=S(1<n?i:r);if(0===n)a.setDate(a.getDate()+u*e);else if(1===n)for(;0<s;)a.setDate(a.getDate()+u*(0<e?1:-1)),6!==a.getDay()&&0!==a.getDay()&&s--;else 2===n?a.setMonth(a.getMonth()+u*t):a.setFullYear(a.getFullYear()+u*t);return A(a)},t.Wtt=j},"./dist/plugins/fill/fill.ns.js":function(t,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SR=void 0;var i=i("./dist/plugins/fill/fill.res.en.js");n.SR={en:i}},"./dist/plugins/fill/fill.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Exp_ChangePartOfArray=n.Exp_RangeIsNull=n.Exp_CellReadOnly=n.Exp_RowReadOnly=n.Exp_ColumnReadOnly=n.Exp_ChangeMergedCell=n.Exp_FillCellsReadOnly=n.Exp_FillRangeContainsMergedCell=n.Exp_MergedCellsIdentical=n.Exp_TargetContainsMergedCells=n.Exp_RangeContainsMergedCell=n.Exp_NumberOnly=n.FillWithoutFormatting=n.FillFormattingOnly=n.FillSeries=n.CopyCells=void 0,n.CopyCells="Copy Cells",n.FillSeries="Fill Series",n.FillFormattingOnly="Fill Formatting Only",n.FillWithoutFormatting="Fill Without Formatting",n.Exp_NumberOnly="Only works for Numbers",n.Exp_RangeContainsMergedCell="Range should not have merged cells.",n.Exp_TargetContainsMergedCells="Target range should not have merged cells.",n.Exp_MergedCellsIdentical="This operation requires the merged cells to be identically sized.",n.Exp_FillRangeContainsMergedCell="Cannot fill range that contains a merged cell.",n.Exp_FillCellsReadOnly="The cells you are trying to fill are protected and therefore read-only.",n.Exp_ChangeMergedCell="Cannot change part of merged cell.",n.Exp_ColumnReadOnly="The column you are trying to change is protected and therefore read-only.",n.Exp_RowReadOnly="The row you are trying to change is protected and therefore read-only.",n.Exp_CellReadOnly="The cell you are trying to change is protected and therefore read-only.",n.Exp_RangeIsNull="range is null",n.Exp_ChangePartOfArray="Cannot change part of an array."},"./dist/plugins/fill/utils.js":function(t,n,i){var f,o,u,c,s,h;function r(t){return t.rowViewportIndex}function e(t){return t.colViewportIndex}function a(t){return t.frozenRowCount()}function l(t){return t.frozenColumnCount()}function v(t){return t.hitTestType}function d(t,n){return t.getRowCount(n)}function g(t,n){return t.getColumnCount(n)}function p(t){return t.colCount}function w(t){return t.rowCount}function m(t){return t.height}function y(t){return t.width}function _(t){var n,t,n=7,t=t.parent;return n=t?2007<t.SC?2:7:n}function C(t,n,i,r,e,o,u){var s,a,l;t.save(),o=o||h,u=u||2,n===r?(t.rect(n-2,i,7,c(e-i)),t.clip(),t.beginPath(),i<e?(i-=3,e+=3):(i+=3,e-=3),s=(0,f.Zx)(n-1,i-1,r-1,e+1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n+1,i-1,r+1,e+1,o,u)):i===e&&(t.rect(n,i-2,c(r-n),7),t.clip(),t.beginPath(),n<r?(n-=3,r+=3):(n+=3,r-=3),s=(0,f.Zx)(n-1,i-1,r+1,e-1,o,u),a=(0,f.Zx)(n,i,r,e,o,u),l=(0,f.Zx)(n-1,i+1,r+1,e+1,o,u)),s&&s.qx(t),a&&a.qx(t),l&&l.qx(t),t.strokeStyle=o,t.stroke(),t.beginPath(),t.restore()}function D(t,n,i,r,e){for(var o,u,s,o=0;o<i.rowCount;o++){for(u=0;u<i.colCount;u++){if(!(s=t.getSpan(i.row+o,i.col+u))||s.rowCount!==n.rowCount||s.colCount!==n.colCount)return!1;r&&(u+=n.colCount)}e&&(o+=n.rowCount)}return!0}function F(t,n,i){var r,e,o,u,s,a,l,f,e,u,r,r=n.row,e=n.rowCount,o=n.col,u=n.colCount,s=i.row,a=i.rowCount,l=i.col,f=i.colCount,e=r===s&&e===a,u=o===l&&u===f;return(e||u)&&!(!(r=t.getSpan(r,o))||!D(t,r,n,e,u)||t.Ut.GT(s,l,a,f))&&D(t,r,i,e,u)}function b(t){return t.x+t.width}function j(t){return t.y+t.height}function R(t,n){var i,r,r,e,r,o,i=t.rt.eD(),r=t.Yy(i);return(r=r&&r.findNearX(n,t.options.rightToLeft))?(e=t.Fi(),r=r.col,1===i&&n<e.Py&&(o=t.Sw())<r&&t.O5(r-1)||r):-1}function T(t,n){var i,i,i,r,i,e,i=t.rt.nD(),i=t._y(i);return(i=i&&i.findNearY(n,t.options.rightToLeft))?(r=t.Fi(),i=i.row,n<r.Cy&&(e=t.pw())<i&&t.j5(i-1)||i):-1}function M(t){t.dragHeaderToMoveInfo&&(t.dragHeaderToMoveInfo.dragColumn?t.rowViewportIndex<0&&(t.rowViewportIndex=0):t.colViewportIndex<0&&(t.colViewportIndex=0),t.hitTestType=3)}function x(t,n){var i,r,e,t,i,r,e,t;return t||n?!t&&n?n:t&&!n?t:(i=t.x,r=t.y,e=b(t),t=j(t),i=u(i,n.x),r=u(r,n.y),e=s(e,b(n)),t=s(t,j(n)),new f.Rect(i,r,e-i,t-r)):o}function k(t){return t.frozenColumnCount()>=t.getColumnCount()?0:0<t.frozenTrailingColumnCount()?2:1}function I(t){return t.frozenRowCount()>=t.getRowCount()?0:0<t.frozenTrailingRowCount()?2:1}function O(t){var n,i,n,r,n,e,o,t,u,s,n=t.Fi(),i,n=t.options.rightToLeft?n.c9(0,2):n.c9(0,0),r=n.x,n=n.y,e=k(t),o=I(t),t=t.Dn.uO(o,e),u,s;return{minPoint:{x:r,y:n},maxPoint:{x:b(t),y:j(t)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSheetVPortBoundary=n.mergeRect=n.fixHitTestInfo=n.getHitRowIndex=n.getHitColumnIndex=n.getEndY=n.getEndX=n.canDragFillSpan=n.hasSameSpan=n.paintDragLine=n.getLineStyle=n.getWidth=n.getHeight=n.getRowCount=n.getColCount=n.getSheetColumnCount=n.getSheetRowCount=n.getHitTestType=n.getFrozenColumnCount=n.getFrozenRowCount=n.getColViewportIndex=n.getRowViewportIndex=void 0,f=i("Core"),o=null,u=Math.min,c=Math.abs,s=Math.max,h="black",n.getRowViewportIndex=r,n.getColViewportIndex=e,n.getFrozenRowCount=a,n.getFrozenColumnCount=l,n.getHitTestType=v,n.getSheetRowCount=d,n.getSheetColumnCount=g,n.getColCount=p,n.getRowCount=w,n.getHeight=m,n.getWidth=y,n.getLineStyle=_,n.paintDragLine=C,n.hasSameSpan=D,n.canDragFillSpan=F,n.getEndX=b,n.getEndY=j,n.getHitColumnIndex=R,n.getHitRowIndex=T,n.fixHitTestInfo=M,n.mergeRect=x,n.getSheetVPortBoundary=O},Common:function(t){t.exports=n.Spread},CalcEngine:function(t){t.exports=n.Spread.CalcEngine},Core:function(t){t.exports=n.Spread.Sheets},SheetsCalc:function(t){t.exports=n.Spread.Sheets.CalcEngine},Touch:function(t){t.exports=n.Spread.Sheets.Touch}},r={},t=e("./dist/plugins/fill/fill.entry.js"),(((n=void 0===n?{}:n).Spread=n.Spread||{}).Sheets=n.Spread.Sheets||{}).Fill=t}()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapecity-software/spread-sheets-fill",
3
- "version": "18.0.3",
3
+ "version": "18.0.5",
4
4
  "main": "index.js",
5
5
  "description":"SpreadJS sheets fill module",
6
6
  "scripts": {},
@@ -16,10 +16,10 @@
16
16
  "spreadjs"
17
17
  ],
18
18
  "dependencies": {
19
- "@grapecity-software/spread-common": "18.0.3",
20
- "@grapecity-software/spread-calc-engine": "18.0.3",
21
- "@grapecity-software/spread-sheets-core": "18.0.3",
22
- "@grapecity-software/spread-sheets-calc-engine": "18.0.3"
19
+ "@grapecity-software/spread-common": "18.0.5",
20
+ "@grapecity-software/spread-calc-engine": "18.0.5",
21
+ "@grapecity-software/spread-sheets-core": "18.0.5",
22
+ "@grapecity-software/spread-sheets-calc-engine": "18.0.5"
23
23
  },
24
24
  "author": {
25
25
  "email": "info.xa@grapecity.com",