diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a14cfa6 --- /dev/null +++ b/Makefile @@ -0,0 +1,97 @@ +# Makefile +# Jeff Moe with Parrot and Phind-CodeLlama-34B-v2_q8.gguf + +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = docs/_source +BUILDDIR = docs/_build +AUTOBUILDOPTS = --host 127.0.0.1 --port 8000 --ignore "*.swp" --ignore "*.swx" +GETTEXT_BUILD = gettext_build +UPDATE_LOCALE = sphinx-intl update -p $(BUILDDIR)/locale/gettext -d $(SOURCEDIR)/locale -l +PO_FILES = $(wildcard docs/_source/locale/*/LC_MESSAGES/*.po) +MSGATTRIB = msgattrib +#LANGUAGES = am ar bg bn ca cak cs cy da de el en eo es et eu fa fi fil fr he hi hr hu id it ja ko lkt lt lv mk mr ms ne nl no pl pt ro ru si sk sl sq sr sv ta te th tr uk ur vi zh +LANGUAGES = en + +.PHONY: check help html livehtml clean_sphinx clean gettext_build update_locale build_html all copy clean_po latex latexpdf + +help: + @echo "Please use \`make ' where is one of" + @echo " clean Remove all build files and directories (including translations)" + @echo " all Clean and make all targets" + @echo " gettext_build Build localisation strings for translation" + @echo " update_locale Update localisation" + @echo " update_locale_ Update localisation for " + @echo " html Build the HTML documentation for all languages" + @echo " html_ Build HTML documentation for " + @echo " latex Build the documentation using LaTeX for all languages" + @echo " latex_ Build the documentation using LaTeX for " + @echo " latexpdf Build the PDFS documentation using LaTeX for all languages" + @echo " latexpdf_ Build the PDFS documentation using LaTeX for " + @echo " index Copy static docs/index.html to docs/_build/html/index.html" + @echo " translations Translate from English" + +all: clean gettext_build update_locale html index + +check: + @for po in $(PO_FILES); do \ + echo "Checking $$po..."; \ + msgfmt --check --output-file=- "$$po" || exit 1; \ + done + +index: + cp -p docs/index.html docs/_build/html/index.html + +clean: + for file in $(PO_FILES); do \ + $(MSGATTRIB) --no-obsolete -o $$file $$file; \ + done + cd docs && make clean + find $(SOURCEDIR) -type f -name "*.mo" -delete + rm -rf $(BUILDDIR)/* + +gettext_build: + $(SPHINXBUILD) -b gettext -c $(SOURCEDIR) -d $(BUILDDIR)/doctrees/$(GETTEXT_BUILD) $(SOURCEDIR) $(BUILDDIR)/locale/gettext + +update_locale: + @pids="" ; \ + for lang in $(LANGUAGES); do \ + ( echo "Updating locale for $$lang..." ; $(UPDATE_LOCALE) $$lang ) & pids="$$pids $$!" ; \ + done ; \ + for pid in $$pids; do \ + wait $$pid ; \ + done + +update_locale_%: + $(UPDATE_LOCALE) $* + +html: + @for lang in $(LANGUAGES); do \ + echo "Building HTML documentation for $$lang..."; \ + $(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees -D language=$$lang $(SOURCEDIR) $(BUILDDIR)/html/$$lang; \ + done + +html_%: gettext_build + $(SPHINXBUILD) -b html -d $(BUILDDIR)/doctrees -D language=$* -c $(SOURCEDIR) $(SOURCEDIR) $(BUILDDIR)/html/$*/ + +latex: + @for lang in $(LANGUAGES); do \ + echo "Building LaTeX documentation for $$lang..."; \ + $(SPHINXBUILD) -b latex -d $(BUILDDIR)/doctrees -D language=$$lang -Dlatex_engine=xelatex $(SOURCEDIR) $(BUILDDIR)/latex/$$lang; \ + done + +latex_%: + $(SPHINXBUILD) -b latex -d $(BUILDDIR)/doctrees -D language=$* -Dlatex_engine=xelatex $(SOURCEDIR) $(BUILDDIR)/latex/$*/; \ + +latexpdf: + @for lang in $(filter-out ar he ja,$(LANGUAGES)); do \ + echo "Building PDF documentation for $$lang..."; \ + $(MAKE) -C $(BUILDDIR)/latex/$$lang ; \ + done + +latexpdf_%: + $(MAKE) -C $(BUILDDIR)/latex/$* ; \ + +translations: + ./scripts/translate-all.sh + diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..9eb331c --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,12 @@ +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = _source +BUILDDIR = _build + +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_source/_static/custom.css b/docs/_source/_static/custom.css new file mode 100644 index 0000000..44940b3 --- /dev/null +++ b/docs/_source/_static/custom.css @@ -0,0 +1,8 @@ + +/* Jeff Moe with Parrot and Phind-CodeLlama-34B-v2_q8.gguf */ +div.footer-wrapper { + display: none; +} +.wy-nav-content { + max-width: 95%; +} diff --git a/docs/_source/_static/favicon.ico b/docs/_source/_static/favicon.ico new file mode 100644 index 0000000..ea3f684 Binary files /dev/null and b/docs/_source/_static/favicon.ico differ diff --git a/docs/_source/_static/handsontable.full.min.css b/docs/_source/_static/handsontable.full.min.css new file mode 100644 index 0000000..b6e78fd --- /dev/null +++ b/docs/_source/_static/handsontable.full.min.css @@ -0,0 +1,31 @@ +@charset "UTF-8";/*! +(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. + +*/.handsontable{position:relative}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable.htAutoSize{visibility:hidden;left:-99000px;position:absolute;top:-99000px}.handsontable .wtHider{width:0}.handsontable .wtSpreader{position:relative;width:0;height:auto}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable td,.handsontable th,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable table.htCore{border-collapse:separate;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;max-width:none;max-height:none}.handsontable col{width:50px}.handsontable col.rowHeader{width:50px}.handsontable th,.handsontable td{border-top-width:0;border-left-width:0;border-right:1px solid #CCC;border-bottom:1px solid #CCC;height:22px;empty-cells:show;line-height:21px;padding:0 4px 0 4px;background-color:#FFF;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line;background-clip:padding-box}.handsontable td.htInvalid{background-color:#ff4c42!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #CCC;border-bottom:1px solid #CCC}.handsontable tr:first-child th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable th.htNoFrame{border-left-width:0;background-color:white;border-color:#FFF}.handsontable th:first-child,.handsontable th:nth-child(2),.handsontable td:first-of-type,.handsontable .htNoFrame+th,.handsontable .htNoFrame+td{border-left:1px solid #CCC}.handsontable.htRowHeaders thead tr th:nth-child(2){border-left:1px solid #CCC}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top:1px solid #CCC}.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable tbody tr th,.ht_master:not(.innerBorderLeft):not(.emptyColumns) ~ .handsontable:not(.ht_clone_top) thead tr th:first-child{border-right-width:0}.ht_master:not(.innerBorderTop) thead tr:last-child th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr:last-child th,.ht_master:not(.innerBorderTop) thead tr.lastChild th,.ht_master:not(.innerBorderTop) ~ .handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable th{background-color:#f3f3f3;color:#222;text-align:center;font-weight:normal;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#CCC}.handsontable thead th .relative{padding:2px 4px}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable.ht__selection--columns thead th.ht__highlight,.handsontable.ht__selection--rows tbody th.ht__highlight{background-color:#8eb0e7;color:#000}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active,.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{background-color:#AAB}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#AAB;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#AAB;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:199}.handsontable .columnSorting{position:relative}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .columnSorting.ascending::after{content:'\25B2';color:#5f5f5f;position:absolute;right:-15px}.handsontable .columnSorting.descending::after{content:'\25BC';color:#5f5f5f;position:absolute;right:-15px}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none!important}.handsontable td.area{background:-moz-linear-gradient(top,rgba(181,209,255,0.34) 0,rgba(181,209,255,0.34) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgba(181,209,255,0.34)),color-stop(100%,rgba(181,209,255,0.34)));background:-webkit-linear-gradient(top,rgba(181,209,255,0.34) 0,rgba(181,209,255,0.34) 100%);background:-o-linear-gradient(top,rgba(181,209,255,0.34) 0,rgba(181,209,255,0.34) 100%);background:-ms-linear-gradient(top,rgba(181,209,255,0.34) 0,rgba(181,209,255,0.34) 100%);background:linear-gradient(to bottom,rgba(181,209,255,0.34) 0,rgba(181,209,255,0.34) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#57b5d1ff',endColorstr='#57b5d1ff',GradientType=0);background-color:#fff}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:0;outline-width:0;margin:0;padding:1px 5px 0 5px;font-family:inherit;line-height:21px;font-size:inherit;box-shadow:0 0 0 2px #5292f7 inset;resize:none;display:inline-block;color:#000;border-radius:0;background-color:#FFF}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:100}.htSelectEditor{-webkit-appearance:menulist-button!important;position:absolute;width:auto}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{content:'▶';color:#777;position:absolute;right:5px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#EEE;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput{display:inline-block;vertical-align:middle}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;width:100%}@-webkit-keyframes opacity-hide{from{opacity:1}to{opacity:0}}@keyframes opacity-hide{from{opacity:1}to{opacity:0}}@-webkit-keyframes opacity-show{from{opacity:0}to{opacity:1}}@keyframes opacity-show{from{opacity:0}to{opacity:1}}.handsontable .handsontable.ht_clone_top .wtHider{padding:0 0 5px 0}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:white}.handsontable.listbox th,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th,.handsontable.listbox tr:first-child td,.handsontable.listbox td{border-color:transparent}.handsontable.listbox th,.handsontable.listbox td{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_top_left_corner,.ht_clone_bottom_left_corner{z-index:103}.ht_clone_debug{z-index:103}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.handsontable tbody tr th:nth-last-child(2){border-right:1px solid #CCC}.handsontable thead tr:nth-last-child(2) th.htGroupIndicatorContainer{border-bottom:1px solid #CCC;padding-bottom:5px}.ht_clone_top_left_corner thead tr th:nth-last-child(2){border-right:1px solid #CCC}.htCollapseButton{width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.4);box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;margin-bottom:3px;position:relative}.htCollapseButton:after{content:"";height:300%;width:1px;display:block;background:#ccc;margin-left:4px;position:absolute;bottom:10px}thead .htCollapseButton{right:5px;position:absolute;top:5px;background:#fff}thead .htCollapseButton:after{height:1px;width:700%;right:10px;top:4px}.handsontable tr th .htExpandButton{position:absolute;width:10px;height:10px;line-height:10px;text-align:center;border-radius:5px;border:1px solid #f3f3f3;-webkit-box-shadow:1px 1px 3px rgba(0,0,0,0.4);box-shadow:1px 1px 3px rgba(0,0,0,0.4);cursor:pointer;top:0;display:none}.handsontable thead tr th .htExpandButton{top:5px}.handsontable tr th .htExpandButton.clickable{display:block}.collapsibleIndicator{position:absolute;top:50%;transform:translate(0%,-50%);right:5px;border:1px solid #a6a6a6;line-height:10px;color:#222;border-radius:10px;font-size:10px;width:10px;height:10px;cursor:pointer;-webkit-box-shadow:0 0 0 6px rgba(238,238,238,1);-moz-box-shadow:0 0 0 6px rgba(238,238,238,1);box-shadow:0 0 0 6px rgba(238,238,238,1);background:#eee}.handsontable col.hidden{width:0!important}.handsontable table tr th.lightRightBorder{border-right:1px solid #e6e6e6}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_master,.ht_clone_left,.ht_clone_top,.ht_clone_bottom{overflow:hidden}.ht_master .wtHolder{overflow:auto}.ht_clone_left .wtHolder{overflow-x:hidden;overflow-y:auto}.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow-x:auto;overflow-y:hidden}.wtDebugHidden{display:none}.wtDebugVisible{display:block;-webkit-animation-duration:.5s;-webkit-animation-name:wtFadeInFromNone;animation-duration:.5s;animation-name:wtFadeInFromNone}@keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}@-webkit-keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.htMobileEditorContainer{display:none;position:absolute;top:0;width:70%;height:54pt;background:#f8f8f8;border-radius:20px;border:1px solid #ebebeb;z-index:999;box-sizing:border-box;-webkit-box-sizing:border-box;-webkit-text-size-adjust:none}.topLeftSelectionHandle:not(.ht_master .topLeftSelectionHandle),.topLeftSelectionHandle-HitArea:not(.ht_master .topLeftSelectionHandle-HitArea){z-index:9999}.topLeftSelectionHandle,.topLeftSelectionHandle-HitArea,.bottomRightSelectionHandle,.bottomRightSelectionHandle-HitArea{left:-10000px;top:-10000px}.htMobileEditorContainer.active{display:block}.htMobileEditorContainer .inputs{position:absolute;right:210pt;bottom:10pt;top:10pt;left:14px;height:34pt}.htMobileEditorContainer .inputs textarea{font-size:13pt;border:1px solid #a1a1a1;-webkit-appearance:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;position:absolute;left:14px;right:14px;top:0;bottom:0;padding:7pt}.htMobileEditorContainer .cellPointer{position:absolute;top:-13pt;height:0;width:0;left:30px;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #ebebeb}.htMobileEditorContainer .cellPointer.hidden{display:none}.htMobileEditorContainer .cellPointer:before{content:'';display:block;position:absolute;top:2px;height:0;width:0;left:-13pt;border-left:13pt solid transparent;border-right:13pt solid transparent;border-bottom:13pt solid #f8f8f8}.htMobileEditorContainer .moveHandle{position:absolute;top:10pt;left:5px;width:30px;bottom:0;cursor:move;z-index:9999}.htMobileEditorContainer .moveHandle:after{content:"..\a..\a..\a..";white-space:pre;line-height:10px;font-size:20pt;display:inline-block;margin-top:-8px;color:#ebebeb}.htMobileEditorContainer .positionControls{width:205pt;position:absolute;right:5pt;top:0;bottom:0}.htMobileEditorContainer .positionControls>div{width:50pt;height:100%;float:left}.htMobileEditorContainer .positionControls>div:after{content:" ";display:block;width:15pt;height:15pt;text-align:center;line-height:50pt}.htMobileEditorContainer .leftButton:after,.htMobileEditorContainer .rightButton:after,.htMobileEditorContainer .upButton:after,.htMobileEditorContainer .downButton:after{transform-origin:5pt 5pt;-webkit-transform-origin:5pt 5pt;margin:21pt 0 0 21pt}.htMobileEditorContainer .leftButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(-45deg)}.htMobileEditorContainer .leftButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .rightButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(135deg)}.htMobileEditorContainer .rightButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .upButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(45deg)}.htMobileEditorContainer .upButton:active:after{border-color:#cfcfcf}.htMobileEditorContainer .downButton:after{border-top:2px solid #288ffe;border-left:2px solid #288ffe;-webkit-transform:rotate(225deg)}.htMobileEditorContainer .downButton:active:after{border-color:#cfcfcf}.handsontable.hide-tween{-webkit-animation:opacity-hide .3s;animation:opacity-hide .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{-webkit-animation:opacity-show .3s;animation:opacity-show .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.htCommentCell{position:relative}.htCommentCell:after{content:'';position:absolute;top:0;right:0;border-left:6px solid transparent;border-top:6px solid black}.htComments{display:none;z-index:1059;position:absolute}.htCommentTextArea{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:0;border-left:3px solid #ccc;background-color:#fff;width:215px;height:90px;font-size:12px;padding:5px;outline:0!important;-webkit-appearance:none}.htCommentTextArea:focus{box-shadow:rgba(0,0,0,0.117647) 0 1px 3px,rgba(0,0,0,0.239216) 0 1px 2px,inset 0 0 0 1px #5292f7;border-left:3px solid #5292f7}/*! + * Handsontable ContextMenu + */.htContextMenu{display:none;position:absolute;z-index:1060}.htContextMenu .ht_clone_top,.htContextMenu .ht_clone_left,.htContextMenu .ht_clone_corner,.htContextMenu .ht_clone_debug{display:none}.htContextMenu table.htCore{border:1px solid #ccc;border-bottom-width:2px;border-right-width:2px}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:white;border-width:0;padding:4px 6px 0 6px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.htContextMenu table tbody tr td:first-child{border:0}.htContextMenu table tbody tr td.htDimmed{font-style:normal;color:#323232}.htContextMenu table tbody tr td.current,.htContextMenu table tbody tr td.zeroclipboard-is-hover{background:#f3f3f3}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #bbb;height:0;padding:0;cursor:default}.htContextMenu table tbody tr td.htDisabled{color:#999;cursor:default}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htContextMenu table tbody tr.htHidden{display:none}.htContextMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:6px}.htContextMenu table tbody tr td div span.selected{margin-top:-2px;position:absolute;left:4px}.htContextMenu .ht_master .wtHolder{overflow:hidden}.htRowHeaders .ht_master.innerBorderLeft ~ .ht_clone_top_left_corner th:nth-child(2),.htRowHeaders .ht_master.innerBorderLeft ~ .ht_clone_left td:first-of-type{border-left:0 none}.handsontable .wtHider{position:relative}.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualColumnMove.on-moving--columns,.handsontable.ht__manualColumnMove.on-moving--columns thead th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight{position:absolute;height:100%;display:none}.handsontable .ht__manualColumnMove--guideline{background:#757575;width:2px;top:0;margin-left:-1px;z-index:105}.handsontable .ht__manualColumnMove--backlight{background:#343434;background:rgba(52,52,52,0.25);display:none;z-index:105;pointer-events:none}.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable.ht__manualRowMove.after-selection--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualRowMove.on-moving--rows,.handsontable.ht__manualRowMove.on-moving--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight{position:absolute;width:100%;display:none}.handsontable .ht__manualRowMove--guideline{background:#757575;height:2px;left:0;margin-top:-1px;z-index:105}.handsontable .ht__manualRowMove--backlight{background:#343434;background:rgba(52,52,52,0.25);display:none;z-index:105;pointer-events:none}.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}/*! + * Pikaday + * Copyright © 2014 David Bushell | BSD & MIT license | http://dbushell.com/ + */.pika-single{z-index:9999;display:block;position:relative;color:#333;background:#fff;border:1px solid #ccc;border-bottom-color:#bbb;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.pika-single:before,.pika-single:after{content:" ";display:table}.pika-single:after{clear:both}.pika-single{*zoom:1}.pika-single.is-hidden{display:none}.pika-single.is-bound{position:absolute;box-shadow:0 5px 15px -5px rgba(0,0,0,.5)}.pika-lendar{float:left;width:240px;margin:8px}.pika-title{position:relative;text-align:center}.pika-label{display:inline-block;*display:inline;position:relative;z-index:9999;overflow:hidden;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:bold;background-color:#fff}.pika-title select{cursor:pointer;position:absolute;z-index:9998;margin:0;left:0;top:5px;filter:alpha(opacity=0);opacity:0}.pika-prev,.pika-next{display:block;cursor:pointer;position:relative;outline:0;border:0;padding:0;width:20px;height:30px;text-indent:20px;white-space:nowrap;overflow:hidden;background-color:transparent;background-position:center center;background-repeat:no-repeat;background-size:75% 75%;opacity:.5;*position:absolute;*top:0}.pika-prev:hover,.pika-next:hover{opacity:1}.pika-prev,.is-rtl .pika-next{float:left;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==');*left:0}.pika-next,.is-rtl .pika-prev{float:right;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=');*right:0}.pika-prev.is-disabled,.pika-next.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block;*display:inline}.pika-table{width:100%;border-collapse:collapse;border-spacing:0;border:0}.pika-table th,.pika-table td{width:14.285714285714286%;padding:0}.pika-table th{color:#999;font-size:12px;line-height:25px;font-weight:bold;text-align:center}.pika-button{cursor:pointer;display:block;box-sizing:border-box;-moz-box-sizing:border-box;outline:0;border:0;margin:0;width:100%;padding:5px;color:#666;font-size:12px;line-height:15px;text-align:right;background:#f5f5f5}.pika-week{font-size:11px;color:#999}.is-today .pika-button{color:#3af;font-weight:bold}.is-selected .pika-button{color:#fff;font-weight:bold;background:#3af;box-shadow:inset 0 1px 3px #178fe5;border-radius:3px}.is-inrange .pika-button{background:#d5e9f7}.is-startrange .pika-button{color:#fff;background:#6cb31d;box-shadow:none;border-radius:3px}.is-endrange .pika-button{color:#fff;background:#3af;box-shadow:none;border-radius:3px}.is-disabled .pika-button,.is-outside-current-month .pika-button{pointer-events:none;cursor:default;color:#999;opacity:.3}.pika-button:hover{color:#fff;background:#ff8000;box-shadow:none;border-radius:3px}.pika-table abbr{border-bottom:0;cursor:help} \ No newline at end of file diff --git a/docs/_source/_static/handsontable.full.min.js b/docs/_source/_static/handsontable.full.min.js new file mode 100644 index 0000000..ab1900b --- /dev/null +++ b/docs/_source/_static/handsontable.full.min.js @@ -0,0 +1,89 @@ +/*! +(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]&&"undefined"!=typeof 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?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")};var e=10,t=40;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 o={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px"};for(var n in o)o.hasOwnProperty(n)&&(this.selectionHandles.styles.bottomRightHitArea[n]=o[n],this.selectionHandles.styles.topLeftHitArea[n]=o[n]);var r={position:"absolute",height:e+"px",width:e+"px","border-radius":parseInt(e/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var i in r)r.hasOwnProperty(i)&&(this.selectionHandles.styles.bottomRight[i]=r[i],this.selectionHandles.styles.topLeft[i]=r[i]);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,T;T=this.wot.wtTable.getRenderedRowsCount();for(var k=0;k=e[0]&&D<=e[2]){_=D;break}}for(var x=T-1;x>=0;x--){var H=this.wot.wtTable.rowFilter.renderedToSource(x);if(H>=e[0]&&H<=e[2]){M=H;break}}T=this.wot.wtTable.getRenderedColumnsCount();for(var A=0;A=e[1]&&P<=e[3]){R=P;break}}for(var N=T-1;N>=0;N--){var L=this.wot.wtTable.columnFilter.renderedToSource(N);if(L>=e[1]&&L<=e[3]){S=L;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 I=c(o);parseInt(I.borderTopWidth,10)>0&&(a+=1,y=y>0?y-1:0),parseInt(I.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 W=Math.floor(this.settings.border.width/2);this.bottomStyle.top=a+y-W+"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-W+"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&&(O=n.offsetLeft+m(n)+parseInt(this.cornerDefaultStyle.width)/2>=h(E),O&&(this.cornerStyle.left=Math.floor(u+C-3-parseInt(this.cornerDefaultStyle.width)/2)+"px",this.cornerStyle.borderRightWidth=0)),M===this.wot.getSetting("totalRows")-1&&(O=n.offsetTop+g(n)+parseInt(this.cornerDefaultStyle.height)/2>=f(E),O&&(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);void 0===a?this.stretchAllColumnsWidth[e]=s:this.stretchAllColumnsWidth[e]=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){"undefined"!=typeof e&&"undefined"!=typeof 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&&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],t;break;case"NE-SW":o=[this.getTopRightCorner(),this.getBottomLeftCorner()],this.from=o[0],this.to=o[1],o;break;case"SE-NW":n=[this.getBottomRightCorner(),this.getTopLeftCorner()],this.from=n[0],this.to=n[1],n;break;case"SW-NE":r=[this.getBottomLeftCorner(),this.getTopRightCorner()],this.from=r[0],this.to=r[1],r}},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(i===!1)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&&n.__esModule&&n||{default:n}),v=w.addClass,y=w.fastInnerText,b=w.isVisible,C=w.removeClass,_=(r=e("helpers/object"),r&&r.__esModule&&r||{default:r}).objectEach,R=(i=e("helpers/string"),i&&i.__esModule&&i||{default:i}),M=R.toUpperCaseFirst,S=R.randomString,E=(s=e("event"),s&&s.__esModule&&s||{default:s}).WalkontableEvent,O=(a=e("overlays"),a&&a.__esModule&&a||{default:a}).WalkontableOverlays,T=(l=e("scroll"),l&&l.__esModule&&l||{default:l}).WalkontableScroll,k=(u=e("settings"),u&&u.__esModule&&u||{default:u}).WalkontableSettings,D=(c=e("table"),c&&c.__esModule&&c||{default:c}).WalkontableTable,x=(d=e("viewport"),d&&d.__esModule&&d||{default:d}).WalkontableViewport,H=((h=e("overlay/_base.js"),h&&h.__esModule&&h||{default:h}).WalkontableOverlay,(f=e("overlay/top.js"),f&&f.__esModule&&f||{default:f}).WalkontableTopOverlay,(p=e("overlay/left.js"),p&&p.__esModule&&p||{default:p}).WalkontableLeftOverlay,(g=e("overlay/debug.js"),g&&g.__esModule&&g||{default:g}).WalkontableDebugOverlay,(m=e("overlay/topLeftCorner.js"),m&&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 D(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 D(this,e.table),this.wtScroll=new T(this),this.wtViewport=new x(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=o-r){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.colo-r&&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,i=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))}},s=function(e){t.instance.touchMoving=!0},a=function(e){o.addEventListener(this,"touchmove",s),t.checkIfTouchMove=setTimeout(function(){return t.instance.touchMoving===!0?(t.instance.touchMoving=void 0,void o.removeEventListener("touchmove",s,!1)):void i(e)},30)},l=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)))},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(r),e.preventDefault(),m(e)};if(o.addEventListener(this.instance.wtTable.holder,"mousedown",i),o.addEventListener(this.instance.wtTable.TABLE,"mouseover",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)&&a.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&&r.__esModule&&r||{default:r}),u=l.closestDown,c=l.hasClass,d=l.isChildOf,h=l.getParent,f=(i=e("helpers/function"),i&&i.__esModule&&i||{default:i}).partial,p=(s=e("helpers/browser"),s&&s.__esModule&&s||{default:s}).isMobileBrowser,g=(a=e("eventManager"),a&&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&&n.__esModule&&n||{default:n}),l=a.getScrollableElement,u=a.getTrimmingContainer,c=(r=e("helpers/object"),r&&r.__esModule&&r||{default:r}).defineGetter,d=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayEach,h=(s=e("eventManager"),s&&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(g.CLONE_TYPES.indexOf(e)===-1)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 n===!0||"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(g.CLONE_TYPES.indexOf(e)===-1)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&&n.__esModule&&n||{default:n}).addClass,s=(r=e("_base"),r&&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&&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&&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 n=c(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?s(t,"innerBorderTop"):f(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(r)for(var i=0;i0&&(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&&n.__esModule&&n||{default:n}),u=l.getScrollableElement,c=l.getScrollbarWidth,d=l.getScrollLeft,h=l.getScrollTop,f=(r=e("helpers/array"),r&&r.__esModule&&r||{default:r}).arrayEach,p=(i=e("helpers/unicode"),i&&i.__esModule&&i||{default:i}).isKey,g=(s=e("helpers/browser"),s&&s.__esModule&&s||{default:s}).isMobileBrowser,m=(a=e("eventManager"),a&&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=-.2,a=e.wheelDeltaY||-1*e.deltaY,l=e.wheelDeltaX||-1*e.deltaX,u=null,c={type:"wheel"},d=e.target,h=null;for(1===e.deltaMode&&(a*=120,l*=120);d!=document&&null!=d;){if(d.className.indexOf("wtHolder")>-1){u=d;break}d=d.parentNode}return c.target=u,u===r||u===i?(this.syncScrollPositions(c,s*l,"x"),this.syncScrollPositions(c,s*a,"y")):(u===t||u===o?h=a:u===n&&(h=l),this.syncScrollPositions(c,s*h)),!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&&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&&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,t=e.wtOverlays.topOverlay,o=e.wtOverlays.leftOverlay,n=e.wtTable,r=e.wtViewport,i=e.getSetting("totalRows"),s=e.getSetting("totalColumns"),a=e.getSetting("fixedRowsTop"),l=e.getSetting("fixedRowsBottom"),u=e.getSetting("fixedColumnsLeft");return{topOverlay:t,leftOverlay:o,wtTable:n,wtViewport:r,totalRows:i,totalColumns:s,fixedRowsTop:a,fixedRowsBottom:l,fixedColumnsLeft:u}}},{}),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&&n.__esModule&&n||{default:n}).addClass,l=(r=e("border"),r&&r.__esModule&&r||{default:r}).WalkontableBorder,u=(i=e("cell/coords"),i&&i.__esModule&&i||{default:i}).WalkontableCellCoords,c=(s=e("cell/range"),s&&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){return this.instanceBorders[e.guid]?this.instanceBorders[e.guid]:void(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&&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,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&&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&&r.__esModule&&r||{default:r}).isFunction,C=(i=e("cell/coords"),i&&i.__esModule&&i||{default:i}).WalkontableCellCoords,_=((s=e("cell/range"),s&&s.__esModule&&s||{default:s}).WalkontableCellRange,(a=e("filter/column"),a&&a.__esModule&&a||{default:a}).WalkontableColumnFilter),R=(l=e("filter/row"),l&&l.__esModule&&l||{default:l}).WalkontableRowFilter,M=(u=e("tableRenderer"),u&&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(){var e=new M(this);e.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&&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),e.skipRender===!0)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(f=this.instance.getSetting("onModifyRowHeaderWidth",f),null!=f)for(var p=0;pe;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(e,t,o){for(var n,r,i=0,s=this.rowFilter.renderedToSource(i),a=this.wtTable.isWorkingOnClone();s=0&&(!f&&i>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||i!==t);){if(r=this.getOrCreateTrForRow(i,r),this.renderRowHeaders(s,r),this.adjustColumns(r,o+this.rowHeaderCount),n=this.renderCells(s,r,o),a&&!this.wot.isOverlayName(WalkontableOverlay.CLONE_BOTTOM)||this.resetOversizedRow(s),r.firstChild){var l=this.wot.wtTable.getRowHeight(s);l?(l--,r.firstChild.style.height=l+"px"):r.firstChild.style.height=""}i++,s=this.rowFilter.renderedToSource(i)}},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 v}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,u=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}),c=u.getScrollbarWidth,d=(u.getScrollTop,u.getStyle),h=u.offset,f=u.outerHeight,p=u.outerWidth,g=(i=e("eventManager"),i&&i.__esModule&&i||{default:i}).EventManager,m=(s=e("calculator/viewportColumns"),s&&s.__esModule&&s||{default:s}).WalkontableViewportColumnsCalculator,w=(a=e("calculator/viewportRows"),a&&a.__esModule&&a||{default:a}).WalkontableViewportRowsCalculator,v=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 g(this.wot),this.eventManager.addEventListener(window,"resize",function(){t.clientHeight=t.getWorkspaceHeight()})};$traceurRuntime.createClass(v,{getWorkspaceHeight:function(){var e,t=this.instance.wtOverlays.topOverlay.trimmingContainer,o=0;return t===window?o=document.documentElement.clientHeight:(e=f(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,s=this.wot.getSetting("preventOverflow");return s?p(this.instance.wtTable.wtRootElement):(e=l.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&&(t=d(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"),"scroll"==t||"hidden"==t||"auto"==t)?Math.max(e,n.clientWidth):"none"!==r&&r?e:Math.max(e,p(this.instance.wtTable.TABLE)))},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:c(),new w(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-=c()),new m(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&&e[s][3].indexOf(",")===-1?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");n===!1&&o.allowInvalid===!1&&(e.splice(t,1),o.valid=!0,--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();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();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&&(t=E.cellTypes[e.type],void 0===t))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=le(p);U(g.prototype,he.prototype),U(g.prototype,t),U(g.prototype,s(t)),this.rootElement=e,this.isHotTableEnv=x(this.rootElement),E.eventManager.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("DIV"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+ee(),c=new ne(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=Z(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)&&("undefined"==typeof 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(u=t.length,0===u)return!1;var g,m,w,v;({row:null===o?null:o.row,col:null===o?null: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=ie(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),"paste"!==n&&"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),"paste"!==n&&"autofill"!==n||!y.skipColumnOnPaste)if(y.readOnly)f.col++;else{var D=c-_,x=M(O,D),H=p.getDataAtCell(f.row,f.col),A={row:O,col:D};if("autofill"===n){var P=p.runHooks("beforeAutofillInsidePopulate",A,i,t,s,{},b);P&&(x=I(P.value)?x:P.value)}if(null!==x&&"object"==typeof x)if(null===H||"object"!=typeof H)R=!1;else{var N=Y(H[0]||H),L=Y(x[0]||x);$(N,L)?x=z(x):R=!1}else null!==H&&"object"==typeof H&&(R=!1);R&&h.push([f.row,f.col,x]),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 ce(e,e,e),h.setRangeEnd(e,null,t)},setRangeStartOnly:function(e){E.hooks.run(p,"beforeSetRangeStartOnly",e),l.selRange=new ce(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 ue(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]),(n===!1||Array.isArray(n)&&n.indexOf("current")===-1)&&p.view.wt.selections.current.add(l.selRange.highlight),p.view.wt.selections.area.clear(),(n===!1||Array.isArray(n)&&n.indexOf("area")===-1)&&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)),E.hooks.run(p,"afterSelection",l.selRange.from.row,l.selRange.from.col,l.selRange.to.row,l.selRange.to.col),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)),(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),t!==!1&&!r&&i&&(l.selRange.from&&!h.isMultiple()?p.view.scrollViewport(l.selRange.from):p.view.scrollViewport(e)),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 ue(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 ue(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 ue(e,t),s=0,a=0;p.runHooks("modifyTransformEnd",i),o=p.countRows(),n=p.countCols(),r=new ue(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.setRangeStart(new ue(0,0)),h.setRangeEnd(new ue(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 oe(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]))&&p.addHook(o,e[o]):!t&&e.hasOwnProperty(o)&&(g.prototype[o]=e[o]));if(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(),e.columns&&P(e.columns)&&(r=p.countSourceCols(),i=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(l.cellSettings.length=0),r>0){var a,c;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!==v&&(p.rootElement.style.height=v+"px",p.rootElement.style.overflow="hidden");if("undefined"!=typeof e.width){var C=e.width;P(C)&&(C=C()),p.rootElement.style.width=C+"px"}t||(u.clearLengthCache(),E.hooks.run(p,"afterUpdateSettings")),d.adjustRowsAndCols(),p.view&&!l.firstRun&&(p.forceFullRender=!0,h.refreshBorders(null,!0)),t||!p.view||""!==w&&""!==v&&void 0!==v||w===v||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 ue(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 ue(0,e),new ue(l.settings.data.length-1,e),u.DESTINATION_RENDERER))},this.getDataAtProp=function(e){var t,o=[];return t=u.getRange(new ue(0,u.propToCol(e)),new ue(l.settings.data.length-1,u.propToCol(e)),u.DESTINATION_RENDERER),o.concat.apply(o,t)},this.getSourceData=function(e,t,o,n){var r;return r=void 0===e?c.getData():c.getByRange(new ue(e,t),new ue(o,n))},this.getSourceDataArray=function(e,t,o,n){var r;return r=void 0===e?c.getData(!0):c.getByRange(new ue(e,t),new ue(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){var t=u.getRange(new ue(e,0),new ue(e,this.countCols()-1),u.DESTINATION_RENDERER);return t[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 te(Math.min(e,o),Math.max(e,o),function(e){var o=!0;return te(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){var n=p.getCellMeta(e,t);void 0!=n[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");e===!1&&(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=[],te(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)||i===!0,"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 ue(e,t),l.selRange=new ce(s,s,s),i&&p.listen(),I(o)?h.setRangeEnd(l.selRange.from,r):h.setRangeEnd(new ue(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,D(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 J(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&&(e===!1&&this.cellProperties.allowInvalid!==!0?(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))},x.prototype.close=function(){D.prototype.close.apply(this,arguments)},x.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([])},x.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=x.sortByRelevance(this.getValue(),e,this.cellProperties.filteringCaseSensitive));var a=Array.isArray(i)?i.length:0;if(r===!1)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},x.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},x.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},x.prototype.discardEditor=function(e){D.prototype.discardEditor.apply(this,arguments),this.instance.view.render()},k("autocomplete",x)},{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&&n.__esModule&&n||{default:n}).registerEditor,a=(r=e("_baseEditor"),r&&r.__esModule&&r||{default:r}).BaseEditor,l=(i=e("helpers/dom/element"),i&&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&&n.__esModule&&n||{default:n}).default,p=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}),g=p.addClass,m=p.outerHeight,w=(i=e("helpers/object"),i&&i.__esModule&&i||{default:i}).deepExtend,v=(s=e("eventManager"),s&&s.__esModule&&s||{default:s}).EventManager,y=(a=e("editors"),a&&a.__esModule&&a||{default:a}),b=(y.getEditor,y.registerEditor),C=(l=e("helpers/unicode"),l&&l.__esModule&&l||{default:l}).isMetaKey,_=(u=e("helpers/dom/event"),u&&u.__esModule&&u||{default:u}).stopPropagation,R=(c=e("textEditor"),c&&c.__esModule&&c||{default:c}).TextEditor,M=(d=e("moment"),d&&d.__esModule&&d||{default:d}).default,S=(h=e("pikaday"),h&&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());var e=new v(this);e.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&&n.__esModule&&n||{default:n}).default,a=(r=e("editors"),r&&r.__esModule&&r||{default:r}),l=(a.getEditor,a.registerEditor),u=(a.getEditorConstructor,(i=e("autocompleteEditor"),i&&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&&n.__esModule&&n||{default:n}).default,d=(r=e("helpers/unicode"),r&&r.__esModule&&r||{default:r}).KEY_CODES,h=(i=e("helpers/object"),i&&i.__esModule&&i||{default:i}).extend,f=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}).setCaretPosition,p=(a=e("helpers/dom/event"),a&&a.__esModule&&a||{default:a}),g=p.stopImmediatePropagation,m=p.isImmediatePropagationStopped,w=(l=e("editors"),l&&l.__esModule&&l||{default:l}),v=(w.getEditor,w.registerEditor),y=(u=e("textEditor"),u&&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&&t()===!1||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&&n.__esModule&&n||{default:n}).default,(r=e("helpers/unicode"),r&&r.__esModule&&r||{default:r}).KEY_CODES),d=(i=e("helpers/dom/event"),i&&i.__esModule&&i||{default:i}),h=d.stopImmediatePropagation,f=d.isImmediatePropagationStopped,p=(s=e("helpers/dom/element"),s&&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&&a.__esModule&&a||{default:a}),E=(S.getEditor,S.registerEditor),O=(l=e("_baseEditor"),l&&l.__esModule&&l||{default:l}).BaseEditor,T=(u=e("eventManager"),u&&u.__esModule&&u||{default:u}).eventManager,k=O.prototype.extend(),D={},x=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),x.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(D.cellPointer||(D.cellPointer={height:C(this.cellPointer),width:_(this.cellPointer)}),D.editorContainer||(D.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+D.cellPointer.height,10)+"px",this.editorContainer.style.left=parseInt(window.innerWidth/2-D.editorContainer.width/2,10)+"px",s.left+a/2>parseInt(this.editorContainer.style.left,10)+D.editorContainer.width?this.editorContainer.style.left=window.innerWidth-D.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?1:0,c.colHeaders?1:0;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&&e!=-1?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 e!=-1&&e!=-2?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&&n.__esModule&&n||{default:n}).default,h=(r=e("helpers/dom/element"),r&&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&&i.__esModule&&i||{default:i}).default,E=(s=e("_baseEditor"),s&&s.__esModule&&s||{default:s}).BaseEditor,O=(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).eventManager,T=(l=e("editors"),l&&l.__esModule&&l||{default:l}),k=(T.getEditor,T.registerEditor),D=(u=e("helpers/unicode"),u&&u.__esModule&&u||{default:u}).KEY_CODES,x=(c=e("helpers/dom/event"),c&&c.__esModule&&c||{default:c}),H=x.stopPropagation,A=x.stopImmediatePropagation,P=x.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 D.ARROW_RIGHT:n.isInFullEditMode()&&(!n.isWaiting()&&!n.allowKeyEventPropagation||!n.isWaiting()&&n.allowKeyEventPropagation&&!n.allowKeyEventPropagation(e.keyCode))&&A(e);break;case D.ARROW_LEFT:n.isInFullEditMode()&&(!n.isWaiting()&&!n.allowKeyEventPropagation||!n.isWaiting()&&n.allowKeyEventPropagation&&!n.allowKeyEventPropagation(e.keyCode))&&A(e);break;case D.ARROW_UP:case D.ARROW_DOWN:n.isInFullEditMode()&&(!n.isWaiting()&&!n.allowKeyEventPropagation||!n.isWaiting()&&n.allowKeyEventPropagation&&!n.allowKeyEventPropagation(e.keyCode))&&A(e);break;case D.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 D.A:case D.X:case D.C:case D.V:t&&A(e);break;case D.BACKSPACE:case D.DELETE:case D.HOME:case D.END:A(e)}[D.ARROW_UP,D.ARROW_RIGHT,D.ARROW_DOWN,D.ARROW_LEFT].indexOf(e.keyCode)===-1&&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 e!=-1&&e!=-2?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&&e!=-1?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,D=R(n)?E:0,x=M(n)?E:0,H=this.instance.view.maximumVisibleElementWidth(T)-9-D,A=this.TD.scrollHeight+1,P=Math.max(this.instance.view.maximumVisibleElementHeight(O)-x,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?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,l="HOT-TABLE";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(t.path[s].nodeName===l)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,[l],n),r?t.realTarget=n.querySelector(l)||t.target:t.realTarget=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&&i.__esModule&&i||{default:i}).default,c=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}),d=c.polymerWrap,h=c.closest,f=(a=e("helpers/feature"),a&&a.__esModule&&a||{default:a}).isWebComponentSupportedNatively,p=(l=e("helpers/dom/event"),l&&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),e&&(!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&&(i.indexOf(n)!==-1||i.indexOf(t)!==-1||i.indexOf(a)!==-1||i.indexOf(l)!==-1))return r;if(r.clientWidth<=r.scrollWidth&&(i.indexOf(o)!==-1||i.indexOf(t)!==-1||i.indexOf(a)!==-1||i.indexOf(u)!==-1))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 D(e){return e.offsetWidth}function x(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;var o=e.createTextRange();return o.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)&&e.className.indexOf("handsontableInput")==-1&&e.className.indexOf("copyPaste")==-1}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 D}},outerHeight:{get:function(){return x}},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&&X.__esModule&&X||{default:X}),te=ee.isIE8,oe=ee.isIE9,ne=ee.isSafari,re=(q=e("../feature"),q&&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 e.isImmediatePropagationEnabled===!1}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&&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: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,a):t(a)}}var o=e.length;return t([])}function d(e){function t(n){return function(){for(var r=[],i=0;i=o?e.apply(this,a):t(a)}}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&&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"undefined"!=typeof e}function i(e){return"undefined"==typeof e}Object.defineProperties(o,{stringify:{get:function(){return n}},isDefined:{get:function(){return r}},isUndefined:{get:function(){return i}},__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&&o(n)!==!1;);}function i(e,t,o){var n=e+1;for("function"==typeof t&&(o=t,t=0);--n>=t&&o(n)!==!1;);}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);var n=o.length;n||(o=" ");var r=t-e.length,i=Math.ceil(r/o.length),s="";return g(i,function(e){s+=o}),s=s.slice(0,r),s+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&&h.__esModule&&h||{default:h}).stringify,g=(f=e("number"),f&&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){var t=[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];return t.indexOf(e)!==-1}function i(e){return[u.CONTROL_LEFT,224,u.COMMAND_LEFT,u.COMMAND_RIGHT].indexOf(e)!==-1}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&&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 g}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,l=(r=e("helpers/array"),r&&r.__esModule&&r||{default:r}),u=(l.arrayEach,l.arrayReduce),c=l.arrayMap,d=l.arrayMax,h=(i=e("helpers/object"),i&&i.__esModule&&i||{default:i}).defineGetter,f=(s=e("helpers/number"),s&&s.__esModule&&s||{default:s}).rangeEach,p="arrayMapper",g={_arrayMap:[],getValueByIndex:function(e){var t;return void 0===(t=this._arrayMap[e])?null:t},getIndexByValue:function(e){var t;return(t=this._arrayMap.indexOf(e))===-1?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(g,"MIXIN_NAME",p,{writable:!1,enumerable:!1}),a.utils.arrayMapper=g},{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 c}},__esModule:{value:!0}});var n,r,i,s=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,a=(r=e("helpers/array"),r&&r.__esModule&&r||{default:r}).arrayEach,l=(i=e("helpers/object"),i&&i.__esModule&&i||{default:i}).defineGetter,u="localHooks",c={_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&&a.__esModule&&a||{default:a}).default,d=(l=e("helpers/object"),l&&l.__esModule&&l||{default:l}).objectEach,h=(u=e("helpers/string"),u&&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&&n.__esModule&&n||{default:n}).default,u=(r=e("helpers/object"),r&&r.__esModule&&r||{default:r}),c=u.defineGetter,d=u.objectEach,h=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayEach,f=(s=e("utils/recordTranslator"),s&&s.__esModule&&s||{default:s}),p=(f.registerIdentity,f.getTranslator),g=(a=e("plugins"),a&&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":129}],63:[function(e,t,o){"use strict";Object.defineProperties(o,{AutoColumnSize:{get:function(){return H}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f,p=(n=e("_base"),n&&n.__esModule&&n||{default:n}).default,g=(r=e("helpers/array"),r&&r.__esModule&&r||{default:r}),m=g.arrayEach,w=g.arrayFilter,v=(i=e("helpers/feature"),i&&i.__esModule&&i||{default:i}),y=v.cancelAnimationFrame,b=v.requestAnimationFrame,C=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}).isVisible,_=(a=e("utils/ghostTable"),a&&a.__esModule&&a||{default:a}).GhostTable,R=(l=e("helpers/object"),l&&l.__esModule&&l||{default:l}),M=R.isObject,S=(R.objectEach,u=e("helpers/number"),u&&u.__esModule&&u||{default:u}),E=S.valueAccordingPercent,O=S.rangeEach,T=(c=e("plugins"),c&&c.__esModule&&c||{default:c}).registerPlugin,k=(d=e("utils/samplesGenerator"),d&&d.__esModule&&d||{default:d}).SamplesGenerator,D=(h=e("helpers/string"),h&&h.__esModule&&h||{default:h}).isPercentValue,x=(f=e("3rdparty/walkontable/src/calculator/viewportColumns"),f&&f.__esModule&&f||{default:f}).WalkontableViewportColumnsCalculator,H=function(e){var t=this;$traceurRuntime.superConstructor(A).call(this,e),this.widths=[],this.ghostTable=new _(this.hot),this.samplesGenerator=new k(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)})},A=H;$traceurRuntime.createClass(H,{isEnabled:function(){return this.hot.getSettings().autoColumnSize!==!1&&!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)}),$traceurRuntime.superGet(this,A.prototype,"enablePlugin").call(this)}},disablePlugin:function(){$traceurRuntime.superGet(this,A.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}),O(e.from,e.to,function(e){if(o||void 0===n.widths[e]&&!n.hot._getColWidthFromSettings(e)){var r=n.samplesGenerator.generateColumnSamples(e,t);r.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(){return t.hot?(t.calculateColumnsWidth({from:o,to:Math.min(o+A.CALCULATION_STEP,n)},e),o=o+A.CALCULATION_STEP+1,void(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,x.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},clearCache:function(){this.widths.length=0},isNeedRecalculate:function(){return!!w(this.widths,function(e){return void 0===e}).length},onBeforeRender:function(){var e=this.hot.renderCall,t=this.hot.countRows();t&&(this.calculateColumnsWidth({from:this.getFirstVisibleColumn(),to:this.getLastVisibleColumn()},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth())},onAfterLoadData:function(){var e=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){e.hot&&e.recalculateAllColumnsWidth()},0)},onBeforeChange:function(e){var t=this;m(e,function(e){return t.widths[t.hot.propToCol(e[1])]=void 0})},onBeforeColumnResize:function(e,t,o){return o&&(this.calculateColumnsWidth(e,void 0,!0),t=this.getColumnWidth(e,void 0,!1)),t},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,A.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 50}},p),T("autoColumnSize",H)},{"3rdparty/walkontable/src/calculator/viewportColumns":4,_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":127,"utils/samplesGenerator":130}],64:[function(e,t,o){"use strict";Object.defineProperties(o,{AutoRowSize:{get:function(){return k}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f=(n=e("_base"),n&&n.__esModule&&n||{default:n}).default,p=(r=e("helpers/array"),r&&r.__esModule&&r||{default:r}),g=(p.arrayEach,p.arrayFilter),m=(i=e("helpers/feature"),i&&i.__esModule&&i||{default:i}),w=m.cancelAnimationFrame,v=m.requestAnimationFrame,y=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}).isVisible,b=(a=e("utils/ghostTable"),a&&a.__esModule&&a||{default:a}).GhostTable,C=(l=e("helpers/object"),l&&l.__esModule&&l||{default:l}),_=C.isObject,R=(C.objectEach,u=e("helpers/number"),u&&u.__esModule&&u||{default:u}),M=R.valueAccordingPercent,S=R.rangeEach,E=(c=e("plugins"),c&&c.__esModule&&c||{default:c}).registerPlugin,O=(d=e("utils/samplesGenerator"),d&&d.__esModule&&d||{default:d}).SamplesGenerator,T=(h=e("helpers/string"),h&&h.__esModule&&h||{default:h}).isPercentValue,k=function(e){var t=this;$traceurRuntime.superConstructor(D).call(this,e),this.heights=[],this.ghostTable=new b(this.hot),this.samplesGenerator=new O(function(e,o){return e>=0?t.hot.getDataAtCell(e,o):e===-1?t.hot.getColHeader(o):null}),this.firstCalculation=!0,this.inProgress=!1,this.addHook("beforeRowResize",function(e,o,n){return t.onBeforeRowResize(e,o,n)})},D=k;$traceurRuntime.createClass(k,{isEnabled:function(){return this.hot.getSettings().autoRowSize===!0||_(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,D.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,D.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]){var r=n.samplesGenerator.generateRowSamples(e,t);r.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(){return t.hot?(t.calculateRowsHeight({from:o,to:Math.min(o+D.CALCULATION_STEP,n)},e),o=o+D.CALCULATION_STEP+1,void(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,D.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":127,"utils/samplesGenerator":130}],65:[function(e,t,o){"use strict";Object.defineProperties(o,{Autofill:{get:function(){return T}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=(n=e("_base"),n&&n.__esModule&&n||{default:n}).default,h=(r=e("browser"),r&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayIncludes,p=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}),g=p.offset,m=p.outerHeight,w=p.outerWidth,v=(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).eventManager,y=(l=e("plugins"),l&&l.__esModule&&l||{default:l}).registerPlugin,b=(u=e("3rdparty/walkontable/src/cell/coords"),u&&u.__esModule&&u||{default:u}).WalkontableCellCoords,C=(c=e("utils"),c&&c.__esModule&&c||{default:c}),_=C.getDeltas,R=C.getDragDirectionAndRange,M=C.DIRECTIONS,S=C.getMappedFillHandleSetting,E="insert_row",O=200,T=function(e){$traceurRuntime.superConstructor(k).call(this,e),this.eventManager=v(this),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1},k=T;$traceurRuntime.createClass(T,{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,k.prototype,"enablePlugin").call(this))},updatePlugin:function(){this.disablePlugin(),this.enablePlugin(),$traceurRuntime.superGet(this,k.prototype,"updatePlugin").call(this)},disablePlugin:function(){this.clearMappedSettings(),$traceurRuntime.superGet(this,k.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,"autofill",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(E),e.addingStarted=!1},O))},addNewRowIfNeeded:function(){if(this.hot.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&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(){var e=this.selectAdjacent();e&&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);this.addingStarted===!1&&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,k.prototype,"destroy").call(this)}},{},d),y("autofill",T),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(["down","up"].indexOf(n)!==-1){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(["right","left"].indexOf(n)!==-1)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 e===!0?(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&&s.__esModule&&s||{default:s}).isObject,u=(a=e("helpers/mixed"),a&&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 C}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,d=(r=e("moment"),r&&r.__esModule&&r||{default:r}).default,h=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{default:i}),f=h.addClass,p=(h.closest,h.hasClass),g=(h.index,h.removeClass),m=(s=e("helpers/array"),s&&s.__esModule&&s||{default:s}),w=(m.arrayEach,m.arrayMap),v=m.arrayReduce,y=((a=e("eventManager"),a&&a.__esModule&&a||{default:a}).eventManager,(l=e("_base"),l&&l.__esModule&&l||{default:l}).default),b=(u=e("plugins"),u&&u.__esModule&&u||{default:u}).registerPlugin;c.hooks.register("beforeColumnSort"),c.hooks.register("afterColumnSort");var C=function(e){$traceurRuntime.superConstructor(_).call(this,e),this.sortIndicators=[],this.lastSortedColumn=null},_=C;$traceurRuntime.createClass(C,{isEnabled:function(){return!!this.hot.getSettings().columnSorting},enablePlugin:function(){var e=this;if(!this.enabled){var t=this;this.hot.sortIndex=[],this.hot.sort=function(){var e=Array.prototype.slice.call(arguments);return t.sortByColumn.apply(t,e)},"undefined"==typeof 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,_.prototype,"enablePlugin").call(this)}},disablePlugin:function(){this.hot.sort=void 0,$traceurRuntime.superGet(this,_.prototype,"disablePlugin").call(this)},onAfterUpdateSettings:function(){this.sortBySettings()},sortBySettings:function(){var e,t,o=this.hot.getSettings().columnSorting,n=this.loadSortingState();"undefined"==typeof 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){return"undefined"==typeof e?(this.hot.sortColumn=void 0,void(this.hot.sortOrder=void 0)):(this.hot.sortColumn===e&&"undefined"==typeof t?this.hot.sortOrder===!1?this.hot.sortOrder=void 0:this.hot.sortOrder=!this.hot.sortOrder:this.hot.sortOrder="undefined"==typeof t||t,void(this.hot.sortColumn=e))},sortByColumn:function(e,t){if(this.setSortingColumn(e,t),"undefined"!=typeof this.hot.sortColumn){var o=c.hooks.run(this.hot,"beforeColumnSort",this.hot.sortColumn,this.hot.sortOrder);o!==!1&&this.sort(),this.updateOrderClass(),this.updateSortIndicator(),c.hooks.run(this.hot,"afterColumnSort",this.hot.sortColumn,this.hot.sortOrder),this.hot.render(),this.saveSortingState()}},saveSortingState:function(){var e={};"undefined"!=typeof this.hot.sortColumn&&(e.sortColumn=this.hot.sortColumn),"undefined"!=typeof this.hot.sortOrder&&(e.sortOrder=this.hot.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&c.hooks.run(this.hot,"persistentStateSave","columnSorting",e)},loadSortingState:function(){var e={};return c.hooks.run(this.hot,"persistentStateLoad","columnSorting",e),e.value},updateOrderClass:function(){var e;this.hot.sortOrder===!0?e="ascending":this.hot.sortOrder===!1&&(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(t,o){return"string"==typeof t[1]&&(t[1]=t[1].toLowerCase()),"string"==typeof o[1]&&(o[1]=o[1].toLowerCase()),t[1]===o[1]?0:null===t[1]||""===t[1]?1:null===o[1]||""===o[1]?-1:isNaN(t[1])&&!isNaN(o[1])?e?1:-1:!isNaN(t[1])&&isNaN(o[1])?e?-1:1:(isNaN(t[1])||isNaN(o[1])||(t[1]=parseFloat(t[1]),o[1]=parseFloat(o[1])),t[1]o[1]?e?1:-1:0)}},dateSort:function(e,t){return function(o,n){if(o[1]===n[1])return 0;if(null===o[1]||""===o[1])return 1;if(null===n[1]||""===n[1])return-1;var r=d(o[1],t.dateFormat),i=d(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(t,o){var n=parseFloat(t[1]),r=parseFloat(o[1]);return n===r||isNaN(n)&&isNaN(r)?0:isNaN(n)?1:isNaN(r)?-1:nr?e?1:-1:0}},sort:function(){if("undefined"==typeof this.hot.sortOrder)return void(this.hot.sortIndex.length=0);var e,t;this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0;var o,n=this.hot.countEmptyRows();o=this.hot.getSettings().maxRows===Number.POSITIVE_INFINITY?this.hot.countRows()-this.hot.getSettings().minSpareRows:this.hot.countRows()-n;for(var r=0,i=o;r=0&&r===-1&&f(o,"columnSorting"),g(o,"descending"),g(o,"ascending"),this.sortIndicators[e]&&e===this.hot.sortColumn&&("ascending"===this.sortOrderClass?f(o,"ascending"):"descending"===this.sortOrderClass&&f(o,"descending")))},isSorted:function(){return"undefined"!=typeof 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=w(n,function(e){return e[0]}),this.hot.sortIndex=w(this.hot.sortIndex,function(e,t){var n=o(e[0]);return n&&(e[0]-=n),e}),this.saveSortingState()}},onAfterOnCellMouseDown:function(e,t){t.row>-1||p(e.realTarget,"columnSorting")&&(t.col!==this.lastSortedColumn&&(this.hot.sortOrder=!0),this.lastSortedColumn=t.col,this.sortByColumn(t.col))}},{},y),b("columnSorting",C)},{_base:62,browser:24,eventManager:42,"helpers/array":43,"helpers/dom/element":47,moment:"moment",plugins:61}],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&&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){var t=this.getInputElement();t.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 B}},__esModule:{value:!0}});var r,i,s,a,l,u,c,d,h,f,p=(r=e("browser"),r&&r.__esModule&&r||{default:r}).default,g=(i=e("helpers/dom/element"),i&&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&&s.__esModule&&s||{default:s}),S=M.deepClone,E=M.deepExtend,O=(a=e("helpers/function"),a&&a.__esModule&&a||{default:a}).debounce,T=(l=e("eventManager"),l&&l.__esModule&&l||{default:l}).EventManager,k=(u=e("3rdparty/walkontable/src/cell/coords"),u&&u.__esModule&&u||{default:u}).WalkontableCellCoords,D=(c=e("plugins"),c&&c.__esModule&&c||{default:c}).registerPlugin,x=(d=e("_base"),d&&d.__esModule&&d||{default:d}).default,H=(h=e("commentEditor"),h&&h.__esModule&&h||{default:h}).CommentEditor,A=(f=e("contextMenu/utils"),f&&f.__esModule&&f||{default:f}),P=A.checkSelectionConsistency,N=A.markLabelAsSelected,L=new WeakMap,I="comment",W="value",j="style",V="readOnly",B=function(e){$traceurRuntime.superConstructor(F).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})},F=B;$traceurRuntime.createClass(B,(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,F.prototype,"enablePlugin").call(this))},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"disablePlugin",{value:function(){$traceurRuntime.superGet(this,F.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,W,{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,I,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(){},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"getCommentAtCell",{value:function(e,t){},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[I]?e[I][W]:""),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(){var e=void 0!==arguments[0]&&arguments[0];if(e||this.range.from&&this.editor.isVisible()){var t=R(this.hot.view.wt.wtTable.TABLE),o=this.hot.view.wt.wtTable.getCell(this.range.from),n=this.range.from.row,r=this.range.from.col,i=b(o),s=this.hot.view.wt.wtTable.getStretchedColumnWidth(r),a=i.top<0?0:i.top,l=i.left;this.hot.view.wt.wtViewport.hasVerticalScroll()&&t!==window&&(a-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition()),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&t!==window&&(l-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition());var u=l+s,c=a,d=this.getCommentMeta(n,r,j),h=this.getCommentMeta(n,r,V);d?this.editor.setSize(d.width,d.height):this.editor.resetSize(),this.editor.setReadOnlyState(h),this.editor.setPosition(u,c)}},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,W)&&(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)[I];r?(n=S(r),E(n,o)):n=o,this.hot.setCellMeta(e,t,I,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[I])return n[I][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[I]&&t[I][W]&&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){var t=L.get(this);t.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,j,{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,V);this.updateCommentMeta(o,n,(t={},Object.defineProperty(t,V,{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",o=P(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o)[I];if(n&&(n=n[V]),n)return!0});return o&&(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,F.prototype,"destroy").call(this)},configurable:!0,enumerable:!0,writable:!0}),n),{},x),D("comments",B)},{"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&&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&&r.__esModule&&r||{default:r}),l=a.objectEach,u=a.isObject,c=a.extend,d=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayEach,h=(s=e("predefinedItems"),s&&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(){var e=void 0!==arguments[0]?arguments[0]:null;return n(e,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&&n.__esModule&&n||{default:n}).default,m=(r=e("helpers/dom/element"),r&&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&&i.__esModule&&i||{default:i}),M=R.arrayEach,S=R.arrayFilter,E=R.arrayReduce,O=(s=e("cursor"),s&&s.__esModule&&s||{default:s}).Cursor,T=(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).EventManager,k=(l=e("helpers/object"),l&&l.__esModule&&l||{default:l}).mixin,D=(u=e("helpers/function"),u&&u.__esModule&&u||{default:u}).debounce,x=(c=e("utils"),c&&c.__esModule&&c||{default:c}),H=x.filterSeparators,A=x.hasSubMenu,P=x.isDisabled,N=x.isItemHidden,L=x.isSeparator,I=x.isSelectionDisabled,W=x.normalizeSelection,j=(d=e("helpers/unicode"),d&&d.__esModule&&d||{default:d}).KEY_CODES,V=(h=e("mixins/localHooks"),h&&h.__esModule&&h||{default:h}).localHooks,B=(f=e("predefinedItems"),f&&f.__esModule&&f||{default:f}).SEPARATOR,F=(p=e("helpers/dom/event"),p&&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.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=D(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)}};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.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),t.isCommand!==!1&&t.name!==B){var o=this.hot.getSelectedRange(),n=o?W(o):{},r=!0;(t.disabled===!0||"function"==typeof t.disabled&&t.disabled.call(this.hot)===!0||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.hasOwnProperty("submenu")},c=function(e){return new RegExp(B,"i").test(e.name)},d=function(e){return e.disabled===!0||"function"==typeof e.disabled&&e.disabled.call(s.hot)===!0},h=function(e){return e.disableSelection};"function"==typeof i&&(i=i.call(this.hot)),v(t),w(l,"htItemWrapper"),t.appendChild(l),c(a)?w(t,"htSeparator"):"function"==typeof a.renderer?(w(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,l,o,n,r,i))):y(l,i),d(a)?(w(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):h(a)?(w(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):u(a)?(w(t,"htSubmenu"),h(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)})):(_(t,"htSubmenu"),_(t,"htDisabled"),h(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)}))},createContainer:function(){var e=void 0!==arguments[0]?arguments[0]:null;e&&(e=e.replace(/ /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(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))},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},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){oe.indexOf(e)===-1&&(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&&s.__esModule&&s||{default:s}).objectEach,b=(a=e("predefinedItems/alignment"),a&&a.__esModule&&a||{default:a}),C=b.alignmentItem,_=b.KEY,R=(l=e("predefinedItems/clearColumn"),l&&l.__esModule&&l||{default:l}),M=R.clearColumnItem,S=R.KEY,E=(u=e("predefinedItems/columnLeft"),u&&u.__esModule&&u||{default:u}),O=E.columnLeftItem,T=E.KEY,k=(c=e("predefinedItems/columnRight"),c&&c.__esModule&&c||{default:c}),D=k.columnRightItem,x=k.KEY,H=(d=e("predefinedItems/readOnly"),d&&d.__esModule&&d||{default:d}),A=H.readOnlyItem,P=H.KEY,N=(h=e("predefinedItems/redo"),h&&h.__esModule&&h||{default:h}),L=N.redoItem,I=N.KEY,W=(f=e("predefinedItems/removeColumn"),f&&f.__esModule&&f||{default:f}),j=W.removeColumnItem,V=W.KEY,B=(p=e("predefinedItems/removeRow"),p&&p.__esModule&&p||{default:p}),F=B.removeRowItem,z=B.KEY,Y=(g=e("predefinedItems/rowAbove"),g&&g.__esModule&&g||{default:g}),U=Y.rowAboveItem,G=Y.KEY,$=(m=e("predefinedItems/rowBelow"),m&&m.__esModule&&m||{default:m}),K=$.rowBelowItem,X=$.KEY,q=(w=e("predefinedItems/separator"),w&&w.__esModule&&w||{default:w}),Z=q.separatorItem,J=q.KEY,Q=(v=e("predefinedItems/undo"),v&&v.__esModule&&v||{default:v}),ee=Q.undoItem,te=Q.KEY,a=(a=e("predefinedItems/alignment"),a&&a.__esModule&&a||{default:a}),l=(l=e("predefinedItems/clearColumn"),l&&l.__esModule&&l||{default:l}),u=(u=e("predefinedItems/columnLeft"),u&&u.__esModule&&u||{default:u}),c=(c=e("predefinedItems/columnRight"),c&&c.__esModule&&c||{default:c}),d=(d=e("predefinedItems/readOnly"),d&&d.__esModule&&d||{default:d}),h=(h=e("predefinedItems/redo"),h&&h.__esModule&&h||{default:h}),f=(f=e("predefinedItems/removeColumn"),f&&f.__esModule&&f||{default:f}),p=(p=e("predefinedItems/removeRow"),p&&p.__esModule&&p||{default:p}),g=(g=e("predefinedItems/rowAbove"),g&&g.__esModule&&g||{default:g}),m=(m=e("predefinedItems/rowBelow"),m&&m.__esModule&&m||{default:m}),w=(w=e("predefinedItems/separator"),w&&w.__esModule&&w||{default:w}),v=(v=e("predefinedItems/undo"),v&&v.__esModule&&v||{default:v}),oe=[G,X,T,x,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,x,{value:D,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",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htLeft")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{key:h+":center",name:function(){var e=this,t="Center",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htCenter")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{key:h+":right",name:function(){var e=this,t="Right",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htRight")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{key:h+":justify",name:function(){var e=this,t="Justify",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htJustify")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{name:d},{key:h+":top",name:function(){var e=this,t="Top",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htTop")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{key:h+":middle",name:function(){var e=this,t="Middle",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htMiddle")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),this.render()},disabled:!1},{key:h+":bottom",name:function(){var e=this,t="Bottom",o=u(this.getSelectedRange(),function(t,o){var n=e.getCellMeta(t,o).className;if(n&&n.indexOf("htBottom")!==-1)return!0});return o&&(t=c(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),o=l(t,function(t,o){return e.getCellMeta(t,o).className}),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",o,t,n,r),a(t,n,r,function(t,o){return e.getCellMeta(t,o)}),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&&r.__esModule&&r||{default:r}),a=s.align,l=s.getAlignmentClasses,u=s.checkSelectionConsistency,c=s.markLabelAsSelected,d=(i=e("separator"),i&&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)},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&&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)},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&&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)},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&&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",o=s(this.getSelectedRange(),function(t,o){return e.getCellMeta(t,o).readOnly});return o&&(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&&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)},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&&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)},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&&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)},disabled:function(){var e=i(this);return!e||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&&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)},disabled:function(){var e=i(this);return!e||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&&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 e.indexOf(t)!=-1?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function c(e,t){return e.indexOf(t)!=-1?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){if(e.from.row==e.to.row&&e.from.col==e.to.col)f(e.from.row,e.from.col,t,o,n);else for(var r=e.from.row;r<=e.to.row;r++)for(var i=e.from.col;i<=e.to.col;i++)f(r,i,t,o,n)}function f(e,t,o,n,r){var i=r(e,t),s=n;i.className&&(s="vertical"===o?u(i.className,n):c(i.className,n)),i.className=s}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),n=0;n0?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&&C.__esModule&&C||{default:C}).arrayEach,S=(_=e("helpers/dom/element"),_&&_.__esModule&&_||{default:_}).hasClass,E=(R=e("predefinedItems/separator"),R&&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&&n.__esModule&&n||{default:n}).default,d=(r=e("zeroclipboard"),r&&r.__esModule&&r||{default:r}).default,h=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{default:i}).removeClass,f=(s=e("helpers/array"),s&&s.__esModule&&s||{default:s}).arrayEach,p=(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).EventManager,g=(l=e("plugins"),l&&l.__esModule&&l||{default:l}).registerPlugin,m=(u=e("contextMenu/predefinedItems"),u&&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),"undefined"==typeof 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){"undefined"==typeof 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.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){var o=t.clipboardData;o.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()&&e.selection.empty()}function o(t){var o,n,r,i,s,a,l,u,c,d;if(e.isListening()&&e.selection.isSelected()){o=t,n=y.parse(o),r=e.getSelected(),i=new D(r[0],r[1]),s=new D(r[2],r[3]),a=new x(i,i,s),l=a.getTopLeftCorner(),u=a.getBottomRightCorner(),c=l,d=new D(Math.max(u.row,n.length-1+l.row),Math.max(u.col,n[0].length-1+l.col));var h=s.row-i.row>=n.length-1,f=s.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;R(t,function(e,o){var s=n>o+1?t[o+1]:null;s&&(h||(r.row=r.row+Math.max(s[0]-e[0]-1,0)),!f&&e[1]>i&&(i=e[1],r.col=r.col+Math.max(s[1]-e[1]-1,0)))}),e.selectCell(c.row,c.col,d.row+r.row,d.col+r.col)}}),e.populateFromArray(c.row,c.col,n,d.row,d.col,"paste",e.getSettings().pasteMode)}}function n(t){if(e.getSelected()&&!(e.getActiveEditor()&&e.getActiveEditor().isOpened()||O(t))){if(_(t.keyCode)){if(e.getSettings().fragmentSelection&&T())return;return r.setCopyableText(),void E(t)}var o=(t.ctrlKey||t.metaKey)&&!t.altKey;t.keyCode==C.A&&o&&e._registerTimeout(setTimeout(k(r.setCopyableText,r),0))}}var r=this;this.copyPasteInstance=v(),this.copyPasteInstance.onCut(t),this.copyPasteInstance.onPaste(o),this.onPaste=o,e.addHook("beforeKeyDown",n),this.destroy=function(){this.copyPasteInstance&&(this.copyPasteInstance.removeCallback(t),this.copyPasteInstance.removeCallback(o),this.copyPasteInstance.destroy(),this.copyPasteInstance=null),e.removeHook("beforeKeyDown",n)},e.addHook("afterDestroy",k(this.destroy,this)),this.triggerPaste=k(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=k(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),f=[];f.push({startRow:a,startCol:l,endRow:d,endCol:h}),f=w.hooks.run(e,"modifyCopyableRange",f);var p=this.getRangedCopyableData(f);e.copyPaste.copyPasteInstance.copyable(p),u===d&&c===h||w.hooks.run(e,"afterCopyLimit",u-a+1,c-l+1,o,n)},this.getRangedCopyableData=function(t){var o=[],n=[],r=[];return R(t,function(e){M(e.startRow,e.endRow,function(e){n.indexOf(e)===-1&&n.push(e)}),M(e.startCol,e.endCol,function(e){r.indexOf(e)===-1&&r.push(e)})}),R(n,function(t){var n=[];R(r,function(o){n.push(e.getCopyableData(t,o))}),o.push(n)}),y.stringify(o)}}function r(){var e=this,t=e.getSettings().copyPaste!==!1;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,w=(i=e("browser"),i&&i.__esModule&&i||{default:i}).default,v=(s=e("copyPaste"),s&&s.__esModule&&s||{default:s}).default,y=(a=e("SheetClip"),a&&a.__esModule&&a||{default:a}).default,b=(l=e("helpers/unicode"),l&&l.__esModule&&l||{default:l}),C=b.KEY_CODES,_=b.isCtrlKey,R=(u=e("helpers/array"),u&&u.__esModule&&u||{default:u}).arrayEach,M=(c=e("helpers/number"),c&&c.__esModule&&c||{default:c}).rangeEach,S=(d=e("helpers/dom/event"),d&&d.__esModule&&d||{default:d}),E=S.stopImmediatePropagation,O=S.isImmediatePropagationStopped,T=(h=e("helpers/dom/element"),h&&h.__esModule&&h||{default:h}).getSelectionText,k=(f=e("helpers/function"),f&&f.__esModule&&f||{default:f}).proxy,D=((p=e("plugins"),p&&p.__esModule&&p||{default:p}).registerPlugin,(g=e("3rdparty/walkontable/src/cell/coords"),g&&g.__esModule&&g||{default:g}).WalkontableCellCoords),x=(m=e("3rdparty/walkontable/src/cell/range"),m&&m.__esModule&&m||{default:m}).WalkontableCellRange;w.hooks.add("afterInit",r),w.hooks.add("afterUpdateSettings",r),w.hooks.register("afterCopyLimit"),w.hooks.register("modifyCopyableRange")},{"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,plugins:61}],91:[function(e,t,o){"use strict";function n(){}var r,i,s,a,l,u=(r=e("browser"),r&&r.__esModule&&r||{default:r}).default,c=((i=e("plugins"),i&&i.__esModule&&i||{default:i}).registerPlugin,(s=e("3rdparty/walkontable/src/cell/range"),s&&s.__esModule&&s||{default:s}).WalkontableCellRange),d=(a=e("3rdparty/walkontable/src/selection"),a&&a.__esModule&&a||{default:a}).WalkontableSelection,h=function(e){return"boolean"==typeof e&&e===!0||"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},D=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",t=T(this,"top");return t&&(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",t=T(this,"right");return t&&(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",t=T(this,"bottom");return t&&(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",t=T(this,"left");return t&&(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",D),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&&n.__esModule&&n||{default:n}).default,c=(r=e("_base"),r&&r.__esModule&&r||{default:r}).default,d=(i=e("plugins"),i&&i.__esModule&&i||{default:i}).registerPlugin,h=(s=e("helpers/array"),s&&s.__esModule&&s||{default:s}).arrayEach,f=(a=e("contextMenuItem/freezeColumn"),a&&a.__esModule&&a||{default:a}).freezeColumnItem,p=(l=e("contextMenuItem/unfreezeColumn"),l&&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.coordsColumn-1;if(!s||!i||a.pressed||0!==e.button||l)return a.pressed=!1,a.columnsToMove.length=0,void v(this.hot.rootElement,[k,T]);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,T):w(this.hot.rootElement,T),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,[k,T,D]),this.hot.selection.selectedHeader.cols&&w(this.hot.rootElement,D),!(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,e!==!1&&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)},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 e=null===t?e:t},onAfterPluginsInitialized:function(){var e=this.hot.countCols(),t=this.columnsMapper._arrayMap.length;if(0===t)this.columnsMapper.createMap(this.hot.countSourceCols()||this.hot.getSettings().startCols);else if(te){var n=e-1,r=[];g(this.columnsMapper._arrayMap,function(e,t,o){e>n&&r.push(t)}),this.columnsMapper.removeItems(r)}this.initialSettings(),this.backlight.build(),this.guideline.build()},destroy:function(){this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,H.prototype,"destroy").call(this)}},{},f),_("ManualColumnMove",x),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 u}},__esModule:{value:!0}});var n,r=(n=e("helpers/number"),n&&n.__esModule&&n||{ +default:n}).isNumeric,i=0,s=1,a=2,l="px",u=function(e){this.hot=e,this._element=null,this.state=i};$traceurRuntime.createClass(u,{appendTo:function(e){e.appendChild(this._element),this.state=a},build:function(){this._element=document.createElement("div"),this.state=s},destroy:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=i},isAppended:function(){return this.state===a},isBuilt:function(){return this.state>=s},setPosition:function(e,t){r(e)&&(this._element.style.top=e+l),r(t)&&(this._element.style.left=t+l)},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+l),r(t)&&(this._element.style.height=t+l)},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+l),r(t)&&(this._element.style.marginLeft=t+l)},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 l}},__esModule:{value:!0}});var n,r,i=(n=e("_base"),n&&n.__esModule&&n||{default:n}).BaseUI,s=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}).addClass,a="ht__manualColumnMove--backlight",l=function(e){$traceurRuntime.superConstructor(u).call(this,e)},u=l;$traceurRuntime.createClass(l,{build:function(){$traceurRuntime.superGet(this,u.prototype,"build").call(this),s(this._element,a)}},{},i)},{_base:98,"helpers/dom/element":47}],100:[function(e,t,o){"use strict";Object.defineProperties(o,{GuidelineUI:{get:function(){return l}},__esModule:{value:!0}});var n,r,i=(n=e("_base"),n&&n.__esModule&&n||{default:n}).BaseUI,s=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}).addClass,a="ht__manualColumnMove--guideline",l=function(e){$traceurRuntime.superConstructor(u).call(this,e)},u=l;$traceurRuntime.createClass(l,{build:function(){$traceurRuntime.superGet(this,u.prototype,"build").call(this),s(this._element,a)}},{},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&&n.__esModule&&n||{default:n}).default,h=(r=e("_base.js"),r&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{default:i}),p=f.addClass,g=f.hasClass,m=f.removeClass,w=f.outerHeight,v=(s=e("eventManager"),s&&s.__esModule&&s||{default:s}).eventManager,y=(a=e("helpers/dom/event"),a&&a.__esModule&&a||{default:a}),b=y.pageX,C=(y.pageY,(l=e("helpers/array"),l&&l.__esModule&&l||{default:l}).arrayEach),_=(u=e("helpers/number"),u&&u.__esModule&&u||{default:u}).rangeEach,R=(c=e("plugins"),c&&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)}),"undefined"!=typeof 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){var n=this.selectedCols.length;n>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){var r=this.selectedCols.length;r>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 x}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f=(n=e("_base.js"),n&&n.__esModule&&n||{default:n}).default,p=(r=e("browser"),r&&r.__esModule&&r||{default:r}).default,g=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayEach,m=(s=e("helpers/dom/element"),s&&s.__esModule&&s||{default:s}),w=m.addClass,v=m.removeClass,y=m.offset,b=(a=e("helpers/number"),a&&a.__esModule&&a||{default:a}).rangeEach,C=(l=e("eventManager"),l&&l.__esModule&&l||{default:l}).eventManager,_=(u=e("plugins"),u&&u.__esModule&&u||{default:u}).registerPlugin,R=(c=e("rowsMapper"),c&&c.__esModule&&c||{default:c}).RowsMapper,M=(d=e("ui/backlight"),d&&d.__esModule&&d||{default:d}).BacklightUI,S=(h=e("ui/guideline"),h&&h.__esModule&&h||{default:h}).GuidelineUI,E=new WeakMap,O="ht__manualRowMove",T="show-ui",k="on-moving--rows",D="after-selection--rows",x=function(e){$traceurRuntime.superConstructor(H).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)},H=x;$traceurRuntime.createClass(x,{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("beforeColumnSort",function(t,o){return e.onBeforeColumnSort(t,o)}),this.addHook("unmodifyRow",function(t){return e.onUnmodifyRow(t)}),this.registerEvents(),w(this.hot.rootElement,O),$traceurRuntime.superGet(this,H.prototype,"enablePlugin").call(this))},updatePlugin:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),$traceurRuntime.superGet(this,H.prototype,"updatePlugin").call(this)},disablePlugin:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),v(this.hot.rootElement,O),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,H.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=r===!1,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.scrollTop=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((this.getRowsHeight(f,t.row)+e.layerY)*-1,null),w(this.hot.rootElement,k),this.refreshPositions()}else v(this.hot.rootElement,D),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,T):w(this.hot.rootElement,T),n.row=!0,n.column=!0,n.cell=!0,i.target.coords=t,i.target.TD=o)},onMouseUp:function(){var e=E.get(this);if(e.pressed=!1,e.backlightHeight=0,v(this.hot.rootElement,[k,T,D]),this.hot.selection.selectedHeader.rows&&w(this.hot.rootElement,D),!(e.rowsToMove.length<1)){var t=e.target.row;if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){var o=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),n=this.rowsMapper.getIndexByValue(e.rowsToMove[e.rowsToMove.length-1]);this.changeSelection(o,n)}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,e!==!1&&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)},onModifyRow:function(e,t){return t!==this.pluginName&&(e=this.rowsMapper.getValueByIndex(e)),e},onUnmodifyRow:function(e){return this.rowsMapper.getIndexByValue(e)},onAfterPluginsInitialized:function(){0===this.rowsMapper._arrayMap.length&&this.rowsMapper.createMap(this.hot.countSourceRows()||this.hot.getSettings().startRows),this.initialSettings(),this.backlight.build(),this.guideline.build()},destroy:function(){this.backlight.destroy(),this.guideline.destroy(),$traceurRuntime.superGet(this,H.prototype,"destroy").call(this)}},{},f),_("ManualRowMove",x),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&&n.__esModule&&n||{default:n}).default,u=(r=e("mixins/arrayMapper"),r&&r.__esModule&&r||{default:r}).arrayMapper,c=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayFilter,d=(s=e("helpers/object"),s&&s.__esModule&&s||{default:s}).mixin,h=(a=e("helpers/number"),a&&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 a}},__esModule:{value:!0}});var n=0,r=1,i=2,s="px",a=function(e){this.hot=e,this._element=null,this.state=n};$traceurRuntime.createClass(a,{appendTo:function(e){e.appendChild(this._element),this.state=i},build:function(){this._element=document.createElement("div"),this.state=r},destroy:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=n},isAppended:function(){return this.state===i},isBuilt:function(){return this.state>=r},setPosition:function(e,t){e&&(this._element.style.top=e+s),t&&(this._element.style.left=t+s)},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+s),t&&(this._element.style.height=t+s)},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+s),t&&(this._element.style.marginLeft=t+s)},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 l}},__esModule:{value:!0}});var n,r,i=(n=e("_base"),n&&n.__esModule&&n||{default:n}).BaseUI,s=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}).addClass,a="ht__manualRowMove--backlight",l=function(e){$traceurRuntime.superConstructor(u).call(this,e)},u=l;$traceurRuntime.createClass(l,{build:function(){$traceurRuntime.superGet(this,u.prototype,"build").call(this),s(this._element,a)}},{},i)},{_base:104,"helpers/dom/element":47}],106:[function(e,t,o){"use strict";Object.defineProperties(o,{GuidelineUI:{get:function(){return l}},__esModule:{value:!0}});var n,r,i=(n=e("_base"),n&&n.__esModule&&n||{default:n}).BaseUI,s=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}).addClass,a="ht__manualRowMove--guideline",l=function(e){$traceurRuntime.superConstructor(u).call(this,e)},u=l;$traceurRuntime.createClass(l,{build:function(){$traceurRuntime.superGet(this,u.prototype,"build").call(this),s(this._element,a)}},{},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&&n.__esModule&&n||{default:n}).default,h=(r=e("_base.js"),r&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{default:i}),p=f.addClass,g=f.hasClass,m=f.removeClass,w=f.outerWidth,v=(s=e("eventManager"),s&&s.__esModule&&s||{default:s}).eventManager,y=(a=e("helpers/dom/event"),a&&a.__esModule&&a||{default:a}),b=(y.pageX,y.pageY),C=(l=e("helpers/array"),l&&l.__esModule&&l||{default:l}).arrayEach,_=(u=e("helpers/number"),u&&u.__esModule&&u||{default:u}).rangeEach,R=(c=e("plugins"),c&&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();"undefined"!=typeof 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){var n=this.selectedRows.length;n>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){var r=this.selectedRows.length;r>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;t=e.row&&t.row<=e.row+e.rowspan-1},r=function(e,t){return t.col>=e.col&&t.col<=e.col+e.colspan-1},i=function(e){return new v(t.to.row+e.row,t.to.col+e.col)},s={row:o.row,col:o.col};if("modifyTransformStart"==e){this.lastDesiredCoords||(this.lastDesiredCoords=new v(null,null));for(var a,l=new v(t.highlight.row,t.highlight.col),u=this.mergedCellInfoCollection.getInfo(l.row,l.col),c=0,d=this.mergedCellInfoCollection.length;c0?s.row=u.row+u.rowspan-1-l.row+o.row:o.row<0&&(s.row=l.row-u.row+o.row),o.col>0?s.col=u.col+u.colspan-1-l.col+o.col:o.col<0&&(s.col=l.col-u.col+o.col)}var m=new v(t.highlight.row+s.row,t.highlight.col+s.col),w=this.mergedCellInfoCollection.getInfo(m.row,m.col);w&&(this.lastDesiredCoords=m,s={row:w.row-l.row,col:w.col-l.col})}else if("modifyTransformEnd"==e)for(var c=0,d=this.mergedCellInfoCollection.length;c0){var R=t.highlight.isEqual(C.from);_.indexOf("top")>-1?t.to.isSouthEastOf(C.from)&&R?t.setDirection("NW-SE"):t.to.isSouthWestOf(C.from)&&R&&t.setDirection("NE-SW"):_.indexOf("bottom")>-1&&(t.to.isNorthEastOf(C.from)&&R?t.setDirection("SW-NE"):t.to.isNorthWestOf(C.from)&&R&&t.setDirection("SE-NW"))}var m=i(s),M=n(b,m),S=r(b,m);t.includesRange(C)&&(C.includes(m)||M||S)&&(M&&(s.row<0?s.row-=b.rowspan-1:s.row>0&&(s.row+=b.rowspan-1)),S&&(s.col<0?s.col-=b.colspan-1:s.col>0&&(s.col+=b.colspan-1)))}0!==s.row&&(o.row=s.row),0!==s.col&&(o.col=s.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&&n.from.row>=r&&(n.from.row=n.from-1),n.from.col<0?n.from.col=0:n.from.col>0&&n.from.col>=i&&(n.from.col=i-1)}}}},T=function(e){this.lastDesiredCoords=null;var t=this.getSettings().mergeCells;if(t){var o=this.getSelectedRange();o.highlight=new v(o.highlight.row,o.highlight.col),o.to=e;var n=!1;do{n=!1;for(var r=0,i=this.mergeCells.mergedCellInfoCollection.length;re.endRow)return e.endRow=i,x.call(this,e)}}},H=function(e){var t=this.getSettings().mergeCells;if(t)for(var o,n=this.countRows(),r=0;re.endColumn)return e.endColumn=i,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",D),m.hooks.add("afterViewportRowCalculatorOverride",x),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&&n.__esModule&&n||{default:n}).default,r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}),c=u.getWindowScrollTop,d=u.hasClass,h=u.getWindowScrollLeft,f=(i=e("helpers/browser"),i&&i.__esModule&&i||{default:i}).isMobileBrowser,p=(s=e("_base"),s&&s.__esModule&&s||{default:s}).default,g=(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).EventManager,m=(l=e("plugins"),l&&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);return o!=-1&&void(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&&o!==t.lastSetCell&&("TD"!=o.nodeName&&"TH"!=o.nodeName||(n=t.hot.getCoords(o),n.col==-1&&(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&&n.__esModule&&n||{default:n}).default,l=(r=e("../../mixins/localHooks"),r&&r.__esModule&&r||{default:r}).localHooks,u=(i=e("../../helpers/object"),i&&i.__esModule&&i||{default:i}).mixin,c=(s=e("utils"),s&&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&&n.__esModule&&n||{default:n}).default,c=(r=e("_base"),r&&r.__esModule&&r||{default:r}).default,d=((i=e("jsonpatch"),i&&i.__esModule&&i||{default:i}).default,(s=e("dataObserver"),s&&s.__esModule&&s||{default:s}).DataObserver),h=(a=e("helpers/array"),a&&a.__esModule&&a||{default:a}).arrayEach,f=(l=e("plugins"),l&&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={add:function(e){isNaN(e.col)?t.hot.runHooks("afterCreateRow",e.row):t.hot.runHooks("afterCreateCol",e.col)},remove:function(e){isNaN(e.col)?t.hot.runHooks("afterRemoveRow",e.row,1):t.hot.runHooks("afterRemoveCol",e.col,1)},replace:function(e){t.hot.runHooks("afterChange",[e.row,e.col,null,e.value],"external")}};h(e,function(e){o[e.op]&&o[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(["add","remove"].indexOf(e.op)!==-1&&!isNaN(e.col)){if(t.indexOf(e.col)!==-1)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&&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(){var o=window.localStorage[e+"__persistentStateKeys"],n="string"==typeof o?JSON.parse(o):void 0;t=n?n:[]},r=function(){t=[],o()};n(),this.saveValue=function(n,r){window.localStorage[e+"_"+n]=JSON.stringify(r),t.indexOf(n)==-1&&(t.push(n),o())},this.loadValue=function(t,o){t="undefined"==typeof t?o:t;var n=window.localStorage[e+"_"+t];return"undefined"==typeof 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;a1){var o=arguments[0],n=arguments[1],r=arguments[2];if(r.checkedTemplate){var i=e.getDataAtCell(o,n);null===t?i===r.checkedTemplate?e.setDataAtCell(o,n,r.uncheckedTemplate):i===r.uncheckedTemplate&&e.setDataAtCell(o,n,r.checkedTemplate):e.setDataAtCell(o,n,r.uncheckedTemplate)}}else for(var s=arguments[0],a=0,l=s.length;a0&&!a.readOnly&&t(u)}}}S("base").apply(this,arguments);var p=r(e),g=i(),m=u.label,w=!1;if("undefined"==typeof u.checkedTemplate&&(u.checkedTemplate=!0),"undefined"==typeof u.uncheckedTemplate&&(u.uncheckedTemplate=!1),y(t),l===u.checkedTemplate||_(l,u.checkedTemplate)?g.checked=!0:l===u.uncheckedTemplate||_(l,u.uncheckedTemplate)?g.checked=!1:null===l?b(g,"noValue"):(g.style.display="none",b(g,P),w=!0),g.setAttribute("data-row",o),g.setAttribute("data-col",n),!w&&m){var v="";m.value?v="function"==typeof m.value?m.value.call(this,o,n,a,l):m.value:m.property&&(v=e.getDataAtRowProp(o,m.property));var R=s(v);"before"===m.position?R.appendChild(g):R.insertBefore(g,R.firstChild),g=R}t.appendChild(g),w&&t.appendChild(document.createTextNode("#bad-value#")),H.has(e)||(H.set(e,!0),e.addHook("beforeKeyDown",c))}function r(e){var t=A.get(e);return t||(t=new R(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)}),A.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),r=t.getCellMeta(o,n);r.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&&d.__esModule&&d||{default:d}),y=v.empty,b=v.addClass,C=v.hasClass,_=(h=e("helpers/string"),h&&h.__esModule&&h||{default:h}).equalsIgnoreCase,R=(f=e("eventManager"),f&&f.__esModule&&f||{default:f}).EventManager,M=(p=e("renderers"),p&&p.__esModule&&p||{default:p}),S=M.getRenderer,E=M.registerRenderer,O=(g=e("helpers/unicode"),g&&g.__esModule&&g||{default:g}).isKey,T=(m=e("helpers/function"),m&&m.__esModule&&m||{default:m}).partial,k=(w=e("helpers/dom/event"),w&&w.__esModule&&w||{default:w}),D=k.stopImmediatePropagation,x=k.isImmediatePropagationStopped,H=new WeakMap,A=new WeakMap,P="htBadValue";E("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&&r.__esModule&&r||{default:r}).fastInnerHTML,a=(i=e("renderers"),i&&i.__esModule&&i||{default:i}),l=a.getRenderer,u=a.registerRenderer;u("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)){"undefined"!=typeof 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&&r.__esModule&&r||{default:r}).default,l=(i=e("renderers"),i&&i.__esModule&&i||{default:i}),u=l.getRenderer,c=l.registerRenderer,d=(s=e("helpers/number"),s&&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=M(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}var u="function"==typeof o.settings.outsideClickDeselects?o.settings.outsideClickDeselects(n):o.settings.outsideClickDeselects;u?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),!O(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 D(n.row,n.col))):c.cols&&n.row<0&&!a.column?u.setRangeEnd(new D(l.to.row,n.col)):c.rows&&n.col<0&&!a.row?u.setRangeEnd(new D(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 D(l.from.row,0)),u.setRangeEnd(new D(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 D(0,l.from.col)),u.setRangeEnd(new D(e.countRows()-1,n.col)));else{var d=!0;if(l){var f=l,g=f.from,m=f.to,w=!u.inInSelection(n);if(n.row<0&&c.cols){var v=Math.min(g.col,m.col),y=Math.max(g.col,m.col);d=n.coly}else if(n.col<0&&c.rows){var b=Math.min(g.row,m.row),C=Math.max(g.row,m.row);d=n.rowC}else d=w}var _=T(t),M=k(t)||"touchstart"===t.type;n.row<0&&n.col>=0&&!a.column?(u.setSelectedHeaders(!1,!0),(M||_&&d)&&(u.setRangeStartOnly(new D(0,n.col)),u.setRangeEnd(new D(Math.max(e.countRows()-1,0),n.col),!1))):n.col<0&&n.row>=0&&!a.row?(u.setSelectedHeaders(!0,!1),(M||_&&d)&&(u.setRangeStartOnly(new D(n.row,0)),u.setRangeEnd(new D(n.row,Math.max(e.countCols()-1,0)),!1))):n.col>=0&&n.row>=0&&!a.cells?(M||_&&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))}u.selectedHeader.rows?(R(e.rootElement,"ht__selection--columns"),p(e.rootElement,"ht__selection--rows")):u.selectedHeader.cols?(R(e.rootElement,"ht__selection--rows"),p(e.rootElement,"ht__selection--columns")):R(e.rootElement,["ht__selection--rows","ht__selection--columns"]),h.hooks.run(e,"afterOnCellMouseDown",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),O(t)||(0===t.button&&i&&(n.row>=0&&n.col>=0?e.selection.selectedHeader.cols&&!a.column?e.selection.setRangeEnd(new D(e.countRows()-1,n.col),!1):e.selection.selectedHeader.rows&&!a.row?e.selection.setRangeEnd(new D(n.row,e.countCols()-1),!1):a.cell||e.selection.setRangeEnd(n):e.selection.selectedHeader.cols&&!a.column?e.selection.setRangeEnd(new D(e.countRows()-1,n.col),!1):e.selection.selectedHeader.rows&&!a.row?e.selection.setRangeEnd(new D(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 H(l),this.activeWt=this.wt,this.eventManager.addEventListener(o.wt.wtTable.spreader,"mousedown",function(e){e.target===o.wt.wtTable.spreader&&3===e.which&&E(e)}),this.eventManager.addEventListener(o.wt.wtTable.spreader,"contextmenu",function(e){e.target===o.wt.wtTable.spreader&&3===e.which&&E(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&&r.__esModule&&r||{default:r}).default,f=(i=e("helpers/dom/element"),i&&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,M=((s=e("helpers/object"),s&&s.__esModule&&s||{default:s}).createObjectPropListener,(a=e("eventManager"),a&&a.__esModule&&a||{default:a}).eventManager),S=(l=e("helpers/dom/event"),l&&l.__esModule&&l||{default:l}),E=S.stopPropagation,O=S.isImmediatePropagationStopped,T=S.isRightClick,k=S.isLeftClick,D=(u=e("3rdparty/walkontable/src/cell/coords"),u&&u.__esModule&&u||{default:u}).WalkontableCellCoords,x=(c=e("3rdparty/walkontable/src/selection"),c&&c.__esModule&&c||{default:c}).WalkontableSelection,H=(d=e("3rdparty/walkontable/src/core"),d&&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!(this.settings.fragmentSelection!==!0||!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,{GhostTable:{get:function(){return g}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,c=(r=e("helpers/dom/element"),r&&r.__esModule&&r||{default:r}),d=c.addClass,h=c.outerHeight,f=c.outerWidth,p=(i=e("helpers/array"),i&&i.__esModule&&i||{default:i}).arrayEach,g=((s=e("helpers/object"),s&&s.__esModule&&s||{default:s}).objectEach,(a=e("helpers/number"),a&&a.__esModule&&a||{default:a}).rangeEach,(l=e("helpers/mixed"),l&&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}],128:[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&&r.__esModule&&r||{default:r}).default,a=(i=e("helpers/feature"),i&&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}],129:[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&&i.__esModule&&i||{default:i}).default,l=(s=e("helpers/object"),s&&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){var o;return o=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){var o;return o=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}],130:[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&&r.__esModule&&r||{default:r}).default,d=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{default:i}),h=(d.addClass,d.outerHeight,d.outerWidth,(s=e("helpers/array"),s&&s.__esModule&&s||{default:s}).arrayEach,a=e("helpers/object"),a&&a.__esModule&&a||{default:a}),f=(h.objectEach,h.isObject),p=(l=e("helpers/number"),l&&l.__esModule&&l||{default:l}).rangeEach,g=(u=e("helpers/mixed"),u&&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){var c=s.indexOf(l)>-1;if(!c||r.allowDuplicates){var d="row"===e?"col":"row";u.strings.push((a={},Object.defineProperty(a,"value",{value:l,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(a,d,{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}],131:[function(e,t,o){"use strict";function n(e,t){var o=e;return function(e){for(var n=!1,r=0,i=e.length;r-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"}],133:[function(e,t,o){"use strict";var n,r=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default;r.NumericValidator=function(e,t){null==e&&(e=""),t(this.allowEmpty&&""===e?!0:""===e?!1:/^-?\d*(\.|\,)?\d*$/.test(e))}},{browser:24}],134:[function(e,t,o){"use strict";var n,r,i=(n=e("browser"),n&&n.__esModule&&n||{default:n}).default,s=(r=e("moment"),r&&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(this.correctFormat===!0){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],s+="string"==typeof i?i.indexOf("\n")>-1?'"'+i.replace(/"/g,'""')+'"':i:null===i||void 0===i?"":i;s+="\n"}return s}};"undefined"!=typeof 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}var o=this,n=!1;if(e.metaKey?n=!0:e.ctrlKey&&navigator.userAgent.indexOf("Mac")===-1&&(n=!0),n){if(document.activeElement!==this.elTextarea&&(""!==this.getSelectionText()||t()))return;this.selectNodeText(this.elTextarea),setTimeout(function(){document.activeElement!==o.elTextarea&&o.selectNodeText(o.elTextarea)},0)}e.isImmediatePropagationEnabled===!1||!n||67!==e.keyCode&&86!==e.keyCode&&88!==e.keyCode||(88===e.keyCode?setTimeout(function(){o.triggerCut(e)},0):86===e.keyCode&&setTimeout(function(){o.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=!1,c=s.length-1;c>=0;c--){var d=s[c],f=e[d];if(t.hasOwnProperty(d)){var p=t[d];"object"==typeof f&&null!=f&&"object"==typeof p&&null!=p?h(f,p,n,r+"/"+o(d)):f!=p&&(a=!0,n.push({op:"replace",path:r+"/"+o(d),value:u(p)}))}else n.push({op:"remove",path:r+"/"+o(d)}),l=!0}if(l||i.length!=s.length)for(var c=0;c=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&&r.indexOf("~")!=-1&&(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 in Cn)n=Cn[o],r=t[n],w(r)||(e[n]=r);return e}function y(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),_n===!1&&(_n=!0,e.updateOffset(this),_n=!1)}function b(e){return e instanceof y||null!=e&&null!=e._isAMomentObject}function C(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function _(e){var t=+e,o=0;return 0!==t&&isFinite(t)&&(o=C(t)),o}function R(e,t,o){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n0?"future":"past"];return O(o)?o(t):o.replace(/%s/i,t)}function I(e,t){var o=e.toLowerCase();An[o]=An[o+"s"]=An[t]=e}function W(e){return"string"==typeof e?An[e]||An[e.toLowerCase()]:void 0}function j(e){var t,o,n={};for(o in e)c(e,o)&&(t=W(o),t&&(n[t]=e[o]));return n}function V(e,t){Pn[e]=t}function B(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 F(t,o){return function(n){return null!=n?(Y(this,t,n),e.updateOffset(this,o),this):z(this,t)}}function z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Y(e,t,o){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](o)}function U(e){return e=W(e),O(this[e])?this[e]():this}function G(e,t){if("object"==typeof e){e=j(e);for(var o=B(e),n=0;n=0;return(i?o?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function K(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 $(r.apply(this,arguments),t[1],t[2])}),o&&(Wn[o]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function X(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q(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 Q(e,t,o){or[e]=O(t)?t:function(e,n){return e&&o?o:t}}function ee(e,t){return c(or,e)?or[e](t._strict,t._locale):new RegExp(te(e))}function te(e){return oe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,o,n,r){return t||o||n||r}))}function oe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ne(e,t){var o,n=t;for("string"==typeof e&&(e=[e]),a(t)&&(n=function(e,o){o[t]=_(e)}),o=0;o=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function Ce(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function _e(e,t,o){var n=7+t-o,r=(7+Ce(e,0,n).getUTCDay()-t)%7;return-r+n-1}function Re(e,t,o,n,r){var i,s,a=(7+o-n)%7,l=_e(e,n,r),u=1+7*(t-1)+a+l;return u<=0?(i=e-1,s=we(i)+u):u>we(e)?(i=e+1,s=u-we(e)):(i=e,s=u),{year:i,dayOfYear:s}}function Me(e,t,o){var n,r,i=_e(e.year(),t,o),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?(r=e.year()-1,n=s+Se(r,t,o)):s>Se(e.year(),t,o)?(n=s-Se(e.year(),t,o),r=e.year()+1):(r=e.year(),n=s),{week:n,year:r}}function Se(e,t,o){var n=_e(e,t,o),r=_e(e+1,t,o);return(we(e)-n+r)/7}function Ee(e){return Me(e,this._week.dow,this._week.doy).week}function Oe(){return this._week.dow}function Te(){return this._week.doy}function ke(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function De(e){var t=Me(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 He(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ae(e,t){return e?r(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Pe(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ne(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Le(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=fr.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===t?(r=fr.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=fr.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===t?(r=fr.call(this._weekdaysParse,s),r!==-1?r:(r=fr.call(this._shortWeekdaysParse,s),r!==-1?r:(r=fr.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===t?(r=fr.call(this._shortWeekdaysParse,s),r!==-1?r:(r=fr.call(this._weekdaysParse,s),r!==-1?r:(r=fr.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=fr.call(this._minWeekdaysParse,s),r!==-1?r:(r=fr.call(this._weekdaysParse,s),r!==-1?r:(r=fr.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function Ie(e,t,o){var n,r,i;if(this._weekdaysParseExact)return Le.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 We(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 je(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 Ve(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=He(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Be(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Mr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Fe(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Sr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ze(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Er),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ye(){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]=oe(a[t]),l[t]=oe(l[t]),u[t]=oe(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 Ue(){return this.hours()%12||12}function Ge(){return this.hours()||24}function $e(e,t){K(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}function Xe(e){return"p"===(e+"").toLowerCase().charAt(0)}function qe(e,t,o){return e>11?o?"pm":"PM":o?"am":"AM"}function Ze(e){return e?e.toLowerCase().replace("_","-"):e}function Je(e){for(var t,o,n,r,i=0;i0;){if(n=Qe(r.slice(0,t).join("-")))return n;if(o&&o.length>=t&&R(r,o,!0)>=t-1)break;t--}i++}return null}function Qe(e){var n=null;if(!xr[e]&&"undefined"!=typeof o&&o&&o.exports)try{n=Or._abbr,t("./locale/"+e),et(n)}catch(e){}return xr[e]}function et(e,t){var o;return e&&(o=w(t)?nt(e):tt(e,t),o&&(Or=o)),Or._abbr}function tt(e,t){if(null!==t){var o=Dr;if(t.abbr=e,null!=xr[e])E("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=xr[e]._config;else if(null!=t.parentLocale){if(null==xr[t.parentLocale])return Hr[t.parentLocale]||(Hr[t.parentLocale]=[]),Hr[t.parentLocale].push({name:e,config:t}),null;o=xr[t.parentLocale]._config}return xr[e]=new D(k(o,t)),Hr[e]&&Hr[e].forEach(function(e){tt(e.name,e.config)}),et(e),xr[e]}return delete xr[e],null}function ot(e,t){if(null!=t){var o,n=Dr;null!=xr[e]&&(n=xr[e]._config),t=k(n,t),o=new D(t),o.parentLocale=xr[e],xr[e]=o,et(e)}else null!=xr[e]&&(null!=xr[e].parentLocale?xr[e]=xr[e].parentLocale:null!=xr[e]&&delete xr[e]);return xr[e]}function nt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Or;if(!r(e)){if(t=Qe(e))return t;e=[e]}return Je(e)}function rt(){return En(xr)}function it(e){var t,o=e._a;return o&&p(e).overflow===-2&&(t=o[ir]<0||o[ir]>11?ir:o[sr]<1||o[sr]>se(o[rr],o[ir])?sr:o[ar]<0||o[ar]>24||24===o[ar]&&(0!==o[lr]||0!==o[ur]||0!==o[cr])?ar:o[lr]<0||o[lr]>59?lr:o[ur]<0||o[ur]>59?ur:o[cr]<0||o[cr]>999?cr:-1,p(e)._overflowDayOfYear&&(tsr)&&(t=sr),p(e)._overflowWeeks&&t===-1&&(t=dr),p(e)._overflowWeekday&&t===-1&&(t=hr),p(e).overflow=t),e}function st(e){var t,o,n,r,i,s,a=e._i,l=Ar.exec(a)||Pr.exec(a);if(l){for(p(e).iso=!0,t=0,o=Lr.length;twe(r)&&(p(e)._overflowDayOfYear=!0),o=Ce(r,0,e._dayOfYear),e._a[ir]=o.getUTCMonth(),e._a[sr]=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[ar]&&0===e._a[lr]&&0===e._a[ur]&&0===e._a[cr]&&(e._nextDay=!0,e._a[ar]=0),e._d=(e._useUTC?Ce:be).apply(null,i),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ar]=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[rr],Me(bt(),1,4).year),n=lt(t.W,1),r=lt(t.E,1),(r<1||r>7)&&(l=!0);else{i=e._locale._week.dow,s=e._locale._week.doy;var u=Me(bt(),i,s);o=lt(t.gg,e._a[rr],u.year),n=lt(t.w,u.week),null!=t.d?(r=t.d,(r<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>Se(o,i,s)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(a=Re(o,n,r,i,s),e._a[rr]=a.year,e._dayOfYear=a.dayOfYear)}function ht(t){if(t._f===e.ISO_8601)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=J(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),ie(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[ar]<=12&&p(t).bigHour===!0&&t._a[ar]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[ar]=ft(t._locale,t._a[ar],t._meridiem),ct(t),it(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 Wt(){if(!w(this._isDSTShifted))return this._isDSTShifted;var e={};if(v(e,this),e=wt(e),e._a){var t=e._isUTC?h(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&R(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function jt(){return!!this.isValid()&&!this._isUTC}function Vt(){return!!this.isValid()&&this._isUTC}function Bt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Ft(e,t){var o,n,r,i=e,s=null;return St(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:a(e)?(i={},t?i[t]=e:i.milliseconds=e):(s=zr.exec(e))?(o="-"===s[1]?-1:1,i={y:0,d:_(s[sr])*o,h:_(s[ar])*o,m:_(s[lr])*o,s:_(s[ur])*o,ms:_(Et(1e3*s[cr]))*o}):(s=Yr.exec(e))?(o="-"===s[1]?-1:1,i={y:zt(s[2],o),M:zt(s[3],o),w:zt(s[4],o),d:zt(s[5],o),h:zt(s[6],o),m:zt(s[7],o),s:zt(s[8],o)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(r=Ut(bt(i.from),bt(i.to)),i={},i.ms=r.milliseconds,i.M=r.months),n=new Mt(i),St(e)&&c(e,"_locale")&&(n._locale=e._locale),n}function zt(e,t){var o=e&&parseFloat(e.replace(",","."));return(isNaN(o)?0:o)*t}function Yt(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 Ut(e,t){var o;return e.isValid()&&t.isValid()?(t=kt(t,e),e.isBefore(t)?o=Yt(e,t):(o=Yt(t,e),o.milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0}}function Gt(e,t){return function(o,n){var r,i;return null===n||isNaN(+n)||(E(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=Ft(o,n),$t(this,r,e),this}}function $t(t,o,n,r){var i=o._milliseconds,s=Et(o._days),a=Et(o._months);t.isValid()&&(r=null==r||r,i&&t._d.setTime(t._d.valueOf()+i*n),s&&Y(t,"Date",z(t,"Date")+s*n),a&&de(t,z(t,"Month")+a*n),r&&e.updateOffset(t,s||a))}function Kt(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 Xt(t,o){var n=t||bt(),r=kt(n,this).startOf("day"),i=e.calendarFormat(this,r)||"sameElse",s=o&&(O(o[i])?o[i].call(this,n):o[i]);return this.format(s||this.localeData().calendar(i,this,bt(n)))}function qt(){return new y(this)}function Zt(e,t){var o=b(e)?e:bt(e);return!(!this.isValid()||!o.isValid())&&(t=W(w(t)?"millisecond":t),"millisecond"===t?this.valueOf()>o.valueOf():o.valueOf()i&&(t=i),Po.call(this,e,t,o,n,r))}function Po(e,t,o,n,r){var i=Re(e,t,o,n,r),s=Ce(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function No(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Lo(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 Io(e,t){t[cr]=_(1e3*("0."+e))}function Wo(){return this._isUTC?"UTC":""}function jo(){return this._isUTC?"Coordinated Universal Time":""}function Vo(e){return bt(1e3*e)}function Bo(){return bt.apply(null,arguments).parseZone()}function Fo(e){return e}function zo(e,t,o,n){var r=nt(),i=h().set(n,t);return r[o](i,e)}function Yo(e,t,o){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return zo(e,t,o,"month");var n,r=[];for(n=0;n<12;n++)r[n]=zo(e,n,o,"month");return r}function Uo(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=nt(),i=e?r._week.dow:0;if(null!=o)return zo(t,(o+i)%7,n,"day");var s,l=[];for(s=0;s<7;s++)l[s]=zo(t,(s+i)%7,n,"day");return l}function Go(e,t){return Yo(e,t,"months")}function $o(e,t){return Yo(e,t,"monthsShort")}function Ko(e,t,o){return Uo(e,t,o,"weekdays")}function Xo(e,t,o){return Uo(e,t,o,"weekdaysShort")}function qo(e,t,o){return Uo(e,t,o,"weekdaysMin")}function Zo(){var e=this._data;return this._milliseconds=ti(this._milliseconds),this._days=ti(this._days),this._months=ti(this._months),e.milliseconds=ti(e.milliseconds),e.seconds=ti(e.seconds),e.minutes=ti(e.minutes),e.hours=ti(e.hours),e.months=ti(e.months),e.years=ti(e.years),this}function Jo(e,t,o,n){var r=Ft(t,o);return e._milliseconds+=n*r._milliseconds,e._days+=n*r._days,e._months+=n*r._months,e._bubble()}function Qo(e,t){return Jo(this,e,t,1)}function en(e,t){return Jo(this,e,t,-1)}function tn(e){return e<0?Math.floor(e):Math.ceil(e)}function on(){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*tn(rn(a)+s),s=0,a=0),l.milliseconds=i%1e3,e=C(i/1e3),l.seconds=e%60,t=C(e/60),l.minutes=t%60,o=C(t/60),l.hours=o%24,s+=C(o/24),r=C(nn(s)),a+=r,s-=tn(rn(r)),n=C(a/12),a%=12,l.days=s,l.months=a,l.years=n,this}function nn(e){return 4800*e/146097}function rn(e){return 146097*e/4800}function sn(e){var t,o,n=this._milliseconds;if(e=W(e),"month"===e||"year"===e)return t=this._days+n/864e5,o=this._months+nn(t),"month"===e?o:o/12;switch(t=this._days+Math.round(rn(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 an(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function ln(e){return function(){return this.as(e)}}function un(e){return e=W(e),this[e+"s"]()}function cn(e){return function(){return this._data[e]}}function dn(){return C(this.days()/7)}function hn(e,t,o,n,r){return r.relativeTime(t||1,!!o,e,n)}function fn(e,t,o){var n=Ft(e).abs(),r=wi(n.as("s")),i=wi(n.as("m")),s=wi(n.as("h")),a=wi(n.as("d")),l=wi(n.as("M")),u=wi(n.as("y")),c=r0,c[4]=o,hn.apply(null,c)}function pn(e){return void 0===e?wi:"function"==typeof e&&(wi=e,!0)}function gn(e,t){return void 0!==vi[e]&&(void 0===t?vi[e]:(vi[e]=t,!0))}function mn(e){var t=this.localeData(),o=fn(this,!e,t);return e&&(o=t.pastFuture(+this,o)),t.postformat(o)}function wn(){var e,t,o,n=yi(this._milliseconds)/1e3,r=yi(this._days),i=yi(this._months);e=C(n/60),t=C(e/60),n%=60,e%=60,o=C(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 vn,yn;yn=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),o=t.length>>>0,n=0;n68?1900:2e3)};var yr=F("FullYear",!0);K("w",["ww",2],"wo","week"),K("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),V("week",5),V("isoWeek",5),Q("w",Yn),Q("ww",Yn,Vn),Q("W",Yn),Q("WW",Yn,Vn),re(["w","ww","W","WW"],function(e,t,o,n){t[n.substr(0,1)]=_(e)});var br={dow:0,doy:6};K("d",0,"do","day"),K("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),K("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),K("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),K("e",0,0,"weekday"),K("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),Q("d",Yn),Q("e",Yn),Q("E",Yn),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),re(["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}),re(["d","e","E"],function(e,t,o,n){t[n]=_(e)});var Cr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_r="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Mr=tr,Sr=tr,Er=tr;K("H",["HH",2],0,"hour"),K("h",["hh",2],0,Ue),K("k",["kk",2],0,Ge),K("hmm",0,0,function(){return""+Ue.apply(this)+$(this.minutes(),2)}),K("hmmss",0,0,function(){return""+Ue.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)}),K("Hmm",0,0,function(){return""+this.hours()+$(this.minutes(),2)}),K("Hmmss",0,0,function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)}),$e("a",!0),$e("A",!1),I("hour","h"),V("hour",13),Q("a",Ke),Q("A",Ke),Q("H",Yn),Q("h",Yn),Q("HH",Yn,Vn),Q("hh",Yn,Vn),Q("hmm",Un),Q("hmmss",Gn),Q("Hmm",Un),Q("Hmmss",Gn),ne(["H","HH"],ar),ne(["a","A"],function(e,t,o){o._isPm=o._locale.isPM(e),o._meridiem=e}),ne(["h","hh"],function(e,t,o){t[ar]=_(e),p(o).bigHour=!0}),ne("hmm",function(e,t,o){var n=e.length-2;t[ar]=_(e.substr(0,n)),t[lr]=_(e.substr(n)),p(o).bigHour=!0}),ne("hmmss",function(e,t,o){var n=e.length-4,r=e.length-2;t[ar]=_(e.substr(0,n)),t[lr]=_(e.substr(n,2)),t[ur]=_(e.substr(r)),p(o).bigHour=!0}),ne("Hmm",function(e,t,o){var n=e.length-2;t[ar]=_(e.substr(0,n)),t[lr]=_(e.substr(n))}),ne("Hmmss",function(e,t,o){var n=e.length-4,r=e.length-2;t[ar]=_(e.substr(0,n)),t[lr]=_(e.substr(n,2)),t[ur]=_(e.substr(r))});var Or,Tr=/[ap]\.?m?\.?/i,kr=F("Hours",!0),Dr={calendar:On,longDateFormat:Tn,invalidDate:kn,ordinal:Dn,ordinalParse:xn,relativeTime:Hn,months:gr,monthsShort:mr,week:br,weekdays:Cr,weekdaysMin:Rr,weekdaysShort:_r,meridiemParse:Tr},xr={},Hr={},Ar=/^\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)?)?$/,Pr=/^\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)?)?$/,Nr=/Z|[+-]\d\d(?::?\d\d)?/,Lr=[["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}/]],Ir=[["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/]],Wr=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non 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(){};var jr=S("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()}),Br=function(){return Date.now?Date.now():+new Date};Ot("Z",":"),Ot("ZZ",""),Q("Z",Qn),Q("ZZ",Qn),ne(["Z","ZZ"],function(e,t,o){o._useUTC=!0,o._tzm=Tt(Qn,e)});var Fr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var zr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Yr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ft.fn=Mt.prototype;var Ur=Gt(1,"add"),Gr=Gt(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var $r=S("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)});K(0,["gg",2],0,function(){return this.weekYear()%100}),K(0,["GG",2],0,function(){return this.isoWeekYear()%100}),To("gggg","weekYear"),To("ggggg","weekYear"),To("GGGG","isoWeekYear"),To("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),Q("G",Zn),Q("g",Zn),Q("GG",Yn,Vn),Q("gg",Yn,Vn),Q("GGGG",Kn,Fn),Q("gggg",Kn,Fn),Q("GGGGG",Xn,zn),Q("ggggg",Xn,zn),re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,o,n){t[n.substr(0,2)]=_(e)}),re(["gg","GG"],function(t,o,n,r){o[r]=e.parseTwoDigitYear(t)}),K("Q",0,"Qo","quarter"),I("quarter","Q"),V("quarter",7),Q("Q",jn),ne("Q",function(e,t){t[ir]=3*(_(e)-1)}),K("D",["DD",2],"Do","date"),I("date","D"),V("date",9),Q("D",Yn),Q("DD",Yn,Vn),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ne(["D","DD"],sr),ne("Do",function(e,t){t[sr]=_(e.match(Yn)[0],10)});var Kr=F("Date",!0);K("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),V("dayOfYear",4),Q("DDD",$n),Q("DDDD",Bn),ne(["DDD","DDDD"],function(e,t,o){o._dayOfYear=_(e)}),K("m",["mm",2],0,"minute"),I("minute","m"),V("minute",14),Q("m",Yn),Q("mm",Yn,Vn),ne(["m","mm"],lr);var Xr=F("Minutes",!1);K("s",["ss",2],0,"second"),I("second","s"),V("second",15),Q("s",Yn),Q("ss",Yn,Vn),ne(["s","ss"],ur);var qr=F("Seconds",!1);K("S",0,0,function(){return~~(this.millisecond()/100)}),K(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),K(0,["SSS",3],0,"millisecond"),K(0,["SSSS",4],0,function(){return 10*this.millisecond()}),K(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),K(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),K(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),K(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),K(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),V("millisecond",16),Q("S",$n,jn),Q("SS",$n,Vn),Q("SSS",$n,Bn);var Zr;for(Zr="SSSS";Zr.length<=9;Zr+="S")Q(Zr,qn);for(Zr="S";Zr.length<=9;Zr+="S")ne(Zr,Io);var Jr=F("Milliseconds",!1);K("z",0,0,"zoneAbbr"),K("zz",0,0,"zoneName");var Qr=y.prototype;Qr.add=Ur,Qr.calendar=Xt,Qr.clone=qt,Qr.diff=no,Qr.endOf=wo,Qr.format=lo,Qr.from=uo,Qr.fromNow=co,Qr.to=ho,Qr.toNow=fo,Qr.get=U,Qr.invalidAt=Eo,Qr.isAfter=Zt,Qr.isBefore=Jt,Qr.isBetween=Qt,Qr.isSame=eo,Qr.isSameOrAfter=to,Qr.isSameOrBefore=oo,Qr.isValid=Mo,Qr.lang=$r,Qr.locale=po,Qr.localeData=go,Qr.max=Vr,Qr.min=jr,Qr.parsingFlags=So,Qr.set=G,Qr.startOf=mo,Qr.subtract=Gr,Qr.toArray=Co,Qr.toObject=_o,Qr.toDate=bo,Qr.toISOString=so,Qr.inspect=ao,Qr.toJSON=Ro,Qr.toString=io,Qr.unix=yo,Qr.valueOf=vo,Qr.creationData=Oo,Qr.year=yr,Qr.isLeapYear=ye,Qr.weekYear=ko,Qr.isoWeekYear=Do,Qr.quarter=Qr.quarters=No,Qr.month=he,Qr.daysInMonth=fe,Qr.week=Qr.weeks=ke,Qr.isoWeek=Qr.isoWeeks=De,Qr.weeksInYear=Ho,Qr.isoWeeksInYear=xo,Qr.date=Kr,Qr.day=Qr.days=We,Qr.weekday=je,Qr.isoWeekday=Ve,Qr.dayOfYear=Lo,Qr.hour=Qr.hours=kr,Qr.minute=Qr.minutes=Xr,Qr.second=Qr.seconds=qr,Qr.millisecond=Qr.milliseconds=Jr,Qr.utcOffset=xt,Qr.utc=At,Qr.local=Pt,Qr.parseZone=Nt,Qr.hasAlignedHourOffset=Lt,Qr.isDST=It,Qr.isLocal=jt,Qr.isUtcOffset=Vt,Qr.isUtc=Bt,Qr.isUTC=Bt,Qr.zoneAbbr=Wo,Qr.zoneName=jo,Qr.dates=S("dates accessor is deprecated. Use date instead.",Kr),Qr.months=S("months accessor is deprecated. Use month instead",he),Qr.years=S("years accessor is deprecated. Use year instead",yr),Qr.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ht),Qr.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Wt);var ei=D.prototype;ei.calendar=x,ei.longDateFormat=H,ei.invalidDate=A,ei.ordinal=P,ei.preparse=Fo,ei.postformat=Fo,ei.relativeTime=N,ei.pastFuture=L,ei.set=T,ei.months=ae,ei.monthsShort=le,ei.monthsParse=ce,ei.monthsRegex=ge,ei.monthsShortRegex=pe,ei.week=Ee,ei.firstDayOfYear=Te,ei.firstDayOfWeek=Oe,ei.weekdays=Ae,ei.weekdaysMin=Ne,ei.weekdaysShort=Pe,ei.weekdaysParse=Ie,ei.weekdaysRegex=Be,ei.weekdaysShortRegex=Fe,ei.weekdaysMinRegex=ze,ei.isPM=Xe,ei.meridiem=qe,et("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,o=1===_(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+o}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",et),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",nt);var ti=Math.abs,oi=ln("ms"),ni=ln("s"),ri=ln("m"),ii=ln("h"),si=ln("d"),ai=ln("w"),li=ln("M"),ui=ln("y"),ci=cn("milliseconds"),di=cn("seconds"),hi=cn("minutes"),fi=cn("hours"),pi=cn("days"),gi=cn("months"),mi=cn("years"),wi=Math.round,vi={s:45,m:45,h:22,d:26,M:11},yi=Math.abs,bi=Mt.prototype;return bi.abs=Zo,bi.add=Qo,bi.subtract=en,bi.as=sn,bi.asMilliseconds=oi,bi.asSeconds=ni,bi.asMinutes=ri,bi.asHours=ii,bi.asDays=si,bi.asWeeks=ai,bi.asMonths=li,bi.asYears=ui,bi.valueOf=an,bi._bubble=on,bi.get=un,bi.milliseconds=ci,bi.seconds=di,bi.minutes=hi,bi.hours=fi,bi.days=pi,bi.weeks=dn,bi.months=gi,bi.years=mi,bi.humanize=mn,bi.toISOString=wn,bi.toString=wn,bi.toJSON=wn,bi.locale=po,bi.localeData=go,bi.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",wn),bi.lang=$r,K("X",0,0,"unix"),K("x",0,0,"valueOf"),Q("x",Zn),Q("X",er),ne("X",function(e,t,o){o._d=new Date(1e3*parseFloat(e,10))}),ne("x",function(e,t,o){o._d=new Date(_(e))}),e.version="2.17.1",n(bt),e.fn=Qr,e.min=_t,e.max=Rt,e.now=Br,e.utc=h,e.unix=Vo,e.months=Go,e.isDate=l,e.locale=et,e.invalid=m,e.duration=Ft,e.isMoment=b,e.weekdays=Ko,e.parseZone=Bo,e.localeData=nt,e.isDuration=St,e.monthsShort=$o,e.weekdaysMin=qo,e.defineLocale=tt,e.updateLocale=ot,e.locales=rt,e.weekdaysShort=Xo,e.normalizeUnits=W,e.relativeTimeRounding=pn,e.relativeTimeThreshold=gn,e.calendarFormat=Kt,e.prototype=Qr,e})},{}],numbro:[function(t,o,n){/*! + * numbro.js + * version : 1.9.3 + * author : Företagsplatsen AB + * license : MIT + * http://www.foretagsplatsen.se + */ +(function(){"use strict";function n(e){this._value=e}function r(e){var t,o="";for(t=0;t0?c=n+i+r(s-i.length):(a=+n<0?"-0":"0",t>0&&(a+="."),u=r(-1*s-1),l=(u+Math.abs(n)+i).substr(0,t),c=a+l),+s>0&&t>0&&(c+="."+r(t)),c}function s(e,t,o,n){var r,s,a=Math.pow(10,t);return e.toString().indexOf("e")>-1?(s=i(e,t),"-"===s.charAt(0)&&+s>=0&&(s=s.substr(1))):s=(o(e+"e+"+t)/a).toFixed(t),n&&(r=new RegExp("0{1,"+n+"}$"),s=s.replace(r,"")),s}function a(e,t,o){var n,r=t.replace(/\{[^\{\}]*\}/g,"");return n=r.indexOf("$")>-1?u(e,O[k].currency.symbol,t,o):r.indexOf("%")>-1?d(e,t,o):r.indexOf(":")>-1?h(e,t):g(e._value,t,o)}function l(e,t){var o,n,r,i,s,a=t,l=!1;if(t.indexOf(":")>-1)e._value=f(t);else if(t===D)e._value=0;else{for("."!==O[k].delimiters.decimal&&(t=t.replace(/\./g,"").replace(O[k].delimiters.decimal,".")),o=new RegExp("[^a-zA-Z]"+O[k].abbreviations.thousand+"(?:\\)|(\\"+O[k].currency.symbol+")?(?:\\))?)?$"),n=new RegExp("[^a-zA-Z]"+O[k].abbreviations.million+"(?:\\)|(\\"+O[k].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+O[k].abbreviations.billion+"(?:\\)|(\\"+O[k].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+O[k].abbreviations.trillion+"(?:\\)|(\\"+O[k].currency.symbol+")?(?:\\))?)?$"),s=1;s-1?l=Math.pow(1024,s):t.indexOf(M[s])>-1&&(l=Math.pow(1e3,s));var u=t.replace(/[^0-9\.]+/g,"");""===u?e._value=NaN:(e._value=(l?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 u(e,t,o,n){var r,i,s=o,a=s.indexOf("$"),l=s.indexOf("("),u=s.indexOf("+"),c=s.indexOf("-"),d="",h="";if(s.indexOf("$")===-1?"infix"===O[k].currency.position?(h=t,O[k].currency.spaceSeparated&&(h=" "+h+" ")):O[k].currency.spaceSeparated&&(d=" "):s.indexOf(" $")>-1?(d=" ",s=s.replace(" $","")):s.indexOf("$ ")>-1?(d=" ",s=s.replace("$ ","")):s=s.replace("$",""),i=g(e._value,s,n,h),o.indexOf("$")===-1)switch(O[k].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 c(e,t,o,n){return u(e,t,o,n)}function d(e,t,o){var n,r="",i=100*e._value;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),n=g(i,t,o),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,r+"%"),n=n.join("")):n=n+r+"%",n}function h(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 f(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 p(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&&(S=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(f=t.split(".")[0].match(/[0-9]+/g)||["0"],f=parseInt(f[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?(x=" ",t=t.replace(" a","")):t=t.replace("a",""),l=Math.floor(Math.log(j)/Math.LN10)+1,c=l%3,c=0===c?3:c,f&&0!==j&&(u=Math.floor(Math.log(j)/Math.LN10)+1-f,d=3*~~((Math.min(f,l)-c)/3),j/=Math.pow(10,d),t.indexOf(".")===-1&&f>3&&(t+="[.]",b=0===u?0:3*~~(u/3)-u,b=b<0?b+3:b,t+=r(b))),Math.floor(Math.log(Math.abs(e))/Math.LN10)+1!==f&&(j>=Math.pow(10,12)&&!L||N?(x+=O[k].abbreviations.trillion,e/=Math.pow(10,12)):j=Math.pow(10,9)&&!L||P?(x+=O[k].abbreviations.billion,e/=Math.pow(10,9)):j=Math.pow(10,6)&&!L||A?(x+=O[k].abbreviations.million,e/=Math.pow(10,6)):(j=Math.pow(10,3)&&!L||H)&&(x+=O[k].abbreviations.thousand,e/=Math.pow(10,3)))),R=0;R-1){t.indexOf(" "+i.marker)>-1&&(I=" "),t=t.replace(I+i.marker,""),a=p(e,i.suffixes,i.scale),e=a.value,I+=a.suffix;break}if(t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(W=" ",t=t.replace(" o","")):t=t.replace("o",""),O[k].ordinal&&(W+=O[k].ordinal(e))),t.indexOf("[.]")>-1&&(T=!0,t=t.replace("[.]",".")),h=e.toString().split(".")[0],g=t.split(".")[1],v=t.indexOf(","),g){if(g.indexOf("*")!==-1?V=s(e,e.toString().split(".")[1].length,o):g.indexOf("[")>-1?(g=g.replace("]",""),g=g.split("["),V=s(e,g[0].length+g[1].length,o,g[1].length)):V=s(e,g.length,o),h=V.split(".")[0],V.split(".")[1].length){var $=n?x+n:O[k].delimiters.decimal;V=$+V.split(".")[1]}else V="";T&&0===Number(V.slice(1))&&(V="")}else h=s(e,0,o);return h.indexOf("-")>-1&&(h=h.slice(1),F=!0),h.length<_&&(h=r(_-h.length)+h),v>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+O[k].delimiters.thousands)),0===t.indexOf(".")&&(h=""),y=t.indexOf("("),C=t.indexOf("-"),z=y0||"grunt"===process.title||"gulp"===process.title)&&"undefined"!=typeof t}function y(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function b(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var o=y(e),n=y(t);return o>n?o:n},-(1/0))}var C,_="1.9.3",R=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],M=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],S={general:{scale:1024,suffixes:M,marker:"bd"},binary:{scale:1024,suffixes:R,marker:"b"},decimal:{scale:1e3,suffixes:M,marker:"d"}},E=[S.general,S.binary,S.decimal],O={},T=O,k="en-US",D=null,x="0,0",H="0$",A="undefined"!=typeof o&&o.exports,P={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 C.isNumbro(e)?e=e.value():0===e||"undefined"==typeof e?e=0:Number(e)||(e=C.fn.unformat(e)),new n(Number(e))},C.version=_,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;T[o]||(Object.keys(T).forEach(function(e){r||e.split("-")[0]!==n||(r=e)}),o=r||t||"en-US"),w(o)},C.setCulture=function(e,t){var o=e,n=e.split("-")[1],r=null;O[o]||(n&&Object.keys(O).forEach(function(e){r||e.split("-")[1]!==n||(r=e)}),o=r||t||"en-US"),w(o)},C.language=function(e,t){if(console.warn("`language` is deprecated since version 1.6.0. Use `culture` instead"),!e)return k;if(e&&!t){if(!T[e])throw new Error("Unknown language : "+e);w(e)}return!t&&T[e]||m(e,t),C},C.culture=function(e,t){if(!e)return k;if(e&&!t){if(!O[e])throw new Error("Unknown culture : "+e);w(e)}return!t&&O[e]||m(e,t),C},C.languageData=function(e){if(console.warn("`languageData` is deprecated since version 1.6.0. Use `cultureData` instead"),!e)return T[k];if(!T[e])throw new Error("Unknown language : "+e);return T[e]},C.cultureData=function(e){if(!e)return O[k];if(!O[e])throw new Error("Unknown culture : "+e);return O[e]},C.culture("en-US",P),C.languages=function(){return console.warn("`languages` is deprecated since version 1.6.0. Use `cultures` instead"),T},C.cultures=function(){return O},C.zeroFormat=function(e){D="string"==typeof e?e:null},C.defaultFormat=function(e){x="string"==typeof e?e:"0.0"},C.defaultCurrencyFormat=function(e){H="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,u=e.match(/^[^\d\.\,]+/),(null===u||(e=e.substr(1),u[0]===r))&&(u=e.match(/[^\d]+$/),(null===u||(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||"undefined"==typeof 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 a(this,e?e:x,void 0!==t?t:Math.round)},formatCurrency:function(e,t){return u(this,O[k].currency.symbol,e?e:H,void 0!==t?t:Math.round)},formatForeignCurrency:function(e,t,o){return c(this,e,t?t:H,void 0!==o?o:Math.round)},unformat:function(e){if("number"==typeof e)return e;if("string"==typeof e){var t=l(this,e);return isNaN(t)?void 0:t}},binaryByteUnits:function(){return p(this._value,S.binary.suffixes,S.binary.scale).suffix},byteUnits:function(){return p(this._value,S.general.suffixes,S.general.scale).suffix},decimalByteUnits:function(){return p(this._value,S.decimal.suffixes,S.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())}},v()&&C.loadCulturesInNode(),A?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){var t="moment";try{s=e(t)}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(" "+e.className+" ").indexOf(" "+t+" ")!==-1},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),r=Math.ceil(((new Date(o,t,e)-n)/864e5+n.getDay()+1)/7);return''+r+""},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+'
",g+=d.showMonthAfterYear?c+u: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)+"
"},D=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 D.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,s<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,x=1+(C-s),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);D&&(C=0&&($=c(function(){"boolean"!=typeof F.deactivated&&(F.deactivated=!0),F.deactivated===!0&&et.emit({type:"error",name:"flash-deactivated"})},e)),F.overdue=!1,Ae())))):(F.ready=!1,void et.emit({type:"error",name:"browser-unsupported"}))},de=function(){et.clearData(),et.blur(),et.emit("destroy"),Pe(),et.off()},he=function(e,t){var o;if("object"==typeof e&&e&&"undefined"==typeof t)o=e,et.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]&&(U[n]=Ze(o[n]))},fe=function(e){"undefined"==typeof e?(x(U),G=null):"string"==typeof e&&R.call(U,e)&&delete U[e]},pe=function(e){return"undefined"==typeof e?T(U):"string"==typeof e&&R.call(U,e)?U[e]:void 0},ge=function(e){if(e&&1===e.nodeType){i&&(ze(i,ee.activeClass),i!==e&&ze(i,ee.hoverClass)),i=e,Fe(e,ee.hoverClass);var t=e.getAttribute("title")||ee.title;if("string"==typeof t&&t){var o=xe(F.bridge);o&&o.setAttribute("title",t)}var n=ee.forceHandCursor===!0||"pointer"===Ye(e,"cursor");Xe(n),Ke()}},me=function(){var e=xe(F.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),i&&(ze(i,ee.hoverClass),ze(i,ee.activeClass),i=null)},we=function(){return i||null},ve=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},ye=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:F&&F.bridge||null,timeStamp:e.timeStamp||C()||null});var o=X[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:F.version}),"error"===e.type&&(J.test(e.name)&&O(e,{target:null,minimumVersion:z}),Q.test(e.name)&&O(e,{version:F.version}),"flash-insecure"===e.name&&O(e,{pageProtocol:a.location.protocol,swfProtocol:ue()})),"copy"===e.type&&(e.clipboardData={setData:et.setData,clearData:et.clearData}),"aftercopy"===e.type&&(e=Le(e,G)),e.target&&!e.relatedTarget&&(e.relatedTarget=be(e.target)),Ce(e)}},be=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?l.getElementById(t):null},Ce=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:n,r="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:n,i=Ue(t),s=a.screenLeft||a.screenX||0,u=a.screenTop||a.screenY||0,c=l.body.scrollLeft+l.documentElement.scrollLeft,d=l.body.scrollTop+l.documentElement.scrollTop,h=i.left+("number"==typeof e._stageX?e._stageX:0),f=i.top+("number"==typeof e._stageY?e._stageY:0),p=h-c,g=f-d,m=s+p,w=u+g,v="number"==typeof e.movementX?e.movementX:0,y="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,O(e,{srcElement:t,fromElement:o,toElement:r,screenX:m,screenY:w,pageX:h,pageY:f,clientX:p,clientY:g,x:p,y:g,movementX:v,movementY:y,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},_e=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},Re=function(e,t,o,n){n?c(function(){e.apply(t,o)},0):e.apply(t,o)},Me=function(e){if("object"==typeof e&&e&&e.type){var t=_e(e),o=Y["*"]||[],n=Y[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(){et.emit(t)},0)}},Te=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)))}},ke=function(){var e=ee.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),o=ee.swfObjectId+"_fallbackContent";K=h(function(){var e=l.getElementById(o);Ge(e)&&($e(),F.deactivated=null,et.emit({type:"error",name:"swf-not-found"}))},t)}},De=function(){var e=l.createElement("div");return e.id=ee.containerId,e.className=ee.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+qe(ee.zIndex),e},xe=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},He=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},Ae=function(){var e,t=F.bridge,o=xe(t);if(!t){var n=Ve(a.location.host,ee),r="never"===n?"none":"all",i=We(O({jsVersion:et.version},ee)),s=ee.swfPath+Ie(ee.swfPath,ee);B&&(s=He(s)),o=De();var u=l.createElement("div");o.appendChild(u),l.body.appendChild(o);var c=l.createElement("div"),d="activex"===F.pluginType;c.innerHTML='"+(d?'':"")+'
 
',t=c.firstChild,c=null,S(t).ZeroClipboard=et,o.replaceChild(t,u),ke()}return t||(t=l[ee.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&o&&(t=o.firstChild)),F.bridge=t||null,t},Pe=function(){var e=F.bridge;if(e){var t=xe(e);t&&("activex"===F.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))),$e(),F.ready=null,F.bridge=null,F.deactivated=null,F.insecure=null,r=n}},Ne=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}}},Le=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(r.indexOf(t)!==-1)return 1===i&&t===n?"sameDomain":"always"}return"never"}}(),Be=function(){try{return l.activeElement}catch(e){return null}},Fe=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:Ue(e),l="none"!==t.display&&"collapse"!==t.visibility&&(s||!!a&&(o||a.height>0)&&(n||a.width>0)&&(r||a.top>=0)&&(i||a.left>=0));return l},$e=function(){d($),$=0,f(K),K=0},Ke=function(){var e;if(i&&(e=xe(F.bridge))){var t=Ue(i);O(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+qe(ee.zIndex)})}},Xe=function(e){F.ready===!0&&(F.bridge&&"function"==typeof F.bridge.setHandCursor?F.bridge.setHandCursor(e):F.ready=!1)},qe=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||b(e)?"string"==typeof e&&(t=qe(v(e,10))):t=e,"number"==typeof t?t:"auto"},Ze=function(e){var t=/(\r\n|\r|\n)/g;return"string"==typeof e&&ee.fixLineEndings===!0&&(j()?/((^|[^\r])\n|\r([^\n]|$))/.test(e)&&(e=e.replace(t,"\r\n")):/\r/.test(e)&&(e=e.replace(t,"\n"))),e},Je=function(e){var o,n,r,i=F.sandboxed,s=null;if(e=e===!0,V===!1)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 F.sandboxed=s,i===s||e||Qe(m),s},Qe=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("undefined"!=typeof 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}}}}F.disabled=a!==!0,F.outdated=d&&y(d)0,r=!e.target||n&&o.indexOf(e.target)!==-1,i=e.relatedTarget&&n&&o.indexOf(e.relatedTarget)!==-1,s=e.client&&e.client===this;return!(!t||!(r||i||s))},mt=function(e){var t=ot[this.id];if("object"==typeof e&&e&&e.type&&t){var o=_e(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 + +{% endblock %} diff --git a/docs/_source/about.rst b/docs/_source/about.rst new file mode 100644 index 0000000..790b287 --- /dev/null +++ b/docs/_source/about.rst @@ -0,0 +1,5 @@ +===== +About +===== +About tinyparrot. + diff --git a/docs/_source/conf.py b/docs/_source/conf.py new file mode 100644 index 0000000..0e2a988 --- /dev/null +++ b/docs/_source/conf.py @@ -0,0 +1,72 @@ +import sys, os +import sphinx.util.logging + +logger = sphinx.util.logging.getLogger(__name__) + +project = "tinyparrot: tinygrad for Parrot IDE" +copyright = "2024, Jeff Moe" +author = "Jeff Moe" +version = "0" +release = "0.0.0" +extensions = [ + "notfound.extension", + "sphinx.ext.autodoc", + "sphinx.ext.intersphinx", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", + "sphinxcontrib.excel_table", +] +templates_path = ["_templates"] +exclude_patterns = [] +source_suffix = ".rst" +master_doc = "index" +pygments_style = "staroffice" +python_display_short_literal_types = True +todo_include_todos = False +html_show_copyright = False +html_static_path = ["_static"] +html_favicon = "_static/favicon.ico" +html_logo = "_static/logo.png" +html_last_updated_fmt: None +html_show_sphinx = False +html_show_sourcelink = False +html_link_suffix = ".html" +html_theme = "sphinx_rtd_theme" +html_theme_options = { + "style_nav_header_background": "#4fb31f", + "display_version": False, + "prev_next_buttons_location": "bottom", + "collapse_navigation": True, + "sticky_navigation": True, + "navigation_depth": 4, + "includehidden": True, + "titles_only": False, +} + +html_css_files = [ + "custom.css", +] +html_context = { + "display_lower_left": True, +} + +locale_dirs = ["locale/"] +gettext_compact = False +language = "en" +# languages = ('am', 'ar', 'bn', 'de', 'el', 'en', 'eo', 'es', 'eu', 'fil', 'fr', 'he', 'hi', 'id', 'it', 'ja', 'ko', 'mr', 'ms', 'nl', 'pl', 'pt', 'ru', 'see', 'ta', 'te', 'th', 'tr', 'ur', 'vi', 'zh') +languages = "en" +html_search_language = "en" + +latex_engine = "xelatex" +latex_elements = { + "extraclassoptions": "openany,oneside", + "sphinxsetup": "hmargin={1in,1in}, vmargin={1in,1in}", + "inputenc": "", + "utf8extra": "", + "preamble": r""" +\usepackage{xcolor} +\usepackage{polyglossia} + """, +} + +notfound_urls_prefix = "/en/" diff --git a/docs/_source/index.rst b/docs/_source/index.rst new file mode 100644 index 0000000..df7143b --- /dev/null +++ b/docs/_source/index.rst @@ -0,0 +1,12 @@ +========== +tinyparrot +========== +tinygrad deep learning framework for Parrot IDE. + +.. toctree:: + about + install + source + license + :maxdepth: 2 + :caption: Contents: diff --git a/docs/_source/install.rst b/docs/_source/install.rst new file mode 100644 index 0000000..b23143f --- /dev/null +++ b/docs/_source/install.rst @@ -0,0 +1,5 @@ +======= +Install +======= +Install tinyparrot. + diff --git a/docs/_source/license.rst b/docs/_source/license.rst new file mode 100644 index 0000000..34908ba --- /dev/null +++ b/docs/_source/license.rst @@ -0,0 +1,5 @@ +======= +License +======= +tinyparrot is under the MIT license. + diff --git a/docs/_source/source.rst b/docs/_source/source.rst new file mode 100644 index 0000000..966b7f7 --- /dev/null +++ b/docs/_source/source.rst @@ -0,0 +1,7 @@ +=========== +Source Code +=========== +tinyparrot source code: + + ``_ + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..be814c4 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,28 @@ + + + + + + + tinyparrot: tinygrad for Parrot IDE + + + + + + diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6618eff --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,65 @@ +[build-system] + +requires = [ + "setuptools>=45", + "wheel", + "setuptools_scm[toml]>=6.2", +] + +build-backend = "setuptools.build_meta" + +[project] +name = "tinyparrot" +dynamic = ["version"] +authors = [ + {name = "Jeff Moe", email = "moe@parrot.codes"}, +] +description = "tinygrad for parrot." +readme = "README.md" +requires-python = ">=3.9" +keywords = [ + "python", +] +license = {text = "MIT"} +classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] + +dependencies = [ +# CAD dependencies + "pydantic", + "typing_extensions >= 4.4.0, <5", + +# Documentation dependencies + "polib", + "pycountry", + "requests", + "sphinx", + "sphinxcontrib-excel-table", + "sphinxcontrib-markdown", + "sphinx-autobuild", + "sphinx-autodoc-typehints", + "sphinx-intl", + "sphinx-notfound-page", + "sphinx-rtd-theme", +] + +[project.urls] +Homepage = "https://parrot.codes" +Documentation = "https://spacecruft.org/deepcrayon/tinyparrot" +Repository = "https://spacecruft.org/deepcrayon/tinyparrot" +Issues = "https://spacecruft.org/deepcrayon/tinyparrot/issues" +Changelog = "https://spacecruft.org/deepcrayon/tinyparrot/raw/branch/main/CHANGELOG.txt" + + +[tool.setuptools.packages.find] +namespaces = true +where = ["src"] + +[tool.setuptools_scm] +write_to = "src/tinyparrot/_version.py" + +[project.scripts] +tinyparrot = "tinyparrot.tinyparrot_cli:main" +