All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.dirigible.ide-bpm.libs.handsontable_0.31.2.handsontable.full.min.js Maven / Gradle / Ivy

There is a newer version: 10.6.37
Show newest version
/*!
(The MIT License)

Copyright (c) 2012-2014 Marcin Warpechowski
Copyright (c) 2015 Handsoncode sp. z o.o. 

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Handsontable=e()}}(function(){var e;return function e(t,o,n){function r(a,l){if(!o[a]){if(!t[a]){var u="function"==typeof require&&require;if(!l&&u)return u(a,!0);if(i)return i(a,!0);if(s[a]&&void 0!==window[s[a]])return window[s[a]];var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[a]={exports:{}};t[a][0].call(d.exports,function(e){var o=t[a][1][e];return r(o||e)},d,d.exports,e,t,o,n)}return o[a].exports}for(var i="function"==typeof require&&require,s=JSON.parse('{"zeroclipboard":"ZeroClipboard","moment":"moment","numbro":"numbro","pikaday":"Pikaday"}')||{},a=0;a1)for(t=1,o=arguments.length;tMath.ceil(i.top+i.height)||(e.clientXMath.ceil(i.left+i.width)||void 0)))}function n(e){o(e)&&(r.eventManager.removeEventListener(document.body,"mousemove",n),t.style.display="block")}if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),w(e);var r=this,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",n)}},createBorders:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],o=this.main.style;o.position="absolute",o.top=0,o.left=0;for(var n=0;n<5;n++){var r=t[n],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),o=i.style,o.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,o.height=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",o.width=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",this.main.appendChild(i)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),v()&&this.createMultipleSelectorHandles(),this.disappear(),this.wot.wtTable.bordersHolder||(this.wot.wtTable.bordersHolder=document.createElement("div"),this.wot.wtTable.bordersHolder.className="htBorders",this.wot.wtTable.spreader.appendChild(this.wot.wtTable.bordersHolder)),this.wot.wtTable.bordersHolder.insertBefore(this.main,this.wot.wtTable.bordersHolder.firstChild)},createMultipleSelectorHandles:function(){this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")};this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var e={position:"absolute",height:"40px",width:"40px","border-radius":parseInt(40/1.5,10)+"px"};for(var t in e)e.hasOwnProperty(t)&&(this.selectionHandles.styles.bottomRightHitArea[t]=e[t],this.selectionHandles.styles.topLeftHitArea[t]=e[t]);var o={position:"absolute",height:"10px",width:"10px","border-radius":parseInt(10/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var n in o)o.hasOwnProperty(n)&&(this.selectionHandles.styles.bottomRight[n]=o[n],this.selectionHandles.styles.topLeft[n]=o[n]);this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)},isPartRange:function(e,t){return!(!this.wot.selections.area.cellRange||e==this.wot.selections.area.cellRange.to.row&&t==this.wot.selections.area.cellRange.to.col)},updateMultipleSelectionHandlesPosition:function(e,t,o,n,r,i){var s=parseInt(this.selectionHandles.styles.topLeft.width,10),a=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(o-s,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(n-s,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(o-a/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(n-a/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(o+i,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(n+r,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(o+i-a/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(n+r-a/4,10)+"px",this.settings.border.multipleSelectionHandlesVisible&&this.settings.border.multipleSelectionHandlesVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e==this.wot.wtSettings.getSetting("fixedRowsTop")||t==this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")},appear:function(e){if(!this.disabled){var t,o,n,r,i,s,a,l,u,w,y,C,_,R,M,S,E,O;O=this.wot.wtTable.getRenderedRowsCount();for(var T=0;T=e[0]&&k<=e[2]){_=k;break}}for(var x=O-1;x>=0;x--){var D=this.wot.wtTable.rowFilter.renderedToSource(x);if(D>=e[0]&&D<=e[2]){M=D;break}}O=this.wot.wtTable.getRenderedColumnsCount();for(var H=0;H=e[1]&&A<=e[3]){R=A;break}}for(var P=O-1;P>=0;P--){var N=this.wot.wtTable.columnFilter.renderedToSource(P);if(N>=e[1]&&N<=e[3]){S=N;break}}if(void 0===_||void 0===R)return void this.disappear();t=_!==M||R!==S,o=this.wot.wtTable.getCell(new b(_,R)),n=t?this.wot.wtTable.getCell(new b(M,S)):o,r=p(o),i=t?p(n):r,s=p(this.wot.wtTable.TABLE),l=r.top,y=i.top+g(n)-l,w=r.left,C=i.left+m(n)-w,a=l-s.top-1,u=w-s.left-1;var L=c(o);parseInt(L.borderTopWidth,10)>0&&(a+=1,y=y>0?y-1:0),parseInt(L.borderLeftWidth,10)>0&&(u+=1,C=C>0?C-1:0),this.topStyle.top=a+"px",this.topStyle.left=u+"px",this.topStyle.width=C+"px",this.topStyle.display="block",this.leftStyle.top=a+"px",this.leftStyle.left=u+"px",this.leftStyle.height=y+"px",this.leftStyle.display="block";var I=Math.floor(this.settings.border.width/2);this.bottomStyle.top=a+y-I+"px",this.bottomStyle.left=u+"px",this.bottomStyle.width=C+"px",this.bottomStyle.display="block",this.rightStyle.top=a+"px",this.rightStyle.left=u+C-I+"px",this.rightStyle.height=y+1+"px",this.rightStyle.display="block",v()||!this.hasSetting(this.settings.border.cornerVisible)||this.isPartRange(M,S)?this.cornerStyle.display="none":(this.cornerStyle.top=a+y-4+"px",this.cornerStyle.left=u+C-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none",E=d(this.wot.wtTable.TABLE),S===this.wot.getSetting("totalColumns")-1&&n.offsetLeft+m(n)+parseInt(this.cornerDefaultStyle.width)/2>=h(E)&&(this.cornerStyle.left=Math.floor(u+C-3-parseInt(this.cornerDefaultStyle.width)/2)+"px",this.cornerStyle.borderRightWidth=0),M===this.wot.getSetting("totalRows")-1&&n.offsetTop+g(n)+parseInt(this.cornerDefaultStyle.height)/2>=f(E)&&(this.cornerStyle.top=Math.floor(a+y-3-parseInt(this.cornerDefaultStyle.height)/2)+"px",this.cornerStyle.borderBottomWidth=0),this.cornerStyle.display="block"),v()&&this.updateMultipleSelectionHandlesPosition(_,R,a,u,C,y)}},disappear:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",v()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")},hasSetting:function(e){return"function"==typeof e?e():!!e}},{}),window.WalkontableBorder=C},{"cell/coords":6,eventManager:42,"helpers/browser":44,"helpers/dom/element":47,"helpers/dom/event":48,"overlay/_base.js":12}],4:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableViewportColumnsCalculator:{get:function(){return r}},__esModule:{value:!0}});var n=new WeakMap,r=function(e,t,o,r,i,s,a){var l=void 0!==arguments[7]?arguments[7]:function(e){return e};n.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:o,columnWidthFn:r,overrideFn:i,onlyFullyVisible:s,stretchingColumnWidthFn:l}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=a,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()},i=r;$traceurRuntime.createClass(r,{calculate:function(){for(var e,t=0,o=!0,r=[],i=n.get(this),s=i.onlyFullyVisible,a=i.overrideFn,l=i.scrollOffset,u=i.totalColumns,c=i.viewportWidth,d=0;d0?c+1:c;if(t>=l&&t+e<=l+h&&(null==this.startColumn&&(this.startColumn=d),this.endColumn=d),r.push(t),t+=e,s||(this.endColumn=d),t>=l+c){o=!1;break}}if(this.endColumn===u-1&&o)for(this.startColumn=this.endColumn;this.startColumn>0;){var f=r[this.endColumn]+e-r[this.startColumn-1];if((f<=c||!s)&&this.startColumn--,f>c)break}null!==this.startColumn&&a&&a(this),this.startPosition=r[this.startColumn],void 0==this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)},refreshStretching:function(e){if("none"!==this.stretch){this.totalTargetWidth=e;for(var t=n.get(this),o=t.totalColumns,r=0,i=0;i0)this.stretchAllRatio=e/r,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&e!==1/0){var u=this._getColumnWidth(o-1),c=l+u;this.stretchLastWidth=c>=0?c:u}}},getStretchedColumnWidth:function(e,t){var o=null;return"all"===this.stretch&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o},_getStretchedAllColumnWidth:function(e,t){var o=0,r=n.get(this),i=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var s=Math.round(t*this.stretchAllRatio),a=r.stretchingColumnWidthFn(s,e);this.stretchAllColumnsWidth[e]=void 0===a?s:isNaN(a)?this._getColumnWidth(e):a}if(this.stretchAllColumnsWidth.length===i&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var l=0;l=u&&e+p<=u+d-h&&(null===this.startRow&&(this.startRow=f),this.endRow=f),o.push(e),e+=p,s||(this.endRow=f),e>=u+d-h){t=!1;break}}if(this.endRow===c-1&&t)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+p-o[this.startRow-1];if((g<=d-h||!s)&&this.startRow--,g>=d-h)break}null!==this.startRow&&a&&a(this),this.startPosition=o[this.startRow],void 0==this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}},{get DEFAULT_HEIGHT(){return 23}}),window.WalkontableViewportRowsCalculator=r},{}],6:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableCellCoords:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t){void 0!==e&&void 0!==t?(this.row=e,this.col=t):(this.row=null,this.col=null)};$traceurRuntime.createClass(n,{isValid:function(e){return!(this.row<0||this.col<0)&&!(this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))},isEqual:function(e){return e===this||this.row===e.row&&this.col===e.col},isSouthEastOf:function(e){return this.row>=e.row&&this.col>=e.col},isNorthWestOf:function(e){return this.row<=e.row&&this.col<=e.col},isSouthWestOf:function(e){return this.row>=e.row&&this.col<=e.col},isNorthEastOf:function(e){return this.row<=e.row&&this.col>=e.col}},{}),window.WalkontableCellCoords=n},{}],7:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableCellRange:{get:function(){return i}},__esModule:{value:!0}});var n,r=((n=e("cell/coords"))&&n.__esModule&&n||{default:n}).WalkontableCellCoords,i=function(e,t,o){this.highlight=e,this.from=t,this.to=o},s=i;$traceurRuntime.createClass(i,{isValid:function(e){return this.from.isValid(e)&&this.to.isValid(e)},isSingle:function(){return this.from.row===this.to.row&&this.from.col===this.to.col},getHeight:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1},getWidth:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1},includes:function(e){var t=e,o=t.row,n=t.col,r=this.getTopLeftCorner(),i=this.getBottomRightCorner();return r.row<=o&&i.row>=o&&r.col<=n&&i.col>=n},includesRange:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())},isEqual:function(e){return Math.min(this.from.row,this.to.row)==Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)==Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)==Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)==Math.max(e.from.col,e.to.col)},overlaps:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())},isSouthEastOf:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)},isNorthWestOf:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)},expand:function(e){var t=this.getTopLeftCorner(),o=this.getBottomRightCorner();return(e.rowo.row||e.col>o.col)&&(this.from=new r(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new r(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)},expandByRange:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),o=this.getBottomRightCorner(),n=(this.getTopRightCorner(),this.getBottomLeftCorner(),e.getTopLeftCorner()),i=e.getBottomRightCorner(),a=Math.min(t.row,n.row),l=Math.min(t.col,n.col),u=Math.max(o.row,i.row),c=Math.max(o.col,i.col),d=new r(a,l),h=new r(u,c),f=new s(d,d,h).isCorner(this.from,e),p=e.isEqual(new s(d,d,h));return f&&!p&&(this.from.col>d.col&&(d.col=c,h.col=l),this.from.row>d.row&&(d.row=u,h.row=a)),this.from=d,this.to=h,!0},getDirection:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0},setDirection:function(e){var t,o,n,r;switch(e){case"NW-SE":t=[this.getTopLeftCorner(),this.getBottomRightCorner()],this.from=t[0],this.to=t[1];break;case"NE-SW":o=[this.getTopRightCorner(),this.getBottomLeftCorner()],this.from=o[0],this.to=o[1];break;case"SE-NW":n=[this.getBottomRightCorner(),this.getTopLeftCorner()],this.from=n[0],this.to=n[1];break;case"SW-NE":r=[this.getBottomLeftCorner(),this.getTopRightCorner()],this.from=r[0],this.to=r[1]}},getTopLeftCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},getBottomRightCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getTopRightCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getBottomLeftCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},isCorner:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col))))||(e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner()))},getOppositeCorner:function(e,t){if(!(e instanceof r))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0},getBordersSharedWith:function(e){if(!this.includesRange(e))return[];var t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},o={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},n=[];return t.top==o.top&&n.push("top"),t.right==o.right&&n.push("right"),t.bottom==o.bottom&&n.push("bottom"),t.left==o.left&&n.push("left"),n},getInner:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),o=[],n=e.row;n<=t.row;n++)for(var i=e.col;i<=t.col;i++)this.from.row===n&&this.from.col===i||this.to.row===n&&this.to.col===i||o.push(new r(n,i));return o},getAll:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),o=[],n=e.row;n<=t.row;n++)for(var i=e.col;i<=t.col;i++)e.row===n&&e.col===i?o.push(e):t.row===n&&t.col===i?o.push(t):o.push(new r(n,i));return o},forAll:function(e){for(var t=this.getTopLeftCorner(),o=this.getBottomRightCorner(),n=t.row;n<=o.row;n++)for(var r=t.col;r<=o.col;r++){var i=e(n,r);if(!1===i)return}}},{}),window.WalkontableCellRange=i},{"cell/coords":6}],8:[function(e,t,o){"use strict";Object.defineProperties(o,{Walkontable:{get:function(){return H}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f,p,g,m,w=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},v=w.addClass,y=w.fastInnerText,b=w.isVisible,C=w.removeClass,_=((r=e("helpers/object"))&&r.__esModule&&r||{default:r}).objectEach,R=(i=e("helpers/string"))&&i.__esModule&&i||{default:i},M=R.toUpperCaseFirst,S=R.randomString,E=((s=e("event"))&&s.__esModule&&s||{default:s}).WalkontableEvent,O=((a=e("overlays"))&&a.__esModule&&a||{default:a}).WalkontableOverlays,T=((l=e("scroll"))&&l.__esModule&&l||{default:l}).WalkontableScroll,k=((u=e("settings"))&&u.__esModule&&u||{default:u}).WalkontableSettings,x=((c=e("table"))&&c.__esModule&&c||{default:c}).WalkontableTable,D=((d=e("viewport"))&&d.__esModule&&d||{default:d}).WalkontableViewport,H=(((h=e("overlay/_base.js"))&&h.__esModule&&h||{default:h}).WalkontableOverlay,((f=e("overlay/top.js"))&&f.__esModule&&f||{default:f}).WalkontableTopOverlay,((p=e("overlay/left.js"))&&p.__esModule&&p||{default:p}).WalkontableLeftOverlay,((g=e("overlay/debug.js"))&&g.__esModule&&g||{default:g}).WalkontableDebugOverlay,((m=e("overlay/topLeftCorner.js"))&&m.__esModule&&m||{default:m}).WalkontableTopLeftCornerOverlay,function(e){var t=[];if(this.guid="wt_"+S(),e.cloneSource?(this.cloneSource=e.cloneSource,this.cloneOverlay=e.cloneOverlay,this.wtSettings=e.cloneSource.wtSettings,this.wtTable=new x(this,e.table,e.wtRootElement),this.wtScroll=new T(this),this.wtViewport=e.cloneSource.wtViewport,this.wtEvent=new E(this),this.selections=this.cloneSource.selections):(this.wtSettings=new k(this,e),this.wtTable=new x(this,e.table),this.wtScroll=new T(this),this.wtViewport=new D(this),this.wtEvent=new E(this),this.selections=this.getSetting("selections"),this.wtOverlays=new O(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;o=t-n){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.colt-n&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)},update:function(e,t){return this.wtSettings.update(e,t)},scrollVertical:function(e){return this.wtOverlays.topOverlay.scrollTo(e),this.getSetting("onScrollVertically"),this},scrollHorizontal:function(e){return this.wtOverlays.leftOverlay.scrollTo(e),this.getSetting("onScrollHorizontally"),this},scrollViewport:function(e){return this.wtScroll.scrollViewport(e),this},getViewport:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},getOverlayName:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"},isOverlayName:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e},exportSettingsAsClassNames:function(){var e=this,t={rowHeaders:["array"],columnHeaders:["array"]},o=[],n=[];_(t,function(t,r){t.indexOf("array")>-1&&e.getSetting(r).length&&n.push("ht"+M(r)),o.push("ht"+M(r))}),C(this.wtTable.wtRootElement.parentNode,o),v(this.wtTable.wtRootElement.parentNode,n)},getSetting:function(e,t,o,n,r){return this.wtSettings.getSetting(e,t,o,n,r)},hasSetting:function(e){return this.wtSettings.has(e)},destroy:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}},{}),window.Walkontable=H},{event:9,"helpers/dom/element":47,"helpers/object":53,"helpers/string":55,"overlay/_base.js":12,"overlay/debug.js":13,"overlay/left.js":14,"overlay/top.js":15,"overlay/topLeftCorner.js":16,overlays:17,scroll:18,settings:20,table:21,viewport:23}],9:[function(e,t,o){"use strict";function n(e){var t=this,o=g(e);this.instance=e;var n=[null,null];this.dblClickTimeout=[null,null];var r=function(e){var o=document.activeElement,r=f(h,e.realTarget),i=e.realTarget;if(i!==o&&r(0)!==o&&r(1)!==o){var s=t.parentCell(i);c(i,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,i):s.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,s.coords,s.TD,t.instance),2!==e.button&&s.TD&&(n[0]=s.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){n[0]=null},1e3))}},i=function(e){t.instance.touchMoving=!0},s=function(e){o.addEventListener(this,"touchmove",i),t.checkIfTouchMove=setTimeout(function(){if(!0===t.instance.touchMoving)return t.instance.touchMoving=void 0,void o.removeEventListener("touchmove",i,!1);r(e)},30)},a=function(e){var o,n,r;t.instance.hasSetting("onCellMouseOver")&&(o=t.instance.wtTable.TABLE,n=u(e.realTarget,["TD","TH"],o),r=t.instance.cloneSource||t.instance,n&&n!==r.lastMouseOver&&d(n,o)&&(r.lastMouseOver=n,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(n),n,t.instance)))},l=function(e){var o,n,r;t.instance.hasSetting("onCellMouseOut")&&(o=t.instance.wtTable.TABLE,n=u(e.realTarget,["TD","TH"],o),r=u(e.relatedTarget,["TD","TH"],o),n&&n!==r&&d(n,o)&&t.instance.getSetting("onCellMouseOut",e,t.instance.wtTable.getCoords(n),n,t.instance))},m=function(e){if(2!==e.button){var o=t.parentCell(e.realTarget);o.TD===n[0]&&o.TD===n[1]?(c(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,o.coords,o.TD,t.instance):t.instance.getSetting("onCellDblClick",e,o.coords,o.TD,t.instance),n[0]=null,n[1]=null):o.TD===n[0]?(t.instance.getSetting("onCellMouseUp",e,o.coords,o.TD,t.instance),n[1]=o.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){n[1]=null},500)):o.TD&&t.instance.hasSetting("onCellMouseUp")&&t.instance.getSetting("onCellMouseUp",e,o.coords,o.TD,t.instance)}},w=function(e){clearTimeout(void 0),e.preventDefault(),m(e)};if(o.addEventListener(this.instance.wtTable.holder,"mousedown",r),o.addEventListener(this.instance.wtTable.TABLE,"mouseover",a),o.addEventListener(this.instance.wtTable.TABLE,"mouseout",l),o.addEventListener(this.instance.wtTable.holder,"mouseup",m),this.instance.wtTable.holder.parentNode.parentNode&&p()&&!t.instance.wtTable.isWorkingOnClone()){var v="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");o.addEventListener(this.instance.wtTable.holder,"touchstart",function(e){t.instance.touchApplied=!0,d(e.target,v)&&s.call(e.target,e)}),o.addEventListener(this.instance.wtTable.holder,"touchend",function(e){t.instance.touchApplied=!1,d(e.target,v)&&w.call(e.target,e)}),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),o.addEventListener(this.instance.wtTable.holder,"scroll",function(e){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout(function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))},200)})}o.addEventListener(window,"resize",function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()}),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),o.destroy()}}Object.defineProperties(o,{WalkontableEvent:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},u=l.closestDown,c=l.hasClass,d=l.isChildOf,h=l.getParent,f=((i=e("helpers/function"))&&i.__esModule&&i||{default:i}).partial,p=((s=e("helpers/browser"))&&s.__esModule&&s||{default:s}).isMobileBrowser,g=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).eventManager;n.prototype.parentCell=function(e){var t={},o=this.instance.wtTable.TABLE,n=u(e,["TD","TH"],o);return n?(t.coords=this.instance.wtTable.getCoords(n),t.TD=n):c(e,"wtBorder")&&c(e,"current")?(t.coords=this.instance.selections.current.cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):c(e,"wtBorder")&&c(e,"area")&&this.instance.selections.area.cellRange&&(t.coords=this.instance.selections.area.cellRange.to,
t.TD=this.instance.wtTable.getCell(t.coords)),t},window.WalkontableEvent=n},{eventManager:42,"helpers/browser":44,"helpers/dom/element":47,"helpers/function":50}],10:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableColumnFilter:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t,o){this.offset=e,this.total=t,this.countTH=o};$traceurRuntime.createClass(n,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleRowHeadedColumnToSourceColumn:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceColumnToVisibleRowHeadedColumn:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableColumnFilter=n},{}],11:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableRowFilter:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t,o){this.offset=e,this.total=t,this.countTH=o};$traceurRuntime.createClass(n,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleColHeadedRowToSourceRow:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceRowToVisibleColHeadedRow:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableRowFilter=n},{}],12:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableOverlay:{get:function(){return p}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},l=a.getScrollableElement,u=a.getTrimmingContainer,c=((r=e("helpers/object"))&&r.__esModule&&r||{default:r}).defineGetter,d=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,h=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).eventManager,f={},p=function(e){c(this,"wot",e,{writable:!1}),this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=u(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()},g=p;$traceurRuntime.createClass(p,{updateStateOfRendering:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t},shouldBeRendered:function(){return!0},updateTrimmingContainer:function(){this.trimmingContainer=u(this.hider.parentNode.parentNode)},updateMainScrollableElement:function(){this.mainTableScrollableElement=l(this.wot.wtTable.TABLE)},makeClone:function(e){if(-1===g.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'+e+'" is not supported.');var t=document.createElement("DIV"),o=document.createElement("TABLE");t.className="ht_clone_"+e+" handsontable",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.overflow="hidden",o.className=this.wot.wtTable.TABLE.className,t.appendChild(o),this.type=e,this.wot.wtTable.wtRootElement.parentNode.appendChild(t);var n=this.wot.getSetting("preventOverflow");return!0===n||"horizontal"===n&&this.type===g.CLONE_TOP||"vertical"===n&&this.type===g.CLONE_LEFT?this.mainTableScrollableElement=window:this.mainTableScrollableElement=l(this.wot.wtTable.TABLE),new Walkontable({cloneSource:this.wot,cloneOverlay:this,table:o})},refresh:function(){var e=void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t},reset:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,n=t.style,r=e.parentNode.style;d([o,n,r],function(e){e.width="",e.height=""})}},destroy:function(){h(this.clone).destroy()}},{get CLONE_TOP(){return"top"},get CLONE_BOTTOM(){return"bottom"},get CLONE_LEFT(){return"left"},get CLONE_TOP_LEFT_CORNER(){return"top_left_corner"},get CLONE_BOTTOM_LEFT_CORNER(){return"bottom_left_corner"},get CLONE_DEBUG(){return"debug"},get CLONE_TYPES(){return[g.CLONE_TOP,g.CLONE_BOTTOM,g.CLONE_LEFT,g.CLONE_TOP_LEFT_CORNER,g.CLONE_BOTTOM_LEFT_CORNER,g.CLONE_DEBUG]},registerOverlay:function(e,t){if(-1===g.CLONE_TYPES.indexOf(e))throw new Error("Unsupported overlay ("+e+").");f[e]=t},createOverlay:function(e,t){return new f[e](t)},isOverlayTypeOf:function(e,t){return!(!e||!f[t])&&e instanceof f[t]}}),window.WalkontableOverlay=p},{eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/object":53}],13:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableDebugOverlay:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=((n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n}).addClass,s=((r=e("_base"))&&r.__esModule&&r||{default:r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_DEBUG),this.clone.wtTable.holder.style.opacity=.4,this.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",i(this.clone.wtTable.holder.parentNode,"wtDebugVisible")},l=a;$traceurRuntime.createClass(a,{},{},s),window.WalkontableDebugOverlay=a,s.registerOverlay(s.CLONE_DEBUG,a)},{_base:12,"helpers/dom/element":47}],14:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableLeftOverlay:{get:function(){return w}},__esModule:{value:!0}});var n,r,i=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},s=i.addClass,a=i.getScrollbarWidth,l=i.getScrollLeft,u=i.getWindowScrollTop,c=i.hasClass,d=i.outerWidth,h=i.innerHeight,f=i.removeClass,p=i.setOverlayPosition,g=i.resetCssTransform,m=((r=e("_base"))&&r.__esModule&&r||{default:r}).WalkontableOverlay,w=function(e){$traceurRuntime.superConstructor(v).call(this,e),this.clone=this.makeClone(m.CLONE_LEFT)},v=w;$traceurRuntime.createClass(w,{shouldBeRendered:function(){return!(!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,o=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==window||o&&"horizontal"===o)t=this.getScrollPosition(),g(e);else{var n,r,i=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(i.left),a=Math.ceil(i.right);r=this.wot.wtTable.hider.style.top,r=""===r?0:r,n=s<0&&a-e.offsetWidth>0?-s:0,t=n,n+="px",p(e,n,r)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(e,u()):this.mainTableScrollableElement.scrollLeft=e},onScroll:function(){this.wot.getSetting("onScrollVertically")},sumCellSizes:function(e,t){for(var o=0,n=this.wot.wtSettings.defaultColumnWidth;e0?-s:0,t=r,r+="px",p(e,n,r)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(u(),e):this.mainTableScrollableElement.scrollTop=e},onScroll:function(){this.wot.getSetting("onScrollHorizontally")},sumCellSizes:function(e,t){for(var o=0,n=this.wot.wtSettings.settings.defaultRowHeight;e0){var o=c(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?s(t,"innerBorderTop"):f(t,"innerBorderTop"),(!o&&e||o&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var n=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(n)for(var r=0;r0&&(f=-c+"px"),n&&"horizontal"!==n||i<0&&d-e.offsetHeight>0&&(p=-i+"px"),l(e,f,p)}else u(e);e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===o?o:o+4)+"px"}}},{},c),window.WalkontableTopLeftCornerOverlay=d,c.registerOverlay(c.CLONE_TOP_LEFT_CORNER,d)},{_base:12,"helpers/dom/element":47}],17:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableOverlays:{get:function(){return w}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},u=l.getScrollableElement,c=l.getScrollbarWidth,d=l.getScrollLeft,h=l.getScrollTop,f=((r=e("helpers/array"))&&r.__esModule&&r||{default:r}).arrayEach,p=((i=e("helpers/unicode"))&&i.__esModule&&i||{default:i}).isKey,g=((s=e("helpers/browser"))&&s.__esModule&&s||{default:s}).isMobileBrowser,m=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).EventManager,w=function(e){this.wot=e,this.instance=this.wot,this.eventManager=new m(this.wot),this.wot.update("scrollbarWidth",c()),this.wot.update("scrollbarHeight",c()),this.scrollableElement=u(this.wot.wtTable.TABLE),this.prepareOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},bottom:{top:null,left:0},left:{top:0,left:null}},this.pendingScrollCallbacks={master:{top:0,left:0},top:{left:0},bottom:{left:0},left:{top:0}},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.delegatedScrollCallback=!1,this.registeredListeners=[],this.registerListeners()};$traceurRuntime.createClass(w,{prepareOverlays:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_TOP,this.wot),"undefined"==typeof WalkontableBottomOverlay&&(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),"undefined"==typeof WalkontableBottomLeftCornerOverlay&&(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_DEBUG,this.wot)),e},refreshAll:function(){if(this.wot.drawn){if(!this.wot.wtTable.holder.parentNode)return void this.destroy();this.wot.draw(!0),this.verticalScrolling&&this.leftOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1}},registerListeners:function(){var e=this,t=this.topOverlay.mainTableScrollableElement,o=this.leftOverlay.mainTableScrollableElement,n=[];for(n.push([document.documentElement,"keydown",function(t){return e.onKeyDown(t)}]),n.push([document.documentElement,"keyup",function(){return e.onKeyUp()}]),n.push([document,"visibilitychange",function(){return e.onKeyUp()}]),n.push([t,"scroll",function(t){return e.onTableScroll(t)}]),t!==o&&n.push([o,"scroll",function(t){return e.onTableScroll(t)}]),this.topOverlay.needFullRender&&(n.push([this.topOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}]),n.push([this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)}])),this.bottomOverlay.needFullRender&&(n.push([this.bottomOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}]),n.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)}])),this.leftOverlay.needFullRender&&(n.push([this.leftOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}]),n.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)}])),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&n.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&n.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)}]),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&n.push([window,"wheel",function(t){var o,n=t.wheelDeltaY||t.deltaY,r=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.realTarget)?o="top":e.bottomOverlay.clone&&e.bottomOverlay.clone.wtTable.holder.contains(t.realTarget)?o="bottom":e.leftOverlay.clone.wtTable.holder.contains(t.realTarget)?o="left":e.topLeftCornerOverlay&&e.topLeftCornerOverlay.clone&&e.topLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)?o="topLeft":e.bottomLeftCornerOverlay&&e.bottomLeftCornerOverlay.clone&&e.bottomLeftCornerOverlay.clone.wtTable.holder.contains(t.realTarget)&&(o="bottomLeft"),("top"==o&&0!==n||"left"==o&&0!==r||"bottom"==o&&0!==n||("topLeft"===o||"bottomLeft"===o)&&(0!==n||0!==r))&&t.preventDefault()}]);n.length;){var r=n.pop();this.eventManager.addEventListener(r[0],r[1],r[2]),this.registeredListeners.push(r)}},deregisterListeners:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}},onTableScroll:function(e){if(!g()){var t=this.leftOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,n=e.target;this.keyPressed&&(o!==window&&n!==window&&!e.target.contains(o)||t!==window&&n!==window&&!e.target.contains(t))||("scroll"===e.type?this.syncScrollPositions(e):this.translateMouseWheelToScroll(e))}},onKeyDown:function(e){this.keyPressed=p(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")},onKeyUp:function(){this.keyPressed=!1},translateMouseWheelToScroll:function(e){var t=this.topOverlay.clone.wtTable.holder,o=this.bottomOverlay.clone?this.bottomOverlay.clone.wtTable.holder:null,n=this.leftOverlay.clone.wtTable.holder,r=this.topLeftCornerOverlay&&this.topLeftCornerOverlay.clone?this.topLeftCornerOverlay.clone.wtTable.holder:null,i=this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone?this.bottomLeftCornerOverlay.clone.wtTable.holder:null,s=e.wheelDeltaY||-1*e.deltaY,a=e.wheelDeltaX||-1*e.deltaX,l=null,u={type:"wheel"},c=e.target,d=null;for(1===e.deltaMode&&(s*=120,a*=120);c!=document&&null!=c;){if(c.className.indexOf("wtHolder")>-1){l=c;break}c=c.parentNode}return u.target=l,l===r||l===i?(this.syncScrollPositions(u,-.2*a,"x"),this.syncScrollPositions(u,-.2*s,"y")):(l===t||l===o?d=s:l===n&&(d=a),this.syncScrollPositions(u,-.2*d)),!1},syncScrollPositions:function(e){var t=void 0!==arguments[1]?arguments[1]:null,o=void 0!==arguments[2]?arguments[2]:null;if(!this.destroyed){if(0===arguments.length)return void this.syncScrollWithMaster();var n,r,i,s,a,l=this.leftOverlay.mainTableScrollableElement,u=this.topOverlay.mainTableScrollableElement,c=e.target,f=0,p=!1,g=!1,m=this.wot.getSetting("preventOverflow");this.topOverlay.needFullRender&&(n=this.topOverlay.clone.wtTable.holder),this.bottomOverlay.needFullRender&&(a=this.bottomOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&(r=this.leftOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&this.topOverlay.needFullRender&&(i=this.topLeftCornerOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&this.bottomOverlay.needFullRender&&(s=this.bottomLeftCornerOverlay.clone.wtTable.holder),c===document&&(c=window),c===l||c===u?(f=d(m?this.scrollableElement:c),this.horizontalScrolling=!0,this.overlayScrollPositions.master.left=f,p=!0,this.pendingScrollCallbacks.master.left>0?this.pendingScrollCallbacks.master.left--:(n&&n.scrollLeft!==f&&(null==t&&this.pendingScrollCallbacks.top.left++,n.scrollLeft=f,g=l!==window),a&&a.scrollLeft!==f&&(null==t&&this.pendingScrollCallbacks.bottom.left++,a.scrollLeft=f,g=l!==window)),f=h(c),this.verticalScrolling=!0,this.overlayScrollPositions.master.top=f,p=!0,this.pendingScrollCallbacks.master.top>0?this.pendingScrollCallbacks.master.top--:r&&r.scrollTop!==f&&(null==t&&this.pendingScrollCallbacks.left.top++,r.scrollTop=f,g=u!==window)):c===a?(f=d(c),this.horizontalScrolling=!0,this.overlayScrollPositions.bottom.left=f,p=!0,this.pendingScrollCallbacks.bottom.left>0?this.pendingScrollCallbacks.bottom.left--:(null==t&&this.pendingScrollCallbacks.master.left++,l.scrollLeft=f,n&&n.scrollLeft!==f&&(null==t&&this.pendingScrollCallbacks.top.left++,n.scrollLeft=f,g=u!==window)),null!==t&&(p=!0,u.scrollTop+=t)):c===n?(f=d(c),this.horizontalScrolling=!0,this.overlayScrollPositions.top.left=f,p=!0,this.pendingScrollCallbacks.top.left>0?this.pendingScrollCallbacks.top.left--:(null==t&&this.pendingScrollCallbacks.master.left++,l.scrollLeft=f),null!==t&&(p=!0,u.scrollTop+=t),a&&a.scrollLeft!==f&&(null==t&&this.pendingScrollCallbacks.bottom.left++,a.scrollLeft=f,g=u!==window)):c===r?(f=h(c),this.overlayScrollPositions.left.top!==f&&(this.verticalScrolling=!0,this.overlayScrollPositions.left.top=f,p=!0,this.pendingScrollCallbacks.left.top>0?this.pendingScrollCallbacks.left.top--:(null==t&&this.pendingScrollCallbacks.master.top++,u.scrollTop=f)),null!==t&&(p=!0,u.scrollLeft+=t)):c!==i&&c!==s||null!==t&&(p=!0,"x"===o?u.scrollLeft+=t:"y"===o&&(u.scrollTop+=t)),!this.keyPressed&&p&&"scroll"===e.type&&(this.delegatedScrollCallback?this.delegatedScrollCallback=!1:this.refreshAll(),g&&(this.delegatedScrollCallback=!0))}},syncScrollWithMaster:function(){var e=this.topOverlay.mainTableScrollableElement,t=e,o=t.scrollLeft,n=t.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=o),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=o),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)},updateMainScrollableElements:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement(),this.scrollableElement=u(this.wot.wtTable.TABLE),this.registerListeners()},destroy:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0},refresh:function(){var e=void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,o=t.clientWidth,n=t.clientHeight;o===this.spreaderLastSize.width&&n===this.spreaderLastSize.height||(this.spreaderLastSize.width=o,this.spreaderLastSize.height=n,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)},adjustElementsSize:function(){var e=void 0!==arguments[0]&&arguments[0],t=this.wot.getSetting("totalColumns"),o=this.wot.getSetting("totalRows"),n=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=n+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+this.topOverlay.sumCellSizes(0,o)+1+"px",this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.clone&&this.bottomOverlay.adjustElementsSize(e)},applyToDOM:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()},getParentOverlay:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],o=null;return f(t,function(t,n){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)}),o}},{}),window.WalkontableOverlays=w},{eventManager:42,"helpers/array":43,"helpers/browser":44,"helpers/dom/element":47,"helpers/unicode":56}],18:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableScroll:{get:function(){return p}},__esModule:{value:!0}});var n,r,i=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},s=i.innerHeight,a=i.innerWidth,l=i.getScrollLeft,u=i.getScrollTop,c=i.offset,d=(r=e("helpers/number"))&&r.__esModule&&r||{default:r},h=d.rangeEach,f=d.rangeEachReverse,p=function(e){this.wot=e,this.instance=e};$traceurRuntime.createClass(p,{scrollViewport:function(e){if(this.wot.drawn){var t=this._getVariables(),o=t.topOverlay,n=t.leftOverlay,r=t.totalRows,i=t.totalColumns,s=t.fixedRowsTop,a=t.fixedRowsBottom,l=t.fixedColumnsLeft;if(e.row<0||e.row>Math.max(r-1,0))throw new Error("row "+e.row+" does not exist");if(e.col<0||e.col>Math.max(i-1,0))throw new Error("column "+e.col+" does not exist");e.row>=s&&e.rowthis.getLastVisibleRow()&&e.row=l&&e.colthis.getLastVisibleColumn()&&n.scrollTo(e.col,!0)}},getFirstVisibleRow:function(){var e=this._getVariables(),t=e.topOverlay,o=e.wtTable,n=e.wtViewport,r=e.totalRows,i=e.fixedRowsTop,a=o.getFirstVisibleRow();if(t.mainTableScrollableElement===window){var l=c(o.wtRootElement),d=s(o.hider),h=s(window),p=u(window);if(l.top+d-h<=p){var g=n.getColumnHeaderHeight();g+=t.sumCellSizes(0,i),f(r,1,function(e){if(g+=t.sumCellSizes(e-1,e),l.top+d-g<=p)return a=e,!1})}}return a},getLastVisibleRow:function(){var e=this._getVariables(),t=e.topOverlay,o=e.wtTable,n=e.wtViewport,r=e.totalRows,i=o.getLastVisibleRow();if(t.mainTableScrollableElement===window){var a=c(o.wtRootElement),l=s(window),d=u(window);if(a.top>d){var f=n.getColumnHeaderHeight();h(1,r,function(e){if(f+=t.sumCellSizes(e-1,e),a.top+f-d>=l)return i=e-2,!1})}}return i},getFirstVisibleColumn:function(){var e=this._getVariables(),t=e.leftOverlay,o=e.wtTable,n=e.wtViewport,r=e.totalColumns,i=(e.fixedColumnsLeft,o.getFirstVisibleColumn());if(t.mainTableScrollableElement===window){var s=c(o.wtRootElement),u=a(o.hider),d=a(window),h=l(window);if(s.left+u-d<=h){var p=n.getRowHeaderWidth();f(r,1,function(e){if(p+=t.sumCellSizes(e-1,e),s.left+u-p<=h)return i=e,!1})}}return i},getLastVisibleColumn:function(){var e=this._getVariables(),t=e.leftOverlay,o=e.wtTable,n=e.wtViewport,r=e.totalColumns,i=o.getLastVisibleColumn();if(t.mainTableScrollableElement===window){var s=c(o.wtRootElement),u=a(window),d=l(window);if(s.left>d){var f=n.getRowHeaderWidth();h(1,r,function(e){if(f+=t.sumCellSizes(e-1,e),s.left+f-d>=u)return i=e-2,!1})}}return i},_getVariables:function(){
var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}},{}),window.WalkontableScroll=p},{"helpers/dom/element":47,"helpers/number":52}],19:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableSelection:{get:function(){return d}},__esModule:{value:!0}});var n,r,i,s,a=((n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n}).addClass,l=((r=e("border"))&&r.__esModule&&r||{default:r}).WalkontableBorder,u=((i=e("cell/coords"))&&i.__esModule&&i||{default:i}).WalkontableCellCoords,c=((s=e("cell/range"))&&s.__esModule&&s||{default:s}).WalkontableCellRange,d=function(e,t){this.settings=e,this.cellRange=t||null,this.instanceBorders={}};$traceurRuntime.createClass(d,{getBorder:function(e){if(this.instanceBorders[e.guid])return this.instanceBorders[e.guid];this.instanceBorders[e.guid]=new l(e,this.settings)},isEmpty:function(){return null===this.cellRange},add:function(e){this.isEmpty()?this.cellRange=new c(e,e,e):this.cellRange.expand(e)},replace:function(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1},clear:function(){this.cellRange=null},getCorners:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]},addClassAtCoords:function(e,t,o,n){var r=e.wtTable.getCell(new u(t,o));"object"==typeof r&&a(r,n)},draw:function(e){if(this.isEmpty()){if(this.settings.border){var t=this.getBorder(e);t&&t.disappear()}}else{for(var o,n,r,i=e.wtTable.getRenderedRowsCount(),s=e.wtTable.getRenderedColumnsCount(),l=this.getCorners(),u=0;u=l[1]&&n<=l[3]&&(r=e.wtTable.getColumnHeader(n))){var c=[];this.settings.highlightHeaderClassName&&c.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&c.push(this.settings.highlightColumnClassName),a(r,c)}for(var d=0;d=l[0]&&o<=l[2]&&(r=e.wtTable.getRowHeader(o))){var h=[];this.settings.highlightHeaderClassName&&h.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&h.push(this.settings.highlightRowClassName),a(r,h)}for(var f=0;f=l[0]&&o<=l[2]&&n>=l[1]&&n<=l[3]?this.settings.className&&this.addClassAtCoords(e,o,n,this.settings.className):o>=l[0]&&o<=l[2]?this.settings.highlightRowClassName&&this.addClassAtCoords(e,o,n,this.settings.highlightRowClassName):n>=l[1]&&n<=l[3]&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,o,n,this.settings.highlightColumnClassName)}if(e.getSetting("onBeforeDrawBorders",l,this.settings.className),this.settings.border){var p=this.getBorder(e);p&&p.appear(l)}}}},{}),window.WalkontableSelection=d},{border:3,"cell/coords":6,"cell/range":7,"helpers/dom/element":47}],20:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableSettings:{get:function(){return i}},__esModule:{value:!0}});var n,r=((n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n}).fastInnerText,i=function(e,t){var o=this;this.wot=e,this.instance=e,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},data:void 0,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var i=o.getSetting("data",e,t);r(n,void 0===i||null===i?"":i)},columnWidth:function(e){},rowHeight:function(e){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(e){return e},onModifyRowHeaderWidth:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={};for(var n in this.defaults)if(this.defaults.hasOwnProperty(n))if(void 0!==t[n])this.settings[n]=t[n];else{if(void 0===this.defaults[n])throw new Error('A required setting "'+n+'" was not provided');this.settings[n]=this.defaults[n]}};$traceurRuntime.createClass(i,{update:function(e,t){if(void 0===t)for(var o in e)e.hasOwnProperty(o)&&(this.settings[o]=e[o]);else this.settings[e]=t;return this.wot},getSetting:function(e,t,o,n,r){return"function"==typeof this.settings[e]?this.settings[e](t,o,n,r):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]},has:function(e){return!!this.settings[e]}},{}),window.WalkontableSettings=i},{"helpers/dom/element":47}],21:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableTable:{get:function(){return S}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},d=c.getStyle,h=c.getTrimmingContainer,f=c.hasClass,p=c.index,g=c.offset,m=c.removeClass,w=c.removeTextNodes,v=c.overlayContainsElement,y=c.closest,b=((r=e("helpers/function"))&&r.__esModule&&r||{default:r}).isFunction,C=((i=e("cell/coords"))&&i.__esModule&&i||{default:i}).WalkontableCellCoords,_=(((s=e("cell/range"))&&s.__esModule&&s||{default:s}).WalkontableCellRange,((a=e("filter/column"))&&a.__esModule&&a||{default:a}).WalkontableColumnFilter),R=((l=e("filter/row"))&&l.__esModule&&l||{default:l}).WalkontableRowFilter,M=((u=e("tableRenderer"))&&u.__esModule&&u||{default:u}).WalkontableTableRenderer,S=function(e,t){var o=this;this.wot=e,this.instance=this.wot,this.TABLE=t,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,w(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var n=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return o._modifyRowHeaderWidth(n)}};$traceurRuntime.createClass(S,{fixTableDomTree:function(){this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=document.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=document.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=document.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(document.createElement("TR"))},createSpreader:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f(o,"wtHolder")||(t=document.createElement("div"),t.className="wtSpreader",o&&o.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t},createHider:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f(o,"wtHolder")||(t=document.createElement("div"),t.className="wtHider",o&&o.insertBefore(t,e),t.appendChild(e)),t},createHolder:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f(o,"wtHolder")||(t=document.createElement("div"),t.style.position="relative",t.className="wtHolder",o&&o.insertBefore(t,e),this.isWorkingOnClone()||(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t},alignOverlaysWithTrimmingContainer:function(){var e=h(this.wtRootElement);if(!this.isWorkingOnClone())if(this.holder.parentNode.style.position="relative",e===window){var t=this.wot.getSetting("preventOverflow");t||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else this.holder.style.width=d(e,"width"),this.holder.style.height=d(e,"height"),this.holder.style.overflow=""},isWorkingOnClone:function(){return!!this.wot.cloneSource},draw:function(e){var t=this.wot,o=t.wtOverlays,n=t.wtViewport,r=this.instance.getSetting("totalRows"),i=this.wot.getSetting("rowHeaders").length,s=this.wot.getSetting("columnHeaders").length,a=!1;if(!this.isWorkingOnClone()&&(this.holderOffset=g(this.holder),e=n.createRenderCalculators(e),i&&!this.wot.getSetting("fixedColumnsLeft"))){var l=o.leftOverlay.getScrollPosition(),u=this.correctHeaderWidth;this.correctHeaderWidth=l>0,u!==this.correctHeaderWidth&&(e=!1)}if(this.isWorkingOnClone()||(a=o.prepareOverlays()),e)this.isWorkingOnClone()||n.createVisibleCalculators(),o&&o.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.wot.cloneSource.wtTable.tableOffset:this.tableOffset=g(this.TABLE);var c;c=WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)?0:WalkontableOverlay.isOverlayTypeOf(this.instance.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)||WalkontableOverlay.isOverlayTypeOf(this.instance.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?Math.max(r-this.wot.getSetting("fixedRowsBottom"),0):n.rowsRenderCalculator.startRow;var d;d=WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_LEFT)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?0:n.columnsRenderCalculator.startColumn,this.rowFilter=new R(c,r,s),this.columnFilter=new _(d,this.wot.getSetting("totalColumns"),i),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(e),this.isWorkingOnClone()||(o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&o.bottomOverlay.resetFixedPosition(),o.leftOverlay.resetFixedPosition(),o.topLeftCornerOverlay&&o.topLeftCornerOverlay.resetFixedPosition(),o.bottomLeftCornerOverlay&&o.bottomLeftCornerOverlay.clone&&o.bottomLeftCornerOverlay.resetFixedPosition()),a&&o.syncScrollWithMaster(),this.wot.drawn=!0,this},_doDraw:function(){new M(this).render()},removeClassFromCells:function(e){for(var t=this.TABLE.querySelectorAll("."+e),o=0,n=t.length;o=0},isRowAfterViewport:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()},isRowAfterRenderedRows:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()},isColumnBeforeViewport:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0},isColumnAfterViewport:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()},isLastRowFullyVisible:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()},isLastColumnFullyVisible:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var e=this.wot.wtViewport.columnsRenderCalculator.count,t=this.wot.getSetting("totalColumns");if(this.wot.isOverlayName(WalkontableOverlay.CLONE_DEBUG))e=t;else if(this.wot.isOverlayName(WalkontableOverlay.CLONE_LEFT)||this.wot.isOverlayName(WalkontableOverlay.CLONE_TOP_LEFT_CORNER)||this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER))return Math.min(this.wot.getSetting("fixedColumnsLeft"),t);return e},getRenderedRowsCount:function(){var e=this.wot.wtViewport.rowsRenderCalculator.count,t=this.wot.getSetting("totalRows");return this.wot.isOverlayName(WalkontableOverlay.CLONE_DEBUG)?e=t:this.wot.isOverlayName(WalkontableOverlay.CLONE_TOP)||this.wot.isOverlayName(WalkontableOverlay.CLONE_TOP_LEFT_CORNER)?e=Math.min(this.wot.getSetting("fixedRowsTop"),t):(this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM)||this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER))&&(e=Math.min(this.wot.getSetting("fixedRowsBottom"),t)),e},getVisibleRowsCount:function(){return this.wot.wtViewport.rowsVisibleCalculator.count},allRowsInViewport:function(){return this.wot.getSetting("totalRows")==this.getVisibleRowsCount()},getRowHeight:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),o=this.wot.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t},getColumnHeaderHeight:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,o=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count},allColumnsInViewport:function(){return this.wot.getSetting("totalColumns")==this.getVisibleColumnsCount()},getColumnWidth:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"==typeof t&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth},getStretchedColumnWidth:function(e){var t=this.getColumnWidth(e),o=null==t?this.instance.wtSettings.settings.defaultColumnWidth:t,n=this.wot.wtViewport.columnsRenderCalculator;if(n){var r=n.getStretchedColumnWidth(e,o);r&&(o=r)}return o},_modifyRowHeaderWidth:function(e){var t=b(e)?e():null;return Array.isArray(t)?(t=$traceurRuntime.spread(t),t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t},_correctRowHeaderWidth:function(e){return"number"!=typeof e&&(e=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&e++,e}},{}),window.WalkontableTable=S},{"cell/coords":6,"cell/range":7,"filter/column":10,"filter/row":11,"helpers/dom/element":47,"helpers/function":50,tableRenderer:22}],22:[function(e,t,o){"use strict";function n(e,t){var o=document.createElement("TH");return t.insertBefore(o,e),t.removeChild(e),o}function r(e,t){var o=document.createElement("TD");return t.insertBefore(o,e),t.removeChild(e),o}Object.defineProperties(o,{WalkontableTableRenderer:{get:function(){return p}},__esModule:{value:!0}});var i,s=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},a=s.addClass,l=s.empty,u=s.getScrollbarWidth,c=s.hasClass,d=s.innerHeight,h=s.outerWidth,f=!1,p=function(e){this.wtTable=e,this.wot=e.instance,this.instance=e.instance,this.rowFilter=e.rowFilter,this.columnFilter=e.columnFilter,this.TABLE=e.TABLE,this.THEAD=e.THEAD,this.TBODY=e.TBODY,this.COLGROUP=e.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0,this.fixedRowsBottom=0};$traceurRuntime.createClass(p,{render:function(){if(!this.wtTable.isWorkingOnClone()){var e={};if(this.wot.getSetting("beforeDraw",!0,e),!0===e.skipRender)return}this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var t,o=this.wtTable.getRenderedColumnsCount(),n=this.wtTable.getRenderedRowsCount(),r=this.wot.getSetting("totalColumns"),i=this.wot.getSetting("totalRows"),s=!1;if((WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),r>=0&&(this.adjustAvailableNodes(),s=!0,this.renderColumnHeaders(),this.renderRows(i,n,o),this.wtTable.isWorkingOnClone()||(t=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(o),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),s||this.adjustAvailableNodes(),this.removeRedundantRows(n),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var a=h(this.wtTable.hider),l=h(this.wtTable.TABLE);if(0!==a&&l!==a&&this.adjustColumnWidths(o),t!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var u=this.wtTable.getFirstRenderedColumn(),c=this.wtTable.getLastRenderedColumn(),d=this.wot.getSetting("defaultColumnWidth"),f=this.wot.getSetting("rowHeaderWidth");if(null!=(f=this.instance.getSetting("onModifyRowHeaderWidth",f)))for(var p=0;pe;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(e,t,o){for(var n,r=0,i=this.rowFilter.renderedToSource(r),s=this.wtTable.isWorkingOnClone();i=0&&(!f&&r>1e3&&(f=!0,console.warn('Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.')),void 0===t||r!==t);){if(n=this.getOrCreateTrForRow(r,n),this.renderRowHeaders(i,n),this.adjustColumns(n,o+this.rowHeaderCount),this.renderCells(i,n,o),s&&!this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM)||this.resetOversizedRow(i),n.firstChild){var a=this.wot.wtTable.getRowHeight(i);a?(a--,n.firstChild.style.height=a+"px"):n.firstChild.style.height=""}r++,i=this.rowFilter.renderedToSource(r)}},resetOversizedRow:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)},markOversizedRows:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,o,n,r,i=this.instance.wtTable.TBODY.childNodes.length,s=i*this.instance.wtSettings.settings.defaultRowHeight,a=d(this.instance.wtTable.TBODY)-1;this.instance.getSetting("totalRows");if(s!==a||this.instance.getSetting("fixedRowsBottom"))for(;i;)i--,o=this.instance.wtTable.rowFilter.renderedToSource(i),e=this.instance.wtTable.getRowHeight(o),n=this.instance.wtTable.getTrForRow(o),r=n.querySelector("th"),t=r?d(r):d(n)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight=this.wtTable.tbodyChildrenLength?(o=this.createRow(),this.appendToTbody(o)):o=0===e?this.TBODY.firstChild:t.nextSibling,o.className&&o.removeAttribute("class"),o},createRow:function(){for(var e=document.createElement("TR"),t=0;te+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--;this.rowHeaderCount&&a(this.COLGROUP.childNodes[0],"rowHeader")},adjustThead:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var o=0,n=this.columnHeaders.length;oe+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength--}var r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;it;)e.removeChild(e.lastChild),o--},removeRedundantColumns:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}},{}),window.WalkontableTableRenderer=p},{"helpers/dom/element":47}],23:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableViewport:{get:function(){return b}},__esModule:{value:!0}});var n,r,i,s,a,l,u=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,c=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},d=c.getScrollbarWidth,h=(c.getScrollTop,c.getStyle),f=c.offset,p=c.outerHeight,g=c.outerWidth,m=((i=e("helpers/object"))&&i.__esModule&&i||{default:i}).objectEach,w=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).EventManager,v=((a=e("calculator/viewportColumns"))&&a.__esModule&&a||{default:a}).WalkontableViewportColumnsCalculator,y=((l=e("calculator/viewportRows"))&&l.__esModule&&l||{default:l}).WalkontableViewportRowsCalculator,b=function(e){var t=this;this.wot=e,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new w(this.wot),this.eventManager.addEventListener(window,"resize",function(){t.clientHeight=t.getWorkspaceHeight()})};$traceurRuntime.createClass(b,{getWorkspaceHeight:function(){var e,t=this.instance.wtOverlays.topOverlay.trimmingContainer,o=0;return t===window?o=document.documentElement.clientHeight:(e=p(t),o=e>0&&t.clientHeight>0?t.clientHeight:1/0),o},getWorkspaceWidth:function(){var e,t,o=this.wot.getSetting("totalColumns"),n=this.instance.wtOverlays.leftOverlay.trimmingContainer,r=this.wot.getSetting("stretchH"),i=document.documentElement.offsetWidth;return this.wot.getSetting("preventOverflow")?g(this.instance.wtTable.wtRootElement):(e=u.freezeOverlays?Math.min(i-this.getWorkspaceOffset().left,i):Math.min(this.getContainerFillWidth(),i-this.getWorkspaceOffset().left,i),n===window&&o>0&&this.sumColumnWidths(0,o-1)>e?document.documentElement.clientWidth:n===window||"scroll"!=(t=h(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"))&&"hidden"!=t&&"auto"!=t?"none"!==r&&r?e:Math.max(e,g(this.instance.wtTable.TABLE)):Math.max(e,n.clientWidth))},hasVerticalScroll:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()},hasHorizontalScroll:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()},sumColumnWidths:function(e,t){for(var o=0;e0&&(t-=e),t)},getRowHeaderWidth:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var o=0,n=t.length;o0?t-e:t)},createRowsCalculator:function(){var e,t,o,n,r,i,s,a=void 0!==arguments[0]&&arguments[0],l=this;return this.rowHeaderWidth=NaN,e=this.wot.wtSettings.settings.renderAllRows?1/0:this.getViewportHeight(),t=this.wot.wtOverlays.topOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset(),t<0&&(t=0),o=this.wot.getSetting("fixedRowsTop"),r=this.wot.getSetting("fixedRowsBottom"),
s=this.wot.getSetting("totalRows"),o&&(i=this.wot.wtOverlays.topOverlay.sumCellSizes(0,o),t+=i,e-=i),r&&this.wot.wtOverlays.bottomOverlay.clone&&(i=this.wot.wtOverlays.bottomOverlay.sumCellSizes(s-r,s),e-=i),n=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:d(),new y(e,t,this.wot.getSetting("totalRows"),function(e){return l.wot.wtTable.getRowHeight(e)},a?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,a,n)},createColumnsCalculator:function(){var e,t,o=void 0!==arguments[0]&&arguments[0],n=this,r=this.getViewportWidth();if(this.columnHeaderHeight=NaN,e=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.leftOverlay.getTableParentOffset(),e<0&&(e=0),t=this.wot.getSetting("fixedColumnsLeft")){var i=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,t);e+=i,r-=i}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(r-=d()),new v(r,e,this.wot.getSetting("totalColumns"),function(e){return n.wot.wtTable.getColumnWidth(e)},o?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,o,this.wot.getSetting("stretchH"),function(e,t){return n.wot.getSetting("onBeforeStretchingColumnWidth",e,t)})},createRenderCalculators:function(){var e=void 0!==arguments[0]&&arguments[0];if(e){var t=this.createRowsCalculator(!0),o=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e},createVisibleCalculators:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)},areAllProposedVisibleRowsAlreadyRendered:function(e){return!!this.rowsVisibleCalculator&&(!(e.startRow0)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow0)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn=0;s--)if(null===e[s])e.splice(s,1);else{var a=e[s][0],l=u.propToCol(e[s][1]),c=p.getCellMeta(a,l);if("numeric"===c.type&&"string"==typeof e[s][3]&&e[s][3].length>0&&(/^-?[\d\s]*(\.|\,)?\d*$/.test(e[s][3])||c.format)){var d=e[s][3].length;I(c.language)?O.culture("en-US"):e[s][3].indexOf(".")===d-3&&-1===e[s][3].indexOf(",")?O.culture("en-US"):O.culture(c.language);O.cultureData(O.culture()).delimiters;O.validate(e[s][3])&&!isNaN(e[s][3])?e[s][3]=parseFloat(e[s][3]):e[s][3]=O().unformat(e[s][3])||e[s][3]}p.getCellValidator(c)&&(i.addValidatorToQueue(),p.validateCell(e[s][3],c,function(t,o){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");if(!1===n&&!1===o.allowInvalid){e.splice(t,1),o.valid=!0;var r=p.getCell(o.row,o.col);H(r,p.getSettings().invalidCellClassName),--t}i.removeValidatorFormQueue()}}(s,c),t))}i.checkIfQueueIsEmpty()}function r(e,t){var o=e.length-1;if(!(o<0)){for(;0<=o;o--){var n=!1;if(null!==e[o]){if(null!=e[o][2]||null!=e[o][3]){if(l.settings.allowInsertRow)for(;e[o][0]>p.countRows()-1;){var r=u.createRow(void 0,void 0,t);if(0===r){n=!0;break}}if(!n){if("array"===p.dataType&&(!l.settings.columns||0===l.settings.columns.length)&&l.settings.allowInsertColumn)for(;u.propToCol(e[o][1])>p.countCols()-1;)u.createCol(void 0,void 0,t);u.set(e[o][0],e[o][1],e[o][3])}}}else e.splice(o,1)}p.forceFullRender=!0,d.adjustRowsAndCols(),E.hooks.run(p,"beforeChangeRender",e,t),h.refreshBorders(null,!0),p.view.wt.wtOverlays.adjustElementsSize(),E.hooks.run(p,"afterChange",e,t||"edit");var i=p.getActiveEditor();i&&L(i.refreshValue)&&i.refreshValue()}}function i(e,t,o){return"object"==typeof e?e:[[e,t,o]]}function s(e){if(e.hasOwnProperty("type")){var t,o={};if("object"==typeof e.type)t=e.type;else if("string"==typeof e.type&&void 0===(t=E.cellTypes[e.type]))throw new Error('You declared cell type "'+e.type+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(o[n]=t[n]);return o}}function a(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var l,u,c,d,h,f,p=this,g=function(){},m=B(p),w=ue(p);U(g.prototype,fe.prototype),U(g.prototype,t),U(g.prototype,s(t)),this.rootElement=e,this.isHotTableEnv=D(this.rootElement),E.eventManager.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("DIV"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+te(),c=new re(p),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),l={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new g,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},d={alter:function(e,t,o,n,r){function i(e,t,o,n){var r=function(){var e;return"array"===n?e=[]:"object"===n&&(e={}),e},i=J(new Array(o),function(){return r()});i.unshift(t,0),e.splice.apply(e,i)}var s;switch(o=o||1,e){case"insert_row":var a=p.countSourceRows();if(p.getSettings().maxRows===a)return;t=L(t)?t:a,s=u.createRow(t,o,n),i(l.cellSettings,t,o,"array"),s&&(h.isSelected()&&l.selRange.from.row>=t?(l.selRange.from.row=l.selRange.from.row+s,h.transformEnd(s,0)):h.refreshBorders());break;case"insert_col":s=u.createCol(t,o,n);for(var c=0,f=p.countSourceRows();c=t?(l.selRange.from.col=l.selRange.from.col+s,h.transformEnd(0,s)):h.refreshBorders()}break;case"remove_row":u.removeRow(t,o,n),l.cellSettings.splice(t,o);var m=p.countRows(),v=p.getSettings().fixedRowsTop;v>=t+1&&(p.getSettings().fixedRowsTop-=Math.min(o,v-t));var y=p.getSettings().fixedRowsBottom;y&&t>=m-y&&(p.getSettings().fixedRowsBottom-=Math.min(o,y)),d.adjustRowsAndCols(),h.refreshBorders();break;case"remove_col":var b=w.toPhysicalColumn(t);u.removeCol(t,o,n);for(var C=0,_=p.countSourceRows();C<_;C++)l.cellSettings[C]&&l.cellSettings[C].splice(b,o);var R=p.getSettings().fixedColumnsLeft;R>=t+1&&(p.getSettings().fixedColumnsLeft-=Math.min(o,R-t)),Array.isArray(p.getSettings().colHeaders)&&(void 0===b&&(b=-1),p.getSettings().colHeaders.splice(b,o)),d.adjustRowsAndCols(),h.refreshBorders();break;default:throw new Error('There is no such action "'+e+'"')}r||d.adjustRowsAndCols()},adjustRowsAndCols:function(){if(l.settings.minRows){var e=p.countRows();if(ei-1?(c=i-1,a=!0,f>c&&(f=c)):f>i-1&&(f=i-1,a=!0,c>f&&(c=f)),d>s-1?(d=s-1,a=!0,g>d&&(g=d)):g>s-1&&(g=s-1,a=!0,d>g&&(d=g)),a&&p.selectCell(c,d,f,g)}p.view&&p.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,o,n,r,i,s){var a,u,c,d,h=[],f={};if(0===(u=t.length))return!1;var g,m,w,v;null===o||o.row,null===o||o.col;switch(r){case"shift_down":for(g=o?o.col-e.col+1:0,m=o?o.row-e.row+1:0,t=se(t),c=0,d=t.length,w=Math.max(d,g);co.row&&E>S||!l.settings.allowInsertRow&&f.row>p.countRows()-1||f.row>=l.settings.maxRows);a++){var O=a-C,T=M(O).length,k=o?o.col-e.col+1:0;if(d=o?k:Math.max(T,k),f.col=e.col,y=p.getCellMeta(f.row,f.col),"CopyPaste.paste"!==n&&"Autofill.autofill"!==n||!y.skipRowOnPaste){for(_=0,c=0;co.col&&k>T||!l.settings.allowInsertColumn&&f.col>p.countCols()-1||f.col>=l.settings.maxCols);c++)if(y=p.getCellMeta(f.row,f.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!y.skipColumnOnPaste)if(y.readOnly)f.col++;else{var x=c-_,D=M(O,x),H=p.getDataAtCell(f.row,f.col),A={row:O,col:x};if("Autofill.fill"===n){var P=p.runHooks("beforeAutofillInsidePopulate",A,i,t,s,{},b);P&&(D=I(P.value)?D:P.value)}if(null!==D&&"object"==typeof D)if(null===H||"object"!=typeof H)R=!1;else{var N=Y(H[0]||H),L=Y(D[0]||D);$(N,L)?D=z(D):R=!1}else null!==H&&"object"==typeof H&&(R=!1);R&&h.push([f.row,f.col,D]),R=!0,f.col++}else _++,f.col++,d++;f.row++}else C++,f.row++,u++}p.setDataAtCell(h,null,null,n||"populateFromArray")}}},this.selection=h={inProgress:!1,selectedHeader:{cols:!1,rows:!1},setSelectedHeaders:function(){var e=void 0!==arguments[0]&&arguments[0],t=void 0!==arguments[1]&&arguments[1],o=void 0!==arguments[2]&&arguments[2];p.selection.selectedHeader.rows=e,p.selection.selectedHeader.cols=t,p.selection.selectedHeader.corner=o},begin:function(){p.selection.inProgress=!0},finish:function(){var e=p.getSelected();E.hooks.run(p,"afterSelectionEnd",e[0],e[1],e[2],e[3]),E.hooks.run(p,"afterSelectionEndByProp",e[0],p.colToProp(e[1]),e[2],p.colToProp(e[3])),p.selection.inProgress=!1},isInProgress:function(){return p.selection.inProgress},setRangeStart:function(e,t){E.hooks.run(p,"beforeSetRangeStart",e),l.selRange=new de(e,e,e),h.setRangeEnd(e,null,t)},setRangeStartOnly:function(e){E.hooks.run(p,"beforeSetRangeStartOnly",e),l.selRange=new de(e,e,e)},setRangeEnd:function(e,t,o){if(null!==l.selRange){var n,r=!1,i=!0,s=p.view.wt.wtTable.getFirstVisibleRow(),a=p.view.wt.wtTable.getFirstVisibleColumn(),c={row:null,col:null};E.hooks.run(p,"beforeSetRangeEnd",e),p.selection.begin(),c.row=e.row<0?s:e.row,c.col=e.col<0?a:e.col,l.selRange.to=new ce(c.row,c.col),l.settings.multiSelect||(l.selRange.from=e),p.view.wt.selections.current.clear(),n=p.getCellMeta(l.selRange.highlight.row,l.selRange.highlight.col).disableVisualSelection,"string"==typeof n&&(n=[n]),(!1===n||Array.isArray(n)&&-1===n.indexOf("current"))&&p.view.wt.selections.current.add(l.selRange.highlight),p.view.wt.selections.area.clear(),(!1===n||Array.isArray(n)&&-1===n.indexOf("area"))&&h.isMultiple()&&(p.view.wt.selections.area.add(l.selRange.from),p.view.wt.selections.area.add(l.selRange.to)),(l.settings.currentHeaderClassName||l.settings.currentRowClassName||l.settings.currentColClassName)&&(p.view.wt.selections.highlight.clear(),p.view.wt.selections.highlight.add(l.selRange.from),p.view.wt.selections.highlight.add(l.selRange.to));var d=X("value");E.hooks.run(p,"afterSelection",l.selRange.from.row,l.selRange.from.col,l.selRange.to.row,l.selRange.to.col,d),E.hooks.run(p,"afterSelectionByProp",l.selRange.from.row,u.colToProp(l.selRange.from.col),l.selRange.to.row,u.colToProp(l.selRange.to.col),d),(0===l.selRange.from.row&&l.selRange.to.row===p.countRows()-1&&p.countRows()>1||0===l.selRange.from.col&&l.selRange.to.col===p.countCols()-1&&p.countCols()>1)&&(r=!0),(e.row<0||e.col<0)&&(i=!1),d.isTouched()&&(t=!d.value),!1!==t&&!r&&i&&(l.selRange.from&&!h.isMultiple()?p.view.scrollViewport(l.selRange.from):p.view.scrollViewport(e)),h.selectedHeader.rows&&h.selectedHeader.cols?k(p.rootElement,["ht__selection--rows","ht__selection--columns"]):h.selectedHeader.rows?(H(p.rootElement,"ht__selection--columns"),k(p.rootElement,"ht__selection--rows")):h.selectedHeader.cols?(H(p.rootElement,"ht__selection--rows"),k(p.rootElement,"ht__selection--columns")):H(p.rootElement,["ht__selection--rows","ht__selection--columns"]),h.refreshBorders(null,o)}},refreshBorders:function(e,t){t||f.destroyEditor(e),p.view.render(),h.isSelected()&&!t&&f.prepareEditor()},isMultiple:function(){var e=!(l.selRange.to.col===l.selRange.from.col&&l.selRange.to.row===l.selRange.from.row),t=E.hooks.run(p,"afterIsMultipleSelection",e);if(e)return t},transformStart:function(e,t,o,n){var r,i,s,a,u=new ce(e,t),c=0,d=0;p.runHooks("modifyTransformStart",u),r=p.countRows(),i=p.countCols(),a=p.getSettings().fixedRowsBottom,l.selRange.highlight.row+e>r-1?o&&l.settings.minSpareRows>0&&!(a&&l.selRange.highlight.row>=r-a-1)?(p.alter("insert_row",r),r=p.countRows()):l.settings.autoWrapCol&&(u.row=1-r,u.col=l.selRange.highlight.col+u.col==i-1?1-i:1):l.settings.autoWrapCol&&l.selRange.highlight.row+u.row<0&&l.selRange.highlight.col+u.col>=0&&(u.row=r-1,u.col=l.selRange.highlight.col+u.col==0?i-1:-1),l.selRange.highlight.col+u.col>i-1?o&&l.settings.minSpareCols>0?(p.alter("insert_col",i),i=p.countCols()):l.settings.autoWrapRow&&(u.row=l.selRange.highlight.row+u.row==r-1?1-r:1,u.col=1-i):l.settings.autoWrapRow&&l.selRange.highlight.col+u.col<0&&l.selRange.highlight.row+u.row>=0&&(u.row=l.selRange.highlight.row+u.row==0?r-1:-1,u.col=i-1),s=new ce(l.selRange.highlight.row+u.row,l.selRange.highlight.col+u.col),s.row<0?(c=-1,s.row=0):s.row>0&&s.row>=r&&(c=1,s.row=r-1),s.col<0?(d=-1,s.col=0):s.col>0&&s.col>=i&&(d=1,s.col=i-1),p.runHooks("afterModifyTransformStart",s,c,d),h.setRangeStart(s,n)},transformEnd:function(e,t){var o,n,r,i=new ce(e,t),s=0,a=0;p.runHooks("modifyTransformEnd",i),o=p.countRows(),n=p.countCols(),r=new ce(l.selRange.to.row+i.row,l.selRange.to.col+i.col),r.row<0?(s=-1,r.row=0):r.row>0&&r.row>=o&&(s=1,r.row=o-1),r.col<0?(a=-1,r.col=0):r.col>0&&r.col>=n&&(a=1,r.col=n-1),p.runHooks("afterModifyTransformEnd",r,s,a),h.setRangeEnd(r,!0)},isSelected:function(){return null!==l.selRange},inInSelection:function(e){return!!h.isSelected()&&l.selRange.includes(e)},deselect:function(){h.isSelected()&&(p.selection.inProgress=!1,l.selRange=null,p.view.wt.selections.current.clear(),p.view.wt.selections.area.clear(),(l.settings.currentHeaderClassName||l.settings.currentRowClassName||l.settings.currentColClassName)&&p.view.wt.selections.highlight.clear(),f.destroyEditor(),h.refreshBorders(),H(p.rootElement,["ht__selection--rows","ht__selection--columns"]),E.hooks.run(p,"afterDeselect"))},selectAll:function(){l.settings.multiSelect&&(h.setSelectedHeaders(!0,!0,!0),h.setRangeStart(new ce(0,0)),h.setRangeEnd(new ce(p.countRows()-1,p.countCols()-1),!1))},empty:function(){if(h.isSelected()){var e,t,o=l.selRange.getTopLeftCorner(),n=l.selRange.getBottomRightCorner(),r=[];for(e=o.row;e<=n.row;e++)for(t=o.col;t<=n.col;t++)p.getCellMeta(e,t).readOnly||r.push([e,t,""]);p.setDataAtCell(r)}}},this.init=function(){c.setData(l.settings.data),E.hooks.run(p,"beforeInit"),W()&&k(p.rootElement,"mobile"),this.updateSettings(l.settings,!0),this.view=new ne(this),f=new V(p,l,h,u),this.forceFullRender=!0,E.hooks.run(p,"init"),this.view.render(),"object"==typeof l.firstRun&&(E.hooks.run(p,"afterChange",l.firstRun[0],l.firstRun[1]),l.firstRun=!1),E.hooks.run(p,"afterInit")},this.validateCell=function(e,t,o,n){function r(e){var n=t.visualCol,r=t.visualRow,i=p.getCell(r,n,!0);i&&"TH"!=i.nodeName&&p.view.wt.wtSettings.settings.cellRenderer(r,n,i),o(e)}var i=p.getCellValidator(t);"[object RegExp]"===Object.prototype.toString.call(i)&&(i=function(e){return function(t,o){o(e.test(t))}}(i)),P(i)?(e=E.hooks.run(p,"beforeValidate",e,t.visualRow,t.prop,n),p._registerTimeout(setTimeout(function(){i.call(t,e,function(o){o=E.hooks.run(p,"afterValidate",o,e,t.visualRow,t.prop,n),t.valid=o,r(o),E.hooks.run(p,"postAfterValidate",o,e,t.visualRow,t.prop,n)})},0))):p._registerTimeout(setTimeout(function(){t.valid=!0,r(t.valid)},0))},this.setDataAtCell=function(e,t,o,s){var a,l,d,h=i(e,t,o),f=[];for(a=0,l=h.length;a-1?(P(e[o])||Array.isArray(e[o]))&&(e[o].initialHook=!0,p.addHook(o,e[o])):!t&&e.hasOwnProperty(o)&&(g.prototype[o]=e[o]));void 0===e.data&&void 0===l.settings.data?p.loadData(null):void 0!==e.data?p.loadData(e.data):void 0!==e.columns&&u.createMap(),r=p.countCols();var a=e.columns||g.prototype.columns;if(a&&P(a)&&(r=p.countSourceCols(),i=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(l.cellSettings.length=0),r>0){var c,f;for(o=0,n=0;o-1||b.indexOf("overflow")>-1)?p.rootElement.setAttribute("style",b):(p.rootElement.style.height="",p.rootElement.style.overflow="")}else void 0!==y&&(p.rootElement.style.height=y+"px",p.rootElement.style.overflow="hidden");if(void 0!==e.width){var C=e.width;P(C)&&(C=C()),p.rootElement.style.width=C+"px"}t||(u.clearLengthCache(),p.view&&p.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),E.hooks.run(p,"afterUpdateSettings")),d.adjustRowsAndCols(),p.view&&!l.firstRun&&(p.forceFullRender=!0,h.refreshBorders(null,!0)),t||!p.view||""!==v&&""!==y&&void 0!==y||v===y||p.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=p.getSelected();if(g.prototype.getValue){if(P(g.prototype.getValue))return g.prototype.getValue.call(p);if(e)return p.getData()[e[0]][g.prototype.getValue]}else if(e)return p.getDataAtCell(e[0],e[1])},this.getSettings=function(){return l.settings},this.clear=function(){h.selectAll(),
h.empty()},this.alter=function(e,t,o,n,r){d.alter(e,t,o,n,r)},this.getCell=function(e,t,o){return p.view.getCellAtCoords(new ce(e,t),o)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return u.colToProp(e)},this.propToCol=function(e){return u.propToCol(e)},this.toVisualRow=function(e){return w.toVisualRow(e)},this.toVisualColumn=function(e){return w.toVisualColumn(e)},this.toPhysicalRow=function(e){return w.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return w.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return u.get(e,u.colToProp(t))},this.getDataAtRowProp=function(e,t){return u.get(e,t)},this.getDataAtCol=function(e){var t=[];return t.concat.apply(t,u.getRange(new ce(0,e),new ce(l.settings.data.length-1,e),u.DESTINATION_RENDERER))},this.getDataAtProp=function(e){var t,o=[];return t=u.getRange(new ce(0,u.propToCol(e)),new ce(l.settings.data.length-1,u.propToCol(e)),u.DESTINATION_RENDERER),o.concat.apply(o,t)},this.getSourceData=function(e,t,o,n){return void 0===e?c.getData():c.getByRange(new ce(e,t),new ce(o,n))},this.getSourceDataArray=function(e,t,o,n){return void 0===e?c.getData(!0):c.getByRange(new ce(e,t),new ce(o,n),!0)},this.getSourceDataAtCol=function(e){return c.getAtColumn(e)},this.getSourceDataAtRow=function(e){return c.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return c.getAtCell(e,t)},this.getDataAtRow=function(e){return u.getRange(new ce(e,0),new ce(e,this.countCols()-1),u.DESTINATION_RENDERER)[0]},this.getDataType=function(e,t,o,n){var r=this,i=null,s=null;void 0===e&&(e=0,o=this.countRows(),t=0,n=this.countCols()),void 0===o&&(o=e),void 0===n&&(n=t);var a="mixed";return oe(Math.min(e,o),Math.max(e,o),function(e){var o=!0;return oe(Math.min(t,n),Math.max(t,n),function(t){var n=r.getCellMeta(e,t);return s=n.type,i?o=i===s:i=s,o}),a=o?s:"mixed",o}),a},this.removeCellMeta=function(e,t,o){void 0!=p.getCellMeta(e,t)[o]&&delete l.cellSettings[e][t][o]},this.spliceCellsMeta=function(e,t){for(var o,n=[],r=2;r=0;){for(var r=p.countCols()-1;r>=0;)t.addValidatorToQueue(),p.validateCell(p.getDataAtCell(n,r),p.getCellMeta(n,r),function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(t.valid=!1),t.removeValidatorFormQueue()},"validateCells"),r--;n--}t.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=l.settings.rowHeaders;return void 0!==e&&(e=E.hooks.run(p,"modifyRowHeader",e)),void 0===e?(t=[],oe(p.countRows()-1,function(e){t.push(p.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[e]?t=t[e]:P(t)?t=t(e):t&&"string"!=typeof t&&"number"!=typeof t&&(t=e+1),t},this.hasRowHeaders=function(){return!!l.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==l.settings.colHeaders&&null!==l.settings.colHeaders)return!!l.settings.colHeaders;for(var e=0,t=p.countCols();e=0;){if(t=E.hooks.run(this,"modifyRow",o),p.isEmptyRow(t))n++;else if(e)break;o--}return n},this.countEmptyCols=function(e){if(p.countRows()<1)return 0;for(var t=p.countCols()-1,o=0;t>=0;){if(p.isEmptyCol(t))o++;else if(e)break;t--}return o},this.isEmptyRow=function(e){return l.settings.isEmptyRow.call(p,e)},this.isEmptyCol=function(e){return l.settings.isEmptyCol.call(p,e)},this.selectCell=function(e,t,o,n,r,i){var s;if(i=I(i)||!0===i,"number"!=typeof e||e<0||e>=p.countRows())return!1;if("number"!=typeof t||t<0||t>=p.countCols())return!1;if(L(o)){if("number"!=typeof o||o<0||o>=p.countRows())return!1;if("number"!=typeof n||n<0||n>=p.countCols())return!1}return s=new ce(e,t),l.selRange=new de(s,s,s),i&&p.listen(),I(o)?h.setRangeEnd(l.selRange.from,r):h.setRangeEnd(new ce(o,n),r),p.selection.finish(),!0},this.selectCellByProp=function(e,t,o,n,r){return arguments[1]=u.propToCol(arguments[1]),L(arguments[3])&&(arguments[3]=u.propToCol(arguments[3])),p.selectCell.apply(p,arguments)},this.deselectCell=function(){h.deselect()},this.scrollViewportTo=function(e,t){var o=void 0!==arguments[2]&&arguments[2],n=void 0!==arguments[3]&&arguments[3];if(void 0!==e&&(e<0||e>=p.countRows()))return!1;if(void 0!==t&&(t<0||t>=p.countCols()))return!1;var r=!1;return void 0!==e&&void 0!==t&&(p.view.wt.wtOverlays.topOverlay.scrollTo(e,o),p.view.wt.wtOverlays.leftOverlay.scrollTo(t,n),r=!0),"number"==typeof e&&"number"!=typeof t&&(p.view.wt.wtOverlays.topOverlay.scrollTo(e,o),r=!0),"number"==typeof t&&"number"!=typeof e&&(p.view.wt.wtOverlays.leftOverlay.scrollTo(t,n),r=!0),r},this.destroy=function(){p._clearTimeouts(),p.view&&p.view.destroy(),c&&c.destroy(),c=null,x(p.rootElement),m.destroy(),E.hooks.run(p,"afterDestroy"),E.hooks.destroy(p);for(var e in p)p.hasOwnProperty(e)&&(P(p[e])?p[e]=a:"guid"!==e&&(p[e]=null));u&&u.destroy(),u=null,l=null,d=null,h=null,f=null,p=null,g=null},this.getActiveEditor=function(){return f.getActiveEditor()},this.getPlugin=function(e){return Q(this,e)},this.getInstance=function(){return p},this.addHook=function(e,t){E.hooks.add(e,t,p)},this.hasHook=function(e){return E.hooks.has(e,p)},this.addHookOnce=function(e,t){E.hooks.once(e,t,p)},this.removeHook=function(e,t){E.hooks.remove(e,t,p)},this.runHooks=function(e,t,o,n,r,i,s){return E.hooks.run(p,e,t,o,n,r,i,s)},this.timeouts=[],this._registerTimeout=function(e){this.timeouts.push(e)},this._clearTimeouts=function(){for(var e=0,t=this.timeouts.length;e0?s:this.instance.countSourceCols(),i=!0),e=0;e=this.instance.countSourceRows())&&(e=this.instance.countSourceRows()),f.hooks.run(this.instance,"beforeCreateRow",e,t,o),r=e;for(var a=this.instance.getSettings().maxRows;s=this.instance.countCols())&&(e=this.instance.countCols()),f.hooks.run(this.instance,"beforeCreateCol",e,t,o),r=e;for(var l=this.instance.getSettings().maxCols;a=this.instance.countCols()){if(i>0)for(var u=0;u-1){var i=t.split("."),s=o;if(!s)return null;for(var a=0,l=i.length;a-1){for(var a=t.split("."),l=r,u=0,c=a.length-1;uo[2]&&(n=o[0],o[0]=o[2],o[2]=n),o[1]>o[3]&&(n=o[1],o[1]=o[3],o[3]=n)):o=[this.row,this.col,null,null],this.instance.populateFromArray(o[0],o[1],e,o[2],o[3],"edit")},n.prototype.beginEditing=function(e,t){this.state==a.EditorState.VIRGIN&&(this.instance.view.scrollViewport(new u(this.row,this.col)),this.instance.view.render(),this.state=a.EditorState.EDITING,e="string"==typeof e?e:this.originalValue,this.setValue(l(e)),this.open(t),this._opened=!0,this.focus(),this.instance.view.render(),this.instance.runHooks("afterBeginEditing",this.row,this.col))},n.prototype.finishEditing=function(e,t,o){var n,r=this;if(o){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),o(e),r.instance.view.render()}}if(!this.isWaiting()){if(this.state==a.EditorState.VIRGIN)return void this.instance._registerTimeout(setTimeout(function(){r._fireCallbacks(!0)},0));if(this.state==a.EditorState.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();var s=this.getValue();n=this.instance.getSettings().trimWhitespace?[["string"==typeof s?String.prototype.trim.call(s||""):s]]:[[s]],this.state=a.EditorState.WAITING,this.saveValue(n,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=a.EditorState.FINISHED,r.discardEditor(e)}):(this.state=a.EditorState.FINISHED,this.discardEditor(!0))}}},n.prototype.cancelChanges=function(){this.state=a.EditorState.FINISHED,this.discardEditor()},n.prototype.discardEditor=function(e){this.state===a.EditorState.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=a.EditorState.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=a.EditorState.VIRGIN,this._fireCallbacks(!0)))},n.prototype.enableFullEditMode=function(){this._fullEditMode=!0},n.prototype.isInFullEditMode=function(){return this._fullEditMode},n.prototype.isOpened=function(){return this._opened},n.prototype.isWaiting=function(){return this.state===a.EditorState.WAITING},n.prototype.checkEditorSection=function(){var e=this.instance.countRows(),t="";return this.row=e-this.instance.getSettings().fixedRowsBottom?t=this.col"+l+"")),e.innerHTML=i},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize").widths;return n[t]&&(e=n[t]),o?e:e+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=_()+2+"px",H&&(H=!1),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value)},0))},D.prototype.close=function(){x.prototype.close.apply(this,arguments)},D.prototype.queryChoices=function(e){var t=this;this.query=e;var o=this.cellProperties,n=o.source,r=(o.filter,o.filteringCaseSensitive,o.allowHtml),i=function(e){return v(e,function(e){return g(e)})};"function"==typeof n?n.call(this.cellProperties,e,function(e){t.updateChoicesList(r?e:i(e))}):Array.isArray(n)?this.updateChoicesList(r?n:i(n)):this.updateChoicesList([])},D.prototype.updateChoicesList=function(e){var t=C(this.TEXTAREA),o=R(this.TEXTAREA),n=this.cellProperties.sortByRelevance,r=this.cellProperties.filter,i=null,s=null;n&&(i=D.sortByRelevance(this.getValue(),e,this.cellProperties.filteringCaseSensitive));var a=Array.isArray(i)?i.length:0;if(!1===r)a&&(s=i[0]);else{for(var l=[],u=0,c=e.length;ul&&a>l;return u?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(u?a:l,o),u},D.prototype.limitDropdownIfNeeded=function(e,t){if(t>e){var o=0,n=0,r=0,i=null;do{r=this.htEditor.getRowHeight(n)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=r,n++}while(ot.charsLeft?1:0:void 0}),s=0,c=a.length;s=t?t*e:this.choices.length*e+8},D.prototype.allowKeyEventPropagation=function(e){var t={row:this.htEditor.getSelectedRange()?this.htEditor.getSelectedRange().from.row:-1},o=!1;return e===h.ARROW_DOWN&&t.row>0&&t.row-1&&(o=!0),o},D.prototype.discardEditor=function(e){x.prototype.discardEditor.apply(this,arguments),this.instance.view.render()},k("autocomplete",D)},{editors:30,handsontableEditor:36,"helpers/array":43,"helpers/dom/element":47,"helpers/mixed":51,"helpers/string":55,"helpers/unicode":56}],33:[function(e,t,o){"use strict";Object.defineProperties(o,{CheckboxEditor:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=((n=e("editors"))&&n.__esModule&&n||{default:n}).registerEditor,a=((r=e("_baseEditor"))&&r.__esModule&&r||{default:r}).BaseEditor,l=((i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i}).hasClass,u=function(){$traceurRuntime.superConstructor(c).apply(this,arguments)},c=u;$traceurRuntime.createClass(u,{beginEditing:function(e,t){if(void 0===t){var o=this.TD.querySelector('input[type="checkbox"]');l(o,"htBadValue")||o.click()}},finishEditing:function(){},init:function(){},open:function(){},close:function(){},getValue:function(){},setValue:function(){},focus:function(){}},{},a),s("checkbox",u)},{_baseEditor:31,editors:30,"helpers/dom/element":47}],34:[function(e,t,o){"use strict";Object.defineProperties(o,{DateEditor:{get:function(){return E}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,p=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},g=p.addClass,m=p.outerHeight,w=((i=e("helpers/object"))&&i.__esModule&&i||{default:i}).deepExtend,v=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).EventManager,y=(a=e("editors"))&&a.__esModule&&a||{default:a},b=(y.getEditor,y.registerEditor),C=((l=e("helpers/unicode"))&&l.__esModule&&l||{default:l}).isMetaKey,_=((u=e("helpers/dom/event"))&&u.__esModule&&u||{default:u}).stopPropagation,R=((c=e("textEditor"))&&c.__esModule&&c||{default:c}).TextEditor,M=((d=e("moment"))&&d.__esModule&&d||{default:d}).default,S=((h=e("pikaday"))&&h.__esModule&&h||{default:h}).default,E=function(e){this.$datePicker=null,this.datePicker=null,this.datePickerStyle=null,this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,$traceurRuntime.superConstructor(O).call(this,e)},O=E;$traceurRuntime.createClass(E,{init:function(){var e=this;if("function"!=typeof M)throw new Error("You need to include moment.js to your project.");if("function"!=typeof S)throw new Error("You need to include Pikaday to your project.");$traceurRuntime.superGet(this,O.prototype,"init").call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})},createElements:function(){$traceurRuntime.superGet(this,O.prototype,"createElements").call(this),this.datePicker=document.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,g(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new S(this.getDatePickerConfig()),new v(this).addEventListener(this.datePicker,"mousedown",function(e){return _(e)}),this.hideDatepicker()},destroyElements:function(){this.$datePicker.destroy()},prepare:function(e,t,o,n,r,i){this._opened=!1,$traceurRuntime.superGet(this,O.prototype,"prepare").call(this,e,t,o,n,r,i)},open:function(){var e=void 0!==arguments[0]?arguments[0]:null;$traceurRuntime.superGet(this,O.prototype,"open").call(this),this.showDatepicker(e)},close:function(){var e=this;this._opened=!1,this.instance._registerTimeout(setTimeout(function(){e.instance.selection.refreshBorders()},0)),$traceurRuntime.superGet(this,O.prototype,"close").call(this)},finishEditing:function(){var e=void 0!==arguments[0]&&arguments[0],t=void 0!==arguments[1]&&arguments[1];if(e){var o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),$traceurRuntime.superGet(this,O.prototype,"finishEditing").call(this,e,t)},showDatepicker:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,o=this.TD.getBoundingClientRect(),n=this.cellProperties.dateFormat||this.defaultDateFormat,r=this.$datePicker.config(),i=this.instance.view.isMouseDown(),s=!!e&&C(e.keyCode);this.datePickerStyle.top=window.pageYOffset+o.top+m(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+o.left+"px",this.$datePicker._onInputFocus=function(){},r.format=n,this.originalValue?(t=this.originalValue,M(t,n,!0).isValid()&&this.$datePicker.setMoment(M(t,n),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||i||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,r.defaultDate=t,M(t,n,!0).isValid()&&this.$datePicker.setMoment(M(t,n),!0),s||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()},hideDatepicker:function(){this.datePickerStyle.display="none",this.$datePicker.hide()},getDatePickerConfig:function(){var e=this,t=this.TEXTAREA,o={};this.cellProperties&&this.cellProperties.datePickerConfig&&w(o,this.cellProperties.datePickerConfig);var n=o.onSelect,r=o.onClose;return o.field=t,o.trigger=t,o.container=this.datePicker,o.bound=!1,o.format=o.format||this.defaultDateFormat,o.reposition=o.reposition||!1,o.onSelect=function(t){isNaN(t.getTime())||(t=M(t).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(t),e.hideDatepicker(),n&&n()},o.onClose=function(){e.parentDestroyed||e.finishEditing(!1),r&&r()},o}},{},R),f.editors=f.editors||{},f.editors.DateEditor=E,b("date",E)},{browser:24,editors:30,eventManager:42,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/object":53,"helpers/unicode":56,moment:"moment",pikaday:"pikaday",textEditor:41}],35:[function(e,t,o){"use strict";Object.defineProperties(o,{DropdownEditor:{get:function(){return c}},__esModule:{value:!0}});var n,r,i,s=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,a=(r=e("editors"))&&r.__esModule&&r||{default:r},l=(a.getEditor,a.registerEditor),u=(a.getEditorConstructor,((i=e("autocompleteEditor"))&&i.__esModule&&i||{default:i}).AutocompleteEditor),c=function(){$traceurRuntime.superConstructor(d).apply(this,arguments)},d=c;$traceurRuntime.createClass(c,{prepare:function(e,t,o,n,r,i){$traceurRuntime.superGet(this,d.prototype,"prepare").call(this,e,t,o,n,r,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}},{},u),s.hooks.add("beforeValidate",function(e,t,o,n){var r=this.getCellMeta(t,this.propToCol(o));r.editor===s.editors.DropdownEditor&&void 0===r.strict&&(r.filter=!1,r.strict=!0)}),l("dropdown",c)},{autocompleteEditor:32,browser:24,editors:30}],36:[function(e,t,o){"use strict";Object.defineProperties(o,{HandsontableEditor:{get:function(){return b}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,d=((r=e("helpers/unicode"))&&r.__esModule&&r||{default:r}).KEY_CODES,h=((i=e("helpers/object"))&&i.__esModule&&i||{default:i}).extend,f=((s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s}).setCaretPosition,p=(a=e("helpers/dom/event"))&&a.__esModule&&a||{default:a},g=p.stopImmediatePropagation,m=p.isImmediatePropagationStopped,w=(l=e("editors"))&&l.__esModule&&l||{default:l},v=(w.getEditor,w.registerEditor),y=((u=e("textEditor"))&&u.__esModule&&u||{default:u}).TextEditor,b=y.prototype.extend();b.prototype.createElements=function(){y.prototype.createElements.apply(this,arguments);var e=document.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()},b.prototype.prepare=function(e,t,o,n,r,i){y.prototype.prepare.apply(this,arguments);var s=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,afterOnCellMouseDown:function(){var e=this.getValue();void 0!==e&&s.setValue(e),s.instance.destroyEditor()}};this.cellProperties.handsontable&&h(a,i.handsontable),this.htOptions=a};var C=function(e){if(!m(e)){var t,o=this.getActiveEditor(),n=o.htEditor.getInstance();if(e.keyCode==d.ARROW_DOWN)if(n.getSelected()||n.flipped){if(n.getSelected())if(n.flipped)t=n.getSelected()[0]+1;else if(!n.flipped){var r=n.getSelected()[0],i=n.countRows()-1;t=Math.min(i,r+1)}}else t=0;else if(e.keyCode==d.ARROW_UP)if(!n.getSelected()&&n.flipped)t=n.countRows()-1;else if(n.getSelected())if(n.flipped){var r=n.getSelected()[0];t=Math.max(0,r-1)}else{var r=n.getSelected()[0];t=r-1}void 0!==t&&(t<0||n.flipped&&t>n.countRows()-1?n.deselectCell():n.selectCell(t,0),n.getData().length&&(e.preventDefault(),g(e),o.instance.listen(),o.TEXTAREA.focus()))}};b.prototype.open=function(){this.instance.addHook("beforeKeyDown",C),y.prototype.open.apply(this,arguments),this.htEditor&&this.htEditor.destroy(),this.htEditor=new c(this.htContainer,this.htOptions),this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.TEXTAREA.style.visibility="hidden"):(this.htEditor.deselectCell(),this.TEXTAREA.style.visibility="visible"),f(this.TEXTAREA,0,this.TEXTAREA.value.length)},b.prototype.close=function(){this.instance.removeHook("beforeKeyDown",C),this.instance.listen(),y.prototype.close.apply(this,arguments)},b.prototype.focus=function(){this.instance.listen(),y.prototype.focus.apply(this,arguments)},b.prototype.beginEditing=function(e){var t=this.instance.getSettings().onBeginEditing;t&&!1===t()||y.prototype.beginEditing.apply(this,arguments)},b.prototype.finishEditing=function(e,t){if(this.htEditor&&this.htEditor.isListening()&&this.instance.listen(),this.htEditor&&this.htEditor.getSelected()){var o=this.htEditor.getInstance().getValue();void 0!==o&&this.setValue(o)}return y.prototype.finishEditing.apply(this,arguments)},b.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})},v("handsontable",b)},{browser:24,editors:30,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/object":53,"helpers/unicode":56,textEditor:41}],37:[function(e,t,o){"use strict";Object.defineProperties(o,{MobileTextEditor:{get:function(){return k}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=(((n=e("browser"))&&n.__esModule&&n||{default:n}).default,((r=e("helpers/unicode"))&&r.__esModule&&r||{default:r}).KEY_CODES),d=(i=e("helpers/dom/event"))&&i.__esModule&&i||{default:i},h=d.stopImmediatePropagation,f=d.isImmediatePropagationStopped,p=(s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s},g=p.addClass,m=p.getScrollLeft,w=p.getScrollTop,v=p.hasClass,y=p.isChildOf,b=p.offset,C=p.outerHeight,_=p.outerWidth,R=p.removeClass,M=p.setCaretPosition,S=(a=e("editors"))&&a.__esModule&&a||{default:a},E=(S.getEditor,S.registerEditor),O=((l=e("_baseEditor"))&&l.__esModule&&l||{default:l}).BaseEditor,T=((u=e("eventManager"))&&u.__esModule&&u||{default:u}).eventManager,k=O.prototype.extend(),x={},D=function(){this.controls={},this.controls.leftButton=document.createElement("DIV"),this.controls.leftButton.className="leftButton",this.controls.rightButton=document.createElement("DIV"),this.controls.rightButton.className="rightButton",this.controls.upButton=document.createElement("DIV"),this.controls.upButton.className="upButton",this.controls.downButton=document.createElement("DIV"),this.controls.downButton.className="downButton";for(var e in this.controls)this.controls.hasOwnProperty(e)&&this.positionControls.appendChild(this.controls[e])};k.prototype.valueChanged=function(){return this.initValue!=this.getValue()},k.prototype.init=function(){var e=this;this.eventManager=T(this.instance),this.createElements(),this.bindEvents(),this.instance.addHook("afterDestroy",function(){e.destroy()})},k.prototype.getValue=function(){return this.TEXTAREA.value},k.prototype.setValue=function(e){this.initValue=e,this.TEXTAREA.value=e},k.prototype.createElements=function(){this.editorContainer=document.createElement("DIV"),this.editorContainer.className="htMobileEditorContainer",this.cellPointer=document.createElement("DIV"),this.cellPointer.className="cellPointer",this.moveHandle=document.createElement("DIV"),this.moveHandle.className="moveHandle",this.inputPane=document.createElement("DIV"),this.inputPane.className="inputs",this.positionControls=document.createElement("DIV"),this.positionControls.className="positionControls",this.TEXTAREA=document.createElement("TEXTAREA"),g(this.TEXTAREA,"handsontableInput"),this.inputPane.appendChild(this.TEXTAREA),this.editorContainer.appendChild(this.cellPointer),this.editorContainer.appendChild(this.moveHandle),this.editorContainer.appendChild(this.inputPane),this.editorContainer.appendChild(this.positionControls),D.call(this),document.body.appendChild(this.editorContainer)},k.prototype.onBeforeKeyDown=function(e){var t=this,o=t.getActiveEditor();if(e.target===o.TEXTAREA&&!f(e))switch(e.keyCode){case c.ENTER:o.close(),e.preventDefault();break;case c.BACKSPACE:h(e)}},k.prototype.open=function(){this.instance.addHook("beforeKeyDown",this.onBeforeKeyDown),g(this.editorContainer,"active"),R(this.cellPointer,"hidden"),this.updateEditorPosition()},k.prototype.focus=function(){this.TEXTAREA.focus(),M(this.TEXTAREA,this.TEXTAREA.value.length)},k.prototype.close=function(){this.TEXTAREA.blur(),this.instance.removeHook("beforeKeyDown",this.onBeforeKeyDown),R(this.editorContainer,"active")},k.prototype.scrollToView=function(){var e=this.instance.getSelectedRange().highlight;this.instance.view.scrollViewport(e)},k.prototype.hideCellPointer=function(){v(this.cellPointer,"hidden")||g(this.cellPointer,"hidden")},k.prototype.updateEditorPosition=function(e,t){if(e&&t)e=parseInt(e,10),t=parseInt(t,10),this.editorContainer.style.top=t+"px",this.editorContainer.style.left=e+"px";else{var o=this.instance.getSelected(),n=this.instance.getCell(o[0],o[1]);if(x.cellPointer||(x.cellPointer={height:C(this.cellPointer),width:_(this.cellPointer)}),x.editorContainer||(x.editorContainer={width:_(this.editorContainer)}),void 0!==n){var r=this.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer==window?0:m(this.instance.view.wt.wtOverlays.leftOverlay.holder),i=this.instance.view.wt.wtOverlays.topOverlay.trimmingContainer==window?0:w(this.instance.view.wt.wtOverlays.topOverlay.holder),s=b(n),a=_(n),l={x:r,y:i};this.editorContainer.style.top=parseInt(s.top+C(n)-l.y+x.cellPointer.height,10)+"px",this.editorContainer.style.left=parseInt(window.innerWidth/2-x.editorContainer.width/2,10)+"px",s.left+a/2>parseInt(this.editorContainer.style.left,10)+x.editorContainer.width?this.editorContainer.style.left=window.innerWidth-x.editorContainer.width+"px":s.left+a/2=0&&(o.select[n].selected=!0),C(e),e.preventDefault();break;case _.ARROW_DOWN:var r=o.select.selectedIndex+1;r<=o.select.length-1&&(o.select[r].selected=!0),C(e),e.preventDefault()}};E.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",O)},E.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",O)},E.prototype.focus=function(){this.select.focus()},E.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},E.prototype.refreshDimensions=function(){if(this.state===u.EditorState.EDITING){if(this.TD=this.getEditedCell(),!this.TD)return void this.close();var e,t=y(this.TD)+1,o=v(this.TD)+1,n=w(this.TD),r=w(this.instance.rootElement),i=m(this.TD),s=n.top-r.top-1-(i.scrollTop||0),a=n.left-r.left-1-(i.scrollLeft||0),l=this.checkEditorSection(),c=this.instance.getSettings();c.rowHeaders,c.colHeaders;switch(l){case"top":e=g(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=g(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=g(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=g(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=g(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelected()[0]&&(s+=1),0===this.instance.getSelected()[1]&&(a+=1);var d=this.select.style;e&&-1!=e?d[e[0]]=e[1]:b(this.select);var h=p(this.TD);parseInt(h.borderTopWidth,10)>0&&(o-=1),parseInt(h.borderLeftWidth,10)>0&&(t-=1),d.height=o+"px",d.minWidth=t+"px",d.top=s+"px",d.left=a+"px",d.margin="0px"}},E.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!=e&&-2!=e?e:void 0},M("select",E)},{_baseEditor:31,browser:24,editors:30,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/unicode":56}],41:[function(e,t,o){"use strict";Object.defineProperties(o,{TextEditor:{get:function(){return N}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,h=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},f=h.addClass,p=h.getCaretPosition,g=h.getComputedStyle,m=h.getCssTransform,w=h.getScrollableElement,v=h.getScrollbarWidth,y=h.innerWidth,b=h.offset,C=h.resetCssTransform,_=h.setCaretPosition,R=h.hasVerticalScrollbar,M=h.hasHorizontalScrollbar,S=((i=e("autoResize"))&&i.__esModule&&i||{default:i}).default,E=((s=e("_baseEditor"))&&s.__esModule&&s||{default:s}).BaseEditor,O=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).eventManager,T=(l=e("editors"))&&l.__esModule&&l||{default:l},k=(T.getEditor,T.registerEditor),x=((u=e("helpers/unicode"))&&u.__esModule&&u||{default:u}).KEY_CODES,D=(c=e("helpers/dom/event"))&&c.__esModule&&c||{default:c},H=D.stopPropagation,A=D.stopImmediatePropagation,P=D.isImmediatePropagationStopped,N=E.prototype.extend();N.prototype.init=function(){var e=this;this.createElements(),this.eventManager=O(this),this.bindEvents(),this.autoResize=S(),this.instance.addHook("afterDestroy",function(){e.destroy()})},N.prototype.getValue=function(){return this.TEXTAREA.value},N.prototype.setValue=function(e){this.TEXTAREA.value=e};var L=function(e){var t,o=this,n=o.getActiveEditor();if(t=(e.ctrlKey||e.metaKey)&&!e.altKey,e.target===n.TEXTAREA&&!P(e)){if(17===e.keyCode||224===e.keyCode||91===e.keyCode||93===e.keyCode)return void A(e);switch(e.keyCode){case x.ARROW_RIGHT:case x.ARROW_LEFT:n.isInFullEditMode()&&(!n.isWaiting()&&!n.allowKeyEventPropagation||!n.isWaiting()&&n.allowKeyEventPropagation&&!n.allowKeyEventPropagation(e.keyCode))&&A(e);break;case x.ARROW_UP:case x.ARROW_DOWN:n.isInFullEditMode()&&(!n.isWaiting()&&!n.allowKeyEventPropagation||!n.isWaiting()&&n.allowKeyEventPropagation&&!n.allowKeyEventPropagation(e.keyCode))&&A(e);break;case x.ENTER:var r=n.instance.getSelected(),i=!(r[0]===r[2]&&r[1]===r[3]);if(t&&!i||e.altKey){if(n.isOpened()){var s=p(n.TEXTAREA),a=n.getValue(),l=a.slice(0,s)+"\n"+a.slice(s);n.setValue(l),_(n.TEXTAREA,s+1)}else n.beginEditing(n.originalValue+"\n");A(e)}e.preventDefault();break;case x.A:case x.X:case x.C:case x.V:t&&A(e);break;case x.BACKSPACE:case x.DELETE:case x.HOME:case x.END:A(e)}-1===[x.ARROW_UP,x.ARROW_RIGHT,x.ARROW_DOWN,x.ARROW_LEFT].indexOf(e.keyCode)&&n.autoResize.resize(String.fromCharCode(e.keyCode))}};N.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",L)},N.prototype.close=function(e){this.textareaParentStyle.display="none",this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook("beforeKeyDown",L)},N.prototype.focus=function(){this.TEXTAREA.focus(),_(this.TEXTAREA,this.TEXTAREA.value.length)},N.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),f(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),f(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.top=0,this.textareaParentStyle.left=0,this.textareaParentStyle.display="none",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);var e=this;this.instance._registerTimeout(setTimeout(function(){e.refreshDimensions()},0))},N.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=101;break;case"top-left-corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"bottom-left-corner":e=this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;case"bottom":e=this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.textareaParentStyle.zIndex=""}return-1!=e&&-2!=e?e:void 0},N.prototype.refreshValue=function(){var e=this.instance.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()},N.prototype.refreshDimensions=function(){if(this.state===d.EditorState.EDITING){if(this.TD=this.getEditedCell(),!this.TD)return void this.close(!0);var e,t=b(this.TD),o=b(this.instance.rootElement),n=w(this.TD),r=this.instance.countRows(),i=t.top===o.top?0:1,s=t.top-o.top-i-(n.scrollTop||0),a=t.left-o.left-1-(n.scrollLeft||0),l=this.instance.getSettings(),u=(this.instance.hasRowHeaders(),this.instance.hasColHeaders()),c=this.checkEditorSection(),h=this.TD.style.backgroundColor;switch(c){case"top":e=m(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=m(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=m(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=m(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=m(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(u&&0===this.instance.getSelected()[0]||l.fixedRowsBottom&&this.instance.getSelected()[0]===r-l.fixedRowsBottom)&&(s+=1),0===this.instance.getSelected()[1]&&(a+=1),e&&-1!=e?this.textareaParentStyle[e[0]]=e[1]:C(this.TEXTAREA_PARENT),this.textareaParentStyle.top=s+"px",this.textareaParentStyle.left=a+"px";var f=this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition,p=this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition,_=this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),S=this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),E=v(),O=this.TD.offsetTop+f-S,T=this.TD.offsetLeft+p-_,k=y(this.TD)-8,x=R(n)?E:0,D=M(n)?E:0,H=this.instance.view.maximumVisibleElementWidth(T)-9-x,A=this.TD.scrollHeight+1,P=Math.max(this.instance.view.maximumVisibleElementHeight(O)-D,23),N=g(this.TD);this.TEXTAREA.style.fontSize=N.fontSize,this.TEXTAREA.style.fontFamily=N.fontFamily,this.TEXTAREA.style.backgroundColor="",this.TEXTAREA.style.backgroundColor=h||g(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(A,P),maxHeight:P,minWidth:Math.min(k,H),maxWidth:H},!0),this.textareaParentStyle.display="block"}},N.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){H(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){H(e)}),this.instance.addHook("afterScrollHorizontally",function(){e.refreshDimensions()}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.destroy()})},N.prototype.destroy=function(){this.eventManager.destroy()},k("text",N)},{_baseEditor:31,autoResize:"autoResize",browser:24,editors:30,eventManager:42,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/unicode":56}],42:[function(e,t,o){"use strict";function n(e,t){var o,n,r,i,s,a;if(t.isTargetWebComponent=!1,t.realTarget=t.target,a=t.stopImmediatePropagation,t.stopImmediatePropagation=function(){a.apply(this),p(this)},!u.eventManager.isHotTableEnv)return t;for(t=d(t),s=t.path?t.path.length:0;s--;){if("HOT-TABLE"===t.path[s].nodeName)o=!0;else if(o&&t.path[s].shadowRoot){i=t.path[s];break}0!==s||i||(i=t.path[s])}return i||(i=t.target),t.isTargetWebComponent=!0,f()?t.realTarget=t.srcElement||t.toElement:(e instanceof u.Core||e instanceof Walkontable)&&(e instanceof u.Core?n=e.view?e.view.wt.wtTable.TABLE:null:e instanceof Walkontable&&(n=e.wtTable.TABLE.parentNode.parentNode),r=h(t.target,["HOT-TABLE"],n),t.realTarget=r?n.querySelector("HOT-TABLE")||t.target:t.target),Object.defineProperty(t,"target",{get:function(){return d(i)},enumerable:!0,configurable:!0}),t}function r(e){return new g(e)}Object.defineProperties(o,{EventManager:{get:function(){return g}},eventManager:{get:function(){return r}},__esModule:{value:!0}});var i,s,a,l,u=((i=e("browser"))&&i.__esModule&&i||{default:i}).default,c=(s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s},d=c.polymerWrap,h=c.closest,f=((a=e("helpers/feature"))&&a.__esModule&&a||{default:a}).isWebComponentSupportedNatively,p=((l=e("helpers/dom/event"))&&l.__esModule&&l||{default:l}).stopImmediatePropagation,g=function(){var e=void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])};$traceurRuntime.createClass(g,{addEventListener:function(e,t,o){function r(e){e=n(s,e),o.call(this,e)}var i=this,s=this.context;return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:r}),window.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r),u.countEventManagerListeners++,function(){i.removeEventListener(e,t,o)}},removeEventListener:function(e,t,o){for(var n,r=this.context.eventListeners.length;r--;)if(n=this.context.eventListeners[r],n.event==t&&n.element==e){if(o&&o!=n.callback)continue;this.context.eventListeners.splice(r,1),n.element.removeEventListener?n.element.removeEventListener(n.event,n.callbackProxy,!1):n.element.detachEvent("on"+n.event,n.callbackProxy),u.countEventManagerListeners--}},clearEvents:function(){if(this.context)for(var e=this.context.eventListeners.length;e--;){var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}},clear:function(){this.clearEvents()},destroy:function(){this.clearEvents(),this.context=null},fireEvent:function(e,t){var o,n={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};document.createEvent?(o=document.createEvent("MouseEvents"),o.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode)):o=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+t,o)}},{}),u.countEventManagerListeners=0,u.eventManager=r},{browser:24,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/feature":49}],43:[function(e,t,o){"use strict";function n(e){for(var t=0,o=e.length;tt?e:t},Array.isArray(e)?e[0]:void 0)}function h(e){return s(e,function(e,t){return e>>0;if(0===r)return!1;for(var i=0|o,s=Math.max(i>=0?i:r-Math.abs(i),0);s0;)t=(o-1)%g,n=String.fromCharCode(65+t)+n,o=parseInt((o-t)/g,10);return n}function r(e){var t=0;if(e)for(var o=0,n=e.length-1;o-1||t.indexOf(e)>-1))return e;e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode}return null}function i(e,t,o){for(var n=[];e&&(e=r(e,t,o))&&(!o||o.contains(e));)n.push(e),e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode;var i=n.length;return i?n[i-1]:null}function s(e,t){var o=e.parentNode,n=[];for("string"==typeof t?n=Array.prototype.slice.call(document.querySelectorAll(t),0):n.push(t);null!=o;){if(n.indexOf(o)>-1)return!0;o=o.parentNode}return!1}function a(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===n.toUpperCase()}var o,n="hot-table",r=!1;for(o=l(e);null!=o;){if(t(o)){r=!0;break}if(o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(o.host))break;o=o.host}o=o.parentNode}return r}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function u(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function c(e){var t=0;if(e.previousSibling)for(;e=e.previousSibling;)++t;return t}function d(e,t){var o=document.querySelector(".ht_clone_"+e);return o?o.contains(t):null}function h(e){var t=0,o=[];if(!e||!e.length)return o;for(;e[t];)o.push(e[t]),t++;return o}function f(e,t){return Z(e,t)}function p(e,t){return J(e,t)}function g(e,t){return Q(e,t)}function m(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var o=e.childNodes,n=o.length-1;n>=0;n--)m(o[n],e)}function w(e){for(var t;t=e.lastChild;)e.removeChild(t)}function v(e,t){ue.test(t)?e.innerHTML=t:y(e,t)}function y(e,t){var o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?ce?o.textContent=t:o.data=t:(w(e),e.appendChild(document.createTextNode(t)))}function b(e){for(var t=e;u(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return b(t.host.impl);if(t.host)return b(t.host);throw new Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function C(e){var t,o,n,r,i;if(r=document.documentElement,re()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return i=e.getBoundingClientRect(),{top:i.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:i.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)};for(t=e.offsetLeft,o=e.offsetTop,n=e;(e=e.offsetParent)&&e!==document.body;)t+=e.offsetLeft,o+=e.offsetTop,n=e;return n&&"fixed"===n.style.position&&(t+=window.pageXOffset||r.scrollLeft,o+=window.pageYOffset||r.scrollTop),{left:t,top:o}}function _(){var e=window.scrollY;return void 0===e&&(e=document.documentElement.scrollTop),e}function R(){var e=window.scrollX;return void 0===e&&(e=document.documentElement.scrollLeft),e}function M(e){return e===window?_():e.scrollTop}function S(e){return e===window?R():e.scrollLeft}function E(e){for(var t,o,n,r=e.parentNode,i=["auto","scroll"],s="",a="",l="",u="";r&&r.style&&document.body!==r;){if(t=r.style.overflow,o=r.style.overflowX,n=r.style.overflowY,"scroll"==t||"scroll"==o||"scroll"==n)return r;if(window.getComputedStyle&&(s=window.getComputedStyle(r),a=s.getPropertyValue("overflow"),l=s.getPropertyValue("overflow-y"),u=s.getPropertyValue("overflow-x"),"scroll"===a||"scroll"===u||"scroll"===l))return r;if(r.clientHeight<=r.scrollHeight&&(-1!==i.indexOf(n)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(l)))return r;if(r.clientWidth<=r.scrollWidth&&(-1!==i.indexOf(o)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(u)))return r;r=r.parentNode}return window}function O(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var o=window.getComputedStyle(t);if("visible"!==o.getPropertyValue("overflow")&&""!==o.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function T(e,t){if(e){if(e!==window){var o,n=e.style[t];return""!==n&&void 0!==n?n:(o=k(e),""!==o[t]&&void 0!==o[t]?o[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function k(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function x(e){return e.offsetWidth}function D(e){return re()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function H(e){return e.clientHeight||e.innerHeight}function A(e){return e.clientWidth||e.innerWidth}function P(e,t,o){window.addEventListener?e.addEventListener(t,o,!1):e.attachEvent("on"+t,o)}function N(e,t,o){window.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent("on"+t,o)}function L(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var o=e.createTextRange(),n=o.duplicate();return o.moveToBookmark(t.getBookmark()),n.setEndPoint("EndToStart",o),n.text.length}return 0}function I(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;return e.createTextRange().text.indexOf(t.text)+t.text.length}}function W(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}function j(e,t,o){if(void 0===o&&(o=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(i){var n=e.parentNode,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",o),i.moveStart("character",t),i.select()}}function V(){var e=document.createElement("div");e.style.height="200px",e.style.width="100%";var t=document.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;return o==n&&(n=t.clientWidth),(document.body||document.documentElement).removeChild(t),o-n}function B(){return void 0===le&&(le=V()),le}function F(e){return e.offsetWidth!==e.clientWidth}function z(e){return e.offsetHeight!==e.clientHeight}function Y(e,t,o){te()||oe()?(e.style.top=o,e.style.left=t):ne()?e.style["-webkit-transform"]="translate3d("+t+","+o+",0)":e.style.transform="translate3d("+t+","+o+",0)"}function U(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function G(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function $(e){var t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function K(e){return $(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}Object.defineProperties(o,{getParent:{get:function(){return n}},closest:{get:function(){return r}},closestDown:{get:function(){return i}},isChildOf:{get:function(){return s}},isChildOfWebComponentTable:{get:function(){return a}},polymerWrap:{get:function(){return l}},polymerUnwrap:{get:function(){return u}},index:{get:function(){return c}},overlayContainsElement:{get:function(){return d}},hasClass:{get:function(){return f}},addClass:{get:function(){return p}},removeClass:{get:function(){return g}},removeTextNodes:{get:function(){return m}},empty:{get:function(){return w}},HTML_CHARACTERS:{get:function(){return ue}},fastInnerHTML:{get:function(){return v}},fastInnerText:{get:function(){return y}},isVisible:{get:function(){return b}},offset:{get:function(){return C}},getWindowScrollTop:{get:function(){return _}},getWindowScrollLeft:{get:function(){return R}},getScrollTop:{get:function(){return M}},getScrollLeft:{get:function(){return S}},getScrollableElement:{get:function(){return E}},getTrimmingContainer:{get:function(){return O}},getStyle:{get:function(){return T}},getComputedStyle:{get:function(){return k}},outerWidth:{get:function(){return x}},outerHeight:{get:function(){return D}},innerHeight:{get:function(){return H}},innerWidth:{get:function(){return A}},addEvent:{get:function(){return P}},removeEvent:{get:function(){return N}},getCaretPosition:{get:function(){return L}},getSelectionEndPosition:{get:function(){return I}},getSelectionText:{get:function(){return W}},setCaretPosition:{get:function(){return j}},getScrollbarWidth:{get:function(){return B}},hasVerticalScrollbar:{get:function(){return F}},hasHorizontalScrollbar:{get:function(){return z}},setOverlayPosition:{get:function(){return Y}},getCssTransform:{get:function(){return U}},resetCssTransform:{get:function(){return G}},isInput:{get:function(){return $}},isOutsideInput:{get:function(){return K}},__esModule:{value:!0}});var X,q,Z,J,Q,ee=(X=e("../browser"))&&X.__esModule&&X||{default:X},te=ee.isIE8,oe=ee.isIE9,ne=ee.isSafari,re=((q=e("../feature"))&&q.__esModule&&q||{default:q}).hasCaptionProblem,ie=!!document.documentElement.classList;if(ie){var se=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();Z=function(e,t){return""!==t&&e.classList.contains(t)},J=function(e,t){var o=0;if("string"==typeof t&&(t=t.split(" ")),t=h(t),se)e.classList.add.apply(e.classList,t);else for(;t&&t[o];)e.classList.add(t[o]),o++},Q=function(e,t){var o=0;if("string"==typeof t&&(t=t.split(" ")),t=h(t),se)e.classList.remove.apply(e.classList,t);else for(;t&&t[o];)e.classList.remove(t[o]),o++}}else{var ae=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};Z=function(e,t){return!!e.className.match(ae(t))},J=function(e,t){var o=0,n=e.className;if("string"==typeof t&&(t=t.split(" ")),""===n)n=t.join(" ");else for(;t&&t[o];)ae(t[o]).test(n)||(n+=" "+t[o]),o++;e.className=n},Q=function(e,t){var o=0,n=e.className;for("string"==typeof t&&(t=t.split(" "));t&&t[o];)n=n.replace(ae(t[o])," ").trim(),o++;e.className!==n&&(e.className=n)}}var le,ue=/(<(.*)>|&(.*);)/,ce=!!document.createTextNode("test").textContent},{"../browser":44,"../feature":49}],48:[function(e,t,o){"use strict";function n(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function r(e){return!1===e.isImmediatePropagationEnabled}function i(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function s(e){return e.pageX?e.pageX:e.clientX+f()}function a(e){return e.pageY?e.pageY:e.clientY+h()}function l(e){return 2===e.button}function u(e){return 0===e.button}Object.defineProperties(o,{stopImmediatePropagation:{get:function(){return n}},isImmediatePropagationStopped:{get:function(){return r}},stopPropagation:{get:function(){return i}},pageX:{get:function(){return s}},pageY:{get:function(){return a}},isRightClick:{get:function(){return l}},isLeftClick:{get:function(){return u}},__esModule:{value:!0}});var c,d=(c=e("element"))&&c.__esModule&&c||{default:c},h=d.getWindowScrollTop,f=d.getWindowScrollLeft},{element:47}],49:[function(e,t,o){"use strict";function n(e){return h.call(window,e)}function r(e){f.call(window,e)}function i(){return"ontouchstart"in window}function s(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))}function a(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="t
t";var o=document.createElement("CAPTION");o.innerHTML="c
c
c
c",o.style.padding=0,o.style.margin=0,e.insertBefore(o,t),document.body.appendChild(e),g=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function l(){return void 0===g&&a(),g}function u(e){var t=void 0!==arguments[1]?arguments[1]:{};return m||(m="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return(e+"").localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}Object.defineProperties(o,{requestAnimationFrame:{get:function(){return n}},cancelAnimationFrame:{get:function(){return r}},isTouchSupported:{get:function(){return i}},isWebComponentSupportedNatively:{get:function(){return s}},hasCaptionProblem:{get:function(){return l}},getComparisonFunction:{get:function(){return u}},__esModule:{value:!0}});for(var c=0,d=["ms","moz","webkit","o"],h=window.requestAnimationFrame,f=window.cancelAnimationFrame,p=0;p=o?e.apply(this,s):t(s)}}var o=e.length;return t([])}function d(e){function t(n){return function(){for(var r=[],i=0;i=o?e.apply(this,s):t(s)}}var o=e.length;return t([])}Object.defineProperties(o,{isFunction:{get:function(){return n}},proxy:{get:function(){return r}},throttle:{get:function(){return i}},throttleAfterHits:{get:function(){return s}},debounce:{get:function(){return a}},pipe:{get:function(){return l}},partial:{get:function(){return u}},curry:{get:function(){return c}},curryRight:{get:function(){return d}},__esModule:{value:!0}});var h,f=((h=e("array"))&&h.__esModule&&h||{default:h}).arrayReduce},{array:43}],51:[function(e,t,o){"use strict";function n(e){switch(typeof e){case"string":case"number":return e+"";case"object":return null===e?"":e.toString();case"undefined":return"";default:return e.toString()}}function r(e){return void 0!==e}function i(e){return void 0===e}function s(e){return null===e||""===e||i(e)}Object.defineProperties(o,{stringify:{get:function(){return n}},isDefined:{get:function(){return r}},isUndefined:{get:function(){return i}},isEmpty:{get:function(){return s}},__esModule:{value:!0}})},{}],52:[function(e,t,o){"use strict";function n(e){var t=typeof e;return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?!!e.length&&(1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}function r(e,t,o){var n=-1;for("function"==typeof t?(o=t,t=e):n=e-1;++n<=t&&!1!==o(n););}function i(e,t,o){var n=e+1;for("function"==typeof t&&(o=t,t=0);--n>=t&&!1!==o(n););}function s(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100)}Object.defineProperties(o,{isNumeric:{get:function(){return n}},rangeEach:{get:function(){return r}},rangeEachReverse:{get:function(){return i}},valueAccordingPercent:{get:function(){return s}},__esModule:{value:!0}})},{}],53:[function(e,t,o){"use strict";function n(e){var t;return Array.isArray(e)?t=[]:(t={},p(e,function(e,o){"__children"!==o&&(e&&"object"==typeof e&&!Array.isArray(e)?t[o]=n(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?t[o]=[n(e[0])]:t[o]=[]:t[o]=null)})),t}function r(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function i(e,t){return p(t,function(t,o){e[o]=t}),e}function s(e,t){p(t,function(o,n){t[n]&&"object"==typeof t[n]?(e[n]||(Array.isArray(t[n])?e[n]=[]:"[object Date]"===Object.prototype.toString.call(t[n])?e[n]=t[n]:e[n]={}),s(e[n],t[n])):e[n]=t[n]})}function a(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function l(e){var t={};return p(e,function(e,o){t[o]=e}),t}function u(e){for(var t=[],o=1;o=t)return e;o=String(o),o.length||(o=" ");var n=t-e.length,r=Math.ceil(n/o.length),i="";return g(r,function(e){i+=o}),(i=i.slice(0,n))+e}function d(e){return e+="",e.replace(m,"")}Object.defineProperties(o,{toUpperCaseFirst:{get:function(){return n}},startsWith:{get:function(){return r}},endsWith:{get:function(){return i}},equalsIgnoreCase:{get:function(){return s}},randomString:{get:function(){return a}},isPercentValue:{get:function(){return l}},substitute:{get:function(){return u}},padStart:{get:function(){return c}},stripTags:{get:function(){return d}},__esModule:{value:!0}});var h,f,p=((h=e("mixed"))&&h.__esModule&&h||{default:h}).stringify,g=((f=e("number"))&&f.__esModule&&f||{default:f}).rangeEach,m=/<\/?\w+\/?>|<\w+[\s|\/][^>]*>/gi},{mixed:51,number:52}],56:[function(e,t,o){"use strict";function n(e){return 32==e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function r(e){return-1!==[u.ARROW_DOWN,u.ARROW_UP,u.ARROW_LEFT,u.ARROW_RIGHT,u.HOME,u.END,u.DELETE,u.BACKSPACE,u.F1,u.F2,u.F3,u.F4,u.F5,u.F6,u.F7,u.F8,u.F9,u.F10,u.F11,u.F12,u.TAB,u.PAGE_DOWN,u.PAGE_UP,u.ENTER,u.ESCAPE,u.SHIFT,u.CAPS_LOCK,u.ALT].indexOf(e)}function i(e){return-1!==[u.CONTROL_LEFT,224,u.COMMAND_LEFT,u.COMMAND_RIGHT].indexOf(e)}function s(e,t){var o=t.split("|"),n=!1;return l(o,function(t){if(e===u[t])return n=!0,!1}),n}Object.defineProperties(o,{KEY_CODES:{get:function(){return u}},isPrintableChar:{get:function(){return n}},isMetaKey:{get:function(){return r}},isCtrlKey:{get:function(){return i}},isKey:{get:function(){return s}},__esModule:{value:!0}});var a,l=((a=e("array"))&&a.__esModule&&a||{default:a}).arrayEach,u={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},{array:43}],57:[function(e,t,o){"use strict";Object.defineProperties(o,{arrayMapper:{get:function(){return p}},__esModule:{value:!0}});var n,r,i,s,a=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,l=(r=e("helpers/array"))&&r.__esModule&&r||{default:r},u=(l.arrayEach,l.arrayReduce),c=l.arrayMap,d=l.arrayMax,h=((i=e("helpers/object"))&&i.__esModule&&i||{default:i}).defineGetter,f=((s=e("helpers/number"))&&s.__esModule&&s||{default:s}).rangeEach,p={_arrayMap:[],getValueByIndex:function(e){var t;return void 0===(t=this._arrayMap[e])?null:t},getIndexByValue:function(e){var t;return-1===(t=this._arrayMap.indexOf(e))?null:t},insertItems:function(e){var t=void 0!==arguments[1]?arguments[1]:1,o=this,n=d(this._arrayMap)+1,r=[];return f(t-1,function(t){r.push(o._arrayMap.splice(e+t,0,n+t))}),r},removeItems:function(e){var t=void 0!==arguments[1]?arguments[1]:1,o=this,n=[];if(Array.isArray(e)){var r=[].concat(this._arrayMap);e.sort(function(e,t){return t-e}),n=u(e,function(e,t){return o._arrayMap.splice(t,1),e.concat(r.slice(t,t+1))},[])}else n=this._arrayMap.splice(e,t);return n},unshiftItems:function(e){function t(e){return u(n,function(t,o){return e>o&&t++,t},0)}var o=void 0!==arguments[1]?arguments[1]:1,n=this.removeItems(e,o);this._arrayMap=c(this._arrayMap,function(e,o){var n=t(e);return n&&(e-=n),e})},shiftItems:function(e){var t=void 0!==arguments[1]?arguments[1]:1,o=this;this._arrayMap=c(this._arrayMap,function(o){return o>=e&&(o+=t),o}),f(t-1,function(t){o._arrayMap.splice(e+t,0,e+t)})},clearMap:function(){this._arrayMap.length=0}};h(p,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1}),a.utils.arrayMapper=p},{browser:24,"helpers/array":43,"helpers/number":52,"helpers/object":53}],58:[function(e,t,o){"use strict";Object.defineProperties(o,{localHooks:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,a=((r=e("helpers/array"))&&r.__esModule&&r||{default:r}).arrayEach,l=((i=e("helpers/object"))&&i.__esModule&&i||{default:i}).defineGetter,u={_localHooks:Object.create(null),addLocalHook:function(e,t){this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t)},runLocalHooks:function(e){for(var t=[],o=1;o=0&&(t.skip=!0,!0)},has:function(e){var t=void 0!==arguments[1]?arguments[1]:null,o=this.getBucket(t);return!(void 0===o[e]||!o[e].length)},run:function(e,t,o,n,r,i,s,a){var l=this.globalBucket[t],u=-1,c=l?l.length:0;if(c)for(;++u=0},getRegistered:function(){return i}},{})},{"helpers/array":43,"helpers/object":53}],61:[function(e,t,o){"use strict";function n(e,t){e=h(e),c.plugins[e]=t,c.hooks.add("construct",function(){var o;f.has(this)||f.set(this,{}),o=f.get(this),o[e]||(o[e]=new t(this))}),c.hooks.add("afterDestroy",function(){if(f.has(this)){var e=f.get(this);d(e,function(e){return e.destroy()}),f.delete(this)}})}function r(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var o=h(t);if(f.has(e)&&f.get(e)[o])return f.get(e)[o]}function i(e){return f.has(e)?Object.keys(f.get(e)):[]}function s(e,t){var o=null;return f.has(e)&&d(f.get(e),function(e,n){e===t&&(o=n)}),o}Object.defineProperties(o,{registerPlugin:{get:function(){return n}},getPlugin:{get:function(){return r}},getRegistredPluginNames:{get:function(){return i}},getPluginName:{get:function(){return s}},__esModule:{value:!0}});var a,l,u,c=((a=e("browser"))&&a.__esModule&&a||{default:a}).default,d=((l=e("helpers/object"))&&l.__esModule&&l||{default:l}).objectEach,h=((u=e("helpers/string"))&&u.__esModule&&u||{default:u}).toUpperCaseFirst,f=new WeakMap},{browser:24,"helpers/object":53,"helpers/string":55}],62:[function(e,t,o){"use strict";Object.defineProperties(o,{default:{get:function(){return C}},__esModule:{value:!0}});var n,r,i,s,a,l=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,u=(r=e("helpers/object"))&&r.__esModule&&r||{default:r},c=u.defineGetter,d=u.objectEach,h=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,f=(s=e("utils/recordTranslator"))&&s.__esModule&&s||{default:s},p=(f.registerIdentity,f.getTranslator),g=(a=e("plugins"))&&a.__esModule&&a||{default:a},m=g.getRegistredPluginNames,w=g.getPluginName,v=new WeakMap,y=null,b=function(e){var t=this;c(this,"hot",e,{writable:!1}),c(this,"t",p(e),{writable:!1}),v.set(this,{hooks:{}}),y=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",function(){return t.onAfterPluginsInitialized()}),this.hot.addHook("afterUpdateSettings",function(){return t.onUpdateSettings()}),this.hot.addHook("beforeInit",function(){return t.init()})};$traceurRuntime.createClass(b,{init:function(){this.pluginName=w(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),y||(y=m(this.hot)),y.indexOf(this.pluginName)>=0&&y.splice(y.indexOf(this.pluginName),1),y.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0},enablePlugin:function(){this.enabled=!0},disablePlugin:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1},addHook:function(e,t){var o=v.get(this).hooks[e]=v.get(this).hooks[e]||[];this.hot.addHook(e,t),o.push(t),v.get(this).hooks[e]=o},removeHooks:function(e){var t=this;h(v.get(this).hooks[e]||[],function(o){t.hot.removeHook(e,o)})},clearHooks:function(){var e=this,t=v.get(this).hooks;d(t,function(t,o){return e.removeHooks(o)}),t.length=0},callOnPluginsReady:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)},onAfterPluginsInitialized:function(){h(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0},onUpdateSettings:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())},updatePlugin:function(){},destroy:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),d(this,function(t,o){"hot"!==o&&"t"!==o&&(e[o]=null)}),delete this.t,delete this.hot}},{});var C=b;l.plugins.BasePlugin=b},{browser:24,"helpers/array":43,"helpers/object":53,plugins:61,"utils/recordTranslator":130}],63:[function(e,t,o){"use strict";Object.defineProperties(o,{AutoColumnSize:{get:function(){return N}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f,p=((n=e("_base"))&&n.__esModule&&n||{default:n}).default,g=(r=e("helpers/array"))&&r.__esModule&&r||{default:r},m=g.arrayEach,w=g.arrayFilter,v=g.arrayReduce,y=g.arrayMap,b=(i=e("helpers/feature"))&&i.__esModule&&i||{default:i},C=b.cancelAnimationFrame,_=b.requestAnimationFrame,R=((s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s}).isVisible,M=((a=e("utils/ghostTable"))&&a.__esModule&&a||{default:a}).GhostTable,S=(l=e("helpers/object"))&&l.__esModule&&l||{default:l},E=S.isObject,O=(S.objectEach,(u=e("helpers/number"))&&u.__esModule&&u||{default:u}),T=O.valueAccordingPercent,k=O.rangeEach,x=((c=e("plugins"))&&c.__esModule&&c||{default:c}).registerPlugin,D=((d=e("utils/samplesGenerator"))&&d.__esModule&&d||{default:d}).SamplesGenerator,H=((h=e("helpers/string"))&&h.__esModule&&h||{default:h}).isPercentValue,A=((f=e("3rdparty/walkontable/src/calculator/viewportColumns"))&&f.__esModule&&f||{default:f}).WalkontableViewportColumnsCalculator,P=new WeakMap,N=function(e){var t=this;$traceurRuntime.superConstructor(L).call(this,e),P.set(this,{cachedColumnHeaders:[]}),this.widths=[],this.ghostTable=new M(this.hot),this.samplesGenerator=new D(function(e,o){return t.hot.getDataAtCell(e,o)}),this.firstCalculation=!0,this.inProgress=!1,this.addHook("beforeColumnResize",function(e,o,n){return t.onBeforeColumnResize(e,o,n)})},L=N;$traceurRuntime.createClass(N,{isEnabled:function(){return!1!==this.hot.getSettings().autoColumnSize&&!this.hot.getSettings().colWidths},enablePlugin:function(){var e=this;if(!this.enabled){var t=this.hot.getSettings().autoColumnSize;t&&null!=t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("modifyColWidth",function(t,o){return e.getColumnWidth(o,t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),$traceurRuntime.superGet(this,L.prototype,"enablePlugin").call(this)}},updatePlugin:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),$traceurRuntime.superGet(this,L.prototype,"updatePlugin").call(this)},disablePlugin:function(){$traceurRuntime.superGet(this,L.prototype,"disablePlugin").call(this)},calculateColumnsWidth:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=void 0!==arguments[2]&&arguments[2],n=this;"number"==typeof e&&(e={from:e,to:e}),"number"==typeof t&&(t={from:t,to:t}),k(e.from,e.to,function(e){if(o||void 0===n.widths[e]&&!n.hot._getColWidthFromSettings(e)){n.samplesGenerator.generateColumnSamples(e,t).forEach(function(e,t){return n.ghostTable.addColumn(t,e)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(e,t){return n.widths[e]=t}),this.ghostTable.clean())},calculateAllColumnsWidth:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=this,o=0,n=this.hot.countCols()-1,r=null;this.inProgress=!0;var i=function(){if(!t.hot)return C(r),void(t.inProgress=!1);t.calculateColumnsWidth({from:o,to:Math.min(o+L.CALCULATION_STEP,n)},e),o=o+L.CALCULATION_STEP+1,o>=0),Math.min(e,t)},getColumnWidth:function(e){var t=arguments[1],o=void 0===arguments[2]||arguments[2],n=t;return void 0===n&&(n=this.widths[e],o&&"number"==typeof n&&(n=Math.max(n,A.DEFAULT_WIDTH))),n},getFirstVisibleColumn:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1},getLastVisibleColumn:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1},findColumnsWhereHeaderWasChanged:function(){var e=this.hot.getColHeader(),t=P.get(this).cachedColumnHeaders;return v(e,function(e,o,n){var r=t.length;return(r-1=0?t.hot.getDataAtCell(e,o):-1===e?t.hot.getColHeader(o):null}),this.firstCalculation=!0,this.inProgress=!1,this.addHook("beforeRowResize",function(e,o,n){return t.onBeforeRowResize(e,o,n)})},x=k;$traceurRuntime.createClass(k,{isEnabled:function(){return!0===this.hot.getSettings().autoRowSize||_(this.hot.getSettings().autoRowSize)},enablePlugin:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeColumnMove",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return e.clearCache()}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("beforeRowMove",function(t,o){return e.onBeforeRowMove(t,o)}),this.addHook("modifyRowHeight",function(t,o){return e.getRowHeight(o,t)}),this.addHook("modifyColumnHeaderHeight",function(){return e.getColumnHeaderHeight()}),$traceurRuntime.superGet(this,x.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,x.prototype,"disablePlugin").call(this)},calculateRowsHeight:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=void 0!==arguments[2]&&arguments[2],n=this;if("number"==typeof e&&(e={from:e,to:e}),"number"==typeof t&&(t={from:t,to:t}),null!==this.hot.getColHeader(0)){var r=this.samplesGenerator.generateRowSamples(-1,t);this.ghostTable.addColumnHeadersRow(r.get(-1))}S(e.from,e.to,function(e){if(o||void 0===n.heights[e]){n.samplesGenerator.generateRowSamples(e,t).forEach(function(e,t){return n.ghostTable.addRow(t,e)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(e,t){return n.heights[e]=t}),this.ghostTable.clean())}, calculateAllRowsHeight:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=this,o=0,n=this.hot.countRows()-1,r=null;this.inProgress=!0;var i=function(){if(!t.hot)return w(r),void(t.inProgress=!1);t.calculateRowsHeight({from:o,to:Math.min(o+x.CALCULATION_STEP,n)},e),o=o+x.CALCULATION_STEP+1,o>=0),Math.min(e,t)},getRowHeight:function(e){var t=arguments[1],o=t;return void 0!==this.heights[e]&&this.heights[e]>(t||0)&&(o=this.heights[e]),o},getColumnHeaderHeight:function(){return this.heights[-1]},getFirstVisibleRow:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1},getLastVisibleRow:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1},clearCache:function(){this.heights.length=0,this.heights[-1]=void 0},clearCacheByRange:function(e){var t=this;"number"==typeof e&&(e={from:e,to:e}),S(Math.min(e.from,e.to),Math.max(e.from,e.to),function(e){return t.heights[e]=void 0})},isNeedRecalculate:function(){return!!g(this.heights,function(e){return void 0===e}).length},onBeforeRender:function(){var e=this.hot.renderCall;this.calculateRowsHeight({from:this.getFirstVisibleRow(),to:this.getLastVisibleRow()},void 0,e);var t=this.hot.getSettings().fixedRowsBottom;if(t){var o=this.hot.countRows()-1;this.calculateRowsHeight({from:o-t,to:o})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()},onBeforeRowMove:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()},onBeforeRowResize:function(e,t,o){return o&&(this.calculateRowsHeight(e,void 0,!0),t=this.getRowHeight(e)),t},onAfterLoadData:function(){var e=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){e.hot&&e.recalculateAllRowsHeight()},0)},onBeforeChange:function(e){var t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,x.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 500}},f),E("autoRowSize",k)},{_base:62,"helpers/array":43,"helpers/dom/element":47,"helpers/feature":49,"helpers/number":52,"helpers/object":53,"helpers/string":55,plugins:61,"utils/ghostTable":128,"utils/samplesGenerator":131}],65:[function(e,t,o){"use strict";Object.defineProperties(o,{Autofill:{get:function(){return E}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=((n=e("_base"))&&n.__esModule&&n||{default:n}).default,h=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,f=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayIncludes,p=(s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s},g=p.offset,m=p.outerHeight,w=p.outerWidth,v=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).eventManager,y=((l=e("plugins"))&&l.__esModule&&l||{default:l}).registerPlugin,b=((u=e("3rdparty/walkontable/src/cell/coords"))&&u.__esModule&&u||{default:u}).WalkontableCellCoords,C=(c=e("utils"))&&c.__esModule&&c||{default:c},_=C.getDeltas,R=C.getDragDirectionAndRange,M=C.DIRECTIONS,S=C.getMappedFillHandleSetting,E=function(e){$traceurRuntime.superConstructor(O).call(this,e),this.eventManager=v(this),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1},O=E;$traceurRuntime.createClass(E,{isEnabled:function(){return this.hot.getSettings().fillHandle},enablePlugin:function(){var e=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",function(t){return e.onAfterCellCornerMouseDown(t)}),this.addHook("afterOnCellCornerDblClick",function(t){return e.onCellCornerDblClick(t)}),this.addHook("beforeOnCellMouseOver",function(t,o,n){return e.onBeforeCellMouseOver(o)}),$traceurRuntime.superGet(this,O.prototype,"enablePlugin").call(this))},updatePlugin:function(){this.disablePlugin(),this.enablePlugin(),$traceurRuntime.superGet(this,O.prototype,"updatePlugin").call(this)},disablePlugin:function(){this.clearMappedSettings(),$traceurRuntime.superGet(this,O.prototype,"disablePlugin").call(this)},getSelectionData:function(){var e={from:this.hot.getSelectedRange().from,to:this.hot.getSelectedRange().to};return this.hot.getData(e.from.row,e.from.col,e.to.row,e.to.col)},fillIn:function(){if(this.hot.view.wt.selections.fill.isEmpty())return!1;var e=this.hot.view.wt.selections.fill.getCorners();this.resetSelectionOfDraggedArea();var t=this.getCornersOfSelectedCells(),o=R(t,e),n=o.directionOfDrag,r=o.startOfDragCoords,i=o.endOfDragCoords;if(this.hot.runHooks("modifyAutofillRange",t,e),r&&r.row>-1&&r.col>-1){var s=this.getSelectionData(),a=_(r,i,s,n);this.hot.runHooks("beforeAutofill",r,i,s),this.hot.populateFromArray(r.row,r.col,s,i.row,i.col,this.pluginName+".fill",null,n,a),this.setSelection(e)}else this.hot.selection.refreshBorders();return!0},reduceSelectionAreaIfNeeded:function(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e},getCoordsOfDragAndDropBorders:function(e){var t,o=this.hot.getSelectedRange().getTopLeftCorner(),n=this.hot.getSelectedRange().getBottomRightCorner();if(f(this.directions,M.vertical)&&(n.rowe.row))t=new b(e.row,n.col);else{if(!f(this.directions,M.horizontal))return;t=new b(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(t)},showBorder:function(e){var t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)},addRow:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.alter("insert_row",void 0,1,e.pluginName+".fill"),e.addingStarted=!1},200))},addNewRowIfNeeded:function(){if(this.hot.view.wt.selections.fill.cellRange&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelected(),t=this.hot.view.wt.selections.fill.getCorners(),o=this.hot.countRows();e[2]t&&e.clientX<=o},registerEvents:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()}),this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)})},onCellCornerDblClick:function(){this.selectAdjacent()&&this.fillIn()},onAfterCellCornerMouseDown:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0},onBeforeCellMouseOver:function(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells++,this.showBorder(e),this.addNewRowIfNeeded())},onMouseUp:function(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)},onMouseMove:function(e){var t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()},clearMappedSettings:function(){this.directions.length=0,this.autoInsertRow=!1},mapSettings:function(){var e=S(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow},destroy:function(){$traceurRuntime.superGet(this,O.prototype,"destroy").call(this)}},{},d),y("autofill",E),h.hooks.register("modifyAutofillRange"),h.hooks.register("beforeAutofill")},{"3rdparty/walkontable/src/cell/coords":6,_base:62,browser:24,eventManager:42,"helpers/array":43,"helpers/dom/element":47,plugins:61,utils:66}],66:[function(e,t,o){"use strict";function n(e,t,o,n){var r=o.length,i=o?o[0].length:0,s=[],a=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(n)){for(var u=[],c=0;c<=l;c++){var d=parseInt(o[0][c],10),h=parseInt(o[r-1][c],10),f=("down"===n?h-d:d-h)/(r-1)||0;u.push(f)}s.push(u)}if(-1!==["right","left"].indexOf(n))for(var p=0;p<=a;p++){var g=parseInt(o[p][0],10),m=parseInt(o[p][i-1],10),w=("right"===n?m-g:g-m)/(i-1)||0;s.push([w])}return s}function r(e,t){var o,n,r;return t[0]===e[0]&&t[1]e[3]?(r="right",o=new WalkontableCellCoords(t[0],e[3]+1),n=new WalkontableCellCoords(t[2],t[3])):t[0]e[2]&&t[1]===e[1]&&(r="down",o=new WalkontableCellCoords(e[2]+1,t[1]),n=new WalkontableCellCoords(t[2],t[3])),{directionOfDrag:r,startOfDragCoords:o,endOfDragCoords:n}}function i(e){var t={};return!0===e?(t.directions=Object.keys(c),t.autoInsertRow=!0):l(e)?(u(e.autoInsertRow)?e.direction===c.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,u(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(c)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}Object.defineProperties(o,{DIRECTIONS:{get:function(){return c}},getDeltas:{get:function(){return n}},getDragDirectionAndRange:{get:function(){return r}},getMappedFillHandleSetting:{get:function(){return i}},__esModule:{value:!0}});var s,a,l=((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).isObject,u=((a=e("helpers/mixed"))&&a.__esModule&&a||{default:a}).isDefined,c={horizontal:"horizontal",vertical:"vertical"}},{"helpers/mixed":51,"helpers/object":53}],67:[function(e,t,o){"use strict";Object.defineProperties(o,{ColumnSorting:{get:function(){return M}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,h=((r=e("moment"))&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},p=f.addClass,g=f.hasClass,m=f.removeClass,w=(s=e("helpers/array"))&&s.__esModule&&s||{default:s},v=w.arrayMap,y=w.arrayReduce,b=((a=e("helpers/mixed"))&&a.__esModule&&a||{default:a}).isEmpty,C=((l=e("_base"))&&l.__esModule&&l||{default:l}).default,_=((u=e("plugins"))&&u.__esModule&&u||{default:u}).registerPlugin,R=((c=e("utils/sortingAlgorithms/mergeSort"))&&c.__esModule&&c||{default:c}).mergeSort;d.hooks.register("beforeColumnSort"),d.hooks.register("afterColumnSort");var M=function(e){$traceurRuntime.superConstructor(S).call(this,e),this.sortIndicators=[],this.lastSortedColumn=null,this.sortEmptyCells=!1},S=M;$traceurRuntime.createClass(M,{isEnabled:function(){return!!this.hot.getSettings().columnSorting},enablePlugin:function(){var e=this;if(!this.enabled){this.setPluginOptions();var t=this;this.hot.sortIndex=[],this.hot.sort=function(){var e=Array.prototype.slice.call(arguments);return t.sortByColumn.apply(t,e)},void 0===this.hot.getSettings().observeChanges&&this.enableObserveChangesPlugin(),this.addHook("afterTrimRow",function(t){return e.sort()}),this.addHook("afterUntrimRow",function(t){return e.sort()}),this.addHook("modifyRow",function(t){return e.translateRow(t)}),this.addHook("unmodifyRow",function(t){return e.untranslateRow(t)}),this.addHook("afterUpdateSettings",function(){return e.onAfterUpdateSettings()}),this.addHook("afterGetColHeader",function(t,o){return e.getColHeader(t,o)}),this.addHook("afterOnCellMouseDown",function(t,o){return e.onAfterOnCellMouseDown(t,o)}),this.addHook("afterCreateRow",function(){t.afterCreateRow.apply(t,arguments)}),this.addHook("afterRemoveRow",function(){t.afterRemoveRow.apply(t,arguments)}),this.addHook("afterInit",function(){return e.sortBySettings()}),this.addHook("afterLoadData",function(){e.hot.sortIndex=[],e.hot.view&&e.sortBySettings()}),this.hot.view&&this.sortBySettings(),$traceurRuntime.superGet(this,S.prototype,"enablePlugin").call(this)}},disablePlugin:function(){this.hot.sort=void 0,$traceurRuntime.superGet(this,S.prototype,"disablePlugin").call(this)},onAfterUpdateSettings:function(){this.sortBySettings()},sortBySettings:function(){var e,t,o=this.hot.getSettings().columnSorting,n=this.loadSortingState();void 0===n?(e=o.column,t=o.sortOrder):(e=n.sortColumn,t=n.sortOrder),"number"==typeof e&&(this.lastSortedColumn=e,this.sortByColumn(e,t))},setSortingColumn:function(e,t){if(void 0===e)return this.hot.sortColumn=void 0,void(this.hot.sortOrder=void 0);this.hot.sortColumn===e&&void 0===t?!1===this.hot.sortOrder?this.hot.sortOrder=void 0:this.hot.sortOrder=!this.hot.sortOrder:this.hot.sortOrder=void 0===t||t,this.hot.sortColumn=e},sortByColumn:function(e,t){if(this.setSortingColumn(e,t),void 0!==this.hot.sortColumn){!1!==d.hooks.run(this.hot,"beforeColumnSort",this.hot.sortColumn,this.hot.sortOrder)&&this.sort(),this.updateOrderClass(),this.updateSortIndicator(),d.hooks.run(this.hot,"afterColumnSort",this.hot.sortColumn,this.hot.sortOrder),this.hot.render(),this.saveSortingState()}},saveSortingState:function(){var e={};void 0!==this.hot.sortColumn&&(e.sortColumn=this.hot.sortColumn),void 0!==this.hot.sortOrder&&(e.sortOrder=this.hot.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&d.hooks.run(this.hot,"persistentStateSave","columnSorting",e)},loadSortingState:function(){var e={};return d.hooks.run(this.hot,"persistentStateLoad","columnSorting",e),e.value},updateOrderClass:function(){var e;!0===this.hot.sortOrder?e="ascending":!1===this.hot.sortOrder&&(e="descending"),this.sortOrderClass=e},enableObserveChangesPlugin:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))},defaultSort:function(e,t){return function(o,n){return"string"==typeof o[1]&&(o[1]=o[1].toLowerCase()),"string"==typeof n[1]&&(n[1]=n[1].toLowerCase()),o[1]===n[1]?0:b(o[1])?b(n[1])?0:t.columnSorting.sortEmptyCells&&e?-1:1:b(n[1])?b(o[1])?0:t.columnSorting.sortEmptyCells&&e?1:-1:isNaN(o[1])&&!isNaN(n[1])?e?1:-1:!isNaN(o[1])&&isNaN(n[1])?e?-1:1:(isNaN(o[1])||isNaN(n[1])||(o[1]=parseFloat(o[1]),n[1]=parseFloat(n[1])),o[1]n[1]?e?1:-1:0)}},dateSort:function(e,t){return function(o,n){if(o[1]===n[1])return 0;if(b(o[1]))return b(n[1])?0:t.columnSorting.sortEmptyCells&&e?-1:1;if(b(n[1]))return b(o[1])?0:t.columnSorting.sortEmptyCells&&e?1:-1;var r=h(o[1],t.dateFormat),i=h(n[1],t.dateFormat);return r.isValid()?i.isValid()?i.isAfter(r)?e?-1:1:i.isBefore(r)?e?1:-1:0:-1:1}},numericSort:function(e,t){return function(o,n){var r=parseFloat(o[1]),i=parseFloat(n[1]);if(r===i||isNaN(r)&&isNaN(i))return 0;if(t.columnSorting.sortEmptyCells){if(b(o[1]))return e?-1:1;if(b(n[1]))return e?1:-1}return isNaN(r)?1:isNaN(i)?-1:ri?e?1:-1:0}},sort:function(){if(void 0===this.hot.sortOrder)return void(this.hot.sortIndex.length=0);var e,t,o=this.hot.getCellMeta(0,this.hot.sortColumn),n=this.hot.countEmptyRows();this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0,void 0===o.columnSorting.sortEmptyCells&&(o.columnSorting={sortEmptyCells:this.sortEmptyCells}),t=this.hot.getSettings().maxRows===Number.POSITIVE_INFINITY?this.hot.countRows()-this.hot.getSettings().minSpareRows:this.hot.countRows()-n;for(var r=0,i=t;r=0&&-1===r&&p(o,"columnSorting"),m(o,"descending"),m(o,"ascending"),this.sortIndicators[e]&&e===this.hot.sortColumn&&("ascending"===this.sortOrderClass?p(o,"ascending"):"descending"===this.sortOrderClass&&p(o,"descending")))},isSorted:function(){return void 0!==this.hot.sortColumn},afterCreateRow:function(e,t){if(this.isSorted()){for(var o=0;o=e&&(this.hot.sortIndex[o][0]+=t);for(var o=0;oo&&t++,t},0)}if(this.isSorted()){var n=this.hot.sortIndex.splice(e,t);n=v(n,function(e){return e[0]}),this.hot.sortIndex=v(this.hot.sortIndex,function(e,t){var n=o(e[0]);return n&&(e[0]-=n),e}),this.saveSortingState()}},setPluginOptions:function(){var e=this.hot.getSettings().columnSorting;this.sortEmptyCells="object"==typeof e&&(e.sortEmptyCells||!1)},onAfterOnCellMouseDown:function(e,t){t.row>-1||g(e.realTarget,"columnSorting")&&(t.col!==this.lastSortedColumn&&(this.hot.sortOrder=!0),this.lastSortedColumn=t.col,this.sortByColumn(t.col))}},{},C),_("columnSorting",M)},{_base:62,browser:24,"helpers/array":43,"helpers/dom/element":47,"helpers/mixed":51,moment:"moment",plugins:61,"utils/sortingAlgorithms/mergeSort":132}],68:[function(e,t,o){"use strict";Object.defineProperties(o,{CommentEditor:{get:function(){return i}},__esModule:{value:!0}});var n,r=((n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n}).addClass,i=function(){this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()},s=i;$traceurRuntime.createClass(i,{setPosition:function(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"},setSize:function(e,t){if(e&&t){var o=this.getInputElement();o.style.width=e+"px",o.style.height=t+"px"}},resetSize:function(){var e=this.getInputElement();e.style.width="",e.style.height=""},setReadOnlyState:function(e){this.getInputElement().readOnly=e},show:function(){this.editorStyle.display="block",this.hidden=!1},hide:function(){this.editorStyle.display="none",this.hidden=!0},isVisible:function(){return"block"===this.editorStyle.display},setValue:function(){var e=void 0!==arguments[0]?arguments[0]:"";e=e||"",this.getInputElement().value=e},getValue:function(){return this.getInputElement().value},isFocused:function(){return document.activeElement===this.getInputElement()},focus:function(){this.getInputElement().focus()},createEditor:function(){var e,t,o=document.querySelector("."+s.CLASS_EDITOR_CONTAINER);return o||(o=document.createElement("div"),r(o,s.CLASS_EDITOR_CONTAINER),document.body.appendChild(o)),e=document.createElement("div"),r(e,s.CLASS_EDITOR),t=document.createElement("textarea"),r(t,s.CLASS_INPUT),e.appendChild(t),o.appendChild(e),e},getInputElement:function(){return this.editor.querySelector("."+s.CLASS_INPUT)},destroy:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}},{get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"},get CLASS_EDITOR(){return"htComments"},get CLASS_INPUT(){return"htCommentTextArea"},get CLASS_CELL(){return"htCommentCell"}})},{"helpers/dom/element":47}],69:[function(e,t,o){"use strict";var n;Object.defineProperties(o,{Comments:{get:function(){return I}},__esModule:{value:!0}});var r,i,s,a,l,u,c,d,h,f,p=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,g=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},m=g.addClass,w=g.closest,v=g.isChildOf,y=g.hasClass,b=g.offset,C=g.outerWidth,_=g.outerHeight,R=g.getScrollableElement,M=(s=e("helpers/object"))&&s.__esModule&&s||{default:s},S=M.deepClone,E=M.deepExtend,O=((a=e("helpers/function"))&&a.__esModule&&a||{default:a}).debounce,T=((l=e("eventManager"))&&l.__esModule&&l||{default:l}).EventManager,k=((u=e("3rdparty/walkontable/src/cell/coords"))&&u.__esModule&&u||{default:u}).WalkontableCellCoords,x=((c=e("plugins"))&&c.__esModule&&c||{default:c}).registerPlugin,D=((d=e("_base"))&&d.__esModule&&d||{default:d}).default,H=((h=e("commentEditor"))&&h.__esModule&&h||{default:h}).CommentEditor,A=(f=e("contextMenu/utils"))&&f.__esModule&&f||{default:f},P=A.checkSelectionConsistency,N=A.markLabelAsSelected,L=new WeakMap,I=function(e){$traceurRuntime.superConstructor(W).call(this,e),this.editor=null,this.eventManager=null,this.range={},this.mouseDown=!1,this.contextMenuEvent=!1,this.timer=null,this.displayDelay=250,L.set(this,{tempEditorDimensions:{},cellBelowCursor:null})},W=I;$traceurRuntime.createClass(I,(n={},Object.defineProperty(n,"isEnabled",{value:function(){return!!this.hot.getSettings().comments},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"enablePlugin",{value:function(){var e=this;this.enabled||(this.editor||(this.editor=new H),this.eventManager||(this.eventManager=new T(this)),this.addHook("afterContextMenuDefaultOptions",function(t){return e.addToContextMenu(t)}),this.addHook("afterRenderer",function(t,o,n,r,i,s){return e.onAfterRenderer(t,s)}),this.addHook("afterScrollHorizontally",function(){return e.hide()}),this.addHook("afterScrollVertically",function(){return e.hide()}),this.addHook("afterBeginEditing",function(t){return e.onAfterBeginEditing(t)}),this.registerListeners(),$traceurRuntime.superGet(this,W.prototype,"enablePlugin").call(this))},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"disablePlugin",{value:function(){$traceurRuntime.superGet(this,W.prototype,"disablePlugin").call(this)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"registerListeners",{value:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mouseup",function(t){return e.onMouseUp(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(t){return e.onEditorBlur(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",function(t){return e.onEditorMouseDown(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",function(t){return e.onEditorMouseUp(t)})},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"setRange",{value:function(e){this.range=e},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"clearRange",{value:function(){this.range={}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"targetIsCellWithComment",{value:function(e){var t=w(e.target,"TD","TBODY");return!!(t&&y(t,"htCommentCell")&&w(t,[this.hot.rootElement]))},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"targetIsCommentTextArea",{value:function(e){return this.editor.getInputElement()===e.target},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"setComment",{value:function(e){var t;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var o=this.editor.getValue(),n="";null!=e?n=e:null!=o&&(n=o);var r=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(r,i,(t={},Object.defineProperty(t,"value",{value:n,configurable:!0,enumerable:!0,writable:!0}),t)),this.hot.render()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"setCommentAtCell",{value:function(e,t,o){this.setRange({from:new k(e,t)}),this.setComment(o)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"removeComment",{value:function(){var e=void 0===arguments[0]||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,"comment",void 0),e&&this.hot.render(),this.hide()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"removeCommentAtCell",{value:function(e,t){var o=void 0===arguments[2]||arguments[2];this.setRange({from:new k(e,t)}),this.removeComment(o)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"getComment",{value:function(){var e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,"value")},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"getCommentAtCell",{value:function(e,t){return this.getCommentMeta(e,t,"value")},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"show",{value:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditor(!0),this.editor.setValue(e.comment?e.comment.value:""),this.editor.hidden&&this.editor.show(),!0},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"showAtCell",{value:function(e,t){return this.setRange({from:new k(e,t)}),this.show()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"hide",{value:function(){this.editor.hidden||this.editor.hide()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"refreshEditor",{value:function(){if(void 0!==arguments[0]&&arguments[0]||this.range.from&&this.editor.isVisible()){var e=R(this.hot.view.wt.wtTable.TABLE),t=this.hot.view.wt.wtTable.getCell(this.range.from),o=this.range.from.row,n=this.range.from.col,r=b(t),i=this.hot.view.wt.wtTable.getStretchedColumnWidth(n),s=r.top<0?0:r.top,a=r.left;this.hot.view.wt.wtViewport.hasVerticalScroll()&&e!==window&&(s-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition()),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&e!==window&&(a-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition());var l=a+i,u=s,c=this.getCommentMeta(o,n,"style"),d=this.getCommentMeta(o,n,"readOnly");c?this.editor.setSize(c.width,c.height):this.editor.resetSize(),this.editor.setReadOnlyState(d),this.editor.setPosition(l,u)}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"checkSelectionCommentsConsistency",{value:function(){var e=this.hot.getSelectedRange();if(!e)return!1;var t=!1,o=e.from;return this.getCommentMeta(o.row,o.col,"value")&&(t=!0),t},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"updateCommentMeta",{value:function(e,t,o){var n,r=this.hot.getCellMeta(e,t).comment;r?(n=S(r),E(n,o)):n=o,this.hot.setCellMeta(e,t,"comment",n)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"getCommentMeta",{value:function(e,t,o){var n=this.hot.getCellMeta(e,t);if(n.comment)return n.comment[o]},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onMouseDown",{value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var t=w(e.target,"TD","TBODY"),o=null;t&&(o=this.hot.view.wt.wtTable.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}this.contextMenuEvent=!1}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onMouseOver",{value:function(e){var t=this;if(!this.mouseDown&&!this.editor.isFocused()){var o=L.get(this);o.cellBelowCursor=document.elementFromPoint(e.clientX,e.clientY),O(function(){if(!y(e.target,"wtBorder")&&o.cellBelowCursor===e.target&&t.editor)if(t.targetIsCellWithComment(e)){var n=t.hot.view.wt.wtTable.getCoords(e.target),r={from:new k(n.row,n.col)};t.setRange(r),t.show()}else!v(e.target,document)||t.targetIsCommentTextArea(e)||t.editor.isFocused()||t.hide()},this.displayDelay)()}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onMouseUp",{value:function(e){this.mouseDown=!1},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onAfterRenderer",{value:function(e,t){t.comment&&t.comment.value&&m(e,t.commentedCellClassName)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onEditorBlur",{value:function(e){this.setComment()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onEditorMouseDown",{value:function(e){L.get(this).tempEditorDimensions={width:C(e.target),height:_(e.target)}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onEditorMouseUp",{value:function(e){var t,o=L.get(this),n=C(e.target),r=_(e.target);n===o.tempEditorDimensions.width+1&&r===o.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,(t={},Object.defineProperty(t,"style",{value:{width:n,height:r},configurable:!0,enumerable:!0,writable:!0}),t))},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onContextMenuAddComment",{value:function(){var e=this,t=this.hot.getSelectedRange();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)},configurable:!0,enumerable:!0,writable:!0}), Object.defineProperty(n,"onContextMenuRemoveComment",{value:function(e){this.contextMenuEvent=!0;for(var t=e.start.row;t<=e.end.row;t++)for(var o=e.start.col;o<=e.end.col;o++)this.removeCommentAtCell(t,o,!1);this.hot.render()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onContextMenuMakeReadOnly",{value:function(e){var t;this.contextMenuEvent=!0;for(var o=e.start.row;o<=e.end.row;o++)for(var n=e.start.col;n<=e.end.col;n++){var r=!!this.getCommentMeta(o,n,"readOnly");this.updateCommentMeta(o,n,(t={},Object.defineProperty(t,"readOnly",{value:!r,configurable:!0,enumerable:!0,writable:!0}),t))}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"addToContextMenu",{value:function(e){var t=this;e.items.push(p.plugins.ContextMenu.SEPARATOR,{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?"Edit comment":"Add comment"},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelected()&&!this.selection.selectedHeader.corner)}},{key:"commentsRemove",name:function(){return"Delete comment"},callback:function(e,o){return t.onContextMenuRemoveComment(o)},disabled:function(){return t.hot.selection.selectedHeader.corner}},{key:"commentsReadOnly",name:function(){var e=this,t="Read only comment";return P(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).comment;if(n&&(n=n.readOnly),n)return!0})&&(t=N(t)),t},callback:function(e,o){return t.onContextMenuMakeReadOnly(o)},disabled:function(){return t.hot.selection.selectedHeader.corner||!t.checkSelectionCommentsConsistency()}})},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"onAfterBeginEditing",{value:function(e,t){this.hide()},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"destroy",{value:function(){this.editor&&this.editor.destroy(),$traceurRuntime.superGet(this,W.prototype,"destroy").call(this)},configurable:!0,enumerable:!0,writable:!0}),n),{},D),x("comments",I)},{"3rdparty/walkontable/src/cell/coords":6,_base:62,browser:24,commentEditor:68,"contextMenu/utils":88,eventManager:42,"helpers/dom/element":47,"helpers/function":50,"helpers/object":53,plugins:61}],70:[function(e,t,o){"use strict";function n(e,t){var o;return i(t,function(t){var n=t.key?t.key.split(":"):null;if(Array.isArray(n)&&n[1]===e)return o=t,!1}),o}Object.defineProperties(o,{CommandExecutor:{get:function(){return s}},__esModule:{value:!0}});var r,i=((r=e("helpers/array"))&&r.__esModule&&r||{default:r}).arrayEach,s=function(e){this.hot=e,this.commands={},this.commonCallback=null};$traceurRuntime.createClass(s,{registerCommand:function(e,t){this.commands[e]=t},setCommonCallback:function(e){this.commonCallback=e},execute:function(e){for(var t=[],o=1;o=e.offsetHeight},fitsBelow:function(e){var t=void 0!==arguments[1]?arguments[1]:window.innerHeight;return this.topRelative+e.offsetHeight<=t},fitsOnRight:function(e){var t=void 0!==arguments[1]?arguments[1]:window.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t},fitsOnLeft:function(e){return this.leftRelative>=e.offsetWidth}},{}),s.plugins.utils=s.plugins.utils||{},s.plugins.utils.Cursor=f},{browser:24,"helpers/dom/element":47,"helpers/dom/event":48}],73:[function(e,t,o){"use strict";function n(){var e=void 0!==arguments[0]?arguments[0]:null,t=void 0!==arguments[1]?arguments[1]:[],o=void 0!==arguments[2]?arguments[2]:{},n=[];return e&&e.items?e=e.items:Array.isArray(e)||(e=t),u(e)?l(e,function(e,t){var r=o["string"==typeof e?e:t];r||(r=e),u(e)?c(r,e):"string"==typeof r&&(r={name:r}),void 0===r.key&&(r.key=t),n.push(r)}):d(e,function(e,t){var r=o[e];!r&&p.indexOf(e)>=0||(r||(r={name:e,key:t+""}),u(e)&&c(r,e),void 0===r.key&&(r.key=t),n.push(r))}),n}Object.defineProperties(o,{ItemsFactory:{get:function(){return m}},__esModule:{value:!0}});var r,i,s,a=(r=e("helpers/object"))&&r.__esModule&&r||{default:r},l=a.objectEach,u=a.isObject,c=a.extend,d=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,h=(s=e("predefinedItems"))&&s.__esModule&&s||{default:s},f=h.SEPARATOR,p=h.ITEMS,g=h.predefinedItems,m=function(e){var t=void 0!==arguments[1]?arguments[1]:null;this.hot=e,this.predefinedItems=g(),this.defaultOrderPattern=t};$traceurRuntime.createClass(m,{setPredefinedItems:function(e){var t=this,o={};this.defaultOrderPattern.length=0,l(e,function(e,n){var r="";e.name===f?(o[f]=e,r=f):isNaN(parseInt(n,10))?(e.key=void 0===e.key?n:e.key,o[n]=e,r=e.key):(o[e.key]=e,r=e.key),t.defaultOrderPattern.push(r)}),this.predefinedItems=o},getItems:function(){return n(void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}},{})},{"helpers/array":43,"helpers/object":53,predefinedItems:75}],74:[function(e,t,o){"use strict";Object.defineProperties(o,{Menu:{get:function(){return z}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f,p,g=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,m=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},w=m.addClass,v=m.empty,y=m.fastInnerHTML,b=m.getScrollbarWidth,C=m.isChildOf,_=m.removeClass,R=(i=e("helpers/array"))&&i.__esModule&&i||{default:i},M=R.arrayEach,S=R.arrayFilter,E=R.arrayReduce,O=((s=e("cursor"))&&s.__esModule&&s||{default:s}).Cursor,T=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).EventManager,k=((l=e("helpers/object"))&&l.__esModule&&l||{default:l}).mixin,x=((u=e("helpers/function"))&&u.__esModule&&u||{default:u}).debounce,D=(c=e("utils"))&&c.__esModule&&c||{default:c},H=D.filterSeparators,A=D.hasSubMenu,P=D.isDisabled,N=D.isItemHidden,L=D.isSeparator,I=D.isSelectionDisabled,W=D.normalizeSelection,j=((d=e("helpers/unicode"))&&d.__esModule&&d||{default:d}).KEY_CODES,V=((h=e("mixins/localHooks"))&&h.__esModule&&h||{default:h}).localHooks,B=((f=e("predefinedItems"))&&f.__esModule&&f||{default:f}).SEPARATOR,F=((p=e("helpers/dom/event"))&&p.__esModule&&p||{default:p}).stopImmediatePropagation,z=function(e,t){this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1},this.eventManager=new T(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()},Y=z;$traceurRuntime.createClass(z,{registerEvents:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){return e.onDocumentMouseDown(t)})},setMenuItems:function(e){this.menuItems=e},setOffset:function(e){var t=void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t},isSubMenu:function(){return null!==this.parentMenu},open:function(){var e=this;this.container.removeAttribute("style"),this.container.style.display="block";var t=x(function(t){return e.openSubMenu(t)},300),o=S(this.menuItems,function(t){return N(t,e.hot)});o=H(o,B);var n={data:o,colHeaders:!1,colWidths:[200],autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(t,o,n,r,i,s){return e.menuItemRenderer(t,o,n,r,i,s)}}],renderAllRows:!0,fragmentSelection:"cell",disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(o,n,r){e.isAllSubMenusClosed()?t(n.row):e.openSubMenu(n.row)},rowHeights:function(e){return o[e].name===B?1:23}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new g.Core(this.container,n),this.hotMenu.addHook("afterInit",function(){return e.onAfterInit()}),this.hotMenu.addHook("afterSelection",function(t,o,n,r,i){return e.onAfterSelection(t,o,n,r,i)}),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")},close:function(){var e=void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))},openSubMenu:function(e){if(!this.hotMenu)return!1;var t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!A(t))return!1;var o=this.hotMenu.getSourceDataAtRow(e),n=new Y(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0});return n.setMenuItems(o.submenu.items),n.open(),n.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=n,n},closeSubMenu:function(e){var t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];o&&(o.destroy(),delete this.hotSubMenus[t.key])},closeAllSubMenus:function(){var e=this;M(this.hotMenu.getData(),function(t,o){return e.closeSubMenu(o)})},isAllSubMenusClosed:function(){return 0===Object.keys(this.hotSubMenus).length},destroy:function(){this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy()},isOpened:function(){return null!==this.hotMenu},executeCommand:function(e){if(this.isOpened()&&this.hotMenu.getSelected()){var t=this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelected()[0]);if(this.runLocalHooks("select",t,e),!1!==t.isCommand&&t.name!==B){var o=this.hot.getSelectedRange(),n=o?W(o):{},r=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(r=!1),this.runLocalHooks("executeCommand",t.key,n,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,n,e),r&&this.close(!0)}}},setPosition:function(e){var t=new O(e);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))},setPositionAboveCursor:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top=t+"px"},setPositionBelowCursor:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top=t+"px"},setPositionOnRightOfCursor:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left=t+"px"},setPositionOnLeftOfCursor:function(e){var t=this.offset.left+e.left-this.container.offsetWidth+b()+4;this.container.style.left=t+"px"},selectFirstCell:function(){var e=this.hotMenu.getCell(0,0);L(e)||P(e)||I(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)},selectLastCell:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);L(t)||P(t)||I(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)},selectNextCell:function(e,t){var o=e+1,n=o=0?this.hotMenu.getCell(o,t):null;n&&(L(n)||P(n)||I(n)?this.selectPrevCell(o,t):this.hotMenu.selectCell(o,t))},menuItemRenderer:function(e,t,o,n,r,i){var s=this,a=e.getSourceDataAtRow(o),l=document.createElement("div"),u=function(e){return e.disableSelection};"function"==typeof i&&(i=i.call(this.hot)),v(t),w(l,"htItemWrapper"),t.appendChild(l),!function(e){return new RegExp(B,"i").test(e.name)}(a)?"function"==typeof a.renderer?(w(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,l,o,n,r,i))):y(l,i):w(t,"htSeparator"),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(s.hot)}(a)?u(a)?(w(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):!function(e){return e.hasOwnProperty("submenu")}(a)?(_(t,"htSubmenu"),_(t,"htDisabled"),u(a)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(o,n,void 0,void 0,!1,!1)})):(w(t,"htSubmenu"),u(a)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(o,n,void 0,void 0,!1,!1)})):(w(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}))},createContainer:function(){var e=void 0!==arguments[0]?arguments[0]:null;e&&(e=e.replace(/[^A-z0-9]/g,"_"),e=this.options.className+"Sub_"+e);var t;return t=e?document.querySelector("."+this.options.className+"."+e):document.querySelector("."+this.options.className),t||(t=document.createElement("div"),w(t,"htMenu "+this.options.className),e&&w(t,e),document.getElementsByTagName("body")[0].appendChild(t)),t},blockMainTableCallbacks:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)},releaseMainTableCallbacks:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},onBeforeKeyDown:function(e){var t=this.hotMenu.getSelected(),o=!1;switch(this.keyEvent=!0,e.keyCode){case j.ESCAPE:this.close(),o=!0;break;case j.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?o=!0:(this.executeCommand(e),this.close(!0)));break;case j.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),o=!0;break;case j.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),o=!0;break;case j.ARROW_RIGHT:if(t){var n=this.openSubMenu(t[0]);n&&n.selectFirstCell()}o=!0;break;case j.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),o=!0)}o&&(e.preventDefault(),F(e)),this.keyEvent=!1},onAfterInit:function(){var e=this.hotMenu.getSettings().data,t=this.hotMenu.view.wt.wtTable.hider.style,o=this.hotMenu.view.wt.wtTable.holder.style,n=parseInt(t.width,10),r=E(e,function(e,t){return e+(t.name===B?1:26)},0);o.width=n+22+"px",o.height=r+4+"px",t.height=o.height},onAfterSelection:function(e,t,o,n,r){!1===this.keyEvent&&(r.value=!0)},onDocumentMouseDown:function(e){this.isOpened()&&(this.container&&C(e.target,this.container)&&this.executeCommand(e),this.options.standalone&&this.hotMenu&&!C(e.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!C(e.target,".htMenu")&&C(e.target,document)&&this.close(!0))}},{}),k(z,V)},{browser:24,cursor:72,eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/function":50,"helpers/object":53,"helpers/unicode":56,"mixins/localHooks":58,predefinedItems:75,utils:88}],75:[function(e,t,o){"use strict";function n(){var e={};return y(ne,function(t,o){return e[o]=t()}),e}function r(e,t){-1===oe.indexOf(e)&&(ne[e]=t)}var i;Object.defineProperties(o,{ALIGNMENT:{get:function(){return a.KEY}},CLEAR_COLUMN:{get:function(){return l.KEY}},COLUMN_LEFT:{get:function(){return u.KEY}},COLUMN_RIGHT:{get:function(){return c.KEY}},READ_ONLY:{get:function(){return d.KEY}},REDO:{get:function(){return h.KEY}},REMOVE_COLUMN:{get:function(){return f.KEY}},REMOVE_ROW:{get:function(){return p.KEY}},ROW_ABOVE:{get:function(){return g.KEY}},ROW_BELOW:{get:function(){return m.KEY}},SEPARATOR:{get:function(){return w.KEY}},UNDO:{get:function(){return v.KEY}},ITEMS:{get:function(){return oe}},predefinedItems:{get:function(){return n}},addItem:{get:function(){return r}},__esModule:{value:!0}});var s,a,l,u,c,d,h,f,p,g,m,w,v,a,l,u,c,d,h,f,p,g,m,w,v,y=((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).objectEach,b=(a=e("predefinedItems/alignment"))&&a.__esModule&&a||{default:a},C=b.alignmentItem,_=b.KEY,R=(l=e("predefinedItems/clearColumn"))&&l.__esModule&&l||{default:l},M=R.clearColumnItem,S=R.KEY,E=(u=e("predefinedItems/columnLeft"))&&u.__esModule&&u||{default:u},O=E.columnLeftItem,T=E.KEY,k=(c=e("predefinedItems/columnRight"))&&c.__esModule&&c||{default:c},x=k.columnRightItem,D=k.KEY,H=(d=e("predefinedItems/readOnly"))&&d.__esModule&&d||{default:d},A=H.readOnlyItem,P=H.KEY,N=(h=e("predefinedItems/redo"))&&h.__esModule&&h||{default:h},L=N.redoItem,I=N.KEY,W=(f=e("predefinedItems/removeColumn"))&&f.__esModule&&f||{default:f},j=W.removeColumnItem,V=W.KEY,B=(p=e("predefinedItems/removeRow"))&&p.__esModule&&p||{default:p},F=B.removeRowItem,z=B.KEY,Y=(g=e("predefinedItems/rowAbove"))&&g.__esModule&&g||{default:g},U=Y.rowAboveItem,G=Y.KEY,$=(m=e("predefinedItems/rowBelow"))&&m.__esModule&&m||{default:m},K=$.rowBelowItem,X=$.KEY,q=(w=e("predefinedItems/separator"))&&w.__esModule&&w||{default:w},Z=q.separatorItem,J=q.KEY,Q=(v=e("predefinedItems/undo"))&&v.__esModule&&v||{default:v},ee=Q.undoItem,te=Q.KEY,a=(a=e("predefinedItems/alignment"))&&a.__esModule&&a||{default:a},l=(l=e("predefinedItems/clearColumn"))&&l.__esModule&&l||{default:l},u=(u=e("predefinedItems/columnLeft"))&&u.__esModule&&u||{default:u},c=(c=e("predefinedItems/columnRight"))&&c.__esModule&&c||{default:c},d=(d=e("predefinedItems/readOnly"))&&d.__esModule&&d||{default:d},h=(h=e("predefinedItems/redo"))&&h.__esModule&&h||{default:h},f=(f=e("predefinedItems/removeColumn"))&&f.__esModule&&f||{default:f},p=(p=e("predefinedItems/removeRow"))&&p.__esModule&&p||{default:p},g=(g=e("predefinedItems/rowAbove"))&&g.__esModule&&g||{default:g},m=(m=e("predefinedItems/rowBelow"))&&m.__esModule&&m||{default:m},w=(w=e("predefinedItems/separator"))&&w.__esModule&&w||{default:w},v=(v=e("predefinedItems/undo"))&&v.__esModule&&v||{default:v},oe=[G,X,T,D,S,z,V,te,I,P,_,J],ne=(i={},Object.defineProperty(i,J,{value:Z,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,G,{value:U,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,X,{value:K,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,T,{value:O,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,D,{value:x,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,S,{value:M,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,z,{value:F,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,V,{value:j,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,te,{value:ee,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,I,{value:L,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,P,{value:A,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,_,{value:C,configurable:!0,enumerable:!0,writable:!0}),i)},{"helpers/object":53,"predefinedItems/alignment":76,"predefinedItems/clearColumn":77,"predefinedItems/columnLeft":78,"predefinedItems/columnRight":79,"predefinedItems/readOnly":80,"predefinedItems/redo":81,"predefinedItems/removeColumn":82,"predefinedItems/removeRow":83,"predefinedItems/rowAbove":84,"predefinedItems/rowBelow":85,"predefinedItems/separator":86,"predefinedItems/undo":87}],76:[function(e,t,o){"use strict";function n(){return{key:h,name:"Alignment",disabled:function(){return!(this.getSelectedRange()&&!this.selection.selectedHeader.corner)},submenu:{items:[{key:h+":left",name:function(){var e=this,t="Left";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htLeft"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"horizontal","htLeft"),a(t,"horizontal","htLeft",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{key:h+":center",name:function(){var e=this,t="Center";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htCenter"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"horizontal","htCenter"),a(t,"horizontal","htCenter",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{key:h+":right",name:function(){var e=this,t="Right";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htRight"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"horizontal","htRight"),a(t,"horizontal","htRight",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{key:h+":justify",name:function(){var e=this,t="Justify";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htJustify"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"horizontal","htJustify"),a(t,"horizontal","htJustify",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{name:d},{key:h+":top",name:function(){var e=this,t="Top";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htTop"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"vertical","htTop"),a(t,"vertical","htTop",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{key:h+":middle",name:function(){var e=this,t="Middle";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htMiddle"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"vertical","htMiddle"),a(t,"vertical","htMiddle",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1},{key:h+":bottom",name:function(){var e=this,t="Bottom";return u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&-1!==n.indexOf("htBottom"))return!0})&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className});this.runHooks("beforeCellAlignment",o,t,"vertical","htBottom"),a(t,"vertical","htBottom",function(t,o){return e.getCellMeta(t,o)},function(t,o,n,r){return e.setCellMeta(t,o,n,r)}),this.render()},disabled:!1}]}}}Object.defineProperties(o,{KEY:{get:function(){return h}},alignmentItem:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("utils"))&&r.__esModule&&r||{default:r},a=s.align,l=s.getAlignmentClasses,u=s.checkSelectionConsistency,c=s.markLabelAsSelected,d=((i=e("separator"))&&i.__esModule&&i||{default:i}).KEY,h="alignment"},{separator:86,utils:88}],77:[function(e,t,o){"use strict";function n(){return{key:s,name:"Clear column",callback:function(e,t){var o=t.start.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t.start.row,t.end.row),o,"ContextMenu.clearColumn")},disabled:function(){var e=i(this);if(!e)return!0;var t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(",");return e[1]<0||this.countCols()>=this.getSettings().maxCols||o}}}Object.defineProperties(o,{KEY:{get:function(){return s}},clearColumnItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="clear_column"},{utils:88}],78:[function(e,t,o){"use strict";function n(){return{key:s,name:"Insert column on the left",callback:function(e,t){this.alter("insert_col",t.start.col,1,"ContextMenu.columnLeft")},disabled:function(){var e=i(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(","),n=1===this.countCols();return e[1]<0||this.countCols()>=this.getSettings().maxCols||!n&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}}Object.defineProperties(o,{KEY:{get:function(){return s}},columnLeftItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="col_left"},{utils:88}],79:[function(e,t,o){"use strict";function n(){return{key:s,name:"Insert column on the right",callback:function(e,t){this.alter("insert_col",t.end.col+1,1,"ContextMenu.columnRight")},disabled:function(){var e=i(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(","),n=1===this.countCols();return e[1]<0||this.countCols()>=this.getSettings().maxCols||!n&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}}Object.defineProperties(o,{KEY:{get:function(){return s}},columnRightItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="col_right"},{utils:88}],80:[function(e,t,o){"use strict";function n(){return{key:l,name:function(){var e=this,t="Read only";return s(this.getSelectedRange(),function(t,o){return e.getCellMeta(t,o).readOnly})&&(t=a(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=s(t,function(t,o){return e.getCellMeta(t,o).readOnly});t.forAll(function(t,n){e.setCellMeta(t,n,"readOnly",!o)}),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.selectedHeader.corner)}}}Object.defineProperties(o,{KEY:{get:function(){return l}},readOnlyItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=(r=e("utils"))&&r.__esModule&&r||{default:r },s=i.checkSelectionConsistency,a=i.markLabelAsSelected,l="make_read_only"},{utils:88}],81:[function(e,t,o){"use strict";function n(){return{key:r,name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}}Object.defineProperties(o,{KEY:{get:function(){return r}},redoItem:{get:function(){return n}},__esModule:{value:!0}});var r="redo"},{}],82:[function(e,t,o){"use strict";function n(){return{key:s,name:"Remove column",callback:function(e,t){var o=t.end.col-t.start.col+1;this.alter("remove_col",t.start.col,o,"ContextMenu.removeColumn")},disabled:function(){var e=i(this),t=this.countCols();return!e||this.selection.selectedHeader.rows||this.selection.selectedHeader.corner||!this.isColumnModificationAllowed()||!t},hidden:function(){return!this.getSettings().allowRemoveColumn}}}Object.defineProperties(o,{KEY:{get:function(){return s}},removeColumnItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="remove_col"},{utils:88}],83:[function(e,t,o){"use strict";function n(){return{key:s,name:"Remove row",callback:function(e,t){var o=t.end.row-t.start.row+1;this.alter("remove_row",t.start.row,o,"ContextMenu.removeRow")},disabled:function(){var e=i(this),t=this.countRows();return!e||this.selection.selectedHeader.cols||this.selection.selectedHeader.corner||!t},hidden:function(){return!this.getSettings().allowRemoveRow}}}Object.defineProperties(o,{KEY:{get:function(){return s}},removeRowItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="remove_row"},{utils:88}],84:[function(e,t,o){"use strict";function n(){return{key:s,name:"Insert row above",callback:function(e,t){this.alter("insert_row",t.start.row,1,"ContextMenu.rowAbove")},disabled:function(){return!i(this)||this.selection.selectedHeader.cols||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}}Object.defineProperties(o,{KEY:{get:function(){return s}},rowAboveItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="row_above"},{utils:88}],85:[function(e,t,o){"use strict";function n(){return{key:s,name:"Insert row below",callback:function(e,t){this.alter("insert_row",t.end.row+1,1,"ContextMenu.rowBelow")},disabled:function(){return!i(this)||this.selection.selectedHeader.cols||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}}Object.defineProperties(o,{KEY:{get:function(){return s}},rowBelowItem:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("utils"))&&r.__esModule&&r||{default:r}).getValidSelection,s="row_below"},{utils:88}],86:[function(e,t,o){"use strict";function n(){return{name:r}}Object.defineProperties(o,{KEY:{get:function(){return r}},separatorItem:{get:function(){return n}},__esModule:{value:!0}});var r="---------"},{}],87:[function(e,t,o){"use strict";function n(){return{key:r,name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}}Object.defineProperties(o,{KEY:{get:function(){return r}},undoItem:{get:function(){return n}},__esModule:{value:!0}});var r="undo"},{}],88:[function(e,t,o){"use strict";function n(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}function r(e){return S(e,"htSeparator")}function i(e){return S(e,"htSubmenu")}function s(e){return S(e,"htDisabled")}function a(e){return S(e,"htSelectionDisabled")}function l(e){var t=e.getSelected();return t?t[0]<0?null:t:null}function u(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function c(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),e+=" "+t)}function d(e,t){for(var o={},n=e.from.row;n<=e.to.row;n++)for(var r=e.from.col;r<=e.to.col;r++)o[n]||(o[n]=[]),o[n][r]=t(n,r);return o}function h(e,t,o,n,r){if(e.from.row==e.to.row&&e.from.col==e.to.col)f(e.from.row,e.from.col,t,o,n,r);else for(var i=e.from.row;i<=e.to.row;i++)for(var s=e.from.col;s<=e.to.col;s++)f(i,s,t,o,n,r)}function f(e,t,o,n,r,i){var s=r(e,t),a=n;s.className&&(a="vertical"===o?u(s.className,n):c(s.className,n)),i(e,t,"className",a)}function p(e,t){var o=!1;return e&&e.forAll(function(e,n){if(t(e,n))return o=!0,!1}),o}function g(e){return''+String.fromCharCode(10003)+""+e}function m(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}function w(e,t){for(var o=e.slice(0);00?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function b(e){var t=void 0!==arguments[1]?arguments[1]:E,o=e.slice(0);return o=w(o,t),o=v(o,t),o=y(o)}Object.defineProperties(o,{normalizeSelection:{get:function(){return n}},isSeparator:{get:function(){return r}},hasSubMenu:{get:function(){return i}},isDisabled:{get:function(){return s}},isSelectionDisabled:{get:function(){return a}},getValidSelection:{get:function(){return l}},prepareVerticalAlignClass:{get:function(){return u}},prepareHorizontalAlignClass:{get:function(){return c}},getAlignmentClasses:{get:function(){return d}},align:{get:function(){return h}},checkSelectionConsistency:{get:function(){return p}},markLabelAsSelected:{get:function(){return g}},isItemHidden:{get:function(){return m}},filterSeparators:{get:function(){return b}},__esModule:{value:!0}});var C,_,R,M=((C=e("helpers/array"))&&C.__esModule&&C||{default:C}).arrayEach,S=((_=e("helpers/dom/element"))&&_.__esModule&&_||{default:_}).hasClass,E=((R=e("predefinedItems/separator"))&&R.__esModule&&R||{default:R}).KEY},{"helpers/array":43,"helpers/dom/element":47,"predefinedItems/separator":86}],89:[function(e,t,o){"use strict";Object.defineProperties(o,{ContextMenuCopyPaste:{get:function(){return w}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=((n=e("_base"))&&n.__esModule&&n||{default:n}).default,d=((r=e("zeroclipboard"))&&r.__esModule&&r||{default:r}).default,h=((i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i}).removeClass,f=((s=e("helpers/array"))&&s.__esModule&&s||{default:s}).arrayEach,p=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).EventManager,g=((l=e("plugins"))&&l.__esModule&&l||{default:l}).registerPlugin,m=((u=e("contextMenu/predefinedItems"))&&u.__esModule&&u||{default:u}).SEPARATOR,w=function(e){$traceurRuntime.superConstructor(v).call(this,e),this.eventManager=new p(this),this.swfPath=null,this.outsideClickDeselectsCache=null},v=w;$traceurRuntime.createClass(w,{isEnabled:function(){return this.hot.getSettings().contextMenuCopyPaste},enablePlugin:function(){var e=this;if(!this.enabled){"object"==typeof this.hot.getSettings().contextMenuCopyPaste&&(this.swfPath=this.hot.getSettings().contextMenuCopyPaste.swfPath),void 0===d&&console.error("To be able to use the Copy/Paste feature from the context menu, you need to manually include ZeroClipboard.js file to your website.");try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){void 0===navigator.mimeTypes["application/x-shockwave-flash"]&&console.error("To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin installed.")}this.swfPath&&d.config({swfPath:this.swfPath}),this.hot.addHook("afterContextMenuShow",function(){return e.onAfterContextMenuShow()}),this.hot.addHook("afterContextMenuDefaultOptions",function(t){return e.onAfterContextMenuDefaultOptions(t)}),this.registerEvents(),$traceurRuntime.superGet(this,v.prototype,"enablePlugin").call(this)}},disablePlugin:function(){$traceurRuntime.superGet(this,v.prototype,"disablePlugin").call(this)},registerEvents:function(){var e=this;this.eventManager.addEventListener(document,"mouseenter",function(){return e.removeCurrentClass()}),this.eventManager.addEventListener(document,"mouseleave",function(){return e.removeZeroClipboardClass()})},getCopyValue:function(){return this.hot.copyPaste.setCopyableText(),this.hot.copyPaste.copyPasteInstance.triggerCopy(),this.hot.copyPaste.copyPasteInstance.elTextarea.value},onAfterContextMenuDefaultOptions:function(e){e.items.unshift({key:"copy",name:"Copy",disabled:function(){return this.selection.selectedHeader.corner}},{key:"paste",name:"Paste",callback:function(){this.copyPaste.triggerPaste()},disabled:function(){return this.selection.selectedHeader.corner}},{name:m})},onAfterContextMenuShow:function(){var e=this,t=this.hot.getPlugin("contextMenu"),o=t.menu.hotMenu.getSourceData();f(o,function(o,n){if("copy"===o.key){var r=new d(t.menu.hotMenu.getCell(n,0));return r.off(),r.on("copy",function(t){t.clipboardData.setData("text/plain",e.getCopyValue()),e.hot.getSettings().outsideClickDeselects=e.outsideClickDeselectsCache}),!1}})},removeCurrentClass:function(){var e=this.hot.getPlugin("contextMenu");if(e.enabled){if(e.menu.isOpened()){var t=e.menu.hotMenu.rootElement.querySelector("td.current");t&&h(t,"current")}this.outsideClickDeselectsCache=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1}},removeZeroClipboardClass:function(){var e=this.hot.getPlugin("contextMenu");if(e.enabled){if(e.menu.isOpened()){var t=e.menu.hotMenu.rootElement.querySelector("td.zeroclipboard-is-hover");t&&h(t,"zeroclipboard-is-hover")}this.hot.getSettings().outsideClickDeselects=this.outsideClickDeselectsCache}}},{},c),g("contextMenuCopyPaste",w)},{_base:62,"contextMenu/predefinedItems":75,eventManager:42,"helpers/array":43,"helpers/dom/element":47,plugins:61,zeroclipboard:"zeroclipboard"}],90:[function(e,t,o){"use strict";function n(e){function t(){e.isListening()}function o(){var t=s.getRangedData(s.copyableRanges);if(!e.getSettings().fragmentSelection||v.stringify(t)==O()){!!e.runHooks("beforeCut",t,s.copyableRanges)?(e.copyPaste.copyPasteInstance.copyable(v.stringify(t)),e.selection.empty(),e.runHooks("afterCut",t,s.copyableRanges)):e.copyPaste.copyPasteInstance.copyable("")}}function n(){if(e.isListening()){var t=s.getRangedData(s.copyableRanges);if(!e.getSettings().fragmentSelection||v.stringify(t)==O()){!!e.runHooks("beforeCopy",t,s.copyableRanges)?(e.copyPaste.copyPasteInstance.copyable(v.stringify(t)),e.runHooks("afterCopy",t,s.copyableRanges)):e.copyPaste.copyPasteInstance.copyable("")}}}function r(t){var o,n,r,i,a,l,u,c,d,h;if(e.isListening()&&e.selection.isSelected()){o=t,n=v.parse(o),r=e.getSelected(),i=new k(r[0],r[1]),a=new k(r[2],r[3]),l=new x(i,i,a),u=l.getTopLeftCorner(),c=l.getBottomRightCorner(),d=u,h=new k(Math.max(c.row,n.length-1+u.row),Math.max(c.col,n[0].length-1+u.col));var f=a.row-i.row>=n.length-1,p=a.col-i.col>=n[0].length-1;e.addHookOnce("afterChange",function(t,o){var n=t?t.length:0;if(n){var r={row:0,col:0},i=-1;_(t,function(e,o){var s=n>o+1?t[o+1]:null;s&&(f||(r.row=r.row+Math.max(s[0]-e[0]-1,0)),!p&&e[1]>i&&(i=e[1],r.col=r.col+Math.max(s[1]-e[1]-1,0)))}),e.selectCell(d.row,d.col,h.row+r.row,h.col+r.col)}});!!e.runHooks("beforePaste",n,s.copyableRanges)&&(e.populateFromArray(d.row,d.col,n,h.row,h.col,"CopyPaste.paste",e.getSettings().pasteMode),e.runHooks("afterPaste",n,s.copyableRanges))}}function i(t){if(e.getSelected()&&!(e.getActiveEditor()&&e.getActiveEditor().isOpened()||E(t))){if(C(t.keyCode)){if(e.getSettings().fragmentSelection&&O())return;return s.setCopyableText(),void S(t)}(t.ctrlKey||t.metaKey)&&!t.altKey&&(t.keyCode==b.A&&e._registerTimeout(setTimeout(T(s.setCopyableText,s),0)),t.keyCode==b.X&&o(),t.keyCode==b.C&&n())}}var s=this;this.copyPasteInstance=w(),this.copyPasteInstance.onCut(t),this.copyPasteInstance.triggerCopy=n,this.copyPasteInstance.onPaste(r),this.onPaste=r,this.copyableRanges=[],e.addHook("beforeKeyDown",i),this.destroy=function(){this.copyPasteInstance&&(this.copyPasteInstance.removeCallback(t),this.copyPasteInstance.removeCallback(r),this.copyPasteInstance.destroy(),this.copyPasteInstance=null),e.removeHook("beforeKeyDown",i)},e.addHook("afterDestroy",T(this.destroy,this)),this.triggerPaste=T(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=T(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var t=e.getSettings(),o=t.copyRowsLimit,n=t.copyColsLimit,r=e.getSelectedRange(),i=r.getTopLeftCorner(),s=r.getBottomRightCorner(),a=i.row,l=i.col,u=s.row,c=s.col,d=Math.min(u,a+o-1),h=Math.min(c,l+n-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:a,startCol:l,endRow:d,endCol:h}),this.copyableRanges=e.runHooks("modifyCopyableRange",this.copyableRanges);var f=this.getRangedCopyableData(this.copyableRanges);e.copyPaste.copyPasteInstance.copyable(f),u===d&&c===h||m.hooks.run(e,"afterCopyLimit",u-a+1,c-l+1,o,n)},this.getRangedCopyableData=function(t){var o=[],n=[],r=[];return _(t,function(e){R(e.startRow,e.endRow,function(e){-1===n.indexOf(e)&&n.push(e)}),R(e.startCol,e.endCol,function(e){-1===r.indexOf(e)&&r.push(e)})}),_(n,function(t){var n=[];_(r,function(o){n.push(e.getCopyableData(t,o))}),o.push(n)}),v.stringify(o)},this.getRangedData=function(t){var o=[],n=[],r=[];return _(t,function(e){R(e.startRow,e.endRow,function(e){-1===n.indexOf(e)&&n.push(e)}),R(e.startCol,e.endCol,function(e){-1===r.indexOf(e)&&r.push(e)})}),_(n,function(t){var n=[];_(r,function(o){n.push(e.getCopyableData(t,o))}),o.push(n)}),o}}function r(){var e=this,t=!1!==e.getSettings().copyPaste;t&&!e.copyPaste?e.copyPaste=new n(e):!t&&e.copyPaste&&(e.copyPaste.destroy(),e.copyPaste=null)}Object.defineProperties(o,{CopyPastePlugin:{get:function(){return n}},__esModule:{value:!0}});var i,s,a,l,u,c,d,h,f,p,g,m=((i=e("browser"))&&i.__esModule&&i||{default:i}).default,w=((s=e("copyPaste"))&&s.__esModule&&s||{default:s}).default,v=((a=e("SheetClip"))&&a.__esModule&&a||{default:a}).default,y=(l=e("helpers/unicode"))&&l.__esModule&&l||{default:l},b=y.KEY_CODES,C=y.isCtrlKey,_=((u=e("helpers/array"))&&u.__esModule&&u||{default:u}).arrayEach,R=((c=e("helpers/number"))&&c.__esModule&&c||{default:c}).rangeEach,M=(d=e("helpers/dom/event"))&&d.__esModule&&d||{default:d},S=M.stopImmediatePropagation,E=M.isImmediatePropagationStopped,O=((h=e("helpers/dom/element"))&&h.__esModule&&h||{default:h}).getSelectionText,T=((f=e("helpers/function"))&&f.__esModule&&f||{default:f}).proxy,k=((p=e("3rdparty/walkontable/src/cell/coords"))&&p.__esModule&&p||{default:p}).WalkontableCellCoords,x=((g=e("3rdparty/walkontable/src/cell/range"))&&g.__esModule&&g||{default:g}).WalkontableCellRange;m.hooks.add("afterInit",r),m.hooks.add("afterUpdateSettings",r),m.hooks.register("afterCopyLimit"),m.hooks.register("modifyCopyableRange"),m.hooks.register("beforeCut"),m.hooks.register("afterCut"),m.hooks.register("beforePaste"),m.hooks.register("afterPaste"),m.hooks.register("beforeCopy"),m.hooks.register("afterCopy")},{"3rdparty/walkontable/src/cell/coords":6,"3rdparty/walkontable/src/cell/range":7,SheetClip:"SheetClip",browser:24,copyPaste:"copyPaste","helpers/array":43,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/function":50,"helpers/number":52,"helpers/unicode":56}],91:[function(e,t,o){"use strict";function n(){}var r,i,s,a,l,u=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,c=(((i=e("plugins"))&&i.__esModule&&i||{default:i}).registerPlugin,((s=e("3rdparty/walkontable/src/cell/range"))&&s.__esModule&&s||{default:s}).WalkontableCellRange),d=((a=e("3rdparty/walkontable/src/selection"))&&a.__esModule&&a||{default:a}).WalkontableSelection,h=function(e){return"boolean"==typeof e&&!0===e||"object"==typeof e&&e.length>0},f=function(){h(this.getSettings().customBorders)&&(this.customBorders||(l=this,this.customBorders=new n))},p=function(e){for(var t=0;t=0?l.view.wt.selections[n]=o:l.view.wt.selections.push(o)},m=function(e,t,o){var n=_(e,t);n=R(n,o),this.setCellMeta(e,t,"borders",n),g(n)},w=function(e){for(var t=e.range,o=t.from.row;o<=t.to.row;o++)for(var n=t.from.col;n<=t.to.col;n++){var r=_(o,n),i=0;o==t.from.row&&(i++,e.hasOwnProperty("top")&&(r.top=e.top)),o==t.to.row&&(i++,e.hasOwnProperty("bottom")&&(r.bottom=e.bottom)),n==t.from.col&&(i++,e.hasOwnProperty("left")&&(r.left=e.left)),n==t.to.col&&(i++,e.hasOwnProperty("right")&&(r.right=e.right)),i>0&&(this.setCellMeta(o,n,"borders",r),g(r))}},v=function(e,t){return"border_row"+e+"col"+t},y=function(){return{width:1,color:"#000"}},b=function(){return{hide:!0}},C=function(){return{width:1,color:"#000",cornerVisible:!1}},_=function(e,t){return{className:v(e,t),border:C(),row:e,col:t,top:b(),right:b(),bottom:b(),left:b()}},R=function(e,t){return t.hasOwnProperty("border")&&(e.border=t.border),t.hasOwnProperty("top")&&(e.top=t.top),t.hasOwnProperty("right")&&(e.right=t.right),t.hasOwnProperty("bottom")&&(e.bottom=t.bottom),t.hasOwnProperty("left")&&(e.left=t.left),e},M=function(e){for(var t=document.querySelectorAll("."+e),o=0;o'+String.fromCharCode(10003)+""+e},x=function(e){this.getSettings().customBorders&&(e.items.push(u.plugins.ContextMenu.SEPARATOR),e.items.push({key:"borders",name:"Borders",disabled:function(){return this.selection.selectedHeader.corner},submenu:{items:[{key:"borders:top",name:function(){var e="Top";return T(this,"top")&&(e=k(e)),e},callback:function(){var e=T(this,"top");O.call(this,this.getSelectedRange(),"top",e)}},{key:"borders:right",name:function(){var e="Right";return T(this,"right")&&(e=k(e)),e},callback:function(){var e=T(this,"right");O.call(this,this.getSelectedRange(),"right",e)}},{key:"borders:bottom",name:function(){var e="Bottom";return T(this,"bottom")&&(e=k(e)),e},callback:function(){var e=T(this,"bottom");O.call(this,this.getSelectedRange(),"bottom",e)}},{key:"borders:left",name:function(){var e="Left";return T(this,"left")&&(e=k(e)),e},callback:function(){var e=T(this,"left");O.call(this,this.getSelectedRange(),"left",e)}},{key:"borders:no_borders",name:"Remove border(s)",callback:function(){O.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!T(this)}}]}}))};u.hooks.add("beforeInit",f),u.hooks.add("afterContextMenuDefaultOptions",x),u.hooks.add("afterInit",function(){var e=this.getSettings().customBorders;if(e){for(var t=0;tthis.boundaries.bottom&&(n=t-this.boundaries.bottom),ethis.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,n)};var u,c=function(e){e.dragToScrollListening=!1;var t=e.view.wt.wtTable.holder;u=new n,t!==window&&(u.setBoundaries(t.getBoundingClientRect()),u.setCallback(function(e,o){e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),o<0?t.scrollTop-=20:o>0&&(t.scrollTop+=20)}),e.dragToScrollListening=!0)};a.hooks.add("afterInit",function(){var e=this,t=l(this);t.addEventListener(document,"mouseup",function(){e.dragToScrollListening=!1}),t.addEventListener(document,"mousemove",function(t){e.dragToScrollListening&&u.check(t.clientX,t.clientY)})}),a.hooks.add("afterDestroy",function(){l(this).clear()}),a.hooks.add("afterOnCellMouseDown",function(){c(this)}),a.hooks.add("afterOnCellCornerMouseDown",function(){c(this)}),a.plugins.DragToScroll=n},{browser:24,eventManager:42,plugins:61}],93:[function(e,t,o){"use strict";function n(e){return{key:"freeze_column",name:"Freeze this column",callback:function(){var t=this.getSelectedRange().from.col;e.freezeColumn(t),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:(e.from.col!==e.to.col||e.from.col<=this.getSettings().fixedColumnsLeft-1)&&(t=!0),t}}}Object.defineProperties(o,{freezeColumnItem:{get:function(){return n}},__esModule:{value:!0}})},{}],94:[function(e,t,o){"use strict";function n(e){return{key:"unfreeze_column",name:"Unfreeze this column",callback:function(){var t=this.getSelectedRange().from.col;e.unfreezeColumn(t),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:(e.from.col!==e.to.col||e.from.col>=this.getSettings().fixedColumnsLeft)&&(t=!0),t}}}Object.defineProperties(o,{unfreezeColumnItem:{get:function(){return n}},__esModule:{value:!0}})},{}],95:[function(e,t,o){"use strict";Object.defineProperties(o,{ManualColumnFreeze:{get:function(){return m}},__esModule:{value:!0}});var n,r,i,s,a,l,u=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,c=((r=e("_base"))&&r.__esModule&&r||{default:r}).default,d=((i=e("plugins"))&&i.__esModule&&i||{default:i}).registerPlugin,h=((s=e("helpers/array"))&&s.__esModule&&s||{default:s}).arrayEach,f=((a=e("contextMenuItem/freezeColumn"))&&a.__esModule&&a||{default:a}).freezeColumnItem,p=((l=e("contextMenuItem/unfreezeColumn"))&&l.__esModule&&l||{default:l}).unfreezeColumnItem,g=new WeakMap,m=function(e){$traceurRuntime.superConstructor(w).call(this,e),g.set(this,{moveByFreeze:!1,afterFirstUse:!1}),this.frozenColumnsBasePositions=[],this.manualColumnMovePlugin=void 0},w=m;$traceurRuntime.createClass(m,{isEnabled:function(){return!!this.hot.getSettings().manualColumnFreeze},enablePlugin:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t){return e.addContextMenuEntry(t)}),this.addHook("afterInit",function(){return e.onAfterInit()}),this.addHook("beforeColumnMove",function(t,o){return e.onBeforeColumnMove(t,o)}),$traceurRuntime.superGet(this,w.prototype,"enablePlugin").call(this))},disablePlugin:function(){var e=g.get(this);e.afterFirstUse=!1,e.moveByFreeze=!1,$traceurRuntime.superGet(this,w.prototype,"disablePlugin").call(this)},updatePlugin:function(){this.disablePlugin(),this.enablePlugin(),$traceurRuntime.superGet(this,w.prototype,"updatePlugin").call(this)},freezeColumn:function(e){var t=g.get(this),o=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),o.fixedColumnsLeft===this.hot.countCols()||e<=o.fixedColumnsLeft-1||(t.moveByFreeze=!0,e!==this.getMovePlugin().columnsMapper.getValueByIndex(e)&&(this.frozenColumnsBasePositions[o.fixedColumnsLeft]=e),this.getMovePlugin().moveColumn(e,o.fixedColumnsLeft++))},unfreezeColumn:function(e){var t=g.get(this),o=this.hot.getSettings();if(t.afterFirstUse||(t.afterFirstUse=!0),!(o.fixedColumnsLeft<=0||e>o.fixedColumnsLeft-1)){var n=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,o.fixedColumnsLeft--,this.getMovePlugin().moveColumn(e,n+1)}},getMovePlugin:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin},getBestColumnReturnPosition:function(e){var t,o=this.getMovePlugin(),n=this.hot.getSettings(),r=n.fixedColumnsLeft,i=o.columnsMapper.getValueByIndex(r);if(null==this.frozenColumnsBasePositions[e])for(t=o.columnsMapper.getValueByIndex(e);i0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+s<=a){var f=e.coordsColumn>=e.countCols?e.countCols-1:e.coordsColumn;e.target.col=f+1,s+=e.target.TD.offsetWidth,e.target.col>o&&this.hot.scrollViewportTo(void 0,o+1,void 0,!0)}else e.target.col=e.coordsColumn,e.target.col<=t&&e.target.col>=e.fixedColumns&&this.hot.scrollViewportTo(void 0,t-1);e.target.col<=t&&e.target.col>=e.fixedColumns&&this.hot.scrollViewportTo(void 0,t-1);var p=a,g=s;a+d+c>=l?p=l-d-c:a+c=l-1?g=l-1:0===g?g=1:void 0!==r.scrollX&&e.coordsColumne){var n=e-1,r=[];g(this.columnsMapper._arrayMap,function(e,t,o){e>n&&r.push(t)}),this.columnsMapper.removeItems(r)}},registerEvents:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})},unregisterEvents:function(){this.eventManager.clear()},onBeforeOnCellMouseDown:function(e,t,o,n){var r=this.hot.view.wt.wtTable,i=this.hot.selection.selectedHeader.cols,s=this.hot.getSelectedRange(),a=E.get(this),l=e.realTarget.className.indexOf("columnSorting")>-1;if(!s||!i||a.pressed||0!==e.button||l)return a.pressed=!1,a.columnsToMove.length=0,void v(this.hot.rootElement,["on-moving--columns","show-ui"]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var d=s,h=d.from,f=d.to,p=Math.min(h.col,f.col),g=Math.max(h.col,f.col);if(t.row<0&&t.col>=p&&t.col<=g){n.column=!0,a.pressed=!0,a.target.eventPageX=e.pageX,a.coordsColumn=t.col,a.target.TD=o,a.target.col=t.col,a.columnsToMove=this.prepareColumnsToMoving(p,g),a.hasRowHeaders=!!this.hot.getSettings().rowHeaders,a.countCols=this.hot.countCols(),a.fixedColumns=this.hot.getSettings().fixedColumnsLeft,a.rootElementOffset=y(this.hot.rootElement).left;var m=a.hasRowHeaders?-1:0,b=r.holder.scrollTop+r.getColumnHeaderHeight(0)+1,C=t.col-1?v(this.hot.rootElement,"show-ui"):w(this.hot.rootElement,"show-ui"),n.row=!0,n.column=!0,n.cell=!0,i.coordsColumn=t.col,i.target.TD=o)},onMouseUp:function(){var e=E.get(this);if(e.coordsColumn=void 0,e.pressed=!1,e.backlightWidth=0,v(this.hot.rootElement,["on-moving--columns","show-ui","after-selection--columns"]),this.hot.selection.selectedHeader.cols&&w(this.hot.rootElement,"after-selection--columns"),!(e.columnsToMove.length<1||void 0===e.target.col||e.columnsToMove.indexOf(e.target.col)>-1)){if(this.moveColumns(e.columnsToMove,e.target.col),this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),!e.disallowMoving){var t=this.columnsMapper.getIndexByValue(e.columnsToMove[0]),o=this.columnsMapper.getIndexByValue(e.columnsToMove[e.columnsToMove.length-1]);this.changeSelection(t,o)}e.columnsToMove.length=0}},onAfterScrollVertically:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnHeaderHeight(0)+1,o=e.holder.scrollTop,n=t+o;this.backlight.setPosition(n),this.backlight.setSize(null,e.hider.offsetHeight-n)},onAfterCreateCol:function(e,t){this.columnsMapper.shiftItems(e,t)},onBeforeRemoveCol:function(e,t){var o=this;this.removedColumns.length=0,!1!==e&&b(e,e+t-1,function(e){o.removedColumns.push(o.hot.runHooks("modifyCol",e,o.pluginName))})},onAfterRemoveCol:function(e,t){this.columnsMapper.unshiftItems(this.removedColumns)},onAfterLoadData:function(e){this.updateColumnsMapper()},onModifyCol:function(e,t){if(t!==this.pluginName){var o=this.columnsMapper.getValueByIndex(e);e=null===o?e:o}return e},onUnmodifyCol:function(e){var t=this.columnsMapper.getIndexByValue(e);return null===t?e:t},onAfterPluginsInitialized:function(){this.updateColumnsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()},destroy:function(){this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,T.prototype,"destroy").call(this)}},{},f),_("ManualColumnMove",O),p.hooks.register("beforeColumnMove"),p.hooks.register("afterColumnMove"),p.hooks.register("unmodifyCol")},{"_base.js":62,browser:24,columnsMapper:96,eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/number":52,plugins:61,"ui/backlight":99,"ui/guideline":100}],98:[function(e,t,o){"use strict";Object.defineProperties(o,{BaseUI:{get:function(){return i}},__esModule:{value:!0}});var n,r=((n=e("helpers/number"))&&n.__esModule&&n||{default:n}).isNumeric,i=function(e){this.hot=e,this._element=null,this.state=0};$traceurRuntime.createClass(i,{appendTo:function(e){e.appendChild(this._element),this.state=2},build:function(){this._element=document.createElement("div"),this.state=1},destroy:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0},isAppended:function(){return 2===this.state},isBuilt:function(){return this.state>=1},setPosition:function(e,t){r(e)&&(this._element.style.top=e+"px"),r(t)&&(this._element.style.left=t+"px")},getPosition:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}},setSize:function(e,t){r(e)&&(this._element.style.width=e+"px"),r(t)&&(this._element.style.height=t+"px")},getSize:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}},setOffset:function(e,t){r(e)&&(this._element.style.marginTop=e+"px"),r(t)&&(this._element.style.marginLeft=t+"px")},getOffset:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}},{})},{"helpers/number":52}],99:[function(e,t,o){"use strict";Object.defineProperties(o,{BacklightUI:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=((n=e("_base"))&&n.__esModule&&n||{default:n}).BaseUI,s=((r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}).addClass,a=function(e){$traceurRuntime.superConstructor(l).call(this,e)},l=a;$traceurRuntime.createClass(a,{build:function(){$traceurRuntime.superGet(this,l.prototype,"build").call(this),s(this._element,"ht__manualColumnMove--backlight")}},{},i)},{_base:98,"helpers/dom/element":47}],100:[function(e,t,o){"use strict";Object.defineProperties(o,{GuidelineUI:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=((n=e("_base"))&&n.__esModule&&n||{default:n}).BaseUI,s=((r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}).addClass,a=function(e){$traceurRuntime.superConstructor(l).call(this,e)},l=a;$traceurRuntime.createClass(a,{build:function(){$traceurRuntime.superGet(this,l.prototype,"build").call(this),s(this._element,"ht__manualColumnMove--guideline")}},{},i)},{_base:98,"helpers/dom/element":47}],101:[function(e,t,o){"use strict";Object.defineProperties(o,{ManualColumnResize:{get:function(){return M}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,h=((r=e("_base.js"))&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},p=f.addClass,g=f.hasClass,m=f.removeClass,w=f.outerHeight,v=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).eventManager,y=(a=e("helpers/dom/event"))&&a.__esModule&&a||{default:a},b=y.pageX,C=(y.pageY,((l=e("helpers/array"))&&l.__esModule&&l||{default:l}).arrayEach),_=((u=e("helpers/number"))&&u.__esModule&&u||{default:u}).rangeEach,R=((c=e("plugins"))&&c.__esModule&&c||{default:c}).registerPlugin,M=function(e){$traceurRuntime.superConstructor(S).call(this,e),this.currentTH=null,this.currentCol=null,this.selectedCols=[],this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=document.createElement("DIV"),this.guide=document.createElement("DIV"),this.eventManager=v(this),this.pressed=null,this.dblclick=0,this.autoresizeTimeout=null,this.manualColumnWidths=[],p(this.handle,"manualColumnResizer"),p(this.guide,"manualColumnResizerGuide")},S=M;$traceurRuntime.createClass(M,{isEnabled:function(){return this.hot.getSettings().manualColumnResize},enablePlugin:function(){var e=this;if(!this.enabled){this.manualColumnWidths=[];var t=this.hot.getSettings().manualColumnResize,o=this.loadManualColumnWidths();this.addHook("modifyColWidth",function(t,o){return e.onModifyColWidth(t,o)}),this.addHook("beforeStretchingColumnWidth",function(t,o){return e.onBeforeStretchingColumnWidth(t,o)}),this.addHook("beforeColumnResize",function(t,o,n){return e.onBeforeColumnResize(t,o,n)}),void 0!==o?this.manualColumnWidths=o:Array.isArray(t)?this.manualColumnWidths=t:this.manualColumnWidths=[],d.hooks.register("beforeColumnResize"),d.hooks.register("afterColumnResize"),this.bindEvents(),$traceurRuntime.superGet(this,S.prototype,"enablePlugin").call(this)}},updatePlugin:function(){var e=this.hot.getSettings().manualColumnResize;Array.isArray(e)?this.manualColumnWidths=e:e||(this.manualColumnWidths=[])},disablePlugin:function(){$traceurRuntime.superGet(this,S.prototype,"disablePlugin").call(this)},saveManualColumnWidths:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.manualColumnWidths)},loadManualColumnWidths:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",e),e.value},setupHandlePosition:function(e){var t=this;if(!e.parentNode)return!1;this.currentTH=e;var o=this.hot.view.wt.wtTable.getCoords(e).col,n=w(this.currentTH);if(o>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentCol=o,this.selectedCols=[],this.hot.selection.isSelected()&&this.hot.selection.selectedHeader.cols){var i=this.hot.getSelectedRange(),s=i.from,a=i.to,l=s.col,u=a.col;l>=u&&(l=a.col,u=s.col),this.currentCol>=l&&this.currentCol<=u?_(l,u,function(e){return t.selectedCols.push(e)}):this.selectedCols.push(this.currentCol)}else this.selectedCols.push(this.currentCol);this.startOffset=r.left-6,this.startWidth=parseInt(r.width,10),this.handle.style.top=r.top+"px",this.handle.style.left=this.startOffset+this.startWidth+"px",this.handle.style.height=n+"px",this.hot.rootElement.appendChild(this.handle)}},refreshHandlePosition:function(){this.handle.style.left=this.startOffset+this.currentWidth+"px"},setupGuidePosition:function(){var e=parseInt(w(this.handle),10),t=parseInt(this.handle.style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);p(this.handle,"active"),p(this.guide,"active"),this.guide.style.top=t+"px",this.guide.style.left=this.handle.style.left,this.guide.style.height=o-e+"px",this.hot.rootElement.appendChild(this.guide)},refreshGuidePosition:function(){this.guide.style.left=this.handle.style.left},hideHandleAndGuide:function(){m(this.handle,"active"),m(this.guide,"active")},checkIfColumnHeader:function(e){if(e!=this.hot.rootElement){var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}return!1},getTHFromTargetElement:function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:this.getTHFromTargetElement(e.parentNode):null},onMouseOver:function(e){if(this.checkIfColumnHeader(e.target)){var t=this.getTHFromTargetElement(e.target);if(!t)return;var o=t.getAttribute("colspan");!t||null!==o&&1!==o||this.pressed||this.setupHandlePosition(t)}},afterMouseDownTimeout:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},o=function(o,n){var r=e.hot.runHooks("beforeColumnResize",o,e.newSize,!0);void 0!==r&&(e.newSize=r),"all"===e.hot.getSettings().stretchH?e.clearManualSize(o):e.setManualSize(o,e.newSize),n&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",o,e.newSize,!0)};if(this.dblclick>=2){this.selectedCols.length>1?(C(this.selectedCols,function(e){o(e)}),t()):C(this.selectedCols,function(e){o(e,!0)})}this.dblclick=0,this.autoresizeTimeout=null},onMouseDown:function(e){var t=this;g(e.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startX=b(e),this.newSize=this.startWidth)},onMouseMove:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+(b(e)-this.startX),C(this.selectedCols,function(e){t.newSize=t.setManualSize(e,t.currentWidth)}),this.refreshHandlePosition(),this.refreshGuidePosition())},onMouseUp:function(e){var t=this,o=function(){t.hot.forceFullRender=!0,t.hot.view.render(),t.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(e,n){t.hot.runHooks("beforeColumnResize",e,t.newSize),n&&o(),t.saveManualColumnWidths(),t.hot.runHooks("afterColumnResize",e,t.newSize)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startWidth){this.selectedCols.length>1?(C(this.selectedCols,function(e){n(e)}),o()):C(this.selectedCols,function(e){n(e,!0)})}this.setupHandlePosition(this.currentTH)}},bindEvents:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(t){return e.onMouseUp(t)})},setManualSize:function(e,t){return t=Math.max(t,20),e=this.hot.runHooks("modifyCol",e),this.manualColumnWidths[e]=t,t},clearManualSize:function(e){e=this.hot.runHooks("modifyCol",e),this.manualColumnWidths[e]=void 0},onModifyColWidth:function(e,t){return this.enabled&&(t=this.hot.runHooks("modifyCol",t),this.hot.getSettings().manualColumnResize&&this.manualColumnWidths[t])?this.manualColumnWidths[t]:e},onBeforeStretchingColumnWidth:function(e,t){var o=this.manualColumnWidths[t];return void 0===o&&(o=e),o},onBeforeColumnResize:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}},{},h),R("manualColumnResize",M)},{"_base.js":62,browser:24,eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/number":52,plugins:61}],102:[function(e,t,o){"use strict";Object.defineProperties(o,{ManualRowMove:{get:function(){return O}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f=((n=e("_base.js"))&&n.__esModule&&n||{default:n}).default,p=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,g=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,m=(s=e("helpers/dom/element"))&&s.__esModule&&s||{default:s},w=m.addClass,v=m.removeClass,y=m.offset,b=((a=e("helpers/number"))&&a.__esModule&&a||{default:a}).rangeEach,C=((l=e("eventManager"))&&l.__esModule&&l||{default:l}).eventManager,_=((u=e("plugins"))&&u.__esModule&&u||{default:u}).registerPlugin,R=((c=e("rowsMapper"))&&c.__esModule&&c||{default:c}).RowsMapper,M=((d=e("ui/backlight"))&&d.__esModule&&d||{default:d}).BacklightUI,S=((h=e("ui/guideline"))&&h.__esModule&&h||{default:h}).GuidelineUI,E=new WeakMap,O=function(e){$traceurRuntime.superConstructor(T).call(this,e),E.set(this,{rowsToMove:[],pressed:void 0,disallowMoving:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0}}),this.removedRows=[],this.rowsMapper=new R(this),this.eventManager=C(this),this.backlight=new M(e),this.guideline=new S(e)},T=O;$traceurRuntime.createClass(O,{isEnabled:function(){return!!this.hot.getSettings().manualRowMove},enablePlugin:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(t,o,n,r){return e.onBeforeOnCellMouseDown(t,o,n,r)}),this.addHook("beforeOnCellMouseOver",function(t,o,n,r){return e.onBeforeOnCellMouseOver(t,o,n,r)}),this.addHook("afterScrollHorizontally",function(){return e.onAfterScrollHorizontally()}),this.addHook("modifyRow",function(t,o){return e.onModifyRow(t,o)}),this.addHook("beforeRemoveRow",function(t,o){return e.onBeforeRemoveRow(t,o)}),this.addHook("afterRemoveRow",function(t,o){return e.onAfterRemoveRow(t,o)}),this.addHook("afterCreateRow",function(t,o){return e.onAfterCreateRow(t,o)}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),this.addHook("beforeColumnSort",function(t,o){return e.onBeforeColumnSort(t,o)}),this.addHook("unmodifyRow",function(t){return e.onUnmodifyRow(t)}),this.registerEvents(),w(this.hot.rootElement,"ht__manualRowMove"),$traceurRuntime.superGet(this,T.prototype,"enablePlugin").call(this))},updatePlugin:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),$traceurRuntime.superGet(this,T.prototype,"updatePlugin").call(this)},disablePlugin:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),v(this.hot.rootElement,"ht__manualRowMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,T.prototype,"disablePlugin").call(this)},moveRow:function(e,t){this.moveRows([e],t)},moveRows:function(e,t){var o=this,n=E.get(this),r=this.hot.runHooks("beforeRowMove",e,t);n.disallowMoving=!1===r,n.disallowMoving||(g(e,function(e,t,n){n[t]=o.rowsMapper.getValueByIndex(e)}),g(e,function(e,n){var r=o.rowsMapper.getIndexByValue(e);r!==t&&o.rowsMapper.moveRow(r,t+n)}),this.rowsMapper.clearNull()),this.hot.runHooks("afterRowMove",e,t)},changeSelection:function(e,t){var o=this.hot.selection,n=this.hot.countCols()-1;o.setRangeStartOnly(new WalkontableCellCoords(e,0)),o.setRangeEnd(new WalkontableCellCoords(t,n),!1)},getRowsHeight:function(e,t){for(var o=0,n=e;nthis.hot.getSettings().fixedRowsBottom},persistentStateSave:function(){p.hooks.run(this.hot,"persistentStateSave","manualRowMove",this.rowsMapper._arrayMap)},persistentStateLoad:function(){var e={};return p.hooks.run(this.hot,"persistentStateLoad","manualRowMove",e),e.value?e.value:[]},prepareRowsToMoving:function(){var e=this.hot.getSelectedRange(),t=[];if(!e)return t;var o=e,n=o.from,r=o.to,i=Math.min(n.row,r.row),s=Math.max(n.row,r.row);return b(i,s,function(e){t.push(e)}),t},refreshPositions:function(){var e=E.get(this),t=e.target.coords,o=this.hot.view.wt.wtTable.getFirstVisibleRow(),n=this.hot.view.wt.wtTable.getLastVisibleRow(),r=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();t.row0&&this.hot.scrollViewportTo(o-1),t.row>=n&&n0?o-1:o:a.offsetHeight/2+u<=c?(e.target.row=t.row+1,u+=0===t.row?a.offsetHeight-1:a.offsetHeight):e.target.row=t.row;var g=c,m=u;c+p+f>=d?g=d-p-f:c+f=d-1&&(m=d-1);var w=0;this.hot.view.wt.wtOverlays.topOverlay&&(w=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=r&&m-s.holder.scrollTope){var n=e-1,r=[];g(this.rowsMapper._arrayMap,function(e,t,o){e>n&&r.push(t)}),this.rowsMapper.removeItems(r)}},registerEvents:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document.documentElement,"mouseup",function(){return e.onMouseUp()})},unregisterEvents:function(){this.eventManager.clear()},onBeforeColumnSort:function(e,t){E.get(this).disallowMoving=void 0!==t},onBeforeOnCellMouseDown:function(e,t,o,n){var r=this.hot.view.wt.wtTable,i=this.hot.selection.selectedHeader.rows,s=this.hot.getSelectedRange(),a=E.get(this);if(!s||!i||a.pressed||0!==e.button)return a.pressed=!1,a.rowsToMove.length=0,void v(this.hot.rootElement,["on-moving--rows","show-ui"]);var l=this.guideline.isBuilt()&&!this.guideline.isAppended(),u=this.backlight.isBuilt()&&!this.backlight.isAppended();l&&u&&(this.guideline.appendTo(r.hider),this.backlight.appendTo(r.hider));var c=s,d=c.from,h=c.to,f=Math.min(d.row,h.row),p=Math.max(d.row,h.row);if(t.col<0&&t.row>=f&&t.row<=p){n.row=!0,a.pressed=!0,a.target.eventPageY=e.pageY,a.target.coords=t,a.target.TD=o,a.rowsToMove=this.prepareRowsToMoving();var g=r.holder.scrollLeft+r.getColumnWidth(-1);this.backlight.setPosition(null,g),this.backlight.setSize(r.hider.offsetWidth-g,this.getRowsHeight(f,p+1)),this.backlight.setOffset(-1*(this.getRowsHeight(f,t.row)+e.layerY),null),w(this.hot.rootElement,"on-moving--rows"),this.refreshPositions()}else v(this.hot.rootElement,"after-selection--rows"),a.pressed=!1,a.rowsToMove.length=0},onMouseMove:function(e){var t=E.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var o=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout(function(){this.backlight.setPosition(null,o)})}t.target.eventPageY=e.pageY,this.refreshPositions()}},onBeforeOnCellMouseOver:function(e,t,o,n){var r=this.hot.getSelectedRange(),i=E.get(this);r&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?v(this.hot.rootElement,"show-ui"):w(this.hot.rootElement,"show-ui"),n.row=!0,n.column=!0,n.cell=!0,i.target.coords=t,i.target.TD=o)},onMouseUp:function(){var e=E.get(this),t=e.target.row,o=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,v(this.hot.rootElement,["on-moving--rows","show-ui","after-selection--rows"]),this.hot.selection.selectedHeader.rows&&w(this.hot.rootElement,"after-selection--rows"),!(o<1||void 0===t||e.rowsToMove.indexOf(t)>-1||e.rowsToMove[o-1]===t-1)){if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){var n=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),r=this.rowsMapper.getIndexByValue(e.rowsToMove[o-1]);this.changeSelection(n,r)}e.rowsToMove.length=0}},onAfterScrollHorizontally:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnWidth(-1),o=e.holder.scrollLeft,n=t+o;this.backlight.setPosition(null,n),this.backlight.setSize(e.hider.offsetWidth-n)},onAfterCreateRow:function(e,t){this.rowsMapper.shiftItems(e,t)},onBeforeRemoveRow:function(e,t){var o=this;this.removedRows.length=0,!1!==e&&b(e,e+t-1,function(e){o.removedRows.push(o.hot.runHooks("modifyRow",e,o.pluginName))})},onAfterRemoveRow:function(e,t){this.rowsMapper.unshiftItems(this.removedRows)},onAfterLoadData:function(e){this.updateRowsMapper()},onModifyRow:function(e,t){if(t!==this.pluginName){var o=this.rowsMapper.getValueByIndex(e);e=null===o?e:o}return e},onUnmodifyRow:function(e){var t=this.rowsMapper.getIndexByValue(e);return null===t?e:t},onAfterPluginsInitialized:function(){this.updateRowsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()},destroy:function(){this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,T.prototype,"destroy").call(this)}},{},f),_("ManualRowMove",O),p.hooks.register("beforeRowMove"),p.hooks.register("afterRowMove"),p.hooks.register("unmodifyRow")},{"_base.js":62,browser:24,eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/number":52,plugins:61,rowsMapper:103,"ui/backlight":105,"ui/guideline":106}],103:[function(e,t,o){"use strict";Object.defineProperties(o,{RowsMapper:{get:function(){return f}},__esModule:{value:!0}});var n,r,i,s,a,l=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,u=((r=e("mixins/arrayMapper"))&&r.__esModule&&r||{default:r}).arrayMapper,c=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayFilter,d=((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).mixin,h=((a=e("helpers/number"))&&a.__esModule&&a||{default:a}).rangeEach,f=function(e){this.manualRowMove=e};$traceurRuntime.createClass(f,{createMap:function(e){var t=this,o=void 0===e?this._arrayMap.length:e;this._arrayMap.length=0,h(o-1,function(e){t._arrayMap[e]=e})},destroy:function(){this._arrayMap=null},moveRow:function(e,t){var o=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,o)},clearNull:function(){this._arrayMap=c(this._arrayMap,function(e){return null!==e})}},{}),d(f,u),l.utils.ManualRowMoveRowsMapper=f},{browser:24,"helpers/array":43,"helpers/number":52,"helpers/object":53,"mixins/arrayMapper":57}],104:[function(e,t,o){"use strict";Object.defineProperties(o,{BaseUI:{get:function(){return n}},__esModule:{value:!0}});var n=function(e){this.hot=e,this._element=null,this.state=0};$traceurRuntime.createClass(n,{appendTo:function(e){e.appendChild(this._element),this.state=2},build:function(){this._element=document.createElement("div"),this.state=1},destroy:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0},isAppended:function(){return 2===this.state},isBuilt:function(){return this.state>=1},setPosition:function(e,t){e&&(this._element.style.top=e+"px"),t&&(this._element.style.left=t+"px")},getPosition:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}},setSize:function(e,t){e&&(this._element.style.width=e+"px"),t&&(this._element.style.height=t+"px")},getSize:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}},setOffset:function(e,t){e&&(this._element.style.marginTop=e+"px"),t&&(this._element.style.marginLeft=t+"px")},getOffset:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}},{})},{}],105:[function(e,t,o){"use strict";Object.defineProperties(o,{BacklightUI:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=((n=e("_base"))&&n.__esModule&&n||{default:n}).BaseUI,s=((r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}).addClass,a=function(e){$traceurRuntime.superConstructor(l).call(this,e)},l=a;$traceurRuntime.createClass(a,{build:function(){$traceurRuntime.superGet(this,l.prototype,"build").call(this),s(this._element,"ht__manualRowMove--backlight")}},{},i)},{_base:104,"helpers/dom/element":47}],106:[function(e,t,o){"use strict";Object.defineProperties(o,{GuidelineUI:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=((n=e("_base"))&&n.__esModule&&n||{default:n}).BaseUI,s=((r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}).addClass,a=function(e){$traceurRuntime.superConstructor(l).call(this,e)},l=a;$traceurRuntime.createClass(a,{build:function(){$traceurRuntime.superGet(this,l.prototype,"build").call(this),s(this._element,"ht__manualRowMove--guideline")}},{},i)},{_base:104,"helpers/dom/element":47}],107:[function(e,t,o){"use strict";Object.defineProperties(o,{ManualRowResize:{get:function(){return M}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,h=((r=e("_base.js"))&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},p=f.addClass,g=f.hasClass,m=f.removeClass,w=f.outerWidth,v=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).eventManager,y=(a=e("helpers/dom/event"))&&a.__esModule&&a||{default:a},b=(y.pageX,y.pageY),C=((l=e("helpers/array"))&&l.__esModule&&l||{default:l}).arrayEach,_=((u=e("helpers/number"))&&u.__esModule&&u||{default:u}).rangeEach,R=((c=e("plugins"))&&c.__esModule&&c||{default:c}).registerPlugin,M=function(e){$traceurRuntime.superConstructor(S).call(this,e),this.currentTH=null,this.currentRow=null,this.selectedRows=[],this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=document.createElement("DIV"),this.guide=document.createElement("DIV"),this.eventManager=v(this),this.pressed=null,this.dblclick=0,this.autoresizeTimeout=null,this.manualRowHeights=[],p(this.handle,"manualRowResizer"),p(this.guide,"manualRowResizerGuide")},S=M;$traceurRuntime.createClass(M,{isEnabled:function(){return this.hot.getSettings().manualRowResize},enablePlugin:function(){var e=this;if(!this.enabled){this.manualRowHeights=[];var t=this.hot.getSettings().manualRowResize,o=this.loadManualRowHeights();void 0!==o?this.manualRowHeights=o:Array.isArray(t)?this.manualRowHeights=t:this.manualRowHeights=[],this.addHook("modifyRowHeight",function(t,o){return e.onModifyRowHeight(t,o)}),d.hooks.register("beforeRowResize"),d.hooks.register("afterRowResize"),this.bindEvents(),$traceurRuntime.superGet(this,S.prototype,"enablePlugin").call(this)}},updatePlugin:function(){var e=this.hot.getSettings().manualRowResize;Array.isArray(e)?this.manualRowHeights=e:e||(this.manualRowHeights=[])},disablePlugin:function(){$traceurRuntime.superGet(this,S.prototype,"disablePlugin").call(this)},saveManualRowHeights:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.manualRowHeights)},loadManualRowHeights:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",e),e.value},setupHandlePosition:function(e){var t=this;this.currentTH=e;var o=this.hot.view.wt.wtTable.getCoords(e).row,n=w(this.currentTH);if(o>=0){var r=this.currentTH.getBoundingClientRect();if(this.currentRow=o,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.selectedHeader.rows){var i=this.hot.getSelectedRange(),s=i.from,a=i.to,l=s.row,u=a.row;l>=u&&(l=a.row,u=s.row),this.currentRow>=l&&this.currentRow<=u?_(l,u,function(e){return t.selectedRows.push(e)}):this.selectedRows.push(this.currentRow)}else this.selectedRows.push(this.currentRow);this.startOffset=r.top-6,this.startHeight=parseInt(r.height,10),this.handle.style.left=r.left+"px",this.handle.style.top=this.startOffset+this.startHeight+"px",this.handle.style.width=n+"px",this.hot.rootElement.appendChild(this.handle)}},refreshHandlePosition:function(){ this.handle.style.top=this.startOffset+this.currentHeight+"px"},setupGuidePosition:function(){var e=parseInt(w(this.handle),10),t=parseInt(this.handle.style.left,10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);p(this.handle,"active"),p(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left=t+"px",this.guide.style.width=o-e+"px",this.hot.rootElement.appendChild(this.guide)},refreshGuidePosition:function(){this.guide.style.top=this.handle.style.top},hideHandleAndGuide:function(){m(this.handle,"active"),m(this.guide,"active")},checkIfRowHeader:function(e){if(e!=this.hot.rootElement){var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}return!1},getTHFromTargetElement:function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:this.getTHFromTargetElement(e.parentNode):null},onMouseOver:function(e){if(this.checkIfRowHeader(e.target)){var t=this.getTHFromTargetElement(e.target);t&&(this.pressed||this.setupHandlePosition(t))}},afterMouseDownTimeout:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},o=function(o,n){var r=e.hot.runHooks("beforeRowResize",o,e.newSize,!0);void 0!==r&&(e.newSize=r),e.setManualSize(o,e.newSize),n&&t(),e.hot.runHooks("afterRowResize",o,e.newSize,!0)};if(this.dblclick>=2){this.selectedRows.length>1?(C(this.selectedRows,function(e){o(e)}),t()):C(this.selectedRows,function(e){o(e,!0)})}this.dblclick=0,this.autoresizeTimeout=null},onMouseDown:function(e){var t=this;g(e.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null==this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startY=b(e),this.newSize=this.startHeight)},onMouseMove:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+(b(e)-this.startY),C(this.selectedRows,function(e){t.newSize=t.setManualSize(e,t.currentHeight)}),this.refreshHandlePosition(),this.refreshGuidePosition())},onMouseUp:function(e){var t=this,o=function(){t.hot.forceFullRender=!0,t.hot.view.render(),t.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(e,n){t.hot.runHooks("beforeRowResize",e,t.newSize),n&&o(),t.saveManualRowHeights(),t.hot.runHooks("afterRowResize",e,t.newSize)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startHeight){this.selectedRows.length>1?(C(this.selectedRows,function(e){n(e)}),o()):C(this.selectedRows,function(e){n(e,!0)})}this.setupHandlePosition(this.currentTH)}},bindEvents:function(){var e=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(window,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(window,"mouseup",function(t){return e.onMouseUp(t)})},setManualSize:function(e,t){return e=this.hot.runHooks("modifyRow",e),this.manualRowHeights[e]=t,t},onModifyRowHeight:function(e,t){if(this.enabled){var o=this.hot.getPlugin("autoRowSize"),n=o?o.heights[t]:null;t=this.hot.runHooks("modifyRow",t);var r=this.manualRowHeights[t];if(void 0!==r&&(r===n||r>(e||0)))return r}return e}},{},h),R("manualRowResize",M)},{"_base.js":62,browser:24,eventManager:42,"helpers/array":43,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/number":52,plugins:61}],108:[function(e,t,o){"use strict";function n(){var e=[];return e.getInfo=function(e,t){for(var o=0,n=this.length;o=e&&this[o].col<=t&&this[o].col+this[o].colspan-1>=t)return this[o]},e.setInfo=function(e){for(var t=0,o=this.length;t0?n.row=i.row+i.rowspan-1-r.row+o.row:o.row<0&&(n.row=r.row-i.row+o.row),o.col>0?n.col=i.col+i.colspan-1-r.col+o.col:o.col<0&&(n.col=r.col-i.col+o.col)}var d=new v(t.highlight.row+n.row,t.highlight.col+n.col),h=this.mergedCellInfoCollection.getInfo(d.row,d.col);h&&(this.lastDesiredCoords=d,n={row:h.row-r.row,col:h.col-r.col})}else if("modifyTransformEnd"==e)for(var s=0,a=this.mergedCellInfoCollection.length;s0){var m=t.highlight.isEqual(p.from);g.indexOf("top")>-1?t.to.isSouthEastOf(p.from)&&m?t.setDirection("NW-SE"):t.to.isSouthWestOf(p.from)&&m&&t.setDirection("NE-SW"):g.indexOf("bottom")>-1&&(t.to.isNorthEastOf(p.from)&&m?t.setDirection("SW-NE"):t.to.isNorthWestOf(p.from)&&m&&t.setDirection("SE-NW"))}var d=function(e){return new v(t.to.row+e.row,t.to.col+e.col)}(n),w=function(e,t){return t.row>=e.row&&t.row<=e.row+e.rowspan-1}(f,d),b=function(e,t){return t.col>=e.col&&t.col<=e.col+e.colspan-1}(f,d);t.includesRange(p)&&(p.includes(d)||w||b)&&(w&&(n.row<0?n.row-=f.rowspan-1:n.row>0&&(n.row+=f.rowspan-1)),b&&(n.col<0?n.col-=f.colspan-1:n.col>0&&(n.col+=f.colspan-1)))}0!==n.row&&(o.row=n.row),0!==n.col&&(o.col=n.col)},r.prototype.shiftCollection=function(e,t,o){var n=[0,0];switch(e){case"right":n[0]+=1;break;case"left":n[0]-=1;break;case"down":n[1]+=1;break;case"up":n[1]-=1}for(var r=0;r0&&o.from.row>=n&&(o.from.row=o.from-1),o.from.col<0?o.from.col=0:o.from.col>0&&o.from.col>=r&&(o.from.col=r-1)}}}},T=function(e){if(this.lastDesiredCoords=null,this.getSettings().mergeCells){var t=this.getSelectedRange();t.highlight=new v(t.highlight.row,t.highlight.col),t.to=e;var o=!1;do{o=!1;for(var n=0,r=this.mergeCells.mergedCellInfoCollection.length;ne.endRow)return e.endRow=r,D.call(this,e)}}},H=function(e){if(this.getSettings().mergeCells)for(var t,o=this.countRows(),n=0;ne.endColumn)return e.endColumn=r,H.call(this,e)}}},A=function(e){if(e&&this.mergeCells){var t=this.mergeCells.mergedCellInfoCollection,o=this.getSelectedRange();for(var n in t)if(o.highlight.row==t[n].row&&o.highlight.col==t[n].col&&o.to.row==t[n].row+t[n].rowspan-1&&o.to.col==t[n].col+t[n].colspan-1)return!1}return e};m.hooks.add("beforeInit",C),m.hooks.add("afterInit",_),m.hooks.add("afterUpdateSettings",R),m.hooks.add("beforeKeyDown",M),m.hooks.add("modifyTransformStart",O("modifyTransformStart")),m.hooks.add("modifyTransformEnd",O("modifyTransformEnd")),m.hooks.add("beforeSetRangeEnd",T),m.hooks.add("beforeDrawBorders",k),m.hooks.add("afterIsMultipleSelection",A),m.hooks.add("afterRenderer",E),m.hooks.add("afterContextMenuDefaultOptions",S),m.hooks.add("afterGetCellMeta",x),m.hooks.add("afterViewportRowCalculatorOverride",D),m.hooks.add("afterViewportColumnCalculatorOverride",H),m.hooks.add("modifyAutofillRange",i),m.hooks.add("afterCreateCol",s),m.hooks.add("afterRemoveCol",a),m.hooks.add("afterCreateRow",l),m.hooks.add("afterRemoveRow",u),m.MergeCells=r},{"3rdparty/walkontable/src/cell/coords":6,"3rdparty/walkontable/src/cell/range":7,"3rdparty/walkontable/src/table":21,browser:24,"helpers/dom/event":48,plugins:61}],109:[function(e,t,o){"use strict";Object.defineProperties(o,{MultipleSelectionHandles:{get:function(){return w}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(((n=e("browser"))&&n.__esModule&&n||{default:n}).default,(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}),c=u.getWindowScrollTop,d=u.hasClass,h=u.getWindowScrollLeft,f=((i=e("helpers/browser"))&&i.__esModule&&i||{default:i}).isMobileBrowser,p=((s=e("_base"))&&s.__esModule&&s||{default:s}).default,g=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).EventManager,m=((l=e("plugins"))&&l.__esModule&&l||{default:l}).registerPlugin,w=function(e){$traceurRuntime.superConstructor(v).call(this,e),this.dragged=[],this.eventManager=null,this.lastSetCell=null},v=w;$traceurRuntime.createClass(w,{isEnabled:function(){return f()},enablePlugin:function(){this.enabled||(this.eventManager||(this.eventManager=new g(this)),this.registerListeners(),$traceurRuntime.superGet(this,v.prototype,"enablePlugin").call(this))},registerListeners:function(){function e(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;var o=t.dragged.indexOf(e);if(-1==o)return!1;0===o?t.dragged=t.dragged.slice(0,1):1==o&&(t.dragged=t.dragged.slice(-1))}var t=this;this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(e){var o;return d(e.target,"topLeftSelectionHandle-HitArea")?(o=t.hot.getSelectedRange(),t.dragged.push("topLeft"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):d(e.target,"bottomRightSelectionHandle-HitArea")?(o=t.hot.getSelectedRange(),t.dragged.push("bottomRight"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(o){return d(o.target,"topLeftSelectionHandle-HitArea")?(e.call(t,"topLeft"),t.touchStartRange=void 0,o.preventDefault(),!1):d(o.target,"bottomRightSelectionHandle-HitArea")?(e.call(t,"bottomRight"),t.touchStartRange=void 0,o.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(e){var o,n,r,i,s,a,l,u=c(),d=h();0!==t.dragged.length&&(o=document.elementFromPoint(e.touches[0].screenX-d,e.touches[0].screenY-u))&&o!==t.lastSetCell&&("TD"!=o.nodeName&&"TH"!=o.nodeName||(n=t.hot.getCoords(o),-1==n.col&&(n.col=0),r=t.hot.getSelectedRange(),i=r.getWidth(),s=r.getHeight(),a=r.getDirection(),1==i&&1==s&&t.hot.selection.setRangeEnd(n),l=t.getCurrentRangeCoords(r,n,t.touchStartRange.direction,a,t.dragged[0]),null!==l.start&&t.hot.selection.setRangeStart(l.start),t.hot.selection.setRangeEnd(l.end),t.lastSetCell=o),e.preventDefault())})},getCurrentRangeCoords:function(e,t,o,n,r){var i=e.getTopLeftCorner(),s=e.getBottomRightCorner(),a=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(o){case"NE-SW":switch(n){case"NE-SW":case"NW-SE":u="topLeft"==r?{start:new WalkontableCellCoords(t.row,e.highlight.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"==r&&(u={start:new WalkontableCellCoords(s.row,t.col),end:new WalkontableCellCoords(t.row,i.col)})}break;case"NW-SE":switch(n){case"NE-SW":"topLeft"==r?u={start:t,end:a}:u.end=t;break;case"NW-SE":"topLeft"==r?u={start:t,end:s}:u.end=t;break;case"SE-NW":"topLeft"==r?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"==r?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(n){case"NW-SE":u="bottomRight"==r?{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(i.row,t.col),end:new WalkontableCellCoords(t.row,s.col)};break;case"SW-NE":u="topLeft"==r?{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,s.col)}:{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"==r?u={start:new WalkontableCellCoords(t.row,l.col),end:new WalkontableCellCoords(i.row,t.col)}:"topLeft"==r&&(u={start:a,end:t})}break;case"SE-NW":switch(n){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"==r&&(u.end=t);break;case"SE-NW":"topLeft"==r?u.end=t:u={start:t,end:i}}}return u},isDragged:function(){return this.dragged.length>0}},{},p),m("multipleSelectionHandles",w)},{_base:62,browser:24,eventManager:42,"helpers/browser":44,"helpers/dom/element":47,plugins:61}],110:[function(e,t,o){"use strict";Object.defineProperties(o,{DataObserver:{get:function(){return d}},__esModule:{value:!0}});var n,r,i,s,a=((n=e("jsonpatch"))&&n.__esModule&&n||{default:n}).default,l=((r=e("../../mixins/localHooks"))&&r.__esModule&&r||{default:r}).localHooks,u=((i=e("../../helpers/object"))&&i.__esModule&&i||{default:i}).mixin,c=((s=e("utils"))&&s.__esModule&&s||{default:s}).cleanPatches,d=function(e){this.observedData=null,this.observer=null,this.paused=!1,this.setObservedData(e)};$traceurRuntime.createClass(d,{setObservedData:function(e){var t=this;this.observer&&a.unobserve(this.observedData,this.observer),this.observedData=e,this.observer=a.observe(this.observedData,function(e){return t.onChange(e)})},isPaused:function(){return this.paused},pause:function(){this.paused=!0},resume:function(){this.paused=!1},onChange:function(e){this.runLocalHooks("change",c(e))},destroy:function(){a.unobserve(this.observedData,this.observer),this.observedData=null,this.observer=null}},{}),u(d,l)},{"../../helpers/object":53,"../../mixins/localHooks":58,jsonpatch:"jsonpatch",utils:112}],111:[function(e,t,o){"use strict";Object.defineProperties(o,{ObserveChanges:{get:function(){return p}},__esModule:{value:!0}});var n,r,i,s,a,l,u=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,c=((r=e("_base"))&&r.__esModule&&r||{default:r}).default,d=(((i=e("jsonpatch"))&&i.__esModule&&i||{default:i}).default,((s=e("dataObserver"))&&s.__esModule&&s||{default:s}).DataObserver),h=((a=e("helpers/array"))&&a.__esModule&&a||{default:a}).arrayEach,f=((l=e("plugins"))&&l.__esModule&&l||{default:l}).registerPlugin;u.hooks.register("afterChangesObserved");var p=function(e){$traceurRuntime.superConstructor(g).call(this,e),this.observer=null},g=p;$traceurRuntime.createClass(p,{isEnabled:function(){return this.hot.getSettings().observeChanges},enablePlugin:function(){var e=this;this.enabled||(this.observer||(this.observer=new d(this.hot.getSourceData()),this._exposePublicApi()),this.observer.addLocalHook("change",function(t){return e.onDataChange(t)}),this.addHook("afterCreateRow",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveRow",function(){return e.onAfterTableAlter()}),this.addHook("afterCreateCol",function(){return e.onAfterTableAlter()}),this.addHook("afterRemoveCol",function(){return e.onAfterTableAlter()}),this.addHook("afterChange",function(t,o){return e.onAfterTableAlter(o)}),this.addHook("afterLoadData",function(t){return e.onAfterLoadData(t)}),$traceurRuntime.superGet(this,g.prototype,"enablePlugin").call(this))},disablePlugin:function(){this.observer&&(this.observer.destroy(),this.observer=null,this._deletePublicApi()),$traceurRuntime.superGet(this,g.prototype,"disablePlugin").call(this)},onDataChange:function(e){var t=this;if(!this.observer.isPaused()){var o=this.pluginName+".change",n={add:function(e){isNaN(e.col)?t.hot.runHooks("afterCreateRow",e.row,1,o):t.hot.runHooks("afterCreateCol",e.col,1,o)},remove:function(e){isNaN(e.col)?t.hot.runHooks("afterRemoveRow",e.row,1,o):t.hot.runHooks("afterRemoveCol",e.col,1,o)},replace:function(e){t.hot.runHooks("afterChange",[e.row,e.col,null,e.value],o)}};h(e,function(e){n[e.op]&&n[e.op](e)}),this.hot.render()}this.hot.runHooks("afterChangesObserved")},onAfterTableAlter:function(e){var t=this;"loadData"!==e&&(this.observer.pause(),this.hot.addHookOnce("afterChangesObserved",function(){return t.observer.resume()}))},onAfterLoadData:function(e){e||this.observer.setObservedData(this.hot.getSourceData())},destroy:function(){this.observer&&(this.observer.destroy(),this._deletePublicApi()),$traceurRuntime.superGet(this,g.prototype,"destroy").call(this)},_exposePublicApi:function(){var e=this,t=this.hot;t.pauseObservingChanges=function(){return e.observer.pause()},t.resumeObservingChanges=function(){return e.observer.resume()},t.isPausedObservingChanges=function(){return e.observer.isPaused()}},_deletePublicApi:function(){var e=this.hot;delete e.pauseObservingChanges,delete e.resumeObservingChanges,delete e.isPausedObservingChanges}},{},c),f("observeChanges",p)},{_base:62,browser:24,dataObserver:110,"helpers/array":43,jsonpatch:"jsonpatch",plugins:61}],112:[function(e,t,o){"use strict";function n(e){var t=[];return e=a(e,function(e){return!/[\/]length/gi.test(e.path)&&!!r(e.path)}),e=l(e,function(e){var t=r(e.path);return e.row=t.row,e.col=t.col,e}),e=a(e,function(e){if(-1!==["add","remove"].indexOf(e.op)&&!isNaN(e.col)){if(-1!==t.indexOf(e.col))return!1;t.push(e.col)}return!0}),t.length=0,e}function r(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);if(!t)return null;var o=t,n=o[1],r=o[2];return{row:parseInt(n,10),col:/^\d*$/.test(r)?parseInt(r,10):r}}Object.defineProperties(o,{cleanPatches:{get:function(){return n}},parsePath:{get:function(){return r}},__esModule:{value:!0}});var i,s=(i=e("../../helpers/array"))&&i.__esModule&&i||{default:i},a=s.arrayFilter,l=s.arrayMap},{"../../helpers/array":43}],113:[function(e,t,o){"use strict";function n(e){var t,o=function(){window.localStorage[e+"__persistentStateKeys"]=JSON.stringify(t)},n=function(){t=[],o()};!function(){var o=window.localStorage[e+"__persistentStateKeys"],n="string"==typeof o?JSON.parse(o):void 0;t=n||[]}(),this.saveValue=function(n,r){window.localStorage[e+"_"+n]=JSON.stringify(r),-1==t.indexOf(n)&&(t.push(n),o())},this.loadValue=function(t,o){t=void 0===t?o:t;var n=window.localStorage[e+"_"+t];return void 0===n?void 0:JSON.parse(n)},this.reset=function(t){window.localStorage.removeItem(e+"_"+t)},this.resetAll=function(){for(var o=0;o0},f.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},f.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},f.UndoRedo.Action=function(){},f.UndoRedo.Action.prototype.undo=function(){},f.UndoRedo.Action.prototype.redo=function(){},f.UndoRedo.ChangeAction=function(e){this.changes=e,this.actionType="change"},w(f.UndoRedo.ChangeAction,f.UndoRedo.Action),f.UndoRedo.ChangeAction.prototype.undo=function(e,t){for(var o=v(this.changes),n=e.countEmptyRows(!0),r=e.countEmptyCols(!0),i=0,s=o.length;i=o&&this.index-nthis.target?this.rows[0]+this.rows.length:this.rows[0],i=[],s=this.rows.length+n,a=n;a0&&e.setDataAtCell(i)}}function h(t){var o=e.getSelectedRange();if(o)for(var n=o.getTopLeftCorner(),r=o.getBottomRightCorner(),i=n.row;i<=r.row;i++)for(var s=n.col;s<=r.col;s++){var a=e.getCellMeta(i,s);if("checkbox"!==a.type)return;var l=e.getCell(i,s);if(null==l)t(i,s,a);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!a.readOnly&&t(u)}}}M("base").apply(this,arguments);var f=(r(e),i()),p=u.label,g=!1;if(void 0===u.checkedTemplate&&(u.checkedTemplate=!0),void 0===u.uncheckedTemplate&&(u.uncheckedTemplate=!1),y(t),l===u.checkedTemplate||C(l,u.checkedTemplate)?f.checked=!0:l===u.uncheckedTemplate||C(l,u.uncheckedTemplate)?f.checked=!1:null===l?b(f,"noValue"):(f.style.display="none",b(f,A),g=!0),f.setAttribute("data-row",o),f.setAttribute("data-col",n),!g&&p){var m="";p.value?m="function"==typeof p.value?p.value.call(this,o,n,a,l):p.value:p.property&&(m=e.getDataAtRowProp(o,p.property));var w=s(m);"before"===p.position?w.appendChild(f):w.insertBefore(f,w.firstChild),f=w}t.appendChild(f),g&&t.appendChild(document.createTextNode("#bad-value#")),D.has(e)||(D.set(e,!0),e.addHook("beforeKeyDown",c))}function r(e){var t=H.get(e);return t||(t=new _(e),t.addEventListener(e.rootElement,"click",function(t){return l(t,e)}),t.addEventListener(e.rootElement,"mouseup",function(t){return a(t,e)}),t.addEventListener(e.rootElement,"change",function(t){return u(t,e)}),H.set(e,t)),t}function i(){var e=document.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.setAttribute("tabindex","-1"),e.cloneNode(!1)}function s(e){var t=document.createElement("label");return t.className="htCheckboxRendererLabel",t.appendChild(document.createTextNode(e)),t.cloneNode(!0)}function a(e,t){c(e.target)&&setTimeout(t.listen,10)}function l(e,t){if(!c(e.target))return!1;var o=parseInt(e.target.getAttribute("data-row"),10),n=parseInt(e.target.getAttribute("data-col"),10);t.getCellMeta(o,n).readOnly&&e.preventDefault()}function u(e,t){if(!c(e.target))return!1;var o=parseInt(e.target.getAttribute("data-row"),10),n=parseInt(e.target.getAttribute("data-col"),10),r=t.getCellMeta(o,n);if(!r.readOnly){var i=null;i=e.target.checked?void 0===r.checkedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(o,n,i)}}function c(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}Object.defineProperties(o,{checkboxRenderer:{get:function(){return n}},__esModule:{value:!0}});var d,h,f,p,g,m,w,v=(d=e("helpers/dom/element"))&&d.__esModule&&d||{default:d},y=v.empty,b=v.addClass,C=(v.hasClass,((h=e("helpers/string"))&&h.__esModule&&h||{default:h}).equalsIgnoreCase),_=((f=e("eventManager"))&&f.__esModule&&f||{default:f}).EventManager,R=(p=e("renderers"))&&p.__esModule&&p||{default:p},M=R.getRenderer,S=R.registerRenderer,E=((g=e("helpers/unicode"))&&g.__esModule&&g||{default:g}).isKey,O=((m=e("helpers/function"))&&m.__esModule&&m||{default:m}).partial,T=(w=e("helpers/dom/event"))&&w.__esModule&&w||{default:w},k=T.stopImmediatePropagation,x=T.isImmediatePropagationStopped,D=new WeakMap,H=new WeakMap,A="htBadValue";S("checkbox",n)},{eventManager:42,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/function":50,"helpers/string":55,"helpers/unicode":56,renderers:117}],121:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,a){l("base").apply(this,arguments),null!==i&&void 0!==i||(i=""),s(t,i)}Object.defineProperties(o,{htmlRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=((r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r}).fastInnerHTML,a=(i=e("renderers"))&&i.__esModule&&i||{default:i},l=a.getRenderer;(0,a.registerRenderer)("html",n)},{"helpers/dom/element":47,renderers:117}],122:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,s){if(d(i)){void 0!==s.language&&a.culture(s.language),i=a(i).format(s.format||"0");var l=s.className||"",c=l.length?l.split(" "):[];c.indexOf("htLeft")<0&&c.indexOf("htCenter")<0&&c.indexOf("htRight")<0&&c.indexOf("htJustify")<0&&c.push("htRight"),c.indexOf("htNumeric")<0&&c.push("htNumeric"),s.className=c.join(" ")}u("text")(e,t,o,n,r,i,s)}Object.defineProperties(o,{numericRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a=((r=e("numbro"))&&r.__esModule&&r||{default:r}).default,l=(i=e("renderers"))&&i.__esModule&&i||{default:i},u=l.getRenderer,c=l.registerRenderer,d=((s=e("helpers/number"))&&s.__esModule&&s||{default:s}).isNumeric;c("numeric",n)},{"helpers/number":52,numbro:"numbro",renderers:117}],123:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,a){l("text").apply(this,arguments),i=t.innerHTML;var u,c=a.hashLength||i.length,d=a.hashSymbol||"*";for(u="";u.split(d).length-13?("function"==typeof n&&(e.__proto__=n),e.prototype=d(a(n),i(t))):e.prototype=t,f(e,"prototype",{configurable:!1,writable:!1}),h(e,i(o))}function a(e){if("function"==typeof e){var t=e.prototype;if(u(t)===t||null===t)return e.prototype;throw new c("super prototype must be an Object or null")}if(null===e)return null;throw new c("Super expression must either be null or a function, not "+typeof e+".")}function l(e,t,n){null!==g(t)&&o(e,t,"constructor",n)}var u=Object,c=TypeError,d=u.create,h=$traceurRuntime.defineProperties,f=$traceurRuntime.defineProperty,p=$traceurRuntime.getOwnPropertyDescriptor,g=Object.getPrototypeOf,m=$traceurRuntime.toProperty,w=Object,v=w.getOwnPropertyNames,y=w.getOwnPropertySymbols;$traceurRuntime.createClass=s,$traceurRuntime.defaultSuperCall=l,$traceurRuntime.superCall=o,$traceurRuntime.superConstructor=t,$traceurRuntime.superGet=n,$traceurRuntime.superSet=r}()},{}],126:[function(e,t,o){"use strict";function n(e){var t=this,o=this;this.eventManager=R(e),this.instance=e,this.settings=e.getSettings(),this.selectionMouseDown=!1;var n=e.rootElement.getAttribute("style");n&&e.rootElement.setAttribute("data-originalstyle",n),p(e.rootElement,"handsontable");var r=document.createElement("TABLE");p(r,"htCore"),e.getSettings().tableClassName&&p(r,e.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),r.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),r.appendChild(this.TBODY),e.table=r,e.container.insertBefore(r,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",function(e){this.selectionMouseDown=!0,o.isTextSelectionAllowed(e.target)||(s(),e.preventDefault(),window.focus())}),this.eventManager.addEventListener(e.rootElement,"mouseup",function(e){this.selectionMouseDown=!1}),this.eventManager.addEventListener(e.rootElement,"mousemove",function(e){this.selectionMouseDown&&!o.isTextSelectionAllowed(e.target)&&(s(),e.preventDefault())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var i;this.isMouseDown=function(){return i},this.eventManager.addEventListener(document.documentElement,"mouseup",function(t){e.selection.isInProgress()&&1===t.which&&e.selection.finish(),i=!1,_(document.activeElement)&&e.unlisten()}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(t){var n=t.target,r=t.target,s=t.x||t.clientX,a=t.y||t.clientY;if(!i&&e.rootElement){if(r===e.view.wt.wtTable.holder){var l=v();if(document.elementFromPoint(s+l,a)!==e.view.wt.wtTable.holder||document.elementFromPoint(s,a+l)!==e.view.wt.wtTable.holder)return}else for(;r!==document.documentElement;){if(null===r){if(t.isTargetWebComponent)break;return}if(r===e.rootElement)return;r=r.parentNode}("function"==typeof o.settings.outsideClickDeselects?o.settings.outsideClickDeselects(n):o.settings.outsideClickDeselects)?e.deselectCell():e.destroyEditor()}}),this.eventManager.addEventListener(r,"selectstart",function(e){o.settings.fragmentSelection||C(e.target)||e.preventDefault()});var s=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},a=[new x({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return o.settings.fillHandle&&!o.isCellEdited()&&!e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!o.isCellEdited()&&!e.selection.isMultiple()}}}),new x({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return o.settings.fillHandle&&!o.isCellEdited()&&e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!o.isCellEdited()&&e.selection.isMultiple()}}}),new x({className:"highlight",highlightHeaderClassName:o.settings.currentHeaderClassName,highlightRowClassName:o.settings.currentRowClassName,highlightColumnClassName:o.settings.currentColClassName}),new x({className:"fill",border:{width:1,color:"red"}})];a.current=a[0],a.area=a[1],a.highlight=a[2],a.fill=a[3];var l={debug:function(){return o.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:r,preventOverflow:function(){return t.settings.preventOverflow},stretchH:function(){return o.settings.stretchH},data:e.getDataAtCell,totalRows:function(){return e.countRows()},totalColumns:function(){return e.countCols()},fixedColumnsLeft:function(){return o.settings.fixedColumnsLeft},fixedRowsTop:function(){return o.settings.fixedRowsTop},fixedRowsBottom:function(){return o.settings.fixedRowsBottom},minSpareRows:function(){return o.settings.minSpareRows},renderAllRows:o.settings.renderAllRows,rowHeaders:function(){var t=[];return e.hasRowHeaders()&&t.push(function(e,t){o.appendRowHeader(e,t)}),h.hooks.run(e,"afterGetRowHeaderRenderers",t),t},columnHeaders:function(){var t=[];return e.hasColHeaders()&&t.push(function(e,t){o.appendColHeader(e,t)}),h.hooks.run(e,"afterGetColumnHeaderRenderers",t),t},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,t,n){var r=o.instance.getCellMeta(e,t),i=o.instance.colToProp(t),s=o.instance.getDataAtRowProp(e,i);o.instance.hasHook("beforeValueRender")&&(s=o.instance.runHooks("beforeValueRender",s)),o.instance.runHooks("beforeRenderer",n,e,t,i,s,r),o.instance.getCellRenderer(r)(o.instance,n,e,t,i,s,r),o.instance.runHooks("afterRenderer",n,e,t,i,s,r)},selections:a,hideBorderOnMouseDownOver:function(){return o.settings.fragmentSelection},onCellMouseDown:function(t,n,r,s){var a={row:!1,column:!1,cells:!1};if(e.listen(),o.activeWt=s,i=!0,h.hooks.run(e,"beforeOnCellMouseDown",t,n,r,a),!E(t)){var l=e.getSelectedRange(),u=e.selection,c=u.selectedHeader;if(t.shiftKey&&l)n.row>=0&&n.col>=0&&!a.cells?(u.setSelectedHeaders(!1,!1),u.setRangeEnd(n)):(c.cols||c.rows)&&n.row>=0&&n.col>=0&&!a.cells?(u.setSelectedHeaders(!1,!1),u.setRangeEnd(new k(n.row,n.col))):c.cols&&n.row<0&&!a.column?u.setRangeEnd(new k(l.to.row,n.col)):c.rows&&n.col<0&&!a.row?u.setRangeEnd(new k(n.row,l.to.col)):(!c.cols&&!c.rows&&n.col<0||c.cols&&n.col<0)&&!a.row?(u.setSelectedHeaders(!0,!1),u.setRangeStartOnly(new k(l.from.row,0)),u.setRangeEnd(new k(n.row,e.countCols()-1))):(!c.cols&&!c.rows&&n.row<0||c.rows&&n.row<0)&&!a.column&&(u.setSelectedHeaders(!1,!0),u.setRangeStartOnly(new k(0,l.from.col)),u.setRangeEnd(new k(e.countRows()-1,n.col)));else{var d=!0;if(l){var f=l,p=f.from,g=f.to,m=!u.inInSelection(n);if(n.row<0&&c.cols){var w=Math.min(p.col,g.col),v=Math.max(p.col,g.col);d=n.colv}else if(n.col<0&&c.rows){var y=Math.min(p.row,g.row),b=Math.max(p.row,g.row);d=n.rowb}else d=m}var C=O(t),_=T(t)||"touchstart"===t.type;n.row<0&&n.col>=0&&!a.column?(u.setSelectedHeaders(!1,!0),(_||C&&d)&&(u.setRangeStartOnly(new k(0,n.col)),u.setRangeEnd(new k(Math.max(e.countRows()-1,0),n.col),!1))):n.col<0&&n.row>=0&&!a.row?(u.setSelectedHeaders(!0,!1),(_||C&&d)&&(u.setRangeStartOnly(new k(n.row,0)),u.setRangeEnd(new k(n.row,Math.max(e.countCols()-1,0)),!1))):n.col>=0&&n.row>=0&&!a.cells?(_||C&&d)&&(u.setSelectedHeaders(!1,!1),u.setRangeStart(n)):n.col<0&&n.row<0&&(n.row=0,n.col=0,u.setSelectedHeaders(!1,!1,!0),u.setRangeStart(n))}h.hooks.run(e,"afterOnCellMouseDown",t,n,r),o.activeWt=o.wt}},onCellMouseOut:function(t,n,r,i){o.activeWt=i,h.hooks.run(e,"beforeOnCellMouseOut",t,n,r),E(t)||(h.hooks.run(e,"afterOnCellMouseOut",t,n,r),o.activeWt=o.wt)},onCellMouseOver:function(t,n,r,s){var a={row:!1,column:!1,cell:!1};o.activeWt=s,h.hooks.run(e,"beforeOnCellMouseOver",t,n,r,a),E(t)||(0===t.button&&i&&(n.row>=0&&n.col,e.selection.selectedHeader.cols&&!a.column?e.selection.setRangeEnd(new k(e.countRows()-1,n.col),!1):e.selection.selectedHeader.rows&&!a.row?e.selection.setRangeEnd(new k(n.row,e.countCols()-1),!1):a.cell||e.selection.setRangeEnd(n)),h.hooks.run(e,"afterOnCellMouseOver",t,n,r),o.activeWt=o.wt)},onCellMouseUp:function(t,n,r,i){o.activeWt=i,h.hooks.run(e,"beforeOnCellMouseUp",t,n,r),h.hooks.run(e,"afterOnCellMouseUp",t,n,r),o.activeWt=o.wt},onCellCornerMouseDown:function(t){t.preventDefault(),h.hooks.run(e,"afterOnCellCornerMouseDown",t)},onCellCornerDblClick:function(t){t.preventDefault(),h.hooks.run(e,"afterOnCellCornerDblClick",t)},beforeDraw:function(e,t){o.beforeRender(e,t)},onDraw:function(e){o.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(t,o){e.runHooks("beforeDrawBorders",t,o)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(t,o){return e.runHooks("beforeStretchingColumnWidth",t,o)},onModifyRowHeaderWidth:function(t){return e.runHooks("modifyRowHeaderWidth",t)},viewportRowCalculatorOverride:function(t){var n=e.countRows(),r=o.settings.viewportRowRenderingOffset;if("auto"===r&&o.settings.fixedRowsTop&&(r=10),"number"==typeof r&&(t.startRow=Math.max(t.startRow-r,0),t.endRow=Math.min(t.endRow+r,n-1)),"auto"===r){var i=t.startRow+t.endRow-t.startRow,s=Math.ceil(i/n*12);t.startRow=Math.max(t.startRow-s,0),t.endRow=Math.min(t.endRow+s,n-1)}e.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var n=e.countCols(),r=o.settings.viewportColumnRenderingOffset;if("auto"===r&&o.settings.fixedColumnsLeft&&(r=10),"number"==typeof r&&(t.startColumn=Math.max(t.startColumn-r,0),t.endColumn=Math.min(t.endColumn+r,n-1)),"auto"===r){var i=t.startColumn+t.endColumn-t.startColumn,s=Math.ceil(i/n*12);t.startRow=Math.max(t.startColumn-s,0),t.endColumn=Math.min(t.endColumn+s,n-1)}e.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return o.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.runHooks("modifyColumnHeaderHeight");return o.settings.columnHeaderHeight||t}};h.hooks.run(e,"beforeInitWalkontable",l),this.wt=new D(l),this.activeWt=this.wt,this.eventManager.addEventListener(o.wt.wtTable.spreader,"mousedown",function(e){e.target===o.wt.wtTable.spreader&&3===e.which&&S(e)}),this.eventManager.addEventListener(o.wt.wtTable.spreader,"contextmenu",function(e){e.target===o.wt.wtTable.spreader&&3===e.which&&S(e)}),this.eventManager.addEventListener(document.documentElement,"click",function(){ o.settings.observeDOMVisibility&&o.wt.drawInterrupted&&(o.instance.forceFullRender=!0,o.render())})}Object.defineProperties(o,{TableView:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l,u,c,d,h=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},p=f.addClass,g=f.empty,m=f.fastInnerHTML,w=f.fastInnerText,v=f.getScrollbarWidth,y=f.hasClass,b=f.isChildOf,C=f.isInput,_=f.isOutsideInput,R=(f.removeClass,((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).createObjectPropListener,((a=e("eventManager"))&&a.__esModule&&a||{default:a}).eventManager),M=(l=e("helpers/dom/event"))&&l.__esModule&&l||{default:l},S=M.stopPropagation,E=M.isImmediatePropagationStopped,O=M.isRightClick,T=M.isLeftClick,k=((u=e("3rdparty/walkontable/src/cell/coords"))&&u.__esModule&&u||{default:u}).WalkontableCellCoords,x=((c=e("3rdparty/walkontable/src/selection"))&&c.__esModule&&c||{default:c}).WalkontableSelection,D=((d=e("3rdparty/walkontable/src/core"))&&d.__esModule&&d||{default:d}).Walkontable;h.TableView=n,n.prototype.isTextSelectionAllowed=function(e){if(C(e))return!0;var t=b(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))},n.prototype.isSelectedOnlyCell=function(){var e=this.instance.getSelected()||[],t=e[0],o=e[1],n=e[2],r=e[3];return void 0!==t&&t===n&&o===r},n.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},n.prototype.beforeRender=function(e,t){e&&h.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender,t)},n.prototype.onDraw=function(e){e&&h.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},n.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},n.prototype.getCellAtCoords=function(e,t){var o=this.wt.getCell(e,t);return o<0?null:o},n.prototype.scrollViewport=function(e){this.wt.scrollViewport(e)},n.prototype.appendRowHeader=function(e,t){if(t.firstChild){var o=t.firstChild;if(!y(o,"relative"))return g(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var n=document.createElement("div"),r=document.createElement("span");n.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,this.instance.getRowHeader),n.appendChild(r),t.appendChild(n)}h.hooks.run(this.instance,"afterGetRowHeader",e,t)},n.prototype.appendColHeader=function(e,t){if(t.firstChild){var o=t.firstChild;y(o,"relative")?this.updateCellHeader(o.querySelector(".colHeader"),e,this.instance.getColHeader):(g(t),this.appendColHeader(e,t))}else{var n=document.createElement("div"),r=document.createElement("span");n.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getColHeader),n.appendChild(r),t.appendChild(n)}h.hooks.run(this.instance,"afterGetColHeader",e,t)},n.prototype.updateCellHeader=function(e,t,o){var n=t,r=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&(y(e,"colHeader")?n=r.wtTable.columnFilter.sourceToRendered(t):y(e,"rowHeader")&&(n=r.wtTable.rowFilter.sourceToRendered(t))),n>-1?m(e,o(t)):(w(e,String.fromCharCode(160)),p(e,"cornerHeader"))},n.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth(),o=t-e;return o>0?o:0},n.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight(),o=t-e;return o>0?o:0},n.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},n.prototype.destroy=function(){this.wt.destroy(),this.eventManager.destroy()}},{"3rdparty/walkontable/src/cell/coords":6,"3rdparty/walkontable/src/core":8,"3rdparty/walkontable/src/selection":19,browser:24,eventManager:42,"helpers/dom/element":47,"helpers/dom/event":48,"helpers/object":53}],127:[function(e,t,o){"use strict";Object.defineProperties(o,{NodeStructure:{get:function(){return i}},LinkedList:{get:function(){return s}},__esModule:{value:!0}});var n,r=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,i=function(e){this.data=e,this.next=null,this.prev=null};$traceurRuntime.createClass(i,{},{});var s=function(){this.first=null,this.last=null};$traceurRuntime.createClass(s,{push:function(e){var t=new i(e);if(null===this.first)this.first=this.last=t;else{var o=this.last;this.last=t,t.prev=o,o.next=t}},unshift:function(e){var t=new i(e);if(null===this.first)this.first=this.last=t;else{var o=this.first;this.first=t,t.next=o,o.prev=t}},inorder:function(e){for(var t=this.first;t;)e(t),t=t.next},remove:function(e){if(null===this.first)return!1;for(var t,o,n=this.first;n;){if(n.data===e)return t=n.next,o=n.prev,t&&(t.prev=o),o&&(o.next=t),n===this.first&&(this.first=t),n===this.last&&(this.last=o),!0;n=n.next}return!1},hasCycle:function(){for(var e=this.first,t=this.first;;){if(null===e)return!1;if(null===(e=e.next))return!1;if(e=e.next,t=t.next,e===t)return!0}},pop:function(){if(null===this.last)return null;var e=this.last;return this.last=this.last.prev,e},shift:function(){if(null===this.first)return null;var e=this.first;return this.first=this.first.next,e},recursiveReverse:function(){function e(t,o){o&&(e(o,o.next),o.next=t)}if(this.first){e(this.first,this.first.next),this.first.next=null;var t=this.first;this.first=this.last,this.last=t}},reverse:function(){if(this.first&&this.first.next){for(var e,t=this.first.next,o=this.first;t;)e=t.next,t.next=o,o.prev=t,o=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=o,this.last=e}}},{}),r.utils.NodeStructure=i,r.utils.LinkedList=s},{browser:24}],128:[function(e,t,o){"use strict";Object.defineProperties(o,{GhostTable:{get:function(){return g}},__esModule:{value:!0}});var n,r,i,s,a,l,u=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,c=(r=e("helpers/dom/element"))&&r.__esModule&&r||{default:r},d=c.addClass,h=c.outerHeight,f=c.outerWidth,p=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,g=(((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).objectEach,((a=e("helpers/number"))&&a.__esModule&&a||{default:a}).rangeEach,((l=e("helpers/mixed"))&&l.__esModule&&l||{default:l}).stringify,function(e){this.hot=e,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}});$traceurRuntime.createClass(g,{addRow:function(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table},addColumnHeadersRow:function(e){if(null!=this.hot.getColHeader(0)){var t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tHead.appendChild(this.createColumnHeadersRow()),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}},addColumn:function(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table},getHeights:function(e){this.injected||this.injectTable(),p(this.rows,function(t){e(t.row,h(t.table)-1)})},getWidths:function(e){this.injected||this.injectTable(),p(this.columns,function(t){e(t.col,f(t.table))})},setSettings:function(e){this.settings=e},setSetting:function(e,t){this.settings||(this.settings={}),this.settings[e]=t},getSettings:function(){return this.settings},getSetting:function(e){return this.settings?this.settings[e]:null},createColGroupsCol:function(){var e=this,t=document,o=t.createDocumentFragment();return this.hot.hasRowHeaders()&&o.appendChild(this.createColElement(-1)),this.samples.forEach(function(t){p(t.strings,function(t){o.appendChild(e.createColElement(t.col))})}),o},createRow:function(e){var t=this,o=document,n=o.createDocumentFragment(),r=o.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),n.appendChild(r)),this.samples.forEach(function(r){p(r.strings,function(r){var i=r.col,s=t.hot.getCellMeta(e,i);s.col=i,s.row=e;var a=t.hot.getCellRenderer(s),l=o.createElement("td");a(t.hot,l,e,i,t.hot.colToProp(i),r.value,s),n.appendChild(l)})}),n},createColumnHeadersRow:function(){var e=this,t=document,o=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var n=t.createElement("th");this.hot.view.appendColHeader(-1,n),o.appendChild(n)}return this.samples.forEach(function(n){p(n.strings,function(n){var r=n.col,i=t.createElement("th");e.hot.view.appendColHeader(r,i),o.appendChild(i)})}),o},createCol:function(e){var t=this,o=document,n=o.createDocumentFragment();return this.samples.forEach(function(r){p(r.strings,function(r){var i=r.row,s=t.hot.getCellMeta(i,e);s.col=e,s.row=i;var a=t.hot.getCellRenderer(s),l=o.createElement("td"),u=o.createElement("tr");a(t.hot,l,i,e,t.hot.colToProp(e),r.value,s),u.appendChild(l),n.appendChild(u)})}),n},clean:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()},injectTable:function(){var e=void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)},removeTable:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)},createColElement:function(e){var t=document,o=t.createElement("col");return o.style.width=this.hot.view.wt.wtTable.getStretchedColumnWidth(e)+"px",o},createTable:function(){var e=void 0!==arguments[0]?arguments[0]:"",t=document,o=t.createDocumentFragment(),n=t.createElement("table"),r=t.createElement("thead"),i=t.createElement("tbody"),s=t.createElement("colgroup"),a=t.createElement("tr"),l=t.createElement("th");return this.isVertical()&&n.appendChild(s),this.isHorizontal()&&(a.appendChild(l),r.appendChild(a),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(r),this.isVertical()&&i.appendChild(a),n.appendChild(i),d(n,e),o.appendChild(n),{fragment:o,table:n,tHead:r,tBody:i,colGroup:s,tr:a,th:l}},createContainer:function(){var e=void 0!==arguments[0]?arguments[0]:"",t=document,o=t.createDocumentFragment(),n=t.createElement("div");return e="htGhostTable htAutoSize "+e.trim(),d(n,e),o.appendChild(n),{fragment:o,container:n}},isVertical:function(){return!(!this.rows.length||this.columns.length)},isHorizontal:function(){return!(!this.columns.length||this.rows.length)}},{}),u.utils.GhostTable=g},{browser:24,"helpers/array":43,"helpers/dom/element":47,"helpers/mixed":51,"helpers/number":52,"helpers/object":53}],129:[function(e,t,o){"use strict";function n(e){return"string"==typeof e&&/fps$/.test(e)&&(e=1e3/parseInt(e.replace("fps","")||0,10)),e}Object.defineProperties(o,{Interval:{get:function(){return c}},__esModule:{value:!0}});var r,i,s=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,a=(i=e("helpers/feature"))&&i.__esModule&&i||{default:i},l=a.requestAnimationFrame,u=a.cancelAnimationFrame,c=function(e,t){var o=this;this.timer=null,this.func=e,this.delay=n(t),this.stopped=!0,this._then=null,this._callback=function(){return o.__callback()}},d=c;$traceurRuntime.createClass(c,{start:function(){return this.stopped&&(this._then=Date.now(),this.stopped=!1,this.timer=l(this._callback)),this},stop:function(){return this.stopped||(this.stopped=!0,u(this.timer),this.timer=null),this},__callback:function(){if(this.timer=l(this._callback),this.delay){var e=Date.now(),t=e-this._then;t>this.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}},{create:function(e,t){return new d(e,t)}}),s.utils.Interval=c},{browser:24,"helpers/feature":49}],130:[function(e,t,o){"use strict";function n(e,t){c.set(e,t)}function r(e){var t;if(!(e instanceof a.Core)){if(!c.has(e))throw Error("Record translator was not registered for this object identity");e=c.get(e)}return d.has(e)?t=d.get(e):(t=new u(e),d.set(e,t)),t}Object.defineProperties(o,{registerIdentity:{get:function(){return n}},getTranslator:{get:function(){return r}},__esModule:{value:!0}});var i,s,a=((i=e("browser"))&&i.__esModule&&i||{default:i}).default,l=((s=e("helpers/object"))&&s.__esModule&&s||{default:s}).isObject,u=function(e){this.hot=e};$traceurRuntime.createClass(u,{toVisualRow:function(e){return this.hot.runHooks("unmodifyRow",e)},toVisualColumn:function(e){return this.hot.runHooks("unmodifyCol",e)},toVisual:function(e,t){return l(e)?{row:this.toVisualRow(e.row),column:this.toVisualColumn(e.column)}:[this.toVisualRow(e),this.toVisualColumn(t)]},toPhysicalRow:function(e){return this.hot.runHooks("modifyRow",e)},toPhysicalColumn:function(e){return this.hot.runHooks("modifyCol",e)},toPhysical:function(e,t){return l(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}},{});var c=new WeakMap,d=new WeakMap;a.utils.RecordTranslator=u,a.utils.RecordTranslatorUtils={registerIdentity:n,getTranslator:r}},{browser:24,"helpers/object":53}],131:[function(e,t,o){"use strict";var n;Object.defineProperties(o,{SamplesGenerator:{get:function(){return m}},__esModule:{value:!0}});var r,i,s,a,l,u,c=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,d=(i=e("helpers/dom/element"))&&i.__esModule&&i||{default:i},h=(d.addClass,d.outerHeight,d.outerWidth,((s=e("helpers/array"))&&s.__esModule&&s||{default:s}).arrayEach,(a=e("helpers/object"))&&a.__esModule&&a||{default:a}),f=(h.objectEach,h.isObject),p=((l=e("helpers/number"))&&l.__esModule&&l||{default:l}).rangeEach,g=((u=e("helpers/mixed"))&&u.__esModule&&u||{default:u}).stringify,m=function(e){this.samples=null,this.dataFactory=e,this.customSampleCount=null,this.allowDuplicates=!1},w=m;$traceurRuntime.createClass(m,(n={},Object.defineProperty(n,"getSampleCount",{value:function(){return this.customSampleCount?this.customSampleCount:w.SAMPLE_COUNT},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"setSampleCount",{value:function(e){this.customSampleCount=e},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"setAllowDuplicates",{value:function(e){this.allowDuplicates=e},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateRowSamples",{value:function(e,t){return this.generateSamples("row",t,e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateColumnSamples",{value:function(e,t){return this.generateSamples("col",t,e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateSamples",{value:function(e,t,o){var n=this,r=new Map;return"number"==typeof o&&(o={from:o,to:o}),p(o.from,o.to,function(o){var i=n.generateSample(e,t,o);r.set(o,i)}),r},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateSample",{value:function(e,t,o){var n,r=this,i=new Map,s=[];return p(t.from,t.to,function(t){var a,l;if("row"===e)l=r.dataFactory(o,t);else{if("col"!==e)throw new Error("Unsupported sample type");l=r.dataFactory(t,o)}n=f(l)?Object.keys(l).length:Array.isArray(l)?l.length:g(l).length,i.has(n)||i.set(n,{needed:r.getSampleCount(),strings:[]});var u=i.get(n);if(u.needed){if(!(s.indexOf(l)>-1)||r.allowDuplicates){var c="row"===e?"col":"row";u.strings.push((a={},Object.defineProperty(a,"value",{value:l,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(a,c,{value:t,configurable:!0,enumerable:!0,writable:!0}),a)),s.push(l),u.needed--}}}),i},configurable:!0,enumerable:!0,writable:!0}),n),{get SAMPLE_COUNT(){return 3}}),c.utils.SamplesGenerator=m},{browser:24,"helpers/array":43,"helpers/dom/element":47,"helpers/mixed":51,"helpers/number":52,"helpers/object":53}],132:[function(e,t,o){"use strict";function n(e){var t=void 0!==arguments[1]?arguments[1]:l,o=void 0!==arguments[2]?arguments[2]:0,i=void 0!==arguments[3]?arguments[3]:e.length;if(Math.abs(i-o)<=1)return[];var s=Math.ceil((o+i)/2);return n(e,t,o,s),n(e,t,s,i),r(e,t,o,s,i)}function r(e,t,o,n,r){for(var i=new a,s=new a,l=n-o,u=r-n,c=Math.max(l,u),d=r-o,h=0;h0?e[o+f]=s.shift().data:e[o+f]=i.shift().data:i.first?e[o+f]=i.shift().data:e[o+f]=s.shift().data,f+=1;return e}Object.defineProperties(o,{mergeSort:{get:function(){return n}},__esModule:{value:!0}});var i,s,a=((i=e("../dataStructures/linkedList"))&&i.__esModule&&i||{default:i}).LinkedList,l=function(e,t){var o=e.toString(),n=t.toString();return o===n?0:o-1;return o=n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||i?n:r,o.format(t)}},{"../helpers/date":46,browser:24,editors:30,moment:"moment"}],135:[function(e,t,o){"use strict";var n;((n=e("browser"))&&n.__esModule&&n||{default:n}).default.NumericValidator=function(e,t){null==e&&(e=""),t(!(!this.allowEmpty||""!==e)||""!==e&&/^-?\d*(\.|\,)?\d*$/.test(e))}},{browser:24}],136:[function(e,t,o){"use strict";var n,r,i=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,s=((r=e("moment"))&&r.__esModule&&r||{default:r}).default,a=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];i.TimeValidator=function(e,t){var o=!0,n=this.timeFormat||"h:mm:ss a";null===e&&(e=""),e=/^\d{3,}$/.test(e)?parseInt(e,10):e;var r=/^\d{1,2}$/.test(e);r&&(e+=":00");var i=s(e,a,!0).isValid()?s(e):s(e,n),l=i.isValid(),u=s(e,n,!0).isValid()&&!r;if(this.allowEmpty&&""===e&&(l=!0,u=!0),l||(o=!1),!l&&u&&(o=!0),l&&!u)if(!0===this.correctFormat){var c=i.format(n),d=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(d,h,c,"timeValidator"),o=!0}else o=!1;t(o)}},{browser:24,moment:"moment"}],SheetClip:[function(e,t,o){!function(e){"use strict";function t(e){return e.split('"').length-1}var n={parse:function(e){var o,n,r,i,s,a,l,u=[],c=0;for(r=e.split("\n"),r.length>1&&""===r[r.length-1]&&r.pop(),o=0,n=r.length;o0&&(s+="\t"),i=e[t][n],"string"==typeof i?i.indexOf("\n")>-1?s+='"'+i.replace(/"/g,'""')+'"':s+=i:s+=null===i||void 0===i?"":i;s+="\n"}return s}};void 0!==o?(o.parse=n.parse,o.stringify=n.stringify):e.SheetClip=n}(window)},{}],autoResize:[function(e,t,o){function n(){function e(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}var t,o={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,r=document.createTextNode(""),i=document.createElement("SPAN"),s=function(e,t,o){window.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o,!1)},a=function(e,t,o){window.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent("on"+t,o)},l=function(s){var a,l;s?/^[a-zA-Z \.,\\\/\|0-9]$/.test(s)||(s="."):s="",void 0!==r.textContent?r.textContent=t.value+s:r.data=t.value+s,i.style.fontSize=e(t).fontSize,i.style.fontFamily=e(t).fontFamily,i.style.whiteSpace="pre",n.appendChild(i),a=i.clientWidth+2,n.removeChild(i),t.style.height=o.minHeight+"px",o.minWidth>a?t.style.width=o.minWidth+"px":a>o.maxWidth?t.style.width=o.maxWidth+"px":t.style.width=a+"px",l=t.scrollHeight?t.scrollHeight-1:0,o.minHeight>l?t.style.height=o.minHeight+"px":o.maxHeight-1||"true"===e.contentEditable}()))return;this.selectNodeText(this.elTextarea),setTimeout(function(){document.activeElement!==t.elTextarea&&t.selectNodeText(t.elTextarea)},0)}!1===e.isImmediatePropagationEnabled||!o||67!==e.keyCode&&86!==e.keyCode&&88!==e.keyCode||(88===e.keyCode?setTimeout(function(){t.triggerCut(e)},0):86===e.keyCode&&setTimeout(function(){t.triggerPaste(e)},0))},r.prototype.selectNodeText=function(e){e&&e.select()},r.prototype.getSelectionText=function(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e},r.prototype.copyable=function(e){if("string"!=typeof e&&void 0===e.toString)throw new Error("copyable requires string parameter");this.elTextarea.value=e,this.selectNodeText(this.elTextarea)},r.prototype.onCut=function(e){this.cutCallbacks.push(e)},r.prototype.onPaste=function(e){this.pasteCallbacks.push(e)},r.prototype.removeCallback=function(e){var t,o;for(t=0,o=this.copyCallbacks.length;t0&&(e.patches=[],e.callback&&e.callback(r)),r}function h(e,t,n,r){for(var i=y(t),s=y(e),a=!1,l=s.length-1;l>=0;l--){var c=s[l],d=e[c];if(t.hasOwnProperty(c)){var f=t[c];"object"==typeof d&&null!=d&&"object"==typeof f&&null!=f?h(d,f,n,r+"/"+o(c)):d!=f&&(!0,n.push({op:"replace",path:r+"/"+o(c),value:u(f)}))}else n.push({op:"remove",path:r+"/"+o(c)}),a=!0}if(a||i.length!=s.length)for(var l=0;l=48&&t<=57))return!1;o++}}return!0}function p(e,t,o){for(var n,r,i=!1,s=0,a=t.length;s=h){i=_[n.op].call(n,c,r,e);break}if(E(c)){if("-"===r)r=c.length;else{if(o&&!f(r))throw new O("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s-1,n.path,n);r=parseInt(r,10)}if(d>=h){if(o&&"add"===n.op&&r>c.length)throw new O("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s-1,n.path,n);i=C[n.op].call(n,c,r,e);break}}else if(r&&-1!=r.indexOf("~")&&(r=r.replace(/~1/g,"/").replace(/~0/g,"~")),d>=h){i=b[n.op].call(n,c,r,e);break}c=c[r]}}return i}function g(e,t){var o=[];return h(e,t,o,""),o}function m(e){if(void 0===e)return!0;if("array"==typeof e||"object"==typeof e)for(var t in e)if(m(e[t]))return!0;return!1}function w(t,o,n,r){if("object"!=typeof t||null===t||E(t))throw new O("Operation is not an object","OPERATION_NOT_AN_OBJECT",o,t,n);if(!b[t.op])throw new O("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",o,t,n);if("string"!=typeof t.path)throw new O("Operation `path` property is not a string","OPERATION_PATH_INVALID",o,t,n);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new O("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",o,t,n);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new O("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",o,t,n);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&m(t.value))throw new O("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",o,t,n);if(n)if("add"==t.op){var i=t.path.split("/").length,s=r.split("/").length;if(i!==s+1&&i!==s)throw new O("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",o,t,n)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==r)throw new O("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",o,t,n)}else if("move"===t.op||"copy"===t.op){var a={op:"_get",path:t.from,value:void 0},l=e.validate([a],n);if(l&&"OPERATION_PATH_UNRESOLVABLE"===l.name)throw new O("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",o,t,n)}}function v(e,t){try{if(!E(e))throw new O("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),p.call(this,t,e,!0);else for(var o=0;o0)for(o=0;o0?"future":"past"];return E(o)?o(t):o.replace(/%s/i,t)}function L(e,t){var o=e.toLowerCase();An[o]=An[o+"s"]=An[t]=e}function I(e){return"string"==typeof e?An[e]||An[e.toLowerCase()]:void 0}function W(e){var t,o,n={};for(o in e)c(e,o)&&(t=I(o))&&(n[t]=e[o]);return n}function j(e,t){Pn[e]=t}function V(e){var t=[];for(var o in e)t.push({unit:o,priority:Pn[o]});return t.sort(function(e,t){return e.priority-t.priority}),t}function B(t,o){return function(n){return null!=n?(z(this,t,n),e.updateOffset(this,o),this):F(this,t)}}function F(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function z(e,t,o){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](o)}function Y(e){return e=I(e),E(this[e])?this[e]():this}function U(e,t){if("object"==typeof e){e=W(e);for(var o=V(e),n=0;n=0?o?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function $(e,t,o,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),e&&(Wn[e]=r),t&&(Wn[t[0]]=function(){return G(r.apply(this,arguments),t[1],t[2])}),o&&(Wn[o]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function K(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function X(e){var t,o,n=e.match(Nn);for(t=0,o=n.length;t=0&&Ln.test(e);)e=e.replace(Ln,o),Ln.lastIndex=0,n-=1;return e}function J(e,t,o){zn[e]=E(t)?t:function(e,n){return e&&o?o:t}}function Q(e,t){return c(zn,e)?zn[e](t._strict,t._locale):new RegExp(ee(e))}function ee(e){return te(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,o,n,r){return t||o||n||r}))}function te(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function oe(e,t){var o,n=t;for("string"==typeof e&&(e=[e]),a(t)&&(n=function(e,o){o[t]=C(e)}),o=0;o=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function be(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ce(e,t,o){var n=7+t-o;return-(7+be(e,0,n).getUTCDay()-t)%7+n-1}function _e(e,t,o,n,r){var i,s,a=(7+o-n)%7,l=Ce(e,n,r),u=1+7*(t-1)+a+l;return u<=0?(i=e-1,s=me(i)+u):u>me(e)?(i=e+1,s=u-me(e)):(i=e,s=u),{year:i,dayOfYear:s}}function Re(e,t,o){var n,r,i=Ce(e.year(),t,o),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?(r=e.year()-1,n=s+Me(r,t,o)):s>Me(e.year(),t,o)?(n=s-Me(e.year(),t,o),r=e.year()+1):(r=e.year(),n=s),{week:n,year:r}}function Me(e,t,o){var n=Ce(e,t,o),r=Ce(e+1,t,o);return(me(e)-n+r)/7}function Se(e){return Re(e,this._week.dow,this._week.doy).week}function Ee(){return this._week.dow}function Oe(){return this._week.doy}function Te(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function ke(e){var t=Re(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function xe(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function De(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function He(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:n(this._weekdays)?this._weekdays:this._weekdays.standalone}function Ae(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Pe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ne(e,t,o){var n,r,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return o?"dddd"===t?(r=er.call(this._weekdaysParse,s),-1!==r?r:null):"ddd"===t?(r=er.call(this._shortWeekdaysParse,s),-1!==r?r:null):(r=er.call(this._minWeekdaysParse,s),-1!==r?r:null):"dddd"===t?-1!==(r=er.call(this._weekdaysParse,s))?r:-1!==(r=er.call(this._shortWeekdaysParse,s))?r:(r=er.call(this._minWeekdaysParse,s),-1!==r?r:null):"ddd"===t?-1!==(r=er.call(this._shortWeekdaysParse,s))?r:-1!==(r=er.call(this._weekdaysParse,s))?r:(r=er.call(this._minWeekdaysParse,s),-1!==r?r:null):-1!==(r=er.call(this._minWeekdaysParse,s))?r:-1!==(r=er.call(this._weekdaysParse,s))?r:(r=er.call(this._shortWeekdaysParse,s),-1!==r?r:null)}function Le(e,t,o){var n,r,i;if(this._weekdaysParseExact)return Ne.call(this,e,t,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=h([2e3,1]).day(n),o&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),o&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(o&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(o&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!o&&this._weekdaysParse[n].test(e))return n}}function Ie(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=xe(e,this.localeData()),this.add(e-t,"d")):t}function We(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function je(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=De(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ve(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=dr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Be(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Fe(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=fr),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ze(){function e(e,t){return t.length-e.length}var t,o,n,r,i,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)o=h([2e3,1]).day(t),n=this.weekdaysMin(o,""),r=this.weekdaysShort(o,""),i=this.weekdays(o,""),s.push(n),a.push(r),l.push(i),u.push(n),u.push(r),u.push(i);for(s.sort(e),a.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)a[t]=te(a[t]),l[t]=te(l[t]),u[t]=te(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ye(){return this.hours()%12||12}function Ue(){return this.hours()||24}function Ge(e,t){$(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function $e(e,t){return t._meridiemParse}function Ke(e){return"p"===(e+"").toLowerCase().charAt(0)}function Xe(e,t,o){return e>11?o?"pm":"PM":o?"am":"AM"}function qe(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,o,n,r,i=0;i0;){if(n=Je(r.slice(0,t).join("-")))return n;if(o&&o.length>=t&&_(r,o,!0)>=t-1)break;t--}i++}return null}function Je(e){var n=null;if(!wr[e]&&void 0!==o&&o&&o.exports)try{n=pr._abbr,t("./locale/"+e),Qe(n)}catch(e){}return wr[e]}function Qe(e,t){var o;return e&&(o=s(t)?ot(e):et(e,t))&&(pr=o),pr._abbr}function et(e,t){if(null!==t){var o=mr;if(t.abbr=e,null!=wr[e])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=wr[e]._config;else if(null!=t.parentLocale){if(null==wr[t.parentLocale])return vr[t.parentLocale]||(vr[t.parentLocale]=[]),vr[t.parentLocale].push({name:e,config:t}),null;o=wr[t.parentLocale]._config}return wr[e]=new k(T(o,t)),vr[e]&&vr[e].forEach(function(e){et(e.name,e.config)}),Qe(e),wr[e]}return delete wr[e],null}function tt(e,t){if(null!=t){var o,n=mr;null!=wr[e]&&(n=wr[e]._config),t=T(n,t),o=new k(t),o.parentLocale=wr[e],wr[e]=o,Qe(e)}else null!=wr[e]&&(null!=wr[e].parentLocale?wr[e]=wr[e].parentLocale:null!=wr[e]&&delete wr[e]);return wr[e]}function ot(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return pr;if(!n(e)){if(t=Je(e))return t;e=[e]}return Ze(e)}function nt(){return kn(wr)}function rt(e){var t,o=e._a;return o&&-2===p(e).overflow&&(t=o[Gn]<0||o[Gn]>11?Gn:o[$n]<1||o[$n]>ie(o[Un],o[Gn])?$n:o[Kn]<0||o[Kn]>24||24===o[Kn]&&(0!==o[Xn]||0!==o[qn]||0!==o[Zn])?Kn:o[Xn]<0||o[Xn]>59?Xn:o[qn]<0||o[qn]>59?qn:o[Zn]<0||o[Zn]>999?Zn:-1,p(e)._overflowDayOfYear&&(t$n)&&(t=$n),p(e)._overflowWeeks&&-1===t&&(t=Jn),p(e)._overflowWeekday&&-1===t&&(t=Qn),p(e).overflow=t),e}function it(e){var t,o,n,r,i,s,a=e._i,l=yr.exec(a)||br.exec(a);if(l){for(p(e).iso=!0,t=0,o=_r.length;t10?"YYYY ":"YY "),i="HH:mm"+(o[4]?":ss":""),o[1]){var d=new Date(o[2]),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][d.getDay()];if(o[1].substr(0,3)!==h)return p(e).weekdayMismatch=!0,void(e._isValid=!1)}switch(o[5].length){case 2:0===l?a=" +0000":(l=c.indexOf(o[5][1].toUpperCase())-12,a=(l<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:a=u[o[5]];break;default:a=u[" GMT"]}o[5]=a,e._i=o.splice(1).join(""),s=" ZZ",e._f=n+r+i+s,ht(e),p(e).rfc2822=!0}else e._isValid=!1}function at(t){var o=Mr.exec(t._i);if(null!==o)return void(t._d=new Date(+o[1]));it(t),!1===t._isValid&&(delete t._isValid,st(t),!1===t._isValid&&(delete t._isValid,e.createFromInputFallback(t)))}function lt(e,t,o){return null!=e?e:null!=t?t:o}function ut(t){var o=new Date(e.now());return t._useUTC?[o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()]:[o.getFullYear(),o.getMonth(),o.getDate()]}function ct(e){var t,o,n,r,i=[];if(!e._d){for(n=ut(e),e._w&&null==e._a[$n]&&null==e._a[Gn]&&dt(e),null!=e._dayOfYear&&(r=lt(e._a[Un],n[Un]),(e._dayOfYear>me(r)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),o=be(r,0,e._dayOfYear),e._a[Gn]=o.getUTCMonth(),e._a[$n]=o.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=n[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Kn]&&0===e._a[Xn]&&0===e._a[qn]&&0===e._a[Zn]&&(e._nextDay=!0,e._a[Kn]=0),e._d=(e._useUTC?be:ye).apply(null,i),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Kn]=24)}}function dt(e){var t,o,n,r,i,s,a,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)i=1,s=4,o=lt(t.GG,e._a[Un],Re(bt(),1,4).year),n=lt(t.W,1),((r=lt(t.E,1))<1||r>7)&&(l=!0);else{i=e._locale._week.dow,s=e._locale._week.doy;var u=Re(bt(),i,s);o=lt(t.gg,e._a[Un],u.year),n=lt(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+i,(t.e<0||t.e>6)&&(l=!0)):r=i}n<1||n>Me(o,i,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=_e(o,n,r,i,s),e._a[Un]=a.year,e._dayOfYear=a.dayOfYear)}function ht(t){if(t._f===e.ISO_8601)return void it(t);if(t._f===e.RFC_2822)return void st(t);t._a=[],p(t).empty=!0;var o,n,r,i,s,a=""+t._i,l=a.length,u=0;for(r=Z(t._f,t._locale).match(Nn)||[],o=0;o0&&p(t).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),u+=n.length),Wn[i]?(n?p(t).empty=!1:p(t).unusedTokens.push(i),re(i,n,t)):t._strict&&!n&&p(t).unusedTokens.push(i);p(t).charsLeftOver=l-u,a.length>0&&p(t).unusedInput.push(a),t._a[Kn]<=12&&!0===p(t).bigHour&&t._a[Kn]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[Kn]=ft(t._locale,t._a[Kn],t._meridiem),ct(t),rt(t)}function ft(e,t,o){var n;return null==o?t:null!=e.meridiemHour?e.meridiemHour(t,o):null!=e.isPM?(n=e.isPM(o),n&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function pt(e){var t,o,n,r,i;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Bt(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),e=wt(e),e._a){var t=e._isUTC?h(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&_(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ft(){return!!this.isValid()&&!this._isUTC}function zt(){return!!this.isValid()&&this._isUTC}function Yt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ut(e,t){var o,n,r,i=e,s=null;return Tt(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:a(e)?(i={},t?i[t]=e:i.milliseconds=e):(s=Dr.exec(e))?(o="-"===s[1]?-1:1,i={y:0,d:C(s[$n])*o,h:C(s[Kn])*o,m:C(s[Xn])*o,s:C(s[qn])*o,ms:C(kt(1e3*s[Zn]))*o}):(s=Hr.exec(e))?(o="-"===s[1]?-1:1,i={y:Gt(s[2],o),M:Gt(s[3],o),w:Gt(s[4],o),d:Gt(s[5],o),h:Gt(s[6],o),m:Gt(s[7],o),s:Gt(s[8],o)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(r=Kt(bt(i.from),bt(i.to)),i={},i.ms=r.milliseconds,i.M=r.months),n=new Ot(i),Tt(e)&&c(e,"_locale")&&(n._locale=e._locale),n}function Gt(e,t){var o=e&&parseFloat(e.replace(",","."));return(isNaN(o)?0:o)*t}function $t(e,t){var o={milliseconds:0,months:0};return o.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(o.months,"M").isAfter(t)&&--o.months,o.milliseconds=+t-+e.clone().add(o.months,"M"),o}function Kt(e,t){var o;return e.isValid()&&t.isValid()?(t=Ht(t,e),e.isBefore(t)?o=$t(e,t):(o=$t(t,e),o.milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0}}function Xt(e,t){return function(o,n){var r,i;return null===n||isNaN(+n)||(S(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=o,o=n,n=i),o="string"==typeof o?+o:o,r=Ut(o,n),qt(this,r,e),this}}function qt(t,o,n,r){var i=o._milliseconds,s=kt(o._days),a=kt(o._months);t.isValid()&&(r=null==r||r,i&&t._d.setTime(t._d.valueOf()+i*n),s&&z(t,"Date",F(t,"Date")+s*n),a&&ce(t,F(t,"Month")+a*n),r&&e.updateOffset(t,s||a))}function Zt(e,t){var o=e.diff(t,"days",!0);return o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse"}function Jt(t,o){var n=t||bt(),r=Ht(n,this).startOf("day"),i=e.calendarFormat(this,r)||"sameElse",s=o&&(E(o[i])?o[i].call(this,n):o[i]);return this.format(s||this.localeData().calendar(i,this,bt(n)))}function Qt(){return new v(this)}function eo(e,t){var o=y(e)?e:bt(e);return!(!this.isValid()||!o.isValid())&&(t=I(s(t)?"millisecond":t),"millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()9999?q(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):E(Date.prototype.toISOString)?this.toDate().toISOString():q(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function co(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var o="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=t+'[")]';return this.format(o+n+"-MM-DD[T]HH:mm:ss.SSS"+r)}function ho(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var o=q(this,t);return this.localeData().postformat(o)}function fo(e,t){return this.isValid()&&(y(e)&&e.isValid()||bt(e).isValid())?Ut({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function po(e){return this.from(bt(),e)}function go(e,t){return this.isValid()&&(y(e)&&e.isValid()||bt(e).isValid())?Ut({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function mo(e){return this.to(bt(),e)}function wo(e){var t;return void 0===e?this._locale._abbr:(t=ot(e),null!=t&&(this._locale=t),this)}function vo(){return this._locale}function yo(e){switch(e=I(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function bo(e){return void 0===(e=I(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))}function Co(){return this._d.valueOf()-6e4*(this._offset||0)}function _o(){return Math.floor(this.valueOf()/1e3)}function Ro(){return new Date(this.valueOf())}function Mo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function So(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Eo(){return this.isValid()?this.toISOString():null}function Oo(){return g(this)}function To(){return d({},p(this))}function ko(){return p(this).overflow}function xo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Do(e,t){$(0,[e,e.length],0,t)}function Ho(e){return Lo.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ao(e){return Lo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Po(){return Me(this.year(),1,4)}function No(){var e=this.localeData()._week;return Me(this.year(),e.dow,e.doy)}function Lo(e,t,o,n,r){var i;return null==e?Re(this,n,r).year:(i=Me(e,n,r),t>i&&(t=i),Io.call(this,e,t,o,n,r))}function Io(e,t,o,n,r){var i=_e(e,t,o,n,r),s=be(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Wo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function jo(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Vo(e,t){t[Zn]=C(1e3*("0."+e))}function Bo(){return this._isUTC?"UTC":""}function Fo(){return this._isUTC?"Coordinated Universal Time":""}function zo(e){return bt(1e3*e)}function Yo(){return bt.apply(null,arguments).parseZone()}function Uo(e){return e}function Go(e,t,o,n){var r=ot(),i=h().set(n,t);return r[o](i,e)}function $o(e,t,o){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return Go(e,t,o,"month");var n,r=[];for(n=0;n<12;n++)r[n]=Go(e,n,o,"month");return r}function Ko(e,t,o,n){"boolean"==typeof e?(a(t)&&(o=t,t=void 0),t=t||""):(t=e,o=t,e=!1,a(t)&&(o=t,t=void 0),t=t||"");var r=ot(),i=e?r._week.dow:0;if(null!=o)return Go(t,(o+i)%7,n,"day");var s,l=[];for(s=0;s<7;s++)l[s]=Go(t,(s+i)%7,n,"day");return l}function Xo(e,t){return $o(e,t,"months")}function qo(e,t){return $o(e,t,"monthsShort")}function Zo(e,t,o){return Ko(e,t,o,"weekdays")}function Jo(e,t,o){return Ko(e,t,o,"weekdaysShort")}function Qo(e,t,o){return Ko(e,t,o,"weekdaysMin")}function en(){var e=this._data;return this._milliseconds=zr(this._milliseconds),this._days=zr(this._days),this._months=zr(this._months),e.milliseconds=zr(e.milliseconds),e.seconds=zr(e.seconds),e.minutes=zr(e.minutes),e.hours=zr(e.hours),e.months=zr(e.months),e.years=zr(e.years),this}function tn(e,t,o,n){var r=Ut(t,o);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}function on(e,t){return tn(this,e,t,1)}function nn(e,t){return tn(this,e,t,-1)}function rn(e){return e<0?Math.floor(e):Math.ceil(e)}function sn(){var e,t,o,n,r,i=this._milliseconds,s=this._days,a=this._months,l=this._data;return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*rn(ln(a)+s),s=0,a=0),l.milliseconds=i%1e3,e=b(i/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,o=b(t/60),l.hours=o%24,s+=b(o/24),r=b(an(s)),a+=r,s-=rn(ln(r)),n=b(a/12),a%=12,l.days=s,l.months=a,l.years=n,this}function an(e){return 4800*e/146097}function ln(e){return 146097*e/4800}function un(e){if(!this.isValid())return NaN;var t,o,n=this._milliseconds;if("month"===(e=I(e))||"year"===e)return t=this._days+n/864e5,o=this._months+an(t),"month"===e?o:o/12;switch(t=this._days+Math.round(ln(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function cn(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN}function dn(e){return function(){return this.as(e)}}function hn(e){return e=I(e),this.isValid()?this[e+"s"]():NaN}function fn(e){return function(){return this.isValid()?this._data[e]:NaN}}function pn(){return b(this.days()/7)}function gn(e,t,o,n,r){return r.relativeTime(t||1,!!o,e,n)}function mn(e,t,o){var n=Ut(e).abs(),r=ii(n.as("s")),i=ii(n.as("m")),s=ii(n.as("h")),a=ii(n.as("d")),l=ii(n.as("M")),u=ii(n.as("y")),c=r<=si.ss&&["s",r]||r0,c[4]=o,gn.apply(null,c)}function wn(e){return void 0===e?ii:"function"==typeof e&&(ii=e,!0)}function vn(e,t){return void 0!==si[e]&&(void 0===t?si[e]:(si[e]=t,"s"===e&&(si.ss=t-1),!0))}function yn(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),o=mn(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)}function bn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,o,n=ai(this._milliseconds)/1e3,r=ai(this._days),i=ai(this._months);e=b(n/60),t=b(e/60),n%=60,e%=60,o=b(i/12),i%=12;var s=o,a=i,l=r,u=t,c=e,d=n,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(u||c||d?"T":"")+(u?u+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}var Cn,_n;_n=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),o=t.length>>>0,n=0;n68?1900:2e3)};var sr=B("FullYear",!0);$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),j("week",5),j("isoWeek",5),J("w",/\d\d?/),J("ww",/\d\d?/,/\d\d/),J("W",/\d\d?/),J("WW",/\d\d?/,/\d\d/),ne(["w","ww","W","WW"],function(e,t,o,n){t[n.substr(0,1)]=C(e)});var ar={dow:0,doy:6};$("d",0,"do","day"),$("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),$("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),$("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),J("d",/\d\d?/),J("e",/\d\d?/),J("E",/\d\d?/),J("dd",function(e,t){return t.weekdaysMinRegex(e)}),J("ddd",function(e,t){return t.weekdaysShortRegex(e)}),J("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,o,n){var r=o._locale.weekdaysParse(e,n,o._strict);null!=r?t.d=r:p(o).invalidWeekday=e}),ne(["d","e","E"],function(e,t,o,n){t[n]=C(e)});var lr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ur="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),cr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),dr=Fn,hr=Fn,fr=Fn;$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Ye),$("k",["kk",2],0,Ue),$("hmm",0,0,function(){return""+Ye.apply(this)+G(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Ye.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)}),Ge("a",!0),Ge("A",!1),L("hour","h"),j("hour",13),J("a",$e),J("A",$e),J("H",/\d\d?/),J("h",/\d\d?/),J("k",/\d\d?/),J("HH",/\d\d?/,/\d\d/),J("hh",/\d\d?/,/\d\d/),J("kk",/\d\d?/,/\d\d/),J("hmm",/\d\d\d\d?/),J("hmmss",/\d\d\d\d\d\d?/),J("Hmm",/\d\d\d\d?/),J("Hmmss",/\d\d\d\d\d\d?/),oe(["H","HH"],Kn),oe(["k","kk"],function(e,t,o){var n=C(e);t[Kn]=24===n?0:n}),oe(["a","A"],function(e,t,o){o._isPm=o._locale.isPM(e),o._meridiem=e}),oe(["h","hh"],function(e,t,o){t[Kn]=C(e),p(o).bigHour=!0}),oe("hmm",function(e,t,o){var n=e.length-2;t[Kn]=C(e.substr(0,n)),t[Xn]=C(e.substr(n)),p(o).bigHour=!0}),oe("hmmss",function(e,t,o){var n=e.length-4,r=e.length-2;t[Kn]=C(e.substr(0,n)),t[Xn]=C(e.substr(n,2)),t[qn]=C(e.substr(r)),p(o).bigHour=!0}),oe("Hmm",function(e,t,o){var n=e.length-2;t[Kn]=C(e.substr(0,n)),t[Xn]=C(e.substr(n))}),oe("Hmmss",function(e,t,o){var n=e.length-4,r=e.length-2;t[Kn]=C(e.substr(0,n)),t[Xn]=C(e.substr(n,2)),t[qn]=C(e.substr(r))});var pr,gr=B("Hours",!0),mr={calendar:xn,longDateFormat:Dn,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:Hn,months:or,monthsShort:nr,week:ar,weekdays:lr,weekdaysMin:cr,weekdaysShort:ur,meridiemParse:/[ap]\.?m?\.?/i},wr={},vr={},yr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,br=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cr=/Z|[+-]\d\d(?::?\d\d)?/,_r=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Rr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mr=/^\/?Date\((\-?\d+)/i,Sr=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var Er=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:m()}),Tr=function(){return Date.now?Date.now():+new Date},kr=["year","quarter","month","week","day","hour","minute","second","millisecond"];xt("Z",":"),xt("ZZ",""),J("Z",Bn),J("ZZ",Bn),oe(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=Dt(Bn,e)});var xr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Dr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Hr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ut.fn=Ot.prototype,Ut.invalid=Et;var Ar=Xt(1,"add"),Pr=Xt(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Nr=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});$(0,["gg",2],0,function(){return this.weekYear()%100}),$(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Do("gggg","weekYear"),Do("ggggg","weekYear"),Do("GGGG","isoWeekYear"),Do("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),J("G",/[+-]?\d+/),J("g",/[+-]?\d+/),J("GG",/\d\d?/,/\d\d/),J("gg",/\d\d?/,/\d\d/),J("GGGG",/\d{1,4}/,/\d{4}/),J("gggg",/\d{1,4}/,/\d{4}/),J("GGGGG",/[+-]?\d{1,6}/,jn),J("ggggg",/[+-]?\d{1,6}/,jn),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=C(e)}),ne(["gg","GG"],function(t,o,n,r){o[r]=e.parseTwoDigitYear(t)}),$("Q",0,"Qo","quarter"),L("quarter","Q"),j("quarter",7),J("Q",/\d/),oe("Q",function(e,t){t[Gn]=3*(C(e)-1)}),$("D",["DD",2],"Do","date"),L("date","D"),j("date",9),J("D",/\d\d?/),J("DD",/\d\d?/,/\d\d/),J("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),oe(["D","DD"],$n),oe("Do",function(e,t){t[$n]=C(e.match(/\d\d?/)[0],10)});var Lr=B("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),j("dayOfYear",4),J("DDD",/\d{1,3}/),J("DDDD",/\d{3}/),oe(["DDD","DDDD"],function(e,t,o){o._dayOfYear=C(e)}),$("m",["mm",2],0,"minute"),L("minute","m"),j("minute",14),J("m",/\d\d?/),J("mm",/\d\d?/,/\d\d/),oe(["m","mm"],Xn);var Ir=B("Minutes",!1);$("s",["ss",2],0,"second"),L("second","s"),j("second",15),J("s",/\d\d?/),J("ss",/\d\d?/,/\d\d/),oe(["s","ss"],qn);var Wr=B("Seconds",!1);$("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return 10*this.millisecond()}),$(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),$(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),$(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),$(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),$(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),j("millisecond",16),J("S",/\d{1,3}/,/\d/),J("SS",/\d{1,3}/,/\d\d/),J("SSS",/\d{1,3}/,/\d{3}/);var jr;for(jr="SSSS";jr.length<=9;jr+="S")J(jr,/\d+/);for(jr="S";jr.length<=9;jr+="S")oe(jr,Vo);var Vr=B("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var Br=v.prototype;Br.add=Ar,Br.calendar=Jt,Br.clone=Qt,Br.diff=so,Br.endOf=bo,Br.format=ho,Br.from=fo,Br.fromNow=po,Br.to=go,Br.toNow=mo,Br.get=Y,Br.invalidAt=ko,Br.isAfter=eo,Br.isBefore=to,Br.isBetween=oo,Br.isSame=no,Br.isSameOrAfter=ro,Br.isSameOrBefore=io,Br.isValid=Oo,Br.lang=Nr,Br.locale=wo,Br.localeData=vo,Br.max=Or,Br.min=Er,Br.parsingFlags=To,Br.set=U,Br.startOf=yo,Br.subtract=Pr,Br.toArray=Mo,Br.toObject=So,Br.toDate=Ro,Br.toISOString=uo,Br.inspect=co,Br.toJSON=Eo,Br.toString=lo,Br.unix=_o,Br.valueOf=Co,Br.creationData=xo,Br.year=sr,Br.isLeapYear=ve,Br.weekYear=Ho,Br.isoWeekYear=Ao,Br.quarter=Br.quarters=Wo,Br.month=de,Br.daysInMonth=he,Br.week=Br.weeks=Te,Br.isoWeek=Br.isoWeeks=ke,Br.weeksInYear=No,Br.isoWeeksInYear=Po,Br.date=Lr,Br.day=Br.days=Ie,Br.weekday=We,Br.isoWeekday=je,Br.dayOfYear=jo,Br.hour=Br.hours=gr,Br.minute=Br.minutes=Ir,Br.second=Br.seconds=Wr,Br.millisecond=Br.milliseconds=Vr,Br.utcOffset=Pt,Br.utc=Lt,Br.local=It,Br.parseZone=Wt,Br.hasAlignedHourOffset=jt,Br.isDST=Vt,Br.isLocal=Ft,Br.isUtcOffset=zt,Br.isUtc=Yt,Br.isUTC=Yt,Br.zoneAbbr=Bo,Br.zoneName=Fo,Br.dates=M("dates accessor is deprecated. Use date instead.",Lr),Br.months=M("months accessor is deprecated. Use month instead",de),Br.years=M("years accessor is deprecated. Use year instead",sr),Br.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Nt),Br.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Bt);var Fr=k.prototype;Fr.calendar=x,Fr.longDateFormat=D,Fr.invalidDate=H,Fr.ordinal=A,Fr.preparse=Uo,Fr.postformat=Uo,Fr.relativeTime=P,Fr.pastFuture=N,Fr.set=O,Fr.months=se,Fr.monthsShort=ae,Fr.monthsParse=ue,Fr.monthsRegex=pe,Fr.monthsShortRegex=fe,Fr.week=Se,Fr.firstDayOfYear=Oe,Fr.firstDayOfWeek=Ee,Fr.weekdays=He,Fr.weekdaysMin=Pe,Fr.weekdaysShort=Ae,Fr.weekdaysParse=Le,Fr.weekdaysRegex=Ve,Fr.weekdaysShortRegex=Be,Fr.weekdaysMinRegex=Fe,Fr.isPM=Ke,Fr.meridiem=Xe,Qe("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===C(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),e.lang=M("moment.lang is deprecated. Use moment.locale instead.",Qe),e.langData=M("moment.langData is deprecated. Use moment.localeData instead.",ot);var zr=Math.abs,Yr=dn("ms"),Ur=dn("s"),Gr=dn("m"),$r=dn("h"),Kr=dn("d"),Xr=dn("w"),qr=dn("M"),Zr=dn("y"),Jr=fn("milliseconds"),Qr=fn("seconds"),ei=fn("minutes"),ti=fn("hours"),oi=fn("days"),ni=fn("months"),ri=fn("years"),ii=Math.round,si={ss:44,s:45,m:45,h:22,d:26,M:11},ai=Math.abs,li=Ot.prototype;return li.isValid=St,li.abs=en,li.add=on,li.subtract=nn,li.as=un,li.asMilliseconds=Yr,li.asSeconds=Ur,li.asMinutes=Gr,li.asHours=$r,li.asDays=Kr,li.asWeeks=Xr,li.asMonths=qr,li.asYears=Zr,li.valueOf=cn,li._bubble=sn,li.get=hn,li.milliseconds=Jr,li.seconds=Qr,li.minutes=ei,li.hours=ti,li.days=oi,li.weeks=pn,li.months=ni,li.years=ri,li.humanize=yn,li.toISOString=bn,li.toString=bn,li.toJSON=bn,li.locale=wo,li.localeData=vo,li.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bn),li.lang=Nr,$("X",0,0,"unix"),$("x",0,0,"valueOf"),J("x",/[+-]?\d+/),J("X",/[+-]?\d+(\.\d{1,3})?/),oe("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),oe("x",function(e,t,o){o._d=new Date(C(e))}),e.version="2.18.1",function(e){Cn=e}(bt),e.fn=Br,e.min=_t,e.max=Rt,e.now=Tr,e.utc=h,e.unix=zo,e.months=Xo,e.isDate=l,e.locale=Qe,e.invalid=m,e.duration=Ut,e.isMoment=y,e.weekdays=Zo,e.parseZone=Yo,e.localeData=ot,e.isDuration=Tt,e.monthsShort=qo,e.weekdaysMin=Qo,e.defineLocale=et,e.updateLocale=tt,e.locales=nt,e.weekdaysShort=Jo,e.normalizeUnits=I,e.relativeTimeRounding=wn,e.relativeTimeThreshold=vn,e.calendarFormat=Zt,e.prototype=Br,e})},{}],numbro:[function(t,o,n){/*! * numbro.js * version : 1.10.1 * author : Företagsplatsen AB * license : MIT * http://www.foretagsplatsen.se */ (function(){"use strict";function n(e){this._value=e}function r(e){return 0===e?1:Math.floor(Math.log(Math.abs(e))/Math.LN10)+1}function i(e){var t,o="";for(t=0;t0?c=n+r+i(s-r.length):(a=+n<0?"-0":"0",t>0&&(a+="."),u=i(-1*s-1),l=(u+Math.abs(n)+r).substr(0,t),c=a+l),+s>0&&t>0&&(c+="."+i(t)),c}function a(e,t,o,n){var r,i,a=Math.pow(10,t);return e.toString().indexOf("e")>-1?(i=s(e,t),"-"===i.charAt(0)&&+i>=0&&(i=i.substr(1))):i=(o(e+"e+"+t)/a).toFixed(t),n&&(r=new RegExp("0{1,"+n+"}$"),i=i.replace(r,"")),i}function l(e,t,o){var n=t.replace(/\{[^\{\}]*\}/g,"");return n.indexOf("$")>-1?c(e,E[T].currency.symbol,t,o):n.indexOf("%")>-1?h(e,t,o):n.indexOf(":")>-1?f(e):m(e._value,t,o)}function u(e,t){var o,n,r,i,s,a=t,l=!1;if(t.indexOf(":")>-1)e._value=p(t);else if(t===k)e._value=0;else{for("."!==E[T].delimiters.decimal&&(t=t.replace(/\./g,"").replace(E[T].delimiters.decimal,".")),o=new RegExp("[^a-zA-Z]"+E[T].abbreviations.thousand+"(?:\\)|(\\"+E[T].currency.symbol+")?(?:\\))?)?$"),n=new RegExp("[^a-zA-Z]"+E[T].abbreviations.million+"(?:\\)|(\\"+E[T].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+E[T].abbreviations.billion+"(?:\\)|(\\"+E[T].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+E[T].abbreviations.trillion+"(?:\\)|(\\"+E[T].currency.symbol+")?(?:\\))?)?$"),s=1;s<_.length&&!l;++s)t.indexOf(_[s])>-1?l=Math.pow(1024,s):t.indexOf(R[s])>-1&&(l=Math.pow(1e3,s));var u=t.replace(/[^0-9\.]+/g,"");""===u?e._value=NaN:(e._value=(l||1)*(a.match(o)?Math.pow(10,3):1)*(a.match(n)?Math.pow(10,6):1)*(a.match(r)?Math.pow(10,9):1)*(a.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(u),e._value=l?Math.ceil(e._value):e._value)}return e._value}function c(e,t,o,n){var r,i,s=o,a=s.indexOf("$"),l=s.indexOf("("),u=s.indexOf("+"),c=s.indexOf("-"),d="",h="";if(-1===s.indexOf("$")?"infix"===E[T].currency.position?(h=t,E[T].currency.spaceSeparated&&(h=" "+h+" ")):E[T].currency.spaceSeparated&&(d=" "):s.indexOf(" $")>-1?(d=" ",s=s.replace(" $","")):s.indexOf("$ ")>-1?(d=" ",s=s.replace("$ ","")):s=s.replace("$",""),i=m(e._value,s,n,h),-1===o.indexOf("$"))switch(E[T].currency.position){case"postfix":i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,d+t),i=i.join("")):i=i+d+t;break;case"infix":break;case"prefix":i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=Math.max(l,c)+1,i.splice(r,0,t+d),i=i.join("")):i=t+d+i;break;default:throw Error('Currency position should be among ["prefix", "infix", "postfix"]')}else a<=1?i.indexOf("(")>-1||i.indexOf("+")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(a-1?(i=i.split(""),i.splice(-1,0,d+t),i=i.join("")):i=i+d+t;return i}function d(e,t,o,n){return c(e,t,o,n)}function h(e,t,o){var n,r="",i=100*e._value;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),n=m(i,t,o),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,r+"%"),n=n.join("")):n=n+r+"%",n}function f(e){var t=Math.floor(e._value/60/60),o=Math.floor((e._value-60*t*60)/60),n=Math.round(e._value-60*t*60-60*o);return t+":"+(o<10?"0"+o:o)+":"+(n<10?"0"+n:n)}function p(e){var t=e.split(":"),o=0;return 3===t.length?(o+=60*Number(t[0])*60,o+=60*Number(t[1]),o+=Number(t[2])):2===t.length&&(o+=60*Number(t[0]),o+=Number(t[1])),Number(o)}function g(e,t,o){var n,r,i,s=t[0],a=Math.abs(e);if(a>=o){for(n=1;n=r&&a-1?(M=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(O=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(p=t.split(".")[0].match(/[0-9]+/g)||["0"],p=parseInt(p[0],10),H=t.indexOf("aK")>=0,A=t.indexOf("aM")>=0,P=t.indexOf("aB")>=0,N=t.indexOf("aT")>=0,L=H||A||P||N,t.indexOf(" a")>-1?(D=" ",t=t.replace(" a","")):t=t.replace("a",""),u=r(e),d=u%3,d=0===d?3:d,p&&0!==j&&(h=3*~~((Math.min(p,u)-d)/3),j/=Math.pow(10,h)),u!==p&&(j>=Math.pow(10,12)&&!L||N?(D+=E[T].abbreviations.trillion,e/=Math.pow(10,12)):j=Math.pow(10,9)&&!L||P?(D+=E[T].abbreviations.billion,e/=Math.pow(10,9)):j=Math.pow(10,6)&&!L||A?(D+=E[T].abbreviations.million,e/=Math.pow(10,6)):(j=Math.pow(10,3)&&!L||H)&&(D+=E[T].abbreviations.thousand,e/=Math.pow(10,3))),c=r(e),p&&c-1){t.indexOf(" "+s.marker)>-1&&(I=" "),t=t.replace(I+s.marker,""),l=g(e,s.suffixes,s.scale),e=l.value,I+=l.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(W=" ",t=t.replace(" o","")):t=t.replace("o",""),E[T].ordinal&&(W+=E[T].ordinal(e))),t.indexOf("[.]")>-1&&(x=!0,t=t.replace("[.]",".")),m=t.split(".")[1],y=t.indexOf(","),m){var $=[];if(-1!==m.indexOf("*")?(V=e.toString(),$=V.split("."),$.length>1&&(V=a(e,$[1].length,o))):m.indexOf("[")>-1?(m=m.replace("]",""),m=m.split("["),V=a(e,m[0].length+m[1].length,o,m[1].length)):V=a(e,m.length,o),$=V.split("."),f=$[0],$.length>1&&$[1].length){V=(n?D+n:E[T].delimiters.decimal)+$[1]}else V="";x&&0===Number(V.slice(1))&&(V="")}else f=a(e,0,o);return f.indexOf("-")>-1&&(f=f.slice(1),F=!0),f.length<_&&(f=i(_-f.length)+f),y>-1&&(f=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+E[T].delimiters.thousands)),0===t.indexOf(".")&&(f=""),b=t.indexOf("("),C=t.indexOf("-"),z=bn?o:n},-1/0)}var C,_=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],R=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],M={general:{scale:1024,suffixes:R,marker:"bd"},binary:{scale:1024,suffixes:_,marker:"b"},decimal:{scale:1e3,suffixes:R,marker:"d"}},S=[M.general,M.binary,M.decimal],E={},O=E,T="en-US",k=null,x="0,0",D="0$",H=void 0!==o&&o.exports,A={delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix"},defaults:{currencyFormat:",0000 a"},formats:{fourDigits:"0000 a",fullWithTwoDecimals:"$ ,0.00",fullWithTwoDecimalsNoCurrency:",0.00"}};C=function(e){return e=C.isNumbro(e)?e.value():"string"==typeof e||"number"==typeof e?C.fn.unformat(e):NaN,new n(Number(e))},C.version="1.10.1",C.isNumbro=function(e){return e instanceof n},C.setLanguage=function(e,t){console.warn("`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead");var o=e,n=e.split("-")[0],r=null;O[o]||(Object.keys(O).forEach(function(e){r||e.split("-")[0]!==n||(r=e)}),o=r||t||"en-US"),v(o)},C.setCulture=function(e,t){var o=e,n=e.split("-")[1],r=null;E[o]||(n&&Object.keys(E).forEach(function(e){r||e.split("-")[1]!==n||(r=e)}),o=r||t||"en-US"),v(o)},C.language=function(e,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!e)return T;if(e&&!t){if(!O[e])throw new Error("Unknown language : "+e);v(e)}return!t&&O[e]||w(e,t),C},C.culture=function(e,t){if(!e)return T;if(e&&!t){if(!E[e])throw new Error("Unknown culture : "+e);v(e)}return!t&&E[e]||w(e,t),C},C.languageData=function(e){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!e)return O[T];if(!O[e])throw new Error("Unknown language : "+e);return O[e]},C.cultureData=function(e){if(!e)return E[T];if(!E[e])throw new Error("Unknown culture : "+e);return E[e]},C.culture("en-US",A),C.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),O},C.cultures=function(){return E},C.zeroFormat=function(e){k="string"==typeof e?e:null},C.defaultFormat=function(e){x="string"==typeof e?e:"0.0"},C.defaultCurrencyFormat=function(e){D="string"==typeof e?e:"0$"},C.validate=function(e,t){var o,n,r,i,s,a,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numbro.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),e=e.replace(/^[+-]?/,""),e.match(/^\d+$/))return!0;if(""===e)return!1;try{l=C.cultureData(t)}catch(e){l=C.cultureData(C.culture())}return r=l.currency.symbol,s=l.abbreviations,o=l.delimiters.decimal,n="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,(null===(u=e.match(/^[^\d\.\,]+/))||(e=e.substr(1),u[0]===r))&&((null===(u=e.match(/[^\d]+$/))||(e=e.slice(0,-1),u[0]===s.thousand||u[0]===s.million||u[0]===s.billion||u[0]===s.trillion))&&(a=new RegExp(n+"{2}"),!e.match(/[^\d.,]/g)&&(i=e.split(o),!(i.length>2)&&(i.length<2?!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a):""===i[0]?!i[0].match(a)&&!!i[1].match(/^\d+$/):1===i[0].length?!!i[0].match(/^\d+$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/):!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/)))))},C.loadLanguagesInNode=function(){console.warn("`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead"),C.loadCulturesInNode()},C.loadCulturesInNode=function(){var e=t("./languages");for(var o in e)o&&C.culture(o,e[o])},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){if(null===this||void 0===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var o,n,r=this.length>>>0,i=!1;for(1o;++o)this.hasOwnProperty(o)&&(i?n=e(n,this[o],o,this):(n=this[o],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return n}),C.fn=n.prototype={clone:function(){return C(this)},format:function(e,t){return l(this,e||x,void 0!==t?t:Math.round)},formatCurrency:function(e,t){return c(this,E[T].currency.symbol,e||D,void 0!==t?t:Math.round)},formatForeignCurrency:function(e,t,o){return d(this,e,t||D,void 0!==o?o:Math.round)},unformat:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=u(this,e);return isNaN(t)?void 0:t}},binaryByteUnits:function(){return g(this._value,M.binary.suffixes,M.binary.scale).suffix},byteUnits:function(){return g(this._value,M.general.suffixes,M.general.scale).suffix},decimalByteUnits:function(){return g(this._value,M.decimal.suffixes,M.decimal.scale).suffix},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t){return e+o*t}var o=b.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/o,this},subtract:function(e){function t(e,t){return e-o*t}var o=b.call(null,this._value,e);return this._value=[e].reduce(t,this._value*o)/o,this},multiply:function(e){function t(e,t){var o=b(e,t),n=e*o;return n*=t*o,n/=o*o}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t){var o=b(e,t);return e*o/(t*o)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(C(this._value).subtract(e).value())}},function(){return"undefined"!=typeof process&&void 0===process.browser&&process.title&&(-1!==process.title.indexOf("node")||process.title.indexOf("meteor-tool")>0||"grunt"===process.title||"gulp"===process.title)&&void 0!==t}()&&C.loadCulturesInNode(),H?o.exports=C:("undefined"==typeof ender&&(this.numbro=C),"function"==typeof e&&e.amd&&e([],function(){return C}))}).call("undefined"==typeof window?this:window)},{languages:1}],pikaday:[function(t,o,n){/*! * Pikaday * * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday */ !function(r,i){"use strict";var s;if("object"==typeof n){try{s=t("moment")}catch(e){}o.exports=i(s)}else"function"==typeof e&&e.amd?e(function(e){try{s=e("moment")}catch(e){}return i(s)}):r.Pikaday=i(r.moment)}(this,function(e){"use strict";var t="function"==typeof e,o=!!window.addEventListener,n=window.document,r=window.setTimeout,i=function(e,t,n,r){o?e.addEventListener(t,n,!!r):e.attachEvent("on"+t,n)},s=function(e,t,n,r){o?e.removeEventListener(t,n,!!r):e.detachEvent("on"+t,n)},a=function(e,t,o){var r;n.createEvent?(r=n.createEvent("HTMLEvents"),r.initEvent(t,!0,!1),r=y(r,o),e.dispatchEvent(r)):n.createEventObject&&(r=n.createEventObject(),r=y(r,o),e.fireEvent("on"+t,r))},l=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},u=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},c=function(e,t){u(e,t)||(e.className=""===e.className?t:e.className+" "+t)},d=function(e,t){e.className=l((" "+e.className+" ").replace(" "+t+" "," "))},h=function(e){return/Array/.test(Object.prototype.toString.call(e))},f=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},p=function(e){var t=e.getDay();return 0===t||6===t},g=function(e){return e%4==0&&e%100!=0||e%400==0},m=function(e,t){return[31,g(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},w=function(e){f(e)&&e.setHours(0,0,0,0)},v=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,o){var n,r;for(n in t)r=void 0!==e[n],r&&"object"==typeof t[n]&&null!==t[n]&&void 0===t[n].nodeName?f(t[n])?o&&(e[n]=new Date(t[n].getTime())):h(t[n])?o&&(e[n]=t[n].slice(0)):e[n]=y({},t[n],o):!o&&r||(e[n]=t[n]);return e},b=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},C={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},_=function(e,t,o){for(t+=e.firstDay;t>=7;)t-=7;return o?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},R=function(e){var t=[],o="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),o="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'"},M=function(e,t,o){var n=new Date(o,0,1);return''+Math.ceil(((new Date(o,t,e)-n)/864e5+n.getDay()+1)/7)+""},S=function(e,t){return""+(t?e.reverse():e).join("")+""},E=function(e){return""+e.join("")+""},O=function(e){var t,o=[];for(e.showWeekNumber&&o.push(""),t=0;t<7;t++)o.push(''+_(e,t,!0)+"");return""+(e.isRTL?o.reverse():o).join("")+""},T=function(e,t,o,n,r,i){var s,a,l,u,c,d=e._o,f=o===d.minYear,p=o===d.maxYear,g='
',m=!0,w=!0;for(l=[],s=0;s<12;s++)l.push('");for(u='
'+d.i18n.months[n]+'
",h(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=o-d.yearRange,a=1+o+d.yearRange),l=[];s=d.minYear&&l.push('");return c='
'+o+d.yearSuffix+'
",d.showMonthAfterYear?g+=c+u:g+=u+c,f&&(0===n||d.minMonth>=n)&&(m=!1),p&&(11===n||d.maxMonth<=n)&&(w=!1),0===t&&(g+='"),t===e._o.numberOfMonths-1&&(g+='"),g+="
"},k=function(e,t,o){return''+O(e)+E(t)+"
"},x=function(s){var a=this,l=a.config(s);a._onMouseDown=function(e){if(a._v){e=e||window.event;var t=e.target||e.srcElement;if(t)if(u(t,"is-disabled")||(!u(t,"pika-button")||u(t,"is-empty")||u(t.parentNode,"is-disabled")?u(t,"pika-prev")?a.prevMonth():u(t,"pika-next")&&a.nextMonth():(a.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),l.bound&&r(function(){a.hide(),l.field&&l.field.blur()},100))),u(t,"pika-select"))a._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},a._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(u(t,"pika-select-month")?a.gotoMonth(t.value):u(t,"pika-select-year")&&a.gotoYear(t.value))},a._onKeyChange=function(e){if(e=e||window.event,a.isVisible())switch(e.keyCode){case 13:case 27:l.field.blur();break;case 37:e.preventDefault(),a.adjustDate("subtract",1);break;case 38:a.adjustDate("subtract",7);break;case 39:a.adjustDate("add",1);break;case 40:a.adjustDate("add",7)}},a._onInputChange=function(o){var n;o.firedBy!==a&&(t?(n=e(l.field.value,l.format,l.formatStrict),n=n&&n.isValid()?n.toDate():null):n=new Date(Date.parse(l.field.value)),f(n)&&a.setDate(n),a._v||a.show())},a._onInputFocus=function(){a.show()},a._onInputClick=function(){a.show()},a._onInputBlur=function(){var e=n.activeElement;do{if(u(e,"pika-single"))return}while(e=e.parentNode);a._c||(a._b=r(function(){a.hide()},50)),a._c=!1},a._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,n=t;if(t){!o&&u(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",a._onChange)));do{if(u(n,"pika-single")||n===l.trigger)return}while(n=n.parentNode);a._v&&t!==l.trigger&&n!==l.trigger&&a.hide()}},a.el=n.createElement("div"),a.el.className="pika-single"+(l.isRTL?" is-rtl":"")+(l.theme?" "+l.theme:""),i(a.el,"mousedown",a._onMouseDown,!0),i(a.el,"touchend",a._onMouseDown,!0),i(a.el,"change",a._onChange),i(n,"keydown",a._onKeyChange),l.field&&(l.container?l.container.appendChild(a.el):l.bound?n.body.appendChild(a.el):l.field.parentNode.insertBefore(a.el,l.field.nextSibling),i(l.field,"change",a._onInputChange),l.defaultDate||(t&&l.field.value?l.defaultDate=e(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var c=l.defaultDate;f(c)?l.setDefaultDate?a.setDate(c,!0):a.gotoDate(c):a.gotoDate(new Date),l.bound?(this.hide(),a.el.className+=" is-bound",i(l.trigger,"click",a._onInputClick),i(l.trigger,"focus",a._onInputFocus),i(l.trigger,"blur",a._onInputBlur)):this.show()};return x.prototype={config:function(e){this._o||(this._o=y({},C,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var o=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=o>4?4:o,f(t.minDate)||(t.minDate=!1),f(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate100&&(t.yearRange=100);return t},toString:function(o){return f(this._d)?t?e(this._d).format(o||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(o,n){t&&e.isMoment(o)&&this.setDate(o.toDate(),n)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",a(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),f(e)){var o=this._o.minDate,n=this._o.maxDate;f(o)&&en&&(e=n),this._d=new Date(e.getTime()),w(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),a(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(f(e)){if(this.calendars){var o=new Date(this.calendars[0].year,this.calendars[0].month,1),n=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),r=e.getTime();n.setMonth(n.getMonth()+1),n.setDate(n.getDate()-1),t=r=i&&(this._y=i,!isNaN(a)&&this._m>a&&(this._m=a)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u'+T(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"
";this.el.innerHTML=l,o.bound&&"hidden"!==o.field.type&&r(function(){o.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),o.bound&&o.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,o,r,i,s,a,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",e=this._o.trigger,t=e,o=this.el.offsetWidth,r=this.el.offsetHeight,i=window.innerWidth||n.documentElement.clientWidth,s=window.innerHeight||n.documentElement.clientHeight,a=window.pageYOffset||n.body.scrollTop||n.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)c=e.getBoundingClientRect(),l=c.left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+o>i||this._o.position.indexOf("right")>-1&&l-o+e.offsetWidth>0)&&(l=l-o+e.offsetWidth),(this._o.reposition&&u+r>s+a||this._o.position.indexOf("top")>-1&&u-r-e.offsetHeight>0)&&(u=u-r-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,o){var n=this._o,r=new Date,i=m(e,t),s=new Date(e,t,1).getDay(),a=[],l=[];w(r),n.firstDay>0&&(s-=n.firstDay)<0&&(s+=7);for(var u=0===t?11:t-1,c=11===t?0:t+1,d=0===t?e-1:e,h=11===t?e+1:e,g=m(d,u),y=i+s,b=y;b>7;)b-=7;y+=7-b;for(var C=0,_=0;C=i+s,D=C-s+1,H=t,A=e,P=n.startRange&&v(n.startRange,E),N=n.endRange&&v(n.endRange,E),L=n.startRange&&n.endRange&&n.startRangen.maxDate||n.disableWeekends&&p(E)||n.disableDayFn&&n.disableDayFn(E);x&&(C=0&&(U=c(function(){"boolean"!=typeof B.deactivated&&(B.deactivated=!0),!0===B.deactivated&&Je.emit({type:"error",name:"flash-deactivated"})},e)),B.overdue=!1,De()))},ue=function(){Je.clearData(),Je.blur(),Je.emit("destroy"),He(),Je.off()},ce=function(e,t){var o;if("object"==typeof e&&e&&void 0===t)o=e,Je.clearData();else{if("string"!=typeof e||!e)return;o={},o[e]=t}for(var n in o)"string"==typeof n&&n&&R.call(o,n)&&"string"==typeof o[n]&&o[n]&&(z[n]=Xe(o[n]))},de=function(e){void 0===e?(D(z),Y=null):"string"==typeof e&&R.call(z,e)&&delete z[e]},he=function(e){return void 0===e?T(z):"string"==typeof e&&R.call(z,e)?z[e]:void 0},fe=function(e){if(e&&1===e.nodeType){i&&(Be(i,J.activeClass),i!==e&&Be(i,J.hoverClass)),i=e,Ve(e,J.hoverClass);var t=e.getAttribute("title")||J.title;if("string"==typeof t&&t){var o=ke(B.bridge);o&&o.setAttribute("title",t)}var n=!0===J.forceHandCursor||"pointer"===Fe(e,"cursor");$e(n),Ge()}},pe=function(){var e=ke(B.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),i&&(Be(i,J.hoverClass),Be(i,J.activeClass),i=null)},ge=function(){return i||null},me=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},we=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){t=t.toLowerCase(),!e.target&&(/^(copy|aftercopy|_click)$/.test(t)||"error"===t&&"clipboard-error"===e.name)&&(e.target=s),O(e,{type:t,target:e.target||i||null,relatedTarget:e.relatedTarget||null,currentTarget:B&&B.bridge||null,timeStamp:e.timeStamp||C()||null});var o=$[e.type];return"error"===e.type&&e.name&&o&&(o=o[e.name]),o&&(e.message=o),"ready"===e.type&&O(e,{target:null,version:B.version}),"error"===e.type&&(q.test(e.name)&&O(e,{target:null,minimumVersion:"11.0.0"}),Z.test(e.name)&&O(e,{version:B.version}),"flash-insecure"===e.name&&O(e,{pageProtocol:a.location.protocol,swfProtocol:ae()})),"copy"===e.type&&(e.clipboardData={setData:Je.setData,clearData:Je.clearData}),"aftercopy"===e.type&&(e=Pe(e,Y)),e.target&&!e.relatedTarget&&(e.relatedTarget=ve(e.target)),ye(e)}},ve=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?l.getElementById(t):null},ye=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var t=e.target,o="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:void 0,n="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:void 0,r=ze(t),i=a.screenLeft||a.screenX||0,s=a.screenTop||a.screenY||0,u=l.body.scrollLeft+l.documentElement.scrollLeft,c=l.body.scrollTop+l.documentElement.scrollTop,d=r.left+("number"==typeof e._stageX?e._stageX:0),h=r.top+("number"==typeof e._stageY?e._stageY:0),f=d-u,p=h-c,g=i+f,m=s+p,w="number"==typeof e.movementX?e.movementX:0,v="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,O(e,{srcElement:t,fromElement:o,toElement:n,screenX:g,screenY:m,pageX:d,pageY:h,clientX:f,clientY:p,x:f,y:p,movementX:w,movementY:v,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},be=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},Ce=function(e,t,o,n){n?c(function(){e.apply(t,o)},0):e.apply(t,o)},_e=function(e){if("object"==typeof e&&e&&e.type){var t=be(e),o=F["*"]||[],n=F[e.type]||[],r=o.concat(n);if(r&&r.length){var i,s,l,u,c,d=this;for(i=0,s=r.length;i0){var t=T(e);O(t,{type:"error",name:"clipboard-error"}),delete t.success,c(function(){Je.emit(t)},0)}},Ee=function(e){if(e&&"string"==typeof e.type&&e){var t,o=e.target||null,n=o&&o.ownerDocument||l,r={view:n.defaultView||a,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:n.createEvent?0:1},i=O(r,e);o&&n.createEvent&&o.dispatchEvent&&(i=[i.type,i.canBubble,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget],t=n.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,i),t._source="js",o.dispatchEvent(t)))}},Oe=function(){var e=J.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),o=J.swfObjectId+"_fallbackContent";G=h(function(){var e=l.getElementById(o);Ye(e)&&(Ue(),B.deactivated=null,Je.emit({type:"error",name:"swf-not-found"}))},t)}},Te=function(){var e=l.createElement("div");return e.id=J.containerId,e.className=J.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+Ke(J.zIndex),e},ke=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},xe=function(e){return"string"==typeof e&&e?e.replace(/["&'<>]/g,function(e){switch(e){case'"':return""";case"&":return"&";case"'":return"'";case"<":return"<";case">":return">";default:return e}}):e},De=function(){var e,t=B.bridge,o=ke(t);if(!t){var n=We(a.location.host,J),r="never"===n?"none":"all",i=Le(O({jsVersion:Je.version},J)),s=J.swfPath+Ne(J.swfPath,J);V&&(s=xe(s)),o=Te();var u=l.createElement("div");o.appendChild(u),l.body.appendChild(o);var c=l.createElement("div"),d="activex"===B.pluginType;c.innerHTML='"+(d?'':"")+'
 
',t=c.firstChild,c=null,S(t).ZeroClipboard=Je,o.replaceChild(t,u),Oe()}return t||(t=l[J.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&o&&(t=o.firstChild)),B.bridge=t||null,t},He=function(){var e=B.bridge;if(e){var t=ke(e);t&&("activex"===B.pluginType&&"readyState"in e?(e.style.display="none",function o(){if(4===e.readyState){for(var n in e)"function"==typeof e[n]&&(e[n]=null);e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t)}else c(o,10)}()):(e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t))),Ue(),B.ready=null,B.bridge=null,B.deactivated=null,B.insecure=null,r=void 0}},Ae=function(e){var t={},o={};if("object"==typeof e&&e){for(var n in e)if(n&&R.call(e,n)&&"string"==typeof e[n]&&e[n])switch(n.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[n],o.text=n;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[n],o.html=n;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[n],o.rtf=n}return{data:t,formatMap:o}}},Pe=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var o={};for(var n in e)if(R.call(e,n))if("errors"===n){o[n]=e[n]?e[n].slice():[];for(var r=0,i=o[n].length;r0){if(1===i&&"*"===r[0])return"always";if(-1!==r.indexOf(t))return 1===i&&t===n?"sameDomain":"always"}return"never"}}(),je=function(){try{return l.activeElement}catch(e){return null}},Ve=function(e,t){var o,n,r,i=[];if("string"==typeof t&&t&&(i=t.split(/\s+/)),e&&1===e.nodeType&&i.length>0){for(r=(" "+(e.className||"")+" ").replace(/[\t\r\n\f]/g," "),o=0,n=i.length;o0&&e.className){for(r=(" "+e.className+" ").replace(/[\t\r\n\f]/g," "),o=0,n=i.length;o0,n=y(t.width)>0,r=y(t.top)>=0,i=y(t.left)>=0,s=o&&n&&r&&i,a=s?null:ze(e);return"none"!==t.display&&"collapse"!==t.visibility&&(s||!!a&&(o||a.height>0)&&(n||a.width>0)&&(r||a.top>=0)&&(i||a.left>=0))},Ue=function(){d(U),U=0,f(G),G=0},Ge=function(){var e;if(i&&(e=ke(B.bridge))){var t=ze(i);O(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+Ke(J.zIndex)})}},$e=function(e){!0===B.ready&&(B.bridge&&"function"==typeof B.bridge.setHandCursor?B.bridge.setHandCursor(e):B.ready=!1)},Ke=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||b(e)?"string"==typeof e&&(t=Ke(v(e,10))):t=e,"number"==typeof t?t:"auto"},Xe=function(e){return"string"==typeof e&&!0===J.fixLineEndings&&(W()?/((^|[^\r])\n|\r([^\n]|$))/.test(e)&&(e=e.replace(/(\r\n|\r|\n)/g,"\r\n")):/\r/.test(e)&&(e=e.replace(/(\r\n|\r|\n)/g,"\n"))),e},qe=function(e){var o,n,r,i=B.sandboxed,s=null;if(e=!0===e,!1===j)s=!1;else{try{n=t.frameElement||null}catch(e){r={name:e.name,message:e.message}}if(n&&1===n.nodeType&&"IFRAME"===n.nodeName)try{s=n.hasAttribute("sandbox")}catch(e){s=null}else{try{o=document.domain||null}catch(e){o=null}(null===o||r&&"SecurityError"===r.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(r.message.toLowerCase()))&&(s=!0)}}return B.sandboxed=s,i===s||e||Ze(m),s},Ze=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function o(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function n(e){e&&(a=!0,e.version&&(d=t(e.version)),!d&&e.description&&(d=t(e.description)),e.filename&&(c=o(e.filename)))}var r,i,s,a=!1,l=!1,c=!1,d="";if(u.plugins&&u.plugins.length)r=u.plugins["Shockwave Flash"],n(r),u.plugins["Shockwave Flash 2.0"]&&(a=!0,d="2.0.0.11");else if(u.mimeTypes&&u.mimeTypes.length)s=u.mimeTypes["application/x-shockwave-flash"],r=s&&s.enabledPlugin,n(r);else if(void 0!==e){l=!0;try{i=new e("ShockwaveFlash.ShockwaveFlash.7"),a=!0,d=t(i.GetVariable("$version"))}catch(o){try{i=new e("ShockwaveFlash.ShockwaveFlash.6"),a=!0,d="6.0.21"}catch(o){try{i=new e("ShockwaveFlash.ShockwaveFlash"),a=!0,d=t(i.GetVariable("$version"))}catch(e){l=!1}}}}B.disabled=!0!==a,B.outdated=d&&y(d)0,r=!e.target||n&&-1!==o.indexOf(e.target),i=e.relatedTarget&&n&&-1!==o.indexOf(e.relatedTarget),s=e.client&&e.client===this;return!(!t||!(r||i||s))},pt=function(e){var t=et[this.id];if("object"==typeof e&&e&&e.type&&t){var o=be(e),n=t&&t.handlers["*"]||[],r=t&&t.handlers[e.type]||[],i=n.concat(r);if(i&&i.length){var s,l,u,c,d,h=this;for(s=0,l=i.length;s



© 2015 - 2025 Weber Informatics LLC | Privacy Policy