97 lines
584 KiB
JavaScript
Raw Normal View History

/*!
(The MIT License)
Copyright (c) 2012-2014 Marcin Warpechowski
Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net>
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;a<n.length;a++)r(n[a]);return r}({1:[function(e,t,o){},{}],2:[function(e,t,o){window.jQuery&&function(e){e.fn.handsontable=function(e){var t,o,n,r,i,s=this.first(),a=s.data("handsontable");if("string"!=typeof e)return i=e||{},a?a.updateSettings(i):(a=new Handsontable.Core(s[0],i),s.data("handsontable",a),a.init()),s;if(n=[],arguments.length>1)for(t=1,o=arguments.length;t<o;t++)n.push(arguments[t]);if(a){if(void 0===a[e])throw new Error("Handsontable do not provide action: "+e);r=a[e].apply(a,n),"destroy"===e&&s.removeData()}return r}}(window.jQuery)},{}],3:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableBorder:{get:function(){return C}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(n=e("helpers/dom/element"))&&n.__esModule&&n||{default:n},c=u.getComputedStyle,d=u.getTrimmingContainer,h=u.innerWidth,f=u.innerHeight,p=u.offset,g=u.outerHeight,m=u.outerWidth,w=((r=e("helpers/dom/event"))&&r.__esModule&&r||{default:r}).stopImmediatePropagation,v=((i=e("helpers/browser"))&&i.__esModule&&i||{default:i}).isMobileBrowser,y=((s=e("eventManager"))&&s.__esModule&&s||{default:s}).EventManager,b=((a=e("cell/coords"))&&a.__esModule&&a||{default:a}).WalkontableCellCoords,C=(((l=e("overlay/_base.js"))&&l.__esModule&&l||{default:l}).WalkontableOverlay,function(e,t){t&&(this.eventManager=new y(e),this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"5px",height:"5px",borderWidth:"2px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())});$traceurRuntime.createClass(C,{registerListeners:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return e.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return e.onMouseUp()});for(var t=this,o=0,n=this.main.childNodes.length;o<n;o++)!function(o,n){t.eventManager.addEventListener(t.main.childNodes[o],"mouseenter",function(t){return e.onMouseEnter(t,e.main.childNodes[o])})}(o)},onMouseDown:function(){this.mouseDown=!0},onMouseUp:function(){this.mouseDown=!1},onMouseEnter:function(e,t){function o(e){return e.clientY<Math.floor(i.top)||(e.clientY>Math.ceil(i.top+i.height)||(e.clientX<Math.floor(i.left)||(e.clientX>Math.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].c
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],fun
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<s;u++)if((n=e.wtTable.columnFilter.renderedToSource(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<i;d++){if((o=e.wtTable.rowFilter.renderedToSource(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<s;f++)n=e.wtTable.columnFilter.renderedToSource(f),o>=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,viewportColumnCalculatorOve
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.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1))},areAllProposedVisibleColumnsAlreadyRendered:function(e){return!!this.columnsVisibleCalculator&&(!(e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1))},resetHasOversizedColumnHeadersMarked:function(){m(this.hasOversizedColumnHeadersMarked,function(e,t,o){o[t]=void 0})}},{}),window.WalkontableViewport=b},{browser:24,"calculator/viewportColumns":4,"calculator/viewportRows":5,eventManager:42,"helpers/dom/element":47,"helpers/object":53}],24:[function(e,t,o){"use strict";function n(e,t){var o=new n.Core(e,t||{});return o.init(),o}var r,i,s,a,l,u,c,d,h,f,p,g,m,w,v,y,b,C,_,R,M,S,E,O;t.exports=n,n.utils={},(r=e("shims/runtime"))&&r.__esModule,(i=e("es6collections"))&&i.__esModule;var T=((s=e("pluginHooks"))&&s.__esModule&&s||{default:s}).Hooks,k=((a=e("numbro"))&&a.__esModule&&a||{default:a}).default,x=((l=e("moment"))&&l.__esModule&&l||{default:l}).default;"object"==typeof window&&(void 0===window.numbro&&(window.numbro=k),void 0===window.moment&&(window.moment=x)),n.hooks||(n.hooks=new T),n.utils.Hooks=T,(u=e("core"))&&u.__esModule,(c=e("renderers/_cellDecorator"))&&c.__esModule,(d=e("cellTypes"))&&d.__esModule,(h=e("plugins/jqueryHandsontable"))&&h.__esModule;var D=(f=e("helpers/array"))&&f.__esModule&&f||{default:f},H=(p=e("helpers/browser"))&&p.__esModule&&p||{default:p},A=(g=e("helpers/data"))&&g.__esModule&&g||{default:g},P=(m=e("helpers/date"))&&m.__esModule&&m||{default:m},N=(w=e("helpers/feature"))&&w.__esModule&&w||{default:w},L=(v=e("helpers/function"))&&v.__esModule&&v||{default:v},I=(y=e("helpers/mixed"))&&y.__esModule&&y||{default:y},W=(b=e("helpers/number"))&&b.__esModule&&b||{default:b},j=(C=e("helpers/object"))&&C.__esModule&&C||{default:C},V=(_=e("helpers/se
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<arguments.length;r++)n[r-2]=arguments[r];(o=l.cellSettings).splice.apply(o,$traceurRuntime.spread([e,t],n))},this.setCellMetaObject=function(e,t,o){if("object"==typeof o)for(var n in o)if(o.hasOwnProperty(n)){var r=o[n];this.setCellMeta(e,t,n,r)}},this.setCellMeta=function(e,t,o,n){var r;r=w.toPhysical(e,t),e=r[0],t=r[1],l.cellSettings[e]||(l.cellSettings[e]=[]),l.cellSettings[e][t]||(l.cellSettings[e][t]=new l.columnSettings[t]),l.cellSettings[e][t][o]=n,E.hooks.run(p,"afterSetCellMeta",e,t,o,n)},this.getCellsMeta=function(){return Z(l.cellSettings)},this.getCellMeta=function(e,t){var o,n,r=u.colToProp(t),i=e,a=t;if(o=w.toPhysical(e,t),e=o[0],t=o[1],l.columnSettings[t]||(l.columnSettings[t]=A(g,l.columnsSettingConflicts)),l.cellSettings[e]||(l.cellSettings[e]=[]),l.cellSettings[e][t]||(l.cellSettings[e][t]=new l.columnSettings[t]),n=l.cellSettings[e][t],n.row=e,n.col=t,n.visualRow=i,n.visualCol=a,n.prop=r,n.instance=p,E.hooks.run(p,"beforeGetCellMeta",e,t,n),U(n,s(n)),n.cells){var c=n.cells.call(n,e,t,r);c&&(U(n,c),U(n,s(c)))}return E.hooks.run(p,"afterGetCellMeta",e,t,n),n},this.getCellMetaAtRow=function(e){return l.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===p.dataType||p.getSettings().columns)};var v=ae("renderer");this.getCellRenderer=function(e,t){var o=v.call(this,e,t);return ee(o)},this.getCellEditor=ae("editor"),this.getCellValidator=ae("validator"),this.validateCells=function(e){var t=new o;e&&(t.onQueueEmpty=e);for(var n=p.countRows()-1;n>=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
;var l,u,c=((l=e("browser"))&&l.__esModule&&l||{default:l}).default,d=((u=e("helpers/string"))&&u.__esModule&&u||{default:u}).toUpperCaseFirst,h={},f=new WeakMap;c.editors=c.editors||{},c.editors.registerEditor=r,c.editors.getEditor=i},{browser:24,"helpers/string":55}],31:[function(e,t,o){"use strict";function n(e){this.instance=e,this.state=a.EditorState.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}Object.defineProperties(o,{BaseEditor:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a=((r=e("browser"))&&r.__esModule&&r||{default:r}).default,l=((i=e("helpers/mixed"))&&i.__esModule&&i||{default:i}).stringify,u=((s=e("3rdparty/walkontable/src/cell/coords"))&&s.__esModule&&s||{default:s}).WalkontableCellCoords;a.editors=a.editors||{},a.editors.BaseEditor=n,a.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"},n.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},n.prototype.init=function(){},n.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},n.prototype.setValue=function(e){throw Error("Editor setValue() method unimplemented")},n.prototype.open=function(){throw Error("Editor open() method unimplemented")},n.prototype.close=function(){throw Error("Editor close() method unimplemented")},n.prototype.prepare=function(e,t,o,n,r,i){this.TD=n,this.row=e,this.col=t,this.prop=o,this.originalValue=r,this.cellProperties=i;var s=!document.activeElement||document.activeElement&&void 0===document.activeElement.nodeName;this.instance.view.isMouseDown()&&document.activeElement&&document.activeElement!==document.body&&!s?document.activeElement.blur():s&&document.body.focus(),this.state=a.EditorState.VIRGIN},n.prototype.extend=function(){function e(){t.apply(this,arguments)}var t=this.constructor;return function(e,t){function o(){}return o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e,e}(e,t)},n.prototype.saveValue=function(e,t){var o,n;t?(o=this.instance.getSelected(),o[0]>o[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
;var O=function(e){var t=this,o=t.getActiveEditor();switch(e.keyCode){case _.ARROW_UP:var n=o.select.selectedIndex-1;n>=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.
var t=(new Date).getTime(),o=Math.max(0,16-(t-c)),n=window.setTimeout(function(){e(t+o)},o);return c=t+o,n}),f||(f=function(e){clearTimeout(e)});var g,m},{}],50:[function(e,t,o){"use strict";function n(e){return"function"==typeof e}function r(e,t){return function(){return e.apply(t,arguments)}}function i(e){function t(){var t=this,s=arguments,a=Date.now(),l=!1;r.lastCallThrottled=!0,n||(n=a,l=!0);var u=o-(a-n);return l?(r.lastCallThrottled=!1,e.apply(this,s)):(i&&clearTimeout(i),i=setTimeout(function(){r.lastCallThrottled=!1,e.apply(t,s),n=0,i=void 0},u)),r}var o=void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},i=null;return t}function s(e){function t(){a=r}function o(){return a?(a--,e.apply(this,arguments)):s.apply(this,arguments)}var n=void 0!==arguments[1]?arguments[1]:200,r=void 0!==arguments[2]?arguments[2]:10,s=i(e,n),a=r;return o.clearHits=t,o}function a(e){function t(){var t=this,i=arguments;return r&&clearTimeout(r),r=setTimeout(function(){o=e.apply(t,i)},n),o}var o,n=void 0!==arguments[1]?arguments[1]:200,r=null;return t}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=e,n=o[0],r=Array.prototype.slice.call(o,1);return function(){return f(r,function(e,t){return t(e)},n.apply(this,arguments))}}function u(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.apply(this,t.concat(o))}}function c(e){function t(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var s=n.concat(r);return s.length>=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<arguments.length;i++)r[i]=arguments[i];var s=n.concat(r.reverse());return s.length>=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
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<n?r=v(i):(w(r),t.inProgress=!1,t.hot.view.wt.wtOverlays.adjustElementsSize(!0),t.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&t.hot.view.wt.wtOverlays.leftOverlay.clone.draw())};this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateRowsHeight({from:0,to:this.getSyncCalculationLimit()},e),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),o<n?i():(this.inProgress=!1,this.hot.view.wt.wtOverlays.adjustElementsSize(!1))},setSamplingOptions:function(){var e=this.hot.getSettings().autoRowSize,t=e&&e.hasOwnProperty("samplingRatio")?this.hot.getSettings().autoRowSize.samplingRatio:void 0,o=e&&e.hasOwnProperty("allowSampleDuplicates")?this.hot.getSettings().autoRowSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)},recalculateAllRowsHeight:function(){y(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())},getSyncCalculationLimit:function(){var e=x.SYNC_CALCULATION_LIMIT,t=this.hot.countRows()-1;return _(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,T(e)?e=M(t,e):e>>=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,
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<arguments.length;o++)t[o-1]=arguments[o];var r=this,s=e.split(":");e=s[0];var a=2===s.length?s[1]:null,l=this.commands[e];if(!l)throw new Error("Menu command '"+e+"' not exists.");if(a&&l.submenu&&(l=n(a,l.submenu.items)),!0!==l.disabled&&("function"!=typeof l.disabled||!0!==l.disabled.call(this.hot))&&!l.hasOwnProperty("submenu")){var u=[];"function"==typeof l.callback&&u.push(l.callback),"function"==typeof this.commonCallback&&u.push(this.commonCallback),t.unshift(s.join(":")),i(u,function(e){return e.apply(r.hot,t)})}}},{})},{"helpers/array":43}],71:[function(e,t,o){"use strict";Object.defineProperties(o,{ContextMenu:{get:function(){return F}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,l,f,p=((n=e("browser"))&&n.__esModule&&n||{default:n}).default,g=((r=e("_base"))&&r.__esModule&&r||{default:r}).default,m=((i=e("helpers/array"))&&i.__esModule&&i||{default:i}).arrayEach,w=((s=e("commandExecutor"))&&s.__esModule&&s||{default:s}).CommandExecutor,v=((a=e("eventManager"))&&a.__esModule&&a||{default:a}).EventManager,y=((l=e("helpers/dom/element"))&&l.__esModule&&l||{default:l}).hasClass,b=((u=e("itemsFactory"))&&u.__esModule&&u||{default:u}).ItemsFactory,C=((c=e("menu"))&&c.__esModule&&c||{default:c}).Menu,_=((d=e("plugins"))&&d.__esModule&&d||{default:d}).registerPlugin,R=(h=e("helpers/dom/event"))&&h.__esM
},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++)
e.coordsColumn<0)e.fixedColumns>0?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<u+h&&(p=u+h+Math.abs(c)),s>=l-1?g=l-1:0===g?g=1:void 0!==r.scrollX&&e.coordsColumn<e.fixedColumns&&(g-=e.rootElementOffset<=r.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,p),this.guideline.setPosition(null,g)},updateColumnsMapper:function(){var e=this.hot.countSourceCols(),t=this.columnsMapper._arrayMap.length;if(0===t)this.columnsMapper.createMap(e||this.hot.getSettings().startCols);else if(t<e){var o=e-t;this.columnsMapper.insertItems(t,o)}else if(t>e){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<a.fixedColumns,_=this.hot.view.wt.wtOverlays.scrollableElement,R=_.scrollX?_.scrollX-a.rootElementOffset:0,M=e.layerX-(C?R:0),S=Math.abs(this.getColumnsWidth(p,t.col)+M);this.backlight.setPosition(b,this.getColumnsWidth(m,p)+S),this.backlight.setSize(this.getColumnsWidth(p,g+1),r.hider.offsetHeight-b),this.backlight.setOffset(null,-1*S),w(this.hot.rootElement,"on-moving--columns")}else v(this.hot.rootElement,"after-selection--columns"),a.pressed=!1,a.columnsToMove.length=0},onMouseMove:function(e){var t=E.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var o=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout(function(){this.backlight.setPosition(o)})}t.target.eventPageX=e.pageX,this.refreshPositions()}},onBeforeOnCellMouseOver:function(e,t,o,n){var r=this.hot.getSelectedRange(),i=E.get(this);r&&i.pressed&&(i.columnsToMove.indexOf(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
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<n;o++)if(this[o].row<=e&&this[o].row+this[o].rowspan-1>=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;t<o;t++)if(this[t].row===e.row&&this[t].col===e.col)return void(this[t]=e);this.push(e)},e.removeInfo=function(e,t){for(var o=0,n=this.length;o<n;o++)if(this[o].row===e&&this[o].col===t){this.splice(o,1);break}},e}function r(e){if(this.mergedCellInfoC
}),e.addHook("beforeCellAlignment",function(e,o,n,r){var i=new f.UndoRedo.CellAlignmentAction(e,o,n,r);t.done(i)}),e.addHook("beforeFilter",function(e){t.done(new f.UndoRedo.FiltersAction(e))}),e.addHook("beforeRowMove",function(e,o){!1!==e&&t.done(new f.UndoRedo.RowMoveAction(e,o))})},f.UndoRedo.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},f.UndoRedo.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=v(e),o=this.instance;if(!1===o.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var n=this;e.undo(this.instance,function(){n.ignoreNewActions=!1,n.undoneActions.push(e)}),o.runHooks("afterUndo",t)}},f.UndoRedo.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=v(e),o=this.instance;if(!1===o.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var n=this;e.redo(this.instance,function(){n.ignoreNewActions=!1,n.doneActions.push(e)}),o.runHooks("afterRedo",t)}},f.UndoRedo.prototype.isUndoAvailable=function(){return this.doneActions.length>0},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<s;i++)o[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(o,null,null,"UndoRedo.undo");for(var a=0,l=o.length;a<l;a++)e.getSettings().minSpareRows&&o[a][0]+1+e.getSettings().minSpareRows===e.countRows()&&n==e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(o[a][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&o[a][1]+1+e.getSettings().minSpareCols===e.countCols()&&r==e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(o[a][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},f.UndoRedo.ChangeAction.prototype.redo=function(e,t){for(var o=v(this.changes),n=0,r=o.length;n<r;n++)o[n].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(o,null,null,"UndoRedo.redo")},f.UndoRedo.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},w(f.UndoRedo.CreateRowAction,f.UndoRedo.Action),f.UndoRedo.CreateRowAction.prototype.undo=function(e,t){var o=e.countRows(),n=e.getSettings().minSpareRows;this.index>=o&&this.index-n<o&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},f.UndoRedo.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index,this.amount,"UndoRedo.redo")},f.UndoRedo.RemoveRowAction=function(e,t){this.index=e,this.data=t,this.actionType="remove_row"},w(f.UndoRedo.RemoveRowAction,f.UndoRedo.Action),f.UndoRedo.RemoveRowAction.prototype.undo=function(e,t){e.alter("insert_row",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterRender",t),e.populateFromArray(this.index,0,this.data,void 0,void 0,"UndoRedo.undo")},f.UndoRedo.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},f.UndoRedo.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},w(f.UndoRedo.CreateColumnAction,f.UndoRedo.Action),f.UndoRedo.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},f.UndoRedo.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index,this.amount,"UndoRedo.redo")},f.UndoRedo.RemoveColumnAction=function(e,t,o,n,r){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length
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,{NodeS
* Copyright (C) 2011 by Andrea Giammarchi, @WebReflection
*
* 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){"use strict";function t(e,t){function n(e){if(!this||this.constructor!==n)return new n(e);this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,e&&o.call(this,e)}return t||y(e,"size",{get:m}),e.constructor=n,n.prototype=e,n}function o(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function n(e){return this.has(e)&&(this._keys.splice(v,1),this._values.splice(v,1),this._itp.forEach(function(e){v<e[0]&&e[0]--})),-1<v}function r(e){return this.has(e)?this._values[v]:void 0}function i(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(v=e.length;v--&&!b(e[v],t););else v=e.indexOf(t);return-1<v}function s(e){return i.call(this,this._values,e)}function a(e){return i.call(this,this._keys,e)}function l(e,t){return this.has(e)?this._values[v]=t:this._values[this._keys.push(e)-1]=t,this}function u(e){return this.has(e)||this._values.push(e),this}function c(){this._values.length=0}function d(){return g(this._itp,this._keys)}function h(){return g(this._itp,this._values)}function f(){return g(this._itp,this._keys,this._values)}function p(){return g(this._itp,this._values,this._values)}function g(e,t,o){var n=[0],r=!1;return e.push(n),{next:function(){var i,s=n[0];return!r&&s<t.length?(i=o?[t[s],o[s]]:t[s],n[0]++):(r=!0,e.splice(e.indexOf(n),1)),{done:r,value:i}}}}function m(){return this._values.length}function w(e,t){for(var o=this.entries();;){var n=o.next();if(n.done)break;e.call(t,n.value[1],n.value[0],this)}}var v,y=Object.defineProperty,b=function(e,t){return isNaN(e)?isNaN(t):e===t};"undefined"==typeof WeakMap&&(e.WeakMap=t({delete:n,clear:c,get:r,has:a,set:l},!0)),"undefined"==typeof Map&&(e.Map=t({delete:n,has:a,get:r,set:l,keys:d,values:h,entries:f,forEach:w,clear:c})),"undefined"==typeof Set&&(e.Set=t({has:s,add:u,delete:n,clear:c,keys:h,values:h,entries:p,forEach:w})),"undefined"==typeof WeakSet&&(e.WeakSet=t({delete:n,add:u,clear:c,has:s},!0))}(void 0!==o&&"undefined"!=typeof global?global:window)},{}],jsonpatch:[function(e,t,o){/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* json-patch-duplex.js version: 0.5.7
* (c) 2013 Joachim Wester
* MIT license
*/
var n,r=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},i=Error;!function(e){function t(e,o){switch(typeof e){case"undefined":case"boolean":case"string":case"number":return e===o;case"object":if(null===e)return null===o;if(E(e)){if(!E(o)||e.length!==o.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!t(e[n],o[n]))return!1;return!0}var i=y(o),s=i.length;if(y(e).length!==s)return!1;for(var n=0;n<s;n++)if(!t(e[n],o[n]))return!1;return!0;default:return!1}}function o(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e){for(var t=0,o=R.length;t<o;t++)if(R[t].obj===e)return R[t]}function s(e,t){for(var o=0,n=e.observers.length;o<n;o++)if(e.observers[o].callback===t)return e.observers[o].observer}function a(e,t){for(var o=0,n=e.observers.length;o<n;o++)if(e.observers[o].observer===t)return void e.observers.splice(o,1)}function l(e,t){t.unobserve()}function u(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function c(e,t){var o,r=[],l=n(e);if(l?o=s(l,t):(l=new M(e),R.push(l)),o)return o;if(o={},l.value=u(e),t){o.callback=t,o.next=null;var c=this.intervals||[100,1e3,1e4,6e4];if(void 0===c.push)throw new i("jsonpatch.intervals must be an array");var h=0,f=function(){d(o)},p=function(){clearTimeout(o.next),o.next=setTimeout(function(){f(),h=0,o.next=setTimeout(g,c[h++])},0)},g=function(){f(),h==c.length&&(h=c.length-1),o.next=setTimeout(g,c[h++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",p),window.addEventListener("mouseup",p),window.addEventListener("keydown",p)):(document.documentElement.attachEvent("onmousedown",p),document.documentElement.attachEvent("onmouseup",p),document.documentElement.attachEvent("onkeydown",p))),o.next=setTimeout(g,c[h++])}return o.patches=r,o.object=e,o.unobserve=function(){d(o),clearTimeout(o.next),a(l,o),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mousedown",p),window.removeEventListener("mouseup",p),window.removeEventListener("keydown",p)):(document.documentElement.detachEvent("onmousedown",p),document.documentElement.detachEvent("onmouseup",p),document.documentElement.detachEvent("onkeydown",p)))},l.observers.push(new S(t,o)),o}function d(e){for(var t,o=0,n=R.length;o<n;o++)if(R[o].obj===e.object){t=R[o];break}h(t.value,e.object,e.patches,""),e.patches.length&&p(t.value,e.patches);var r=e.patches;return r.length>0&&(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<i.length;l++){var c=i[l];e.hasOwnProperty(c)||n.push({op:"add",path:r+"/"+o(c),value:u(t[c])})}}function f(e){for(var t,o=0,n=e.length;o<n;){t=e.charCodeAt(o);{if(!(t>=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<a;){n=t[s],s++;for(var l=n.path||"",u=l.split("/"),c=e,d=1,h=u.length,p=void 0;;){if(r=u[d],o&&void 0===p&&(void 0===c[r]?p=u.slice(0,d).join("/"):d==h-1&&(p=n.path),void 0!==p&&this.validator(n,s-1,e,p)),d++,void 0===r&&d>=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
;this._isValid=Mt(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*a*60*60,this._days=+s+7*i,this._months=+r+3*n+12*o,this._data={},this._locale=ot(),this._bubble()}function Tt(e){return e instanceof Ot}function kt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function xt(e,t){$(e,0,0,function(){var e=this.utcOffset(),o="+";return e<0&&(e=-e,o="-"),o+G(~~(e/60),2)+t+G(~~e%60,2)})}function Dt(e,t){var o=(t||"").match(e);if(null===o)return null;var n=o[o.length-1]||[],r=(n+"").match(xr)||["-",0,0],i=+60*r[1]+C(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Ht(t,o){var n,r;return o._isUTC?(n=o.clone(),r=(y(t)||l(t)?t.valueOf():bt(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),e.updateOffset(n,!1),n):bt(t).local()}function At(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Pt(t,o,n){var r,i=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Dt(Bn,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&o&&(r=At(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!o||this._changeInProgress?qt(this,Ut(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:At(this)}function Nt(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Lt(e){return this.utcOffset(0,e)}function It(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(At(this),"m")),this}function Wt(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Dt(Vn,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function jt(e){return!!this.isValid()&&(e=e?bt(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function Vt(){return this.utcOffset()>this.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)
* 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;t<e;t++)o+="0";return o}function s(e,t){var o,n,r,s,a,l,u,c;return c=e.toString(),o=c.split("e")[0],s=c.split("e")[1],n=o.split(".")[0],r=o.split(".")[1]||"",+s>0?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<l||a<u||a<c)&&(r=0),i.splice(r,0,t+d),i=i.join("")):i=t+d+i:i.indexOf(")")>-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<t.length;++n)if(r=Math.pow(o,n),i=Math.pow(o,n+1),a>=r&&a<i){s=t[n],e/=r;break}s===t[0]&&(e/=Math.pow(o,t.length-1),s=t[t.length-1])}return{value:e,suffix:s}}function m(e,t,o,n){var s,l,u,c,d,h,f,p,m,w,v,y,b,C,_,R,M=!1,O=!1,x=!1,D="",H=!1,A=!1,P=!1,N=!1,L=!1,I="",W="",j=Math.abs(e),V="",B=!1,F=!1,z="";if(0===e&&null!==k)return k;if(!isFinite(e))return""+e;if(0===t.indexOf("{")){var Y=t.indexOf("}");if(-1===Y)throw Error('Format should also contain a "}"');w=t.slice(1,Y),t=t.slice(Y+1)}else w="";if(t.in
* 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'<td class="is-empty"></td>';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"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+o+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},M=function(e,t,o){var n=new Date(o,0,1);return'<td class="pika-week">'+Math.ceil(((new Date(o,t,e)-n)/864e5+n.getDay()+1)/7)+"</td>"},S=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},E=function(e){return"<tbody>"+e.join("")+"</tbody>"},O=function(e){var t,o=[];for(e.showWeekNumber&&o.push("<th></th>"),t=0;t<7;t++)o.push('<th scope="col"><abbr title="'+_(e,t)+'">'+_(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?o.reverse():o).join("")+"</tr></thead>"},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='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',m=!0,w=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(o===r?s-t:12+s-t)+'"'+(s===n?' selected="selected"':"")+(f&&s<d.minMonth||p&&s>d.maxMonth?'disa
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface
* Copyright (c) 2009-2016 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.3.0
*/
!function(t,n){"use strict";var r,i,s,a=t,l=a.document,u=a.navigator,c=a.setTimeout,d=a.clearTimeout,h=a.setInterval,f=a.clearInterval,p=a.getComputedStyle,g=a.encodeURIComponent,m=a.ActiveXObject,w=a.Error,v=a.Number.parseInt||a.parseInt,y=a.Number.parseFloat||a.parseFloat,b=a.Number.isNaN||a.isNaN,C=a.Date.now,_=a.Object.keys,R=a.Object.prototype.hasOwnProperty,M=a.Array.prototype.slice,S=function(){var e=function(e){return e};if("function"==typeof a.wrap&&"function"==typeof a.unwrap)try{var t=l.createElement("div"),o=a.unwrap(t);1===t.nodeType&&o&&1===o.nodeType&&(e=a.unwrap)}catch(e){}return e}(),E=function(e){return M.call(e,0)},O=function(){var e,t,o,n,r,i=E(arguments),s=i[0]||{};for(e=1,t=i.length;e<t;e++)if(null!=(o=i[e]))for(n in o)R.call(o,n)&&(s[n],r=o[n],s!==r&&void 0!==r&&(s[n]=r));return s},T=function(e){var t,o,n,r;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],o=0,n=e.length;o<n;o++)R.call(e,o)&&(t[o]=T(e[o]));else{t={};for(r in e)R.call(e,r)&&(t[r]=T(e[r]))}return t},k=function(e,t){for(var o={},n=0,r=t.length;n<r;n++)t[n]in e&&(o[t[n]]=e[t[n]]);return o},x=function(e,t){var o={};for(var n in e)-1===t.indexOf(n)&&(o[n]=e[n]);return o},D=function(e){if(e)for(var t in e)R.call(e,t)&&delete e[t];return e},H=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},A=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},P=function(e){var t,o;return"string"==typeof e&&e&&(o=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),o&&o[1]?t=o[1]:(o=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/))&&o[1]&&(t=o[1])),t},N=function(){var e,t;try{throw new w}catch(e){t=e}return t&&(e=t.sourceURL||t.fileName||P(t.stack)),e},L=function(){var e,t,o;if(l.currentScript&&(e=l.currentScript.src))return e;if(t=l.getElementsByTagName("script"),1===t.length)/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface
* Copyright (c) 2009-2016 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.3.0
*/
return t[0].src||void 0;if("readyState"in(t[0]||document.createElement("script")))for(o=t.length;o--;)if("interactive"===t[o].readyState&&(e=t[o].src))return e;return"loading"===l.readyState&&(e=t[t.length-1].src)?e:(e=N())?e:void 0},I=function(){var e,t,o,n=l.getElementsByTagName("script");for(e=n.length;e--;){if(!(o=n[e].src)){t=null;break}if(o=A(o),null==t)t=o;else if(t!==o){t=null;break}}return t||void 0},W=function(){var e=/win(dows|[\s]?(nt|me|ce|xp|vista|[\d]+))/i;return!!u&&(e.test(u.appVersion||"")||e.test(u.platform||"")||-1!==(u.userAgent||"").indexOf("Windows"))},j=function(){return null==a.opener&&(!!a.top&&a!=a.top||!!a.parent&&a!=a.parent)}(),V="html"===l.documentElement.nodeName,B={bridge:null,version:"0.0.0",pluginType:"unknown",sandboxed:null,disabled:null,outdated:null,insecure:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},F={},z={},Y=null,U=0,G=0,$={ready:"Flash communication is established",error:{"flash-sandboxed":"Attempting to run Flash in a sandboxed iframe, which is impossible","flash-disabled":"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-insecure":"Flash will be unable to communicate due to a protocol mismatch between your `swfPath` configuration and the page","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-degraded":"Flash is unable to preserve data fidelity when communicating with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate.\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity.\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-overdue":"Flash communication was established but NOT within the acceptable time limit","version-mismatch":"ZeroClipboard JS version number does not match ZeroClipboard SWF version number","clipboard-error":"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard","config-mismatch":"ZeroClipboard configuration does not match Flash's reality","swf-not-found":"The ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity","browser-unsupported":"The browser does not support the required HTML DOM and JavaScript features"}},K=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],X=["flash-sandboxed","flash-disabled","flash-outdated","flash-insecure","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],q=new RegExp("^flash-("+X.map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),Z=new RegExp("^flash-("+X.filter(function(e){return"flash-disabled"!==e}).map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),J={swfPath:function(){return(A(L())||I()||"")+"ZeroClipboard.swf"}(),trustedDomains:a.location.host?[a.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,fixLineEndings:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},Q=function(e){"object"!=typeof e||!e||"length"in e||_(e).forEach(function(t){if(/^(?:forceHandCursor|title|zIndex|bubbleEvents|fixLineEndings)$/.test(t))J[t]=e[t];else if(null==B.bridge)if("containerId"===t||"swfObjectId"===t){if(!me(e[t]))throw new Error("The specified `"+t+"` value is not valid as an HTML4 Element ID");J[t]=e[t]}else J[t]=e[t]});{if("string"!=typeof e||!e)return T(J);if(R.call(J,e))return J[e]}},ee=function(){return qe(),{browser:O(k(u,["userAgent","platform","appName","appVersion"]),{isSupported:te()}),flash:x(B,["bridge"]),zeroclipboard:{versio