@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 617 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("kendo.drawing.cmn.chunk.js"),require("kendo.date-math.cmn.chunk.js"),require("kendo.common.cmn.chunk.js"),require("kendo.jszip-esm.cmn.chunk.js")):"function"==typeof define&&define.amd?define(["exports","kendo.drawing.cmn.chunk","kendo.date-math.cmn.chunk","kendo.common.cmn.chunk","kendo.jszip-esm.cmn.chunk"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.SpreadsheetCommonCmnChunk={}),e.kendo._globals.DrawingCmnChunk,e.kendo._globals.DateMathCmnChunk,e.kendo._globals.CommonCmnChunk,e.kendo._globals.JszipEsmCmnChunk)}(this,(function(e,t,r,n,s){function i(e){const t=Math.floor(e/26)-1;return(t>=0?i(t):"")+String.fromCharCode(65+e%26)}function o(e){return/^[a-z_][a-z0-9_]*$/i.test(e)?e:"'"+e.replace(/\x27/g,"\\'")+"'"}function a(e,t,r,n){let s="";return++t,isFinite(t)?null==n||2&n||(t="$"+t):t="",isFinite(r)?(s=i(r),null==n||1&n||(s="$"+s)):r="",e?o(e)+"!"+s+t:s+t}class u{constructor(){this.type="ref",this.sheet=""}clone(){return this}hasSheet(){return this._hasSheet}simplify(){return this}setSheet(e,t){return this.sheet=e,null!=t&&(this._hasSheet=t),this}absolute(e,t){return this}relative(...e){return this}adjust(e,t,r,n,s,i,o){return this}toString(){return this.relative(0,0,3,3).print(0,0)}forEach(e,t){e.call(t,this)}map(e,t){return e.call(t,this)}intersect(e){return this}intersects(e){return this.intersect(e)!==h}isCell(){return!1}toRow(e){return this}toColumn(e){return this}first(){return this}lastRange(){return this}size(){return 1}rangeAt(e){return this}nextRangeIndex(e){return 0}previousRangeIndex(e){return 0}eq(e){let t=this,r=e;if(t===h||r===h)return t===r;if((r instanceof c||r instanceof f&&!(t instanceof c))&&(t=e,r=this),t instanceof c)return r=r.simplify(),r instanceof c&&t.row==r.row&&t.col==r.col&&t.sheet==r.sheet;if(t instanceof f){if(r instanceof f)return r.topLeft.eq(t.topLeft)&&r.bottomRight.eq(t.bottomRight);if(r instanceof p)return r.single()&&t.eq(r.refs[0])}else if(t instanceof p&&r instanceof p){const e=t.refs,n=r.refs;if(e.length!=n.length)return!1;for(let t=0,r=e.length;t<r;t++)if(!e[t].eq(n[t]))return!1;return!0}return t===r}concat(e){return new p([this,e])}replaceAt(e,t){return t}forEachColumnIndex(e){this.forEachAxisIndex("col",e)}forEachRowIndex(e){this.forEachAxisIndex("row",e)}forEachRow(e){}forEachColumn(e){}forEachAxisIndex(e,t){let r=[];this["row"===e?"forEachRow":"forEachColumn"]((function(t){let n=t.first()[e];-1===r.indexOf(n)&&r.push(n)})),r.sort((function(e,t){return e>t?1:e<t?-1:0})).forEach(t)}valid(){return!1}renameSheet(e,t){if(this.sheet&&this.sheet.toLowerCase()==e.toLowerCase())return this.sheet=t,!0}}u.display=a;const h=new class extends u{print(){return"#NULL!"}eq(e){return e===this}forEach(){}};class l extends u{constructor(e){super(),this.name=e,this.ref="name"}clone(){return new l(this.name).setSheet(this.sheet,this.hasSheet())}print(){let e=o(this.name);return this.hasSheet()&&(e=o(this.sheet)+"!"+e),e}}class c extends u{constructor(e,t,r){super(),this.row=e,this.col=t,this.rel=r||0,this.ref="cell"}clone(){return new c(this.row,this.col,this.rel).setSheet(this.sheet,this.hasSheet())}intersect(e){return e instanceof c?this.eq(e)?this:h:e.intersect(this)}print(e,t,r){let n,s=this.col,i=this.row,u=this.rel;if(null==e&&u){let e=this.hasSheet()?o(this.sheet)+"!":"";return s=isFinite(s)?1&u?"C["+s+"]":"C"+(s+1):"",i=isFinite(i)?2&u?"R["+i+"]":"R"+(i+1):"",e+i+s}return n=this.absolute(e,t),r?(i=n.row%1048576,s=n.col%16384,i<0&&(i+=1048576),s<0&&(s+=16384),a(this._hasSheet&&this.sheet,i,s,u)):n.valid()?a(this._hasSheet&&this.sheet,n.row,n.col,u):"#REF!"}absolute(e,t){let r=this.clone();return 3&r.rel?(1&r.rel&&(r.col=(r.col+t)%16384),2&r.rel&&(r.row=(r.row+e)%1048576),r.rel=0,r):r}toRangeRef(){return new f(this,this)}relative(e,t,r){null==r&&(r=this.rel);let n=2&r?this.row-e:this.row,s=1&r?this.col-t:this.col;return new c(n,s,r).setSheet(this.sheet,this.hasSheet())}height(){return 1}width(){return 1}toString(){return a(null,this.row,this.col,3)}isCell(){return!0}leftColumn(){return this}rightColumn(){return this}topRow(){return this}bottomRow(){return this}forEachRow(e){e(this.toRangeRef())}forEachColumn(e){e(this.toRangeRef())}adjust(e,t,r,n,s,i,o){let a=this.absolute(e,t);if(s){if(a.row>=i){if(o<0&&a.row<i-o)return h;a.row+=o}}else if(a.col>=i){if(o<0&&a.col<i-o)return h;a.col+=o}return null!=r&&null!=n&&(a=a.relative(r,n,this.rel)),a}valid(){if(this.rel)throw new Error("valid() called on relative reference");let e=this.col,t=this.row;return!(isFinite(e)&&e<0||isFinite(t)&&t<0)}}class f extends u{constructor(e,t){super(),this.ref="range",e._hasSheet&&t._hasSheet&&e.sheet.toLowerCase()!=t.sheet.toLowerCase()&&(this.endSheet=t.sheet),this.topLeft=new c(e.row,e.col,e.rel),this.bottomRight=new c(t.row,t.col,t.rel),this.normalize()}clone(){return new f(this.topLeft.clone(),this.bottomRight.clone()).setSheet(this.sheet,this.hasSheet())}_containsRange(e){return this._containsCell(e.topLeft)&&this._containsCell(e.bottomRight)}_containsCell(e){return e.sheet==this.sheet&&e.row>=this.topLeft.row&&e.col>=this.topLeft.col&&e.row<=this.bottomRight.row&&e.col<=this.bottomRight.col}contains(e){if(e instanceof Array){let t=this;return e.some((function(e){return Boolean(t.contains(e))}))}return e instanceof c?this._containsCell(e):e instanceof f&&this._containsRange(e)}_intersectRange(e){if(this.sheet!=e.sheet)return h;let t=this.topLeft.col,r=this.topLeft.row,n=this.bottomRight.col,s=this.bottomRight.row,i=e.topLeft.col,o=e.topLeft.row,a=e.bottomRight.col,u=e.bottomRight.row;return t<=a&&i<=n&&r<=u&&o<=s?new f(new c(Math.max(r,o),Math.max(t,i)),new c(Math.min(s,u),Math.min(n,a))).setSheet(this.sheet,this.hasSheet()):h}intersect(e){return e instanceof c?this._containsCell(e)?e:h:e instanceof f?this._intersectRange(e).simplify():e instanceof p?e.intersect(this):h}simplify(){return this.isCell()?new c(this.topLeft.row,this.topLeft.col,this.topLeft.rel).setSheet(this.sheet,this.hasSheet()):this}normalize(){let e,t=this.topLeft,r=this.bottomRight,n=t.row,s=t.col,i=r.row,o=r.col,a=2&t.rel,u=1&t.rel,h=2&r.rel,l=1&r.rel,f=!1;return a===h&&u===l&&(n>i&&(f=!0,e=n,n=i,i=e,e=a,a=h,h=e),s>o&&(f=!0,e=s,s=o,o=e,e=u,u=l,l=e),f&&(this.topLeft=new c(n,s,u|a),this.bottomRight=new c(i,o,l|h))),this}print(e,t,r){if(r||this.absolute(e,t).valid()){let n=this.topLeft.print(e,t,r)+":"+this.bottomRight.print(e,t,r);return this.hasSheet()&&(n=o(this.sheet)+(this.endSheet?":"+o(this.endSheet):"")+"!"+n),n}return"#REF!"}absolute(e,t){return new f(this.topLeft.absolute(e,t),this.bottomRight.absolute(e,t)).setSheet(this.sheet,this.hasSheet())}relative(e,t,r,n){return null==n&&(n=r),new f(this.topLeft.relative(e,t,r),this.bottomRight.relative(e,t,n)).setSheet(this.sheet,this.hasSheet())}height(){if(this.topLeft.rel!=this.bottomRight.rel)throw new Error("Mixed relative/absolute references");return this.bottomRight.row-this.topLeft.row+1}width(){if(this.topLeft.rel!=this.bottomRight.rel)throw new Error("Mixed relative/absolute references");return this.bottomRight.col-this.topLeft.col+1}collapse(){return this.topLeft.toRangeRef()}leftColumn(){return new f(this.topLeft,new c(this.bottomRight.row,this.topLeft.col))}rightColumn(){return new f(new c(this.topLeft.row,this.bottomRight.col),this.bottomRight)}topRow(){return new f(this.topLeft,new c(this.topLeft.row,this.bottomRight.col))}bottomRow(){return new f(new c(this.bottomRight.row,this.topLeft.col),this.bottomRight)}toRangeRef(){return this}toRow(e){return e+=Math.max(0,this.topLeft.row),new f(new c(e,this.topLeft.col),new c(e,this.bottomRight.col)).setSheet(this.sheet,this.hasSheet())}toColumn(e){return e+=Math.max(0,this.topLeft.col),new f(new c(this.topLeft.row,e),new c(this.bottomRight.row,e)).setSheet(this.sheet,this.hasSheet())}toCell(e,t){return e+=Math.max(0,this.topLeft.row),t+=Math.max(0,this.topLeft.col),new c(e,t,0).setSheet(this.sheet,this.hasSheet())}forEachRow(e){let t=this.topLeft.row,r=this.bottomRight.row,n=this.topLeft.col,s=this.bottomRight.col;for(let i=t;i<=r;i++)e(new f(new c(i,n),new c(i,s)))}forEachColumn(e){let t=this.topLeft.row,r=this.bottomRight.row,n=this.topLeft.col,s=this.bottomRight.col;for(let i=n;i<=s;i++)e(new f(new c(t,i),new c(r,i)))}intersecting(e){return e.filter((e=>e.toRangeRef().intersects(this)))}union(e,t){let r=this.intersecting(e),n=this.topLeft.row,s=this.topLeft.col,i=this.bottomRight.row,o=this.bottomRight.col,a=!1;r.forEach((function(e){(e=e.toRangeRef()).topLeft.row<n&&(a=!0,n=e.topLeft.row),e.topLeft.col<s&&(a=!0,s=e.topLeft.col),e.bottomRight.row>i&&(a=!0,i=e.bottomRight.row),e.bottomRight.col>o&&(a=!0,o=e.bottomRight.col),t&&t(e)}));let u=new f(new c(n,s),new c(i,o));return a?u.union(e,t):u}resize(e){let t=Math.max.bind(Math,0);function r(e){return e||0}let n=this.topLeft.row+r(e.top),s=this.topLeft.col+r(e.left),i=this.bottomRight.row+r(e.bottom),o=this.bottomRight.col+r(e.right);return s<0&&o<0||n<0&&i<0?h:n<=i&&s<=o?new f(new c(t(n),t(s)),new c(t(i),t(o))):h}move(e,t){return new f(new c(this.topLeft.row+e,this.topLeft.col+t),new c(this.bottomRight.row+e,this.bottomRight.col+t))}first(){return this.topLeft.clone().setSheet(this.sheet,this.hasSheet())}isCell(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)}toString(){return this.topLeft+":"+this.bottomRight}adjust(e,t,r,n,s,i,o){let a=this.topLeft.adjust(e,t,r,n,s,i,o),u=this.bottomRight.adjust(e,t,r,n,s,i,o);return a===h&&u===h?h:(a===h?(a=this.topLeft.absolute(e,t),s?a.row=i:a.col=i,null!=r&&null!=n&&(a=a.relative(r,n,this.topLeft.rel))):u===h&&(u=this.bottomRight.absolute(e,t),s?u.row=i-1:u.col=i-1,null!=r&&null!=n&&(u=u.relative(r,n,this.bottomRight.rel))),new f(a,u).setSheet(this.sheet,this.hasSheet()).simplify())}valid(){return this.topLeft.valid()&&this.bottomRight.valid()}}class p extends u{constructor(e){super(),this.refs=e,this.length=e.length}clone(){return new p(this.refs.slice())}intersect(e){let t=[];for(let r=0;r<this.length;++r){let n=e.intersect(this.refs[r]);n!==h&&t.push(n)}return t.length>0?new p(t).simplify():h}simplify(){let e=new p(this.refs.reduce((function(e,t){return(t=t.simplify())!==h&&e.push(t),e}),[]));return e.empty()?h:e.single()?e.refs[0]:e}absolute(e,t){return new p(this.refs.map((function(r){return r.absolute(e,t)})))}forEach(e,t){this.refs.forEach((function(r){r instanceof p?r.forEach(e,t):e.call(t,r)}),t)}toRangeRef(){return this.refs[0].toRangeRef()}contains(e){return this.refs.some((function(t){return t.contains(e)}))}map(e,t){let r=[];return this.forEach((function(n){r.push(e.call(t,n))})),new p(r)}first(){return this.refs[0].first()}lastRange(){return this.refs[this.length-1]}size(){return this.length}single(){return 1==this.length}empty(){return 0===this.length}isCell(){return this.single()&&this.refs[0].isCell()}rangeAt(e){return this.refs[e]}nextRangeIndex(e){return e===this.length-1?0:e+1}previousRangeIndex(e){return 0===e?this.length-1:e-1}concat(e){return new p(this.refs.concat([e]))}print(e,t,r){return this.refs.map((function(n){return n.print(e,t,r)})).join(",")}replaceAt(e,t){let r=this.refs.slice();return r.splice(e,1,t),new p(r)}leftColumn(){return this.map((function(e){return e.leftColumn()}))}rightColumn(){return this.map((function(e){return e.rightColumn()}))}topRow(){return this.map((function(e){return e.topRow()}))}bottomRow(){return this.map((function(e){return e.bottomRow()}))}forEachRow(e){this.forEach((function(t){t.forEachRow(e)}))}forEachColumn(e){this.forEach((function(t){t.forEachColumn(e)}))}adjust(e,t,r,n,s,i,o){return this.map((function(a){return a.adjust(e,t,r,n,s,i,o)})).simplify()}toString(){return this.refs.map((function(e){return e.toString()})).join(", ")}valid(){for(let e=this.refs.length;--e>=0;)if(this.refs[e].valid())return!1;return!0}renameSheet(e,t){this.refs.forEach((function(r){r.renameSheet(e,t)}))}}const d=new c(0,0),g=new f(new c(0,0),new c(1/0,1/0));g.print=function(){return"#SHEET"};const m={view:{nameBox:"Name Box",errors:{modifyMerged:"Cannot change part of a merged cell.",openUnsupported:"Unsupported format. Please select an .xlsx file.",shiftingNonblankCells:"Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",insertColumnWhenRowIsSelected:"Cannot insert column when all columns are selected.",insertRowWhenColumnIsSelected:"Cannot insert row when all rows are selected.",filterRangeContainingMerges:"Cannot create a filter within a range containing merges",sortRangeContainingMerges:"Cannot sort a range containing merges",cantSortMultipleSelection:"Cannot sort multiple selection",cantSortNullRef:"Cannot sort empty selection",cantSortMixedCells:"Cannot sort range containing cells of mixed shapes",validationError:"The value that you entered violates the validation rules set on the cell.",cannotModifyDisabled:"Cannot modify disabled cells.",insertRowBelowLastRow:"Cannot insert row below the last row.",insertColAfterLastCol:"Cannot insert column to the right of the last column."},tabs:{home:"Home",insert:"Insert",data:"Data"}},menus:{cut:"Cut",copy:"Copy",paste:"Paste",merge:"Merge",unmerge:"Unmerge",delete:"Delete",hide:"Hide",unhide:"Unhide",bringToFront:"Bring to front",sendToBack:"Send to back"},workbook:{defaultSheetName:"Sheet"}},v={name:"Spreadsheet",toolbar:!0,sheetsbar:!0,rows:200,columns:50,rowHeight:20,columnWidth:64,headerHeight:20,headerWidth:32,excel:{fileName:"Workbook.xlsx",forceProxy:!1,proxyURL:""},messages:m,pdf:{area:"workbook",fileName:"Workbook.pdf",proxyURL:"",paperSize:"a4",landscape:!0,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator",date:null},defaultCellStyle:{fontFamily:"Arial",fontSize:12},useCultureDecimals:!1,locale:"en"},y={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},w=46,b=9,_=13,A=38,C=40,x=33,k=34,M=121,E=122,F=66,R=73,S=85,N=78,L=72,D=65,U=82,V=new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");function $(e){let t=Object.create(null);return function(){let r="";for(let e=arguments.length;--e>=0;)r+=":"+arguments[e];return r in t?t[r]:t[r]=e.apply(this,arguments)}}function B(e,t){try{return e.call(t,(function(e){throw new r(e)}))}catch(e){if(e instanceof r)return e.value;throw e}function r(e){this.value=e}}const I={undefined:e=>e},T=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function z(e,t){const r=e+t;if(I[r])return I[r];const n=[];return e.replace(T,((e,t,r,s)=>{n.push(W(t)?t:r||s)})),I[r]=e=>{let r=e;for(let e=0;e<n.length;e++)if(r=r[n[e]],!W(r)&&t)return r;return r},I[r]}function H(e){let t=1,r=arguments.length;for(t=1;t<r;t++)P(e,arguments[t]);return e}function P(e,t){let r,n,s,i;for(r in t)"__proto__"!==r&&"constructor"!==r&&(n=t[r],s=typeof n,n instanceof Date?e[r]=new Date(n.getTime()):X(n?.clone)?e[r]=n.clone():"object"===s&&null!==n&&G(n)?(i=e[r],"object"==typeof i&&null!==i||(e[r]={}),P(e[r],n)):"undefined"!==s&&(e[r]=n));return e}const O={},j=function(e){if(!isNaN(O._scrollbar)&&!e)return O._scrollbar;let t,r=document.createElement("div");return r.style.overflow="scroll",r.style.overflowX="hidden",r.style.zoom="1",r.style.clear="both",r.style.display="block",r.innerHTML=" ",document.body.appendChild(r),O._scrollbar=t=r.offsetWidth-r.scrollWidth,document.body.removeChild(r),t};const q=function(e,t){t.parentNode.insertBefore(e,t.nextSibling)},W=e=>null!=e,Y=e=>e&&e.getTime,J=e=>"string"==typeof e,X=e=>"function"==typeof e,G=function(e){if(!e||"[object Object]"!==toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};class K{constructor(e){if(e instanceof K)return e;this.code=e}toString(){return"#"+this.code+("NAME"===this.code?"?":"!")}}let Q={};const Z=e=>{if(!e)return Q;Q=e},ee=()=>Z().localeInfo();let te={runtime:{FUNCS:Object.create(null)}},re=te.runtime.FUNCS;class ne{constructor(e,t,r,n){this.callback=e,this.formula=t,this.ss=r,this.parent=n}resolve(e){var t=this;e instanceof u?t.resolveCells([e],(function(){t._resolve(e)})):t._resolve(e)}error(e){return new K(e)}_resolve(e){e=void 0===e?null:Array.isArray(e)?this.asMatrix(e):le(e);var t=this.formula;t.arrayFormulaRange?e=this.asMatrix(e)||this.asMatrix([[e]]):e instanceof f&&(e=this._arrayArg(e)),t.value=e,this.ss.onFormula(t)&&this.callback&&this.callback.call(t,e)}resolveCells(e,t){var r=this,n=[];if(function e(t){for(var n=0;n<t.length;++n){var s=t[n];s instanceof u&&o(r.getRefCells(s)),Array.isArray(s)&&e(s)}}(e),!n.length)return t.call(r);for(var s=n.length,i=0;i<n.length;++i)n[i].exec(r.ss,(function(){--s||t.call(r)}),r);function o(e){for(var t=0;t<e.length;++t){var r=e[t];r.formula&&n.push(r.formula)}return!0}}cellValues(e,t){for(var r=[],n=0;n<e.length;++n){var s=e[n];s instanceof u?(s=this.getRefData(s,t),r=r.concat(s)):Array.isArray(s)?r=r.concat(this.cellValues(s,t)):s instanceof ie?r=r.concat(this.cellValues(s.data,t)):r.push(s)}return r}fetchName(e,t){var r=this.formula,n=this.ss.nameValue(e,r.sheet,r.row,r.col);if(n instanceof ae){n=n.clone(r.sheet,r.row,r.col,!0);var s=new te.ValidationFormulaContext(this.ss.workbook);n.exec(s,t,this)}else n instanceof u&&((n=n.absolute(r.row,r.col))instanceof f&&this.ss.isMerged(n)&&(n=n.topLeft),n.sheet||(n.sheet=r.sheet)),t(null==n?new K("NAME"):n)}force(e){return e instanceof u?this.getRefData(e):e}func(e,t,r){e=e.toLowerCase();var n=re[e];if(n)return n.call(this,t,r);t(new K("NAME"))}bool(e){return e instanceof u&&(e=this.getRefData(e)),"string"==typeof e?"true"==e.toLowerCase():"number"==typeof e?0!==e:"boolean"==typeof e?e:null!=e}_arrayArg(e){var t=this.formula;return!t.arrayFormulaRange&&e instanceof f?1==e.height()&&t.col>=e.topLeft.col&&t.col<=e.bottomRight.col?this.getRefData(new c(e.topLeft.row,t.col).setSheet(e.sheet)):1==e.width()&&t.row>=e.topLeft.row&&t.row<=e.bottomRight.row?this.getRefData(new c(t.row,e.topLeft.col).setSheet(e.sheet)):new K("VALUE"):this.asMatrix(e)}asMatrix(e){if(e instanceof ie)return e;let t=this;if(e instanceof f){let r=e.topLeft,n=r.row,s=r.col,i=t.getRefCells(e),o=new ie(t);return isFinite(e.width())&&(o.width=e.width()),isFinite(e.height())&&(o.height=e.height()),isFinite(n)||(n=0),isFinite(s)||(s=0),i.forEach((function(e){o.set(e.row-n,e.col-s,e.value)})),o}if(Array.isArray(e)&&e.length>0){let r=new ie(t),n=0;return e.forEach((function(e){let s=0,i=1;e.forEach((function(e){let o=e instanceof f;e instanceof u&&!o&&(e=t.getRefData(e)),(o||Array.isArray(e))&&(e=t.asMatrix(e)),e instanceof ie?(e.each((function(e,t,i){r.set(n+t,s+i,e)})),i=Math.max(i,e.height),s+=e.width):("string"==typeof e&&e.length&&!isNaN(e)&&(e=Number(e)),r.set(n,s++,e))})),n+=i})),r}}getRefCells(e,t,r){var n=this.formula;return this.ss.getRefCells(e,t,n.sheet,n.row,n.col,r)}getRefData(e,t){var r=this.formula;return this.ss.getData(e,r.sheet,r.row,r.col,t)}workbook(){return this.ss.workbook}}function se(e,t,r){for(var n=r(e),s=e;++e<t;){var i=r(e);i>n&&(n=i,s=e)}return s}class ie{constructor(e){this.context=e,this.height=0,this.width=0,this.data=[]}clone(){var e=new ie(this.context);return e.height=this.height,e.width=this.width,e.data=this.data.map((function(e){return e.slice()})),e}get(e,t){var r=this.data[e],n=r?r[t]:null;return n instanceof u?this.context.getRefData(n):n}getNA(e,t){return 1==this.height&&(e=0),1==this.width&&(t=0),e<this.height&&t<this.width?this.get(e,t):new K("N/A")}set(e,t,r){if("__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&"__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var n=this.data[e];null==n&&(n=this.data[e]=[]),n[t]=r,e>=this.height&&(this.height=e+1),t>=this.width&&(this.width=t+1)}}each(e,t){for(var r=0;r<this.height;++r)for(var n=0;n<this.width;++n){var s=this.get(r,n);if((t||null!=s)&&void 0!==(s=e.call(this.context,s,r,n)))return s}}map(e,t){var r=new ie(this.context);return this.each((function(t,n,s){r.set(n,s,e.call(this,t,n,s))}),t),r}eachRow(e){for(var t=0;t<this.height;++t){var r=e.call(this.context,t);if(void 0!==r)return r}}eachCol(e){for(var t=0;t<this.width;++t){var r=e.call(this.context,t);if(void 0!==r)return r}}mapRow(e){var t=new ie(this.context);return this.eachRow((function(r){t.set(r,0,e.call(this.context,r))})),t}mapCol(e){var t=new ie(this.context);return this.eachCol((function(r){t.set(0,r,e.call(this.context,r))})),t}toString(){return JSON.stringify(this.data)}transpose(){var e=new ie(this.context);return this.each((function(t,r,n){e.set(n,r,t)})),e}unit(e){this.width=this.height=e;for(var t=this.data=new Array(e),r=e;--r>=0;)for(var n=t[r]=new Array(e),s=e;--s>=0;)n[s]=r==s?1:0;return this}multiply(e){for(var t=this,r=new ie(t.context),n=0;n<t.height;++n)for(var s=0;s<e.width;++s){for(var i=0,o=0;o<t.width;++o){var a=t.get(n,o),u=e.get(o,s);if("number"!=typeof a||"number"!=typeof u)throw new K("VALUE");i+=a*u}r.set(n,s,i)}return r}adds(e,t){for(var r=this,n=new ie(r.context),s=t?-1:1,i=0;i<r.height;++i)for(var o=0;o<r.width;++o){var a=r.get(i,o),u=e.get(i,o);n.set(i,o,a+s*u)}return n}determinant(){var e,t,r,n,s=this.clone().data,i=s.length,o=1;for(e=0;e<i;e++){for(t=e;t<i&&!s[t][e];t++);if(t==i)return 0;if(t!=e)for(o=-o,n=e;n<i;n++){var a=s[e][n];s[e][n]=s[t][n],s[t][n]=a}for(r=e+1;r<i;r++)for(n=e+1;n<i;n++)s[r][n]-=s[e][n]*s[r][e]/s[e][e];o*=s[e][e]}return o}inverse(){let e,t=this.width,r=this.augment(new ie(this.context).unit(t)),n=r.data;for(let r=0;r<t;++r){let s=se(r,t,(function(e){return n[e][r]}));if(!n[s][r])return null;r!=s&&(e=n[r],n[r]=n[s],n[s]=e);for(let e=r+1;e<t;++e){for(let s=r+1;s<2*t;++s)n[e][s]-=n[r][s]*n[e][r]/n[r][r];n[e][r]=0}}for(let e=0;e<t;++e)for(let r=n[e][e],s=0;s<2*t;++s)n[e][s]/=r;for(let e=t;--e>=0;)for(let r=e;--r>=0;)if(n[r][e])for(let s=2*t;--s>=t;)n[r][s]-=n[e][s]*n[r][e];return r.slice(0,t,t,t)}augment(e){var t=this.clone(),r=t.width;return e.each((function(e,n,s){t.set(n,s+r,e)})),t}slice(e,t,r,n){for(var s=new ie(this.context),i=0;i<r;++i)for(var o=0;o<n;++o)s.set(i,o,this.get(e+i,t+o));return s}}function oe(e,t){if(e.constructor!==t.constructor)return!1;if(e instanceof c)return e.sheet==t.sheet&&e.row==t.row&&e.col==t.col&&e.rel==t.rel;if(e instanceof f)return oe(e.topLeft,t.topLeft)&&oe(e.bottomRight,t.bottomRight)&&e.endSheet==t.endSheet;if(e instanceof p){var r=e.refs.length;if(r!=t.refs.length)return!1;for(;--r>=0;)if(!oe(e.refs[r],t.refs[r]))return!1}return!0}let ae=class e{constructor(e,t,r,n,s,i,o){this.refs=e,this.handler=t,this.print=r,this.absrefs=null,this.sheet=n,this.row=s,this.col=i,this.onReady=[],this.pending=!1,this.arrayFormulaRange=o}setArrayFormulaRange(e){this.arrayFormulaRange=e.clone().setSheet(this.sheet)}clone(t,r,n,s){var i=t.toLowerCase(),o=this.refs,a=this.arrayFormulaRange;return(s||i!=this.sheet.toLowerCase())&&(o=o.map((function(e){return e.hasSheet()||e.sheet&&e.sheet.toLowerCase()==i||(e=e.clone().setSheet(t)),e})),a&&(a=a.clone().setSheet(t))),new e(o,this.handler,this.print,t,r,n,a)}deepClone(){var t=this.refs.map((function(e){return e.clone()}));return new e(t,this.handler,this.print,this.sheet,this.row,this.col,this.arrayFormulaRange)}resolve(e){this.pending=!1,this.onReady.forEach((function(t){t(e)}))}exec(e,t,r){if("value"in this)t&&t(this.value);else{t&&this.onReady.push(t);for(var n=new ne(this.resolve,this,e,r),s=0;r;){if(r.formula===this)return this.pending=!1,void n.resolve(new K("CIRCULAR"));r=r.parent,++s}if(this.pending)return;this.pending=!0;var i=function(){this.absrefs||(this.absrefs=this.refs.map((function(e){return e.absolute(this.row,this.col)}),this)),this.handler.call(n)}.bind(this);s<20?i():setTimeout(i,0)}}reset(){this.onReady=[],this.pending=!1,delete this.value}renameSheet(e,t){e=e.toLowerCase(),this.absrefs=null,this.sheet.toLowerCase()==e&&(this.sheet=t),this.refs.forEach((function(r){r.renameSheet(e,t)}))}adjust(t,r,n,s){t=t.toLowerCase();var i=this.row,o=this.col,a=this.sheet.toLowerCase(),u=!1;a==t&&("row"==r&&i>=n&&(this.row+=s,u=!0),"col"==r&&o>=n&&(this.col+=s,u=!0));var l=this.row,c=this.col;this.absrefs=null;var f=this.refs,p=u;this.refs=f.map((function(e){var t=g(e);return p||oe(t,e)||(p=!0),t}));var d=this.arrayFormulaRange;if(d&&(this.arrayFormulaRange=g(d),p||oe(d,this.arrayFormulaRange)||(p=!0)),p)return new e(f,this.handler,this.print,this.sheet,i,o,d);function g(e){return e===h?e:e.sheet.toLowerCase()!=t?(u&&("row"==r&&i>=n&&(e=e.relative(s,0)),"col"==r&&o>=n&&(e=e.relative(0,s))),e):e.adjust(i,o,l,c,"row"==r,n,s)}}toString(){return this.print(this.row,this.col)}};function ue(e,t){var r,n,s,i="function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",o="function resolve(args, callback) { var toResolve = [], i = 0; ",a="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",u=!1,h=!1,l=!1;return a+=t.map((function e(t){r=t[0];var s="{ ";if(Array.isArray(r))i+="while (i < args.length) { ",o+="while (i < args.length) { ",s+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",s+="while (i < args.length) { ",s+=t.map(e).join(""),s+="} ",s+="xargs = stack.pop(); ",o+="} ",i+="} ";else if("+"==r)i+="while (i < args.length) { ",o+="while (i < args.length) { ",s+="if (i >= args.length) return new CalcError('N/A'); ",s+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",s+="do { ",s+=t.slice(1).map(e).join(""),s+="} while (i < args.length); ",s+="xargs = stack.pop(); ",o+="} ",i+="} ";else if("?"==r)s+="if (!("+p(t[1])+")) return new CalcError(err); ";else{var a=t[1];if(Array.isArray(a)&&/^#?collect/.test(a[0])){var u=/!$/.test(a[0]),f=a[2];c(),s+="try {var $"+r+" = this.cellValues(args.slice(i",f&&(s+=", i + "+f),s+=")"+(u?",true":"")+").reduce(function(ret, $"+r+"){ ","#"!=a[0].charAt(0)&&(s+="if ($"+r+" instanceof CalcError) throw $"+r+"; "),s+="if ("+p(a[1])+") ret.push($"+r+"); ",s+="return ret; ",s+="}.bind(this), []); ",s+=f?"i += "+f+"; ":"i = args.length; ",s+="xargs.push($"+r+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",o+="toResolve.push(args.slice(i)); "}else if("rest"==a)s+="xargs.push(args.slice(i)); i = args.length; ";else{(h=/^\*/.test(r))&&(l=!0,r=r.substr(1)),s+="var $"+r+" = args[i++]; ";var d=!1;/!$/.test(a)?(a=a.substr(0,a.length-1),d=!0):s+="if ($"+r+" instanceof CalcError) return $"+r+"; ",s+=function(e,t){n=!1;var s="if (!("+p(e)+")) { ";n&&!t&&(s+=" if ($"+r+" instanceof CalcError) return $"+r+"; ");n||(o+="i++; ");i+=h?"var $"+r+" = this._arrayArg(args[i]); if ($"+r+") { xargs.push($"+r+"); width = Math.max(width, $"+r+".width); height = Math.max(height, $"+r+".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; ":"xargs.push(args[i++]); arrays.push(false); ";return s+="return new CalcError(err); } "}(a,d)+"xargs.push($"+r+"); "}}return s+="} "})).join(""),a+="if (i < args.length) return new CalcError('N/A'); ",a+="return xargs; } ",i+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",u?(o+="this.resolveCells(toResolve, callback); } ",s=new Function("kendo","CalcError","round",a+o+i+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):s=new Function("kendo","CalcError","round",a+" return { check: check };"),s=s(te.kendo,K,he),l||delete s.arrayArgs,s;function c(){return n?"$"+r:(u=!0,n=!0,o+="toResolve.push(args[i++]); ","($"+r+" = this.force($"+r+"))")}function f(e){return"("+(e?"(typeof "+c()+" == 'number' ? ($"+r+" = round($"+r+"), true) : false) || ":"(typeof "+c()+" == 'number') || ")+"(typeof $"+r+" == 'boolean' ? ($"+r+" = +$"+r+", true) : false) || (typeof $"+r+" == 'string' && !/^(?:=|true|false)/i.test($"+r+") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $"+r+"), /^date|number|percent$/.test(tmp.type) ? ($"+r+" = +tmp.value, true) : false) : false))"}function p(e){if(Array.isArray(e)){if("or"==e[0])return"("+e.slice(1).map(p).join(") || (")+")";if("and"==e[0])return"("+e.slice(1).map(p).join(") && (")+")";if("values"==e[0])return"("+e.slice(1).map((function(e){return c()+" === "+e})).join(") || (")+")";if("null"==e[0])return"("+p("null")+" ? (($"+r+" = "+e[1]+"), true) : false)";if("between"==e[0]||"[between]"==e[0])return"("+c()+" >= "+e[1]+" && $"+r+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between)"==e[0])return"("+c()+" > "+e[1]+" && $"+r+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between]"==e[0])return"("+c()+" > "+e[1]+" && $"+r+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("[between)"==e[0])return"("+c()+" >= "+e[1]+" && $"+r+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("assert"==e[0]){var t=e[2]||"N/A";return"(("+e[1]+") ? true : (err = "+JSON.stringify(t)+", false))"}if("not"==e[0])return"!("+p(e[1])+")";throw new Error("Unknown array type condition: "+e[0])}if("number"==e||"datetime"==e)return f(!0);if("number!"==e)return"(typeof "+c()+" == 'number' ? ($"+r+" = round($"+r+"), true) : false)";if("integer"==e||"date"==e)return"("+f()+" && (($"+r+" |= 0), true))";if("divisor"==e)return"("+f(!0)+" && ($"+r+" == 0 ? ((err = 'DIV/0'), false) : true))";if("number+"==e)return"("+f(!0)+" && ($"+r+" >= 0 ? true : ((err = 'NUM'), false)))";if("integer+"==e)return"("+f()+" && (($"+r+" |= 0) >= 0 ? true : ((err = 'NUM'), false)))";if("number++"==e)return"("+f(!0)+" && ($"+r+" > 0 ? true : ((err = 'NUM'), false)))";if("integer++"==e)return"("+f()+" && (($"+r+" |= 0) > 0 ? true : ((err = 'NUM'), false)))";if("string"==e)return"((typeof "+c()+" == 'string' || typeof $"+r+" == 'boolean' || typeof $"+r+" == 'number') ? ($"+r+" += '', true) : ($"+r+" === undefined ? (($"+r+" = ''), true) : false))";if("boolean"==e)return"(typeof "+c()+" == 'boolean')";if("logical"==e)return"(typeof "+c()+" == 'boolean' || (typeof $"+r+" == 'number' ? ($"+r+" = !!$"+r+", true) : false))";if("matrix"==e)return c(),"((m = this.asMatrix($"+r+")) ? ($"+r+" = m) : false)";if("#matrix"==e)return"((m = this.asMatrix($"+r+")) ? ($"+r+" = m) : false)";if("ref"==e)return"($"+r+" instanceof kendo.spreadsheet.Ref)";if("area"==e)return"($"+r+" instanceof kendo.spreadsheet.CellRef || $"+r+" instanceof kendo.spreadsheet.RangeRef)";if("cell"==e)return"($"+r+" instanceof kendo.spreadsheet.CellRef)";if("null"==e)return"("+c()+" == null)";if("anyvalue"==e)return"("+c()+" != null && i <= args.length)";if("forced"==e)return"("+c()+", i <= args.length)";if("anything"==e)return"(i <= args.length)";if("blank"==e)return"("+c()+" == null || $"+r+" === '')";throw new Error("Can't check for type: "+e)}}function he(e,t){return e===parseInt(e,10)?e:+e.toPrecision(t||16)}function le(e,t){return"number"==typeof e?he(e,t):e}function ce(e,t,r){if(r instanceof K)return r;try{return t.apply(e,r)}catch(e){if(e instanceof K)return e;throw e}}function fe(e,t,r,n){return function(s,i){function o(){if(n){let t=n.call(this,i);if(i=t.args,t.width>0&&t.height>0){let n=new ie(this);for(let s=0;s<t.height;++s)for(let o=0;o<t.width;++o){let a=[];for(let e=0;e<i.length;++e)t.arrays[e]?a[e]=i[e].getNA(s,o):a[e]=i[e];a=r.call(this,a),n.set(s,o,ce(this,e,a))}return s(n)}}let t=r.call(this,i);s(ce(this,e,t))}t?t.call(this,i,o):o.call(this)}}function pe(e,t,r,n){return function(s,i){function o(){if(n){let t=n.call(this,i);if(i=t.args,t.width>0&&t.height>0){let n=new ie(this),o=t.width*t.height,a=function(e,t){return function(r){if(n.set(e,t,r),--o,0===o)return s(n)}};for(let u=0;u<t.height&&o>0;++u)for(let h=0;h<t.width&&o>0;++h){let l=[];for(let e=0;e<i.length;++e)t.arrays[e]?l[e]=i[e].getNA(u,h):l[e]=i[e];if(l=r.call(this,l),l instanceof K){if(n.set(u,h,l),--o,0===o)return s(n)}else l.unshift(a(u,h)),e.apply(this,l)}return}}let t=r.call(this,i);t instanceof K?s(t):(t.unshift(s),e.apply(this,t))}t?t.call(this,i,o):o.call(this)}}function de(e,t,r){return(1461*(e+4800+((++t-14)/12|0))/4|0)+(367*(t-2-12*((t-14)/12|0))/12|0)-(3*((e+4900+((t-14)/12|0))/100|0)/4|0)+r-32075}re.if=function(e,t){var r=this,n=t[0],s=t[1],i=t[2];this.resolveCells([n],(function(){var t=r.asMatrix(n);t?s((function(n){i((function(s){var i=r.asMatrix(n),o=r.asMatrix(s);e(t.map((function(e,t,a){return e instanceof K?e:r.bool(e)?i?i.get(t,a):n:o?o.get(t,a):s})))}))})):(n=this.force(n))instanceof K?e(n):r.bool(n)?s(e):i(e)}))},re["φ"]=function(e){e((1+Math.sqrt(5))/2)};var ge=de(1900,0,-1),me=[31,28,31,30,31,30,31,31,30,31,30,31],ve=[[0,31,59,90,120,151,181,212,243,273,304,334],[0,31,60,91,121,152,182,213,244,274,305,335]];function ye(e){return e%4?0:e%100?1:e%400?0:1}function we(e,t){return ye(e)&&1==t?29:me[t]}function be(e){return r=(t=(0|e)+ge)+68569,a=(r=(r-=(146097*(n=4*r/146097|0)+3)/4|0)-(1461*(i=4e3*(r+1)/1461001|0)/4|0)+31)-(2447*(s=80*r/2447|0)/80|0),o=s+2-12*(r=s/11|0),{year:u=100*(n-49)+i+r,month:--o,date:a,day:(t+1)%7,ord:ve[ye(u)][o]+a};var t,r,n,s,i,o,a,u}function _e(e,t,r){return de(e,t,r)-ge}var Ae=6e4,Ce=36e5;function xe(e){var t=e-(0|e);t<0&&t++;var r=Math.round(864e5*t),n=Math.floor(r/Ce);r-=n*Ce;var s=Math.floor(r/Ae);r-=s*Ae;var i=Math.floor(r/1e3);return{hours:n,minutes:s,seconds:i,milliseconds:r-=1e3*i}}function ke(e,t,r,n){return(e+(t+(r+n/1e3)/60)/60)/24}class Me{constructor(e,t){this.message=e,this.pos=t}toString(){return this.message}}function Ee(){this.node=null}function Fe(){}te.runtime.CalcError=K,te.runtime.Formula=ae,te.runtime.Matrix=ie,te.runtime.packDate=_e,te.runtime.unpackDate=be,te.runtime.packTime=ke,te.runtime.unpackTime=xe,te.runtime.serialToDate=function(e){var t=be(e),r=xe(e);return new Date(t.year,t.month,t.date,r.hours,r.minutes,r.seconds,r.milliseconds)},te.runtime.dateToSerial=function(e){var t=ke(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return(e=_e(e.getFullYear(),e.getMonth(),e.getDate()))<0?e-1+t:e+t},te.runtime.daysInMonth=we,te.runtime.validDate=function(e,t,r){return t>=1&&t<=12&&r>=1&&r<=we(e,t-1)},te.runtime.isLeapYear=ye,te.runtime.daysInYear=function(e){return ye(e)?366:365},te.runtime.parseDate=function(e,t){t&&(t=te.formatting.makeDateFormat(t));const r=Z().parseDate;return r(e,t)||r(e)||r(e,["MMMM dd yyyy","MMMM dd yy","MMM dd yyyy","MMM dd yy","dd MMMM yyyy","dd MMMM yy","dd MMM yyyy","dd MMM yy","MMMM dd, yyyy","MMMM dd, yy","MMM dd, yyyy","MMM dd, yy","MMMM dd","MMM dd","MMMM yyyy","MMM yyyy","dd MMMM","dd MMM"])},te.runtime.limitPrecision=he,te.runtime.defineBuiltinFunction=function(e,t,r,n){re[e]=t?pe(n,r.resolve,r.check,r.arrayArgs):fe(n,r.resolve,r.check,r.arrayArgs)},te.runtime.defineAlias=function(e,t){var r=re[t];if(!r)throw new Error("Function "+t+" is not yet defined");r.kendoSpreadsheetAliases||(r.kendoSpreadsheetAliases=[t]),r.kendoSpreadsheetAliases.push(e),re[e]=r},te.runtime.InputStream=function(e){let t=0;return{next:r,peek:n,eof:s,croak:i,readWhile:function(e){let t="";for(;!s()&&e(n(),t);)t+=r();return t},readEscaped:function(e){let t=!1,n="";for(;!s();){let s=r();if(t)n+=s,t=!1;else if("\\"===s)t=!0;else{if(s===e)break;n+=s}}return n},lookingAt:function(r){return r.exec(e.substr(t))},skip:function(r){if("string"==typeof r)e.substr(t,r.length)!==r&&i("Expected "+r),o(r.length);else if(r instanceof RegExp){let n=r.exec(e.substr(t));if(n)return o(n[0].length),n}else o(r[0].length)},forward:o,pos:function(){return t}};function r(){return e.charAt(t++)}function n(){return e.charAt(t)}function s(){return""===n()}function i(r){throw new Me(r+" (input: "+e+")",t)}function o(e){for(;e-- >0;)r()}},te.runtime.ParseError=Me,Ee.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},Fe.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}};let Re=new Fe;function Se(e,t,r){this.nodeName=e,this.attr=t||{},this.children=r||[]}function Ne(e){this.nodeValue=String(e)}function Le(e){this.html=e}function De(e){return new Le(e)}function Ue(e,t,r){return new Se(e,t,r)}function Ve(e){return new Ne(e)}function $e(e){this.root=e,this.children=[]}Se.prototype=new Ee,Se.prototype.appendTo=function(e){let t="string"==typeof this.nodeName?document.createElement(this.nodeName):this.nodeName,r=this.children;for(let e=0;e<r.length;e++)r[e].render(t,Re);return e.appendChild(t),t},Se.prototype.render=function(e,t){let r;if(t.nodeName!==this.nodeName)t.remove(),r=this.appendTo(e);else{let n;r=t.node;let s=this.children,i=s.length,o=t.children,a=o.length;if(Math.abs(a-i)>2)return void this.render({appendChild:function(r){e.replaceChild(r,t.node)}},Re);for(n=0;n<i;n++)s[n].render(r,o[n]||Re);for(n=i;n<a;n++)o[n].remove()}this.node=r,this.syncAttributes(t.attr),this.removeAttributes(t.attr)},Se.prototype.syncAttributes=function(e){let t=this.attr;for(let r in t){let n=t[r],s=e[r];"style"===r?this.setStyle(n,s):n!==s&&this.setAttribute(r,n,s)}},Se.prototype.setStyle=function(e,t){let r,n=this.node;if(t)for(r in e)e[r]!==t[r]&&(n.style[r]=e[r]);else for(r in e)n.style[r]=e[r]},Se.prototype.removeStyle=function(e){let t=this.attr.style||{},r=this.node;for(let n in e)void 0===t[n]&&(r.style[n]="")},Se.prototype.removeAttributes=function(e){let t=this.attr;for(let r in e)"style"===r?this.removeStyle(e.style):void 0===t[r]&&this.removeAttribute(r)},Se.prototype.removeAttribute=function(e){let t=this.node;"style"===e?t.style.cssText="":"className"===e?t.className="":t.removeAttribute(e)},Se.prototype.setAttribute=function(e,t){let r=this.node;void 0!==r[e]?r[e]=t:r.setAttribute(e,t)},Se.prototype.text=function(){let e="";for(let t=0;t<this.children.length;++t)e+=this.children[t].text();return e},Ne.prototype=new Ee,Ne.prototype.nodeName="#text",Ne.prototype.render=function(e,t){let r;t.nodeName!==this.nodeName?(t.remove(),r=document.createTextNode(this.nodeValue),e.appendChild(r)):(r=t.node,this.nodeValue!==t.nodeValue&&r.parentNode&&(r.nodeValue=this.nodeValue)),this.node=r},Ne.prototype.text=function(){return this.nodeValue},Le.prototype={nodeName:"#html",attr:{},remove:function(){for(let e=0;e<this.nodes.length;e++){let t=this.nodes[e];t.parentNode&&t.parentNode.removeChild(t)}},render:function(e,t){if(t.nodeName!==this.nodeName||t.html!==this.html){t.remove();let r=e.lastChild;!function(e,t){const r=document.createElement("div");r.innerHTML=t;for(;r.firstChild;)e.appendChild(r.firstChild)}(e,this.html),this.nodes=[];for(let t=r?r.nextSibling:e.firstChild;t;t=t.nextSibling)this.nodes.push(t)}else this.nodes=t.nodes.slice(0)}},$e.prototype={html:De,element:Ue,text:Ve,render:function(e){let t,r,n=this.children;for(t=0,r=e.length;t<r;t++){let r=n[t];r?r.node&&r.node.parentNode||(r.remove(),r=Re):r=Re,e[t].render(this.root,r)}for(t=r;t<n.length;t++)n[t].remove();this.children=e}};const Be={html:De,text:Ve,element:Ue,Tree:$e,Node:Ee};let Ie=/^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i,Te=/^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/;function ze(e){e=te.runtime.InputStream(e);let t,r=[],n=!1;for(;!e.eof();){let e=u();r.push(e),e.cond&&(n=!0)}return n||(1===r.length?r[0].cond="num":2===r.length?(r[0].cond={op:">=",value:0},r[1].cond={op:"<",value:0}):r.length>=3&&(r[0].cond={op:">",value:0},r[1].cond={op:"<",value:0},r[2].cond={op:"=",value:0},r.length>3&&(r[3].cond="text",r=r.slice(0,4)))),r;function s(){let t=e.skip(Ie);if(t)return t[1].toLowerCase()}function i(){let t,r=[],n=null;for(;!e.eof()&&(t=a());)"date"===t.type?n&&/^(el)?time$/.test(n.type)&&"h"===n.part&&"m"===t.part&&t.format<3&&(t.type="time"):/^(el)?time$/.test(t.type)&&"s"===t.part&&n&&"date"===n.type&&"m"===n.part&&n.format<3&&(n.type="time"),/^(?:str|space|fill)$/.test(t.type)||(n=t),r.push(t);return r}function o(t){if("date"!==t.type||"m"===t.part&&t.format<3){let r=e.skip(/^\.(0+)/);r&&(t.fraction=r[1].length,"date"===t.type&&(t.type="time"))}return t}function a(){let r,n;if(n=e.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:n[1]+n[2],decimal:t};if(n=e.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:n[0],decimal:t};if(n=e.skip(/^(e)([+-])/i))return{type:"exp",ch:n[1],sign:n[2]};if(n=e.skip(/^(d{1,4}|m{1,5}|yyyy|yy|y)/i))return n=n[1].toLowerCase(),o({type:"date",part:n.charAt(0),format:n.length});if(n=e.skip(/^(hh?|ss?)/i))return n=n[1].toLowerCase(),o({type:"time",part:n.charAt(0),format:n.length});if(n=e.skip(/^\[(hh?|mm?|ss?)\]/i))return n=n[1].toLowerCase(),o({type:"eltime",part:n.charAt(0),format:n.length});if(n=e.skip(/^(a[.]?m[.]?\/p[.]?m[.]?|a\/p)/i))return n=n[1].split("/"),{type:"ampm",am:n[0],pm:n[1]};switch(r=e.next()){case";":return null;case"\\":return{type:"str",value:e.next()};case'"':return{type:"str",value:e.readEscaped(r)};case"@":return{type:"text"};case"_":return{type:"space",value:e.next()};case"*":return{type:"fill",value:e.next()};case".":return e.lookingAt(/^\s*[#0?]/)?(t=!0,{type:"dec"}):{type:"str",value:"."};case"%":return{type:"percent"};case",":return{type:"comma"}}return{type:"str",value:r}}function u(){t=!1;let r=s(),n=function(){let t=e.skip(Te);if(t){let e=parseFloat(t[2]);if(!isNaN(e))return{op:t[1],value:e,custom:!0}}}();return!r&&n&&(r=s()),{color:r,cond:n,body:i()}}}let He={unpackDate:te.runtime.unpackDate,unpackTime:te.runtime.unpackTime,date:function(e,t,r,n){switch(r){case"d":switch(n){case 1:return t.date;case 2:return We(t.date,2,"0");case 3:return e.calendar.days.format.abbreviated[t.day];case 4:return e.calendar.days.format.wide[t.day]}break;case"m":switch(n){case 1:return t.month+1;case 2:return We(t.month+1,2,"0");case 3:return e.calendar.months.format.abbreviated[t.month];case 4:return e.calendar.months.format.wide[t.month];case 5:return e.calendar.months.format.narrow[t.month]}break;case"y":switch(n){case 1:case 4:return t.year;case 2:return t.year%100}}return"##"},time:function(e,t,r,n,s){let i,o;switch(t){case"h":i=We(n?e.hours%12||12:e.hours,r,"0"),s&&(o=(e.minutes+(e.seconds+e.milliseconds/1e3)/60)/60);break;case"m":i=We(e.minutes,r,"0"),s&&(o=(e.seconds+e.milliseconds/1e3)/60);break;case"s":i=We(e.seconds,r,"0"),s&&(o=e.milliseconds/1e3)}return o&&(i+=He.toFixed(o,s).replace(/^0+/,"")),i},eltime:function(e,t,r,n){let s,i;switch(t){case"h":s=24*e;break;case"m":s=24*e*60;break;case"s":s=24*e*60*60}return n&&(i=s-(0|s)),s=We(0|s,r,"0"),i&&(s+=He.toFixed(i,n).replace(/^0+/,"")),s},fill:function(e){return e},formatInt:function(e,t,r,n,s){t=He.toFixed(t,n).replace(/\..*$/,"");let i=r[r.length-1];n>0&&"0"!=i[r.length-1]&&("0"===t?t="":"-0"===t&&(t="-"));let o,a=!1,u=t.length-1,h=[],l=0;function c(t,r){s&&l&&l%3==0&&/^[0-9]$/.test(t)&&(o=e.numbers.symbols.group+o),r&&"-"===t&&(a=!0,t="0"),o=t+o,l++}for(let e=r.length;--e>=0;){let n=r[e];o="";for(let e=n.length;--e>=0;){let r=n.charAt(e);u<0?"0"==r?c("0"):"?"==r&&c(" "):("0"==t&&"?"==r?c(" "):"0"==r?c(t.charAt(u),!0):c(t.charAt(u)),u--)}if(0===e)for(;u>=0;)c(t.charAt(u--));h.unshift(o)}return a&&(h[0]="-"+h[0]),h},formatDec:function(e,t,r){let n=(e=He.toFixed(e,r)).indexOf(".");e=n>=0?e.substr(n+1).replace(/0+$/,""):"";let s=0,i=[];for(let r=0;r<t.length;++r){let n=t[r],o="";for(let t=0;t<n.length;++t){let r=n.charAt(t);s<e.length?o+=e.charAt(s++):"0"==r?o+="0":"?"==r&&(o+=" ")}i.push(o)}return i},toFixed:function(e,t){return function e(r,n){if(!isFinite(r))return"#NUM!";if(r<0)return"-"+e(-r);if(0===t)return String(Math.round(r));if(r===Math.round(r)&&!/e/i.test(String(r)))return r.toFixed(t);let s=function(e){let t,r,n,s=String(e).toLowerCase(),i=s.indexOf(".");i<0?(i=s.indexOf("e"),i<0?(t=s,r=""):(t=s.substr(0,i),r=s.substr(i))):(t=s.substr(0,i),r=s.substr(i+1));if(n=/(\d*)e([-+]?\d+)/.exec(r)){let e=parseInt(n[2],10);e>=0?(r=function(e,t,r){e+="";for(;e.length<t;)e+=r;return e}(n[1],e,"0"),t+=r.substr(0,e),r=r.substr(e)):(t=We(t,-e,"0"),r=t.substr(e)+n[1],t=t.substr(0,t.length+e))}return{intpart:t||"0",decpart:r}}(r),i=s.intpart,o=s.decpart;if(o.length<=t){for(;o.length<t;)o+="0";return i+"."+o}if(n)return i+"."+o.substr(0,t);let a=Math.pow(10,t);return e(Math.round(r*a)/a,!0)}(Number(e.toFixed(14)))}};function Pe(e){let t=function(e){let t=0;return{next:function(){return e[t++]},eof:function(){return t>=e.length},ahead:function(r,n){if(t+r<=e.length){let s=n.apply(null,e.slice(t,t+r));return s&&(t+=r),s}},restart:function(){t=0}}}(e.body),r=!1,n=!1,s=!1,i=0,o=/[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/,a=0,u=!1,h=0,l=[],c=[],f=e.cond;function p(e,t){("digit"===e.type&&"comma"===t.type||"comma"===e.type&&e.hidden&&"comma"===t.type)&&(t.hidden=!0,a++)}for(;!t.eof();){t.ahead(2,p);let e=t.next();"percent"===e.type?i++:"digit"===e.type?e.decimal?(h+=e.format.length,c.push(e.format)):(l.push(e.format),e.sep&&(u=!0)):"time"===e.type?n=!0:"date"===e.type?r=!0:"ampm"===e.type&&(s=n=!0)}return function(p,d,g){let m,v,y,w,b;if("text"===f){if(!("string"==typeof d||d instanceof K))return!1}else if("num"===f){if("number"!=typeof d)return!1}else if(f){if("number"!=typeof d)return!1;if(!function(e,t,r){switch(e.op){case"=":return t==r;case"<":return t<r;case">":return t>r;case"<=":return t<=r;case">=":return t>=r}throw new Error(`Unknown condition operator: ${JSON.stringify(e)}`)}(f,d,f.value))return!1;f.custom||(d=Math.abs(d))}if((i>0||a>0||l.length||c.length||r||n)&&"number"!=typeof d)return!1;e.color&&(p.color=e.color),i>0&&(d*=Math.pow(100,i)),a>0&&(d