<div style="width: 45%;float:right;text-align:justify;">
[img [phøtø.jpg]]
</div>
<span style="width: 45%;">
Simon Huber @BurningTreeC
<br><br>made in Italy<br>
living in Innsbruck, Austria:not(.Australia)
<br><br>
contact : hypnotizedkangaroo@gmail.com
<br><br>
<span style="font-size:0.8em;">you can contact me in english, german and italian<br><br>
you can support my coffee needs for development on [[paypal|https://paypal.me/BurningTreeC]]</span>
</span>
{
"require": [
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js",
"$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js",
"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js",
"$:/plugins/tiddlywiki/codemirror/addon/mode/multiplex.js",
"$:/plugins/tiddlywiki/codemirror/mode/css/css.js",
"$:/plugins/tiddlywiki/codemirror/mode/htmlembedded/htmlembedded.js",
"$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js",
"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js",
"$:/plugins/tiddlywiki/codemirror/mode/markdown/markdown.js",
"$:/plugins/tiddlywiki/codemirror/mode/meta.js",
"$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.js",
"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js",
"$:/plugins/tiddlywiki/codemirror/keymap/vim.js",
"$:/plugins/tiddlywiki/codemirror/keymap/emacs.js",
"$:/plugins/tiddlywiki/codemirror/addon/search/search.js",
"$:/plugins/tiddlywiki/codemirror/addon/search/jump-to-line.js"
],
"configuration": {
"cursorBlinkRate": 0,
"matchBrackets": true,
"showCursorWhenSelecting": true
}
}
{
"tiddlers": {
"$:/Acknowledgements": {
"title": "$:/Acknowledgements",
"text": "TiddlyWiki incorporates code from these fine OpenSource projects:\n\n* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]\n* [[The Jasmine JavaScript Test Framework|http://pivotal.github.io/jasmine/]]\n* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]\n\nAnd media from these projects:\n\n* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]\n"
},
"$:/core/copyright.txt": {
"title": "$:/core/copyright.txt",
"type": "text/plain",
"text": "TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\n\nCopyright (c) 2004-2007, Jeremy Ruston\nCopyright (c) 2007-2017, UnaMesa Association\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
},
"$:/core/icon": {
"title": "$:/core/icon",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\"><path d=\"M64 0l54.56 32v64L64 128 9.44 96V32L64 0zm21.127 95.408c-3.578-.103-5.15-.094-6.974-3.152l-1.42.042c-1.653-.075-.964-.04-2.067-.097-1.844-.07-1.548-1.86-1.873-2.8-.52-3.202.687-6.43.65-9.632-.014-1.14-1.593-5.17-2.157-6.61-1.768.34-3.546.406-5.34.497-4.134-.01-8.24-.527-12.317-1.183-.8 3.35-3.16 8.036-1.21 11.44 2.37 3.52 4.03 4.495 6.61 4.707 2.572.212 3.16 3.18 2.53 4.242-.55.73-1.52.864-2.346 1.04l-1.65.08c-1.296-.046-2.455-.404-3.61-.955-1.93-1.097-3.925-3.383-5.406-5.024.345.658.55 1.938.24 2.53-.878 1.27-4.665 1.26-6.4.47-1.97-.89-6.73-7.162-7.468-11.86 1.96-3.78 4.812-7.07 6.255-11.186-3.146-2.05-4.83-5.384-4.61-9.16l.08-.44c-3.097.59-1.49.37-4.82.628-10.608-.032-19.935-7.37-14.68-18.774.34-.673.664-1.287 1.243-.994.466.237.4 1.18.166 2.227-3.005 13.627 11.67 13.732 20.69 11.21.89-.25 2.67-1.936 3.905-2.495 2.016-.91 4.205-1.282 6.376-1.55 5.4-.63 11.893 2.276 15.19 2.37 3.3.096 7.99-.805 10.87-.615 2.09.098 4.143.483 6.16 1.03 1.306-6.49 1.4-11.27 4.492-12.38 1.814.293 3.213 2.818 4.25 4.167 2.112-.086 4.12.46 6.115 1.066 3.61-.522 6.642-2.593 9.833-4.203-3.234 2.69-3.673 7.075-3.303 11.127.138 2.103-.444 4.386-1.164 6.54-1.348 3.507-3.95 7.204-6.97 7.014-1.14-.036-1.805-.695-2.653-1.4-.164 1.427-.81 2.7-1.434 3.96-1.44 2.797-5.203 4.03-8.687 7.016-3.484 2.985 1.114 13.65 2.23 15.594 1.114 1.94 4.226 2.652 3.02 4.406-.37.58-.936.785-1.54 1.01l-.82.11zm-40.097-8.85l.553.14c.694-.27 2.09.15 2.83.353-1.363-1.31-3.417-3.24-4.897-4.46-.485-1.47-.278-2.96-.174-4.46l.02-.123c-.582 1.205-1.322 2.376-1.72 3.645-.465 1.71 2.07 3.557 3.052 4.615l.336.3z\" fill-rule=\"evenodd\"/></svg>"
},
"$:/core/images/advanced-search-button": {
"title": "$:/core/images/advanced-search-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-advanced-search-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M74.5651535,87.9848361 C66.9581537,93.0488876 57.8237115,96 48,96 C21.490332,96 0,74.509668 0,48 C0,21.490332 21.490332,0 48,0 C74.509668,0 96,21.490332 96,48 C96,57.8541369 93.0305793,67.0147285 87.9377231,74.6357895 L122.284919,108.982985 C125.978897,112.676963 125.973757,118.65366 122.284271,122.343146 C118.593975,126.033442 112.613238,126.032921 108.92411,122.343793 L74.5651535,87.9848361 Z M48,80 C65.673112,80 80,65.673112 80,48 C80,30.326888 65.673112,16 48,16 C30.326888,16 16,30.326888 16,48 C16,65.673112 30.326888,80 48,80 Z\"></path>\n <circle cx=\"48\" cy=\"48\" r=\"8\"></circle>\n <circle cx=\"28\" cy=\"48\" r=\"8\"></circle>\n <circle cx=\"68\" cy=\"48\" r=\"8\"></circle>\n </g>\n</svg>"
},
"$:/core/images/auto-height": {
"title": "$:/core/images/auto-height",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-auto-height tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path d=\"M67.9867828,114.356363 L67.9579626,99.8785426 C67.9550688,98.4248183 67.1636987,97.087107 65.8909901,96.3845863 L49.9251455,87.5716209 L47.992126,95.0735397 L79.8995411,95.0735397 C84.1215894,95.0735397 85.4638131,89.3810359 81.686497,87.4948823 L49.7971476,71.5713518 L48.0101917,79.1500092 L79.992126,79.1500092 C84.2093753,79.1500092 85.5558421,73.4676733 81.7869993,71.5753162 L49.805065,55.517008 L48.0101916,63.0917009 L79.9921259,63.0917015 C84.2035118,63.0917016 85.5551434,57.4217887 81.7966702,55.5218807 L65.7625147,47.4166161 L67.9579705,50.9864368 L67.9579705,35.6148245 L77.1715737,44.8284272 C78.7336709,46.3905243 81.2663308,46.3905243 82.8284279,44.8284271 C84.390525,43.2663299 84.390525,40.7336699 82.8284278,39.1715728 L66.8284271,23.1715728 C65.2663299,21.6094757 62.73367,21.6094757 61.1715729,23.1715729 L45.1715729,39.1715729 C43.6094757,40.73367 43.6094757,43.26633 45.1715729,44.8284271 C46.73367,46.3905243 49.26633,46.3905243 50.8284271,44.8284271 L59.9579705,35.6988837 L59.9579705,50.9864368 C59.9579705,52.495201 60.806922,53.8755997 62.1534263,54.5562576 L78.1875818,62.6615223 L79.9921261,55.0917015 L48.0101917,55.0917009 C43.7929424,55.0917008 42.4464755,60.7740368 46.2153183,62.6663939 L78.1972526,78.7247021 L79.992126,71.1500092 L48.0101917,71.1500092 C43.7881433,71.1500092 42.4459197,76.842513 46.2232358,78.7286665 L78.1125852,94.6521971 L79.8995411,87.0735397 L47.992126,87.0735397 C43.8588276,87.0735397 42.4404876,92.5780219 46.0591064,94.5754586 L62.024951,103.388424 L59.9579785,99.8944677 L59.9867142,114.32986 L50.8284271,105.171573 C49.26633,103.609476 46.73367,103.609476 45.1715729,105.171573 C43.6094757,106.73367 43.6094757,109.26633 45.1715729,110.828427 L61.1715729,126.828427 C62.73367,128.390524 65.2663299,128.390524 66.8284271,126.828427 L82.8284278,110.828427 C84.390525,109.26633 84.390525,106.73367 82.8284279,105.171573 C81.2663308,103.609476 78.7336709,103.609476 77.1715737,105.171573 L67.9867828,114.356363 L67.9867828,114.356363 Z M16,20 L112,20 C114.209139,20 116,18.209139 116,16 C116,13.790861 114.209139,12 112,12 L16,12 C13.790861,12 12,13.790861 12,16 C12,18.209139 13.790861,20 16,20 L16,20 Z\"></path>\n</svg>"
},
"$:/core/images/blank": {
"title": "$:/core/images/blank",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-blank tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\"></svg>"
},
"$:/core/images/bold": {
"title": "$:/core/images/bold",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-bold tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M41.1456583,51.8095238 L41.1456583,21.8711485 L67.4985994,21.8711485 C70.0084159,21.8711485 72.4285598,22.0802967 74.7591036,22.4985994 C77.0896475,22.9169022 79.1512515,23.6638602 80.9439776,24.7394958 C82.7367036,25.8151314 84.170863,27.3090474 85.2464986,29.2212885 C86.3221342,31.1335296 86.859944,33.5835518 86.859944,36.5714286 C86.859944,41.9496067 85.2465147,45.8337882 82.0196078,48.2240896 C78.792701,50.614391 74.6694929,51.8095238 69.6498599,51.8095238 L41.1456583,51.8095238 Z M13,0 L13,128 L75.0280112,128 C80.7647346,128 86.3519803,127.28292 91.789916,125.848739 C97.2278517,124.414559 102.068139,122.203563 106.310924,119.215686 C110.553709,116.22781 113.929959,112.373506 116.439776,107.652661 C118.949592,102.931816 120.204482,97.3445701 120.204482,90.8907563 C120.204482,82.8832466 118.262391,76.0411115 114.378151,70.3641457 C110.493911,64.6871798 104.607883,60.7133634 96.719888,58.442577 C102.456611,55.6937304 106.788968,52.1680887 109.717087,47.8655462 C112.645206,43.5630037 114.109244,38.1849062 114.109244,31.7310924 C114.109244,25.7553389 113.123259,20.7357813 111.151261,16.6722689 C109.179262,12.6087565 106.400578,9.35201972 102.815126,6.90196078 C99.2296739,4.45190185 94.927196,2.68908101 89.907563,1.61344538 C84.8879301,0.537809748 79.3305627,0 73.2352941,0 L13,0 Z M41.1456583,106.128852 L41.1456583,70.9915966 L71.8011204,70.9915966 C77.896389,70.9915966 82.7964334,72.3958776 86.5014006,75.2044818 C90.2063677,78.0130859 92.0588235,82.7039821 92.0588235,89.2773109 C92.0588235,92.6237329 91.4911355,95.3725383 90.3557423,97.5238095 C89.2203491,99.6750808 87.6965548,101.378145 85.7843137,102.633053 C83.8720726,103.887961 81.661077,104.784311 79.1512605,105.322129 C76.641444,105.859947 74.0121519,106.128852 71.2633053,106.128852 L41.1456583,106.128852 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/cancel-button": {
"title": "$:/core/images/cancel-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-cancel-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n\t<g fill-rule=\"evenodd\">\n\t <path d=\"M64,76.3137085 L47.0294734,93.2842351 C43.9038742,96.4098343 38.8399231,96.4084656 35.7157288,93.2842712 C32.5978915,90.166434 32.5915506,85.0947409 35.7157649,81.9705266 L52.6862915,65 L35.7157649,48.0294734 C32.5901657,44.9038742 32.5915344,39.8399231 35.7157288,36.7157288 C38.833566,33.5978915 43.9052591,33.5915506 47.0294734,36.7157649 L64,53.6862915 L80.9705266,36.7157649 C84.0961258,33.5901657 89.1600769,33.5915344 92.2842712,36.7157288 C95.4021085,39.833566 95.4084494,44.9052591 92.2842351,48.0294734 L75.3137085,65 L92.2842351,81.9705266 C95.4098343,85.0961258 95.4084656,90.1600769 92.2842712,93.2842712 C89.166434,96.4021085 84.0947409,96.4084494 80.9705266,93.2842351 L64,76.3137085 Z M64,129 C99.346224,129 128,100.346224 128,65 C128,29.653776 99.346224,1 64,1 C28.653776,1 1.13686838e-13,29.653776 1.13686838e-13,65 C1.13686838e-13,100.346224 28.653776,129 64,129 Z M64,113 C90.509668,113 112,91.509668 112,65 C112,38.490332 90.509668,17 64,17 C37.490332,17 16,38.490332 16,65 C16,91.509668 37.490332,113 64,113 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-down": {
"title": "$:/core/images/chevron-down",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-down tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 40.500000) rotate(-270.000000) translate(-64.000000, -40.500000) translate(-22.500000, -26.500000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n\t</g>\n</svg>"
},
"$:/core/images/chevron-left": {
"title": "$:/core/images/chevron-left",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-left tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\" version=\"1.1\">\n <g fill-rule=\"evenodd\" transform=\"translate(92.500000, 64.000000) rotate(-180.000000) translate(-92.500000, -64.000000) translate(6.000000, -3.000000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-right": {
"title": "$:/core/images/chevron-right",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-right tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\" transform=\"translate(-48.000000, -3.000000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n </g>\n</svg>"
},
"$:/core/images/chevron-up": {
"title": "$:/core/images/chevron-up",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-chevron-up tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n\t<g fill-rule=\"evenodd\" transform=\"translate(64.000000, 89.500000) rotate(-90.000000) translate(-64.000000, -89.500000) translate(-22.500000, 22.500000)\">\n <path d=\"M112.743107,112.12741 C111.310627,113.561013 109.331747,114.449239 107.145951,114.449239 L27.9777917,114.449239 C23.6126002,114.449239 20.0618714,110.904826 20.0618714,106.532572 C20.0618714,102.169214 23.6059497,98.6159054 27.9777917,98.6159054 L99.2285381,98.6159054 L99.2285381,27.365159 C99.2285381,22.9999675 102.77295,19.4492387 107.145205,19.4492387 C111.508562,19.4492387 115.061871,22.993317 115.061871,27.365159 L115.061871,106.533318 C115.061871,108.71579 114.175869,110.694669 112.743378,112.127981 Z\" transform=\"translate(67.561871, 66.949239) rotate(-45.000000) translate(-67.561871, -66.949239) \"></path>\n <path d=\"M151.35638,112.12741 C149.923899,113.561013 147.94502,114.449239 145.759224,114.449239 L66.5910645,114.449239 C62.225873,114.449239 58.6751442,110.904826 58.6751442,106.532572 C58.6751442,102.169214 62.2192225,98.6159054 66.5910645,98.6159054 L137.841811,98.6159054 L137.841811,27.365159 C137.841811,22.9999675 141.386223,19.4492387 145.758478,19.4492387 C150.121835,19.4492387 153.675144,22.993317 153.675144,27.365159 L153.675144,106.533318 C153.675144,108.71579 152.789142,110.694669 151.356651,112.127981 Z\" transform=\"translate(106.175144, 66.949239) rotate(-45.000000) translate(-106.175144, -66.949239) \"></path>\n\t</g>\n</svg>"
},
"$:/core/images/clone-button": {
"title": "$:/core/images/clone-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-clone-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M32.2650915,96 L32.2650915,120.002359 C32.2650915,124.419334 35.8432884,128 40.2627323,128 L120.002359,128 C124.419334,128 128,124.421803 128,120.002359 L128,40.2627323 C128,35.8457573 124.421803,32.2650915 120.002359,32.2650915 L96,32.2650915 L96,48 L108.858899,48 C110.519357,48 111.853018,49.3405131 111.853018,50.9941198 L111.853018,108.858899 C111.853018,110.519357 110.512505,111.853018 108.858899,111.853018 L50.9941198,111.853018 C49.333661,111.853018 48,110.512505 48,108.858899 L48,96 L32.2650915,96 Z\"></path>\n <path d=\"M40,56 L32.0070969,56 C27.5881712,56 24,52.418278 24,48 C24,43.5907123 27.5848994,40 32.0070969,40 L40,40 L40,32.0070969 C40,27.5881712 43.581722,24 48,24 C52.4092877,24 56,27.5848994 56,32.0070969 L56,40 L63.9929031,40 C68.4118288,40 72,43.581722 72,48 C72,52.4092877 68.4151006,56 63.9929031,56 L56,56 L56,63.9929031 C56,68.4118288 52.418278,72 48,72 C43.5907123,72 40,68.4151006 40,63.9929031 L40,56 Z M7.9992458,0 C3.58138434,0 0,3.5881049 0,7.9992458 L0,88.0007542 C0,92.4186157 3.5881049,96 7.9992458,96 L88.0007542,96 C92.4186157,96 96,92.4118951 96,88.0007542 L96,7.9992458 C96,3.58138434 92.4118951,0 88.0007542,0 L7.9992458,0 Z M19.0010118,16 C17.3435988,16 16,17.336731 16,19.0010118 L16,76.9989882 C16,78.6564012 17.336731,80 19.0010118,80 L76.9989882,80 C78.6564012,80 80,78.663269 80,76.9989882 L80,19.0010118 C80,17.3435988 78.663269,16 76.9989882,16 L19.0010118,16 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/close-all-button": {
"title": "$:/core/images/close-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-close-all-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\" transform=\"translate(-23.000000, -23.000000)\">\n <path d=\"M43,131 L22.9976794,131 C18.5827987,131 15,127.418278 15,123 C15,118.590712 18.5806831,115 22.9976794,115 L43,115 L43,94.9976794 C43,90.5827987 46.581722,87 51,87 C55.4092877,87 59,90.5806831 59,94.9976794 L59,115 L79.0023206,115 C83.4172013,115 87,118.581722 87,123 C87,127.409288 83.4193169,131 79.0023206,131 L59,131 L59,151.002321 C59,155.417201 55.418278,159 51,159 C46.5907123,159 43,155.419317 43,151.002321 L43,131 Z\" transform=\"translate(51.000000, 123.000000) rotate(-45.000000) translate(-51.000000, -123.000000) \"></path>\n <path d=\"M43,59 L22.9976794,59 C18.5827987,59 15,55.418278 15,51 C15,46.5907123 18.5806831,43 22.9976794,43 L43,43 L43,22.9976794 C43,18.5827987 46.581722,15 51,15 C55.4092877,15 59,18.5806831 59,22.9976794 L59,43 L79.0023206,43 C83.4172013,43 87,46.581722 87,51 C87,55.4092877 83.4193169,59 79.0023206,59 L59,59 L59,79.0023206 C59,83.4172013 55.418278,87 51,87 C46.5907123,87 43,83.4193169 43,79.0023206 L43,59 Z\" transform=\"translate(51.000000, 51.000000) rotate(-45.000000) translate(-51.000000, -51.000000) \"></path>\n <path d=\"M115,59 L94.9976794,59 C90.5827987,59 87,55.418278 87,51 C87,46.5907123 90.5806831,43 94.9976794,43 L115,43 L115,22.9976794 C115,18.5827987 118.581722,15 123,15 C127.409288,15 131,18.5806831 131,22.9976794 L131,43 L151.002321,43 C155.417201,43 159,46.581722 159,51 C159,55.4092877 155.419317,59 151.002321,59 L131,59 L131,79.0023206 C131,83.4172013 127.418278,87 123,87 C118.590712,87 115,83.4193169 115,79.0023206 L115,59 Z\" transform=\"translate(123.000000, 51.000000) rotate(-45.000000) translate(-123.000000, -51.000000) \"></path>\n <path d=\"M115,131 L94.9976794,131 C90.5827987,131 87,127.418278 87,123 C87,118.590712 90.5806831,115 94.9976794,115 L115,115 L115,94.9976794 C115,90.5827987 118.581722,87 123,87 C127.409288,87 131,90.5806831 131,94.9976794 L131,115 L151.002321,115 C155.417201,115 159,118.581722 159,123 C159,127.409288 155.419317,131 151.002321,131 L131,131 L131,151.002321 C131,155.417201 127.418278,159 123,159 C118.590712,159 115,155.419317 115,151.002321 L115,131 Z\" transform=\"translate(123.000000, 123.000000) rotate(-45.000000) translate(-123.000000, -123.000000) \"></path>\n </g>\n</svg>"
},
"$:/core/images/close-button": {
"title": "$:/core/images/close-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M65.0864256,75.4091629 L14.9727349,125.522854 C11.8515951,128.643993 6.78104858,128.64922 3.65685425,125.525026 C0.539017023,122.407189 0.5336324,117.334539 3.65902635,114.209145 L53.7727171,64.0954544 L3.65902635,13.9817637 C0.537886594,10.8606239 0.532659916,5.79007744 3.65685425,2.6658831 C6.77469148,-0.451954124 11.8473409,-0.457338747 14.9727349,2.66805521 L65.0864256,52.7817459 L115.200116,2.66805521 C118.321256,-0.453084553 123.391803,-0.458311231 126.515997,2.6658831 C129.633834,5.78372033 129.639219,10.8563698 126.513825,13.9817637 L76.4001341,64.0954544 L126.513825,114.209145 C129.634965,117.330285 129.640191,122.400831 126.515997,125.525026 C123.39816,128.642863 118.32551,128.648248 115.200116,125.522854 L65.0864256,75.4091629 L65.0864256,75.4091629 Z\"></path>\n </g>\n</svg>\n"
},
"$:/core/images/close-others-button": {
"title": "$:/core/images/close-others-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-close-others-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z M64,96 C81.673112,96 96,81.673112 96,64 C96,46.326888 81.673112,32 64,32 C46.326888,32 32,46.326888 32,64 C32,81.673112 46.326888,96 64,96 Z M64,80 C72.836556,80 80,72.836556 80,64 C80,55.163444 72.836556,48 64,48 C55.163444,48 48,55.163444 48,64 C48,72.836556 55.163444,80 64,80 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/copy-clipboard": {
"title": "$:/core/images/copy-clipboard",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-copy-clipboard tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n\t<g fill-rule=\"evenodd\">\n\t\t<rect x=\"40\" y=\"40\" width=\"33\" height=\"8\" rx=\"4\"></rect>\n\t\t<rect x=\"40\" y=\"82\" width=\"17\" height=\"8\" rx=\"4\"></rect>\n\t\t<rect x=\"40\" y=\"54\" width=\"17\" height=\"8\" rx=\"4\"></rect>\n\t\t<rect x=\"40\" y=\"96\" width=\"33\" height=\"8\" rx=\"4\"></rect>\n\t\t<rect x=\"40\" y=\"68\" width=\"12\" height=\"8\" rx=\"4\"></rect>\n\t\t<path d=\"M40,16 L23.9992458,16 C19.5813843,16 16,19.5907123 16,24 C16,24.0016363 16.0000005,24.0032725 16.0000015,24.0049086 C16.0000005,24.0065441 16,24.0081803 16,24.0098166 L16,119.990183 C16,119.99182 16.0000005,119.993456 16.0000015,119.995092 C16.0000005,119.996727 16,119.998364 16,120 C16,124.409288 19.5813843,128 23.9992458,128 L104.000754,128 C106.205061,128 108.203844,127.105595 109.652065,125.659342 C111.102424,124.21251 112,122.214511 112,120.007595 L112,103.992405 C112,99.5776607 108.418278,96 104,96 C99.5907123,96 96,99.5783218 96,103.992405 L96,112 L32,112 L32,32 L96,32 L96,40.0075946 C96,44.4223393 99.581722,48 104,48 C108.409288,48 112,44.4216782 112,40.0075946 L112,23.9924054 C112,21.7851587 111.104671,19.7871591 109.657101,18.3409203 C108.203844,16.8944047 106.205061,16 104.000754,16 L88,16 C88,11.5907123 84.4151006,8 79.9929031,8 L48.0070969,8 C43.5881712,8 40,11.581722 40,16 Z M44,14.9958262 C44,12.7889923 45.7964248,11 48.0000255,11 L79.9999745,11 C82.2091276,11 84,12.7965212 84,14.9958262 L84,19.0041738 C84,21.2110077 82.2035752,23 79.9999745,23 L48.0000255,23 C45.7908724,23 44,21.2034788 44,19.0041738 L44,14.9958262 Z\"></path>\n\t\t<rect x=\"62\" y=\"64\" width=\"66\" height=\"16\" rx=\"8\"></rect>\n\t\t<path d=\"M60.6568542,85.6568542 L76.6568542,69.6568543 L65.3431458,69.6568542 L81.3431458,85.6568542 C84.4673401,88.7810486 89.5326599,88.7810486 92.6568542,85.6568542 C95.7810486,82.5326599 95.7810486,77.4673401 92.6568542,74.3431458 L76.6568542,58.3431458 C73.5326599,55.2189514 68.4673401,55.2189514 65.3431458,58.3431457 L49.3431458,74.3431457 C46.2189514,77.4673401 46.2189514,82.5326599 49.3431457,85.6568542 C52.4673401,88.7810486 57.5326599,88.7810486 60.6568542,85.6568542 L60.6568542,85.6568542 Z\" transform=\"translate(71.000000, 72.000000) rotate(-90.000000) translate(-71.000000, -72.000000) \"></path>\n\t</g>\n</svg>"
},
"$:/core/images/delete-button": {
"title": "$:/core/images/delete-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-delete-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\" transform=\"translate(12.000000, 0.000000)\">\n <rect x=\"0\" y=\"11\" width=\"105\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"28\" y=\"0\" width=\"48\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"8\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"8\" y=\"112\" width=\"88\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"80\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"56\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n <rect x=\"32\" y=\"16\" width=\"16\" height=\"112\" rx=\"8\"></rect>\n </g>\n</svg>"
},
"$:/core/images/done-button": {
"title": "$:/core/images/done-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-done-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M3.52445141,76.8322939 C2.07397484,75.3828178 1.17514421,73.3795385 1.17514421,71.1666288 L1.17514421,23.1836596 C1.17514421,18.7531992 4.75686621,15.1751442 9.17514421,15.1751442 C13.5844319,15.1751442 17.1751442,18.7606787 17.1751442,23.1836596 L17.1751442,63.1751442 L119.173716,63.1751442 C123.590457,63.1751442 127.175144,66.7568662 127.175144,71.1751442 C127.175144,75.5844319 123.592783,79.1751442 119.173716,79.1751442 L9.17657227,79.1751442 C6.96796403,79.1751442 4.9674142,78.279521 3.51911285,76.8315312 Z\" id=\"Rectangle-285\" transform=\"translate(64.175144, 47.175144) rotate(-45.000000) translate(-64.175144, -47.175144) \"></path>\n </g>\n</svg>"
},
"$:/core/images/down-arrow": {
"title": "$:/core/images/down-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-down-arrow tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <path d=\"M109.35638,81.3533152 C107.923899,82.7869182 105.94502,83.6751442 103.759224,83.6751442 L24.5910645,83.6751442 C20.225873,83.6751442 16.6751442,80.1307318 16.6751442,75.7584775 C16.6751442,71.3951199 20.2192225,67.8418109 24.5910645,67.8418109 L95.8418109,67.8418109 L95.8418109,-3.40893546 C95.8418109,-7.77412698 99.3862233,-11.3248558 103.758478,-11.3248558 C108.121835,-11.3248558 111.675144,-7.78077754 111.675144,-3.40893546 L111.675144,75.7592239 C111.675144,77.9416955 110.789142,79.9205745 109.356651,81.3538862 Z\" transform=\"translate(64.175144, 36.175144) rotate(45.000000) translate(-64.175144, -36.175144) \"></path>\n</svg>"
},
"$:/core/images/download-button": {
"title": "$:/core/images/download-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-download-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path class=\"tc-image-download-button-ring\" d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"/><path d=\"M34.3496823,66.4308767 L61.2415823,93.634668 C63.0411536,95.4551107 65.9588502,95.4551107 67.7584215,93.634668 L94.6503215,66.4308767 C96.4498928,64.610434 96.4498928,61.6588981 94.6503215,59.8384554 C93.7861334,58.9642445 92.6140473,58.4731195 91.3919019,58.4731195 L82.9324098,58.4731195 C80.3874318,58.4731195 78.3243078,56.3860674 78.3243078,53.8115729 L78.3243078,38.6615466 C78.3243078,36.0870521 76.2611837,34 73.7162058,34 L55.283798,34 C52.7388201,34 50.675696,36.0870521 50.675696,38.6615466 L50.675696,38.6615466 L50.675696,53.8115729 C50.675696,56.3860674 48.612572,58.4731195 46.0675941,58.4731195 L37.608102,58.4731195 C35.063124,58.4731195 33,60.5601716 33,63.134666 C33,64.3709859 33.4854943,65.5566658 34.3496823,66.4308767 L34.3496823,66.4308767 Z\"/></g></svg>"
},
"$:/core/images/edit-button": {
"title": "$:/core/images/edit-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-edit-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M116.870058,45.3431458 L108.870058,45.3431458 L108.870058,45.3431458 L108.870058,61.3431458 L116.870058,61.3431458 L116.870058,45.3431458 Z M124.870058,45.3431458 L127.649881,45.3431458 C132.066101,45.3431458 135.656854,48.9248678 135.656854,53.3431458 C135.656854,57.7524334 132.07201,61.3431458 127.649881,61.3431458 L124.870058,61.3431458 L124.870058,45.3431458 Z M100.870058,45.3431458 L15.6638275,45.3431458 C15.5064377,45.3431458 15.3501085,45.3476943 15.1949638,45.3566664 L15.1949638,45.3566664 C15.0628002,45.3477039 14.928279,45.3431458 14.7913977,45.3431458 C6.68160973,45.3431458 -8.34314575,53.3431458 -8.34314575,53.3431458 C-8.34314575,53.3431458 6.85614548,61.3431458 14.7913977,61.3431458 C14.9266533,61.3431458 15.0596543,61.3384973 15.190398,61.3293588 C15.3470529,61.3385075 15.5049057,61.3431458 15.6638275,61.3431458 L100.870058,61.3431458 L100.870058,45.3431458 L100.870058,45.3431458 Z\" transform=\"translate(63.656854, 53.343146) rotate(-45.000000) translate(-63.656854, -53.343146) \"></path>\n <path d=\"M35.1714596,124.189544 C41.9594858,123.613403 49.068777,121.917633 58.85987,118.842282 C60.6854386,118.268877 62.4306907,117.705515 65.1957709,116.802278 C81.1962861,111.575575 87.0734839,109.994907 93.9414474,109.655721 C102.29855,109.242993 107.795169,111.785371 111.520478,118.355045 C112.610163,120.276732 115.051363,120.951203 116.97305,119.861518 C118.894737,118.771832 119.569207,116.330633 118.479522,114.408946 C113.146151,105.003414 104.734907,101.112919 93.5468356,101.66546 C85.6716631,102.054388 79.4899908,103.716944 62.7116783,109.197722 C59.9734132,110.092199 58.2519873,110.64787 56.4625698,111.20992 C37.002649,117.322218 25.6914684,118.282267 16.8654804,112.957098 C14.9739614,111.815848 12.5154166,112.424061 11.3741667,114.31558 C10.2329168,116.207099 10.84113,118.665644 12.7326489,119.806894 C19.0655164,123.627836 26.4866335,124.926678 35.1714596,124.189544 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/erase": {
"title": "$:/core/images/erase",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-erase tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M60.0870401,127.996166 L123.102318,64.980888 C129.636723,58.4464827 129.629513,47.8655877 123.098967,41.3350425 L99.4657866,17.7018617 C92.927448,11.1635231 82.3486358,11.1698163 75.8199411,17.698511 L4.89768189,88.6207702 C-1.63672343,95.1551755 -1.6295126,105.736071 4.90103262,112.266616 L20.6305829,127.996166 L60.0870401,127.996166 Z M25.1375576,120.682546 L10.812569,106.357558 C7.5455063,103.090495 7.54523836,97.793808 10.8048093,94.5342371 L46.2691086,59.0699377 L81.7308914,94.5317205 L55.5800654,120.682546 L25.1375576,120.682546 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/excise": {
"title": "$:/core/images/excise",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-excise tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M56,107.313709 L53.6568542,109.656854 C50.5326599,112.781049 45.4673401,112.781049 42.3431457,109.656854 C39.2189514,106.53266 39.2189514,101.46734 42.3431458,98.3431457 L58.3431458,82.3431457 C61.4673401,79.2189514 66.5326599,79.2189514 69.6568542,82.3431458 L85.6568542,98.3431458 C88.7810486,101.46734 88.7810486,106.53266 85.6568542,109.656854 C82.5326599,112.781049 77.4673401,112.781049 74.3431458,109.656854 L72,107.313708 L72,121.597798 C72,125.133636 68.418278,128 64,128 C59.581722,128 56,125.133636 56,121.597798 L56,107.313709 Z M0,40.0070969 C0,35.5848994 3.59071231,32 8,32 C12.418278,32 16,35.5881712 16,40.0070969 L16,71.9929031 C16,76.4151006 12.4092877,80 8,80 C3.581722,80 0,76.4118288 0,71.9929031 L0,40.0070969 Z M32,40.0070969 C32,35.5848994 35.5907123,32 40,32 C44.418278,32 48,35.5881712 48,40.0070969 L48,71.9929031 C48,76.4151006 44.4092877,80 40,80 C35.581722,80 32,76.4118288 32,71.9929031 L32,40.0070969 Z M80,40.0070969 C80,35.5848994 83.5907123,32 88,32 C92.418278,32 96,35.5881712 96,40.0070969 L96,71.9929031 C96,76.4151006 92.4092877,80 88,80 C83.581722,80 80,76.4118288 80,71.9929031 L80,40.0070969 Z M56,8.00709688 C56,3.58489938 59.5907123,0 64,0 C68.418278,0 72,3.58817117 72,8.00709688 L72,39.9929031 C72,44.4151006 68.4092877,48 64,48 C59.581722,48 56,44.4118288 56,39.9929031 L56,8.00709688 Z M112,40.0070969 C112,35.5848994 115.590712,32 120,32 C124.418278,32 128,35.5881712 128,40.0070969 L128,71.9929031 C128,76.4151006 124.409288,80 120,80 C115.581722,80 112,76.4118288 112,71.9929031 L112,40.0070969 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/export-button": {
"title": "$:/core/images/export-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-export-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00348646,127.999999 C8.00464867,128 8.00581094,128 8.00697327,128 L119.993027,128 C122.205254,128 124.207939,127.101378 125.657096,125.651198 L125.656838,125.65759 C127.104563,124.210109 128,122.21009 128,119.999949 L128,56.0000511 C128,51.5817449 124.409288,48 120,48 C115.581722,48 112,51.5797863 112,56.0000511 L112,112 L16,112 L16,56.0000511 C16,51.5817449 12.4092877,48 8,48 C3.581722,48 7.10542736e-15,51.5797863 7.10542736e-15,56.0000511 L7.10542736e-15,119.999949 C7.10542736e-15,124.418255 3.59071231,128 8,128 C8.00116233,128 8.0023246,128 8.00348681,127.999999 Z M56.6235633,27.3113724 L47.6580188,36.2769169 C44.5333664,39.4015692 39.4634864,39.4061295 36.339292,36.2819351 C33.2214548,33.1640979 33.2173444,28.0901742 36.3443103,24.9632084 L58.9616908,2.34582788 C60.5248533,0.782665335 62.5748436,0.000361191261 64.624516,2.38225238e-14 L64.6193616,0.00151809229 C66.6695374,0.000796251595 68.7211167,0.781508799 70.2854358,2.34582788 L92.9028163,24.9632084 C96.0274686,28.0878607 96.0320289,33.1577408 92.9078345,36.2819351 C89.7899973,39.3997724 84.7160736,39.4038827 81.5891078,36.2769169 L72.6235633,27.3113724 L72.6235633,88.5669606 C72.6235633,92.9781015 69.0418413,96.5662064 64.6235633,96.5662064 C60.2142756,96.5662064 56.6235633,92.984822 56.6235633,88.5669606 L56.6235633,27.3113724 L56.6235633,27.3113724 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/file": {
"title": "$:/core/images/file",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-file tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M111.96811,30.5 L112,30.5 L112,119.999079 C112,124.417866 108.419113,128 104.000754,128 L23.9992458,128 C19.5813843,128 16,124.417687 16,119.999079 L16,8.00092105 C16,3.58213437 19.5808867,0 23.9992458,0 L81,0 L81,0.0201838424 C83.1589869,-0.071534047 85.3482153,0.707077645 86.9982489,2.35711116 L109.625176,24.9840387 C111.151676,26.510538 111.932942,28.4998414 111.96811,30.5 L111.96811,30.5 Z M81,8 L24,8 L24,120 L104,120 L104,30.5 L89.0003461,30.5 C84.5818769,30.5 81,26.9216269 81,22.4996539 L81,8 Z\"></path>\n <rect x=\"32\" y=\"36\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"52\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"68\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"84\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"100\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"20\" width=\"40\" height=\"8\" rx=\"4\"></rect>\n </g>\n</svg>"
},
"$:/core/images/fixed-height": {
"title": "$:/core/images/fixed-height",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fixed-height tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M60,35.6568542 L50.8284271,44.8284271 C49.26633,46.3905243 46.73367,46.3905243 45.1715729,44.8284271 C43.6094757,43.26633 43.6094757,40.73367 45.1715729,39.1715729 L61.1715729,23.1715729 C62.73367,21.6094757 65.2663299,21.6094757 66.8284271,23.1715728 L82.8284278,39.1715728 C84.390525,40.7336699 84.390525,43.2663299 82.8284279,44.8284271 C81.2663308,46.3905243 78.7336709,46.3905243 77.1715737,44.8284272 L68,35.6568539 L68,93.3431461 L77.1715737,84.1715728 C78.7336709,82.6094757 81.2663308,82.6094757 82.8284279,84.1715729 C84.390525,85.7336701 84.390525,88.2663301 82.8284278,89.8284272 L66.8284271,105.828427 C65.2663299,107.390524 62.73367,107.390524 61.1715729,105.828427 L45.1715729,89.8284271 C43.6094757,88.26633 43.6094757,85.73367 45.1715729,84.1715729 C46.73367,82.6094757 49.26633,82.6094757 50.8284271,84.1715729 L60,93.3431458 L60,35.6568542 L60,35.6568542 Z M16,116 L112,116 C114.209139,116 116,114.209139 116,112 C116,109.790861 114.209139,108 112,108 L16,108 C13.790861,108 12,109.790861 12,112 C12,114.209139 13.790861,116 16,116 L16,116 Z M16,20 L112,20 C114.209139,20 116,18.209139 116,16 C116,13.790861 114.209139,12 112,12 L16,12 C13.790861,12 12,13.790861 12,16 C12,18.209139 13.790861,20 16,20 L16,20 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/fold-all-button": {
"title": "$:/core/images/fold-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold-all tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"64\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M64.0292774,58.6235628 C61.9791013,58.6242848 59.9275217,57.8435723 58.3632024,56.279253 L35.7458219,33.6618725 C32.6211696,30.5372202 32.6166093,25.4673401 35.7408036,22.3431458 C38.8586409,19.2253085 43.9325646,19.2211982 47.0595304,22.348164 L64.0250749,39.3137085 L80.9906194,22.348164 C84.1152717,19.2235117 89.1851518,19.2189514 92.3093461,22.3431458 C95.4271834,25.460983 95.4312937,30.5349067 92.3043279,33.6618725 L69.6869474,56.279253 C68.1237851,57.8424153 66.0737951,58.6247195 64.0241231,58.6250809 Z\" transform=\"translate(64.024316, 39.313708) scale(1, -1) translate(-64.024316, -39.313708) \"></path>\n <path d=\"M64.0292774,123.621227 C61.9791013,123.621949 59.9275217,122.841236 58.3632024,121.276917 L35.7458219,98.6595365 C32.6211696,95.5348842 32.6166093,90.4650041 35.7408036,87.3408098 C38.8586409,84.2229725 43.9325646,84.2188622 47.0595304,87.345828 L64.0250749,104.311373 L80.9906194,87.345828 C84.1152717,84.2211757 89.1851518,84.2166154 92.3093461,87.3408098 C95.4271834,90.458647 95.4312937,95.5325707 92.3043279,98.6595365 L69.6869474,121.276917 C68.1237851,122.840079 66.0737951,123.622383 64.0241231,123.622745 Z\" transform=\"translate(64.024316, 104.311372) scale(1, -1) translate(-64.024316, -104.311372) \"></path>\n </g>\n</svg>"
},
"$:/core/images/fold-button": {
"title": "$:/core/images/fold-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M64.0292774,63.6235628 C61.9791013,63.6242848 59.9275217,62.8435723 58.3632024,61.279253 L35.7458219,38.6618725 C32.6211696,35.5372202 32.6166093,30.4673401 35.7408036,27.3431458 C38.8586409,24.2253085 43.9325646,24.2211982 47.0595304,27.348164 L64.0250749,44.3137085 L80.9906194,27.348164 C84.1152717,24.2235117 89.1851518,24.2189514 92.3093461,27.3431458 C95.4271834,30.460983 95.4312937,35.5349067 92.3043279,38.6618725 L69.6869474,61.279253 C68.1237851,62.8424153 66.0737951,63.6247195 64.0241231,63.6250809 Z\" transform=\"translate(64.024316, 44.313708) scale(1, -1) translate(-64.024316, -44.313708) \"></path>\n <path d=\"M64.0049614,105.998482 C61.9547853,105.999204 59.9032057,105.218491 58.3388864,103.654172 L35.7215059,81.0367916 C32.5968535,77.9121393 32.5922933,72.8422592 35.7164876,69.7180649 C38.8343248,66.6002276 43.9082485,66.5961173 47.0352144,69.7230831 L64.0007589,86.6886276 L80.9663034,69.7230831 C84.0909557,66.5984308 89.1608358,66.5938705 92.2850301,69.7180649 C95.4028673,72.8359021 95.4069777,77.9098258 92.2800119,81.0367916 L69.6626314,103.654172 C68.099469,105.217334 66.0494791,105.999639 63.999807,106 Z\" transform=\"translate(64.000000, 86.688628) scale(1, -1) translate(-64.000000, -86.688628) \"></path>\n </g>\n</svg>"
},
"$:/core/images/fold-others-button": {
"title": "$:/core/images/fold-others-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-fold-others tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"56.0314331\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M101.657101,104.948818 C100.207918,103.498614 98.2051847,102.599976 95.9929031,102.599976 L72,102.599976 L72,78.6070725 C72,76.3964271 71.1036108,74.3936927 69.6545293,72.9441002 L69.6571005,72.9488183 C68.2079177,71.4986143 66.2051847,70.5999756 63.9929031,70.5999756 L32.0070969,70.5999756 C27.5881712,70.5999756 24,74.1816976 24,78.5999756 C24,83.0092633 27.5848994,86.5999756 32.0070969,86.5999756 L56,86.5999756 L56,110.592879 C56,112.803524 56.8963895,114.806259 58.3454713,116.255852 L58.3429,116.251133 C59.7920828,117.701337 61.7948156,118.599976 64.0070969,118.599976 L88,118.599976 L88,142.592879 C88,147.011804 91.581722,150.599976 96,150.599976 C100.409288,150.599976 104,147.015076 104,142.592879 L104,110.607072 C104,108.396427 103.103611,106.393693 101.654529,104.9441 Z\" transform=\"translate(64.000000, 110.599976) rotate(-45.000000) translate(-64.000000, -110.599976) \"></path>\n <path d=\"M101.725643,11.7488671 C100.27646,10.2986632 98.2737272,9.40002441 96.0614456,9.40002441 L72.0685425,9.40002441 L72.0685425,-14.5928787 C72.0685425,-16.8035241 71.1721533,-18.8062584 69.7230718,-20.255851 L69.725643,-20.2511329 C68.2764602,-21.7013368 66.2737272,-22.5999756 64.0614456,-22.5999756 L32.0756394,-22.5999756 C27.6567137,-22.5999756 24.0685425,-19.0182536 24.0685425,-14.5999756 C24.0685425,-10.1906879 27.6534419,-6.59997559 32.0756394,-6.59997559 L56.0685425,-6.59997559 L56.0685425,17.3929275 C56.0685425,19.6035732 56.964932,21.6063078 58.4140138,23.0559004 L58.4114425,23.0511823 C59.8606253,24.5013859 61.8633581,25.4000244 64.0756394,25.4000244 L88.0685425,25.4000244 L88.0685425,49.3929275 C88.0685425,53.8118532 91.6502645,57.4000244 96.0685425,57.4000244 C100.47783,57.4000244 104.068542,53.815125 104.068542,49.3929275 L104.068542,17.4071213 C104.068542,15.1964759 103.172153,13.1937416 101.723072,11.744149 Z\" transform=\"translate(64.068542, 17.400024) scale(1, -1) rotate(-45.000000) translate(-64.068542, -17.400024) \"></path>\n </g>\n</svg>"
},
"$:/core/images/folder": {
"title": "$:/core/images/folder",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-folder tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M55.6943257,128.000004 L7.99859666,128.000004 C3.5810937,128.000004 0,124.413822 0,119.996384 L0,48.0036243 C0,43.5833471 3.58387508,40.0000044 7.99859666,40.0000044 L16,40.0000044 L16,31.9999914 C16,27.5817181 19.5783731,24 24.0003461,24 L55.9996539,24 C60.4181231,24 64,27.5800761 64,31.9999914 L64,40.0000044 L104.001403,40.0000044 C108.418906,40.0000044 112,43.5861868 112,48.0036243 L112,59.8298353 L104,59.7475921 L104,51.9994189 C104,49.7887607 102.207895,48.0000044 99.9972215,48.0000044 L56,48.0000044 L56,36.0000255 C56,33.7898932 54.2072328,32 51.9957423,32 L28.0042577,32 C25.7890275,32 24,33.7908724 24,36.0000255 L24,48.0000044 L12.0027785,48.0000044 C9.78987688,48.0000044 8,49.7906032 8,51.9994189 L8,116.00059 C8,118.211248 9.79210499,120.000004 12.0027785,120.000004 L58.7630167,120.000004 L55.6943257,128.000004 L55.6943257,128.000004 Z\"></path>\n <path d=\"M23.8728955,55.5 L119.875702,55.5 C124.293205,55.5 126.87957,59.5532655 125.650111,64.5630007 L112.305967,118.936999 C111.077582,123.942356 106.497904,128 102.083183,128 L6.08037597,128 C1.66287302,128 -0.923492342,123.946735 0.305967145,118.936999 L13.650111,64.5630007 C14.878496,59.5576436 19.4581739,55.5 23.8728955,55.5 L23.8728955,55.5 L23.8728955,55.5 Z M25.6530124,64 L113.647455,64 C115.858129,64 117.151473,66.0930612 116.538306,68.6662267 L105.417772,115.333773 C104.803671,117.910859 102.515967,120 100.303066,120 L12.3086228,120 C10.0979492,120 8.8046054,117.906939 9.41777189,115.333773 L20.5383062,68.6662267 C21.1524069,66.0891409 23.4401107,64 25.6530124,64 L25.6530124,64 L25.6530124,64 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/full-screen-button": {
"title": "$:/core/images/full-screen-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-full-screen-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g>\n <g>\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(104.000000, 104.000000) rotate(-180.000000) translate(-104.000000, -104.000000) translate(80.000000, 80.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(24.000000, 104.000000) rotate(-90.000000) translate(-24.000000, -104.000000) translate(0.000000, 80.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n <g transform=\"translate(104.000000, 24.000000) rotate(90.000000) translate(-104.000000, -24.000000) translate(80.000000, 0.000000)\">\n <path d=\"M5.29777586e-31,8 C1.59060409e-15,3.581722 3.581722,0 8,0 L40,0 C44.418278,0 48,3.581722 48,8 C48,12.418278 44.418278,16 40,16 L16,16 L16,40 C16,44.418278 12.418278,48 8,48 C3.581722,48 -3.55271368e-15,44.418278 0,40 L3.55271368e-15,8 Z\"></path>\n </g>\n </g>\n</svg>"
},
"$:/core/images/github": {
"title": "$:/core/images/github",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-github tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M63.9383506,1.60695328 C28.6017227,1.60695328 -0.055756057,30.2970814 -0.055756057,65.6906208 C-0.055756057,94.003092 18.2804728,118.019715 43.7123154,126.493393 C46.9143781,127.083482 48.0812647,125.104717 48.0812647,123.405261 C48.0812647,121.886765 48.02626,117.85449 47.9948287,112.508284 C30.1929317,116.379268 26.4368926,103.916587 26.4368926,103.916587 C23.5255693,96.5129372 19.3294921,94.5420399 19.3294921,94.5420399 C13.5186324,90.5687739 19.7695302,90.6474524 19.7695302,90.6474524 C26.1933001,91.099854 29.5721638,97.2525155 29.5721638,97.2525155 C35.2808718,107.044059 44.5531024,104.215566 48.1991321,102.575118 C48.7806109,98.4366275 50.4346826,95.612068 52.2616263,94.0109598 C38.0507543,92.3941159 23.1091047,86.8944862 23.1091047,62.3389152 C23.1091047,55.3443933 25.6039634,49.6205298 29.6978889,45.1437211 C29.0378318,43.5229433 26.8415704,37.0044266 30.3265147,28.1845627 C30.3265147,28.1845627 35.6973364,26.4615028 47.9241083,34.7542205 C53.027764,33.330139 58.5046663,32.6220321 63.9462084,32.5944947 C69.3838216,32.6220321 74.856795,33.330139 79.9683085,34.7542205 C92.1872225,26.4615028 97.5501864,28.1845627 97.5501864,28.1845627 C101.042989,37.0044266 98.8467271,43.5229433 98.190599,45.1437211 C102.292382,49.6205298 104.767596,55.3443933 104.767596,62.3389152 C104.767596,86.9574291 89.8023734,92.3744463 75.5482834,93.9598188 C77.8427675,95.9385839 79.8897303,99.8489072 79.8897303,105.828476 C79.8897303,114.392635 79.8111521,121.304544 79.8111521,123.405261 C79.8111521,125.120453 80.966252,127.114954 84.2115327,126.489459 C109.623731,117.996111 127.944244,93.9952241 127.944244,65.6906208 C127.944244,30.2970814 99.2867652,1.60695328 63.9383506,1.60695328\"></path>\n </g>\n </svg>\n"
},
"$:/core/images/globe": {
"title": "$:/core/images/globe",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-globe tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M72.8111354,37.1275855 C72.8111354,37.9789875 72.8111354,38.8303894 72.8111354,39.6817913 C72.8111354,41.8784743 73.7885604,46.5631866 72.8111354,48.5143758 C71.3445471,51.4420595 68.1617327,52.0543531 66.4170946,54.3812641 C65.2352215,55.9575873 61.7987417,64.9821523 62.7262858,67.3005778 C66.6959269,77.2228204 74.26087,70.4881886 80.6887657,76.594328 C81.5527211,77.415037 83.5758191,78.8666631 83.985137,79.8899578 C87.2742852,88.1128283 76.4086873,94.8989524 87.7419325,106.189751 C88.9872885,107.430443 91.555495,102.372895 91.8205061,101.575869 C92.6726866,99.0129203 98.5458765,96.1267309 100.908882,94.5234439 C102.928056,93.1534443 105.782168,91.8557166 107.236936,89.7775886 C109.507391,86.5342557 108.717505,82.2640435 110.334606,79.0328716 C112.473794,74.7585014 114.163418,69.3979002 116.332726,65.0674086 C120.230862,57.2857361 121.054075,67.1596684 121.400359,67.5059523 C121.757734,67.8633269 122.411167,67.5059523 122.916571,67.5059523 C123.011132,67.5059523 124.364019,67.6048489 124.432783,67.5059523 C125.0832,66.5705216 123.390209,49.5852316 123.114531,48.2089091 C121.710578,41.1996597 116.17083,32.4278331 111.249523,27.7092761 C104.975994,21.6942076 104.160516,11.5121686 92.9912146,12.7547535 C92.7872931,12.7774397 87.906794,22.9027026 85.2136766,26.2672064 C81.486311,30.9237934 82.7434931,22.1144904 78.6876623,22.1144904 C78.6065806,22.1144904 77.5045497,22.0107615 77.4353971,22.1144904 C76.8488637,22.9942905 75.9952305,26.0101404 75.1288269,26.5311533 C74.8635477,26.6906793 73.4071369,26.2924966 73.2826811,26.5311533 C71.0401728,30.8313939 81.5394677,28.7427264 79.075427,34.482926 C76.7225098,39.9642538 72.747373,32.4860199 72.747373,43.0434079\"></path>\n <path d=\"M44.4668556,7.01044608 C54.151517,13.1403033 45.1489715,19.2084878 47.1611905,23.2253896 C48.8157833,26.5283781 51.4021933,28.6198851 48.8753629,33.038878 C46.8123257,36.6467763 42.0052989,37.0050492 39.251679,39.7621111 C36.2115749,42.8060154 33.7884281,48.7028116 32.4624592,52.6732691 C30.8452419,57.5158356 47.0088721,59.5388126 44.5246867,63.6811917 C43.1386839,65.9923513 37.7785192,65.1466282 36.0880227,63.8791519 C34.9234453,63.0059918 32.4946425,63.3331166 31.6713597,62.0997342 C29.0575851,58.1839669 29.4107339,54.0758543 28.0457962,49.9707786 C27.1076833,47.1493864 21.732611,47.8501656 20.2022714,49.3776393 C19.6790362,49.8998948 19.8723378,51.1703278 19.8723378,51.8829111 C19.8723378,57.1682405 26.9914913,55.1986414 26.9914913,58.3421973 C26.9914913,72.9792302 30.9191897,64.8771867 38.1313873,69.6793121 C48.1678018,76.3618966 45.9763926,76.981595 53.0777543,84.0829567 C56.7511941,87.7563965 60.8192437,87.7689005 62.503478,93.3767069 C64.1046972,98.7081071 53.1759798,98.7157031 50.786754,100.825053 C49.663965,101.816317 47.9736094,104.970571 46.5680513,105.439676 C44.7757187,106.037867 43.334221,105.93607 41.6242359,107.219093 C39.1967302,109.040481 37.7241465,112.151588 37.6034934,112.030935 C35.4555278,109.88297 34.0848666,96.5511248 33.7147244,93.7726273 C33.1258872,89.3524817 28.1241923,88.2337027 26.7275443,84.7420826 C25.1572737,80.8164061 28.2518481,75.223612 25.599097,70.9819941 C19.0797019,60.557804 13.7775712,56.4811506 10.2493953,44.6896152 C9.3074899,41.5416683 13.5912267,38.1609942 15.1264825,35.8570308 C17.0029359,33.0410312 17.7876232,30.0028946 19.8723378,27.2224065 C22.146793,24.1888519 40.8551166,9.46076832 43.8574051,8.63490613 L44.4668556,7.01044608 Z\"></path>\n <path d=\"M64,126 C98.2416545,126 126,98.2416545 126,64 C126,29.7583455 98.2416545,2 64,2 C29.7583455,2 2,29.7583455 2,64 C2,98.2416545 29.7583455,126 64,126 Z M64,120 C94.927946,120 120,94.927946 120,64 C120,33.072054 94.927946,8 64,8 C33.072054,8 8,33.072054 8,64 C8,94.927946 33.072054,120 64,120 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-1": {
"title": "$:/core/images/heading-1",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-1 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M14,30 L27.25,30 L27.25,60.104 L61.7,60.104 L61.7,30 L74.95,30 L74.95,105.684 L61.7,105.684 L61.7,71.552 L27.25,71.552 L27.25,105.684 L14,105.684 L14,30 Z M84.3350766,43.78 C86.8790893,43.78 89.3523979,43.5680021 91.7550766,43.144 C94.1577553,42.7199979 96.3307336,42.0133383 98.2740766,41.024 C100.21742,40.0346617 101.87807,38.7626744 103.256077,37.208 C104.634084,35.6533256 105.535075,33.7453446 105.959077,31.484 L115.817077,31.484 L115.817077,105.684 L102.567077,105.684 L102.567077,53.32 L84.3350766,53.32 L84.3350766,43.78 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-2": {
"title": "$:/core/images/heading-2",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-2 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M125.519077,105.684 L74.8510766,105.684 C74.9217436,99.5359693 76.4057288,94.1653563 79.3030766,89.572 C82.2004244,84.9786437 86.1577182,80.986017 91.1750766,77.594 C93.5777553,75.8273245 96.0863969,74.113675 98.7010766,72.453 C101.315756,70.792325 103.718399,69.0080095 105.909077,67.1 C108.099754,65.1919905 109.901736,63.1250111 111.315077,60.899 C112.728417,58.6729889 113.47041,56.1113478 113.541077,53.214 C113.541077,51.8713266 113.382078,50.4403409 113.064077,48.921 C112.746075,47.4016591 112.127748,45.9883399 111.209077,44.681 C110.290405,43.3736601 109.018418,42.2783377 107.393077,41.395 C105.767735,40.5116622 103.647756,40.07 101.033077,40.07 C98.6303979,40.07 96.6340846,40.5469952 95.0440766,41.501 C93.4540687,42.4550048 92.1820814,43.762325 91.2280766,45.423 C90.2740719,47.083675 89.5674123,49.0446554 89.1080766,51.306 C88.648741,53.5673446 88.3837436,56.0053203 88.3130766,58.62 L76.2290766,58.62 C76.2290766,54.5213128 76.7767378,50.7230175 77.8720766,47.225 C78.9674154,43.7269825 80.610399,40.7060127 82.8010766,38.162 C84.9917542,35.6179873 87.6593942,33.6216739 90.8040766,32.173 C93.948759,30.7243261 97.6057224,30 101.775077,30 C106.297766,30 110.078395,30.7419926 113.117077,32.226 C116.155758,33.7100074 118.611401,35.5826554 120.484077,37.844 C122.356753,40.1053446 123.681739,42.5609868 124.459077,45.211 C125.236414,47.8610133 125.625077,50.3873213 125.625077,52.79 C125.625077,55.7580148 125.165748,58.4433213 124.247077,60.846 C123.328405,63.2486787 122.091751,65.4569899 120.537077,67.471 C118.982402,69.4850101 117.215753,71.3399915 115.237077,73.036 C113.2584,74.7320085 111.209087,76.3219926 109.089077,77.806 C106.969066,79.2900074 104.849087,80.7033266 102.729077,82.046 C100.609066,83.3886734 98.6480856,84.7313266 96.8460766,86.074 C95.0440676,87.4166734 93.47175,88.8123261 92.1290766,90.261 C90.7864032,91.7096739 89.8677458,93.2466585 89.3730766,94.872 L125.519077,94.872 L125.519077,105.684 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-3": {
"title": "$:/core/images/heading-3",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-3 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M94.8850766,62.224 C96.8637532,62.294667 98.8424001,62.1533351 100.821077,61.8 C102.799753,61.4466649 104.566402,60.8283378 106.121077,59.945 C107.675751,59.0616623 108.930072,57.8426744 109.884077,56.288 C110.838081,54.7333256 111.315077,52.8253446 111.315077,50.564 C111.315077,47.3839841 110.237421,44.8400095 108.082077,42.932 C105.926733,41.0239905 103.153094,40.07 99.7610766,40.07 C97.641066,40.07 95.8037511,40.4939958 94.2490766,41.342 C92.6944022,42.1900042 91.4047484,43.3383261 90.3800766,44.787 C89.3554048,46.2356739 88.5957458,47.860991 88.1010766,49.663 C87.6064075,51.465009 87.3944096,53.3199905 87.4650766,55.228 L75.3810766,55.228 C75.5224107,51.623982 76.1937373,48.2850154 77.3950766,45.211 C78.596416,42.1369846 80.2393995,39.4693446 82.3240766,37.208 C84.4087537,34.9466554 86.9350618,33.1800064 89.9030766,31.908 C92.8710915,30.6359936 96.2277246,30 99.9730766,30 C102.870424,30 105.714729,30.4239958 108.506077,31.272 C111.297424,32.1200042 113.806065,33.3566585 116.032077,34.982 C118.258088,36.6073415 120.042403,38.6743208 121.385077,41.183 C122.72775,43.6916792 123.399077,46.5713171 123.399077,49.822 C123.399077,53.5673521 122.551085,56.8356527 120.855077,59.627 C119.159068,62.4183473 116.509095,64.4499936 112.905077,65.722 L112.905077,65.934 C117.145098,66.7820042 120.448731,68.8843166 122.816077,72.241 C125.183422,75.5976835 126.367077,79.6786426 126.367077,84.484 C126.367077,88.017351 125.660417,91.1796527 124.247077,93.971 C122.833736,96.7623473 120.925755,99.129657 118.523077,101.073 C116.120398,103.016343 113.329093,104.517995 110.149077,105.578 C106.969061,106.638005 103.612428,107.168 100.079077,107.168 C95.7683884,107.168 92.005426,106.549673 88.7900766,105.313 C85.5747272,104.076327 82.8894207,102.327345 80.7340766,100.066 C78.5787325,97.8046554 76.9357489,95.0840159 75.8050766,91.904 C74.6744043,88.7239841 74.0737436,85.1906861 74.0030766,81.304 L86.0870766,81.304 C85.9457426,85.8266893 87.0587315,89.5896517 89.4260766,92.593 C91.7934218,95.5963483 95.3443863,97.098 100.079077,97.098 C104.107097,97.098 107.481396,95.9496782 110.202077,93.653 C112.922757,91.3563219 114.283077,88.0880212 114.283077,83.848 C114.283077,80.9506522 113.717749,78.6540085 112.587077,76.958 C111.456404,75.2619915 109.972419,73.9723378 108.135077,73.089 C106.297734,72.2056623 104.230755,71.6580011 101.934077,71.446 C99.6373985,71.2339989 97.2877553,71.163333 94.8850766,71.234 L94.8850766,62.224 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-4": {
"title": "$:/core/images/heading-4",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-4 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8,30 L21.25,30 L21.25,60.104 L55.7,60.104 L55.7,30 L68.95,30 L68.95,105.684 L55.7,105.684 L55.7,71.552 L21.25,71.552 L21.25,105.684 L8,105.684 L8,30 Z M84.5890766,78.548 L107.061077,78.548 L107.061077,45.9 L106.849077,45.9 L84.5890766,78.548 Z M128.049077,88.088 L118.509077,88.088 L118.509077,105.684 L107.061077,105.684 L107.061077,88.088 L75.2610766,88.088 L75.2610766,76.11 L107.061077,31.484 L118.509077,31.484 L118.509077,78.548 L128.049077,78.548 L128.049077,88.088 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-5": {
"title": "$:/core/images/heading-5",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-5 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M83.7550766,31.484 L122.127077,31.484 L122.127077,42.296 L92.7650766,42.296 L88.9490766,61.164 L89.1610766,61.376 C90.7864181,59.5386575 92.8533974,58.1430048 95.3620766,57.189 C97.8707558,56.2349952 100.361731,55.758 102.835077,55.758 C106.509762,55.758 109.795729,56.3763272 112.693077,57.613 C115.590424,58.8496729 118.0284,60.5809889 120.007077,62.807 C121.985753,65.0330111 123.487405,67.6653181 124.512077,70.704 C125.536748,73.7426819 126.049077,77.028649 126.049077,80.562 C126.049077,83.5300148 125.572081,86.5863176 124.618077,89.731 C123.664072,92.8756824 122.144754,95.7376538 120.060077,98.317 C117.9754,100.896346 115.30776,103.016325 112.057077,104.677 C108.806394,106.337675 104.919766,107.168 100.397077,107.168 C96.7930586,107.168 93.454092,106.691005 90.3800766,105.737 C87.3060613,104.782995 84.6030883,103.35201 82.2710766,101.444 C79.939065,99.5359905 78.0840835,97.1863473 76.7060766,94.395 C75.3280697,91.6036527 74.5684107,88.3353521 74.4270766,84.59 L86.5110766,84.59 C86.8644117,88.6180201 88.2423979,91.7096559 90.6450766,93.865 C93.0477553,96.0203441 96.2277235,97.098 100.185077,97.098 C102.729089,97.098 104.884401,96.6740042 106.651077,95.826 C108.417752,94.9779958 109.848738,93.8120074 110.944077,92.328 C112.039415,90.8439926 112.816741,89.1126766 113.276077,87.134 C113.735412,85.1553234 113.965077,83.0353446 113.965077,80.774 C113.965077,78.7246564 113.682413,76.763676 113.117077,74.891 C112.55174,73.018324 111.703749,71.3753404 110.573077,69.962 C109.442404,68.5486596 107.976086,67.4180042 106.174077,66.57 C104.372068,65.7219958 102.269755,65.298 99.8670766,65.298 C97.3230639,65.298 94.9380878,65.7749952 92.7120766,66.729 C90.4860655,67.6830048 88.8784149,69.4673203 87.8890766,72.082 L75.8050766,72.082 L83.7550766,31.484 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/heading-6": {
"title": "$:/core/images/heading-6",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-heading-6 tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M6,30 L19.25,30 L19.25,60.104 L53.7,60.104 L53.7,30 L66.95,30 L66.95,105.684 L53.7,105.684 L53.7,71.552 L19.25,71.552 L19.25,105.684 L6,105.684 L6,30 Z M112.587077,50.246 C112.304409,47.2073181 111.226753,44.751676 109.354077,42.879 C107.481401,41.006324 104.955093,40.07 101.775077,40.07 C99.584399,40.07 97.6940846,40.4763293 96.1040766,41.289 C94.5140687,42.1016707 93.1714154,43.1793266 92.0760766,44.522 C90.9807378,45.8646734 90.0974133,47.401658 89.4260766,49.133 C88.7547399,50.864342 88.2070787,52.6839905 87.7830766,54.592 C87.3590745,56.5000095 87.0587442,58.390324 86.8820766,60.263 C86.7054091,62.135676 86.5464107,63.8846585 86.4050766,65.51 L86.6170766,65.722 C88.2424181,62.7539852 90.4860623,60.5456739 93.3480766,59.097 C96.2100909,57.6483261 99.3017267,56.924 102.623077,56.924 C106.297762,56.924 109.583729,57.5599936 112.481077,58.832 C115.378424,60.1040064 117.834067,61.8529889 119.848077,64.079 C121.862087,66.3050111 123.399071,68.9373181 124.459077,71.976 C125.519082,75.0146819 126.049077,78.300649 126.049077,81.834 C126.049077,85.438018 125.466082,88.7769846 124.300077,91.851 C123.134071,94.9250154 121.455754,97.6103219 119.265077,99.907 C117.074399,102.203678 114.459758,103.987994 111.421077,105.26 C108.382395,106.532006 105.025762,107.168 101.351077,107.168 C95.9097161,107.168 91.4400941,106.16101 87.9420766,104.147 C84.4440591,102.13299 81.6880867,99.3770175 79.6740766,95.879 C77.6600666,92.3809825 76.2644138,88.2823568 75.4870766,83.583 C74.7097394,78.8836432 74.3210766,73.8133605 74.3210766,68.372 C74.3210766,63.9199777 74.7980719,59.4326893 75.7520766,54.91 C76.7060814,50.3873107 78.278399,46.2710186 80.4690766,42.561 C82.6597542,38.8509815 85.5393921,35.8300117 89.1080766,33.498 C92.6767611,31.1659883 97.0757171,30 102.305077,30 C105.273091,30 108.064397,30.4946617 110.679077,31.484 C113.293756,32.4733383 115.608067,33.8513245 117.622077,35.618 C119.636087,37.3846755 121.27907,39.5046543 122.551077,41.978 C123.823083,44.4513457 124.529743,47.2073181 124.671077,50.246 L112.587077,50.246 Z M100.927077,97.098 C103.117754,97.098 105.025735,96.6563378 106.651077,95.773 C108.276418,94.8896623 109.636738,93.7413404 110.732077,92.328 C111.827415,90.9146596 112.640074,89.271676 113.170077,87.399 C113.700079,85.526324 113.965077,83.6006766 113.965077,81.622 C113.965077,79.6433234 113.700079,77.7353425 113.170077,75.898 C112.640074,74.0606575 111.827415,72.4530069 110.732077,71.075 C109.636738,69.6969931 108.276418,68.5840042 106.651077,67.736 C105.025735,66.8879958 103.117754,66.464 100.927077,66.464 C98.736399,66.464 96.8107516,66.8703293 95.1500766,67.683 C93.4894017,68.4956707 92.0937489,69.5909931 90.9630766,70.969 C89.8324043,72.3470069 88.9844128,73.9546575 88.4190766,75.792 C87.8537405,77.6293425 87.5710766,79.5726564 87.5710766,81.622 C87.5710766,83.6713436 87.8537405,85.6146575 88.4190766,87.452 C88.9844128,89.2893425 89.8324043,90.9323261 90.9630766,92.381 C92.0937489,93.8296739 93.4894017,94.9779958 95.1500766,95.826 C96.8107516,96.6740042 98.736399,97.098 100.927077,97.098 L100.927077,97.098 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/help": {
"title": "$:/core/images/help",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-help tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M36.0548906,111.44117 C30.8157418,115.837088 20.8865444,118.803477 9.5,118.803477 C7.86465619,118.803477 6.25937294,118.742289 4.69372699,118.624467 C12.612543,115.984876 18.7559465,110.02454 21.0611049,102.609942 C8.74739781,92.845129 1.04940554,78.9359851 1.04940554,63.5 C1.04940554,33.9527659 29.2554663,10 64.0494055,10 C98.8433448,10 127.049406,33.9527659 127.049406,63.5 C127.049406,93.0472341 98.8433448,117 64.0494055,117 C53.9936953,117 44.48824,114.999337 36.0548906,111.44117 L36.0548906,111.44117 Z M71.4042554,77.5980086 C71.406883,77.2865764 71.4095079,76.9382011 71.4119569,76.5610548 C71.4199751,75.3262169 71.4242825,74.0811293 71.422912,72.9158546 C71.4215244,71.736154 71.4143321,70.709635 71.4001396,69.8743525 C71.4078362,68.5173028 71.9951951,67.7870427 75.1273009,65.6385471 C75.2388969,65.5619968 76.2124091,64.8981068 76.5126553,64.6910879 C79.6062455,62.5580654 81.5345849,60.9050204 83.2750652,58.5038955 C85.6146327,55.2762841 86.8327108,51.426982 86.8327108,46.8554323 C86.8327108,33.5625756 76.972994,24.9029551 65.3778484,24.9029551 C54.2752771,24.9029551 42.8794554,34.5115163 41.3121702,47.1975534 C40.9043016,50.4989536 43.2499725,53.50591 46.5513726,53.9137786 C49.8527728,54.3216471 52.8597292,51.9759763 53.2675978,48.6745761 C54.0739246,42.1479456 60.2395837,36.9492759 65.3778484,36.9492759 C70.6427674,36.9492759 74.78639,40.5885487 74.78639,46.8554323 C74.78639,50.4892974 73.6853224,52.008304 69.6746221,54.7736715 C69.4052605,54.9593956 68.448509,55.6118556 68.3131127,55.7047319 C65.6309785,57.5445655 64.0858213,58.803255 62.6123358,60.6352315 C60.5044618,63.2559399 59.3714208,66.3518252 59.3547527,69.9487679 C59.3684999,70.8407274 59.3752803,71.8084521 59.3765995,72.9300232 C59.3779294,74.0607297 59.3737237,75.2764258 59.36589,76.482835 C59.3634936,76.8518793 59.3609272,77.1924914 59.3583633,77.4963784 C59.3568319,77.6778944 59.3556368,77.8074256 59.3549845,77.8730928 C59.3219814,81.1994287 61.9917551,83.9227111 65.318091,83.9557142 C68.644427,83.9887173 71.3677093,81.3189435 71.4007124,77.9926076 C71.4014444,77.9187458 71.402672,77.7856841 71.4042554,77.5980086 Z M65.3778489,102.097045 C69.5359735,102.097045 72.9067994,98.7262189 72.9067994,94.5680944 C72.9067994,90.4099698 69.5359735,87.0391439 65.3778489,87.0391439 C61.2197243,87.0391439 57.8488984,90.4099698 57.8488984,94.5680944 C57.8488984,98.7262189 61.2197243,102.097045 65.3778489,102.097045 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/home-button": {
"title": "$:/core/images/home-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-home-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M112.9847,119.501583 C112.99485,119.336814 113,119.170705 113,119.003406 L113,67.56802 C116.137461,70.5156358 121.076014,70.4518569 124.133985,67.3938855 C127.25818,64.2696912 127.260618,59.2068102 124.131541,56.0777326 L70.3963143,2.34250601 C68.8331348,0.779326498 66.7828947,-0.000743167069 64.7337457,1.61675364e-05 C62.691312,-0.00409949529 60.6426632,0.777559815 59.077717,2.34250601 L33,28.420223 L33,28.420223 L33,8.00697327 C33,3.58484404 29.4092877,0 25,0 C20.581722,0 17,3.59075293 17,8.00697327 L17,44.420223 L5.3424904,56.0777326 C2.21694607,59.2032769 2.22220878,64.2760483 5.34004601,67.3938855 C8.46424034,70.5180798 13.5271213,70.5205187 16.6561989,67.3914411 L17,67.04764 L17,119.993027 C17,119.994189 17.0000002,119.995351 17.0000007,119.996514 C17.0000002,119.997675 17,119.998838 17,120 C17,124.418278 20.5881049,128 24.9992458,128 L105.000754,128 C109.418616,128 113,124.409288 113,120 C113,119.832611 112.99485,119.666422 112.9847,119.501583 Z M97,112 L97,51.5736087 L97,51.5736087 L64.7370156,19.3106244 L33,51.04764 L33,112 L97,112 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/import-button": {
"title": "$:/core/images/import-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-import-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M105.449437,94.2138951 C105.449437,94.2138951 110.049457,94.1897106 110.049457,99.4026111 C110.049457,104.615512 105.163246,104.615511 105.163246,104.615511 L45.0075072,105.157833 C45.0075072,105.157833 0.367531803,106.289842 0.367532368,66.6449212 C0.367532934,27.0000003 45.0428249,27.0000003 45.0428249,27.0000003 L105.532495,27.0000003 C105.532495,27.0000003 138.996741,25.6734987 138.996741,55.1771866 C138.996741,84.6808745 105.727102,82.8457535 105.727102,82.8457535 L56.1735087,82.8457535 C56.1735087,82.8457535 22.6899229,85.1500223 22.6899229,66.0913753 C22.6899229,47.0327282 56.1735087,49.3383013 56.1735087,49.3383013 L105.727102,49.3383013 C105.727102,49.3383013 111.245209,49.3383024 111.245209,54.8231115 C111.245209,60.3079206 105.727102,60.5074524 105.727102,60.5074524 L56.1735087,60.5074524 C56.1735087,60.5074524 37.48913,60.5074528 37.48913,66.6449195 C37.48913,72.7823862 56.1735087,71.6766023 56.1735087,71.6766023 L105.727102,71.6766029 C105.727102,71.6766029 127.835546,73.1411469 127.835546,55.1771866 C127.835546,35.5304025 105.727102,38.3035317 105.727102,38.3035317 L45.0428249,38.3035317 C45.0428249,38.3035317 11.5287276,38.3035313 11.5287276,66.6449208 C11.5287276,94.9863103 45.0428244,93.9579678 45.0428244,93.9579678 L105.449437,94.2138951 Z\" transform=\"translate(69.367532, 66.000000) rotate(-45.000000) translate(-69.367532, -66.000000) \"></path>\n </g>\n</svg>"
},
"$:/core/images/info-button": {
"title": "$:/core/images/info-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-info-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <g transform=\"translate(0.049406, 0.000000)\">\n <path d=\"M64,128 C99.346224,128 128,99.346224 128,64 C128,28.653776 99.346224,0 64,0 C28.653776,0 0,28.653776 0,64 C0,99.346224 28.653776,128 64,128 Z M64,112 C90.509668,112 112,90.509668 112,64 C112,37.490332 90.509668,16 64,16 C37.490332,16 16,37.490332 16,64 C16,90.509668 37.490332,112 64,112 Z\"></path>\n <circle cx=\"64\" cy=\"32\" r=\"8\"></circle>\n <rect x=\"56\" y=\"48\" width=\"16\" height=\"56\" rx=\"8\"></rect>\n </g>\n </g>\n</svg>"
},
"$:/core/images/italic": {
"title": "$:/core/images/italic",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-italic tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <polygon points=\"66.7114846 0 89.1204482 0 62.4089636 128 40 128\"></polygon>\n </g>\n</svg>"
},
"$:/core/images/left-arrow": {
"title": "$:/core/images/left-arrow",
"created": "20150315234410875",
"modified": "20150315235324760",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-left-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path transform=\"rotate(135, 63.8945, 64.1752)\" d=\"m109.07576,109.35336c-1.43248,1.43361 -3.41136,2.32182 -5.59717,2.32182l-79.16816,0c-4.36519,0 -7.91592,-3.5444 -7.91592,-7.91666c0,-4.36337 3.54408,-7.91667 7.91592,-7.91667l71.25075,0l0,-71.25075c0,-4.3652 3.54442,-7.91592 7.91667,-7.91592c4.36336,0 7.91667,3.54408 7.91667,7.91592l0,79.16815c0,2.1825 -0.88602,4.16136 -2.3185,5.59467l-0.00027,-0.00056z\"/>\n</svg>\n"
},
"$:/core/images/line-width": {
"title": "$:/core/images/line-width",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-line-width tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M128,-97 L112.992786,-97 C112.452362,-97 112,-96.5522847 112,-96 C112,-95.4438648 112.444486,-95 112.992786,-95 L128,-95 L128,-97 Z M128,-78.6794919 L111.216185,-88.3696322 C110.748163,-88.6398444 110.132549,-88.4782926 109.856406,-88 C109.578339,-87.5183728 109.741342,-86.9117318 110.216185,-86.6375814 L128,-76.3700908 L128,-78.6794919 Z M78.6794919,-128 L88.3696322,-111.216185 C88.6437826,-110.741342 88.4816272,-110.134474 88,-109.856406 C87.5217074,-109.580264 86.9077936,-109.748163 86.6375814,-110.216185 L76.3700908,-128 L78.6794919,-128 Z M97,-128 L97,-112.992786 C97,-112.444486 96.5561352,-112 96,-112 C95.4477153,-112 95,-112.452362 95,-112.992786 L95,-128 L97,-128 Z M115.629909,-128 L105.362419,-110.216185 C105.088268,-109.741342 104.481627,-109.578339 104,-109.856406 C103.521707,-110.132549 103.360156,-110.748163 103.630368,-111.216185 L113.320508,-128 L115.629909,-128 Z M128,-113.320508 L111.216185,-103.630368 C110.741342,-103.356217 110.134474,-103.518373 109.856406,-104 C109.580264,-104.478293 109.748163,-105.092206 110.216185,-105.362419 L128,-115.629909 L128,-113.320508 Z M48,-96 C48,-96.5522847 48.4523621,-97 48.9927864,-97 L79.0072136,-97 C79.5555144,-97 80,-96.5561352 80,-96 C80,-95.4477153 79.5476379,-95 79.0072136,-95 L48.9927864,-95 C48.4444856,-95 48,-95.4438648 48,-96 Z M54.4307806,-120 C54.706923,-120.478293 55.3225377,-120.639844 55.7905589,-120.369632 L81.7838153,-105.362419 C82.2586577,-105.088268 82.4216611,-104.481627 82.1435935,-104 C81.8674512,-103.521707 81.2518365,-103.360156 80.7838153,-103.630368 L54.7905589,-118.637581 C54.3157165,-118.911732 54.152713,-119.518373 54.4307806,-120 Z M104,-82.1435935 C104.478293,-82.4197359 105.092206,-82.2518365 105.362419,-81.7838153 L120.369632,-55.7905589 C120.643783,-55.3157165 120.481627,-54.7088482 120,-54.4307806 C119.521707,-54.1546382 118.907794,-54.3225377 118.637581,-54.7905589 L103.630368,-80.7838153 C103.356217,-81.2586577 103.518373,-81.865526 104,-82.1435935 Z M96,-80 C96.5522847,-80 97,-79.5476379 97,-79.0072136 L97,-48.9927864 C97,-48.4444856 96.5561352,-48 96,-48 C95.4477153,-48 95,-48.4523621 95,-48.9927864 L95,-79.0072136 C95,-79.5555144 95.4438648,-80 96,-80 Z M88,-82.1435935 C88.4782926,-81.8674512 88.6398444,-81.2518365 88.3696322,-80.7838153 L73.3624186,-54.7905589 C73.0882682,-54.3157165 72.4816272,-54.152713 72,-54.4307806 C71.5217074,-54.706923 71.3601556,-55.3225377 71.6303678,-55.7905589 L86.6375814,-81.7838153 C86.9117318,-82.2586577 87.5183728,-82.4216611 88,-82.1435935 Z M82.1435935,-88 C82.4197359,-87.5217074 82.2518365,-86.9077936 81.7838153,-86.6375814 L55.7905589,-71.6303678 C55.3157165,-71.3562174 54.7088482,-71.5183728 54.4307806,-72 C54.1546382,-72.4782926 54.3225377,-73.0922064 54.7905589,-73.3624186 L80.7838153,-88.3696322 C81.2586577,-88.6437826 81.865526,-88.4816272 82.1435935,-88 Z M1.30626177e-08,-41.9868843 L15.0170091,-57.9923909 L20.7983821,-52.9749272 L44.7207091,-81.2095939 L73.4260467,-42.1002685 L85.984793,-56.6159488 L104.48741,-34.0310661 L127.969109,-47.4978019 L127.969109,7.99473128e-07 L1.30626177e-08,7.99473128e-07 L1.30626177e-08,-41.9868843 Z M96,-84 C102.627417,-84 108,-89.372583 108,-96 C108,-102.627417 102.627417,-108 96,-108 C89.372583,-108 84,-102.627417 84,-96 C84,-89.372583 89.372583,-84 96,-84 Z\"></path>\n <path d=\"M16,18 L112,18 C113.104569,18 114,17.1045695 114,16 C114,14.8954305 113.104569,14 112,14 L16,14 C14.8954305,14 14,14.8954305 14,16 C14,17.1045695 14.8954305,18 16,18 L16,18 Z M16,35 L112,35 C114.209139,35 116,33.209139 116,31 C116,28.790861 114.209139,27 112,27 L16,27 C13.790861,27 12,28.790861 12,31 C12,33.209139 13.790861,35 16,35 L16,35 Z M16,56 L112,56 C115.313708,56 118,53.3137085 118,50 C118,46.6862915 115.313708,44 112,44 L16,44 C12.6862915,44 10,46.6862915 10,50 C10,53.3137085 12.6862915,56 16,56 L16,56 Z M16,85 L112,85 C117.522847,85 122,80.5228475 122,75 C122,69.4771525 117.522847,65 112,65 L16,65 C10.4771525,65 6,69.4771525 6,75 C6,80.5228475 10.4771525,85 16,85 L16,85 Z M16,128 L112,128 C120.836556,128 128,120.836556 128,112 C128,103.163444 120.836556,96 112,96 L16,96 C7.163444,96 0,103.163444 0,112 C0,120.836556 7.163444,128 16,128 L16,128 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/link": {
"title": "$:/core/images/link",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-link tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M128.719999,57.568543 C130.219553,53.8628171 131.045202,49.8121445 131.045202,45.5685425 C131.045202,27.8915447 116.718329,13.5685425 99.0452364,13.5685425 L67.0451674,13.5685425 C49.3655063,13.5685425 35.0452019,27.8954305 35.0452019,45.5685425 C35.0452019,63.2455403 49.3720745,77.5685425 67.0451674,77.5685425 L99.0452364,77.5685425 C100.406772,77.5685425 101.748384,77.4835732 103.065066,77.3186499 C96.4792444,73.7895096 91.1190212,68.272192 87.7873041,61.5685425 L67.0506214,61.5685425 C58.2110723,61.5685425 51.0452019,54.4070414 51.0452019,45.5685425 C51.0452019,36.7319865 58.2005234,29.5685425 67.0506214,29.5685425 L99.0397824,29.5685425 C107.879331,29.5685425 115.045202,36.7300436 115.045202,45.5685425 C115.045202,48.9465282 113.99957,52.0800164 112.21335,54.6623005 C114.314383,56.4735917 117.050039,57.5685425 120.041423,57.5685425 L128.720003,57.5685425 Z\" transform=\"translate(83.045202, 45.568542) rotate(-225.000000) translate(-83.045202, -45.568542)\"></path>\n <path d=\"M-0.106255113,71.0452019 C-1.60580855,74.7509276 -2.43145751,78.8016001 -2.43145751,83.0452019 C-2.43145751,100.7222 11.8954151,115.045202 29.568508,115.045202 L61.568577,115.045202 C79.2482381,115.045202 93.5685425,100.718314 93.5685425,83.0452019 C93.5685425,65.3682041 79.2416699,51.0452019 61.568577,51.0452019 L29.568508,51.0452019 C28.206973,51.0452019 26.8653616,51.1301711 25.5486799,51.2950943 C32.1345,54.8242347 37.4947231,60.3415524 40.8264403,67.0452019 L61.563123,67.0452019 C70.4026721,67.0452019 77.5685425,74.206703 77.5685425,83.0452019 C77.5685425,91.8817579 70.413221,99.0452019 61.563123,99.0452019 L29.573962,99.0452019 C20.7344129,99.0452019 13.5685425,91.8837008 13.5685425,83.0452019 C13.5685425,79.6672162 14.6141741,76.533728 16.4003949,73.9514439 C14.2993609,72.1401527 11.5637054,71.0452019 8.5723215,71.0452019 L-0.106255113,71.0452019 Z\" transform=\"translate(45.568542, 83.045202) rotate(-225.000000) translate(-45.568542, -83.045202)\"></path>\n </g>\n</svg>"
},
"$:/core/images/list-bullet": {
"title": "$:/core/images/list-bullet",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-list-bullet tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M11.6363636,40.2727273 C18.0629498,40.2727273 23.2727273,35.0629498 23.2727273,28.6363636 C23.2727273,22.2097775 18.0629498,17 11.6363636,17 C5.20977746,17 0,22.2097775 0,28.6363636 C0,35.0629498 5.20977746,40.2727273 11.6363636,40.2727273 Z M11.6363636,75.1818182 C18.0629498,75.1818182 23.2727273,69.9720407 23.2727273,63.5454545 C23.2727273,57.1188684 18.0629498,51.9090909 11.6363636,51.9090909 C5.20977746,51.9090909 0,57.1188684 0,63.5454545 C0,69.9720407 5.20977746,75.1818182 11.6363636,75.1818182 Z M11.6363636,110.090909 C18.0629498,110.090909 23.2727273,104.881132 23.2727273,98.4545455 C23.2727273,92.0279593 18.0629498,86.8181818 11.6363636,86.8181818 C5.20977746,86.8181818 0,92.0279593 0,98.4545455 C0,104.881132 5.20977746,110.090909 11.6363636,110.090909 Z M34.9090909,22.8181818 L128,22.8181818 L128,34.4545455 L34.9090909,34.4545455 L34.9090909,22.8181818 Z M34.9090909,57.7272727 L128,57.7272727 L128,69.3636364 L34.9090909,69.3636364 L34.9090909,57.7272727 Z M34.9090909,92.6363636 L128,92.6363636 L128,104.272727 L34.9090909,104.272727 L34.9090909,92.6363636 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/list-number": {
"title": "$:/core/images/list-number",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-list-number tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M33.8390805,22.3563218 L128,22.3563218 L128,34.1264368 L33.8390805,34.1264368 L33.8390805,22.3563218 Z M33.8390805,57.6666667 L128,57.6666667 L128,69.4367816 L33.8390805,69.4367816 L33.8390805,57.6666667 Z M33.8390805,92.9770115 L128,92.9770115 L128,104.747126 L33.8390805,104.747126 L33.8390805,92.9770115 Z M0.379509711,42.6307008 L0.379509711,40.4082314 L1.37821948,40.4082314 C2.20382368,40.4082314 2.82301754,40.268077 3.23581964,39.9877642 C3.64862174,39.7074513 3.85501969,39.0400498 3.85501969,37.9855395 L3.85501969,22.7686318 C3.85501969,21.3270228 3.66193774,20.4327047 3.27576803,20.0856507 C2.88959832,19.7385967 1.79768657,19.5650723 0,19.5650723 L0,17.4226919 C3.50215975,17.2758613 6.25191314,16.4683055 8.24934266,15 L10.3666074,15 L10.3666074,37.865406 C10.3666074,38.786434 10.5164123,39.4404875 10.8160268,39.8275862 C11.1156412,40.2146849 11.764796,40.4082314 12.7635108,40.4082314 L13.7622206,40.4082314 L13.7622206,42.6307008 L0.379509711,42.6307008 Z M0.0798967812,77.9873934 L0.0798967812,76.0852799 C7.27064304,69.5312983 10.8659622,63.5046623 10.8659622,58.005191 C10.8659622,56.4434479 10.5397203,55.195407 9.88722667,54.2610308 C9.23473303,53.3266546 8.36253522,52.8594735 7.27060709,52.8594735 C6.3784219,52.8594735 5.61608107,53.1764892 4.98356173,53.8105302 C4.35104238,54.4445712 4.03478745,55.1753759 4.03478745,56.0029663 C4.03478745,56.9773871 4.28113339,57.8316611 4.77383268,58.5658139 C4.88036225,58.7259926 4.93362624,58.8461249 4.93362624,58.9262143 C4.93362624,59.0730449 4.77383427,59.2065252 4.45424555,59.3266593 C4.2411864,59.4067486 3.70188852,59.6336652 2.83633573,60.0074156 C1.99741533,60.3811661 1.47809145,60.5680386 1.2783485,60.5680386 C1.03865696,60.5680386 0.765679018,60.1976307 0.459406492,59.4568039 C0.153133966,58.715977 0,57.9184322 0,57.0641453 C0,55.1153036 0.848894811,53.5202138 2.5467099,52.2788283 C4.24452499,51.0374428 6.34512352,50.4167594 8.84856852,50.4167594 C11.3120649,50.4167594 13.3793735,51.0874979 15.0505562,52.4289952 C16.7217389,53.7704924 17.5573177,55.5224215 17.5573177,57.684835 C17.5573177,58.9662652 17.2743527,60.2076321 16.7084144,61.4089729 C16.142476,62.6103138 14.7875733,64.4623531 12.6436656,66.9651465 C10.4997579,69.4679398 8.40914641,71.7804862 6.3717683,73.902855 L17.8169822,73.902855 L16.7982982,79.6292176 L14.6810335,79.6292176 C14.7609307,79.3489048 14.8008787,79.0952922 14.8008787,78.8683723 C14.8008787,78.4812736 14.7010087,78.237672 14.5012658,78.1375603 C14.3015228,78.0374485 13.9020429,77.9873934 13.3028141,77.9873934 L0.0798967812,77.9873934 Z M12.2042333,97.1935484 C13.9486551,97.2335931 15.4400468,97.8309175 16.6784531,98.9855395 C17.9168594,100.140162 18.5360532,101.75861 18.5360532,103.840934 C18.5360532,106.830938 17.4041935,109.233584 15.14044,111.048943 C12.8766866,112.864303 10.1402492,113.771969 6.93104577,113.771969 C4.92030005,113.771969 3.26245842,113.388213 1.95747114,112.62069 C0.652483855,111.853166 0,110.848727 0,109.607341 C0,108.833144 0.26964894,108.209124 0.808954909,107.735261 C1.34826088,107.261399 1.93749375,107.024472 2.57667119,107.024472 C3.21584864,107.024472 3.73850152,107.224692 4.14464552,107.625139 C4.55078953,108.025586 4.92696644,108.67964 5.27318756,109.587319 C5.73925445,110.855401 6.51158227,111.489433 7.59019421,111.489433 C8.85523291,111.489433 9.87723568,111.012241 10.6562332,110.057842 C11.4352307,109.103444 11.8247236,107.371536 11.8247236,104.862069 C11.8247236,103.153495 11.7048796,101.838714 11.4651881,100.917686 C11.2254966,99.9966584 10.6728827,99.5361513 9.80732989,99.5361513 C9.22141723,99.5361513 8.62219737,99.843156 8.00965231,100.457175 C7.51695303,100.951059 7.07752513,101.197998 6.69135542,101.197998 C6.3584505,101.197998 6.08880156,101.051169 5.88240051,100.757508 C5.67599946,100.463847 5.57280049,100.183539 5.57280049,99.916574 C5.57280049,99.5962164 5.67599946,99.3225818 5.88240051,99.0956618 C6.08880156,98.8687419 6.57150646,98.5016711 7.33052967,97.9944383 C10.2068282,96.0722929 11.6449559,93.9766521 11.6449559,91.7074527 C11.6449559,90.5194601 11.3386879,89.615131 10.7261429,88.9944383 C10.1135978,88.3737455 9.37455999,88.0634038 8.5090072,88.0634038 C7.71003539,88.0634038 6.98431355,88.3270274 6.33181991,88.8542825 C5.67932627,89.3815377 5.35308434,90.0122321 5.35308434,90.7463849 C5.35308434,91.3871 5.60608828,91.9810874 6.11210376,92.5283648 C6.28521432,92.7285883 6.3717683,92.8954387 6.3717683,93.028921 C6.3717683,93.1490551 5.80250943,93.4560598 4.6639746,93.9499444 C3.52543978,94.4438289 2.80970494,94.6907675 2.51674861,94.6907675 C2.10394651,94.6907675 1.76771758,94.3570667 1.50805174,93.6896552 C1.24838591,93.0222436 1.11855494,92.4082342 1.11855494,91.8476085 C1.11855494,90.0989901 2.04734573,88.6240327 3.90495518,87.4226919 C5.76256463,86.2213511 7.86982116,85.6206897 10.226788,85.6206897 C12.2907985,85.6206897 14.0784711,86.0678487 15.5898594,86.9621802 C17.1012478,87.8565117 17.8569306,89.0778566 17.8569306,90.6262514 C17.8569306,91.987771 17.2876717,93.2491599 16.1491369,94.4104561 C15.0106021,95.5717522 13.6956474,96.4994404 12.2042333,97.1935484 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/list": {
"title": "$:/core/images/list",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-list tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M0.719999312,185.568543 C2.21955287,181.862817 3.0452019,177.812144 3.0452019,173.568542 C3.0452019,155.891545 -11.2816707,141.568542 -28.9547636,141.568542 L-60.9548326,141.568542 C-78.6344937,141.568542 -92.9547981,155.895431 -92.9547981,173.568542 C-92.9547981,191.24554 -78.6279255,205.568542 -60.9548326,205.568542 L-28.9547636,205.568542 C-27.593228,205.568542 -26.2516158,205.483573 -24.9349335,205.31865 C-31.5207556,201.78951 -36.8809788,196.272192 -40.2126959,189.568542 L-60.9493786,189.568542 C-69.7889277,189.568542 -76.9547981,182.407041 -76.9547981,173.568542 C-76.9547981,164.731986 -69.7994766,157.568542 -60.9493786,157.568542 L-28.9602176,157.568542 C-20.1206685,157.568542 -12.9547981,164.730044 -12.9547981,173.568542 C-12.9547981,176.946528 -14.0004297,180.080016 -15.7866505,182.6623 C-13.6856165,184.473592 -10.949961,185.568542 -7.9585771,185.568542 L0.720002586,185.568542 Z\" transform=\"translate(-44.954798, 173.568542) rotate(-225.000000) translate(44.954798, -173.568542) \"></path>\n <path d=\"M87.7480315,128 L23.9992458,128 C19.5813843,128 16,124.409247 16,119.993027 L16,8.00697327 C16,3.58484404 19.5881049,0 23.9992458,0 L104.000754,0 C108.418616,0 112,3.59075293 112,8.00697327 L112,104 L91.2492027,104 C90.2848199,104 89.410573,104.391703 88.7768998,105.025201 C88.1373658,105.661376 87.7480315,106.53563 87.7480315,107.501171 L87.7480315,128 Z M95.7480315,127.879386 L111.627417,112 L95.7480315,112 L95.7480315,127.879386 Z M40,15.5089165 C40,13.5709954 41.5636015,12 43.4998101,12 L98.5001899,12 C100.433082,12 102,13.5614718 102,15.5089165 L102,16.4910835 C102,18.4290046 100.436399,20 98.5001899,20 L43.4998101,20 C41.5669183,20 40,18.4385282 40,16.4910835 L40,15.5089165 Z M32,22 C35.3137085,22 38,19.3137085 38,16 C38,12.6862915 35.3137085,10 32,10 C28.6862915,10 26,12.6862915 26,16 C26,19.3137085 28.6862915,22 32,22 Z M40,31.5089165 C40,29.5709954 41.5636015,28 43.4998101,28 L98.5001899,28 C100.433082,28 102,29.5614718 102,31.5089165 L102,32.4910835 C102,34.4290046 100.436399,36 98.5001899,36 L43.4998101,36 C41.5669183,36 40,34.4385282 40,32.4910835 L40,31.5089165 Z M40,47.5089165 C40,45.5709954 41.5636015,44 43.4998101,44 L98.5001899,44 C100.433082,44 102,45.5614718 102,47.5089165 L102,48.4910835 C102,50.4290046 100.436399,52 98.5001899,52 L43.4998101,52 C41.5669183,52 40,50.4385282 40,48.4910835 L40,47.5089165 Z M40,63.5089165 C40,61.5709954 41.5636015,60 43.4998101,60 L98.5001899,60 C100.433082,60 102,61.5614718 102,63.5089165 L102,64.4910835 C102,66.4290046 100.436399,68 98.5001899,68 L43.4998101,68 C41.5669183,68 40,66.4385282 40,64.4910835 L40,63.5089165 Z M40,79.5089165 C40,77.5709954 41.5636015,76 43.4998101,76 L98.5001899,76 C100.433082,76 102,77.5614718 102,79.5089165 L102,80.4910835 C102,82.4290046 100.436399,84 98.5001899,84 L43.4998101,84 C41.5669183,84 40,82.4385282 40,80.4910835 L40,79.5089165 Z M40,95.5089165 C40,93.5709954 41.5636015,92 43.4998101,92 L98.5001899,92 C100.433082,92 102,93.5614718 102,95.5089165 L102,96.4910835 C102,98.4290046 100.436399,100 98.5001899,100 L43.4998101,100 C41.5669183,100 40,98.4385282 40,96.4910835 L40,95.5089165 Z M40,111.508916 C40,109.570995 41.5680474,108 43.4972017,108 L76.5027983,108 C78.4342495,108 80,109.561472 80,111.508916 L80,112.491084 C80,114.429005 78.4319526,116 76.5027983,116 L43.4972017,116 C41.5657505,116 40,114.438528 40,112.491084 L40,111.508916 Z M32,38 C35.3137085,38 38,35.3137085 38,32 C38,28.6862915 35.3137085,26 32,26 C28.6862915,26 26,28.6862915 26,32 C26,35.3137085 28.6862915,38 32,38 Z M32,54 C35.3137085,54 38,51.3137085 38,48 C38,44.6862915 35.3137085,42 32,42 C28.6862915,42 26,44.6862915 26,48 C26,51.3137085 28.6862915,54 32,54 Z M32,70 C35.3137085,70 38,67.3137085 38,64 C38,60.6862915 35.3137085,58 32,58 C28.6862915,58 26,60.6862915 26,64 C26,67.3137085 28.6862915,70 32,70 Z M32,86 C35.3137085,86 38,83.3137085 38,80 C38,76.6862915 35.3137085,74 32,74 C28.6862915,74 26,76.6862915 26,80 C26,83.3137085 28.6862915,86 32,86 Z M32,102 C35.3137085,102 38,99.3137085 38,96 C38,92.6862915 35.3137085,90 32,90 C28.6862915,90 26,92.6862915 26,96 C26,99.3137085 28.6862915,102 32,102 Z M32,118 C35.3137085,118 38,115.313708 38,112 C38,108.686292 35.3137085,106 32,106 C28.6862915,106 26,108.686292 26,112 C26,115.313708 28.6862915,118 32,118 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/locked-padlock": {
"title": "$:/core/images/locked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-locked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M96.4723753,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L32.0000269,64 C32.0028554,48.2766389 32.3030338,16.2688026 64.1594984,16.2688041 C95.9543927,16.2688056 96.4648869,48.325931 96.4723753,64 Z M80.5749059,64 L48.4413579,64 C48.4426205,47.71306 48.5829272,31.9999996 64.1595001,31.9999996 C79.8437473,31.9999996 81.1369461,48.1359182 80.5749059,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/mail": {
"title": "$:/core/images/mail",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-mail tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M122.826782,104.894066 C121.945525,105.22777 120.990324,105.41043 119.993027,105.41043 L8.00697327,105.41043 C7.19458381,105.41043 6.41045219,105.289614 5.67161357,105.064967 L5.67161357,105.064967 L39.8346483,70.9019325 L60.6765759,91.7438601 C61.6118278,92.679112 62.8865166,93.0560851 64.0946097,92.8783815 C65.2975108,93.0473238 66.5641085,92.6696979 67.4899463,91.7438601 L88.5941459,70.6396605 C88.6693095,70.7292352 88.7490098,70.8162939 88.8332479,70.9005321 L122.826782,104.894066 Z M127.903244,98.6568194 C127.966933,98.2506602 128,97.8343714 128,97.4103789 L128,33.410481 C128,32.7414504 127.917877,32.0916738 127.763157,31.4706493 L94.2292399,65.0045665 C94.3188145,65.0797417 94.4058701,65.1594458 94.4901021,65.2436778 L127.903244,98.6568194 Z M0.205060636,99.2178117 C0.0709009529,98.6370366 0,98.0320192 0,97.4103789 L0,33.410481 C0,32.694007 0.0944223363,31.9995312 0.27147538,31.3387595 L0.27147538,31.3387595 L34.1777941,65.2450783 L0.205060636,99.2178117 L0.205060636,99.2178117 Z M5.92934613,25.6829218 C6.59211333,25.5051988 7.28862283,25.4104299 8.00697327,25.4104299 L119.993027,25.4104299 C120.759109,25.4104299 121.500064,25.5178649 122.201605,25.7184927 L122.201605,25.7184927 L64.0832611,83.8368368 L5.92934613,25.6829218 L5.92934613,25.6829218 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/menu-button": {
"title": "$:/core/images/menu-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-menu-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <rect x=\"0\" y=\"16\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"56\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"96\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n</svg>"
},
"$:/core/images/mono-block": {
"title": "$:/core/images/mono-block",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-mono-block tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M23.9653488,32.9670593 L24.3217888,32.9670593 C25.0766067,32.9670593 25.6497006,33.1592554 26.0410876,33.5436534 C26.4324747,33.9280514 26.6281653,34.4906619 26.6281653,35.2315017 C26.6281653,36.0562101 26.4219913,36.6502709 26.009637,37.0137017 C25.5972828,37.3771326 24.9158602,37.5588453 23.9653488,37.5588453 L17.6542639,37.5588453 C16.6897744,37.5588453 16.0048573,37.380627 15.5994921,37.0241852 C15.1941269,36.6677435 14.9914474,36.0701882 14.9914474,35.2315017 C14.9914474,34.4207713 15.1941269,33.8406885 15.5994921,33.4912358 C16.0048573,33.141783 16.6897744,32.9670593 17.6542639,32.9670593 L18.388111,32.9670593 L17.5284616,30.5139133 L8.47069195,30.5139133 L7.5691084,32.9670593 L8.30295547,32.9670593 C9.25346691,32.9670593 9.93488953,33.1452775 10.3472438,33.5017193 C10.759598,33.8581611 10.965772,34.4347494 10.965772,35.2315017 C10.965772,36.0562101 10.759598,36.6502709 10.3472438,37.0137017 C9.93488953,37.3771326 9.25346691,37.5588453 8.30295547,37.5588453 L2.89345418,37.5588453 C1.92896463,37.5588453 1.24404754,37.3771326 0.838682371,37.0137017 C0.433317198,36.6502709 0.230637652,36.0562101 0.230637652,35.2315017 C0.230637652,34.4906619 0.426328248,33.9280514 0.817715312,33.5436534 C1.20910238,33.1592554 1.78219626,32.9670593 2.53701417,32.9670593 L2.89345418,32.9670593 L8.51262607,17.3256331 L6.83526132,17.3256331 C5.88474988,17.3256331 5.20332727,17.1439204 4.79097304,16.7804895 C4.37861882,16.4170587 4.1724448,15.8299869 4.1724448,15.0192565 C4.1724448,14.1945481 4.37861882,13.6004873 4.79097304,13.2370565 C5.20332727,12.8736257 5.88474988,12.691913 6.83526132,12.691913 L14.6979086,12.691913 C15.9419603,12.691913 16.815579,13.3628521 17.318791,14.7047506 L17.318791,14.7676518 L23.9653488,32.9670593 Z M12.9786097,17.3256331 L9.9383861,26.1737321 L16.0188333,26.1737321 L12.9786097,17.3256331 Z M35.3809383,26.6979086 L35.3809383,33.0928616 L38.5259972,33.0928616 C40.7485166,33.0928616 42.3140414,32.8482484 43.2226185,32.3590146 C44.1311956,31.8697807 44.5854773,31.0520736 44.5854773,29.9058686 C44.5854773,28.7456855 44.1521624,27.9209895 43.2855197,27.4317556 C42.4188769,26.9425218 40.9022748,26.6979086 38.7356678,26.6979086 L35.3809383,26.6979086 Z M46.0741385,24.370565 C47.5977525,24.9296893 48.7159844,25.6949794 49.428868,26.666458 C50.1417516,27.6379366 50.498188,28.8784752 50.498188,30.388111 C50.498188,31.6601189 50.1906743,32.8202846 49.5756374,33.8686428 C48.9606006,34.917001 48.0799929,35.7766419 46.933788,36.4475911 C46.2628387,36.8389782 45.5115266,37.1220307 44.6798291,37.296757 C43.8481316,37.4714834 42.6704935,37.5588453 41.1468796,37.5588453 L39.3856466,37.5588453 L30.2020747,37.5588453 C29.2795194,37.5588453 28.6190637,37.3771326 28.2206876,37.0137017 C27.8223114,36.6502709 27.6231264,36.0562101 27.6231264,35.2315017 C27.6231264,34.4906619 27.811828,33.9280514 28.189237,33.5436534 C28.5666459,33.1592554 29.118773,32.9670593 29.8456347,32.9670593 L30.2020747,32.9670593 L30.2020747,17.3256331 L29.8456347,17.3256331 C29.118773,17.3256331 28.5666459,17.1299425 28.189237,16.7385554 C27.811828,16.3471683 27.6231264,15.7740744 27.6231264,15.0192565 C27.6231264,14.2085262 27.8258059,13.6179599 28.2311711,13.24754 C28.6365363,12.8771201 29.2934976,12.691913 30.2020747,12.691913 L39.8469219,12.691913 C42.796303,12.691913 45.0362615,13.2650068 46.5668644,14.4112118 C48.0974674,15.5574168 48.8627574,17.2347648 48.8627574,19.443306 C48.8627574,20.5335986 48.6286276,21.4945792 48.1603609,22.3262767 C47.6920943,23.1579742 46.9966938,23.8393968 46.0741385,24.370565 L46.0741385,24.370565 Z M35.3809383,17.1998307 L35.3809383,22.4835296 L38.2114913,22.4835296 C39.9307988,22.4835296 41.1433816,22.2808501 41.8492761,21.8754849 C42.5551706,21.4701197 42.9081126,20.7852027 42.9081126,19.8207131 C42.9081126,18.912136 42.5901154,18.2481858 41.9541114,17.8288425 C41.3181074,17.4094992 40.2872373,17.1998307 38.8614701,17.1998307 L35.3809383,17.1998307 Z M71.244119,13.3838259 C71.5236812,12.880614 71.8102281,12.5241775 72.1037684,12.3145059 C72.3973087,12.1048342 72.7677231,12 73.2150226,12 C73.8999499,12 74.3856819,12.1817127 74.6722332,12.5451435 C74.9587844,12.9085744 75.1020579,13.5305909 75.1020579,14.4112118 L75.143992,19.8626472 C75.143992,20.8271368 74.9867406,21.4771091 74.6722332,21.8125837 C74.3577257,22.1480584 73.7881263,22.3157932 72.9634178,22.3157932 C72.3763372,22.3157932 71.92555,22.1760142 71.6110425,21.896452 C71.2965351,21.6168898 71.0274605,21.0997075 70.8038107,20.3448896 C70.4403799,19.0169692 69.8602971,18.0629775 69.0635448,17.482886 C68.2667926,16.9027945 67.1625385,16.612753 65.7507494,16.612753 C63.5981206,16.612753 61.9487284,17.3396038 60.8025235,18.7933272 C59.6563185,20.2470506 59.0832246,22.3507245 59.0832246,25.104412 C59.0832246,27.8441215 59.6633074,29.9477954 60.8234905,31.4154969 C61.9836736,32.8831984 63.6400547,33.6170381 65.7926836,33.6170381 C67.2603851,33.6170381 68.878327,33.1278116 70.6465578,32.149344 C72.4147886,31.1708763 73.5295261,30.6816498 73.9908037,30.6816498 C74.53595,30.6816498 74.9937262,30.9122852 75.3641461,31.3735628 C75.734566,31.8348404 75.9197732,32.4079343 75.9197732,33.0928616 C75.9197732,34.3229353 74.836486,35.4831009 72.669879,36.5733935 C70.5032721,37.663686 68.0641285,38.2088241 65.3523753,38.2088241 C61.6901107,38.2088241 58.7267959,36.9997358 56.4623422,34.5815228 C54.1978885,32.1633099 53.0656786,29.0043046 53.0656786,25.104412 C53.0656786,21.3443006 54.2118664,18.22024 56.5042763,15.7321366 C58.7966863,13.2440331 61.7040894,12 65.226573,12 C66.2190187,12 67.1974717,12.1118232 68.1619613,12.3354729 C69.1264508,12.5591227 70.1538264,12.9085702 71.244119,13.3838259 L71.244119,13.3838259 Z M81.4645862,32.9670593 L81.4645862,17.3256331 L81.1081461,17.3256331 C80.3533282,17.3256331 79.7802344,17.1299425 79.3888473,16.7385554 C78.9974602,16.3471683 78.8017696,15.7740744 78.8017696,15.0192565 C78.8017696,14.2085262 79.0114381,13.6179599 79.4307814,13.24754 C79.8501247,12.8771201 80.5280528,12.691913 81.4645862,12.691913 L85.4063933,12.691913 L86.6434498,12.691913 C89.5648747,12.691913 91.7034933,12.8177141 93.0593699,13.06932 C94.4152465,13.320926 95.5684233,13.740263 96.5189347,14.3273436 C98.210286,15.3337675 99.5067362,16.7699967 100.408324,18.6360743 C101.309912,20.5021519 101.7607,22.6582429 101.7607,25.104412 C101.7607,27.6903623 101.247012,29.9512876 100.219621,31.8872557 C99.1922296,33.8232239 97.7350336,35.2874089 95.8479888,36.2798546 C94.9953241,36.7271541 93.9959043,37.0521403 92.8496993,37.2548229 C91.7034944,37.4575055 89.9981906,37.5588453 87.7337369,37.5588453 L85.4063933,37.5588453 L81.4645862,37.5588453 C80.5000966,37.5588453 79.8151795,37.380627 79.4098143,37.0241852 C79.0044492,36.6677435 78.8017696,36.0701882 78.8017696,35.2315017 C78.8017696,34.4906619 78.9974602,33.9280514 79.3888473,33.5436534 C79.7802344,33.1592554 80.3533282,32.9670593 81.1081461,32.9670593 L81.4645862,32.9670593 Z M86.8740874,17.2417648 L86.8740874,32.9670593 L88.0692098,32.9670593 C90.7110725,32.9670593 92.6609895,32.3205814 93.9190194,31.0276063 C95.1770492,29.7346312 95.8060547,27.7462749 95.8060547,25.0624779 C95.8060547,22.4206153 95.1665658,20.4497314 93.8875688,19.1497672 C92.6085718,17.849803 90.6831161,17.1998307 88.1111439,17.1998307 C87.7756693,17.1998307 87.5205727,17.2033252 87.3458463,17.2103142 C87.1711199,17.2173033 87.0138685,17.2277867 86.8740874,17.2417648 L86.8740874,17.2417648 Z M121.94052,17.1159625 L112.190837,17.1159625 L112.190837,22.4835296 L115.88104,22.4835296 L115.88104,22.2319249 C115.88104,21.4351727 116.055763,20.841112 116.405216,20.4497249 C116.754669,20.0583378 117.285829,19.8626472 117.998713,19.8626472 C118.627728,19.8626472 119.141415,20.0408655 119.539792,20.3973072 C119.938168,20.753749 120.137353,21.2045363 120.137353,21.7496826 C120.137353,21.7776388 120.144342,21.8684951 120.15832,22.0222543 C120.172298,22.1760135 120.179287,22.3297704 120.179287,22.4835296 L120.179287,26.8237109 C120.179287,27.7602442 120.011552,28.4311834 119.676077,28.8365486 C119.340603,29.2419138 118.795465,29.4445933 118.040647,29.4445933 C117.327763,29.4445933 116.789614,29.2558917 116.426183,28.8784827 C116.062752,28.5010738 115.88104,27.9419578 115.88104,27.201118 L115.88104,26.8237109 L112.190837,26.8237109 L112.190837,33.0928616 L121.94052,33.0928616 L121.94052,30.5977816 C121.94052,29.6612482 122.118738,28.9903091 122.47518,28.5849439 C122.831622,28.1795787 123.415199,27.9768992 124.225929,27.9768992 C125.022682,27.9768992 125.592281,28.1760842 125.934745,28.5744604 C126.277208,28.9728365 126.448438,29.6472701 126.448438,30.5977816 L126.448438,35.6718099 C126.448438,36.4266278 126.30167,36.9298322 126.008129,37.1814382 C125.714589,37.4330442 125.134506,37.5588453 124.267863,37.5588453 L107.095842,37.5588453 C106.173287,37.5588453 105.512831,37.3771326 105.114455,37.0137017 C104.716079,36.6502709 104.516894,36.0562101 104.516894,35.2315017 C104.516894,34.4906619 104.705595,33.9280514 105.083004,33.5436534 C105.460413,33.1592554 106.01254,32.9670593 106.739402,32.9670593 L107.095842,32.9670593 L107.095842,17.3256331 L106.739402,17.3256331 C106.026518,17.3256331 105.477886,17.126448 105.093488,16.7280719 C104.70909,16.3296957 104.516894,15.7600963 104.516894,15.0192565 C104.516894,14.2085262 104.719573,13.6179599 105.124938,13.24754 C105.530304,12.8771201 106.187265,12.691913 107.095842,12.691913 L124.267863,12.691913 C125.120528,12.691913 125.697116,12.8212085 125.997646,13.0798036 C126.298175,13.3383986 126.448438,13.8520864 126.448438,14.6208824 L126.448438,19.3175037 C126.448438,20.2680151 126.273714,20.9494377 125.924261,21.361792 C125.574808,21.7741462 125.008703,21.9803202 124.225929,21.9803202 C123.415199,21.9803202 122.831622,21.7706517 122.47518,21.3513084 C122.118738,20.9319652 121.94052,20.254037 121.94052,19.3175037 L121.94052,17.1159625 Z M19.7719369,47.6405477 C20.037521,47.1373358 20.3205734,46.7808993 20.6211028,46.5712277 C20.9216322,46.361556 21.295541,46.2567218 21.7428405,46.2567218 C22.4277678,46.2567218 22.9134998,46.4384345 23.2000511,46.8018653 C23.4866023,47.1652962 23.6298758,47.7873127 23.6298758,48.6679336 L23.6718099,54.119369 C23.6718099,55.0838586 23.5145586,55.7338309 23.2000511,56.0693055 C22.8855436,56.4047802 22.3089553,56.572515 21.4702687,56.572515 C20.8831881,56.572515 20.4254119,56.4292415 20.0969263,56.1426902 C19.7684407,55.856139 19.4993662,55.3424512 19.2896945,54.6016114 C18.9122856,53.2597129 18.3322027,52.3022267 17.5494286,51.7291243 C16.7666545,51.1560218 15.6693894,50.8694748 14.2576003,50.8694748 C12.1049715,50.8694748 10.4590738,51.5963256 9.31985785,53.050049 C8.18064193,54.5037724 7.61104252,56.6074463 7.61104252,59.3611338 C7.61104252,62.1148214 8.20859773,64.2429566 9.40372609,65.7456034 C10.5988544,67.2482501 12.2936748,67.9995623 14.488238,67.9995623 C14.9914499,67.9995623 15.5645438,67.9401562 16.2075368,67.8213423 C16.8505299,67.7025283 17.6053364,67.5173212 18.4719792,67.2657152 L18.4719792,63.9529198 L16.1027015,63.9529198 C15.1521901,63.9529198 14.4777564,63.7781961 14.0793803,63.4287433 C13.6810042,63.0792906 13.4818191,62.4992078 13.4818191,61.6884774 C13.4818191,60.8497908 13.6810042,60.2522356 14.0793803,59.8957938 C14.4777564,59.5393521 15.1521901,59.3611338 16.1027015,59.3611338 L23.6718099,59.3611338 C24.6502776,59.3611338 25.3386891,59.5358576 25.7370653,59.8853103 C26.1354414,60.2347631 26.3346265,60.8218348 26.3346265,61.6465433 C26.3346265,62.3873831 26.1354414,62.9569825 25.7370653,63.3553586 C25.3386891,63.7537347 24.7621008,63.9529198 24.0072829,63.9529198 L23.6718099,63.9529198 L23.6718099,68.9430799 L23.6718099,69.1946846 C23.6718099,69.6419841 23.6228873,69.9529924 23.5250405,70.1277188 C23.4271937,70.3024451 23.2315031,70.4806634 22.9379628,70.6623788 C22.1412106,71.1376345 20.8762107,71.5569715 19.1429251,71.9204023 C17.4096396,72.2838332 15.6554131,72.4655459 13.8801932,72.4655459 C10.2179286,72.4655459 7.25461383,71.2564576 4.99016011,68.8382446 C2.72570638,66.4200317 1.59349651,63.2610264 1.59349651,59.3611338 C1.59349651,55.6010224 2.73968428,52.4769618 5.03209423,49.9888583 C7.32450417,47.5007549 10.2319073,46.2567218 13.7543909,46.2567218 C14.7328585,46.2567218 15.7078171,46.368545 16.6792957,46.5921947 C17.6507743,46.8158445 18.6816444,47.165292 19.7719369,47.6405477 L19.7719369,47.6405477 Z M35.611576,51.5823548 L35.611576,56.4047785 L42.4678043,56.4047785 L42.4678043,51.5823548 L42.1323314,51.5823548 C41.3775135,51.5823548 40.8009251,51.3866642 40.402549,50.9952772 C40.0041729,50.6038901 39.8049878,50.0307962 39.8049878,49.2759783 C39.8049878,48.4512699 40.0111618,47.8572091 40.4235161,47.4937783 C40.8358703,47.1303474 41.5172929,46.9486347 42.4678043,46.9486347 L47.8773056,46.9486347 C48.8278171,46.9486347 49.5022507,47.1303474 49.9006269,47.4937783 C50.299003,47.8572091 50.498188,48.4512699 50.498188,49.2759783 C50.498188,50.0307962 50.3059919,50.6038901 49.9215939,50.9952772 C49.5371959,51.3866642 48.9745854,51.5823548 48.2337456,51.5823548 L47.8773056,51.5823548 L47.8773056,67.2237811 L48.2337456,67.2237811 C48.9885636,67.2237811 49.5616574,67.4159772 49.9530445,67.8003752 C50.3444316,68.1847732 50.5401222,68.7473837 50.5401222,69.4882235 C50.5401222,70.3129319 50.3374426,70.9069927 49.9320774,71.2704235 C49.5267123,71.6338543 48.8417952,71.815567 47.8773056,71.815567 L42.4678043,71.815567 C41.5033148,71.815567 40.8183977,71.6373488 40.4130325,71.280907 C40.0076674,70.9244652 39.8049878,70.32691 39.8049878,69.4882235 C39.8049878,68.7473837 40.0041729,68.1847732 40.402549,67.8003752 C40.8009251,67.4159772 41.3775135,67.2237811 42.1323314,67.2237811 L42.4678043,67.2237811 L42.4678043,61.0384986 L35.611576,61.0384986 L35.611576,67.2237811 L35.9470489,67.2237811 C36.7018668,67.2237811 37.2784552,67.4159772 37.6768313,67.8003752 C38.0752074,68.1847732 38.2743925,68.7473837 38.2743925,69.4882235 C38.2743925,70.3129319 38.0682185,70.9069927 37.6558642,71.2704235 C37.24351,71.6338543 36.5620874,71.815567 35.611576,71.815567 L30.2020747,71.815567 C29.2375851,71.815567 28.552668,71.6373488 28.1473029,71.280907 C27.7419377,70.9244652 27.5392581,70.32691 27.5392581,69.4882235 C27.5392581,68.7473837 27.7349487,68.1847732 28.1263358,67.8003752 C28.5177229,67.4159772 29.0908168,67.2237811 29.8456347,67.2237811 L30.2020747,67.2237811 L30.2020747,51.5823548 L29.8456347,51.5823548 C29.1047949,51.5823548 28.5421844,51.3866642 28.1577864,50.9952772 C27.7733884,50.6038901 27.5811923,50.0307962 27.5811923,49.2759783 C27.5811923,48.4512699 27.7803773,47.8572091 28.1787534,47.4937783 C28.5771296,47.1303474 29.2515632,46.9486347 30.2020747,46.9486347 L35.611576,46.9486347 C36.5481093,46.9486347 37.2260374,47.1303474 37.6453807,47.4937783 C38.064724,47.8572091 38.2743925,48.4512699 38.2743925,49.2759783 C38.2743925,50.0307962 38.0752074,50.6038901 37.6768313,50.9952772 C37.2784552,51.3866642 36.7018668,51.5823548 35.9470489,51.5823548 L35.611576,51.5823548 Z M67.365213,51.5823548 L67.365213,67.2237811 L70.887679,67.2237811 C71.8381904,67.2237811 72.519613,67.4019993 72.9319673,67.7584411 C73.3443215,68.1148829 73.5504955,68.6914712 73.5504955,69.4882235 C73.5504955,70.2989538 73.340827,70.8895201 72.9214837,71.25994 C72.5021404,71.6303599 71.8242123,71.815567 70.887679,71.815567 L58.4332458,71.815567 C57.4827343,71.815567 56.8013117,71.6338543 56.3889575,71.2704235 C55.9766033,70.9069927 55.7704292,70.3129319 55.7704292,69.4882235 C55.7704292,68.6774931 55.9731088,68.0974103 56.378474,67.7479575 C56.7838391,67.3985048 57.4687562,67.2237811 58.4332458,67.2237811 L61.9557117,67.2237811 L61.9557117,51.5823548 L58.4332458,51.5823548 C57.4827343,51.5823548 56.8013117,51.4006421 56.3889575,51.0372113 C55.9766033,50.6737805 55.7704292,50.0867087 55.7704292,49.2759783 C55.7704292,48.4512699 55.9731088,47.8641981 56.378474,47.5147453 C56.7838391,47.1652926 57.4687562,46.9905689 58.4332458,46.9905689 L70.887679,46.9905689 C71.8801247,46.9905689 72.5720308,47.1652926 72.9634178,47.5147453 C73.3548049,47.8641981 73.5504955,48.4512699 73.5504955,49.2759783 C73.5504955,50.0867087 73.347816,50.6737805 72.9424508,51.0372113 C72.5370856,51.4006421 71.8521685,51.5823548 70.887679,51.5823548 L67.365213,51.5823548 Z M97.8608265,51.5823548 L97.8608265,63.1771386 L97.8608265,63.5755127 C97.8608265,65.4485794 97.7385199,66.8044357 97.493903,67.6431222 C97.2492861,68.4818088 96.8404325,69.2296264 96.26733,69.8865976 C95.5264902,70.7392623 94.4991146,71.3822457 93.1851723,71.815567 C91.87123,72.2488884 90.2917273,72.4655459 88.4466169,72.4655459 C87.1466527,72.4655459 85.8921362,72.3397448 84.6830298,72.0881388 C83.4739233,71.8365328 82.3102631,71.4591296 81.1920144,70.9559176 C80.5769776,70.6763554 80.175113,70.31293 79.9864085,69.8656305 C79.797704,69.418331 79.7033532,68.6914802 79.7033532,67.6850564 L79.7033532,63.3658422 C79.7033532,62.1637247 79.8780769,61.3250508 80.2275297,60.849795 C80.5769824,60.3745393 81.185021,60.136915 82.0516638,60.136915 C83.2957156,60.136915 83.9806326,61.0524675 84.1064356,62.8835998 C84.1204137,63.2050963 84.1413806,63.4497096 84.1693368,63.6174469 C84.3370741,65.2389076 84.7144774,66.3466561 85.301558,66.9407258 C85.8886386,67.5347954 86.8251579,67.8318258 88.1111439,67.8318258 C89.7046484,67.8318258 90.8263749,67.4089943 91.476357,66.5633187 C92.126339,65.7176431 92.4513252,64.1765796 92.4513252,61.9400821 L92.4513252,51.5823548 L88.9288593,51.5823548 C87.9783478,51.5823548 87.2969252,51.4006421 86.884571,51.0372113 C86.4722168,50.6737805 86.2660427,50.0867087 86.2660427,49.2759783 C86.2660427,48.4512699 86.4652278,47.8641981 86.8636039,47.5147453 C87.26198,47.1652926 87.9503916,46.9905689 88.9288593,46.9905689 L99.6220595,46.9905689 C100.600527,46.9905689 101.288939,47.1652926 101.687315,47.5147453 C102.085691,47.8641981 102.284876,48.4512699 102.284876,49.2759783 C102.284876,50.0867087 102.078702,50.6737805 101.666348,51.0372113 C101.253994,51.4006421 100.572571,51.5823548 99.6220595,51.5823548 L97.8608265,51.5823548 Z M112.505343,51.5823548 L112.505343,57.9353738 L118.984165,51.4565525 C118.257303,51.3726838 117.747109,51.1665098 117.453569,50.8380242 C117.160029,50.5095387 117.013261,49.9888619 117.013261,49.2759783 C117.013261,48.4512699 117.212446,47.8572091 117.610822,47.4937783 C118.009198,47.1303474 118.683632,46.9486347 119.634143,46.9486347 L124.771073,46.9486347 C125.721584,46.9486347 126.396018,47.1303474 126.794394,47.4937783 C127.19277,47.8572091 127.391955,48.4512699 127.391955,49.2759783 C127.391955,50.0447743 127.19277,50.6213627 126.794394,51.0057607 C126.396018,51.3901587 125.812441,51.5823548 125.043645,51.5823548 L124.561402,51.5823548 L118.459988,57.641835 C119.592215,58.4805215 120.626579,59.5812811 121.563113,60.9441468 C122.499646,62.3070125 123.596911,64.400203 124.854941,67.2237811 L125.127513,67.2237811 L125.546854,67.2237811 C126.371563,67.2237811 126.98659,67.4124827 127.391955,67.7898917 C127.79732,68.1673006 128,68.7334056 128,69.4882235 C128,70.3129319 127.793826,70.9069927 127.381472,71.2704235 C126.969118,71.6338543 126.287695,71.815567 125.337183,71.815567 L122.758235,71.815567 C121.626008,71.815567 120.710456,71.0537715 120.01155,69.5301576 C119.885747,69.2505954 119.787902,69.026949 119.718012,68.8592117 C118.795456,66.9022764 117.949793,65.3926632 117.180997,64.3303269 C116.412201,63.2679906 115.510627,62.2965265 114.476247,61.4159056 L112.505343,63.302941 L112.505343,67.2237811 L112.840816,67.2237811 C113.595634,67.2237811 114.172222,67.4159772 114.570599,67.8003752 C114.968975,68.1847732 115.16816,68.7473837 115.16816,69.4882235 C115.16816,70.3129319 114.961986,70.9069927 114.549631,71.2704235 C114.137277,71.6338543 113.455855,71.815567 112.505343,71.815567 L107.095842,71.815567 C106.131352,71.815567 105.446435,71.6373488 105.04107,71.280907 C104.635705,70.9244652 104.433025,70.32691 104.433025,69.4882235 C104.433025,68.7473837 104.628716,68.1847732 105.020103,67.8003752 C105.41149,67.4159772 105.984584,67.2237811 106.739402,67.2237811 L107.095842,67.2237811 L107.095842,51.5823548 L106.739402,51.5823548 C105.998562,51.5823548 105.435952,51.3866642 105.051554,50.9952772 C104.667156,50.6038901 104.474959,50.0307962 104.474959,49.2759783 C104.474959,48.4512699 104.674145,47.8572091 105.072521,47.4937783 C105.470897,47.1303474 106.14533,46.9486347 107.095842,46.9486347 L112.505343,46.9486347 C113.441877,46.9486347 114.119805,47.1303474 114.539148,47.4937783 C114.958491,47.8572091 115.16816,48.4512699 115.16816,49.2759783 C115.16816,50.0307962 114.968975,50.6038901 114.570599,50.9952772 C114.172222,51.3866642 113.595634,51.5823548 112.840816,51.5823548 L112.505343,51.5823548 Z M13.439885,96.325622 L17.4445933,84.4372993 C17.6961993,83.6545252 18.0456468,83.0849258 18.4929463,82.728484 C18.9402458,82.3720422 19.5343065,82.193824 20.2751463,82.193824 L23.5460076,82.193824 C24.496519,82.193824 25.1779416,82.3755367 25.5902958,82.7389675 C26.0026501,83.1023984 26.2088241,83.6964591 26.2088241,84.5211676 C26.2088241,85.2759855 26.009639,85.8490794 25.6112629,86.2404664 C25.2128868,86.6318535 24.6362984,86.8275441 23.8814805,86.8275441 L23.5460076,86.8275441 L24.1330852,102.46897 L24.4895252,102.46897 C25.2443431,102.46897 25.8104481,102.661166 26.187857,103.045564 C26.565266,103.429962 26.7539676,103.992573 26.7539676,104.733413 C26.7539676,105.558121 26.5547826,106.152182 26.1564064,106.515613 C25.7580303,106.879044 25.0835967,107.060756 24.1330852,107.060756 L19.4154969,107.060756 C18.4649855,107.060756 17.7905518,106.882538 17.3921757,106.526096 C16.9937996,106.169654 16.7946145,105.572099 16.7946145,104.733413 C16.7946145,103.992573 16.9868106,103.429962 17.3712086,103.045564 C17.7556066,102.661166 18.325206,102.46897 19.0800239,102.46897 L19.4154969,102.46897 L19.1219581,89.6790642 L16.0607674,99.1981091 C15.8371177,99.9109927 15.5191204,100.42468 15.1067662,100.739188 C14.694412,101.053695 14.1248126,101.210947 13.3979509,101.210947 C12.6710892,101.210947 12.0945008,101.053695 11.6681685,100.739188 C11.2418362,100.42468 10.91685,99.9109927 10.6932002,99.1981091 L7.65297664,89.6790642 L7.35943781,102.46897 L7.69491075,102.46897 C8.44972866,102.46897 9.01932808,102.661166 9.40372609,103.045564 C9.78812409,103.429962 9.98032022,103.992573 9.98032022,104.733413 C9.98032022,105.558121 9.77764067,106.152182 9.3722755,106.515613 C8.96691032,106.879044 8.29597114,107.060756 7.35943781,107.060756 L2.62088241,107.060756 C1.68434908,107.060756 1.01340989,106.879044 0.608044719,106.515613 C0.202679546,106.152182 0,105.558121 0,104.733413 C0,103.992573 0.192196121,103.429962 0.57659413,103.045564 C0.960992139,102.661166 1.53059155,102.46897 2.28540946,102.46897 L2.62088241,102.46897 L3.22892713,86.8275441 L2.89345418,86.8275441 C2.13863627,86.8275441 1.56204791,86.6318535 1.16367179,86.2404664 C0.765295672,85.8490794 0.5661106,85.2759855 0.5661106,84.5211676 C0.5661106,83.6964591 0.772284622,83.1023984 1.18463885,82.7389675 C1.59699308,82.3755367 2.27841569,82.193824 3.22892713,82.193824 L6.49978838,82.193824 C7.22665007,82.193824 7.81022738,82.3685477 8.25053783,82.7180005 C8.69084827,83.0674532 9.05077919,83.6405471 9.33034138,84.4372993 L13.439885,96.325622 Z M43.8935644,98.3803938 L43.8935644,86.8275441 L42.7403761,86.8275441 C41.8178209,86.8275441 41.1573651,86.6458314 40.758989,86.2824006 C40.3606129,85.9189697 40.1614278,85.3318979 40.1614278,84.5211676 C40.1614278,83.7104372 40.3606129,83.119871 40.758989,82.7494511 C41.1573651,82.3790312 41.8178209,82.193824 42.7403761,82.193824 L48.6950209,82.193824 C49.6035981,82.193824 50.2605593,82.3790312 50.6659245,82.7494511 C51.0712897,83.119871 51.2739692,83.7104372 51.2739692,84.5211676 C51.2739692,85.2620074 51.0817731,85.8316068 50.6973751,86.2299829 C50.3129771,86.628359 49.7643445,86.8275441 49.051461,86.8275441 L48.6950209,86.8275441 L48.6950209,105.865634 C48.6950209,106.522605 48.6251315,106.934953 48.4853504,107.10269 C48.3455693,107.270428 48.0310665,107.354295 47.5418327,107.354295 L45.4451268,107.354295 C44.7741775,107.354295 44.3024234,107.284406 44.0298503,107.144625 C43.7572771,107.004843 43.5231473,106.76023 43.3274538,106.410777 L34.6051571,91.0838571 L34.6051571,102.46897 L35.8212466,102.46897 C36.7298237,102.46897 37.379796,102.643694 37.7711831,102.993147 C38.1625701,103.3426 38.3582607,103.922682 38.3582607,104.733413 C38.3582607,105.558121 38.1590757,106.152182 37.7606995,106.515613 C37.3623234,106.879044 36.7158456,107.060756 35.8212466,107.060756 L29.8037005,107.060756 C28.8951234,107.060756 28.2381621,106.879044 27.832797,106.515613 C27.4274318,106.152182 27.2247522,105.558121 27.2247522,104.733413 C27.2247522,103.992573 27.4134539,103.429962 27.7908629,103.045564 C28.1682718,102.661166 28.7273878,102.46897 29.4682276,102.46897 L29.8037005,102.46897 L29.8037005,86.8275441 L29.4682276,86.8275441 C28.755344,86.8275441 28.203217,86.628359 27.8118299,86.2299829 C27.4204428,85.8316068 27.2247522,85.2620074 27.2247522,84.5211676 C27.2247522,83.7104372 27.4309263,83.119871 27.8432805,82.7494511 C28.2556347,82.3790312 28.9091015,82.193824 29.8037005,82.193824 L33.2422983,82.193824 C34.0670067,82.193824 34.6261227,82.3021527 34.919663,82.5188134 C35.2132033,82.7354741 35.5416839,83.1722835 35.9051148,83.8292546 L43.8935644,98.3803938 Z M64.6604624,86.3662688 C62.8572863,86.3662688 61.4420239,87.0931196 60.4146329,88.546843 C59.3872418,90.0005663 58.873554,92.0203728 58.873554,94.6063231 C58.873554,97.1922733 59.3907363,99.2190688 60.4251164,100.68677 C61.4594965,102.154472 62.8712644,102.888312 64.6604624,102.888312 C66.4636385,102.888312 67.8823953,102.157966 68.9167754,100.697254 C69.9511555,99.2365414 70.4683378,97.2062514 70.4683378,94.6063231 C70.4683378,92.0203728 69.95465,90.0005663 68.9272589,88.546843 C67.8998679,87.0931196 66.4776166,86.3662688 64.6604624,86.3662688 L64.6604624,86.3662688 Z M64.6604624,81.501911 C68.0990773,81.501911 70.929602,82.7319662 73.1521214,85.1921135 C75.3746408,87.6522607 76.4858838,90.7902992 76.4858838,94.6063231 C76.4858838,98.4503032 75.3816297,101.595331 73.1730884,104.0415 C70.9645471,106.487669 68.1270335,107.710735 64.6604624,107.710735 C61.2358256,107.710735 58.4053009,106.477185 56.1688034,104.010049 C53.9323059,101.542913 52.8140739,98.4083688 52.8140739,94.6063231 C52.8140739,90.7763211 53.9218224,87.6347881 56.1373528,85.1816299 C58.3528831,82.7284717 61.1938912,81.501911 64.6604624,81.501911 L64.6604624,81.501911 Z M87.4611651,98.1707232 L87.4611651,102.46897 L89.6207722,102.46897 C90.5293493,102.46897 91.1758272,102.643694 91.5602252,102.993147 C91.9446232,103.3426 92.1368193,103.922682 92.1368193,104.733413 C92.1368193,105.558121 91.9411287,106.152182 91.5497417,106.515613 C91.1583546,106.879044 90.5153712,107.060756 89.6207722,107.060756 L82.3661697,107.060756 C81.4436145,107.060756 80.7831587,106.879044 80.3847826,106.515613 C79.9864065,106.152182 79.7872214,105.558121 79.7872214,104.733413 C79.7872214,103.992573 79.9759231,103.429962 80.353332,103.045564 C80.730741,102.661166 81.282868,102.46897 82.0097297,102.46897 L82.3661697,102.46897 L82.3661697,86.8275441 L82.0097297,86.8275441 C81.2968461,86.8275441 80.7482136,86.628359 80.3638155,86.2299829 C79.9794175,85.8316068 79.7872214,85.2620074 79.7872214,84.5211676 C79.7872214,83.7104372 79.989901,83.119871 80.3952661,82.7494511 C80.8006313,82.3790312 81.4575926,82.193824 82.3661697,82.193824 L91.0255652,82.193824 C94.450202,82.193824 97.0396079,82.8507853 98.7938606,84.1647276 C100.548113,85.4786699 101.425227,87.414609 101.425227,89.972603 C101.425227,92.6703781 100.551608,94.7111515 98.8043442,96.0949843 C97.0570805,97.4788171 94.4641801,98.1707232 91.0255652,98.1707232 L87.4611651,98.1707232 Z M87.4611651,86.8275441 L87.4611651,93.4531348 L90.4384875,93.4531348 C92.0879044,93.4531348 93.328443,93.1735768 94.1601405,92.6144525 C94.9918381,92.0553281 95.4076806,91.2166541 95.4076806,90.0984053 C95.4076806,89.0500471 94.9778602,88.2428234 94.1182064,87.67671 C93.2585527,87.1105966 92.031992,86.8275441 90.4384875,86.8275441 L87.4611651,86.8275441 Z M114.727851,107.396229 L113.092421,109.03166 C113.69348,108.835966 114.284046,108.689198 114.864137,108.591352 C115.444229,108.493505 116.013828,108.444582 116.572953,108.444582 C117.677223,108.444582 118.840883,108.608823 120.063968,108.937308 C121.287053,109.265794 122.031376,109.430034 122.29696,109.430034 C122.744259,109.430034 123.327837,109.279772 124.047709,108.979242 C124.767582,108.678713 125.253314,108.52845 125.50492,108.52845 C126.02211,108.52845 126.45193,108.727636 126.794394,109.126012 C127.136858,109.524388 127.308087,110.024098 127.308087,110.625156 C127.308087,111.421909 126.836333,112.099837 125.892811,112.658961 C124.949288,113.218086 123.792617,113.497643 122.422762,113.497643 C121.486229,113.497643 120.28413,113.277492 118.816428,112.837181 C117.348727,112.396871 116.286406,112.176719 115.629435,112.176719 C114.636989,112.176719 113.518757,112.449288 112.274706,112.994434 C111.030654,113.53958 110.261869,113.812149 109.968329,113.812149 C109.36727,113.812149 108.857077,113.612964 108.437734,113.214588 C108.01839,112.816212 107.808722,112.337469 107.808722,111.778345 C107.808722,111.386958 107.941512,110.971115 108.207096,110.530805 C108.47268,110.090494 108.94094,109.520895 109.611889,108.821989 L111.729562,106.683349 C109.395218,105.830685 107.536157,104.29661 106.152324,102.08108 C104.768491,99.8655494 104.076585,97.3180772 104.076585,94.4385866 C104.076585,90.6365409 105.180839,87.5299526 107.389381,85.1187288 C109.597922,82.7075049 112.442425,81.501911 115.922974,81.501911 C119.389545,81.501911 122.227059,82.7109994 124.4356,85.1292123 C126.644141,87.5474252 127.748395,90.650519 127.748395,94.4385866 C127.748395,98.2126762 126.65113,101.322759 124.456567,103.768928 C122.262004,106.215097 119.480402,107.438163 116.111677,107.438163 C115.888028,107.438163 115.660887,107.434669 115.430248,107.42768 C115.199609,107.420691 114.965479,107.410207 114.727851,107.396229 L114.727851,107.396229 Z M115.922974,86.3662688 C114.119798,86.3662688 112.704535,87.0931196 111.677144,88.546843 C110.649753,90.0005663 110.136065,92.0203728 110.136065,94.6063231 C110.136065,97.1922733 110.653248,99.2190688 111.687628,100.68677 C112.722008,102.154472 114.133776,102.888312 115.922974,102.888312 C117.72615,102.888312 119.144907,102.157966 120.179287,100.697254 C121.213667,99.2365414 121.730849,97.2062514 121.730849,94.6063231 C121.730849,92.0203728 121.217161,90.0005663 120.18977,88.546843 C119.162379,87.0931196 117.740128,86.3662688 115.922974,86.3662688 L115.922974,86.3662688 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/mono-line": {
"title": "$:/core/images/mono-line",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-mono-line tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M60.4374591,84.522627 L61.3450888,84.522627 C63.2671377,84.522627 64.7264493,85.0120303 65.7230673,85.9908515 C66.7196852,86.9696727 67.2179868,88.4022896 67.2179868,90.288745 C67.2179868,92.3887615 66.6929905,93.9014625 65.6429823,94.8268935 C64.5929741,95.7523244 62.857817,96.215033 60.4374591,96.215033 L44.3670747,96.215033 C41.9111232,96.215033 40.1670679,95.7612227 39.1348565,94.8535884 C38.102645,93.9459542 37.586547,92.424355 37.586547,90.288745 C37.586547,88.2243221 38.102645,86.747214 39.1348565,85.8573766 C40.1670679,84.9675391 41.9111232,84.522627 44.3670747,84.522627 L46.235724,84.522627 L44.0467348,78.2759992 L20.9822627,78.2759992 L18.6864935,84.522627 L20.5551429,84.522627 C22.9755008,84.522627 24.7106579,84.9764373 25.7606661,85.8840716 C26.8106743,86.7917058 27.3356705,88.2599156 27.3356705,90.288745 C27.3356705,92.3887615 26.8106743,93.9014625 25.7606661,94.8268935 C24.7106579,95.7523244 22.9755008,96.215033 20.5551429,96.215033 L6.78052766,96.215033 C4.32457622,96.215033 2.58052094,95.7523244 1.54830946,94.8268935 C0.516097994,93.9014625 0,92.3887615 0,90.288745 C0,88.4022896 0.498301511,86.9696727 1.49491948,85.9908515 C2.49153745,85.0120303 3.95084902,84.522627 5.87289797,84.522627 L6.78052766,84.522627 L21.0890427,44.6937008 L16.8178442,44.6937008 C14.3974863,44.6937008 12.6623292,44.2309922 11.612321,43.3055613 C10.5623128,42.3801303 10.0373165,40.8852258 10.0373165,38.8208028 C10.0373165,36.7207864 10.5623128,35.2080854 11.612321,34.2826544 C12.6623292,33.3572234 14.3974863,32.8945149 16.8178442,32.8945149 L36.8390873,32.8945149 C40.0069087,32.8945149 42.231469,34.6029772 43.512835,38.0199531 L43.512835,38.180123 L60.4374591,84.522627 Z M32.4611088,44.6937008 L24.7195615,67.224273 L40.2026561,67.224273 L32.4611088,44.6937008 Z M89.5058233,68.5590225 L89.5058233,84.8429669 L97.5143205,84.8429669 C103.173687,84.8429669 107.160099,84.22009 109.473676,82.9743176 C111.787254,81.7285451 112.944025,79.6463566 112.944025,76.7276897 C112.944025,73.7734293 111.840643,71.6734444 109.633846,70.4276719 C107.427049,69.1818994 103.565213,68.5590225 98.0482204,68.5590225 L89.5058233,68.5590225 Z M116.734714,62.6327346 C120.614405,64.0564746 123.461842,66.0051894 125.277111,68.4789376 C127.092379,70.9526857 128,74.1115614 128,77.9556593 C128,81.1946677 127.216955,84.1488838 125.650841,86.8183962 C124.084727,89.4879087 121.84237,91.676876 118.923703,93.385364 C117.215215,94.3819819 115.302093,95.1027395 113.18428,95.5476582 C111.066467,95.9925769 108.06776,96.215033 104.188068,96.215033 L99.7033098,96.215033 L76.3184979,96.215033 C73.9693269,96.215033 72.2875593,95.7523244 71.2731446,94.8268935 C70.2587299,93.9014625 69.7515301,92.3887615 69.7515301,90.288745 C69.7515301,88.4022896 70.2320352,86.9696727 71.1930596,85.9908515 C72.1540841,85.0120303 73.5600062,84.522627 75.4108682,84.522627 L76.3184979,84.522627 L76.3184979,44.6937008 L75.4108682,44.6937008 C73.5600062,44.6937008 72.1540841,44.1953993 71.1930596,43.1987813 C70.2320352,42.2021633 69.7515301,40.7428518 69.7515301,38.8208028 C69.7515301,36.7563799 70.2676281,35.2525771 71.2998396,34.3093494 C72.3320511,33.3661217 74.0049204,32.8945149 76.3184979,32.8945149 L100.877889,32.8945149 C108.388118,32.8945149 114.09189,34.3538264 117.989378,37.2724934 C121.886867,40.1911603 123.835581,44.4623161 123.835581,50.0860889 C123.835581,52.8623819 123.239399,55.3093982 122.047017,57.4272114 C120.854635,59.5450246 119.083885,61.2801816 116.734714,62.6327346 L116.734714,62.6327346 Z M89.5058233,44.3733609 L89.5058233,57.8276363 L96.7134708,57.8276363 C101.091471,57.8276363 104.179161,57.3115383 105.976633,56.2793268 C107.774104,55.2471153 108.672827,53.50306 108.672827,51.0471086 C108.672827,48.7335312 107.863087,47.0428653 106.243583,45.9750604 C104.624078,44.9072554 101.999097,44.3733609 98.3685602,44.3733609 L89.5058233,44.3733609 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/new-button": {
"title": "$:/core/images/new-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M56,72 L8.00697327,72 C3.59075293,72 0,68.418278 0,64 C0,59.5907123 3.58484404,56 8.00697327,56 L56,56 L56,8.00697327 C56,3.59075293 59.581722,0 64,0 C68.4092877,0 72,3.58484404 72,8.00697327 L72,56 L119.993027,56 C124.409247,56 128,59.581722 128,64 C128,68.4092877 124.415156,72 119.993027,72 L72,72 L72,119.993027 C72,124.409247 68.418278,128 64,128 C59.5907123,128 56,124.415156 56,119.993027 L56,72 L56,72 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/new-here-button": {
"title": "$:/core/images/new-here-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-here-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n \t<g transform=\"translate(52.233611, 64.389922) rotate(75.000000) translate(-52.233611, -64.389922) translate(-7.734417, 3.702450)\">\n\t <path d=\"M18.9270186,45.959338 L18.9080585,49.6521741 C18.8884833,53.4648378 21.0574548,58.7482162 23.7526408,61.4434022 L78.5671839,116.257945 C81.2617332,118.952495 85.6348701,118.950391 88.3334363,116.251825 L115.863237,88.7220241 C118.555265,86.0299959 118.564544,81.6509578 115.869358,78.9557717 L61.0548144,24.1412286 C58.3602652,21.4466794 53.0787224,19.2788426 49.2595808,19.3006519 L25.9781737,19.4336012 C22.1633003,19.4553862 19.0471195,22.5673232 19.0275223,26.3842526 L18.9871663,34.2443819 C19.0818862,34.255617 19.1779758,34.2665345 19.2754441,34.2771502 C22.6891275,34.6489512 27.0485594,34.2348566 31.513244,33.2285542 C31.7789418,32.8671684 32.075337,32.5211298 32.4024112,32.1940556 C34.8567584,29.7397084 38.3789778,29.0128681 41.4406288,30.0213822 C41.5958829,29.9543375 41.7503946,29.8866669 41.9041198,29.8183808 L42.1110981,30.2733467 C43.1114373,30.6972371 44.0473796,31.3160521 44.8614145,32.1300869 C48.2842088,35.5528813 48.2555691,41.130967 44.7974459,44.5890903 C41.4339531,47.952583 36.0649346,48.0717177 32.6241879,44.9262969 C27.8170558,45.8919233 23.0726921,46.2881596 18.9270186,45.959338 Z\"></path>\n\t <path d=\"M45.4903462,38.8768094 C36.7300141,42.6833154 26.099618,44.7997354 18.1909048,43.9383587 C7.2512621,42.7468685 1.50150083,35.8404432 4.66865776,24.7010202 C7.51507386,14.6896965 15.4908218,6.92103848 24.3842626,4.38423012 C34.1310219,1.60401701 42.4070208,6.15882777 42.4070209,16.3101169 L34.5379395,16.310117 C34.5379394,11.9285862 31.728784,10.3825286 26.5666962,11.8549876 C20.2597508,13.6540114 14.3453742,19.4148216 12.2444303,26.8041943 C10.4963869,32.9523565 12.6250796,35.5092726 19.0530263,36.2093718 C25.5557042,36.9176104 35.0513021,34.9907189 42.7038419,31.5913902 L42.7421786,31.6756595 C44.3874154,31.5384763 47.8846101,37.3706354 45.9274416,38.6772897 L45.9302799,38.6835285 C45.9166992,38.6895612 45.9031139,38.6955897 45.8895238,38.7016142 C45.8389288,38.7327898 45.7849056,38.7611034 45.7273406,38.7863919 C45.6506459,38.8200841 45.571574,38.8501593 45.4903462,38.8768094 Z\"></path>\n </g>\n <rect x=\"96\" y=\"80\" width=\"16\" height=\"48\" rx=\"8\"></rect>\n <rect x=\"80\" y=\"96\" width=\"48\" height=\"16\" rx=\"8\"></rect>\n </g>\n </g>\n</svg>"
},
"$:/core/images/new-image-button": {
"title": "$:/core/images/new-image-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-image-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M81.3619177,73.6270062 L97.1875317,46.2162388 C97.91364,44.9585822 97.4824378,43.3533085 96.2260476,42.6279312 L46.2162388,13.7547547 C44.9585822,13.0286463 43.3533085,13.4598485 42.6279312,14.7162388 L30.0575956,36.4886988 L40.0978909,31.2276186 C43.1404959,29.6333041 46.8692155,31.3421319 47.6479264,34.6877101 L51.2545483,52.3903732 L61.1353556,53.2399953 C63.2899974,53.4346096 65.1046382,54.9309951 65.706105,57.0091178 C65.7395572,57.1246982 65.8069154,57.3539875 65.9047035,57.6813669 C66.0696435,58.2335608 66.2581528,58.852952 66.4667073,59.5238092 C67.0618822,61.4383079 67.6960725,63.3742727 68.3393254,65.2021174 C68.5462918,65.7902259 68.7511789,66.3583016 68.953259,66.9034738 C69.5777086,68.5881157 70.1617856,70.0172008 70.6783305,71.110045 C70.9334784,71.6498566 71.1627732,72.0871602 71.4035746,72.5373068 C71.6178999,72.7492946 71.9508843,72.9623307 72.4151452,73.1586945 C73.5561502,73.6412938 75.1990755,73.899146 77.0720271,73.9171651 C77.9355886,73.9254732 78.7819239,73.8832103 79.5638842,73.8072782 C80.0123946,73.7637257 80.3172916,73.7224469 80.4352582,73.7027375 C80.7503629,73.6500912 81.0598053,73.6256267 81.3619177,73.6270062 L81.3619177,73.6270062 L81.3619177,73.6270062 L81.3619177,73.6270062 Z M37.4707881,2.64867269 C38.9217993,0.135447653 42.1388058,-0.723707984 44.6486727,0.725364314 L108.293614,37.4707881 C110.806839,38.9217993 111.665994,42.1388058 110.216922,44.6486727 L73.4714982,108.293614 C72.0204871,110.806839 68.8034805,111.665994 66.2936136,110.216922 L2.64867269,73.4714982 C0.135447653,72.0204871 -0.723707984,68.8034805 0.725364314,66.2936136 L37.4707881,2.64867269 L37.4707881,2.64867269 L37.4707881,2.64867269 L37.4707881,2.64867269 Z M80.3080975,53.1397764 C82.8191338,54.5895239 86.0299834,53.7291793 87.4797308,51.218143 C88.9294783,48.7071068 88.0691338,45.4962571 85.5580975,44.0465097 C83.0470612,42.5967622 79.8362116,43.4571068 78.3864641,45.968143 C76.9367166,48.4791793 77.7970612,51.6900289 80.3080975,53.1397764 L80.3080975,53.1397764 L80.3080975,53.1397764 L80.3080975,53.1397764 Z M96,112 L88.0070969,112 C83.5881712,112 80,108.418278 80,104 C80,99.5907123 83.5848994,96 88.0070969,96 L96,96 L96,88.0070969 C96,83.5881712 99.581722,80 104,80 C108.409288,80 112,83.5848994 112,88.0070969 L112,96 L119.992903,96 C124.411829,96 128,99.581722 128,104 C128,108.409288 124.415101,112 119.992903,112 L112,112 L112,119.992903 C112,124.411829 108.418278,128 104,128 C99.5907123,128 96,124.415101 96,119.992903 L96,112 L96,112 Z M33.3471097,51.7910932 C40.7754579,59.7394511 42.3564368,62.4818351 40.7958321,65.1848818 C39.2352273,67.8879286 26.9581062,62.8571718 24.7019652,66.7649227 C22.4458242,70.6726735 23.7947046,70.0228006 22.2648667,72.6725575 L41.9944593,84.0634431 C41.9944593,84.0634431 36.3904568,75.8079231 37.7602356,73.4353966 C40.2754811,69.0788636 46.5298923,72.1787882 48.1248275,69.4162793 C50.538989,65.234829 43.0222016,59.7770885 33.3471097,51.7910932 L33.3471097,51.7910932 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/new-journal-button": {
"title": "$:/core/images/new-journal-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-new-journal-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M102.545455,112.818182 L102.545455,124.636364 L102.545455,124.636364 L102.545455,124.636364 C102.545455,125.941761 103.630828,127 104.969697,127 L111.030303,127 C112.369172,127 113.454545,125.941761 113.454545,124.636364 L113.454545,112.818182 L125.575758,112.818182 C126.914626,112.818182 128,111.759982 128,110.454545 L128,104.545455 C128,103.240018 126.914626,102.181818 125.575758,102.181818 L113.454545,102.181818 L113.454545,90.3636364 C113.454545,89.0582 112.369172,88 111.030303,88 L104.969697,88 L104.969697,88 C103.630828,88 102.545455,89.0582 102.545455,90.3636364 L102.545455,102.181818 L90.4242424,102.181818 L90.4242424,102.181818 C89.0853705,102.181818 88,103.240018 88,104.545455 L88,110.454545 L88,110.454545 L88,110.454545 C88,111.759982 89.0853705,112.818182 90.4242424,112.818182 L102.545455,112.818182 Z\"></path>\n <g transform=\"translate(59.816987, 64.316987) rotate(30.000000) translate(-59.816987, -64.316987) translate(20.316987, 12.816987)\">\n <g transform=\"translate(0.000000, 0.000000)\">\n <path d=\"M9.99631148,0 C4.4755011,0 -2.27373675e-13,4.48070044 -2.27373675e-13,9.99759461 L-2.27373675e-13,91.6128884 C-2.27373675e-13,97.1344074 4.46966773,101.610483 9.99631148,101.610483 L68.9318917,101.610483 C74.4527021,101.610483 78.9282032,97.1297826 78.9282032,91.6128884 L78.9282032,9.99759461 C78.9282032,4.47607557 74.4585355,0 68.9318917,0 L9.99631148,0 Z M20.8885263,26 C24.2022348,26 26.8885263,23.3137085 26.8885263,20 C26.8885263,16.6862915 24.2022348,14 20.8885263,14 C17.5748178,14 14.8885263,16.6862915 14.8885263,20 C14.8885263,23.3137085 17.5748178,26 20.8885263,26 Z M57.3033321,25.6783342 C60.6170406,25.6783342 63.3033321,22.9920427 63.3033321,19.6783342 C63.3033321,16.3646258 60.6170406,13.6783342 57.3033321,13.6783342 C53.9896236,13.6783342 51.3033321,16.3646258 51.3033321,19.6783342 C51.3033321,22.9920427 53.9896236,25.6783342 57.3033321,25.6783342 Z\"></path>\n <text font-family=\"Helvetica\" font-size=\"47.1724138\" font-weight=\"bold\" fill=\"#FFFFFF\">\n <tspan x=\"42\" y=\"77.4847912\" text-anchor=\"middle\"><<now \"DD\">></tspan>\n </text>\n </g>\n </g>\n </g>\n</svg>"
},
"$:/core/images/opacity": {
"title": "$:/core/images/opacity",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-opacity tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M102.361773,65 C101.833691,67.051742 101.183534,69.0544767 100.419508,71 L82.5835324,71 C83.7602504,69.1098924 84.7666304,67.1027366 85.581205,65 L102.361773,65 Z M102.834311,63 C103.256674,61.0388326 103.568427,59.0365486 103.762717,57 L87.6555706,57 C87.3692052,59.0609452 86.9083652,61.0660782 86.2884493,63 L102.834311,63 Z M99.5852583,73 C98.6682925,75.0747721 97.6196148,77.0783056 96.4498253,79 L75.8124196,79 C77.8387053,77.2115633 79.6621163,75.1985844 81.2437158,73 L99.5852583,73 Z M95.1689122,81 C93.7449202,83.1155572 92.1695234,85.1207336 90.458251,87 L60.4614747,87 C65.1836162,85.86248 69.5430327,83.794147 73.3347255,81 L95.1689122,81 Z M87.6555706,47 L103.762717,47 C101.246684,20.6269305 79.0321807,0 52,0 C23.281193,0 0,23.281193 0,52 C0,77.2277755 17.9651296,98.2595701 41.8000051,103 L62.1999949,103 C67.8794003,101.870444 73.2255333,99.8158975 78.074754,97 L39,97 L39,95 L81.2493857,95 C83.8589242,93.2215015 86.2981855,91.2116653 88.5376609,89 L39,89 L39,87 L43.5385253,87 C27.7389671,83.1940333 16,68.967908 16,52 C16,32.117749 32.117749,16 52,16 C70.1856127,16 85.2217929,29.4843233 87.6555706,47 Z M87.8767787,49 L103.914907,49 C103.971379,49.9928025 104,50.9930589 104,52 C104,53.0069411 103.971379,54.0071975 103.914907,55 L87.8767787,55 C87.958386,54.0107999 88,53.0102597 88,52 C88,50.9897403 87.958386,49.9892001 87.8767787,49 Z\"></path>\n <path d=\"M76,128 C104.718807,128 128,104.718807 128,76 C128,47.281193 104.718807,24 76,24 C47.281193,24 24,47.281193 24,76 C24,104.718807 47.281193,128 76,128 L76,128 Z M76,112 C95.882251,112 112,95.882251 112,76 C112,56.117749 95.882251,40 76,40 C56.117749,40 40,56.117749 40,76 C40,95.882251 56.117749,112 76,112 L76,112 Z\"></path>\n <path d=\"M37,58 L90,58 L90,62 L37,62 L37,58 L37,58 Z M40,50 L93,50 L93,54 L40,54 L40,50 L40,50 Z M40,42 L93,42 L93,46 L40,46 L40,42 L40,42 Z M32,66 L85,66 L85,70 L32,70 L32,66 L32,66 Z M30,74 L83,74 L83,78 L30,78 L30,74 L30,74 Z M27,82 L80,82 L80,86 L27,86 L27,82 L27,82 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/open-window": {
"title": "$:/core/images/open-window",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-open-window tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M16,112 L104.993898,112 C108.863261,112 112,115.590712 112,120 C112,124.418278 108.858091,128 104.993898,128 L7.00610161,128 C3.13673853,128 0,124.409288 0,120 C0,119.998364 4.30952878e-07,119.996727 1.29273572e-06,119.995091 C4.89579306e-07,119.993456 0,119.99182 0,119.990183 L0,24.0098166 C0,19.586117 3.59071231,16 8,16 C12.418278,16 16,19.5838751 16,24.0098166 L16,112 Z\"></path>\n <path d=\"M96,43.1959595 L96,56 C96,60.418278 99.581722,64 104,64 C108.418278,64 112,60.418278 112,56 L112,24 C112,19.5907123 108.415101,16 103.992903,16 L72.0070969,16 C67.5881712,16 64,19.581722 64,24 C64,28.4092877 67.5848994,32 72.0070969,32 L84.5685425,32 L48.2698369,68.2987056 C45.1421332,71.4264093 45.1434327,76.4904296 48.267627,79.614624 C51.3854642,82.7324612 56.4581306,82.7378289 59.5835454,79.6124141 L96,43.1959595 Z M32,7.9992458 C32,3.58138434 35.5881049,0 39.9992458,0 L120.000754,0 C124.418616,0 128,3.5881049 128,7.9992458 L128,88.0007542 C128,92.4186157 124.411895,96 120.000754,96 L39.9992458,96 C35.5813843,96 32,92.4118951 32,88.0007542 L32,7.9992458 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/options-button": {
"title": "$:/core/images/options-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-options-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M110.48779,76.0002544 C109.354214,80.4045063 107.611262,84.5641217 105.354171,88.3838625 L105.354171,88.3838625 L112.07833,95.1080219 C115.20107,98.2307613 115.210098,103.299824 112.089164,106.420759 L106.420504,112.089418 C103.301049,115.208874 98.2346851,115.205502 95.1077675,112.078585 L88.3836082,105.354425 C84.5638673,107.611516 80.4042519,109.354468 76,110.488045 L76,110.488045 L76,119.993281 C76,124.409501 72.4220153,128.000254 68.0083475,128.000254 L59.9916525,128.000254 C55.5800761,128.000254 52,124.41541 52,119.993281 L52,110.488045 C47.5957481,109.354468 43.4361327,107.611516 39.6163918,105.354425 L32.8922325,112.078585 C29.7694931,115.201324 24.7004301,115.210353 21.5794957,112.089418 L15.9108363,106.420759 C12.7913807,103.301303 12.7947522,98.2349395 15.9216697,95.1080219 L22.6458291,88.3838625 C20.3887383,84.5641217 18.6457859,80.4045063 17.5122098,76.0002544 L8.00697327,76.0002544 C3.59075293,76.0002544 2.19088375e-16,72.4222697 4.89347582e-16,68.0086019 L9.80228577e-16,59.9919069 C1.25035972e-15,55.5803305 3.58484404,52.0002544 8.00697327,52.0002544 L17.5122098,52.0002544 C18.6457859,47.5960025 20.3887383,43.4363871 22.6458291,39.6166462 L15.9216697,32.8924868 C12.7989304,29.7697475 12.7899019,24.7006845 15.9108363,21.5797501 L21.5794957,15.9110907 C24.6989513,12.7916351 29.7653149,12.7950065 32.8922325,15.9219241 L39.6163918,22.6460835 C43.4361327,20.3889927 47.5957481,18.6460403 52,17.5124642 L52,8.00722764 C52,3.5910073 55.5779847,0.000254375069 59.9916525,0.000254375069 L68.0083475,0.000254375069 C72.4199239,0.000254375069 76,3.58509841 76,8.00722764 L76,17.5124642 C80.4042519,18.6460403 84.5638673,20.3889927 88.3836082,22.6460835 L95.1077675,15.9219241 C98.2305069,12.7991848 103.29957,12.7901562 106.420504,15.9110907 L112.089164,21.5797501 C115.208619,24.6992057 115.205248,29.7655693 112.07833,32.8924868 L105.354171,39.6166462 L105.354171,39.6166462 C107.611262,43.4363871 109.354214,47.5960025 110.48779,52.0002544 L119.993027,52.0002544 C124.409247,52.0002544 128,55.5782391 128,59.9919069 L128,68.0086019 C128,72.4201783 124.415156,76.0002544 119.993027,76.0002544 L110.48779,76.0002544 L110.48779,76.0002544 Z M64,96.0002544 C81.673112,96.0002544 96,81.6733664 96,64.0002544 C96,46.3271424 81.673112,32.0002544 64,32.0002544 C46.326888,32.0002544 32,46.3271424 32,64.0002544 C32,81.6733664 46.326888,96.0002544 64,96.0002544 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/paint": {
"title": "$:/core/images/paint",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-paint tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M83.5265806,76.1907935 C90.430962,69.2864121 91.8921169,59.0000433 87.9100453,50.6642209 L125.812763,12.7615036 C128.732035,9.84223095 128.72611,5.10322984 125.812796,2.18991592 C122.893542,-0.729338085 118.161775,-0.730617045 115.241209,2.18994966 L77.3384914,40.092667 C69.002669,36.1105954 58.7163002,37.5717503 51.8119188,44.4761317 L83.5265806,76.1907935 L83.5265806,76.1907935 L83.5265806,76.1907935 L83.5265806,76.1907935 Z M80.8836921,78.8336819 L49.1690303,47.1190201 C49.1690303,47.1190201 8.50573364,81.242543 0,80.2820711 C0,80.2820711 3.78222974,85.8744423 6.82737483,88.320684 C20.8514801,82.630792 44.1526049,63.720771 44.1526049,63.720771 L44.8144806,64.3803375 C44.8144806,64.3803375 19.450356,90.2231043 9.18040433,92.0477601 C10.4017154,93.4877138 13.5343883,96.1014812 15.4269991,97.8235871 C20.8439164,96.3356979 50.1595367,69.253789 50.1595367,69.253789 L50.8214124,69.9133555 L18.4136144,100.936036 L23.6993903,106.221812 L56.1060358,75.2002881 L56.7679115,75.8598546 C56.7679115,75.8598546 28.9040131,106.396168 28.0841366,108.291555 C28.0841366,108.291555 34.1159238,115.144621 35.6529617,116.115796 C36.3545333,113.280171 63.5365402,82.6307925 63.5365402,82.6307925 L64.1984159,83.290359 C64.1984159,83.290359 43.6013016,107.04575 39.2343772,120.022559 C42.443736,123.571575 46.7339155,125.159692 50.1595362,126.321151 C47.9699978,114.504469 80.8836921,78.8336819 80.8836921,78.8336819 L80.8836921,78.8336819 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/palette": {
"title": "$:/core/images/palette",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-palette tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M80.2470434,39.1821571 C75.0645698,38.2680897 69.6261555,37.7814854 64.0193999,37.7814854 C28.6624616,37.7814854 0,57.1324214 0,81.0030106 C0,90.644534 4.67604329,99.5487133 12.5805659,106.738252 C23.5031767,91.1899067 26.3405471,72.3946229 36.8885698,63.5622337 C52.0716764,50.8486559 63.4268694,55.7343343 63.4268694,55.7343343 L80.2470434,39.1821571 Z M106.781666,48.8370714 C119.830962,56.749628 128.0388,68.229191 128.0388,81.0030106 C128.0388,90.3534932 128.557501,98.4142085 116.165191,106.082518 C105.367708,112.763955 112.341384,99.546808 104.321443,95.1851533 C96.3015017,90.8234987 84.3749007,96.492742 86.1084305,103.091059 C89.3087234,115.272303 105.529892,114.54645 92.4224435,119.748569 C79.3149955,124.950687 74.2201582,124.224536 64.0193999,124.224536 C56.1979176,124.224536 48.7040365,123.277578 41.7755684,121.544216 C51.620343,117.347916 69.6563669,109.006202 75.129737,102.088562 C82.7876655,92.4099199 87.3713218,80.0000002 83.3235694,72.4837191 C83.1303943,72.1250117 94.5392656,60.81569 106.781666,48.8370714 Z M1.13430476,123.866563 C0.914084026,123.867944 0.693884185,123.868637 0.473712455,123.868637 C33.9526848,108.928928 22.6351223,59.642592 59.2924543,59.6425917 C59.6085574,61.0606542 59.9358353,62.5865065 60.3541977,64.1372318 C34.4465025,59.9707319 36.7873124,112.168427 1.13429588,123.866563 L1.13430476,123.866563 Z M1.84669213,123.859694 C40.7185279,123.354338 79.9985412,101.513051 79.9985401,79.0466836 C70.7284906,79.0466835 65.9257264,75.5670082 63.1833375,71.1051511 C46.585768,64.1019718 32.81846,116.819636 1.84665952,123.859695 L1.84669213,123.859694 Z M67.1980193,59.8524981 C62.748213,63.9666823 72.0838429,76.2846822 78.5155805,71.1700593 C89.8331416,59.8524993 112.468264,37.2173758 123.785825,25.8998146 C135.103386,14.5822535 123.785825,3.26469247 112.468264,14.5822535 C101.150703,25.8998144 78.9500931,48.9868127 67.1980193,59.8524981 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/permalink-button": {
"title": "$:/core/images/permalink-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permalink-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M80.4834582,48 L73.0956761,80 L73.0956761,80 L47.5165418,80 L54.9043239,48 L80.4834582,48 Z M84.1773493,32 L89.8007299,7.64246248 C90.7941633,3.33942958 95.0918297,0.64641956 99.3968675,1.64031585 C103.693145,2.63218977 106.385414,6.93288901 105.390651,11.2416793 L100.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L96.9043239,48 L89.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L85.8226507,96 L80.1992701,120.357538 C79.2058367,124.66057 74.9081703,127.35358 70.6031325,126.359684 C66.3068546,125.36781 63.6145865,121.067111 64.6093491,116.758321 L69.401785,96 L43.8226507,96 L38.1992701,120.357538 C37.2058367,124.66057 32.9081703,127.35358 28.6031325,126.359684 C24.3068546,125.36781 21.6145865,121.067111 22.6093491,116.758321 L27.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L31.0956761,80 L38.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L42.1773493,32 L47.8007299,7.64246248 C48.7941633,3.33942958 53.0918297,0.64641956 57.3968675,1.64031585 C61.6931454,2.63218977 64.3854135,6.93288901 63.3906509,11.2416793 L58.598215,32 L84.1773493,32 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/permaview-button": {
"title": "$:/core/images/permaview-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-permaview-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M81.4834582,48 L79.6365127,56 L79.6365127,56 L74.0573784,56 L75.9043239,48 L81.4834582,48 Z M85.1773493,32 L90.8007299,7.64246248 C91.7941633,3.33942958 96.0918297,0.64641956 100.396867,1.64031585 C104.693145,2.63218977 107.385414,6.93288901 106.390651,11.2416793 L101.598215,32 L104.000754,32 C108.411895,32 112,35.581722 112,40 C112,44.4092877 108.418616,48 104.000754,48 L97.9043239,48 L96.0573784,56 L104.000754,56 C108.411895,56 112,59.581722 112,64 C112,68.4092877 108.418616,72 104.000754,72 L92.3634873,72 L90.5165418,80 L104.000754,80 C108.411895,80 112,83.581722 112,88 C112,92.4092877 108.418616,96 104.000754,96 L86.8226507,96 L81.1992701,120.357538 C80.2058367,124.66057 75.9081703,127.35358 71.6031325,126.359684 C67.3068546,125.36781 64.6145865,121.067111 65.6093491,116.758321 L70.401785,96 L64.8226507,96 L59.1992701,120.357538 C58.2058367,124.66057 53.9081703,127.35358 49.6031325,126.359684 C45.3068546,125.36781 42.6145865,121.067111 43.6093491,116.758321 L48.401785,96 L42.8226507,96 L37.1992701,120.357538 C36.2058367,124.66057 31.9081703,127.35358 27.6031325,126.359684 C23.3068546,125.36781 20.6145865,121.067111 21.6093491,116.758321 L26.401785,96 L23.9992458,96 C19.5881049,96 16,92.418278 16,88 C16,83.5907123 19.5813843,80 23.9992458,80 L30.0956761,80 L31.9426216,72 L23.9992458,72 C19.5881049,72 16,68.418278 16,64 C16,59.5907123 19.5813843,56 23.9992458,56 L35.6365127,56 L37.4834582,48 L23.9992458,48 C19.5881049,48 16,44.418278 16,40 C16,35.5907123 19.5813843,32 23.9992458,32 L41.1773493,32 L46.8007299,7.64246248 C47.7941633,3.33942958 52.0918297,0.64641956 56.3968675,1.64031585 C60.6931454,2.63218977 63.3854135,6.93288901 62.3906509,11.2416793 L57.598215,32 L63.1773493,32 L68.8007299,7.64246248 C69.7941633,3.33942958 74.0918297,0.64641956 78.3968675,1.64031585 C82.6931454,2.63218977 85.3854135,6.93288901 84.3906509,11.2416793 L79.598215,32 L85.1773493,32 Z M53.9043239,48 L52.0573784,56 L57.6365127,56 L59.4834582,48 L53.9043239,48 Z M75.9426216,72 L74.0956761,80 L74.0956761,80 L68.5165418,80 L70.3634873,72 L75.9426216,72 L75.9426216,72 Z M48.3634873,72 L46.5165418,80 L52.0956761,80 L53.9426216,72 L48.3634873,72 L48.3634873,72 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/picture": {
"title": "$:/core/images/picture",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-picture tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M112,68.2332211 L112,20.0027785 C112,17.7898769 110.207895,16 107.997221,16 L20.0027785,16 C17.7898769,16 16,17.792105 16,20.0027785 L16,58.312373 L25.2413115,43.7197989 C28.041793,39.297674 34.2643908,38.7118128 37.8410347,42.5335275 L56.0882845,63.1470817 L69.7748997,56.7400579 C72.766567,55.3552503 76.3013751,55.9473836 78.678437,58.2315339 C78.8106437,58.3585731 79.0742301,58.609836 79.4527088,58.9673596 C80.0910923,59.570398 80.8117772,60.2441563 81.598127,60.9705595 C83.8422198,63.043576 86.1541548,65.1151944 88.3956721,67.0372264 C89.1168795,67.6556396 89.8200801,68.2492007 90.5021258,68.8146755 C92.6097224,70.5620551 94.4693308,72.0029474 95.9836366,73.0515697 C96.7316295,73.5695379 97.3674038,73.9719282 98.0281481,74.3824999 C98.4724987,74.4989557 99.0742374,74.5263881 99.8365134,74.4317984 C101.709944,74.1993272 104.074502,73.2878514 106.559886,71.8846196 C107.705822,71.2376318 108.790494,70.5370325 109.764561,69.8410487 C110.323259,69.4418522 110.694168,69.1550757 110.834827,69.0391868 C111.210545,68.7296319 111.600264,68.4615815 112,68.2332211 L112,68.2332211 Z M0,8.00697327 C0,3.58484404 3.59075293,0 8.00697327,0 L119.993027,0 C124.415156,0 128,3.59075293 128,8.00697327 L128,119.993027 C128,124.415156 124.409247,128 119.993027,128 L8.00697327,128 C3.58484404,128 0,124.409247 0,119.993027 L0,8.00697327 L0,8.00697327 Z M95,42 C99.418278,42 103,38.418278 103,34 C103,29.581722 99.418278,26 95,26 C90.581722,26 87,29.581722 87,34 C87,38.418278 90.581722,42 95,42 L95,42 Z M32,76 C47.8587691,80.8294182 52.0345556,83.2438712 52.0345556,88 C52.0345556,92.7561288 32,95.4712486 32,102.347107 C32,109.222965 33.2849191,107.337637 33.2849191,112 L67.999999,112 C67.999999,112 54.3147136,105.375255 54.3147136,101.200691 C54.3147136,93.535181 64.9302432,92.860755 64.9302432,88 C64.9302432,80.6425555 50.8523779,79.167282 32,76 L32,76 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-language": {
"title": "$:/core/images/plugin-generic-language",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M61.2072232,68.1369825 C56.8829239,70.9319564 54.2082892,74.793177 54.2082892,79.0581634 C54.2082892,86.9638335 63.3980995,93.4821994 75.2498076,94.3940006 C77.412197,98.2964184 83.8475284,101.178858 91.5684735,101.403106 C86.4420125,100.27851 82.4506393,97.6624107 80.9477167,94.3948272 C92.8046245,93.4861461 102,86.9662269 102,79.0581634 C102,70.5281905 91.3014611,63.6132813 78.1041446,63.6132813 C71.5054863,63.6132813 65.5315225,65.3420086 61.2072232,68.1369825 Z M74.001066,53.9793443 C69.6767667,56.7743182 63.7028029,58.5030456 57.1041446,58.5030456 C54.4851745,58.5030456 51.9646095,58.2307276 49.6065315,57.7275105 C46.2945155,59.9778212 41.2235699,61.4171743 35.5395922,61.4171743 C35.4545771,61.4171743 35.3696991,61.4168523 35.2849622,61.4162104 C39.404008,60.5235193 42.7961717,58.6691298 44.7630507,56.286533 C37.8379411,53.5817651 33.2082892,48.669413 33.2082892,43.0581634 C33.2082892,34.5281905 43.9068281,27.6132812 57.1041446,27.6132812 C70.3014611,27.6132812 81,34.5281905 81,43.0581634 C81,47.3231498 78.3253653,51.1843704 74.001066,53.9793443 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-plugin": {
"title": "$:/core/images/plugin-generic-plugin",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M40.3972881,76.4456988 L40.3972881,95.3404069 L54.5170166,95.3404069 L54.5170166,95.3404069 C54.5165526,95.3385183 54.516089,95.3366295 54.515626,95.3347404 C54.6093153,95.3385061 54.7034848,95.3404069 54.7980982,95.3404069 C58.6157051,95.3404069 61.710487,92.245625 61.710487,88.4280181 C61.710487,86.6197822 61.01617,84.9737128 59.8795929,83.7418666 L59.8795929,83.7418666 C59.8949905,83.7341665 59.9104102,83.7265043 59.925852,83.7188798 C58.8840576,82.5086663 58.2542926,80.9336277 58.2542926,79.2114996 C58.2542926,75.3938927 61.3490745,72.2991108 65.1666814,72.2991108 C68.9842884,72.2991108 72.0790703,75.3938927 72.0790703,79.2114996 C72.0790703,81.1954221 71.2432806,82.9841354 69.9045961,84.2447446 L69.9045961,84.2447446 C69.9333407,84.2629251 69.9619885,84.281245 69.9905383,84.2997032 L69.9905383,84.2997032 C69.1314315,85.4516923 68.6228758,86.8804654 68.6228758,88.4280181 C68.6228758,91.8584969 71.1218232,94.7053153 74.3986526,95.2474079 C74.3913315,95.2784624 74.3838688,95.3094624 74.3762652,95.3404069 L95.6963988,95.3404069 L95.6963988,75.5678578 L95.6963988,75.5678578 C95.6466539,75.5808558 95.5967614,75.5934886 95.5467242,75.6057531 C95.5504899,75.5120637 95.5523907,75.4178943 95.5523907,75.3232809 C95.5523907,71.505674 92.4576088,68.4108921 88.6400019,68.4108921 C86.831766,68.4108921 85.1856966,69.105209 83.9538504,70.2417862 L83.9538504,70.2417862 C83.9461503,70.2263886 83.938488,70.2109688 83.9308636,70.1955271 C82.7206501,71.2373215 81.1456115,71.8670865 79.4234834,71.8670865 C75.6058765,71.8670865 72.5110946,68.7723046 72.5110946,64.9546976 C72.5110946,61.1370907 75.6058765,58.0423088 79.4234834,58.0423088 C81.4074059,58.0423088 83.1961192,58.8780985 84.4567284,60.2167829 L84.4567284,60.2167829 C84.4749089,60.1880383 84.4932288,60.1593906 84.511687,60.1308407 L84.511687,60.1308407 C85.6636761,60.9899475 87.0924492,61.4985032 88.6400019,61.4985032 C92.0704807,61.4985032 94.9172991,58.9995558 95.4593917,55.7227265 C95.538755,55.7414363 95.6177614,55.761071 95.6963988,55.7816184 L95.6963988,40.0412962 L74.3762652,40.0412962 L74.3762652,40.0412962 C74.3838688,40.0103516 74.3913315,39.9793517 74.3986526,39.9482971 L74.3986526,39.9482971 C71.1218232,39.4062046 68.6228758,36.5593862 68.6228758,33.1289073 C68.6228758,31.5813547 69.1314315,30.1525815 69.9905383,29.0005925 C69.9619885,28.9821342 69.9333407,28.9638143 69.9045961,28.9456339 C71.2432806,27.6850247 72.0790703,25.8963113 72.0790703,23.9123888 C72.0790703,20.0947819 68.9842884,17 65.1666814,17 C61.3490745,17 58.2542926,20.0947819 58.2542926,23.9123888 C58.2542926,25.6345169 58.8840576,27.2095556 59.925852,28.419769 L59.925852,28.419769 C59.9104102,28.4273935 59.8949905,28.4350558 59.8795929,28.4427558 C61.01617,29.674602 61.710487,31.3206715 61.710487,33.1289073 C61.710487,36.9465143 58.6157051,40.0412962 54.7980982,40.0412962 C54.7034848,40.0412962 54.6093153,40.0393953 54.515626,40.0356296 L54.515626,40.0356296 C54.516089,40.0375187 54.5165526,40.0394075 54.5170166,40.0412962 L40.3972881,40.0412962 L40.3972881,52.887664 L40.3972881,52.887664 C40.4916889,53.3430132 40.5412962,53.8147625 40.5412962,54.2980982 C40.5412962,58.1157051 37.4465143,61.210487 33.6289073,61.210487 C32.0813547,61.210487 30.6525815,60.7019313 29.5005925,59.8428245 C29.4821342,59.8713744 29.4638143,59.9000221 29.4456339,59.9287667 C28.1850247,58.5900823 26.3963113,57.7542926 24.4123888,57.7542926 C20.5947819,57.7542926 17.5,60.8490745 17.5,64.6666814 C17.5,68.4842884 20.5947819,71.5790703 24.4123888,71.5790703 C26.134517,71.5790703 27.7095556,70.9493053 28.919769,69.9075109 L28.919769,69.9075109 C28.9273935,69.9229526 28.9350558,69.9383724 28.9427558,69.95377 C30.174602,68.8171928 31.8206715,68.1228758 33.6289073,68.1228758 C37.4465143,68.1228758 40.5412962,71.2176578 40.5412962,75.0352647 C40.5412962,75.5186004 40.4916889,75.9903496 40.3972881,76.4456988 Z M64,0 L118.5596,32 L118.5596,96 L64,128 L9.44039956,96 L9.44039956,32 L64,0 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/plugin-generic-theme": {
"title": "$:/core/images/plugin-generic-theme",
"tags": "$:/tags/Image",
"text": "<svg width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M29.4078519,91.4716406 L51.4693474,69.4101451 L51.4646675,69.4054652 C50.5969502,68.5377479 50.5929779,67.1348725 51.4693474,66.2585029 C52.3396494,65.3882009 53.7499654,65.3874786 54.6163097,66.2538229 L64.0805963,75.7181095 C64.9483136,76.5858268 64.9522859,77.9887022 64.0759163,78.8650718 C63.2056143,79.7353737 61.7952984,79.736096 60.9289541,78.8697517 L60.9242741,78.8650718 L60.9242741,78.8650718 L38.8627786,100.926567 C36.2518727,103.537473 32.0187578,103.537473 29.4078519,100.926567 C26.796946,98.3156614 26.796946,94.0825465 29.4078519,91.4716406 Z M60.8017407,66.3810363 C58.3659178,63.6765806 56.3370667,61.2899536 54.9851735,59.5123615 C48.1295381,50.4979488 44.671561,55.2444054 40.7586738,59.5123614 C36.8457866,63.7803174 41.789473,67.2384487 38.0759896,70.2532832 C34.3625062,73.2681177 34.5917646,74.3131575 28.3243876,68.7977024 C22.0570105,63.2822473 21.6235306,61.7636888 24.5005999,58.6166112 C27.3776691,55.4695337 29.7823103,60.4247912 35.6595047,54.8320442 C41.5366991,49.2392972 36.5996215,44.2825646 36.5996215,44.2825646 C36.5996215,44.2825646 48.8365511,19.267683 65.1880231,21.1152173 C81.5394952,22.9627517 59.0022276,18.7228947 53.3962199,38.3410355 C50.9960082,46.7405407 53.8429162,44.7613399 58.3941742,48.3090467 C59.7875202,49.3951602 64.4244828,52.7100463 70.1884353,56.9943417 L90.8648751,36.3179019 L92.4795866,31.5515482 L100.319802,26.8629752 L103.471444,30.0146174 L98.782871,37.8548326 L94.0165173,39.4695441 L73.7934912,59.6925702 C86.4558549,69.2403631 102.104532,81.8392557 102.104532,86.4016913 C102.104533,93.6189834 99.0337832,97.9277545 92.5695848,95.5655717 C87.8765989,93.8506351 73.8015497,80.3744087 63.8173444,69.668717 L60.9242741,72.5617873 L57.7726319,69.4101451 L60.8017407,66.3810363 L60.8017407,66.3810363 Z M63.9533761,1.42108547e-13 L118.512977,32 L118.512977,96 L63.9533761,128 L9.39377563,96 L9.39377563,32 L63.9533761,1.42108547e-13 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/preview-closed": {
"title": "$:/core/images/preview-closed",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-preview-closed tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M0.0881363238,64 C-0.210292223,65.8846266 0.249135869,67.8634737 1.4664206,69.4579969 C16.2465319,88.8184886 39.1692554,100.414336 64,100.414336 C88.8307446,100.414336 111.753468,88.8184886 126.533579,69.4579969 C127.750864,67.8634737 128.210292,65.8846266 127.911864,64 C110.582357,78.4158332 88.3036732,87.0858436 64,87.0858436 C39.6963268,87.0858436 17.4176431,78.4158332 0.0881363238,64 Z\"></path>\n <rect x=\"62\" y=\"96\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(80.000000, 101.000000) rotate(-5.000000) translate(-80.000000, -101.000000) \" x=\"78\" y=\"93\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(48.000000, 101.000000) rotate(-355.000000) translate(-48.000000, -101.000000) \" x=\"46\" y=\"93\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(32.000000, 96.000000) rotate(-350.000000) translate(-32.000000, -96.000000) \" x=\"30\" y=\"88\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(96.000000, 96.000000) rotate(-10.000000) translate(-96.000000, -96.000000) \" x=\"94\" y=\"88\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(112.000000, 88.000000) rotate(-20.000000) translate(-112.000000, -88.000000) \" x=\"110\" y=\"80\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n <rect transform=\"translate(16.000000, 88.000000) rotate(-340.000000) translate(-16.000000, -88.000000) \" x=\"14\" y=\"80\" width=\"4\" height=\"16\" rx=\"4\"></rect>\n </g>\n</svg>"
},
"$:/core/images/preview-open": {
"title": "$:/core/images/preview-open",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-preview-open tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64.1099282,99.5876785 C39.2791836,99.5876785 16.3564602,87.9918313 1.57634884,68.6313396 C-0.378878622,66.070184 -0.378878622,62.5174945 1.57634884,59.9563389 C16.3564602,40.5958472 39.2791836,29 64.1099282,29 C88.9406729,29 111.863396,40.5958472 126.643508,59.9563389 C128.598735,62.5174945 128.598735,66.070184 126.643508,68.6313396 C111.863396,87.9918313 88.9406729,99.5876785 64.1099282,99.5876785 Z M110.213805,67.5808331 C111.654168,66.0569335 111.654168,63.9430665 110.213805,62.4191669 C99.3257042,50.8995835 82.4391647,44 64.1470385,44 C45.8549124,44 28.9683729,50.8995835 18.0802717,62.4191669 C16.6399094,63.9430665 16.6399094,66.0569335 18.0802717,67.5808331 C28.9683729,79.1004165 45.8549124,86 64.1470385,86 C82.4391647,86 99.3257042,79.1004165 110.213805,67.5808331 Z\"></path>\n <path d=\"M63.5,88 C76.4786916,88 87,77.4786916 87,64.5 C87,51.5213084 76.4786916,41 63.5,41 C50.5213084,41 40,51.5213084 40,64.5 C40,77.4786916 50.5213084,88 63.5,88 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/print-button": {
"title": "$:/core/images/print-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-print-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M112,71 L112,30.5 L111.96811,30.5 L111.96811,30.5 C111.932942,28.4998414 111.151676,26.510538 109.625176,24.9840387 L86.9982489,2.35711116 C85.3482153,0.707077645 83.1589869,-0.071534047 81,0.0201838424 L81,0 L23.9992458,0 C19.5808867,0 16,3.58213437 16,8.00092105 L16,71 L24,71 L24,8 L81,8 L81,22.4996539 C81,26.9216269 84.5818769,30.5 89.0003461,30.5 L104,30.5 L104,71 L112,71 Z\"></path>\n <rect x=\"32\" y=\"36\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"52\" width=\"64\" height=\"8\" rx=\"4\"></rect>\n <rect x=\"32\" y=\"20\" width=\"40\" height=\"8\" rx=\"4\"></rect>\n <path d=\"M0,80.0054195 C0,71.1658704 7.15611005,64 16.0008841,64 L111.999116,64 C120.83616,64 128,71.1553215 128,80.0054195 L128,111.99458 C128,120.83413 120.84389,128 111.999116,128 L16.0008841,128 C7.16383982,128 0,120.844679 0,111.99458 L0,80.0054195 Z M104,96 C108.418278,96 112,92.418278 112,88 C112,83.581722 108.418278,80 104,80 C99.581722,80 96,83.581722 96,88 C96,92.418278 99.581722,96 104,96 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/quote": {
"title": "$:/core/images/quote",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-quote tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M51.2188077,117.712501 L51.2188077,62.1993386 L27.4274524,62.1993386 C27.4274524,53.3075754 29.1096526,45.797753 32.4741035,39.669646 C35.8385544,33.541539 42.0867267,28.9154883 51.2188077,25.7913554 L51.2188077,2 C43.7689521,2.96127169 36.8599155,5.18417913 30.4914905,8.668789 C24.1230656,12.1533989 18.6559149,16.5391352 14.0898743,21.8261295 C9.52383382,27.1131238 5.97919764,33.2411389 3.45585945,40.2103586 C0.932521268,47.1795784 -0.208971741,54.6293222 0.0313461819,62.5598136 L0.0313461819,117.712501 L51.2188077,117.712501 Z M128,117.712501 L128,62.1993386 L104.208645,62.1993386 C104.208645,53.3075754 105.890845,45.797753 109.255296,39.669646 C112.619747,33.541539 118.867919,28.9154883 128,25.7913554 L128,2 C120.550144,2.96127169 113.641108,5.18417913 107.272683,8.668789 C100.904258,12.1533989 95.4371072,16.5391352 90.8710666,21.8261295 C86.3050261,27.1131238 82.7603899,33.2411389 80.2370517,40.2103586 C77.7137136,47.1795784 76.5722206,54.6293222 76.8125385,62.5598136 L76.8125385,117.712501 L128,117.712501 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/refresh-button": {
"title": "$:/core/images/refresh-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-refresh-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M106.369002,39.4325143 C116.529932,60.3119371 112.939592,86.1974934 95.5979797,103.539105 C73.7286194,125.408466 38.2713806,125.408466 16.4020203,103.539105 C-5.46734008,81.6697449 -5.46734008,46.2125061 16.4020203,24.3431458 C19.5262146,21.2189514 24.5915344,21.2189514 27.7157288,24.3431458 C30.8399231,27.4673401 30.8399231,32.5326599 27.7157288,35.6568542 C12.0947571,51.2778259 12.0947571,76.6044251 27.7157288,92.2253967 C43.3367004,107.846368 68.6632996,107.846368 84.2842712,92.2253967 C97.71993,78.7897379 99.5995262,58.1740623 89.9230597,42.729491 L83.4844861,54.9932839 C81.4307001,58.9052072 76.5945372,60.4115251 72.682614,58.3577391 C68.7706907,56.3039532 67.2643728,51.4677903 69.3181587,47.555867 L84.4354914,18.7613158 C86.4966389,14.8353707 91.3577499,13.3347805 95.273202,15.415792 L124.145886,30.7612457 C128.047354,32.8348248 129.52915,37.6785572 127.455571,41.5800249 C125.381992,45.4814927 120.53826,46.9632892 116.636792,44.8897102 L106.369002,39.4325143 Z M98.1470904,27.0648707 C97.9798954,26.8741582 97.811187,26.6843098 97.6409651,26.4953413 L98.6018187,26.1987327 L98.1470904,27.0648707 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/right-arrow": {
"title": "$:/core/images/right-arrow",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-right-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path d=\"M80.3563798,109.353315 C78.9238993,110.786918 76.9450203,111.675144 74.7592239,111.675144 L-4.40893546,111.675144 C-8.77412698,111.675144 -12.3248558,108.130732 -12.3248558,103.758478 C-12.3248558,99.3951199 -8.78077754,95.8418109 -4.40893546,95.8418109 L66.8418109,95.8418109 L66.8418109,24.5910645 C66.8418109,20.225873 70.3862233,16.6751442 74.7584775,16.6751442 C79.1218352,16.6751442 82.6751442,20.2192225 82.6751442,24.5910645 L82.6751442,103.759224 C82.6751442,105.941695 81.7891419,107.920575 80.3566508,109.353886 Z\" transform=\"translate(35.175144, 64.175144) rotate(-45.000000) translate(-35.175144, -64.175144) \"></path>\n</svg>"
},
"$:/core/images/save-button": {
"title": "$:/core/images/save-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-save-button tc-image-button\" viewBox=\"0 0 128 128\" width=\"22pt\" height=\"22pt\">\n <g fill-rule=\"evenodd\">\n <path d=\"M120.78304,34.329058 C125.424287,43.1924006 128.049406,53.2778608 128.049406,63.9764502 C128.049406,99.3226742 99.3956295,127.97645 64.0494055,127.97645 C28.7031816,127.97645 0.0494055385,99.3226742 0.0494055385,63.9764502 C0.0494055385,28.6302262 28.7031816,-0.0235498012 64.0494055,-0.0235498012 C82.8568763,-0.0235498012 99.769563,8.08898558 111.479045,21.0056358 L114.159581,18.3250998 C117.289194,15.1954866 122.356036,15.1939641 125.480231,18.3181584 C128.598068,21.4359957 128.601317,26.5107804 125.473289,29.6388083 L120.78304,34.329058 Z M108.72451,46.3875877 C110.870571,51.8341374 112.049406,57.767628 112.049406,63.9764502 C112.049406,90.4861182 90.5590735,111.97645 64.0494055,111.97645 C37.5397375,111.97645 16.0494055,90.4861182 16.0494055,63.9764502 C16.0494055,37.4667822 37.5397375,15.9764502 64.0494055,15.9764502 C78.438886,15.9764502 91.3495036,22.308215 100.147097,32.3375836 L58.9411255,73.5435552 L41.975581,56.5780107 C38.8486152,53.4510448 33.7746915,53.4551552 30.6568542,56.5729924 C27.5326599,59.6971868 27.5372202,64.7670668 30.6618725,67.8917192 L53.279253,90.5090997 C54.8435723,92.073419 56.8951519,92.8541315 58.9380216,92.8558261 C60.987971,92.8559239 63.0389578,92.0731398 64.6049211,90.5071765 L108.72451,46.3875877 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/size": {
"title": "$:/core/images/size",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-size tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <path d=\"M92.3431458,26 L83.1715729,35.1715729 C81.6094757,36.73367 81.6094757,39.26633 83.1715729,40.8284271 C84.73367,42.3905243 87.26633,42.3905243 88.8284271,40.8284271 L104.828427,24.8284271 C106.390524,23.26633 106.390524,20.73367 104.828427,19.1715729 L88.8284271,3.17157288 C87.26633,1.60947571 84.73367,1.60947571 83.1715729,3.17157288 C81.6094757,4.73367004 81.6094757,7.26632996 83.1715729,8.82842712 L92.3431457,18 L22,18 C19.790861,18 18,19.790861 18,22 L18,92.3431458 L8.82842712,83.1715729 C7.26632996,81.6094757 4.73367004,81.6094757 3.17157288,83.1715729 C1.60947571,84.73367 1.60947571,87.26633 3.17157288,88.8284271 L19.1715729,104.828427 C20.73367,106.390524 23.26633,106.390524 24.8284271,104.828427 L40.8284271,88.8284271 C42.3905243,87.26633 42.3905243,84.73367 40.8284271,83.1715729 C39.26633,81.6094757 36.73367,81.6094757 35.1715729,83.1715729 L26,92.3431458 L26,22 L22,26 L92.3431458,26 L92.3431458,26 Z M112,52 L112,116 L116,112 L52,112 C49.790861,112 48,113.790861 48,116 C48,118.209139 49.790861,120 52,120 L116,120 C118.209139,120 120,118.209139 120,116 L120,52 C120,49.790861 118.209139,48 116,48 C113.790861,48 112,49.790861 112,52 L112,52 Z\"></path>\n</svg>"
},
"$:/core/images/spiral": {
"title": "$:/core/images/spiral",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-spiral tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M64.534 68.348c3.39 0 6.097-2.62 6.476-5.968l-4.755-.538 4.75.583c.377-3.07-1.194-6.054-3.89-7.78-2.757-1.773-6.34-2.01-9.566-.7-3.46 1.403-6.14 4.392-7.35 8.148l-.01.026c-1.3 4.08-.72 8.64 1.58 12.52 2.5 4.2 6.77 7.2 11.76 8.27 5.37 1.15 11.11-.05 15.83-3.31 5.04-3.51 8.46-9.02 9.45-15.3 1.05-6.7-.72-13.63-4.92-19.19l.02.02c-4.42-5.93-11.2-9.82-18.78-10.78-7.96-1.01-16.13 1.31-22.59 6.43-6.81 5.39-11.18 13.41-12.11 22.26-.98 9.27 1.87 18.65 7.93 26.02 6.32 7.69 15.6 12.56 25.74 13.48 10.54.96 21.15-2.42 29.45-9.4l.01-.01c8.58-7.25 13.94-17.78 14.86-29.21.94-11.84-2.96-23.69-10.86-32.9-8.19-9.5-19.95-15.36-32.69-16.27-13.16-.94-26.24 3.49-36.34 12.34l.01-.01c-10.41 9.08-16.78 22.1-17.68 36.15-.93 14.44 4.03 28.77 13.79 39.78 10.03 11.32 24.28 18.2 39.6 19.09 15.73.92 31.31-4.56 43.24-15.234 12.23-10.954 19.61-26.44 20.5-43.074.14-2.64-1.89-4.89-4.52-5.03-2.64-.14-4.89 1.88-5.03 4.52-.75 14.1-7 27.2-17.33 36.45-10.03 8.98-23.11 13.58-36.3 12.81-12.79-.75-24.67-6.48-33-15.89-8.07-9.11-12.17-20.94-11.41-32.827.74-11.52 5.942-22.15 14.43-29.54l.01-.01c8.18-7.17 18.74-10.75 29.35-9.998 10.21.726 19.6 5.41 26.11 12.96 6.24 7.273 9.32 16.61 8.573 25.894-.718 8.9-4.88 17.064-11.504 22.66l.01-.007c-6.36 5.342-14.44 7.92-22.425 7.19-7.604-.68-14.52-4.314-19.21-10.027-4.44-5.4-6.517-12.23-5.806-18.94.67-6.3 3.76-11.977 8.54-15.766 4.46-3.54 10.05-5.128 15.44-4.44 5.03.63 9.46 3.18 12.32 7.01l.02.024c2.65 3.5 3.75 7.814 3.1 11.92-.59 3.71-2.58 6.925-5.45 8.924-2.56 1.767-5.61 2.403-8.38 1.81-2.42-.516-4.42-1.92-5.53-3.79-.93-1.56-1.15-3.3-.69-4.75l-4.56-1.446L59.325 65c.36-1.12 1.068-1.905 1.84-2.22.25-.103.48-.14.668-.13.06.006.11.015.14.025.01 0 .01 0-.01-.01-.02-.015-.054-.045-.094-.088-.06-.064-.12-.145-.17-.244-.15-.29-.23-.678-.18-1.11l-.005.04c.15-1.332 1.38-2.523 3.035-2.523-2.65 0-4.79 2.144-4.79 4.787s2.14 4.785 4.78 4.785z\"></path>\n </g>\n</svg>"
},
"$:/core/images/stamp": {
"title": "$:/core/images/stamp",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-stamp tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M49.7334301,64 L16.0098166,64 C11.5838751,64 8,67.5829053 8,72.002643 L8,74.4986785 L8,97 L120,97 L120,74.4986785 L120,72.002643 C120,67.5737547 116.413883,64 111.990183,64 L78.2665699,64 C76.502049,60.7519149 75.5,57.0311962 75.5,53.0769231 C75.5,46.6017951 78.1869052,40.7529228 82.5087769,36.5800577 C85.3313113,32.7688808 87,28.0549983 87,22.952183 C87,10.2760423 76.7025492,0 64,0 C51.2974508,0 41,10.2760423 41,22.952183 C41,28.0549983 42.6686887,32.7688808 45.4912231,36.5800577 C49.8130948,40.7529228 52.5,46.6017951 52.5,53.0769231 C52.5,57.0311962 51.497951,60.7519149 49.7334301,64 Z M8,104 L120,104 L120,112 L8,112 L8,104 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/star-filled": {
"title": "$:/core/images/star-filled",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-star-filled tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"nonzero\">\n <path d=\"M61.8361286,96.8228569 L99.1627704,124.110219 C101.883827,126.099427 105.541968,123.420868 104.505636,120.198072 L90.2895569,75.9887263 L89.0292911,79.8977279 L126.314504,52.5528988 C129.032541,50.5595011 127.635256,46.2255025 124.273711,46.2229134 L78.1610486,46.1873965 L81.4604673,48.6032923 L67.1773543,4.41589688 C66.1361365,1.19470104 61.6144265,1.19470104 60.5732087,4.41589688 L46.2900957,48.6032923 L49.5895144,46.1873965 L3.47685231,46.2229134 C0.115307373,46.2255025 -1.28197785,50.5595011 1.43605908,52.5528988 L38.7212719,79.8977279 L37.4610061,75.9887263 L23.2449266,120.198072 C22.2085954,123.420868 25.8667356,126.099427 28.5877926,124.110219 L65.9144344,96.8228569 L61.8361286,96.8228569 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-classic": {
"title": "$:/core/images/storyview-classic",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-classic tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-pop": {
"title": "$:/core/images/storyview-pop",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-pop tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.5776607 16,23.9924054 L16,40.0075946 C16,44.4216782 19.5881049,48 23.9992458,48 L104.000754,48 C108.418616,48 112,44.4223393 112,40.0075946 L112,23.9924054 C112,19.5783218 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z M16.0098166,56 C11.586117,56 8,59.5776607 8,63.9924054 L8,80.0075946 C8,84.4216782 11.5838751,88 16.0098166,88 L111.990183,88 C116.413883,88 120,84.4223393 120,80.0075946 L120,63.9924054 C120,59.5783218 116.416125,56 111.990183,56 L16.0098166,56 L16.0098166,56 Z M23.9992458,96 C19.5813843,96 16,99.5907123 16,104 C16,108.418278 19.5881049,112 23.9992458,112 L104.000754,112 C108.418616,112 112,108.409288 112,104 C112,99.581722 108.411895,96 104.000754,96 L23.9992458,96 L23.9992458,96 Z M23.9992458,64 C19.5813843,64 16,67.5907123 16,72 C16,76.418278 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.4092877 112,72 C112,67.581722 108.411895,64 104.000754,64 L23.9992458,64 L23.9992458,64 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/storyview-zoomin": {
"title": "$:/core/images/storyview-zoomin",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-storyview-zoomin tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M8.00697327,0 C3.58484404,0 0,3.59075293 0,8.00697327 L0,119.993027 C0,124.415156 3.59075293,128 8.00697327,128 L119.993027,128 C124.415156,128 128,124.409247 128,119.993027 L128,8.00697327 C128,3.58484404 124.409247,0 119.993027,0 L8.00697327,0 L8.00697327,0 Z M23.9992458,16 C19.5813843,16 16,19.578055 16,24.0085154 L16,71.9914846 C16,76.4144655 19.5881049,80 23.9992458,80 L104.000754,80 C108.418616,80 112,76.421945 112,71.9914846 L112,24.0085154 C112,19.5855345 108.411895,16 104.000754,16 L23.9992458,16 L23.9992458,16 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/strikethrough": {
"title": "$:/core/images/strikethrough",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-strikethrough tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M92.793842,38.7255689 L108.215529,38.7255689 C107.987058,31.985687 106.70193,26.1883331 104.360107,21.3333333 C102.018284,16.4783336 98.8197436,12.4516001 94.7643909,9.25301205 C90.7090382,6.05442399 85.9969032,3.71263572 80.6278447,2.22757697 C75.2587862,0.742518233 69.4328739,0 63.1499331,0 C57.552404,0 52.0977508,0.713959839 46.7858099,2.14190094 C41.473869,3.56984203 36.7331757,5.74027995 32.5635877,8.65327979 C28.3939997,11.5662796 25.0526676,15.2788708 22.5394913,19.7911647 C20.026315,24.3034585 18.7697456,29.6438781 18.7697456,35.8125837 C18.7697456,41.4101128 19.883523,46.0651309 22.1111111,49.7777778 C24.3386992,53.4904246 27.3087722,56.5176144 31.021419,58.8594378 C34.7340659,61.2012612 38.9321497,63.0861151 43.6157965,64.5140562 C48.2994433,65.9419973 53.068695,67.1985666 57.9236948,68.2838019 C62.7786945,69.3690371 67.5479462,70.4256977 72.231593,71.4538153 C76.9152398,72.4819329 81.1133237,73.8241773 84.8259705,75.480589 C88.5386174,77.1370007 91.5086903,79.2788802 93.7362784,81.9062918 C95.9638666,84.5337035 97.0776439,87.9607107 97.0776439,92.1874163 C97.0776439,96.6425926 96.1637753,100.298067 94.3360107,103.153949 C92.5082461,106.009831 90.109341,108.265944 87.1392236,109.922356 C84.1691061,111.578768 80.827774,112.749662 77.1151272,113.435074 C73.4024803,114.120485 69.7184476,114.463186 66.0629183,114.463186 C61.4935068,114.463186 57.0383974,113.892018 52.6974565,112.749665 C48.3565156,111.607312 44.5582492,109.836692 41.3025435,107.437751 C38.0468378,105.03881 35.4194656,101.983062 33.4203481,98.270415 C31.4212305,94.5577681 30.4216867,90.1312171 30.4216867,84.9906292 L15,84.9906292 C15,92.4159229 16.3422445,98.8415614 19.0267738,104.267738 C21.711303,109.693914 25.3667774,114.149023 29.9933066,117.633199 C34.6198357,121.117376 39.9888137,123.71619 46.1004016,125.429719 C52.2119895,127.143248 58.6947448,128 65.5488621,128 C71.1463912,128 76.7723948,127.343157 82.4270415,126.029451 C88.0816882,124.715745 93.1936407,122.602424 97.7630522,119.689424 C102.332464,116.776425 106.073613,113.006717 108.986613,108.380187 C111.899613,103.753658 113.356091,98.1847715 113.356091,91.6733601 C113.356091,85.6188899 112.242314,80.5926126 110.014726,76.5943775 C107.787137,72.5961424 104.817065,69.2833688 101.104418,66.6559572 C97.3917708,64.0285455 93.193687,61.9437828 88.5100402,60.4016064 C83.8263934,58.85943 79.0571416,57.5171855 74.2021419,56.3748327 C69.3471422,55.2324798 64.5778904,54.1758192 59.8942436,53.2048193 C55.2105968,52.2338193 51.012513,51.0058084 47.2998661,49.5207497 C43.5872193,48.0356909 40.6171463,46.1222786 38.3895582,43.7804552 C36.1619701,41.4386318 35.0481928,38.3828836 35.0481928,34.6131191 C35.0481928,30.6148841 35.8192694,27.273552 37.3614458,24.5890228 C38.9036222,21.9044935 40.9598265,19.762614 43.5301205,18.1633199 C46.1004145,16.5640259 49.041929,15.4216902 52.3547523,14.7362784 C55.6675757,14.0508667 59.0374661,13.708166 62.4645248,13.708166 C70.9179361,13.708166 77.8576257,15.6786952 83.2838019,19.6198126 C88.709978,23.56093 91.8799597,29.9294518 92.793842,38.7255689 L92.793842,38.7255689 Z\"></path>\n <rect x=\"5\" y=\"54\" width=\"118\" height=\"16\"></rect>\n </g>\n</svg>"
},
"$:/core/images/subscript": {
"title": "$:/core/images/subscript",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-subscript tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M2.27170276,16 L22.1825093,16 L43.8305003,49.6746527 L66.4138983,16 L85.1220387,16 L53.5854592,61.9685735 L87.3937414,111.411516 L67.0820462,111.411516 L43.295982,74.9306422 L19.1090291,111.411516 L0,111.411516 L33.8082822,61.9685735 L2.27170276,16 Z M127.910914,128.411516 L85.3276227,128.411516 C85.3870139,123.24448 86.6342108,118.730815 89.0692508,114.870386 C91.5042907,111.009956 94.8301491,107.654403 99.0469256,104.803624 C101.066227,103.318844 103.174584,101.878629 105.372059,100.482935 C107.569534,99.0872413 109.588805,97.5876355 111.429933,95.9840726 C113.271061,94.3805097 114.785514,92.6433426 115.973338,90.7725192 C117.161163,88.9016958 117.784761,86.7487964 117.844152,84.3137564 C117.844152,83.1853233 117.710524,81.9826691 117.443264,80.7057579 C117.176003,79.4288467 116.656338,78.2410402 115.884252,77.1423026 C115.112166,76.0435651 114.04314,75.123015 112.677142,74.3806248 C111.311144,73.6382345 109.529434,73.267045 107.331959,73.267045 C105.312658,73.267045 103.634881,73.6679297 102.298579,74.4697112 C100.962276,75.2714926 99.8932503,76.3702137 99.0914688,77.7659073 C98.2896874,79.161601 97.6957841,80.8096826 97.3097412,82.7102016 C96.9236982,84.6107206 96.7009845,86.6596869 96.6415933,88.857162 L86.4857457,88.857162 C86.4857457,85.4124713 86.9460207,82.2202411 87.8665846,79.2803758 C88.7871485,76.3405105 90.1679736,73.801574 92.0091014,71.6634901 C93.8502292,69.5254062 96.092214,67.8476295 98.7351233,66.6301095 C101.378033,65.4125895 104.451482,64.8038386 107.955564,64.8038386 C111.756602,64.8038386 114.933984,65.4274371 117.487807,66.6746527 C120.041629,67.9218683 122.105443,69.4957119 123.67931,71.3962309 C125.253178,73.2967499 126.366746,75.3605638 127.02005,77.5877345 C127.673353,79.8149053 128,81.9381095 128,83.9574109 C128,86.4518421 127.613963,88.7086746 126.841877,90.727976 C126.069791,92.7472774 125.03046,94.6032252 123.723854,96.2958749 C122.417247,97.9885247 120.932489,99.5475208 119.269534,100.97291 C117.60658,102.398299 115.884261,103.734582 114.102524,104.981797 C112.320788,106.229013 110.539078,107.416819 108.757341,108.545253 C106.975605,109.673686 105.327523,110.802102 103.813047,111.930535 C102.298571,113.058968 100.977136,114.231927 99.8487031,115.449447 C98.7202699,116.666967 97.9481956,117.958707 97.5324571,119.324705 L127.910914,119.324705 L127.910914,128.411516 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/superscript": {
"title": "$:/core/images/superscript",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-superscript tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M2.27170276,16 L22.1825093,16 L43.8305003,49.6746527 L66.4138983,16 L85.1220387,16 L53.5854592,61.9685735 L87.3937414,111.411516 L67.0820462,111.411516 L43.295982,74.9306422 L19.1090291,111.411516 L0,111.411516 L33.8082822,61.9685735 L2.27170276,16 Z M127.910914,63.4115159 L85.3276227,63.4115159 C85.3870139,58.2444799 86.6342108,53.7308149 89.0692508,49.8703857 C91.5042907,46.0099565 94.8301491,42.654403 99.0469256,39.8036245 C101.066227,38.318844 103.174584,36.8786285 105.372059,35.4829349 C107.569534,34.0872413 109.588805,32.5876355 111.429933,30.9840726 C113.271061,29.3805097 114.785514,27.6433426 115.973338,25.7725192 C117.161163,23.9016958 117.784761,21.7487964 117.844152,19.3137564 C117.844152,18.1853233 117.710524,16.9826691 117.443264,15.7057579 C117.176003,14.4288467 116.656338,13.2410402 115.884252,12.1423026 C115.112166,11.0435651 114.04314,10.123015 112.677142,9.38062477 C111.311144,8.63823453 109.529434,8.26704499 107.331959,8.26704499 C105.312658,8.26704499 103.634881,8.6679297 102.298579,9.46971115 C100.962276,10.2714926 99.8932503,11.3702137 99.0914688,12.7659073 C98.2896874,14.161601 97.6957841,15.8096826 97.3097412,17.7102016 C96.9236982,19.6107206 96.7009845,21.6596869 96.6415933,23.857162 L86.4857457,23.857162 C86.4857457,20.4124713 86.9460207,17.2202411 87.8665846,14.2803758 C88.7871485,11.3405105 90.1679736,8.80157397 92.0091014,6.6634901 C93.8502292,4.52540622 96.092214,2.84762946 98.7351233,1.63010947 C101.378033,0.412589489 104.451482,-0.196161372 107.955564,-0.196161372 C111.756602,-0.196161372 114.933984,0.427437071 117.487807,1.67465266 C120.041629,2.92186826 122.105443,4.49571195 123.67931,6.39623095 C125.253178,8.29674995 126.366746,10.3605638 127.02005,12.5877345 C127.673353,14.8149053 128,16.9381095 128,18.9574109 C128,21.4518421 127.613963,23.7086746 126.841877,25.727976 C126.069791,27.7472774 125.03046,29.6032252 123.723854,31.2958749 C122.417247,32.9885247 120.932489,34.5475208 119.269534,35.97291 C117.60658,37.3982993 115.884261,38.7345816 114.102524,39.9817972 C112.320788,41.2290128 110.539078,42.4168194 108.757341,43.5452525 C106.975605,44.6736857 105.327523,45.8021019 103.813047,46.9305351 C102.298571,48.0589682 100.977136,49.2319272 99.8487031,50.4494472 C98.7202699,51.6669672 97.9481956,52.9587068 97.5324571,54.3247048 L127.910914,54.3247048 L127.910914,63.4115159 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/tag-button": {
"title": "$:/core/images/tag-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-tag-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M18.1643182,47.6600756 L18.1677196,51.7651887 C18.1708869,55.5878829 20.3581578,60.8623899 23.0531352,63.5573673 L84.9021823,125.406414 C87.5996731,128.103905 91.971139,128.096834 94.6717387,125.396234 L125.766905,94.3010679 C128.473612,91.5943612 128.472063,87.2264889 125.777085,84.5315115 L63.9280381,22.6824644 C61.2305472,19.9849735 55.9517395,17.801995 52.1318769,17.8010313 L25.0560441,17.7942007 C21.2311475,17.7932358 18.1421354,20.8872832 18.1452985,24.7049463 L18.1535504,34.6641936 C18.2481119,34.6754562 18.3439134,34.6864294 18.4409623,34.6971263 C22.1702157,35.1081705 26.9295004,34.6530132 31.806204,33.5444844 C32.1342781,33.0700515 32.5094815,32.6184036 32.9318197,32.1960654 C35.6385117,29.4893734 39.5490441,28.718649 42.94592,29.8824694 C43.0432142,29.8394357 43.1402334,29.7961748 43.2369683,29.7526887 L43.3646982,30.0368244 C44.566601,30.5115916 45.6933052,31.2351533 46.6655958,32.2074439 C50.4612154,36.0030635 50.4663097,42.1518845 46.6769742,45.94122 C43.0594074,49.5587868 37.2914155,49.7181264 33.4734256,46.422636 C28.1082519,47.5454734 22.7987486,48.0186448 18.1643182,47.6600756 Z\"></path>\n <path d=\"M47.6333528,39.5324628 L47.6562932,39.5834939 C37.9670934,43.9391617 26.0718874,46.3819521 17.260095,45.4107025 C5.27267473,44.0894301 -1.02778744,36.4307276 2.44271359,24.0779512 C5.56175386,12.9761516 14.3014034,4.36129832 24.0466405,1.54817001 C34.7269254,-1.53487574 43.7955833,3.51606438 43.7955834,14.7730751 L35.1728168,14.7730752 C35.1728167,9.91428944 32.0946059,8.19982862 26.4381034,9.83267419 C19.5270911,11.8276553 13.046247,18.2159574 10.7440788,26.4102121 C8.82861123,33.2280582 11.161186,36.0634845 18.2047888,36.8398415 C25.3302805,37.6252244 35.7353482,35.4884477 44.1208333,31.7188498 L44.1475077,31.7781871 C44.159701,31.7725635 44.1718402,31.7671479 44.1839238,31.7619434 C45.9448098,31.0035157 50.4503245,38.3109156 47.7081571,39.5012767 C47.6834429,39.512005 47.6585061,39.5223987 47.6333528,39.5324628 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/theme-button": {
"title": "$:/core/images/theme-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-theme-button tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M55.854113,66.9453198 C54.3299482,65.1432292 53.0133883,63.518995 51.9542746,62.1263761 C40.8899947,47.578055 35.3091807,55.2383404 28.9941893,62.1263758 C22.6791979,69.0144112 30.6577916,74.5954741 24.6646171,79.4611023 C18.6714426,84.3267304 19.0414417,86.0133155 8.92654943,77.1119468 C-1.18834284,68.2105781 -1.88793412,65.7597832 2.7553553,60.6807286 C7.39864472,55.601674 11.2794845,63.5989423 20.7646627,54.5728325 C30.2498409,45.5467226 22.2819131,37.5470737 22.2819131,37.5470737 C22.2819131,37.5470737 42.0310399,-2.82433362 68.4206088,0.157393922 C94.8101776,3.13912147 58.4373806,-3.70356506 49.3898693,27.958066 C45.5161782,41.5139906 50.1107906,38.3197672 57.4560458,44.0453955 C59.1625767,45.3756367 63.8839488,48.777453 70.127165,53.3625321 C63.9980513,59.2416709 58.9704753,64.0315459 55.854113,66.9453198 Z M67.4952439,79.8919946 C83.5082212,96.9282402 105.237121,117.617674 112.611591,120.312493 C123.044132,124.12481 128.000001,117.170903 128,105.522947 C127.999999,98.3705516 104.170675,78.980486 84.0760493,63.7529565 C76.6683337,70.9090328 70.7000957,76.7055226 67.4952439,79.8919946 Z\"></path>\n <path d=\"M58.2852966,138.232794 L58.2852966,88.3943645 C56.318874,88.3923153 54.7254089,86.7952906 54.7254089,84.8344788 C54.7254089,82.8684071 56.3175932,81.2745911 58.2890859,81.2745911 L79.6408336,81.2745911 C81.608998,81.2745911 83.2045105,82.8724076 83.2045105,84.8344788 C83.2045105,86.7992907 81.614366,88.3923238 79.6446228,88.3943645 L79.6446228,88.3943646 L79.6446228,138.232794 C79.6446228,144.131009 74.8631748,148.912457 68.9649597,148.912457 C63.0667446,148.912457 58.2852966,144.131009 58.2852966,138.232794 Z M65.405072,-14.8423767 L72.5248474,-14.8423767 L76.0847351,-0.690681892 L72.5248474,6.51694947 L72.5248474,81.2745911 L65.405072,81.2745911 L65.405072,6.51694947 L61.8451843,-0.690681892 L65.405072,-14.8423767 Z\" transform=\"translate(68.964960, 67.035040) rotate(45.000000) translate(-68.964960, -67.035040) \"></path>\n </g>\n</svg>"
},
"$:/core/images/timestamp-off": {
"title": "$:/core/images/timestamp-off",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-timestamp-off tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M58.25 11C26.08 11 0 37.082 0 69.25s26.08 58.25 58.25 58.25c32.175 0 58.25-26.082 58.25-58.25S90.425 11 58.25 11zm0 100.5C34.914 111.5 16 92.586 16 69.25 16 45.92 34.914 27 58.25 27s42.25 18.92 42.25 42.25c0 23.336-18.914 42.25-42.25 42.25zM49.704 10c-2.762 0-5-2.24-5-5-.004-2.756 2.238-5 5-5H66.69c2.762 0 5.002 2.24 5 5 .006 2.757-2.238 5-5 5H49.705z\"/><path d=\"M58.25 35.88c-18.777 0-33.998 15.224-33.998 33.998 0 18.773 15.22 34.002 33.998 34.002 18.784 0 34.002-15.23 34.002-34.002 0-18.774-15.218-33.998-34.002-33.998zm-3.03 50.123H44.196v-34H55.22v34zm16.976 0H61.17v-34h11.025v34z\"/>\n </g>\n</svg>\n"
},
"$:/core/images/timestamp-on": {
"title": "$:/core/images/timestamp-on",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-timestamp-on tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M58.25 11C26.08 11 0 37.082 0 69.25s26.08 58.25 58.25 58.25c32.175 0 58.25-26.082 58.25-58.25S90.425 11 58.25 11zm0 100.5C34.914 111.5 16 92.586 16 69.25 16 45.92 34.914 27 58.25 27s42.25 18.92 42.25 42.25c0 23.336-18.914 42.25-42.25 42.25zM49.704 10c-2.762 0-5-2.24-5-5-.004-2.756 2.238-5 5-5H66.69c2.762 0 5.002 2.24 5 5 .006 2.757-2.238 5-5 5H49.705z\"/><path d=\"M13.41 27.178c-2.116 1.775-5.27 1.498-7.045-.613-1.772-2.11-1.498-5.27.616-7.047l9.95-8.348c2.115-1.774 5.27-1.5 7.045.618 1.775 2.108 1.498 5.27-.616 7.043l-9.95 8.348zM102.983 27.178c2.116 1.775 5.27 1.498 7.045-.613 1.772-2.11 1.498-5.27-.616-7.047l-9.95-8.348c-2.114-1.774-5.27-1.5-7.044.618-1.775 2.108-1.498 5.27.616 7.043l9.95 8.348zM65.097 71.072c0 3.826-3.09 6.928-6.897 6.928-3.804.006-6.9-3.102-6.903-6.928 0 0 4.76-39.072 6.903-39.072s6.897 39.072 6.897 39.072z\"/>\n </g>\n</svg>\n"
},
"$:/core/images/tip": {
"title": "$:/core/images/tip",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-tip tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,128.241818 C99.346224,128.241818 128,99.5880417 128,64.2418177 C128,28.8955937 99.346224,0.241817675 64,0.241817675 C28.653776,0.241817675 0,28.8955937 0,64.2418177 C0,99.5880417 28.653776,128.241818 64,128.241818 Z M75.9358659,91.4531941 C75.3115438,95.581915 70.2059206,98.8016748 64,98.8016748 C57.7940794,98.8016748 52.6884562,95.581915 52.0641341,91.4531941 C54.3299053,94.0502127 58.8248941,95.8192805 64,95.8192805 C69.1751059,95.8192805 73.6700947,94.0502127 75.9358659,91.4531941 L75.9358659,91.4531941 Z M75.9358659,95.9453413 C75.3115438,100.074062 70.2059206,103.293822 64,103.293822 C57.7940794,103.293822 52.6884562,100.074062 52.0641341,95.9453413 C54.3299053,98.5423599 58.8248941,100.311428 64,100.311428 C69.1751059,100.311428 73.6700947,98.5423599 75.9358659,95.9453413 L75.9358659,95.9453413 Z M75.9358659,100.40119 C75.3115438,104.529911 70.2059206,107.74967 64,107.74967 C57.7940794,107.74967 52.6884562,104.529911 52.0641341,100.40119 C54.3299053,102.998208 58.8248941,104.767276 64,104.767276 C69.1751059,104.767276 73.6700947,102.998208 75.9358659,100.40119 L75.9358659,100.40119 Z M75.9358659,104.893337 C75.3115438,109.022058 70.2059206,112.241818 64,112.241818 C57.7940794,112.241818 52.6884562,109.022058 52.0641341,104.893337 C54.3299053,107.490356 58.8248941,109.259423 64,109.259423 C69.1751059,109.259423 73.6700947,107.490356 75.9358659,104.893337 L75.9358659,104.893337 Z M64.3010456,24.2418177 C75.9193117,24.2418188 88.0000013,32.0619847 88,48.4419659 C87.9999987,64.8219472 75.9193018,71.7540963 75.9193021,83.5755932 C75.9193022,89.4486648 70.0521957,92.8368862 63.9999994,92.8368862 C57.947803,92.8368862 51.9731007,89.8295115 51.9731007,83.5755932 C51.9731007,71.1469799 39.9999998,65.4700602 40,48.4419647 C40.0000002,31.4138691 52.6827796,24.2418166 64.3010456,24.2418177 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/twitter": {
"title": "$:/core/images/twitter",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-twitter tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M41.6263422,115.803477 C27.0279663,115.803477 13.4398394,111.540813 1.99987456,104.234833 C4.02221627,104.472643 6.08004574,104.594302 8.16644978,104.594302 C20.277456,104.594302 31.4238403,100.47763 40.270894,93.5715185 C28.9590538,93.3635501 19.4123842,85.9189246 16.1230832,75.6885328 C17.7011365,75.9892376 19.320669,76.1503787 20.9862896,76.1503787 C23.344152,76.1503787 25.6278127,75.8359011 27.7971751,75.247346 C15.9709927,72.8821073 7.06079851,62.4745062 7.06079851,49.9982394 C7.06079851,49.8898938 7.06079851,49.7820074 7.06264203,49.67458 C10.5482779,51.6032228 14.5339687,52.7615103 18.7717609,52.8951059 C11.8355159,48.277565 7.2714207,40.3958845 7.2714207,31.4624258 C7.2714207,26.7434257 8.54621495,22.3200804 10.7713439,18.5169676 C23.5211299,34.0957738 42.568842,44.3472839 64.0532269,45.4210985 C63.6126256,43.5365285 63.3835682,41.5711584 63.3835682,39.5529928 C63.3835682,25.3326379 74.95811,13.8034766 89.2347917,13.8034766 C96.6697089,13.8034766 103.387958,16.930807 108.103682,21.9353619 C113.991886,20.780288 119.52429,18.6372496 124.518847,15.6866694 C122.588682,21.6993889 118.490075,26.7457211 113.152623,29.9327334 C118.381769,29.3102055 123.363882,27.926045 127.999875,25.8780385 C124.534056,31.0418981 120.151087,35.5772616 115.100763,39.2077561 C115.150538,40.3118708 115.175426,41.4224128 115.175426,42.538923 C115.175426,76.5663154 89.1744164,115.803477 41.6263422,115.803477\"></path>\n </g>\n</svg>\n"
},
"$:/core/images/underline": {
"title": "$:/core/images/underline",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-underline tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M7,117.421488 L121.247934,117.421488 L121.247934,128 L7,128 L7,117.421488 Z M104.871212,98.8958333 L104.871212,0 L88.6117424,0 L88.6117424,55.8560606 C88.6117424,60.3194668 88.0060035,64.432115 86.7945076,68.1941288 C85.5830116,71.9561425 83.7657949,75.239885 81.342803,78.0454545 C78.9198111,80.8510241 75.8911167,83.0189317 72.2566288,84.5492424 C68.6221409,86.0795531 64.3182067,86.844697 59.344697,86.844697 C53.0959284,86.844697 48.1862552,85.0593613 44.6155303,81.4886364 C41.0448054,77.9179114 39.2594697,73.0720003 39.2594697,66.9507576 L39.2594697,0 L23,0 L23,65.0378788 C23,70.3939662 23.5419769,75.2717583 24.625947,79.6714015 C25.709917,84.0710447 27.5908957,87.864883 30.2689394,91.0530303 C32.9469831,94.2411776 36.4538925,96.6960141 40.7897727,98.4176136 C45.125653,100.139213 50.545422,101 57.0492424,101 C64.3182182,101 70.630655,99.5653553 75.9867424,96.6960227 C81.3428298,93.8266902 85.742407,89.33147 89.1856061,83.2102273 L89.5681818,83.2102273 L89.5681818,98.8958333 L104.871212,98.8958333 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/unfold-all-button": {
"title": "$:/core/images/unfold-all-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unfold-all tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <rect x=\"0\" y=\"64\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M85.598226,8.34884273 C84.1490432,6.89863875 82.1463102,6 79.9340286,6 L47.9482224,6 C43.5292967,6 39.9411255,9.581722 39.9411255,14 C39.9411255,18.4092877 43.5260249,22 47.9482224,22 L71.9411255,22 L71.9411255,45.9929031 C71.9411255,50.4118288 75.5228475,54 79.9411255,54 C84.3504132,54 87.9411255,50.4151006 87.9411255,45.9929031 L87.9411255,14.0070969 C87.9411255,11.7964515 87.0447363,9.79371715 85.5956548,8.34412458 Z\" transform=\"translate(63.941125, 30.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -30.000000) \"></path>\n <path d=\"M85.6571005,72.2899682 C84.2079177,70.8397642 82.2051847,69.9411255 79.9929031,69.9411255 L48.0070969,69.9411255 C43.5881712,69.9411255 40,73.5228475 40,77.9411255 C40,82.3504132 43.5848994,85.9411255 48.0070969,85.9411255 L72,85.9411255 L72,109.934029 C72,114.352954 75.581722,117.941125 80,117.941125 C84.4092877,117.941125 88,114.356226 88,109.934029 L88,77.9482224 C88,75.737577 87.1036108,73.7348426 85.6545293,72.2852501 Z\" transform=\"translate(64.000000, 93.941125) scale(1, -1) rotate(-45.000000) translate(-64.000000, -93.941125) \"></path>\n </g>\n</svg>"
},
"$:/core/images/unfold-button": {
"title": "$:/core/images/unfold-button",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unfold tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <rect x=\"0\" y=\"0\" width=\"128\" height=\"16\" rx=\"8\"></rect>\n <path d=\"M85.598226,11.3488427 C84.1490432,9.89863875 82.1463102,9 79.9340286,9 L47.9482224,9 C43.5292967,9 39.9411255,12.581722 39.9411255,17 C39.9411255,21.4092877 43.5260249,25 47.9482224,25 L71.9411255,25 L71.9411255,48.9929031 C71.9411255,53.4118288 75.5228475,57 79.9411255,57 C84.3504132,57 87.9411255,53.4151006 87.9411255,48.9929031 L87.9411255,17.0070969 C87.9411255,14.7964515 87.0447363,12.7937171 85.5956548,11.3441246 Z\" transform=\"translate(63.941125, 33.000000) scale(1, -1) rotate(-45.000000) translate(-63.941125, -33.000000) \"></path>\n <path d=\"M85.6571005,53.4077172 C84.2079177,51.9575133 82.2051847,51.0588745 79.9929031,51.0588745 L48.0070969,51.0588745 C43.5881712,51.0588745 40,54.6405965 40,59.0588745 C40,63.4681622 43.5848994,67.0588745 48.0070969,67.0588745 L72,67.0588745 L72,91.0517776 C72,95.4707033 75.581722,99.0588745 80,99.0588745 C84.4092877,99.0588745 88,95.4739751 88,91.0517776 L88,59.0659714 C88,56.855326 87.1036108,54.8525917 85.6545293,53.4029991 Z\" transform=\"translate(64.000000, 75.058875) scale(1, -1) rotate(-45.000000) translate(-64.000000, -75.058875) \"></path>\n </g>\n</svg>"
},
"$:/core/images/unlocked-padlock": {
"title": "$:/core/images/unlocked-padlock",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-unlocked-padlock tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M48.6266053,64 L105,64 L105,96.0097716 C105,113.673909 90.6736461,128 73.001193,128 L55.998807,128 C38.3179793,128 24,113.677487 24,96.0097716 L24,64 L30.136303,64 C19.6806213,51.3490406 2.77158986,28.2115132 25.8366966,8.85759246 C50.4723026,-11.8141335 71.6711028,13.2108337 81.613302,25.0594855 C91.5555012,36.9081373 78.9368488,47.4964439 69.1559674,34.9513593 C59.375086,22.4062748 47.9893192,10.8049522 35.9485154,20.9083862 C23.9077117,31.0118202 34.192312,43.2685325 44.7624679,55.8655518 C47.229397,58.805523 48.403443,61.5979188 48.6266053,64 Z M67.7315279,92.3641717 C70.8232551,91.0923621 73,88.0503841 73,84.5 C73,79.8055796 69.1944204,76 64.5,76 C59.8055796,76 56,79.8055796 56,84.5 C56,87.947435 58.0523387,90.9155206 61.0018621,92.2491029 L55.9067479,115.020857 L72.8008958,115.020857 L67.7315279,92.3641717 L67.7315279,92.3641717 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/up-arrow": {
"title": "$:/core/images/up-arrow",
"created": "20150316000544368",
"modified": "20150316000831867",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-up-arrow tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n<path transform=\"rotate(-135, 63.8945, 64.1752)\" d=\"m109.07576,109.35336c-1.43248,1.43361 -3.41136,2.32182 -5.59717,2.32182l-79.16816,0c-4.36519,0 -7.91592,-3.5444 -7.91592,-7.91666c0,-4.36337 3.54408,-7.91667 7.91592,-7.91667l71.25075,0l0,-71.25074c0,-4.3652 3.54442,-7.91592 7.91667,-7.91592c4.36336,0 7.91667,3.54408 7.91667,7.91592l0,79.16815c0,2.1825 -0.88602,4.16136 -2.3185,5.59467l-0.00027,-0.00056l0.00001,-0.00001z\" />\n</svg>\n \n"
},
"$:/core/images/video": {
"title": "$:/core/images/video",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-video tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M64,12 C29.0909091,12 8.72727273,14.9166667 5.81818182,17.8333333 C2.90909091,20.75 1.93784382e-15,41.1666667 0,64.5 C1.93784382e-15,87.8333333 2.90909091,108.25 5.81818182,111.166667 C8.72727273,114.083333 29.0909091,117 64,117 C98.9090909,117 119.272727,114.083333 122.181818,111.166667 C125.090909,108.25 128,87.8333333 128,64.5 C128,41.1666667 125.090909,20.75 122.181818,17.8333333 C119.272727,14.9166667 98.9090909,12 64,12 Z M54.9161194,44.6182253 C51.102648,42.0759111 48.0112186,43.7391738 48.0112186,48.3159447 L48.0112186,79.6840553 C48.0112186,84.2685636 51.109784,85.9193316 54.9161194,83.3817747 L77.0838806,68.6032672 C80.897352,66.0609529 80.890216,61.9342897 77.0838806,59.3967328 L54.9161194,44.6182253 Z\"></path>\n </g>\n</svg>"
},
"$:/core/images/warning": {
"title": "$:/core/images/warning",
"tags": "$:/tags/Image",
"text": "<svg class=\"tc-image-warning tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 128 128\">\n <g fill-rule=\"evenodd\">\n <path d=\"M57.0717968,11 C60.1509982,5.66666667 67.8490018,5.66666667 70.9282032,11 L126.353829,107 C129.433031,112.333333 125.584029,119 119.425626,119 L8.57437416,119 C2.41597129,119 -1.43303051,112.333333 1.64617093,107 L57.0717968,11 Z M64,37 C59.581722,37 56,40.5820489 56,44.9935776 L56,73.0064224 C56,77.4211534 59.5907123,81 64,81 C68.418278,81 72,77.4179511 72,73.0064224 L72,44.9935776 C72,40.5788466 68.4092877,37 64,37 Z M64,104 C68.418278,104 72,100.418278 72,96 C72,91.581722 68.418278,88 64,88 C59.581722,88 56,91.581722 56,96 C56,100.418278 59.581722,104 64,104 Z\"></path>\n </g>\n</svg>"
},
"$:/language/Buttons/AdvancedSearch/Caption": {
"title": "$:/language/Buttons/AdvancedSearch/Caption",
"text": "advanced search"
},
"$:/language/Buttons/AdvancedSearch/Hint": {
"title": "$:/language/Buttons/AdvancedSearch/Hint",
"text": "Advanced search"
},
"$:/language/Buttons/Cancel/Caption": {
"title": "$:/language/Buttons/Cancel/Caption",
"text": "cancel"
},
"$:/language/Buttons/Cancel/Hint": {
"title": "$:/language/Buttons/Cancel/Hint",
"text": "Discard changes to this tiddler"
},
"$:/language/Buttons/Clone/Caption": {
"title": "$:/language/Buttons/Clone/Caption",
"text": "clone"
},
"$:/language/Buttons/Clone/Hint": {
"title": "$:/language/Buttons/Clone/Hint",
"text": "Clone this tiddler"
},
"$:/language/Buttons/Close/Caption": {
"title": "$:/language/Buttons/Close/Caption",
"text": "close"
},
"$:/language/Buttons/Close/Hint": {
"title": "$:/language/Buttons/Close/Hint",
"text": "Close this tiddler"
},
"$:/language/Buttons/CloseAll/Caption": {
"title": "$:/language/Buttons/CloseAll/Caption",
"text": "close all"
},
"$:/language/Buttons/CloseAll/Hint": {
"title": "$:/language/Buttons/CloseAll/Hint",
"text": "Close all tiddlers"
},
"$:/language/Buttons/CloseOthers/Caption": {
"title": "$:/language/Buttons/CloseOthers/Caption",
"text": "close others"
},
"$:/language/Buttons/CloseOthers/Hint": {
"title": "$:/language/Buttons/CloseOthers/Hint",
"text": "Close other tiddlers"
},
"$:/language/Buttons/ControlPanel/Caption": {
"title": "$:/language/Buttons/ControlPanel/Caption",
"text": "control panel"
},
"$:/language/Buttons/ControlPanel/Hint": {
"title": "$:/language/Buttons/ControlPanel/Hint",
"text": "Open control panel"
},
"$:/language/Buttons/Delete/Caption": {
"title": "$:/language/Buttons/Delete/Caption",
"text": "delete"
},
"$:/language/Buttons/Delete/Hint": {
"title": "$:/language/Buttons/Delete/Hint",
"text": "Delete this tiddler"
},
"$:/language/Buttons/Edit/Caption": {
"title": "$:/language/Buttons/Edit/Caption",
"text": "edit"
},
"$:/language/Buttons/Edit/Hint": {
"title": "$:/language/Buttons/Edit/Hint",
"text": "Edit this tiddler"
},
"$:/language/Buttons/Encryption/Caption": {
"title": "$:/language/Buttons/Encryption/Caption",
"text": "encryption"
},
"$:/language/Buttons/Encryption/Hint": {
"title": "$:/language/Buttons/Encryption/Hint",
"text": "Set or clear a password for saving this wiki"
},
"$:/language/Buttons/Encryption/ClearPassword/Caption": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Caption",
"text": "clear password"
},
"$:/language/Buttons/Encryption/ClearPassword/Hint": {
"title": "$:/language/Buttons/Encryption/ClearPassword/Hint",
"text": "Clear the password and save this wiki without encryption"
},
"$:/language/Buttons/Encryption/SetPassword/Caption": {
"title": "$:/language/Buttons/Encryption/SetPassword/Caption",
"text": "set password"
},
"$:/language/Buttons/Encryption/SetPassword/Hint": {
"title": "$:/language/Buttons/Encryption/SetPassword/Hint",
"text": "Set a password for saving this wiki with encryption"
},
"$:/language/Buttons/ExportPage/Caption": {
"title": "$:/language/Buttons/ExportPage/Caption",
"text": "export all"
},
"$:/language/Buttons/ExportPage/Hint": {
"title": "$:/language/Buttons/ExportPage/Hint",
"text": "Export all tiddlers"
},
"$:/language/Buttons/ExportTiddler/Caption": {
"title": "$:/language/Buttons/ExportTiddler/Caption",
"text": "export tiddler"
},
"$:/language/Buttons/ExportTiddler/Hint": {
"title": "$:/language/Buttons/ExportTiddler/Hint",
"text": "Export tiddler"
},
"$:/language/Buttons/ExportTiddlers/Caption": {
"title": "$:/language/Buttons/ExportTiddlers/Caption",
"text": "export tiddlers"
},
"$:/language/Buttons/ExportTiddlers/Hint": {
"title": "$:/language/Buttons/ExportTiddlers/Hint",
"text": "Export tiddlers"
},
"$:/language/Buttons/Fold/Caption": {
"title": "$:/language/Buttons/Fold/Caption",
"text": "fold tiddler"
},
"$:/language/Buttons/Fold/Hint": {
"title": "$:/language/Buttons/Fold/Hint",
"text": "Fold the body of this tiddler"
},
"$:/language/Buttons/Fold/FoldBar/Caption": {
"title": "$:/language/Buttons/Fold/FoldBar/Caption",
"text": "fold-bar"
},
"$:/language/Buttons/Fold/FoldBar/Hint": {
"title": "$:/language/Buttons/Fold/FoldBar/Hint",
"text": "Optional bars to fold and unfold tiddlers"
},
"$:/language/Buttons/Unfold/Caption": {
"title": "$:/language/Buttons/Unfold/Caption",
"text": "unfold tiddler"
},
"$:/language/Buttons/Unfold/Hint": {
"title": "$:/language/Buttons/Unfold/Hint",
"text": "Unfold the body of this tiddler"
},
"$:/language/Buttons/FoldOthers/Caption": {
"title": "$:/language/Buttons/FoldOthers/Caption",
"text": "fold other tiddlers"
},
"$:/language/Buttons/FoldOthers/Hint": {
"title": "$:/language/Buttons/FoldOthers/Hint",
"text": "Fold the bodies of other opened tiddlers"
},
"$:/language/Buttons/FoldAll/Caption": {
"title": "$:/language/Buttons/FoldAll/Caption",
"text": "fold all tiddlers"
},
"$:/language/Buttons/FoldAll/Hint": {
"title": "$:/language/Buttons/FoldAll/Hint",
"text": "Fold the bodies of all opened tiddlers"
},
"$:/language/Buttons/UnfoldAll/Caption": {
"title": "$:/language/Buttons/UnfoldAll/Caption",
"text": "unfold all tiddlers"
},
"$:/language/Buttons/UnfoldAll/Hint": {
"title": "$:/language/Buttons/UnfoldAll/Hint",
"text": "Unfold the bodies of all opened tiddlers"
},
"$:/language/Buttons/FullScreen/Caption": {
"title": "$:/language/Buttons/FullScreen/Caption",
"text": "full-screen"
},
"$:/language/Buttons/FullScreen/Hint": {
"title": "$:/language/Buttons/FullScreen/Hint",
"text": "Enter or leave full-screen mode"
},
"$:/language/Buttons/Help/Caption": {
"title": "$:/language/Buttons/Help/Caption",
"text": "help"
},
"$:/language/Buttons/Help/Hint": {
"title": "$:/language/Buttons/Help/Hint",
"text": "Show help panel"
},
"$:/language/Buttons/Import/Caption": {
"title": "$:/language/Buttons/Import/Caption",
"text": "import"
},
"$:/language/Buttons/Import/Hint": {
"title": "$:/language/Buttons/Import/Hint",
"text": "Import many types of file including text, image, TiddlyWiki or JSON"
},
"$:/language/Buttons/Info/Caption": {
"title": "$:/language/Buttons/Info/Caption",
"text": "info"
},
"$:/language/Buttons/Info/Hint": {
"title": "$:/language/Buttons/Info/Hint",
"text": "Show information for this tiddler"
},
"$:/language/Buttons/Home/Caption": {
"title": "$:/language/Buttons/Home/Caption",
"text": "home"
},
"$:/language/Buttons/Home/Hint": {
"title": "$:/language/Buttons/Home/Hint",
"text": "Open the default tiddlers"
},
"$:/language/Buttons/Language/Caption": {
"title": "$:/language/Buttons/Language/Caption",
"text": "language"
},
"$:/language/Buttons/Language/Hint": {
"title": "$:/language/Buttons/Language/Hint",
"text": "Choose the user interface language"
},
"$:/language/Buttons/Manager/Caption": {
"title": "$:/language/Buttons/Manager/Caption",
"text": "tiddler manager"
},
"$:/language/Buttons/Manager/Hint": {
"title": "$:/language/Buttons/Manager/Hint",
"text": "Open tiddler manager"
},
"$:/language/Buttons/More/Caption": {
"title": "$:/language/Buttons/More/Caption",
"text": "more"
},
"$:/language/Buttons/More/Hint": {
"title": "$:/language/Buttons/More/Hint",
"text": "More actions"
},
"$:/language/Buttons/NewHere/Caption": {
"title": "$:/language/Buttons/NewHere/Caption",
"text": "new here"
},
"$:/language/Buttons/NewHere/Hint": {
"title": "$:/language/Buttons/NewHere/Hint",
"text": "Create a new tiddler tagged with this one"
},
"$:/language/Buttons/NewJournal/Caption": {
"title": "$:/language/Buttons/NewJournal/Caption",
"text": "new journal"
},
"$:/language/Buttons/NewJournal/Hint": {
"title": "$:/language/Buttons/NewJournal/Hint",
"text": "Create a new journal tiddler"
},
"$:/language/Buttons/NewJournalHere/Caption": {
"title": "$:/language/Buttons/NewJournalHere/Caption",
"text": "new journal here"
},
"$:/language/Buttons/NewJournalHere/Hint": {
"title": "$:/language/Buttons/NewJournalHere/Hint",
"text": "Create a new journal tiddler tagged with this one"
},
"$:/language/Buttons/NewImage/Caption": {
"title": "$:/language/Buttons/NewImage/Caption",
"text": "new image"
},
"$:/language/Buttons/NewImage/Hint": {
"title": "$:/language/Buttons/NewImage/Hint",
"text": "Create a new image tiddler"
},
"$:/language/Buttons/NewMarkdown/Caption": {
"title": "$:/language/Buttons/NewMarkdown/Caption",
"text": "new Markdown tiddler"
},
"$:/language/Buttons/NewMarkdown/Hint": {
"title": "$:/language/Buttons/NewMarkdown/Hint",
"text": "Create a new Markdown tiddler"
},
"$:/language/Buttons/NewTiddler/Caption": {
"title": "$:/language/Buttons/NewTiddler/Caption",
"text": "new tiddler"
},
"$:/language/Buttons/NewTiddler/Hint": {
"title": "$:/language/Buttons/NewTiddler/Hint",
"text": "Create a new tiddler"
},
"$:/language/Buttons/OpenWindow/Caption": {
"title": "$:/language/Buttons/OpenWindow/Caption",
"text": "open in new window"
},
"$:/language/Buttons/OpenWindow/Hint": {
"title": "$:/language/Buttons/OpenWindow/Hint",
"text": "Open tiddler in new window"
},
"$:/language/Buttons/Palette/Caption": {
"title": "$:/language/Buttons/Palette/Caption",
"text": "palette"
},
"$:/language/Buttons/Palette/Hint": {
"title": "$:/language/Buttons/Palette/Hint",
"text": "Choose the colour palette"
},
"$:/language/Buttons/Permalink/Caption": {
"title": "$:/language/Buttons/Permalink/Caption",
"text": "permalink"
},
"$:/language/Buttons/Permalink/Hint": {
"title": "$:/language/Buttons/Permalink/Hint",
"text": "Set browser address bar to a direct link to this tiddler"
},
"$:/language/Buttons/Permaview/Caption": {
"title": "$:/language/Buttons/Permaview/Caption",
"text": "permaview"
},
"$:/language/Buttons/Permaview/Hint": {
"title": "$:/language/Buttons/Permaview/Hint",
"text": "Set browser address bar to a direct link to all the tiddlers in this story"
},
"$:/language/Buttons/Print/Caption": {
"title": "$:/language/Buttons/Print/Caption",
"text": "print page"
},
"$:/language/Buttons/Print/Hint": {
"title": "$:/language/Buttons/Print/Hint",
"text": "Print the current page"
},
"$:/language/Buttons/Refresh/Caption": {
"title": "$:/language/Buttons/Refresh/Caption",
"text": "refresh"
},
"$:/language/Buttons/Refresh/Hint": {
"title": "$:/language/Buttons/Refresh/Hint",
"text": "Perform a full refresh of the wiki"
},
"$:/language/Buttons/Save/Caption": {
"title": "$:/language/Buttons/Save/Caption",
"text": "ok"
},
"$:/language/Buttons/Save/Hint": {
"title": "$:/language/Buttons/Save/Hint",
"text": "Confirm changes to this tiddler"
},
"$:/language/Buttons/SaveWiki/Caption": {
"title": "$:/language/Buttons/SaveWiki/Caption",
"text": "save changes"
},
"$:/language/Buttons/SaveWiki/Hint": {
"title": "$:/language/Buttons/SaveWiki/Hint",
"text": "Save changes"
},
"$:/language/Buttons/StoryView/Caption": {
"title": "$:/language/Buttons/StoryView/Caption",
"text": "storyview"
},
"$:/language/Buttons/StoryView/Hint": {
"title": "$:/language/Buttons/StoryView/Hint",
"text": "Choose the story visualisation"
},
"$:/language/Buttons/HideSideBar/Caption": {
"title": "$:/language/Buttons/HideSideBar/Caption",
"text": "hide sidebar"
},
"$:/language/Buttons/HideSideBar/Hint": {
"title": "$:/language/Buttons/HideSideBar/Hint",
"text": "Hide sidebar"
},
"$:/language/Buttons/ShowSideBar/Caption": {
"title": "$:/language/Buttons/ShowSideBar/Caption",
"text": "show sidebar"
},
"$:/language/Buttons/ShowSideBar/Hint": {
"title": "$:/language/Buttons/ShowSideBar/Hint",
"text": "Show sidebar"
},
"$:/language/Buttons/TagManager/Caption": {
"title": "$:/language/Buttons/TagManager/Caption",
"text": "tag manager"
},
"$:/language/Buttons/TagManager/Hint": {
"title": "$:/language/Buttons/TagManager/Hint",
"text": "Open tag manager"
},
"$:/language/Buttons/Timestamp/Caption": {
"title": "$:/language/Buttons/Timestamp/Caption",
"text": "timestamps"
},
"$:/language/Buttons/Timestamp/Hint": {
"title": "$:/language/Buttons/Timestamp/Hint",
"text": "Choose whether modifications update timestamps"
},
"$:/language/Buttons/Timestamp/On/Caption": {
"title": "$:/language/Buttons/Timestamp/On/Caption",
"text": "timestamps are on"
},
"$:/language/Buttons/Timestamp/On/Hint": {
"title": "$:/language/Buttons/Timestamp/On/Hint",
"text": "Update timestamps when tiddlers are modified"
},
"$:/language/Buttons/Timestamp/Off/Caption": {
"title": "$:/language/Buttons/Timestamp/Off/Caption",
"text": "timestamps are off"
},
"$:/language/Buttons/Timestamp/Off/Hint": {
"title": "$:/language/Buttons/Timestamp/Off/Hint",
"text": "Don't update timestamps when tiddlers are modified"
},
"$:/language/Buttons/Theme/Caption": {
"title": "$:/language/Buttons/Theme/Caption",
"text": "theme"
},
"$:/language/Buttons/Theme/Hint": {
"title": "$:/language/Buttons/Theme/Hint",
"text": "Choose the display theme"
},
"$:/language/Buttons/Bold/Caption": {
"title": "$:/language/Buttons/Bold/Caption",
"text": "bold"
},
"$:/language/Buttons/Bold/Hint": {
"title": "$:/language/Buttons/Bold/Hint",
"text": "Apply bold formatting to selection"
},
"$:/language/Buttons/Clear/Caption": {
"title": "$:/language/Buttons/Clear/Caption",
"text": "clear"
},
"$:/language/Buttons/Clear/Hint": {
"title": "$:/language/Buttons/Clear/Hint",
"text": "Clear image to solid colour"
},
"$:/language/Buttons/EditorHeight/Caption": {
"title": "$:/language/Buttons/EditorHeight/Caption",
"text": "editor height"
},
"$:/language/Buttons/EditorHeight/Caption/Auto": {
"title": "$:/language/Buttons/EditorHeight/Caption/Auto",
"text": "Automatically adjust height to fit content"
},
"$:/language/Buttons/EditorHeight/Caption/Fixed": {
"title": "$:/language/Buttons/EditorHeight/Caption/Fixed",
"text": "Fixed height:"
},
"$:/language/Buttons/EditorHeight/Hint": {
"title": "$:/language/Buttons/EditorHeight/Hint",
"text": "Choose the height of the text editor"
},
"$:/language/Buttons/Excise/Caption": {
"title": "$:/language/Buttons/Excise/Caption",
"text": "excise"
},
"$:/language/Buttons/Excise/Caption/Excise": {
"title": "$:/language/Buttons/Excise/Caption/Excise",
"text": "Perform excision"
},
"$:/language/Buttons/Excise/Caption/MacroName": {
"title": "$:/language/Buttons/Excise/Caption/MacroName",
"text": "Macro name:"
},
"$:/language/Buttons/Excise/Caption/NewTitle": {
"title": "$:/language/Buttons/Excise/Caption/NewTitle",
"text": "Title of new tiddler:"
},
"$:/language/Buttons/Excise/Caption/Replace": {
"title": "$:/language/Buttons/Excise/Caption/Replace",
"text": "Replace excised text with:"
},
"$:/language/Buttons/Excise/Caption/Replace/Macro": {
"title": "$:/language/Buttons/Excise/Caption/Replace/Macro",
"text": "macro"
},
"$:/language/Buttons/Excise/Caption/Replace/Link": {
"title": "$:/language/Buttons/Excise/Caption/Replace/Link",
"text": "link"
},
"$:/language/Buttons/Excise/Caption/Replace/Transclusion": {
"title": "$:/language/Buttons/Excise/Caption/Replace/Transclusion",
"text": "transclusion"
},
"$:/language/Buttons/Excise/Caption/Tag": {
"title": "$:/language/Buttons/Excise/Caption/Tag",
"text": "Tag new tiddler with the title of this tiddler"
},
"$:/language/Buttons/Excise/Caption/TiddlerExists": {
"title": "$:/language/Buttons/Excise/Caption/TiddlerExists",
"text": "Warning: tiddler already exists"
},
"$:/language/Buttons/Excise/Hint": {
"title": "$:/language/Buttons/Excise/Hint",
"text": "Excise the selected text into a new tiddler"
},
"$:/language/Buttons/Heading1/Caption": {
"title": "$:/language/Buttons/Heading1/Caption",
"text": "heading 1"
},
"$:/language/Buttons/Heading1/Hint": {
"title": "$:/language/Buttons/Heading1/Hint",
"text": "Apply heading level 1 formatting to lines containing selection"
},
"$:/language/Buttons/Heading2/Caption": {
"title": "$:/language/Buttons/Heading2/Caption",
"text": "heading 2"
},
"$:/language/Buttons/Heading2/Hint": {
"title": "$:/language/Buttons/Heading2/Hint",
"text": "Apply heading level 2 formatting to lines containing selection"
},
"$:/language/Buttons/Heading3/Caption": {
"title": "$:/language/Buttons/Heading3/Caption",
"text": "heading 3"
},
"$:/language/Buttons/Heading3/Hint": {
"title": "$:/language/Buttons/Heading3/Hint",
"text": "Apply heading level 3 formatting to lines containing selection"
},
"$:/language/Buttons/Heading4/Caption": {
"title": "$:/language/Buttons/Heading4/Caption",
"text": "heading 4"
},
"$:/language/Buttons/Heading4/Hint": {
"title": "$:/language/Buttons/Heading4/Hint",
"text": "Apply heading level 4 formatting to lines containing selection"
},
"$:/language/Buttons/Heading5/Caption": {
"title": "$:/language/Buttons/Heading5/Caption",
"text": "heading 5"
},
"$:/language/Buttons/Heading5/Hint": {
"title": "$:/language/Buttons/Heading5/Hint",
"text": "Apply heading level 5 formatting to lines containing selection"
},
"$:/language/Buttons/Heading6/Caption": {
"title": "$:/language/Buttons/Heading6/Caption",
"text": "heading 6"
},
"$:/language/Buttons/Heading6/Hint": {
"title": "$:/language/Buttons/Heading6/Hint",
"text": "Apply heading level 6 formatting to lines containing selection"
},
"$:/language/Buttons/Italic/Caption": {
"title": "$:/language/Buttons/Italic/Caption",
"text": "italic"
},
"$:/language/Buttons/Italic/Hint": {
"title": "$:/language/Buttons/Italic/Hint",
"text": "Apply italic formatting to selection"
},
"$:/language/Buttons/LineWidth/Caption": {
"title": "$:/language/Buttons/LineWidth/Caption",
"text": "line width"
},
"$:/language/Buttons/LineWidth/Hint": {
"title": "$:/language/Buttons/LineWidth/Hint",
"text": "Set line width for painting"
},
"$:/language/Buttons/Link/Caption": {
"title": "$:/language/Buttons/Link/Caption",
"text": "link"
},
"$:/language/Buttons/Link/Hint": {
"title": "$:/language/Buttons/Link/Hint",
"text": "Create wikitext link"
},
"$:/language/Buttons/ListBullet/Caption": {
"title": "$:/language/Buttons/ListBullet/Caption",
"text": "bulleted list"
},
"$:/language/Buttons/ListBullet/Hint": {
"title": "$:/language/Buttons/ListBullet/Hint",
"text": "Apply bulleted list formatting to lines containing selection"
},
"$:/language/Buttons/ListNumber/Caption": {
"title": "$:/language/Buttons/ListNumber/Caption",
"text": "numbered list"
},
"$:/language/Buttons/ListNumber/Hint": {
"title": "$:/language/Buttons/ListNumber/Hint",
"text": "Apply numbered list formatting to lines containing selection"
},
"$:/language/Buttons/MonoBlock/Caption": {
"title": "$:/language/Buttons/MonoBlock/Caption",
"text": "monospaced block"
},
"$:/language/Buttons/MonoBlock/Hint": {
"title": "$:/language/Buttons/MonoBlock/Hint",
"text": "Apply monospaced block formatting to lines containing selection"
},
"$:/language/Buttons/MonoLine/Caption": {
"title": "$:/language/Buttons/MonoLine/Caption",
"text": "monospaced"
},
"$:/language/Buttons/MonoLine/Hint": {
"title": "$:/language/Buttons/MonoLine/Hint",
"text": "Apply monospaced character formatting to selection"
},
"$:/language/Buttons/Opacity/Caption": {
"title": "$:/language/Buttons/Opacity/Caption",
"text": "opacity"
},
"$:/language/Buttons/Opacity/Hint": {
"title": "$:/language/Buttons/Opacity/Hint",
"text": "Set painting opacity"
},
"$:/language/Buttons/Paint/Caption": {
"title": "$:/language/Buttons/Paint/Caption",
"text": "paint colour"
},
"$:/language/Buttons/Paint/Hint": {
"title": "$:/language/Buttons/Paint/Hint",
"text": "Set painting colour"
},
"$:/language/Buttons/Picture/Caption": {
"title": "$:/language/Buttons/Picture/Caption",
"text": "picture"
},
"$:/language/Buttons/Picture/Hint": {
"title": "$:/language/Buttons/Picture/Hint",
"text": "Insert picture"
},
"$:/language/Buttons/Preview/Caption": {
"title": "$:/language/Buttons/Preview/Caption",
"text": "preview"
},
"$:/language/Buttons/Preview/Hint": {
"title": "$:/language/Buttons/Preview/Hint",
"text": "Show preview pane"
},
"$:/language/Buttons/PreviewType/Caption": {
"title": "$:/language/Buttons/PreviewType/Caption",
"text": "preview type"
},
"$:/language/Buttons/PreviewType/Hint": {
"title": "$:/language/Buttons/PreviewType/Hint",
"text": "Choose preview type"
},
"$:/language/Buttons/Quote/Caption": {
"title": "$:/language/Buttons/Quote/Caption",
"text": "quote"
},
"$:/language/Buttons/Quote/Hint": {
"title": "$:/language/Buttons/Quote/Hint",
"text": "Apply quoted text formatting to lines containing selection"
},
"$:/language/Buttons/Size/Caption": {
"title": "$:/language/Buttons/Size/Caption",
"text": "image size"
},
"$:/language/Buttons/Size/Caption/Height": {
"title": "$:/language/Buttons/Size/Caption/Height",
"text": "Height:"
},
"$:/language/Buttons/Size/Caption/Resize": {
"title": "$:/language/Buttons/Size/Caption/Resize",
"text": "Resize image"
},
"$:/language/Buttons/Size/Caption/Width": {
"title": "$:/language/Buttons/Size/Caption/Width",
"text": "Width:"
},
"$:/language/Buttons/Size/Hint": {
"title": "$:/language/Buttons/Size/Hint",
"text": "Set image size"
},
"$:/language/Buttons/Stamp/Caption": {
"title": "$:/language/Buttons/Stamp/Caption",
"text": "stamp"
},
"$:/language/Buttons/Stamp/Caption/New": {
"title": "$:/language/Buttons/Stamp/Caption/New",
"text": "Add your own"
},
"$:/language/Buttons/Stamp/Hint": {
"title": "$:/language/Buttons/Stamp/Hint",
"text": "Insert a preconfigured snippet of text"
},
"$:/language/Buttons/Stamp/New/Title": {
"title": "$:/language/Buttons/Stamp/New/Title",
"text": "Name as shown in menu"
},
"$:/language/Buttons/Stamp/New/Text": {
"title": "$:/language/Buttons/Stamp/New/Text",
"text": "Text of snippet. (Remember to add a descriptive title in the caption field)."
},
"$:/language/Buttons/Strikethrough/Caption": {
"title": "$:/language/Buttons/Strikethrough/Caption",
"text": "strikethrough"
},
"$:/language/Buttons/Strikethrough/Hint": {
"title": "$:/language/Buttons/Strikethrough/Hint",
"text": "Apply strikethrough formatting to selection"
},
"$:/language/Buttons/Subscript/Caption": {
"title": "$:/language/Buttons/Subscript/Caption",
"text": "subscript"
},
"$:/language/Buttons/Subscript/Hint": {
"title": "$:/language/Buttons/Subscript/Hint",
"text": "Apply subscript formatting to selection"
},
"$:/language/Buttons/Superscript/Caption": {
"title": "$:/language/Buttons/Superscript/Caption",
"text": "superscript"
},
"$:/language/Buttons/Superscript/Hint": {
"title": "$:/language/Buttons/Superscript/Hint",
"text": "Apply superscript formatting to selection"
},
"$:/language/Buttons/Underline/Caption": {
"title": "$:/language/Buttons/Underline/Caption",
"text": "underline"
},
"$:/language/Buttons/Underline/Hint": {
"title": "$:/language/Buttons/Underline/Hint",
"text": "Apply underline formatting to selection"
},
"$:/language/ControlPanel/Advanced/Caption": {
"title": "$:/language/ControlPanel/Advanced/Caption",
"text": "Advanced"
},
"$:/language/ControlPanel/Advanced/Hint": {
"title": "$:/language/ControlPanel/Advanced/Hint",
"text": "Internal information about this TiddlyWiki"
},
"$:/language/ControlPanel/Appearance/Caption": {
"title": "$:/language/ControlPanel/Appearance/Caption",
"text": "Appearance"
},
"$:/language/ControlPanel/Appearance/Hint": {
"title": "$:/language/ControlPanel/Appearance/Hint",
"text": "Ways to customise the appearance of your TiddlyWiki."
},
"$:/language/ControlPanel/Basics/AnimDuration/Prompt": {
"title": "$:/language/ControlPanel/Basics/AnimDuration/Prompt",
"text": "Animation duration:"
},
"$:/language/ControlPanel/Basics/Caption": {
"title": "$:/language/ControlPanel/Basics/Caption",
"text": "Basics"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint",
"text": "Use [[double square brackets]] for titles with spaces. Or you can choose to <$button set=\"$:/DefaultTiddlers\" setTo=\"[list[$:/StoryList]]\">retain story ordering</$button>"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt",
"text": "Default tiddlers:"
},
"$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint": {
"title": "$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint",
"text": "Choose which tiddlers are displayed at startup:"
},
"$:/language/ControlPanel/Basics/Language/Prompt": {
"title": "$:/language/ControlPanel/Basics/Language/Prompt",
"text": "Hello! Current language:"
},
"$:/language/ControlPanel/Basics/NewJournal/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Title/Prompt",
"text": "Title of new journal tiddlers"
},
"$:/language/ControlPanel/Basics/NewJournal/Text/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Text/Prompt",
"text": "Text for new journal tiddlers"
},
"$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt",
"text": "Tags for new journal tiddlers"
},
"$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt",
"text": "Number of overridden shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt",
"text": "Number of shadow tiddlers:"
},
"$:/language/ControlPanel/Basics/Subtitle/Prompt": {
"title": "$:/language/ControlPanel/Basics/Subtitle/Prompt",
"text": "Subtitle:"
},
"$:/language/ControlPanel/Basics/SystemTiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/SystemTiddlers/Prompt",
"text": "Number of system tiddlers:"
},
"$:/language/ControlPanel/Basics/Tags/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tags/Prompt",
"text": "Number of tags:"
},
"$:/language/ControlPanel/Basics/Tiddlers/Prompt": {
"title": "$:/language/ControlPanel/Basics/Tiddlers/Prompt",
"text": "Number of tiddlers:"
},
"$:/language/ControlPanel/Basics/Title/Prompt": {
"title": "$:/language/ControlPanel/Basics/Title/Prompt",
"text": "Title of this ~TiddlyWiki:"
},
"$:/language/ControlPanel/Basics/Username/Prompt": {
"title": "$:/language/ControlPanel/Basics/Username/Prompt",
"text": "Username for signing edits:"
},
"$:/language/ControlPanel/Basics/Version/Prompt": {
"title": "$:/language/ControlPanel/Basics/Version/Prompt",
"text": "~TiddlyWiki version:"
},
"$:/language/ControlPanel/EditorTypes/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Caption",
"text": "Editor Types"
},
"$:/language/ControlPanel/EditorTypes/Editor/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Editor/Caption",
"text": "Editor"
},
"$:/language/ControlPanel/EditorTypes/Hint": {
"title": "$:/language/ControlPanel/EditorTypes/Hint",
"text": "These tiddlers determine which editor is used to edit specific tiddler types."
},
"$:/language/ControlPanel/EditorTypes/Type/Caption": {
"title": "$:/language/ControlPanel/EditorTypes/Type/Caption",
"text": "Type"
},
"$:/language/ControlPanel/Info/Caption": {
"title": "$:/language/ControlPanel/Info/Caption",
"text": "Info"
},
"$:/language/ControlPanel/Info/Hint": {
"title": "$:/language/ControlPanel/Info/Hint",
"text": "Information about this TiddlyWiki"
},
"$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt",
"text": "Type shortcut here"
},
"$:/language/ControlPanel/KeyboardShortcuts/Add/Caption": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Add/Caption",
"text": "add shortcut"
},
"$:/language/ControlPanel/KeyboardShortcuts/Caption": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Caption",
"text": "Keyboard Shortcuts"
},
"$:/language/ControlPanel/KeyboardShortcuts/Hint": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Hint",
"text": "Manage keyboard shortcut assignments"
},
"$:/language/ControlPanel/KeyboardShortcuts/NoShortcuts/Caption": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/NoShortcuts/Caption",
"text": "No keyboard shortcuts assigned"
},
"$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint",
"text": "remove keyboard shortcut"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/All": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/All",
"text": "All platforms"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/Mac": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/Mac",
"text": "Macintosh platform only"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonMac": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/NonMac",
"text": "Non-Macintosh platforms only"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/Linux": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/Linux",
"text": "Linux platform only"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonLinux": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/NonLinux",
"text": "Non-Linux platforms only"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/Windows": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/Windows",
"text": "Windows platform only"
},
"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonWindows": {
"title": "$:/language/ControlPanel/KeyboardShortcuts/Platform/NonWindows",
"text": "Non-Windows platforms only"
},
"$:/language/ControlPanel/LoadedModules/Caption": {
"title": "$:/language/ControlPanel/LoadedModules/Caption",
"text": "Loaded Modules"
},
"$:/language/ControlPanel/LoadedModules/Hint": {
"title": "$:/language/ControlPanel/LoadedModules/Hint",
"text": "These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process."
},
"$:/language/ControlPanel/Palette/Caption": {
"title": "$:/language/ControlPanel/Palette/Caption",
"text": "Palette"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Caption",
"text": "clone"
},
"$:/language/ControlPanel/Palette/Editor/Clone/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Clone/Prompt",
"text": "It is recommended that you clone this shadow palette before editing it"
},
"$:/language/ControlPanel/Palette/Editor/Prompt/Modified": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt/Modified",
"text": "This shadow palette has been modified"
},
"$:/language/ControlPanel/Palette/Editor/Prompt": {
"title": "$:/language/ControlPanel/Palette/Editor/Prompt",
"text": "Editing"
},
"$:/language/ControlPanel/Palette/Editor/Reset/Caption": {
"title": "$:/language/ControlPanel/Palette/Editor/Reset/Caption",
"text": "reset"
},
"$:/language/ControlPanel/Palette/HideEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/HideEditor/Caption",
"text": "hide editor"
},
"$:/language/ControlPanel/Palette/Prompt": {
"title": "$:/language/ControlPanel/Palette/Prompt",
"text": "Current palette:"
},
"$:/language/ControlPanel/Palette/ShowEditor/Caption": {
"title": "$:/language/ControlPanel/Palette/ShowEditor/Caption",
"text": "show editor"
},
"$:/language/ControlPanel/Parsing/Caption": {
"title": "$:/language/ControlPanel/Parsing/Caption",
"text": "Parsing"
},
"$:/language/ControlPanel/Parsing/Hint": {
"title": "$:/language/ControlPanel/Parsing/Hint",
"text": "Here you can globally disable/enable wiki parser rules. For changes to take effect, save and reload your wiki. Disabling certain parser rules can prevent <$text text=\"TiddlyWiki\"/> from functioning correctly. Use [[safe mode|https://tiddlywiki.com/#SafeMode]] to restore normal operation."
},
"$:/language/ControlPanel/Parsing/Block/Caption": {
"title": "$:/language/ControlPanel/Parsing/Block/Caption",
"text": "Block Parse Rules"
},
"$:/language/ControlPanel/Parsing/Inline/Caption": {
"title": "$:/language/ControlPanel/Parsing/Inline/Caption",
"text": "Inline Parse Rules"
},
"$:/language/ControlPanel/Parsing/Pragma/Caption": {
"title": "$:/language/ControlPanel/Parsing/Pragma/Caption",
"text": "Pragma Parse Rules"
},
"$:/language/ControlPanel/Plugins/Add/Caption": {
"title": "$:/language/ControlPanel/Plugins/Add/Caption",
"text": "Get more plugins"
},
"$:/language/ControlPanel/Plugins/Add/Hint": {
"title": "$:/language/ControlPanel/Plugins/Add/Hint",
"text": "Install plugins from the official library"
},
"$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint": {
"title": "$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint",
"text": "This plugin is already installed at version <$text text=<<installedVersion>>/>"
},
"$:/language/ControlPanel/Plugins/Caption": {
"title": "$:/language/ControlPanel/Plugins/Caption",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Disable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Disable/Caption",
"text": "disable"
},
"$:/language/ControlPanel/Plugins/Disable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Disable/Hint",
"text": "Disable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Disabled/Status": {
"title": "$:/language/ControlPanel/Plugins/Disabled/Status",
"text": "(disabled)"
},
"$:/language/ControlPanel/Plugins/Empty/Hint": {
"title": "$:/language/ControlPanel/Plugins/Empty/Hint",
"text": "None"
},
"$:/language/ControlPanel/Plugins/Enable/Caption": {
"title": "$:/language/ControlPanel/Plugins/Enable/Caption",
"text": "enable"
},
"$:/language/ControlPanel/Plugins/Enable/Hint": {
"title": "$:/language/ControlPanel/Plugins/Enable/Hint",
"text": "Enable this plugin when reloading page"
},
"$:/language/ControlPanel/Plugins/Install/Caption": {
"title": "$:/language/ControlPanel/Plugins/Install/Caption",
"text": "install"
},
"$:/language/ControlPanel/Plugins/Installed/Hint": {
"title": "$:/language/ControlPanel/Plugins/Installed/Hint",
"text": "Currently installed plugins:"
},
"$:/language/ControlPanel/Plugins/Languages/Caption": {
"title": "$:/language/ControlPanel/Plugins/Languages/Caption",
"text": "Languages"
},
"$:/language/ControlPanel/Plugins/Languages/Hint": {
"title": "$:/language/ControlPanel/Plugins/Languages/Hint",
"text": "Language pack plugins"
},
"$:/language/ControlPanel/Plugins/NoInfoFound/Hint": {
"title": "$:/language/ControlPanel/Plugins/NoInfoFound/Hint",
"text": "No ''\"<$text text=<<currentTab>>/>\"'' found"
},
"$:/language/ControlPanel/Plugins/NotInstalled/Hint": {
"title": "$:/language/ControlPanel/Plugins/NotInstalled/Hint",
"text": "This plugin is not currently installed"
},
"$:/language/ControlPanel/Plugins/OpenPluginLibrary": {
"title": "$:/language/ControlPanel/Plugins/OpenPluginLibrary",
"text": "open plugin library"
},
"$:/language/ControlPanel/Plugins/ClosePluginLibrary": {
"title": "$:/language/ControlPanel/Plugins/ClosePluginLibrary",
"text": "close plugin library"
},
"$:/language/ControlPanel/Plugins/Plugins/Caption": {
"title": "$:/language/ControlPanel/Plugins/Plugins/Caption",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Plugins/Hint": {
"title": "$:/language/ControlPanel/Plugins/Plugins/Hint",
"text": "Plugins"
},
"$:/language/ControlPanel/Plugins/Reinstall/Caption": {
"title": "$:/language/ControlPanel/Plugins/Reinstall/Caption",
"text": "reinstall"
},
"$:/language/ControlPanel/Plugins/Themes/Caption": {
"title": "$:/language/ControlPanel/Plugins/Themes/Caption",
"text": "Themes"
},
"$:/language/ControlPanel/Plugins/Themes/Hint": {
"title": "$:/language/ControlPanel/Plugins/Themes/Hint",
"text": "Theme plugins"
},
"$:/language/ControlPanel/Saving/Caption": {
"title": "$:/language/ControlPanel/Saving/Caption",
"text": "Saving"
},
"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Description": {
"title": "$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Description",
"text": "Permit automatic saving for the download saver"
},
"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Hint": {
"title": "$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Hint",
"text": "Enable Autosave for Download Saver"
},
"$:/language/ControlPanel/Saving/DownloadSaver/Caption": {
"title": "$:/language/ControlPanel/Saving/DownloadSaver/Caption",
"text": "Download Saver"
},
"$:/language/ControlPanel/Saving/DownloadSaver/Hint": {
"title": "$:/language/ControlPanel/Saving/DownloadSaver/Hint",
"text": "These settings apply to the HTML5-compatible download saver"
},
"$:/language/ControlPanel/Saving/General/Caption": {
"title": "$:/language/ControlPanel/Saving/General/Caption",
"text": "General"
},
"$:/language/ControlPanel/Saving/General/Hint": {
"title": "$:/language/ControlPanel/Saving/General/Hint",
"text": "These settings apply to all the loaded savers"
},
"$:/language/ControlPanel/Saving/Hint": {
"title": "$:/language/ControlPanel/Saving/Hint",
"text": "Settings used for saving the entire TiddlyWiki as a single file via a saver module"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading",
"text": "Advanced Settings"
},
"$:/language/ControlPanel/Saving/TiddlySpot/BackupDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/BackupDir",
"text": "Backup Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Backups": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Backups",
"text": "Backups"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Caption": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Caption",
"text": "~TiddlySpot Saver"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Description": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Description",
"text": "These settings are only used when saving to http://tiddlyspot.com or a compatible remote server"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Filename": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Filename",
"text": "Upload Filename"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Heading": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Heading",
"text": "~TiddlySpot"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Hint": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Hint",
"text": "//The server URL defaults to `http://<wikiname>.tiddlyspot.com/store.cgi` and can be changed to use a custom server address, e.g. `http://example.com/store.php`.//"
},
"$:/language/ControlPanel/Saving/TiddlySpot/Password": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/Password",
"text": "Password"
},
"$:/language/ControlPanel/Saving/TiddlySpot/ServerURL": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/ServerURL",
"text": "Server URL"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UploadDir": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UploadDir",
"text": "Upload Directory"
},
"$:/language/ControlPanel/Saving/TiddlySpot/UserName": {
"title": "$:/language/ControlPanel/Saving/TiddlySpot/UserName",
"text": "Wiki Name"
},
"$:/language/ControlPanel/Settings/AutoSave/Caption": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Caption",
"text": "Autosave"
},
"$:/language/ControlPanel/Settings/AutoSave/Disabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Disabled/Description",
"text": "Do not save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Enabled/Description": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Enabled/Description",
"text": "Save changes automatically"
},
"$:/language/ControlPanel/Settings/AutoSave/Hint": {
"title": "$:/language/ControlPanel/Settings/AutoSave/Hint",
"text": "Attempt to automatically save changes during editing when using a supporting saver"
},
"$:/language/ControlPanel/Settings/CamelCase/Caption": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Caption",
"text": "Camel Case Wiki Links"
},
"$:/language/ControlPanel/Settings/CamelCase/Hint": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Hint",
"text": "You can globally disable automatic linking of ~CamelCase phrases. Requires reload to take effect"
},
"$:/language/ControlPanel/Settings/CamelCase/Description": {
"title": "$:/language/ControlPanel/Settings/CamelCase/Description",
"text": "Enable automatic ~CamelCase linking"
},
"$:/language/ControlPanel/Settings/Caption": {
"title": "$:/language/ControlPanel/Settings/Caption",
"text": "Settings"
},
"$:/language/ControlPanel/Settings/EditorToolbar/Caption": {
"title": "$:/language/ControlPanel/Settings/EditorToolbar/Caption",
"text": "Editor Toolbar"
},
"$:/language/ControlPanel/Settings/EditorToolbar/Hint": {
"title": "$:/language/ControlPanel/Settings/EditorToolbar/Hint",
"text": "Enable or disable the editor toolbar:"
},
"$:/language/ControlPanel/Settings/EditorToolbar/Description": {
"title": "$:/language/ControlPanel/Settings/EditorToolbar/Description",
"text": "Show editor toolbar"
},
"$:/language/ControlPanel/Settings/InfoPanelMode/Caption": {
"title": "$:/language/ControlPanel/Settings/InfoPanelMode/Caption",
"text": "Tiddler Info Panel Mode"
},
"$:/language/ControlPanel/Settings/InfoPanelMode/Hint": {
"title": "$:/language/ControlPanel/Settings/InfoPanelMode/Hint",
"text": "Control when the tiddler info panel closes:"
},
"$:/language/ControlPanel/Settings/InfoPanelMode/Popup/Description": {
"title": "$:/language/ControlPanel/Settings/InfoPanelMode/Popup/Description",
"text": "Tiddler info panel closes automatically"
},
"$:/language/ControlPanel/Settings/InfoPanelMode/Sticky/Description": {
"title": "$:/language/ControlPanel/Settings/InfoPanelMode/Sticky/Description",
"text": "Tiddler info panel stays open until explicitly closed"
},
"$:/language/ControlPanel/Settings/Hint": {
"title": "$:/language/ControlPanel/Settings/Hint",
"text": "These settings let you customise the behaviour of TiddlyWiki."
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Caption",
"text": "Navigation Address Bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Hint",
"text": "Behaviour of the browser address bar when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description",
"text": "Do not update the address bar"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description",
"text": "Include the target tiddler"
},
"$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description",
"text": "Include the target tiddler and the current story sequence"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Caption": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Caption",
"text": "Navigation History"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Hint": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Hint",
"text": "Update browser history when navigating to a tiddler:"
},
"$:/language/ControlPanel/Settings/NavigationHistory/No/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/No/Description",
"text": "Do not update history"
},
"$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description": {
"title": "$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description",
"text": "Update history"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption",
"text": "Performance Instrumentation"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint",
"text": "Displays performance statistics in the browser developer console. Requires reload to take effect"
},
"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description": {
"title": "$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description",
"text": "Enable performance instrumentation"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption",
"text": "Toolbar Button Style"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint",
"text": "Choose the style for toolbar buttons:"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless",
"text": "Borderless"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed",
"text": "Boxed"
},
"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded",
"text": "Rounded"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Caption": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Caption",
"text": "Toolbar Buttons"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Hint": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Hint",
"text": "Default toolbar button appearance:"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description",
"text": "Include icon"
},
"$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description": {
"title": "$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description",
"text": "Include text"
},
"$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption": {
"title": "$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption",
"text": "Default Sidebar Tab"
},
"$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint": {
"title": "$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint",
"text": "Specify which sidebar tab is displayed by default"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/Caption": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/Caption",
"text": "Tiddler Opening Behaviour"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint",
"text": "Navigation from //within// the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint",
"text": "Navigation from //outside// the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove",
"text": "Open above the current tiddler"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow",
"text": "Open below the current tiddler"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop",
"text": "Open at the top of the story river"
},
"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom": {
"title": "$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom",
"text": "Open at the bottom of the story river"
},
"$:/language/ControlPanel/Settings/TitleLinks/Caption": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Caption",
"text": "Tiddler Titles"
},
"$:/language/ControlPanel/Settings/TitleLinks/Hint": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Hint",
"text": "Optionally display tiddler titles as links"
},
"$:/language/ControlPanel/Settings/TitleLinks/No/Description": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/No/Description",
"text": "Do not display tiddler titles as links"
},
"$:/language/ControlPanel/Settings/TitleLinks/Yes/Description": {
"title": "$:/language/ControlPanel/Settings/TitleLinks/Yes/Description",
"text": "Display tiddler titles as links"
},
"$:/language/ControlPanel/Settings/MissingLinks/Caption": {
"title": "$:/language/ControlPanel/Settings/MissingLinks/Caption",
"text": "Wiki Links"
},
"$:/language/ControlPanel/Settings/MissingLinks/Hint": {
"title": "$:/language/ControlPanel/Settings/MissingLinks/Hint",
"text": "Choose whether to link to tiddlers that do not exist yet"
},
"$:/language/ControlPanel/Settings/MissingLinks/Description": {
"title": "$:/language/ControlPanel/Settings/MissingLinks/Description",
"text": "Enable links to missing tiddlers"
},
"$:/language/ControlPanel/StoryView/Caption": {
"title": "$:/language/ControlPanel/StoryView/Caption",
"text": "Story View"
},
"$:/language/ControlPanel/StoryView/Prompt": {
"title": "$:/language/ControlPanel/StoryView/Prompt",
"text": "Current view:"
},
"$:/language/ControlPanel/Theme/Caption": {
"title": "$:/language/ControlPanel/Theme/Caption",
"text": "Theme"
},
"$:/language/ControlPanel/Theme/Prompt": {
"title": "$:/language/ControlPanel/Theme/Prompt",
"text": "Current theme:"
},
"$:/language/ControlPanel/TiddlerFields/Caption": {
"title": "$:/language/ControlPanel/TiddlerFields/Caption",
"text": "Tiddler Fields"
},
"$:/language/ControlPanel/TiddlerFields/Hint": {
"title": "$:/language/ControlPanel/TiddlerFields/Hint",
"text": "This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers)."
},
"$:/language/ControlPanel/Toolbars/Caption": {
"title": "$:/language/ControlPanel/Toolbars/Caption",
"text": "Toolbars"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Caption",
"text": "Edit Toolbar"
},
"$:/language/ControlPanel/Toolbars/EditToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/EditToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in edit mode. Drag and drop to change the ordering"
},
"$:/language/ControlPanel/Toolbars/Hint": {
"title": "$:/language/ControlPanel/Toolbars/Hint",
"text": "Select which toolbar buttons are displayed"
},
"$:/language/ControlPanel/Toolbars/PageControls/Caption": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Caption",
"text": "Page Toolbar"
},
"$:/language/ControlPanel/Toolbars/PageControls/Hint": {
"title": "$:/language/ControlPanel/Toolbars/PageControls/Hint",
"text": "Choose which buttons are displayed on the main page toolbar. Drag and drop to change the ordering"
},
"$:/language/ControlPanel/Toolbars/EditorToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/EditorToolbar/Caption",
"text": "Editor Toolbar"
},
"$:/language/ControlPanel/Toolbars/EditorToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/EditorToolbar/Hint",
"text": "Choose which buttons are displayed in the editor toolbar. Note that some buttons will only appear when editing tiddlers of a certain type. Drag and drop to change the ordering"
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Caption": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Caption",
"text": "View Toolbar"
},
"$:/language/ControlPanel/Toolbars/ViewToolbar/Hint": {
"title": "$:/language/ControlPanel/Toolbars/ViewToolbar/Hint",
"text": "Choose which buttons are displayed for tiddlers in view mode. Drag and drop to change the ordering"
},
"$:/language/ControlPanel/Tools/Download/Full/Caption": {
"title": "$:/language/ControlPanel/Tools/Download/Full/Caption",
"text": "Download full wiki"
},
"$:/language/Date/DaySuffix/1": {
"title": "$:/language/Date/DaySuffix/1",
"text": "st"
},
"$:/language/Date/DaySuffix/2": {
"title": "$:/language/Date/DaySuffix/2",
"text": "nd"
},
"$:/language/Date/DaySuffix/3": {
"title": "$:/language/Date/DaySuffix/3",
"text": "rd"
},
"$:/language/Date/DaySuffix/4": {
"title": "$:/language/Date/DaySuffix/4",
"text": "th"
},
"$:/language/Date/DaySuffix/5": {
"title": "$:/language/Date/DaySuffix/5",
"text": "th"
},
"$:/language/Date/DaySuffix/6": {
"title": "$:/language/Date/DaySuffix/6",
"text": "th"
},
"$:/language/Date/DaySuffix/7": {
"title": "$:/language/Date/DaySuffix/7",
"text": "th"
},
"$:/language/Date/DaySuffix/8": {
"title": "$:/language/Date/DaySuffix/8",
"text": "th"
},
"$:/language/Date/DaySuffix/9": {
"title": "$:/language/Date/DaySuffix/9",
"text": "th"
},
"$:/language/Date/DaySuffix/10": {
"title": "$:/language/Date/DaySuffix/10",
"text": "th"
},
"$:/language/Date/DaySuffix/11": {
"title": "$:/language/Date/DaySuffix/11",
"text": "th"
},
"$:/language/Date/DaySuffix/12": {
"title": "$:/language/Date/DaySuffix/12",
"text": "th"
},
"$:/language/Date/DaySuffix/13": {
"title": "$:/language/Date/DaySuffix/13",
"text": "th"
},
"$:/language/Date/DaySuffix/14": {
"title": "$:/language/Date/DaySuffix/14",
"text": "th"
},
"$:/language/Date/DaySuffix/15": {
"title": "$:/language/Date/DaySuffix/15",
"text": "th"
},
"$:/language/Date/DaySuffix/16": {
"title": "$:/language/Date/DaySuffix/16",
"text": "th"
},
"$:/language/Date/DaySuffix/17": {
"title": "$:/language/Date/DaySuffix/17",
"text": "th"
},
"$:/language/Date/DaySuffix/18": {
"title": "$:/language/Date/DaySuffix/18",
"text": "th"
},
"$:/language/Date/DaySuffix/19": {
"title": "$:/language/Date/DaySuffix/19",
"text": "th"
},
"$:/language/Date/DaySuffix/20": {
"title": "$:/language/Date/DaySuffix/20",
"text": "th"
},
"$:/language/Date/DaySuffix/21": {
"title": "$:/language/Date/DaySuffix/21",
"text": "st"
},
"$:/language/Date/DaySuffix/22": {
"title": "$:/language/Date/DaySuffix/22",
"text": "nd"
},
"$:/language/Date/DaySuffix/23": {
"title": "$:/language/Date/DaySuffix/23",
"text": "rd"
},
"$:/language/Date/DaySuffix/24": {
"title": "$:/language/Date/DaySuffix/24",
"text": "th"
},
"$:/language/Date/DaySuffix/25": {
"title": "$:/language/Date/DaySuffix/25",
"text": "th"
},
"$:/language/Date/DaySuffix/26": {
"title": "$:/language/Date/DaySuffix/26",
"text": "th"
},
"$:/language/Date/DaySuffix/27": {
"title": "$:/language/Date/DaySuffix/27",
"text": "th"
},
"$:/language/Date/DaySuffix/28": {
"title": "$:/language/Date/DaySuffix/28",
"text": "th"
},
"$:/language/Date/DaySuffix/29": {
"title": "$:/language/Date/DaySuffix/29",
"text": "th"
},
"$:/language/Date/DaySuffix/30": {
"title": "$:/language/Date/DaySuffix/30",
"text": "th"
},
"$:/language/Date/DaySuffix/31": {
"title": "$:/language/Date/DaySuffix/31",
"text": "st"
},
"$:/language/Date/Long/Day/0": {
"title": "$:/language/Date/Long/Day/0",
"text": "Sunday"
},
"$:/language/Date/Long/Day/1": {
"title": "$:/language/Date/Long/Day/1",
"text": "Monday"
},
"$:/language/Date/Long/Day/2": {
"title": "$:/language/Date/Long/Day/2",
"text": "Tuesday"
},
"$:/language/Date/Long/Day/3": {
"title": "$:/language/Date/Long/Day/3",
"text": "Wednesday"
},
"$:/language/Date/Long/Day/4": {
"title": "$:/language/Date/Long/Day/4",
"text": "Thursday"
},
"$:/language/Date/Long/Day/5": {
"title": "$:/language/Date/Long/Day/5",
"text": "Friday"
},
"$:/language/Date/Long/Day/6": {
"title": "$:/language/Date/Long/Day/6",
"text": "Saturday"
},
"$:/language/Date/Long/Month/1": {
"title": "$:/language/Date/Long/Month/1",
"text": "January"
},
"$:/language/Date/Long/Month/2": {
"title": "$:/language/Date/Long/Month/2",
"text": "February"
},
"$:/language/Date/Long/Month/3": {
"title": "$:/language/Date/Long/Month/3",
"text": "March"
},
"$:/language/Date/Long/Month/4": {
"title": "$:/language/Date/Long/Month/4",
"text": "April"
},
"$:/language/Date/Long/Month/5": {
"title": "$:/language/Date/Long/Month/5",
"text": "May"
},
"$:/language/Date/Long/Month/6": {
"title": "$:/language/Date/Long/Month/6",
"text": "June"
},
"$:/language/Date/Long/Month/7": {
"title": "$:/language/Date/Long/Month/7",
"text": "July"
},
"$:/language/Date/Long/Month/8": {
"title": "$:/language/Date/Long/Month/8",
"text": "August"
},
"$:/language/Date/Long/Month/9": {
"title": "$:/language/Date/Long/Month/9",
"text": "September"
},
"$:/language/Date/Long/Month/10": {
"title": "$:/language/Date/Long/Month/10",
"text": "October"
},
"$:/language/Date/Long/Month/11": {
"title": "$:/language/Date/Long/Month/11",
"text": "November"
},
"$:/language/Date/Long/Month/12": {
"title": "$:/language/Date/Long/Month/12",
"text": "December"
},
"$:/language/Date/Period/am": {
"title": "$:/language/Date/Period/am",
"text": "am"
},
"$:/language/Date/Period/pm": {
"title": "$:/language/Date/Period/pm",
"text": "pm"
},
"$:/language/Date/Short/Day/0": {
"title": "$:/language/Date/Short/Day/0",
"text": "Sun"
},
"$:/language/Date/Short/Day/1": {
"title": "$:/language/Date/Short/Day/1",
"text": "Mon"
},
"$:/language/Date/Short/Day/2": {
"title": "$:/language/Date/Short/Day/2",
"text": "Tue"
},
"$:/language/Date/Short/Day/3": {
"title": "$:/language/Date/Short/Day/3",
"text": "Wed"
},
"$:/language/Date/Short/Day/4": {
"title": "$:/language/Date/Short/Day/4",
"text": "Thu"
},
"$:/language/Date/Short/Day/5": {
"title": "$:/language/Date/Short/Day/5",
"text": "Fri"
},
"$:/language/Date/Short/Day/6": {
"title": "$:/language/Date/Short/Day/6",
"text": "Sat"
},
"$:/language/Date/Short/Month/1": {
"title": "$:/language/Date/Short/Month/1",
"text": "Jan"
},
"$:/language/Date/Short/Month/2": {
"title": "$:/language/Date/Short/Month/2",
"text": "Feb"
},
"$:/language/Date/Short/Month/3": {
"title": "$:/language/Date/Short/Month/3",
"text": "Mar"
},
"$:/language/Date/Short/Month/4": {
"title": "$:/language/Date/Short/Month/4",
"text": "Apr"
},
"$:/language/Date/Short/Month/5": {
"title": "$:/language/Date/Short/Month/5",
"text": "May"
},
"$:/language/Date/Short/Month/6": {
"title": "$:/language/Date/Short/Month/6",
"text": "Jun"
},
"$:/language/Date/Short/Month/7": {
"title": "$:/language/Date/Short/Month/7",
"text": "Jul"
},
"$:/language/Date/Short/Month/8": {
"title": "$:/language/Date/Short/Month/8",
"text": "Aug"
},
"$:/language/Date/Short/Month/9": {
"title": "$:/language/Date/Short/Month/9",
"text": "Sep"
},
"$:/language/Date/Short/Month/10": {
"title": "$:/language/Date/Short/Month/10",
"text": "Oct"
},
"$:/language/Date/Short/Month/11": {
"title": "$:/language/Date/Short/Month/11",
"text": "Nov"
},
"$:/language/Date/Short/Month/12": {
"title": "$:/language/Date/Short/Month/12",
"text": "Dec"
},
"$:/language/RelativeDate/Future/Days": {
"title": "$:/language/RelativeDate/Future/Days",
"text": "<<period>> days from now"
},
"$:/language/RelativeDate/Future/Hours": {
"title": "$:/language/RelativeDate/Future/Hours",
"text": "<<period>> hours from now"
},
"$:/language/RelativeDate/Future/Minutes": {
"title": "$:/language/RelativeDate/Future/Minutes",
"text": "<<period>> minutes from now"
},
"$:/language/RelativeDate/Future/Months": {
"title": "$:/language/RelativeDate/Future/Months",
"text": "<<period>> months from now"
},
"$:/language/RelativeDate/Future/Second": {
"title": "$:/language/RelativeDate/Future/Second",
"text": "1 second from now"
},
"$:/language/RelativeDate/Future/Seconds": {
"title": "$:/language/RelativeDate/Future/Seconds",
"text": "<<period>> seconds from now"
},
"$:/language/RelativeDate/Future/Years": {
"title": "$:/language/RelativeDate/Future/Years",
"text": "<<period>> years from now"
},
"$:/language/RelativeDate/Past/Days": {
"title": "$:/language/RelativeDate/Past/Days",
"text": "<<period>> days ago"
},
"$:/language/RelativeDate/Past/Hours": {
"title": "$:/language/RelativeDate/Past/Hours",
"text": "<<period>> hours ago"
},
"$:/language/RelativeDate/Past/Minutes": {
"title": "$:/language/RelativeDate/Past/Minutes",
"text": "<<period>> minutes ago"
},
"$:/language/RelativeDate/Past/Months": {
"title": "$:/language/RelativeDate/Past/Months",
"text": "<<period>> months ago"
},
"$:/language/RelativeDate/Past/Second": {
"title": "$:/language/RelativeDate/Past/Second",
"text": "1 second ago"
},
"$:/language/RelativeDate/Past/Seconds": {
"title": "$:/language/RelativeDate/Past/Seconds",
"text": "<<period>> seconds ago"
},
"$:/language/RelativeDate/Past/Years": {
"title": "$:/language/RelativeDate/Past/Years",
"text": "<<period>> years ago"
},
"$:/language/Docs/ModuleTypes/allfilteroperator": {
"title": "$:/language/Docs/ModuleTypes/allfilteroperator",
"text": "A sub-operator for the ''all'' filter operator."
},
"$:/language/Docs/ModuleTypes/animation": {
"title": "$:/language/Docs/ModuleTypes/animation",
"text": "Animations that may be used with the RevealWidget."
},
"$:/language/Docs/ModuleTypes/bitmapeditoroperation": {
"title": "$:/language/Docs/ModuleTypes/bitmapeditoroperation",
"text": "A bitmap editor toolbar operation."
},
"$:/language/Docs/ModuleTypes/command": {
"title": "$:/language/Docs/ModuleTypes/command",
"text": "Commands that can be executed under Node.js."
},
"$:/language/Docs/ModuleTypes/config": {
"title": "$:/language/Docs/ModuleTypes/config",
"text": "Data to be inserted into `$tw.config`."
},
"$:/language/Docs/ModuleTypes/filteroperator": {
"title": "$:/language/Docs/ModuleTypes/filteroperator",
"text": "Individual filter operator methods."
},
"$:/language/Docs/ModuleTypes/global": {
"title": "$:/language/Docs/ModuleTypes/global",
"text": "Global data to be inserted into `$tw`."
},
"$:/language/Docs/ModuleTypes/info": {
"title": "$:/language/Docs/ModuleTypes/info",
"text": "Publishes system information via the [[$:/temp/info-plugin]] pseudo-plugin."
},
"$:/language/Docs/ModuleTypes/isfilteroperator": {
"title": "$:/language/Docs/ModuleTypes/isfilteroperator",
"text": "Operands for the ''is'' filter operator."
},
"$:/language/Docs/ModuleTypes/library": {
"title": "$:/language/Docs/ModuleTypes/library",
"text": "Generic module type for general purpose JavaScript modules."
},
"$:/language/Docs/ModuleTypes/macro": {
"title": "$:/language/Docs/ModuleTypes/macro",
"text": "JavaScript macro definitions."
},
"$:/language/Docs/ModuleTypes/parser": {
"title": "$:/language/Docs/ModuleTypes/parser",
"text": "Parsers for different content types."
},
"$:/language/Docs/ModuleTypes/saver": {
"title": "$:/language/Docs/ModuleTypes/saver",
"text": "Savers handle different methods for saving files from the browser."
},
"$:/language/Docs/ModuleTypes/startup": {
"title": "$:/language/Docs/ModuleTypes/startup",
"text": "Startup functions."
},
"$:/language/Docs/ModuleTypes/storyview": {
"title": "$:/language/Docs/ModuleTypes/storyview",
"text": "Story views customise the animation and behaviour of list widgets."
},
"$:/language/Docs/ModuleTypes/texteditoroperation": {
"title": "$:/language/Docs/ModuleTypes/texteditoroperation",
"text": "A text editor toolbar operation."
},
"$:/language/Docs/ModuleTypes/tiddlerdeserializer": {
"title": "$:/language/Docs/ModuleTypes/tiddlerdeserializer",
"text": "Converts different content types into tiddlers."
},
"$:/language/Docs/ModuleTypes/tiddlerfield": {
"title": "$:/language/Docs/ModuleTypes/tiddlerfield",
"text": "Defines the behaviour of an individual tiddler field."
},
"$:/language/Docs/ModuleTypes/tiddlermethod": {
"title": "$:/language/Docs/ModuleTypes/tiddlermethod",
"text": "Adds methods to the `$tw.Tiddler` prototype."
},
"$:/language/Docs/ModuleTypes/upgrader": {
"title": "$:/language/Docs/ModuleTypes/upgrader",
"text": "Applies upgrade processing to tiddlers during an upgrade/import."
},
"$:/language/Docs/ModuleTypes/utils": {
"title": "$:/language/Docs/ModuleTypes/utils",
"text": "Adds methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/utils-node": {
"title": "$:/language/Docs/ModuleTypes/utils-node",
"text": "Adds Node.js-specific methods to `$tw.utils`."
},
"$:/language/Docs/ModuleTypes/widget": {
"title": "$:/language/Docs/ModuleTypes/widget",
"text": "Widgets encapsulate DOM rendering and refreshing."
},
"$:/language/Docs/ModuleTypes/wikimethod": {
"title": "$:/language/Docs/ModuleTypes/wikimethod",
"text": "Adds methods to `$tw.Wiki`."
},
"$:/language/Docs/ModuleTypes/wikirule": {
"title": "$:/language/Docs/ModuleTypes/wikirule",
"text": "Individual parser rules for the main WikiText parser."
},
"$:/language/Docs/PaletteColours/alert-background": {
"title": "$:/language/Docs/PaletteColours/alert-background",
"text": "Alert background"
},
"$:/language/Docs/PaletteColours/alert-border": {
"title": "$:/language/Docs/PaletteColours/alert-border",
"text": "Alert border"
},
"$:/language/Docs/PaletteColours/alert-highlight": {
"title": "$:/language/Docs/PaletteColours/alert-highlight",
"text": "Alert highlight"
},
"$:/language/Docs/PaletteColours/alert-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/alert-muted-foreground",
"text": "Alert muted foreground"
},
"$:/language/Docs/PaletteColours/background": {
"title": "$:/language/Docs/PaletteColours/background",
"text": "General background"
},
"$:/language/Docs/PaletteColours/blockquote-bar": {
"title": "$:/language/Docs/PaletteColours/blockquote-bar",
"text": "Blockquote bar"
},
"$:/language/Docs/PaletteColours/button-background": {
"title": "$:/language/Docs/PaletteColours/button-background",
"text": "Default button background"
},
"$:/language/Docs/PaletteColours/button-border": {
"title": "$:/language/Docs/PaletteColours/button-border",
"text": "Default button border"
},
"$:/language/Docs/PaletteColours/button-foreground": {
"title": "$:/language/Docs/PaletteColours/button-foreground",
"text": "Default button foreground"
},
"$:/language/Docs/PaletteColours/dirty-indicator": {
"title": "$:/language/Docs/PaletteColours/dirty-indicator",
"text": "Unsaved changes indicator"
},
"$:/language/Docs/PaletteColours/code-background": {
"title": "$:/language/Docs/PaletteColours/code-background",
"text": "Code background"
},
"$:/language/Docs/PaletteColours/code-border": {
"title": "$:/language/Docs/PaletteColours/code-border",
"text": "Code border"
},
"$:/language/Docs/PaletteColours/code-foreground": {
"title": "$:/language/Docs/PaletteColours/code-foreground",
"text": "Code foreground"
},
"$:/language/Docs/PaletteColours/download-background": {
"title": "$:/language/Docs/PaletteColours/download-background",
"text": "Download button background"
},
"$:/language/Docs/PaletteColours/download-foreground": {
"title": "$:/language/Docs/PaletteColours/download-foreground",
"text": "Download button foreground"
},
"$:/language/Docs/PaletteColours/dragger-background": {
"title": "$:/language/Docs/PaletteColours/dragger-background",
"text": "Dragger background"
},
"$:/language/Docs/PaletteColours/dragger-foreground": {
"title": "$:/language/Docs/PaletteColours/dragger-foreground",
"text": "Dragger foreground"
},
"$:/language/Docs/PaletteColours/dropdown-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-background",
"text": "Dropdown background"
},
"$:/language/Docs/PaletteColours/dropdown-border": {
"title": "$:/language/Docs/PaletteColours/dropdown-border",
"text": "Dropdown border"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background-selected",
"text": "Dropdown tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/dropdown-tab-background": {
"title": "$:/language/Docs/PaletteColours/dropdown-tab-background",
"text": "Dropdown tab background"
},
"$:/language/Docs/PaletteColours/dropzone-background": {
"title": "$:/language/Docs/PaletteColours/dropzone-background",
"text": "Dropzone background"
},
"$:/language/Docs/PaletteColours/external-link-background-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-background-hover",
"text": "External link background hover"
},
"$:/language/Docs/PaletteColours/external-link-background-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-background-visited",
"text": "External link background visited"
},
"$:/language/Docs/PaletteColours/external-link-background": {
"title": "$:/language/Docs/PaletteColours/external-link-background",
"text": "External link background"
},
"$:/language/Docs/PaletteColours/external-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-hover",
"text": "External link foreground hover"
},
"$:/language/Docs/PaletteColours/external-link-foreground-visited": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground-visited",
"text": "External link foreground visited"
},
"$:/language/Docs/PaletteColours/external-link-foreground": {
"title": "$:/language/Docs/PaletteColours/external-link-foreground",
"text": "External link foreground"
},
"$:/language/Docs/PaletteColours/foreground": {
"title": "$:/language/Docs/PaletteColours/foreground",
"text": "General foreground"
},
"$:/language/Docs/PaletteColours/message-background": {
"title": "$:/language/Docs/PaletteColours/message-background",
"text": "Message box background"
},
"$:/language/Docs/PaletteColours/message-border": {
"title": "$:/language/Docs/PaletteColours/message-border",
"text": "Message box border"
},
"$:/language/Docs/PaletteColours/message-foreground": {
"title": "$:/language/Docs/PaletteColours/message-foreground",
"text": "Message box foreground"
},
"$:/language/Docs/PaletteColours/modal-backdrop": {
"title": "$:/language/Docs/PaletteColours/modal-backdrop",
"text": "Modal backdrop"
},
"$:/language/Docs/PaletteColours/modal-background": {
"title": "$:/language/Docs/PaletteColours/modal-background",
"text": "Modal background"
},
"$:/language/Docs/PaletteColours/modal-border": {
"title": "$:/language/Docs/PaletteColours/modal-border",
"text": "Modal border"
},
"$:/language/Docs/PaletteColours/modal-footer-background": {
"title": "$:/language/Docs/PaletteColours/modal-footer-background",
"text": "Modal footer background"
},
"$:/language/Docs/PaletteColours/modal-footer-border": {
"title": "$:/language/Docs/PaletteColours/modal-footer-border",
"text": "Modal footer border"
},
"$:/language/Docs/PaletteColours/modal-header-border": {
"title": "$:/language/Docs/PaletteColours/modal-header-border",
"text": "Modal header border"
},
"$:/language/Docs/PaletteColours/muted-foreground": {
"title": "$:/language/Docs/PaletteColours/muted-foreground",
"text": "General muted foreground"
},
"$:/language/Docs/PaletteColours/notification-background": {
"title": "$:/language/Docs/PaletteColours/notification-background",
"text": "Notification background"
},
"$:/language/Docs/PaletteColours/notification-border": {
"title": "$:/language/Docs/PaletteColours/notification-border",
"text": "Notification border"
},
"$:/language/Docs/PaletteColours/page-background": {
"title": "$:/language/Docs/PaletteColours/page-background",
"text": "Page background"
},
"$:/language/Docs/PaletteColours/pre-background": {
"title": "$:/language/Docs/PaletteColours/pre-background",
"text": "Preformatted code background"
},
"$:/language/Docs/PaletteColours/pre-border": {
"title": "$:/language/Docs/PaletteColours/pre-border",
"text": "Preformatted code border"
},
"$:/language/Docs/PaletteColours/primary": {
"title": "$:/language/Docs/PaletteColours/primary",
"text": "General primary"
},
"$:/language/Docs/PaletteColours/sidebar-button-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-button-foreground",
"text": "Sidebar button foreground"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground-hover",
"text": "Sidebar controls foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-controls-foreground",
"text": "Sidebar controls foreground"
},
"$:/language/Docs/PaletteColours/sidebar-foreground-shadow": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground-shadow",
"text": "Sidebar foreground shadow"
},
"$:/language/Docs/PaletteColours/sidebar-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-foreground",
"text": "Sidebar foreground"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground-hover",
"text": "Sidebar muted foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-muted-foreground",
"text": "Sidebar muted foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background-selected",
"text": "Sidebar tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-background": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-background",
"text": "Sidebar tab background"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border-selected",
"text": "Sidebar tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-border": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-border",
"text": "Sidebar tab border"
},
"$:/language/Docs/PaletteColours/sidebar-tab-divider": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-divider",
"text": "Sidebar tab divider"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground-selected",
"text": "Sidebar tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/sidebar-tab-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tab-foreground",
"text": "Sidebar tab foreground"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground-hover",
"text": "Sidebar tiddler link foreground hover"
},
"$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/sidebar-tiddler-link-foreground",
"text": "Sidebar tiddler link foreground"
},
"$:/language/Docs/PaletteColours/site-title-foreground": {
"title": "$:/language/Docs/PaletteColours/site-title-foreground",
"text": "Site title foreground"
},
"$:/language/Docs/PaletteColours/static-alert-foreground": {
"title": "$:/language/Docs/PaletteColours/static-alert-foreground",
"text": "Static alert foreground"
},
"$:/language/Docs/PaletteColours/tab-background-selected": {
"title": "$:/language/Docs/PaletteColours/tab-background-selected",
"text": "Tab background for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-background": {
"title": "$:/language/Docs/PaletteColours/tab-background",
"text": "Tab background"
},
"$:/language/Docs/PaletteColours/tab-border-selected": {
"title": "$:/language/Docs/PaletteColours/tab-border-selected",
"text": "Tab border for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-border": {
"title": "$:/language/Docs/PaletteColours/tab-border",
"text": "Tab border"
},
"$:/language/Docs/PaletteColours/tab-divider": {
"title": "$:/language/Docs/PaletteColours/tab-divider",
"text": "Tab divider"
},
"$:/language/Docs/PaletteColours/tab-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tab-foreground-selected",
"text": "Tab foreground for selected tabs"
},
"$:/language/Docs/PaletteColours/tab-foreground": {
"title": "$:/language/Docs/PaletteColours/tab-foreground",
"text": "Tab foreground"
},
"$:/language/Docs/PaletteColours/table-border": {
"title": "$:/language/Docs/PaletteColours/table-border",
"text": "Table border"
},
"$:/language/Docs/PaletteColours/table-footer-background": {
"title": "$:/language/Docs/PaletteColours/table-footer-background",
"text": "Table footer background"
},
"$:/language/Docs/PaletteColours/table-header-background": {
"title": "$:/language/Docs/PaletteColours/table-header-background",
"text": "Table header background"
},
"$:/language/Docs/PaletteColours/tag-background": {
"title": "$:/language/Docs/PaletteColours/tag-background",
"text": "Tag background"
},
"$:/language/Docs/PaletteColours/tag-foreground": {
"title": "$:/language/Docs/PaletteColours/tag-foreground",
"text": "Tag foreground"
},
"$:/language/Docs/PaletteColours/tiddler-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-background",
"text": "Tiddler background"
},
"$:/language/Docs/PaletteColours/tiddler-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-border",
"text": "Tiddler border"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-hover",
"text": "Tiddler controls foreground hover"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground-selected",
"text": "Tiddler controls foreground for selected controls"
},
"$:/language/Docs/PaletteColours/tiddler-controls-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-controls-foreground",
"text": "Tiddler controls foreground"
},
"$:/language/Docs/PaletteColours/tiddler-editor-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-background",
"text": "Tiddler editor background"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border-image": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border-image",
"text": "Tiddler editor border image"
},
"$:/language/Docs/PaletteColours/tiddler-editor-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-border",
"text": "Tiddler editor border"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-even": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-even",
"text": "Tiddler editor background for even fields"
},
"$:/language/Docs/PaletteColours/tiddler-editor-fields-odd": {
"title": "$:/language/Docs/PaletteColours/tiddler-editor-fields-odd",
"text": "Tiddler editor background for odd fields"
},
"$:/language/Docs/PaletteColours/tiddler-info-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-background",
"text": "Tiddler info panel background"
},
"$:/language/Docs/PaletteColours/tiddler-info-border": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-border",
"text": "Tiddler info panel border"
},
"$:/language/Docs/PaletteColours/tiddler-info-tab-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-info-tab-background",
"text": "Tiddler info panel tab background"
},
"$:/language/Docs/PaletteColours/tiddler-link-background": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-background",
"text": "Tiddler link background"
},
"$:/language/Docs/PaletteColours/tiddler-link-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-link-foreground",
"text": "Tiddler link foreground"
},
"$:/language/Docs/PaletteColours/tiddler-subtitle-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-subtitle-foreground",
"text": "Tiddler subtitle foreground"
},
"$:/language/Docs/PaletteColours/tiddler-title-foreground": {
"title": "$:/language/Docs/PaletteColours/tiddler-title-foreground",
"text": "Tiddler title foreground"
},
"$:/language/Docs/PaletteColours/toolbar-new-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-new-button",
"text": "Toolbar 'new tiddler' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-options-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-options-button",
"text": "Toolbar 'options' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-save-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-save-button",
"text": "Toolbar 'save' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-info-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-info-button",
"text": "Toolbar 'info' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-edit-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-edit-button",
"text": "Toolbar 'edit' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-close-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-close-button",
"text": "Toolbar 'close' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-delete-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-delete-button",
"text": "Toolbar 'delete' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-cancel-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-cancel-button",
"text": "Toolbar 'cancel' button foreground"
},
"$:/language/Docs/PaletteColours/toolbar-done-button": {
"title": "$:/language/Docs/PaletteColours/toolbar-done-button",
"text": "Toolbar 'done' button foreground"
},
"$:/language/Docs/PaletteColours/untagged-background": {
"title": "$:/language/Docs/PaletteColours/untagged-background",
"text": "Untagged pill background"
},
"$:/language/Docs/PaletteColours/very-muted-foreground": {
"title": "$:/language/Docs/PaletteColours/very-muted-foreground",
"text": "Very muted foreground"
},
"$:/language/EditTemplate/Body/External/Hint": {
"title": "$:/language/EditTemplate/Body/External/Hint",
"text": "This tiddler shows content stored outside of the main TiddlyWiki file. You can edit the tags and fields but cannot directly edit the content itself"
},
"$:/language/EditTemplate/Body/Placeholder": {
"title": "$:/language/EditTemplate/Body/Placeholder",
"text": "Type the text for this tiddler"
},
"$:/language/EditTemplate/Body/Preview/Type/Output": {
"title": "$:/language/EditTemplate/Body/Preview/Type/Output",
"text": "output"
},
"$:/language/EditTemplate/Field/Remove/Caption": {
"title": "$:/language/EditTemplate/Field/Remove/Caption",
"text": "remove field"
},
"$:/language/EditTemplate/Field/Remove/Hint": {
"title": "$:/language/EditTemplate/Field/Remove/Hint",
"text": "Remove field"
},
"$:/language/EditTemplate/Fields/Add/Button": {
"title": "$:/language/EditTemplate/Fields/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Fields/Add/Name/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Name/Placeholder",
"text": "field name"
},
"$:/language/EditTemplate/Fields/Add/Prompt": {
"title": "$:/language/EditTemplate/Fields/Add/Prompt",
"text": "Add a new field:"
},
"$:/language/EditTemplate/Fields/Add/Value/Placeholder": {
"title": "$:/language/EditTemplate/Fields/Add/Value/Placeholder",
"text": "field value"
},
"$:/language/EditTemplate/Fields/Add/Dropdown/System": {
"title": "$:/language/EditTemplate/Fields/Add/Dropdown/System",
"text": "System fields"
},
"$:/language/EditTemplate/Fields/Add/Dropdown/User": {
"title": "$:/language/EditTemplate/Fields/Add/Dropdown/User",
"text": "User fields"
},
"$:/language/EditTemplate/Shadow/Warning": {
"title": "$:/language/EditTemplate/Shadow/Warning",
"text": "This is a shadow tiddler. Any changes you make will override the default version from the plugin <<pluginLink>>"
},
"$:/language/EditTemplate/Shadow/OverriddenWarning": {
"title": "$:/language/EditTemplate/Shadow/OverriddenWarning",
"text": "This is a modified shadow tiddler. You can revert to the default version in the plugin <<pluginLink>> by deleting this tiddler"
},
"$:/language/EditTemplate/Tags/Add/Button": {
"title": "$:/language/EditTemplate/Tags/Add/Button",
"text": "add"
},
"$:/language/EditTemplate/Tags/Add/Placeholder": {
"title": "$:/language/EditTemplate/Tags/Add/Placeholder",
"text": "tag name"
},
"$:/language/EditTemplate/Tags/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Caption",
"text": "tag list"
},
"$:/language/EditTemplate/Tags/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Tags/Dropdown/Hint",
"text": "Show tag list"
},
"$:/language/EditTemplate/Title/BadCharacterWarning": {
"title": "$:/language/EditTemplate/Title/BadCharacterWarning",
"text": "Warning: avoid using any of the characters <<bad-chars>> in tiddler titles"
},
"$:/language/EditTemplate/Title/Exists/Prompt": {
"title": "$:/language/EditTemplate/Title/Exists/Prompt",
"text": "Target tiddler already exists"
},
"$:/language/EditTemplate/Title/Relink/Prompt": {
"title": "$:/language/EditTemplate/Title/Relink/Prompt",
"text": "Update ''<$text text=<<fromTitle>>/>'' to ''<$text text=<<toTitle>>/>'' in the //tags// and //list// fields of other tiddlers"
},
"$:/language/EditTemplate/Type/Dropdown/Caption": {
"title": "$:/language/EditTemplate/Type/Dropdown/Caption",
"text": "content type list"
},
"$:/language/EditTemplate/Type/Dropdown/Hint": {
"title": "$:/language/EditTemplate/Type/Dropdown/Hint",
"text": "Show content type list"
},
"$:/language/EditTemplate/Type/Delete/Caption": {
"title": "$:/language/EditTemplate/Type/Delete/Caption",
"text": "delete content type"
},
"$:/language/EditTemplate/Type/Delete/Hint": {
"title": "$:/language/EditTemplate/Type/Delete/Hint",
"text": "Delete content type"
},
"$:/language/EditTemplate/Type/Placeholder": {
"title": "$:/language/EditTemplate/Type/Placeholder",
"text": "content type"
},
"$:/language/EditTemplate/Type/Prompt": {
"title": "$:/language/EditTemplate/Type/Prompt",
"text": "Type:"
},
"$:/language/Exporters/StaticRiver": {
"title": "$:/language/Exporters/StaticRiver",
"text": "Static HTML"
},
"$:/language/Exporters/JsonFile": {
"title": "$:/language/Exporters/JsonFile",
"text": "JSON file"
},
"$:/language/Exporters/CsvFile": {
"title": "$:/language/Exporters/CsvFile",
"text": "CSV file"
},
"$:/language/Exporters/TidFile": {
"title": "$:/language/Exporters/TidFile",
"text": "\".tid\" file"
},
"$:/language/Docs/Fields/_canonical_uri": {
"title": "$:/language/Docs/Fields/_canonical_uri",
"text": "The full URI of an external image tiddler"
},
"$:/language/Docs/Fields/bag": {
"title": "$:/language/Docs/Fields/bag",
"text": "The name of the bag from which a tiddler came"
},
"$:/language/Docs/Fields/caption": {
"title": "$:/language/Docs/Fields/caption",
"text": "The text to be displayed on a tab or button"
},
"$:/language/Docs/Fields/color": {
"title": "$:/language/Docs/Fields/color",
"text": "The CSS color value associated with a tiddler"
},
"$:/language/Docs/Fields/component": {
"title": "$:/language/Docs/Fields/component",
"text": "The name of the component responsible for an [[alert tiddler|AlertMechanism]]"
},
"$:/language/Docs/Fields/current-tiddler": {
"title": "$:/language/Docs/Fields/current-tiddler",
"text": "Used to cache the top tiddler in a [[history list|HistoryMechanism]]"
},
"$:/language/Docs/Fields/created": {
"title": "$:/language/Docs/Fields/created",
"text": "The date a tiddler was created"
},
"$:/language/Docs/Fields/creator": {
"title": "$:/language/Docs/Fields/creator",
"text": "The name of the person who created a tiddler"
},
"$:/language/Docs/Fields/dependents": {
"title": "$:/language/Docs/Fields/dependents",
"text": "For a plugin, lists the dependent plugin titles"
},
"$:/language/Docs/Fields/description": {
"title": "$:/language/Docs/Fields/description",
"text": "The descriptive text for a plugin, or a modal dialogue"
},
"$:/language/Docs/Fields/draft.of": {
"title": "$:/language/Docs/Fields/draft.of",
"text": "For draft tiddlers, contains the title of the tiddler of which this is a draft"
},
"$:/language/Docs/Fields/draft.title": {
"title": "$:/language/Docs/Fields/draft.title",
"text": "For draft tiddlers, contains the proposed new title of the tiddler"
},
"$:/language/Docs/Fields/footer": {
"title": "$:/language/Docs/Fields/footer",
"text": "The footer text for a wizard"
},
"$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against": {
"title": "$:/language/Docs/Fields/hack-to-give-us-something-to-compare-against",
"text": "A temporary storage field used in [[$:/core/templates/static.content]]"
},
"$:/language/Docs/Fields/icon": {
"title": "$:/language/Docs/Fields/icon",
"text": "The title of the tiddler containing the icon associated with a tiddler"
},
"$:/language/Docs/Fields/library": {
"title": "$:/language/Docs/Fields/library",
"text": "If set to \"yes\" indicates that a tiddler should be saved as a JavaScript library"
},
"$:/language/Docs/Fields/list": {
"title": "$:/language/Docs/Fields/list",
"text": "An ordered list of tiddler titles associated with a tiddler"
},
"$:/language/Docs/Fields/list-before": {
"title": "$:/language/Docs/Fields/list-before",
"text": "If set, the title of a tiddler before which this tiddler should be added to the ordered list of tiddler titles, or at the start of the list if this field is present but empty"
},
"$:/language/Docs/Fields/list-after": {
"title": "$:/language/Docs/Fields/list-after",
"text": "If set, the title of the tiddler after which this tiddler should be added to the ordered list of tiddler titles"
},
"$:/language/Docs/Fields/modified": {
"title": "$:/language/Docs/Fields/modified",
"text": "The date and time at which a tiddler was last modified"
},
"$:/language/Docs/Fields/modifier": {
"title": "$:/language/Docs/Fields/modifier",
"text": "The tiddler title associated with the person who last modified a tiddler"
},
"$:/language/Docs/Fields/name": {
"title": "$:/language/Docs/Fields/name",
"text": "The human readable name associated with a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-priority": {
"title": "$:/language/Docs/Fields/plugin-priority",
"text": "A numerical value indicating the priority of a plugin tiddler"
},
"$:/language/Docs/Fields/plugin-type": {
"title": "$:/language/Docs/Fields/plugin-type",
"text": "The type of plugin in a plugin tiddler"
},
"$:/language/Docs/Fields/revision": {
"title": "$:/language/Docs/Fields/revision",
"text": "The revision of the tiddler held at the server"
},
"$:/language/Docs/Fields/released": {
"title": "$:/language/Docs/Fields/released",
"text": "Date of a TiddlyWiki release"
},
"$:/language/Docs/Fields/source": {
"title": "$:/language/Docs/Fields/source",
"text": "The source URL associated with a tiddler"
},
"$:/language/Docs/Fields/subtitle": {
"title": "$:/language/Docs/Fields/subtitle",
"text": "The subtitle text for a wizard"
},
"$:/language/Docs/Fields/tags": {
"title": "$:/language/Docs/Fields/tags",
"text": "A list of tags associated with a tiddler"
},
"$:/language/Docs/Fields/text": {
"title": "$:/language/Docs/Fields/text",
"text": "The body text of a tiddler"
},
"$:/language/Docs/Fields/title": {
"title": "$:/language/Docs/Fields/title",
"text": "The unique name of a tiddler"
},
"$:/language/Docs/Fields/type": {
"title": "$:/language/Docs/Fields/type",
"text": "The content type of a tiddler"
},
"$:/language/Docs/Fields/version": {
"title": "$:/language/Docs/Fields/version",
"text": "Version information for a plugin"
},
"$:/language/Filters/AllTiddlers": {
"title": "$:/language/Filters/AllTiddlers",
"text": "All tiddlers except system tiddlers"
},
"$:/language/Filters/RecentSystemTiddlers": {
"title": "$:/language/Filters/RecentSystemTiddlers",
"text": "Recently modified tiddlers, including system tiddlers"
},
"$:/language/Filters/RecentTiddlers": {
"title": "$:/language/Filters/RecentTiddlers",
"text": "Recently modified tiddlers"
},
"$:/language/Filters/AllTags": {
"title": "$:/language/Filters/AllTags",
"text": "All tags except system tags"
},
"$:/language/Filters/Missing": {
"title": "$:/language/Filters/Missing",
"text": "Missing tiddlers"
},
"$:/language/Filters/Drafts": {
"title": "$:/language/Filters/Drafts",
"text": "Draft tiddlers"
},
"$:/language/Filters/Orphans": {
"title": "$:/language/Filters/Orphans",
"text": "Orphan tiddlers"
},
"$:/language/Filters/SystemTiddlers": {
"title": "$:/language/Filters/SystemTiddlers",
"text": "System tiddlers"
},
"$:/language/Filters/ShadowTiddlers": {
"title": "$:/language/Filters/ShadowTiddlers",
"text": "Shadow tiddlers"
},
"$:/language/Filters/OverriddenShadowTiddlers": {
"title": "$:/language/Filters/OverriddenShadowTiddlers",
"text": "Overridden shadow tiddlers"
},
"$:/language/Filters/SystemTags": {
"title": "$:/language/Filters/SystemTags",
"text": "System tags"
},
"$:/language/Filters/StoryList": {
"title": "$:/language/Filters/StoryList",
"text": "Tiddlers in the story river, excluding <$text text=\"$:/AdvancedSearch\"/>"
},
"$:/language/Filters/TypedTiddlers": {
"title": "$:/language/Filters/TypedTiddlers",
"text": "Non wiki-text tiddlers"
},
"GettingStarted": {
"title": "GettingStarted",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\nWelcome to ~TiddlyWiki and the ~TiddlyWiki community\n\nBefore you start storing important information in ~TiddlyWiki it is important to make sure that you can reliably save changes. See https://tiddlywiki.com/#GettingStarted for details\n\n!! Set up this ~TiddlyWiki\n\n<div class=\"tc-control-panel\">\n\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\n</div>\n\nSee the [[control panel|$:/ControlPanel]] for more options.\n"
},
"$:/language/Help/build": {
"title": "$:/language/Help/build",
"description": "Automatically run configured commands",
"text": "Build the specified build targets for the current wiki. If no build targets are specified then all available targets will be built.\n\n```\n--build <target> [<target> ...]\n```\n\nBuild targets are defined in the `tiddlywiki.info` file of a wiki folder.\n\n"
},
"$:/language/Help/clearpassword": {
"title": "$:/language/Help/clearpassword",
"description": "Clear a password for subsequent crypto operations",
"text": "Clear the password for subsequent crypto operations\n\n```\n--clearpassword\n```\n"
},
"$:/language/Help/default": {
"title": "$:/language/Help/default",
"text": "\\define commandTitle()\n$:/language/Help/$(command)$\n\\end\n```\nusage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]\n```\n\nAvailable commands:\n\n<ul>\n<$list filter=\"[commands[]sort[title]]\" variable=\"command\">\n<li><$link to=<<commandTitle>>><$macrocall $name=\"command\" $type=\"text/plain\" $output=\"text/plain\"/></$link>: <$transclude tiddler=<<commandTitle>> field=\"description\"/></li>\n</$list>\n</ul>\n\nTo get detailed help on a command:\n\n```\ntiddlywiki --help <command>\n```\n"
},
"$:/language/Help/editions": {
"title": "$:/language/Help/editions",
"description": "Lists the available editions of TiddlyWiki",
"text": "Lists the names and descriptions of the available editions. You can create a new wiki of a specified edition with the `--init` command.\n\n```\n--editions\n```\n"
},
"$:/language/Help/fetch": {
"title": "$:/language/Help/fetch",
"description": "Fetch tiddlers from wiki by URL",
"text": "Fetch one or more files over HTTP/HTTPS, and import the tiddlers matching a filter, optionally transforming the incoming titles.\n\n```\n--fetch file <url> <import-filter> <transform-filter>\n--fetch files <url-filter> <import-filter> <transform-filter>\n--fetch raw-file <url> <transform-filter>\n--fetch raw-files <url-filter> <transform-filter>\n```\n\nThe \"file\" and \"files\" variants fetch the specified files and attempt to import the tiddlers within them (the same processing as if the files were dragged into the browser window). The \"raw-file\" and \"raw-files\" variants fetch the specified files and then store the raw file data in tiddlers, without applying the import logic.\n\nWith the \"file\" and \"raw-file\" variants only a single file is fetched and the first parameter is the URL of the file to read.\n\nWith the \"files\" and \"raw-files\" variants, multiple files are fetched and the first parameter is a filter yielding a list of URLs of the files to read. For example, given a set of tiddlers tagged \"remote-server\" that have a field \"url\" the filter `[tag[remote-server]get[url]]` will retrieve all the available URLs.\n\nFor the \"file\" and \"files\" variants, the `<import-filter>` parameter specifies a filter determining which tiddlers are imported. It defaults to `[all[tiddlers]]` if not provided.\n\nFor all variants, the `<transform-filter>` parameter specifies an optional filter that transforms the titles of the imported tiddlers. For example, `[addprefix[$:/myimports/]]` would add the prefix `$:/myimports/` to each title.\n\nPreceding the `--fetch` command with `--verbose` will output progress information during the import.\n\nNote that TiddlyWiki will not fetch an older version of an already loaded plugin.\n\nThe following example retrieves all the non-system tiddlers from https://tiddlywiki.com and saves them to a JSON file:\n\n```\ntiddlywiki --verbose --fetch file \"https://tiddlywiki.com/\" \"[!is[system]]\" \"\" --rendertiddler \"$:/core/templates/exporters/JsonFile\" output.json text/plain \"\" exportFilter \"[!is[system]]\"\n```\n\nThe following example retrieves the \"favicon\" file from tiddlywiki.com and saves it in a file called \"output.ico\". Note that the intermediate tiddler \"Icon Tiddler\" is quoted in the \"--fetch\" command because it is being used as a transformation filter to replace the default title, while there are no quotes for the \"--savetiddler\" command because it is being used directly as a title.\n\n```\ntiddlywiki --verbose --fetch raw-file \"https://tiddlywiki.com/favicon.ico\" \"[[Icon Tiddler]]\" --savetiddler \"Icon Tiddler\" output.ico\n```\n\n"
},
"$:/language/Help/help": {
"title": "$:/language/Help/help",
"description": "Display help for TiddlyWiki commands",
"text": "Displays help text for a command:\n\n```\n--help [<command>]\n```\n\nIf the command name is omitted then a list of available commands is displayed.\n"
},
"$:/language/Help/import": {
"title": "$:/language/Help/import",
"description": "Import tiddlers from a file",
"text": "Import tiddlers from TiddlyWiki (`.html`), `.tiddler`, `.tid`, `.json` or other local files. The deserializer must be explicitly specified, unlike the `load` command which infers the deserializer from the file extension.\n\n```\n--import <filepath> <deserializer> [<title>] [<encoding>]\n```\n\nThe deserializers in the core include:\n\n* application/javascript\n* application/json\n* application/x-tiddler\n* application/x-tiddler-html-div\n* application/x-tiddlers\n* text/html\n* text/plain\n\nThe title of the imported tiddler defaults to the filename.\n\nThe encoding defaults to \"utf8\", but can be \"base64\" for importing binary files.\n\nNote that TiddlyWiki will not import an older version of an already loaded plugin.\n"
},
"$:/language/Help/init": {
"title": "$:/language/Help/init",
"description": "Initialise a new wiki folder",
"text": "Initialise an empty [[WikiFolder|WikiFolders]] with a copy of the specified edition.\n\n```\n--init <edition> [<edition> ...]\n```\n\nFor example:\n\n```\ntiddlywiki ./MyWikiFolder --init empty\n```\n\nNote:\n\n* The wiki folder directory will be created if necessary\n* The \"edition\" defaults to ''empty''\n* The init command will fail if the wiki folder is not empty\n* The init command removes any `includeWikis` definitions in the edition's `tiddlywiki.info` file\n* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final `tiddlywiki.info` file will be copied from the last edition)\n* `--editions` returns a list of available editions\n"
},
"$:/language/Help/load": {
"title": "$:/language/Help/load",
"description": "Load tiddlers from a file",
"text": "Load tiddlers from TiddlyWiki (`.html`), `.tiddler`, `.tid`, `.json` or other local files. The processing applied to incoming files is determined by the file extension. Use the alternative `import` command if you need to specify the deserializer and encoding explicitly.\n\n```\n--load <filepath>\n--load <dirpath>\n```\n\nTo load tiddlers from an encrypted TiddlyWiki file you should first specify the password with the PasswordCommand. For example:\n\n```\ntiddlywiki ./MyWiki --password pa55w0rd --load my_encrypted_wiki.html\n```\n\nNote that TiddlyWiki will not load an older version of an already loaded plugin.\n"
},
"$:/language/Help/makelibrary": {
"title": "$:/language/Help/makelibrary",
"description": "Construct library plugin required by upgrade process",
"text": "Constructs the `$:/UpgradeLibrary` tiddler for the upgrade process.\n\nThe upgrade library is formatted as an ordinary plugin tiddler with the plugin type `library`. It contains a copy of each of the plugins, themes and language packs available within the TiddlyWiki5 repository.\n\nThis command is intended for internal use; it is only relevant to users constructing a custom upgrade procedure.\n\n```\n--makelibrary <title>\n```\n\nThe title argument defaults to `$:/UpgradeLibrary`.\n"
},
"$:/language/Help/notfound": {
"title": "$:/language/Help/notfound",
"text": "No such help item"
},
"$:/language/Help/output": {
"title": "$:/language/Help/output",
"description": "Set the base output directory for subsequent commands",
"text": "Sets the base output directory for subsequent commands. The default output directory is the `output` subdirectory of the edition directory.\n\n```\n--output <pathname>\n```\n\nIf the specified pathname is relative then it is resolved relative to the current working directory. For example `--output .` sets the output directory to the current working directory.\n\n"
},
"$:/language/Help/password": {
"title": "$:/language/Help/password",
"description": "Set a password for subsequent crypto operations",
"text": "Set a password for subsequent crypto operations\n\n```\n--password <password>\n```\n\n''Note'': This should not be used for serving TiddlyWiki with password protection. Instead, see the password option under the [[ServerCommand]].\n"
},
"$:/language/Help/render": {
"title": "$:/language/Help/render",
"description": "Renders individual tiddlers to files",
"text": "Render individual tiddlers identified by a filter and save the results to the specified files.\n\nOptionally, the title of a template tiddler can be specified. In this case, instead of directly rendering each tiddler, the template tiddler is rendered with the \"currentTiddler\" variable set to the title of the tiddler that is being rendered.\n\nA name and value for an additional variable may optionally also be specified.\n\n```\n--render <tiddler-filter> [<filename-filter>] [<render-type>] [<template>] [<name>] [<value>]\n```\n\n* ''tiddler-filter'': A filter identifying the tiddler(s) to be rendered\n* ''filename-filter'': Optional filter transforming tiddler titles into pathnames. If omitted, defaults to `[is[tiddler]addsuffix[.html]]`, which uses the unchanged tiddler title as the filename\n* ''template'': Optional template through which each tiddler is rendered\n* ''render-type'': Optional render type: `text/html` (the default) returns the full HTML text and `text/plain` just returns the text content (ie it ignores HTML tags and other unprintable material)\n* ''name'': Name of optional variable\n* ''value'': Value of optional variable\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nNotes:\n\n* The output directory is not cleared of any existing files\n* Any missing directories in the path to the filename are automatically created.\n* When referring to a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets : `--render \"[[Motovun Jack.jpg]]\"`\n* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being rendered, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`\n* The `--render` command is a more flexible replacement for both the `--rendertiddler` and `--rendertiddlers` commands, which are deprecated\n\nExamples:\n\n* `--render \"[!is[system]]\" \"[encodeuricomponent[]addprefix[tiddlers/]addsuffix[.html]]\"` -- renders all non-system tiddlers as files in the subdirectory \"tiddlers\" with URL-encoded titles and the extension HTML\n\n"
},
"$:/language/Help/rendertiddler": {
"title": "$:/language/Help/rendertiddler",
"description": "Render an individual tiddler as a specified ContentType",
"text": "(Note: The `--rendertiddler` command is deprecated in favour of the new, more flexible `--render` command)\n\nRender an individual tiddler as a specified ContentType, defaulting to `text/html` and save it to the specified filename.\n\nOptionally the title of a template tiddler can be specified, in which case the template tiddler is rendered with the \"currentTiddler\" variable set to the tiddler that is being rendered (the first parameter value).\n\nA name and value for an additional variable may optionally also be specified.\n\n```\n--rendertiddler <title> <filename> [<type>] [<template>] [<name>] [<value>]\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n\nFor example, the following command saves all tiddlers matching the filter `[tag[done]]` to a JSON file titled `output.json` by employing the core template `$:/core/templates/exporters/JsonFile`.\n\n```\n--rendertiddler \"$:/core/templates/exporters/JsonFile\" output.json text/plain \"\" exportFilter \"[tag[done]]\"\n```\n"
},
"$:/language/Help/rendertiddlers": {
"title": "$:/language/Help/rendertiddlers",
"description": "Render tiddlers matching a filter to a specified ContentType",
"text": "(Note: The `--rendertiddlers` command is deprecated in favour of the new, more flexible `--render` command)\n\nRender a set of tiddlers matching a filter to separate files of a specified ContentType (defaults to `text/html`) and extension (defaults to `.html`).\n\n```\n--rendertiddlers <filter> <template> <pathname> [<type>] [<extension>] [\"noclean\"]\n```\n\nFor example:\n\n```\n--rendertiddlers [!is[system]] $:/core/templates/static.tiddler.html ./static text/plain\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny files in the target directory are deleted unless the ''noclean'' flag is specified. The target directory is recursively created if it is missing.\n"
},
"$:/language/Help/save": {
"title": "$:/language/Help/save",
"description": "Saves individual raw tiddlers to files",
"text": "Saves individual tiddlers identified by a filter in their raw text or binary format to the specified files.\n\n```\n--save <tiddler-filter> <filename-filter>\n```\n\n* ''tiddler-filter'': A filter identifying the tiddler(s) to be saved\n* ''filename-filter'': Optional filter transforming tiddler titles into pathnames. If omitted, defaults to `[is[tiddler]]`, which uses the unchanged tiddler title as the filename\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nNotes:\n\n* The output directory is not cleared of any existing files\n* Any missing directories in the path to the filename are automatically created.\n* When saving a tiddler with spaces in its title, take care to use both the quotes required by your shell and also TiddlyWiki's double square brackets : `--save \"[[Motovun Jack.jpg]]\"`\n* The filename filter is evaluated with the selected items being set to the title of the tiddler currently being saved, allowing the title to be used as the basis for computing the filename. For example `[encodeuricomponent[]addprefix[static/]]` applies URI encoding to each title, and then adds the prefix `static/`\n* The `--save` command is a more flexible replacement for both the `--savetiddler` and `--savetiddlers` commands, which are deprecated\n\nExamples:\n\n* `--save \"[!is[system]is[image]]\" \"[encodeuricomponent[]addprefix[tiddlers/]]\"` -- saves all non-system image tiddlers as files in the subdirectory \"tiddlers\" with URL-encoded titles\n"
},
"$:/language/Help/savetiddler": {
"title": "$:/language/Help/savetiddler",
"description": "Saves a raw tiddler to a file",
"text": "(Note: The `--savetiddler` command is deprecated in favour of the new, more flexible `--save` command)\n\nSaves an individual tiddler in its raw text or binary format to the specified filename.\n\n```\n--savetiddler <title> <filename>\n```\n\nBy default, the filename is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nAny missing directories in the path to the filename are automatically created.\n"
},
"$:/language/Help/savetiddlers": {
"title": "$:/language/Help/savetiddlers",
"description": "Saves a group of raw tiddlers to a directory",
"text": "(Note: The `--savetiddlers` command is deprecated in favour of the new, more flexible `--save` command)\n\nSaves a group of tiddlers in their raw text or binary format to the specified directory.\n\n```\n--savetiddlers <filter> <pathname> [\"noclean\"]\n```\n\nBy default, the pathname is resolved relative to the `output` subdirectory of the edition directory. The `--output` command can be used to direct output to a different directory.\n\nThe output directory is cleared of existing files before saving the specified files. The deletion can be disabled by specifying the ''noclean'' flag.\n\nAny missing directories in the pathname are automatically created.\n"
},
"$:/language/Help/server": {
"title": "$:/language/Help/server",
"description": "Provides an HTTP server interface to TiddlyWiki",
"text": "The server built in to TiddlyWiki5 is very simple. Although compatible with TiddlyWeb it doesn't support many of the features needed for robust Internet-facing usage.\n\nAt the root, it serves a rendering of a specified tiddler. Away from the root, it serves individual tiddlers encoded in JSON, and supports the basic HTTP operations for `GET`, `PUT` and `DELETE`.\n\n```\n--server <port> <roottiddler> <rendertype> <servetype> <username> <password> <host> <pathprefix>\n```\n\nThe parameters are:\n\n* ''port'' - port number to serve from (defaults to \"8080\")\n* ''roottiddler'' - the tiddler to serve at the root (defaults to \"$:/core/save/all\")\n* ''rendertype'' - the content type to which the root tiddler should be rendered (defaults to \"text/plain\")\n* ''servetype'' - the content type with which the root tiddler should be served (defaults to \"text/html\")\n* ''username'' - the default username for signing edits\n* ''password'' - optional password for basic authentication\n* ''host'' - optional hostname to serve from (defaults to \"127.0.0.1\" aka \"localhost\")\n* ''pathprefix'' - optional prefix for paths\n\nIf the password parameter is specified then the browser will prompt the user for the username and password. Note that the password is transmitted in plain text so this implementation isn't suitable for general use.\n\nFor example:\n\n```\n--server 8080 $:/core/save/all text/plain text/html MyUserName passw0rd\n```\n\nThe username and password can be specified as empty strings if you need to set the hostname or pathprefix and don't want to require a password:\n\n```\n--server 8080 $:/core/save/all text/plain text/html \"\" \"\" 192.168.0.245\n```\n\nTo run multiple TiddlyWiki servers at the same time you'll need to put each one on a different port.\n"
},
"$:/language/Help/setfield": {
"title": "$:/language/Help/setfield",
"description": "Prepares external tiddlers for use",
"text": "//Note that this command is experimental and may change or be replaced before being finalised//\n\nSets the specified field of a group of tiddlers to the result of wikifying a template tiddler with the `currentTiddler` variable set to the tiddler.\n\n```\n--setfield <filter> <fieldname> <templatetitle> <rendertype>\n```\n\nThe parameters are:\n\n* ''filter'' - filter identifying the tiddlers to be affected\n* ''fieldname'' - the field to modify (defaults to \"text\")\n* ''templatetitle'' - the tiddler to wikify into the specified field. If blank or missing then the specified field is deleted\n* ''rendertype'' - the text type to render (defaults to \"text/plain\"; \"text/html\" can be used to include HTML tags)\n"
},
"$:/language/Help/unpackplugin": {
"title": "$:/language/Help/unpackplugin",
"description": "Unpack the payload tiddlers from a plugin",
"text": "Extract the payload tiddlers from a plugin, creating them as ordinary tiddlers:\n\n```\n--unpackplugin <title>\n```\n"
},
"$:/language/Help/verbose": {
"title": "$:/language/Help/verbose",
"description": "Triggers verbose output mode",
"text": "Triggers verbose output, useful for debugging\n\n```\n--verbose\n```\n"
},
"$:/language/Help/version": {
"title": "$:/language/Help/version",
"description": "Displays the version number of TiddlyWiki",
"text": "Displays the version number of TiddlyWiki.\n\n```\n--version\n```\n"
},
"$:/language/Import/Imported/Hint": {
"title": "$:/language/Import/Imported/Hint",
"text": "The following tiddlers were imported:"
},
"$:/language/Import/Listing/Cancel/Caption": {
"title": "$:/language/Import/Listing/Cancel/Caption",
"text": "Cancel"
},
"$:/language/Import/Listing/Hint": {
"title": "$:/language/Import/Listing/Hint",
"text": "These tiddlers are ready to import:"
},
"$:/language/Import/Listing/Import/Caption": {
"title": "$:/language/Import/Listing/Import/Caption",
"text": "Import"
},
"$:/language/Import/Listing/Select/Caption": {
"title": "$:/language/Import/Listing/Select/Caption",
"text": "Select"
},
"$:/language/Import/Listing/Status/Caption": {
"title": "$:/language/Import/Listing/Status/Caption",
"text": "Status"
},
"$:/language/Import/Listing/Title/Caption": {
"title": "$:/language/Import/Listing/Title/Caption",
"text": "Title"
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Incompatible",
"text": "Blocked incompatible or obsolete plugin"
},
"$:/language/Import/Upgrader/Plugins/Suppressed/Version": {
"title": "$:/language/Import/Upgrader/Plugins/Suppressed/Version",
"text": "Blocked plugin (due to incoming <<incoming>> being older than existing <<existing>>)"
},
"$:/language/Import/Upgrader/Plugins/Upgraded": {
"title": "$:/language/Import/Upgrader/Plugins/Upgraded",
"text": "Upgraded plugin from <<incoming>> to <<upgraded>>"
},
"$:/language/Import/Upgrader/State/Suppressed": {
"title": "$:/language/Import/Upgrader/State/Suppressed",
"text": "Blocked temporary state tiddler"
},
"$:/language/Import/Upgrader/System/Suppressed": {
"title": "$:/language/Import/Upgrader/System/Suppressed",
"text": "Blocked system tiddler"
},
"$:/language/Import/Upgrader/ThemeTweaks/Created": {
"title": "$:/language/Import/Upgrader/ThemeTweaks/Created",
"text": "Migrated theme tweak from <$text text=<<from>>/>"
},
"$:/language/AboveStory/ClassicPlugin/Warning": {
"title": "$:/language/AboveStory/ClassicPlugin/Warning",
"text": "It looks like you are trying to load a plugin designed for ~TiddlyWiki Classic. Please note that [[these plugins do not work with TiddlyWiki version 5.x.x|https://tiddlywiki.com/#TiddlyWikiClassic]]. ~TiddlyWiki Classic plugins detected:"
},
"$:/language/BinaryWarning/Prompt": {
"title": "$:/language/BinaryWarning/Prompt",
"text": "This tiddler contains binary data"
},
"$:/language/ClassicWarning/Hint": {
"title": "$:/language/ClassicWarning/Hint",
"text": "This tiddler is written in TiddlyWiki Classic wiki text format, which is not fully compatible with TiddlyWiki version 5. See https://tiddlywiki.com/static/Upgrading.html for more details."
},
"$:/language/ClassicWarning/Upgrade/Caption": {
"title": "$:/language/ClassicWarning/Upgrade/Caption",
"text": "upgrade"
},
"$:/language/CloseAll/Button": {
"title": "$:/language/CloseAll/Button",
"text": "close all"
},
"$:/language/ColourPicker/Recent": {
"title": "$:/language/ColourPicker/Recent",
"text": "Recent:"
},
"$:/language/ConfirmCancelTiddler": {
"title": "$:/language/ConfirmCancelTiddler",
"text": "Do you wish to discard changes to the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmDeleteTiddler": {
"title": "$:/language/ConfirmDeleteTiddler",
"text": "Do you wish to delete the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmOverwriteTiddler": {
"title": "$:/language/ConfirmOverwriteTiddler",
"text": "Do you wish to overwrite the tiddler \"<$text text=<<title>>/>\"?"
},
"$:/language/ConfirmEditShadowTiddler": {
"title": "$:/language/ConfirmEditShadowTiddler",
"text": "You are about to edit a ShadowTiddler. Any changes will override the default system making future upgrades non-trivial. Are you sure you want to edit \"<$text text=<<title>>/>\"?"
},
"$:/language/Count": {
"title": "$:/language/Count",
"text": "count"
},
"$:/language/DefaultNewTiddlerTitle": {
"title": "$:/language/DefaultNewTiddlerTitle",
"text": "New Tiddler"
},
"$:/language/DropMessage": {
"title": "$:/language/DropMessage",
"text": "Drop here (or use the 'Escape' key to cancel)"
},
"$:/language/Encryption/Cancel": {
"title": "$:/language/Encryption/Cancel",
"text": "Cancel"
},
"$:/language/Encryption/ConfirmClearPassword": {
"title": "$:/language/Encryption/ConfirmClearPassword",
"text": "Do you wish to clear the password? This will remove the encryption applied when saving this wiki"
},
"$:/language/Encryption/PromptSetPassword": {
"title": "$:/language/Encryption/PromptSetPassword",
"text": "Set a new password for this TiddlyWiki"
},
"$:/language/Encryption/Username": {
"title": "$:/language/Encryption/Username",
"text": "Username"
},
"$:/language/Encryption/Password": {
"title": "$:/language/Encryption/Password",
"text": "Password"
},
"$:/language/Encryption/RepeatPassword": {
"title": "$:/language/Encryption/RepeatPassword",
"text": "Repeat password"
},
"$:/language/Encryption/PasswordNoMatch": {
"title": "$:/language/Encryption/PasswordNoMatch",
"text": "Passwords do not match"
},
"$:/language/Encryption/SetPassword": {
"title": "$:/language/Encryption/SetPassword",
"text": "Set password"
},
"$:/language/Error/Caption": {
"title": "$:/language/Error/Caption",
"text": "Error"
},
"$:/language/Error/EditConflict": {
"title": "$:/language/Error/EditConflict",
"text": "File changed on server"
},
"$:/language/Error/Filter": {
"title": "$:/language/Error/Filter",
"text": "Filter error"
},
"$:/language/Error/FilterSyntax": {
"title": "$:/language/Error/FilterSyntax",
"text": "Syntax error in filter expression"
},
"$:/language/Error/IsFilterOperator": {
"title": "$:/language/Error/IsFilterOperator",
"text": "Filter Error: Unknown operand for the 'is' filter operator"
},
"$:/language/Error/LoadingPluginLibrary": {
"title": "$:/language/Error/LoadingPluginLibrary",
"text": "Error loading plugin library"
},
"$:/language/Error/RecursiveTransclusion": {
"title": "$:/language/Error/RecursiveTransclusion",
"text": "Recursive transclusion error in transclude widget"
},
"$:/language/Error/RetrievingSkinny": {
"title": "$:/language/Error/RetrievingSkinny",
"text": "Error retrieving skinny tiddler list"
},
"$:/language/Error/SavingToTWEdit": {
"title": "$:/language/Error/SavingToTWEdit",
"text": "Error saving to TWEdit"
},
"$:/language/Error/WhileSaving": {
"title": "$:/language/Error/WhileSaving",
"text": "Error while saving"
},
"$:/language/Error/XMLHttpRequest": {
"title": "$:/language/Error/XMLHttpRequest",
"text": "XMLHttpRequest error code"
},
"$:/language/InternalJavaScriptError/Title": {
"title": "$:/language/InternalJavaScriptError/Title",
"text": "Internal JavaScript Error"
},
"$:/language/InternalJavaScriptError/Hint": {
"title": "$:/language/InternalJavaScriptError/Hint",
"text": "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser"
},
"$:/language/InvalidFieldName": {
"title": "$:/language/InvalidFieldName",
"text": "Illegal characters in field name \"<$text text=<<fieldName>>/>\". Fields can only contain lowercase letters, digits and the characters underscore (`_`), hyphen (`-`) and period (`.`)"
},
"$:/language/LazyLoadingWarning": {
"title": "$:/language/LazyLoadingWarning",
"text": "<p>Trying to load external content from ''<$text text={{!!_canonical_uri}}/>''</p><p>If this message doesn't disappear, either the tiddler content type doesn't match the type of the external content, or you may be using a browser that doesn't support external content for wikis loaded as standalone files. See https://tiddlywiki.com/#ExternalText</p>"
},
"$:/language/LoginToTiddlySpace": {
"title": "$:/language/LoginToTiddlySpace",
"text": "Login to TiddlySpace"
},
"$:/language/Manager/Controls/FilterByTag/None": {
"title": "$:/language/Manager/Controls/FilterByTag/None",
"text": "(none)"
},
"$:/language/Manager/Controls/FilterByTag/Prompt": {
"title": "$:/language/Manager/Controls/FilterByTag/Prompt",
"text": "Filter by tag:"
},
"$:/language/Manager/Controls/Order/Prompt": {
"title": "$:/language/Manager/Controls/Order/Prompt",
"text": "Reverse order"
},
"$:/language/Manager/Controls/Search/Placeholder": {
"title": "$:/language/Manager/Controls/Search/Placeholder",
"text": "Search"
},
"$:/language/Manager/Controls/Search/Prompt": {
"title": "$:/language/Manager/Controls/Search/Prompt",
"text": "Search:"
},
"$:/language/Manager/Controls/Show/Option/Tags": {
"title": "$:/language/Manager/Controls/Show/Option/Tags",
"text": "tags"
},
"$:/language/Manager/Controls/Show/Option/Tiddlers": {
"title": "$:/language/Manager/Controls/Show/Option/Tiddlers",
"text": "tiddlers"
},
"$:/language/Manager/Controls/Show/Prompt": {
"title": "$:/language/Manager/Controls/Show/Prompt",
"text": "Show:"
},
"$:/language/Manager/Controls/Sort/Prompt": {
"title": "$:/language/Manager/Controls/Sort/Prompt",
"text": "Sort by:"
},
"$:/language/Manager/Item/Colour": {
"title": "$:/language/Manager/Item/Colour",
"text": "Colour"
},
"$:/language/Manager/Item/Fields": {
"title": "$:/language/Manager/Item/Fields",
"text": "Fields"
},
"$:/language/Manager/Item/Icon/None": {
"title": "$:/language/Manager/Item/Icon/None",
"text": "(none)"
},
"$:/language/Manager/Item/Icon": {
"title": "$:/language/Manager/Item/Icon",
"text": "Icon"
},
"$:/language/Manager/Item/RawText": {
"title": "$:/language/Manager/Item/RawText",
"text": "Raw text"
},
"$:/language/Manager/Item/Tags": {
"title": "$:/language/Manager/Item/Tags",
"text": "Tags"
},
"$:/language/Manager/Item/Tools": {
"title": "$:/language/Manager/Item/Tools",
"text": "Tools"
},
"$:/language/Manager/Item/WikifiedText": {
"title": "$:/language/Manager/Item/WikifiedText",
"text": "Wikified text"
},
"$:/language/MissingTiddler/Hint": {
"title": "$:/language/MissingTiddler/Hint",
"text": "Missing tiddler \"<$text text=<<currentTiddler>>/>\" -- click {{||$:/core/ui/Buttons/edit}} to create"
},
"$:/language/No": {
"title": "$:/language/No",
"text": "No"
},
"$:/language/OfficialPluginLibrary": {
"title": "$:/language/OfficialPluginLibrary",
"text": "Official ~TiddlyWiki Plugin Library"
},
"$:/language/OfficialPluginLibrary/Hint": {
"title": "$:/language/OfficialPluginLibrary/Hint",
"text": "The official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team."
},
"$:/language/PluginReloadWarning": {
"title": "$:/language/PluginReloadWarning",
"text": "Please save {{$:/core/ui/Buttons/save-wiki}} and reload {{$:/core/ui/Buttons/refresh}} to allow changes to plugins to take effect"
},
"$:/language/RecentChanges/DateFormat": {
"title": "$:/language/RecentChanges/DateFormat",
"text": "DDth MMM YYYY"
},
"$:/language/SystemTiddler/Tooltip": {
"title": "$:/language/SystemTiddler/Tooltip",
"text": "This is a system tiddler"
},
"$:/language/SystemTiddlers/Include/Prompt": {
"title": "$:/language/SystemTiddlers/Include/Prompt",
"text": "Include system tiddlers"
},
"$:/language/TagManager/Colour/Heading": {
"title": "$:/language/TagManager/Colour/Heading",
"text": "Colour"
},
"$:/language/TagManager/Count/Heading": {
"title": "$:/language/TagManager/Count/Heading",
"text": "Count"
},
"$:/language/TagManager/Icon/Heading": {
"title": "$:/language/TagManager/Icon/Heading",
"text": "Icon"
},
"$:/language/TagManager/Info/Heading": {
"title": "$:/language/TagManager/Info/Heading",
"text": "Info"
},
"$:/language/TagManager/Tag/Heading": {
"title": "$:/language/TagManager/Tag/Heading",
"text": "Tag"
},
"$:/language/Tiddler/DateFormat": {
"title": "$:/language/Tiddler/DateFormat",
"text": "DDth MMM YYYY at hh12:0mmam"
},
"$:/language/UnsavedChangesWarning": {
"title": "$:/language/UnsavedChangesWarning",
"text": "You have unsaved changes in TiddlyWiki"
},
"$:/language/Yes": {
"title": "$:/language/Yes",
"text": "Yes"
},
"$:/language/Modals/Download": {
"title": "$:/language/Modals/Download",
"subtitle": "Download changes",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "https://tiddlywiki.com/static/DownloadingChanges.html",
"text": "Your browser only supports manual saving.\n\nTo save your modified wiki, right click on the download link below and select \"Download file\" or \"Save file\", and then choose the folder and filename.\n\n//You can marginally speed things up by clicking the link with the control key (Windows) or the options/alt key (Mac OS X). You will not be prompted for the folder or filename, but your browser is likely to give it an unrecognisable name -- you may need to rename the file to include an `.html` extension before you can do anything useful with it.//\n\nOn smartphones that do not allow files to be downloaded you can instead bookmark the link, and then sync your bookmarks to a desktop computer from where the wiki can be saved normally.\n"
},
"$:/language/Modals/SaveInstructions": {
"title": "$:/language/Modals/SaveInstructions",
"subtitle": "Save your work",
"footer": "<$button message=\"tm-close-tiddler\">Close</$button>",
"help": "https://tiddlywiki.com/static/SavingChanges.html",
"text": "Your changes to this wiki need to be saved as a ~TiddlyWiki HTML file.\n\n!!! Desktop browsers\n\n# Select ''Save As'' from the ''File'' menu\n# Choose a filename and location\n#* Some browsers also require you to explicitly specify the file saving format as ''Webpage, HTML only'' or similar\n# Close this tab\n\n!!! Smartphone browsers\n\n# Create a bookmark to this page\n#* If you've got iCloud or Google Sync set up then the bookmark will automatically sync to your desktop where you can open it and save it as above\n# Close this tab\n\n//If you open the bookmark again in Mobile Safari you will see this message again. If you want to go ahead and use the file, just click the ''close'' button below//\n"
},
"$:/config/NewJournal/Title": {
"title": "$:/config/NewJournal/Title",
"text": "DDth MMM YYYY"
},
"$:/config/NewJournal/Text": {
"title": "$:/config/NewJournal/Text",
"text": ""
},
"$:/config/NewJournal/Tags": {
"title": "$:/config/NewJournal/Tags",
"text": "Journal"
},
"$:/language/Notifications/Save/Done": {
"title": "$:/language/Notifications/Save/Done",
"text": "Saved wiki"
},
"$:/language/Notifications/Save/Starting": {
"title": "$:/language/Notifications/Save/Starting",
"text": "Starting to save wiki"
},
"$:/language/Search/DefaultResults/Caption": {
"title": "$:/language/Search/DefaultResults/Caption",
"text": "List"
},
"$:/language/Search/Filter/Caption": {
"title": "$:/language/Search/Filter/Caption",
"text": "Filter"
},
"$:/language/Search/Filter/Hint": {
"title": "$:/language/Search/Filter/Hint",
"text": "Search via a [[filter expression|https://tiddlywiki.com/static/Filters.html]]"
},
"$:/language/Search/Filter/Matches": {
"title": "$:/language/Search/Filter/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Matches": {
"title": "$:/language/Search/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Matches/All": {
"title": "$:/language/Search/Matches/All",
"text": "All matches:"
},
"$:/language/Search/Matches/Title": {
"title": "$:/language/Search/Matches/Title",
"text": "Title matches:"
},
"$:/language/Search/Search": {
"title": "$:/language/Search/Search",
"text": "Search"
},
"$:/language/Search/Search/TooShort": {
"title": "$:/language/Search/Search/TooShort",
"text": "Search text too short"
},
"$:/language/Search/Shadows/Caption": {
"title": "$:/language/Search/Shadows/Caption",
"text": "Shadows"
},
"$:/language/Search/Shadows/Hint": {
"title": "$:/language/Search/Shadows/Hint",
"text": "Search for shadow tiddlers"
},
"$:/language/Search/Shadows/Matches": {
"title": "$:/language/Search/Shadows/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/Standard/Caption": {
"title": "$:/language/Search/Standard/Caption",
"text": "Standard"
},
"$:/language/Search/Standard/Hint": {
"title": "$:/language/Search/Standard/Hint",
"text": "Search for standard tiddlers"
},
"$:/language/Search/Standard/Matches": {
"title": "$:/language/Search/Standard/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/Search/System/Caption": {
"title": "$:/language/Search/System/Caption",
"text": "System"
},
"$:/language/Search/System/Hint": {
"title": "$:/language/Search/System/Hint",
"text": "Search for system tiddlers"
},
"$:/language/Search/System/Matches": {
"title": "$:/language/Search/System/Matches",
"text": "//<small><<resultCount>> matches</small>//"
},
"$:/language/SideBar/All/Caption": {
"title": "$:/language/SideBar/All/Caption",
"text": "All"
},
"$:/language/SideBar/Contents/Caption": {
"title": "$:/language/SideBar/Contents/Caption",
"text": "Contents"
},
"$:/language/SideBar/Drafts/Caption": {
"title": "$:/language/SideBar/Drafts/Caption",
"text": "Drafts"
},
"$:/language/SideBar/Explorer/Caption": {
"title": "$:/language/SideBar/Explorer/Caption",
"text": "Explorer"
},
"$:/language/SideBar/Missing/Caption": {
"title": "$:/language/SideBar/Missing/Caption",
"text": "Missing"
},
"$:/language/SideBar/More/Caption": {
"title": "$:/language/SideBar/More/Caption",
"text": "More"
},
"$:/language/SideBar/Open/Caption": {
"title": "$:/language/SideBar/Open/Caption",
"text": "Open"
},
"$:/language/SideBar/Orphans/Caption": {
"title": "$:/language/SideBar/Orphans/Caption",
"text": "Orphans"
},
"$:/language/SideBar/Recent/Caption": {
"title": "$:/language/SideBar/Recent/Caption",
"text": "Recent"
},
"$:/language/SideBar/Shadows/Caption": {
"title": "$:/language/SideBar/Shadows/Caption",
"text": "Shadows"
},
"$:/language/SideBar/System/Caption": {
"title": "$:/language/SideBar/System/Caption",
"text": "System"
},
"$:/language/SideBar/Tags/Caption": {
"title": "$:/language/SideBar/Tags/Caption",
"text": "Tags"
},
"$:/language/SideBar/Tags/Untagged/Caption": {
"title": "$:/language/SideBar/Tags/Untagged/Caption",
"text": "untagged"
},
"$:/language/SideBar/Tools/Caption": {
"title": "$:/language/SideBar/Tools/Caption",
"text": "Tools"
},
"$:/language/SideBar/Types/Caption": {
"title": "$:/language/SideBar/Types/Caption",
"text": "Types"
},
"$:/SiteSubtitle": {
"title": "$:/SiteSubtitle",
"text": "a non-linear personal web notebook"
},
"$:/SiteTitle": {
"title": "$:/SiteTitle",
"text": "My ~TiddlyWiki"
},
"$:/language/Snippets/ListByTag": {
"title": "$:/language/Snippets/ListByTag",
"tags": "$:/tags/TextEditor/Snippet",
"caption": "List of tiddlers by tag",
"text": "<<list-links \"[tag[task]sort[title]]\">>\n"
},
"$:/language/Snippets/MacroDefinition": {
"title": "$:/language/Snippets/MacroDefinition",
"tags": "$:/tags/TextEditor/Snippet",
"caption": "Macro definition",
"text": "\\define macroName(param1:\"default value\",param2)\nText of the macro\n\\end\n"
},
"$:/language/Snippets/Table4x3": {
"title": "$:/language/Snippets/Table4x3",
"tags": "$:/tags/TextEditor/Snippet",
"caption": "Table with 4 columns by 3 rows",
"text": "|! |!Alpha |!Beta |!Gamma |!Delta |\n|!One | | | | |\n|!Two | | | | |\n|!Three | | | | |\n"
},
"$:/language/Snippets/TableOfContents": {
"title": "$:/language/Snippets/TableOfContents",
"tags": "$:/tags/TextEditor/Snippet",
"caption": "Table of Contents",
"text": "<div class=\"tc-table-of-contents\">\n\n<<toc-selective-expandable 'TableOfContents'>>\n\n</div>"
},
"$:/language/ThemeTweaks/ThemeTweaks": {
"title": "$:/language/ThemeTweaks/ThemeTweaks",
"text": "Theme Tweaks"
},
"$:/language/ThemeTweaks/ThemeTweaks/Hint": {
"title": "$:/language/ThemeTweaks/ThemeTweaks/Hint",
"text": "You can tweak certain aspects of the ''Vanilla'' theme."
},
"$:/language/ThemeTweaks/Options": {
"title": "$:/language/ThemeTweaks/Options",
"text": "Options"
},
"$:/language/ThemeTweaks/Options/SidebarLayout": {
"title": "$:/language/ThemeTweaks/Options/SidebarLayout",
"text": "Sidebar layout"
},
"$:/language/ThemeTweaks/Options/SidebarLayout/Fixed-Fluid": {
"title": "$:/language/ThemeTweaks/Options/SidebarLayout/Fixed-Fluid",
"text": "Fixed story, fluid sidebar"
},
"$:/language/ThemeTweaks/Options/SidebarLayout/Fluid-Fixed": {
"title": "$:/language/ThemeTweaks/Options/SidebarLayout/Fluid-Fixed",
"text": "Fluid story, fixed sidebar"
},
"$:/language/ThemeTweaks/Options/StickyTitles": {
"title": "$:/language/ThemeTweaks/Options/StickyTitles",
"text": "Sticky titles"
},
"$:/language/ThemeTweaks/Options/StickyTitles/Hint": {
"title": "$:/language/ThemeTweaks/Options/StickyTitles/Hint",
"text": "Causes tiddler titles to \"stick\" to the top of the browser window. Caution: Does not work at all with Chrome, and causes some layout issues in Firefox"
},
"$:/language/ThemeTweaks/Options/CodeWrapping": {
"title": "$:/language/ThemeTweaks/Options/CodeWrapping",
"text": "Wrap long lines in code blocks"
},
"$:/language/ThemeTweaks/Settings": {
"title": "$:/language/ThemeTweaks/Settings",
"text": "Settings"
},
"$:/language/ThemeTweaks/Settings/FontFamily": {
"title": "$:/language/ThemeTweaks/Settings/FontFamily",
"text": "Font family"
},
"$:/language/ThemeTweaks/Settings/CodeFontFamily": {
"title": "$:/language/ThemeTweaks/Settings/CodeFontFamily",
"text": "Code font family"
},
"$:/language/ThemeTweaks/Settings/EditorFontFamily": {
"title": "$:/language/ThemeTweaks/Settings/EditorFontFamily",
"text": "Editor font family"
},
"$:/language/ThemeTweaks/Settings/BackgroundImage": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImage",
"text": "Page background image"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageAttachment": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageAttachment",
"text": "Page background image attachment"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageAttachment/Scroll": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageAttachment/Scroll",
"text": "Scroll with tiddlers"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageAttachment/Fixed": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageAttachment/Fixed",
"text": "Fixed to window"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageSize": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageSize",
"text": "Page background image size"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageSize/Auto": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageSize/Auto",
"text": "Auto"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageSize/Cover": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageSize/Cover",
"text": "Cover"
},
"$:/language/ThemeTweaks/Settings/BackgroundImageSize/Contain": {
"title": "$:/language/ThemeTweaks/Settings/BackgroundImageSize/Contain",
"text": "Contain"
},
"$:/language/ThemeTweaks/Metrics": {
"title": "$:/language/ThemeTweaks/Metrics",
"text": "Sizes"
},
"$:/language/ThemeTweaks/Metrics/FontSize": {
"title": "$:/language/ThemeTweaks/Metrics/FontSize",
"text": "Font size"
},
"$:/language/ThemeTweaks/Metrics/LineHeight": {
"title": "$:/language/ThemeTweaks/Metrics/LineHeight",
"text": "Line height"
},
"$:/language/ThemeTweaks/Metrics/BodyFontSize": {
"title": "$:/language/ThemeTweaks/Metrics/BodyFontSize",
"text": "Font size for tiddler body"
},
"$:/language/ThemeTweaks/Metrics/BodyLineHeight": {
"title": "$:/language/ThemeTweaks/Metrics/BodyLineHeight",
"text": "Line height for tiddler body"
},
"$:/language/ThemeTweaks/Metrics/StoryLeft": {
"title": "$:/language/ThemeTweaks/Metrics/StoryLeft",
"text": "Story left position"
},
"$:/language/ThemeTweaks/Metrics/StoryLeft/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/StoryLeft/Hint",
"text": "how far the left margin of the story river<br>(tiddler area) is from the left of the page"
},
"$:/language/ThemeTweaks/Metrics/StoryTop": {
"title": "$:/language/ThemeTweaks/Metrics/StoryTop",
"text": "Story top position"
},
"$:/language/ThemeTweaks/Metrics/StoryTop/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/StoryTop/Hint",
"text": "how far the top margin of the story river<br>is from the top of the page"
},
"$:/language/ThemeTweaks/Metrics/StoryRight": {
"title": "$:/language/ThemeTweaks/Metrics/StoryRight",
"text": "Story right"
},
"$:/language/ThemeTweaks/Metrics/StoryRight/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/StoryRight/Hint",
"text": "how far the left margin of the sidebar <br>is from the left of the page"
},
"$:/language/ThemeTweaks/Metrics/StoryWidth": {
"title": "$:/language/ThemeTweaks/Metrics/StoryWidth",
"text": "Story width"
},
"$:/language/ThemeTweaks/Metrics/StoryWidth/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/StoryWidth/Hint",
"text": "the overall width of the story river"
},
"$:/language/ThemeTweaks/Metrics/TiddlerWidth": {
"title": "$:/language/ThemeTweaks/Metrics/TiddlerWidth",
"text": "Tiddler width"
},
"$:/language/ThemeTweaks/Metrics/TiddlerWidth/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/TiddlerWidth/Hint",
"text": "within the story river"
},
"$:/language/ThemeTweaks/Metrics/SidebarBreakpoint": {
"title": "$:/language/ThemeTweaks/Metrics/SidebarBreakpoint",
"text": "Sidebar breakpoint"
},
"$:/language/ThemeTweaks/Metrics/SidebarBreakpoint/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/SidebarBreakpoint/Hint",
"text": "the minimum page width at which the story<br>river and sidebar will appear side by side"
},
"$:/language/ThemeTweaks/Metrics/SidebarWidth": {
"title": "$:/language/ThemeTweaks/Metrics/SidebarWidth",
"text": "Sidebar width"
},
"$:/language/ThemeTweaks/Metrics/SidebarWidth/Hint": {
"title": "$:/language/ThemeTweaks/Metrics/SidebarWidth/Hint",
"text": "the width of the sidebar in fluid-fixed layout"
},
"$:/language/TiddlerInfo/Advanced/Caption": {
"title": "$:/language/TiddlerInfo/Advanced/Caption",
"text": "Advanced"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Empty/Hint",
"text": "none"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Heading",
"text": "Plugin Details"
},
"$:/language/TiddlerInfo/Advanced/PluginInfo/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/PluginInfo/Hint",
"text": "This plugin contains the following shadow tiddlers:"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Heading",
"text": "Shadow Status"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/NotShadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is not a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Hint",
"text": "The tiddler <$link to=<<infoTiddler>>><$text text=<<infoTiddler>>/></$link> is a shadow tiddler"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/Shadow/Source",
"text": "It is defined in the plugin <$link to=<<pluginTiddler>>><$text text=<<pluginTiddler>>/></$link>"
},
"$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint": {
"title": "$:/language/TiddlerInfo/Advanced/ShadowInfo/OverriddenShadow/Hint",
"text": "It is overridden by an ordinary tiddler"
},
"$:/language/TiddlerInfo/Fields/Caption": {
"title": "$:/language/TiddlerInfo/Fields/Caption",
"text": "Fields"
},
"$:/language/TiddlerInfo/List/Caption": {
"title": "$:/language/TiddlerInfo/List/Caption",
"text": "List"
},
"$:/language/TiddlerInfo/List/Empty": {
"title": "$:/language/TiddlerInfo/List/Empty",
"text": "This tiddler does not have a list"
},
"$:/language/TiddlerInfo/Listed/Caption": {
"title": "$:/language/TiddlerInfo/Listed/Caption",
"text": "Listed"
},
"$:/language/TiddlerInfo/Listed/Empty": {
"title": "$:/language/TiddlerInfo/Listed/Empty",
"text": "This tiddler is not listed by any others"
},
"$:/language/TiddlerInfo/References/Caption": {
"title": "$:/language/TiddlerInfo/References/Caption",
"text": "References"
},
"$:/language/TiddlerInfo/References/Empty": {
"title": "$:/language/TiddlerInfo/References/Empty",
"text": "No tiddlers link to this one"
},
"$:/language/TiddlerInfo/Tagging/Caption": {
"title": "$:/language/TiddlerInfo/Tagging/Caption",
"text": "Tagging"
},
"$:/language/TiddlerInfo/Tagging/Empty": {
"title": "$:/language/TiddlerInfo/Tagging/Empty",
"text": "No tiddlers are tagged with this one"
},
"$:/language/TiddlerInfo/Tools/Caption": {
"title": "$:/language/TiddlerInfo/Tools/Caption",
"text": "Tools"
},
"$:/language/Docs/Types/application/javascript": {
"title": "$:/language/Docs/Types/application/javascript",
"description": "JavaScript code",
"name": "application/javascript",
"group": "Developer",
"group-sort": "2"
},
"$:/language/Docs/Types/application/json": {
"title": "$:/language/Docs/Types/application/json",
"description": "JSON data",
"name": "application/json",
"group": "Developer",
"group-sort": "2"
},
"$:/language/Docs/Types/application/x-tiddler-dictionary": {
"title": "$:/language/Docs/Types/application/x-tiddler-dictionary",
"description": "Data dictionary",
"name": "application/x-tiddler-dictionary",
"group": "Developer",
"group-sort": "2"
},
"$:/language/Docs/Types/image/gif": {
"title": "$:/language/Docs/Types/image/gif",
"description": "GIF image",
"name": "image/gif",
"group": "Image",
"group-sort": "1"
},
"$:/language/Docs/Types/image/jpeg": {
"title": "$:/language/Docs/Types/image/jpeg",
"description": "JPEG image",
"name": "image/jpeg",
"group": "Image",
"group-sort": "1"
},
"$:/language/Docs/Types/image/png": {
"title": "$:/language/Docs/Types/image/png",
"description": "PNG image",
"name": "image/png",
"group": "Image",
"group-sort": "1"
},
"$:/language/Docs/Types/image/svg+xml": {
"title": "$:/language/Docs/Types/image/svg+xml",
"description": "Structured Vector Graphics image",
"name": "image/svg+xml",
"group": "Image",
"group-sort": "1"
},
"$:/language/Docs/Types/image/x-icon": {
"title": "$:/language/Docs/Types/image/x-icon",
"description": "ICO format icon file",
"name": "image/x-icon",
"group": "Image",
"group-sort": "1"
},
"$:/language/Docs/Types/text/css": {
"title": "$:/language/Docs/Types/text/css",
"description": "Static stylesheet",
"name": "text/css",
"group": "Developer",
"group-sort": "2"
},
"$:/language/Docs/Types/text/html": {
"title": "$:/language/Docs/Types/text/html",
"description": "HTML markup",
"name": "text/html",
"group": "Text",
"group-sort": "0"
},
"$:/language/Docs/Types/text/plain": {
"title": "$:/language/Docs/Types/text/plain",
"description": "Plain text",
"name": "text/plain",
"group": "Text",
"group-sort": "0"
},
"$:/language/Docs/Types/text/vnd.tiddlywiki": {
"title": "$:/language/Docs/Types/text/vnd.tiddlywiki",
"description": "TiddlyWiki 5",
"name": "text/vnd.tiddlywiki",
"group": "Text",
"group-sort": "0"
},
"$:/language/Docs/Types/text/x-tiddlywiki": {
"title": "$:/language/Docs/Types/text/x-tiddlywiki",
"description": "TiddlyWiki Classic",
"name": "text/x-tiddlywiki",
"group": "Text",
"group-sort": "0"
},
"$:/languages/en-GB/icon": {
"title": "$:/languages/en-GB/icon",
"type": "image/svg+xml",
"text": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 60 30\" width=\"1200\" height=\"600\">\n<clipPath id=\"t\">\n\t<path d=\"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z\"/>\n</clipPath>\n<path d=\"M0,0 v30 h60 v-30 z\" fill=\"#00247d\"/>\n<path d=\"M0,0 L60,30 M60,0 L0,30\" stroke=\"#fff\" stroke-width=\"6\"/>\n<path d=\"M0,0 L60,30 M60,0 L0,30\" clip-path=\"url(#t)\" stroke=\"#cf142b\" stroke-width=\"4\"/>\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#fff\" stroke-width=\"10\"/>\n<path d=\"M30,0 v30 M0,15 h60\" stroke=\"#cf142b\" stroke-width=\"6\"/>\n</svg>\n"
},
"$:/languages/en-GB": {
"title": "$:/languages/en-GB",
"name": "en-GB",
"description": "English (British)",
"author": "JeremyRuston",
"core-version": ">=5.0.0\"",
"text": "Stub pseudo-plugin for the default language"
},
"$:/core/modules/commander.js": {
"title": "$:/core/modules/commander.js",
"text": "/*\\\ntitle: $:/core/modules/commander.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Commander class is a command interpreter\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nParse a sequence of commands\n\tcommandTokens: an array of command string tokens\n\twiki: reference to the wiki store object\n\tstreams: {output:, error:}, each of which has a write(string) method\n\tcallback: a callback invoked as callback(err) where err is null if there was no error\n*/\nvar Commander = function(commandTokens,callback,wiki,streams) {\n\tvar path = require(\"path\");\n\tthis.commandTokens = commandTokens;\n\tthis.nextToken = 0;\n\tthis.callback = callback;\n\tthis.wiki = wiki;\n\tthis.streams = streams;\n\tthis.outputPath = path.resolve($tw.boot.wikiPath,$tw.config.wikiOutputSubDir);\n};\n\n/*\nLog a string if verbose flag is set\n*/\nCommander.prototype.log = function(str) {\n\tif(this.verbose) {\n\t\tthis.streams.output.write(str + \"\\n\");\n\t}\n};\n\n/*\nWrite a string if verbose flag is set\n*/\nCommander.prototype.write = function(str) {\n\tif(this.verbose) {\n\t\tthis.streams.output.write(str);\n\t}\n};\n\n/*\nAdd a string of tokens to the command queue\n*/\nCommander.prototype.addCommandTokens = function(commandTokens) {\n\tvar params = commandTokens.slice(0);\n\tparams.unshift(0);\n\tparams.unshift(this.nextToken);\n\tArray.prototype.splice.apply(this.commandTokens,params);\n};\n\n/*\nExecute the sequence of commands and invoke a callback on completion\n*/\nCommander.prototype.execute = function() {\n\tthis.executeNextCommand();\n};\n\n/*\nExecute the next command in the sequence\n*/\nCommander.prototype.executeNextCommand = function() {\n\tvar self = this;\n\t// Invoke the callback if there are no more commands\n\tif(this.nextToken >= this.commandTokens.length) {\n\t\tthis.callback(null);\n\t} else {\n\t\t// Get and check the command token\n\t\tvar commandName = this.commandTokens[this.nextToken++];\n\t\tif(commandName.substr(0,2) !== \"--\") {\n\t\t\tthis.callback(\"Missing command: \" + commandName);\n\t\t} else {\n\t\t\tcommandName = commandName.substr(2); // Trim off the --\n\t\t\t// Accumulate the parameters to the command\n\t\t\tvar params = [];\n\t\t\twhile(this.nextToken < this.commandTokens.length && \n\t\t\t\tthis.commandTokens[this.nextToken].substr(0,2) !== \"--\") {\n\t\t\t\tparams.push(this.commandTokens[this.nextToken++]);\n\t\t\t}\n\t\t\t// Get the command info\n\t\t\tvar command = $tw.commands[commandName],\n\t\t\t\tc,err;\n\t\t\tif(!command) {\n\t\t\t\tthis.callback(\"Unknown command: \" + commandName);\n\t\t\t} else {\n\t\t\t\tif(this.verbose) {\n\t\t\t\t\tthis.streams.output.write(\"Executing command: \" + commandName + \" \" + params.join(\" \") + \"\\n\");\n\t\t\t\t}\n\t\t\t\tif(command.info.synchronous) {\n\t\t\t\t\t// Synchronous command\n\t\t\t\t\tc = new command.Command(params,this);\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.executeNextCommand();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Asynchronous command\n\t\t\t\t\tc = new command.Command(params,this,function(err) {\n\t\t\t\t\t\tif(err) {\n\t\t\t\t\t\t\tself.callback(err);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tself.executeNextCommand();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\terr = c.execute();\n\t\t\t\t\tif(err) {\n\t\t\t\t\t\tthis.callback(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nCommander.initCommands = function(moduleType) {\n\tmoduleType = moduleType || \"command\";\n\t$tw.commands = {};\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tvar c = $tw.commands[module.info.name] = {};\n\t\t// Add the methods defined by the module\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\tc[f] = module[f];\n\t\t\t}\n\t\t}\n\t});\n};\n\nexports.Commander = Commander;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/commands/build.js": {
"title": "$:/core/modules/commands/build.js",
"text": "/*\\\ntitle: $:/core/modules/commands/build.js\ntype: application/javascript\nmodule-type: command\n\nCommand to build a build target\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"build\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\t// Get the build targets defined in the wiki\n\tvar buildTargets = $tw.boot.wikiInfo.build;\n\tif(!buildTargets) {\n\t\treturn \"No build targets defined\";\n\t}\n\t// Loop through each of the specified targets\n\tvar targets;\n\tif(this.params.length > 0) {\n\t\ttargets = this.params;\n\t} else {\n\t\ttargets = Object.keys(buildTargets);\n\t}\n\tfor(var targetIndex=0; targetIndex<targets.length; targetIndex++) {\n\t\tvar target = targets[targetIndex],\n\t\t\tcommands = buildTargets[target];\n\t\tif(!commands) {\n\t\t\treturn \"Build target '\" + target + \"' not found\";\n\t\t}\n\t\t// Add the commands to the queue\n\t\tthis.commander.addCommandTokens(commands);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/clearpassword.js": {
"title": "$:/core/modules/commands/clearpassword.js",
"text": "/*\\\ntitle: $:/core/modules/commands/clearpassword.js\ntype: application/javascript\nmodule-type: command\n\nClear password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"clearpassword\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\t$tw.crypto.setPassword(null);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/editions.js": {
"title": "$:/core/modules/commands/editions.js",
"text": "/*\\\ntitle: $:/core/modules/commands/editions.js\ntype: application/javascript\nmodule-type: command\n\nCommand to list the available editions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"editions\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this;\n\t// Output the list\n\tthis.commander.streams.output.write(\"Available editions:\\n\\n\");\n\tvar editionInfo = $tw.utils.getEditionInfo();\n\t$tw.utils.each(editionInfo,function(info,name) {\n\t\tself.commander.streams.output.write(\" \" + name + \": \" + info.description + \"\\n\");\n\t});\n\tthis.commander.streams.output.write(\"\\n\");\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/fetch.js": {
"title": "$:/core/modules/commands/fetch.js",
"text": "/*\\\ntitle: $:/core/modules/commands/fetch.js\ntype: application/javascript\nmodule-type: command\n\nCommands to fetch external tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"fetch\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing subcommand and url\";\n\t}\n\tswitch(this.params[0]) {\n\t\tcase \"raw-file\":\n\t\t\treturn this.fetchFiles({\n\t\t\t\traw: true,\n\t\t\t\turl: this.params[1],\n\t\t\t\ttransformFilter: this.params[2] || \"\",\n\t\t\t\tcallback: this.callback\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"file\":\n\t\t\treturn this.fetchFiles({\n\t\t\t\turl: this.params[1],\n\t\t\t\timportFilter: this.params[2],\n\t\t\t\ttransformFilter: this.params[3] || \"\",\n\t\t\t\tcallback: this.callback\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"raw-files\":\n\t\t\treturn this.fetchFiles({\n\t\t\t\traw: true,\n\t\t\t\turlFilter: this.params[1],\n\t\t\t\ttransformFilter: this.params[2] || \"\",\n\t\t\t\tcallback: this.callback\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"files\":\n\t\t\treturn this.fetchFiles({\n\t\t\t\turlFilter: this.params[1],\n\t\t\t\timportFilter: this.params[2],\n\t\t\t\ttransformFilter: this.params[3] || \"\",\n\t\t\t\tcallback: this.callback\n\t\t\t});\n\t\t\tbreak;\n\t}\n\treturn null;\n};\n\nCommand.prototype.fetchFiles = function(options) {\n\tvar self = this;\n\t// Get the list of URLs\n\tvar urls;\n\tif(options.url) {\n\t\turls = [options.url]\n\t} else if(options.urlFilter) {\n\t\turls = $tw.wiki.filterTiddlers(options.urlFilter);\n\t} else {\n\t\treturn \"Missing URL\";\n\t}\n\t// Process each URL in turn\n\tvar next = 0;\n\tvar getNextFile = function(err) {\n\t\tif(err) {\n\t\t\treturn options.callback(err);\n\t\t}\n\t\tif(next < urls.length) {\n\t\t\tself.fetchFile(urls[next++],options,getNextFile);\n\t\t} else {\n\t\t\toptions.callback(null);\n\t\t}\n\t};\n\tgetNextFile(null);\n\t// Success\n\treturn null;\n};\n\nCommand.prototype.fetchFile = function(url,options,callback,redirectCount) {\n\tif(redirectCount > 10) {\n\t\treturn callback(\"Error too many redirects retrieving \" + url);\n\t}\n\tvar self = this,\n\t\tlib = url.substr(0,8) === \"https://\" ? require(\"https\") : require(\"http\");\n\tlib.get(url).on(\"response\",function(response) {\n\t var type = (response.headers[\"content-type\"] || \"\").split(\";\")[0],\n\t \tdata = [];\n\t self.commander.write(\"Reading \" + url + \": \");\n\t response.on(\"data\",function(chunk) {\n\t data.push(chunk);\n\t self.commander.write(\".\");\n\t });\n\t response.on(\"end\",function() {\n\t self.commander.write(\"\\n\");\n\t if(response.statusCode === 200) {\n\t\t self.processBody(Buffer.concat(data),type,options,url);\n\t\t callback(null);\n\t } else {\n\t \tif(response.statusCode === 302 || response.statusCode === 303 || response.statusCode === 307) {\n\t \t\treturn self.fetchFile(response.headers.location,options,callback,redirectCount + 1);\n\t \t} else {\n\t\t \treturn callback(\"Error \" + response.statusCode + \" retrieving \" + url)\t \t\t\n\t \t}\n\t }\n\t \t});\n\t \tresponse.on(\"error\",function(e) {\n\t\t\tconsole.log(\"Error on GET request: \" + e);\n\t\t\tcallback(e);\n\t \t});\n\t});\n\treturn null;\n};\n\nCommand.prototype.processBody = function(body,type,options,url) {\n\tvar self = this;\n\t// Collect the tiddlers in a wiki\n\tvar incomingWiki = new $tw.Wiki();\n\tif(options.raw) {\n\t\tvar typeInfo = type ? $tw.config.contentTypeInfo[type] : null,\n\t\t\tencoding = typeInfo ? typeInfo.encoding : \"utf8\";\n\t\tincomingWiki.addTiddler(new $tw.Tiddler({\n\t\t\ttitle: url,\n\t\t\ttype: type,\n\t\t\ttext: body.toString(encoding)\n\t\t}));\n\t} else {\n\t\t// Deserialise the file to extract the tiddlers\n\t\tvar tiddlers = this.commander.wiki.deserializeTiddlers(type || \"text/html\",body.toString(\"utf8\"),{});\n\t\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\t\tincomingWiki.addTiddler(new $tw.Tiddler(tiddler));\n\t\t});\n\t}\n\t// Filter the tiddlers to select the ones we want\n\tvar filteredTitles = incomingWiki.filterTiddlers(options.importFilter || \"[all[tiddlers]]\");\n\t// Import the selected tiddlers\n\tvar count = 0;\n\tincomingWiki.each(function(tiddler,title) {\n\t\tif(filteredTitles.indexOf(title) !== -1) {\n\t\t\tvar newTiddler;\n\t\t\tif(options.transformFilter) {\n\t\t\t\tvar transformedTitle = (incomingWiki.filterTiddlers(options.transformFilter,null,self.commander.wiki.makeTiddlerIterator([title])) || [\"\"])[0];\n\t\t\t\tif(transformedTitle) {\n\t\t\t\t\tself.commander.log(\"Importing \" + title + \" as \" + transformedTitle)\n\t\t\t\t\tnewTiddler = new $tw.Tiddler(tiddler,{title: transformedTitle});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tself.commander.log(\"Importing \" + title)\n\t\t\t\tnewTiddler = tiddler;\n\t\t\t}\n\t\t\tself.commander.wiki.importTiddler(newTiddler);\n\t\t\tcount++;\n\t\t}\n\t});\n\tself.commander.log(\"Imported \" + count + \" tiddlers\")\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/help.js": {
"title": "$:/core/modules/commands/help.js",
"text": "/*\\\ntitle: $:/core/modules/commands/help.js\ntype: application/javascript\nmodule-type: command\n\nHelp command\n\n\\*/\n(function(){\n\n/*jshint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"help\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar subhelp = this.params[0] || \"default\",\n\t\thelpBase = \"$:/language/Help/\",\n\t\ttext;\n\tif(!this.commander.wiki.getTiddler(helpBase + subhelp)) {\n\t\tsubhelp = \"notfound\";\n\t}\n\t// Wikify the help as formatted text (ie block elements generate newlines)\n\ttext = this.commander.wiki.renderTiddler(\"text/plain-formatted\",helpBase + subhelp);\n\t// Remove any leading linebreaks\n\ttext = text.replace(/^(\\r?\\n)*/g,\"\");\n\tthis.commander.streams.output.write(text);\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/import.js": {
"title": "$:/core/modules/commands/import.js",
"text": "/*\\\ntitle: $:/core/modules/commands/import.js\ntype: application/javascript\nmodule-type: command\n\nCommand to import tiddlers from a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"import\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\tif(this.params.length < 2) {\n\t\treturn \"Missing parameters\";\n\t}\n\tvar filename = self.params[0],\n\t\tdeserializer = self.params[1],\n\t\ttitle = self.params[2] || filename,\n\t\tencoding = self.params[3] || \"utf8\",\n\t\ttext = fs.readFileSync(filename,encoding),\n\t\ttiddlers = this.commander.wiki.deserializeTiddlers(null,text,{title: title},{deserializer: deserializer});\n\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddler));\n\t});\n\tthis.commander.log(tiddlers.length + \" tiddler(s) imported\");\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/init.js": {
"title": "$:/core/modules/commands/init.js",
"text": "/*\\\ntitle: $:/core/modules/commands/init.js\ntype: application/javascript\nmodule-type: command\n\nCommand to initialise an empty wiki folder\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"init\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\t// Check that we don't already have a valid wiki folder\n\tif($tw.boot.wikiTiddlersPath || ($tw.utils.isDirectory($tw.boot.wikiPath) && !$tw.utils.isDirectoryEmpty($tw.boot.wikiPath))) {\n\t\treturn \"Wiki folder is not empty\";\n\t}\n\t// Loop through each of the specified editions\n\tvar editions = this.params.length > 0 ? this.params : [\"empty\"];\n\tfor(var editionIndex=0; editionIndex<editions.length; editionIndex++) {\n\t\tvar editionName = editions[editionIndex];\n\t\t// Check the edition exists\n\t\tvar editionPath = $tw.findLibraryItem(editionName,$tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar));\n\t\tif(!$tw.utils.isDirectory(editionPath)) {\n\t\t\treturn \"Edition '\" + editionName + \"' not found\";\n\t\t}\n\t\t// Copy the edition content\n\t\tvar err = $tw.utils.copyDirectory(editionPath,$tw.boot.wikiPath);\n\t\tif(!err) {\n\t\t\tthis.commander.streams.output.write(\"Copied edition '\" + editionName + \"' to \" + $tw.boot.wikiPath + \"\\n\");\n\t\t} else {\n\t\t\treturn err;\n\t\t}\n\t}\n\t// Tweak the tiddlywiki.info to remove any included wikis\n\tvar packagePath = $tw.boot.wikiPath + \"/tiddlywiki.info\",\n\t\tpackageJson = JSON.parse(fs.readFileSync(packagePath));\n\tdelete packageJson.includeWikis;\n\tfs.writeFileSync(packagePath,JSON.stringify(packageJson,null,$tw.config.preferences.jsonSpaces));\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/load.js": {
"title": "$:/core/modules/commands/load.js",
"text": "/*\\\ntitle: $:/core/modules/commands/load.js\ntype: application/javascript\nmodule-type: command\n\nCommand to load tiddlers from a file or directory\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"load\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\tif(this.params.length < 1) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar tiddlers = $tw.loadTiddlersFromPath(self.params[0]),\n\t\tcount = 0;\n\t$tw.utils.each(tiddlers,function(tiddlerInfo) {\n\t\t$tw.utils.each(tiddlerInfo.tiddlers,function(tiddler) {\n\t\t\tself.commander.wiki.importTiddler(new $tw.Tiddler(tiddler));\n\t\t\tcount++;\n\t\t});\n\t});\n\tif(!count) {\n\t\tself.callback(\"No tiddlers found in file \\\"\" + self.params[0] + \"\\\"\");\n\t} else {\n\t\tself.callback(null);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/makelibrary.js": {
"title": "$:/core/modules/commands/makelibrary.js",
"text": "/*\\\ntitle: $:/core/modules/commands/makelibrary.js\ntype: application/javascript\nmodule-type: command\n\nCommand to pack all of the plugins in the library into a plugin tiddler of type \"library\"\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"makelibrary\",\n\tsynchronous: true\n};\n\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar wiki = this.commander.wiki,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\tupgradeLibraryTitle = this.params[0] || UPGRADE_LIBRARY_TITLE,\n\t\ttiddlers = {};\n\t// Collect up the library plugins\n\tvar collectPlugins = function(folder) {\n\t\t\tvar pluginFolders = fs.readdirSync(folder);\n\t\t\tfor(var p=0; p<pluginFolders.length; p++) {\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(pluginFolders[p])) {\n\t\t\t\t\tpluginFields = $tw.loadPluginFolder(path.resolve(folder,\"./\" + pluginFolders[p]));\n\t\t\t\t\tif(pluginFields && pluginFields.title) {\n\t\t\t\t\t\ttiddlers[pluginFields.title] = pluginFields;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcollectPublisherPlugins = function(folder) {\n\t\t\tvar publisherFolders = fs.readdirSync(folder);\n\t\t\tfor(var t=0; t<publisherFolders.length; t++) {\n\t\t\t\tif(!$tw.boot.excludeRegExp.test(publisherFolders[t])) {\n\t\t\t\t\tcollectPlugins(path.resolve(folder,\"./\" + publisherFolders[t]));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));\n\tcollectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));\n\tcollectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));\n\t// Save the upgrade library tiddler\n\tvar pluginFields = {\n\t\ttitle: upgradeLibraryTitle,\n\t\ttype: \"application/json\",\n\t\t\"plugin-type\": \"library\",\n\t\t\"text\": JSON.stringify({tiddlers: tiddlers},null,$tw.config.preferences.jsonSpaces)\n\t};\n\twiki.addTiddler(new $tw.Tiddler(pluginFields));\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/output.js": {
"title": "$:/core/modules/commands/output.js",
"text": "/*\\\ntitle: $:/core/modules/commands/output.js\ntype: application/javascript\nmodule-type: command\n\nCommand to set the default output location (defaults to current working directory)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"output\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tvar fs = require(\"fs\"),\n\t\tpath = require(\"path\");\n\tif(this.params.length < 1) {\n\t\treturn \"Missing output path\";\n\t}\n\tthis.commander.outputPath = path.resolve(process.cwd(),this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/password.js": {
"title": "$:/core/modules/commands/password.js",
"text": "/*\\\ntitle: $:/core/modules/commands/password.js\ntype: application/javascript\nmodule-type: command\n\nSave password for crypto operations\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"password\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing password\";\n\t}\n\t$tw.crypto.setPassword(this.params[0]);\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/render.js": {
"title": "$:/core/modules/commands/render.js",
"text": "/*\\\ntitle: $:/core/modules/commands/render.js\ntype: application/javascript\nmodule-type: command\n\nRender individual tiddlers and save the results to the specified files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"render\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing tiddler filter\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\ttiddlerFilter = this.params[0],\n\t\tfilenameFilter = this.params[1] || \"[is[tiddler]addsuffix[.html]]\",\n\t\ttype = this.params[2] || \"text/html\",\n\t\ttemplate = this.params[3],\n\t\tvarName = this.params[4],\n\t\tvarValue = this.params[5],\n\t\ttiddlers = wiki.filterTiddlers(tiddlerFilter);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(template || title),\n\t\t\tvariables = {currentTiddler: title};\n\t\tif(varName) {\n\t\t\tvariables[varName] = varValue || \"\";\n\t\t}\n\t\tvar widgetNode = wiki.makeWidget(parser,{variables: variables}),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\n\t\twidgetNode.render(container,null);\n\t\tvar text = type === \"text/html\" ? container.innerHTML : container.textContent,\n\t\t\tfilepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);\n\t\tif(self.commander.verbose) {\n\t\t\tconsole.log(\"Rendering \\\"\" + title + \"\\\" to \\\"\" + filepath + \"\\\"\");\n\t\t}\n\t\t$tw.utils.createFileDirectories(filepath);\n\t\tfs.writeFileSync(filepath,text,\"utf8\");\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddler.js": {
"title": "$:/core/modules/commands/rendertiddler.js",
"text": "/*\\\ntitle: $:/core/modules/commands/rendertiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render a tiddler and save it to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"rendertiddler\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttype = this.params[2] || \"text/html\",\n\t\ttemplate = this.params[3],\n\t\tname = this.params[4],\n\t\tvalue = this.params[5],\n\t\tvariables = {};\n\t$tw.utils.createFileDirectories(filename);\n\tif(template) {\n\t\tvariables.currentTiddler = title;\n\t\ttitle = template;\n\t}\n\tif(name && value) {\n\t\tvariables[name] = value;\n\t}\n\tfs.writeFile(filename,this.commander.wiki.renderTiddler(type,title,{variables: variables}),\"utf8\",function(err) {\n\t\tself.callback(err);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/rendertiddlers.js": {
"title": "$:/core/modules/commands/rendertiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/commands/rendertiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to render several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"rendertiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\ttemplate = this.params[1],\n\t\toutputPath = this.commander.outputPath,\n\t\tpathname = path.resolve(outputPath,this.params[2]),\t\t\n\t\ttype = this.params[3] || \"text/html\",\n\t\textension = this.params[4] || \".html\",\n\t\tdeleteDirectory = (this.params[5] || \"\").toLowerCase() !== \"noclean\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\tif(deleteDirectory) {\n\t\t$tw.utils.deleteDirectory(pathname);\n\t}\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(template),\n\t\t\twidgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}}),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\n\t\twidgetNode.render(container,null);\n\t\tvar text = type === \"text/html\" ? container.innerHTML : container.textContent,\n\t\t\texportPath = null;\n\t\tif($tw.utils.hop($tw.macros,\"tv-get-export-path\")) {\n\t\t\tvar macroPath = $tw.macros[\"tv-get-export-path\"].run.apply(self,[title]);\n\t\t\tif(macroPath) {\n\t\t\t\texportPath = path.resolve(outputPath,macroPath + extension);\n\t\t\t}\n\t\t}\n\t\tvar finalPath = exportPath || path.resolve(pathname,encodeURIComponent(title) + extension);\n\t\t$tw.utils.createFileDirectories(finalPath);\n\t\tfs.writeFileSync(finalPath,text,\"utf8\");\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/save.js": {
"title": "$:/core/modules/commands/save.js",
"text": "/*\\\ntitle: $:/core/modules/commands/save.js\ntype: application/javascript\nmodule-type: command\n\nSaves individual tiddlers in their raw text or binary format to the specified files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"save\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing filename filter\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\ttiddlerFilter = this.params[0],\n\t\tfilenameFilter = this.params[1] || \"[is[tiddler]]\",\n\t\ttiddlers = wiki.filterTiddlers(tiddlerFilter);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.commander.wiki.getTiddler(title),\n\t\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"},\n\t\t\tfilepath = path.resolve(self.commander.outputPath,wiki.filterTiddlers(filenameFilter,$tw.rootWidget,wiki.makeTiddlerIterator([title]))[0]);\n\t\tif(self.commander.verbose) {\n\t\t\tconsole.log(\"Saving \\\"\" + title + \"\\\" to \\\"\" + filepath + \"\\\"\");\n\t\t}\n\t\t$tw.utils.createFileDirectories(filepath);\n\t\tfs.writeFileSync(filepath,tiddler.fields.text,contentTypeInfo.encoding);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savelibrarytiddlers.js": {
"title": "$:/core/modules/commands/savelibrarytiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/commands/savelibrarytiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save the subtiddlers of a bundle tiddler as a series of JSON files\n\n--savelibrarytiddlers <tiddler> <pathname> <skinnylisting>\n\nThe tiddler identifies the bundle tiddler that contains the subtiddlers.\n\nThe pathname specifies the pathname to the folder in which the JSON files should be saved. The filename is the URL encoded title of the subtiddler.\n\nThe skinnylisting specifies the title of the tiddler to which a JSON catalogue of the subtiddlers will be saved. The JSON file contains the same data as the bundle tiddler but with the `text` field removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"savelibrarytiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\tcontainerTitle = this.params[0],\n\t\tfilter = this.params[1],\n\t\tbasepath = this.params[2],\n\t\tskinnyListTitle = this.params[3];\n\t// Get the container tiddler as data\n\tvar containerData = self.commander.wiki.getTiddlerDataCached(containerTitle,undefined);\n\tif(!containerData) {\n\t\treturn \"'\" + containerTitle + \"' is not a tiddler bundle\";\n\t}\n\t// Filter the list of plugins\n\tvar pluginList = [];\n\t$tw.utils.each(containerData.tiddlers,function(tiddler,title) {\n\t\tpluginList.push(title);\n\t});\n\tvar filteredPluginList;\n\tif(filter) {\n\t\tfilteredPluginList = self.commander.wiki.filterTiddlers(filter,null,self.commander.wiki.makeTiddlerIterator(pluginList));\n\t} else {\n\t\tfilteredPluginList = pluginList;\n\t}\n\t// Iterate through the plugins\n\tvar skinnyList = [];\n\t$tw.utils.each(filteredPluginList,function(title) {\n\t\tvar tiddler = containerData.tiddlers[title];\n\t\t// Save each JSON file and collect the skinny data\n\t\tvar pathname = path.resolve(self.commander.outputPath,basepath + encodeURIComponent(title) + \".json\");\n\t\t$tw.utils.createFileDirectories(pathname);\n\t\tfs.writeFileSync(pathname,JSON.stringify(tiddler,null,$tw.config.preferences.jsonSpaces),\"utf8\");\n\t\t// Collect the skinny list data\n\t\tvar pluginTiddlers = JSON.parse(tiddler.text),\n\t\t\treadmeContent = (pluginTiddlers.tiddlers[title + \"/readme\"] || {}).text,\n\t\t\ticonTiddler = pluginTiddlers.tiddlers[title + \"/icon\"] || {},\n\t\t\ticonType = iconTiddler.type,\n\t\t\ticonText = iconTiddler.text,\n\t\t\ticonContent;\n\t\tif(iconType && iconText) {\n\t\t\ticonContent = $tw.utils.makeDataUri(iconText,iconType);\n\t\t}\n\t\tskinnyList.push($tw.utils.extend({},tiddler,{text: undefined, readme: readmeContent, icon: iconContent}));\n\t});\n\t// Save the catalogue tiddler\n\tif(skinnyListTitle) {\n\t\tself.commander.wiki.setTiddlerData(skinnyListTitle,skinnyList);\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddler.js": {
"title": "$:/core/modules/commands/savetiddler.js",
"text": "/*\\\ntitle: $:/core/modules/commands/savetiddler.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save the content of a tiddler to a file\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"savetiddler\",\n\tsynchronous: false\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 2) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\ttitle = this.params[0],\n\t\tfilename = path.resolve(this.commander.outputPath,this.params[1]),\n\t\ttiddler = this.commander.wiki.getTiddler(title);\n\tif(tiddler) {\n\t\tvar type = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"};\n\t\t$tw.utils.createFileDirectories(filename);\n\t\tfs.writeFile(filename,tiddler.fields.text,contentTypeInfo.encoding,function(err) {\n\t\t\tself.callback(err);\n\t\t});\n\t} else {\n\t\treturn \"Missing tiddler: \" + title;\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/savetiddlers.js": {
"title": "$:/core/modules/commands/savetiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/commands/savetiddlers.js\ntype: application/javascript\nmodule-type: command\n\nCommand to save several tiddlers to a folder of files\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"savetiddlers\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing filename\";\n\t}\n\tvar self = this,\n\t\tfs = require(\"fs\"),\n\t\tpath = require(\"path\"),\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tpathname = path.resolve(this.commander.outputPath,this.params[1]),\n\t\tdeleteDirectory = (this.params[2] || \"\").toLowerCase() !== \"noclean\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\tif(deleteDirectory) {\n\t\t$tw.utils.deleteDirectory(pathname);\n\t}\n\t$tw.utils.createDirectory(pathname);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.commander.wiki.getTiddler(title),\n\t\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\",\n\t\t\tcontentTypeInfo = $tw.config.contentTypeInfo[type] || {encoding: \"utf8\"},\n\t\t\tfilename = path.resolve(pathname,encodeURIComponent(title));\n\t\tfs.writeFileSync(filename,tiddler.fields.text,contentTypeInfo.encoding);\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/server.js": {
"title": "$:/core/modules/commands/server.js",
"text": "/*\\\ntitle: $:/core/modules/commands/server.js\ntype: application/javascript\nmodule-type: command\n\nServe tiddlers over http\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nif($tw.node) {\n\tvar util = require(\"util\"),\n\t\tfs = require(\"fs\"),\n\t\turl = require(\"url\"),\n\t\tpath = require(\"path\"),\n\t\thttp = require(\"http\");\n}\n\nexports.info = {\n\tname: \"server\",\n\tsynchronous: true\n};\n\n/*\nA simple HTTP server with regexp-based routes\n*/\nfunction SimpleServer(options) {\n\tthis.routes = options.routes || [];\n\tthis.wiki = options.wiki;\n\tthis.variables = options.variables || {};\n}\n\nSimpleServer.prototype.set = function(obj) {\n\tvar self = this;\n\t$tw.utils.each(obj,function(value,name) {\n\t\tself.variables[name] = value;\n\t});\n};\n\nSimpleServer.prototype.get = function(name) {\n\treturn this.variables[name];\n};\n\nSimpleServer.prototype.addRoute = function(route) {\n\tthis.routes.push(route);\n};\n\nSimpleServer.prototype.findMatchingRoute = function(request,state) {\n\tvar pathprefix = this.get(\"pathprefix\") || \"\";\n\tfor(var t=0; t<this.routes.length; t++) {\n\t\tvar potentialRoute = this.routes[t],\n\t\t\tpathRegExp = potentialRoute.path,\n\t\t\tpathname = state.urlInfo.pathname,\n\t\t\tmatch;\n\t\tif(pathprefix) {\n\t\t\tif(pathname.substr(0,pathprefix.length) === pathprefix) {\n\t\t\t\tpathname = pathname.substr(pathprefix.length);\n\t\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t\t} else {\n\t\t\t\tmatch = false;\n\t\t\t}\n\t\t} else {\n\t\t\tmatch = potentialRoute.path.exec(pathname);\n\t\t}\n\t\tif(match && request.method === potentialRoute.method) {\n\t\t\tstate.params = [];\n\t\t\tfor(var p=1; p<match.length; p++) {\n\t\t\t\tstate.params.push(match[p]);\n\t\t\t}\n\t\t\treturn potentialRoute;\n\t\t}\n\t}\n\treturn null;\n};\n\nSimpleServer.prototype.checkCredentials = function(request,incomingUsername,incomingPassword) {\n\tvar header = request.headers.authorization || \"\",\n\t\ttoken = header.split(/\\s+/).pop() || \"\",\n\t\tauth = $tw.utils.base64Decode(token),\n\t\tparts = auth.split(/:/),\n\t\tusername = parts[0],\n\t\tpassword = parts[1];\n\tif(incomingUsername === username && incomingPassword === password) {\n\t\treturn \"ALLOWED\";\n\t} else {\n\t\treturn \"DENIED\";\n\t}\n};\n\nSimpleServer.prototype.requestHandler = function(request,response) {\n\t// Compose the state object\n\tvar self = this;\n\tvar state = {};\n\tstate.wiki = self.wiki;\n\tstate.server = self;\n\tstate.urlInfo = url.parse(request.url);\n\t// Find the route that matches this path\n\tvar route = self.findMatchingRoute(request,state);\n\t// Check for the username and password if we've got one\n\tvar username = self.get(\"username\"),\n\t\tpassword = self.get(\"password\");\n\tif(username && password) {\n\t\t// Check they match\n\t\tif(self.checkCredentials(request,username,password) !== \"ALLOWED\") {\n\t\t\tvar servername = state.wiki.getTiddlerText(\"$:/SiteTitle\") || \"TiddlyWiki5\";\n\t\t\tresponse.writeHead(401,\"Authentication required\",{\n\t\t\t\t\"WWW-Authenticate\": 'Basic realm=\"Please provide your username and password to login to ' + servername + '\"'\n\t\t\t});\n\t\t\tresponse.end();\n\t\t\treturn;\n\t\t}\n\t}\n\t// Return a 404 if we didn't find a route\n\tif(!route) {\n\t\tresponse.writeHead(404);\n\t\tresponse.end();\n\t\treturn;\n\t}\n\t// Set the encoding for the incoming request\n\t// TODO: Presumably this would need tweaking if we supported PUTting binary tiddlers\n\trequest.setEncoding(\"utf8\");\n\t// Dispatch the appropriate method\n\tswitch(request.method) {\n\t\tcase \"GET\": // Intentional fall-through\n\t\tcase \"DELETE\":\n\t\t\troute.handler(request,response,state);\n\t\t\tbreak;\n\t\tcase \"PUT\":\n\t\t\tvar data = \"\";\n\t\t\trequest.on(\"data\",function(chunk) {\n\t\t\t\tdata += chunk.toString();\n\t\t\t});\n\t\t\trequest.on(\"end\",function() {\n\t\t\t\tstate.data = data;\n\t\t\t\troute.handler(request,response,state);\n\t\t\t});\n\t\t\tbreak;\n\t}\n};\n\t\nSimpleServer.prototype.listen = function(port,host) {\n\thttp.createServer(this.requestHandler.bind(this)).listen(port,host);\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n\t// Set up server\n\tthis.server = new SimpleServer({\n\t\twiki: this.commander.wiki\n\t});\n\t// Add route handlers\n\tthis.server.addRoute({\n\t\tmethod: \"PUT\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\tfields = JSON.parse(state.data);\n\t\t\t// Pull up any subfields in the `fields` object\n\t\t\tif(fields.fields) {\n\t\t\t\t$tw.utils.each(fields.fields,function(field,name) {\n\t\t\t\t\tfields[name] = field;\n\t\t\t\t});\n\t\t\t\tdelete fields.fields;\n\t\t\t}\n\t\t\t// Remove any revision field\n\t\t\tif(fields.revision) {\n\t\t\t\tdelete fields.revision;\n\t\t\t}\n\t\t\tstate.wiki.addTiddler(new $tw.Tiddler(state.wiki.getCreationFields(),fields,{title: title},state.wiki.getModificationFields()));\n\t\t\tvar changeCount = state.wiki.getChangeCount(title).toString();\n\t\t\tresponse.writeHead(204, \"OK\",{\n\t\t\t\tEtag: \"\\\"default/\" + encodeURIComponent(title) + \"/\" + changeCount + \":\\\"\",\n\t\t\t\t\"Content-Type\": \"text/plain\"\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"DELETE\",\n\t\tpath: /^\\/bags\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]);\n\t\t\tstate.wiki.deleteTiddler(title);\n\t\t\tresponse.writeHead(204, \"OK\", {\n\t\t\t\t\"Content-Type\": \"text/plain\"\n\t\t\t});\n\t\t\tresponse.end();\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": state.server.get(\"serveType\")});\n\t\t\tvar text = state.wiki.renderTiddler(state.server.get(\"renderType\"),state.server.get(\"rootTiddler\"));\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/status$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\tvar text = JSON.stringify({\n\t\t\t\tusername: state.server.get(\"username\"),\n\t\t\t\tspace: {\n\t\t\t\t\trecipe: \"default\"\n\t\t\t\t},\n\t\t\t\ttiddlywiki_version: $tw.version\n\t\t\t});\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/favicon.ico$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"image/x-icon\"});\n\t\t\tvar buffer = state.wiki.getTiddlerText(\"$:/favicon.ico\",\"\");\n\t\t\tresponse.end(buffer,\"base64\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers.json$/,\n\t\thandler: function(request,response,state) {\n\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\tvar tiddlers = [];\n\t\t\tstate.wiki.forEachTiddler({sortField: \"title\"},function(title,tiddler) {\n\t\t\t\tvar tiddlerFields = {};\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tif(name !== \"text\") {\n\t\t\t\t\t\ttiddlerFields[name] = tiddler.getFieldString(name);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\n\t\t\t\ttiddlers.push(tiddlerFields);\n\t\t\t});\n\t\t\tvar text = JSON.stringify(tiddlers);\n\t\t\tresponse.end(text,\"utf8\");\n\t\t}\n\t});\n\tthis.server.addRoute({\n\t\tmethod: \"GET\",\n\t\tpath: /^\\/recipes\\/default\\/tiddlers\\/(.+)$/,\n\t\thandler: function(request,response,state) {\n\t\t\tvar title = decodeURIComponent(state.params[0]),\n\t\t\t\ttiddler = state.wiki.getTiddler(title),\n\t\t\t\ttiddlerFields = {},\n\t\t\t\tknownFields = [\n\t\t\t\t\t\"bag\", \"created\", \"creator\", \"modified\", \"modifier\", \"permissions\", \"recipe\", \"revision\", \"tags\", \"text\", \"title\", \"type\", \"uri\"\n\t\t\t\t];\n\t\t\tif(tiddler) {\n\t\t\t\t$tw.utils.each(tiddler.fields,function(field,name) {\n\t\t\t\t\tvar value = tiddler.getFieldString(name);\n\t\t\t\t\tif(knownFields.indexOf(name) !== -1) {\n\t\t\t\t\t\ttiddlerFields[name] = value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttiddlerFields.fields = tiddlerFields.fields || {};\n\t\t\t\t\t\ttiddlerFields.fields[name] = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\ttiddlerFields.revision = state.wiki.getChangeCount(title);\n\t\t\t\ttiddlerFields.type = tiddlerFields.type || \"text/vnd.tiddlywiki\";\n\t\t\t\tresponse.writeHead(200, {\"Content-Type\": \"application/json\"});\n\t\t\t\tresponse.end(JSON.stringify(tiddlerFields),\"utf8\");\n\t\t\t} else {\n\t\t\t\tresponse.writeHead(404);\n\t\t\t\tresponse.end();\n\t\t\t}\n\t\t}\n\t});\n};\n\nCommand.prototype.execute = function() {\n\tif(!$tw.boot.wikiTiddlersPath) {\n\t\t$tw.utils.warning(\"Warning: Wiki folder '\" + $tw.boot.wikiPath + \"' does not exist or is missing a tiddlywiki.info file\");\n\t}\n\tvar port = this.params[0] || \"8080\",\n\t\trootTiddler = this.params[1] || \"$:/core/save/all\",\n\t\trenderType = this.params[2] || \"text/plain\",\n\t\tserveType = this.params[3] || \"text/html\",\n\t\tusername = this.params[4],\n\t\tpassword = this.params[5],\n\t\thost = this.params[6] || \"127.0.0.1\",\n\t\tpathprefix = this.params[7];\n\tthis.server.set({\n\t\trootTiddler: rootTiddler,\n\t\trenderType: renderType,\n\t\tserveType: serveType,\n\t\tusername: username,\n\t\tpassword: password,\n\t\tpathprefix: pathprefix\n\t});\n\tthis.server.listen(port,host);\n\t$tw.utils.log(\"Serving on \" + host + \":\" + port,\"brown/orange\");\n\t$tw.utils.log(\"(press ctrl-C to exit)\",\"red\");\n\t// Warn if required plugins are missing\n\tif(!$tw.wiki.getTiddler(\"$:/plugins/tiddlywiki/tiddlyweb\") || !$tw.wiki.getTiddler(\"$:/plugins/tiddlywiki/filesystem\")) {\n\t\t$tw.utils.warning(\"Warning: Plugins required for client-server operation (\\\"tiddlywiki/filesystem\\\" and \\\"tiddlywiki/tiddlyweb\\\") are missing from tiddlywiki.info file\");\n\t}\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/setfield.js": {
"title": "$:/core/modules/commands/setfield.js",
"text": "/*\\\ntitle: $:/core/modules/commands/setfield.js\ntype: application/javascript\nmodule-type: command\n\nCommand to modify selected tiddlers to set a field to the text of a template tiddler that has been wikified with the selected tiddler as the current tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.info = {\n\tname: \"setfield\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 4) {\n\t\treturn \"Missing parameters\";\n\t}\n\tvar self = this,\n\t\twiki = this.commander.wiki,\n\t\tfilter = this.params[0],\n\t\tfieldname = this.params[1] || \"text\",\n\t\ttemplatetitle = this.params[2],\n\t\trendertype = this.params[3] || \"text/plain\",\n\t\ttiddlers = wiki.filterTiddlers(filter);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar parser = wiki.parseTiddler(templatetitle),\n\t\t\tnewFields = {},\n\t\t\ttiddler = wiki.getTiddler(title);\n\t\tif(parser) {\n\t\t\tvar widgetNode = wiki.makeWidget(parser,{variables: {currentTiddler: title}});\n\t\t\tvar container = $tw.fakeDocument.createElement(\"div\");\n\t\t\twidgetNode.render(container,null);\n\t\t\tnewFields[fieldname] = rendertype === \"text/html\" ? container.innerHTML : container.textContent;\n\t\t} else {\n\t\t\tnewFields[fieldname] = undefined;\n\t\t}\n\t\twiki.addTiddler(new $tw.Tiddler(tiddler,newFields));\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/unpackplugin.js": {
"title": "$:/core/modules/commands/unpackplugin.js",
"text": "/*\\\ntitle: $:/core/modules/commands/unpackplugin.js\ntype: application/javascript\nmodule-type: command\n\nCommand to extract the shadow tiddlers from within a plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"unpackplugin\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander,callback) {\n\tthis.params = params;\n\tthis.commander = commander;\n\tthis.callback = callback;\n};\n\nCommand.prototype.execute = function() {\n\tif(this.params.length < 1) {\n\t\treturn \"Missing plugin name\";\n\t}\n\tvar self = this,\n\t\ttitle = this.params[0],\n\t\tpluginData = this.commander.wiki.getTiddlerDataCached(title);\n\tif(!pluginData) {\n\t\treturn \"Plugin '\" + title + \"' not found\";\n\t}\n\t$tw.utils.each(pluginData.tiddlers,function(tiddler) {\n\t\tself.commander.wiki.addTiddler(new $tw.Tiddler(tiddler));\n\t});\n\treturn null;\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/verbose.js": {
"title": "$:/core/modules/commands/verbose.js",
"text": "/*\\\ntitle: $:/core/modules/commands/verbose.js\ntype: application/javascript\nmodule-type: command\n\nVerbose command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"verbose\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.verbose = true;\n\t// Output the boot message log\n\tthis.commander.streams.output.write(\"Boot log:\\n \" + $tw.boot.logMessages.join(\"\\n \") + \"\\n\");\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/commands/version.js": {
"title": "$:/core/modules/commands/version.js",
"text": "/*\\\ntitle: $:/core/modules/commands/version.js\ntype: application/javascript\nmodule-type: command\n\nVersion command\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.info = {\n\tname: \"version\",\n\tsynchronous: true\n};\n\nvar Command = function(params,commander) {\n\tthis.params = params;\n\tthis.commander = commander;\n};\n\nCommand.prototype.execute = function() {\n\tthis.commander.streams.output.write($tw.version + \"\\n\");\n\treturn null; // No error\n};\n\nexports.Command = Command;\n\n})();\n",
"type": "application/javascript",
"module-type": "command"
},
"$:/core/modules/config.js": {
"title": "$:/core/modules/config.js",
"text": "/*\\\ntitle: $:/core/modules/config.js\ntype: application/javascript\nmodule-type: config\n\nCore configuration constants\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.preferences = {};\n\nexports.preferences.notificationDuration = 3 * 1000;\nexports.preferences.jsonSpaces = 4;\n\nexports.textPrimitives = {\n\tupperLetter: \"[A-Z\\u00c0-\\u00d6\\u00d8-\\u00de\\u0150\\u0170]\",\n\tlowerLetter: \"[a-z\\u00df-\\u00f6\\u00f8-\\u00ff\\u0151\\u0171]\",\n\tanyLetter: \"[A-Za-z0-9\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\",\n\tblockPrefixLetters:\t\"[A-Za-z0-9-_\\u00c0-\\u00d6\\u00d8-\\u00de\\u00df-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]\"\n};\n\nexports.textPrimitives.unWikiLink = \"~\";\nexports.textPrimitives.wikiLink = exports.textPrimitives.upperLetter + \"+\" +\n\texports.textPrimitives.lowerLetter + \"+\" +\n\texports.textPrimitives.upperLetter +\n\texports.textPrimitives.anyLetter + \"*\";\n\nexports.htmlEntities = {quot:34, amp:38, apos:39, lt:60, gt:62, nbsp:160, iexcl:161, cent:162, pound:163, curren:164, yen:165, brvbar:166, sect:167, uml:168, copy:169, ordf:170, laquo:171, not:172, shy:173, reg:174, macr:175, deg:176, plusmn:177, sup2:178, sup3:179, acute:180, micro:181, para:182, middot:183, cedil:184, sup1:185, ordm:186, raquo:187, frac14:188, frac12:189, frac34:190, iquest:191, Agrave:192, Aacute:193, Acirc:194, Atilde:195, Auml:196, Aring:197, AElig:198, Ccedil:199, Egrave:200, Eacute:201, Ecirc:202, Euml:203, Igrave:204, Iacute:205, Icirc:206, Iuml:207, ETH:208, Ntilde:209, Ograve:210, Oacute:211, Ocirc:212, Otilde:213, Ouml:214, times:215, Oslash:216, Ugrave:217, Uacute:218, Ucirc:219, Uuml:220, Yacute:221, THORN:222, szlig:223, agrave:224, aacute:225, acirc:226, atilde:227, auml:228, aring:229, aelig:230, ccedil:231, egrave:232, eacute:233, ecirc:234, euml:235, igrave:236, iacute:237, icirc:238, iuml:239, eth:240, ntilde:241, ograve:242, oacute:243, ocirc:244, otilde:245, ouml:246, divide:247, oslash:248, ugrave:249, uacute:250, ucirc:251, uuml:252, yacute:253, thorn:254, yuml:255, OElig:338, oelig:339, Scaron:352, scaron:353, Yuml:376, fnof:402, circ:710, tilde:732, Alpha:913, Beta:914, Gamma:915, Delta:916, Epsilon:917, Zeta:918, Eta:919, Theta:920, Iota:921, Kappa:922, Lambda:923, Mu:924, Nu:925, Xi:926, Omicron:927, Pi:928, Rho:929, Sigma:931, Tau:932, Upsilon:933, Phi:934, Chi:935, Psi:936, Omega:937, alpha:945, beta:946, gamma:947, delta:948, epsilon:949, zeta:950, eta:951, theta:952, iota:953, kappa:954, lambda:955, mu:956, nu:957, xi:958, omicron:959, pi:960, rho:961, sigmaf:962, sigma:963, tau:964, upsilon:965, phi:966, chi:967, psi:968, omega:969, thetasym:977, upsih:978, piv:982, ensp:8194, emsp:8195, thinsp:8201, zwnj:8204, zwj:8205, lrm:8206, rlm:8207, ndash:8211, mdash:8212, lsquo:8216, rsquo:8217, sbquo:8218, ldquo:8220, rdquo:8221, bdquo:8222, dagger:8224, Dagger:8225, bull:8226, hellip:8230, permil:8240, prime:8242, Prime:8243, lsaquo:8249, rsaquo:8250, oline:8254, frasl:8260, euro:8364, image:8465, weierp:8472, real:8476, trade:8482, alefsym:8501, larr:8592, uarr:8593, rarr:8594, darr:8595, harr:8596, crarr:8629, lArr:8656, uArr:8657, rArr:8658, dArr:8659, hArr:8660, forall:8704, part:8706, exist:8707, empty:8709, nabla:8711, isin:8712, notin:8713, ni:8715, prod:8719, sum:8721, minus:8722, lowast:8727, radic:8730, prop:8733, infin:8734, ang:8736, and:8743, or:8744, cap:8745, cup:8746, int:8747, there4:8756, sim:8764, cong:8773, asymp:8776, ne:8800, equiv:8801, le:8804, ge:8805, sub:8834, sup:8835, nsub:8836, sube:8838, supe:8839, oplus:8853, otimes:8855, perp:8869, sdot:8901, lceil:8968, rceil:8969, lfloor:8970, rfloor:8971, lang:9001, rang:9002, loz:9674, spades:9824, clubs:9827, hearts:9829, diams:9830 };\n\nexports.htmlVoidElements = \"area,base,br,col,command,embed,hr,img,input,keygen,link,meta,param,source,track,wbr\".split(\",\");\n\nexports.htmlBlockElements = \"address,article,aside,audio,blockquote,canvas,dd,div,dl,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,noscript,ol,output,p,pre,section,table,tfoot,ul,video\".split(\",\");\n\nexports.htmlUnsafeElements = \"script\".split(\",\");\n\n})();\n",
"type": "application/javascript",
"module-type": "config"
},
"$:/core/modules/deserializers.js": {
"title": "$:/core/modules/deserializers.js",
"text": "/*\\\ntitle: $:/core/modules/deserializers.js\ntype: application/javascript\nmodule-type: tiddlerdeserializer\n\nFunctions to deserialise tiddlers from a block of text\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nUtility function to parse an old-style tiddler DIV in a *.tid file. It looks like this:\n\n<div title=\"Title\" creator=\"JoeBloggs\" modifier=\"JoeBloggs\" created=\"201102111106\" modified=\"201102111310\" tags=\"myTag [[my long tag]]\">\n<pre>The text of the tiddler (without the expected HTML encoding).\n</pre>\n</div>\n\nNote that the field attributes are HTML encoded, but that the body of the <PRE> tag is not encoded.\n\nWhen these tiddler DIVs are encountered within a TiddlyWiki HTML file then the body is encoded in the usual way.\n*/\nvar parseTiddlerDiv = function(text /* [,fields] */) {\n\t// Slot together the default results\n\tvar result = {};\n\tif(arguments.length > 1) {\n\t\tfor(var f=1; f<arguments.length; f++) {\n\t\t\tvar fields = arguments[f];\n\t\t\tfor(var t in fields) {\n\t\t\t\tresult[t] = fields[t];\t\t\n\t\t\t}\n\t\t}\n\t}\n\t// Parse the DIV body\n\tvar startRegExp = /^\\s*<div\\s+([^>]*)>(\\s*<pre>)?/gi,\n\t\tendRegExp,\n\t\tmatch = startRegExp.exec(text);\n\tif(match) {\n\t\t// Old-style DIVs don't have the <pre> tag\n\t\tif(match[2]) {\n\t\t\tendRegExp = /<\\/pre>\\s*<\\/div>\\s*$/gi;\n\t\t} else {\n\t\t\tendRegExp = /<\\/div>\\s*$/gi;\n\t\t}\n\t\tvar endMatch = endRegExp.exec(text);\n\t\tif(endMatch) {\n\t\t\t// Extract the text\n\t\t\tresult.text = text.substring(match.index + match[0].length,endMatch.index);\n\t\t\t// Process the attributes\n\t\t\tvar attrRegExp = /\\s*([^=\\s]+)\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)')/gi,\n\t\t\t\tattrMatch;\n\t\t\tdo {\n\t\t\t\tattrMatch = attrRegExp.exec(match[1]);\n\t\t\t\tif(attrMatch) {\n\t\t\t\t\tvar name = attrMatch[1];\n\t\t\t\t\tvar value = attrMatch[2] !== undefined ? attrMatch[2] : attrMatch[3];\n\t\t\t\t\tresult[name] = value;\n\t\t\t\t}\n\t\t\t} while(attrMatch);\n\t\t\treturn result;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports[\"application/x-tiddler-html-div\"] = function(text,fields) {\n\treturn [parseTiddlerDiv(text,fields)];\n};\n\nexports[\"application/json\"] = function(text,fields) {\n\tvar incoming,\n\t\tresults = [];\n\ttry {\n\t\tincoming = JSON.parse(text);\n\t} catch(e) {\n\t\tincoming = [{\n\t\t\ttitle: \"JSON error: \" + e,\n\t\t\ttext: \"\"\n\t\t}]\n\t}\n\tif(!$tw.utils.isArray(incoming)) {\n\t\tincoming = [incoming];\n\t}\n\tfor(var t=0; t<incoming.length; t++) {\n\t\tvar incomingFields = incoming[t],\n\t\t\tfields = {};\n\t\tfor(var f in incomingFields) {\n\t\t\tif(typeof incomingFields[f] === \"string\") {\n\t\t\t\tfields[f] = incomingFields[f];\n\t\t\t}\n\t\t}\n\t\tresults.push(fields);\n\t}\n\treturn results;\n};\n\n/*\nParse an HTML file into tiddlers. There are three possibilities:\n# A TiddlyWiki classic HTML file containing `text/x-tiddlywiki` tiddlers\n# A TiddlyWiki5 HTML file containing `text/vnd.tiddlywiki` tiddlers\n# An ordinary HTML file\n*/\nexports[\"text/html\"] = function(text,fields) {\n\t// Check if we've got a store area\n\tvar storeAreaMarkerRegExp = /<div id=[\"']?storeArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\n\t\tmatch = storeAreaMarkerRegExp.exec(text);\n\tif(match) {\n\t\t// If so, it's either a classic TiddlyWiki file or an unencrypted TW5 file\n\t\t// First read the normal tiddlers\n\t\tvar results = deserializeTiddlyWikiFile(text,storeAreaMarkerRegExp.lastIndex,!!match[1],fields);\n\t\t// Then any system tiddlers\n\t\tvar systemAreaMarkerRegExp = /<div id=[\"']?systemArea['\"]?( style=[\"']?display:none;[\"']?)?>/gi,\n\t\t\tsysMatch = systemAreaMarkerRegExp.exec(text);\n\t\tif(sysMatch) {\n\t\t\tresults.push.apply(results,deserializeTiddlyWikiFile(text,systemAreaMarkerRegExp.lastIndex,!!sysMatch[1],fields));\n\t\t}\n\t\treturn results;\n\t} else {\n\t\t// Check whether we've got an encrypted file\n\t\tvar encryptedStoreArea = $tw.utils.extractEncryptedStoreArea(text);\n\t\tif(encryptedStoreArea) {\n\t\t\t// If so, attempt to decrypt it using the current password\n\t\t\treturn $tw.utils.decryptStoreArea(encryptedStoreArea);\n\t\t} else {\n\t\t\t// It's not a TiddlyWiki so we'll return the entire HTML file as a tiddler\n\t\t\treturn deserializeHtmlFile(text,fields);\n\t\t}\n\t}\n};\n\nfunction deserializeHtmlFile(text,fields) {\n\tvar result = {};\n\t$tw.utils.each(fields,function(value,name) {\n\t\tresult[name] = value;\n\t});\n\tresult.text = text;\n\tresult.type = \"text/html\";\n\treturn [result];\n}\n\nfunction deserializeTiddlyWikiFile(text,storeAreaEnd,isTiddlyWiki5,fields) {\n\tvar results = [],\n\t\tendOfDivRegExp = /(<\\/div>\\s*)/gi,\n\t\tstartPos = storeAreaEnd,\n\t\tdefaultType = isTiddlyWiki5 ? undefined : \"text/x-tiddlywiki\";\n\tendOfDivRegExp.lastIndex = startPos;\n\tvar match = endOfDivRegExp.exec(text);\n\twhile(match) {\n\t\tvar endPos = endOfDivRegExp.lastIndex,\n\t\t\ttiddlerFields = parseTiddlerDiv(text.substring(startPos,endPos),fields,{type: defaultType});\n\t\tif(!tiddlerFields) {\n\t\t\tbreak;\n\t\t}\n\t\t$tw.utils.each(tiddlerFields,function(value,name) {\n\t\t\tif(typeof value === \"string\") {\n\t\t\t\ttiddlerFields[name] = $tw.utils.htmlDecode(value);\n\t\t\t}\n\t\t});\n\t\tif(tiddlerFields.text !== null) {\n\t\t\tresults.push(tiddlerFields);\n\t\t}\n\t\tstartPos = endPos;\n\t\tmatch = endOfDivRegExp.exec(text);\n\t}\n\treturn results;\n}\n\n})();\n",
"type": "application/javascript",
"module-type": "tiddlerdeserializer"
},
"$:/core/modules/editor/engines/framed.js": {
"title": "$:/core/modules/editor/engines/framed.js",
"text": "/*\\\ntitle: $:/core/modules/editor/engines/framed.js\ntype: application/javascript\nmodule-type: library\n\nText editor engine based on a simple input or textarea within an iframe. This is done so that the selection is preserved even when clicking away from the textarea\n\n\\*/\n(function(){\n\n/*jslint node: true,browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar HEIGHT_VALUE_TITLE = \"$:/config/TextEditor/EditorHeight/Height\";\n\nfunction FramedEngine(options) {\n\t// Save our options\n\toptions = options || {};\n\tthis.widget = options.widget;\n\tthis.value = options.value;\n\tthis.parentNode = options.parentNode;\n\tthis.nextSibling = options.nextSibling;\n\t// Create our hidden dummy text area for reading styles\n\tthis.dummyTextArea = this.widget.document.createElement(\"textarea\");\n\tif(this.widget.editClass) {\n\t\tthis.dummyTextArea.className = this.widget.editClass;\n\t}\n\tthis.dummyTextArea.setAttribute(\"hidden\",\"true\");\n\tthis.parentNode.insertBefore(this.dummyTextArea,this.nextSibling);\n\tthis.widget.domNodes.push(this.dummyTextArea);\n\t// Create the iframe\n\tthis.iframeNode = this.widget.document.createElement(\"iframe\");\n\tthis.parentNode.insertBefore(this.iframeNode,this.nextSibling);\n\tthis.iframeDoc = this.iframeNode.contentWindow.document;\n\t// (Firefox requires us to put some empty content in the iframe)\n\tthis.iframeDoc.open();\n\tthis.iframeDoc.write(\"\");\n\tthis.iframeDoc.close();\n\t// Style the iframe\n\tthis.iframeNode.className = this.dummyTextArea.className;\n\tthis.iframeNode.style.border = \"none\";\n\tthis.iframeNode.style.padding = \"0\";\n\tthis.iframeNode.style.resize = \"none\";\n\tthis.iframeDoc.body.style.margin = \"0\";\n\tthis.iframeDoc.body.style.padding = \"0\";\n\tthis.widget.domNodes.push(this.iframeNode);\n\t// Construct the textarea or input node\n\tvar tag = this.widget.editTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"input\";\n\t}\n\tthis.domNode = this.iframeDoc.createElement(tag);\n\t// Set the text\n\tif(this.widget.editTag === \"textarea\") {\n\t\tthis.domNode.appendChild(this.iframeDoc.createTextNode(this.value));\n\t} else {\n\t\tthis.domNode.value = this.value;\n\t}\n\t// Set the attributes\n\tif(this.widget.editType) {\n\t\tthis.domNode.setAttribute(\"type\",this.widget.editType);\n\t}\n\tif(this.widget.editPlaceholder) {\n\t\tthis.domNode.setAttribute(\"placeholder\",this.widget.editPlaceholder);\n\t}\n\tif(this.widget.editSize) {\n\t\tthis.domNode.setAttribute(\"size\",this.widget.editSize);\n\t}\n\tif(this.widget.editRows) {\n\t\tthis.domNode.setAttribute(\"rows\",this.widget.editRows);\n\t}\n\t// Copy the styles from the dummy textarea\n\tthis.copyStyles();\n\t// Add event listeners\n\t$tw.utils.addEventListeners(this.domNode,[\n\t\t{name: \"input\",handlerObject: this,handlerMethod: \"handleInputEvent\"},\n\t\t{name: \"keydown\",handlerObject: this.widget,handlerMethod: \"handleKeydownEvent\"}\n\t]);\n\t// Insert the element into the DOM\n\tthis.iframeDoc.body.appendChild(this.domNode);\n}\n\n/*\nCopy styles from the dummy text area to the textarea in the iframe\n*/\nFramedEngine.prototype.copyStyles = function() {\n\t// Copy all styles\n\t$tw.utils.copyStyles(this.dummyTextArea,this.domNode);\n\t// Override the ones that should not be set the same as the dummy textarea\n\tthis.domNode.style.display = \"block\";\n\tthis.domNode.style.width = \"100%\";\n\tthis.domNode.style.margin = \"0\";\n\t// In Chrome setting -webkit-text-fill-color overrides the placeholder text colour\n\tthis.domNode.style[\"-webkit-text-fill-color\"] = \"currentcolor\";\n};\n\n/*\nSet the text of the engine if it doesn't currently have focus\n*/\nFramedEngine.prototype.setText = function(text,type) {\n\tif(!this.domNode.isTiddlyWikiFakeDom) {\n\t\tif(this.domNode.ownerDocument.activeElement !== this.domNode) {\n\t\t\tthis.domNode.value = text;\n\t\t}\n\t\t// Fix the height if needed\n\t\tthis.fixHeight();\n\t}\n};\n\n/*\nGet the text of the engine\n*/\nFramedEngine.prototype.getText = function() {\n\treturn this.domNode.value;\n};\n\n/*\nFix the height of textarea to fit content\n*/\nFramedEngine.prototype.fixHeight = function() {\n\t// Make sure styles are updated\n\tthis.copyStyles();\n\t// Adjust height\n\tif(this.widget.editTag === \"textarea\") {\n\t\tif(this.widget.editAutoHeight) {\n\t\t\tif(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {\n\t\t\t\tvar newHeight = $tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);\n\t\t\t\tthis.iframeNode.style.height = (newHeight + 14) + \"px\"; // +14 for the border on the textarea\n\t\t\t}\n\t\t} else {\n\t\t\tvar fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,\"400px\"),10);\n\t\t\tfixedHeight = Math.max(fixedHeight,20);\n\t\t\tthis.domNode.style.height = fixedHeight + \"px\";\n\t\t\tthis.iframeNode.style.height = (fixedHeight + 14) + \"px\";\n\t\t}\n\t}\n};\n\n/*\nFocus the engine node\n*/\nFramedEngine.prototype.focus = function() {\n\tif(this.domNode.focus && this.domNode.select) {\n\t\tthis.domNode.focus();\n\t\tthis.domNode.select();\n\t}\n};\n\n/*\nHandle a dom \"input\" event which occurs when the text has changed\n*/\nFramedEngine.prototype.handleInputEvent = function(event) {\n\tthis.widget.saveChanges(this.getText());\n\tthis.fixHeight();\n\treturn true;\n};\n\n/*\nCreate a blank structure representing a text operation\n*/\nFramedEngine.prototype.createTextOperation = function() {\n\tvar operation = {\n\t\ttext: this.domNode.value,\n\t\tselStart: this.domNode.selectionStart,\n\t\tselEnd: this.domNode.selectionEnd,\n\t\tcutStart: null,\n\t\tcutEnd: null,\n\t\treplacement: null,\n\t\tnewSelStart: null,\n\t\tnewSelEnd: null\n\t};\n\toperation.selection = operation.text.substring(operation.selStart,operation.selEnd);\n\treturn operation;\n};\n\n/*\nExecute a text operation\n*/\nFramedEngine.prototype.executeTextOperation = function(operation) {\n\t// Perform the required changes to the text area and the underlying tiddler\n\tvar newText = operation.text;\n\tif(operation.replacement !== null) {\n\t\tnewText = operation.text.substring(0,operation.cutStart) + operation.replacement + operation.text.substring(operation.cutEnd);\n\t\t// Attempt to use a execCommand to modify the value of the control\n\t\tif(this.iframeDoc.queryCommandSupported(\"insertText\") && this.iframeDoc.queryCommandSupported(\"delete\") && !$tw.browser.isFirefox) {\n\t\t\tthis.domNode.focus();\n\t\t\tthis.domNode.setSelectionRange(operation.cutStart,operation.cutEnd);\n\t\t\tif(operation.replacement === \"\") {\n\t\t\t\tthis.iframeDoc.execCommand(\"delete\",false,\"\");\n\t\t\t} else {\n\t\t\t\tthis.iframeDoc.execCommand(\"insertText\",false,operation.replacement);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.domNode.value = newText;\n\t\t}\n\t\tthis.domNode.focus();\n\t\tthis.domNode.setSelectionRange(operation.newSelStart,operation.newSelEnd);\n\t}\n\tthis.domNode.focus();\n\treturn newText;\n};\n\nexports.FramedEngine = FramedEngine;\n\n})();\n",
"type": "application/javascript",
"module-type": "library"
},
"$:/core/modules/editor/engines/simple.js": {
"title": "$:/core/modules/editor/engines/simple.js",
"text": "/*\\\ntitle: $:/core/modules/editor/engines/simple.js\ntype: application/javascript\nmodule-type: library\n\nText editor engine based on a simple input or textarea tag\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar HEIGHT_VALUE_TITLE = \"$:/config/TextEditor/EditorHeight/Height\";\n\nfunction SimpleEngine(options) {\n\t// Save our options\n\toptions = options || {};\n\tthis.widget = options.widget;\n\tthis.value = options.value;\n\tthis.parentNode = options.parentNode;\n\tthis.nextSibling = options.nextSibling;\n\t// Construct the textarea or input node\n\tvar tag = this.widget.editTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"input\";\n\t}\n\tthis.domNode = this.widget.document.createElement(tag);\n\t// Set the text\n\tif(this.widget.editTag === \"textarea\") {\n\t\tthis.domNode.appendChild(this.widget.document.createTextNode(this.value));\n\t} else {\n\t\tthis.domNode.value = this.value;\n\t}\n\t// Set the attributes\n\tif(this.widget.editType) {\n\t\tthis.domNode.setAttribute(\"type\",this.widget.editType);\n\t}\n\tif(this.widget.editPlaceholder) {\n\t\tthis.domNode.setAttribute(\"placeholder\",this.widget.editPlaceholder);\n\t}\n\tif(this.widget.editSize) {\n\t\tthis.domNode.setAttribute(\"size\",this.widget.editSize);\n\t}\n\tif(this.widget.editRows) {\n\t\tthis.domNode.setAttribute(\"rows\",this.widget.editRows);\n\t}\n\tif(this.widget.editClass) {\n\t\tthis.domNode.className = this.widget.editClass;\n\t}\n\t// Add an input event handler\n\t$tw.utils.addEventListeners(this.domNode,[\n\t\t{name: \"focus\", handlerObject: this, handlerMethod: \"handleFocusEvent\"},\n\t\t{name: \"input\", handlerObject: this, handlerMethod: \"handleInputEvent\"}\n\t]);\n\t// Insert the element into the DOM\n\tthis.parentNode.insertBefore(this.domNode,this.nextSibling);\n\tthis.widget.domNodes.push(this.domNode);\n}\n\n/*\nSet the text of the engine if it doesn't currently have focus\n*/\nSimpleEngine.prototype.setText = function(text,type) {\n\tif(!this.domNode.isTiddlyWikiFakeDom) {\n\t\tif(this.domNode.ownerDocument.activeElement !== this.domNode || text === \"\") {\n\t\t\tthis.domNode.value = text;\n\t\t}\n\t\t// Fix the height if needed\n\t\tthis.fixHeight();\n\t}\n};\n\n/*\nGet the text of the engine\n*/\nSimpleEngine.prototype.getText = function() {\n\treturn this.domNode.value;\n};\n\n/*\nFix the height of textarea to fit content\n*/\nSimpleEngine.prototype.fixHeight = function() {\n\tif(this.widget.editTag === \"textarea\") {\n\t\tif(this.widget.editAutoHeight) {\n\t\t\tif(this.domNode && !this.domNode.isTiddlyWikiFakeDom) {\n\t\t\t\t$tw.utils.resizeTextAreaToFit(this.domNode,this.widget.editMinHeight);\n\t\t\t}\n\t\t} else {\n\t\t\tvar fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,\"400px\"),10);\n\t\t\tfixedHeight = Math.max(fixedHeight,20);\n\t\t\tthis.domNode.style.height = fixedHeight + \"px\";\n\t\t}\n\t}\n};\n\n/*\nFocus the engine node\n*/\nSimpleEngine.prototype.focus = function() {\n\tif(this.domNode.focus && this.domNode.select) {\n\t\tthis.domNode.focus();\n\t\tthis.domNode.select();\n\t}\n};\n\n/*\nHandle a dom \"input\" event which occurs when the text has changed\n*/\nSimpleEngine.prototype.handleInputEvent = function(event) {\n\tthis.widget.saveChanges(this.getText());\n\tthis.fixHeight();\n\treturn true;\n};\n\n/*\nHandle a dom \"focus\" event\n*/\nSimpleEngine.prototype.handleFocusEvent = function(event) {\n\tif(this.widget.editFocusPopup) {\n\t\t$tw.popup.triggerPopup({\n\t\t\tdomNode: this.domNode,\n\t\t\ttitle: this.widget.editFocusPopup,\n\t\t\twiki: this.widget.wiki,\n\t\t\tforce: true\n\t\t});\n\t}\n\treturn true;\n};\n\n/*\nCreate a blank structure representing a text operation\n*/\nSimpleEngine.prototype.createTextOperation = function() {\n\treturn null;\n};\n\n/*\nExecute a text operation\n*/\nSimpleEngine.prototype.executeTextOperation = function(operation) {\n};\n\nexports.SimpleEngine = SimpleEngine;\n\n})();\n",
"type": "application/javascript",
"module-type": "library"
},
"$:/core/modules/editor/factory.js": {
"title": "$:/core/modules/editor/factory.js",
"text": "/*\\\ntitle: $:/core/modules/editor/factory.js\ntype: application/javascript\nmodule-type: library\n\nFactory for constructing text editor widgets with specified engines for the toolbar and non-toolbar cases\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar DEFAULT_MIN_TEXT_AREA_HEIGHT = \"100px\"; // Minimum height of textareas in pixels\n\n// Configuration tiddlers\nvar HEIGHT_MODE_TITLE = \"$:/config/TextEditor/EditorHeight/Mode\";\nvar ENABLE_TOOLBAR_TITLE = \"$:/config/TextEditor/EnableToolbar\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nfunction editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {\n\n\tvar EditTextWidget = function(parseTreeNode,options) {\n\t\t// Initialise the editor operations if they've not been done already\n\t\tif(!this.editorOperations) {\n\t\t\tEditTextWidget.prototype.editorOperations = {};\n\t\t\t$tw.modules.applyMethods(\"texteditoroperation\",this.editorOperations);\n\t\t}\n\t\tthis.initialise(parseTreeNode,options);\n\t};\n\n\t/*\n\tInherit from the base widget class\n\t*/\n\tEditTextWidget.prototype = new Widget();\n\n\t/*\n\tRender this widget into the DOM\n\t*/\n\tEditTextWidget.prototype.render = function(parent,nextSibling) {\n\t\t// Save the parent dom node\n\t\tthis.parentDomNode = parent;\n\t\t// Compute our attributes\n\t\tthis.computeAttributes();\n\t\t// Execute our logic\n\t\tthis.execute();\n\t\t// Create the wrapper for the toolbar and render its content\n\t\tif(this.editShowToolbar) {\n\t\t\tthis.toolbarNode = this.document.createElement(\"div\");\n\t\t\tthis.toolbarNode.className = \"tc-editor-toolbar\";\n\t\t\tparent.insertBefore(this.toolbarNode,nextSibling);\n\t\t\tthis.renderChildren(this.toolbarNode,null);\n\t\t\tthis.domNodes.push(this.toolbarNode);\n\t\t}\n\t\t// Create our element\n\t\tvar editInfo = this.getEditInfo(),\n\t\t\tEngine = this.editShowToolbar ? toolbarEngine : nonToolbarEngine;\n\t\tthis.engine = new Engine({\n\t\t\t\twidget: this,\n\t\t\t\tvalue: editInfo.value,\n\t\t\t\ttype: editInfo.type,\n\t\t\t\tparentNode: parent,\n\t\t\t\tnextSibling: nextSibling\n\t\t\t});\n\t\t// Call the postRender hook\n\t\tif(this.postRender) {\n\t\t\tthis.postRender();\n\t\t}\n\t\t// Fix height\n\t\tthis.engine.fixHeight();\n\t\t// Focus if required\n\t\tif(this.editFocus === \"true\" || this.editFocus === \"yes\") {\n\t\t\tthis.engine.focus();\n\t\t}\n\t\t// Add widget message listeners\n\t\tthis.addEventListeners([\n\t\t\t{type: \"tm-edit-text-operation\", handler: \"handleEditTextOperationMessage\"}\n\t\t]);\n\t};\n\n\t/*\n\tGet the tiddler being edited and current value\n\t*/\n\tEditTextWidget.prototype.getEditInfo = function() {\n\t\t// Get the edit value\n\t\tvar self = this,\n\t\t\tvalue,\n\t\t\ttype = \"text/plain\",\n\t\t\tupdate;\n\t\tif(this.editIndex) {\n\t\t\tvalue = this.wiki.extractTiddlerDataItem(this.editTitle,this.editIndex,this.editDefault);\n\t\t\tupdate = function(value) {\n\t\t\t\tvar data = self.wiki.getTiddlerData(self.editTitle,{});\n\t\t\t\tif(data[self.editIndex] !== value) {\n\t\t\t\t\tdata[self.editIndex] = value;\n\t\t\t\t\tself.wiki.setTiddlerData(self.editTitle,data);\n\t\t\t\t}\n\t\t\t};\n\t\t} else {\n\t\t\t// Get the current tiddler and the field name\n\t\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\t\tif(tiddler) {\n\t\t\t\t// If we've got a tiddler, the value to display is the field string value\n\t\t\t\tvalue = tiddler.getFieldString(this.editField);\n\t\t\t\tif(this.editField === \"text\") {\n\t\t\t\t\ttype = tiddler.fields.type || \"text/vnd.tiddlywiki\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Otherwise, we need to construct a default value for the editor\n\t\t\t\tswitch(this.editField) {\n\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\tvalue = \"Type the text for the tiddler '\" + this.editTitle + \"'\";\n\t\t\t\t\t\ttype = \"text/vnd.tiddlywiki\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\tvalue = this.editTitle;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tvalue = \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(this.editDefault !== undefined) {\n\t\t\t\t\tvalue = this.editDefault;\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate = function(value) {\n\t\t\t\tvar tiddler = self.wiki.getTiddler(self.editTitle),\n\t\t\t\t\tupdateFields = {\n\t\t\t\t\t\ttitle: self.editTitle\n\t\t\t\t\t};\n\t\t\t\tupdateFields[self.editField] = value;\n\t\t\t\tself.wiki.addTiddler(new $tw.Tiddler(self.wiki.getCreationFields(),tiddler,updateFields,self.wiki.getModificationFields()));\n\t\t\t};\n\t\t}\n\t\tif(this.editType) {\n\t\t\ttype = this.editType;\n\t\t}\n\t\treturn {value: value || \"\", type: type, update: update};\n\t};\n\n\t/*\n\tHandle an edit text operation message from the toolbar\n\t*/\n\tEditTextWidget.prototype.handleEditTextOperationMessage = function(event) {\n\t\t// Prepare information about the operation\n\t\tvar operation = this.engine.createTextOperation();\n\t\t// Invoke the handler for the selected operation\n\t\tvar handler = this.editorOperations[event.param];\n\t\tif(handler) {\n\t\t\thandler.call(this,event,operation);\n\t\t}\n\t\t// Execute the operation via the engine\n\t\tvar newText = this.engine.executeTextOperation(operation);\n\t\t// Fix the tiddler height and save changes\n\t\tthis.engine.fixHeight();\n\t\tthis.saveChanges(newText);\n\t};\n\n\t/*\n\tCompute the internal state of the widget\n\t*/\n\tEditTextWidget.prototype.execute = function() {\n\t\t// Get our parameters\n\t\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t\tthis.editField = this.getAttribute(\"field\",\"text\");\n\t\tthis.editIndex = this.getAttribute(\"index\");\n\t\tthis.editDefault = this.getAttribute(\"default\");\n\t\tthis.editClass = this.getAttribute(\"class\");\n\t\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\n\t\tthis.editSize = this.getAttribute(\"size\");\n\t\tthis.editRows = this.getAttribute(\"rows\");\n\t\tthis.editAutoHeight = this.wiki.getTiddlerText(HEIGHT_MODE_TITLE,\"auto\");\n\t\tthis.editAutoHeight = this.getAttribute(\"autoHeight\",this.editAutoHeight === \"auto\" ? \"yes\" : \"no\") === \"yes\";\n\t\tthis.editMinHeight = this.getAttribute(\"minHeight\",DEFAULT_MIN_TEXT_AREA_HEIGHT);\n\t\tthis.editFocusPopup = this.getAttribute(\"focusPopup\");\n\t\tthis.editFocus = this.getAttribute(\"focus\");\n\t\t// Get the default editor element tag and type\n\t\tvar tag,type;\n\t\tif(this.editField === \"text\") {\n\t\t\ttag = \"textarea\";\n\t\t} else {\n\t\t\ttag = \"input\";\n\t\t\tvar fieldModule = $tw.Tiddler.fieldModules[this.editField];\n\t\t\tif(fieldModule && fieldModule.editTag) {\n\t\t\t\ttag = fieldModule.editTag;\n\t\t\t}\n\t\t\tif(fieldModule && fieldModule.editType) {\n\t\t\t\ttype = fieldModule.editType;\n\t\t\t}\n\t\t\ttype = type || \"text\";\n\t\t}\n\t\t// Get the rest of our parameters\n\t\tthis.editTag = this.getAttribute(\"tag\",tag);\n\t\tthis.editType = this.getAttribute(\"type\",type);\n\t\t// Make the child widgets\n\t\tthis.makeChildWidgets();\n\t\t// Determine whether to show the toolbar\n\t\tthis.editShowToolbar = this.wiki.getTiddlerText(ENABLE_TOOLBAR_TITLE,\"yes\");\n\t\tthis.editShowToolbar = (this.editShowToolbar === \"yes\") && !!(this.children && this.children.length > 0);\n\t};\n\n\t/*\n\tSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n\t*/\n\tEditTextWidget.prototype.refresh = function(changedTiddlers) {\n\t\tvar changedAttributes = this.computeAttributes();\n\t\t// Completely rerender if any of our attributes have changed\n\t\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes[\"default\"] || changedAttributes[\"class\"] || changedAttributes.placeholder || changedAttributes.size || changedAttributes.autoHeight || changedAttributes.minHeight || changedAttributes.focusPopup || changedAttributes.rows || changedTiddlers[HEIGHT_MODE_TITLE] || changedTiddlers[ENABLE_TOOLBAR_TITLE]) {\n\t\t\tthis.refreshSelf();\n\t\t\treturn true;\n\t\t} else if(changedTiddlers[this.editTitle]) {\n\t\t\tvar editInfo = this.getEditInfo();\n\t\t\tthis.updateEditor(editInfo.value,editInfo.type);\n\t\t}\n\t\tthis.engine.fixHeight();\n\t\tif(this.editShowToolbar) {\n\t\t\treturn this.refreshChildren(changedTiddlers);\t\t\t\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\t/*\n\tUpdate the editor with new text. This method is separate from updateEditorDomNode()\n\tso that subclasses can override updateEditor() and still use updateEditorDomNode()\n\t*/\n\tEditTextWidget.prototype.updateEditor = function(text,type) {\n\t\tthis.updateEditorDomNode(text,type);\n\t};\n\n\t/*\n\tUpdate the editor dom node with new text\n\t*/\n\tEditTextWidget.prototype.updateEditorDomNode = function(text,type) {\n\t\tthis.engine.setText(text,type);\n\t};\n\n\t/*\n\tSave changes back to the tiddler store\n\t*/\n\tEditTextWidget.prototype.saveChanges = function(text) {\n\t\tvar editInfo = this.getEditInfo();\n\t\tif(text !== editInfo.value) {\n\t\t\teditInfo.update(text);\n\t\t}\n\t};\n\n\t/*\n\tHandle a dom \"keydown\" event, which we'll bubble up to our container for the keyboard widgets benefit\n\t*/\n\tEditTextWidget.prototype.handleKeydownEvent = function(event) {\n\t\t// Check for a keyboard shortcut\n\t\tif(this.toolbarNode) {\n\t\t\tvar shortcutElements = this.toolbarNode.querySelectorAll(\"[data-tw-keyboard-shortcut]\");\n\t\t\tfor(var index=0; index<shortcutElements.length; index++) {\n\t\t\t\tvar el = shortcutElements[index],\n\t\t\t\t\tshortcutData = el.getAttribute(\"data-tw-keyboard-shortcut\"),\n\t\t\t\t\tkeyInfoArray = $tw.keyboardManager.parseKeyDescriptors(shortcutData,{\n\t\t\t\t\t\twiki: this.wiki\n\t\t\t\t\t});\n\t\t\t\tif($tw.keyboardManager.checkKeyDescriptors(event,keyInfoArray)) {\n\t\t\t\t\tvar clickEvent = this.document.createEvent(\"Events\");\n\t\t\t\t clickEvent.initEvent(\"click\",true,false);\n\t\t\t\t el.dispatchEvent(clickEvent);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\treturn true;\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Propogate the event to the container\n\t\tif(this.propogateKeydownEvent(event)) {\n\t\t\t// Ignore the keydown if it was already handled\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn true;\n\t\t}\n\t\t// Otherwise, process the keydown normally\n\t\treturn false;\n\t};\n\n\t/*\n\tPropogate keydown events to our container for the keyboard widgets benefit\n\t*/\n\tEditTextWidget.prototype.propogateKeydownEvent = function(event) {\n\t\tvar newEvent = this.document.createEventObject ? this.document.createEventObject() : this.document.createEvent(\"Events\");\n\t\tif(newEvent.initEvent) {\n\t\t\tnewEvent.initEvent(\"keydown\", true, true);\n\t\t}\n\t\tnewEvent.keyCode = event.keyCode;\n\t\tnewEvent.which = event.which;\n\t\tnewEvent.metaKey = event.metaKey;\n\t\tnewEvent.ctrlKey = event.ctrlKey;\n\t\tnewEvent.altKey = event.altKey;\n\t\tnewEvent.shiftKey = event.shiftKey;\n\t\treturn !this.parentDomNode.dispatchEvent(newEvent);\n\t};\n\n\treturn EditTextWidget;\n\n}\n\nexports.editTextWidgetFactory = editTextWidgetFactory;\n\n})();\n",
"type": "application/javascript",
"module-type": "library"
},
"$:/core/modules/editor/operations/bitmap/clear.js": {
"title": "$:/core/modules/editor/operations/bitmap/clear.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/bitmap/clear.js\ntype: application/javascript\nmodule-type: bitmapeditoroperation\n\nBitmap editor operation to clear the image\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"clear\"] = function(event) {\n\tvar ctx = this.canvasDomNode.getContext(\"2d\");\n\tctx.globalAlpha = 1;\n\tctx.fillStyle = event.paramObject.colour || \"white\";\n\tctx.fillRect(0,0,this.canvasDomNode.width,this.canvasDomNode.height);\n\t// Save changes\n\tthis.strokeEnd();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "bitmapeditoroperation"
},
"$:/core/modules/editor/operations/bitmap/resize.js": {
"title": "$:/core/modules/editor/operations/bitmap/resize.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/bitmap/resize.js\ntype: application/javascript\nmodule-type: bitmapeditoroperation\n\nBitmap editor operation to resize the image\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"resize\"] = function(event) {\n\t// Get the new width\n\tvar newWidth = parseInt(event.paramObject.width || this.canvasDomNode.width,10),\n\t\tnewHeight = parseInt(event.paramObject.height || this.canvasDomNode.height,10);\n\t// Update if necessary\n\tif(newWidth > 0 && newHeight > 0 && !(newWidth === this.currCanvas.width && newHeight === this.currCanvas.height)) {\n\t\tthis.changeCanvasSize(newWidth,newHeight);\n\t}\n\t// Update the input controls\n\tthis.refreshToolbar();\n\t// Save the image into the tiddler\n\tthis.saveChanges();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "bitmapeditoroperation"
},
"$:/core/modules/editor/operations/text/excise.js": {
"title": "$:/core/modules/editor/operations/text/excise.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/excise.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to excise the selection to a new tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"excise\"] = function(event,operation) {\n\tvar editTiddler = this.wiki.getTiddler(this.editTitle),\n\t\teditTiddlerTitle = this.editTitle;\n\tif(editTiddler && editTiddler.fields[\"draft.of\"]) {\n\t\teditTiddlerTitle = editTiddler.fields[\"draft.of\"];\n\t}\n\tvar excisionTitle = event.paramObject.title || this.wiki.generateNewTitle(\"New Excision\");\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\tthis.wiki.getCreationFields(),\n\t\tthis.wiki.getModificationFields(),\n\t\t{\n\t\t\ttitle: excisionTitle,\n\t\t\ttext: operation.selection,\n\t\t\ttags: event.paramObject.tagnew === \"yes\" ? [editTiddlerTitle] : []\n\t\t}\n\t));\n\toperation.replacement = excisionTitle;\n\tswitch(event.paramObject.type || \"transclude\") {\n\t\tcase \"transclude\":\n\t\t\toperation.replacement = \"{{\" + operation.replacement+ \"}}\";\n\t\t\tbreak;\n\t\tcase \"link\":\n\t\t\toperation.replacement = \"[[\" + operation.replacement+ \"]]\";\n\t\t\tbreak;\n\t\tcase \"macro\":\n\t\t\toperation.replacement = \"<<\" + (event.paramObject.macro || \"translink\") + \" \\\"\\\"\\\"\" + operation.replacement + \"\\\"\\\"\\\">>\";\n\t\t\tbreak;\n\t}\n\toperation.cutStart = operation.selStart;\n\toperation.cutEnd = operation.selEnd;\n\toperation.newSelStart = operation.selStart;\n\toperation.newSelEnd = operation.selStart + operation.replacement.length;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/make-link.js": {
"title": "$:/core/modules/editor/operations/text/make-link.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/make-link.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to make a link\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"make-link\"] = function(event,operation) {\n\tif(operation.selection) {\n\t\toperation.replacement = \"[[\" + operation.selection + \"|\" + event.paramObject.text + \"]]\";\n\t\toperation.cutStart = operation.selStart;\n\t\toperation.cutEnd = operation.selEnd;\n\t} else {\n\t\toperation.replacement = \"[[\" + event.paramObject.text + \"]]\";\n\t\toperation.cutStart = operation.selStart;\n\t\toperation.cutEnd = operation.selEnd;\n\t}\n\toperation.newSelStart = operation.selStart + operation.replacement.length;\n\toperation.newSelEnd = operation.newSelStart;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/prefix-lines.js": {
"title": "$:/core/modules/editor/operations/text/prefix-lines.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/prefix-lines.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to add a prefix to the selected lines\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"prefix-lines\"] = function(event,operation) {\n\t// Cut just past the preceding line break, or the start of the text\n\toperation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);\n\t// Cut to just past the following line break, or to the end of the text\n\toperation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);\n\t// Compose the required prefix\n\tvar prefix = $tw.utils.repeat(event.paramObject.character,event.paramObject.count);\n\t// Process each line\n\tvar lines = operation.text.substring(operation.cutStart,operation.cutEnd).split(/\\r?\\n/mg);\n\t$tw.utils.each(lines,function(line,index) {\n\t\t// Remove and count any existing prefix characters\n\t\tvar count = 0;\n\t\twhile(line.charAt(0) === event.paramObject.character) {\n\t\t\tline = line.substring(1);\n\t\t\tcount++;\n\t\t}\n\t\t// Remove any whitespace\n\t\twhile(line.charAt(0) === \" \") {\n\t\t\tline = line.substring(1);\n\t\t}\n\t\t// We're done if we removed the exact required prefix, otherwise add it\n\t\tif(count !== event.paramObject.count) {\n\t\t\t// Apply the prefix\n\t\t\tline = prefix + \" \" + line;\n\t\t}\n\t\t// Save the modified line\n\t\tlines[index] = line;\n\t});\n\t// Stitch the replacement text together and set the selection\n\toperation.replacement = lines.join(\"\\n\");\n\tif(lines.length === 1) {\n\t\toperation.newSelStart = operation.cutStart + operation.replacement.length;\n\t\toperation.newSelEnd = operation.newSelStart;\n\t} else {\n\t\toperation.newSelStart = operation.cutStart;\n\t\toperation.newSelEnd = operation.newSelStart + operation.replacement.length;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/replace-all.js": {
"title": "$:/core/modules/editor/operations/text/replace-all.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/replace-all.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to replace the entire text\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"replace-all\"] = function(event,operation) {\n\toperation.cutStart = 0;\n\toperation.cutEnd = operation.text.length;\n\toperation.replacement = event.paramObject.text;\n\toperation.newSelStart = 0;\n\toperation.newSelEnd = operation.replacement.length;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/replace-selection.js": {
"title": "$:/core/modules/editor/operations/text/replace-selection.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/replace-selection.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to replace the selection\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"replace-selection\"] = function(event,operation) {\n\toperation.replacement = event.paramObject.text;\n\toperation.cutStart = operation.selStart;\n\toperation.cutEnd = operation.selEnd;\n\toperation.newSelStart = operation.selStart;\n\toperation.newSelEnd = operation.selStart + operation.replacement.length;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/wrap-lines.js": {
"title": "$:/core/modules/editor/operations/text/wrap-lines.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/wrap-lines.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to wrap the selected lines with a prefix and suffix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"wrap-lines\"] = function(event,operation) {\n\t// Cut just past the preceding line break, or the start of the text\n\toperation.cutStart = $tw.utils.findPrecedingLineBreak(operation.text,operation.selStart);\n\t// Cut to just past the following line break, or to the end of the text\n\toperation.cutEnd = $tw.utils.findFollowingLineBreak(operation.text,operation.selEnd);\n\t// Add the prefix and suffix\n\toperation.replacement = event.paramObject.prefix + \"\\n\" +\n\t\t\t\toperation.text.substring(operation.cutStart,operation.cutEnd) + \"\\n\" +\n\t\t\t\tevent.paramObject.suffix + \"\\n\";\n\toperation.newSelStart = operation.cutStart + event.paramObject.prefix.length + 1;\n\toperation.newSelEnd = operation.newSelStart + (operation.cutEnd - operation.cutStart);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/editor/operations/text/wrap-selection.js": {
"title": "$:/core/modules/editor/operations/text/wrap-selection.js",
"text": "/*\\\ntitle: $:/core/modules/editor/operations/text/wrap-selection.js\ntype: application/javascript\nmodule-type: texteditoroperation\n\nText editor operation to wrap the selection with the specified prefix and suffix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports[\"wrap-selection\"] = function(event,operation) {\n\tif(operation.selStart === operation.selEnd) {\n\t\t// No selection; check if we're within the prefix/suffix\n\t\tif(operation.text.substring(operation.selStart - event.paramObject.prefix.length,operation.selStart + event.paramObject.suffix.length) === event.paramObject.prefix + event.paramObject.suffix) {\n\t\t\t// Remove the prefix and suffix unless they comprise the entire text\n\t\t\tif(operation.selStart > event.paramObject.prefix.length || (operation.selEnd + event.paramObject.suffix.length) < operation.text.length ) {\n\t\t\t\toperation.cutStart = operation.selStart - event.paramObject.prefix.length;\n\t\t\t\toperation.cutEnd = operation.selEnd + event.paramObject.suffix.length;\n\t\t\t\toperation.replacement = \"\";\n\t\t\t\toperation.newSelStart = operation.cutStart;\n\t\t\t\toperation.newSelEnd = operation.newSelStart;\n\t\t\t}\n\t\t} else {\n\t\t\t// Wrap the cursor instead\n\t\t\toperation.cutStart = operation.selStart;\n\t\t\toperation.cutEnd = operation.selEnd;\n\t\t\toperation.replacement = event.paramObject.prefix + event.paramObject.suffix;\n\t\t\toperation.newSelStart = operation.selStart + event.paramObject.prefix.length;\n\t\t\toperation.newSelEnd = operation.newSelStart;\n\t\t}\n\t} else if(operation.text.substring(operation.selStart,operation.selStart + event.paramObject.prefix.length) === event.paramObject.prefix && operation.text.substring(operation.selEnd - event.paramObject.suffix.length,operation.selEnd) === event.paramObject.suffix) {\n\t\t// Prefix and suffix are already present, so remove them\n\t\toperation.cutStart = operation.selStart;\n\t\toperation.cutEnd = operation.selEnd;\n\t\toperation.replacement = operation.selection.substring(event.paramObject.prefix.length,operation.selection.length - event.paramObject.suffix.length);\n\t\toperation.newSelStart = operation.selStart;\n\t\toperation.newSelEnd = operation.selStart + operation.replacement.length;\n\t} else {\n\t\t// Add the prefix and suffix\n\t\toperation.cutStart = operation.selStart;\n\t\toperation.cutEnd = operation.selEnd;\n\t\toperation.replacement = event.paramObject.prefix + operation.selection + event.paramObject.suffix;\n\t\toperation.newSelStart = operation.selStart;\n\t\toperation.newSelEnd = operation.selStart + operation.replacement.length;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "texteditoroperation"
},
"$:/core/modules/filters/addprefix.js": {
"title": "$:/core/modules/filters/addprefix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/addprefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for adding a prefix to each title in the list. This is\nespecially useful in contexts where only a filter expression is allowed\nand macro substitution isn't available.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.addprefix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(operator.operand + title);\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/addsuffix.js": {
"title": "$:/core/modules/filters/addsuffix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/addsuffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for adding a suffix to each title in the list. This is\nespecially useful in contexts where only a filter expression is allowed\nand macro substitution isn't available.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.addsuffix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title + operator.operand);\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/after.js": {
"title": "$:/core/modules/filters/after.js",
"text": "/*\\\ntitle: $:/core/modules/filters/after.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is after the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.after = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index === -1 || index > (results.length - 2)) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index + 1]];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/all/current.js": {
"title": "$:/core/modules/filters/all/current.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/current.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar currTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\n\tif(currTiddlerTitle) {\n\t\treturn [currTiddlerTitle];\n\t} else {\n\t\treturn [];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/missing.js": {
"title": "$:/core/modules/filters/all/missing.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/missing.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\treturn options.wiki.getMissingTitles();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/orphans.js": {
"title": "$:/core/modules/filters/all/orphans.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/orphans.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[orphans]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.orphans = function(source,prefix,options) {\n\treturn options.wiki.getOrphanTitles();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/shadows.js": {
"title": "$:/core/modules/filters/all/shadows.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/shadows.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[shadows]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadows = function(source,prefix,options) {\n\treturn options.wiki.allShadowTitles();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/tags.js": {
"title": "$:/core/modules/filters/all/tags.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/tags.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[tags]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tags = function(source,prefix,options) {\n\treturn Object.keys(options.wiki.getTagMap());\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all/tiddlers.js": {
"title": "$:/core/modules/filters/all/tiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all/tiddlers.js\ntype: application/javascript\nmodule-type: allfilteroperator\n\nFilter function for [all[tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tiddlers = function(source,prefix,options) {\n\treturn options.wiki.allTitles();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "allfilteroperator"
},
"$:/core/modules/filters/all.js": {
"title": "$:/core/modules/filters/all.js",
"text": "/*\\\ntitle: $:/core/modules/filters/all.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for selecting tiddlers\n\n[all[shadows+tiddlers]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar allFilterOperators;\n\nfunction getAllFilterOperators() {\n\tif(!allFilterOperators) {\n\t\tallFilterOperators = {};\n\t\t$tw.modules.applyMethods(\"allfilteroperator\",allFilterOperators);\n\t}\n\treturn allFilterOperators;\n}\n\n/*\nExport our filter function\n*/\nexports.all = function(source,operator,options) {\n\t// Get our suboperators\n\tvar allFilterOperators = getAllFilterOperators();\n\t// Cycle through the suboperators accumulating their results\n\tvar results = [],\n\t\tsubops = operator.operand.split(\"+\");\n\t// Check for common optimisations\n\tif(subops.length === 1 && subops[0] === \"\") {\n\t\treturn source;\n\t} else if(subops.length === 1 && subops[0] === \"tiddlers\") {\n\t\treturn options.wiki.each;\n\t} else if(subops.length === 1 && subops[0] === \"shadows\") {\n\t\treturn options.wiki.eachShadow;\n\t} else if(subops.length === 2 && subops[0] === \"tiddlers\" && subops[1] === \"shadows\") {\n\t\treturn options.wiki.eachTiddlerPlusShadows;\n\t} else if(subops.length === 2 && subops[0] === \"shadows\" && subops[1] === \"tiddlers\") {\n\t\treturn options.wiki.eachShadowPlusTiddlers;\n\t}\n\t// Do it the hard way\n\tfor(var t=0; t<subops.length; t++) {\n\t\tvar subop = allFilterOperators[subops[t]];\n\t\tif(subop) {\n\t\t\t$tw.utils.pushTop(results,subop(source,operator.prefix,options));\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/backlinks.js": {
"title": "$:/core/modules/filters/backlinks.js",
"text": "/*\\\ntitle: $:/core/modules/filters/backlinks.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the backlinks from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.backlinks = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerBacklinks(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/before.js": {
"title": "$:/core/modules/filters/before.js",
"text": "/*\\\ntitle: $:/core/modules/filters/before.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler from the current list that is before the tiddler named in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.before = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar index = results.indexOf(operator.operand);\n\tif(index <= 0) {\n\t\treturn [];\n\t} else {\n\t\treturn [results[index - 1]];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/commands.js": {
"title": "$:/core/modules/filters/commands.js",
"text": "/*\\\ntitle: $:/core/modules/filters/commands.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the commands available in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.commands = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.commands,function(commandInfo,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/count.js": {
"title": "$:/core/modules/filters/count.js",
"text": "/*\\\ntitle: $:/core/modules/filters/count.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the number of entries in the current list.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.count = function(source,operator,options) {\n\tvar count = 0;\n\tsource(function(tiddler,title) {\n\t\tcount++;\n\t});\n\treturn [count + \"\"];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/days.js": {
"title": "$:/core/modules/filters/days.js",
"text": "/*\\\ntitle: $:/core/modules/filters/days.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects tiddlers with a specified date field within a specified date interval.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.days = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldName = operator.suffix || \"modified\",\n\t\tdayInterval = (parseInt(operator.operand,10)||0),\n\t\tdayIntervalSign = $tw.utils.sign(dayInterval),\n\t\ttargetTimeStamp = (new Date()).setHours(0,0,0,0) + 1000*60*60*24*dayInterval,\n\t\tisWithinDays = function(dateField) {\n\t\t\tvar sign = $tw.utils.sign(targetTimeStamp - (new Date(dateField)).setHours(0,0,0,0));\n\t\t\treturn sign === 0 || sign === dayIntervalSign;\n\t\t};\n\n\tif(operator.prefix === \"!\") {\n\t\ttargetTimeStamp = targetTimeStamp - 1000*60*60*24*dayIntervalSign;\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\t\tif(!isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\t\tif(isWithinDays($tw.utils.parseDate(tiddler.fields[fieldName]))) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/each.js": {
"title": "$:/core/modules/filters/each.js",
"text": "/*\\\ntitle: $:/core/modules/filters/each.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique value of the specified field.\nWith suffix \"list\", selects all tiddlers that are values in a specified list field.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.each = function(source,operator,options) {\n\tvar results =[] ,\n\t\tvalue,values = {},\n\t\tfield = operator.operand || \"title\";\n\tif(operator.suffix !== \"list-item\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\tvalue = (field === \"title\") ? title : tiddler.getFieldString(field);\n\t\t\t\tif(!$tw.utils.hop(values,value)) {\n\t\t\t\t\tvalues[value] = true;\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\t$tw.utils.each(\n\t\t\t\t\toptions.wiki.getTiddlerList(title,field),\n\t\t\t\t\tfunction(value) {\n\t\t\t\t\t\tif(!$tw.utils.hop(values,value)) {\n\t\t\t\t\t\t\tvalues[value] = true;\n\t\t\t\t\t\t\tresults.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/eachday.js": {
"title": "$:/core/modules/filters/eachday.js",
"text": "/*\\\ntitle: $:/core/modules/filters/eachday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects one tiddler for each unique day covered by the specified date field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.eachday = function(source,operator,options) {\n\tvar results = [],\n\t\tvalues = [],\n\t\tfieldName = operator.operand || \"modified\";\n\t// Function to convert a date/time to a date integer\n\tvar toDate = function(value) {\n\t\tvalue = (new Date(value)).setHours(0,0,0,0);\n\t\treturn value+0;\n\t};\n\tsource(function(tiddler,title) {\n\t\tif(tiddler && tiddler.fields[fieldName]) {\n\t\t\tvar value = toDate($tw.utils.parseDate(tiddler.fields[fieldName]));\n\t\t\tif(values.indexOf(value) === -1) {\n\t\t\t\tvalues.push(value);\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editiondescription.js": {
"title": "$:/core/modules/filters/editiondescription.js",
"text": "/*\\\ntitle: $:/core/modules/filters/editiondescription.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the descriptions of the specified edition names\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.editiondescription = function(source,operator,options) {\n\tvar results = [],\n\t\teditionInfo = $tw.utils.getEditionInfo();\n\tif(editionInfo) {\n\t\tsource(function(tiddler,title) {\n\t\t\tif($tw.utils.hop(editionInfo,title)) {\n\t\t\t\tresults.push(editionInfo[title].description || \"\");\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/editions.js": {
"title": "$:/core/modules/filters/editions.js",
"text": "/*\\\ntitle: $:/core/modules/filters/editions.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the available editions in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.editions = function(source,operator,options) {\n\tvar results = [],\n\t\teditionInfo = $tw.utils.getEditionInfo();\n\tif(editionInfo) {\n\t\t$tw.utils.each(editionInfo,function(info,name) {\n\t\t\tresults.push(name);\n\t\t});\n\t}\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/decodeuricomponent.js": {
"title": "$:/core/modules/filters/decodeuricomponent.js",
"text": "/*\\\ntitle: $:/core/modules/filters/decodeuricomponent.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for applying decodeURIComponent() to each item.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter functions\n*/\n\nexports.decodeuricomponent = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(decodeURIComponent(title));\n\t});\n\treturn results;\n};\n\nexports.encodeuricomponent = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(encodeURIComponent(title));\n\t});\n\treturn results;\n};\n\nexports.decodeuri = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(decodeURI(title));\n\t});\n\treturn results;\n};\n\nexports.encodeuri = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(encodeURI(title));\n\t});\n\treturn results;\n};\n\nexports.decodehtml = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push($tw.utils.htmlDecode(title));\n\t});\n\treturn results;\n};\n\nexports.encodehtml = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push($tw.utils.htmlEncode(title));\n\t});\n\treturn results;\n};\n\nexports.stringify = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push($tw.utils.stringify(title));\n\t});\n\treturn results;\n};\n\nexports.jsonstringify = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push($tw.utils.jsonStringify(title));\n\t});\n\treturn results;\n};\n\nexports.escaperegexp = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push($tw.utils.escapeRegExp(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/enlist.js": {
"title": "$:/core/modules/filters/enlist.js",
"text": "/*\\\ntitle: $:/core/modules/filters/enlist.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning its operand parsed as a list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.enlist = function(source,operator,options) {\n\tvar list = $tw.utils.parseStringArray(operator.operand);\n\tif(operator.prefix === \"!\") {\n\t\tvar results = [];\n\t\tsource(function(tiddler,title) {\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t\treturn results;\n\t} else {\n\t\treturn list;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/field.js": {
"title": "$:/core/modules/filters/field.js",
"text": "/*\\\ntitle: $:/core/modules/filters/field.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.field = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldname = (operator.suffix || operator.operator || \"title\").toLowerCase();\n\tif(operator.prefix === \"!\") {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && !operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && text !== operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t} else {\n\t\tif(operator.regexp) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && !!operator.regexp.exec(text)) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler) {\n\t\t\t\t\tvar text = tiddler.getFieldString(fieldname);\n\t\t\t\t\tif(text !== null && text === operator.operand) {\n\t\t\t\t\t\tresults.push(title);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/fields.js": {
"title": "$:/core/modules/filters/fields.js",
"text": "/*\\\ntitle: $:/core/modules/filters/fields.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the fields on the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.fields = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tfor(var fieldName in tiddler.fields) {\n\t\t\t\t$tw.utils.pushTop(results,fieldName);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/get.js": {
"title": "$:/core/modules/filters/get.js",
"text": "/*\\\ntitle: $:/core/modules/filters/get.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for replacing tiddler titles by the value of the field specified in the operand.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.get = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tvar value = tiddler.getFieldString(operator.operand);\n\t\t\tif(value) {\n\t\t\t\tresults.push(value);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/getindex.js": {
"title": "$:/core/modules/filters/getindex.js",
"text": "/*\\\ntitle: $:/core/modules/filters/getindex.js\ntype: application/javascript\nmodule-type: filteroperator\n\nreturns the value at a given index of datatiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.getindex = function(source,operator,options) {\n\tvar data,title,results = [];\n\tif(operator.operand){\n\t\tsource(function(tiddler,title) {\n\t\t\ttitle = tiddler ? tiddler.fields.title : title;\n\t\t\tdata = options.wiki.extractTiddlerDataItem(tiddler,operator.operand);\n\t\t\tif(data) {\n\t\t\t\tresults.push(data);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/has.js": {
"title": "$:/core/modules/filters/has.js",
"text": "/*\\\ntitle: $:/core/modules/filters/has.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a tiddler has the specified field\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.has = function(source,operator,options) {\n\tvar results = [],\n\t\tinvert = operator.prefix === \"!\";\n\n\tif(operator.suffix === \"field\") {\n\t\tif(invert) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand)))) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler && $tw.utils.hop(tiddler.fields,operator.operand)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t} else {\n\t\tif(invert) {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(!tiddler || !$tw.utils.hop(tiddler.fields,operator.operand) || (tiddler.fields[operator.operand] === \"\")) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && !(tiddler.fields[operator.operand] === \"\" || tiddler.fields[operator.operand].length === 0)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/haschanged.js": {
"title": "$:/core/modules/filters/haschanged.js",
"text": "/*\\\ntitle: $:/core/modules/filters/haschanged.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returns tiddlers from the list that have a non-zero changecount.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.haschanged = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.getChangeCount(title) === 0) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.getChangeCount(title) > 0) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/indexes.js": {
"title": "$:/core/modules/filters/indexes.js",
"text": "/*\\\ntitle: $:/core/modules/filters/indexes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the indexes of a data tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.indexes = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar data = options.wiki.getTiddlerDataCached(title);\n\t\tif(data) {\n\t\t\t$tw.utils.pushTop(results,Object.keys(data));\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/insertbefore.js": {
"title": "$:/core/modules/filters/insertbefore.js",
"text": "/*\\\ntitle: $:/core/modules/filters/insertbefore.js\ntype: application/javascript\nmodule-type: filteroperator\n\nInsert an item before another item in a list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nOrder a list\n*/\nexports.insertbefore = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\tvar target = options.widget && options.widget.getVariable(operator.suffix || \"currentTiddler\");\n\tif(target !== operator.operand) {\n\t\t// Remove the entry from the list if it is present\n\t\tvar pos = results.indexOf(operator.operand);\n\t\tif(pos !== -1) {\n\t\t\tresults.splice(pos,1);\n\t\t}\n\t\t// Insert the entry before the target marker\n\t\tpos = results.indexOf(target);\n\t\tif(pos !== -1) {\n\t\t\tresults.splice(pos,0,operator.operand);\n\t\t} else {\n\t\t\tresults.push(operator.operand);\n\t\t}\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/is/current.js": {
"title": "$:/core/modules/filters/is/current.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/current.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[current]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.current = function(source,prefix,options) {\n\tvar results = [],\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\");\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title !== currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title === currTiddlerTitle) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/image.js": {
"title": "$:/core/modules/filters/is/image.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/image.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[image]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.image = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isImageTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/missing.js": {
"title": "$:/core/modules/filters/is/missing.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/missing.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[missing]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.missing = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/orphan.js": {
"title": "$:/core/modules/filters/is/orphan.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/orphan.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[orphan]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.orphan = function(source,prefix,options) {\n\tvar results = [],\n\t\torphanTitles = options.wiki.getOrphanTitles();\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(orphanTitles.indexOf(title) !== -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/shadow.js": {
"title": "$:/core/modules/filters/is/shadow.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/shadow.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[shadow]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadow = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isShadowTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/system.js": {
"title": "$:/core/modules/filters/is/system.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/system.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[system]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.system = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.isSystemTiddler(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tag.js": {
"title": "$:/core/modules/filters/is/tag.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/tag.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tag]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,prefix,options) {\n\tvar results = [],\n\t\ttagMap = options.wiki.getTagMap();\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!$tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif($tw.utils.hop(tagMap,title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is/tiddler.js": {
"title": "$:/core/modules/filters/is/tiddler.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is/tiddler.js\ntype: application/javascript\nmodule-type: isfilteroperator\n\nFilter function for [is[tiddler]]\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tiddler = function(source,prefix,options) {\n\tvar results = [];\n\tif(prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(options.wiki.tiddlerExists(title)) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "isfilteroperator"
},
"$:/core/modules/filters/is.js": {
"title": "$:/core/modules/filters/is.js",
"text": "/*\\\ntitle: $:/core/modules/filters/is.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking tiddler properties\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar isFilterOperators;\n\nfunction getIsFilterOperators() {\n\tif(!isFilterOperators) {\n\t\tisFilterOperators = {};\n\t\t$tw.modules.applyMethods(\"isfilteroperator\",isFilterOperators);\n\t}\n\treturn isFilterOperators;\n}\n\n/*\nExport our filter function\n*/\nexports.is = function(source,operator,options) {\n\t// Dispatch to the correct isfilteroperator\n\tvar isFilterOperators = getIsFilterOperators();\n\tif(operator.operand) {\n\t\tvar isFilterOperator = isFilterOperators[operator.operand];\n\t\tif(isFilterOperator) {\n\t\t\treturn isFilterOperator(source,operator.prefix,options);\n\t\t} else {\n\t\t\treturn [$tw.language.getString(\"Error/IsFilterOperator\")];\n\t\t}\n\t} else {\n\t\t// Return all tiddlers if the operand is missing\n\t\tvar results = [];\n\t\tsource(function(tiddler,title) {\n\t\t\tresults.push(title);\n\t\t});\n\t\treturn results;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/limit.js": {
"title": "$:/core/modules/filters/limit.js",
"text": "/*\\\ntitle: $:/core/modules/filters/limit.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for chopping the results to a specified maximum number of entries\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.limit = function(source,operator,options) {\n\tvar results = [];\n\t// Convert to an array\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\t// Slice the array if necessary\n\tvar limit = Math.min(results.length,parseInt(operator.operand,10));\n\tif(operator.prefix === \"!\") {\n\t\tresults = results.slice(-limit);\n\t} else {\n\t\tresults = results.slice(0,limit);\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/links.js": {
"title": "$:/core/modules/filters/links.js",
"text": "/*\\\ntitle: $:/core/modules/filters/links.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning all the links from a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.links = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlerLinks(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/list.js": {
"title": "$:/core/modules/filters/list.js",
"text": "/*\\\ntitle: $:/core/modules/filters/list.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddlers whose title is listed in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.list = function(source,operator,options) {\n\tvar results = [],\n\t\ttr = $tw.utils.parseTextReference(operator.operand),\n\t\tcurrTiddlerTitle = options.widget && options.widget.getVariable(\"currentTiddler\"),\n\t\tlist = options.wiki.getTiddlerList(tr.title || currTiddlerTitle,tr.field,tr.index);\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults = list;\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listed.js": {
"title": "$:/core/modules/filters/listed.js",
"text": "/*\\\ntitle: $:/core/modules/filters/listed.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that have the selected tiddlers in a list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.listed = function(source,operator,options) {\n\tvar field = operator.operand || \"list\",\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.findListingsOfTiddler(title,field));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/listops.js": {
"title": "$:/core/modules/filters/listops.js",
"text": "/*\\\ntitle: $:/core/modules/filters/listops.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operators for manipulating the current selection list\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nOrder a list\n*/\nexports.order = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.operand.toLowerCase() === \"reverse\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tresults.unshift(title);\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tresults.push(title);\n\t\t});\t\t\n\t}\n\treturn results;\n};\n\n/*\nReverse list\n*/\nexports.reverse = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.unshift(title);\n\t});\n\treturn results;\n};\n\n/*\nFirst entry/entries in list\n*/\nexports.first = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,count);\n};\n\n/*\nLast entry/entries in list\n*/\nexports.last = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(-count);\n};\n\n/*\nAll but the first entry/entries of the list\n*/\nexports.rest = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count);\n};\nexports.butfirst = exports.rest;\nexports.bf = exports.rest;\n\n/*\nAll but the last entry/entries of the list\n*/\nexports.butlast = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(0,-count);\n};\nexports.bl = exports.butlast;\n\n/*\nThe nth member of the list\n*/\nexports.nth = function(source,operator,options) {\n\tvar count = parseInt(operator.operand) || 1,\n\t\tresults = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results.slice(count - 1,count);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/lookup.js": {
"title": "$:/core/modules/filters/lookup.js",
"text": "/*\\\ntitle: $:/core/modules/filters/lookup.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that looks up values via a title prefix\n\n[lookup:<field>[<prefix>]]\n\nPrepends the prefix to the selected items and returns the specified field value\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.lookup = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(options.wiki.getTiddlerText(operator.operand + title) || options.wiki.getTiddlerText(operator.operand + operator.suffix));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/minlength.js": {
"title": "$:/core/modules/filters/minlength.js",
"text": "/*\\\ntitle: $:/core/modules/filters/minlength.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for filtering out titles that don't meet the minimum length in the operand\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.minlength = function(source,operator,options) {\n\tvar results = [],\n\t\tminLength = parseInt(operator.operand || \"\",10) || 0;\n\tsource(function(tiddler,title) {\n\t\tif(title.length >= minLength) {\n\t\t\tresults.push(title);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/modules.js": {
"title": "$:/core/modules/filters/modules.js",
"text": "/*\\\ntitle: $:/core/modules/filters/modules.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the modules of a given type in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.modules = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.each($tw.modules.types[title],function(moduleInfo,moduleName) {\n\t\t\tresults.push(moduleName);\n\t\t});\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/moduletypes.js": {
"title": "$:/core/modules/filters/moduletypes.js",
"text": "/*\\\ntitle: $:/core/modules/filters/moduletypes.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the module types in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.moduletypes = function(source,operator,options) {\n\tvar results = [];\n\t$tw.utils.each($tw.modules.types,function(moduleInfo,type) {\n\t\tresults.push(type);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/next.js": {
"title": "$:/core/modules/filters/next.js",
"text": "/*\\\ntitle: $:/core/modules/filters/next.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs next in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.next = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch++;\n\t\tif(match > 0 && match < list.length) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/plugintiddlers.js": {
"title": "$:/core/modules/filters/plugintiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/filters/plugintiddlers.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the titles of the shadow tiddlers within a plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.plugintiddlers = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerDataCached(title,{tiddlers:[]});\n\t\tif(pluginInfo && pluginInfo.tiddlers) {\n\t\t\t$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {\n\t\t\t\tresults.push(title);\n\t\t\t});\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/prefix.js": {
"title": "$:/core/modules/filters/prefix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/prefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a title starts with a prefix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.prefix = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length) !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/previous.js": {
"title": "$:/core/modules/filters/previous.js",
"text": "/*\\\ntitle: $:/core/modules/filters/previous.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning the tiddler whose title occurs immediately prior in the list supplied in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.previous = function(source,operator,options) {\n\tvar results = [],\n\t\tlist = options.wiki.getTiddlerList(operator.operand);\n\tsource(function(tiddler,title) {\n\t\tvar match = list.indexOf(title);\n\t\t// increment match and then test if result is in range\n\t\tmatch--;\n\t\tif(match >= 0) {\n\t\t\tresults.push(list[match]);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/regexp.js": {
"title": "$:/core/modules/filters/regexp.js",
"text": "/*\\\ntitle: $:/core/modules/filters/regexp.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for regexp matching\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.regexp = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldname = (operator.suffix || \"title\").toLowerCase(),\n\t\tregexpString, regexp, flags = \"\", match,\n\t\tgetFieldString = function(tiddler,title) {\n\t\t\tif(tiddler) {\n\t\t\t\treturn tiddler.getFieldString(fieldname);\n\t\t\t} else if(fieldname === \"title\") {\n\t\t\t\treturn title;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t};\n\t// Process flags and construct regexp\n\tregexpString = operator.operand;\n\tmatch = /^\\(\\?([gim]+)\\)/.exec(regexpString);\n\tif(match) {\n\t\tflags = match[1];\n\t\tregexpString = regexpString.substr(match[0].length);\n\t} else {\n\t\tmatch = /\\(\\?([gim]+)\\)$/.exec(regexpString);\n\t\tif(match) {\n\t\t\tflags = match[1];\n\t\t\tregexpString = regexpString.substr(0,regexpString.length - match[0].length);\n\t\t}\n\t}\n\ttry {\n\t\tregexp = new RegExp(regexpString,flags);\n\t} catch(e) {\n\t\treturn [\"\" + e];\n\t}\n\t// Process the incoming tiddlers\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tvar text = getFieldString(tiddler,title);\n\t\t\tif(text !== null) {\n\t\t\t\tif(!regexp.exec(text)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tvar text = getFieldString(tiddler,title);\n\t\t\tif(text !== null) {\n\t\t\t\tif(!!regexp.exec(text)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removeprefix.js": {
"title": "$:/core/modules/filters/removeprefix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/removeprefix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for removing a prefix from each title in the list. Titles that do not start with the prefix are removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.removeprefix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(title.substr(0,operator.operand.length) === operator.operand) {\n\t\t\tresults.push(title.substr(operator.operand.length));\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/removesuffix.js": {
"title": "$:/core/modules/filters/removesuffix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/removesuffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for removing a suffix from each title in the list. Titles that do not end with the suffix are removed.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.removesuffix = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tif(title.substr(-operator.operand.length) === operator.operand) {\n\t\t\tresults.push(title.substr(0,title.length - operator.operand.length));\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sameday.js": {
"title": "$:/core/modules/filters/sameday.js",
"text": "/*\\\ntitle: $:/core/modules/filters/sameday.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that selects tiddlers with a modified date field on the same day as the provided value.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.sameday = function(source,operator,options) {\n\tvar results = [],\n\t\tfieldName = operator.suffix || \"modified\",\n\t\ttargetDate = (new Date($tw.utils.parseDate(operator.operand))).setHours(0,0,0,0);\n\t// Function to convert a date/time to a date integer\n\tsource(function(tiddler,title) {\n\t\tif(tiddler) {\n\t\t\tif(tiddler.getFieldDay(fieldName) === targetDate) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/search.js": {
"title": "$:/core/modules/filters/search.js",
"text": "/*\\\ntitle: $:/core/modules/filters/search.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for searching for the text in the operand tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.search = function(source,operator,options) {\n\tvar invert = operator.prefix === \"!\";\n\tif(operator.suffix) {\n\t\treturn options.wiki.search(operator.operand,{\n\t\t\tsource: source,\n\t\t\tinvert: invert,\n\t\t\tfield: operator.suffix\n\t\t});\n\t} else {\n\t\treturn options.wiki.search(operator.operand,{\n\t\t\tsource: source,\n\t\t\tinvert: invert\n\t\t});\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/shadowsource.js": {
"title": "$:/core/modules/filters/shadowsource.js",
"text": "/*\\\ntitle: $:/core/modules/filters/shadowsource.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the source plugins for shadow tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.shadowsource = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar source = options.wiki.getShadowSource(title);\n\t\tif(source) {\n\t\t\t$tw.utils.pushTop(results,source);\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/sort.js": {
"title": "$:/core/modules/filters/sort.js",
"text": "/*\\\ntitle: $:/core/modules/filters/sort.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for sorting\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.sort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,false);\n\treturn results;\n};\n\nexports.nsort = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",false,true);\n\treturn results;\n};\n\nexports.sortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,false);\n\treturn results;\n};\n\nexports.nsortcs = function(source,operator,options) {\n\tvar results = prepare_results(source);\n\toptions.wiki.sortTiddlers(results,operator.operand || \"title\",operator.prefix === \"!\",true,true);\n\treturn results;\n};\n\nvar prepare_results = function (source) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tresults.push(title);\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/splitbefore.js": {
"title": "$:/core/modules/filters/splitbefore.js",
"text": "/*\\\ntitle: $:/core/modules/filters/splitbefore.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator that splits each result on the first occurance of the specified separator and returns the unique values.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.splitbefore = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\tvar parts = title.split(operator.operand);\n\t\tif(parts.length === 1) {\n\t\t\t$tw.utils.pushTop(results,parts[0]);\n\t\t} else {\n\t\t\t$tw.utils.pushTop(results,parts[0] + operator.operand);\n\t\t}\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/storyviews.js": {
"title": "$:/core/modules/filters/storyviews.js",
"text": "/*\\\ntitle: $:/core/modules/filters/storyviews.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the story views in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.storyviews = function(source,operator,options) {\n\tvar results = [],\n\t\tstoryviews = {};\n\t$tw.modules.applyMethods(\"storyview\",storyviews);\n\t$tw.utils.each(storyviews,function(info,name) {\n\t\tresults.push(name);\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/suffix.js": {
"title": "$:/core/modules/filters/suffix.js",
"text": "/*\\\ntitle: $:/core/modules/filters/suffix.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking if a title ends with a suffix\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.suffix = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(-operator.operand.length) !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(title.substr(-operator.operand.length) === operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tag.js": {
"title": "$:/core/modules/filters/tag.js",
"text": "/*\\\ntitle: $:/core/modules/filters/tag.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for checking for the presence of a tag\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tag = function(source,operator,options) {\n\tvar results = [];\n\tif((operator.suffix || \"\").toLowerCase() === \"strict\" && !operator.operand) {\n\t\t// New semantics:\n\t\t// Always return copy of input if operator.operand is missing\n\t\tsource(function(tiddler,title) {\n\t\t\tresults.push(title);\n\t\t});\n\t} else {\n\t\t// Old semantics:\n\t\tif(operator.prefix === \"!\") {\n\t\t\t// Returns a copy of the input if operator.operand is missing\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler && !tiddler.hasTag(operator.operand)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\t// Returns empty results if operator.operand is missing\n\t\t\tsource(function(tiddler,title) {\n\t\t\t\tif(tiddler && tiddler.hasTag(operator.operand)) {\n\t\t\t\t\tresults.push(title);\n\t\t\t\t}\n\t\t\t});\n\t\t\tresults = options.wiki.sortByList(results,operator.operand);\n\t\t}\t\t\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tagging.js": {
"title": "$:/core/modules/filters/tagging.js",
"text": "/*\\\ntitle: $:/core/modules/filters/tagging.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all tiddlers that are tagged with the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tagging = function(source,operator,options) {\n\tvar results = [];\n\tsource(function(tiddler,title) {\n\t\t$tw.utils.pushTop(results,options.wiki.getTiddlersWithTag(title));\n\t});\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/tags.js": {
"title": "$:/core/modules/filters/tags.js",
"text": "/*\\\ntitle: $:/core/modules/filters/tags.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the tags of the selected tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.tags = function(source,operator,options) {\n\tvar tags = {};\n\tsource(function(tiddler,title) {\n\t\tvar t, length;\n\t\tif(tiddler && tiddler.fields.tags) {\n\t\t\tfor(t=0, length=tiddler.fields.tags.length; t<length; t++) {\n\t\t\t\ttags[tiddler.fields.tags[t]] = true;\n\t\t\t}\n\t\t}\n\t});\n\treturn Object.keys(tags);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/title.js": {
"title": "$:/core/modules/filters/title.js",
"text": "/*\\\ntitle: $:/core/modules/filters/title.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for comparing title fields for equality\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.title = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && tiddler.fields.title !== operator.operand) {\n\t\t\t\tresults.push(title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tresults.push(operator.operand);\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/untagged.js": {
"title": "$:/core/modules/filters/untagged.js",
"text": "/*\\\ntitle: $:/core/modules/filters/untagged.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator returning all the selected tiddlers that are untagged\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.untagged = function(source,operator,options) {\n\tvar results = [];\n\tif(operator.prefix === \"!\") {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(tiddler && $tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length > 0) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tsource(function(tiddler,title) {\n\t\t\tif(!tiddler || !tiddler.hasField(\"tags\") || ($tw.utils.isArray(tiddler.fields.tags) && tiddler.fields.tags.length === 0)) {\n\t\t\t\t$tw.utils.pushTop(results,title);\n\t\t\t}\n\t\t});\n\t}\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/wikiparserrules.js": {
"title": "$:/core/modules/filters/wikiparserrules.js",
"text": "/*\\\ntitle: $:/core/modules/filters/wikiparserrules.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for returning the names of the wiki parser rules in this wiki\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.wikiparserrules = function(source,operator,options) {\n\tvar results = [],\n\t\toperand = operator.operand;\n\t$tw.utils.each($tw.modules.types.wikirule,function(mod) {\n\t\tvar exp = mod.exports;\n\t\tif(!operand || exp.types[operand]) {\n\t\t\tresults.push(exp.name);\n\t\t}\n\t});\n\tresults.sort();\n\treturn results;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters/x-listops.js": {
"title": "$:/core/modules/filters/x-listops.js",
"text": "/*\\\ntitle: $:/core/modules/filters/x-listops.js\ntype: application/javascript\nmodule-type: filteroperator\n\nExtended filter operators to manipulate the current list.\n\n\\*/\n(function () {\n\n /*jslint node: true, browser: true */\n /*global $tw: false */\n \"use strict\";\n\n /*\n Fetch titles from the current list\n */\n var prepare_results = function (source) {\n var results = [];\n source(function (tiddler, title) {\n results.push(title);\n });\n return results;\n };\n\n /*\n Moves a number of items from the tail of the current list before the item named in the operand\n */\n exports.putbefore = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -1) :\n results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index, -count));\n };\n\n /*\n Moves a number of items from the tail of the current list after the item named in the operand\n */\n exports.putafter = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -1) :\n results.slice(0, index + 1).concat(results.slice(-count)).concat(results.slice(index + 1, -count));\n };\n\n /*\n Replaces the item named in the operand with a number of items from the tail of the current list\n */\n exports.replace = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1;\n return (index === -1) ?\n results.slice(0, -count) :\n results.slice(0, index).concat(results.slice(-count)).concat(results.slice(index + 1, -count));\n };\n\n /*\n Moves a number of items from the tail of the current list to the head of the list\n */\n exports.putfirst = function (source, operator) {\n var results = prepare_results(source),\n count = parseInt(operator.suffix) || 1;\n return results.slice(-count).concat(results.slice(0, -count));\n };\n\n /*\n Moves a number of items from the head of the current list to the tail of the list\n */\n exports.putlast = function (source, operator) {\n var results = prepare_results(source),\n count = parseInt(operator.suffix) || 1;\n return results.slice(count).concat(results.slice(0, count));\n };\n\n /*\n Moves the item named in the operand a number of places forward or backward in the list\n */\n exports.move = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand),\n count = parseInt(operator.suffix) || 1,\n marker = results.splice(index, 1),\n offset = (index + count) > 0 ? index + count : 0;\n return results.slice(0, offset).concat(marker).concat(results.slice(offset));\n };\n\n /*\n Returns the items from the current list that are after the item named in the operand\n */\n exports.allafter = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand);\n return (index === -1 || index > (results.length - 2)) ? [] :\n (operator.suffix) ? results.slice(index) :\n results.slice(index + 1);\n };\n\n /*\n Returns the items from the current list that are before the item named in the operand\n */\n exports.allbefore = function (source, operator) {\n var results = prepare_results(source),\n index = results.indexOf(operator.operand);\n return (index < 0) ? [] :\n (operator.suffix) ? results.slice(0, index + 1) :\n results.slice(0, index);\n };\n\n /*\n Appends the items listed in the operand array to the tail of the current list\n */\n exports.append = function (source, operator) {\n var append = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || append.length;\n return (append.length === 0) ? results :\n (operator.prefix) ? results.concat(append.slice(-count)) :\n results.concat(append.slice(0, count));\n };\n\n /*\n Prepends the items listed in the operand array to the head of the current list\n */\n exports.prepend = function (source, operator) {\n var prepend = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || prepend.length;\n return (prepend.length === 0) ? results :\n (operator.prefix) ? prepend.slice(-count).concat(results) :\n prepend.slice(0, count).concat(results);\n };\n\n /*\n Returns all items from the current list except the items listed in the operand array\n */\n exports.remove = function (source, operator) {\n var array = $tw.utils.parseStringArray(operator.operand, \"true\"),\n results = prepare_results(source),\n count = parseInt(operator.suffix) || array.length,\n p,\n len,\n index;\n len = array.length - 1;\n for (p = 0; p < count; ++p) {\n if (operator.prefix) {\n index = results.indexOf(array[len - p]);\n } else {\n index = results.indexOf(array[p]);\n }\n if (index !== -1) {\n results.splice(index, 1);\n }\n }\n return results;\n };\n\n /*\n Returns all items from the current list sorted in the order of the items in the operand array\n */\n exports.sortby = function (source, operator) {\n var results = prepare_results(source);\n if (!results || results.length < 2) {\n return results;\n }\n var lookup = $tw.utils.parseStringArray(operator.operand, \"true\");\n results.sort(function (a, b) {\n return lookup.indexOf(a) - lookup.indexOf(b);\n });\n return results;\n };\n\n /*\n Removes all duplicate items from the current list\n */\n exports.unique = function (source, operator) {\n var results = prepare_results(source);\n var set = results.reduce(function (a, b) {\n if (a.indexOf(b) < 0) {\n a.push(b);\n }\n return a;\n }, []);\n return set;\n };\n})();\n",
"type": "application/javascript",
"module-type": "filteroperator"
},
"$:/core/modules/filters.js": {
"title": "$:/core/modules/filters.js",
"text": "/*\\\ntitle: $:/core/modules/filters.js\ntype: application/javascript\nmodule-type: wikimethod\n\nAdds tiddler filtering methods to the $tw.Wiki object.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nParses an operation (i.e. a run) within a filter string\n\toperators: Array of array of operator nodes into which results should be inserted\n\tfilterString: filter string\n\tp: start position within the string\nReturns the new start position, after the parsed operation\n*/\nfunction parseFilterOperation(operators,filterString,p) {\n\tvar nextBracketPos, operator;\n\t// Skip the starting square bracket\n\tif(filterString.charAt(p++) !== \"[\") {\n\t\tthrow \"Missing [ in filter expression\";\n\t}\n\t// Process each operator in turn\n\tdo {\n\t\toperator = {};\n\t\t// Check for an operator prefix\n\t\tif(filterString.charAt(p) === \"!\") {\n\t\t\toperator.prefix = filterString.charAt(p++);\n\t\t}\n\t\t// Get the operator name\n\t\tnextBracketPos = filterString.substring(p).search(/[\\[\\{<\\/]/);\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \"Missing [ in filter expression\";\n\t\t}\n\t\tnextBracketPos += p;\n\t\tvar bracket = filterString.charAt(nextBracketPos);\n\t\toperator.operator = filterString.substring(p,nextBracketPos);\n\n\t\t// Any suffix?\n\t\tvar colon = operator.operator.indexOf(':');\n\t\tif(colon > -1) {\n\t\t\toperator.suffix = operator.operator.substring(colon + 1);\n\t\t\toperator.operator = operator.operator.substring(0,colon) || \"field\";\n\t\t}\n\t\t// Empty operator means: title\n\t\telse if(operator.operator === \"\") {\n\t\t\toperator.operator = \"title\";\n\t\t}\n\n\t\tp = nextBracketPos + 1;\n\t\tswitch (bracket) {\n\t\t\tcase \"{\": // Curly brackets\n\t\t\t\toperator.indirect = true;\n\t\t\t\tnextBracketPos = filterString.indexOf(\"}\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"[\": // Square brackets\n\t\t\t\tnextBracketPos = filterString.indexOf(\"]\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"<\": // Angle brackets\n\t\t\t\toperator.variable = true;\n\t\t\t\tnextBracketPos = filterString.indexOf(\">\",p);\n\t\t\t\tbreak;\n\t\t\tcase \"/\": // regexp brackets\n\t\t\t\tvar rex = /^((?:[^\\\\\\/]*|\\\\.)*)\\/(?:\\(([mygi]+)\\))?/g,\n\t\t\t\t\trexMatch = rex.exec(filterString.substring(p));\n\t\t\t\tif(rexMatch) {\n\t\t\t\t\toperator.regexp = new RegExp(rexMatch[1], rexMatch[2]);\n// DEPRECATION WARNING\nconsole.log(\"WARNING: Filter\",operator.operator,\"has a deprecated regexp operand\",operator.regexp);\n\t\t\t\t\tnextBracketPos = p + rex.lastIndex - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow \"Unterminated regular expression in filter expression\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(nextBracketPos === -1) {\n\t\t\tthrow \"Missing closing bracket in filter expression\";\n\t\t}\n\t\tif(!operator.regexp) {\n\t\t\toperator.operand = filterString.substring(p,nextBracketPos);\n\t\t}\n\t\tp = nextBracketPos + 1;\n\n\t\t// Push this operator\n\t\toperators.push(operator);\n\t} while(filterString.charAt(p) !== \"]\");\n\t// Skip the ending square bracket\n\tif(filterString.charAt(p++) !== \"]\") {\n\t\tthrow \"Missing ] in filter expression\";\n\t}\n\t// Return the parsing position\n\treturn p;\n}\n\n/*\nParse a filter string\n*/\nexports.parseFilter = function(filterString) {\n\tfilterString = filterString || \"\";\n\tvar results = [], // Array of arrays of operator nodes {operator:,operand:}\n\t\tp = 0, // Current position in the filter string\n\t\tmatch;\n\tvar whitespaceRegExp = /(\\s+)/mg,\n\t\toperandRegExp = /((?:\\+|\\-)?)(?:(\\[)|(?:\"([^\"]*)\")|(?:'([^']*)')|([^\\s\\[\\]]+))/mg;\n\twhile(p < filterString.length) {\n\t\t// Skip any whitespace\n\t\twhitespaceRegExp.lastIndex = p;\n\t\tmatch = whitespaceRegExp.exec(filterString);\n\t\tif(match && match.index === p) {\n\t\t\tp = p + match[0].length;\n\t\t}\n\t\t// Match the start of the operation\n\t\tif(p < filterString.length) {\n\t\t\toperandRegExp.lastIndex = p;\n\t\t\tmatch = operandRegExp.exec(filterString);\n\t\t\tif(!match || match.index !== p) {\n\t\t\t\tthrow $tw.language.getString(\"Error/FilterSyntax\");\n\t\t\t}\n\t\t\tvar operation = {\n\t\t\t\tprefix: \"\",\n\t\t\t\toperators: []\n\t\t\t};\n\t\t\tif(match[1]) {\n\t\t\t\toperation.prefix = match[1];\n\t\t\t\tp++;\n\t\t\t}\n\t\t\tif(match[2]) { // Opening square bracket\n\t\t\t\tp = parseFilterOperation(operation.operators,filterString,p);\n\t\t\t} else {\n\t\t\t\tp = match.index + match[0].length;\n\t\t\t}\n\t\t\tif(match[3] || match[4] || match[5]) { // Double quoted string, single quoted string or unquoted title\n\t\t\t\toperation.operators.push(\n\t\t\t\t\t{operator: \"title\", operand: match[3] || match[4] || match[5]}\n\t\t\t\t);\n\t\t\t}\n\t\t\tresults.push(operation);\n\t\t}\n\t}\n\treturn results;\n};\n\nexports.getFilterOperators = function() {\n\tif(!this.filterOperators) {\n\t\t$tw.Wiki.prototype.filterOperators = {};\n\t\t$tw.modules.applyMethods(\"filteroperator\",this.filterOperators);\n\t}\n\treturn this.filterOperators;\n};\n\nexports.filterTiddlers = function(filterString,widget,source) {\n\tvar fn = this.compileFilter(filterString);\n\treturn fn.call(this,source,widget);\n};\n\n/*\nCompile a filter into a function with the signature fn(source,widget) where:\nsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\nwidget: an optional widget node for retrieving the current tiddler etc.\n*/\nexports.compileFilter = function(filterString) {\n\tvar filterParseTree;\n\ttry {\n\t\tfilterParseTree = this.parseFilter(filterString);\n\t} catch(e) {\n\t\treturn function(source,widget) {\n\t\t\treturn [$tw.language.getString(\"Error/Filter\") + \": \" + e];\n\t\t};\n\t}\n\t// Get the hashmap of filter operator functions\n\tvar filterOperators = this.getFilterOperators();\n\t// Assemble array of functions, one for each operation\n\tvar operationFunctions = [];\n\t// Step through the operations\n\tvar self = this;\n\t$tw.utils.each(filterParseTree,function(operation) {\n\t\t// Create a function for the chain of operators in the operation\n\t\tvar operationSubFunction = function(source,widget) {\n\t\t\tvar accumulator = source,\n\t\t\t\tresults = [],\n\t\t\t\tcurrTiddlerTitle = widget && widget.getVariable(\"currentTiddler\");\n\t\t\t$tw.utils.each(operation.operators,function(operator) {\n\t\t\t\tvar operand = operator.operand,\n\t\t\t\t\toperatorFunction;\n\t\t\t\tif(!operator.operator) {\n\t\t\t\t\toperatorFunction = filterOperators.title;\n\t\t\t\t} else if(!filterOperators[operator.operator]) {\n\t\t\t\t\toperatorFunction = filterOperators.field;\n\t\t\t\t} else {\n\t\t\t\t\toperatorFunction = filterOperators[operator.operator];\n\t\t\t\t}\n\t\t\t\tif(operator.indirect) {\n\t\t\t\t\toperand = self.getTextReference(operator.operand,\"\",currTiddlerTitle);\n\t\t\t\t}\n\t\t\t\tif(operator.variable) {\n\t\t\t\t\toperand = widget.getVariable(operator.operand,{defaultValue: \"\"});\n\t\t\t\t}\n\t\t\t\t// Invoke the appropriate filteroperator module\n\t\t\t\tresults = operatorFunction(accumulator,{\n\t\t\t\t\t\t\toperator: operator.operator,\n\t\t\t\t\t\t\toperand: operand,\n\t\t\t\t\t\t\tprefix: operator.prefix,\n\t\t\t\t\t\t\tsuffix: operator.suffix,\n\t\t\t\t\t\t\tregexp: operator.regexp\n\t\t\t\t\t\t},{\n\t\t\t\t\t\t\twiki: self,\n\t\t\t\t\t\t\twidget: widget\n\t\t\t\t\t\t});\n\t\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\t\taccumulator = self.makeTiddlerIterator(results);\n\t\t\t\t} else {\n\t\t\t\t\taccumulator = results;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif($tw.utils.isArray(results)) {\n\t\t\t\treturn results;\n\t\t\t} else {\n\t\t\t\tvar resultArray = [];\n\t\t\t\tresults(function(tiddler,title) {\n\t\t\t\t\tresultArray.push(title);\n\t\t\t\t});\n\t\t\t\treturn resultArray;\n\t\t\t}\n\t\t};\n\t\t// Wrap the operator functions in a wrapper function that depends on the prefix\n\t\toperationFunctions.push((function() {\n\t\t\tswitch(operation.prefix || \"\") {\n\t\t\t\tcase \"\": // No prefix means that the operation is unioned into the result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \"-\": // The results of this operation are removed from the main result\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t$tw.utils.removeArrayEntries(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t\tcase \"+\": // This operation is applied to the main results so far\n\t\t\t\t\treturn function(results,source,widget) {\n\t\t\t\t\t\t// This replaces all the elements of the array, but keeps the actual array so that references to it are preserved\n\t\t\t\t\t\tsource = self.makeTiddlerIterator(results);\n\t\t\t\t\t\tresults.splice(0,results.length);\n\t\t\t\t\t\t$tw.utils.pushTop(results,operationSubFunction(source,widget));\n\t\t\t\t\t};\n\t\t\t}\n\t\t})());\n\t});\n\t// Return a function that applies the operations to a source iterator of tiddler titles\n\treturn $tw.perf.measure(\"filter\",function filterFunction(source,widget) {\n\t\tif(!source) {\n\t\t\tsource = self.each;\n\t\t} else if(typeof source === \"object\") { // Array or hashmap\n\t\t\tsource = self.makeTiddlerIterator(source);\n\t\t}\n\t\tvar results = [];\n\t\t$tw.utils.each(operationFunctions,function(operationFunction) {\n\t\t\toperationFunction(results,source,widget);\n\t\t});\n\t\treturn results;\n\t});\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/core/modules/info/platform.js": {
"title": "$:/core/modules/info/platform.js",
"text": "/*\\\ntitle: $:/core/modules/info/platform.js\ntype: application/javascript\nmodule-type: info\n\nInitialise basic platform $:/info/ tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.getInfoTiddlerFields = function() {\n\tvar mapBoolean = function(value) {return value ? \"yes\" : \"no\";},\n\t\tinfoTiddlerFields = [];\n\t// Basics\n\tinfoTiddlerFields.push({title: \"$:/info/browser\", text: mapBoolean(!!$tw.browser)});\n\tinfoTiddlerFields.push({title: \"$:/info/node\", text: mapBoolean(!!$tw.node)});\n\t// Document location\n\tif($tw.browser) {\n\t\tvar setLocationProperty = function(name,value) {\n\t\t\t\tinfoTiddlerFields.push({title: \"$:/info/url/\" + name, text: value});\t\t\t\n\t\t\t},\n\t\t\tlocation = document.location;\n\t\tsetLocationProperty(\"full\", (location.toString()).split(\"#\")[0]);\n\t\tsetLocationProperty(\"host\", location.host);\n\t\tsetLocationProperty(\"hostname\", location.hostname);\n\t\tsetLocationProperty(\"protocol\", location.protocol);\n\t\tsetLocationProperty(\"port\", location.port);\n\t\tsetLocationProperty(\"pathname\", location.pathname);\n\t\tsetLocationProperty(\"search\", location.search);\n\t\tsetLocationProperty(\"origin\", location.origin);\n\t}\n\treturn infoTiddlerFields;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "info"
},
"$:/core/modules/keyboard.js": {
"title": "$:/core/modules/keyboard.js",
"text": "/*\\\ntitle: $:/core/modules/keyboard.js\ntype: application/javascript\nmodule-type: global\n\nKeyboard handling utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar namedKeys = {\n\t\"cancel\": 3,\n\t\"help\": 6,\n\t\"backspace\": 8,\n\t\"tab\": 9,\n\t\"clear\": 12,\n\t\"return\": 13,\n\t\"enter\": 13,\n\t\"pause\": 19,\n\t\"escape\": 27,\n\t\"space\": 32,\n\t\"page_up\": 33,\n\t\"page_down\": 34,\n\t\"end\": 35,\n\t\"home\": 36,\n\t\"left\": 37,\n\t\"up\": 38,\n\t\"right\": 39,\n\t\"down\": 40,\n\t\"printscreen\": 44,\n\t\"insert\": 45,\n\t\"delete\": 46,\n\t\"0\": 48,\n\t\"1\": 49,\n\t\"2\": 50,\n\t\"3\": 51,\n\t\"4\": 52,\n\t\"5\": 53,\n\t\"6\": 54,\n\t\"7\": 55,\n\t\"8\": 56,\n\t\"9\": 57,\n\t\"firefoxsemicolon\": 59,\n\t\"firefoxequals\": 61,\n\t\"a\": 65,\n\t\"b\": 66,\n\t\"c\": 67,\n\t\"d\": 68,\n\t\"e\": 69,\n\t\"f\": 70,\n\t\"g\": 71,\n\t\"h\": 72,\n\t\"i\": 73,\n\t\"j\": 74,\n\t\"k\": 75,\n\t\"l\": 76,\n\t\"m\": 77,\n\t\"n\": 78,\n\t\"o\": 79,\n\t\"p\": 80,\n\t\"q\": 81,\n\t\"r\": 82,\n\t\"s\": 83,\n\t\"t\": 84,\n\t\"u\": 85,\n\t\"v\": 86,\n\t\"w\": 87,\n\t\"x\": 88,\n\t\"y\": 89,\n\t\"z\": 90,\n\t\"numpad0\": 96,\n\t\"numpad1\": 97,\n\t\"numpad2\": 98,\n\t\"numpad3\": 99,\n\t\"numpad4\": 100,\n\t\"numpad5\": 101,\n\t\"numpad6\": 102,\n\t\"numpad7\": 103,\n\t\"numpad8\": 104,\n\t\"numpad9\": 105,\n\t\"multiply\": 106,\n\t\"add\": 107,\n\t\"separator\": 108,\n\t\"subtract\": 109,\n\t\"decimal\": 110,\n\t\"divide\": 111,\n\t\"f1\": 112,\n\t\"f2\": 113,\n\t\"f3\": 114,\n\t\"f4\": 115,\n\t\"f5\": 116,\n\t\"f6\": 117,\n\t\"f7\": 118,\n\t\"f8\": 119,\n\t\"f9\": 120,\n\t\"f10\": 121,\n\t\"f11\": 122,\n\t\"f12\": 123,\n\t\"f13\": 124,\n\t\"f14\": 125,\n\t\"f15\": 126,\n\t\"f16\": 127,\n\t\"f17\": 128,\n\t\"f18\": 129,\n\t\"f19\": 130,\n\t\"f20\": 131,\n\t\"f21\": 132,\n\t\"f22\": 133,\n\t\"f23\": 134,\n\t\"f24\": 135,\n\t\"firefoxminus\": 173,\n\t\"semicolon\": 186,\n\t\"equals\": 187,\n\t\"comma\": 188,\n\t\"dash\": 189,\n\t\"period\": 190,\n\t\"slash\": 191,\n\t\"backquote\": 192,\n\t\"openbracket\": 219,\n\t\"backslash\": 220,\n\t\"closebracket\": 221,\n\t\"quote\": 222\n};\n\nfunction KeyboardManager(options) {\n\tvar self = this;\n\toptions = options || \"\";\n\t// Save the named key hashmap\n\tthis.namedKeys = namedKeys;\n\t// Create a reverse mapping of code to keyname\n\tthis.keyNames = [];\n\t$tw.utils.each(namedKeys,function(keyCode,name) {\n\t\tself.keyNames[keyCode] = name.substr(0,1).toUpperCase() + name.substr(1);\n\t});\n\t// Save the platform-specific name of the \"meta\" key\n\tthis.metaKeyName = $tw.platform.isMac ? \"cmd-\" : \"win-\";\n}\n\n/*\nReturn an array of keycodes for the modifier keys ctrl, shift, alt, meta\n*/\nKeyboardManager.prototype.getModifierKeys = function() {\n\treturn [\n\t\t16, // Shift\n\t\t17, // Ctrl\n\t\t18, // Alt\n\t\t20, // CAPS LOCK\n\t\t91, // Meta (left)\n\t\t93, // Meta (right)\n\t\t224 // Meta (Firefox)\n\t]\n};\n\n/*\nParses a key descriptor into the structure:\n{\n\tkeyCode: numeric keycode\n\tshiftKey: boolean\n\taltKey: boolean\n\tctrlKey: boolean\n\tmetaKey: boolean\n}\nKey descriptors have the following format:\n\tctrl+enter\n\tctrl+shift+alt+A\n*/\nKeyboardManager.prototype.parseKeyDescriptor = function(keyDescriptor) {\n\tvar components = keyDescriptor.split(/\\+|\\-/),\n\t\tinfo = {\n\t\t\tkeyCode: 0,\n\t\t\tshiftKey: false,\n\t\t\taltKey: false,\n\t\t\tctrlKey: false,\n\t\t\tmetaKey: false\n\t\t};\n\tfor(var t=0; t<components.length; t++) {\n\t\tvar s = components[t].toLowerCase(),\n\t\t\tc = s.charCodeAt(0);\n\t\t// Look for modifier keys\n\t\tif(s === \"ctrl\") {\n\t\t\tinfo.ctrlKey = true;\n\t\t} else if(s === \"shift\") {\n\t\t\tinfo.shiftKey = true;\n\t\t} else if(s === \"alt\") {\n\t\t\tinfo.altKey = true;\n\t\t} else if(s === \"meta\" || s === \"cmd\" || s === \"win\") {\n\t\t\tinfo.metaKey = true;\n\t\t}\n\t\t// Replace named keys with their code\n\t\tif(this.namedKeys[s]) {\n\t\t\tinfo.keyCode = this.namedKeys[s];\n\t\t}\n\t}\n\tif(info.keyCode) {\n\t\treturn info;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nParse a list of key descriptors into an array of keyInfo objects. The key descriptors can be passed as an array of strings or a space separated string\n*/\nKeyboardManager.prototype.parseKeyDescriptors = function(keyDescriptors,options) {\n\tvar self = this;\n\toptions = options || {};\n\toptions.stack = options.stack || [];\n\tvar wiki = options.wiki || $tw.wiki;\n\tif(typeof keyDescriptors === \"string\" && keyDescriptors === \"\") {\n\t\treturn [];\n\t}\n\tif(!$tw.utils.isArray(keyDescriptors)) {\n\t\tkeyDescriptors = keyDescriptors.split(\" \");\n\t}\n\tvar result = [];\n\t$tw.utils.each(keyDescriptors,function(keyDescriptor) {\n\t\t// Look for a named shortcut\n\t\tif(keyDescriptor.substr(0,2) === \"((\" && keyDescriptor.substr(-2,2) === \"))\") {\n\t\t\tif(options.stack.indexOf(keyDescriptor) === -1) {\n\t\t\t\toptions.stack.push(keyDescriptor);\n\t\t\t\tvar name = keyDescriptor.substring(2,keyDescriptor.length - 2),\n\t\t\t\t\tlookupName = function(configName) {\n\t\t\t\t\t\tvar keyDescriptors = wiki.getTiddlerText(\"$:/config/\" + configName + \"/\" + name);\n\t\t\t\t\t\tif(keyDescriptors) {\n\t\t\t\t\t\t\tresult.push.apply(result,self.parseKeyDescriptors(keyDescriptors,options));\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\tlookupName(\"shortcuts\");\n\t\t\t\tlookupName($tw.platform.isMac ? \"shortcuts-mac\" : \"shortcuts-not-mac\");\n\t\t\t\tlookupName($tw.platform.isWindows ? \"shortcuts-windows\" : \"shortcuts-not-windows\");\n\t\t\t\tlookupName($tw.platform.isLinux ? \"shortcuts-linux\" : \"shortcuts-not-linux\");\n\t\t\t}\n\t\t} else {\n\t\t\tresult.push(self.parseKeyDescriptor(keyDescriptor));\n\t\t}\n\t});\n\treturn result;\n};\n\nKeyboardManager.prototype.getPrintableShortcuts = function(keyInfoArray) {\n\tvar self = this,\n\t\tresult = [];\n\t$tw.utils.each(keyInfoArray,function(keyInfo) {\n\t\tif(keyInfo) {\n\t\t\tresult.push((keyInfo.ctrlKey ? \"ctrl-\" : \"\") + \n\t\t\t\t (keyInfo.shiftKey ? \"shift-\" : \"\") + \n\t\t\t\t (keyInfo.altKey ? \"alt-\" : \"\") + \n\t\t\t\t (keyInfo.metaKey ? self.metaKeyName : \"\") + \n\t\t\t\t (self.keyNames[keyInfo.keyCode]));\n\t\t}\n\t});\n\treturn result;\n}\n\nKeyboardManager.prototype.checkKeyDescriptor = function(event,keyInfo) {\n\treturn keyInfo &&\n\t\t\tevent.keyCode === keyInfo.keyCode && \n\t\t\tevent.shiftKey === keyInfo.shiftKey && \n\t\t\tevent.altKey === keyInfo.altKey && \n\t\t\tevent.ctrlKey === keyInfo.ctrlKey && \n\t\t\tevent.metaKey === keyInfo.metaKey;\n};\n\nKeyboardManager.prototype.checkKeyDescriptors = function(event,keyInfoArray) {\n\tfor(var t=0; t<keyInfoArray.length; t++) {\n\t\tif(this.checkKeyDescriptor(event,keyInfoArray[t])) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n\nexports.KeyboardManager = KeyboardManager;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/language.js": {
"title": "$:/core/modules/language.js",
"text": "/*\\\ntitle: $:/core/modules/language.js\ntype: application/javascript\nmodule-type: global\n\nThe $tw.Language() manages translateable strings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreate an instance of the language manager. Options include:\nwiki: wiki from which to retrieve translation tiddlers\n*/\nfunction Language(options) {\n\toptions = options || \"\";\n\tthis.wiki = options.wiki || $tw.wiki;\n}\n\n/*\nReturn a wikified translateable string. The title is automatically prefixed with \"$:/language/\"\nOptions include:\nvariables: optional hashmap of variables to supply to the language wikification\n*/\nLanguage.prototype.getString = function(title,options) {\n\toptions = options || {};\n\ttitle = \"$:/language/\" + title;\n\treturn this.wiki.renderTiddler(\"text/plain\",title,{variables: options.variables});\n};\n\n/*\nReturn a raw, unwikified translateable string. The title is automatically prefixed with \"$:/language/\"\n*/\nLanguage.prototype.getRawString = function(title) {\n\ttitle = \"$:/language/\" + title;\n\treturn this.wiki.getTiddlerText(title);\n};\n\nexports.Language = Language;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/macros/changecount.js": {
"title": "$:/core/modules/macros/changecount.js",
"text": "/*\\\ntitle: $:/core/modules/macros/changecount.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the changecount for the current tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"changecount\";\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn this.wiki.getChangeCount(this.getVariable(\"currentTiddler\")) + \"\";\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/contrastcolour.js": {
"title": "$:/core/modules/macros/contrastcolour.js",
"text": "/*\\\ntitle: $:/core/modules/macros/contrastcolour.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to choose which of two colours has the highest contrast with a base colour\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"contrastcolour\";\n\nexports.params = [\n\t{name: \"target\"},\n\t{name: \"fallbackTarget\"},\n\t{name: \"colourA\"},\n\t{name: \"colourB\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(target,fallbackTarget,colourA,colourB) {\n\tvar rgbTarget = $tw.utils.parseCSSColor(target) || $tw.utils.parseCSSColor(fallbackTarget);\n\tif(!rgbTarget) {\n\t\treturn colourA;\n\t}\n\tvar rgbColourA = $tw.utils.parseCSSColor(colourA),\n\t\trgbColourB = $tw.utils.parseCSSColor(colourB);\n\tif(rgbColourA && !rgbColourB) {\n\t\treturn rgbColourA;\n\t}\n\tif(rgbColourB && !rgbColourA) {\n\t\treturn rgbColourB;\n\t}\n\tif(!rgbColourA && !rgbColourB) {\n\t\t// If neither colour is readable, return a crude inverse of the target\n\t\treturn [255 - rgbTarget[0],255 - rgbTarget[1],255 - rgbTarget[2],rgbTarget[3]];\n\t}\n\t// Colour brightness formula derived from http://www.w3.org/WAI/ER/WD-AERT/#color-contrast\n\tvar brightnessTarget = rgbTarget[0] * 0.299 + rgbTarget[1] * 0.587 + rgbTarget[2] * 0.114,\n\t\tbrightnessA = rgbColourA[0] * 0.299 + rgbColourA[1] * 0.587 + rgbColourA[2] * 0.114,\n\t\tbrightnessB = rgbColourB[0] * 0.299 + rgbColourB[1] * 0.587 + rgbColourB[2] * 0.114;\n\treturn Math.abs(brightnessTarget - brightnessA) > Math.abs(brightnessTarget - brightnessB) ? colourA : colourB;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/csvtiddlers.js": {
"title": "$:/core/modules/macros/csvtiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/macros/csvtiddlers.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to output tiddlers matching a filter to CSV\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"csvtiddlers\";\n\nexports.params = [\n\t{name: \"filter\"},\n\t{name: \"format\"},\n];\n\n/*\nRun the macro\n*/\nexports.run = function(filter,format) {\n\tvar self = this,\n\t\ttiddlers = this.wiki.filterTiddlers(filter),\n\t\ttiddler,\n\t\tfields = [],\n\t\tt,f;\n\t// Collect all the fields\n\tfor(t=0;t<tiddlers.length; t++) {\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\tfor(f in tiddler.fields) {\n\t\t\tif(fields.indexOf(f) === -1) {\n\t\t\t\tfields.push(f);\n\t\t\t}\n\t\t}\n\t}\n\t// Sort the fields and bring the standard ones to the front\n\tfields.sort();\n\t\"title text modified modifier created creator\".split(\" \").reverse().forEach(function(value,index) {\n\t\tvar p = fields.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tfields.splice(p,1);\n\t\t\tfields.unshift(value)\n\t\t}\n\t});\n\t// Output the column headings\n\tvar output = [], row = [];\n\tfields.forEach(function(value) {\n\t\trow.push(quoteAndEscape(value))\n\t});\n\toutput.push(row.join(\",\"));\n\t// Output each tiddler\n\tfor(var t=0;t<tiddlers.length; t++) {\n\t\trow = [];\n\t\ttiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\t\tfor(f=0; f<fields.length; f++) {\n\t\t\t\trow.push(quoteAndEscape(tiddler ? tiddler.getFieldString(fields[f]) || \"\" : \"\"));\n\t\t\t}\n\t\toutput.push(row.join(\",\"));\n\t}\n\treturn output.join(\"\\n\");\n};\n\nfunction quoteAndEscape(value) {\n\treturn \"\\\"\" + value.replace(/\"/mg,\"\\\"\\\"\") + \"\\\"\";\n}\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/displayshortcuts.js": {
"title": "$:/core/modules/macros/displayshortcuts.js",
"text": "/*\\\ntitle: $:/core/modules/macros/displayshortcuts.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to display a list of keyboard shortcuts in human readable form. Notably, it resolves named shortcuts like `((bold))` to the underlying keystrokes.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"displayshortcuts\";\n\nexports.params = [\n\t{name: \"shortcuts\"},\n\t{name: \"prefix\"},\n\t{name: \"separator\"},\n\t{name: \"suffix\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(shortcuts,prefix,separator,suffix) {\n\tvar shortcutArray = $tw.keyboardManager.getPrintableShortcuts($tw.keyboardManager.parseKeyDescriptors(shortcuts,{\n\t\twiki: this.wiki\n\t}));\n\tif(shortcutArray.length > 0) {\n\t\tshortcutArray.sort(function(a,b) {\n\t\t return a.toLowerCase().localeCompare(b.toLowerCase());\n\t\t})\n\t\treturn prefix + shortcutArray.join(separator) + suffix;\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/dumpvariables.js": {
"title": "$:/core/modules/macros/dumpvariables.js",
"text": "/*\\\ntitle: $:/core/modules/macros/dumpvariables.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to dump all active variable values\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"dumpvariables\";\n\nexports.params = [\n];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\tvar output = [\"|!Variable |!Value |\"],\n\t\tvariables = [], variable;\n\tfor(variable in this.variables) {\n\t\tvariables.push(variable);\n\t}\n\tvariables.sort();\n\tfor(var index=0; index<variables.length; index++) {\n\t\tvar variable = variables[index];\n\t\toutput.push(\"|\" + variable + \" |<input size=50 value=<<\" + variable + \">>/> |\")\n\t}\n\treturn output.join(\"\\n\");\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/jsontiddler.js": {
"title": "$:/core/modules/macros/jsontiddler.js",
"text": "/*\\\ntitle: $:/core/modules/macros/jsontiddler.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to output a single tiddler to JSON\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"jsontiddler\";\n\nexports.params = [\n\t{name: \"title\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(title) {\n\ttitle = title || this.getVariable(\"currentTiddler\");\n\tvar tiddler = !!title && this.wiki.getTiddler(title),\n\t\tfields = new Object();\n\tif(tiddler) {\n\t\tfor(var field in tiddler.fields) {\n\t\t\tfields[field] = tiddler.getFieldString(field);\n\t\t}\n\t}\n\treturn JSON.stringify(fields,null,$tw.config.preferences.jsonSpaces);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/jsontiddlers.js": {
"title": "$:/core/modules/macros/jsontiddlers.js",
"text": "/*\\\ntitle: $:/core/modules/macros/jsontiddlers.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to output tiddlers matching a filter to JSON\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"jsontiddlers\";\n\nexports.params = [\n\t{name: \"filter\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(filter) {\n\tvar tiddlers = this.wiki.filterTiddlers(filter),\n\t\tdata = [];\n\tfor(var t=0;t<tiddlers.length; t++) {\n\t\tvar tiddler = this.wiki.getTiddler(tiddlers[t]);\n\t\tif(tiddler) {\n\t\t\tvar fields = new Object();\n\t\t\tfor(var field in tiddler.fields) {\n\t\t\t\tfields[field] = tiddler.getFieldString(field);\n\t\t\t}\n\t\t\tdata.push(fields);\n\t\t}\n\t}\n\treturn JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/makedatauri.js": {
"title": "$:/core/modules/macros/makedatauri.js",
"text": "/*\\\ntitle: $:/core/modules/macros/makedatauri.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to convert a string of text to a data URI\n\n<<makedatauri text:\"Text to be converted\" type:\"text/vnd.tiddlywiki\">>\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"makedatauri\";\n\nexports.params = [\n\t{name: \"text\"},\n\t{name: \"type\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(text,type) {\n\treturn $tw.utils.makeDataUri(text,type);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/now.js": {
"title": "$:/core/modules/macros/now.js",
"text": "/*\\\ntitle: $:/core/modules/macros/now.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return a formatted version of the current time\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"now\";\n\nexports.params = [\n\t{name: \"format\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(format) {\n\treturn $tw.utils.formatDateString(new Date(),format || \"0hh:0mm, DDth MMM YYYY\");\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/qualify.js": {
"title": "$:/core/modules/macros/qualify.js",
"text": "/*\\\ntitle: $:/core/modules/macros/qualify.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to qualify a state tiddler title according\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"qualify\";\n\nexports.params = [\n\t{name: \"title\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(title) {\n\treturn title + \"-\" + this.getStateQualifier();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/resolvepath.js": {
"title": "$:/core/modules/macros/resolvepath.js",
"text": "/*\\\ntitle: $:/core/modules/macros/resolvepath.js\ntype: application/javascript\nmodule-type: macro\n\nResolves a relative path for an absolute rootpath.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"resolvepath\";\n\nexports.params = [\n\t{name: \"source\"},\n\t{name: \"root\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(source, root) {\n\treturn $tw.utils.resolvePath(source, root);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/macros/version.js": {
"title": "$:/core/modules/macros/version.js",
"text": "/*\\\ntitle: $:/core/modules/macros/version.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return the TiddlyWiki core version number\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"version\";\n\nexports.params = [];\n\n/*\nRun the macro\n*/\nexports.run = function() {\n\treturn $tw.version;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "macro"
},
"$:/core/modules/parsers/audioparser.js": {
"title": "$:/core/modules/parsers/audioparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/audioparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe audio parser parses an audio tiddler into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar AudioParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"audio\",\n\t\t\tattributes: {\n\t\t\t\tcontrols: {type: \"string\", value: \"controls\"}\n\t\t\t}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"audio/ogg\"] = AudioParser;\nexports[\"audio/mpeg\"] = AudioParser;\nexports[\"audio/mp3\"] = AudioParser;\nexports[\"audio/mp4\"] = AudioParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/csvparser.js": {
"title": "$:/core/modules/parsers/csvparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/csvparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe CSV text parser processes CSV files into a table wrapped in a scrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar CsvParser = function(type,text,options) {\n\t// Table framework\n\tthis.tree = [{\n\t\t\"type\": \"scrollable\", \"children\": [{\n\t\t\t\"type\": \"element\", \"tag\": \"table\", \"children\": [{\n\t\t\t\t\"type\": \"element\", \"tag\": \"tbody\", \"children\": []\n\t\t\t}], \"attributes\": {\n\t\t\t\t\"class\": {\"type\": \"string\", \"value\": \"tc-csv-table\"}\n\t\t\t}\n\t\t}]\n\t}];\n\t// Split the text into lines\n\tvar lines = text.split(/\\r?\\n/mg),\n\t\ttag = \"th\";\n\tfor(var line=0; line<lines.length; line++) {\n\t\tvar lineText = lines[line];\n\t\tif(lineText) {\n\t\t\tvar row = {\n\t\t\t\t\t\"type\": \"element\", \"tag\": \"tr\", \"children\": []\n\t\t\t\t};\n\t\t\tvar columns = lineText.split(\",\");\n\t\t\tfor(var column=0; column<columns.length; column++) {\n\t\t\t\trow.children.push({\n\t\t\t\t\t\t\"type\": \"element\", \"tag\": tag, \"children\": [{\n\t\t\t\t\t\t\t\"type\": \"text\",\n\t\t\t\t\t\t\t\"text\": columns[column]\n\t\t\t\t\t\t}]\n\t\t\t\t\t});\n\t\t\t}\n\t\t\ttag = \"td\";\n\t\t\tthis.tree[0].children[0].children[0].children.push(row);\n\t\t}\n\t}\n};\n\nexports[\"text/csv\"] = CsvParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/htmlparser.js": {
"title": "$:/core/modules/parsers/htmlparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/htmlparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe HTML parser displays text as raw HTML\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar HtmlParser = function(type,text,options) {\n\tvar src;\n\tif(options._canonical_uri) {\n\t\tsrc = options._canonical_uri;\n\t} else if(text) {\n\t\tsrc = \"data:text/html;charset=utf-8,\" + encodeURIComponent(text);\n\t}\n\tthis.tree = [{\n\t\ttype: \"element\",\n\t\ttag: \"iframe\",\n\t\tattributes: {\n\t\t\tsrc: {type: \"string\", value: src},\n\t\t\tsandbox: {type: \"string\", value: \"\"}\n\t\t}\n\t}];\n};\n\nexports[\"text/html\"] = HtmlParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/imageparser.js": {
"title": "$:/core/modules/parsers/imageparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/imageparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe image parser parses an image into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ImageParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"img\",\n\t\t\tattributes: {}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\tif(type === \"image/svg+xml\" || type === \".svg\") {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:image/svg+xml,\" + encodeURIComponent(text)};\n\t\t} else {\n\t\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t\t}\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"image/svg+xml\"] = ImageParser;\nexports[\"image/jpg\"] = ImageParser;\nexports[\"image/jpeg\"] = ImageParser;\nexports[\"image/png\"] = ImageParser;\nexports[\"image/gif\"] = ImageParser;\nexports[\"image/x-icon\"] = ImageParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/utils/parseutils.js": {
"title": "$:/core/modules/utils/parseutils.js",
"text": "/*\\\ntitle: $:/core/modules/utils/parseutils.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions concerned with parsing text into tokens.\n\nMost functions have the following pattern:\n\n* The parameters are:\n** `source`: the source string being parsed\n** `pos`: the current parse position within the string\n** Any further parameters are used to identify the token that is being parsed\n* The return value is:\n** null if the token was not found at the specified position\n** an object representing the token with the following standard fields:\n*** `type`: string indicating the type of the token\n*** `start`: start position of the token in the source string\n*** `end`: end position of the token in the source string\n*** Any further fields required to describe the token\n\nThe exception is `skipWhiteSpace`, which just returns the position after the whitespace.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nLook for a whitespace token. Returns null if not found, otherwise returns {type: \"whitespace\", start:, end:,}\n*/\nexports.parseWhiteSpace = function(source,pos) {\n\tvar p = pos,c;\n\twhile(true) {\n\t\tc = source.charAt(p);\n\t\tif((c === \" \") || (c === \"\\f\") || (c === \"\\n\") || (c === \"\\r\") || (c === \"\\t\") || (c === \"\\v\") || (c === \"\\u00a0\")) { // Ignores some obscure unicode spaces\n\t\t\tp++;\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(p === pos) {\n\t\treturn null;\n\t} else {\n\t\treturn {\n\t\t\ttype: \"whitespace\",\n\t\t\tstart: pos,\n\t\t\tend: p\n\t\t}\n\t}\n};\n\n/*\nConvenience wrapper for parseWhiteSpace. Returns the position after the whitespace\n*/\nexports.skipWhiteSpace = function(source,pos) {\n\tvar c;\n\twhile(true) {\n\t\tc = source.charAt(pos);\n\t\tif((c === \" \") || (c === \"\\f\") || (c === \"\\n\") || (c === \"\\r\") || (c === \"\\t\") || (c === \"\\v\") || (c === \"\\u00a0\")) { // Ignores some obscure unicode spaces\n\t\t\tpos++;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n};\n\n/*\nLook for a given string token. Returns null if not found, otherwise returns {type: \"token\", value:, start:, end:,}\n*/\nexports.parseTokenString = function(source,pos,token) {\n\tvar match = source.indexOf(token,pos) === pos;\n\tif(match) {\n\t\treturn {\n\t\t\ttype: \"token\",\n\t\t\tvalue: token,\n\t\t\tstart: pos,\n\t\t\tend: pos + token.length\n\t\t};\n\t}\n\treturn null;\n};\n\n/*\nLook for a token matching a regex. Returns null if not found, otherwise returns {type: \"regexp\", match:, start:, end:,}\n*/\nexports.parseTokenRegExp = function(source,pos,reToken) {\n\tvar node = {\n\t\ttype: \"regexp\",\n\t\tstart: pos\n\t};\n\treToken.lastIndex = pos;\n\tnode.match = reToken.exec(source);\n\tif(node.match && node.match.index === pos) {\n\t\tnode.end = pos + node.match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a string literal. Returns null if not found, otherwise returns {type: \"string\", value:, start:, end:,}\n*/\nexports.parseStringLiteral = function(source,pos) {\n\tvar node = {\n\t\ttype: \"string\",\n\t\tstart: pos\n\t};\n\tvar reString = /(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\")|(?:'([^']*)')/g;\n\treString.lastIndex = pos;\n\tvar match = reString.exec(source);\n\tif(match && match.index === pos) {\n\t\tnode.value = match[1] !== undefined ? match[1] :(\n\t\t\tmatch[2] !== undefined ? match[2] : match[3] \n\t\t\t\t\t);\n\t\tnode.end = pos + match[0].length;\n\t\treturn node;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLook for a macro invocation parameter. Returns null if not found, or {type: \"macro-parameter\", name:, value:, start:, end:}\n*/\nexports.parseMacroParameter = function(source,pos) {\n\tvar node = {\n\t\ttype: \"macro-parameter\",\n\t\tstart: pos\n\t};\n\t// Define our regexp\n\tvar reMacroParameter = /(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\\s>\"'=]+)))/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the parameter\n\tvar token = $tw.utils.parseTokenRegExp(source,pos,reMacroParameter);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the parameter details\n\tnode.value = token.match[2] !== undefined ? token.match[2] : (\n\t\t\t\t\ttoken.match[3] !== undefined ? token.match[3] : (\n\t\t\t\t\t\ttoken.match[4] !== undefined ? token.match[4] : (\n\t\t\t\t\t\t\ttoken.match[5] !== undefined ? token.match[5] : (\n\t\t\t\t\t\t\t\ttoken.match[6] !== undefined ? token.match[6] : (\n\t\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\tif(token.match[1]) {\n\t\tnode.name = token.match[1];\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for a macro invocation. Returns null if not found, or {type: \"macrocall\", name:, parameters:, start:, end:}\n*/\nexports.parseMacroInvocation = function(source,pos) {\n\tvar node = {\n\t\ttype: \"macrocall\",\n\t\tstart: pos,\n\t\tparams: []\n\t};\n\t// Define our regexps\n\tvar reMacroName = /([^\\s>\"'=]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double less than sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\"<<\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the macro name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reMacroName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Process parameters\n\tvar parameter = $tw.utils.parseMacroParameter(source,pos);\n\twhile(parameter) {\n\t\tnode.params.push(parameter);\n\t\tpos = parameter.end;\n\t\t// Get the next parameter\n\t\tparameter = $tw.utils.parseMacroParameter(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a double greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\">>\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n/*\nLook for an HTML attribute definition. Returns null if not found, otherwise returns {type: \"attribute\", name:, valueType: \"string|indirect|macro\", value:, start:, end:,}\n*/\nexports.parseAttribute = function(source,pos) {\n\tvar node = {\n\t\tstart: pos\n\t};\n\t// Define our regexps\n\tvar reAttributeName = /([^\\/\\s>\"'=]+)/g,\n\t\treUnquotedAttribute = /([^\\/\\s<>\"'=]+)/g,\n\t\treFilteredValue = /\\{\\{\\{(.+?)\\}\\}\\}/g,\n\t\treIndirectValue = /\\{\\{([^\\}]+)\\}\\}/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the attribute name\n\tvar name = $tw.utils.parseTokenRegExp(source,pos,reAttributeName);\n\tif(!name) {\n\t\treturn null;\n\t}\n\tnode.name = name.match[1];\n\tpos = name.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for an equals sign\n\tvar token = $tw.utils.parseTokenString(source,pos,\"=\");\n\tif(token) {\n\t\tpos = token.end;\n\t\t// Skip whitespace\n\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t// Look for a string literal\n\t\tvar stringLiteral = $tw.utils.parseStringLiteral(source,pos);\n\t\tif(stringLiteral) {\n\t\t\tpos = stringLiteral.end;\n\t\t\tnode.type = \"string\";\n\t\t\tnode.value = stringLiteral.value;\n\t\t} else {\n\t\t\t// Look for a filtered value\n\t\t\tvar filteredValue = $tw.utils.parseTokenRegExp(source,pos,reFilteredValue);\n\t\t\tif(filteredValue) {\n\t\t\t\tpos = filteredValue.end;\n\t\t\t\tnode.type = \"filtered\";\n\t\t\t\tnode.filter = filteredValue.match[1];\n\t\t\t} else {\n\t\t\t\t// Look for an indirect value\n\t\t\t\tvar indirectValue = $tw.utils.parseTokenRegExp(source,pos,reIndirectValue);\n\t\t\t\tif(indirectValue) {\n\t\t\t\t\tpos = indirectValue.end;\n\t\t\t\t\tnode.type = \"indirect\";\n\t\t\t\t\tnode.textReference = indirectValue.match[1];\n\t\t\t\t} else {\n\t\t\t\t\t// Look for a unquoted value\n\t\t\t\t\tvar unquotedValue = $tw.utils.parseTokenRegExp(source,pos,reUnquotedAttribute);\n\t\t\t\t\tif(unquotedValue) {\n\t\t\t\t\t\tpos = unquotedValue.end;\n\t\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\t\tnode.value = unquotedValue.match[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Look for a macro invocation value\n\t\t\t\t\t\tvar macroInvocation = $tw.utils.parseMacroInvocation(source,pos);\n\t\t\t\t\t\tif(macroInvocation) {\n\t\t\t\t\t\t\tpos = macroInvocation.end;\n\t\t\t\t\t\t\tnode.type = \"macro\";\n\t\t\t\t\t\t\tnode.value = macroInvocation;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.type = \"string\";\n\t\t\t\t\t\t\tnode.value = \"true\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tnode.type = \"string\";\n\t\tnode.value = \"true\";\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/parsers/pdfparser.js": {
"title": "$:/core/modules/parsers/pdfparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/pdfparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe PDF parser embeds a PDF viewer\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ImageParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"embed\",\n\t\t\tattributes: {}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\telement.attributes.src = {type: \"string\", value: \"data:application/pdf;base64,\" + text};\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"application/pdf\"] = ImageParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/textparser.js": {
"title": "$:/core/modules/parsers/textparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/textparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe plain text parser processes blocks of source text into a degenerate parse tree consisting of a single text node\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar TextParser = function(type,text,options) {\n\tthis.tree = [{\n\t\ttype: \"codeblock\",\n\t\tattributes: {\n\t\t\tcode: {type: \"string\", value: text},\n\t\t\tlanguage: {type: \"string\", value: type}\n\t\t}\n\t}];\n};\n\nexports[\"text/plain\"] = TextParser;\nexports[\"text/x-tiddlywiki\"] = TextParser;\nexports[\"application/javascript\"] = TextParser;\nexports[\"application/json\"] = TextParser;\nexports[\"text/css\"] = TextParser;\nexports[\"application/x-tiddler-dictionary\"] = TextParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/videoparser.js": {
"title": "$:/core/modules/parsers/videoparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/videoparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe video parser parses a video tiddler into an embeddable HTML element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar VideoParser = function(type,text,options) {\n\tvar element = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"video\",\n\t\t\tattributes: {\n\t\t\t\tcontrols: {type: \"string\", value: \"controls\"}\n\t\t\t}\n\t\t},\n\t\tsrc;\n\tif(options._canonical_uri) {\n\t\telement.attributes.src = {type: \"string\", value: options._canonical_uri};\n\t} else if(text) {\n\t\telement.attributes.src = {type: \"string\", value: \"data:\" + type + \";base64,\" + text};\n\t}\n\tthis.tree = [element];\n};\n\nexports[\"video/mp4\"] = VideoParser;\nexports[\"video/quicktime\"] = VideoParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/codeblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/codeblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for code blocks. For example:\n\n```\n\t```\n\tThis text will not be //wikified//\n\t```\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"codeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match and get language if defined\n\tthis.matchRegExp = /```([\\w-]*)\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\\r?\\n```$)/mg;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Return the $codeblock widget\n\treturn [{\n\t\t\ttype: \"codeblock\",\n\t\t\tattributes: {\n\t\t\t\t\tcode: {type: \"string\", value: text},\n\t\t\t\t\tlanguage: {type: \"string\", value: this.match[1]}\n\t\t\t}\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/codeinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/codeinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/codeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for code runs. For example:\n\n```\n\tThis is a `code run`.\n\tThis is another ``code run``\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"codeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(``?)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar reEnd = new RegExp(this.match[1], \"mg\");\n\t// Look for the end marker\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the text\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"code\",\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: text\n\t\t}]\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/commentblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for HTML comments. For example:\n\n```\n<!-- This is a comment -->\n```\n\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"commentblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /<!--/mg;\n\tthis.endMatchRegExp = /-->/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/commentinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/commentinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/commentinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML comments. For example:\n\n```\n<!-- This is a comment -->\n```\n\nNote that the syntax for comments is simplified to an opening \"<!--\" sequence and a closing \"-->\" sequence -- HTML itself implements a more complex format (see http://ostermiller.org/findhtmlcomment.html)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"commentinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\tthis.matchRegExp = /<!--/mg;\n\tthis.endMatchRegExp = /-->/mg;\n};\n\nexports.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\tif(this.match) {\n\t\tthis.endMatchRegExp.lastIndex = startPos + this.match[0].length;\n\t\tthis.endMatch = this.endMatchRegExp.exec(this.parser.source);\n\t\tif(this.endMatch) {\n\t\t\treturn this.match.index;\n\t\t}\n\t}\n\treturn undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.endMatchRegExp.lastIndex;\n\t// Don't return any elements\n\treturn [];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/dash.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/dash.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/dash.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for dashes. For example:\n\n```\nThis is an en-dash: --\n\nThis is an em-dash: ---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"dash\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{2,3}(?!-)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar dash = this.match[0].length === 2 ? \"–\" : \"—\";\n\treturn [{\n\t\ttype: \"entity\",\n\t\tentity: dash\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/bold.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/bold.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - bold. For example:\n\n```\n\tThis is ''bold'' text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except bold \n\\rules only bold \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"bold\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /''/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/''/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"strong\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/italic.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/italic.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - italic. For example:\n\n```\n\tThis is //italic// text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except italic\n\\rules only italic\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"italic\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\/\\//mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/\\/\\//mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"em\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/strikethrough.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - strikethrough. For example:\n\n```\n\tThis is ~~strikethrough~~ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except strikethrough \n\\rules only strikethrough \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"strikethrough\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~~/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/~~/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"strike\",\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/subscript.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - subscript. For example:\n\n```\n\tThis is ,,subscript,, text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except subscript \n\\rules only subscript \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"subscript\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /,,/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/,,/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"sub\",\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/superscript.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - superscript. For example:\n\n```\n\tThis is ^^superscript^^ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except superscript \n\\rules only superscript \n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"superscript\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\^\\^/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/\\^\\^/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"sup\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/emphasis/underscore.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for emphasis - underscore. For example:\n\n```\n\tThis is __underscore__ text\n```\n\nThis wikiparser can be modified using the rules eg:\n\n```\n\\rules except underscore \n\\rules only underscore\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"underscore\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /__/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\n\t// Parse the run including the terminator\n\tvar tree = this.parser.parseInlineRun(/__/mg,{eatTerminator: true});\n\n\t// Return the classed span\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"u\",\n\t\tchildren: tree\n\t}];\n};\n\n})();",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/entity.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/entity.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/entity.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for HTML entities. For example:\n\n```\n\tThis is a copyright symbol: ©\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"entity\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(&#?[a-zA-Z0-9]{2,8};)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar entityString = this.match[1];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Return the entity\n\treturn [{type: \"entity\", entity: this.match[0]}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/extlink.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/extlink.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/extlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\nAn external link: https://www.tiddlywiki.com/\n\nA suppressed external link: ~http://www.tiddlyspace.com/\n```\n\nExternal links can be suppressed by preceding them with `~`.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"extlink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|\"\\\\^]+(?:\\/|\\b)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Create the link unless it is suppressed\n\tif(this.match[0].substr(0,1) === \"~\") {\n\t\treturn [{type: \"text\", text: this.match[0].substr(1)}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tattributes: {\n\t\t\t\thref: {type: \"string\", value: this.match[0]},\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"},\n\t\t\t\trel: {type: \"string\", value: \"noopener noreferrer\"}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: this.match[0]\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"filteredtranscludeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \"list\",\n\t\tattributes: {\n\t\t\tfilter: {type: \"string\", value: filter}\n\t\t},\n\t\tisBlock: true\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \"string\", value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \"string\", value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\n\t}\n\treturn [node];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/filteredtranscludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline filtered transclusion. For example:\n\n```\n{{{ [tag[docs]] }}}\n{{{ [tag[docs]] |tooltip}}}\n{{{ [tag[docs]] ||TemplateTitle}}}\n{{{ [tag[docs]] |tooltip||TemplateTitle}}}\n{{{ [tag[docs]] }}width:40;height:50;}.class.class\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"filteredtranscludeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{\\{([^\\|]+?)(?:\\|([^\\|\\{\\}]+))?(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}([^\\}]*)\\}(?:\\.(\\S+))?/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar filter = this.match[1],\n\t\ttooltip = this.match[2],\n\t\ttemplate = $tw.utils.trim(this.match[3]),\n\t\tstyle = this.match[4],\n\t\tclasses = this.match[5];\n\t// Return the list widget\n\tvar node = {\n\t\ttype: \"list\",\n\t\tattributes: {\n\t\t\tfilter: {type: \"string\", value: filter}\n\t\t}\n\t};\n\tif(tooltip) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: tooltip};\n\t}\n\tif(template) {\n\t\tnode.attributes.template = {type: \"string\", value: template};\n\t}\n\tif(style) {\n\t\tnode.attributes.style = {type: \"string\", value: style};\n\t}\n\tif(classes) {\n\t\tnode.attributes.itemClass = {type: \"string\", value: classes.split(\".\").join(\" \")};\n\t}\n\treturn [node];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/hardlinebreaks.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for marking areas with hard line breaks. For example:\n\n```\n\"\"\"\nThis is some text\nThat is set like\nIt is a Poem\nWhen it is\nClearly\nNot\n\"\"\"\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"hardlinebreaks\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\"\"\"(?:\\r?\\n)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /(\"\"\")|(\\r?\\n)/mg,\n\t\ttree = [],\n\t\tmatch;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tdo {\n\t\t// Parse the run up to the terminator\n\t\ttree.push.apply(tree,this.parser.parseInlineRun(reEnd,{eatTerminator: false}));\n\t\t// Redo the terminator match\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tmatch = reEnd.exec(this.parser.source);\n\t\tif(match) {\n\t\t\tthis.parser.pos = reEnd.lastIndex;\n\t\t\t// Add a line break if the terminator was a line break\n\t\t\tif(match[2]) {\n\t\t\t\ttree.push({type: \"element\", tag: \"br\"});\n\t\t\t}\n\t\t}\n\t} while(match && !match[1]);\n\t// Return the nodes\n\treturn tree;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/heading.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/heading.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/heading.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for headings\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"heading\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(!{1,6})/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar headingLevel = this.match[1].length;\n\t// Move past the !s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse any classes, whitespace and then the heading itself\n\tvar classes = this.parser.parseClasses();\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// Return the heading\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"h\" + headingLevel, \n\t\tattributes: {\n\t\t\t\"class\": {type: \"string\", value: classes.join(\" \")}\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/horizrule.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/horizrule.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/horizrule.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for rules. For example:\n\n```\n---\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"horizrule\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /-{3,}\\r?(?:\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\treturn [{type: \"element\", tag: \"hr\"}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/html.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/html.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/html.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for HTML elements and widgets. For example:\n\n{{{\n<aside>\nThis is an HTML5 aside element\n</aside>\n\n<$slider target=\"MyTiddler\">\nThis is a widget invocation\n</$slider>\n\n}}}\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"html\";\nexports.types = {inline: true, block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextTag = this.findNextTag(this.parser.source,startPos,{\n\t\trequireLineBreak: this.is.block\n\t});\n\treturn this.nextTag ? this.nextTag.start : undefined;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Retrieve the most recent match so that recursive calls don't overwrite it\n\tvar tag = this.nextTag;\n\tthis.nextTag = null;\n\t// Advance the parser position to past the tag\n\tthis.parser.pos = tag.end;\n\t// Check for an immediately following double linebreak\n\tvar hasLineBreak = !tag.isSelfClosing && !!$tw.utils.parseTokenRegExp(this.parser.source,this.parser.pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\n\t// Set whether we're in block mode\n\ttag.isBlock = this.is.block || hasLineBreak;\n\t// Parse the body if we need to\n\tif(!tag.isSelfClosing && $tw.config.htmlVoidElements.indexOf(tag.tag) === -1) {\n\t\t\tvar reEndString = \"</\" + $tw.utils.escapeRegExp(tag.tag) + \">\",\n\t\t\t\treEnd = new RegExp(\"(\" + reEndString + \")\",\"mg\");\n\t\tif(hasLineBreak) {\n\t\t\ttag.children = this.parser.parseBlocks(reEndString);\n\t\t} else {\n\t\t\ttag.children = this.parser.parseInlineRun(reEnd);\n\t\t}\n\t\treEnd.lastIndex = this.parser.pos;\n\t\tvar endMatch = reEnd.exec(this.parser.source);\n\t\tif(endMatch && endMatch.index === this.parser.pos) {\n\t\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t\t}\n\t}\n\t// Return the tag\n\treturn [tag];\n};\n\n/*\nLook for an HTML tag. Returns null if not found, otherwise returns {type: \"element\", name:, attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseTag = function(source,pos,options) {\n\toptions = options || {};\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \"element\",\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Define our regexps\n\tvar reTagName = /([a-zA-Z0-9\\-\\$]+)/g;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a less than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\"<\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Get the tag name\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,reTagName);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tnode.tag = token.match[1];\n\tif(node.tag.charAt(0) === \"$\") {\n\t\tnode.type = node.tag.substr(1);\n\t}\n\tpos = token.end;\n\t// Check that the tag is terminated by a space, / or >\n\tif(!$tw.utils.parseWhiteSpace(source,pos) && !(source.charAt(pos) === \"/\") && !(source.charAt(pos) === \">\") ) {\n\t\treturn null;\n\t}\n\t// Process attributes\n\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\twhile(attribute) {\n\t\tnode.attributes[attribute.name] = attribute;\n\t\tpos = attribute.end;\n\t\t// Get the next attribute\n\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for a closing slash\n\ttoken = $tw.utils.parseTokenString(source,pos,\"/\");\n\tif(token) {\n\t\tpos = token.end;\n\t\tnode.isSelfClosing = true;\n\t}\n\t// Look for a greater than sign\n\ttoken = $tw.utils.parseTokenString(source,pos,\">\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Check for a required line break\n\tif(options.requireLineBreak) {\n\t\ttoken = $tw.utils.parseTokenRegExp(source,pos,/([^\\S\\n\\r]*\\r?\\n(?:[^\\S\\n\\r]*\\r?\\n|$))/g);\n\t\tif(!token) {\n\t\t\treturn null;\n\t\t}\n\t}\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\nexports.findNextTag = function(source,pos,options) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /<([a-zA-Z\\-\\$]+)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseTag(source,match.index,options);\n\t\t// Return success\n\t\tif(tag && this.isLegalTag(tag)) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\nexports.isLegalTag = function(tag) {\n\t// Widgets are always OK\n\tif(tag.type !== \"element\") {\n\t\treturn true;\n\t// If it's an HTML tag that starts with a dash then it's not legal\n\t} else if(tag.tag.charAt(0) === \"-\") {\n\t\treturn false;\n\t} else {\n\t\t// Otherwise it's OK\n\t\treturn true;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/image.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/image.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/image.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for embedding images. For example:\n\n```\n[img[https://tiddlywiki.com/fractalveg.jpg]]\n[img width=23 height=24 [https://tiddlywiki.com/fractalveg.jpg]]\n[img width={{!!width}} height={{!!height}} [https://tiddlywiki.com/fractalveg.jpg]]\n[img[Description of image|https://tiddlywiki.com/fractalveg.jpg]]\n[img[TiddlerTitle]]\n[img[Description of image|TiddlerTitle]]\n```\n\nGenerates the `<$image>` widget.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"image\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextImage = this.findNextImage(this.parser.source,startPos);\n\treturn this.nextImage ? this.nextImage.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextImage.end;\n\tvar node = {\n\t\ttype: \"image\",\n\t\tattributes: this.nextImage.attributes\n\t};\n\treturn [node];\n};\n\n/*\nFind the next image from the current position\n*/\nexports.findNextImage = function(source,pos) {\n\t// A regexp for finding candidate HTML tags\n\tvar reLookahead = /(\\[img)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a tag\n\t\tvar tag = this.parseImage(source,match.index);\n\t\t// Return success\n\t\tif(tag) {\n\t\t\treturn tag;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an image at the specified position. Returns null if not found, otherwise returns {type: \"image\", attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseImage = function(source,pos) {\n\tvar token,\n\t\tnode = {\n\t\t\ttype: \"image\",\n\t\t\tstart: pos,\n\t\t\tattributes: {}\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[img`\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[img\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Process attributes\n\tif(source.charAt(pos) !== \"[\") {\n\t\tvar attribute = $tw.utils.parseAttribute(source,pos);\n\t\twhile(attribute) {\n\t\t\tnode.attributes[attribute.name] = attribute;\n\t\t\tpos = attribute.end;\n\t\t\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t\t\tif(source.charAt(pos) !== \"[\") {\n\t\t\t\t// Get the next attribute\n\t\t\t\tattribute = $tw.utils.parseAttribute(source,pos);\n\t\t\t} else {\n\t\t\t\tattribute = null;\n\t\t\t}\n\t\t}\n\t}\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[` after the attributes\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Get the source up to the terminating `]]`\n\ttoken = $tw.utils.parseTokenRegExp(source,pos,/(?:([^|\\]]*?)\\|)?([^\\]]+?)\\]\\]/g);\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\tif(token.match[1]) {\n\t\tnode.attributes.tooltip = {type: \"string\", value: token.match[1].trim()};\n\t}\n\tnode.attributes.source = {type: \"string\", value: (token.match[2] || \"\").trim()};\n\t// Update the end position\n\tnode.end = pos;\n\treturn node;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/list.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/list.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/list.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for lists. For example:\n\n```\n* This is an unordered list\n* It has two items\n\n# This is a numbered list\n## With a subitem\n# And a third item\n\n; This is a term that is being defined\n: This is the definition of that term\n```\n\nNote that lists can be nested arbitrarily:\n\n```\n#** One\n#* Two\n#** Three\n#**** Four\n#**# Five\n#**## Six\n## Seven\n### Eight\n## Nine\n```\n\nA CSS class can be applied to a list item as follows:\n\n```\n* List item one\n*.active List item two has the class `active`\n* List item three\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"list\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /([\\*#;:>]+)/mg;\n};\n\nvar listTypes = {\n\t\"*\": {listTag: \"ul\", itemTag: \"li\"},\n\t\"#\": {listTag: \"ol\", itemTag: \"li\"},\n\t\";\": {listTag: \"dl\", itemTag: \"dt\"},\n\t\":\": {listTag: \"dl\", itemTag: \"dd\"},\n\t\">\": {listTag: \"blockquote\", itemTag: \"p\"}\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Array of parse tree nodes for the previous row of the list\n\tvar listStack = [];\n\t// Cycle through the items in the list\n\twhile(true) {\n\t\t// Match the list marker\n\t\tvar reMatch = /([\\*#;:>]+)/mg;\n\t\treMatch.lastIndex = this.parser.pos;\n\t\tvar match = reMatch.exec(this.parser.source);\n\t\tif(!match || match.index !== this.parser.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check whether the list type of the top level matches\n\t\tvar listInfo = listTypes[match[0].charAt(0)];\n\t\tif(listStack.length > 0 && listStack[0].tag !== listInfo.listTag) {\n\t\t\tbreak;\n\t\t}\n\t\t// Move past the list marker\n\t\tthis.parser.pos = match.index + match[0].length;\n\t\t// Walk through the list markers for the current row\n\t\tfor(var t=0; t<match[0].length; t++) {\n\t\t\tlistInfo = listTypes[match[0].charAt(t)];\n\t\t\t// Remove any stacked up element if we can't re-use it because the list type doesn't match\n\t\t\tif(listStack.length > t && listStack[t].tag !== listInfo.listTag) {\n\t\t\t\tlistStack.splice(t,listStack.length - t);\n\t\t\t}\n\t\t\t// Construct the list element or reuse the previous one at this level\n\t\t\tif(listStack.length <= t) {\n\t\t\t\tvar listElement = {type: \"element\", tag: listInfo.listTag, children: [\n\t\t\t\t\t{type: \"element\", tag: listInfo.itemTag, children: []}\n\t\t\t\t]};\n\t\t\t\t// Link this list element into the last child item of the parent list item\n\t\t\t\tif(t) {\n\t\t\t\t\tvar prevListItem = listStack[t-1].children[listStack[t-1].children.length-1];\n\t\t\t\t\tprevListItem.children.push(listElement);\n\t\t\t\t}\n\t\t\t\t// Save this element in the stack\n\t\t\t\tlistStack[t] = listElement;\n\t\t\t} else if(t === (match[0].length - 1)) {\n\t\t\t\tlistStack[t].children.push({type: \"element\", tag: listInfo.itemTag, children: []});\n\t\t\t}\n\t\t}\n\t\tif(listStack.length > match[0].length) {\n\t\t\tlistStack.splice(match[0].length,listStack.length - match[0].length);\n\t\t}\n\t\t// Process the body of the list item into the last list item\n\t\tvar lastListChildren = listStack[listStack.length-1].children,\n\t\t\tlastListItem = lastListChildren[lastListChildren.length-1],\n\t\t\tclasses = this.parser.parseClasses();\n\t\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\t\tvar tree = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t\tlastListItem.children.push.apply(lastListItem.children,tree);\n\t\tif(classes.length > 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(lastListItem,classes.join(\" \"));\n\t\t}\n\t\t// Consume any whitespace following the list item\n\t\tthis.parser.skipWhitespace();\n\t}\n\t// Return the root element of the list\n\treturn [listStack[0]];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for block macro calls\n\n```\n<<name value value2>>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrocallblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /<<([^>\\s]+)(?:\\s*)((?:[^>]|(?:>(?!>)))*?)>>(?:\\r?\\n|$)/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \"macrocall\",\n\t\tname: macroName,\n\t\tparams: params,\n\t\tisBlock: true\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrocallinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/macrocallinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrocallinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki rule for macro calls\n\n```\n<<name value value2>>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrocallinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /<<([^\\s>]+)\\s*([\\s\\S]*?)>>/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get all the details of the match\n\tvar macroName = this.match[1],\n\t\tparamString = this.match[2];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\tvar params = [],\n\t\treParam = /\\s*(?:([A-Za-z0-9\\-_]+)\\s*:)?(?:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))/mg,\n\t\tparamMatch = reParam.exec(paramString);\n\twhile(paramMatch) {\n\t\t// Process this parameter\n\t\tvar paramInfo = {\n\t\t\tvalue: paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5]|| paramMatch[6]\n\t\t};\n\t\tif(paramMatch[1]) {\n\t\t\tparamInfo.name = paramMatch[1];\n\t\t}\n\t\tparams.push(paramInfo);\n\t\t// Find the next match\n\t\tparamMatch = reParam.exec(paramString);\n\t}\n\treturn [{\n\t\ttype: \"macrocall\",\n\t\tname: macroName,\n\t\tparams: params\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/macrodef.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/macrodef.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/macrodef.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for macro definitions\n\n```\n\\define name(param:defaultvalue,param2:defaultvalue)\ndefinition text, including $param$ markers\n\\end\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"macrodef\";\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\define\\s+([^(\\s]+)\\(\\s*([^)]*)\\)(\\s*\\r?\\n)?/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the macro name and parameters\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the parameters\n\tvar paramString = this.match[2],\n\t\tparams = [];\n\tif(paramString !== \"\") {\n\t\tvar reParam = /\\s*([A-Za-z0-9\\-_]+)(?:\\s*:\\s*(?:\"\"\"([\\s\\S]*?)\"\"\"|\"([^\"]*)\"|'([^']*)'|\\[\\[([^\\]]*)\\]\\]|([^\"'\\s]+)))?/mg,\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\twhile(paramMatch) {\n\t\t\t// Save the parameter details\n\t\t\tvar paramInfo = {name: paramMatch[1]},\n\t\t\t\tdefaultValue = paramMatch[2] || paramMatch[3] || paramMatch[4] || paramMatch[5] || paramMatch[6];\n\t\t\tif(defaultValue) {\n\t\t\t\tparamInfo[\"default\"] = defaultValue;\n\t\t\t}\n\t\t\tparams.push(paramInfo);\n\t\t\t// Look for the next parameter\n\t\t\tparamMatch = reParam.exec(paramString);\n\t\t}\n\t}\n\t// Is this a multiline definition?\n\tvar reEnd;\n\tif(this.match[3]) {\n\t\t// If so, the end of the body is marked with \\end\n\t\treEnd = /(\\r?\\n\\\\end[^\\S\\n\\r]*(?:$|\\r?\\n))/mg;\n\t} else {\n\t\t// Otherwise, the end of the definition is marked by the end of the line\n\t\treEnd = /($|\\r?\\n)/mg;\n\t\t// Move past any whitespace\n\t\tthis.parser.pos = $tw.utils.skipWhiteSpace(this.parser.source,this.parser.pos);\n\t}\n\t// Find the end of the definition\n\treEnd.lastIndex = this.parser.pos;\n\tvar text,\n\t\tendMatch = reEnd.exec(this.parser.source);\n\tif(endMatch) {\n\t\ttext = this.parser.source.substring(this.parser.pos,endMatch.index);\n\t\tthis.parser.pos = endMatch.index + endMatch[0].length;\n\t} else {\n\t\t// We didn't find the end of the definition, so we'll make it blank\n\t\ttext = \"\";\n\t}\n\t// Save the macro definition\n\treturn [{\n\t\ttype: \"set\",\n\t\tattributes: {\n\t\t\tname: {type: \"string\", value: this.match[1]},\n\t\t\tvalue: {type: \"string\", value: text}\n\t\t},\n\t\tchildren: [],\n\t\tparams: params\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettyextlink.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/prettyextlink.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettyextlink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for external links. For example:\n\n```\n[ext[https://tiddlywiki.com/fractalveg.jpg]]\n[ext[Tooltip|https://tiddlywiki.com/fractalveg.jpg]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"prettyextlink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n};\n\nexports.findNextMatch = function(startPos) {\n\t// Find the next tag\n\tthis.nextLink = this.findNextLink(this.parser.source,startPos);\n\treturn this.nextLink ? this.nextLink.start : undefined;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.nextLink.end;\n\treturn [this.nextLink];\n};\n\n/*\nFind the next link from the current position\n*/\nexports.findNextLink = function(source,pos) {\n\t// A regexp for finding candidate links\n\tvar reLookahead = /(\\[ext\\[)/g;\n\t// Find the next candidate\n\treLookahead.lastIndex = pos;\n\tvar match = reLookahead.exec(source);\n\twhile(match) {\n\t\t// Try to parse the candidate as a link\n\t\tvar link = this.parseLink(source,match.index);\n\t\t// Return success\n\t\tif(link) {\n\t\t\treturn link;\n\t\t}\n\t\t// Look for the next match\n\t\treLookahead.lastIndex = match.index + 1;\n\t\tmatch = reLookahead.exec(source);\n\t}\n\t// Failed\n\treturn null;\n};\n\n/*\nLook for an link at the specified position. Returns null if not found, otherwise returns {type: \"element\", tag: \"a\", attributes: [], isSelfClosing:, start:, end:,}\n*/\nexports.parseLink = function(source,pos) {\n\tvar token,\n\t\ttextNode = {\n\t\t\ttype: \"text\"\n\t\t},\n\t\tnode = {\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tstart: pos,\n\t\t\tattributes: {\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t},\n\t\t\tchildren: [textNode]\n\t\t};\n\t// Skip whitespace\n\tpos = $tw.utils.skipWhiteSpace(source,pos);\n\t// Look for the `[ext[`\n\ttoken = $tw.utils.parseTokenString(source,pos,\"[ext[\");\n\tif(!token) {\n\t\treturn null;\n\t}\n\tpos = token.end;\n\t// Look ahead for the terminating `]]`\n\tvar closePos = source.indexOf(\"]]\",pos);\n\tif(closePos === -1) {\n\t\treturn null;\n\t}\n\t// Look for a `|` separating the tooltip\n\tvar splitPos = source.indexOf(\"|\",pos);\n\tif(splitPos === -1 || splitPos > closePos) {\n\t\tsplitPos = null;\n\t}\n\t// Pull out the tooltip and URL\n\tvar tooltip, URL;\n\tif(splitPos) {\n\t\tURL = source.substring(splitPos + 1,closePos).trim();\n\t\ttextNode.text = source.substring(pos,splitPos).trim();\n\t} else {\n\t\tURL = source.substring(pos,closePos).trim();\n\t\ttextNode.text = URL;\n\t}\n\tnode.attributes.href = {type: \"string\", value: URL};\n\tnode.attributes.target = {type: \"string\", value: \"_blank\"};\n\tnode.attributes.rel = {type: \"string\", value: \"noopener noreferrer\"};\n\t// Update the end position\n\tnode.end = closePos + 2;\n\treturn node;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/prettylink.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/prettylink.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/prettylink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for pretty links. For example:\n\n```\n[[Introduction]]\n\n[[Link description|TiddlerTitle]]\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"prettylink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\[\\[(.*?)(?:\\|(.*?))?\\]\\]/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Process the link\n\tvar text = this.match[1],\n\t\tlink = this.match[2] || text;\n\tif($tw.utils.isLinkExternal(link)) {\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"a\",\n\t\t\tattributes: {\n\t\t\t\thref: {type: \"string\", value: link},\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-tiddlylink-external\"},\n\t\t\t\ttarget: {type: \"string\", value: \"_blank\"},\n\t\t\t\trel: {type: \"string\", value: \"noopener noreferrer\"}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: text\n\t\t\t}]\n\t\t}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"link\",\n\t\t\tattributes: {\n\t\t\t\tto: {type: \"string\", value: link}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\", text: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/quoteblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/quoteblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/quoteblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for quote blocks. For example:\n\n```\n\t<<<.optionalClass(es) optional cited from\n\ta quote\n\t<<<\n\t\n\t<<<.optionalClass(es)\n\ta quote\n\t<<< optional cited from\n```\n\nQuotes can be quoted by putting more <s\n\n```\n\t<<<\n\tQuote Level 1\n\t\n\t<<<<\n\tQuoteLevel 2\n\t<<<<\n\t\n\t<<<\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"quoteblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /(<<<+)/mg;\n};\n\nexports.parse = function() {\n\tvar classes = [\"tc-quote\"];\n\t// Get all the details of the match\n\tvar reEndString = \"^\" + this.match[1] + \"(?!<)\";\n\t// Move past the <s\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\n\t// Parse any classes, whitespace and then the optional cite itself\n\tclasses.push.apply(classes, this.parser.parseClasses());\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tvar cite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// before handling the cite, parse the body of the quote\n\tvar tree= this.parser.parseBlocks(reEndString);\n\t// If we got a cite, put it before the text\n\tif(cite.length > 0) {\n\t\ttree.unshift({\n\t\t\ttype: \"element\",\n\t\t\ttag: \"cite\",\n\t\t\tchildren: cite\n\t\t});\n\t}\n\t// Parse any optional cite\n\tthis.parser.skipWhitespace({treatNewlinesAsNonWhitespace: true});\n\tcite = this.parser.parseInlineRun(/(\\r?\\n)/mg);\n\t// If we got a cite, push it\n\tif(cite.length > 0) {\n\t\ttree.push({\n\t\t\ttype: \"element\",\n\t\t\ttag: \"cite\",\n\t\t\tchildren: cite\n\t\t});\n\t}\n\t// Return the blockquote element\n\treturn [{\n\t\ttype: \"element\",\n\t\ttag: \"blockquote\",\n\t\tattributes: {\n\t\t\tclass: { type: \"string\", value: classes.join(\" \") },\n\t\t},\n\t\tchildren: tree\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/rules.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/rules.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/rules.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for rules specifications\n\n```\n\\rules except ruleone ruletwo rulethree\n\\rules only ruleone ruletwo rulethree\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"rules\";\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\rules[^\\S\\n]/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Move past the pragma invocation\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse whitespace delimited tokens terminated by a line break\n\tvar reMatch = /[^\\S\\n]*(\\S+)|(\\r?\\n)/mg,\n\t\ttokens = [];\n\treMatch.lastIndex = this.parser.pos;\n\tvar match = reMatch.exec(this.parser.source);\n\twhile(match && match.index === this.parser.pos) {\n\t\tthis.parser.pos = reMatch.lastIndex;\n\t\t// Exit if we've got the line break\n\t\tif(match[2]) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the token\n\t\tif(match[1]) {\n\t\t\ttokens.push(match[1]);\n\t\t}\n\t\t// Match the next token\n\t\tmatch = reMatch.exec(this.parser.source);\n\t}\n\t// Process the tokens\n\tif(tokens.length > 0) {\n\t\tthis.parser.amendRules(tokens[0],tokens.slice(1));\n\t}\n\t// No parse tree nodes to return\n\treturn [];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/styleblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for assigning styles and classes to paragraphs and other blocks. For example:\n\n```\n@@.myClass\n@@background-color:red;\nThis paragraph will have the CSS class `myClass`.\n\n* The `<ul>` around this list will also have the class `myClass`\n* List item 2\n\n@@\n```\n\nNote that classes and styles can be mixed subject to the rule that styles must precede classes. For example\n\n```\n@@.myFirstClass.mySecondClass\n@@width:100px;.myThirdClass\nThis is a paragraph\n@@\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"styleblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(?:\\.([^\\r\\n\\s]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEndString = \"^@@(?:\\\\r?\\\\n)?\";\n\tvar classes = [], styles = [];\n\tdo {\n\t\t// Get the class and style\n\t\tif(this.match[1]) {\n\t\t\tstyles.push(this.match[1]);\n\t\t}\n\t\tif(this.match[2]) {\n\t\t\tclasses.push(this.match[2].split(\".\").join(\" \"));\n\t\t}\n\t\t// Move past the match\n\t\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t\t// Look for another line of classes and styles\n\t\tthis.match = this.matchRegExp.exec(this.parser.source);\n\t} while(this.match && this.match.index === this.parser.pos);\n\t// Parse the body\n\tvar tree = this.parser.parseBlocks(reEndString);\n\tfor(var t=0; t<tree.length; t++) {\n\t\tif(classes.length > 0) {\n\t\t\t$tw.utils.addClassToParseTreeNode(tree[t],classes.join(\" \"));\n\t\t}\n\t\tif(styles.length > 0) {\n\t\t\t$tw.utils.addAttributeToParseTreeNode(tree[t],\"style\",styles.join(\"\"));\n\t\t}\n\t}\n\treturn tree;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/styleinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/styleinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/styleinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for assigning styles and classes to inline runs. For example:\n\n```\n@@.myClass This is some text with a class@@\n@@background-color:red;This is some text with a background colour@@\n@@width:100px;.myClass This is some text with a class and a width@@\n```\n\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"styleinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /@@((?:[^\\.\\r\\n\\s:]+:[^\\r\\n;]+;)+)?(\\.(?:[^\\r\\n\\s]+)\\s+)?/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /@@/g;\n\t// Get the styles and class\n\tvar stylesString = this.match[1],\n\t\tclassString = this.match[2] ? this.match[2].split(\".\").join(\" \") : undefined;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse the run up to the terminator\n\tvar tree = this.parser.parseInlineRun(reEnd,{eatTerminator: true});\n\t// Return the classed span\n\tvar node = {\n\t\ttype: \"element\",\n\t\ttag: \"span\",\n\t\tattributes: {\n\t\t\t\"class\": {type: \"string\", value: \"tc-inline-style\"}\n\t\t},\n\t\tchildren: tree\n\t};\n\tif(classString) {\n\t\t$tw.utils.addClassToParseTreeNode(node,classString);\n\t}\n\tif(stylesString) {\n\t\t$tw.utils.addAttributeToParseTreeNode(node,\"style\",stylesString);\n\t}\n\treturn [node];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/syslink.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/syslink.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/syslink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for system tiddler links.\nCan be suppressed preceding them with `~`.\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"syslink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = new RegExp(\n\t\t\"~?\\\\$:\\\\/[\" +\n\t\t$tw.config.textPrimitives.anyLetter.substr(1,$tw.config.textPrimitives.anyLetter.length - 2) +\n\t\t\"\\/._-]+\",\n\t\t\"mg\"\n\t);\n};\n\nexports.parse = function() {\n\tvar match = this.match[0];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Create the link unless it is suppressed\n\tif(match.substr(0,1) === \"~\") {\n\t\treturn [{type: \"text\", text: match.substr(1)}];\n\t} else {\n\t\treturn [{\n\t\t\ttype: \"link\",\n\t\t\tattributes: {\n\t\t\t\tto: {type: \"string\", value: match}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: match\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/table.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/table.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/table.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text block rule for tables.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"table\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\|(?:[^\\n]*)\\|(?:[fhck]?)\\r?(?:\\n|$)/mg;\n};\n\nvar processRow = function(prevColumns) {\n\tvar cellRegExp = /(?:\\|([^\\n\\|]*)\\|)|(\\|[fhck]?\\r?(?:\\n|$))/mg,\n\t\tcellTermRegExp = /((?:\\x20*)\\|)/mg,\n\t\ttree = [],\n\t\tcol = 0,\n\t\tcolSpanCount = 1,\n\t\tprevCell,\n\t\tvAlign;\n\t// Match a single cell\n\tcellRegExp.lastIndex = this.parser.pos;\n\tvar cellMatch = cellRegExp.exec(this.parser.source);\n\twhile(cellMatch && cellMatch.index === this.parser.pos) {\n\t\tif(cellMatch[1] === \"~\") {\n\t\t\t// Rowspan\n\t\t\tvar last = prevColumns[col];\n\t\t\tif(last) {\n\t\t\t\tlast.rowSpanCount++;\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"rowspan\",last.rowSpanCount);\n\t\t\t\tvAlign = $tw.utils.getAttributeValueFromParseTreeNode(last.element,\"valign\",\"center\");\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"valign\",vAlign);\n\t\t\t\tif(colSpanCount > 1) {\n\t\t\t\t\t$tw.utils.addAttributeToParseTreeNode(last.element,\"colspan\",colSpanCount);\n\t\t\t\t\tcolSpanCount = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \">\") {\n\t\t\t// Colspan\n\t\t\tcolSpanCount++;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[1] === \"<\" && prevCell) {\n\t\t\tcolSpanCount = 1 + $tw.utils.getAttributeValueFromParseTreeNode(prevCell,\"colspan\",1);\n\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\n\t\t\tcolSpanCount = 1;\n\t\t\t// Move to just before the `|` terminating the cell\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t} else if(cellMatch[2]) {\n\t\t\t// End of row\n\t\t\tif(prevCell && colSpanCount > 1) {\n\t\t\t\tif(prevCell.attributes && prevCell.attributes && prevCell.attributes.colspan) {\n\t\t\t\t\t\tcolSpanCount += prevCell.attributes.colspan.value;\n\t\t\t\t} else {\n\t\t\t\t\tcolSpanCount -= 1;\n\t\t\t\t}\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(prevCell,\"colspan\",colSpanCount);\n\t\t\t}\n\t\t\tthis.parser.pos = cellRegExp.lastIndex - 1;\n\t\t\tbreak;\n\t\t} else {\n\t\t\t// For ordinary cells, step beyond the opening `|`\n\t\t\tthis.parser.pos++;\n\t\t\t// Look for a space at the start of the cell\n\t\t\tvar spaceLeft = false;\n\t\t\tvAlign = null;\n\t\t\tif(this.parser.source.substr(this.parser.pos).search(/^\\^([^\\^]|\\^\\^)/) === 0) {\n\t\t\t\tvAlign = \"top\";\n\t\t\t} else if(this.parser.source.substr(this.parser.pos).search(/^,([^,]|,,)/) === 0) {\n\t\t\t\tvAlign = \"bottom\";\n\t\t\t}\n\t\t\tif(vAlign) {\n\t\t\t\tthis.parser.pos++;\n\t\t\t}\n\t\t\tvar chr = this.parser.source.substr(this.parser.pos,1);\n\t\t\twhile(chr === \" \") {\n\t\t\t\tspaceLeft = true;\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tchr = this.parser.source.substr(this.parser.pos,1);\n\t\t\t}\n\t\t\t// Check whether this is a heading cell\n\t\t\tvar cell;\n\t\t\tif(chr === \"!\") {\n\t\t\t\tthis.parser.pos++;\n\t\t\t\tcell = {type: \"element\", tag: \"th\", children: []};\n\t\t\t} else {\n\t\t\t\tcell = {type: \"element\", tag: \"td\", children: []};\n\t\t\t}\n\t\t\ttree.push(cell);\n\t\t\t// Record information about this cell\n\t\t\tprevCell = cell;\n\t\t\tprevColumns[col] = {rowSpanCount:1,element:cell};\n\t\t\t// Check for a colspan\n\t\t\tif(colSpanCount > 1) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"colspan\",colSpanCount);\n\t\t\t\tcolSpanCount = 1;\n\t\t\t}\n\t\t\t// Parse the cell\n\t\t\tcell.children = this.parser.parseInlineRun(cellTermRegExp,{eatTerminator: true});\n\t\t\t// Set the alignment for the cell\n\t\t\tif(vAlign) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"valign\",vAlign);\n\t\t\t}\n\t\t\tif(this.parser.source.substr(this.parser.pos - 2,1) === \" \") { // spaceRight\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",spaceLeft ? \"center\" : \"left\");\n\t\t\t} else if(spaceLeft) {\n\t\t\t\t$tw.utils.addAttributeToParseTreeNode(cell,\"align\",\"right\");\n\t\t\t}\n\t\t\t// Move back to the closing `|`\n\t\t\tthis.parser.pos--;\n\t\t}\n\t\tcol++;\n\t\tcellRegExp.lastIndex = this.parser.pos;\n\t\tcellMatch = cellRegExp.exec(this.parser.source);\n\t}\n\treturn tree;\n};\n\nexports.parse = function() {\n\tvar rowContainerTypes = {\"c\":\"caption\", \"h\":\"thead\", \"\":\"tbody\", \"f\":\"tfoot\"},\n\t\ttable = {type: \"element\", tag: \"table\", children: []},\n\t\trowRegExp = /^\\|([^\\n]*)\\|([fhck]?)\\r?(?:\\n|$)/mg,\n\t\trowTermRegExp = /(\\|(?:[fhck]?)\\r?(?:\\n|$))/mg,\n\t\tprevColumns = [],\n\t\tcurrRowType,\n\t\trowContainer,\n\t\trowCount = 0;\n\t// Match the row\n\trowRegExp.lastIndex = this.parser.pos;\n\tvar rowMatch = rowRegExp.exec(this.parser.source);\n\twhile(rowMatch && rowMatch.index === this.parser.pos) {\n\t\tvar rowType = rowMatch[2];\n\t\t// Check if it is a class assignment\n\t\tif(rowType === \"k\") {\n\t\t\t$tw.utils.addClassToParseTreeNode(table,rowMatch[1]);\n\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t} else {\n\t\t\t// Otherwise, create a new row if this one is of a different type\n\t\t\tif(rowType !== currRowType) {\n\t\t\t\trowContainer = {type: \"element\", tag: rowContainerTypes[rowType], children: []};\n\t\t\t\ttable.children.push(rowContainer);\n\t\t\t\tcurrRowType = rowType;\n\t\t\t}\n\t\t\t// Is this a caption row?\n\t\t\tif(currRowType === \"c\") {\n\t\t\t\t// If so, move past the opening `|` of the row\n\t\t\t\tthis.parser.pos++;\n\t\t\t\t// Move the caption to the first row if it isn't already\n\t\t\t\tif(table.children.length !== 1) {\n\t\t\t\t\ttable.children.pop(); // Take rowContainer out of the children array\n\t\t\t\t\ttable.children.splice(0,0,rowContainer); // Insert it at the bottom\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Set the alignment - TODO: figure out why TW did this\n//\t\t\t\trowContainer.attributes.align = rowCount === 0 ? \"top\" : \"bottom\";\n\t\t\t\t// Parse the caption\n\t\t\t\trowContainer.children = this.parser.parseInlineRun(rowTermRegExp,{eatTerminator: true});\n\t\t\t} else {\n\t\t\t\t// Create the row\n\t\t\t\tvar theRow = {type: \"element\", tag: \"tr\", children: []};\n\t\t\t\t$tw.utils.addClassToParseTreeNode(theRow,rowCount%2 ? \"oddRow\" : \"evenRow\");\n\t\t\t\trowContainer.children.push(theRow);\n\t\t\t\t// Process the row\n\t\t\t\ttheRow.children = processRow.call(this,prevColumns);\n\t\t\t\tthis.parser.pos = rowMatch.index + rowMatch[0].length;\n\t\t\t\t// Increment the row count\n\t\t\t\trowCount++;\n\t\t\t}\n\t\t}\n\t\trowMatch = rowRegExp.exec(this.parser.source);\n\t}\n\treturn [table];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for block-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"transcludeblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}(?:\\r?\\n|$)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \"transclude\",\n\t\t\tattributes: {},\n\t\t\tisBlock: true\n\t\t};\n\t// Prepare the tiddler widget\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\n\tif(textRef) {\n\t\ttr = $tw.utils.parseTextReference(textRef);\n\t\ttargetTitle = tr.title;\n\t\ttargetField = tr.field;\n\t\ttargetIndex = tr.index;\n\t\ttiddlerNode = {\n\t\t\ttype: \"tiddler\",\n\t\t\tattributes: {\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\n\t\t\t},\n\t\t\tisBlock: true,\n\t\t\tchildren: [transcludeNode]\n\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/transcludeinline.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/transcludeinline.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/transcludeinline.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for inline-level transclusion. For example:\n\n```\n{{MyTiddler}}\n{{MyTiddler||TemplateTitle}}\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"transcludeinline\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\{\\{([^\\{\\}\\|]*)(?:\\|\\|([^\\|\\{\\}]+))?\\}\\}/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Get the match details\n\tvar template = $tw.utils.trim(this.match[2]),\n\t\ttextRef = $tw.utils.trim(this.match[1]);\n\t// Prepare the transclude widget\n\tvar transcludeNode = {\n\t\t\ttype: \"transclude\",\n\t\t\tattributes: {}\n\t\t};\n\t// Prepare the tiddler widget\n\tvar tr, targetTitle, targetField, targetIndex, tiddlerNode;\n\tif(textRef) {\n\t\ttr = $tw.utils.parseTextReference(textRef);\n\t\ttargetTitle = tr.title;\n\t\ttargetField = tr.field;\n\t\ttargetIndex = tr.index;\n\t\ttiddlerNode = {\n\t\t\ttype: \"tiddler\",\n\t\t\tattributes: {\n\t\t\t\ttiddler: {type: \"string\", value: targetTitle}\n\t\t\t},\n\t\t\tchildren: [transcludeNode]\n\t\t};\n\t}\n\tif(template) {\n\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: template};\n\t\tif(textRef) {\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t} else {\n\t\tif(textRef) {\n\t\t\ttranscludeNode.attributes.tiddler = {type: \"string\", value: targetTitle};\n\t\t\tif(targetField) {\n\t\t\t\ttranscludeNode.attributes.field = {type: \"string\", value: targetField};\n\t\t\t}\n\t\t\tif(targetIndex) {\n\t\t\t\ttranscludeNode.attributes.index = {type: \"string\", value: targetIndex};\n\t\t\t}\n\t\t\treturn [tiddlerNode];\n\t\t} else {\n\t\t\treturn [transcludeNode];\n\t\t}\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/typedblock.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/typedblock.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/typedblock.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text rule for typed blocks. For example:\n\n```\n$$$.js\nThis will be rendered as JavaScript\n$$$\n\n$$$.svg\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"150\" height=\"100\">\n <circle cx=\"100\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"2\" fill=\"red\" />\n</svg>\n$$$\n\n$$$text/vnd.tiddlywiki>text/html\nThis will be rendered as an //HTML representation// of WikiText\n$$$\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.name = \"typedblock\";\nexports.types = {block: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\$\\$\\$([^ >\\r\\n]*)(?: *> *([^ \\r\\n]+))?\\r?\\n/mg;\n};\n\nexports.parse = function() {\n\tvar reEnd = /\\r?\\n\\$\\$\\$\\r?(?:\\n|$)/mg;\n\t// Save the type\n\tvar parseType = this.match[1],\n\t\trenderType = this.match[2];\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Look for the end of the block\n\treEnd.lastIndex = this.parser.pos;\n\tvar match = reEnd.exec(this.parser.source),\n\t\ttext;\n\t// Process the block\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\t// Parse the block according to the specified type\n\tvar parser = this.parser.wiki.parseText(parseType,text,{defaultType: \"text/plain\"});\n\t// If there's no render type, just return the parse tree\n\tif(!renderType) {\n\t\treturn parser.tree;\n\t} else {\n\t\t// Otherwise, render to the rendertype and return in a <PRE> tag\n\t\tvar widgetNode = this.parser.wiki.makeWidget(parser),\n\t\t\tcontainer = $tw.fakeDocument.createElement(\"div\");\n\t\twidgetNode.render(container,null);\n\t\ttext = renderType === \"text/html\" ? container.innerHTML : container.textContent;\n\t\treturn [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"pre\",\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\ttext: text\n\t\t\t}]\n\t\t}];\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/whitespace.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/whitespace.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/whitespace.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki pragma rule for whitespace specifications\n\n```\n\\whitespace trim\n\\whitespace notrim\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"whitespace\";\nexports.types = {pragma: true};\n\n/*\nInstantiate parse rule\n*/\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /^\\\\whitespace[^\\S\\n]/mg;\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\tvar self = this;\n\t// Move past the pragma invocation\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Parse whitespace delimited tokens terminated by a line break\n\tvar reMatch = /[^\\S\\n]*(\\S+)|(\\r?\\n)/mg,\n\t\ttokens = [];\n\treMatch.lastIndex = this.parser.pos;\n\tvar match = reMatch.exec(this.parser.source);\n\twhile(match && match.index === this.parser.pos) {\n\t\tthis.parser.pos = reMatch.lastIndex;\n\t\t// Exit if we've got the line break\n\t\tif(match[2]) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the token\n\t\tif(match[1]) {\n\t\t\ttokens.push(match[1]);\n\t\t}\n\t\t// Match the next token\n\t\tmatch = reMatch.exec(this.parser.source);\n\t}\n\t// Process the tokens\n\t$tw.utils.each(tokens,function(token) {\n\t\tswitch(token) {\n\t\t\tcase \"trim\":\n\t\t\t\tself.parser.configTrimWhiteSpace = true;\n\t\t\t\tbreak;\n\t\t\tcase \"notrim\":\n\t\t\t\tself.parser.configTrimWhiteSpace = false;\n\t\t\t\tbreak;\n\t\t}\n\t});\n\t// No parse tree nodes to return\n\treturn [];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/rules/wikilink.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/wikilink.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikilink.js\ntype: application/javascript\nmodule-type: wikirule\n\nWiki text inline rule for wiki links. For example:\n\n```\nAWikiLink\nAnotherLink\n~SuppressedLink\n```\n\nPrecede a camel case word with `~` to prevent it from being recognised as a link.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"wikilink\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = new RegExp($tw.config.textPrimitives.unWikiLink + \"?\" + $tw.config.textPrimitives.wikiLink,\"mg\");\n};\n\n/*\nParse the most recent match\n*/\nexports.parse = function() {\n\t// Get the details of the match\n\tvar linkText = this.match[0];\n\t// Move past the macro call\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// If the link starts with the unwikilink character then just output it as plain text\n\tif(linkText.substr(0,1) === $tw.config.textPrimitives.unWikiLink) {\n\t\treturn [{type: \"text\", text: linkText.substr(1)}];\n\t}\n\t// If the link has been preceded with a blocked letter then don't treat it as a link\n\tif(this.match.index > 0) {\n\t\tvar preRegExp = new RegExp($tw.config.textPrimitives.blockPrefixLetters,\"mg\");\n\t\tpreRegExp.lastIndex = this.match.index-1;\n\t\tvar preMatch = preRegExp.exec(this.parser.source);\n\t\tif(preMatch && preMatch.index === this.match.index-1) {\n\t\t\treturn [{type: \"text\", text: linkText}];\n\t\t}\n\t}\n\treturn [{\n\t\ttype: \"link\",\n\t\tattributes: {\n\t\t\tto: {type: \"string\", value: linkText}\n\t\t},\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\ttext: linkText\n\t\t}]\n\t}];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "wikirule"
},
"$:/core/modules/parsers/wikiparser/wikiparser.js": {
"title": "$:/core/modules/parsers/wikiparser/wikiparser.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/wikiparser.js\ntype: application/javascript\nmodule-type: parser\n\nThe wiki text parser processes blocks of source text into a parse tree.\n\nThe parse tree is made up of nested arrays of these JavaScript objects:\n\n\t{type: \"element\", tag: <string>, attributes: {}, children: []} - an HTML element\n\t{type: \"text\", text: <string>} - a text node\n\t{type: \"entity\", value: <string>} - an entity\n\t{type: \"raw\", html: <string>} - raw HTML\n\nAttributes are stored as hashmaps of the following objects:\n\n\t{type: \"string\", value: <string>} - literal string\n\t{type: \"indirect\", textReference: <textReference>} - indirect through a text reference\n\t{type: \"macro\", macro: <TBD>} - indirect through a macro invocation\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar WikiParser = function(type,text,options) {\n\tthis.wiki = options.wiki;\n\tvar self = this;\n\t// Check for an externally linked tiddler\n\tif($tw.browser && (text || \"\") === \"\" && options._canonical_uri) {\n\t\tthis.loadRemoteTiddler(options._canonical_uri);\n\t\ttext = $tw.language.getRawString(\"LazyLoadingWarning\");\n\t}\n\t// Initialise the classes if we don't have them already\n\tif(!this.pragmaRuleClasses) {\n\t\tWikiParser.prototype.pragmaRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"pragma\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.pragmaRuleClasses,\"$:/config/WikiParserRules/Pragmas/\");\n\t}\n\tif(!this.blockRuleClasses) {\n\t\tWikiParser.prototype.blockRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"block\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.blockRuleClasses,\"$:/config/WikiParserRules/Block/\");\n\t}\n\tif(!this.inlineRuleClasses) {\n\t\tWikiParser.prototype.inlineRuleClasses = $tw.modules.createClassesFromModules(\"wikirule\",\"inline\",$tw.WikiRuleBase);\n\t\tthis.setupRules(WikiParser.prototype.inlineRuleClasses,\"$:/config/WikiParserRules/Inline/\");\n\t}\n\t// Save the parse text\n\tthis.type = type || \"text/vnd.tiddlywiki\";\n\tthis.source = text || \"\";\n\tthis.sourceLength = this.source.length;\n\t// Flag for ignoring whitespace\n\tthis.configTrimWhiteSpace = false;\n\t// Set current parse position\n\tthis.pos = 0;\n\t// Instantiate the pragma parse rules\n\tthis.pragmaRules = this.instantiateRules(this.pragmaRuleClasses,\"pragma\",0);\n\t// Instantiate the parser block and inline rules\n\tthis.blockRules = this.instantiateRules(this.blockRuleClasses,\"block\",0);\n\tthis.inlineRules = this.instantiateRules(this.inlineRuleClasses,\"inline\",0);\n\t// Parse any pragmas\n\tthis.tree = [];\n\tvar topBranch = this.parsePragmas();\n\t// Parse the text into inline runs or blocks\n\tif(options.parseAsInline) {\n\t\ttopBranch.push.apply(topBranch,this.parseInlineRun());\n\t} else {\n\t\ttopBranch.push.apply(topBranch,this.parseBlocks());\n\t}\n\t// Return the parse tree\n};\n\n/*\n*/\nWikiParser.prototype.loadRemoteTiddler = function(url) {\n\tvar self = this;\n\t$tw.utils.httpRequest({\n\t\turl: url,\n\t\ttype: \"GET\",\n\t\tcallback: function(err,data) {\n\t\t\tif(!err) {\n\t\t\t\tvar tiddlers = self.wiki.deserializeTiddlers(\".tid\",data,self.wiki.getCreationFields());\n\t\t\t\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\t\t\t\ttiddler[\"_canonical_uri\"] = url;\n\t\t\t\t});\n\t\t\t\tif(tiddlers) {\n\t\t\t\t\tself.wiki.addTiddlers(tiddlers);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\n*/\nWikiParser.prototype.setupRules = function(proto,configPrefix) {\n\tvar self = this;\n\tif(!$tw.safemode) {\n\t\t$tw.utils.each(proto,function(object,name) {\n\t\t\tif(self.wiki.getTiddlerText(configPrefix + name,\"enable\") !== \"enable\") {\n\t\t\t\tdelete proto[name];\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nInstantiate an array of parse rules\n*/\nWikiParser.prototype.instantiateRules = function(classes,type,startPos) {\n\tvar rulesInfo = [],\n\t\tself = this;\n\t$tw.utils.each(classes,function(RuleClass) {\n\t\t// Instantiate the rule\n\t\tvar rule = new RuleClass(self);\n\t\trule.is = {};\n\t\trule.is[type] = true;\n\t\trule.init(self);\n\t\tvar matchIndex = rule.findNextMatch(startPos);\n\t\tif(matchIndex !== undefined) {\n\t\t\trulesInfo.push({\n\t\t\t\trule: rule,\n\t\t\t\tmatchIndex: matchIndex\n\t\t\t});\n\t\t}\n\t});\n\treturn rulesInfo;\n};\n\n/*\nSkip any whitespace at the current position. Options are:\n\ttreatNewlinesAsNonWhitespace: true if newlines are NOT to be treated as whitespace\n*/\nWikiParser.prototype.skipWhitespace = function(options) {\n\toptions = options || {};\n\tvar whitespaceRegExp = options.treatNewlinesAsNonWhitespace ? /([^\\S\\n]+)/mg : /(\\s+)/mg;\n\twhitespaceRegExp.lastIndex = this.pos;\n\tvar whitespaceMatch = whitespaceRegExp.exec(this.source);\n\tif(whitespaceMatch && whitespaceMatch.index === this.pos) {\n\t\tthis.pos = whitespaceRegExp.lastIndex;\n\t}\n};\n\n/*\nGet the next match out of an array of parse rule instances\n*/\nWikiParser.prototype.findNextMatch = function(rules,startPos) {\n\t// Find the best matching rule by finding the closest match position\n\tvar matchingRule,\n\t\tmatchingRulePos = this.sourceLength;\n\t// Step through each rule\n\tfor(var t=0; t<rules.length; t++) {\n\t\tvar ruleInfo = rules[t];\n\t\t// Ask the rule to get the next match if we've moved past the current one\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex < startPos) {\n\t\t\truleInfo.matchIndex = ruleInfo.rule.findNextMatch(startPos);\n\t\t}\n\t\t// Adopt this match if it's closer than the current best match\n\t\tif(ruleInfo.matchIndex !== undefined && ruleInfo.matchIndex <= matchingRulePos) {\n\t\t\tmatchingRule = ruleInfo;\n\t\t\tmatchingRulePos = ruleInfo.matchIndex;\n\t\t}\n\t}\n\treturn matchingRule;\n};\n\n/*\nParse any pragmas at the beginning of a block of parse text\n*/\nWikiParser.prototype.parsePragmas = function() {\n\tvar currentTreeBranch = this.tree;\n\twhile(true) {\n\t\t// Skip whitespace\n\t\tthis.skipWhitespace();\n\t\t// Check for the end of the text\n\t\tif(this.pos >= this.sourceLength) {\n\t\t\tbreak;\n\t\t}\n\t\t// Check if we've arrived at a pragma rule match\n\t\tvar nextMatch = this.findNextMatch(this.pragmaRules,this.pos);\n\t\t// If not, just exit\n\t\tif(!nextMatch || nextMatch.matchIndex !== this.pos) {\n\t\t\tbreak;\n\t\t}\n\t\t// Process the pragma rule\n\t\tvar subTree = nextMatch.rule.parse();\n\t\tif(subTree.length > 0) {\n\t\t\t// Quick hack; we only cope with a single parse tree node being returned, which is true at the moment\n\t\t\tcurrentTreeBranch.push.apply(currentTreeBranch,subTree);\n\t\t\tsubTree[0].children = [];\n\t\t\tcurrentTreeBranch = subTree[0].children;\n\t\t}\n\t}\n\treturn currentTreeBranch;\n};\n\n/*\nParse a block from the current position\n\tterminatorRegExpString: optional regular expression string that identifies the end of plain paragraphs. Must not include capturing parenthesis\n*/\nWikiParser.prototype.parseBlock = function(terminatorRegExpString) {\n\tvar terminatorRegExp = terminatorRegExpString ? new RegExp(\"(\" + terminatorRegExpString + \"|\\\\r?\\\\n\\\\r?\\\\n)\",\"mg\") : /(\\r?\\n\\r?\\n)/mg;\n\tthis.skipWhitespace();\n\tif(this.pos >= this.sourceLength) {\n\t\treturn [];\n\t}\n\t// Look for a block rule that applies at the current position\n\tvar nextMatch = this.findNextMatch(this.blockRules,this.pos);\n\tif(nextMatch && nextMatch.matchIndex === this.pos) {\n\t\treturn nextMatch.rule.parse();\n\t}\n\t// Treat it as a paragraph if we didn't find a block rule\n\treturn [{type: \"element\", tag: \"p\", children: this.parseInlineRun(terminatorRegExp)}];\n};\n\n/*\nParse a series of blocks of text until a terminating regexp is encountered or the end of the text\n\tterminatorRegExpString: terminating regular expression\n*/\nWikiParser.prototype.parseBlocks = function(terminatorRegExpString) {\n\tif(terminatorRegExpString) {\n\t\treturn this.parseBlocksTerminated(terminatorRegExpString);\n\t} else {\n\t\treturn this.parseBlocksUnterminated();\n\t}\n};\n\n/*\nParse a block from the current position to the end of the text\n*/\nWikiParser.prototype.parseBlocksUnterminated = function() {\n\tvar tree = [];\n\twhile(this.pos < this.sourceLength) {\n\t\ttree.push.apply(tree,this.parseBlock());\n\t}\n\treturn tree;\n};\n\n/*\nParse blocks of text until a terminating regexp is encountered\n*/\nWikiParser.prototype.parseBlocksTerminated = function(terminatorRegExpString) {\n\tvar terminatorRegExp = new RegExp(\"(\" + terminatorRegExpString + \")\",\"mg\"),\n\t\ttree = [];\n\t// Skip any whitespace\n\tthis.skipWhitespace();\n\t// Check if we've got the end marker\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar match = terminatorRegExp.exec(this.source);\n\t// Parse the text into blocks\n\twhile(this.pos < this.sourceLength && !(match && match.index === this.pos)) {\n\t\tvar blocks = this.parseBlock(terminatorRegExpString);\n\t\ttree.push.apply(tree,blocks);\n\t\t// Skip any whitespace\n\t\tthis.skipWhitespace();\n\t\t// Check if we've got the end marker\n\t\tterminatorRegExp.lastIndex = this.pos;\n\t\tmatch = terminatorRegExp.exec(this.source);\n\t}\n\tif(match && match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t}\n\treturn tree;\n};\n\n/*\nParse a run of text at the current position\n\tterminatorRegExp: a regexp at which to stop the run\n\toptions: see below\nOptions available:\n\teatTerminator: move the parse position past any encountered terminator (default false)\n*/\nWikiParser.prototype.parseInlineRun = function(terminatorRegExp,options) {\n\tif(terminatorRegExp) {\n\t\treturn this.parseInlineRunTerminated(terminatorRegExp,options);\n\t} else {\n\t\treturn this.parseInlineRunUnterminated(options);\n\t}\n};\n\nWikiParser.prototype.parseInlineRunUnterminated = function(options) {\n\tvar tree = [];\n\t// Find the next occurrence of an inline rule\n\tvar nextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around the matches until we've reached the end of the text\n\twhile(this.pos < this.sourceLength && nextMatch) {\n\t\t// Process the text preceding the run rule\n\t\tif(nextMatch.matchIndex > this.pos) {\n\t\t\tthis.pushTextWidget(tree,this.source.substring(this.pos,nextMatch.matchIndex));\n\t\t\tthis.pos = nextMatch.matchIndex;\n\t\t}\n\t\t// Process the run rule\n\t\ttree.push.apply(tree,nextMatch.rule.parse());\n\t\t// Look for the next run rule\n\t\tnextMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t}\n\t// Process the remaining text\n\tif(this.pos < this.sourceLength) {\n\t\tthis.pushTextWidget(tree,this.source.substr(this.pos));\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\nWikiParser.prototype.parseInlineRunTerminated = function(terminatorRegExp,options) {\n\toptions = options || {};\n\tvar tree = [];\n\t// Find the next occurrence of the terminator\n\tterminatorRegExp.lastIndex = this.pos;\n\tvar terminatorMatch = terminatorRegExp.exec(this.source);\n\t// Find the next occurrence of a inlinerule\n\tvar inlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t// Loop around until we've reached the end of the text\n\twhile(this.pos < this.sourceLength && (terminatorMatch || inlineRuleMatch)) {\n\t\t// Return if we've found the terminator, and it precedes any inline rule match\n\t\tif(terminatorMatch) {\n\t\t\tif(!inlineRuleMatch || inlineRuleMatch.matchIndex >= terminatorMatch.index) {\n\t\t\t\tif(terminatorMatch.index > this.pos) {\n\t\t\t\t\tthis.pushTextWidget(tree,this.source.substring(this.pos,terminatorMatch.index));\n\t\t\t\t}\n\t\t\t\tthis.pos = terminatorMatch.index;\n\t\t\t\tif(options.eatTerminator) {\n\t\t\t\t\tthis.pos += terminatorMatch[0].length;\n\t\t\t\t}\n\t\t\t\treturn tree;\n\t\t\t}\n\t\t}\n\t\t// Process any inline rule, along with the text preceding it\n\t\tif(inlineRuleMatch) {\n\t\t\t// Preceding text\n\t\t\tif(inlineRuleMatch.matchIndex > this.pos) {\n\t\t\t\tthis.pushTextWidget(tree,this.source.substring(this.pos,inlineRuleMatch.matchIndex));\n\t\t\t\tthis.pos = inlineRuleMatch.matchIndex;\n\t\t\t}\n\t\t\t// Process the inline rule\n\t\t\ttree.push.apply(tree,inlineRuleMatch.rule.parse());\n\t\t\t// Look for the next inline rule\n\t\t\tinlineRuleMatch = this.findNextMatch(this.inlineRules,this.pos);\n\t\t\t// Look for the next terminator match\n\t\t\tterminatorRegExp.lastIndex = this.pos;\n\t\t\tterminatorMatch = terminatorRegExp.exec(this.source);\n\t\t}\n\t}\n\t// Process the remaining text\n\tif(this.pos < this.sourceLength) {\n\t\tthis.pushTextWidget(tree,this.source.substr(this.pos));\n\t}\n\tthis.pos = this.sourceLength;\n\treturn tree;\n};\n\n/*\nPush a text widget onto an array, respecting the configTrimWhiteSpace setting\n*/\nWikiParser.prototype.pushTextWidget = function(array,text) {\n\tif(this.configTrimWhiteSpace) {\n\t\ttext = $tw.utils.trim(text);\n\t}\n\tif(text) {\n\t\tarray.push({type: \"text\", text: text});\t\t\n\t}\n};\n\n/*\nParse zero or more class specifiers `.classname`\n*/\nWikiParser.prototype.parseClasses = function() {\n\tvar classRegExp = /\\.([^\\s\\.]+)/mg,\n\t\tclassNames = [];\n\tclassRegExp.lastIndex = this.pos;\n\tvar match = classRegExp.exec(this.source);\n\twhile(match && match.index === this.pos) {\n\t\tthis.pos = match.index + match[0].length;\n\t\tclassNames.push(match[1]);\n\t\tmatch = classRegExp.exec(this.source);\n\t}\n\treturn classNames;\n};\n\n/*\nAmend the rules used by this instance of the parser\n\ttype: `only` keeps just the named rules, `except` keeps all but the named rules\n\tnames: array of rule names\n*/\nWikiParser.prototype.amendRules = function(type,names) {\n\tnames = names || [];\n\t// Define the filter function\n\tvar keepFilter;\n\tif(type === \"only\") {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) !== -1;\n\t\t};\n\t} else if(type === \"except\") {\n\t\tkeepFilter = function(name) {\n\t\t\treturn names.indexOf(name) === -1;\n\t\t};\n\t} else {\n\t\treturn;\n\t}\n\t// Define a function to process each of our rule arrays\n\tvar processRuleArray = function(ruleArray) {\n\t\tfor(var t=ruleArray.length-1; t>=0; t--) {\n\t\t\tif(!keepFilter(ruleArray[t].rule.name)) {\n\t\t\t\truleArray.splice(t,1);\n\t\t\t}\n\t\t}\n\t};\n\t// Process each rule array\n\tprocessRuleArray(this.pragmaRules);\n\tprocessRuleArray(this.blockRules);\n\tprocessRuleArray(this.inlineRules);\n};\n\nexports[\"text/vnd.tiddlywiki\"] = WikiParser;\n\n})();\n\n",
"type": "application/javascript",
"module-type": "parser"
},
"$:/core/modules/parsers/wikiparser/rules/wikirulebase.js": {
"title": "$:/core/modules/parsers/wikiparser/rules/wikirulebase.js",
"text": "/*\\\ntitle: $:/core/modules/parsers/wikiparser/rules/wikirulebase.js\ntype: application/javascript\nmodule-type: global\n\nBase class for wiki parser rules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nThis constructor is always overridden with a blank constructor, and so shouldn't be used\n*/\nvar WikiRuleBase = function() {\n};\n\n/*\nTo be overridden by individual rules\n*/\nWikiRuleBase.prototype.init = function(parser) {\n\tthis.parser = parser;\n};\n\n/*\nDefault implementation of findNextMatch uses RegExp matching\n*/\nWikiRuleBase.prototype.findNextMatch = function(startPos) {\n\tthis.matchRegExp.lastIndex = startPos;\n\tthis.match = this.matchRegExp.exec(this.parser.source);\n\treturn this.match ? this.match.index : undefined;\n};\n\nexports.WikiRuleBase = WikiRuleBase;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/pluginswitcher.js": {
"title": "$:/core/modules/pluginswitcher.js",
"text": "/*\\\ntitle: $:/core/modules/pluginswitcher.js\ntype: application/javascript\nmodule-type: global\n\nManages switching plugins for themes and languages.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\noptions:\nwiki: wiki store to be used\npluginType: type of plugin to be switched\ncontrollerTitle: title of tiddler used to control switching of this resource\ndefaultPlugins: array of default plugins to be used if nominated plugin isn't found\nonSwitch: callback when plugin is switched (single parameter is array of plugin titles)\n*/\nfunction PluginSwitcher(options) {\n\tthis.wiki = options.wiki;\n\tthis.pluginType = options.pluginType;\n\tthis.controllerTitle = options.controllerTitle;\n\tthis.defaultPlugins = options.defaultPlugins || [];\n\tthis.onSwitch = options.onSwitch;\n\t// Switch to the current plugin\n\tthis.switchPlugins();\n\t// Listen for changes to the selected plugin\n\tvar self = this;\n\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,self.controllerTitle)) {\n\t\t\tself.switchPlugins();\n\t\t}\n\t});\n}\n\nPluginSwitcher.prototype.switchPlugins = function() {\n\t// Get the name of the current theme\n\tvar selectedPluginTitle = this.wiki.getTiddlerText(this.controllerTitle);\n\t// If it doesn't exist, then fallback to one of the default themes\n\tvar index = 0;\n\twhile(!this.wiki.getTiddler(selectedPluginTitle) && index < this.defaultPlugins.length) {\n\t\tselectedPluginTitle = this.defaultPlugins[index++];\n\t}\n\t// Accumulate the titles of the plugins that we need to load\n\tvar plugins = [],\n\t\tself = this,\n\t\taccumulatePlugin = function(title) {\n\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\tif(tiddler && tiddler.isPlugin() && plugins.indexOf(title) === -1) {\n\t\t\t\tplugins.push(title);\n\t\t\t\tvar pluginInfo = JSON.parse(self.wiki.getTiddlerText(title)),\n\t\t\t\t\tdependents = $tw.utils.parseStringArray(tiddler.fields.dependents || \"\");\n\t\t\t\t$tw.utils.each(dependents,function(title) {\n\t\t\t\t\taccumulatePlugin(title);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\taccumulatePlugin(selectedPluginTitle);\n\t// Unregister any existing theme tiddlers\n\tvar unregisteredTiddlers = $tw.wiki.unregisterPluginTiddlers(this.pluginType);\n\t// Register any new theme tiddlers\n\tvar registeredTiddlers = $tw.wiki.registerPluginTiddlers(this.pluginType,plugins);\n\t// Unpack the current theme tiddlers\n\t$tw.wiki.unpackPluginTiddlers();\n\t// Call the switch handler\n\tif(this.onSwitch) {\n\t\tthis.onSwitch(plugins);\n\t}\n};\n\nexports.PluginSwitcher = PluginSwitcher;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/saver-handler.js": {
"title": "$:/core/modules/saver-handler.js",
"text": "/*\\\ntitle: $:/core/modules/saver-handler.js\ntype: application/javascript\nmodule-type: global\n\nThe saver handler tracks changes to the store and handles saving the entire wiki via saver modules.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInstantiate the saver handler with the following options:\nwiki: wiki to be synced\ndirtyTracking: true if dirty tracking should be performed\n*/\nfunction SaverHandler(options) {\n\tvar self = this;\n\tthis.wiki = options.wiki;\n\tthis.dirtyTracking = options.dirtyTracking;\n\tthis.pendingAutoSave = false;\n\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\"saver-handler\");\n\t// Initialise our savers\n\tif($tw.browser) {\n\t\tthis.initSavers();\n\t}\n\t// Only do dirty tracking if required\n\tif($tw.browser && this.dirtyTracking) {\n\t\t// Compile the dirty tiddler filter\n\t\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\n\t\t// Count of changes that have not yet been saved\n\t\tthis.numChanges = 0;\n\t\t// Listen out for changes to tiddlers\n\t\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\t\t// Filter the changes so that we only count changes to tiddlers that we care about\n\t\t\tvar filteredChanges = self.filterFn.call(self.wiki,function(iterator) {\n\t\t\t\t$tw.utils.each(changes,function(change,title) {\n\t\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\t\t\titerator(tiddler,title);\n\t\t\t\t});\n\t\t\t});\n\t\t\t// Adjust the number of changes\n\t\t\tself.numChanges += filteredChanges.length;\n\t\t\tself.updateDirtyStatus();\n\t\t\t// Do any autosave if one is pending and there's no more change events\n\t\t\tif(self.pendingAutoSave && self.wiki.getSizeOfTiddlerEventQueue() === 0) {\n\t\t\t\t// Check if we're dirty\n\t\t\t\tif(self.numChanges > 0) {\n\t\t\t\t\tself.saveWiki({\n\t\t\t\t\t\tmethod: \"autosave\",\n\t\t\t\t\t\tdownloadType: \"text/plain\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tself.pendingAutoSave = false;\n\t\t\t}\n\t\t});\n\t\t// Listen for the autosave event\n\t\t$tw.rootWidget.addEventListener(\"tm-auto-save-wiki\",function(event) {\n\t\t\t// Do the autosave unless there are outstanding tiddler change events\n\t\t\tif(self.wiki.getSizeOfTiddlerEventQueue() === 0) {\n\t\t\t\t// Check if we're dirty\n\t\t\t\tif(self.numChanges > 0) {\n\t\t\t\t\tself.saveWiki({\n\t\t\t\t\t\tmethod: \"autosave\",\n\t\t\t\t\t\tdownloadType: \"text/plain\"\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Otherwise put ourselves in the \"pending autosave\" state and wait for the change event before we do the autosave\n\t\t\t\tself.pendingAutoSave = true;\n\t\t\t}\n\t\t});\n\t\t// Set up our beforeunload handler\n\t\t$tw.addUnloadTask(function(event) {\n\t\t\tvar confirmationMessage;\n\t\t\tif(self.isDirty()) {\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\n\t\t\t}\n\t\t\treturn confirmationMessage;\n\t\t});\n\t}\n\t// Install the save action handlers\n\tif($tw.browser) {\n\t\t$tw.rootWidget.addEventListener(\"tm-save-wiki\",function(event) {\n\t\t\tself.saveWiki({\n\t\t\t\ttemplate: event.param,\n\t\t\t\tdownloadType: \"text/plain\",\n\t\t\t\tvariables: event.paramObject\n\t\t\t});\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-download-file\",function(event) {\n\t\t\tself.saveWiki({\n\t\t\t\tmethod: \"download\",\n\t\t\t\ttemplate: event.param,\n\t\t\t\tdownloadType: \"text/plain\",\n\t\t\t\tvariables: event.paramObject\n\t\t\t});\n\t\t});\n\t}\n}\n\nSaverHandler.prototype.titleSyncFilter = \"$:/config/SaverFilter\";\nSaverHandler.prototype.titleAutoSave = \"$:/config/AutoSave\";\nSaverHandler.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\n\n/*\nSelect the appropriate saver modules and set them up\n*/\nSaverHandler.prototype.initSavers = function(moduleType) {\n\tmoduleType = moduleType || \"saver\";\n\t// Instantiate the available savers\n\tthis.savers = [];\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(moduleType,function(title,module) {\n\t\tif(module.canSave(self)) {\n\t\t\tself.savers.push(module.create(self.wiki));\n\t\t}\n\t});\n\t// Sort the savers into priority order\n\tthis.savers.sort(function(a,b) {\n\t\tif(a.info.priority < b.info.priority) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(a.info.priority > b.info.priority) {\n\t\t\t\treturn +1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nSave the wiki contents. Options are:\n\tmethod: \"save\", \"autosave\" or \"download\"\n\ttemplate: the tiddler containing the template to save\n\tdownloadType: the content type for the saved file\n*/\nSaverHandler.prototype.saveWiki = function(options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tmethod = options.method || \"save\",\n\t\tvariables = options.variables || {},\n\t\ttemplate = options.template || \"$:/core/save/all\",\n\t\tdownloadType = options.downloadType || \"text/plain\",\n\t\ttext = this.wiki.renderTiddler(downloadType,template,options),\n\t\tcallback = function(err) {\n\t\t\tif(err) {\n\t\t\t\talert($tw.language.getString(\"Error/WhileSaving\") + \":\\n\\n\" + err);\n\t\t\t} else {\n\t\t\t\t// Clear the task queue if we're saving (rather than downloading)\n\t\t\t\tif(method !== \"download\") {\n\t\t\t\t\tself.numChanges = 0;\n\t\t\t\t\tself.updateDirtyStatus();\n\t\t\t\t}\n\t\t\t\t$tw.notifier.display(self.titleSavedNotification);\n\t\t\t\tif(options.callback) {\n\t\t\t\t\toptions.callback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t// Ignore autosave if disabled\n\tif(method === \"autosave\" && this.wiki.getTiddlerText(this.titleAutoSave,\"yes\") !== \"yes\") {\n\t\treturn false;\n\t}\n\t// Call the highest priority saver that supports this method\n\tfor(var t=this.savers.length-1; t>=0; t--) {\n\t\tvar saver = this.savers[t];\n\t\tif(saver.info.capabilities.indexOf(method) !== -1 && saver.save(text,method,callback,{variables: {filename: variables.filename}})) {\n\t\t\tthis.logger.log(\"Saving wiki with method\",method,\"through saver\",saver.info.name);\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n\n/*\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\n*/\nSaverHandler.prototype.isDirty = function() {\n\treturn this.numChanges > 0;\n};\n\n/*\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\n*/\nSaverHandler.prototype.updateDirtyStatus = function() {\n\tif($tw.browser) {\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\n\t}\n};\n\nexports.SaverHandler = SaverHandler;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/savers/andtidwiki.js": {
"title": "$:/core/modules/savers/andtidwiki.js",
"text": "/*\\\ntitle: $:/core/modules/savers/andtidwiki.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the AndTidWiki Android app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar AndTidWiki = function(wiki) {\n};\n\nAndTidWiki.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.toString().split(\"#\")[0]);\n\t// Strip the file://\n\tif(pathname.indexOf(\"file://\") === 0) {\n\t\tpathname = pathname.substr(7);\n\t}\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\"?\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\"#\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Save the file\n\twindow.twi.saveFile(pathname,text);\n\t// Call the callback\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nAndTidWiki.prototype.info = {\n\tname: \"andtidwiki\",\n\tpriority: 1600,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.twi && !!window.twi.saveFile;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new AndTidWiki(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/beaker.js": {
"title": "$:/core/modules/savers/beaker.js",
"text": "/*\\\ntitle: $:/core/modules/savers/beaker.js\ntype: application/javascript\nmodule-type: saver\n\nSaves files using the Beaker browser's (https://beakerbrowser.com) Dat protocol (https://datproject.org/)\nCompatible with beaker >= V0.7.2\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSet up the saver\n*/\nvar BeakerSaver = function(wiki) {\n\tthis.wiki = wiki;\n};\n\nBeakerSaver.prototype.save = function(text,method,callback) {\n\tvar dat = new DatArchive(\"\" + window.location),\n\t\tpathname = (\"\" + window.location.pathname).split(\"#\")[0];\n\tdat.stat(pathname).then(function(value) {\n\t\tif(value.isDirectory()) {\n\t\t\tpathname = pathname + \"/index.html\";\n\t\t}\n\t\tdat.writeFile(pathname,text,\"utf8\").then(function(value) {\n\t\t\tcallback(null);\n\t\t},function(reason) {\n\t\t\tcallback(\"Beaker Saver Write Error: \" + reason);\n\t\t});\n\t},function(reason) {\n\t\tcallback(\"Beaker Saver Stat Error: \" + reason);\n\t});\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nBeakerSaver.prototype.info = {\n\tname: \"beaker\",\n\tpriority: 3000,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.DatArchive;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new BeakerSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/download.js": {
"title": "$:/core/modules/savers/download.js",
"text": "/*\\\ntitle: $:/core/modules/savers/download.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar DownloadSaver = function(wiki) {\n};\n\nDownloadSaver.prototype.save = function(text,method,callback,options) {\n\toptions = options || {};\n\t// Get the current filename\n\tvar filename = options.variables.filename;\n\tif(!filename) {\n\t\tvar p = document.location.pathname.lastIndexOf(\"/\");\n\t\tif(p !== -1) {\n\t\t\t// We decode the pathname because document.location is URL encoded by the browser\n\t\t\tfilename = decodeURIComponent(document.location.pathname.substr(p+1));\n\t\t}\n\t}\n\tif(!filename) {\n\t\tfilename = \"tiddlywiki.html\";\n\t}\n\t// Set up the link\n\tvar link = document.createElement(\"a\");\n\tif(Blob !== undefined) {\n\t\tvar blob = new Blob([text], {type: \"text/html\"});\n\t\tlink.setAttribute(\"href\", URL.createObjectURL(blob));\n\t} else {\n\t\tlink.setAttribute(\"href\",\"data:text/html,\" + encodeURIComponent(text));\n\t}\n\tlink.setAttribute(\"download\",filename);\n\tdocument.body.appendChild(link);\n\tlink.click();\n\tdocument.body.removeChild(link);\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nDownloadSaver.prototype.info = {\n\tname: \"download\",\n\tpriority: 100\n};\n\nObject.defineProperty(DownloadSaver.prototype.info, \"capabilities\", {\n\tget: function() {\n\t\tvar capabilities = [\"save\", \"download\"];\n\t\tif(($tw.wiki.getTextReference(\"$:/config/DownloadSaver/AutoSave\") || \"\").toLowerCase() === \"yes\") {\n\t\t\tcapabilities.push(\"autosave\");\n\t\t}\n\t\treturn capabilities;\n\t}\n});\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn document.createElement(\"a\").download !== undefined;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new DownloadSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/fsosaver.js": {
"title": "$:/core/modules/savers/fsosaver.js",
"text": "/*\\\ntitle: $:/core/modules/savers/fsosaver.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via MS FileSystemObject ActiveXObject\n\nNote: Since TiddlyWiki's markup contains the MOTW, the FileSystemObject normally won't be available. \nHowever, if the wiki is loaded as an .HTA file (Windows HTML Applications) then the FSO can be used.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar FSOSaver = function(wiki) {\n};\n\nFSOSaver.prototype.save = function(text,method,callback) {\n\t// Get the pathname of this document\n\tvar pathname = unescape(document.location.pathname);\n\t// Test for a Windows path of the form /x:\\blah...\n\tif(/^\\/[A-Z]\\:\\\\[^\\\\]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t} else if(document.location.hostname !== \"\" && /^\\/\\\\[^\\\\]+\\\\[^\\\\]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t// Remove the leading slash\n\t\tpathname = pathname.substr(1);\n\t\t// reconstruct UNC path\n\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\n\t} else {\n\t\treturn false;\n\t}\n\t// Save the file (as UTF-16)\n\tvar fso = new ActiveXObject(\"Scripting.FileSystemObject\");\n\tvar file = fso.OpenTextFile(pathname,2,-1,-1);\n\tfile.Write(text);\n\tfile.Close();\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nFSOSaver.prototype.info = {\n\tname: \"FSOSaver\",\n\tpriority: 120,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\ttry {\n\t\treturn (window.location.protocol === \"file:\") && !!(new ActiveXObject(\"Scripting.FileSystemObject\"));\n\t} catch(e) { return false; }\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new FSOSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/manualdownload.js": {
"title": "$:/core/modules/savers/manualdownload.js",
"text": "/*\\\ntitle: $:/core/modules/savers/manualdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via HTML5's download APIs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Title of the tiddler containing the download message\nvar downloadInstructionsTitle = \"$:/language/Modals/Download\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar ManualDownloadSaver = function(wiki) {\n};\n\nManualDownloadSaver.prototype.save = function(text,method,callback) {\n\t$tw.modal.display(downloadInstructionsTitle,{\n\t\tdownloadLink: \"data:text/html,\" + encodeURIComponent(text)\n\t});\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nManualDownloadSaver.prototype.info = {\n\tname: \"manualdownload\",\n\tpriority: 0,\n\tcapabilities: [\"save\", \"download\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new ManualDownloadSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/msdownload.js": {
"title": "$:/core/modules/savers/msdownload.js",
"text": "/*\\\ntitle: $:/core/modules/savers/msdownload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via window.navigator.msSaveBlob()\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar MsDownloadSaver = function(wiki) {\n};\n\nMsDownloadSaver.prototype.save = function(text,method,callback) {\n\t// Get the current filename\n\tvar filename = \"tiddlywiki.html\",\n\t\tp = document.location.pathname.lastIndexOf(\"/\");\n\tif(p !== -1) {\n\t\tfilename = document.location.pathname.substr(p+1);\n\t}\n\t// Set up the link\n\tvar blob = new Blob([text], {type: \"text/html\"});\n\twindow.navigator.msSaveBlob(blob,filename);\n\t// Callback that we succeeded\n\tcallback(null);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nMsDownloadSaver.prototype.info = {\n\tname: \"msdownload\",\n\tpriority: 110,\n\tcapabilities: [\"save\", \"download\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn !!window.navigator.msSaveBlob;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new MsDownloadSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/put.js": {
"title": "$:/core/modules/savers/put.js",
"text": "/*\\\ntitle: $:/core/modules/savers/put.js\ntype: application/javascript\nmodule-type: saver\n\nSaves wiki by performing a PUT request to the server\n\nWorks with any server which accepts a PUT request\nto the current URL, such as a WebDAV server.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar PutSaver = function(wiki) {\n\tthis.wiki = wiki;\n\tvar self = this;\n\tvar uri = this.uri();\n\t// Async server probe. Until probe finishes, save will fail fast\n\t// See also https://github.com/Jermolene/TiddlyWiki5/issues/2276\n\t$tw.utils.httpRequest({\n\t\turl: uri,\n\t\ttype: \"OPTIONS\",\n\t\tcallback: function(err, data, xhr) {\n\t\t\t// Check DAV header http://www.webdav.org/specs/rfc2518.html#rfc.section.9.1\n\t\t\tif(!err) {\n\t\t\t\tself.serverAcceptsPuts = xhr.status === 200 && !!xhr.getResponseHeader(\"dav\");\n\t\t\t}\n\t\t}\n\t});\n\t// Retrieve ETag if available\n\t$tw.utils.httpRequest({\n\t\turl: uri,\n\t\ttype: \"HEAD\",\n\t\tcallback: function(err, data, xhr) {\n\t\t\tif(!err) {\n\t\t\t\tself.etag = xhr.getResponseHeader(\"ETag\");\n\t\t\t}\n\t\t}\n\t});\n};\n\nPutSaver.prototype.uri = function() {\n\treturn document.location.toString().split(\"#\")[0];\n};\n\n// TODO: in case of edit conflict\n// Prompt: Do you want to save over this? Y/N\n// Merging would be ideal, and may be possible using future generic merge flow\nPutSaver.prototype.save = function(text, method, callback) {\n\tif(!this.serverAcceptsPuts) {\n\t\treturn false;\n\t}\n\tvar self = this;\n\tvar headers = { \"Content-Type\": \"text/html;charset=UTF-8\" };\n\tif(this.etag) {\n\t\theaders[\"If-Match\"] = this.etag;\n\t}\n\t$tw.utils.httpRequest({\n\t\turl: this.uri(),\n\t\ttype: \"PUT\",\n\t\theaders: headers,\n\t\tdata: text,\n\t\tcallback: function(err, data, xhr) {\n\t\t\tif(err) {\n\t\t\t\tcallback(err);\n\t\t\t} if(xhr.status === 200 || xhr.status === 201) {\n\t\t\t\tself.etag = xhr.getResponseHeader(\"ETag\");\n\t\t\t\tcallback(null); // success\n\t\t\t} else if(xhr.status === 412) { // edit conflict\n\t\t\t\tvar message = $tw.language.getString(\"Error/EditConflict\");\n\t\t\t\tcallback(message);\n\t\t\t} else {\n\t\t\t\tcallback(xhr.responseText); // fail\n\t\t\t}\n\t\t}\n\t});\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nPutSaver.prototype.info = {\n\tname: \"put\",\n\tpriority: 2000,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn /^https?:/.test(location.protocol);\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new PutSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyfox.js": {
"title": "$:/core/modules/savers/tiddlyfox.js",
"text": "/*\\\ntitle: $:/core/modules/savers/tiddlyfox.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TiddlyFox file extension\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar TiddlyFoxSaver = function(wiki) {\n};\n\nTiddlyFoxSaver.prototype.save = function(text,method,callback) {\n\tvar messageBox = document.getElementById(\"tiddlyfox-message-box\");\n\tif(messageBox) {\n\t\t// Get the pathname of this document\n\t\tvar pathname = document.location.toString().split(\"#\")[0];\n\t\t// Replace file://localhost/ with file:///\n\t\tif(pathname.indexOf(\"file://localhost/\") === 0) {\n\t\t\tpathname = \"file://\" + pathname.substr(16);\n\t\t}\n\t\t// Windows path file:///x:/blah/blah --> x:\\blah\\blah\n\t\tif(/^file\\:\\/\\/\\/[A-Z]\\:\\//i.test(pathname)) {\n\t\t\t// Remove the leading slash and convert slashes to backslashes\n\t\t\tpathname = pathname.substr(8).replace(/\\//g,\"\\\\\");\n\t\t// Firefox Windows network path file://///server/share/blah/blah --> //server/share/blah/blah\n\t\t} else if(pathname.indexOf(\"file://///\") === 0) {\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(10)).replace(/\\//g,\"\\\\\");\n\t\t// Mac/Unix local path file:///path/path --> /path/path\n\t\t} else if(pathname.indexOf(\"file:///\") === 0) {\n\t\t\tpathname = unescape(pathname.substr(7));\n\t\t// Mac/Unix local path file:/path/path --> /path/path\n\t\t} else if(pathname.indexOf(\"file:/\") === 0) {\n\t\t\tpathname = unescape(pathname.substr(5));\n\t\t// Otherwise Windows networth path file://server/share/path/path --> \\\\server\\share\\path\\path\n\t\t} else {\n\t\t\tpathname = \"\\\\\\\\\" + unescape(pathname.substr(7)).replace(new RegExp(\"/\",\"g\"),\"\\\\\");\n\t\t}\n\t\t// Create the message element and put it in the message box\n\t\tvar message = document.createElement(\"div\");\n\t\tmessage.setAttribute(\"data-tiddlyfox-path\",decodeURIComponent(pathname));\n\t\tmessage.setAttribute(\"data-tiddlyfox-content\",text);\n\t\tmessageBox.appendChild(message);\n\t\t// Add an event handler for when the file has been saved\n\t\tmessage.addEventListener(\"tiddlyfox-have-saved-file\",function(event) {\n\t\t\tcallback(null);\n\t\t}, false);\n\t\t// Create and dispatch the custom event to the extension\n\t\tvar event = document.createEvent(\"Events\");\n\t\tevent.initEvent(\"tiddlyfox-save-file\",true,false);\n\t\tmessage.dispatchEvent(event);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyFoxSaver.prototype.info = {\n\tname: \"tiddlyfox\",\n\tpriority: 1500,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyFoxSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/tiddlyie.js": {
"title": "$:/core/modules/savers/tiddlyie.js",
"text": "/*\\\ntitle: $:/core/modules/savers/tiddlyie.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via Internet Explorer BHO extenion (TiddlyIE)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar TiddlyIESaver = function(wiki) {\n};\n\nTiddlyIESaver.prototype.save = function(text,method,callback) {\n\t// Check existence of TiddlyIE BHO extension (note: only works after document is complete)\n\tif(typeof(window.TiddlyIE) != \"undefined\") {\n\t\t// Get the pathname of this document\n\t\tvar pathname = unescape(document.location.pathname);\n\t\t// Test for a Windows path of the form /x:/blah...\n\t\tif(/^\\/[A-Z]\\:\\/[^\\/]+/i.test(pathname)) {\t// ie: ^/[a-z]:/[^/]+ (is this better?: ^/[a-z]:/[^/]+(/[^/]+)*\\.[^/]+ )\n\t\t\t// Remove the leading slash\n\t\t\tpathname = pathname.substr(1);\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\n\t\t} else if(document.hostname !== \"\" && /^\\/[^\\/]+\\/[^\\/]+/i.test(pathname)) {\t// test for \\\\server\\share\\blah... - ^/[^/]+/[^/]+\n\t\t\t// Convert slashes to backslashes\n\t\t\tpathname = pathname.replace(/\\//g,\"\\\\\");\n\t\t\t// reconstruct UNC path\n\t\t\tpathname = \"\\\\\\\\\" + document.location.hostname + pathname;\n\t\t} else return false;\n\t\t// Prompt the user to save the file\n\t\twindow.TiddlyIE.save(pathname, text);\n\t\t// Callback that we succeeded\n\t\tcallback(null);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nInformation about this saver\n*/\nTiddlyIESaver.prototype.info = {\n\tname: \"tiddlyiesaver\",\n\tpriority: 1500,\n\tcapabilities: [\"save\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn (window.location.protocol === \"file:\");\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TiddlyIESaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/twedit.js": {
"title": "$:/core/modules/savers/twedit.js",
"text": "/*\\\ntitle: $:/core/modules/savers/twedit.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via the TWEdit iOS app\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false, netscape: false, Components: false */\n\"use strict\";\n\nvar TWEditSaver = function(wiki) {\n};\n\nTWEditSaver.prototype.save = function(text,method,callback) {\n\t// Bail if we're not running under TWEdit\n\tif(typeof DeviceInfo !== \"object\") {\n\t\treturn false;\n\t}\n\t// Get the pathname of this document\n\tvar pathname = decodeURIComponent(document.location.pathname);\n\t// Strip any query or location part\n\tvar p = pathname.indexOf(\"?\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\tp = pathname.indexOf(\"#\");\n\tif(p !== -1) {\n\t\tpathname = pathname.substr(0,p);\n\t}\n\t// Remove the leading \"/Documents\" from path\n\tvar prefix = \"/Documents\";\n\tif(pathname.indexOf(prefix) === 0) {\n\t\tpathname = pathname.substr(prefix.length);\n\t}\n\t// Error handler\n\tvar errorHandler = function(event) {\n\t\t// Error\n\t\tcallback($tw.language.getString(\"Error/SavingToTWEdit\") + \": \" + event.target.error.code);\n\t};\n\t// Get the file system\n\twindow.requestFileSystem(LocalFileSystem.PERSISTENT,0,function(fileSystem) {\n\t\t// Now we've got the filesystem, get the fileEntry\n\t\tfileSystem.root.getFile(pathname, {create: true}, function(fileEntry) {\n\t\t\t// Now we've got the fileEntry, create the writer\n\t\t\tfileEntry.createWriter(function(writer) {\n\t\t\t\twriter.onerror = errorHandler;\n\t\t\t\twriter.onwrite = function() {\n\t\t\t\t\tcallback(null);\n\t\t\t\t};\n\t\t\t\twriter.position = 0;\n\t\t\t\twriter.write(text);\n\t\t\t},errorHandler);\n\t\t}, errorHandler);\n\t}, errorHandler);\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nTWEditSaver.prototype.info = {\n\tname: \"twedit\",\n\tpriority: 1600,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new TWEditSaver(wiki);\n};\n\n/////////////////////////// Hack\n// HACK: This ensures that TWEdit recognises us as a TiddlyWiki document\nif($tw.browser) {\n\twindow.version = {title: \"TiddlyWiki\"};\n}\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/savers/upload.js": {
"title": "$:/core/modules/savers/upload.js",
"text": "/*\\\ntitle: $:/core/modules/savers/upload.js\ntype: application/javascript\nmodule-type: saver\n\nHandles saving changes via upload to a server.\n\nDesigned to be compatible with BidiX's UploadPlugin at http://tiddlywiki.bidix.info/#UploadPlugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSelect the appropriate saver module and set it up\n*/\nvar UploadSaver = function(wiki) {\n\tthis.wiki = wiki;\n};\n\nUploadSaver.prototype.save = function(text,method,callback) {\n\t// Get the various parameters we need\n\tvar backupDir = this.wiki.getTextReference(\"$:/UploadBackupDir\") || \".\",\n\t\tusername = this.wiki.getTextReference(\"$:/UploadName\"),\n\t\tpassword = $tw.utils.getPassword(\"upload\"),\n\t\tuploadDir = this.wiki.getTextReference(\"$:/UploadDir\") || \".\",\n\t\tuploadFilename = this.wiki.getTextReference(\"$:/UploadFilename\") || \"index.html\",\n\t\turl = this.wiki.getTextReference(\"$:/UploadURL\");\n\t// Bail out if we don't have the bits we need\n\tif(!username || username.toString().trim() === \"\" || !password || password.toString().trim() === \"\") {\n\t\treturn false;\n\t}\n\t// Construct the url if not provided\n\tif(!url) {\n\t\turl = \"http://\" + username + \".tiddlyspot.com/store.cgi\";\n\t}\n\t// Assemble the header\n\tvar boundary = \"---------------------------\" + \"AaB03x\";\t\n\tvar uploadFormName = \"UploadPlugin\";\n\tvar head = [];\n\thead.push(\"--\" + boundary + \"\\r\\nContent-disposition: form-data; name=\\\"UploadPlugin\\\"\\r\\n\");\n\thead.push(\"backupDir=\" + backupDir + \";user=\" + username + \";password=\" + password + \";uploaddir=\" + uploadDir + \";;\"); \n\thead.push(\"\\r\\n\" + \"--\" + boundary);\n\thead.push(\"Content-disposition: form-data; name=\\\"userfile\\\"; filename=\\\"\" + uploadFilename + \"\\\"\");\n\thead.push(\"Content-Type: text/html;charset=UTF-8\");\n\thead.push(\"Content-Length: \" + text.length + \"\\r\\n\");\n\thead.push(\"\");\n\t// Assemble the tail and the data itself\n\tvar tail = \"\\r\\n--\" + boundary + \"--\\r\\n\",\n\t\tdata = head.join(\"\\r\\n\") + text + tail;\n\t// Do the HTTP post\n\tvar http = new XMLHttpRequest();\n\thttp.open(\"POST\",url,true,username,password);\n\thttp.setRequestHeader(\"Content-Type\",\"multipart/form-data; charset=UTF-8; boundary=\" + boundary);\n\thttp.onreadystatechange = function() {\n\t\tif(http.readyState == 4 && http.status == 200) {\n\t\t\tif(http.responseText.substr(0,4) === \"0 - \") {\n\t\t\t\tcallback(null);\n\t\t\t} else {\n\t\t\t\tcallback(http.responseText);\n\t\t\t}\n\t\t}\n\t};\n\ttry {\n\t\thttp.send(data);\n\t} catch(ex) {\n\t\treturn callback($tw.language.getString(\"Error/Caption\") + \":\" + ex);\n\t}\n\t$tw.notifier.display(\"$:/language/Notifications/Save/Starting\");\n\treturn true;\n};\n\n/*\nInformation about this saver\n*/\nUploadSaver.prototype.info = {\n\tname: \"upload\",\n\tpriority: 2000,\n\tcapabilities: [\"save\", \"autosave\"]\n};\n\n/*\nStatic method that returns true if this saver is capable of working\n*/\nexports.canSave = function(wiki) {\n\treturn true;\n};\n\n/*\nCreate an instance of this saver\n*/\nexports.create = function(wiki) {\n\treturn new UploadSaver(wiki);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "saver"
},
"$:/core/modules/browser-messaging.js": {
"title": "$:/core/modules/browser-messaging.js",
"text": "/*\\\ntitle: $:/core/modules/browser-messaging.js\ntype: application/javascript\nmodule-type: startup\n\nBrowser message handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"browser-messaging\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n/*\nLoad a specified url as an iframe and call the callback when it is loaded. If the url is already loaded then the existing iframe instance is used\n*/\nfunction loadIFrame(url,callback) {\n\t// Check if iframe already exists\n\tvar iframeInfo = $tw.browserMessaging.iframeInfoMap[url];\n\tif(iframeInfo) {\n\t\t// We've already got the iframe\n\t\tcallback(null,iframeInfo);\n\t} else {\n\t\t// Create the iframe and save it in the list\n\t\tvar iframe = document.createElement(\"iframe\");\n\t\tiframeInfo = {\n\t\t\turl: url,\n\t\t\tstatus: \"loading\",\n\t\t\tdomNode: iframe\n\t\t};\n\t\t$tw.browserMessaging.iframeInfoMap[url] = iframeInfo;\n\t\tsaveIFrameInfoTiddler(iframeInfo);\n\t\t// Add the iframe to the DOM and hide it\n\t\tiframe.style.display = \"none\";\n\t\tiframe.setAttribute(\"library\",\"true\");\n\t\tdocument.body.appendChild(iframe);\n\t\t// Set up onload\n\t\tiframe.onload = function() {\n\t\t\tiframeInfo.status = \"loaded\";\n\t\t\tsaveIFrameInfoTiddler(iframeInfo);\n\t\t\tcallback(null,iframeInfo);\n\t\t};\n\t\tiframe.onerror = function() {\n\t\t\tcallback(\"Cannot load iframe\");\n\t\t};\n\t\ttry {\n\t\t\tiframe.src = url;\n\t\t} catch(ex) {\n\t\t\tcallback(ex);\n\t\t}\n\t}\n}\n\n/*\nUnload library iframe for given url\n*/\nfunction unloadIFrame(url){\n\t$tw.utils.each(document.getElementsByTagName('iframe'), function(iframe) {\n\t\tif(iframe.getAttribute(\"library\") === \"true\" &&\n\t\t iframe.getAttribute(\"src\") === url) {\n\t\t\tiframe.parentNode.removeChild(iframe);\n\t\t}\n\t});\n}\n\nfunction saveIFrameInfoTiddler(iframeInfo) {\n\t$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),{\n\t\ttitle: \"$:/temp/ServerConnection/\" + iframeInfo.url,\n\t\ttext: iframeInfo.status,\n\t\ttags: [\"$:/tags/ServerConnection\"],\n\t\turl: iframeInfo.url\n\t},$tw.wiki.getModificationFields()));\n}\n\nexports.startup = function() {\n\t// Initialise the store of iframes we've created\n\t$tw.browserMessaging = {\n\t\tiframeInfoMap: {} // Hashmap by URL of {url:,status:\"loading/loaded\",domNode:}\n\t};\n\t// Listen for widget messages to control loading the plugin library\n\t$tw.rootWidget.addEventListener(\"tm-load-plugin-library\",function(event) {\n\t\tvar paramObject = event.paramObject || {},\n\t\t\turl = paramObject.url;\n\t\tif(url) {\n\t\t\tloadIFrame(url,function(err,iframeInfo) {\n\t\t\t\tif(err) {\n\t\t\t\t\talert($tw.language.getString(\"Error/LoadingPluginLibrary\") + \": \" + url);\n\t\t\t\t} else {\n\t\t\t\t\tiframeInfo.domNode.contentWindow.postMessage({\n\t\t\t\t\t\tverb: \"GET\",\n\t\t\t\t\t\turl: \"recipes/library/tiddlers.json\",\n\t\t\t\t\t\tcookies: {\n\t\t\t\t\t\t\ttype: \"save-info\",\n\t\t\t\t\t\t\tinfoTitlePrefix: paramObject.infoTitlePrefix || \"$:/temp/RemoteAssetInfo/\",\n\t\t\t\t\t\t\turl: url\n\t\t\t\t\t\t}\n\t\t\t\t\t},\"*\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t// Listen for widget messages to control unloading the plugin library\n\t$tw.rootWidget.addEventListener(\"tm-unload-plugin-library\",function(event) {\n\t\tvar paramObject = event.paramObject || {},\n\t\t\turl = paramObject.url;\n\t\t$tw.browserMessaging.iframeInfoMap[url] = undefined;\n\t\tif(url) {\n\t\t\tunloadIFrame(url);\n\t\t\t$tw.utils.each(\n\t\t\t\t$tw.wiki.filterTiddlers(\"[[$:/temp/ServerConnection/\" + url + \"]] [prefix[$:/temp/RemoteAssetInfo/\" + url + \"/]]\"),\n\t\t\t\tfunction(title) {\n\t\t\t\t\t$tw.wiki.deleteTiddler(title);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t});\n\t$tw.rootWidget.addEventListener(\"tm-load-plugin-from-library\",function(event) {\n\t\tvar paramObject = event.paramObject || {},\n\t\t\turl = paramObject.url,\n\t\t\ttitle = paramObject.title;\n\t\tif(url && title) {\n\t\t\tloadIFrame(url,function(err,iframeInfo) {\n\t\t\t\tif(err) {\n\t\t\t\t\talert($tw.language.getString(\"Error/LoadingPluginLibrary\") + \": \" + url);\n\t\t\t\t} else {\n\t\t\t\t\tiframeInfo.domNode.contentWindow.postMessage({\n\t\t\t\t\t\tverb: \"GET\",\n\t\t\t\t\t\turl: \"recipes/library/tiddlers/\" + encodeURIComponent(title) + \".json\",\n\t\t\t\t\t\tcookies: {\n\t\t\t\t\t\t\ttype: \"save-tiddler\",\n\t\t\t\t\t\t\turl: url\n\t\t\t\t\t\t}\n\t\t\t\t\t},\"*\");\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t// Listen for window messages from other windows\n\twindow.addEventListener(\"message\",function listener(event){\n\t\tconsole.log(\"browser-messaging: \",document.location.toString())\n\t\tconsole.log(\"browser-messaging: Received message from\",event.origin);\n\t\tconsole.log(\"browser-messaging: Message content\",event.data);\n\t\tswitch(event.data.verb) {\n\t\t\tcase \"GET-RESPONSE\":\n\t\t\t\tif(event.data.status.charAt(0) === \"2\") {\n\t\t\t\t\tif(event.data.cookies) {\n\t\t\t\t\t\tif(event.data.cookies.type === \"save-info\") {\n\t\t\t\t\t\t\tvar tiddlers = JSON.parse(event.data.body);\n\t\t\t\t\t\t\t$tw.utils.each(tiddlers,function(tiddler) {\n\t\t\t\t\t\t\t\t$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.getCreationFields(),tiddler,{\n\t\t\t\t\t\t\t\t\ttitle: event.data.cookies.infoTitlePrefix + event.data.cookies.url + \"/\" + tiddler.title,\n\t\t\t\t\t\t\t\t\t\"original-title\": tiddler.title,\n\t\t\t\t\t\t\t\t\ttext: \"\",\n\t\t\t\t\t\t\t\t\ttype: \"text/vnd.tiddlywiki\",\n\t\t\t\t\t\t\t\t\t\"original-type\": tiddler.type,\n\t\t\t\t\t\t\t\t\t\"plugin-type\": undefined,\n\t\t\t\t\t\t\t\t\t\"original-plugin-type\": tiddler[\"plugin-type\"],\n\t\t\t\t\t\t\t\t\t\"module-type\": undefined,\n\t\t\t\t\t\t\t\t\t\"original-module-type\": tiddler[\"module-type\"],\n\t\t\t\t\t\t\t\t\ttags: [\"$:/tags/RemoteAssetInfo\"],\n\t\t\t\t\t\t\t\t\t\"original-tags\": $tw.utils.stringifyList(tiddler.tags || []),\n\t\t\t\t\t\t\t\t\t\"server-url\": event.data.cookies.url\n\t\t\t\t\t\t\t\t},$tw.wiki.getModificationFields()));\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if(event.data.cookies.type === \"save-tiddler\") {\n\t\t\t\t\t\t\tvar tiddler = JSON.parse(event.data.body);\n\t\t\t\t\t\t\t$tw.wiki.addTiddler(new $tw.Tiddler(tiddler));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t},false);\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/commands.js": {
"title": "$:/core/modules/startup/commands.js",
"text": "/*\\\ntitle: $:/core/modules/startup/commands.js\ntype: application/javascript\nmodule-type: startup\n\nCommand processing\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"commands\";\nexports.platforms = [\"node\"];\nexports.after = [\"story\"];\nexports.synchronous = false;\n\nexports.startup = function(callback) {\n\t// On the server, start a commander with the command line arguments\n\tvar commander = new $tw.Commander(\n\t\t$tw.boot.argv,\n\t\tfunction(err) {\n\t\t\tif(err) {\n\t\t\t\treturn $tw.utils.error(\"Error: \" + err);\n\t\t\t}\n\t\t\tcallback();\n\t\t},\n\t\t$tw.wiki,\n\t\t{output: process.stdout, error: process.stderr}\n\t);\n\tcommander.execute();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/favicon.js": {
"title": "$:/core/modules/startup/favicon.js",
"text": "/*\\\ntitle: $:/core/modules/startup/favicon.js\ntype: application/javascript\nmodule-type: startup\n\nFavicon handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"favicon\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\t\t\n// Favicon tiddler\nvar FAVICON_TITLE = \"$:/favicon.ico\";\n\nexports.startup = function() {\n\t// Set up the favicon\n\tsetFavicon();\n\t// Reset the favicon when the tiddler changes\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,FAVICON_TITLE)) {\n\t\t\tsetFavicon();\n\t\t}\n\t});\n};\n\nfunction setFavicon() {\n\tvar tiddler = $tw.wiki.getTiddler(FAVICON_TITLE);\n\tif(tiddler) {\n\t\tvar faviconLink = document.getElementById(\"faviconLink\");\n\t\tfaviconLink.setAttribute(\"href\",\"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text);\n\t}\n}\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/info.js": {
"title": "$:/core/modules/startup/info.js",
"text": "/*\\\ntitle: $:/core/modules/startup/info.js\ntype: application/javascript\nmodule-type: startup\n\nInitialise $:/info tiddlers via $:/temp/info-plugin pseudo-plugin\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"info\";\nexports.before = [\"startup\"];\nexports.after = [\"load-modules\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Collect up the info tiddlers\n\tvar infoTiddlerFields = {};\n\t// Give each info module a chance to fill in as many info tiddlers as they want\n\t$tw.modules.forEachModuleOfType(\"info\",function(title,moduleExports) {\n\t\tif(moduleExports && moduleExports.getInfoTiddlerFields) {\n\t\t\tvar tiddlerFieldsArray = moduleExports.getInfoTiddlerFields(infoTiddlerFields);\n\t\t\t$tw.utils.each(tiddlerFieldsArray,function(fields) {\n\t\t\t\tif(fields) {\n\t\t\t\t\tinfoTiddlerFields[fields.title] = fields;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t// Bake the info tiddlers into a plugin\n\tvar fields = {\n\t\ttitle: \"$:/temp/info-plugin\",\n\t\ttype: \"application/json\",\n\t\t\"plugin-type\": \"info\",\n\t\ttext: JSON.stringify({tiddlers: infoTiddlerFields},null,$tw.config.preferences.jsonSpaces)\n\t};\n\t$tw.wiki.addTiddler(new $tw.Tiddler(fields));\n\t$tw.wiki.readPluginInfo();\n\t$tw.wiki.registerPluginTiddlers(\"info\");\n\t$tw.wiki.unpackPluginTiddlers();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/load-modules.js": {
"title": "$:/core/modules/startup/load-modules.js",
"text": "/*\\\ntitle: $:/core/modules/startup/load-modules.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"load-modules\";\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Load modules\n\t$tw.modules.applyMethods(\"utils\",$tw.utils);\n\tif($tw.node) {\n\t\t$tw.modules.applyMethods(\"utils-node\",$tw.utils);\n\t}\n\t$tw.modules.applyMethods(\"global\",$tw);\n\t$tw.modules.applyMethods(\"config\",$tw.config);\n\t$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap(\"tiddlerfield\");\n\t$tw.modules.applyMethods(\"tiddlermethod\",$tw.Tiddler.prototype);\n\t$tw.modules.applyMethods(\"wikimethod\",$tw.Wiki.prototype);\n\t$tw.modules.applyMethods(\"tiddlerdeserializer\",$tw.Wiki.tiddlerDeserializerModules);\n\t$tw.macros = $tw.modules.getModulesByTypeAsHashmap(\"macro\");\n\t$tw.wiki.initParsers();\n\t$tw.Commander.initCommands();\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/password.js": {
"title": "$:/core/modules/startup/password.js",
"text": "/*\\\ntitle: $:/core/modules/startup/password.js\ntype: application/javascript\nmodule-type: startup\n\nPassword handling\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"password\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t$tw.rootWidget.addEventListener(\"tm-set-password\",function(event) {\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: $tw.language.getString(\"Encryption/PromptSetPassword\"),\n\t\t\tnoUserName: true,\n\t\t\tsubmitText: $tw.language.getString(\"Encryption/SetPassword\"),\n\t\t\tcanCancel: true,\n\t\t\trepeatPassword: true,\n\t\t\tcallback: function(data) {\n\t\t\t\tif(data) {\n\t\t\t\t\t$tw.crypto.setPassword(data.password);\n\t\t\t\t}\n\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t}\n\t\t});\n\t});\n\t$tw.rootWidget.addEventListener(\"tm-clear-password\",function(event) {\n\t\tif($tw.browser) {\n\t\t\tif(!confirm($tw.language.getString(\"Encryption/ConfirmClearPassword\"))) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$tw.crypto.setPassword(null);\n\t});\n\t// Ensure that $:/isEncrypted is maintained properly\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.utils.hop(changes,\"$:/isEncrypted\")) {\n\t\t\t$tw.crypto.updateCryptoStateTiddler();\n\t\t}\n\t});\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/render.js": {
"title": "$:/core/modules/startup/render.js",
"text": "/*\\\ntitle: $:/core/modules/startup/render.js\ntype: application/javascript\nmodule-type: startup\n\nTitle, stylesheet and page rendering\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"render\";\nexports.platforms = [\"browser\"];\nexports.after = [\"story\"];\nexports.synchronous = true;\n\n// Default story and history lists\nvar PAGE_TITLE_TITLE = \"$:/core/wiki/title\";\nvar PAGE_STYLESHEET_TITLE = \"$:/core/ui/PageStylesheet\";\nvar PAGE_TEMPLATE_TITLE = \"$:/core/ui/PageTemplate\";\n\n// Time (in ms) that we defer refreshing changes to draft tiddlers\nvar DRAFT_TIDDLER_TIMEOUT_TITLE = \"$:/config/Drafts/TypingTimeout\";\nvar DRAFT_TIDDLER_TIMEOUT = 400;\n\nexports.startup = function() {\n\t// Set up the title\n\t$tw.titleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TITLE_TITLE,{document: $tw.fakeDocument, parseAsInline: true});\n\t$tw.titleContainer = $tw.fakeDocument.createElement(\"div\");\n\t$tw.titleWidgetNode.render($tw.titleContainer,null);\n\tdocument.title = $tw.titleContainer.textContent;\n\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\tif($tw.titleWidgetNode.refresh(changes,$tw.titleContainer,null)) {\n\t\t\tdocument.title = $tw.titleContainer.textContent;\n\t\t}\n\t});\n\t// Set up the styles\n\t$tw.styleWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_STYLESHEET_TITLE,{document: $tw.fakeDocument});\n\t$tw.styleContainer = $tw.fakeDocument.createElement(\"style\");\n\t$tw.styleWidgetNode.render($tw.styleContainer,null);\n\t$tw.styleElement = document.createElement(\"style\");\n\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\tdocument.head.insertBefore($tw.styleElement,document.head.firstChild);\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"styleRefresh\",function(changes) {\n\t\tif($tw.styleWidgetNode.refresh(changes,$tw.styleContainer,null)) {\n\t\t\t$tw.styleElement.innerHTML = $tw.styleContainer.textContent;\n\t\t}\n\t}));\n\t// Display the $:/core/ui/PageTemplate tiddler to kick off the display\n\t$tw.perf.report(\"mainRender\",function() {\n\t\t$tw.pageWidgetNode = $tw.wiki.makeTranscludeWidget(PAGE_TEMPLATE_TITLE,{document: document, parentWidget: $tw.rootWidget});\n\t\t$tw.pageContainer = document.createElement(\"div\");\n\t\t$tw.utils.addClass($tw.pageContainer,\"tc-page-container-wrapper\");\n\t\tdocument.body.insertBefore($tw.pageContainer,document.body.firstChild);\n\t\t$tw.pageWidgetNode.render($tw.pageContainer,null);\n\t})();\n\t// Prepare refresh mechanism\n\tvar deferredChanges = Object.create(null),\n\t\ttimerId;\n\tfunction refresh() {\n\t\t// Process the refresh\n\t\t$tw.pageWidgetNode.refresh(deferredChanges);\n\t\tdeferredChanges = Object.create(null);\n\t}\n\t// Add the change event handler\n\t$tw.wiki.addEventListener(\"change\",$tw.perf.report(\"mainRefresh\",function(changes) {\n\t\t// Check if only drafts have changed\n\t\tvar onlyDraftsHaveChanged = true;\n\t\tfor(var title in changes) {\n\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\t\tif(!tiddler || !tiddler.hasField(\"draft.of\")) {\n\t\t\t\tonlyDraftsHaveChanged = false;\n\t\t\t}\n\t\t}\n\t\t// Defer the change if only drafts have changed\n\t\tif(timerId) {\n\t\t\tclearTimeout(timerId);\n\t\t}\n\t\ttimerId = null;\n\t\tif(onlyDraftsHaveChanged) {\n\t\t\tvar timeout = parseInt($tw.wiki.getTiddlerText(DRAFT_TIDDLER_TIMEOUT_TITLE,\"\"),10);\n\t\t\tif(isNaN(timeout)) {\n\t\t\t\ttimeout = DRAFT_TIDDLER_TIMEOUT;\n\t\t\t}\n\t\t\ttimerId = setTimeout(refresh,timeout);\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t} else {\n\t\t\t$tw.utils.extend(deferredChanges,changes);\n\t\t\trefresh();\n\t\t}\n\t}));\n\t// Fix up the link between the root widget and the page container\n\t$tw.rootWidget.domNodes = [$tw.pageContainer];\n\t$tw.rootWidget.children = [$tw.pageWidgetNode];\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/rootwidget.js": {
"title": "$:/core/modules/startup/rootwidget.js",
"text": "/*\\\ntitle: $:/core/modules/startup/rootwidget.js\ntype: application/javascript\nmodule-type: startup\n\nSetup the root widget and the core root widget handlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"rootwidget\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.before = [\"story\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\t// Install the modal message mechanism\n\t$tw.modal = new $tw.utils.Modal($tw.wiki);\n\t$tw.rootWidget.addEventListener(\"tm-modal\",function(event) {\n\t\t$tw.modal.display(event.param,{variables: event.paramObject});\n\t});\n\t// Install the notification mechanism\n\t$tw.notifier = new $tw.utils.Notifier($tw.wiki);\n\t$tw.rootWidget.addEventListener(\"tm-notify\",function(event) {\n\t\t$tw.notifier.display(event.param,{variables: event.paramObject});\n\t});\n\t// Install the scroller\n\t$tw.pageScroller = new $tw.utils.PageScroller();\n\t$tw.rootWidget.addEventListener(\"tm-scroll\",function(event) {\n\t\t$tw.pageScroller.handleEvent(event);\n\t});\n\tvar fullscreen = $tw.utils.getFullScreenApis();\n\tif(fullscreen) {\n\t\t$tw.rootWidget.addEventListener(\"tm-full-screen\",function(event) {\n\t\t\tif(document[fullscreen._fullscreenElement]) {\n\t\t\t\tdocument[fullscreen._exitFullscreen]();\n\t\t\t} else {\n\t\t\t\tdocument.documentElement[fullscreen._requestFullscreen](Element.ALLOW_KEYBOARD_INPUT);\n\t\t\t}\n\t\t});\n\t}\n\t// If we're being viewed on a data: URI then give instructions for how to save\n\tif(document.location.protocol === \"data:\") {\n\t\t$tw.rootWidget.dispatchEvent({\n\t\t\ttype: \"tm-modal\",\n\t\t\tparam: \"$:/language/Modals/SaveInstructions\"\n\t\t});\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup.js": {
"title": "$:/core/modules/startup.js",
"text": "/*\\\ntitle: $:/core/modules/startup.js\ntype: application/javascript\nmodule-type: startup\n\nMiscellaneous startup logic for both the client and server.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"startup\";\nexports.after = [\"load-modules\"];\nexports.synchronous = true;\n\n// Set to `true` to enable performance instrumentation\nvar PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE = \"$:/config/Performance/Instrumentation\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nexports.startup = function() {\n\tvar modules,n,m,f;\n\t// Minimal browser detection\n\tif($tw.browser) {\n\t\t$tw.browser.isIE = (/msie|trident/i.test(navigator.userAgent));\n\t\t$tw.browser.isFirefox = !!document.mozFullScreenEnabled;\n\t}\n\t// Platform detection\n\t$tw.platform = {};\n\tif($tw.browser) {\n\t\t$tw.platform.isMac = /Mac/.test(navigator.platform);\n\t\t$tw.platform.isWindows = /win/i.test(navigator.platform);\n\t\t$tw.platform.isLinux = /Linux/i.test(navigator.appVersion);\n\t} else {\n\t\tswitch(require(\"os\").platform()) {\n\t\t\tcase \"darwin\":\n\t\t\t\t$tw.platform.isMac = true;\n\t\t\t\tbreak;\n\t\t\tcase \"win32\":\n\t\t\t\t$tw.platform.isWindows = true;\n\t\t\t\tbreak;\n\t\t\tcase \"freebsd\":\n\t\t\t\t$tw.platform.isLinux = true;\n\t\t\t\tbreak;\n\t\t\tcase \"linux\":\n\t\t\t\t$tw.platform.isLinux = true;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t// Initialise version\n\t$tw.version = $tw.utils.extractVersionInfo();\n\t// Set up the performance framework\n\t$tw.perf = new $tw.Performance($tw.wiki.getTiddlerText(PERFORMANCE_INSTRUMENTATION_CONFIG_TITLE,\"no\") === \"yes\");\n\t// Kick off the language manager and switcher\n\t$tw.language = new $tw.Language();\n\t$tw.languageSwitcher = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \"language\",\n\t\tcontrollerTitle: \"$:/language\",\n\t\tdefaultPlugins: [\n\t\t\t\"$:/languages/en-US\"\n\t\t],\n\t\tonSwitch: function(plugins) {\n\t\t\tif($tw.browser) {\n\t\t\t\tvar pluginTiddler = $tw.wiki.getTiddler(plugins[0]);\n\t\t\t\tif(pluginTiddler) {\n\t\t\t\t\tdocument.documentElement.setAttribute(\"dir\",pluginTiddler.getFieldString(\"text-direction\") || \"auto\");\n\t\t\t\t} else {\n\t\t\t\t\tdocument.documentElement.removeAttribute(\"dir\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\t// Kick off the theme manager\n\t$tw.themeManager = new $tw.PluginSwitcher({\n\t\twiki: $tw.wiki,\n\t\tpluginType: \"theme\",\n\t\tcontrollerTitle: \"$:/theme\",\n\t\tdefaultPlugins: [\n\t\t\t\"$:/themes/tiddlywiki/snowwhite\",\n\t\t\t\"$:/themes/tiddlywiki/vanilla\"\n\t\t]\n\t});\n\t// Kick off the keyboard manager\n\t$tw.keyboardManager = new $tw.KeyboardManager();\n\t// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup\n\t$tw.wiki.clearTiddlerEventQueue();\n\t// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers\n\tif($tw.browser) {\n\t\t$tw.rootWidget = new widget.widget({\n\t\t\ttype: \"widget\",\n\t\t\tchildren: []\n\t\t},{\n\t\t\twiki: $tw.wiki,\n\t\t\tdocument: document\n\t\t});\n\t}\n\t// Find a working syncadaptor\n\t$tw.syncadaptor = undefined;\n\t$tw.modules.forEachModuleOfType(\"syncadaptor\",function(title,module) {\n\t\tif(!$tw.syncadaptor && module.adaptorClass) {\n\t\t\t$tw.syncadaptor = new module.adaptorClass({wiki: $tw.wiki});\n\t\t}\n\t});\n\t// Set up the syncer object if we've got a syncadaptor\n\tif($tw.syncadaptor) {\n\t\t$tw.syncer = new $tw.Syncer({wiki: $tw.wiki, syncadaptor: $tw.syncadaptor});\n\t} \n\t// Setup the saver handler\n\t$tw.saverHandler = new $tw.SaverHandler({wiki: $tw.wiki, dirtyTracking: !$tw.syncadaptor});\n\t// Host-specific startup\n\tif($tw.browser) {\n\t\t// Install the popup manager\n\t\t$tw.popup = new $tw.utils.Popup();\n\t\t// Install the animator\n\t\t$tw.anim = new $tw.utils.Animator();\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/story.js": {
"title": "$:/core/modules/startup/story.js",
"text": "/*\\\ntitle: $:/core/modules/startup/story.js\ntype: application/javascript\nmodule-type: startup\n\nLoad core modules\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"story\";\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n// Default story and history lists\nvar DEFAULT_STORY_TITLE = \"$:/StoryList\";\nvar DEFAULT_HISTORY_TITLE = \"$:/HistoryList\";\n\n// Default tiddlers\nvar DEFAULT_TIDDLERS_TITLE = \"$:/DefaultTiddlers\";\n\n// Config\nvar CONFIG_UPDATE_ADDRESS_BAR = \"$:/config/Navigation/UpdateAddressBar\"; // Can be \"no\", \"permalink\", \"permaview\"\nvar CONFIG_UPDATE_HISTORY = \"$:/config/Navigation/UpdateHistory\"; // Can be \"yes\" or \"no\"\n\nexports.startup = function() {\n\t// Open startup tiddlers\n\topenStartupTiddlers();\n\tif($tw.browser) {\n\t\t// Set up location hash update\n\t\t$tw.wiki.addEventListener(\"change\",function(changes) {\n\t\t\tif($tw.utils.hop(changes,DEFAULT_STORY_TITLE) || $tw.utils.hop(changes,DEFAULT_HISTORY_TITLE)) {\n\t\t\t\tupdateLocationHash({\n\t\t\t\t\tupdateAddressBar: $tw.wiki.getTiddlerText(CONFIG_UPDATE_ADDRESS_BAR,\"permaview\").trim(),\n\t\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim()\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\t// Listen for changes to the browser location hash\n\t\twindow.addEventListener(\"hashchange\",function() {\n\t\t\tvar hash = $tw.utils.getLocationHash();\n\t\t\tif(hash !== $tw.locationHash) {\n\t\t\t\t$tw.locationHash = hash;\n\t\t\t\topenStartupTiddlers({defaultToCurrentStory: true});\n\t\t\t}\n\t\t},false);\n\t\t// Listen for the tm-browser-refresh message\n\t\t$tw.rootWidget.addEventListener(\"tm-browser-refresh\",function(event) {\n\t\t\twindow.location.reload(true);\n\t\t});\n\t\t// Listen for the tm-print message\n\t\t$tw.rootWidget.addEventListener(\"tm-print\",function(event) {\n\t\t\t(event.event.view || window).print();\n\t\t});\n\t\t// Listen for the tm-home message\n\t\t$tw.rootWidget.addEventListener(\"tm-home\",function(event) {\n\t\t\twindow.location.hash = \"\";\n\t\t\tvar storyFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE),\n\t\t\t\tstoryList = $tw.wiki.filterTiddlers(storyFilter);\n\t\t\t//invoke any hooks that might change the default story list\n\t\t\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\n\t\t\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\n\t\t\tif(storyList[0]) {\n\t\t\t\t$tw.wiki.addToHistory(storyList[0]);\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t// Listen for the tm-permalink message\n\t\t$tw.rootWidget.addEventListener(\"tm-permalink\",function(event) {\n\t\t\tupdateLocationHash({\n\t\t\t\tupdateAddressBar: \"permalink\",\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\n\t\t\t});\n\t\t});\n\t\t// Listen for the tm-permaview message\n\t\t$tw.rootWidget.addEventListener(\"tm-permaview\",function(event) {\n\t\t\tupdateLocationHash({\n\t\t\t\tupdateAddressBar: \"permaview\",\n\t\t\t\tupdateHistory: $tw.wiki.getTiddlerText(CONFIG_UPDATE_HISTORY,\"no\").trim(),\n\t\t\t\ttargetTiddler: event.param || event.tiddlerTitle\n\t\t\t});\n\t\t});\n\t}\n};\n\n/*\nProcess the location hash to open the specified tiddlers. Options:\ndefaultToCurrentStory: If true, the current story is retained as the default, instead of opening the default tiddlers\n*/\nfunction openStartupTiddlers(options) {\n\toptions = options || {};\n\t// Work out the target tiddler and the story filter. \"null\" means \"unspecified\"\n\tvar target = null,\n\t\tstoryFilter = null;\n\tif($tw.locationHash.length > 1) {\n\t\tvar hash = $tw.locationHash.substr(1),\n\t\t\tsplit = hash.indexOf(\":\");\n\t\tif(split === -1) {\n\t\t\ttarget = decodeURIComponent(hash.trim());\n\t\t} else {\n\t\t\ttarget = decodeURIComponent(hash.substr(0,split).trim());\n\t\t\tstoryFilter = decodeURIComponent(hash.substr(split + 1).trim());\n\t\t}\n\t}\n\t// If the story wasn't specified use the current tiddlers or a blank story\n\tif(storyFilter === null) {\n\t\tif(options.defaultToCurrentStory) {\n\t\t\tvar currStoryList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE);\n\t\t\tstoryFilter = $tw.utils.stringifyList(currStoryList);\n\t\t} else {\n\t\t\tif(target && target !== \"\") {\n\t\t\t\tstoryFilter = \"\";\n\t\t\t} else {\n\t\t\t\tstoryFilter = $tw.wiki.getTiddlerText(DEFAULT_TIDDLERS_TITLE);\n\t\t\t}\n\t\t}\n\t}\n\t// Process the story filter to get the story list\n\tvar storyList = $tw.wiki.filterTiddlers(storyFilter);\n\t// Invoke any hooks that want to change the default story list\n\tstoryList = $tw.hooks.invokeHook(\"th-opening-default-tiddlers-list\",storyList);\n\t// If the target tiddler isn't included then splice it in at the top\n\tif(target && storyList.indexOf(target) === -1) {\n\t\tstoryList.unshift(target);\n\t}\n\t// Save the story list\n\t$tw.wiki.addTiddler({title: DEFAULT_STORY_TITLE, text: \"\", list: storyList},$tw.wiki.getModificationFields());\n\t// If a target tiddler was specified add it to the history stack\n\tif(target && target !== \"\") {\n\t\t// The target tiddler doesn't need double square brackets, but we'll silently remove them if they're present\n\t\tif(target.indexOf(\"[[\") === 0 && target.substr(-2) === \"]]\") {\n\t\t\ttarget = target.substr(2,target.length - 4);\n\t\t}\n\t\t$tw.wiki.addToHistory(target);\n\t} else if(storyList.length > 0) {\n\t\t$tw.wiki.addToHistory(storyList[0]);\n\t}\n}\n\n/*\noptions: See below\noptions.updateAddressBar: \"permalink\", \"permaview\" or \"no\" (defaults to \"permaview\")\noptions.updateHistory: \"yes\" or \"no\" (defaults to \"no\")\noptions.targetTiddler: optional title of target tiddler for permalink\n*/\nfunction updateLocationHash(options) {\n\tif(options.updateAddressBar !== \"no\") {\n\t\t// Get the story and the history stack\n\t\tvar storyList = $tw.wiki.getTiddlerList(DEFAULT_STORY_TITLE),\n\t\t\thistoryList = $tw.wiki.getTiddlerData(DEFAULT_HISTORY_TITLE,[]),\n\t\t\ttargetTiddler = \"\";\n\t\tif(options.targetTiddler) {\n\t\t\ttargetTiddler = options.targetTiddler;\n\t\t} else {\n\t\t\t// The target tiddler is the one at the top of the stack\n\t\t\tif(historyList.length > 0) {\n\t\t\t\ttargetTiddler = historyList[historyList.length-1].title;\n\t\t\t}\n\t\t\t// Blank the target tiddler if it isn't present in the story\n\t\t\tif(storyList.indexOf(targetTiddler) === -1) {\n\t\t\t\ttargetTiddler = \"\";\n\t\t\t}\n\t\t}\n\t\t// Assemble the location hash\n\t\tif(options.updateAddressBar === \"permalink\") {\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler);\n\t\t} else {\n\t\t\t$tw.locationHash = \"#\" + encodeURIComponent(targetTiddler) + \":\" + encodeURIComponent($tw.utils.stringifyList(storyList));\n\t\t}\n\t\t// Only change the location hash if we must, thus avoiding unnecessary onhashchange events\n\t\tif($tw.utils.getLocationHash() !== $tw.locationHash) {\n\t\t\tif(options.updateHistory === \"yes\") {\n\t\t\t\t// Assign the location hash so that history is updated\n\t\t\t\twindow.location.hash = $tw.locationHash;\n\t\t\t} else {\n\t\t\t\t// We use replace so that browser history isn't affected\n\t\t\t\twindow.location.replace(window.location.toString().split(\"#\")[0] + $tw.locationHash);\n\t\t\t}\n\t\t}\n\t}\n}\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/startup/windows.js": {
"title": "$:/core/modules/startup/windows.js",
"text": "/*\\\ntitle: $:/core/modules/startup/windows.js\ntype: application/javascript\nmodule-type: startup\n\nSetup root widget handlers for the messages concerned with opening external browser windows\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"windows\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\n// Global to keep track of open windows (hashmap by title)\nvar windows = {};\n\nexports.startup = function() {\n\t// Handle open window message\n\t$tw.rootWidget.addEventListener(\"tm-open-window\",function(event) {\n\t\t// Get the parameters\n\t\tvar refreshHandler,\n\t\t\ttitle = event.param || event.tiddlerTitle,\n\t\t\tparamObject = event.paramObject || {},\n\t\t\ttemplate = paramObject.template || \"$:/core/templates/single.tiddler.window\",\n\t\t\twidth = paramObject.width || \"700\",\n\t\t\theight = paramObject.height || \"600\",\n\t\t\tvariables = $tw.utils.extend({},paramObject,{currentTiddler: title});\n\t\t// Open the window\n\t\tvar srcWindow = window.open(\"\",\"external-\" + title,\"scrollbars,width=\" + width + \",height=\" + height),\n\t\t\tsrcDocument = srcWindow.document;\n\t\twindows[title] = srcWindow;\n\t\t// Check for reopening the same window\n\t\tif(srcWindow.haveInitialisedWindow) {\n\t\t\treturn;\n\t\t}\n\t\t// Initialise the document\n\t\tsrcDocument.write(\"<html><head></head><body class='tc-body tc-single-tiddler-window'></body></html>\");\n\t\tsrcDocument.close();\n\t\tsrcDocument.title = title;\n\t\tsrcWindow.addEventListener(\"beforeunload\",function(event) {\n\t\t\tdelete windows[title];\n\t\t\t$tw.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t},false);\n\t\t// Set up the styles\n\t\tvar styleWidgetNode = $tw.wiki.makeTranscludeWidget(\"$:/core/ui/PageStylesheet\",{\n\t\t\t\tdocument: $tw.fakeDocument,\n\t\t\t\tvariables: variables,\n\t\t\t\timportPageMacros: true}),\n\t\t\tstyleContainer = $tw.fakeDocument.createElement(\"style\");\n\t\tstyleWidgetNode.render(styleContainer,null);\n\t\tvar styleElement = srcDocument.createElement(\"style\");\n\t\tstyleElement.innerHTML = styleContainer.textContent;\n\t\tsrcDocument.head.insertBefore(styleElement,srcDocument.head.firstChild);\n\t\t// Render the text of the tiddler\n\t\tvar parser = $tw.wiki.parseTiddler(template),\n\t\t\twidgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: variables});\n\t\twidgetNode.render(srcDocument.body,srcDocument.body.firstChild);\n\t\t// Function to handle refreshes\n\t\trefreshHandler = function(changes) {\n\t\t\tif(styleWidgetNode.refresh(changes,styleContainer,null)) {\n\t\t\t\tstyleElement.innerHTML = styleContainer.textContent;\n\t\t\t}\n\t\t\twidgetNode.refresh(changes);\n\t\t};\n\t\t$tw.wiki.addEventListener(\"change\",refreshHandler);\n\t\tsrcWindow.haveInitialisedWindow = true;\n\t});\n\t// Close open windows when unloading main window\n\t$tw.addUnloadTask(function() {\n\t\t$tw.utils.each(windows,function(win) {\n\t\t\twin.close();\n\t\t});\n\t});\n\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "startup"
},
"$:/core/modules/story.js": {
"title": "$:/core/modules/story.js",
"text": "/*\\\ntitle: $:/core/modules/story.js\ntype: application/javascript\nmodule-type: global\n\nLightweight object for managing interactions with the story and history lists.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nConstruct Story object with options:\nwiki: reference to wiki object to use to resolve tiddler titles\nstoryTitle: title of story list tiddler\nhistoryTitle: title of history list tiddler\n*/\nfunction Story(options) {\n\toptions = options || {};\n\tthis.wiki = options.wiki || $tw.wiki;\n\tthis.storyTitle = options.storyTitle || \"$:/StoryList\";\n\tthis.historyTitle = options.historyTitle || \"$:/HistoryList\";\n};\n\nStory.prototype.navigateTiddler = function(navigateTo,navigateFromTitle,navigateFromClientRect) {\n\tthis.addToStory(navigateTo,navigateFromTitle);\n\tthis.addToHistory(navigateTo,navigateFromClientRect);\n};\n\nStory.prototype.getStoryList = function() {\n\treturn this.wiki.getTiddlerList(this.storyTitle) || [];\n};\n\nStory.prototype.addToStory = function(navigateTo,navigateFromTitle,options) {\n\toptions = options || {};\n\tvar storyList = this.getStoryList();\n\t// See if the tiddler is already there\n\tvar slot = storyList.indexOf(navigateTo);\n\t// Quit if it already exists in the story river\n\tif(slot >= 0) {\n\t\treturn;\n\t}\n\t// First we try to find the position of the story element we navigated from\n\tvar fromIndex = storyList.indexOf(navigateFromTitle);\n\tif(fromIndex >= 0) {\n\t\t// The tiddler is added from inside the river\n\t\t// Determine where to insert the tiddler; Fallback is \"below\"\n\t\tswitch(options.openLinkFromInsideRiver) {\n\t\t\tcase \"top\":\n\t\t\t\tslot = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\tslot = storyList.length;\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\tslot = fromIndex;\n\t\t\t\tbreak;\n\t\t\tcase \"below\": // Intentional fall-through\n\t\t\tdefault:\n\t\t\t\tslot = fromIndex + 1;\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is \"top\"\n\t\tif(options.openLinkFromOutsideRiver === \"bottom\") {\n\t\t\t// Insert at bottom\n\t\t\tslot = storyList.length;\n\t\t} else {\n\t\t\t// Insert at top\n\t\t\tslot = 0;\n\t\t}\n\t}\n\t// Add the tiddler\n\tstoryList.splice(slot,0,navigateTo);\n\t// Save the story\n\tthis.saveStoryList(storyList);\n};\n\nStory.prototype.saveStoryList = function(storyList) {\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\tthis.wiki.getCreationFields(),\n\t\t{title: this.storyTitle},\n\t\tstoryTiddler,\n\t\t{list: storyList},\n\t\tthis.wiki.getModificationFields()\n\t));\n};\n\nStory.prototype.addToHistory = function(navigateTo,navigateFromClientRect) {\n\tvar titles = $tw.utils.isArray(navigateTo) ? navigateTo : [navigateTo];\n\t// Add a new record to the top of the history stack\n\tvar historyList = this.wiki.getTiddlerData(this.historyTitle,[]);\n\t$tw.utils.each(titles,function(title) {\n\t\thistoryList.push({title: title, fromPageRect: navigateFromClientRect});\n\t});\n\tthis.wiki.setTiddlerData(this.historyTitle,historyList,{\"current-tiddler\": titles[titles.length-1]});\n};\n\nStory.prototype.storyCloseTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyCloseAllTiddlers = function() {\n// TBD\n};\n\nStory.prototype.storyCloseOtherTiddlers = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyEditTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyDeleteTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storySaveTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyCancelTiddler = function(targetTitle) {\n// TBD\n};\n\nStory.prototype.storyNewTiddler = function(targetTitle) {\n// TBD\n};\n\nexports.Story = Story;\n\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/storyviews/classic.js": {
"title": "$:/core/modules/storyviews/classic.js",
"text": "/*\\\ntitle: $:/core/modules/storyviews/classic.js\ntype: application/javascript\nmodule-type: storyview\n\nViews the story as a linear sequence\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\n\nvar ClassicStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n};\n\nClassicStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\n};\n\nClassicStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Get the current height of the tiddler\n\tvar computedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n};\n\nClassicStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\twidget.removeChildDomNodes();\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Get the current height of the tiddler\n\tvar currWidth = targetElement.offsetWidth,\n\t\tcomputedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Remove the dom nodes of the widget at the end of the transition\n\tsetTimeout(removeElement,duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"translateX(0px)\"},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{transform: \"translateX(-\" + currWidth + \"px)\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n};\n\nexports.classic = ClassicStoryView;\n\n})();",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/pop.js": {
"title": "$:/core/modules/storyviews/pop.js",
"text": "/*\\\ntitle: $:/core/modules/storyviews/pop.js\ntype: application/javascript\nmodule-type: storyview\n\nAnimates list insertions and removals\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar PopStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n};\n\nPopStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\n};\n\nPopStoryView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Reset once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \"none\"},\n\t\t\t{transform: \"none\"}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"scale(2)\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{transform: \"scale(1)\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n};\n\nPopStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\tif(targetElement.parentNode) {\n\t\t\t\twidget.removeChildDomNodes();\n\t\t\t}\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Remove the element at the end of the transition\n\tsetTimeout(removeElement,duration);\n\t// Animate the closure\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{transform: \"scale(1)\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{transform: \"scale(0.1)\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n};\n\nexports.pop = PopStoryView;\n\n})();\n",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/storyviews/zoomin.js": {
"title": "$:/core/modules/storyviews/zoomin.js",
"text": "/*\\\ntitle: $:/core/modules/storyviews/zoomin.js\ntype: application/javascript\nmodule-type: storyview\n\nZooms between individual tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\n\nvar ZoominListView = function(listWidget) {\n\tvar self = this;\n\tthis.listWidget = listWidget;\n\t// Get the index of the tiddler that is at the top of the history\n\tvar history = this.listWidget.wiki.getTiddlerDataCached(this.listWidget.historyTitle,[]),\n\t\ttargetTiddler;\n\tif(history.length > 0) {\n\t\ttargetTiddler = history[history.length-1].title;\n\t}\n\t// Make all the tiddlers position absolute, and hide all but the top (or first) one\n\t$tw.utils.each(this.listWidget.children,function(itemWidget,index) {\n\t\tvar domNode = itemWidget.findFirstDomNode();\n\t\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\t\tif(!(domNode instanceof Element)) {\n\t\t\treturn;\n\t\t}\n\t\tif((targetTiddler && targetTiddler !== itemWidget.parseTreeNode.itemTitle) || (!targetTiddler && index)) {\n\t\t\tdomNode.style.display = \"none\";\n\t\t} else {\n\t\t\tself.currentTiddlerDomNode = domNode;\n\t\t}\n\t\t$tw.utils.addClass(domNode,\"tc-storyview-zoomin-tiddler\");\n\t});\n};\n\nZoominListView.prototype.navigateTo = function(historyInfo) {\n\tvar duration = $tw.utils.getAnimationDuration(),\n\t\tlistElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Make the new tiddler be position absolute and visible so that we can measure it\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"block\"},\n\t\t{transformOrigin: \"0 0\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{transition: \"none\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t// Get the position of the source node, or use the centre of the window as the source position\n\tvar sourceBounds = historyInfo.fromPageRect || {\n\t\t\tleft: window.innerWidth/2 - 2,\n\t\t\ttop: window.innerHeight/2 - 2,\n\t\t\twidth: window.innerWidth/8,\n\t\t\theight: window.innerHeight/8\n\t\t};\n\t// Try to find the title node in the target tiddler\n\tvar titleDomNode = findTitleDomNode(listItemWidget) || listItemWidget.findFirstDomNode(),\n\t\tzoomBounds = titleDomNode.getBoundingClientRect();\n\t// Compute the transform for the target tiddler to make the title lie over the source rectange\n\tvar targetBounds = targetElement.getBoundingClientRect(),\n\t\tscale = sourceBounds.width / zoomBounds.width,\n\t\tx = sourceBounds.left - targetBounds.left - (zoomBounds.left - targetBounds.left) * scale,\n\t\ty = sourceBounds.top - targetBounds.top - (zoomBounds.top - targetBounds.top) * scale;\n\t// Transform the target tiddler to its starting position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(targetElement);\n\t// Apply the ending transitions with a timeout to ensure that the previously applied transformations are applied first\n\tvar self = this,\n\t\tprevCurrentTiddler = this.currentTiddlerDomNode;\n\tthis.currentTiddlerDomNode = targetElement;\n\t// Transform the target tiddler to its natural size\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t{opacity: \"1.0\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{zIndex: \"500\"},\n\t]);\n\t// Transform the previous tiddler out of the way and then hide it\n\tif(prevCurrentTiddler && prevCurrentTiddler !== targetElement) {\n\t\tscale = zoomBounds.width / sourceBounds.width;\n\t\tx = zoomBounds.left - targetBounds.left - (sourceBounds.left - targetBounds.left) * scale;\n\t\ty = zoomBounds.top - targetBounds.top - (sourceBounds.top - targetBounds.top) * scale;\n\t\t$tw.utils.setStyle(prevCurrentTiddler,[\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t\t{opacity: \"0.0\"},\n\t\t\t{transformOrigin: \"0 0\"},\n\t\t\t{transform: \"translateX(\" + x + \"px) translateY(\" + y + \"px) scale(\" + scale + \")\"},\n\t\t\t{zIndex: \"0\"}\n\t\t]);\n\t\t// Hide the tiddler when the transition has finished\n\t\tsetTimeout(function() {\n\t\t\tif(self.currentTiddlerDomNode !== prevCurrentTiddler) {\n\t\t\t\tprevCurrentTiddler.style.display = \"none\";\n\t\t\t}\n\t\t},duration);\n\t}\n\t// Scroll the target into view\n//\t$tw.pageScroller.scrollIntoView(targetElement);\n};\n\n/*\nFind the first child DOM node of a widget that has the class \"tc-title\"\n*/\nfunction findTitleDomNode(widget,targetClass) {\n\ttargetClass = targetClass || \"tc-title\";\n\tvar domNode = widget.findFirstDomNode();\n\tif(domNode && domNode.querySelector) {\n\t\treturn domNode.querySelector(\".\" + targetClass);\n\t}\n\treturn null;\n}\n\nZoominListView.prototype.insert = function(widget) {\n\tvar targetElement = widget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Make the newly inserted node position absolute and hidden\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"none\"}\n\t]);\n};\n\nZoominListView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\twidget.removeChildDomNodes();\n\t\t};\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Abandon if hidden\n\tif(targetElement.style.display != \"block\" ) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\t// Set up the tiddler that is being closed\n\t$tw.utils.addClass(targetElement,\"tc-storyview-zoomin-tiddler\");\n\t$tw.utils.setStyle(targetElement,[\n\t\t{display: \"block\"},\n\t\t{transformOrigin: \"50% 50%\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t{transition: \"none\"},\n\t\t{zIndex: \"0\"}\n\t]);\n\t// We'll move back to the previous or next element in the story\n\tvar toWidget = widget.previousSibling();\n\tif(!toWidget) {\n\t\ttoWidget = widget.nextSibling();\n\t}\n\tvar toWidgetDomNode = toWidget && toWidget.findFirstDomNode();\n\t// Set up the tiddler we're moving back in\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.addClass(toWidgetDomNode,\"tc-storyview-zoomin-tiddler\");\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{display: \"block\"},\n\t\t\t{transformOrigin: \"50% 50%\"},\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(10)\"},\n\t\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t\t{opacity: \"0\"},\n\t\t\t{zIndex: \"500\"}\n\t\t]);\n\t\tthis.currentTiddlerDomNode = toWidgetDomNode;\n\t}\n\t// Animate them both\n\t// Force layout\n\t$tw.utils.forceLayout(this.listWidget.parentDomNode);\n\t// First, the tiddler we're closing\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transformOrigin: \"50% 50%\"},\n\t\t{transform: \"translateX(0px) translateY(0px) scale(0.1)\"},\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", opacity \" + duration + \"ms \" + easing},\n\t\t{opacity: \"0\"},\n\t\t{zIndex: \"0\"}\n\t]);\n\tsetTimeout(removeElement,duration);\n\t// Now the tiddler we're going back to\n\tif(toWidgetDomNode) {\n\t\t$tw.utils.setStyle(toWidgetDomNode,[\n\t\t\t{transform: \"translateX(0px) translateY(0px) scale(1)\"},\n\t\t\t{opacity: \"1\"}\n\t\t]);\n\t}\n\treturn true; // Indicate that we'll delete the DOM node\n};\n\nexports.zoomin = ZoominListView;\n\n})();\n",
"type": "application/javascript",
"module-type": "storyview"
},
"$:/core/modules/syncer.js": {
"title": "$:/core/modules/syncer.js",
"text": "/*\\\ntitle: $:/core/modules/syncer.js\ntype: application/javascript\nmodule-type: global\n\nThe syncer tracks changes to the store. If a syncadaptor is used then individual tiddlers are synchronised through it. If there is no syncadaptor then the entire wiki is saved via saver modules.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nDefaults\n*/\nSyncer.prototype.titleIsLoggedIn = \"$:/status/IsLoggedIn\";\nSyncer.prototype.titleUserName = \"$:/status/UserName\";\nSyncer.prototype.titleSyncFilter = \"$:/config/SyncFilter\";\nSyncer.prototype.titleSavedNotification = \"$:/language/Notifications/Save/Done\";\nSyncer.prototype.taskTimerInterval = 1 * 1000; // Interval for sync timer\nSyncer.prototype.throttleInterval = 1 * 1000; // Defer saving tiddlers if they've changed in the last 1s...\nSyncer.prototype.fallbackInterval = 10 * 1000; // Unless the task is older than 10s\nSyncer.prototype.pollTimerInterval = 60 * 1000; // Interval for polling for changes from the adaptor\n\n/*\nInstantiate the syncer with the following options:\nsyncadaptor: reference to syncadaptor to be used\nwiki: wiki to be synced\n*/\nfunction Syncer(options) {\n\tvar self = this;\n\tthis.wiki = options.wiki;\n\tthis.syncadaptor = options.syncadaptor;\n\tthis.disableUI = !!options.disableUI;\n\tthis.titleIsLoggedIn = options.titleIsLoggedIn || this.titleIsLoggedIn;\n\tthis.titleUserName = options.titleUserName || this.titleUserName;\n\tthis.titleSyncFilter = options.titleSyncFilter || this.titleSyncFilter;\n\tthis.titleSavedNotification = options.titleSavedNotification || this.titleSavedNotification;\n\tthis.taskTimerInterval = options.taskTimerInterval || this.taskTimerInterval;\n\tthis.throttleInterval = options.throttleInterval || this.throttleInterval;\n\tthis.fallbackInterval = options.fallbackInterval || this.fallbackInterval;\n\tthis.pollTimerInterval = options.pollTimerInterval || this.pollTimerInterval;\n\tthis.logging = \"logging\" in options ? options.logging : true;\n\t// Make a logger\n\tthis.logger = new $tw.utils.Logger(\"syncer\" + ($tw.browser ? \"-browser\" : \"\") + ($tw.node ? \"-server\" : \"\") + (this.syncadaptor.name ? (\"-\" + this.syncadaptor.name) : \"\"),{\n\t\t\tcolour: \"cyan\",\n\t\t\tenable: this.logging\n\t\t});\n\t// Compile the dirty tiddler filter\n\tthis.filterFn = this.wiki.compileFilter(this.wiki.getTiddlerText(this.titleSyncFilter));\n\t// Record information for known tiddlers\n\tthis.readTiddlerInfo();\n\t// Tasks are {type: \"load\"/\"save\"/\"delete\", title:, queueTime:, lastModificationTime:}\n\tthis.taskQueue = {}; // Hashmap of tasks yet to be performed\n\tthis.taskInProgress = {}; // Hash of tasks in progress\n\tthis.taskTimerId = null; // Timer for task dispatch\n\tthis.pollTimerId = null; // Timer for polling server\n\t// Listen out for changes to tiddlers\n\tthis.wiki.addEventListener(\"change\",function(changes) {\n\t\tself.syncToServer(changes);\n\t});\n\t// Browser event handlers\n\tif($tw.browser && !this.disableUI) {\n\t\t// Set up our beforeunload handler\n\t\t$tw.addUnloadTask(function(event) {\n\t\t\tvar confirmationMessage;\n\t\t\tif(self.isDirty()) {\n\t\t\t\tconfirmationMessage = $tw.language.getString(\"UnsavedChangesWarning\");\n\t\t\t\tevent.returnValue = confirmationMessage; // Gecko\n\t\t\t}\n\t\t\treturn confirmationMessage;\n\t\t});\n\t\t// Listen out for login/logout/refresh events in the browser\n\t\t$tw.rootWidget.addEventListener(\"tm-login\",function() {\n\t\t\tself.handleLoginEvent();\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-logout\",function() {\n\t\t\tself.handleLogoutEvent();\n\t\t});\n\t\t$tw.rootWidget.addEventListener(\"tm-server-refresh\",function() {\n\t\t\tself.handleRefreshEvent();\n\t\t});\n\t}\n\t// Listen out for lazyLoad events\n\tif(!this.disableUI) {\n\t\tthis.wiki.addEventListener(\"lazyLoad\",function(title) {\n\t\t\tself.handleLazyLoadEvent(title);\n\t\t});\t\t\n\t}\n\t// Get the login status\n\tthis.getStatus(function(err,isLoggedIn) {\n\t\t// Do a sync from the server\n\t\tself.syncFromServer();\n\t});\n}\n\n/*\nRead (or re-read) the latest tiddler info from the store\n*/\nSyncer.prototype.readTiddlerInfo = function() {\n\t// Hashmap by title of {revision:,changeCount:,adaptorInfo:}\n\tthis.tiddlerInfo = {};\n\t// Record information for known tiddlers\n\tvar self = this,\n\t\ttiddlers = this.filterFn.call(this.wiki);\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\tself.tiddlerInfo[title] = {\n\t\t\trevision: tiddler.fields.revision,\n\t\t\tadaptorInfo: self.syncadaptor && self.syncadaptor.getTiddlerInfo(tiddler),\n\t\t\tchangeCount: self.wiki.getChangeCount(title),\n\t\t\thasBeenLazyLoaded: false\n\t\t};\n\t});\n};\n\n/*\nCreate an tiddlerInfo structure if it doesn't already exist\n*/\nSyncer.prototype.createTiddlerInfo = function(title) {\n\tif(!$tw.utils.hop(this.tiddlerInfo,title)) {\n\t\tthis.tiddlerInfo[title] = {\n\t\t\trevision: null,\n\t\t\tadaptorInfo: {},\n\t\t\tchangeCount: -1,\n\t\t\thasBeenLazyLoaded: false\n\t\t};\n\t}\n};\n\n/*\nChecks whether the wiki is dirty (ie the window shouldn't be closed)\n*/\nSyncer.prototype.isDirty = function() {\n\treturn (this.numTasksInQueue() > 0) || (this.numTasksInProgress() > 0);\n};\n\n/*\nUpdate the document body with the class \"tc-dirty\" if the wiki has unsaved/unsynced changes\n*/\nSyncer.prototype.updateDirtyStatus = function() {\n\tif($tw.browser && !this.disableUI) {\n\t\t$tw.utils.toggleClass(document.body,\"tc-dirty\",this.isDirty());\n\t}\n};\n\n/*\nSave an incoming tiddler in the store, and updates the associated tiddlerInfo\n*/\nSyncer.prototype.storeTiddler = function(tiddlerFields,hasBeenLazyLoaded) {\n\t// Save the tiddler\n\tvar tiddler = new $tw.Tiddler(this.wiki.getTiddler(tiddlerFields.title),tiddlerFields);\n\tthis.wiki.addTiddler(tiddler);\n\t// Save the tiddler revision and changeCount details\n\tthis.tiddlerInfo[tiddlerFields.title] = {\n\t\trevision: tiddlerFields.revision,\n\t\tadaptorInfo: this.syncadaptor.getTiddlerInfo(tiddler),\n\t\tchangeCount: this.wiki.getChangeCount(tiddlerFields.title),\n\t\thasBeenLazyLoaded: hasBeenLazyLoaded !== undefined ? hasBeenLazyLoaded : true\n\t};\n};\n\nSyncer.prototype.getStatus = function(callback) {\n\tvar self = this;\n\t// Check if the adaptor supports getStatus()\n\tif(this.syncadaptor && this.syncadaptor.getStatus) {\n\t\t// Mark us as not logged in\n\t\tthis.wiki.addTiddler({title: this.titleIsLoggedIn,text: \"no\"});\n\t\t// Get login status\n\t\tthis.syncadaptor.getStatus(function(err,isLoggedIn,username) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Set the various status tiddlers\n\t\t\tself.wiki.addTiddler({title: self.titleIsLoggedIn,text: isLoggedIn ? \"yes\" : \"no\"});\n\t\t\tif(isLoggedIn) {\n\t\t\t\tself.wiki.addTiddler({title: self.titleUserName,text: username || \"\"});\n\t\t\t} else {\n\t\t\t\tself.wiki.deleteTiddler(self.titleUserName);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tif(callback) {\n\t\t\t\tcallback(err,isLoggedIn,username);\n\t\t\t}\n\t\t});\n\t} else {\n\t\tcallback(null,true,\"UNAUTHENTICATED\");\n\t}\n};\n\n/*\nSynchronise from the server by reading the skinny tiddler list and queuing up loads for any tiddlers that we don't already have up to date\n*/\nSyncer.prototype.syncFromServer = function() {\n\tif(this.syncadaptor && this.syncadaptor.getSkinnyTiddlers) {\n\t\tthis.logger.log(\"Retrieving skinny tiddler list\");\n\t\tvar self = this;\n\t\tif(this.pollTimerId) {\n\t\t\tclearTimeout(this.pollTimerId);\n\t\t\tthis.pollTimerId = null;\n\t\t}\n\t\tthis.syncadaptor.getSkinnyTiddlers(function(err,tiddlers) {\n\t\t\t// Trigger the next sync\n\t\t\tself.pollTimerId = setTimeout(function() {\n\t\t\t\tself.pollTimerId = null;\n\t\t\t\tself.syncFromServer.call(self);\n\t\t\t},self.pollTimerInterval);\n\t\t\t// Check for errors\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert($tw.language.getString(\"Error/RetrievingSkinny\") + \":\",err);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Process each incoming tiddler\n\t\t\tfor(var t=0; t<tiddlers.length; t++) {\n\t\t\t\t// Get the incoming tiddler fields, and the existing tiddler\n\t\t\t\tvar tiddlerFields = tiddlers[t],\n\t\t\t\t\tincomingRevision = tiddlerFields.revision + \"\",\n\t\t\t\t\ttiddler = self.wiki.getTiddler(tiddlerFields.title),\n\t\t\t\t\ttiddlerInfo = self.tiddlerInfo[tiddlerFields.title],\n\t\t\t\t\tcurrRevision = tiddlerInfo ? tiddlerInfo.revision : null;\n\t\t\t\t// Ignore the incoming tiddler if it's the same as the revision we've already got\n\t\t\t\tif(currRevision !== incomingRevision) {\n\t\t\t\t\t// Do a full load if we've already got a fat version of the tiddler\n\t\t\t\t\tif(tiddler && tiddler.fields.text !== undefined) {\n\t\t\t\t\t\t// Do a full load of this tiddler\n\t\t\t\t\t\tself.enqueueSyncTask({\n\t\t\t\t\t\t\ttype: \"load\",\n\t\t\t\t\t\t\ttitle: tiddlerFields.title\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Load the skinny version of the tiddler\n\t\t\t\t\t\tself.storeTiddler(tiddlerFields,false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nSynchronise a set of changes to the server\n*/\nSyncer.prototype.syncToServer = function(changes) {\n\tvar self = this,\n\t\tnow = Date.now(),\n\t\tfilteredChanges = this.filterFn.call(this.wiki,function(callback) {\n\t\t\t$tw.utils.each(changes,function(change,title) {\n\t\t\t\tvar tiddler = self.wiki.getTiddler(title);\n\t\t\t\tcallback(tiddler,title);\n\t\t\t});\n\t\t});\n\t$tw.utils.each(changes,function(change,title,object) {\n\t\t// Process the change if it is a deletion of a tiddler we're already syncing, or is on the filtered change list\n\t\tif((change.deleted && $tw.utils.hop(self.tiddlerInfo,title)) || filteredChanges.indexOf(title) !== -1) {\n\t\t\t// Queue a task to sync this tiddler\n\t\t\tself.enqueueSyncTask({\n\t\t\t\ttype: change.deleted ? \"delete\" : \"save\",\n\t\t\t\ttitle: title\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nLazily load a skinny tiddler if we can\n*/\nSyncer.prototype.handleLazyLoadEvent = function(title) {\n\t// Don't lazy load the same tiddler twice\n\tvar info = this.tiddlerInfo[title];\n\tif(!info || !info.hasBeenLazyLoaded) {\n\t\tthis.createTiddlerInfo(title);\n\t\tthis.tiddlerInfo[title].hasBeenLazyLoaded = true;\n\t\t// Queue up a sync task to load this tiddler\n\t\tthis.enqueueSyncTask({\n\t\t\ttype: \"load\",\n\t\t\ttitle: title\n\t\t});\t\t\n\t}\n};\n\n/*\nDispay a password prompt and allow the user to login\n*/\nSyncer.prototype.handleLoginEvent = function() {\n\tvar self = this;\n\tthis.getStatus(function(err,isLoggedIn,username) {\n\t\tif(!isLoggedIn) {\n\t\t\t$tw.passwordPrompt.createPrompt({\n\t\t\t\tserviceName: $tw.language.getString(\"LoginToTiddlySpace\"),\n\t\t\t\tcallback: function(data) {\n\t\t\t\t\tself.login(data.username,data.password,function(err,isLoggedIn) {\n\t\t\t\t\t\tself.syncFromServer();\n\t\t\t\t\t});\n\t\t\t\t\treturn true; // Get rid of the password prompt\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n};\n\n/*\nAttempt to login to TiddlyWeb.\n\tusername: username\n\tpassword: password\n\tcallback: invoked with arguments (err,isLoggedIn)\n*/\nSyncer.prototype.login = function(username,password,callback) {\n\tthis.logger.log(\"Attempting to login as\",username);\n\tvar self = this;\n\tif(this.syncadaptor.login) {\n\t\tthis.syncadaptor.login(username,password,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tself.getStatus(function(err,isLoggedIn,username) {\n\t\t\t\tif(callback) {\n\t\t\t\t\tcallback(null,isLoggedIn);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t} else {\n\t\tcallback(null,true);\n\t}\n};\n\n/*\nAttempt to log out of TiddlyWeb\n*/\nSyncer.prototype.handleLogoutEvent = function() {\n\tthis.logger.log(\"Attempting to logout\");\n\tvar self = this;\n\tif(this.syncadaptor.logout) {\n\t\tthis.syncadaptor.logout(function(err) {\n\t\t\tif(err) {\n\t\t\t\tself.logger.alert(err);\n\t\t\t} else {\n\t\t\t\tself.getStatus();\n\t\t\t}\n\t\t});\n\t}\n};\n\n/*\nImmediately refresh from the server\n*/\nSyncer.prototype.handleRefreshEvent = function() {\n\tthis.syncFromServer();\n};\n\n/*\nQueue up a sync task. If there is already a pending task for the tiddler, just update the last modification time\n*/\nSyncer.prototype.enqueueSyncTask = function(task) {\n\tvar self = this,\n\t\tnow = Date.now();\n\t// Set the timestamps on this task\n\ttask.queueTime = now;\n\ttask.lastModificationTime = now;\n\t// Fill in some tiddlerInfo if the tiddler is one we haven't seen before\n\tthis.createTiddlerInfo(task.title);\n\t// Bail if this is a save and the tiddler is already at the changeCount that the server has\n\tif(task.type === \"save\" && this.wiki.getChangeCount(task.title) <= this.tiddlerInfo[task.title].changeCount) {\n\t\treturn;\n\t}\n\t// Check if this tiddler is already in the queue\n\tif($tw.utils.hop(this.taskQueue,task.title)) {\n\t\t// this.logger.log(\"Re-queueing up sync task with type:\",task.type,\"title:\",task.title);\n\t\tvar existingTask = this.taskQueue[task.title];\n\t\t// If so, just update the last modification time\n\t\texistingTask.lastModificationTime = task.lastModificationTime;\n\t\t// If the new task is a save then we upgrade the existing task to a save. Thus a pending load is turned into a save if the tiddler changes locally in the meantime. But a pending save is not modified to become a load\n\t\tif(task.type === \"save\" || task.type === \"delete\") {\n\t\t\texistingTask.type = task.type;\n\t\t}\n\t} else {\n\t\t// this.logger.log(\"Queuing up sync task with type:\",task.type,\"title:\",task.title);\n\t\t// If it is not in the queue, insert it\n\t\tthis.taskQueue[task.title] = task;\n\t\tthis.updateDirtyStatus();\n\t}\n\t// Process the queue\n\t$tw.utils.nextTick(function() {self.processTaskQueue.call(self);});\n};\n\n/*\nReturn the number of tasks in progress\n*/\nSyncer.prototype.numTasksInProgress = function() {\n\treturn $tw.utils.count(this.taskInProgress);\n};\n\n/*\nReturn the number of tasks in the queue\n*/\nSyncer.prototype.numTasksInQueue = function() {\n\treturn $tw.utils.count(this.taskQueue);\n};\n\n/*\nTrigger a timeout if one isn't already outstanding\n*/\nSyncer.prototype.triggerTimeout = function() {\n\tvar self = this;\n\tif(!this.taskTimerId) {\n\t\tthis.taskTimerId = setTimeout(function() {\n\t\t\tself.taskTimerId = null;\n\t\t\tself.processTaskQueue.call(self);\n\t\t},self.taskTimerInterval);\n\t}\n};\n\n/*\nProcess the task queue, performing the next task if appropriate\n*/\nSyncer.prototype.processTaskQueue = function() {\n\tvar self = this;\n\t// Only process a task if the sync adaptor is fully initialised and we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes\n\tif((!this.syncadaptor.isReady || this.syncadaptor.isReady()) && this.numTasksInProgress() === 0) {\n\t\t// Choose the next task to perform\n\t\tvar task = this.chooseNextTask();\n\t\t// Perform the task if we had one\n\t\tif(task) {\n\t\t\t// Remove the task from the queue and add it to the in progress list\n\t\t\tdelete this.taskQueue[task.title];\n\t\t\tthis.taskInProgress[task.title] = task;\n\t\t\tthis.updateDirtyStatus();\n\t\t\t// Dispatch the task\n\t\t\tthis.dispatchTask(task,function(err) {\n\t\t\t\tif(err) {\n\t\t\t\t\tself.logger.alert(\"Sync error while processing '\" + task.title + \"':\\n\" + err);\n\t\t\t\t}\n\t\t\t\t// Mark that this task is no longer in progress\n\t\t\t\tdelete self.taskInProgress[task.title];\n\t\t\t\tself.updateDirtyStatus();\n\t\t\t\t// Process the next task\n\t\t\t\tself.processTaskQueue.call(self);\n\t\t\t});\n\t\t} else {\n\t\t\t// Make sure we've set a time if there wasn't a task to perform, but we've still got tasks in the queue\n\t\t\tif(this.numTasksInQueue() > 0) {\n\t\t\t\tthis.triggerTimeout();\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nChoose the next applicable task\n*/\nSyncer.prototype.chooseNextTask = function() {\n\tvar self = this,\n\t\tcandidateTask = null,\n\t\tnow = Date.now();\n\t// Select the best candidate task\n\t$tw.utils.each(this.taskQueue,function(task,title) {\n\t\t// Exclude the task if there's one of the same name in progress\n\t\tif($tw.utils.hop(self.taskInProgress,title)) {\n\t\t\treturn;\n\t\t}\n\t\t// Exclude the task if it is a save and the tiddler has been modified recently, but not hit the fallback time\n\t\tif(task.type === \"save\" && (now - task.lastModificationTime) < self.throttleInterval &&\n\t\t\t(now - task.queueTime) < self.fallbackInterval) {\n\t\t\treturn;\n\t\t}\n\t\t// Exclude the task if it is newer than the current best candidate\n\t\tif(candidateTask && candidateTask.queueTime < task.queueTime) {\n\t\t\treturn;\n\t\t}\n\t\t// Now this is our best candidate\n\t\tcandidateTask = task;\n\t});\n\treturn candidateTask;\n};\n\n/*\nDispatch a task and invoke the callback\n*/\nSyncer.prototype.dispatchTask = function(task,callback) {\n\tvar self = this;\n\tif(task.type === \"save\") {\n\t\tvar changeCount = this.wiki.getChangeCount(task.title),\n\t\t\ttiddler = this.wiki.getTiddler(task.title);\n\t\tthis.logger.log(\"Dispatching 'save' task:\",task.title);\n\t\tif(tiddler) {\n\t\t\tthis.syncadaptor.saveTiddler(tiddler,function(err,adaptorInfo,revision) {\n\t\t\t\tif(err) {\n\t\t\t\t\treturn callback(err);\n\t\t\t\t}\n\t\t\t\t// Adjust the info stored about this tiddler\n\t\t\t\tself.tiddlerInfo[task.title] = {\n\t\t\t\t\tchangeCount: changeCount,\n\t\t\t\t\tadaptorInfo: adaptorInfo,\n\t\t\t\t\trevision: revision\n\t\t\t\t};\n\t\t\t\t// Invoke the callback\n\t\t\t\tcallback(null);\n\t\t\t},{\n\t\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\n\t\t\t});\n\t\t} else {\n\t\t\tthis.logger.log(\" Not Dispatching 'save' task:\",task.title,\"tiddler does not exist\");\n\t\t\treturn callback(null);\n\t\t}\n\t} else if(task.type === \"load\") {\n\t\t// Load the tiddler\n\t\tthis.logger.log(\"Dispatching 'load' task:\",task.title);\n\t\tthis.syncadaptor.loadTiddler(task.title,function(err,tiddlerFields) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\t// Store the tiddler\n\t\t\tif(tiddlerFields) {\n\t\t\t\tself.storeTiddler(tiddlerFields,true);\n\t\t\t}\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t});\n\t} else if(task.type === \"delete\") {\n\t\t// Delete the tiddler\n\t\tthis.logger.log(\"Dispatching 'delete' task:\",task.title);\n\t\tthis.syncadaptor.deleteTiddler(task.title,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tdelete self.tiddlerInfo[task.title];\n\t\t\t// Invoke the callback\n\t\t\tcallback(null);\n\t\t},{\n\t\t\ttiddlerInfo: self.tiddlerInfo[task.title]\n\t\t});\n\t}\n};\n\nexports.Syncer = Syncer;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/tiddler.js": {
"title": "$:/core/modules/tiddler.js",
"text": "/*\\\ntitle: $:/core/modules/tiddler.js\ntype: application/javascript\nmodule-type: tiddlermethod\n\nExtension methods for the $tw.Tiddler object (constructor and methods required at boot time are in boot/boot.js)\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.hasTag = function(tag) {\n\treturn this.fields.tags && this.fields.tags.indexOf(tag) !== -1;\n};\n\nexports.isPlugin = function() {\n\treturn this.fields.type === \"application/json\" && this.hasField(\"plugin-type\");\n};\n\nexports.isDraft = function() {\n\treturn this.hasField(\"draft.of\");\n};\n\nexports.getFieldString = function(field) {\n\tvar value = this.fields[field];\n\t// Check for a missing field\n\tif(value === undefined || value === null) {\n\t\treturn \"\";\n\t}\n\t// Parse the field with the associated module (if any)\n\tvar fieldModule = $tw.Tiddler.fieldModules[field];\n\tif(fieldModule && fieldModule.stringify) {\n\t\treturn fieldModule.stringify.call(this,value);\n\t} else {\n\t\treturn value.toString();\n\t}\n};\n\n/*\nGet all the fields as a hashmap of strings. Options:\n\texclude: an array of field names to exclude\n*/\nexports.getFieldStrings = function(options) {\n\toptions = options || {};\n\tvar exclude = options.exclude || [];\n\tvar fields = {};\n\tfor(var field in this.fields) {\n\t\tif($tw.utils.hop(this.fields,field)) {\n\t\t\tif(exclude.indexOf(field) === -1) {\n\t\t\t\tfields[field] = this.getFieldString(field);\n\t\t\t}\n\t\t}\n\t}\n\treturn fields;\n};\n\n/*\nGet all the fields as a name:value block. Options:\n\texclude: an array of field names to exclude\n*/\nexports.getFieldStringBlock = function(options) {\n\toptions = options || {};\n\tvar exclude = options.exclude || [];\n\tvar fields = [];\n\tfor(var field in this.fields) {\n\t\tif($tw.utils.hop(this.fields,field)) {\n\t\t\tif(exclude.indexOf(field) === -1) {\n\t\t\t\tfields.push(field + \": \" + this.getFieldString(field));\n\t\t\t}\n\t\t}\n\t}\n\treturn fields.join(\"\\n\");\n};\n\n/*\nCompare two tiddlers for equality\ntiddler: the tiddler to compare\nexcludeFields: array of field names to exclude from the comparison\n*/\nexports.isEqual = function(tiddler,excludeFields) {\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\treturn false;\n\t}\n\texcludeFields = excludeFields || [];\n\tvar self = this,\n\t\tdifferences = []; // Fields that have differences\n\t// Add to the differences array\n\tfunction addDifference(fieldName) {\n\t\t// Check for this field being excluded\n\t\tif(excludeFields.indexOf(fieldName) === -1) {\n\t\t\t// Save the field as a difference\n\t\t\t$tw.utils.pushTop(differences,fieldName);\n\t\t}\n\t}\n\t// Returns true if the two values of this field are equal\n\tfunction isFieldValueEqual(fieldName) {\n\t\tvar valueA = self.fields[fieldName],\n\t\t\tvalueB = tiddler.fields[fieldName];\n\t\t// Check for identical string values\n\t\tif(typeof(valueA) === \"string\" && typeof(valueB) === \"string\" && valueA === valueB) {\n\t\t\treturn true;\n\t\t}\n\t\t// Check for identical array values\n\t\tif($tw.utils.isArray(valueA) && $tw.utils.isArray(valueB) && $tw.utils.isArrayEqual(valueA,valueB)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Otherwise the fields must be different\n\t\treturn false;\n\t}\n\t// Compare our fields\n\tfor(var fieldName in this.fields) {\n\t\tif(!isFieldValueEqual(fieldName)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// There's a difference for every field in the other tiddler that we don't have\n\tfor(fieldName in tiddler.fields) {\n\t\tif(!(fieldName in this.fields)) {\n\t\t\taddDifference(fieldName);\n\t\t}\n\t}\n\t// Return whether there were any differences\n\treturn differences.length === 0;\n};\n\nexports.getFieldDay = function(field) {\n\tif(this.cache && this.cache.day && $tw.utils.hop(this.cache.day,field) ) {\n\t\treturn this.cache.day[field];\n\t}\n\tvar day = \"\";\n\tif(this.fields[field]) {\n\t\tday = (new Date($tw.utils.parseDate(this.fields[field]))).setHours(0,0,0,0);\n\t}\n\tthis.cache.day = this.cache.day || {};\n\tthis.cache.day[field] = day;\n\treturn day;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "tiddlermethod"
},
"$:/core/modules/upgraders/plugins.js": {
"title": "$:/core/modules/upgraders/plugins.js",
"text": "/*\\\ntitle: $:/core/modules/upgraders/plugins.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that checks that plugins are newer than any already installed version\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar UPGRADE_LIBRARY_TITLE = \"$:/UpgradeLibrary\";\n\nvar BLOCKED_PLUGINS = {\n\t\"$:/themes/tiddlywiki/stickytitles\": {\n\t\tversions: [\"*\"]\n\t},\n\t\"$:/plugins/tiddlywiki/fullscreen\": {\n\t\tversions: [\"*\"]\n\t}\n};\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {},\n\t\tupgradeLibrary,\n\t\tgetLibraryTiddler = function(title) {\n\t\t\tif(!upgradeLibrary) {\n\t\t\t\tupgradeLibrary = wiki.getTiddlerData(UPGRADE_LIBRARY_TITLE,{});\n\t\t\t\tupgradeLibrary.tiddlers = upgradeLibrary.tiddlers || {};\n\t\t\t}\n\t\t\treturn upgradeLibrary.tiddlers[title];\n\t\t};\n\n\t// Go through all the incoming tiddlers\n\t$tw.utils.each(titles,function(title) {\n\t\tvar incomingTiddler = tiddlers[title];\n\t\t// Check if we're dealing with a plugin\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"] && incomingTiddler.version) {\n\t\t\t// Upgrade the incoming plugin if it is in the upgrade library\n\t\t\tvar libraryTiddler = getLibraryTiddler(title);\n\t\t\tif(libraryTiddler && libraryTiddler[\"plugin-type\"] && libraryTiddler.version) {\n\t\t\t\ttiddlers[title] = libraryTiddler;\n\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Upgraded\",{variables: {incoming: incomingTiddler.version, upgraded: libraryTiddler.version}});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Suppress the incoming plugin if it is older than the currently installed one\n\t\t\tvar existingTiddler = wiki.getTiddler(title);\n\t\t\tif(existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\n\t\t\t\t// Reject the incoming plugin by blanking all its fields\n\t\t\t\tif($tw.utils.checkVersions(existingTiddler.fields.version,incomingTiddler.version)) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Version\",{variables: {incoming: incomingTiddler.version, existing: existingTiddler.fields.version}});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(incomingTiddler && incomingTiddler[\"plugin-type\"]) {\n\t\t\t// Check whether the plugin is on the blocked list\n\t\t\tvar blockInfo = BLOCKED_PLUGINS[title];\n\t\t\tif(blockInfo) {\n\t\t\t\tif(blockInfo.versions.indexOf(\"*\") !== -1 || (incomingTiddler.version && blockInfo.versions.indexOf(incomingTiddler.version) !== -1)) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/Plugins/Suppressed/Incompatible\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/system.js": {
"title": "$:/core/modules/upgraders/system.js",
"text": "/*\\\ntitle: $:/core/modules/upgraders/system.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that suppresses certain system tiddlers that shouldn't be imported\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar DONT_IMPORT_LIST = [\"$:/StoryList\",\"$:/HistoryList\"],\n\tDONT_IMPORT_PREFIX_LIST = [\"$:/temp/\",\"$:/state/\"];\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {};\n\t// Check for tiddlers on our list\n\t$tw.utils.each(titles,function(title) {\n\t\tif(DONT_IMPORT_LIST.indexOf(title) !== -1) {\n\t\t\ttiddlers[title] = Object.create(null);\n\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/System/Suppressed\");\n\t\t} else {\n\t\t\tfor(var t=0; t<DONT_IMPORT_PREFIX_LIST.length; t++) {\n\t\t\t\tvar prefix = DONT_IMPORT_PREFIX_LIST[t];\n\t\t\t\tif(title.substr(0,prefix.length) === prefix) {\n\t\t\t\t\ttiddlers[title] = Object.create(null);\n\t\t\t\t\tmessages[title] = $tw.language.getString(\"Import/Upgrader/State/Suppressed\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/upgraders/themetweaks.js": {
"title": "$:/core/modules/upgraders/themetweaks.js",
"text": "/*\\\ntitle: $:/core/modules/upgraders/themetweaks.js\ntype: application/javascript\nmodule-type: upgrader\n\nUpgrader module that handles the change in theme tweak storage introduced in 5.0.14-beta.\n\nPreviously, theme tweaks were stored in two data tiddlers:\n\n* $:/themes/tiddlywiki/vanilla/metrics\n* $:/themes/tiddlywiki/vanilla/settings\n\nNow, each tweak is stored in its own separate tiddler.\n\nThis upgrader copies any values from the old format to the new. The old data tiddlers are not deleted in case they have been used to store additional indexes.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar MAPPINGS = {\n\t\"$:/themes/tiddlywiki/vanilla/metrics\": {\n\t\t\"fontsize\": \"$:/themes/tiddlywiki/vanilla/metrics/fontsize\",\n\t\t\"lineheight\": \"$:/themes/tiddlywiki/vanilla/metrics/lineheight\",\n\t\t\"storyleft\": \"$:/themes/tiddlywiki/vanilla/metrics/storyleft\",\n\t\t\"storytop\": \"$:/themes/tiddlywiki/vanilla/metrics/storytop\",\n\t\t\"storyright\": \"$:/themes/tiddlywiki/vanilla/metrics/storyright\",\n\t\t\"storywidth\": \"$:/themes/tiddlywiki/vanilla/metrics/storywidth\",\n\t\t\"tiddlerwidth\": \"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\"\n\t},\n\t\"$:/themes/tiddlywiki/vanilla/settings\": {\n\t\t\"fontfamily\": \"$:/themes/tiddlywiki/vanilla/settings/fontfamily\"\n\t}\n};\n\nexports.upgrade = function(wiki,titles,tiddlers) {\n\tvar self = this,\n\t\tmessages = {};\n\t// Check for tiddlers on our list\n\t$tw.utils.each(titles,function(title) {\n\t\tvar mapping = MAPPINGS[title];\n\t\tif(mapping) {\n\t\t\tvar tiddler = new $tw.Tiddler(tiddlers[title]),\n\t\t\t\ttiddlerData = wiki.getTiddlerDataCached(tiddler,{});\n\t\t\tfor(var index in mapping) {\n\t\t\t\tvar mappedTitle = mapping[index];\n\t\t\t\tif(!tiddlers[mappedTitle] || tiddlers[mappedTitle].title !== mappedTitle) {\n\t\t\t\t\ttiddlers[mappedTitle] = {\n\t\t\t\t\t\ttitle: mappedTitle,\n\t\t\t\t\t\ttext: tiddlerData[index]\n\t\t\t\t\t};\n\t\t\t\t\tmessages[mappedTitle] = $tw.language.getString(\"Import/Upgrader/ThemeTweaks/Created\",{variables: {\n\t\t\t\t\t\tfrom: title + \"##\" + index\n\t\t\t\t\t}});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\treturn messages;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "upgrader"
},
"$:/core/modules/utils/crypto.js": {
"title": "$:/core/modules/utils/crypto.js",
"text": "/*\\\ntitle: $:/core/modules/utils/crypto.js\ntype: application/javascript\nmodule-type: utils\n\nUtility functions related to crypto.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nLook for an encrypted store area in the text of a TiddlyWiki file\n*/\nexports.extractEncryptedStoreArea = function(text) {\n\tvar encryptedStoreAreaStartMarker = \"<pre id=\\\"encryptedStoreArea\\\" type=\\\"text/plain\\\" style=\\\"display:none;\\\">\",\n\t\tencryptedStoreAreaStart = text.indexOf(encryptedStoreAreaStartMarker);\n\tif(encryptedStoreAreaStart !== -1) {\n\t\tvar encryptedStoreAreaEnd = text.indexOf(\"</pre>\",encryptedStoreAreaStart);\n\t\tif(encryptedStoreAreaEnd !== -1) {\n\t\t\treturn $tw.utils.htmlDecode(text.substring(encryptedStoreAreaStart + encryptedStoreAreaStartMarker.length,encryptedStoreAreaEnd-1));\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nAttempt to extract the tiddlers from an encrypted store area using the current password. If the password is not provided then the password in the password store will be used\n*/\nexports.decryptStoreArea = function(encryptedStoreArea,password) {\n\tvar decryptedText = $tw.crypto.decrypt(encryptedStoreArea,password);\n\tif(decryptedText) {\n\t\tvar json = JSON.parse(decryptedText),\n\t\t\ttiddlers = [];\n\t\tfor(var title in json) {\n\t\t\tif(title !== \"$:/isEncrypted\") {\n\t\t\t\ttiddlers.push(json[title]);\n\t\t\t}\n\t\t}\n\t\treturn tiddlers;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n\n/*\nAttempt to extract the tiddlers from an encrypted store area using the current password. If that fails, the user is prompted for a password.\nencryptedStoreArea: text of the TiddlyWiki encrypted store area\ncallback: function(tiddlers) called with the array of decrypted tiddlers\n\nThe following configuration settings are supported:\n\n$tw.config.usePasswordVault: causes any password entered by the user to also be put into the system password vault\n*/\nexports.decryptStoreAreaInteractive = function(encryptedStoreArea,callback,options) {\n\t// Try to decrypt with the current password\n\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea);\n\tif(tiddlers) {\n\t\tcallback(tiddlers);\n\t} else {\n\t\t// Prompt for a new password and keep trying\n\t\t$tw.passwordPrompt.createPrompt({\n\t\t\tserviceName: \"Enter a password to decrypt the imported TiddlyWiki\",\n\t\t\tnoUserName: true,\n\t\t\tcanCancel: true,\n\t\t\tsubmitText: \"Decrypt\",\n\t\t\tcallback: function(data) {\n\t\t\t\t// Exit if the user cancelled\n\t\t\t\tif(!data) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// Attempt to decrypt the tiddlers\n\t\t\t\tvar tiddlers = $tw.utils.decryptStoreArea(encryptedStoreArea,data.password);\n\t\t\t\tif(tiddlers) {\n\t\t\t\t\tif($tw.config.usePasswordVault) {\n\t\t\t\t\t\t$tw.crypto.setPassword(data.password);\n\t\t\t\t\t}\n\t\t\t\t\tcallback(tiddlers);\n\t\t\t\t\t// Exit and remove the password prompt\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t// We didn't decrypt everything, so continue to prompt for password\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/animations/slide.js": {
"title": "$:/core/modules/utils/dom/animations/slide.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/animations/slide.js\ntype: application/javascript\nmodule-type: animation\n\nA simple slide animation that varies the height of the element\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction slideOpen(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration();\n\t// Get the current height of the domNode\n\tvar computedStyle = window.getComputedStyle(domNode),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrPaddingBottom = parseInt(computedStyle.paddingBottom,10),\n\t\tcurrPaddingTop = parseInt(computedStyle.paddingTop,10),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"},\n\t\t\t{marginTop: \"\"},\n\t\t\t{paddingBottom: \"\"},\n\t\t\t{paddingTop: \"\"},\n\t\t\t{height: \"auto\"},\n\t\t\t{opacity: \"\"}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"none\"},\n\t\t{marginTop: \"0px\"},\n\t\t{marginBottom: \"0px\"},\n\t\t{paddingTop: \"0px\"},\n\t\t{paddingBottom: \"0px\"},\n\t\t{height: \"0px\"},\n\t\t{opacity: \"0\"}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{marginTop: currMarginTop + \"px\"},\n\t\t{paddingBottom: currPaddingBottom + \"px\"},\n\t\t{paddingTop: currPaddingTop + \"px\"},\n\t\t{height: currHeight + \"px\"},\n\t\t{opacity: \"1\"}\n\t]);\n}\n\nfunction slideClosed(domNode,options) {\n\toptions = options || {};\n\tvar duration = options.duration || $tw.utils.getAnimationDuration(),\n\t\tcurrHeight = domNode.offsetHeight;\n\t// Clear the properties we've set when the animation is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(domNode,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"},\n\t\t\t{marginTop: \"\"},\n\t\t\t{paddingBottom: \"\"},\n\t\t\t{paddingTop: \"\"},\n\t\t\t{height: \"auto\"},\n\t\t\t{opacity: \"\"}\n\t\t]);\n\t\tif(options.callback) {\n\t\t\toptions.callback();\n\t\t}\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(domNode,[\n\t\t{height: currHeight + \"px\"},\n\t\t{opacity: \"1\"}\n\t]);\n\t$tw.utils.forceLayout(domNode);\n\t// Transition to the final position\n\t$tw.utils.setStyle(domNode,[\n\t\t{transition: \"margin-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-top \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"padding-bottom \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"height \" + duration + \"ms ease-in-out, \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms ease-in-out\"},\n\t\t{marginTop: \"0px\"},\n\t\t{marginBottom: \"0px\"},\n\t\t{paddingTop: \"0px\"},\n\t\t{paddingBottom: \"0px\"},\n\t\t{height: \"0px\"},\n\t\t{opacity: \"0\"}\n\t]);\n}\n\nexports.slide = {\n\topen: slideOpen,\n\tclose: slideClosed\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "animation"
},
"$:/core/modules/utils/dom/animator.js": {
"title": "$:/core/modules/utils/dom/animator.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/animator.js\ntype: application/javascript\nmodule-type: utils\n\nOrchestrates animations and transitions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction Animator() {\n\t// Get the registered animation modules\n\tthis.animations = {};\n\t$tw.modules.applyMethods(\"animation\",this.animations);\n}\n\nAnimator.prototype.perform = function(type,domNode,options) {\n\toptions = options || {};\n\t// Find an animation that can handle this type\n\tvar chosenAnimation;\n\t$tw.utils.each(this.animations,function(animation,name) {\n\t\tif($tw.utils.hop(animation,type)) {\n\t\t\tchosenAnimation = animation[type];\n\t\t}\n\t});\n\tif(!chosenAnimation) {\n\t\tchosenAnimation = function(domNode,options) {\n\t\t\tif(options.callback) {\n\t\t\t\toptions.callback();\n\t\t\t}\n\t\t};\n\t}\n\t// Call the animation\n\tchosenAnimation(domNode,options);\n};\n\nexports.Animator = Animator;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/browser.js": {
"title": "$:/core/modules/utils/dom/browser.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/browser.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser feature detection\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nSet style properties of an element\n\telement: dom node\n\tstyles: ordered array of {name: value} pairs\n*/\nexports.setStyle = function(element,styles) {\n\tif(element.nodeType === 1) { // Element.ELEMENT_NODE\n\t\tfor(var t=0; t<styles.length; t++) {\n\t\t\tfor(var styleName in styles[t]) {\n\t\t\t\telement.style[$tw.utils.convertStyleNameToPropertyName(styleName)] = styles[t][styleName];\n\t\t\t}\n\t\t}\n\t}\n};\n\n/*\nConverts a standard CSS property name into the local browser-specific equivalent. For example:\n\t\"background-color\" --> \"backgroundColor\"\n\t\"transition\" --> \"webkitTransition\"\n*/\n\nvar styleNameCache = {}; // We'll cache the style name conversions\n\nexports.convertStyleNameToPropertyName = function(styleName) {\n\t// Return from the cache if we can\n\tif(styleNameCache[styleName]) {\n\t\treturn styleNameCache[styleName];\n\t}\n\t// Convert it by first removing any hyphens\n\tvar propertyName = $tw.utils.unHyphenateCss(styleName);\n\t// Then check if it needs a prefix\n\tif($tw.browser && document.body.style[propertyName] === undefined) {\n\t\tvar prefixes = [\"O\",\"MS\",\"Moz\",\"webkit\"];\n\t\tfor(var t=0; t<prefixes.length; t++) {\n\t\t\tvar prefixedName = prefixes[t] + propertyName.substr(0,1).toUpperCase() + propertyName.substr(1);\n\t\t\tif(document.body.style[prefixedName] !== undefined) {\n\t\t\t\tpropertyName = prefixedName;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t// Put it in the cache too\n\tstyleNameCache[styleName] = propertyName;\n\treturn propertyName;\n};\n\n/*\nConverts a JS format CSS property name back into the dashed form used in CSS declarations. For example:\n\t\"backgroundColor\" --> \"background-color\"\n\t\"webkitTransform\" --> \"-webkit-transform\"\n*/\nexports.convertPropertyNameToStyleName = function(propertyName) {\n\t// Rehyphenate the name\n\tvar styleName = $tw.utils.hyphenateCss(propertyName);\n\t// If there's a webkit prefix, add a dash (other browsers have uppercase prefixes, and so get the dash automatically)\n\tif(styleName.indexOf(\"webkit\") === 0) {\n\t\tstyleName = \"-\" + styleName;\n\t} else if(styleName.indexOf(\"-m-s\") === 0) {\n\t\tstyleName = \"-ms\" + styleName.substr(4);\n\t}\n\treturn styleName;\n};\n\n/*\nRound trip a stylename to a property name and back again. For example:\n\t\"transform\" --> \"webkitTransform\" --> \"-webkit-transform\"\n*/\nexports.roundTripPropertyName = function(propertyName) {\n\treturn $tw.utils.convertPropertyNameToStyleName($tw.utils.convertStyleNameToPropertyName(propertyName));\n};\n\n/*\nConverts a standard event name into the local browser specific equivalent. For example:\n\t\"animationEnd\" --> \"webkitAnimationEnd\"\n*/\n\nvar eventNameCache = {}; // We'll cache the conversions\n\nvar eventNameMappings = {\n\t\"transitionEnd\": {\n\t\tcorrespondingCssProperty: \"transition\",\n\t\tmappings: {\n\t\t\ttransition: \"transitionend\",\n\t\t\tOTransition: \"oTransitionEnd\",\n\t\t\tMSTransition: \"msTransitionEnd\",\n\t\t\tMozTransition: \"transitionend\",\n\t\t\twebkitTransition: \"webkitTransitionEnd\"\n\t\t}\n\t},\n\t\"animationEnd\": {\n\t\tcorrespondingCssProperty: \"animation\",\n\t\tmappings: {\n\t\t\tanimation: \"animationend\",\n\t\t\tOAnimation: \"oAnimationEnd\",\n\t\t\tMSAnimation: \"msAnimationEnd\",\n\t\t\tMozAnimation: \"animationend\",\n\t\t\twebkitAnimation: \"webkitAnimationEnd\"\n\t\t}\n\t}\n};\n\nexports.convertEventName = function(eventName) {\n\tif(eventNameCache[eventName]) {\n\t\treturn eventNameCache[eventName];\n\t}\n\tvar newEventName = eventName,\n\t\tmappings = eventNameMappings[eventName];\n\tif(mappings) {\n\t\tvar convertedProperty = $tw.utils.convertStyleNameToPropertyName(mappings.correspondingCssProperty);\n\t\tif(mappings.mappings[convertedProperty]) {\n\t\t\tnewEventName = mappings.mappings[convertedProperty];\n\t\t}\n\t}\n\t// Put it in the cache too\n\teventNameCache[eventName] = newEventName;\n\treturn newEventName;\n};\n\n/*\nReturn the names of the fullscreen APIs\n*/\nexports.getFullScreenApis = function() {\n\tvar d = document,\n\t\tdb = d.body,\n\t\tresult = {\n\t\t\"_requestFullscreen\": db.webkitRequestFullscreen !== undefined ? \"webkitRequestFullscreen\" :\n\t\t\t\t\t\t\tdb.mozRequestFullScreen !== undefined ? \"mozRequestFullScreen\" :\n\t\t\t\t\t\t\tdb.msRequestFullscreen !== undefined ? \"msRequestFullscreen\" :\n\t\t\t\t\t\t\tdb.requestFullscreen !== undefined ? \"requestFullscreen\" : \"\",\n\t\t\"_exitFullscreen\": d.webkitExitFullscreen !== undefined ? \"webkitExitFullscreen\" :\n\t\t\t\t\t\t\td.mozCancelFullScreen !== undefined ? \"mozCancelFullScreen\" :\n\t\t\t\t\t\t\td.msExitFullscreen !== undefined ? \"msExitFullscreen\" :\n\t\t\t\t\t\t\td.exitFullscreen !== undefined ? \"exitFullscreen\" : \"\",\n\t\t\"_fullscreenElement\": d.webkitFullscreenElement !== undefined ? \"webkitFullscreenElement\" :\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozFullScreenElement\" :\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"msFullscreenElement\" :\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenElement\" : \"\",\n\t\t\"_fullscreenChange\": d.webkitFullscreenElement !== undefined ? \"webkitfullscreenchange\" :\n\t\t\t\t\t\t\td.mozFullScreenElement !== undefined ? \"mozfullscreenchange\" :\n\t\t\t\t\t\t\td.msFullscreenElement !== undefined ? \"MSFullscreenChange\" :\n\t\t\t\t\t\t\td.fullscreenElement !== undefined ? \"fullscreenchange\" : \"\"\n\t};\n\tif(!result._requestFullscreen || !result._exitFullscreen || !result._fullscreenElement || !result._fullscreenChange) {\n\t\treturn null;\n\t} else {\n\t\treturn result;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/csscolorparser.js": {
"title": "$:/core/modules/utils/dom/csscolorparser.js",
"text": "// (c) Dean McNamee <dean@gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]}\n\nfunction clamp_css_byte(i) { // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) { // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) { // int or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_byte(parseFloat(str) / 100 * 255);\n return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) { // float or percentage.\n if (str[str.length - 1] === '%')\n return clamp_css_float(parseFloat(str) / 100);\n return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n if (h < 0) h += 1;\n else if (h > 1) h -= 1;\n\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n if (h * 2 < 1) return m2;\n if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n return m1;\n}\n\nfunction parseCSSColor(css_str) {\n // Remove all whitespace, not compliant, but should just be more accepting.\n var str = css_str.replace(/ /g, '').toLowerCase();\n\n // Color keywords (and transparent) lookup.\n if (str in kCSSColorTable) return kCSSColorTable[str].slice(); // dup.\n\n // #abc and #abc123 syntax.\n if (str[0] === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xfff)) return null; // Covers NaN.\n return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n (iv & 0xf0) | ((iv & 0xf0) >> 4),\n (iv & 0xf) | ((iv & 0xf) << 4),\n 1];\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n if (!(iv >= 0 && iv <= 0xffffff)) return null; // Covers NaN.\n return [(iv & 0xff0000) >> 16,\n (iv & 0xff00) >> 8,\n iv & 0xff,\n 1];\n }\n\n return null;\n }\n\n var op = str.indexOf('('), ep = str.indexOf(')');\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op+1, ep-(op+1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'rgb':\n if (params.length !== 3) return null;\n return [parse_css_int(params[0]),\n parse_css_int(params[1]),\n parse_css_int(params[2]),\n alpha];\n case 'hsla':\n if (params.length !== 4) return null;\n alpha = parse_css_float(params.pop());\n // Fall through.\n case 'hsl':\n if (params.length !== 3) return null;\n var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n var s = parse_css_float(params[1]);\n var l = parse_css_float(params[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n alpha];\n default:\n return null;\n }\n }\n\n return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor } catch(e) { }\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom.js": {
"title": "$:/core/modules/utils/dom.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static DOM-related utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nDetermines whether element 'a' contains element 'b'\nCode thanks to John Resig, http://ejohn.org/blog/comparing-document-position/\n*/\nexports.domContains = function(a,b) {\n\treturn a.contains ?\n\t\ta !== b && a.contains(b) :\n\t\t!!(a.compareDocumentPosition(b) & 16);\n};\n\nexports.removeChildren = function(node) {\n\twhile(node.hasChildNodes()) {\n\t\tnode.removeChild(node.firstChild);\n\t}\n};\n\nexports.hasClass = function(el,className) {\n\treturn el && el.className && el.className.toString().split(\" \").indexOf(className) !== -1;\n};\n\nexports.addClass = function(el,className) {\n\tvar c = el.className.split(\" \");\n\tif(c.indexOf(className) === -1) {\n\t\tc.push(className);\n\t}\n\tel.className = c.join(\" \");\n};\n\nexports.removeClass = function(el,className) {\n\tvar c = el.className.split(\" \"),\n\t\tp = c.indexOf(className);\n\tif(p !== -1) {\n\t\tc.splice(p,1);\n\t\tel.className = c.join(\" \");\n\t}\n};\n\nexports.toggleClass = function(el,className,status) {\n\tif(status === undefined) {\n\t\tstatus = !exports.hasClass(el,className);\n\t}\n\tif(status) {\n\t\texports.addClass(el,className);\n\t} else {\n\t\texports.removeClass(el,className);\n\t}\n};\n\n/*\nGet the first parent element that has scrollbars or use the body as fallback.\n*/\nexports.getScrollContainer = function(el) {\n\tvar doc = el.ownerDocument;\n\twhile(el.parentNode) {\t\n\t\tel = el.parentNode;\n\t\tif(el.scrollTop) {\n\t\t\treturn el;\n\t\t}\n\t}\n\treturn doc.body;\n};\n\n/*\nGet the scroll position of the viewport\nReturns:\n\t{\n\t\tx: horizontal scroll position in pixels,\n\t\ty: vertical scroll position in pixels\n\t}\n*/\nexports.getScrollPosition = function() {\n\tif(\"scrollX\" in window) {\n\t\treturn {x: window.scrollX, y: window.scrollY};\n\t} else {\n\t\treturn {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};\n\t}\n};\n\n/*\nAdjust the height of a textarea to fit its content, preserving scroll position, and return the height\n*/\nexports.resizeTextAreaToFit = function(domNode,minHeight) {\n\t// Get the scroll container and register the current scroll position\n\tvar container = $tw.utils.getScrollContainer(domNode),\n\t\tscrollTop = container.scrollTop;\n // Measure the specified minimum height\n\tdomNode.style.height = minHeight;\n\tvar measuredHeight = domNode.offsetHeight;\n\t// Set its height to auto so that it snaps to the correct height\n\tdomNode.style.height = \"auto\";\n\t// Calculate the revised height\n\tvar newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,measuredHeight);\n\t// Only try to change the height if it has changed\n\tif(newHeight !== domNode.offsetHeight) {\n\t\tdomNode.style.height = newHeight + \"px\";\n\t\t// Make sure that the dimensions of the textarea are recalculated\n\t\t$tw.utils.forceLayout(domNode);\n\t\t// Set the container to the position we registered at the beginning\n\t\tcontainer.scrollTop = scrollTop;\n\t}\n\treturn newHeight;\n};\n\n/*\nGets the bounding rectangle of an element in absolute page coordinates\n*/\nexports.getBoundingPageRect = function(element) {\n\tvar scrollPos = $tw.utils.getScrollPosition(),\n\t\tclientRect = element.getBoundingClientRect();\n\treturn {\n\t\tleft: clientRect.left + scrollPos.x,\n\t\twidth: clientRect.width,\n\t\tright: clientRect.right + scrollPos.x,\n\t\ttop: clientRect.top + scrollPos.y,\n\t\theight: clientRect.height,\n\t\tbottom: clientRect.bottom + scrollPos.y\n\t};\n};\n\n/*\nSaves a named password in the browser\n*/\nexports.savePassword = function(name,password) {\n\ttry {\n\t\tif(window.localStorage) {\n\t\t\tlocalStorage.setItem(\"tw5-password-\" + name,password);\n\t\t}\n\t} catch(e) {\n\t}\n};\n\n/*\nRetrieve a named password from the browser\n*/\nexports.getPassword = function(name) {\n\ttry {\n\t\treturn window.localStorage ? localStorage.getItem(\"tw5-password-\" + name) : \"\";\n\t} catch(e) {\n\t\treturn \"\";\n\t}\n};\n\n/*\nForce layout of a dom node and its descendents\n*/\nexports.forceLayout = function(element) {\n\tvar dummy = element.offsetWidth;\n};\n\n/*\nPulse an element for debugging purposes\n*/\nexports.pulseElement = function(element) {\n\t// Event handler to remove the class at the end\n\telement.addEventListener($tw.browser.animationEnd,function handler(event) {\n\t\telement.removeEventListener($tw.browser.animationEnd,handler,false);\n\t\t$tw.utils.removeClass(element,\"pulse\");\n\t},false);\n\t// Apply the pulse class\n\t$tw.utils.removeClass(element,\"pulse\");\n\t$tw.utils.forceLayout(element);\n\t$tw.utils.addClass(element,\"pulse\");\n};\n\n/*\nAttach specified event handlers to a DOM node\ndomNode: where to attach the event handlers\nevents: array of event handlers to be added (see below)\nEach entry in the events array is an object with these properties:\nhandlerFunction: optional event handler function\nhandlerObject: optional event handler object\nhandlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)\n*/\nexports.addEventListeners = function(domNode,events) {\n\t$tw.utils.each(events,function(eventInfo) {\n\t\tvar handler;\n\t\tif(eventInfo.handlerFunction) {\n\t\t\thandler = eventInfo.handlerFunction;\n\t\t} else if(eventInfo.handlerObject) {\n\t\t\tif(eventInfo.handlerMethod) {\n\t\t\t\thandler = function(event) {\n\t\t\t\t\teventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event);\n\t\t\t\t};\t\n\t\t\t} else {\n\t\t\t\thandler = eventInfo.handlerObject;\n\t\t\t}\n\t\t}\n\t\tdomNode.addEventListener(eventInfo.name,handler,false);\n\t});\n};\n\n/*\nGet the computed styles applied to an element as an array of strings of individual CSS properties\n*/\nexports.getComputedStyles = function(domNode) {\n\tvar textAreaStyles = window.getComputedStyle(domNode,null),\n\t\tstyleDefs = [],\n\t\tname;\n\tfor(var t=0; t<textAreaStyles.length; t++) {\n\t\tname = textAreaStyles[t];\n\t\tstyleDefs.push(name + \": \" + textAreaStyles.getPropertyValue(name) + \";\");\n\t}\n\treturn styleDefs;\n};\n\n/*\nApply a set of styles passed as an array of strings of individual CSS properties\n*/\nexports.setStyles = function(domNode,styleDefs) {\n\tdomNode.style.cssText = styleDefs.join(\"\");\n};\n\n/*\nCopy the computed styles from a source element to a destination element\n*/\nexports.copyStyles = function(srcDomNode,dstDomNode) {\n\t$tw.utils.setStyles(dstDomNode,$tw.utils.getComputedStyles(srcDomNode));\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/dragndrop.js": {
"title": "$:/core/modules/utils/dom/dragndrop.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/dragndrop.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser data transfer utilities, used with the clipboard and drag and drop\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nOptions:\n\ndomNode: dom node to make draggable\ndragImageType: \"pill\" or \"dom\"\ndragTiddlerFn: optional function to retrieve the title of tiddler to drag\ndragFilterFn: optional function to retreive the filter defining a list of tiddlers to drag\nwidget: widget to use as the contect for the filter\n*/\nexports.makeDraggable = function(options) {\n\tvar dragImageType = options.dragImageType || \"dom\",\n\t\tdragImage,\n\t\tdomNode = options.domNode;\n\t// Make the dom node draggable (not necessary for anchor tags)\n\tif((domNode.tagName || \"\").toLowerCase() !== \"a\") {\n\t\tdomNode.setAttribute(\"draggable\",\"true\");\t\t\n\t}\n\t// Add event handlers\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"dragstart\", handlerFunction: function(event) {\n\t\t\t// Collect the tiddlers being dragged\n\t\t\tvar dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),\n\t\t\t\tdragFilter = options.dragFilterFn && options.dragFilterFn(),\n\t\t\t\ttitles = dragTiddler ? [dragTiddler] : [];\n\t\t\tif(dragFilter) {\n\t\t\t\ttitles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));\n\t\t\t}\n\t\t\tvar titleString = $tw.utils.stringifyList(titles);\n\t\t\t// Check that we've something to drag\n\t\t\tif(titles.length > 0 && event.target === domNode) {\n\t\t\t\t// Mark the drag in progress\n\t\t\t\t$tw.dragInProgress = domNode;\n\t\t\t\t// Set the dragging class on the element being dragged\n\t\t\t\t$tw.utils.addClass(event.target,\"tc-dragging\");\n\t\t\t\t// Create the drag image elements\n\t\t\t\tdragImage = options.widget.document.createElement(\"div\");\n\t\t\t\tdragImage.className = \"tc-tiddler-dragger\";\n\t\t\t\tvar inner = options.widget.document.createElement(\"div\");\n\t\t\t\tinner.className = \"tc-tiddler-dragger-inner\";\n\t\t\t\tinner.appendChild(options.widget.document.createTextNode(\n\t\t\t\t\ttitles.length === 1 ? \n\t\t\t\t\t\ttitles[0] :\n\t\t\t\t\t\ttitles.length + \" tiddlers\"\n\t\t\t\t));\n\t\t\t\tdragImage.appendChild(inner);\n\t\t\t\toptions.widget.document.body.appendChild(dragImage);\n\t\t\t\t// Set the data transfer properties\n\t\t\t\tvar dataTransfer = event.dataTransfer;\n\t\t\t\t// Set up the image\n\t\t\t\tdataTransfer.effectAllowed = \"all\";\n\t\t\t\tif(dataTransfer.setDragImage) {\n\t\t\t\t\tif(dragImageType === \"pill\") {\n\t\t\t\t\t\tdataTransfer.setDragImage(dragImage.firstChild,-16,-16);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar r = domNode.getBoundingClientRect();\n\t\t\t\t\t\tdataTransfer.setDragImage(domNode,event.clientX-r.left,event.clientY-r.top);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Set up the data transfer\n\t\t\t\tif(dataTransfer.clearData) {\n\t\t\t\t\tdataTransfer.clearData();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tvar jsonData = [];\n\t\t\t\tif(titles.length > 1) {\n\t\t\t\t\ttitles.forEach(function(title) {\n\t\t\t\t\t\tjsonData.push(options.widget.wiki.getTiddlerAsJson(title));\n\t\t\t\t\t});\n\t\t\t\t\tjsonData = \"[\" + jsonData.join(\",\") + \"]\";\n\t\t\t\t} else {\n\t\t\t\t\tjsonData = options.widget.wiki.getTiddlerAsJson(titles[0]);\n\t\t\t\t}\n\t\t\t\t// IE doesn't like these content types\n\t\t\t\tif(!$tw.browser.isIE) {\n\t\t\t\t\tdataTransfer.setData(\"text/vnd.tiddler\",jsonData);\n\t\t\t\t\tdataTransfer.setData(\"text/plain\",titleString);\n\t\t\t\t\tdataTransfer.setData(\"text/x-moz-url\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\t\t}\n\t\t\t\tdataTransfer.setData(\"URL\",\"data:text/vnd.tiddler,\" + encodeURIComponent(jsonData));\n\t\t\t\tdataTransfer.setData(\"Text\",titleString);\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t\treturn false;\n\t\t}},\n\t\t{name: \"dragend\", handlerFunction: function(event) {\n\t\t\tif(event.target === domNode) {\n\t\t\t\t$tw.dragInProgress = null;\n\t\t\t\t// Remove the dragging class on the element being dragged\n\t\t\t\t$tw.utils.removeClass(event.target,\"tc-dragging\");\n\t\t\t\t// Delete the drag image element\n\t\t\t\tif(dragImage) {\n\t\t\t\t\tdragImage.parentNode.removeChild(dragImage);\n\t\t\t\t\tdragImage = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}}\n\t]);\n};\n\nexports.importDataTransfer = function(dataTransfer,fallbackTitle,callback) {\n\t// Try each provided data type in turn\n\tfor(var t=0; t<importDataTypes.length; t++) {\n\t\tif(!$tw.browser.isIE || importDataTypes[t].IECompatible) {\n\t\t\t// Get the data\n\t\t\tvar dataType = importDataTypes[t];\n\t\t\t\tvar data = dataTransfer.getData(dataType.type);\n\t\t\t// Import the tiddlers in the data\n\t\t\tif(data !== \"\" && data !== null) {\n\t\t\t\tif($tw.log.IMPORT) {\n\t\t\t\t\tconsole.log(\"Importing data type '\" + dataType.type + \"', data: '\" + data + \"'\")\n\t\t\t\t}\n\t\t\t\tvar tiddlerFields = dataType.toTiddlerFieldsArray(data,fallbackTitle);\n\t\t\t\tcallback(tiddlerFields);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nvar importDataTypes = [\n\t{type: \"text/vnd.tiddler\", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\treturn parseJSONTiddlers(data,fallbackTitle);\n\t}},\n\t{type: \"URL\", IECompatible: true, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURIComponent(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn parseJSONTiddlers(match[1],fallbackTitle);\n\t\t} else {\n\t\t\treturn [{title: fallbackTitle, text: data}]; // As URL string\n\t\t}\n\t}},\n\t{type: \"text/x-moz-url\", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\t// Check for tiddler data URI\n\t\tvar match = decodeURIComponent(data).match(/^data\\:text\\/vnd\\.tiddler,(.*)/i);\n\t\tif(match) {\n\t\t\treturn parseJSONTiddlers(match[1],fallbackTitle);\n\t\t} else {\n\t\t\treturn [{title: fallbackTitle, text: data}]; // As URL string\n\t\t}\n\t}},\n\t{type: \"text/html\", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\treturn [{title: fallbackTitle, text: data}];\n\t}},\n\t{type: \"text/plain\", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\treturn [{title: fallbackTitle, text: data}];\n\t}},\n\t{type: \"Text\", IECompatible: true, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\treturn [{title: fallbackTitle, text: data}];\n\t}},\n\t{type: \"text/uri-list\", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {\n\t\treturn [{title: fallbackTitle, text: data}];\n\t}}\n];\n\nfunction parseJSONTiddlers(json,fallbackTitle) {\n\tvar data = JSON.parse(json);\n\tif(!$tw.utils.isArray(data)) {\n\t\tdata = [data];\n\t}\n\tdata.forEach(function(fields) {\n\t\tfields.title = fields.title || fallbackTitle;\n\t});\n\treturn data;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/http.js": {
"title": "$:/core/modules/utils/dom/http.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/http.js\ntype: application/javascript\nmodule-type: utils\n\nBrowser HTTP support\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nA quick and dirty HTTP function; to be refactored later. Options are:\n\turl: URL to retrieve\n\ttype: GET, PUT, POST etc\n\tcallback: function invoked with (err,data)\n\treturnProp: string name of the property to return as first argument of callback\n*/\nexports.httpRequest = function(options) {\n\tvar type = options.type || \"GET\",\n\t\theaders = options.headers || {accept: \"application/json\"},\n\t\treturnProp = options.returnProp || \"responseText\",\n\t\trequest = new XMLHttpRequest(),\n\t\tdata = \"\",\n\t\tf,results;\n\t// Massage the data hashmap into a string\n\tif(options.data) {\n\t\tif(typeof options.data === \"string\") { // Already a string\n\t\t\tdata = options.data;\n\t\t} else { // A hashmap of strings\n\t\t\tresults = [];\n\t\t\t$tw.utils.each(options.data,function(dataItem,dataItemTitle) {\n\t\t\t\tresults.push(dataItemTitle + \"=\" + encodeURIComponent(dataItem));\n\t\t\t});\n\t\t\tdata = results.join(\"&\");\n\t\t}\n\t}\n\t// Set up the state change handler\n\trequest.onreadystatechange = function() {\n\t\tif(this.readyState === 4) {\n\t\t\tif(this.status === 200 || this.status === 201 || this.status === 204) {\n\t\t\t\t// Success!\n\t\t\t\toptions.callback(null,this[returnProp],this);\n\t\t\t\treturn;\n\t\t\t}\n\t\t// Something went wrong\n\t\toptions.callback($tw.language.getString(\"Error/XMLHttpRequest\") + \": \" + this.status);\n\t\t}\n\t};\n\t// Make the request\n\trequest.open(type,options.url,true);\n\tif(headers) {\n\t\t$tw.utils.each(headers,function(header,headerTitle,object) {\n\t\t\trequest.setRequestHeader(headerTitle,header);\n\t\t});\n\t}\n\tif(data && !$tw.utils.hop(headers,\"Content-type\")) {\n\t\trequest.setRequestHeader(\"Content-type\",\"application/x-www-form-urlencoded; charset=UTF-8\");\n\t}\n\ttry {\n\t\trequest.send(data);\n\t} catch(e) {\n\t\toptions.callback(e);\n\t}\n\treturn request;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/keyboard.js": {
"title": "$:/core/modules/utils/dom/keyboard.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/keyboard.js\ntype: application/javascript\nmodule-type: utils\n\nKeyboard utilities; now deprecated. Instead, use $tw.keyboardManager\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n[\"parseKeyDescriptor\",\"checkKeyDescriptor\"].forEach(function(method) {\n\texports[method] = function() {\n\t\tif($tw.keyboardManager) {\n\t\t\treturn $tw.keyboardManager[method].apply($tw.keyboardManager,Array.prototype.slice.call(arguments,0));\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t};\n});\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/modal.js": {
"title": "$:/core/modules/utils/dom/modal.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/modal.js\ntype: application/javascript\nmodule-type: utils\n\nModal message mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar Modal = function(wiki) {\n\tthis.wiki = wiki;\n\tthis.modalCount = 0;\n};\n\n/*\nDisplay a modal dialogue\n\ttitle: Title of tiddler to display\n\toptions: see below\nOptions include:\n\tdownloadLink: Text of a big download link to include\n*/\nModal.prototype.display = function(title,options) {\n\toptions = options || {};\n\tvar self = this,\n\t\trefreshHandler,\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\ttiddler = this.wiki.getTiddler(title);\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Create the variables\n\tvar variables = $tw.utils.extend({currentTiddler: title},options.variables);\n\t// Create the wrapper divs\n\tvar wrapper = document.createElement(\"div\"),\n\t\tmodalBackdrop = document.createElement(\"div\"),\n\t\tmodalWrapper = document.createElement(\"div\"),\n\t\tmodalHeader = document.createElement(\"div\"),\n\t\theaderTitle = document.createElement(\"h3\"),\n\t\tmodalBody = document.createElement(\"div\"),\n\t\tmodalLink = document.createElement(\"a\"),\n\t\tmodalFooter = document.createElement(\"div\"),\n\t\tmodalFooterHelp = document.createElement(\"span\"),\n\t\tmodalFooterButtons = document.createElement(\"span\");\n\t// Up the modal count and adjust the body class\n\tthis.modalCount++;\n\tthis.adjustPageClass();\n\t// Add classes\n\t$tw.utils.addClass(wrapper,\"tc-modal-wrapper\");\n\t$tw.utils.addClass(modalBackdrop,\"tc-modal-backdrop\");\n\t$tw.utils.addClass(modalWrapper,\"tc-modal\");\n\t$tw.utils.addClass(modalHeader,\"tc-modal-header\");\n\t$tw.utils.addClass(modalBody,\"tc-modal-body\");\n\t$tw.utils.addClass(modalFooter,\"tc-modal-footer\");\n\t// Join them together\n\twrapper.appendChild(modalBackdrop);\n\twrapper.appendChild(modalWrapper);\n\tmodalHeader.appendChild(headerTitle);\n\tmodalWrapper.appendChild(modalHeader);\n\tmodalWrapper.appendChild(modalBody);\n\tmodalFooter.appendChild(modalFooterHelp);\n\tmodalFooter.appendChild(modalFooterButtons);\n\tmodalWrapper.appendChild(modalFooter);\n\t// Render the title of the message\n\tvar headerWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tfield: \"subtitle\",\n\t\tmode: \"inline\",\n\t\tchildren: [{\n\t\t\ttype: \"text\",\n\t\t\tattributes: {\n\t\t\t\ttext: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tvalue: title\n\t\t}}}],\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables,\n\t\timportPageMacros: true\n\t});\n\theaderWidgetNode.render(headerTitle,null);\n\t// Render the body of the message\n\tvar bodyWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables,\n\t\timportPageMacros: true\n\t});\n\tbodyWidgetNode.render(modalBody,null);\n\t// Setup the link if present\n\tif(options.downloadLink) {\n\t\tmodalLink.href = options.downloadLink;\n\t\tmodalLink.appendChild(document.createTextNode(\"Right-click to save changes\"));\n\t\tmodalBody.appendChild(modalLink);\n\t}\n\t// Render the footer of the message\n\tif(tiddler && tiddler.fields && tiddler.fields.help) {\n\t\tvar link = document.createElement(\"a\");\n\t\tlink.setAttribute(\"href\",tiddler.fields.help);\n\t\tlink.setAttribute(\"target\",\"_blank\");\n\t\tlink.setAttribute(\"rel\",\"noopener noreferrer\");\n\t\tlink.appendChild(document.createTextNode(\"Help\"));\n\t\tmodalFooterHelp.appendChild(link);\n\t\tmodalFooterHelp.style.float = \"left\";\n\t}\n\tvar footerWidgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tfield: \"footer\",\n\t\tmode: \"inline\",\n\t\tchildren: [{\n\t\t\ttype: \"button\",\n\t\t\tattributes: {\n\t\t\t\tmessage: {\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tvalue: \"tm-close-tiddler\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tchildren: [{\n\t\t\t\ttype: \"text\",\n\t\t\t\tattributes: {\n\t\t\t\t\ttext: {\n\t\t\t\t\t\ttype: \"string\",\n\t\t\t\t\t\tvalue: $tw.language.getString(\"Buttons/Close/Caption\")\n\t\t\t}}}\n\t\t]}],\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables,\n\t\timportPageMacros: true\n\t});\n\tfooterWidgetNode.render(modalFooterButtons,null);\n\t// Set up the refresh handler\n\trefreshHandler = function(changes) {\n\t\theaderWidgetNode.refresh(changes,modalHeader,null);\n\t\tbodyWidgetNode.refresh(changes,modalBody,null);\n\t\tfooterWidgetNode.refresh(changes,modalFooterButtons,null);\n\t};\n\tthis.wiki.addEventListener(\"change\",refreshHandler);\n\t// Add the close event handler\n\tvar closeHandler = function(event) {\n\t\t// Remove our refresh handler\n\t\tself.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t// Decrease the modal count and adjust the body class\n\t\tself.modalCount--;\n\t\tself.adjustPageClass();\n\t\t// Force layout and animate the modal message away\n\t\t$tw.utils.forceLayout(modalBackdrop);\n\t\t$tw.utils.forceLayout(modalWrapper);\n\t\t$tw.utils.setStyle(modalBackdrop,[\n\t\t\t{opacity: \"0\"}\n\t\t]);\n\t\t$tw.utils.setStyle(modalWrapper,[\n\t\t\t{transform: \"translateY(\" + window.innerHeight + \"px)\"}\n\t\t]);\n\t\t// Set up an event for the transition end\n\t\twindow.setTimeout(function() {\n\t\t\tif(wrapper.parentNode) {\n\t\t\t\t// Remove the modal message from the DOM\n\t\t\t\tdocument.body.removeChild(wrapper);\n\t\t\t}\n\t\t},duration);\n\t\t// Don't let anyone else handle the tm-close-tiddler message\n\t\treturn false;\n\t};\n\theaderWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\tbodyWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\tfooterWidgetNode.addEventListener(\"tm-close-tiddler\",closeHandler,false);\n\t// Set the initial styles for the message\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \"0\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transformOrigin: \"0% 0%\"},\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"}\n\t]);\n\t// Put the message into the document\n\tdocument.body.appendChild(wrapper);\n\t// Set up animation for the styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{transition: \"opacity \" + duration + \"ms ease-out\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\n\t]);\n\t// Force layout\n\t$tw.utils.forceLayout(modalBackdrop);\n\t$tw.utils.forceLayout(modalWrapper);\n\t// Set final animated styles\n\t$tw.utils.setStyle(modalBackdrop,[\n\t\t{opacity: \"0.7\"}\n\t]);\n\t$tw.utils.setStyle(modalWrapper,[\n\t\t{transform: \"translateY(0px)\"}\n\t]);\n};\n\nModal.prototype.adjustPageClass = function() {\n\tif($tw.pageContainer) {\n\t\t$tw.utils.toggleClass($tw.pageContainer,\"tc-modal-displayed\",this.modalCount > 0);\n\t}\n};\n\nexports.Modal = Modal;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/notifier.js": {
"title": "$:/core/modules/utils/dom/notifier.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/notifier.js\ntype: application/javascript\nmodule-type: utils\n\nNotifier mechanism\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar Notifier = function(wiki) {\n\tthis.wiki = wiki;\n};\n\n/*\nDisplay a notification\n\ttitle: Title of tiddler containing the notification text\n\toptions: see below\nOptions include:\n*/\nNotifier.prototype.display = function(title,options) {\n\toptions = options || {};\n\t// Create the wrapper divs\n\tvar self = this,\n\t\tnotification = document.createElement(\"div\"),\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\trefreshHandler;\n\t// Don't do anything if the tiddler doesn't exist\n\tif(!tiddler) {\n\t\treturn;\n\t}\n\t// Add classes\n\t$tw.utils.addClass(notification,\"tc-notification\");\n\t// Create the variables\n\tvar variables = $tw.utils.extend({currentTiddler: title},options.variables);\n\t// Render the body of the notification\n\tvar widgetNode = this.wiki.makeTranscludeWidget(title,{\n\t\tparentWidget: $tw.rootWidget,\n\t\tdocument: document,\n\t\tvariables: variables,\n\t\timportPageMacros: true});\n\twidgetNode.render(notification,null);\n\trefreshHandler = function(changes) {\n\t\twidgetNode.refresh(changes,notification,null);\n\t};\n\tthis.wiki.addEventListener(\"change\",refreshHandler);\n\t// Set the initial styles for the notification\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \"0\"},\n\t\t{transformOrigin: \"0% 0%\"},\n\t\t{transform: \"translateY(\" + (-window.innerHeight) + \"px)\"},\n\t\t{transition: \"opacity \" + duration + \"ms ease-out, \" + $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms ease-in-out\"}\n\t]);\n\t// Add the notification to the DOM\n\tdocument.body.appendChild(notification);\n\t// Force layout\n\t$tw.utils.forceLayout(notification);\n\t// Set final animated styles\n\t$tw.utils.setStyle(notification,[\n\t\t{opacity: \"1.0\"},\n\t\t{transform: \"translateY(0px)\"}\n\t]);\n\t// Set a timer to remove the notification\n\twindow.setTimeout(function() {\n\t\t// Remove our change event handler\n\t\tself.wiki.removeEventListener(\"change\",refreshHandler);\n\t\t// Force layout and animate the notification away\n\t\t$tw.utils.forceLayout(notification);\n\t\t$tw.utils.setStyle(notification,[\n\t\t\t{opacity: \"0.0\"},\n\t\t\t{transform: \"translateX(\" + (notification.offsetWidth) + \"px)\"}\n\t\t]);\n\t\t// Remove the modal message from the DOM once the transition ends\n\t\tsetTimeout(function() {\n\t\t\tif(notification.parentNode) {\n\t\t\t\tdocument.body.removeChild(notification);\n\t\t\t}\n\t\t},duration);\n\t},$tw.config.preferences.notificationDuration);\n};\n\nexports.Notifier = Notifier;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/popup.js": {
"title": "$:/core/modules/utils/dom/popup.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/popup.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Popup object prototype that manages popups in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreates a Popup object with these options:\n\trootElement: the DOM element to which the popup zapper should be attached\n*/\nvar Popup = function(options) {\n\toptions = options || {};\n\tthis.rootElement = options.rootElement || document.documentElement;\n\tthis.popups = []; // Array of {title:,wiki:,domNode:} objects\n};\n\n/*\nTrigger a popup open or closed. Parameters are in a hashmap:\n\ttitle: title of the tiddler where the popup details are stored\n\tdomNode: dom node to which the popup will be positioned\n\twiki: wiki\n\tforce: if specified, forces the popup state to true or false (instead of toggling it)\n*/\nPopup.prototype.triggerPopup = function(options) {\n\t// Check if this popup is already active\n\tvar index = this.findPopup(options.title);\n\t// Compute the new state\n\tvar state = index === -1;\n\tif(options.force !== undefined) {\n\t\tstate = options.force;\n\t}\n\t// Show or cancel the popup according to the new state\n\tif(state) {\n\t\tthis.show(options);\n\t} else {\n\t\tthis.cancel(index);\n\t}\n};\n\nPopup.prototype.findPopup = function(title) {\n\tvar index = -1;\n\tfor(var t=0; t<this.popups.length; t++) {\n\t\tif(this.popups[t].title === title) {\n\t\t\tindex = t;\n\t\t}\n\t}\n\treturn index;\n};\n\nPopup.prototype.handleEvent = function(event) {\n\tif(event.type === \"click\") {\n\t\t// Find out what was clicked on\n\t\tvar info = this.popupInfo(event.target),\n\t\t\tcancelLevel = info.popupLevel - 1;\n\t\t// Don't remove the level that was clicked on if we clicked on a handle\n\t\tif(info.isHandle) {\n\t\t\tcancelLevel++;\n\t\t}\n\t\t// Cancel\n\t\tthis.cancel(cancelLevel);\n\t}\n};\n\n/*\nFind the popup level containing a DOM node. Returns:\npopupLevel: count of the number of nested popups containing the specified element\nisHandle: true if the specified element is within a popup handle\n*/\nPopup.prototype.popupInfo = function(domNode) {\n\tvar isHandle = false,\n\t\tpopupCount = 0,\n\t\tnode = domNode;\n\t// First check ancestors to see if we're within a popup handle\n\twhile(node) {\n\t\tif($tw.utils.hasClass(node,\"tc-popup-handle\")) {\n\t\t\tisHandle = true;\n\t\t\tpopupCount++;\n\t\t}\n\t\tif($tw.utils.hasClass(node,\"tc-popup-keep\")) {\n\t\t\tisHandle = true;\n\t\t}\n\t\tnode = node.parentNode;\n\t}\n\t// Then count the number of ancestor popups\n\tnode = domNode;\n\twhile(node) {\n\t\tif($tw.utils.hasClass(node,\"tc-popup\")) {\n\t\t\tpopupCount++;\n\t\t}\n\t\tnode = node.parentNode;\n\t}\n\tvar info = {\n\t\tpopupLevel: popupCount,\n\t\tisHandle: isHandle\n\t};\n\treturn info;\n};\n\n/*\nDisplay a popup by adding it to the stack\n*/\nPopup.prototype.show = function(options) {\n\t// Find out what was clicked on\n\tvar info = this.popupInfo(options.domNode);\n\t// Cancel any higher level popups\n\tthis.cancel(info.popupLevel);\n\t// Store the popup details if not already there\n\tif(this.findPopup(options.title) === -1) {\n\t\tthis.popups.push({\n\t\t\ttitle: options.title,\n\t\t\twiki: options.wiki,\n\t\t\tdomNode: options.domNode\n\t\t});\n\t}\n\t// Set the state tiddler\n\toptions.wiki.setTextReference(options.title,\n\t\t\t\"(\" + options.domNode.offsetLeft + \",\" + options.domNode.offsetTop + \",\" + \n\t\t\t\toptions.domNode.offsetWidth + \",\" + options.domNode.offsetHeight + \")\");\n\t// Add the click handler if we have any popups\n\tif(this.popups.length > 0) {\n\t\tthis.rootElement.addEventListener(\"click\",this,true);\t\t\n\t}\n};\n\n/*\nCancel all popups at or above a specified level or DOM node\nlevel: popup level to cancel (0 cancels all popups)\n*/\nPopup.prototype.cancel = function(level) {\n\tvar numPopups = this.popups.length;\n\tlevel = Math.max(0,Math.min(level,numPopups));\n\tfor(var t=level; t<numPopups; t++) {\n\t\tvar popup = this.popups.pop();\n\t\tif(popup.title) {\n\t\t\tpopup.wiki.deleteTiddler(popup.title);\n\t\t}\n\t}\n\tif(this.popups.length === 0) {\n\t\tthis.rootElement.removeEventListener(\"click\",this,false);\n\t}\n};\n\n/*\nReturns true if the specified title and text identifies an active popup\n*/\nPopup.prototype.readPopupState = function(text) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/;\n\treturn popupLocationRegExp.test(text);\n};\n\nexports.Popup = Popup;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/dom/scroller.js": {
"title": "$:/core/modules/utils/dom/scroller.js",
"text": "/*\\\ntitle: $:/core/modules/utils/dom/scroller.js\ntype: application/javascript\nmodule-type: utils\n\nModule that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nEvent handler for when the `tm-scroll` event hits the document body\n*/\nvar PageScroller = function() {\n\tthis.idRequestFrame = null;\n\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\twindow.webkitRequestAnimationFrame ||\n\t\twindow.mozRequestAnimationFrame ||\n\t\tfunction(callback) {\n\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t};\n\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\twindow.webkitCancelAnimationFrame ||\n\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\twindow.mozCancelAnimationFrame ||\n\t\twindow.mozCancelRequestAnimationFrame ||\n\t\tfunction(id) {\n\t\t\twindow.clearTimeout(id);\n\t\t};\n};\n\nPageScroller.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle an event\n*/\nPageScroller.prototype.handleEvent = function(event) {\n\tif(event.type === \"tm-scroll\") {\n\t\treturn this.scrollIntoView(event.target);\n\t}\n\treturn true;\n};\n\n/*\nHandle a scroll event hitting the page document\n*/\nPageScroller.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\t// Now get ready to scroll the body\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = $tw.utils.getScrollPosition();\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar clientBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientBounds.left + scrollPosition.x,\n\t\t\ttop: clientBounds.top + scrollPosition.y,\n\t\t\twidth: clientBounds.width,\n\t\t\theight: clientBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\t// targetPos/targetSize - position and size of the target element\n\t// currentPos/currentSize - position and size of the current scroll viewport\n\t// returns: new position of the scroll viewport\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\tvar newPos = currentPos;\n\t\t\t// If the target is above/left of the current view, then scroll to it's top/left\n\t\t\tif(targetPos <= currentPos) {\n\t\t\t\tnewPos = targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\n\t\t\t\tnewPos = targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos < targetPos) {\n\t\t\t\tnewPos = targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\tnewPos = currentPos;\n\t\t\t}\n\t\t\t// If we are scrolling within 50 pixels of the top/left then snap to zero\n\t\t\tif(newPos < 50) {\n\t\t\t\tnewPos = 0;\n\t\t\t}\n\t\t\treturn newPos;\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,window.innerWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,window.innerHeight);\n\t// Only scroll if the position has changed\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration <= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t >= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\twindow.scrollTo(scrollPosition.x + (endX - scrollPosition.x) * t,scrollPosition.y + (endY - scrollPosition.y) * t);\n\t\t\tif(t < 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\nexports.PageScroller = PageScroller;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/edition-info.js": {
"title": "$:/core/modules/utils/edition-info.js",
"text": "/*\\\ntitle: $:/core/modules/utils/edition-info.js\ntype: application/javascript\nmodule-type: utils-node\n\nInformation about the available editions\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n\tpath = require(\"path\");\n\nvar editionInfo;\n\nexports.getEditionInfo = function() {\n\tif(!editionInfo) {\n\t\t// Enumerate the edition paths\n\t\tvar editionPaths = $tw.getLibraryItemSearchPaths($tw.config.editionsPath,$tw.config.editionsEnvVar);\n\t\teditionInfo = {};\n\t\tfor(var editionIndex=0; editionIndex<editionPaths.length; editionIndex++) {\n\t\t\tvar editionPath = editionPaths[editionIndex];\n\t\t\t// Enumerate the folders\n\t\t\tvar entries = fs.readdirSync(editionPath);\n\t\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\n\t\t\t\tvar entry = entries[entryIndex];\n\t\t\t\t// Check if directories have a valid tiddlywiki.info\n\t\t\t\tif(!editionInfo[entry] && $tw.utils.isDirectory(path.resolve(editionPath,entry))) {\n\t\t\t\t\tvar info;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinfo = JSON.parse(fs.readFileSync(path.resolve(editionPath,entry,\"tiddlywiki.info\"),\"utf8\"));\n\t\t\t\t\t} catch(ex) {\n\t\t\t\t\t}\n\t\t\t\t\tif(info) {\n\t\t\t\t\t\teditionInfo[entry] = info;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn editionInfo;\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/fakedom.js": {
"title": "$:/core/modules/utils/fakedom.js",
"text": "/*\\\ntitle: $:/core/modules/utils/fakedom.js\ntype: application/javascript\nmodule-type: global\n\nA barebones implementation of DOM interfaces needed by the rendering mechanism.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Sequence number used to enable us to track objects for testing\nvar sequenceNumber = null;\n\nvar bumpSequenceNumber = function(object) {\n\tif(sequenceNumber !== null) {\n\t\tobject.sequenceNumber = sequenceNumber++;\n\t}\n};\n\nvar TW_TextNode = function(text) {\n\tbumpSequenceNumber(this);\n\tthis.textContent = text + \"\";\n};\n\nObject.defineProperty(TW_TextNode.prototype, \"nodeType\", {\n\tget: function() {\n\t\treturn 3;\n\t}\n});\n\nObject.defineProperty(TW_TextNode.prototype, \"formattedTextContent\", {\n\tget: function() {\n\t\treturn this.textContent.replace(/(\\r?\\n)/g,\"\");\n\t}\n});\n\nvar TW_Element = function(tag,namespace) {\n\tbumpSequenceNumber(this);\n\tthis.isTiddlyWikiFakeDom = true;\n\tthis.tag = tag;\n\tthis.attributes = {};\n\tthis.isRaw = false;\n\tthis.children = [];\n\tthis.style = {};\n\tthis.namespaceURI = namespace || \"http://www.w3.org/1999/xhtml\";\n};\n\nObject.defineProperty(TW_Element.prototype, \"nodeType\", {\n\tget: function() {\n\t\treturn 1;\n\t}\n});\n\nTW_Element.prototype.getAttribute = function(name) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot getAttribute on a raw TW_Element\";\n\t}\n\treturn this.attributes[name];\n};\n\nTW_Element.prototype.setAttribute = function(name,value) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot setAttribute on a raw TW_Element\";\n\t}\n\tthis.attributes[name] = value + \"\";\n};\n\nTW_Element.prototype.setAttributeNS = function(namespace,name,value) {\n\tthis.setAttribute(name,value);\n};\n\nTW_Element.prototype.removeAttribute = function(name) {\n\tif(this.isRaw) {\n\t\tthrow \"Cannot removeAttribute on a raw TW_Element\";\n\t}\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\tdelete this.attributes[name];\n\t}\n};\n\nTW_Element.prototype.appendChild = function(node) {\n\tthis.children.push(node);\n\tnode.parentNode = this;\n};\n\nTW_Element.prototype.insertBefore = function(node,nextSibling) {\n\tif(nextSibling) {\n\t\tvar p = this.children.indexOf(nextSibling);\n\t\tif(p !== -1) {\n\t\t\tthis.children.splice(p,0,node);\n\t\t\tnode.parentNode = this;\n\t\t} else {\n\t\t\tthis.appendChild(node);\n\t\t}\n\t} else {\n\t\tthis.appendChild(node);\n\t}\n};\n\nTW_Element.prototype.removeChild = function(node) {\n\tvar p = this.children.indexOf(node);\n\tif(p !== -1) {\n\t\tthis.children.splice(p,1);\n\t}\n};\n\nTW_Element.prototype.hasChildNodes = function() {\n\treturn !!this.children.length;\n};\n\nObject.defineProperty(TW_Element.prototype, \"childNodes\", {\n\tget: function() {\n\t\treturn this.children;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"firstChild\", {\n\tget: function() {\n\t\treturn this.children[0];\n\t}\n});\n\nTW_Element.prototype.addEventListener = function(type,listener,useCapture) {\n\t// Do nothing\n};\n\nObject.defineProperty(TW_Element.prototype, \"tagName\", {\n\tget: function() {\n\t\treturn this.tag || \"\";\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"className\", {\n\tget: function() {\n\t\treturn this.attributes[\"class\"] || \"\";\n\t},\n\tset: function(value) {\n\t\tthis.attributes[\"class\"] = value + \"\";\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"value\", {\n\tget: function() {\n\t\treturn this.attributes.value || \"\";\n\t},\n\tset: function(value) {\n\t\tthis.attributes.value = value + \"\";\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"outerHTML\", {\n\tget: function() {\n\t\tvar output = [],attr,a,v;\n\t\toutput.push(\"<\",this.tag);\n\t\tif(this.attributes) {\n\t\t\tattr = [];\n\t\t\tfor(a in this.attributes) {\n\t\t\t\tattr.push(a);\n\t\t\t}\n\t\t\tattr.sort();\n\t\t\tfor(a=0; a<attr.length; a++) {\n\t\t\t\tv = this.attributes[attr[a]];\n\t\t\t\tif(v !== undefined) {\n\t\t\t\t\toutput.push(\" \",attr[a],\"=\\\"\",$tw.utils.htmlEncode(v),\"\\\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(this.style) {\n\t\t\tvar style = [];\n\t\t\tfor(var s in this.style) {\n\t\t\t\tstyle.push(s + \":\" + this.style[s] + \";\");\n\t\t\t}\n\t\t\tif(style.length > 0) {\n\t\t\t\toutput.push(\" style=\\\"\",style.join(\"\"),\"\\\"\")\n\t\t\t}\n\t\t}\n\t\toutput.push(\">\");\n\t\tif($tw.config.htmlVoidElements.indexOf(this.tag) === -1) {\n\t\t\toutput.push(this.innerHTML);\n\t\t\toutput.push(\"</\",this.tag,\">\");\n\t\t}\n\t\treturn output.join(\"\");\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"innerHTML\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\treturn this.rawHTML;\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tif(node instanceof TW_Element) {\n\t\t\t\t\tb.push(node.outerHTML);\n\t\t\t\t} else if(node instanceof TW_TextNode) {\n\t\t\t\t\tb.push($tw.utils.htmlEncode(node.textContent));\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn b.join(\"\");\n\t\t}\n\t},\n\tset: function(value) {\n\t\tthis.isRaw = true;\n\t\tthis.rawHTML = value;\n\t\tthis.rawTextContent = null;\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"textInnerHTML\", {\n\tset: function(value) {\n\t\tif(this.isRaw) {\n\t\t\tthis.rawTextContent = value;\n\t\t} else {\n\t\t\tthrow \"Cannot set textInnerHTML of a non-raw TW_Element\";\n\t\t}\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"textContent\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\tif(this.rawTextContent === null) {\n\t\t\t\treturn \"\";\n\t\t\t} else {\n\t\t\t\treturn this.rawTextContent;\n\t\t\t}\n\t\t} else {\n\t\t\tvar b = [];\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.textContent);\n\t\t\t});\n\t\t\treturn b.join(\"\");\n\t\t}\n\t},\n\tset: function(value) {\n\t\tthis.children = [new TW_TextNode(value)];\n\t}\n});\n\nObject.defineProperty(TW_Element.prototype, \"formattedTextContent\", {\n\tget: function() {\n\t\tif(this.isRaw) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\tvar b = [],\n\t\t\t\tisBlock = $tw.config.htmlBlockElements.indexOf(this.tag) !== -1;\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\"\\n\");\n\t\t\t}\n\t\t\tif(this.tag === \"li\") {\n\t\t\t\tb.push(\"* \");\n\t\t\t}\n\t\t\t$tw.utils.each(this.children,function(node) {\n\t\t\t\tb.push(node.formattedTextContent);\n\t\t\t});\n\t\t\tif(isBlock) {\n\t\t\t\tb.push(\"\\n\");\n\t\t\t}\n\t\t\treturn b.join(\"\");\n\t\t}\n\t}\n});\n\nvar document = {\n\tsetSequenceNumber: function(value) {\n\t\tsequenceNumber = value;\n\t},\n\tcreateElementNS: function(namespace,tag) {\n\t\treturn new TW_Element(tag,namespace);\n\t},\n\tcreateElement: function(tag) {\n\t\treturn new TW_Element(tag);\n\t},\n\tcreateTextNode: function(text) {\n\t\treturn new TW_TextNode(text);\n\t},\n\tcompatMode: \"CSS1Compat\", // For KaTeX to know that we're not a browser in quirks mode\n\tisTiddlyWikiFakeDom: true\n};\n\nexports.fakeDocument = document;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/filesystem.js": {
"title": "$:/core/modules/utils/filesystem.js",
"text": "/*\\\ntitle: $:/core/modules/utils/filesystem.js\ntype: application/javascript\nmodule-type: utils-node\n\nFile system utilities\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar fs = require(\"fs\"),\n\tpath = require(\"path\");\n\n/*\nRecursively (and synchronously) copy a directory and all its content\n*/\nexports.copyDirectory = function(srcPath,dstPath) {\n\t// Remove any trailing path separators\n\tsrcPath = $tw.utils.removeTrailingSeparator(srcPath);\n\tdstPath = $tw.utils.removeTrailingSeparator(dstPath);\n\t// Create the destination directory\n\tvar err = $tw.utils.createDirectory(dstPath);\n\tif(err) {\n\t\treturn err;\n\t}\n\t// Function to copy a folder full of files\n\tvar copy = function(srcPath,dstPath) {\n\t\tvar srcStats = fs.lstatSync(srcPath),\n\t\t\tdstExists = fs.existsSync(dstPath);\n\t\tif(srcStats.isFile()) {\n\t\t\t$tw.utils.copyFile(srcPath,dstPath);\n\t\t} else if(srcStats.isDirectory()) {\n\t\t\tvar items = fs.readdirSync(srcPath);\n\t\t\tfor(var t=0; t<items.length; t++) {\n\t\t\t\tvar item = items[t],\n\t\t\t\t\terr = copy(srcPath + path.sep + item,dstPath + path.sep + item);\n\t\t\t\tif(err) {\n\t\t\t\t\treturn err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\tcopy(srcPath,dstPath);\n\treturn null;\n};\n\n/*\nCopy a file\n*/\nvar FILE_BUFFER_LENGTH = 64 * 1024,\n\tfileBuffer;\n\nexports.copyFile = function(srcPath,dstPath) {\n\t// Create buffer if required\n\tif(!fileBuffer) {\n\t\tfileBuffer = new Buffer(FILE_BUFFER_LENGTH);\n\t}\n\t// Create any directories in the destination\n\t$tw.utils.createDirectory(path.dirname(dstPath));\n\t// Copy the file\n\tvar srcFile = fs.openSync(srcPath,\"r\"),\n\t\tdstFile = fs.openSync(dstPath,\"w\"),\n\t\tbytesRead = 1,\n\t\tpos = 0;\n\twhile (bytesRead > 0) {\n\t\tbytesRead = fs.readSync(srcFile,fileBuffer,0,FILE_BUFFER_LENGTH,pos);\n\t\tfs.writeSync(dstFile,fileBuffer,0,bytesRead);\n\t\tpos += bytesRead;\n\t}\n\tfs.closeSync(srcFile);\n\tfs.closeSync(dstFile);\n\treturn null;\n};\n\n/*\nRemove trailing path separator\n*/\nexports.removeTrailingSeparator = function(dirPath) {\n\tvar len = dirPath.length;\n\tif(dirPath.charAt(len-1) === path.sep) {\n\t\tdirPath = dirPath.substr(0,len-1);\n\t}\n\treturn dirPath;\n};\n\n/*\nRecursively create a directory\n*/\nexports.createDirectory = function(dirPath) {\n\tif(dirPath.substr(dirPath.length-1,1) !== path.sep) {\n\t\tdirPath = dirPath + path.sep;\n\t}\n\tvar pos = 1;\n\tpos = dirPath.indexOf(path.sep,pos);\n\twhile(pos !== -1) {\n\t\tvar subDirPath = dirPath.substr(0,pos);\n\t\tif(!$tw.utils.isDirectory(subDirPath)) {\n\t\t\ttry {\n\t\t\t\tfs.mkdirSync(subDirPath);\n\t\t\t} catch(e) {\n\t\t\t\treturn \"Error creating directory '\" + subDirPath + \"'\";\n\t\t\t}\n\t\t}\n\t\tpos = dirPath.indexOf(path.sep,pos + 1);\n\t}\n\treturn null;\n};\n\n/*\nRecursively create directories needed to contain a specified file\n*/\nexports.createFileDirectories = function(filePath) {\n\treturn $tw.utils.createDirectory(path.dirname(filePath));\n};\n\n/*\nRecursively delete a directory\n*/\nexports.deleteDirectory = function(dirPath) {\n\tif(fs.existsSync(dirPath)) {\n\t\tvar entries = fs.readdirSync(dirPath);\n\t\tfor(var entryIndex=0; entryIndex<entries.length; entryIndex++) {\n\t\t\tvar currPath = dirPath + path.sep + entries[entryIndex];\n\t\t\tif(fs.lstatSync(currPath).isDirectory()) {\n\t\t\t\t$tw.utils.deleteDirectory(currPath);\n\t\t\t} else {\n\t\t\t\tfs.unlinkSync(currPath);\n\t\t\t}\n\t\t}\n\tfs.rmdirSync(dirPath);\n\t}\n\treturn null;\n};\n\n/*\nCheck if a path identifies a directory\n*/\nexports.isDirectory = function(dirPath) {\n\treturn fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory();\n};\n\n/*\nCheck if a path identifies a directory that is empty\n*/\nexports.isDirectoryEmpty = function(dirPath) {\n\tif(!$tw.utils.isDirectory(dirPath)) {\n\t\treturn false;\n\t}\n\tvar files = fs.readdirSync(dirPath),\n\t\tempty = true;\n\t$tw.utils.each(files,function(file,index) {\n\t\tif(file.charAt(0) !== \".\") {\n\t\t\tempty = false;\n\t\t}\n\t});\n\treturn empty;\n};\n\n/*\nRecursively delete a tree of empty directories\n*/\nexports.deleteEmptyDirs = function(dirpath,callback) {\n\tvar self = this;\n\tfs.readdir(dirpath,function(err,files) {\n\t\tif(err) {\n\t\t\treturn callback(err);\n\t\t}\n\t\tif(files.length > 0) {\n\t\t\treturn callback(null);\n\t\t}\n\t\tfs.rmdir(dirpath,function(err) {\n\t\t\tif(err) {\n\t\t\t\treturn callback(err);\n\t\t\t}\n\t\t\tself.deleteEmptyDirs(path.dirname(dirpath),callback);\n\t\t});\n\t});\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils-node"
},
"$:/core/modules/utils/logger.js": {
"title": "$:/core/modules/utils/logger.js",
"text": "/*\\\ntitle: $:/core/modules/utils/logger.js\ntype: application/javascript\nmodule-type: utils\n\nA basic logging implementation\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ALERT_TAG = \"$:/tags/Alert\";\n\n/*\nMake a new logger\n*/\nfunction Logger(componentName,options) {\n\toptions = options || {};\n\tthis.componentName = componentName || \"\";\n\tthis.colour = options.colour || \"white\";\n\tthis.enable = \"enable\" in options ? options.enable : true;\n}\n\n/*\nLog a message\n*/\nLogger.prototype.log = function(/* args */) {\n\tif(this.enable && console !== undefined && console.log !== undefined) {\n\t\treturn Function.apply.call(console.log, console, [$tw.utils.terminalColour(this.colour),this.componentName + \":\"].concat(Array.prototype.slice.call(arguments,0)).concat($tw.utils.terminalColour()));\n\t}\n};\n\n/*\nAlert a message\n*/\nLogger.prototype.alert = function(/* args */) {\n\tif(this.enable) {\n\t\t// Prepare the text of the alert\n\t\tvar text = Array.prototype.join.call(arguments,\" \");\n\t\t// Create alert tiddlers in the browser\n\t\tif($tw.browser) {\n\t\t\t// Check if there is an existing alert with the same text and the same component\n\t\t\tvar existingAlerts = $tw.wiki.getTiddlersWithTag(ALERT_TAG),\n\t\t\t\talertFields,\n\t\t\t\texistingCount,\n\t\t\t\tself = this;\n\t\t\t$tw.utils.each(existingAlerts,function(title) {\n\t\t\t\tvar tiddler = $tw.wiki.getTiddler(title);\n\t\t\t\tif(tiddler.fields.text === text && tiddler.fields.component === self.componentName && tiddler.fields.modified && (!alertFields || tiddler.fields.modified < alertFields.modified)) {\n\t\t\t\t\t\talertFields = $tw.utils.extend({},tiddler.fields);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(alertFields) {\n\t\t\t\texistingCount = alertFields.count || 1;\n\t\t\t} else {\n\t\t\t\talertFields = {\n\t\t\t\t\ttitle: $tw.wiki.generateNewTitle(\"$:/temp/alerts/alert\",{prefix: \"\"}),\n\t\t\t\t\ttext: text,\n\t\t\t\t\ttags: [ALERT_TAG],\n\t\t\t\t\tcomponent: this.componentName\n\t\t\t\t};\n\t\t\t\texistingCount = 0;\n\t\t\t}\n\t\t\talertFields.modified = new Date();\n\t\t\tif(++existingCount > 1) {\n\t\t\t\talertFields.count = existingCount;\n\t\t\t} else {\n\t\t\t\talertFields.count = undefined;\n\t\t\t}\n\t\t\t$tw.wiki.addTiddler(new $tw.Tiddler(alertFields));\n\t\t\t// Log the alert as well\n\t\t\tthis.log.apply(this,Array.prototype.slice.call(arguments,0));\n\t\t} else {\n\t\t\t// Print an orange message to the console if not in the browser\n\t\t\tconsole.error(\"\\x1b[1;33m\" + text + \"\\x1b[0m\");\n\t\t}\t\t\n\t}\n};\n\nexports.Logger = Logger;\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/parsetree.js": {
"title": "$:/core/modules/utils/parsetree.js",
"text": "/*\\\ntitle: $:/core/modules/utils/parsetree.js\ntype: application/javascript\nmodule-type: utils\n\nParse tree utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.addAttributeToParseTreeNode = function(node,name,value) {\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[name] = {type: \"string\", value: value};\n};\n\nexports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {\n\tif(node.attributes && node.attributes[name] && node.attributes[name].value !== undefined) {\n\t\treturn node.attributes[name].value;\n\t}\n\treturn defaultValue;\n};\n\nexports.addClassToParseTreeNode = function(node,classString) {\n\tvar classes = [];\n\tnode.attributes = node.attributes || {};\n\tnode.attributes[\"class\"] = node.attributes[\"class\"] || {type: \"string\", value: \"\"};\n\tif(node.attributes[\"class\"].type === \"string\") {\n\t\tif(node.attributes[\"class\"].value !== \"\") {\n\t\t\tclasses = node.attributes[\"class\"].value.split(\" \");\n\t\t}\n\t\tif(classString !== \"\") {\n\t\t\t$tw.utils.pushTop(classes,classString.split(\" \"));\n\t\t}\n\t\tnode.attributes[\"class\"].value = classes.join(\" \");\n\t}\n};\n\nexports.addStyleToParseTreeNode = function(node,name,value) {\n\t\tnode.attributes = node.attributes || {};\n\t\tnode.attributes.style = node.attributes.style || {type: \"string\", value: \"\"};\n\t\tif(node.attributes.style.type === \"string\") {\n\t\t\tnode.attributes.style.value += name + \":\" + value + \";\";\n\t\t}\n};\n\nexports.findParseTreeNode = function(nodeArray,search) {\n\tfor(var t=0; t<nodeArray.length; t++) {\n\t\tif(nodeArray[t].type === search.type && nodeArray[t].tag === search.tag) {\n\t\t\treturn nodeArray[t];\n\t\t}\n\t}\n\treturn undefined;\n};\n\n/*\nHelper to get the text of a parse tree node or array of nodes\n*/\nexports.getParseTreeText = function getParseTreeText(tree) {\n\tvar output = [];\n\tif($tw.utils.isArray(tree)) {\n\t\t$tw.utils.each(tree,function(node) {\n\t\t\toutput.push(getParseTreeText(node));\n\t\t});\n\t} else {\n\t\tif(tree.type === \"text\") {\n\t\t\toutput.push(tree.text);\n\t\t}\n\t\tif(tree.children) {\n\t\t\treturn getParseTreeText(tree.children);\n\t\t}\n\t}\n\treturn output.join(\"\");\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/performance.js": {
"title": "$:/core/modules/utils/performance.js",
"text": "/*\\\ntitle: $:/core/modules/utils/performance.js\ntype: application/javascript\nmodule-type: global\n\nPerformance measurement.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nfunction Performance(enabled) {\n\tthis.enabled = !!enabled;\n\tthis.measures = {}; // Hashmap of current values of measurements\n\tthis.logger = new $tw.utils.Logger(\"performance\");\n}\n\n/*\nWrap performance reporting around a top level function\n*/\nPerformance.prototype.report = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tself.measures = {};\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments);\n\t\t\tself.logger.log(name + \": \" + $tw.utils.timer(startTime).toFixed(2) + \"ms\");\n\t\t\tfor(var m in self.measures) {\n\t\t\t\tself.logger.log(\"+\" + m + \": \" + self.measures[m].toFixed(2) + \"ms\");\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\n/*\nWrap performance measurements around a subfunction\n*/\nPerformance.prototype.measure = function(name,fn) {\n\tvar self = this;\n\tif(this.enabled) {\n\t\treturn function() {\n\t\t\tvar startTime = $tw.utils.timer(),\n\t\t\t\tresult = fn.apply(this,arguments),\n\t\t\t\tvalue = self.measures[name] || 0;\n\t\t\tself.measures[name] = value + $tw.utils.timer(startTime);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\treturn fn;\n\t}\n};\n\nexports.Performance = Performance;\n\n})();\n",
"type": "application/javascript",
"module-type": "global"
},
"$:/core/modules/utils/pluginmaker.js": {
"title": "$:/core/modules/utils/pluginmaker.js",
"text": "/*\\\ntitle: $:/core/modules/utils/pluginmaker.js\ntype: application/javascript\nmodule-type: utils\n\nA quick and dirty way to pack up plugins within the browser.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nRepack a plugin, and then delete any non-shadow payload tiddlers\n*/\nexports.repackPlugin = function(title,additionalTiddlers,excludeTiddlers) {\n\tadditionalTiddlers = additionalTiddlers || [];\n\texcludeTiddlers = excludeTiddlers || [];\n\t// Get the plugin tiddler\n\tvar pluginTiddler = $tw.wiki.getTiddler(title);\n\tif(!pluginTiddler) {\n\t\tthrow \"No such tiddler as \" + title;\n\t}\n\t// Extract the JSON\n\tvar jsonPluginTiddler;\n\ttry {\n\t\tjsonPluginTiddler = JSON.parse(pluginTiddler.fields.text);\n\t} catch(e) {\n\t\tthrow \"Cannot parse plugin tiddler \" + title + \"\\n\" + $tw.language.getString(\"Error/Caption\") + \": \" + e;\n\t}\n\t// Get the list of tiddlers\n\tvar tiddlers = Object.keys(jsonPluginTiddler.tiddlers);\n\t// Add the additional tiddlers\n\t$tw.utils.pushTop(tiddlers,additionalTiddlers);\n\t// Remove any excluded tiddlers\n\tfor(var t=tiddlers.length-1; t>=0; t--) {\n\t\tif(excludeTiddlers.indexOf(tiddlers[t]) !== -1) {\n\t\t\ttiddlers.splice(t,1);\n\t\t}\n\t}\n\t// Pack up the tiddlers into a block of JSON\n\tvar plugins = {};\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = $tw.wiki.getTiddler(title),\n\t\t\tfields = {};\n\t\t$tw.utils.each(tiddler.fields,function (value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\tplugins[title] = fields;\n\t});\n\t// Retrieve and bump the version number\n\tvar pluginVersion = $tw.utils.parseVersion(pluginTiddler.getFieldString(\"version\") || \"0.0.0\") || {\n\t\t\tmajor: \"0\",\n\t\t\tminor: \"0\",\n\t\t\tpatch: \"0\"\n\t\t};\n\tpluginVersion.patch++;\n\tvar version = pluginVersion.major + \".\" + pluginVersion.minor + \".\" + pluginVersion.patch;\n\tif(pluginVersion.prerelease) {\n\t\tversion += \"-\" + pluginVersion.prerelease;\n\t}\n\tif(pluginVersion.build) {\n\t\tversion += \"+\" + pluginVersion.build;\n\t}\n\t// Save the tiddler\n\t$tw.wiki.addTiddler(new $tw.Tiddler(pluginTiddler,{text: JSON.stringify({tiddlers: plugins},null,4), version: version}));\n\t// Delete any non-shadow constituent tiddlers\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tif($tw.wiki.tiddlerExists(title)) {\n\t\t\t$tw.wiki.deleteTiddler(title);\n\t\t}\n\t});\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\t// Return a heartwarming confirmation\n\treturn \"Plugin \" + title + \" successfully saved\";\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/transliterate.js": {
"title": "$:/core/modules/utils/transliterate.js",
"text": "/*\\\ntitle: $:/core/modules/utils/transliterate.js\ntype: application/javascript\nmodule-type: utils\n\nTransliteration static utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nTransliterate string to ASCII\n\n(Some pairs taken from http://semplicewebsites.com/removing-accents-javascript)\n*/\nexports.transliterationPairs = {\n\t\"Á\":\"A\",\n\t\"Ă\":\"A\",\n\t\"Ắ\":\"A\",\n\t\"Ặ\":\"A\",\n\t\"Ằ\":\"A\",\n\t\"Ẳ\":\"A\",\n\t\"Ẵ\":\"A\",\n\t\"Ǎ\":\"A\",\n\t\"Â\":\"A\",\n\t\"Ấ\":\"A\",\n\t\"Ậ\":\"A\",\n\t\"Ầ\":\"A\",\n\t\"Ẩ\":\"A\",\n\t\"Ẫ\":\"A\",\n\t\"Ä\":\"A\",\n\t\"Ǟ\":\"A\",\n\t\"Ȧ\":\"A\",\n\t\"Ǡ\":\"A\",\n\t\"Ạ\":\"A\",\n\t\"Ȁ\":\"A\",\n\t\"À\":\"A\",\n\t\"Ả\":\"A\",\n\t\"Ȃ\":\"A\",\n\t\"Ā\":\"A\",\n\t\"Ą\":\"A\",\n\t\"Å\":\"A\",\n\t\"Ǻ\":\"A\",\n\t\"Ḁ\":\"A\",\n\t\"Ⱥ\":\"A\",\n\t\"Ã\":\"A\",\n\t\"Ꜳ\":\"AA\",\n\t\"Æ\":\"AE\",\n\t\"Ǽ\":\"AE\",\n\t\"Ǣ\":\"AE\",\n\t\"Ꜵ\":\"AO\",\n\t\"Ꜷ\":\"AU\",\n\t\"Ꜹ\":\"AV\",\n\t\"Ꜻ\":\"AV\",\n\t\"Ꜽ\":\"AY\",\n\t\"Ḃ\":\"B\",\n\t\"Ḅ\":\"B\",\n\t\"Ɓ\":\"B\",\n\t\"Ḇ\":\"B\",\n\t\"Ƀ\":\"B\",\n\t\"Ƃ\":\"B\",\n\t\"Ć\":\"C\",\n\t\"Č\":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u\",\n\t\"ᵥ\":\"v\",\n\t\"ₓ\":\"x\",\n\t\"Ё\":\"YO\",\n\t\"Й\":\"I\",\n\t\"Ц\":\"TS\",\n\t\"У\":\"U\",\n\t\"К\":\"K\",\n\t\"Е\":\"E\",\n\t\"Н\":\"N\",\n\t\"Г\":\"G\",\n\t\"Ш\":\"SH\",\n\t\"Щ\":\"SCH\",\n\t\"З\":\"Z\",\n\t\"Х\":\"H\",\n\t\"Ъ\":\"'\",\n\t\"ё\":\"yo\",\n\t\"й\":\"i\",\n\t\"ц\":\"ts\",\n\t\"у\":\"u\",\n\t\"к\":\"k\",\n\t\"е\":\"e\",\n\t\"н\":\"n\",\n\t\"г\":\"g\",\n\t\"ш\":\"sh\",\n\t\"щ\":\"sch\",\n\t\"з\":\"z\",\n\t\"х\":\"h\",\n\t\"ъ\":\"'\",\n\t\"Ф\":\"F\",\n\t\"Ы\":\"I\",\n\t\"В\":\"V\",\n\t\"А\":\"a\",\n\t\"П\":\"P\",\n\t\"Р\":\"R\",\n\t\"О\":\"O\",\n\t\"Л\":\"L\",\n\t\"Д\":\"D\",\n\t\"Ж\":\"ZH\",\n\t\"Э\":\"E\",\n\t\"ф\":\"f\",\n\t\"ы\":\"i\",\n\t\"в\":\"v\",\n\t\"а\":\"a\",\n\t\"п\":\"p\",\n\t\"р\":\"r\",\n\t\"о\":\"o\",\n\t\"л\":\"l\",\n\t\"д\":\"d\",\n\t\"ж\":\"zh\",\n\t\"э\":\"e\",\n\t\"Я\":\"Ya\",\n\t\"Ч\":\"CH\",\n\t\"С\":\"S\",\n\t\"М\":\"M\",\n\t\"И\":\"I\",\n\t\"Т\":\"T\",\n\t\"Ь\":\"'\",\n\t\"Б\":\"B\",\n\t\"Ю\":\"YU\",\n\t\"я\":\"ya\",\n\t\"ч\":\"ch\",\n\t\"с\":\"s\",\n\t\"м\":\"m\",\n\t\"и\":\"i\",\n\t\"т\":\"t\",\n\t\"ь\":\"'\",\n\t\"б\":\"b\",\n\t\"ю\":\"yu\"\n};\n\nexports.transliterate = function(str) {\n\treturn str.replace(/[^A-Za-z0-9\\[\\] ]/g,function(ch) {\n\t\treturn exports.transliterationPairs[ch] || ch\n\t});\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/utils/utils.js": {
"title": "$:/core/modules/utils/utils.js",
"text": "/*\\\ntitle: $:/core/modules/utils/utils.js\ntype: application/javascript\nmodule-type: utils\n\nVarious static utility functions.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nDisplay a message, in colour if we're on a terminal\n*/\nexports.log = function(text,colour) {\n\tconsole.log($tw.node ? exports.terminalColour(colour) + text + exports.terminalColour() : text);\n};\n\nexports.terminalColour = function(colour) {\n\tif(!$tw.browser && $tw.node && process.stdout.isTTY) {\n\t\tif(colour) {\n\t\t\tvar code = exports.terminalColourLookup[colour];\n\t\t\tif(code) {\n\t\t\t\treturn \"\\x1b[\" + code + \"m\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\\x1b[0m\"; // Cancel colour\n\t\t}\n\t}\n\treturn \"\";\n};\n\nexports.terminalColourLookup = {\n\t\"black\": \"0;30\",\n\t\"red\": \"0;31\",\n\t\"green\": \"0;32\",\n\t\"brown/orange\": \"0;33\",\n\t\"blue\": \"0;34\",\n\t\"purple\": \"0;35\",\n\t\"cyan\": \"0;36\",\n\t\"light gray\": \"0;37\"\n};\n\n/*\nDisplay a warning, in colour if we're on a terminal\n*/\nexports.warning = function(text) {\n\texports.log(text,\"brown/orange\");\n};\n\n/*\nRepeatedly replaces a substring within a string. Like String.prototype.replace, but without any of the default special handling of $ sequences in the replace string\n*/\nexports.replaceString = function(text,search,replace) {\n\treturn text.replace(search,function() {\n\t\treturn replace;\n\t});\n};\n\n/*\nRepeats a string\n*/\nexports.repeat = function(str,count) {\n\tvar result = \"\";\n\tfor(var t=0;t<count;t++) {\n\t\tresult += str;\n\t}\n\treturn result;\n};\n\n/*\nTrim whitespace from the start and end of a string\nThanks to Steven Levithan, http://blog.stevenlevithan.com/archives/faster-trim-javascript\n*/\nexports.trim = function(str) {\n\tif(typeof str === \"string\") {\n\t\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t} else {\n\t\treturn str;\n\t}\n};\n\n/*\nFind the line break preceding a given position in a string\nReturns position immediately after that line break, or the start of the string\n*/\nexports.findPrecedingLineBreak = function(text,pos) {\n\tvar result = text.lastIndexOf(\"\\n\",pos - 1);\n\tif(result === -1) {\n\t\tresult = 0;\n\t} else {\n\t\tresult++;\n\t\tif(text.charAt(result) === \"\\r\") {\n\t\t\tresult++;\n\t\t}\n\t}\n\treturn result;\n};\n\n/*\nFind the line break following a given position in a string\n*/\nexports.findFollowingLineBreak = function(text,pos) {\n\t// Cut to just past the following line break, or to the end of the text\n\tvar result = text.indexOf(\"\\n\",pos);\n\tif(result === -1) {\n\t\tresult = text.length;\n\t} else {\n\t\tif(text.charAt(result) === \"\\r\") {\n\t\t\tresult++;\n\t\t}\n\t}\n\treturn result;\n};\n\n/*\nReturn the number of keys in an object\n*/\nexports.count = function(object) {\n\treturn Object.keys(object || {}).length;\n};\n\n/*\nCheck if an array is equal by value and by reference.\n*/\nexports.isArrayEqual = function(array1,array2) {\n\tif(array1 === array2) {\n\t\treturn true;\n\t}\n\tarray1 = array1 || [];\n\tarray2 = array2 || [];\n\tif(array1.length !== array2.length) {\n\t\treturn false;\n\t}\n\treturn array1.every(function(value,index) {\n\t\treturn value === array2[index];\n\t});\n};\n\n/*\nPush entries onto an array, removing them first if they already exist in the array\n\tarray: array to modify (assumed to be free of duplicates)\n\tvalue: a single value to push or an array of values to push\n*/\nexports.pushTop = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\t// Remove any array entries that are duplicated in the new values\n\t\tif(value.length !== 0) {\n\t\t\tif(array.length !== 0) {\n\t\t\t\tif(value.length < array.length) {\n\t\t\t\t\tfor(t=0; t<value.length; t++) {\n\t\t\t\t\t\tp = array.indexOf(value[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(p,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor(t=array.length-1; t>=0; t--) {\n\t\t\t\t\t\tp = value.indexOf(array[t]);\n\t\t\t\t\t\tif(p !== -1) {\n\t\t\t\t\t\t\tarray.splice(t,1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Push the values on top of the main array\n\t\t\tarray.push.apply(array,value);\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t\tarray.push(value);\n\t}\n\treturn array;\n};\n\n/*\nRemove entries from an array\n\tarray: array to modify\n\tvalue: a single value to remove, or an array of values to remove\n*/\nexports.removeArrayEntries = function(array,value) {\n\tvar t,p;\n\tif($tw.utils.isArray(value)) {\n\t\tfor(t=0; t<value.length; t++) {\n\t\t\tp = array.indexOf(value[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tarray.splice(p,1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tp = array.indexOf(value);\n\t\tif(p !== -1) {\n\t\t\tarray.splice(p,1);\n\t\t}\n\t}\n};\n\n/*\nCheck whether any members of a hashmap are present in another hashmap\n*/\nexports.checkDependencies = function(dependencies,changes) {\n\tvar hit = false;\n\t$tw.utils.each(changes,function(change,title) {\n\t\tif($tw.utils.hop(dependencies,title)) {\n\t\t\thit = true;\n\t\t}\n\t});\n\treturn hit;\n};\n\nexports.extend = function(object /* [, src] */) {\n\t$tw.utils.each(Array.prototype.slice.call(arguments, 1), function(source) {\n\t\tif(source) {\n\t\t\tfor(var property in source) {\n\t\t\t\tobject[property] = source[property];\n\t\t\t}\n\t\t}\n\t});\n\treturn object;\n};\n\nexports.deepCopy = function(object) {\n\tvar result,t;\n\tif($tw.utils.isArray(object)) {\n\t\t// Copy arrays\n\t\tresult = object.slice(0);\n\t} else if(typeof object === \"object\") {\n\t\tresult = {};\n\t\tfor(t in object) {\n\t\t\tif(object[t] !== undefined) {\n\t\t\t\tresult[t] = $tw.utils.deepCopy(object[t]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tresult = object;\n\t}\n\treturn result;\n};\n\nexports.extendDeepCopy = function(object,extendedProperties) {\n\tvar result = $tw.utils.deepCopy(object),t;\n\tfor(t in extendedProperties) {\n\t\tif(extendedProperties[t] !== undefined) {\n\t\t\tresult[t] = $tw.utils.deepCopy(extendedProperties[t]);\n\t\t}\n\t}\n\treturn result;\n};\n\nexports.deepFreeze = function deepFreeze(object) {\n\tvar property, key;\n\tif(object) {\n\t\tObject.freeze(object);\n\t\tfor(key in object) {\n\t\t\tproperty = object[key];\n\t\t\tif($tw.utils.hop(object,key) && (typeof property === \"object\") && !Object.isFrozen(property)) {\n\t\t\t\tdeepFreeze(property);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexports.slowInSlowOut = function(t) {\n\treturn (1 - ((Math.cos(t * Math.PI) + 1) / 2));\n};\n\nexports.formatDateString = function(date,template) {\n\tvar result = \"\",\n\t\tt = template,\n\t\tmatches = [\n\t\t\t[/^0hh12/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getHours12(date));\n\t\t\t}],\n\t\t\t[/^wYYYY/, function() {\n\t\t\t\treturn $tw.utils.getYearForWeekNo(date);\n\t\t\t}],\n\t\t\t[/^hh12/, function() {\n\t\t\t\treturn $tw.utils.getHours12(date);\n\t\t\t}],\n\t\t\t[/^DDth/, function() {\n\t\t\t\treturn date.getDate() + $tw.utils.getDaySuffix(date);\n\t\t\t}],\n\t\t\t[/^YYYY/, function() {\n\t\t\t\treturn date.getFullYear();\n\t\t\t}],\n\t\t\t[/^0hh/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getHours());\n\t\t\t}],\n\t\t\t[/^0mm/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getMinutes());\n\t\t\t}],\n\t\t\t[/^0ss/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getSeconds());\n\t\t\t}],\n\t\t\t[/^0XXX/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getMilliseconds());\n\t\t\t}],\n\t\t\t[/^0DD/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getDate());\n\t\t\t}],\n\t\t\t[/^0MM/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getMonth()+1);\n\t\t\t}],\n\t\t\t[/^0WW/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getWeek(date));\n\t\t\t}],\n\t\t\t[/^ddd/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Day/\" + date.getDay());\n\t\t\t}],\n\t\t\t[/^mmm/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Short/Month/\" + (date.getMonth() + 1));\n\t\t\t}],\n\t\t\t[/^DDD/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Day/\" + date.getDay());\n\t\t\t}],\n\t\t\t[/^MMM/, function() {\n\t\t\t\treturn $tw.language.getString(\"Date/Long/Month/\" + (date.getMonth() + 1));\n\t\t\t}],\n\t\t\t[/^TZD/, function() {\n\t\t\t\tvar tz = date.getTimezoneOffset(),\n\t\t\t\tatz = Math.abs(tz);\n\t\t\t\treturn (tz < 0 ? '+' : '-') + $tw.utils.pad(Math.floor(atz / 60)) + ':' + $tw.utils.pad(atz % 60);\n\t\t\t}],\n\t\t\t[/^wYY/, function() {\n\t\t\t\treturn $tw.utils.pad($tw.utils.getYearForWeekNo(date) - 2000);\n\t\t\t}],\n\t\t\t[/^[ap]m/, function() {\n\t\t\t\treturn $tw.utils.getAmPm(date).toLowerCase();\n\t\t\t}],\n\t\t\t[/^hh/, function() {\n\t\t\t\treturn date.getHours();\n\t\t\t}],\n\t\t\t[/^mm/, function() {\n\t\t\t\treturn date.getMinutes();\n\t\t\t}],\n\t\t\t[/^ss/, function() {\n\t\t\t\treturn date.getSeconds();\n\t\t\t}],\n\t\t\t[/^XXX/, function() {\n\t\t\t\treturn date.getMilliseconds();\n\t\t\t}],\n\t\t\t[/^[AP]M/, function() {\n\t\t\t\treturn $tw.utils.getAmPm(date).toUpperCase();\n\t\t\t}],\n\t\t\t[/^DD/, function() {\n\t\t\t\treturn date.getDate();\n\t\t\t}],\n\t\t\t[/^MM/, function() {\n\t\t\t\treturn date.getMonth() + 1;\n\t\t\t}],\n\t\t\t[/^WW/, function() {\n\t\t\t\treturn $tw.utils.getWeek(date);\n\t\t\t}],\n\t\t\t[/^YY/, function() {\n\t\t\t\treturn $tw.utils.pad(date.getFullYear() - 2000);\n\t\t\t}]\n\t\t];\n\t// If the user wants everything in UTC, shift the datestamp\n\t// Optimize for format string that essentially means \n\t// 'return raw UTC (tiddlywiki style) date string.'\n\tif(t.indexOf(\"[UTC]\") == 0 ) {\n\t\tif(t == \"[UTC]YYYY0MM0DD0hh0mm0ssXXX\") \n\t\t\treturn $tw.utils.stringifyDate(new Date());\n\t\tvar offset = date.getTimezoneOffset() ; // in minutes\n\t\tdate = new Date(date.getTime()+offset*60*1000) ;\n\t\tt = t.substr(5) ;\n\t} \n\twhile(t.length){\n\t\tvar matchString = \"\";\n\t\t$tw.utils.each(matches, function(m) {\n\t\t\tvar match = m[0].exec(t);\n\t\t\tif(match) {\n\t\t\t\tmatchString = m[1].call();\n\t\t\t\tt = t.substr(match[0].length);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif(matchString) {\n\t\t\tresult += matchString;\n\t\t} else {\n\t\t\tresult += t.charAt(0);\n\t\t\tt = t.substr(1);\n\t\t}\n\t}\n\tresult = result.replace(/\\\\(.)/g,\"$1\");\n\treturn result;\n};\n\nexports.getAmPm = function(date) {\n\treturn $tw.language.getString(\"Date/Period/\" + (date.getHours() >= 12 ? \"pm\" : \"am\"));\n};\n\nexports.getDaySuffix = function(date) {\n\treturn $tw.language.getString(\"Date/DaySuffix/\" + date.getDate());\n};\n\nexports.getWeek = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) {\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\n\t}\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week to calculate weekNo\n\tvar x = new Date(dt.getFullYear(),0,1);\n\tvar n = Math.floor((dt.getTime() - x.getTime()) / 86400000);\n\treturn Math.floor(n / 7) + 1;\n};\n\nexports.getYearForWeekNo = function(date) {\n\tvar dt = new Date(date.getTime());\n\tvar d = dt.getDay();\n\tif(d === 0) {\n\t\td = 7; // JavaScript Sun=0, ISO Sun=7\n\t}\n\tdt.setTime(dt.getTime() + (4 - d) * 86400000);// shift day to Thurs of same week\n\treturn dt.getFullYear();\n};\n\nexports.getHours12 = function(date) {\n\tvar h = date.getHours();\n\treturn h > 12 ? h-12 : ( h > 0 ? h : 12 );\n};\n\n/*\nConvert a date delta in milliseconds into a string representation of \"23 seconds ago\", \"27 minutes ago\" etc.\n\tdelta: delta in milliseconds\nReturns an object with these members:\n\tdescription: string describing the delta period\n\tupdatePeriod: time in millisecond until the string will be inaccurate\n*/\nexports.getRelativeDate = function(delta) {\n\tvar futurep = false;\n\tif(delta < 0) {\n\t\tdelta = -1 * delta;\n\t\tfuturep = true;\n\t}\n\tvar units = [\n\t\t{name: \"Years\", duration: 365 * 24 * 60 * 60 * 1000},\n\t\t{name: \"Months\", duration: (365/12) * 24 * 60 * 60 * 1000},\n\t\t{name: \"Days\", duration: 24 * 60 * 60 * 1000},\n\t\t{name: \"Hours\", duration: 60 * 60 * 1000},\n\t\t{name: \"Minutes\", duration: 60 * 1000},\n\t\t{name: \"Seconds\", duration: 1000}\n\t];\n\tfor(var t=0; t<units.length; t++) {\n\t\tvar result = Math.floor(delta / units[t].duration);\n\t\tif(result >= 2) {\n\t\t\treturn {\n\t\t\t\tdelta: delta,\n\t\t\t\tdescription: $tw.language.getString(\n\t\t\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/\" + units[t].name,\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{period: result.toString()}\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t\tupdatePeriod: units[t].duration\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\tdelta: delta,\n\t\tdescription: $tw.language.getString(\n\t\t\t\"RelativeDate/\" + (futurep ? \"Future\" : \"Past\") + \"/Second\",\n\t\t\t{variables:\n\t\t\t\t{period: \"1\"}\n\t\t\t}\n\t\t),\n\t\tupdatePeriod: 1000\n\t};\n};\n\n// Convert & to \"&\", < to \"<\", > to \">\", \" to \""\"\nexports.htmlEncode = function(s) {\n\tif(s) {\n\t\treturn s.toString().replace(/&/mg,\"&\").replace(/</mg,\"<\").replace(/>/mg,\">\").replace(/\\\"/mg,\""\");\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\n// Converts all HTML entities to their character equivalents\nexports.entityDecode = function(s) {\n\tvar converter = String.fromCodePoint || String.fromCharCode,\n\t\te = s.substr(1,s.length-2); // Strip the & and the ;\n\tif(e.charAt(0) === \"#\") {\n\t\tif(e.charAt(1) === \"x\" || e.charAt(1) === \"X\") {\n\t\t\treturn converter(parseInt(e.substr(2),16));\t\n\t\t} else {\n\t\t\treturn converter(parseInt(e.substr(1),10));\n\t\t}\n\t} else {\n\t\tvar c = $tw.config.htmlEntities[e];\n\t\tif(c) {\n\t\t\treturn converter(c);\n\t\t} else {\n\t\t\treturn s; // Couldn't convert it as an entity, just return it raw\n\t\t}\n\t}\n};\n\nexports.unescapeLineBreaks = function(s) {\n\treturn s.replace(/\\\\n/mg,\"\\n\").replace(/\\\\b/mg,\" \").replace(/\\\\s/mg,\"\\\\\").replace(/\\r/mg,\"\");\n};\n\n/*\n * Returns an escape sequence for given character. Uses \\x for characters <=\n * 0xFF to save space, \\u for the rest.\n *\n * The code needs to be in sync with th code template in the compilation\n * function for \"action\" nodes.\n */\n// Copied from peg.js, thanks to David Majda\nexports.escape = function(ch) {\n\tvar charCode = ch.charCodeAt(0);\n\tif(charCode <= 0xFF) {\n\t\treturn '\\\\x' + $tw.utils.pad(charCode.toString(16).toUpperCase());\n\t} else {\n\t\treturn '\\\\u' + $tw.utils.pad(charCode.toString(16).toUpperCase(),4);\n\t}\n};\n\n// Turns a string into a legal JavaScript string\n// Copied from peg.js, thanks to David Majda\nexports.stringify = function(s) {\n\t/*\n\t* ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a string\n\t* literal except for the closing quote character, backslash, carriage return,\n\t* line separator, paragraph separator, and line feed. Any character may\n\t* appear in the form of an escape sequence.\n\t*\n\t* For portability, we also escape all non-ASCII characters.\n\t*/\n\treturn (s || \"\")\n\t\t.replace(/\\\\/g, '\\\\\\\\') // backslash\n\t\t.replace(/\"/g, '\\\\\"') // double quote character\n\t\t.replace(/'/g, \"\\\\'\") // single quote character\n\t\t.replace(/\\r/g, '\\\\r') // carriage return\n\t\t.replace(/\\n/g, '\\\\n') // line feed\n\t\t.replace(/[\\x00-\\x1f\\x80-\\uFFFF]/g, exports.escape); // non-ASCII characters\n};\n\n// Turns a string into a legal JSON string\n// Derived from peg.js, thanks to David Majda\nexports.jsonStringify = function(s) {\n\t// See http://www.json.org/\n\treturn (s || \"\")\n\t\t.replace(/\\\\/g, '\\\\\\\\') // backslash\n\t\t.replace(/\"/g, '\\\\\"') // double quote character\n\t\t.replace(/\\r/g, '\\\\r') // carriage return\n\t\t.replace(/\\n/g, '\\\\n') // line feed\n\t\t.replace(/\\x08/g, '\\\\b') // backspace\n\t\t.replace(/\\x0c/g, '\\\\f') // formfeed\n\t\t.replace(/\\t/g, '\\\\t') // tab\n\t\t.replace(/[\\x00-\\x1f\\x80-\\uFFFF]/g,function(s) {\n\t\t\treturn '\\\\u' + $tw.utils.pad(s.charCodeAt(0).toString(16).toUpperCase(),4);\n\t\t}); // non-ASCII characters\n};\n\n/*\nEscape the RegExp special characters with a preceding backslash\n*/\nexports.escapeRegExp = function(s) {\n return s.replace(/[\\-\\/\\\\\\^\\$\\*\\+\\?\\.\\(\\)\\|\\[\\]\\{\\}]/g, '\\\\$&');\n};\n\n// Checks whether a link target is external, i.e. not a tiddler title\nexports.isLinkExternal = function(to) {\n\tvar externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\\s<>{}\\[\\]`|\"\\\\^]+(?:\\/|\\b)/i;\n\treturn externalRegExp.test(to);\n};\n\nexports.nextTick = function(fn) {\n/*global window: false */\n\tif(typeof process === \"undefined\") {\n\t\t// Apparently it would be faster to use postMessage - http://dbaron.org/log/20100309-faster-timeouts\n\t\twindow.setTimeout(fn,4);\n\t} else {\n\t\tprocess.nextTick(fn);\n\t}\n};\n\n/*\nConvert a hyphenated CSS property name into a camel case one\n*/\nexports.unHyphenateCss = function(propName) {\n\treturn propName.replace(/-([a-z])/gi, function(match0,match1) {\n\t\treturn match1.toUpperCase();\n\t});\n};\n\n/*\nConvert a camelcase CSS property name into a dashed one (\"backgroundColor\" --> \"background-color\")\n*/\nexports.hyphenateCss = function(propName) {\n\treturn propName.replace(/([A-Z])/g, function(match0,match1) {\n\t\treturn \"-\" + match1.toLowerCase();\n\t});\n};\n\n/*\nParse a text reference of one of these forms:\n* title\n* !!field\n* title!!field\n* title##index\n* etc\nReturns an object with the following fields, all optional:\n* title: tiddler title\n* field: tiddler field name\n* index: JSON property index\n*/\nexports.parseTextReference = function(textRef) {\n\t// Separate out the title, field name and/or JSON indices\n\tvar reTextRef = /(?:(.*?)!!(.+))|(?:(.*?)##(.+))|(.*)/mg,\n\t\tmatch = reTextRef.exec(textRef),\n\t\tresult = {};\n\tif(match && reTextRef.lastIndex === textRef.length) {\n\t\t// Return the parts\n\t\tif(match[1]) {\n\t\t\tresult.title = match[1];\n\t\t}\n\t\tif(match[2]) {\n\t\t\tresult.field = match[2];\n\t\t}\n\t\tif(match[3]) {\n\t\t\tresult.title = match[3];\n\t\t}\n\t\tif(match[4]) {\n\t\t\tresult.index = match[4];\n\t\t}\n\t\tif(match[5]) {\n\t\t\tresult.title = match[5];\n\t\t}\n\t} else {\n\t\t// If we couldn't parse it\n\t\tresult.title = textRef\n\t}\n\treturn result;\n};\n\n/*\nChecks whether a string is a valid fieldname\n*/\nexports.isValidFieldName = function(name) {\n\tif(!name || typeof name !== \"string\") {\n\t\treturn false;\n\t}\n\tname = name.toLowerCase().trim();\n\tvar fieldValidatorRegEx = /^[a-z0-9\\-\\._]+$/mg;\n\treturn fieldValidatorRegEx.test(name);\n};\n\n/*\nExtract the version number from the meta tag or from the boot file\n*/\n\n// Browser version\nexports.extractVersionInfo = function() {\n\tif($tw.packageInfo) {\n\t\treturn $tw.packageInfo.version;\n\t} else {\n\t\tvar metatags = document.getElementsByTagName(\"meta\");\n\t\tfor(var t=0; t<metatags.length; t++) {\n\t\t\tvar m = metatags[t];\n\t\t\tif(m.name === \"tiddlywiki-version\") {\n\t\t\t\treturn m.content;\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nGet the animation duration in ms\n*/\nexports.getAnimationDuration = function() {\n\treturn parseInt($tw.wiki.getTiddlerText(\"$:/config/AnimationDuration\",\"400\"),10);\n};\n\n/*\nHash a string to a number\nDerived from http://stackoverflow.com/a/15710692\n*/\nexports.hashString = function(str) {\n\treturn str.split(\"\").reduce(function(a,b) {\n\t\ta = ((a << 5) - a) + b.charCodeAt(0);\n\t\treturn a & a;\n\t},0);\n};\n\n/*\nDecode a base64 string\n*/\nexports.base64Decode = function(string64) {\n\tif($tw.browser) {\n\t\t// TODO\n\t\tthrow \"$tw.utils.base64Decode() doesn't work in the browser\";\n\t} else {\n\t\treturn (new Buffer(string64,\"base64\")).toString();\n\t}\n};\n\n/*\nConvert a hashmap into a tiddler dictionary format sequence of name:value pairs\n*/\nexports.makeTiddlerDictionary = function(data) {\n\tvar output = [];\n\tfor(var name in data) {\n\t\toutput.push(name + \": \" + data[name]);\n\t}\n\treturn output.join(\"\\n\");\n};\n\n/*\nHigh resolution microsecond timer for profiling\n*/\nexports.timer = function(base) {\n\tvar m;\n\tif($tw.node) {\n\t\tvar r = process.hrtime();\t\t\n\t\tm = r[0] * 1e3 + (r[1] / 1e6);\n\t} else if(window.performance) {\n\t\tm = performance.now();\n\t} else {\n\t\tm = Date.now();\n\t}\n\tif(typeof base !== \"undefined\") {\n\t\tm = m - base;\n\t}\n\treturn m;\n};\n\n/*\nConvert text and content type to a data URI\n*/\nexports.makeDataUri = function(text,type) {\n\ttype = type || \"text/vnd.tiddlywiki\";\n\tvar typeInfo = $tw.config.contentTypeInfo[type] || $tw.config.contentTypeInfo[\"text/plain\"],\n\t\tisBase64 = typeInfo.encoding === \"base64\",\n\t\tparts = [];\n\tparts.push(\"data:\");\n\tparts.push(type);\n\tparts.push(isBase64 ? \";base64\" : \"\");\n\tparts.push(\",\");\n\tparts.push(isBase64 ? text : encodeURIComponent(text));\n\treturn parts.join(\"\");\n};\n\n/*\nUseful for finding out the fully escaped CSS selector equivalent to a given tag. For example:\n\n$tw.utils.tagToCssSelector(\"$:/tags/Stylesheet\") --> tc-tagged-\\%24\\%3A\\%2Ftags\\%2FStylesheet\n*/\nexports.tagToCssSelector = function(tagName) {\n\treturn \"tc-tagged-\" + encodeURIComponent(tagName).replace(/[!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^`{\\|}~,]/mg,function(c) {\n\t\treturn \"\\\\\" + c;\n\t});\n};\n\n/*\nIE does not have sign function\n*/\nexports.sign = Math.sign || function(x) {\n\tx = +x; // convert to a number\n\tif (x === 0 || isNaN(x)) {\n\t\treturn x;\n\t}\n\treturn x > 0 ? 1 : -1;\n};\n\n/*\nIE does not have an endsWith function\n*/\nexports.strEndsWith = function(str,ending,position) {\n\tif(str.endsWith) {\n\t\treturn str.endsWith(ending,position);\n\t} else {\n\t\tif (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > str.length) {\n\t\t\tposition = str.length;\n\t\t}\n\t\tposition -= ending.length;\n\t\tvar lastIndex = str.indexOf(ending, position);\n\t\treturn lastIndex !== -1 && lastIndex === position;\n\t}\n};\n\n})();\n",
"type": "application/javascript",
"module-type": "utils"
},
"$:/core/modules/widgets/action-createtiddler.js": {
"title": "$:/core/modules/widgets/action-createtiddler.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-createtiddler.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to create a new tiddler with a unique name and specified fields.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CreateTiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCreateTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCreateTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nCreateTiddlerWidget.prototype.execute = function() {\n\tthis.actionBaseTitle = this.getAttribute(\"$basetitle\");\n\tthis.actionSaveTitle = this.getAttribute(\"$savetitle\");\n\tthis.actionTimestamp = this.getAttribute(\"$timestamp\",\"yes\") === \"yes\";\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nCreateTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif($tw.utils.count(changedAttributes) > 0) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nCreateTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar title = this.wiki.generateNewTitle(this.actionBaseTitle),\n\t\tfields = {},\n\t\tcreationFields,\n\t\tmodificationFields;\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tfields[name] = attribute;\n\t\t}\n\t});\n\tif(this.actionTimestamp) {\n\t\tcreationFields = this.wiki.getCreationFields();\n\t\tmodificationFields = this.wiki.getModificationFields();\n\t}\n\tvar tiddler = this.wiki.addTiddler(new $tw.Tiddler(creationFields,fields,modificationFields,{title: title}));\n\tif(this.actionSaveTitle) {\n\t\tthis.wiki.setTextReference(this.actionSaveTitle,title,this.getVariable(\"currentTiddler\"));\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-createtiddler\"] = CreateTiddlerWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-deletefield.js": {
"title": "$:/core/modules/widgets/action-deletefield.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-deletefield.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to delete fields of a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DeleteFieldWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDeleteFieldWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDeleteFieldWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nDeleteFieldWidget.prototype.execute = function() {\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.actionField = this.getAttribute(\"$field\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nDeleteFieldWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$tiddler\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nDeleteFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar self = this,\n\t\ttiddler = this.wiki.getTiddler(self.actionTiddler),\n\t\tremoveFields = {},\n\t\thasChanged = false;\n\tif(this.actionField) {\n\t\tremoveFields[this.actionField] = undefined;\n\t\tif(this.actionField in tiddler.fields) {\n\t\t\thasChanged = true;\n\t\t}\n\t}\n\tif(tiddler) {\n\t\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\t\tif(name.charAt(0) !== \"$\" && name !== \"title\") {\n\t\t\t\tremoveFields[name] = undefined;\n\t\t\t\thasChanged = true;\n\t\t\t}\n\t\t});\n\t\tif(hasChanged) {\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,removeFields,this.wiki.getModificationFields()));\t\t\t\n\t\t}\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-deletefield\"] = DeleteFieldWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-deletetiddler.js": {
"title": "$:/core/modules/widgets/action-deletetiddler.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-deletetiddler.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to delete a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DeleteTiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDeleteTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDeleteTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nDeleteTiddlerWidget.prototype.execute = function() {\n\tthis.actionFilter = this.getAttribute(\"$filter\");\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nDeleteTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$filter\"] || changedAttributes[\"$tiddler\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nDeleteTiddlerWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar tiddlers = [];\n\tif(this.actionFilter) {\n\t\ttiddlers = this.wiki.filterTiddlers(this.actionFilter,this);\n\t}\n\tif(this.actionTiddler) {\n\t\ttiddlers.push(this.actionTiddler);\n\t}\n\tfor(var t=0; t<tiddlers.length; t++) {\n\t\tthis.wiki.deleteTiddler(tiddlers[t]);\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-deletetiddler\"] = DeleteTiddlerWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-listops.js": {
"title": "$:/core/modules/widgets/action-listops.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-listops.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to apply list operations to any tiddler field (defaults to the 'list' field of the current tiddler)\n\n\\*/\n(function() {\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\nvar ActionListopsWidget = function(parseTreeNode, options) {\n\tthis.initialise(parseTreeNode, options);\n};\n/**\n * Inherit from the base widget class\n */\nActionListopsWidget.prototype = new Widget();\n/**\n * Render this widget into the DOM\n */\nActionListopsWidget.prototype.render = function(parent, nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n/**\n * Compute the internal state of the widget\n */\nActionListopsWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.target = this.getAttribute(\"$tiddler\", this.getVariable(\n\t\t\"currentTiddler\"));\n\tthis.filter = this.getAttribute(\"$filter\");\n\tthis.subfilter = this.getAttribute(\"$subfilter\");\n\tthis.listField = this.getAttribute(\"$field\", \"list\");\n\tthis.listIndex = this.getAttribute(\"$index\");\n\tthis.filtertags = this.getAttribute(\"$tags\");\n};\n/**\n * \tRefresh the widget by ensuring our attributes are up to date\n */\nActionListopsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.$tiddler || changedAttributes.$filter ||\n\t\tchangedAttributes.$subfilter || changedAttributes.$field ||\n\t\tchangedAttributes.$index || changedAttributes.$tags) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n/**\n * \tInvoke the action associated with this widget\n */\nActionListopsWidget.prototype.invokeAction = function(triggeringWidget,\n\tevent) {\n\t//Apply the specified filters to the lists\n\tvar field = this.listField,\n\t\tindex,\n\t\ttype = \"!!\",\n\t\tlist = this.listField;\n\tif(this.listIndex) {\n\t\tfield = undefined;\n\t\tindex = this.listIndex;\n\t\ttype = \"##\";\n\t\tlist = this.listIndex;\n\t}\n\tif(this.filter) {\n\t\tthis.wiki.setText(this.target, field, index, $tw.utils.stringifyList(\n\t\t\tthis.wiki\n\t\t\t.filterTiddlers(this.filter, this)));\n\t}\n\tif(this.subfilter) {\n\t\tvar subfilter = \"[list[\" + this.target + type + list + \"]] \" + this.subfilter;\n\t\tthis.wiki.setText(this.target, field, index, $tw.utils.stringifyList(\n\t\t\tthis.wiki\n\t\t\t.filterTiddlers(subfilter, this)));\n\t}\n\tif(this.filtertags) {\n\t\tvar tiddler = this.wiki.getTiddler(this.target),\n\t\t\toldtags = tiddler ? (tiddler.fields.tags || []).slice(0) : [],\n\t\t\ttagfilter = \"[list[\" + this.target + \"!!tags]] \" + this.filtertags,\n\t\t\tnewtags = this.wiki.filterTiddlers(tagfilter,this);\n\t\tif($tw.utils.stringifyList(oldtags.sort()) !== $tw.utils.stringifyList(newtags.sort())) {\n\t\t\tthis.wiki.setText(this.target,\"tags\",undefined,$tw.utils.stringifyList(newtags));\t\t\t\n\t\t}\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"action-listops\"] = ActionListopsWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-navigate.js": {
"title": "$:/core/modules/widgets/action-navigate.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-navigate.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to navigate to a tiddler\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar NavigateWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nNavigateWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nNavigateWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nNavigateWidget.prototype.execute = function() {\n\tthis.actionTo = this.getAttribute(\"$to\");\n\tthis.actionScroll = this.getAttribute(\"$scroll\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nNavigateWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$to\"] || changedAttributes[\"$scroll\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nNavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar bounds = triggeringWidget && triggeringWidget.getBoundingClientRect && triggeringWidget.getBoundingClientRect(),\n\t\tsuppressNavigation = event.metaKey || event.ctrlKey || (event.button === 1);\n\tif(this.actionScroll === \"yes\") {\n\t\tsuppressNavigation = false;\n\t} else if(this.actionScroll === \"no\") {\n\t\tsuppressNavigation = true;\n\t}\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.actionTo === undefined ? this.getVariable(\"currentTiddler\") : this.actionTo,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: triggeringWidget,\n\t\tnavigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: suppressNavigation\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-navigate\"] = NavigateWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-sendmessage.js": {
"title": "$:/core/modules/widgets/action-sendmessage.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-sendmessage.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to send a message\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SendMessageWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSendMessageWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSendMessageWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nSendMessageWidget.prototype.execute = function() {\n\tthis.actionMessage = this.getAttribute(\"$message\");\n\tthis.actionParam = this.getAttribute(\"$param\");\n\tthis.actionName = this.getAttribute(\"$name\");\n\tthis.actionValue = this.getAttribute(\"$value\",\"\");\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nSendMessageWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(Object.keys(changedAttributes).length) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nSendMessageWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\t// Get the string parameter\n\tvar param = this.actionParam;\n\t// Assemble the attributes as a hashmap\n\tvar paramObject = Object.create(null);\n\tvar count = 0;\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tparamObject[name] = attribute;\n\t\t\tcount++;\n\t\t}\n\t});\n\t// Add name/value pair if present\n\tif(this.actionName) {\n\t\tparamObject[this.actionName] = this.actionValue;\n\t}\n\t// Dispatch the message\n\tthis.dispatchEvent({\n\t\ttype: this.actionMessage,\n\t\tparam: param,\n\t\tparamObject: paramObject,\n\t\ttiddlerTitle: this.getVariable(\"currentTiddler\"),\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tevent: event\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-sendmessage\"] = SendMessageWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/action-setfield.js": {
"title": "$:/core/modules/widgets/action-setfield.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/action-setfield.js\ntype: application/javascript\nmodule-type: widget\n\nAction widget to set a single field or index on a tiddler.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SetFieldWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSetFieldWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSetFieldWidget.prototype.render = function(parent,nextSibling) {\n\tthis.computeAttributes();\n\tthis.execute();\n};\n\n/*\nCompute the internal state of the widget\n*/\nSetFieldWidget.prototype.execute = function() {\n\tthis.actionTiddler = this.getAttribute(\"$tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.actionField = this.getAttribute(\"$field\");\n\tthis.actionIndex = this.getAttribute(\"$index\");\n\tthis.actionValue = this.getAttribute(\"$value\");\n\tthis.actionTimestamp = this.getAttribute(\"$timestamp\",\"yes\") === \"yes\";\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nSetFieldWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"$tiddler\"] || changedAttributes[\"$field\"] || changedAttributes[\"$index\"] || changedAttributes[\"$value\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nInvoke the action associated with this widget\n*/\nSetFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\n\tvar self = this,\n\t\toptions = {};\n\toptions.suppressTimestamp = !this.actionTimestamp;\n\tif((typeof this.actionField == \"string\") || (typeof this.actionIndex == \"string\") || (typeof this.actionValue == \"string\")) {\n\t\tthis.wiki.setText(this.actionTiddler,this.actionField,this.actionIndex,this.actionValue,options);\n\t}\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tself.wiki.setText(self.actionTiddler,name,undefined,attribute,options);\n\t\t}\n\t});\n\treturn true; // Action was invoked\n};\n\nexports[\"action-setfield\"] = SetFieldWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/browse.js": {
"title": "$:/core/modules/widgets/browse.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/browse.js\ntype: application/javascript\nmodule-type: widget\n\nBrowse widget for browsing for files to import\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar BrowseWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nBrowseWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nBrowseWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\"input\");\n\tdomNode.setAttribute(\"type\",\"file\");\n\tif(this.browseMultiple) {\n\t\tdomNode.setAttribute(\"multiple\",\"multiple\");\n\t}\n\tif(this.tooltip) {\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\n\t}\n\t// Nw.js supports \"nwsaveas\" to force a \"save as\" dialogue that allows a new or existing file to be selected\n\tif(this.nwsaveas) {\n\t\tdomNode.setAttribute(\"nwsaveas\",this.nwsaveas);\n\t}\n\t// Nw.js supports \"webkitdirectory\" and \"nwdirectory\" to allow a directory to be selected\n\tif(this.webkitdirectory) {\n\t\tdomNode.setAttribute(\"webkitdirectory\",this.webkitdirectory);\n\t}\n\tif(this.nwdirectory) {\n\t\tdomNode.setAttribute(\"nwdirectory\",this.nwdirectory);\n\t}\n\t// Add a click event handler\n\tdomNode.addEventListener(\"change\",function (event) {\n\t\tif(self.message) {\n\t\t\tself.dispatchEvent({type: self.message, param: self.param, files: event.target.files});\n\t\t} else {\n\t\t\tself.wiki.readFiles(event.target.files,{\n\t\t\t\tcallback: function(tiddlerFieldsArray) {\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t\t\t\t},\n\t\t\t\tdeserializer: self.deserializer\n\t\t\t});\n\t\t}\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nBrowseWidget.prototype.execute = function() {\n\tthis.browseMultiple = this.getAttribute(\"multiple\");\n\tthis.deserializer = this.getAttribute(\"deserializer\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis.nwsaveas = this.getAttribute(\"nwsaveas\");\n\tthis.webkitdirectory = this.getAttribute(\"webkitdirectory\");\n\tthis.nwdirectory = this.getAttribute(\"nwdirectory\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nBrowseWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.browse = BrowseWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/button.js": {
"title": "$:/core/modules/widgets/button.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/button.js\ntype: application/javascript\nmodule-type: widget\n\nButton widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ButtonWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nButtonWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nButtonWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar tag = \"button\";\n\tif(this.buttonTag && $tw.config.htmlUnsafeElements.indexOf(this.buttonTag) === -1) {\n\t\ttag = this.buttonTag;\n\t}\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = this[\"class\"].split(\" \") || [],\n\t\tisPoppedUp = this.popup && this.isPoppedUp();\n\tif(this.selectedClass) {\n\t\tif(this.set && this.setTo && this.isSelected()) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\n\t\t}\n\t\tif(isPoppedUp) {\n\t\t\t$tw.utils.pushTop(classes,this.selectedClass.split(\" \"));\n\t\t}\n\t}\n\tif(isPoppedUp) {\n\t\t$tw.utils.pushTop(classes,\"tc-popup-handle\");\n\t}\n\tdomNode.className = classes.join(\" \");\n\t// Assign other attributes\n\tif(this.style) {\n\t\tdomNode.setAttribute(\"style\",this.style);\n\t}\n\tif(this.tooltip) {\n\t\tdomNode.setAttribute(\"title\",this.tooltip);\n\t}\n\tif(this[\"aria-label\"]) {\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\n\t}\n\t// Add a click event handler\n\tdomNode.addEventListener(\"click\",function (event) {\n\t\tvar handled = false;\n\t\tif(self.invokeActions(this,event)) {\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.to) {\n\t\t\tself.navigateTo(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.message) {\n\t\t\tself.dispatchMessage(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.popup) {\n\t\t\tself.triggerPopup(event);\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.set) {\n\t\t\tself.setTiddler();\n\t\t\thandled = true;\n\t\t}\n\t\tif(self.actions) {\n\t\t\tself.invokeActionString(self.actions,self,event);\n\t\t}\n\t\tif(handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t\treturn handled;\n\t},false);\n\t// Make it draggable if required\n\tif(this.dragTiddler || this.dragFilter) {\n\t\t$tw.utils.makeDraggable({\n\t\t\tdomNode: domNode,\n\t\t\tdragTiddlerFn: function() {return self.dragTiddler;},\n\t\t\tdragFilterFn: function() {return self.dragFilter;},\n\t\t\twidget: this\n\t\t});\n\t}\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nWe don't allow actions to propagate because we trigger actions ourselves\n*/\nButtonWidget.prototype.allowActionPropagation = function() {\n\treturn false;\n};\n\nButtonWidget.prototype.getBoundingClientRect = function() {\n\treturn this.domNodes[0].getBoundingClientRect();\n};\n\nButtonWidget.prototype.isSelected = function() {\n return this.wiki.getTextReference(this.set,this.defaultSetValue,this.getVariable(\"currentTiddler\")) === this.setTo;\n};\n\nButtonWidget.prototype.isPoppedUp = function() {\n\tvar tiddler = this.wiki.getTiddler(this.popup);\n\tvar result = tiddler && tiddler.fields.text ? $tw.popup.readPopupState(tiddler.fields.text) : false;\n\treturn result;\n};\n\nButtonWidget.prototype.navigateTo = function(event) {\n\tvar bounds = this.getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1),\n\t\tevent: event\n\t});\n};\n\nButtonWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\"), event: event});\n};\n\nButtonWidget.prototype.triggerPopup = function(event) {\n\t$tw.popup.triggerPopup({\n\t\tdomNode: this.domNodes[0],\n\t\ttitle: this.popup,\n\t\twiki: this.wiki\n\t});\n};\n\nButtonWidget.prototype.setTiddler = function() {\n\tthis.wiki.setTextReference(this.set,this.setTo,this.getVariable(\"currentTiddler\"));\n};\n\n/*\nCompute the internal state of the widget\n*/\nButtonWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.actions = this.getAttribute(\"actions\");\n\tthis.to = this.getAttribute(\"to\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.set = this.getAttribute(\"set\");\n\tthis.setTo = this.getAttribute(\"setTo\");\n\tthis.popup = this.getAttribute(\"popup\");\n\tthis.hover = this.getAttribute(\"hover\");\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis.style = this.getAttribute(\"style\");\n\tthis.selectedClass = this.getAttribute(\"selectedClass\");\n\tthis.defaultSetValue = this.getAttribute(\"default\",\"\");\n\tthis.buttonTag = this.getAttribute(\"tag\");\n\tthis.dragTiddler = this.getAttribute(\"dragTiddler\");\n\tthis.dragFilter = this.getAttribute(\"dragFilter\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nButtonWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.param || changedAttributes.set || changedAttributes.setTo || changedAttributes.popup || changedAttributes.hover || changedAttributes[\"class\"] || changedAttributes.selectedClass || changedAttributes.style || changedAttributes.dragFilter || changedAttributes.dragTiddler || (this.set && changedTiddlers[this.set]) || (this.popup && changedTiddlers[this.popup])) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.button = ButtonWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/checkbox.js": {
"title": "$:/core/modules/widgets/checkbox.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/checkbox.js\ntype: application/javascript\nmodule-type: widget\n\nCheckbox widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CheckboxWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCheckboxWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCheckboxWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\"label\");\n\tthis.labelDomNode.setAttribute(\"class\",this.checkboxClass);\n\tthis.inputDomNode = this.document.createElement(\"input\");\n\tthis.inputDomNode.setAttribute(\"type\",\"checkbox\");\n\tif(this.getValue()) {\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\"span\");\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nCheckboxWidget.prototype.getValue = function() {\n\tvar tiddler = this.wiki.getTiddler(this.checkboxTitle);\n\tif(tiddler) {\n\t\tif(this.checkboxTag) {\n\t\t\tif(this.checkboxInvertTag) {\n\t\t\t\treturn !tiddler.hasTag(this.checkboxTag);\n\t\t\t} else {\n\t\t\t\treturn tiddler.hasTag(this.checkboxTag);\n\t\t\t}\n\t\t}\n\t\tif(this.checkboxField) {\n\t\t\tvar value;\n\t\t\tif($tw.utils.hop(tiddler.fields,this.checkboxField)) {\n\t\t\t\tvalue = tiddler.fields[this.checkboxField] || \"\";\n\t\t\t} else {\n\t\t\t\tvalue = this.checkboxDefault || \"\";\n\t\t\t}\n\t\t\tif(value === this.checkboxChecked) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(value === this.checkboxUnchecked) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(this.checkboxIndex) {\n\t\t\tvar value = this.wiki.extractTiddlerDataItem(tiddler,this.checkboxIndex,this.checkboxDefault || \"\");\n\t\t\tif(value === this.checkboxChecked) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(value === this.checkboxUnchecked) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif(this.checkboxTag) {\n\t\t\treturn false;\n\t\t}\n\t\tif(this.checkboxField) {\n\t\t\tif(this.checkboxDefault === this.checkboxChecked) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif(this.checkboxDefault === this.checkboxUnchecked) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\nCheckboxWidget.prototype.handleChangeEvent = function(event) {\n\tvar checked = this.inputDomNode.checked,\n\t\ttiddler = this.wiki.getTiddler(this.checkboxTitle),\n\t\tfallbackFields = {text: \"\"},\n\t\tnewFields = {title: this.checkboxTitle},\n\t\thasChanged = false,\n\t\ttagCheck = false,\n\t\thasTag = tiddler && tiddler.hasTag(this.checkboxTag),\n\t\tvalue = checked ? this.checkboxChecked : this.checkboxUnchecked;\n\tif(this.checkboxTag && this.checkboxInvertTag === \"yes\") {\n\t\ttagCheck = hasTag === checked;\n\t} else {\n\t\ttagCheck = hasTag !== checked;\n\t}\n\t// Set the tag if specified\n\tif(this.checkboxTag && (!tiddler || tagCheck)) {\n\t\tnewFields.tags = tiddler ? (tiddler.fields.tags || []).slice(0) : [];\n\t\tvar pos = newFields.tags.indexOf(this.checkboxTag);\n\t\tif(pos !== -1) {\n\t\t\tnewFields.tags.splice(pos,1);\n\t\t}\n\t\tif(this.checkboxInvertTag === \"yes\" && !checked) {\n\t\t\tnewFields.tags.push(this.checkboxTag);\n\t\t} else if(this.checkboxInvertTag !== \"yes\" && checked) {\n\t\t\tnewFields.tags.push(this.checkboxTag);\n\t\t}\n\t\thasChanged = true;\n\t}\n\t// Set the field if specified\n\tif(this.checkboxField) {\n\t\tif(!tiddler || tiddler.fields[this.checkboxField] !== value) {\n\t\t\tnewFields[this.checkboxField] = value;\n\t\t\thasChanged = true;\n\t\t}\n\t}\n\t// Set the index if specified\n\tif(this.checkboxIndex) {\n\t\tvar indexValue = this.wiki.extractTiddlerDataItem(this.checkboxTitle,this.checkboxIndex);\n\t\tif(!tiddler || indexValue !== value) {\n\t\t\thasChanged = true;\n\t\t}\n\t}\n\tif(hasChanged) {\n\t\tif(this.checkboxIndex) {\n\t\t\tthis.wiki.setText(this.checkboxTitle,\"\",this.checkboxIndex,value);\n\t\t} else {\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),fallbackFields,tiddler,newFields,this.wiki.getModificationFields()));\n\t\t}\n\t}\n\t// Trigger actions\n\tif(this.checkboxActions) {\n\t\tthis.invokeActionString(this.checkboxActions,this,event);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCheckboxWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.checkboxActions = this.getAttribute(\"actions\");\n\tthis.checkboxTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.checkboxTag = this.getAttribute(\"tag\");\n\tthis.checkboxField = this.getAttribute(\"field\");\n\tthis.checkboxIndex = this.getAttribute(\"index\");\n\tthis.checkboxChecked = this.getAttribute(\"checked\");\n\tthis.checkboxUnchecked = this.getAttribute(\"unchecked\");\n\tthis.checkboxDefault = this.getAttribute(\"default\");\n\tthis.checkboxClass = this.getAttribute(\"class\",\"\");\n\tthis.checkboxInvertTag = this.getAttribute(\"invertTag\",\"\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCheckboxWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.tag || changedAttributes.invertTag || changedAttributes.field || changedAttributes.index || changedAttributes.checked || changedAttributes.unchecked || changedAttributes[\"default\"] || changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.checkboxTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue();\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.checkbox = CheckboxWidget;\n\n})();",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/codeblock.js": {
"title": "$:/core/modules/widgets/codeblock.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/codeblock.js\ntype: application/javascript\nmodule-type: widget\n\nCode block node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CodeBlockWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCodeBlockWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCodeBlockWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar codeNode = this.document.createElement(\"code\"),\n\t\tdomNode = this.document.createElement(\"pre\");\n\tcodeNode.appendChild(this.document.createTextNode(this.getAttribute(\"code\")));\n\tdomNode.appendChild(codeNode);\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n\tif(this.postRender) {\n\t\tthis.postRender();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCodeBlockWidget.prototype.execute = function() {\n\tthis.language = this.getAttribute(\"language\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCodeBlockWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.codeblock = CodeBlockWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/count.js": {
"title": "$:/core/modules/widgets/count.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/count.js\ntype: application/javascript\nmodule-type: widget\n\nCount widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CountWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCountWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nCountWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.currentCount);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nCountWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\"filter\");\n\t// Execute the filter\n\tif(this.filter) {\n\t\tthis.currentCount = this.wiki.filterTiddlers(this.filter,this).length;\n\t} else {\n\t\tthis.currentCount = undefined;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCountWidget.prototype.refresh = function(changedTiddlers) {\n\t// Re-execute the filter to get the count\n\tthis.computeAttributes();\n\tvar oldCount = this.currentCount;\n\tthis.execute();\n\tif(this.currentCount !== oldCount) {\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n};\n\nexports.count = CountWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/draggable.js": {
"title": "$:/core/modules/widgets/draggable.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/draggable.js\ntype: application/javascript\nmodule-type: widget\n\nDraggable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DraggableWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDraggableWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDraggableWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Sanitise the specified tag\n\tvar tag = this.draggableTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"div\";\n\t}\n\t// Create our element\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = [\"tc-draggable\"];\n\tif(this.draggableClasses) {\n\t\tclasses.push(this.draggableClasses);\n\t}\n\tdomNode.setAttribute(\"class\",classes.join(\" \"));\n\t// Add event handlers\n\t$tw.utils.makeDraggable({\n\t\tdomNode: domNode,\n\t\tdragTiddlerFn: function() {return self.getAttribute(\"tiddler\");},\n\t\tdragFilterFn: function() {return self.getAttribute(\"filter\");},\n\t\twidget: this\n\t});\n\t// Insert the link into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nDraggableWidget.prototype.execute = function() {\n\t// Pick up our attributes\n\tthis.draggableTag = this.getAttribute(\"tag\",\"div\");\n\tthis.draggableClasses = this.getAttribute(\"class\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nDraggableWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedTiddlers.tag || changedTiddlers[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.draggable = DraggableWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/droppable.js": {
"title": "$:/core/modules/widgets/droppable.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/droppable.js\ntype: application/javascript\nmodule-type: widget\n\nDroppable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DroppableWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDroppableWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDroppableWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar tag = this.parseTreeNode.isBlock ? \"div\" : \"span\";\n\tif(this.droppableTag && $tw.config.htmlUnsafeElements.indexOf(this.droppableTag) === -1) {\n\t\ttag = this.droppableTag;\n\t}\n\t// Create element and assign classes\n\tvar domNode = this.document.createElement(tag),\n\t\tclasses = (this[\"class\"] || \"\").split(\" \");\n\tclasses.push(\"tc-droppable\");\n\tdomNode.className = classes.join(\" \");\n\t// Add event handlers\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"dragenter\", handlerObject: this, handlerMethod: \"handleDragEnterEvent\"},\n\t\t{name: \"dragover\", handlerObject: this, handlerMethod: \"handleDragOverEvent\"},\n\t\t{name: \"dragleave\", handlerObject: this, handlerMethod: \"handleDragLeaveEvent\"},\n\t\t{name: \"drop\", handlerObject: this, handlerMethod: \"handleDropEvent\"}\n\t]);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n\t// Stack of outstanding enter/leave events\n\tthis.currentlyEntered = [];\n};\n\nDroppableWidget.prototype.enterDrag = function(event) {\n\tif(this.currentlyEntered.indexOf(event.target) === -1) {\n\t\tthis.currentlyEntered.push(event.target);\n\t}\n\t// If we're entering for the first time we need to apply highlighting\n\t$tw.utils.addClass(this.domNodes[0],\"tc-dragover\");\n};\n\nDroppableWidget.prototype.leaveDrag = function(event) {\n\tvar pos = this.currentlyEntered.indexOf(event.target);\n\tif(pos !== -1) {\n\t\tthis.currentlyEntered.splice(pos,1);\n\t}\n\t// Remove highlighting if we're leaving externally. The hacky second condition is to resolve a problem with Firefox whereby there is an erroneous dragenter event if the node being dragged is within the dropzone\n\tif(this.currentlyEntered.length === 0 || (this.currentlyEntered.length === 1 && this.currentlyEntered[0] === $tw.dragInProgress)) {\n\t\tthis.currentlyEntered = [];\n\t\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDroppableWidget.prototype.handleDragEnterEvent = function(event) {\n\tthis.enterDrag(event);\n\t// Tell the browser that we're ready to handle the drop\n\tevent.preventDefault();\n\t// Tell the browser not to ripple the drag up to any parent drop handlers\n\tevent.stopPropagation();\n\treturn false;\n};\n\nDroppableWidget.prototype.handleDragOverEvent = function(event) {\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Tell the browser that we're still interested in the drop\n\tevent.preventDefault();\n\t// Set the drop effect\n\tevent.dataTransfer.dropEffect = this.droppableEffect;\n\treturn false;\n};\n\nDroppableWidget.prototype.handleDragLeaveEvent = function(event) {\n\tthis.leaveDrag(event);\n\treturn false;\n};\n\nDroppableWidget.prototype.handleDropEvent = function(event) {\n\tvar self = this;\n\tthis.leaveDrag(event);\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\tvar dataTransfer = event.dataTransfer;\n\t// Remove highlighting\n\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t// Try to import the various data types we understand\n\t$tw.utils.importDataTransfer(dataTransfer,null,function(fieldsArray) {\n\t\tfieldsArray.forEach(function(fields) {\n\t\t\tself.performActions(fields.title || fields.text,event);\n\t\t});\n\t});\n\t// Tell the browser that we handled the drop\n\tevent.preventDefault();\n\t// Stop the drop ripple up to any parent handlers\n\tevent.stopPropagation();\n\treturn false;\n};\n\nDroppableWidget.prototype.performActions = function(title,event) {\n\tif(this.droppableActions) {\n\t\tthis.invokeActionString(this.droppableActions,this,event,{actionTiddler: title});\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nDroppableWidget.prototype.execute = function() {\n\tthis.droppableActions = this.getAttribute(\"actions\");\n\tthis.droppableEffect = this.getAttribute(\"effect\",\"copy\");\n\tthis.droppableTag = this.getAttribute(\"tag\");\n\tthis.droppableClass = this.getAttribute(\"class\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nDroppableWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"class\"] || changedAttributes.tag) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.droppable = DroppableWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/dropzone.js": {
"title": "$:/core/modules/widgets/dropzone.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/dropzone.js\ntype: application/javascript\nmodule-type: widget\n\nDropzone widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar DropZoneWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nDropZoneWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nDropZoneWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\tvar domNode = this.document.createElement(\"div\");\n\tdomNode.className = \"tc-dropzone\";\n\t// Add event handlers\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"dragenter\", handlerObject: this, handlerMethod: \"handleDragEnterEvent\"},\n\t\t{name: \"dragover\", handlerObject: this, handlerMethod: \"handleDragOverEvent\"},\n\t\t{name: \"dragleave\", handlerObject: this, handlerMethod: \"handleDragLeaveEvent\"},\n\t\t{name: \"drop\", handlerObject: this, handlerMethod: \"handleDropEvent\"},\n\t\t{name: \"paste\", handlerObject: this, handlerMethod: \"handlePasteEvent\"}\n\t]);\n\tdomNode.addEventListener(\"click\",function (event) {\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n\t// Stack of outstanding enter/leave events\n\tthis.currentlyEntered = [];\n};\n\nDropZoneWidget.prototype.enterDrag = function(event) {\n\tif(this.currentlyEntered.indexOf(event.target) === -1) {\n\t\tthis.currentlyEntered.push(event.target);\n\t}\n\t// If we're entering for the first time we need to apply highlighting\n\t$tw.utils.addClass(this.domNodes[0],\"tc-dragover\");\n};\n\nDropZoneWidget.prototype.leaveDrag = function(event) {\n\tvar pos = this.currentlyEntered.indexOf(event.target);\n\tif(pos !== -1) {\n\t\tthis.currentlyEntered.splice(pos,1);\n\t}\n\t// Remove highlighting if we're leaving externally\n\tif(this.currentlyEntered.length === 0) {\n\t\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t}\n};\n\nDropZoneWidget.prototype.handleDragEnterEvent = function(event) {\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\tthis.enterDrag(event);\n\t// Tell the browser that we're ready to handle the drop\n\tevent.preventDefault();\n\t// Tell the browser not to ripple the drag up to any parent drop handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.handleDragOverEvent = function(event) {\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\t// Tell the browser that we're still interested in the drop\n\tevent.preventDefault();\n\tevent.dataTransfer.dropEffect = \"copy\"; // Explicitly show this is a copy\n};\n\nDropZoneWidget.prototype.handleDragLeaveEvent = function(event) {\n\tthis.leaveDrag(event);\n};\n\nDropZoneWidget.prototype.handleDropEvent = function(event) {\n\tvar self = this,\n\t\treadFileCallback = function(tiddlerFieldsArray) {\n\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t\t};\n\tthis.leaveDrag(event);\n\t// Check for being over a TEXTAREA or INPUT\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) !== -1) {\n\t\treturn false;\n\t}\n\t// Check for this window being the source of the drag\n\tif($tw.dragInProgress) {\n\t\treturn false;\n\t}\n\tvar self = this,\n\t\tdataTransfer = event.dataTransfer;\n\t// Remove highlighting\n\t$tw.utils.removeClass(this.domNodes[0],\"tc-dragover\");\n\t// Import any files in the drop\n\tvar numFiles = 0;\n\tif(dataTransfer.files) {\n\t\tnumFiles = this.wiki.readFiles(dataTransfer.files,{\n\t\t\tcallback: readFileCallback,\n\t\t\tdeserializer: this.dropzoneDeserializer\n\t\t});\n\t}\n\t// Try to import the various data types we understand\n\tif(numFiles === 0) {\n\t\t$tw.utils.importDataTransfer(dataTransfer,this.wiki.generateNewTitle(\"Untitled\"),readFileCallback);\n\t}\n\t// Tell the browser that we handled the drop\n\tevent.preventDefault();\n\t// Stop the drop ripple up to any parent handlers\n\tevent.stopPropagation();\n};\n\nDropZoneWidget.prototype.handlePasteEvent = function(event) {\n\tvar self = this,\n\t\treadFileCallback = function(tiddlerFieldsArray) {\n\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify(tiddlerFieldsArray)});\n\t\t};\n\t// Let the browser handle it if we're in a textarea or input box\n\tif([\"TEXTAREA\",\"INPUT\"].indexOf(event.target.tagName) == -1) {\n\t\tvar self = this,\n\t\t\titems = event.clipboardData.items;\n\t\t// Enumerate the clipboard items\n\t\tfor(var t = 0; t<items.length; t++) {\n\t\t\tvar item = items[t];\n\t\t\tif(item.kind === \"file\") {\n\t\t\t\t// Import any files\n\t\t\t\tthis.wiki.readFile(item.getAsFile(),{\n\t\t\t\t\tcallback: readFileCallback,\n\t\t\t\t\tdeserializer: this.dropzoneDeserializer\n\t\t\t\t});\n\t\t\t} else if(item.kind === \"string\") {\n\t\t\t\t// Create tiddlers from string items\n\t\t\t\tvar type = item.type;\n\t\t\t\titem.getAsString(function(str) {\n\t\t\t\t\tvar tiddlerFields = {\n\t\t\t\t\t\ttitle: self.wiki.generateNewTitle(\"Untitled\"),\n\t\t\t\t\t\ttext: str,\n\t\t\t\t\t\ttype: type\n\t\t\t\t\t};\n\t\t\t\t\tif($tw.log.IMPORT) {\n\t\t\t\t\t\tconsole.log(\"Importing string '\" + str + \"', type: '\" + type + \"'\");\n\t\t\t\t\t}\n\t\t\t\t\tself.dispatchEvent({type: \"tm-import-tiddlers\", param: JSON.stringify([tiddlerFields])});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\t// Tell the browser that we've handled the paste\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nDropZoneWidget.prototype.execute = function() {\n\tthis.dropzoneDeserializer = this.getAttribute(\"deserializer\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nDropZoneWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.dropzone = DropZoneWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-binary.js": {
"title": "$:/core/modules/widgets/edit-binary.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-binary.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-binary widget; placeholder for editing binary tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar BINARY_WARNING_MESSAGE = \"$:/core/ui/BinaryWarning\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditBinaryWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBinaryWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBinaryWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBinaryWidget.prototype.execute = function() {\n\t// Construct the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \"transclude\",\n\t\tattributes: {\n\t\t\ttiddler: {type: \"string\", value: BINARY_WARNING_MESSAGE}\n\t\t}\n\t}]);\n};\n\n/*\nRefresh by refreshing our child widget\n*/\nEditBinaryWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports[\"edit-binary\"] = EditBinaryWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-bitmap.js": {
"title": "$:/core/modules/widgets/edit-bitmap.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-bitmap.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-bitmap widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Default image sizes\nvar DEFAULT_IMAGE_WIDTH = 600,\n\tDEFAULT_IMAGE_HEIGHT = 370;\n\n// Configuration tiddlers\nvar LINE_WIDTH_TITLE = \"$:/config/BitmapEditor/LineWidth\",\n\tLINE_COLOUR_TITLE = \"$:/config/BitmapEditor/Colour\",\n\tLINE_OPACITY_TITLE = \"$:/config/BitmapEditor/Opacity\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditBitmapWidget = function(parseTreeNode,options) {\n\t// Initialise the editor operations if they've not been done already\n\tif(!this.editorOperations) {\n\t\tEditBitmapWidget.prototype.editorOperations = {};\n\t\t$tw.modules.applyMethods(\"bitmapeditoroperation\",this.editorOperations);\n\t}\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditBitmapWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditBitmapWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create the wrapper for the toolbar and render its content\n\tthis.toolbarNode = this.document.createElement(\"div\");\n\tthis.toolbarNode.className = \"tc-editor-toolbar\";\n\tparent.insertBefore(this.toolbarNode,nextSibling);\n\tthis.domNodes.push(this.toolbarNode);\n\t// Create the on-screen canvas\n\tthis.canvasDomNode = $tw.utils.domMaker(\"canvas\",{\n\t\tdocument: this.document,\n\t\t\"class\":\"tc-edit-bitmapeditor\",\n\t\teventListeners: [{\n\t\t\tname: \"touchstart\", handlerObject: this, handlerMethod: \"handleTouchStartEvent\"\n\t\t},{\n\t\t\tname: \"touchmove\", handlerObject: this, handlerMethod: \"handleTouchMoveEvent\"\n\t\t},{\n\t\t\tname: \"touchend\", handlerObject: this, handlerMethod: \"handleTouchEndEvent\"\n\t\t},{\n\t\t\tname: \"mousedown\", handlerObject: this, handlerMethod: \"handleMouseDownEvent\"\n\t\t},{\n\t\t\tname: \"mousemove\", handlerObject: this, handlerMethod: \"handleMouseMoveEvent\"\n\t\t},{\n\t\t\tname: \"mouseup\", handlerObject: this, handlerMethod: \"handleMouseUpEvent\"\n\t\t}]\n\t});\n\t// Set the width and height variables\n\tthis.setVariable(\"tv-bitmap-editor-width\",this.canvasDomNode.width + \"px\");\n\tthis.setVariable(\"tv-bitmap-editor-height\",this.canvasDomNode.height + \"px\");\n\t// Render toolbar child widgets\n\tthis.renderChildren(this.toolbarNode,null);\n\t// // Insert the elements into the DOM\n\tparent.insertBefore(this.canvasDomNode,nextSibling);\n\tthis.domNodes.push(this.canvasDomNode);\n\t// Load the image into the canvas\n\tif($tw.browser) {\n\t\tthis.loadCanvas();\n\t}\n\t// Add widget message listeners\n\tthis.addEventListeners([\n\t\t{type: \"tm-edit-bitmap-operation\", handler: \"handleEditBitmapOperationMessage\"}\n\t]);\n};\n\n/*\nHandle an edit bitmap operation message from the toolbar\n*/\nEditBitmapWidget.prototype.handleEditBitmapOperationMessage = function(event) {\n\t// Invoke the handler\n\tvar handler = this.editorOperations[event.param];\n\tif(handler) {\n\t\thandler.call(this,event);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditBitmapWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nJust refresh the toolbar\n*/\nEditBitmapWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nSet the bitmap size variables and refresh the toolbar\n*/\nEditBitmapWidget.prototype.refreshToolbar = function() {\n\t// Set the width and height variables\n\tthis.setVariable(\"tv-bitmap-editor-width\",this.canvasDomNode.width + \"px\");\n\tthis.setVariable(\"tv-bitmap-editor-height\",this.canvasDomNode.height + \"px\");\n\t// Refresh each of our child widgets\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\tchildWidget.refreshSelf();\n\t});\n};\n\nEditBitmapWidget.prototype.loadCanvas = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle),\n\t\tcurrImage = new Image();\n\t// Set up event handlers for loading the image\n\tvar self = this;\n\tcurrImage.onload = function() {\n\t\t// Copy the image to the on-screen canvas\n\t\tself.initCanvas(self.canvasDomNode,currImage.width,currImage.height,currImage);\n\t\t// And also copy the current bitmap to the off-screen canvas\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\n\t\tself.initCanvas(self.currCanvas,currImage.width,currImage.height,currImage);\n\t\t// Set the width and height input boxes\n\t\tself.refreshToolbar();\n\t};\n\tcurrImage.onerror = function() {\n\t\t// Set the on-screen canvas size and clear it\n\t\tself.initCanvas(self.canvasDomNode,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the off-screen canvas size and clear it\n\t\tself.currCanvas = self.document.createElement(\"canvas\");\n\t\tself.initCanvas(self.currCanvas,DEFAULT_IMAGE_WIDTH,DEFAULT_IMAGE_HEIGHT);\n\t\t// Set the width and height input boxes\n\t\tself.refreshToolbar();\n\t};\n\t// Get the current bitmap into an image object\n\tcurrImage.src = \"data:\" + tiddler.fields.type + \";base64,\" + tiddler.fields.text;\n};\n\nEditBitmapWidget.prototype.initCanvas = function(canvas,width,height,image) {\n\tcanvas.width = width;\n\tcanvas.height = height;\n\tvar ctx = canvas.getContext(\"2d\");\n\tif(image) {\n\t\tctx.drawImage(image,0,0);\n\t} else {\n\t\tctx.fillStyle = \"#fff\";\n\t\tctx.fillRect(0,0,canvas.width,canvas.height);\n\t}\n};\n\n/*\n** Change the size of the canvas, preserving the current image\n*/\nEditBitmapWidget.prototype.changeCanvasSize = function(newWidth,newHeight) {\n\t// Create and size a new canvas\n\tvar newCanvas = this.document.createElement(\"canvas\");\n\tthis.initCanvas(newCanvas,newWidth,newHeight);\n\t// Copy the old image\n\tvar ctx = newCanvas.getContext(\"2d\");\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Set the new canvas as the current one\n\tthis.currCanvas = newCanvas;\n\t// Set the size of the onscreen canvas\n\tthis.canvasDomNode.width = newWidth;\n\tthis.canvasDomNode.height = newHeight;\n\t// Paint the onscreen canvas with the offscreen canvas\n\tctx = this.canvasDomNode.getContext(\"2d\");\n\tctx.drawImage(this.currCanvas,0,0);\n};\n\nEditBitmapWidget.prototype.handleTouchStartEvent = function(event) {\n\tthis.brushDown = true;\n\tthis.strokeStart(event.touches[0].clientX,event.touches[0].clientY);\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.touches[0].clientX,event.touches[0].clientY);\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleTouchEndEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t}\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseDownEvent = function(event) {\n\tthis.strokeStart(event.clientX,event.clientY);\n\tthis.brushDown = true;\n\tevent.preventDefault();\n\tevent.stopPropagation();\n\treturn false;\n};\n\nEditBitmapWidget.prototype.handleMouseMoveEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.strokeMove(event.clientX,event.clientY);\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.handleMouseUpEvent = function(event) {\n\tif(this.brushDown) {\n\t\tthis.brushDown = false;\n\t\tthis.strokeEnd();\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn false;\n\t}\n\treturn true;\n};\n\nEditBitmapWidget.prototype.adjustCoordinates = function(x,y) {\n\tvar canvasRect = this.canvasDomNode.getBoundingClientRect(),\n\t\tscale = this.canvasDomNode.width/canvasRect.width;\n\treturn {x: (x - canvasRect.left) * scale, y: (y - canvasRect.top) * scale};\n};\n\nEditBitmapWidget.prototype.strokeStart = function(x,y) {\n\t// Start off a new stroke\n\tthis.stroke = [this.adjustCoordinates(x,y)];\n};\n\nEditBitmapWidget.prototype.strokeMove = function(x,y) {\n\tvar ctx = this.canvasDomNode.getContext(\"2d\"),\n\t\tt;\n\t// Add the new position to the end of the stroke\n\tthis.stroke.push(this.adjustCoordinates(x,y));\n\t// Redraw the previous image\n\tctx.drawImage(this.currCanvas,0,0);\n\t// Render the stroke\n\tctx.globalAlpha = parseFloat(this.wiki.getTiddlerText(LINE_OPACITY_TITLE,\"1.0\"));\n\tctx.strokeStyle = this.wiki.getTiddlerText(LINE_COLOUR_TITLE,\"#ff0\");\n\tctx.lineWidth = parseFloat(this.wiki.getTiddlerText(LINE_WIDTH_TITLE,\"3\"));\n\tctx.lineCap = \"round\";\n\tctx.lineJoin = \"round\";\n\tctx.beginPath();\n\tctx.moveTo(this.stroke[0].x,this.stroke[0].y);\n\tfor(t=1; t<this.stroke.length-1; t++) {\n\t\tvar s1 = this.stroke[t],\n\t\t\ts2 = this.stroke[t-1],\n\t\t\ttx = (s1.x + s2.x)/2,\n\t\t\tty = (s1.y + s2.y)/2;\n\t\tctx.quadraticCurveTo(s2.x,s2.y,tx,ty);\n\t}\n\tctx.stroke();\n};\n\nEditBitmapWidget.prototype.strokeEnd = function() {\n\t// Copy the bitmap to the off-screen canvas\n\tvar ctx = this.currCanvas.getContext(\"2d\");\n\tctx.drawImage(this.canvasDomNode,0,0);\n\t// Save the image into the tiddler\n\tthis.saveChanges();\n};\n\nEditBitmapWidget.prototype.saveChanges = function() {\n\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\tif(tiddler) {\n\t\t// data URIs look like \"data:<type>;base64,<text>\"\n\t\tvar dataURL = this.canvasDomNode.toDataURL(tiddler.fields.type),\n\t\t\tposColon = dataURL.indexOf(\":\"),\n\t\t\tposSemiColon = dataURL.indexOf(\";\"),\n\t\t\tposComma = dataURL.indexOf(\",\"),\n\t\t\ttype = dataURL.substring(posColon+1,posSemiColon),\n\t\t\ttext = dataURL.substring(posComma+1);\n\t\tvar update = {type: type, text: text};\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getModificationFields(),tiddler,update,this.wiki.getCreationFields()));\n\t}\n};\n\nexports[\"edit-bitmap\"] = EditBitmapWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-shortcut.js": {
"title": "$:/core/modules/widgets/edit-shortcut.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-shortcut.js\ntype: application/javascript\nmodule-type: widget\n\nWidget to display an editable keyboard shortcut\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditShortcutWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditShortcutWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditShortcutWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.inputNode = this.document.createElement(\"input\");\n\t// Assign classes\n\tif(this.shortcutClass) {\n\t\tthis.inputNode.className = this.shortcutClass;\t\t\n\t}\n\t// Assign other attributes\n\tif(this.shortcutStyle) {\n\t\tthis.inputNode.setAttribute(\"style\",this.shortcutStyle);\n\t}\n\tif(this.shortcutTooltip) {\n\t\tthis.inputNode.setAttribute(\"title\",this.shortcutTooltip);\n\t}\n\tif(this.shortcutPlaceholder) {\n\t\tthis.inputNode.setAttribute(\"placeholder\",this.shortcutPlaceholder);\n\t}\n\tif(this.shortcutAriaLabel) {\n\t\tthis.inputNode.setAttribute(\"aria-label\",this.shortcutAriaLabel);\n\t}\n\t// Assign the current shortcut\n\tthis.updateInputNode();\n\t// Add event handlers\n\t$tw.utils.addEventListeners(this.inputNode,[\n\t\t{name: \"keydown\", handlerObject: this, handlerMethod: \"handleKeydownEvent\"}\n\t]);\n\t// Link into the DOM\n\tparent.insertBefore(this.inputNode,nextSibling);\n\tthis.domNodes.push(this.inputNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEditShortcutWidget.prototype.execute = function() {\n\tthis.shortcutTiddler = this.getAttribute(\"tiddler\");\n\tthis.shortcutField = this.getAttribute(\"field\");\n\tthis.shortcutIndex = this.getAttribute(\"index\");\n\tthis.shortcutPlaceholder = this.getAttribute(\"placeholder\");\n\tthis.shortcutDefault = this.getAttribute(\"default\",\"\");\n\tthis.shortcutClass = this.getAttribute(\"class\");\n\tthis.shortcutStyle = this.getAttribute(\"style\");\n\tthis.shortcutTooltip = this.getAttribute(\"tooltip\");\n\tthis.shortcutAriaLabel = this.getAttribute(\"aria-label\");\n};\n\n/*\nUpdate the value of the input node\n*/\nEditShortcutWidget.prototype.updateInputNode = function() {\n\tif(this.shortcutField) {\n\t\tvar tiddler = this.wiki.getTiddler(this.shortcutTiddler);\n\t\tif(tiddler && $tw.utils.hop(tiddler.fields,this.shortcutField)) {\n\t\t\tthis.inputNode.value = tiddler.getFieldString(this.shortcutField);\n\t\t} else {\n\t\t\tthis.inputNode.value = this.shortcutDefault;\n\t\t}\n\t} else if(this.shortcutIndex) {\n\t\tthis.inputNode.value = this.wiki.extractTiddlerDataItem(this.shortcutTiddler,this.shortcutIndex,this.shortcutDefault);\n\t} else {\n\t\tthis.inputNode.value = this.wiki.getTiddlerText(this.shortcutTiddler,this.shortcutDefault);\n\t}\n};\n\n/*\nHandle a dom \"keydown\" event\n*/\nEditShortcutWidget.prototype.handleKeydownEvent = function(event) {\n\t// Ignore shift, ctrl, meta, alt\n\tif(event.keyCode && $tw.keyboardManager.getModifierKeys().indexOf(event.keyCode) === -1) {\n\t\t// Get the shortcut text representation\n\t\tvar value = $tw.keyboardManager.getPrintableShortcuts([{\n\t\t\tctrlKey: event.ctrlKey,\n\t\t\tshiftKey: event.shiftKey,\n\t\t\taltKey: event.altKey,\n\t\t\tmetaKey: event.metaKey,\n\t\t\tkeyCode: event.keyCode\n\t\t}]);\n\t\tif(value.length > 0) {\n\t\t\tthis.wiki.setText(this.shortcutTiddler,this.shortcutField,this.shortcutIndex,value[0]);\n\t\t}\n\t\t// Ignore the keydown if it was already handled\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\treturn true;\t\t\n\t} else {\n\t\treturn false;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget needed re-rendering\n*/\nEditShortcutWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.placeholder || changedAttributes[\"default\"] || changedAttributes[\"class\"] || changedAttributes.style || changedAttributes.tooltip || changedAttributes[\"aria-label\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else if(changedTiddlers[this.shortcutTiddler]) {\n\t\tthis.updateInputNode();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports[\"edit-shortcut\"] = EditShortcutWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit-text.js": {
"title": "$:/core/modules/widgets/edit-text.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/edit-text.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-text widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar editTextWidgetFactory = require(\"$:/core/modules/editor/factory.js\").editTextWidgetFactory,\n\tFramedEngine = require(\"$:/core/modules/editor/engines/framed.js\").FramedEngine,\n\tSimpleEngine = require(\"$:/core/modules/editor/engines/simple.js\").SimpleEngine;\n\nexports[\"edit-text\"] = editTextWidgetFactory(FramedEngine,SimpleEngine);\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/edit.js": {
"title": "$:/core/modules/widgets/edit.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/edit.js\ntype: application/javascript\nmodule-type: widget\n\nEdit widget is a meta-widget chooses the appropriate actual editting widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EditWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEditWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEditWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n// Mappings from content type to editor type are stored in tiddlers with this prefix\nvar EDITOR_MAPPING_PREFIX = \"$:/config/EditorTypeMappings/\";\n\n/*\nCompute the internal state of the widget\n*/\nEditWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.editTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.editField = this.getAttribute(\"field\",\"text\");\n\tthis.editIndex = this.getAttribute(\"index\");\n\tthis.editClass = this.getAttribute(\"class\");\n\tthis.editPlaceholder = this.getAttribute(\"placeholder\");\n\t// Choose the appropriate edit widget\n\tthis.editorType = this.getEditorType();\n\t// Make the child widgets\n\tthis.makeChildWidgets([{\n\t\ttype: \"edit-\" + this.editorType,\n\t\tattributes: {\n\t\t\ttiddler: {type: \"string\", value: this.editTitle},\n\t\t\tfield: {type: \"string\", value: this.editField},\n\t\t\tindex: {type: \"string\", value: this.editIndex},\n\t\t\t\"class\": {type: \"string\", value: this.editClass},\n\t\t\t\"placeholder\": {type: \"string\", value: this.editPlaceholder}\n\t\t},\n\t\tchildren: this.parseTreeNode.children\n\t}]);\n};\n\nEditWidget.prototype.getEditorType = function() {\n\t// Get the content type of the thing we're editing\n\tvar type;\n\tif(this.editField === \"text\") {\n\t\tvar tiddler = this.wiki.getTiddler(this.editTitle);\n\t\tif(tiddler) {\n\t\t\ttype = tiddler.fields.type;\n\t\t}\n\t}\n\ttype = type || \"text/vnd.tiddlywiki\";\n\tvar editorType = this.wiki.getTiddlerText(EDITOR_MAPPING_PREFIX + type);\n\tif(!editorType) {\n\t\tvar typeInfo = $tw.config.contentTypeInfo[type];\n\t\tif(typeInfo && typeInfo.encoding === \"base64\") {\n\t\t\teditorType = \"binary\";\n\t\t} else {\n\t\t\teditorType = \"text\";\n\t\t}\n\t}\n\treturn editorType;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEditWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Refresh if an attribute has changed, or the type associated with the target tiddler has changed\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || (changedTiddlers[this.editTitle] && this.getEditorType() !== this.editorType)) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.edit = EditWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/element.js": {
"title": "$:/core/modules/widgets/element.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/element.js\ntype: application/javascript\nmodule-type: widget\n\nElement widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ElementWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nElementWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nElementWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Neuter blacklisted elements\n\tvar tag = this.parseTreeNode.tag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"safe-\" + tag;\n\t}\n\tvar domNode = this.document.createElementNS(this.namespace,tag);\n\tthis.assignAttributes(domNode,{excludeEventAttributes: true});\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nElementWidget.prototype.execute = function() {\n\t// Select the namespace for the tag\n\tvar tagNamespaces = {\n\t\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\t\tmath: \"http://www.w3.org/1998/Math/MathML\",\n\t\t\tbody: \"http://www.w3.org/1999/xhtml\"\n\t\t};\n\tthis.namespace = tagNamespaces[this.parseTreeNode.tag];\n\tif(this.namespace) {\n\t\tthis.setVariable(\"namespace\",this.namespace);\n\t} else {\n\t\tthis.namespace = this.getVariable(\"namespace\",{defaultValue: \"http://www.w3.org/1999/xhtml\"});\n\t}\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nElementWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\thasChangedAttributes = $tw.utils.count(changedAttributes) > 0;\n\tif(hasChangedAttributes) {\n\t\t// Update our attributes\n\t\tthis.assignAttributes(this.domNodes[0],{excludeEventAttributes: true});\n\t}\n\treturn this.refreshChildren(changedTiddlers) || hasChangedAttributes;\n};\n\nexports.element = ElementWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/encrypt.js": {
"title": "$:/core/modules/widgets/encrypt.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/encrypt.js\ntype: application/javascript\nmodule-type: widget\n\nEncrypt widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EncryptWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEncryptWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEncryptWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.encryptedText);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEncryptWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.filter = this.getAttribute(\"filter\",\"[!is[system]]\");\n\t// Encrypt the filtered tiddlers\n\tvar tiddlers = this.wiki.filterTiddlers(this.filter),\n\t\tjson = {},\n\t\tself = this;\n\t$tw.utils.each(tiddlers,function(title) {\n\t\tvar tiddler = self.wiki.getTiddler(title),\n\t\t\tjsonTiddler = {};\n\t\tfor(var f in tiddler.fields) {\n\t\t\tjsonTiddler[f] = tiddler.getFieldString(f);\n\t\t}\n\t\tjson[title] = jsonTiddler;\n\t});\n\tthis.encryptedText = $tw.utils.htmlEncode($tw.crypto.encrypt(JSON.stringify(json)));\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEncryptWidget.prototype.refresh = function(changedTiddlers) {\n\t// We don't need to worry about refreshing because the encrypt widget isn't for interactive use\n\treturn false;\n};\n\nexports.encrypt = EncryptWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/entity.js": {
"title": "$:/core/modules/widgets/entity.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/entity.js\ntype: application/javascript\nmodule-type: widget\n\nHTML entity widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar EntityWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nEntityWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nEntityWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar entityString = this.getAttribute(\"entity\",this.parseTreeNode.entity || \"\"),\n\t\ttextNode = this.document.createTextNode($tw.utils.entityDecode(entityString));\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nEntityWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nEntityWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.entity) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.entity = EntityWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fieldmangler.js": {
"title": "$:/core/modules/widgets/fieldmangler.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/fieldmangler.js\ntype: application/javascript\nmodule-type: widget\n\nField mangler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar FieldManglerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-remove-field\", handler: \"handleRemoveFieldEvent\"},\n\t\t{type: \"tm-add-field\", handler: \"handleAddFieldEvent\"},\n\t\t{type: \"tm-remove-tag\", handler: \"handleRemoveTagEvent\"},\n\t\t{type: \"tm-add-tag\", handler: \"handleAddTagEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldManglerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldManglerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldManglerWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.mangleTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldManglerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nFieldManglerWidget.prototype.handleRemoveFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\tdeletion = {};\n\tdeletion[event.param] = undefined;\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,deletion));\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddFieldEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\taddition = this.wiki.getModificationFields(),\n\t\thadInvalidFieldName = false,\n\t\taddField = function(name,value) {\n\t\t\tvar trimmedName = name.toLowerCase().trim();\n\t\t\tif(!$tw.utils.isValidFieldName(trimmedName)) {\n\t\t\t\tif(!hadInvalidFieldName) {\n\t\t\t\t\talert($tw.language.getString(\n\t\t\t\t\t\t\"InvalidFieldName\",\n\t\t\t\t\t\t{variables:\n\t\t\t\t\t\t\t{fieldName: trimmedName}\n\t\t\t\t\t\t}\n\t\t\t\t\t));\n\t\t\t\t\thadInvalidFieldName = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!value && tiddler) {\n\t\t\t\t\tvalue = tiddler.fields[trimmedName];\n\t\t\t\t}\n\t\t\t\taddition[trimmedName] = value || \"\";\n\t\t\t}\n\t\t\treturn;\n\t\t};\n\taddition.title = this.mangleTitle;\n\tif(typeof event.param === \"string\") {\n\t\taddField(event.param,\"\");\n\t}\n\tif(typeof event.paramObject === \"object\") {\n\t\tfor(var name in event.paramObject) {\n\t\t\taddField(name,event.paramObject[name]);\n\t\t}\n\t}\n\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,addition));\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleRemoveTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\tmodification = this.wiki.getModificationFields();\n\tif(tiddler && tiddler.fields.tags) {\n\t\tvar p = tiddler.fields.tags.indexOf(event.param);\n\t\tif(p !== -1) {\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\tmodification.tags.splice(p,1);\n\t\t\tif(modification.tags.length === 0) {\n\t\t\t\tmodification.tags = undefined;\n\t\t\t}\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\n\t\t}\n\t}\n\treturn true;\n};\n\nFieldManglerWidget.prototype.handleAddTagEvent = function(event) {\n\tvar tiddler = this.wiki.getTiddler(this.mangleTitle),\n\t\tmodification = this.wiki.getModificationFields();\n\tif(tiddler && typeof event.param === \"string\") {\n\t\tvar tag = event.param.trim();\n\t\tif(tag !== \"\") {\n\t\t\tmodification.tags = (tiddler.fields.tags || []).slice(0);\n\t\t\t$tw.utils.pushTop(modification.tags,tag);\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));\t\t\t\n\t\t}\n\t} else if(typeof event.param === \"string\" && event.param.trim() !== \"\" && this.mangleTitle.trim() !== \"\") {\n\t\tvar tag = [];\n\t\ttag.push(event.param.trim());\n\t\tthis.wiki.addTiddler(new $tw.Tiddler({title: this.mangleTitle, tags: tag},modification));\n\t}\n\treturn true;\n};\n\nexports.fieldmangler = FieldManglerWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/fields.js": {
"title": "$:/core/modules/widgets/fields.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/fields.js\ntype: application/javascript\nmodule-type: widget\n\nFields widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar FieldsWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nFieldsWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFieldsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar textNode = this.document.createTextNode(this.text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFieldsWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.template = this.getAttribute(\"template\");\n\tthis.exclude = this.getAttribute(\"exclude\");\n\tthis.stripTitlePrefix = this.getAttribute(\"stripTitlePrefix\",\"no\") === \"yes\";\n\t// Get the value to display\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\n\t// Get the exclusion list\n\tvar exclude;\n\tif(this.exclude) {\n\t\texclude = this.exclude.split(\" \");\n\t} else {\n\t\texclude = [\"text\"]; \n\t}\n\t// Compose the template\n\tvar text = [];\n\tif(this.template && tiddler) {\n\t\tvar fields = [];\n\t\tfor(var fieldName in tiddler.fields) {\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tfields.push(fieldName);\n\t\t\t}\n\t\t}\n\t\tfields.sort();\n\t\tfor(var f=0; f<fields.length; f++) {\n\t\t\tfieldName = fields[f];\n\t\t\tif(exclude.indexOf(fieldName) === -1) {\n\t\t\t\tvar row = this.template,\n\t\t\t\t\tvalue = tiddler.getFieldString(fieldName);\n\t\t\t\tif(this.stripTitlePrefix && fieldName === \"title\") {\n\t\t\t\t\tvar reStrip = /^\\{[^\\}]+\\}(.+)/mg,\n\t\t\t\t\t\treMatch = reStrip.exec(value);\n\t\t\t\t\tif(reMatch) {\n\t\t\t\t\t\tvalue = reMatch[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trow = $tw.utils.replaceString(row,\"$name$\",fieldName);\n\t\t\t\trow = $tw.utils.replaceString(row,\"$value$\",value);\n\t\t\t\trow = $tw.utils.replaceString(row,\"$encoded_value$\",$tw.utils.htmlEncode(value));\n\t\t\t\ttext.push(row);\n\t\t\t}\n\t\t}\n\t}\n\tthis.text = text.join(\"\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFieldsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.template || changedAttributes.exclude || changedAttributes.stripTitlePrefix || changedTiddlers[this.tiddlerTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.fields = FieldsWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/image.js": {
"title": "$:/core/modules/widgets/image.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/image.js\ntype: application/javascript\nmodule-type: widget\n\nThe image widget displays an image referenced with an external URI or with a local tiddler title.\n\n```\n<$image src=\"TiddlerTitle\" width=\"320\" height=\"400\" class=\"classnames\">\n```\n\nThe image source can be the title of an existing tiddler or the URL of an external image.\n\nExternal images always generate an HTML `<img>` tag.\n\nTiddlers that have a _canonical_uri field generate an HTML `<img>` tag with the src attribute containing the URI.\n\nTiddlers that contain image data generate an HTML `<img>` tag with the src attribute containing a base64 representation of the image.\n\nTiddlers that contain wikitext could be rendered to a DIV of the usual size of a tiddler, and then transformed to the size requested.\n\nThe width and height attributes are interpreted as a number of pixels, and do not need to include the \"px\" suffix.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ImageWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImageWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImageWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create element\n\t// Determine what type of image it is\n\tvar tag = \"img\", src = \"\",\n\t\ttiddler = this.wiki.getTiddler(this.imageSource);\n\tif(!tiddler) {\n\t\t// The source isn't the title of a tiddler, so we'll assume it's a URL\n\t\tsrc = this.getVariable(\"tv-get-export-image-link\",{params: [{name: \"src\",value: this.imageSource}],defaultValue: this.imageSource});\n\t} else {\n\t\t// Check if it is an image tiddler\n\t\tif(this.wiki.isImageTiddler(this.imageSource)) {\n\t\t\tvar type = tiddler.fields.type,\n\t\t\t\ttext = tiddler.fields.text,\n\t\t\t\t_canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t// If the tiddler has body text then it doesn't need to be lazily loaded\n\t\t\tif(text) {\n\t\t\t\t// Render the appropriate element for the image type\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \"application/pdf\":\n\t\t\t\t\t\ttag = \"embed\";\n\t\t\t\t\t\tsrc = \"data:application/pdf;base64,\" + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/svg+xml\":\n\t\t\t\t\t\tsrc = \"data:image/svg+xml,\" + encodeURIComponent(text);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = \"data:\" + type + \";base64,\" + text;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if(_canonical_uri) {\n\t\t\t\tswitch(type) {\n\t\t\t\t\tcase \"application/pdf\":\n\t\t\t\t\t\ttag = \"embed\";\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"image/svg+xml\":\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsrc = _canonical_uri;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\n\t\t\t} else {\n\t\t\t\t// Just trigger loading of the tiddler\n\t\t\t\tthis.wiki.getTiddlerText(this.imageSource);\n\t\t\t}\n\t\t}\n\t}\n\t// Create the element and assign the attributes\n\tvar domNode = this.document.createElement(tag);\n\tdomNode.setAttribute(\"src\",src);\n\tif(this.imageClass) {\n\t\tdomNode.setAttribute(\"class\",this.imageClass);\t\t\n\t}\n\tif(this.imageWidth) {\n\t\tdomNode.setAttribute(\"width\",this.imageWidth);\n\t}\n\tif(this.imageHeight) {\n\t\tdomNode.setAttribute(\"height\",this.imageHeight);\n\t}\n\tif(this.imageTooltip) {\n\t\tdomNode.setAttribute(\"title\",this.imageTooltip);\t\t\n\t}\n\tif(this.imageAlt) {\n\t\tdomNode.setAttribute(\"alt\",this.imageAlt);\t\t\n\t}\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.domNodes.push(domNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImageWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.imageSource = this.getAttribute(\"source\");\n\tthis.imageWidth = this.getAttribute(\"width\");\n\tthis.imageHeight = this.getAttribute(\"height\");\n\tthis.imageClass = this.getAttribute(\"class\");\n\tthis.imageTooltip = this.getAttribute(\"tooltip\");\n\tthis.imageAlt = this.getAttribute(\"alt\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImageWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.source || changedAttributes.width || changedAttributes.height || changedAttributes[\"class\"] || changedAttributes.tooltip || changedTiddlers[this.imageSource]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\t\n\t}\n};\n\nexports.image = ImageWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/importvariables.js": {
"title": "$:/core/modules/widgets/importvariables.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/importvariables.js\ntype: application/javascript\nmodule-type: widget\n\nImport variable definitions from other tiddlers\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ImportVariablesWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nImportVariablesWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nImportVariablesWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nImportVariablesWidget.prototype.execute = function(tiddlerList) {\n\tvar self = this;\n\t// Get our parameters\n\tthis.filter = this.getAttribute(\"filter\");\n\t// Compute the filter\n\tthis.tiddlerList = tiddlerList || this.wiki.filterTiddlers(this.filter,this);\n\t// Accumulate the <$set> widgets from each tiddler\n\tvar widgetStackStart,widgetStackEnd;\n\tfunction addWidgetNode(widgetNode) {\n\t\tif(widgetNode) {\n\t\t\tif(!widgetStackStart && !widgetStackEnd) {\n\t\t\t\twidgetStackStart = widgetNode;\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t} else {\n\t\t\t\twidgetStackEnd.children = [widgetNode];\n\t\t\t\twidgetStackEnd = widgetNode;\n\t\t\t}\n\t\t}\n\t}\n\t$tw.utils.each(this.tiddlerList,function(title) {\n\t\tvar parser = self.wiki.parseTiddler(title);\n\t\tif(parser) {\n\t\t\tvar parseTreeNode = parser.tree[0];\n\t\t\twhile(parseTreeNode && parseTreeNode.type === \"set\") {\n\t\t\t\taddWidgetNode({\n\t\t\t\t\ttype: \"set\",\n\t\t\t\t\tattributes: parseTreeNode.attributes,\n\t\t\t\t\tparams: parseTreeNode.params\n\t\t\t\t});\n\t\t\t\tparseTreeNode = parseTreeNode.children[0];\n\t\t\t}\n\t\t} \n\t});\n\t// Add our own children to the end of the pile\n\tvar parseTreeNodes;\n\tif(widgetStackStart && widgetStackEnd) {\n\t\tparseTreeNodes = [widgetStackStart];\n\t\twidgetStackEnd.children = this.parseTreeNode.children;\n\t} else {\n\t\tparseTreeNodes = this.parseTreeNode.children;\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nImportVariablesWidget.prototype.refresh = function(changedTiddlers) {\n\t// Recompute our attributes and the filter list\n\tvar changedAttributes = this.computeAttributes(),\n\t\ttiddlerList = this.wiki.filterTiddlers(this.getAttribute(\"filter\"),this);\n\t// Refresh if the filter has changed, or the list of tiddlers has changed, or any of the tiddlers in the list has changed\n\tfunction haveListedTiddlersChanged() {\n\t\tvar changed = false;\n\t\ttiddlerList.forEach(function(title) {\n\t\t\tif(changedTiddlers[title]) {\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t});\n\t\treturn changed;\n\t}\n\tif(changedAttributes.filter || !$tw.utils.isArrayEqual(this.tiddlerList,tiddlerList) || haveListedTiddlersChanged()) {\n\t\t// Compute the filter\n\t\tthis.removeChildDomNodes();\n\t\tthis.execute(tiddlerList);\n\t\tthis.renderChildren(this.parentDomNode,this.findNextSiblingDomNode());\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.importvariables = ImportVariablesWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/keyboard.js": {
"title": "$:/core/modules/widgets/keyboard.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/keyboard.js\ntype: application/javascript\nmodule-type: widget\n\nKeyboard shortcut widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar KeyboardWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nKeyboardWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nKeyboardWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar tag = this.parseTreeNode.isBlock ? \"div\" : \"span\";\n\tif(this.tag && $tw.config.htmlUnsafeElements.indexOf(this.tag) === -1) {\n\t\ttag = this.tag;\n\t}\n\t// Create element\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = (this[\"class\"] || \"\").split(\" \");\n\tclasses.push(\"tc-keyboard\");\n\tdomNode.className = classes.join(\" \");\n\t// Add a keyboard event handler\n\tdomNode.addEventListener(\"keydown\",function (event) {\n\t\tif($tw.keyboardManager.checkKeyDescriptors(event,self.keyInfoArray)) {\n\t\t\tself.invokeActions(self,event);\n\t\t\tif(self.actions) {\n\t\t\t\tself.invokeActionString(self.actions,self,event);\n\t\t\t}\n\t\t\tself.dispatchMessage(event);\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t},false);\n\t// Insert element\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nKeyboardWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\")});\n};\n\n/*\nCompute the internal state of the widget\n*/\nKeyboardWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.actions = this.getAttribute(\"actions\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.key = this.getAttribute(\"key\");\n\tthis.tag = this.getAttribute(\"tag\");\n\tthis.keyInfoArray = $tw.keyboardManager.parseKeyDescriptors(this.key);\n\tthis[\"class\"] = this.getAttribute(\"class\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nKeyboardWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.message || changedAttributes.param || changedAttributes.key || changedAttributes[\"class\"] || changedAttributes.tag) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.keyboard = KeyboardWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/link.js": {
"title": "$:/core/modules/widgets/link.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/link.js\ntype: application/javascript\nmodule-type: widget\n\nLink widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\nvar MISSING_LINK_CONFIG_TITLE = \"$:/config/MissingLinks\";\n\nvar LinkWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the value of the tv-wikilinks configuration macro\n\tvar wikiLinksMacro = this.getVariable(\"tv-wikilinks\"),\n\t\tuseWikiLinks = wikiLinksMacro ? (wikiLinksMacro.trim() !== \"no\") : true,\n\t\tmissingLinksEnabled = !(this.hideMissingLinks && this.isMissing && !this.isShadow);\n\t// Render the link if required\n\tif(useWikiLinks && missingLinksEnabled) {\n\t\tthis.renderLink(parent,nextSibling);\n\t} else {\n\t\t// Just insert the link text\n\t\tvar domNode = this.document.createElement(\"span\");\n\t\tparent.insertBefore(domNode,nextSibling);\n\t\tthis.renderChildren(domNode,null);\n\t\tthis.domNodes.push(domNode);\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nLinkWidget.prototype.renderLink = function(parent,nextSibling) {\n\tvar self = this;\n\t// Sanitise the specified tag\n\tvar tag = this.linkTag;\n\tif($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) {\n\t\ttag = \"a\";\n\t}\n\t// Create our element\n\tvar domNode = this.document.createElement(tag);\n\t// Assign classes\n\tvar classes = [];\n\tif(this.linkClasses) {\n\t\tclasses.push(this.linkClasses);\n\t}\n\tclasses.push(\"tc-tiddlylink\");\n\tif(this.isShadow) {\n\t\tclasses.push(\"tc-tiddlylink-shadow\");\n\t}\n\tif(this.isMissing && !this.isShadow) {\n\t\tclasses.push(\"tc-tiddlylink-missing\");\n\t} else {\n\t\tif(!this.isMissing) {\n\t\t\tclasses.push(\"tc-tiddlylink-resolves\");\n\t\t}\n\t}\n\tdomNode.setAttribute(\"class\",classes.join(\" \"));\n\t// Set an href\n\tvar wikilinkTransformFilter = this.getVariable(\"tv-filter-export-link\"),\n\t\twikiLinkText;\n\tif(wikilinkTransformFilter) {\n\t\t// Use the filter to construct the href\n\t\twikiLinkText = this.wiki.filterTiddlers(wikilinkTransformFilter,this,function(iterator) {\n\t\t\titerator(self.wiki.getTiddler(self.to),self.to)\n\t\t})[0];\n\t} else {\n\t\t// Expand the tv-wikilink-template variable to construct the href\n\t\tvar wikiLinkTemplateMacro = this.getVariable(\"tv-wikilink-template\"),\n\t\t\twikiLinkTemplate = wikiLinkTemplateMacro ? wikiLinkTemplateMacro.trim() : \"#$uri_encoded$\";\n\t\twikiLinkText = $tw.utils.replaceString(wikiLinkTemplate,\"$uri_encoded$\",encodeURIComponent(this.to));\n\t\twikiLinkText = $tw.utils.replaceString(wikiLinkText,\"$uri_doubleencoded$\",encodeURIComponent(encodeURIComponent(this.to)));\n\t}\n\t// Override with the value of tv-get-export-link if defined\n\twikiLinkText = this.getVariable(\"tv-get-export-link\",{params: [{name: \"to\",value: this.to}],defaultValue: wikiLinkText});\n\tif(tag === \"a\") {\n\t\tdomNode.setAttribute(\"href\",wikiLinkText);\n\t}\n\t// Set the tabindex\n\tif(this.tabIndex) {\n\t\tdomNode.setAttribute(\"tabindex\",this.tabIndex);\n\t}\n\t// Set the tooltip\n\t// HACK: Performance issues with re-parsing the tooltip prevent us defaulting the tooltip to \"<$transclude field='tooltip'><$transclude field='title'/></$transclude>\"\n\tvar tooltipWikiText = this.tooltip || this.getVariable(\"tv-wikilink-tooltip\");\n\tif(tooltipWikiText) {\n\t\tvar tooltipText = this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",tooltipWikiText,{\n\t\t\t\tparseAsInline: true,\n\t\t\t\tvariables: {\n\t\t\t\t\tcurrentTiddler: this.to\n\t\t\t\t},\n\t\t\t\tparentWidget: this\n\t\t\t});\n\t\tdomNode.setAttribute(\"title\",tooltipText);\n\t}\n\tif(this[\"aria-label\"]) {\n\t\tdomNode.setAttribute(\"aria-label\",this[\"aria-label\"]);\n\t}\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"click\", handlerObject: this, handlerMethod: \"handleClickEvent\"},\n\t]);\n\t// Make the link draggable if required\n\tif(this.draggable === \"yes\") {\n\t\t$tw.utils.makeDraggable({\n\t\t\tdomNode: domNode,\n\t\t\tdragTiddlerFn: function() {return self.to;},\n\t\t\twidget: this\n\t\t});\n\t}\n\t// Insert the link into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nLinkWidget.prototype.handleClickEvent = function(event) {\n\t// Send the click on its way as a navigate event\n\tvar bounds = this.domNodes[0].getBoundingClientRect();\n\tthis.dispatchEvent({\n\t\ttype: \"tm-navigate\",\n\t\tnavigateTo: this.to,\n\t\tnavigateFromTitle: this.getVariable(\"storyTiddler\"),\n\t\tnavigateFromNode: this,\n\t\tnavigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height\n\t\t},\n\t\tnavigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1),\n\t\tmetaKey: event.metaKey,\n\t\tctrlKey: event.ctrlKey,\n\t\taltKey: event.altKey,\n\t\tshiftKey: event.shiftKey\n\t});\n\tif(this.domNodes[0].hasAttribute(\"href\")) {\n\t\tevent.preventDefault();\n\t}\n\tevent.stopPropagation();\n\treturn false;\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkWidget.prototype.execute = function() {\n\t// Pick up our attributes\n\tthis.to = this.getAttribute(\"to\",this.getVariable(\"currentTiddler\"));\n\tthis.tooltip = this.getAttribute(\"tooltip\");\n\tthis[\"aria-label\"] = this.getAttribute(\"aria-label\");\n\tthis.linkClasses = this.getAttribute(\"class\");\n\tthis.tabIndex = this.getAttribute(\"tabindex\");\n\tthis.draggable = this.getAttribute(\"draggable\",\"yes\");\n\tthis.linkTag = this.getAttribute(\"tag\",\"a\");\n\t// Determine the link characteristics\n\tthis.isMissing = !this.wiki.tiddlerExists(this.to);\n\tthis.isShadow = this.wiki.isShadowTiddler(this.to);\n\tthis.hideMissingLinks = ($tw.wiki.getTiddlerText(MISSING_LINK_CONFIG_TITLE,\"yes\") === \"no\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedTiddlers[this.to] || changedAttributes[\"aria-label\"] || changedAttributes.tooltip || changedTiddlers[MISSING_LINK_CONFIG_TITLE]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.link = LinkWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/linkcatcher.js": {
"title": "$:/core/modules/widgets/linkcatcher.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/linkcatcher.js\ntype: application/javascript\nmodule-type: widget\n\nLinkcatcher widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar LinkCatcherWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nLinkCatcherWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nLinkCatcherWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nLinkCatcherWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.catchTo = this.getAttribute(\"to\");\n\tthis.catchMessage = this.getAttribute(\"message\");\n\tthis.catchSet = this.getAttribute(\"set\");\n\tthis.catchSetTo = this.getAttribute(\"setTo\");\n\tthis.catchActions = this.getAttribute(\"actions\");\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n\t// When executing actions we avoid trapping navigate events, so that we don't trigger ourselves recursively\n\tthis.executingActions = false;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nLinkCatcherWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.to || changedAttributes.message || changedAttributes.set || changedAttributes.setTo) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\n/*\nHandle a tm-navigate event\n*/\nLinkCatcherWidget.prototype.handleNavigateEvent = function(event) {\n\tif(!this.executingActions) {\n\t\t// Execute the actions\n\t\tif(this.catchTo) {\n\t\t\tthis.wiki.setTextReference(this.catchTo,event.navigateTo,this.getVariable(\"currentTiddler\"));\n\t\t}\n\t\tif(this.catchMessage && this.parentWidget) {\n\t\t\tthis.parentWidget.dispatchEvent({\n\t\t\t\ttype: this.catchMessage,\n\t\t\t\tparam: event.navigateTo,\n\t\t\t\tnavigateTo: event.navigateTo\n\t\t\t});\n\t\t}\n\t\tif(this.catchSet) {\n\t\t\tvar tiddler = this.wiki.getTiddler(this.catchSet);\n\t\t\tthis.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.catchSet, text: this.catchSetTo}));\n\t\t}\n\t\tif(this.catchActions) {\n\t\t\tthis.executingActions = true;\n\t\t\tthis.invokeActionString(this.catchActions,this,event,{navigateTo: event.navigateTo});\n\t\t\tthis.executingActions = false;\n\t\t}\n\t} else {\n\t\t// This is a navigate event generated by the actions of this linkcatcher, so we don't trap it again, but just pass it to the parent\n\t\tthis.parentWidget.dispatchEvent({\n\t\t\ttype: \"tm-navigate\",\n\t\t\tparam: event.navigateTo,\n\t\t\tnavigateTo: event.navigateTo\n\t\t});\n\t}\n\treturn false;\n};\n\nexports.linkcatcher = LinkCatcherWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/list.js": {
"title": "$:/core/modules/widgets/list.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/list.js\ntype: application/javascript\nmodule-type: widget\n\nList and list item widgets\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\n/*\nThe list widget creates list element sub-widgets that reach back into the list widget for their configuration\n*/\n\nvar ListWidget = function(parseTreeNode,options) {\n\t// Initialise the storyviews if they've not been done already\n\tif(!this.storyViews) {\n\t\tListWidget.prototype.storyViews = {};\n\t\t$tw.modules.applyMethods(\"storyview\",this.storyViews);\n\t}\n\t// Main initialisation inherited from widget.js\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\t// Construct the storyview\n\tvar StoryView = this.storyViews[this.storyViewName];\n\tif(this.storyViewName && !StoryView) {\n\t\tStoryView = this.storyViews[\"classic\"];\n\t}\n\tif(StoryView && !this.document.isTiddlyWikiFakeDom) {\n\t\tthis.storyview = new StoryView(this);\n\t} else {\n\t\tthis.storyview = null;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nListWidget.prototype.execute = function() {\n\t// Get our attributes\n\tthis.template = this.getAttribute(\"template\");\n\tthis.editTemplate = this.getAttribute(\"editTemplate\");\n\tthis.variableName = this.getAttribute(\"variable\",\"currentTiddler\");\n\tthis.storyViewName = this.getAttribute(\"storyview\");\n\tthis.historyTitle = this.getAttribute(\"history\");\n\t// Compose the list elements\n\tthis.list = this.getTiddlerList();\n\tvar members = [],\n\t\tself = this;\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\tmembers = this.getEmptyMessage();\n\t} else {\n\t\t$tw.utils.each(this.list,function(title,index) {\n\t\t\tmembers.push(self.makeItemTemplate(title));\n\t\t});\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(members);\n\t// Clear the last history\n\tthis.history = [];\n};\n\nListWidget.prototype.getTiddlerList = function() {\n\tvar defaultFilter = \"[!is[system]sort[title]]\";\n\treturn this.wiki.filterTiddlers(this.getAttribute(\"filter\",defaultFilter),this);\n};\n\nListWidget.prototype.getEmptyMessage = function() {\n\tvar emptyMessage = this.getAttribute(\"emptyMessage\",\"\"),\n\t\tparser = this.wiki.parseText(\"text/vnd.tiddlywiki\",emptyMessage,{parseAsInline: true});\n\tif(parser) {\n\t\treturn parser.tree;\n\t} else {\n\t\treturn [];\n\t}\n};\n\n/*\nCompose the template for a list item\n*/\nListWidget.prototype.makeItemTemplate = function(title) {\n\t// Check if the tiddler is a draft\n\tvar tiddler = this.wiki.getTiddler(title),\n\t\tisDraft = tiddler && tiddler.hasField(\"draft.of\"),\n\t\ttemplate = this.template,\n\t\ttemplateTree;\n\tif(isDraft && this.editTemplate) {\n\t\ttemplate = this.editTemplate;\n\t}\n\t// Compose the transclusion of the template\n\tif(template) {\n\t\ttemplateTree = [{type: \"transclude\", attributes: {tiddler: {type: \"string\", value: template}}}];\n\t} else {\n\t\tif(this.parseTreeNode.children && this.parseTreeNode.children.length > 0) {\n\t\t\ttemplateTree = this.parseTreeNode.children;\n\t\t} else {\n\t\t\t// Default template is a link to the title\n\t\t\ttemplateTree = [{type: \"element\", tag: this.parseTreeNode.isBlock ? \"div\" : \"span\", children: [{type: \"link\", attributes: {to: {type: \"string\", value: title}}, children: [\n\t\t\t\t\t{type: \"text\", text: title}\n\t\t\t]}]}];\n\t\t}\n\t}\n\t// Return the list item\n\treturn {type: \"listitem\", itemTitle: title, variableName: this.variableName, children: templateTree};\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\tresult;\n\t// Call the storyview\n\tif(this.storyview && this.storyview.refreshStart) {\n\t\tthis.storyview.refreshStart(changedTiddlers,changedAttributes);\n\t}\n\t// Completely refresh if any of our attributes have changed\n\tif(changedAttributes.filter || changedAttributes.template || changedAttributes.editTemplate || changedAttributes.emptyMessage || changedAttributes.storyview || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\tresult = true;\n\t} else {\n\t\t// Handle any changes to the list\n\t\tresult = this.handleListChanges(changedTiddlers);\n\t\t// Handle any changes to the history stack\n\t\tif(this.historyTitle && changedTiddlers[this.historyTitle]) {\n\t\t\tthis.handleHistoryChanges();\n\t\t}\n\t}\n\t// Call the storyview\n\tif(this.storyview && this.storyview.refreshEnd) {\n\t\tthis.storyview.refreshEnd(changedTiddlers,changedAttributes);\n\t}\n\treturn result;\n};\n\n/*\nHandle any changes to the history list\n*/\nListWidget.prototype.handleHistoryChanges = function() {\n\t// Get the history data\n\tvar newHistory = this.wiki.getTiddlerDataCached(this.historyTitle,[]);\n\t// Ignore any entries of the history that match the previous history\n\tvar entry = 0;\n\twhile(entry < newHistory.length && entry < this.history.length && newHistory[entry].title === this.history[entry].title) {\n\t\tentry++;\n\t}\n\t// Navigate forwards to each of the new tiddlers\n\twhile(entry < newHistory.length) {\n\t\tif(this.storyview && this.storyview.navigateTo) {\n\t\t\tthis.storyview.navigateTo(newHistory[entry]);\n\t\t}\n\t\tentry++;\n\t}\n\t// Update the history\n\tthis.history = newHistory;\n};\n\n/*\nProcess any changes to the list\n*/\nListWidget.prototype.handleListChanges = function(changedTiddlers) {\n\t// Get the new list\n\tvar prevList = this.list;\n\tthis.list = this.getTiddlerList();\n\t// Check for an empty list\n\tif(this.list.length === 0) {\n\t\t// Check if it was empty before\n\t\tif(prevList.length === 0) {\n\t\t\t// If so, just refresh the empty message\n\t\t\treturn this.refreshChildren(changedTiddlers);\n\t\t} else {\n\t\t\t// Replace the previous content with the empty message\n\t\t\tfor(t=this.children.length-1; t>=0; t--) {\n\t\t\t\tthis.removeListItem(t);\n\t\t\t}\n\t\t\tvar nextSibling = this.findNextSiblingDomNode();\n\t\t\tthis.makeChildWidgets(this.getEmptyMessage());\n\t\t\tthis.renderChildren(this.parentDomNode,nextSibling);\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\t// If the list was empty then we need to remove the empty message\n\t\tif(prevList.length === 0) {\n\t\t\tthis.removeChildDomNodes();\n\t\t\tthis.children = [];\n\t\t}\n\t\t// Cycle through the list, inserting and removing list items as needed\n\t\tvar hasRefreshed = false;\n\t\tfor(var t=0; t<this.list.length; t++) {\n\t\t\tvar index = this.findListItem(t,this.list[t]);\n\t\t\tif(index === undefined) {\n\t\t\t\t// The list item must be inserted\n\t\t\t\tthis.insertListItem(t,this.list[t]);\n\t\t\t\thasRefreshed = true;\n\t\t\t} else {\n\t\t\t\t// There are intervening list items that must be removed\n\t\t\t\tfor(var n=index-1; n>=t; n--) {\n\t\t\t\t\tthis.removeListItem(n);\n\t\t\t\t\thasRefreshed = true;\n\t\t\t\t}\n\t\t\t\t// Refresh the item we're reusing\n\t\t\t\tvar refreshed = this.children[t].refresh(changedTiddlers);\n\t\t\t\thasRefreshed = hasRefreshed || refreshed;\n\t\t\t}\n\t\t}\n\t\t// Remove any left over items\n\t\tfor(t=this.children.length-1; t>=this.list.length; t--) {\n\t\t\tthis.removeListItem(t);\n\t\t\thasRefreshed = true;\n\t\t}\n\t\treturn hasRefreshed;\n\t}\n};\n\n/*\nFind the list item with a given title, starting from a specified position\n*/\nListWidget.prototype.findListItem = function(startIndex,title) {\n\twhile(startIndex < this.children.length) {\n\t\tif(this.children[startIndex].parseTreeNode.itemTitle === title) {\n\t\t\treturn startIndex;\n\t\t}\n\t\tstartIndex++;\n\t}\n\treturn undefined;\n};\n\n/*\nInsert a new list item at the specified index\n*/\nListWidget.prototype.insertListItem = function(index,title) {\n\t// Create, insert and render the new child widgets\n\tvar widget = this.makeChildWidget(this.makeItemTemplate(title));\n\twidget.parentDomNode = this.parentDomNode; // Hack to enable findNextSiblingDomNode() to work\n\tthis.children.splice(index,0,widget);\n\tvar nextSibling = widget.findNextSiblingDomNode();\n\twidget.render(this.parentDomNode,nextSibling);\n\t// Animate the insertion if required\n\tif(this.storyview && this.storyview.insert) {\n\t\tthis.storyview.insert(widget);\n\t}\n\treturn true;\n};\n\n/*\nRemove the specified list item\n*/\nListWidget.prototype.removeListItem = function(index) {\n\tvar widget = this.children[index];\n\t// Animate the removal if required\n\tif(this.storyview && this.storyview.remove) {\n\t\tthis.storyview.remove(widget);\n\t} else {\n\t\twidget.removeChildDomNodes();\n\t}\n\t// Remove the child widget\n\tthis.children.splice(index,1);\n};\n\nexports.list = ListWidget;\n\nvar ListItemWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nListItemWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nListItemWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nListItemWidget.prototype.execute = function() {\n\t// Set the current list item title\n\tthis.setVariable(this.parseTreeNode.variableName,this.parseTreeNode.itemTitle);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nListItemWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.listitem = ListItemWidget;\n\n})();",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/macrocall.js": {
"title": "$:/core/modules/widgets/macrocall.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/macrocall.js\ntype: application/javascript\nmodule-type: widget\n\nMacrocall widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar MacroCallWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nMacroCallWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nMacroCallWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nMacroCallWidget.prototype.execute = function() {\n\t// Get the parse type if specified\n\tthis.parseType = this.getAttribute(\"$type\",\"text/vnd.tiddlywiki\");\n\tthis.renderOutput = this.getAttribute(\"$output\",\"text/html\");\n\t// Merge together the parameters specified in the parse tree with the specified attributes\n\tvar params = this.parseTreeNode.params ? this.parseTreeNode.params.slice(0) : [];\n\t$tw.utils.each(this.attributes,function(attribute,name) {\n\t\tif(name.charAt(0) !== \"$\") {\n\t\t\tparams.push({name: name, value: attribute});\t\t\t\n\t\t}\n\t});\n\t// Get the macro value\n\tvar text = this.getVariable(this.parseTreeNode.name || this.getAttribute(\"$name\"),{params: params}),\n\t\tparseTreeNodes;\n\t// Are we rendering to HTML?\n\tif(this.renderOutput === \"text/html\") {\n\t\t// If so we'll return the parsed macro\n\t\tvar parser = this.wiki.parseText(this.parseType,text,\n\t\t\t\t\t\t\t{parseAsInline: !this.parseTreeNode.isBlock});\n\t\tparseTreeNodes = parser ? parser.tree : [];\n\t} else {\n\t\t// Otherwise, we'll render the text\n\t\tvar plainText = this.wiki.renderText(\"text/plain\",this.parseType,text,{parentWidget: this});\n\t\tparseTreeNodes = [{type: \"text\", text: plainText}];\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nMacroCallWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif($tw.utils.count(changedAttributes) > 0) {\n\t\t// Rerender ourselves\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.macrocall = MacroCallWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/navigator.js": {
"title": "$:/core/modules/widgets/navigator.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/navigator.js\ntype: application/javascript\nmodule-type: widget\n\nNavigator widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar IMPORT_TITLE = \"$:/Import\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar NavigatorWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.addEventListeners([\n\t\t{type: \"tm-navigate\", handler: \"handleNavigateEvent\"},\n\t\t{type: \"tm-edit-tiddler\", handler: \"handleEditTiddlerEvent\"},\n\t\t{type: \"tm-delete-tiddler\", handler: \"handleDeleteTiddlerEvent\"},\n\t\t{type: \"tm-save-tiddler\", handler: \"handleSaveTiddlerEvent\"},\n\t\t{type: \"tm-cancel-tiddler\", handler: \"handleCancelTiddlerEvent\"},\n\t\t{type: \"tm-close-tiddler\", handler: \"handleCloseTiddlerEvent\"},\n\t\t{type: \"tm-close-all-tiddlers\", handler: \"handleCloseAllTiddlersEvent\"},\n\t\t{type: \"tm-close-other-tiddlers\", handler: \"handleCloseOtherTiddlersEvent\"},\n\t\t{type: \"tm-new-tiddler\", handler: \"handleNewTiddlerEvent\"},\n\t\t{type: \"tm-import-tiddlers\", handler: \"handleImportTiddlersEvent\"},\n\t\t{type: \"tm-perform-import\", handler: \"handlePerformImportEvent\"},\n\t\t{type: \"tm-fold-tiddler\", handler: \"handleFoldTiddlerEvent\"},\n\t\t{type: \"tm-fold-other-tiddlers\", handler: \"handleFoldOtherTiddlersEvent\"},\n\t\t{type: \"tm-fold-all-tiddlers\", handler: \"handleFoldAllTiddlersEvent\"},\n\t\t{type: \"tm-unfold-all-tiddlers\", handler: \"handleUnfoldAllTiddlersEvent\"},\n\t\t{type: \"tm-rename-tiddler\", handler: \"handleRenameTiddlerEvent\"}\n\t]);\n};\n\n/*\nInherit from the base widget class\n*/\nNavigatorWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nNavigatorWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nNavigatorWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.storyTitle = this.getAttribute(\"story\");\n\tthis.historyTitle = this.getAttribute(\"history\");\n\tthis.setVariable(\"tv-story-list\",this.storyTitle);\n\tthis.setVariable(\"tv-history-list\",this.historyTitle);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nNavigatorWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.story || changedAttributes.history) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nNavigatorWidget.prototype.getStoryList = function() {\n\treturn this.storyTitle ? this.wiki.getTiddlerList(this.storyTitle) : null;\n};\n\nNavigatorWidget.prototype.saveStoryList = function(storyList) {\n\tvar storyTiddler = this.wiki.getTiddler(this.storyTitle);\n\tthis.wiki.addTiddler(new $tw.Tiddler(\n\t\t{title: this.storyTitle},\n\t\tstoryTiddler,\n\t\t{list: storyList}\n\t));\n};\n\nNavigatorWidget.prototype.removeTitleFromStory = function(storyList,title) {\n\tvar p = storyList.indexOf(title);\n\twhile(p !== -1) {\n\t\tstoryList.splice(p,1);\n\t\tp = storyList.indexOf(title);\n\t}\n};\n\nNavigatorWidget.prototype.replaceFirstTitleInStory = function(storyList,oldTitle,newTitle) {\n\tvar pos = storyList.indexOf(oldTitle);\n\tif(pos !== -1) {\n\t\tstoryList[pos] = newTitle;\n\t\tdo {\n\t\t\tpos = storyList.indexOf(oldTitle,pos + 1);\n\t\t\tif(pos !== -1) {\n\t\t\t\tstoryList.splice(pos,1);\n\t\t\t}\n\t\t} while(pos !== -1);\n\t} else {\n\t\tstoryList.splice(0,0,newTitle);\n\t}\n};\n\nNavigatorWidget.prototype.addToStory = function(title,fromTitle) {\n\tvar storyList = this.getStoryList();\n\t// Quit if we cannot get hold of the story list\n\tif(!storyList) {\n\t\treturn;\n\t}\n\t// See if the tiddler is already there\n\tvar slot = storyList.indexOf(title);\n\t// Quit if it already exists in the story river\n\tif(slot >= 0) {\n\t\treturn;\n\t}\n\t// First we try to find the position of the story element we navigated from\n\tvar fromIndex = storyList.indexOf(fromTitle);\n\tif(fromIndex >= 0) {\n\t\t// The tiddler is added from inside the river\n\t\t// Determine where to insert the tiddler; Fallback is \"below\"\n\t\tswitch(this.getAttribute(\"openLinkFromInsideRiver\",\"below\")) {\n\t\t\tcase \"top\":\n\t\t\t\tslot = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"bottom\":\n\t\t\t\tslot = storyList.length;\n\t\t\t\tbreak;\n\t\t\tcase \"above\":\n\t\t\t\tslot = fromIndex;\n\t\t\t\tbreak;\n\t\t\tcase \"below\": // Intentional fall-through\n\t\t\tdefault:\n\t\t\t\tslot = fromIndex + 1;\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t// The tiddler is opened from outside the river. Determine where to insert the tiddler; default is \"top\"\n\t\tif(this.getAttribute(\"openLinkFromOutsideRiver\",\"top\") === \"bottom\") {\n\t\t\t// Insert at bottom\n\t\t\tslot = storyList.length;\n\t\t} else {\n\t\t\t// Insert at top\n\t\t\tslot = 0;\n\t\t}\n\t}\n\t// Add the tiddler\n\tstoryList.splice(slot,0,title);\n\t// Save the story\n\tthis.saveStoryList(storyList);\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\n*/\nNavigatorWidget.prototype.addToHistory = function(title,fromPageRect) {\n\tthis.wiki.addToHistory(title,fromPageRect,this.historyTitle);\n};\n\n/*\nHandle a tm-navigate event\n*/\nNavigatorWidget.prototype.handleNavigateEvent = function(event) {\n\tevent = $tw.hooks.invokeHook(\"th-navigating\",event);\n\tif(event.navigateTo) {\n\t\tthis.addToStory(event.navigateTo,event.navigateFromTitle);\n\t\tif(!event.navigateSuppressNavigation) {\n\t\t\tthis.addToHistory(event.navigateTo,event.navigateFromClientRect);\n\t\t}\n\t}\n\treturn false;\n};\n\n// Close a specified tiddler\nNavigatorWidget.prototype.handleCloseTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\tstoryList = this.getStoryList();\n\t// Look for tiddlers with this title to close\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\treturn false;\n};\n\n// Close all tiddlers\nNavigatorWidget.prototype.handleCloseAllTiddlersEvent = function(event) {\n\tthis.saveStoryList([]);\n\treturn false;\n};\n\n// Close other tiddlers\nNavigatorWidget.prototype.handleCloseOtherTiddlersEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle;\n\tthis.saveStoryList([title]);\n\treturn false;\n};\n\n// Place a tiddler in edit mode\nNavigatorWidget.prototype.handleEditTiddlerEvent = function(event) {\n\tvar editTiddler = $tw.hooks.invokeHook(\"th-editing-tiddler\",event);\n\tif(!editTiddler) {\n\t\treturn false;\n\t}\n\tvar self = this;\n\tfunction isUnmodifiedShadow(title) {\n\t\treturn self.wiki.isShadowTiddler(title) && !self.wiki.tiddlerExists(title);\n\t}\n\tfunction confirmEditShadow(title) {\n\t\treturn confirm($tw.language.getString(\n\t\t\t\"ConfirmEditShadowTiddler\",\n\t\t\t{variables:\n\t\t\t\t{title: title}\n\t\t\t}\n\t\t));\n\t}\n\tvar title = event.param || event.tiddlerTitle;\n\tif(isUnmodifiedShadow(title) && !confirmEditShadow(title)) {\n\t\treturn false;\n\t}\n\t// Replace the specified tiddler with a draft in edit mode\n\tvar draftTiddler = this.makeDraftTiddler(title);\n\t// Update the story and history if required\n\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\tvar draftTitle = draftTiddler.fields.title,\n\t\t\tstoryList = this.getStoryList();\n\t\tthis.removeTitleFromStory(storyList,draftTitle);\n\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\t\tthis.saveStoryList(storyList);\n\t\treturn false;\n\t}\n};\n\n// Delete a tiddler\nNavigatorWidget.prototype.handleDeleteTiddlerEvent = function(event) {\n\t// Get the tiddler we're deleting\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList(),\n\t\toriginalTitle = tiddler ? tiddler.fields[\"draft.of\"] : \"\",\n\t\toriginalTiddler = originalTitle ? this.wiki.getTiddler(originalTitle) : undefined,\n\t\tconfirmationTitle;\n\tif(!tiddler) {\n\t\treturn false;\n\t}\n\t// Check if the tiddler we're deleting is in draft mode\n\tif(originalTitle) {\n\t\t// If so, we'll prompt for confirmation referencing the original tiddler\n\t\tconfirmationTitle = originalTitle;\n\t} else {\n\t\t// If not a draft, then prompt for confirmation referencing the specified tiddler\n\t\tconfirmationTitle = title;\n\t}\n\t// Seek confirmation\n\tif((this.wiki.getTiddler(originalTitle) || (tiddler.fields.text || \"\") !== \"\") && !confirm($tw.language.getString(\n\t\t\t\t\"ConfirmDeleteTiddler\",\n\t\t\t\t{variables:\n\t\t\t\t\t{title: confirmationTitle}\n\t\t\t\t}\n\t\t\t))) {\n\t\treturn false;\n\t}\n\t// Delete the original tiddler\n\tif(originalTitle) {\n\t\tif(originalTiddler) {\n\t\t\t$tw.hooks.invokeHook(\"th-deleting-tiddler\",originalTiddler);\n\t\t}\n\t\tthis.wiki.deleteTiddler(originalTitle);\n\t\tthis.removeTitleFromStory(storyList,originalTitle);\n\t}\n\t// Invoke the hook function and delete this tiddler\n\t$tw.hooks.invokeHook(\"th-deleting-tiddler\",tiddler);\n\tthis.wiki.deleteTiddler(title);\n\t// Remove the closed tiddler from the story\n\tthis.removeTitleFromStory(storyList,title);\n\tthis.saveStoryList(storyList);\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\treturn false;\n};\n\n/*\nCreate/reuse the draft tiddler for a given title\n*/\nNavigatorWidget.prototype.makeDraftTiddler = function(targetTitle) {\n\t// See if there is already a draft tiddler for this tiddler\n\tvar draftTitle = this.wiki.findDraft(targetTitle);\n\tif(draftTitle) {\n\t\treturn this.wiki.getTiddler(draftTitle);\n\t}\n\t// Get the current value of the tiddler we're editing\n\tvar tiddler = this.wiki.getTiddler(targetTitle);\n\t// Save the initial value of the draft tiddler\n\tdraftTitle = this.generateDraftTitle(targetTitle);\n\tvar draftTiddler = new $tw.Tiddler(\n\t\t\ttiddler,\n\t\t\t{\n\t\t\t\ttitle: draftTitle,\n\t\t\t\t\"draft.title\": targetTitle,\n\t\t\t\t\"draft.of\": targetTitle\n\t\t\t},\n\t\t\tthis.wiki.getModificationFields()\n\t\t);\n\tthis.wiki.addTiddler(draftTiddler);\n\treturn draftTiddler;\n};\n\n/*\nGenerate a title for the draft of a given tiddler\n*/\nNavigatorWidget.prototype.generateDraftTitle = function(title) {\n\tvar c = 0,\n\t\tdraftTitle;\n\tdo {\n\t\tdraftTitle = \"Draft \" + (c ? (c + 1) + \" \" : \"\") + \"of '\" + title + \"'\";\n\t\tc++;\n\t} while(this.wiki.tiddlerExists(draftTitle));\n\treturn draftTitle;\n};\n\n// Take a tiddler out of edit mode, saving the changes\nNavigatorWidget.prototype.handleSaveTiddlerEvent = function(event) {\n\tvar title = event.param || event.tiddlerTitle,\n\t\ttiddler = this.wiki.getTiddler(title),\n\t\tstoryList = this.getStoryList();\n\t// Replace the original tiddler with the draft\n\tif(tiddler) {\n\t\tvar draftTitle = (tiddler.fields[\"draft.title\"] || \"\").trim(),\n\t\t\tdraftOf = (tiddler.fields[\"draft.of\"] || \"\").trim();\n\t\tif(draftTitle) {\n\t\t\tvar isRename = draftOf !== draftTitle,\n\t\t\t\tisConfirmed = true;\n\t\t\tif(isRename && this.wiki.tiddlerExists(draftTitle)) {\n\t\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\t\"ConfirmOverwriteTiddler\",\n\t\t\t\t\t{variables:\n\t\t\t\t\t\t{title: draftTitle}\n\t\t\t\t\t}\n\t\t\t\t));\n\t\t\t}\n\t\t\tif(isConfirmed) {\n\t\t\t\t// Create the new tiddler and pass it through the th-saving-tiddler hook\n\t\t\t\tvar newTiddler = new $tw.Tiddler(this.wiki.getCreationFields(),tiddler,{\n\t\t\t\t\ttitle: draftTitle,\n\t\t\t\t\t\"draft.title\": undefined,\n\t\t\t\t\t\"draft.of\": undefined\n\t\t\t\t},this.wiki.getModificationFields());\n\t\t\t\tnewTiddler = $tw.hooks.invokeHook(\"th-saving-tiddler\",newTiddler);\n\t\t\t\tthis.wiki.addTiddler(newTiddler);\n\t\t\t\t// If enabled, relink references to renamed tiddler\n\t\t\t\tvar shouldRelink = this.getAttribute(\"relinkOnRename\",\"no\").toLowerCase().trim() === \"yes\";\n\t\t\t\tif(isRename && shouldRelink && this.wiki.tiddlerExists(draftOf)) {\nconsole.log(\"Relinking '\" + draftOf + \"' to '\" + draftTitle + \"'\");\n\t\t\t\t\tthis.wiki.relinkTiddler(draftOf,draftTitle);\n\t\t\t\t}\n\t\t\t\t// Remove the draft tiddler\n\t\t\t\tthis.wiki.deleteTiddler(title);\n\t\t\t\t// Remove the original tiddler if we're renaming it\n\t\t\t\tif(isRename) {\n\t\t\t\t\tthis.wiki.deleteTiddler(draftOf);\n\t\t\t\t}\n\t\t\t\t// #2381 always remove new title & old\n\t\t\t\tthis.removeTitleFromStory(storyList,draftTitle);\n\t\t\t\tthis.removeTitleFromStory(storyList,draftOf);\n\t\t\t\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\t\t\t\t// Replace the draft in the story with the original\n\t\t\t\t\tthis.replaceFirstTitleInStory(storyList,title,draftTitle);\n\t\t\t\t\tthis.addToHistory(draftTitle,event.navigateFromClientRect);\n\t\t\t\t\tif(draftTitle !== this.storyTitle) {\n\t\t\t\t\t\tthis.saveStoryList(storyList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Trigger an autosave\n\t\t\t\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\n// Take a tiddler out of edit mode without saving the changes\nNavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) {\n\t// Flip the specified tiddler from draft back to the original\n\tvar draftTitle = event.param || event.tiddlerTitle,\n\t\tdraftTiddler = this.wiki.getTiddler(draftTitle),\n\t\toriginalTitle = draftTiddler && draftTiddler.fields[\"draft.of\"];\n\tif(draftTiddler && originalTitle) {\n\t\t// Ask for confirmation if the tiddler text has changed\n\t\tvar isConfirmed = true,\n\t\t\toriginalTiddler = this.wiki.getTiddler(originalTitle),\n\t\t\tstoryList = this.getStoryList();\n\t\tif(this.wiki.isDraftModified(draftTitle)) {\n\t\t\tisConfirmed = confirm($tw.language.getString(\n\t\t\t\t\"ConfirmCancelTiddler\",\n\t\t\t\t{variables:\n\t\t\t\t\t{title: draftTitle}\n\t\t\t\t}\n\t\t\t));\n\t\t}\n\t\t// Remove the draft tiddler\n\t\tif(isConfirmed) {\n\t\t\tthis.wiki.deleteTiddler(draftTitle);\n\t\t\tif(!event.paramObject || event.paramObject.suppressNavigation !== \"yes\") {\n\t\t\t\tif(originalTiddler) {\n\t\t\t\t\tthis.replaceFirstTitleInStory(storyList,draftTitle,originalTitle);\n\t\t\t\t\tthis.addToHistory(originalTitle,event.navigateFromClientRect);\n\t\t\t\t} else {\n\t\t\t\t\tthis.removeTitleFromStory(storyList,draftTitle);\n\t\t\t\t}\n\t\t\t\tthis.saveStoryList(storyList);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\n// Create a new draft tiddler\n// event.param can either be the title of a template tiddler, or a hashmap of fields.\n//\n// The title of the newly created tiddler follows these rules:\n// * If a hashmap was used and a title field was specified, use that title\n// * If a hashmap was used without a title field, use a default title, if necessary making it unique with a numeric suffix\n// * If a template tiddler was used, use the title of the template, if necessary making it unique with a numeric suffix\n//\n// If a draft of the target tiddler already exists then it is reused\nNavigatorWidget.prototype.handleNewTiddlerEvent = function(event) {\n\t// Get the story details\n\tvar storyList = this.getStoryList(),\n\t\ttemplateTiddler, additionalFields, title, draftTitle, existingTiddler;\n\t// Get the template tiddler (if any)\n\tif(typeof event.param === \"string\") {\n\t\t// Get the template tiddler\n\t\ttemplateTiddler = this.wiki.getTiddler(event.param);\n\t\t// Generate a new title\n\t\ttitle = this.wiki.generateNewTitle(event.param || $tw.language.getString(\"DefaultNewTiddlerTitle\"));\n\t}\n\t// Get the specified additional fields\n\tif(typeof event.paramObject === \"object\") {\n\t\tadditionalFields = event.paramObject;\n\t}\n\tif(typeof event.param === \"object\") { // Backwards compatibility with 5.1.3\n\t\tadditionalFields = event.param;\n\t}\n\tif(additionalFields && additionalFields.title) {\n\t\ttitle = additionalFields.title;\n\t}\n\t// Make a copy of the additional fields excluding any blank ones\n\tvar filteredAdditionalFields = $tw.utils.extend({},additionalFields);\n\tObject.keys(filteredAdditionalFields).forEach(function(fieldName) {\n\t\tif(filteredAdditionalFields[fieldName] === \"\") {\n\t\t\tdelete filteredAdditionalFields[fieldName];\n\t\t}\n\t});\n\t// Generate a title if we don't have one\n\ttitle = title || this.wiki.generateNewTitle($tw.language.getString(\"DefaultNewTiddlerTitle\"));\n\t// Find any existing draft for this tiddler\n\tdraftTitle = this.wiki.findDraft(title);\n\t// Pull in any existing tiddler\n\tif(draftTitle) {\n\t\texistingTiddler = this.wiki.getTiddler(draftTitle);\n\t} else {\n\t\tdraftTitle = this.generateDraftTitle(title);\n\t\texistingTiddler = this.wiki.getTiddler(title);\n\t}\n\t// Merge the tags\n\tvar mergedTags = [];\n\tif(existingTiddler && existingTiddler.fields.tags) {\n\t\t$tw.utils.pushTop(mergedTags,existingTiddler.fields.tags);\n\t}\n\tif(additionalFields && additionalFields.tags) {\n\t\t// Merge tags\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,$tw.utils.parseStringArray(additionalFields.tags));\n\t}\n\tif(templateTiddler && templateTiddler.fields.tags) {\n\t\t// Merge tags\n\t\tmergedTags = $tw.utils.pushTop(mergedTags,templateTiddler.fields.tags);\n\t}\n\t// Save the draft tiddler\n\tvar draftTiddler = new $tw.Tiddler({\n\t\t\ttext: \"\",\n\t\t\t\"draft.title\": title\n\t\t},\n\t\ttemplateTiddler,\n\t\tadditionalFields,\n\t\texistingTiddler,\n\t\tfilteredAdditionalFields,\n\t\tthis.wiki.getCreationFields(),\n\t\t{\n\t\t\ttitle: draftTitle,\n\t\t\t\"draft.of\": title,\n\t\t\ttags: mergedTags\n\t\t},this.wiki.getModificationFields());\n\tthis.wiki.addTiddler(draftTiddler);\n\t// Update the story to insert the new draft at the top and remove any existing tiddler\n\tif(storyList.indexOf(draftTitle) === -1) {\n\t\tvar slot = storyList.indexOf(event.navigateFromTitle);\n\t\tstoryList.splice(slot + 1,0,draftTitle);\n\t}\n\tif(storyList.indexOf(title) !== -1) {\n\t\tstoryList.splice(storyList.indexOf(title),1);\n\t}\n\tthis.saveStoryList(storyList);\n\t// Add a new record to the top of the history stack\n\tthis.addToHistory(draftTitle);\n\treturn false;\n};\n\n// Import JSON tiddlers into a pending import tiddler\nNavigatorWidget.prototype.handleImportTiddlersEvent = function(event) {\n\t// Get the tiddlers\n\tvar tiddlers = [];\n\ttry {\n\t\ttiddlers = JSON.parse(event.param);\n\t} catch(e) {\n\t}\n\t// Get the current $:/Import tiddler\n\tvar importTiddler = this.wiki.getTiddler(IMPORT_TITLE),\n\t\timportData = this.wiki.getTiddlerData(IMPORT_TITLE,{}),\n\t\tnewFields = new Object({\n\t\t\ttitle: IMPORT_TITLE,\n\t\t\ttype: \"application/json\",\n\t\t\t\"plugin-type\": \"import\",\n\t\t\t\"status\": \"pending\"\n\t\t}),\n\t\tincomingTiddlers = [];\n\t// Process each tiddler\n\timportData.tiddlers = importData.tiddlers || {};\n\t$tw.utils.each(tiddlers,function(tiddlerFields) {\n\t\ttiddlerFields.title = $tw.utils.trim(tiddlerFields.title);\n\t\tvar title = tiddlerFields.title;\n\t\tif(title) {\n\t\t\tincomingTiddlers.push(title);\n\t\t\timportData.tiddlers[title] = tiddlerFields;\n\t\t}\n\t});\n\t// Give the active upgrader modules a chance to process the incoming tiddlers\n\tvar messages = this.wiki.invokeUpgraders(incomingTiddlers,importData.tiddlers);\n\t$tw.utils.each(messages,function(message,title) {\n\t\tnewFields[\"message-\" + title] = message;\n\t});\n\t// Deselect any suppressed tiddlers\n\t$tw.utils.each(importData.tiddlers,function(tiddler,title) {\n\t\tif($tw.utils.count(tiddler) === 0) {\n\t\t\tnewFields[\"selection-\" + title] = \"unchecked\";\n\t\t}\n\t});\n\t// Save the $:/Import tiddler\n\tnewFields.text = JSON.stringify(importData,null,$tw.config.preferences.jsonSpaces);\n\tthis.wiki.addTiddler(new $tw.Tiddler(importTiddler,newFields));\n\t// Update the story and history details\n\tif(this.getVariable(\"tv-auto-open-on-import\") !== \"no\") {\n\t\tvar storyList = this.getStoryList(),\n\t\t\thistory = [];\n\t\t// Add it to the story\n\t\tif(storyList.indexOf(IMPORT_TITLE) === -1) {\n\t\t\tstoryList.unshift(IMPORT_TITLE);\n\t\t}\n\t\t// And to history\n\t\thistory.push(IMPORT_TITLE);\n\t\t// Save the updated story and history\n\t\tthis.saveStoryList(storyList);\n\t\tthis.addToHistory(history);\n\t}\n\treturn false;\n};\n\n//\nNavigatorWidget.prototype.handlePerformImportEvent = function(event) {\n\tvar self = this,\n\t\timportTiddler = this.wiki.getTiddler(event.param),\n\t\timportData = this.wiki.getTiddlerDataCached(event.param,{tiddlers: {}}),\n\t\timportReport = [];\n\t// Add the tiddlers to the store\n\timportReport.push($tw.language.getString(\"Import/Imported/Hint\") + \"\\n\");\n\t$tw.utils.each(importData.tiddlers,function(tiddlerFields) {\n\t\tvar title = tiddlerFields.title;\n\t\tif(title && importTiddler && importTiddler.fields[\"selection-\" + title] !== \"unchecked\") {\n\t\t\tvar tiddler = new $tw.Tiddler(tiddlerFields);\n\t\t\ttiddler = $tw.hooks.invokeHook(\"th-importing-tiddler\",tiddler);\n\t\t\tself.wiki.addTiddler(tiddler);\n\t\t\timportReport.push(\"# [[\" + tiddlerFields.title + \"]]\");\n\t\t}\n\t});\n\t// Replace the $:/Import tiddler with an import report\n\tthis.wiki.addTiddler(new $tw.Tiddler({\n\t\ttitle: event.param,\n\t\ttext: importReport.join(\"\\n\"),\n\t\t\"status\": \"complete\"\n\t}));\n\t// Navigate to the $:/Import tiddler\n\tthis.addToHistory([event.param]);\n\t// Trigger an autosave\n\t$tw.rootWidget.dispatchEvent({type: \"tm-auto-save-wiki\"});\n};\n\nNavigatorWidget.prototype.handleFoldTiddlerEvent = function(event) {\n\tvar paramObject = event.paramObject || {};\n\tif(paramObject.foldedState) {\n\t\tvar foldedState = this.wiki.getTiddlerText(paramObject.foldedState,\"show\") === \"show\" ? \"hide\" : \"show\";\n\t\tthis.wiki.setText(paramObject.foldedState,\"text\",null,foldedState);\n\t}\n};\n\nNavigatorWidget.prototype.handleFoldOtherTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,event.param === title ? \"show\" : \"hide\");\n\t});\n};\n\nNavigatorWidget.prototype.handleFoldAllTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,\"hide\");\n\t});\n};\n\nNavigatorWidget.prototype.handleUnfoldAllTiddlersEvent = function(event) {\n\tvar self = this,\n\t\tparamObject = event.paramObject || {},\n\t\tprefix = paramObject.foldedStatePrefix;\n\t$tw.utils.each(this.getStoryList(),function(title) {\n\t\tself.wiki.setText(prefix + title,\"text\",null,\"show\");\n\t});\n};\n\nNavigatorWidget.prototype.handleRenameTiddlerEvent = function(event) {\n\tvar paramObject = event.paramObject || {},\n\t\tfrom = paramObject.from || event.tiddlerTitle,\n\t\tto = paramObject.to;\n\t$tw.wiki.renameTiddler(from,to);\n};\n\nexports.navigator = NavigatorWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/password.js": {
"title": "$:/core/modules/widgets/password.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/password.js\ntype: application/javascript\nmodule-type: widget\n\nPassword widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar PasswordWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nPasswordWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nPasswordWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Get the current password\n\tvar password = $tw.browser ? $tw.utils.getPassword(this.passwordName) || \"\" : \"\";\n\t// Create our element\n\tvar domNode = this.document.createElement(\"input\");\n\tdomNode.setAttribute(\"type\",\"password\");\n\tdomNode.setAttribute(\"value\",password);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(domNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tthis.domNodes.push(domNode);\n};\n\nPasswordWidget.prototype.handleChangeEvent = function(event) {\n\tvar password = this.domNodes[0].value;\n\treturn $tw.utils.savePassword(this.passwordName,password);\n};\n\n/*\nCompute the internal state of the widget\n*/\nPasswordWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.passwordName = this.getAttribute(\"name\",\"\");\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nPasswordWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.password = PasswordWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/radio.js": {
"title": "$:/core/modules/widgets/radio.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/radio.js\ntype: application/javascript\nmodule-type: widget\n\nSet a field or index at a given tiddler via radio buttons\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RadioWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRadioWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRadioWidget.prototype.render = function(parent,nextSibling) {\n\t// Save the parent dom node\n\tthis.parentDomNode = parent;\n\t// Compute our attributes\n\tthis.computeAttributes();\n\t// Execute our logic\n\tthis.execute();\n\t// Create our elements\n\tthis.labelDomNode = this.document.createElement(\"label\");\n\tthis.labelDomNode.setAttribute(\"class\",this.radioClass);\n\tthis.inputDomNode = this.document.createElement(\"input\");\n\tthis.inputDomNode.setAttribute(\"type\",\"radio\");\n\tif(this.getValue() == this.radioValue) {\n\t\tthis.inputDomNode.setAttribute(\"checked\",\"true\");\n\t}\n\tthis.labelDomNode.appendChild(this.inputDomNode);\n\tthis.spanDomNode = this.document.createElement(\"span\");\n\tthis.labelDomNode.appendChild(this.spanDomNode);\n\t// Add a click event handler\n\t$tw.utils.addEventListeners(this.inputDomNode,[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n\t// Insert the label into the DOM and render any children\n\tparent.insertBefore(this.labelDomNode,nextSibling);\n\tthis.renderChildren(this.spanDomNode,null);\n\tthis.domNodes.push(this.labelDomNode);\n};\n\nRadioWidget.prototype.getValue = function() {\n\tvar value,\n\t\ttiddler = this.wiki.getTiddler(this.radioTitle);\n\tif (this.radioIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.radioTitle,this.radioIndex);\n\t} else {\n\t\tvalue = tiddler && tiddler.getFieldString(this.radioField);\n\t}\n\treturn value;\n};\n\nRadioWidget.prototype.setValue = function() {\n\tif(this.radioIndex) {\n\t\tthis.wiki.setText(this.radioTitle,\"\",this.radioIndex,this.radioValue);\n\t} else {\n\t\tvar tiddler = this.wiki.getTiddler(this.radioTitle),\n\t\t\taddition = {};\n\t\taddition[this.radioField] = this.radioValue;\n\t\tthis.wiki.addTiddler(new $tw.Tiddler(this.wiki.getCreationFields(),{title: this.radioTitle},tiddler,addition,this.wiki.getModificationFields()));\n\t}\n};\n\nRadioWidget.prototype.handleChangeEvent = function(event) {\n\tif(this.inputDomNode.checked) {\n\t\tthis.setValue();\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRadioWidget.prototype.execute = function() {\n\t// Get the parameters from the attributes\n\tthis.radioTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.radioField = this.getAttribute(\"field\",\"text\");\n\tthis.radioIndex = this.getAttribute(\"index\");\n\tthis.radioValue = this.getAttribute(\"value\");\n\tthis.radioClass = this.getAttribute(\"class\",\"\");\n\tif(this.radioClass !== \"\") {\n\t\tthis.radioClass += \" \";\n\t}\n\tthis.radioClass += \"tc-radio\";\n\t// Make the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRadioWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.value || changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false;\n\t\tif(changedTiddlers[this.radioTitle]) {\n\t\t\tthis.inputDomNode.checked = this.getValue() === this.radioValue;\n\t\t\trefreshed = true;\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\nexports.radio = RadioWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/raw.js": {
"title": "$:/core/modules/widgets/raw.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/raw.js\ntype: application/javascript\nmodule-type: widget\n\nRaw widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RawWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRawWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRawWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tvar div = this.document.createElement(\"div\");\n\tdiv.innerHTML=this.parseTreeNode.html;\n\tparent.insertBefore(div,nextSibling);\n\tthis.domNodes.push(div);\t\n};\n\n/*\nCompute the internal state of the widget\n*/\nRawWidget.prototype.execute = function() {\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRawWidget.prototype.refresh = function(changedTiddlers) {\n\treturn false;\n};\n\nexports.raw = RawWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/reveal.js": {
"title": "$:/core/modules/widgets/reveal.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/reveal.js\ntype: application/javascript\nmodule-type: widget\n\nReveal widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar RevealWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nRevealWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nRevealWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar tag = this.parseTreeNode.isBlock ? \"div\" : \"span\";\n\tif(this.revealTag && $tw.config.htmlUnsafeElements.indexOf(this.revealTag) === -1) {\n\t\ttag = this.revealTag;\n\t}\n\tvar domNode = this.document.createElement(tag);\n\tvar classes = this[\"class\"].split(\" \") || [];\n\tclasses.push(\"tc-reveal\");\n\tdomNode.className = classes.join(\" \");\n\tif(this.style) {\n\t\tdomNode.setAttribute(\"style\",this.style);\n\t}\n\tparent.insertBefore(domNode,nextSibling);\n\tthis.renderChildren(domNode,null);\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\n\t}\n\tif(!this.isOpen) {\n\t\tdomNode.setAttribute(\"hidden\",\"true\");\n\t}\n\tthis.domNodes.push(domNode);\n};\n\nRevealWidget.prototype.positionPopup = function(domNode) {\n\tdomNode.style.position = \"absolute\";\n\tdomNode.style.zIndex = \"1000\";\n\tswitch(this.position) {\n\t\tcase \"left\":\n\t\t\tdomNode.style.left = (this.popup.left - domNode.offsetWidth) + \"px\";\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\n\t\t\tbreak;\n\t\tcase \"above\":\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top - domNode.offsetHeight) + \"px\";\n\t\t\tbreak;\n\t\tcase \"aboveright\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + \"px\";\n\t\t\tbreak;\n\t\tcase \"right\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width) + \"px\";\n\t\t\tdomNode.style.top = this.popup.top + \"px\";\n\t\t\tbreak;\n\t\tcase \"belowleft\":\n\t\t\tdomNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\n\t\t\tbreak;\n\t\tdefault: // Below\n\t\t\tdomNode.style.left = this.popup.left + \"px\";\n\t\t\tdomNode.style.top = (this.popup.top + this.popup.height) + \"px\";\n\t\t\tbreak;\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nRevealWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.state = this.getAttribute(\"state\");\n\tthis.revealTag = this.getAttribute(\"tag\");\n\tthis.type = this.getAttribute(\"type\");\n\tthis.text = this.getAttribute(\"text\");\n\tthis.position = this.getAttribute(\"position\");\n\tthis[\"class\"] = this.getAttribute(\"class\",\"\");\n\tthis.style = this.getAttribute(\"style\",\"\");\n\tthis[\"default\"] = this.getAttribute(\"default\",\"\");\n\tthis.animate = this.getAttribute(\"animate\",\"no\");\n\tthis.retain = this.getAttribute(\"retain\",\"no\");\n\tthis.openAnimation = this.animate === \"no\" ? undefined : \"open\";\n\tthis.closeAnimation = this.animate === \"no\" ? undefined : \"close\";\n\t// Compute the title of the state tiddler and read it\n\tthis.stateTitle = this.state;\n\tthis.readState();\n\t// Construct the child widgets\n\tvar childNodes = this.isOpen ? this.parseTreeNode.children : [];\n\tthis.hasChildNodes = this.isOpen;\n\tthis.makeChildWidgets(childNodes);\n};\n\n/*\nRead the state tiddler\n*/\nRevealWidget.prototype.readState = function() {\n\t// Read the information from the state tiddler\n\tvar state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this[\"default\"],this.getVariable(\"currentTiddler\")) : this[\"default\"];\n\tswitch(this.type) {\n\t\tcase \"popup\":\n\t\t\tthis.readPopupState(state);\n\t\t\tbreak;\n\t\tcase \"match\":\n\t\t\tthis.readMatchState(state);\n\t\t\tbreak;\n\t\tcase \"nomatch\":\n\t\t\tthis.readMatchState(state);\n\t\t\tthis.isOpen = !this.isOpen;\n\t\t\tbreak;\n\t}\n};\n\nRevealWidget.prototype.readMatchState = function(state) {\n\tthis.isOpen = state === this.text;\n};\n\nRevealWidget.prototype.readPopupState = function(state) {\n\tvar popupLocationRegExp = /^\\((-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+),(-?[0-9\\.E]+)\\)$/,\n\t\tmatch = popupLocationRegExp.exec(state);\n\t// Check if the state matches the location regexp\n\tif(match) {\n\t\t// If so, we're open\n\t\tthis.isOpen = true;\n\t\t// Get the location\n\t\tthis.popup = {\n\t\t\tleft: parseFloat(match[1]),\n\t\t\ttop: parseFloat(match[2]),\n\t\t\twidth: parseFloat(match[3]),\n\t\t\theight: parseFloat(match[4])\n\t\t};\n\t} else {\n\t\t// If not, we're closed\n\t\tthis.isOpen = false;\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nRevealWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes[\"default\"] || changedAttributes.animate) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\tvar refreshed = false,\n\t\t\tcurrentlyOpen = this.isOpen;\n\t\tthis.readState();\n\t\tif(this.isOpen !== currentlyOpen) {\n\t\t\tif(this.retain === \"yes\") {\n\t\t\t\tthis.updateState();\n\t\t\t} else {\n\t\t\t\tthis.refreshSelf();\n\t\t\t\trefreshed = true;\n\t\t\t}\n\t\t}\n\t\treturn this.refreshChildren(changedTiddlers) || refreshed;\n\t}\n};\n\n/*\nCalled by refresh() to dynamically show or hide the content\n*/\nRevealWidget.prototype.updateState = function() {\n\t// Read the current state\n\tthis.readState();\n\t// Construct the child nodes if needed\n\tvar domNode = this.domNodes[0];\n\tif(this.isOpen && !this.hasChildNodes) {\n\t\tthis.hasChildNodes = true;\n\t\tthis.makeChildWidgets(this.parseTreeNode.children);\n\t\tthis.renderChildren(domNode,null);\n\t}\n\t// Animate our DOM node\n\tif(!domNode.isTiddlyWikiFakeDom && this.type === \"popup\" && this.isOpen) {\n\t\tthis.positionPopup(domNode);\n\t\t$tw.utils.addClass(domNode,\"tc-popup\"); // Make sure that clicks don't dismiss popups within the revealed content\n\n\t}\n\tif(this.isOpen) {\n\t\tdomNode.removeAttribute(\"hidden\");\n $tw.anim.perform(this.openAnimation,domNode);\n\t} else {\n\t\t$tw.anim.perform(this.closeAnimation,domNode,{callback: function() {\n\t\t\tdomNode.setAttribute(\"hidden\",\"true\");\n }});\n\t}\n};\n\nexports.reveal = RevealWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/scrollable.js": {
"title": "$:/core/modules/widgets/scrollable.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/scrollable.js\ntype: application/javascript\nmodule-type: widget\n\nScrollable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ScrollableWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.scaleFactor = 1;\n\tthis.addEventListeners([\n\t\t{type: \"tm-scroll\", handler: \"handleScrollEvent\"}\n\t]);\n\tif($tw.browser) {\n\t\tthis.requestAnimationFrame = window.requestAnimationFrame ||\n\t\t\twindow.webkitRequestAnimationFrame ||\n\t\t\twindow.mozRequestAnimationFrame ||\n\t\t\tfunction(callback) {\n\t\t\t\treturn window.setTimeout(callback, 1000/60);\n\t\t\t};\n\t\tthis.cancelAnimationFrame = window.cancelAnimationFrame ||\n\t\t\twindow.webkitCancelAnimationFrame ||\n\t\t\twindow.webkitCancelRequestAnimationFrame ||\n\t\t\twindow.mozCancelAnimationFrame ||\n\t\t\twindow.mozCancelRequestAnimationFrame ||\n\t\t\tfunction(id) {\n\t\t\t\twindow.clearTimeout(id);\n\t\t\t};\n\t}\n};\n\n/*\nInherit from the base widget class\n*/\nScrollableWidget.prototype = new Widget();\n\nScrollableWidget.prototype.cancelScroll = function() {\n\tif(this.idRequestFrame) {\n\t\tthis.cancelAnimationFrame.call(window,this.idRequestFrame);\n\t\tthis.idRequestFrame = null;\n\t}\n};\n\n/*\nHandle a scroll event\n*/\nScrollableWidget.prototype.handleScrollEvent = function(event) {\n\t// Pass the scroll event through if our offsetsize is larger than our scrollsize\n\tif(this.outerDomNode.scrollWidth <= this.outerDomNode.offsetWidth && this.outerDomNode.scrollHeight <= this.outerDomNode.offsetHeight && this.fallthrough === \"yes\") {\n\t\treturn true;\n\t}\n\tthis.scrollIntoView(event.target);\n\treturn false; // Handled event\n};\n\n/*\nScroll an element into view\n*/\nScrollableWidget.prototype.scrollIntoView = function(element) {\n\tvar duration = $tw.utils.getAnimationDuration();\n\tthis.cancelScroll();\n\tthis.startTime = Date.now();\n\tvar scrollPosition = {\n\t\tx: this.outerDomNode.scrollLeft,\n\t\ty: this.outerDomNode.scrollTop\n\t};\n\t// Get the client bounds of the element and adjust by the scroll position\n\tvar scrollableBounds = this.outerDomNode.getBoundingClientRect(),\n\t\tclientTargetBounds = element.getBoundingClientRect(),\n\t\tbounds = {\n\t\t\tleft: clientTargetBounds.left + scrollPosition.x - scrollableBounds.left,\n\t\t\ttop: clientTargetBounds.top + scrollPosition.y - scrollableBounds.top,\n\t\t\twidth: clientTargetBounds.width,\n\t\t\theight: clientTargetBounds.height\n\t\t};\n\t// We'll consider the horizontal and vertical scroll directions separately via this function\n\tvar getEndPos = function(targetPos,targetSize,currentPos,currentSize) {\n\t\t\t// If the target is already visible then stay where we are\n\t\t\tif(targetPos >= currentPos && (targetPos + targetSize) <= (currentPos + currentSize)) {\n\t\t\t\treturn currentPos;\n\t\t\t// If the target is above/left of the current view, then scroll to its top/left\n\t\t\t} else if(targetPos <= currentPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window\n\t\t\t} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {\n\t\t\t\treturn targetPos + targetSize - currentSize;\n\t\t\t// If the target is big, then just scroll to the top\n\t\t\t} else if(currentPos < targetPos) {\n\t\t\t\treturn targetPos;\n\t\t\t// Otherwise, stay where we are\n\t\t\t} else {\n\t\t\t\treturn currentPos;\n\t\t\t}\n\t\t},\n\t\tendX = getEndPos(bounds.left,bounds.width,scrollPosition.x,this.outerDomNode.offsetWidth),\n\t\tendY = getEndPos(bounds.top,bounds.height,scrollPosition.y,this.outerDomNode.offsetHeight);\n\t// Only scroll if necessary\n\tif(endX !== scrollPosition.x || endY !== scrollPosition.y) {\n\t\tvar self = this,\n\t\t\tdrawFrame;\n\t\tdrawFrame = function () {\n\t\t\tvar t;\n\t\t\tif(duration <= 0) {\n\t\t\t\tt = 1;\n\t\t\t} else {\n\t\t\t\tt = ((Date.now()) - self.startTime) / duration;\t\n\t\t\t}\n\t\t\tif(t >= 1) {\n\t\t\t\tself.cancelScroll();\n\t\t\t\tt = 1;\n\t\t\t}\n\t\t\tt = $tw.utils.slowInSlowOut(t);\n\t\t\tself.outerDomNode.scrollLeft = scrollPosition.x + (endX - scrollPosition.x) * t;\n\t\t\tself.outerDomNode.scrollTop = scrollPosition.y + (endY - scrollPosition.y) * t;\n\t\t\tif(t < 1) {\n\t\t\t\tself.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);\n\t\t\t}\n\t\t};\n\t\tdrawFrame();\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nScrollableWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\t// Remember parent\n\tthis.parentDomNode = parent;\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\t// Create elements\n\tthis.outerDomNode = this.document.createElement(\"div\");\n\t$tw.utils.setStyle(this.outerDomNode,[\n\t\t{overflowY: \"auto\"},\n\t\t{overflowX: \"auto\"},\n\t\t{webkitOverflowScrolling: \"touch\"}\n\t]);\n\tthis.innerDomNode = this.document.createElement(\"div\");\n\tthis.outerDomNode.appendChild(this.innerDomNode);\n\t// Assign classes\n\tthis.outerDomNode.className = this[\"class\"] || \"\";\n\t// Insert element\n\tparent.insertBefore(this.outerDomNode,nextSibling);\n\tthis.renderChildren(this.innerDomNode,null);\n\tthis.domNodes.push(this.outerDomNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nScrollableWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.fallthrough = this.getAttribute(\"fallthrough\",\"yes\");\n\tthis[\"class\"] = this.getAttribute(\"class\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nScrollableWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes[\"class\"]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.scrollable = ScrollableWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/select.js": {
"title": "$:/core/modules/widgets/select.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/select.js\ntype: application/javascript\nmodule-type: widget\n\nSelect widget:\n\n```\n<$select tiddler=\"MyTiddler\" field=\"text\">\n<$list filter=\"[tag[chapter]]\">\n<option value=<<currentTiddler>>>\n<$view field=\"description\"/>\n</option>\n</$list>\n</$select>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SelectWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSelectWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSelectWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\tthis.setSelectValue();\n\t$tw.utils.addEventListeners(this.getSelectDomNode(),[\n\t\t{name: \"change\", handlerObject: this, handlerMethod: \"handleChangeEvent\"}\n\t]);\n};\n\n/*\nHandle a change event\n*/\nSelectWidget.prototype.handleChangeEvent = function(event) {\n\t// Get the new value and assign it to the tiddler\n\tif(this.selectMultiple == false) {\n\t\tvar value = this.getSelectDomNode().value;\n\t} else {\n\t\tvar value = this.getSelectValues()\n\t\t\t\tvalue = $tw.utils.stringifyList(value);\n\t}\n\tthis.wiki.setText(this.selectTitle,this.selectField,this.selectIndex,value);\n\t// Trigger actions\n\tif(this.selectActions) {\n\t\tthis.invokeActionString(this.selectActions,this,event);\n\t}\n};\n\n/*\nIf necessary, set the value of the select element to the current value\n*/\nSelectWidget.prototype.setSelectValue = function() {\n\tvar value = this.selectDefault;\n\t// Get the value\n\tif(this.selectIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.selectTitle,this.selectIndex);\n\t} else {\n\t\tvar tiddler = this.wiki.getTiddler(this.selectTitle);\n\t\tif(tiddler) {\n\t\t\tif(this.selectField === \"text\") {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.selectTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.selectField)) {\n\t\t\t\t\tvalue = tiddler.getFieldString(this.selectField);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.selectField === \"title\") {\n\t\t\t\tvalue = this.selectTitle;\n\t\t\t}\n\t\t}\n\t}\n\t// Assign it to the select element if it's different than the current value\n\tif (this.selectMultiple) {\n\t\tvalue = value === undefined ? \"\" : value;\n\t\tvar select = this.getSelectDomNode();\n\t\tvar values = Array.isArray(value) ? value : $tw.utils.parseStringArray(value);\n\t\tfor(var i=0; i < select.children.length; i++){\n\t\t\tif(values.indexOf(select.children[i].value) != -1) {\n\t\t\t\tselect.children[i].selected = true;\n\t\t\t}\n\t\t}\n\t\t\n\t} else {\n\t\tvar domNode = this.getSelectDomNode();\n\t\tif(domNode.value !== value) {\n\t\t\tdomNode.value = value;\n\t\t}\n\t}\n};\n\n/*\nGet the DOM node of the select element\n*/\nSelectWidget.prototype.getSelectDomNode = function() {\n\treturn this.children[0].domNodes[0];\n};\n\n// Return an array of the selected opion values\n// select is an HTML select element\nSelectWidget.prototype.getSelectValues = function() {\n\tvar select, result, options, opt;\n\tselect = this.getSelectDomNode();\n\tresult = [];\n\toptions = select && select.options;\n\tfor (var i=0; i<options.length; i++) {\n\t\topt = options[i];\n\t\tif (opt.selected) {\n\t\t\tresult.push(opt.value || opt.text);\n\t\t}\n\t}\n\treturn result;\n}\n\n/*\nCompute the internal state of the widget\n*/\nSelectWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.selectActions = this.getAttribute(\"actions\");\n\tthis.selectTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.selectField = this.getAttribute(\"field\",\"text\");\n\tthis.selectIndex = this.getAttribute(\"index\");\n\tthis.selectClass = this.getAttribute(\"class\");\n\tthis.selectDefault = this.getAttribute(\"default\");\n\tthis.selectMultiple = this.getAttribute(\"multiple\", false);\n\tthis.selectSize = this.getAttribute(\"size\");\n\t// Make the child widgets\n\tvar selectNode = {\n\t\ttype: \"element\",\n\t\ttag: \"select\",\n\t\tchildren: this.parseTreeNode.children\n\t};\n\tif(this.selectClass) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"class\",this.selectClass);\n\t}\n\tif(this.selectMultiple) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"multiple\",\"multiple\");\n\t}\n\tif(this.selectSize) {\n\t\t$tw.utils.addAttributeToParseTreeNode(selectNode,\"size\",this.selectSize);\n\t}\n\tthis.makeChildWidgets([selectNode]);\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSelectWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// If we're using a different tiddler/field/index then completely refresh ourselves\n\tif(changedAttributes.selectTitle || changedAttributes.selectField || changedAttributes.selectIndex) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t// If the target tiddler value has changed, just update setting and refresh the children\n\t} else {\n\t\tvar childrenRefreshed = this.refreshChildren(changedTiddlers);\n\t\tif(changedTiddlers[this.selectTitle] || childrenRefreshed) {\n\t\t\tthis.setSelectValue();\n\t\t} \n\t\treturn childrenRefreshed;\n\t}\n};\n\nexports.select = SelectWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/set.js": {
"title": "$:/core/modules/widgets/set.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/set.js\ntype: application/javascript\nmodule-type: widget\n\nSet variable widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar SetWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nSetWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nSetWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nSetWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.setName = this.getAttribute(\"name\",\"currentTiddler\");\n\tthis.setFilter = this.getAttribute(\"filter\");\n\tthis.setSelect = this.getAttribute(\"select\");\n\tthis.setTiddler = this.getAttribute(\"tiddler\");\n\tthis.setField = this.getAttribute(\"field\");\n\tthis.setIndex = this.getAttribute(\"index\");\n\tthis.setValue = this.getAttribute(\"value\");\n\tthis.setEmptyValue = this.getAttribute(\"emptyValue\");\n\t// Set context variable\n\tthis.setVariable(this.setName,this.getValue(),this.parseTreeNode.params);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nGet the value to be assigned\n*/\nSetWidget.prototype.getValue = function() {\n\tvar value = this.setValue;\n\tif(this.setTiddler) {\n\t\tvar tiddler = this.wiki.getTiddler(this.setTiddler);\n\t\tif(!tiddler) {\n\t\t\tvalue = this.setEmptyValue;\n\t\t} else if(this.setField) {\n\t\t\tvalue = tiddler.getFieldString(this.setField) || this.setEmptyValue;\n\t\t} else if(this.setIndex) {\n\t\t\tvalue = this.wiki.extractTiddlerDataItem(this.setTiddler,this.setIndex,this.setEmptyValue);\n\t\t} else {\n\t\t\tvalue = tiddler.fields.text || this.setEmptyValue ;\n\t\t}\n\t} else if(this.setFilter) {\n\t\tvar results = this.wiki.filterTiddlers(this.setFilter,this);\n\t\tif(!this.setValue) {\n\t\t\tvar select;\n\t\t\tif(this.setSelect) {\n\t\t\t\tselect = parseInt(this.setSelect,10);\n\t\t\t}\n\t\t\tif(select !== undefined) {\n\t\t\t\tvalue = results[select] || \"\";\n\t\t\t} else {\n\t\t\t\tvalue = $tw.utils.stringifyList(results);\t\t\t\n\t\t\t}\n\t\t}\n\t\tif(results.length === 0 && this.setEmptyValue !== undefined) {\n\t\t\tvalue = this.setEmptyValue;\n\t\t}\n\t} else if(!value && this.setEmptyValue) {\n\t\tvalue = this.setEmptyValue;\n\t}\n\treturn value || \"\";\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nSetWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.name || changedAttributes.filter || changedAttributes.select || changedAttributes.tiddler || (this.setTiddler && changedTiddlers[this.setTiddler]) || changedAttributes.field || changedAttributes.index || changedAttributes.value || changedAttributes.emptyValue ||\n\t (this.setFilter && this.getValue() != this.variables[this.setName].value)) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.setvariable = SetWidget;\nexports.set = SetWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/text.js": {
"title": "$:/core/modules/widgets/text.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/text.js\ntype: application/javascript\nmodule-type: widget\n\nText node widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TextNodeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTextNodeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTextNodeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tvar text = this.getAttribute(\"text\",this.parseTreeNode.text || \"\");\n\ttext = text.replace(/\\r/mg,\"\");\n\tvar textNode = this.document.createTextNode(text);\n\tparent.insertBefore(textNode,nextSibling);\n\tthis.domNodes.push(textNode);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTextNodeWidget.prototype.execute = function() {\n\t// Nothing to do for a text node\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTextNodeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.text) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.text = TextNodeWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/tiddler.js": {
"title": "$:/core/modules/widgets/tiddler.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/tiddler.js\ntype: application/javascript\nmodule-type: widget\n\nTiddler widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TiddlerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTiddlerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTiddlerWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTiddlerWidget.prototype.execute = function() {\n\tthis.tiddlerState = this.computeTiddlerState();\n\tthis.setVariable(\"currentTiddler\",this.tiddlerState.currentTiddler);\n\tthis.setVariable(\"missingTiddlerClass\",this.tiddlerState.missingTiddlerClass);\n\tthis.setVariable(\"shadowTiddlerClass\",this.tiddlerState.shadowTiddlerClass);\n\tthis.setVariable(\"systemTiddlerClass\",this.tiddlerState.systemTiddlerClass);\n\tthis.setVariable(\"tiddlerTagClasses\",this.tiddlerState.tiddlerTagClasses);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nCompute the tiddler state flags\n*/\nTiddlerWidget.prototype.computeTiddlerState = function() {\n\t// Get our parameters\n\tthis.tiddlerTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\t// Compute the state\n\tvar state = {\n\t\tcurrentTiddler: this.tiddlerTitle || \"\",\n\t\tmissingTiddlerClass: (this.wiki.tiddlerExists(this.tiddlerTitle) || this.wiki.isShadowTiddler(this.tiddlerTitle)) ? \"tc-tiddler-exists\" : \"tc-tiddler-missing\",\n\t\tshadowTiddlerClass: this.wiki.isShadowTiddler(this.tiddlerTitle) ? \"tc-tiddler-shadow\" : \"\",\n\t\tsystemTiddlerClass: this.wiki.isSystemTiddler(this.tiddlerTitle) ? \"tc-tiddler-system\" : \"\",\n\t\ttiddlerTagClasses: this.getTagClasses()\n\t};\n\t// Compute a simple hash to make it easier to detect changes\n\tstate.hash = state.currentTiddler + state.missingTiddlerClass + state.shadowTiddlerClass + state.systemTiddlerClass + state.tiddlerTagClasses;\n\treturn state;\n};\n\n/*\nCreate a string of CSS classes derived from the tags of the current tiddler\n*/\nTiddlerWidget.prototype.getTagClasses = function() {\n\tvar tiddler = this.wiki.getTiddler(this.tiddlerTitle);\n\tif(tiddler) {\n\t\tvar tags = [];\n\t\t$tw.utils.each(tiddler.fields.tags,function(tag) {\n\t\t\ttags.push(\"tc-tagged-\" + encodeURIComponent(tag));\n\t\t});\n\t\treturn tags.join(\" \");\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTiddlerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes(),\n\t\tnewTiddlerState = this.computeTiddlerState();\n\tif(changedAttributes.tiddler || newTiddlerState.hash !== this.tiddlerState.hash) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.tiddler = TiddlerWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/transclude.js": {
"title": "$:/core/modules/widgets/transclude.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/transclude.js\ntype: application/javascript\nmodule-type: widget\n\nTransclude widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TranscludeWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTranscludeWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTranscludeWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nTranscludeWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.transcludeTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.transcludeSubTiddler = this.getAttribute(\"subtiddler\");\n\tthis.transcludeField = this.getAttribute(\"field\");\n\tthis.transcludeIndex = this.getAttribute(\"index\");\n\tthis.transcludeMode = this.getAttribute(\"mode\");\n\t// Parse the text reference\n\tvar parseAsInline = !this.parseTreeNode.isBlock;\n\tif(this.transcludeMode === \"inline\") {\n\t\tparseAsInline = true;\n\t} else if(this.transcludeMode === \"block\") {\n\t\tparseAsInline = false;\n\t}\n\tvar parser = this.wiki.parseTextReference(\n\t\t\t\t\t\tthis.transcludeTitle,\n\t\t\t\t\t\tthis.transcludeField,\n\t\t\t\t\t\tthis.transcludeIndex,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparseAsInline: parseAsInline,\n\t\t\t\t\t\t\tsubTiddler: this.transcludeSubTiddler\n\t\t\t\t\t\t}),\n\t\tparseTreeNodes = parser ? parser.tree : this.parseTreeNode.children;\n\t// Set context variables for recursion detection\n\tvar recursionMarker = this.makeRecursionMarker();\n\tthis.setVariable(\"transclusion\",recursionMarker);\n\t// Check for recursion\n\tif(parser) {\n\t\tif(this.parentWidget && this.parentWidget.hasVariable(\"transclusion\",recursionMarker)) {\n\t\t\tparseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\n\t\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\n\t\t\t}, children: [\n\t\t\t\t{type: \"text\", text: $tw.language.getString(\"Error/RecursiveTransclusion\")}\n\t\t\t]}];\n\t\t}\n\t}\n\t// Construct the child widgets\n\tthis.makeChildWidgets(parseTreeNodes);\n};\n\n/*\nCompose a string comprising the title, field and/or index to identify this transclusion for recursion detection\n*/\nTranscludeWidget.prototype.makeRecursionMarker = function() {\n\tvar output = [];\n\toutput.push(\"{\");\n\toutput.push(this.getVariable(\"currentTiddler\",{defaultValue: \"\"}));\n\toutput.push(\"|\");\n\toutput.push(this.transcludeTitle || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeField || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeIndex || \"\");\n\toutput.push(\"|\");\n\toutput.push(this.transcludeSubTiddler || \"\");\n\toutput.push(\"}\");\n\treturn output.join(\"\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTranscludeWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedTiddlers[this.transcludeTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\t\t\n\t}\n};\n\nexports.transclude = TranscludeWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/vars.js": {
"title": "$:/core/modules/widgets/vars.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/vars.js\ntype: application/javascript\nmodule-type: widget\n\nThis widget allows multiple variables to be set in one go:\n\n```\n\\define helloworld() Hello world!\n<$vars greeting=\"Hi\" me={{!!title}} sentence=<<helloworld>>>\n <<greeting>>! I am <<me>> and I say: <<sentence>>\n</$vars>\n```\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar VarsWidget = function(parseTreeNode,options) {\n\t// Call the constructor\n\tWidget.call(this);\n\t// Initialise\t\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nVarsWidget.prototype = Object.create(Widget.prototype);\n\n/*\nRender this widget into the DOM\n*/\nVarsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nVarsWidget.prototype.execute = function() {\n\t// Parse variables\n\tvar self = this;\n\t$tw.utils.each(this.attributes,function(val,key) {\n\t\tif(key.charAt(0) !== \"$\") {\n\t\t\tself.setVariable(key,val);\n\t\t}\n\t});\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nVarsWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(Object.keys(changedAttributes).length) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports[\"vars\"] = VarsWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/view.js": {
"title": "$:/core/modules/widgets/view.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/view.js\ntype: application/javascript\nmodule-type: widget\n\nView widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ViewWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nViewWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nViewWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tif(this.text) {\n\t\tvar textNode = this.document.createTextNode(this.text);\n\t\tparent.insertBefore(textNode,nextSibling);\n\t\tthis.domNodes.push(textNode);\n\t} else {\n\t\tthis.makeChildWidgets();\n\t\tthis.renderChildren(parent,nextSibling);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nViewWidget.prototype.execute = function() {\n\t// Get parameters from our attributes\n\tthis.viewTitle = this.getAttribute(\"tiddler\",this.getVariable(\"currentTiddler\"));\n\tthis.viewSubtiddler = this.getAttribute(\"subtiddler\");\n\tthis.viewField = this.getAttribute(\"field\",\"text\");\n\tthis.viewIndex = this.getAttribute(\"index\");\n\tthis.viewFormat = this.getAttribute(\"format\",\"text\");\n\tthis.viewTemplate = this.getAttribute(\"template\",\"\");\n\tthis.viewMode = this.getAttribute(\"mode\",\"block\");\n\tswitch(this.viewFormat) {\n\t\tcase \"htmlwikified\":\n\t\t\tthis.text = this.getValueAsHtmlWikified(this.viewMode);\n\t\t\tbreak;\n\t\tcase \"plainwikified\":\n\t\t\tthis.text = this.getValueAsPlainWikified(this.viewMode);\n\t\t\tbreak;\n\t\tcase \"htmlencodedplainwikified\":\n\t\t\tthis.text = this.getValueAsHtmlEncodedPlainWikified(this.viewMode);\n\t\t\tbreak;\n\t\tcase \"htmlencoded\":\n\t\t\tthis.text = this.getValueAsHtmlEncoded();\n\t\t\tbreak;\n\t\tcase \"urlencoded\":\n\t\t\tthis.text = this.getValueAsUrlEncoded();\n\t\t\tbreak;\n\t\tcase \"doubleurlencoded\":\n\t\t\tthis.text = this.getValueAsDoubleUrlEncoded();\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\tthis.text = this.getValueAsDate(this.viewTemplate);\n\t\t\tbreak;\n\t\tcase \"relativedate\":\n\t\t\tthis.text = this.getValueAsRelativeDate();\n\t\t\tbreak;\n\t\tcase \"stripcomments\":\n\t\t\tthis.text = this.getValueAsStrippedComments();\n\t\t\tbreak;\n\t\tcase \"jsencoded\":\n\t\t\tthis.text = this.getValueAsJsEncoded();\n\t\t\tbreak;\n\t\tdefault: // \"text\"\n\t\t\tthis.text = this.getValueAsText();\n\t\t\tbreak;\n\t}\n};\n\n/*\nThe various formatter functions are baked into this widget for the moment. Eventually they will be replaced by macro functions\n*/\n\n/*\nRetrieve the value of the widget. Options are:\nasString: Optionally return the value as a string\n*/\nViewWidget.prototype.getValue = function(options) {\n\toptions = options || {};\n\tvar value = options.asString ? \"\" : undefined;\n\tif(this.viewIndex) {\n\t\tvalue = this.wiki.extractTiddlerDataItem(this.viewTitle,this.viewIndex);\n\t} else {\n\t\tvar tiddler;\n\t\tif(this.viewSubtiddler) {\n\t\t\ttiddler = this.wiki.getSubTiddler(this.viewTitle,this.viewSubtiddler);\t\n\t\t} else {\n\t\t\ttiddler = this.wiki.getTiddler(this.viewTitle);\n\t\t}\n\t\tif(tiddler) {\n\t\t\tif(this.viewField === \"text\" && !this.viewSubtiddler) {\n\t\t\t\t// Calling getTiddlerText() triggers lazy loading of skinny tiddlers\n\t\t\t\tvalue = this.wiki.getTiddlerText(this.viewTitle);\n\t\t\t} else {\n\t\t\t\tif($tw.utils.hop(tiddler.fields,this.viewField)) {\n\t\t\t\t\tif(options.asString) {\n\t\t\t\t\t\tvalue = tiddler.getFieldString(this.viewField);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue = tiddler.fields[this.viewField];\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif(this.viewField === \"title\") {\n\t\t\t\tvalue = this.viewTitle;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n\nViewWidget.prototype.getValueAsText = function() {\n\treturn this.getValue({asString: true});\n};\n\nViewWidget.prototype.getValueAsHtmlWikified = function(mode) {\n\treturn this.wiki.renderText(\"text/html\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{\n\t\tparseAsInline: mode !== \"block\",\n\t\tparentWidget: this\n\t});\n};\n\nViewWidget.prototype.getValueAsPlainWikified = function(mode) {\n\treturn this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{\n\t\tparseAsInline: mode !== \"block\",\n\t\tparentWidget: this\n\t});\n};\n\nViewWidget.prototype.getValueAsHtmlEncodedPlainWikified = function(mode) {\n\treturn $tw.utils.htmlEncode(this.wiki.renderText(\"text/plain\",\"text/vnd.tiddlywiki\",this.getValueAsText(),{\n\t\tparseAsInline: mode !== \"block\",\n\t\tparentWidget: this\n\t}));\n};\n\nViewWidget.prototype.getValueAsHtmlEncoded = function() {\n\treturn $tw.utils.htmlEncode(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsUrlEncoded = function() {\n\treturn encodeURIComponent(this.getValueAsText());\n};\n\nViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {\n\treturn encodeURIComponent(encodeURIComponent(this.getValueAsText()));\n};\n\nViewWidget.prototype.getValueAsDate = function(format) {\n\tformat = format || \"YYYY MM DD 0hh:0mm\";\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\n\t\treturn $tw.utils.formatDateString(value,format);\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\nViewWidget.prototype.getValueAsRelativeDate = function(format) {\n\tvar value = $tw.utils.parseDate(this.getValue());\n\tif(value && $tw.utils.isDate(value) && value.toString() !== \"Invalid Date\") {\n\t\treturn $tw.utils.getRelativeDate((new Date()) - (new Date(value))).description;\n\t} else {\n\t\treturn \"\";\n\t}\n};\n\nViewWidget.prototype.getValueAsStrippedComments = function() {\n\tvar lines = this.getValueAsText().split(\"\\n\"),\n\t\tout = [];\n\tfor(var line=0; line<lines.length; line++) {\n\t\tvar text = lines[line];\n\t\tif(!/^\\s*\\/\\/#/.test(text)) {\n\t\t\tout.push(text);\n\t\t}\n\t}\n\treturn out.join(\"\\n\");\n};\n\nViewWidget.prototype.getValueAsJsEncoded = function() {\n\treturn $tw.utils.stringify(this.getValueAsText());\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nViewWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.tiddler || changedAttributes.field || changedAttributes.index || changedAttributes.template || changedAttributes.format || changedTiddlers[this.viewTitle]) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn false;\t\n\t}\n};\n\nexports.view = ViewWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/widget.js": {
"title": "$:/core/modules/widgets/widget.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/widget.js\ntype: application/javascript\nmodule-type: widget\n\nWidget base class\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nCreate a widget object for a parse tree node\n\tparseTreeNode: reference to the parse tree node to be rendered\n\toptions: see below\nOptions include:\n\twiki: mandatory reference to wiki associated with this render tree\n\tparentWidget: optional reference to a parent renderer node for the context chain\n\tdocument: optional document object to use instead of global document\n*/\nvar Widget = function(parseTreeNode,options) {\n\tif(arguments.length > 0) {\n\t\tthis.initialise(parseTreeNode,options);\n\t}\n};\n\n/*\nInitialise widget properties. These steps are pulled out of the constructor so that we can reuse them in subclasses\n*/\nWidget.prototype.initialise = function(parseTreeNode,options) {\n\toptions = options || {};\n\t// Save widget info\n\tthis.parseTreeNode = parseTreeNode;\n\tthis.wiki = options.wiki;\n\tthis.parentWidget = options.parentWidget;\n\tthis.variablesConstructor = function() {};\n\tthis.variablesConstructor.prototype = this.parentWidget ? this.parentWidget.variables : {};\n\tthis.variables = new this.variablesConstructor();\n\tthis.document = options.document;\n\tthis.attributes = {};\n\tthis.children = [];\n\tthis.domNodes = [];\n\tthis.eventListeners = {};\n\t// Hashmap of the widget classes\n\tif(!this.widgetClasses) {\n\t\tWidget.prototype.widgetClasses = $tw.modules.applyMethods(\"widget\");\n\t}\n};\n\n/*\nRender this widget into the DOM\n*/\nWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nWidget.prototype.execute = function() {\n\tthis.makeChildWidgets();\n};\n\n/*\nSet the value of a context variable\nname: name of the variable\nvalue: value of the variable\nparams: array of {name:, default:} for each parameter\n*/\nWidget.prototype.setVariable = function(name,value,params) {\n\tthis.variables[name] = {value: value, params: params};\n};\n\n/*\nGet the prevailing value of a context variable\nname: name of variable\noptions: see below\nOptions include\nparams: array of {name:, value:} for each parameter\ndefaultValue: default value if the variable is not defined\n*/\nWidget.prototype.getVariable = function(name,options) {\n\toptions = options || {};\n\tvar actualParams = options.params || [],\n\t\tparentWidget = this.parentWidget;\n\t// Check for the variable defined in the parent widget (or an ancestor in the prototype chain)\n\tif(parentWidget && name in parentWidget.variables) {\n\t\tvar variable = parentWidget.variables[name],\n\t\t\tvalue = variable.value;\n\t\t// Substitute any parameters specified in the definition\n\t\tvalue = this.substituteVariableParameters(value,variable.params,actualParams);\n\t\tvalue = this.substituteVariableReferences(value);\n\t\treturn value;\n\t}\n\t// If the variable doesn't exist in the parent widget then look for a macro module\n\treturn this.evaluateMacroModule(name,actualParams,options.defaultValue);\n};\n\nWidget.prototype.substituteVariableParameters = function(text,formalParams,actualParams) {\n\tif(formalParams) {\n\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\tparamInfo, paramValue;\n\t\t// Step through each of the parameters in the macro definition\n\t\tfor(var p=0; p<formalParams.length; p++) {\n\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\tparamInfo = formalParams[p];\n\t\t\tparamValue = undefined;\n\t\t\tfor(var m=0; m<actualParams.length; m++) {\n\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\n\t\t\t\tnextAnonParameter++;\n\t\t\t}\n\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\n\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t}\n\t\t\t// If we've still not got a value, use the default, if any\n\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\n\t\t\t// Replace any instances of this parameter\n\t\t\ttext = $tw.utils.replaceString(text,new RegExp(\"\\\\$\" + $tw.utils.escapeRegExp(paramInfo.name) + \"\\\\$\",\"mg\"),paramValue);\n\t\t}\n\t}\n\treturn text;\n};\n\nWidget.prototype.substituteVariableReferences = function(text) {\n\tvar self = this;\n\treturn (text || \"\").replace(/\\$\\(([^\\)\\$]+)\\)\\$/g,function(match,p1,offset,string) {\n\t\treturn self.getVariable(p1,{defaultValue: \"\"});\n\t});\n};\n\nWidget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue) {\n\tif($tw.utils.hop($tw.macros,name)) {\n\t\tvar macro = $tw.macros[name],\n\t\t\targs = [];\n\t\tif(macro.params.length > 0) {\n\t\t\tvar nextAnonParameter = 0, // Next candidate anonymous parameter in macro call\n\t\t\t\tparamInfo, paramValue;\n\t\t\t// Step through each of the parameters in the macro definition\n\t\t\tfor(var p=0; p<macro.params.length; p++) {\n\t\t\t\t// Check if we've got a macro call parameter with the same name\n\t\t\t\tparamInfo = macro.params[p];\n\t\t\t\tparamValue = undefined;\n\t\t\t\tfor(var m=0; m<actualParams.length; m++) {\n\t\t\t\t\tif(actualParams[m].name === paramInfo.name) {\n\t\t\t\t\t\tparamValue = actualParams[m].value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If not, use the next available anonymous macro call parameter\n\t\t\t\twhile(nextAnonParameter < actualParams.length && actualParams[nextAnonParameter].name) {\n\t\t\t\t\tnextAnonParameter++;\n\t\t\t\t}\n\t\t\t\tif(paramValue === undefined && nextAnonParameter < actualParams.length) {\n\t\t\t\t\tparamValue = actualParams[nextAnonParameter++].value;\n\t\t\t\t}\n\t\t\t\t// If we've still not got a value, use the default, if any\n\t\t\t\tparamValue = paramValue || paramInfo[\"default\"] || \"\";\n\t\t\t\t// Save the parameter\n\t\t\t\targs.push(paramValue);\n\t\t\t}\n\t\t}\n\t\telse for(var i=0; i<actualParams.length; ++i) {\n\t\t\targs.push(actualParams[i].value);\n\t\t}\n\t\treturn (macro.run.apply(this,args) || \"\").toString();\n\t} else {\n\t\treturn defaultValue;\n\t}\n};\n\n/*\nCheck whether a given context variable value exists in the parent chain\n*/\nWidget.prototype.hasVariable = function(name,value) {\n\tvar node = this;\n\twhile(node) {\n\t\tif($tw.utils.hop(node.variables,name) && node.variables[name].value === value) {\n\t\t\treturn true;\n\t\t}\n\t\tnode = node.parentWidget;\n\t}\n\treturn false;\n};\n\n/*\nConstruct a qualifying string based on a hash of concatenating the values of a given variable in the parent chain\n*/\nWidget.prototype.getStateQualifier = function(name) {\n\tthis.qualifiers = this.qualifiers || Object.create(null);\n\tname = name || \"transclusion\";\n\tif(this.qualifiers[name]) {\n\t\treturn this.qualifiers[name];\n\t} else {\n\t\tvar output = [],\n\t\t\tnode = this;\n\t\twhile(node && node.parentWidget) {\n\t\t\tif($tw.utils.hop(node.parentWidget.variables,name)) {\n\t\t\t\toutput.push(node.getVariable(name));\n\t\t\t}\n\t\t\tnode = node.parentWidget;\n\t\t}\n\t\tvar value = $tw.utils.hashString(output.join(\"\"));\n\t\tthis.qualifiers[name] = value;\n\t\treturn value;\n\t}\n};\n\n/*\nCompute the current values of the attributes of the widget. Returns a hashmap of the names of the attributes that have changed\n*/\nWidget.prototype.computeAttributes = function() {\n\tvar changedAttributes = {},\n\t\tself = this,\n\t\tvalue;\n\t$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {\n\t\tif(attribute.type === \"filtered\") {\n\t\t\tvalue = self.wiki.filterTiddlers(attribute.filter,self)[0] || \"\";\n\t\t} else if(attribute.type === \"indirect\") {\n\t\t\tvalue = self.wiki.getTextReference(attribute.textReference,\"\",self.getVariable(\"currentTiddler\"));\n\t\t} else if(attribute.type === \"macro\") {\n\t\t\tvalue = self.getVariable(attribute.value.name,{params: attribute.value.params});\n\t\t} else { // String attribute\n\t\t\tvalue = attribute.value;\n\t\t}\n\t\t// Check whether the attribute has changed\n\t\tif(self.attributes[name] !== value) {\n\t\t\tself.attributes[name] = value;\n\t\t\tchangedAttributes[name] = true;\n\t\t}\n\t});\n\treturn changedAttributes;\n};\n\n/*\nCheck for the presence of an attribute\n*/\nWidget.prototype.hasAttribute = function(name) {\n\treturn $tw.utils.hop(this.attributes,name);\n};\n\n/*\nGet the value of an attribute\n*/\nWidget.prototype.getAttribute = function(name,defaultText) {\n\tif($tw.utils.hop(this.attributes,name)) {\n\t\treturn this.attributes[name];\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nAssign the computed attributes of the widget to a domNode\noptions include:\nexcludeEventAttributes: ignores attributes whose name begins with \"on\"\n*/\nWidget.prototype.assignAttributes = function(domNode,options) {\n\toptions = options || {};\n\tvar self = this;\n\t$tw.utils.each(this.attributes,function(v,a) {\n\t\t// Check exclusions\n\t\tif(options.excludeEventAttributes && a.substr(0,2) === \"on\") {\n\t\t\tv = undefined;\n\t\t}\n\t\tif(v !== undefined) {\n\t\t\tvar b = a.split(\":\");\n\t\t\t// Setting certain attributes can cause a DOM error (eg xmlns on the svg element)\n\t\t\ttry {\n\t\t\t\tif (b.length == 2 && b[0] == \"xlink\"){\n\t\t\t\t\tdomNode.setAttributeNS(\"http://www.w3.org/1999/xlink\",b[1],v);\n\t\t\t\t} else {\n\t\t\t\t\tdomNode.setAttributeNS(null,a,v);\n\t\t\t\t}\n\t\t\t} catch(e) {\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nMake child widgets correspondng to specified parseTreeNodes\n*/\nWidget.prototype.makeChildWidgets = function(parseTreeNodes) {\n\tthis.children = [];\n\tvar self = this;\n\t$tw.utils.each(parseTreeNodes || (this.parseTreeNode && this.parseTreeNode.children),function(childNode) {\n\t\tself.children.push(self.makeChildWidget(childNode));\n\t});\n};\n\n/*\nConstruct the widget object for a parse tree node\n*/\nWidget.prototype.makeChildWidget = function(parseTreeNode) {\n\tvar WidgetClass = this.widgetClasses[parseTreeNode.type];\n\tif(!WidgetClass) {\n\t\tWidgetClass = this.widgetClasses.text;\n\t\tparseTreeNode = {type: \"text\", text: \"Undefined widget '\" + parseTreeNode.type + \"'\"};\n\t}\n\treturn new WidgetClass(parseTreeNode,{\n\t\twiki: this.wiki,\n\t\tvariables: {},\n\t\tparentWidget: this,\n\t\tdocument: this.document\n\t});\n};\n\n/*\nGet the next sibling of this widget\n*/\nWidget.prototype.nextSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 && index < this.parentWidget.children.length-1) {\n\t\t\treturn this.parentWidget.children[index+1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nGet the previous sibling of this widget\n*/\nWidget.prototype.previousSibling = function() {\n\tif(this.parentWidget) {\n\t\tvar index = this.parentWidget.children.indexOf(this);\n\t\tif(index !== -1 && index > 0) {\n\t\t\treturn this.parentWidget.children[index-1];\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRender the children of this widget into the DOM\n*/\nWidget.prototype.renderChildren = function(parent,nextSibling) {\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\tchildWidget.render(parent,nextSibling);\n\t});\n};\n\n/*\nAdd a list of event listeners from an array [{type:,handler:},...]\n*/\nWidget.prototype.addEventListeners = function(listeners) {\n\tvar self = this;\n\t$tw.utils.each(listeners,function(listenerInfo) {\n\t\tself.addEventListener(listenerInfo.type,listenerInfo.handler);\n\t});\n};\n\n/*\nAdd an event listener\n*/\nWidget.prototype.addEventListener = function(type,handler) {\n\tvar self = this;\n\tif(typeof handler === \"string\") { // The handler is a method name on this widget\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn self[handler].call(self,event);\n\t\t};\n\t} else { // The handler is a function\n\t\tthis.eventListeners[type] = function(event) {\n\t\t\treturn handler.call(self,event);\n\t\t};\n\t}\n};\n\n/*\nDispatch an event to a widget. If the widget doesn't handle the event then it is also dispatched to the parent widget\n*/\nWidget.prototype.dispatchEvent = function(event) {\n\t// Dispatch the event if this widget handles it\n\tvar listener = this.eventListeners[event.type];\n\tif(listener) {\n\t\t// Don't propagate the event if the listener returned false\n\t\tif(!listener(event)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Dispatch the event to the parent widget\n\tif(this.parentWidget) {\n\t\treturn this.parentWidget.dispatchEvent(event);\n\t}\n\treturn true;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nWidget.prototype.refresh = function(changedTiddlers) {\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nRebuild a previously rendered widget\n*/\nWidget.prototype.refreshSelf = function() {\n\tvar nextSibling = this.findNextSiblingDomNode();\n\tthis.removeChildDomNodes();\n\tthis.render(this.parentDomNode,nextSibling);\n};\n\n/*\nRefresh all the children of a widget\n*/\nWidget.prototype.refreshChildren = function(changedTiddlers) {\n\tvar self = this,\n\t\trefreshed = false;\n\t$tw.utils.each(this.children,function(childWidget) {\n\t\trefreshed = childWidget.refresh(changedTiddlers) || refreshed;\n\t});\n\treturn refreshed;\n};\n\n/*\nFind the next sibling in the DOM to this widget. This is done by scanning the widget tree through all next siblings and their descendents that share the same parent DOM node\n*/\nWidget.prototype.findNextSiblingDomNode = function(startIndex) {\n\t// Refer to this widget by its index within its parents children\n\tvar parent = this.parentWidget,\n\t\tindex = startIndex !== undefined ? startIndex : parent.children.indexOf(this);\nif(index === -1) {\n\tthrow \"node not found in parents children\";\n}\n\t// Look for a DOM node in the later siblings\n\twhile(++index < parent.children.length) {\n\t\tvar domNode = parent.children[index].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\t// Go back and look for later siblings of our parent if it has the same parent dom node\n\tvar grandParent = parent.parentWidget;\n\tif(grandParent && parent.parentDomNode === this.parentDomNode) {\n\t\tindex = grandParent.children.indexOf(parent);\n\t\tif(index !== -1) {\n\t\t\treturn parent.findNextSiblingDomNode(index);\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nFind the first DOM node generated by a widget or its children\n*/\nWidget.prototype.findFirstDomNode = function() {\n\t// Return the first dom node of this widget, if we've got one\n\tif(this.domNodes.length > 0) {\n\t\treturn this.domNodes[0];\n\t}\n\t// Otherwise, recursively call our children\n\tfor(var t=0; t<this.children.length; t++) {\n\t\tvar domNode = this.children[t].findFirstDomNode();\n\t\tif(domNode) {\n\t\t\treturn domNode;\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRemove any DOM nodes created by this widget or its children\n*/\nWidget.prototype.removeChildDomNodes = function() {\n\t// If this widget has directly created DOM nodes, delete them and exit. This assumes that any child widgets are contained within the created DOM nodes, which would normally be the case\n\tif(this.domNodes.length > 0) {\n\t\t$tw.utils.each(this.domNodes,function(domNode) {\n\t\t\tdomNode.parentNode.removeChild(domNode);\n\t\t});\n\t\tthis.domNodes = [];\n\t} else {\n\t\t// Otherwise, ask the child widgets to delete their DOM nodes\n\t\t$tw.utils.each(this.children,function(childWidget) {\n\t\t\tchildWidget.removeChildDomNodes();\n\t\t});\n\t}\n};\n\n/*\nInvoke the action widgets that are descendents of the current widget.\n*/\nWidget.prototype.invokeActions = function(triggeringWidget,event) {\n\tvar handled = false;\n\t// For each child widget\n\tfor(var t=0; t<this.children.length; t++) {\n\t\tvar child = this.children[t];\n\t\t// Invoke the child if it is an action widget\n\t\tif(child.invokeAction) {\n\t\t\tchild.refreshSelf();\n\t\t\tif(child.invokeAction(triggeringWidget,event)) {\n\t\t\t\thandled = true;\n\t\t\t}\n\t\t}\n\t\t// Propagate through through the child if it permits it\n\t\tif(child.allowActionPropagation() && child.invokeActions(triggeringWidget,event)) {\n\t\t\thandled = true;\n\t\t}\n\t}\n\treturn handled;\n};\n\n/*\nInvoke the action widgets defined in a string\n*/\nWidget.prototype.invokeActionString = function(actions,triggeringWidget,event,variables) {\n\tactions = actions || \"\";\n\tvar parser = this.wiki.parseText(\"text/vnd.tiddlywiki\",actions,{\n\t\t\tparentWidget: this,\n\t\t\tdocument: this.document\n\t\t}),\n\t\twidgetNode = this.wiki.makeWidget(parser,{\n\t\t\tparentWidget: this,\n\t\t\tdocument: this.document,\n\t\t\tvariables: variables\n\t\t});\n\tvar container = this.document.createElement(\"div\");\n\twidgetNode.render(container,null);\n\treturn widgetNode.invokeActions(this,event);\n};\n\nWidget.prototype.allowActionPropagation = function() {\n\treturn true;\n};\n\nexports.widget = Widget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/widgets/wikify.js": {
"title": "$:/core/modules/widgets/wikify.js",
"text": "/*\\\ntitle: $:/core/modules/widgets/wikify.js\ntype: application/javascript\nmodule-type: widget\n\nWidget to wikify text into a variable\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar WikifyWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nWikifyWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nWikifyWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nWikifyWidget.prototype.execute = function() {\n\t// Get our parameters\n\tthis.wikifyName = this.getAttribute(\"name\");\n\tthis.wikifyText = this.getAttribute(\"text\");\n\tthis.wikifyType = this.getAttribute(\"type\");\n\tthis.wikifyMode = this.getAttribute(\"mode\",\"block\");\n\tthis.wikifyOutput = this.getAttribute(\"output\",\"text\");\n\t// Create the parse tree\n\tthis.wikifyParser = this.wiki.parseText(this.wikifyType,this.wikifyText,{\n\t\t\tparseAsInline: this.wikifyMode === \"inline\"\n\t\t});\n\t// Create the widget tree \n\tthis.wikifyWidgetNode = this.wiki.makeWidget(this.wikifyParser,{\n\t\t\tdocument: $tw.fakeDocument,\n\t\t\tparentWidget: this\n\t\t});\n\t// Render the widget tree to the container\n\tthis.wikifyContainer = $tw.fakeDocument.createElement(\"div\");\n\tthis.wikifyWidgetNode.render(this.wikifyContainer,null);\n\tthis.wikifyResult = this.getResult();\n\t// Set context variable\n\tthis.setVariable(this.wikifyName,this.wikifyResult);\n\t// Construct the child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nReturn the result string\n*/\nWikifyWidget.prototype.getResult = function() {\n\tvar result;\n\tswitch(this.wikifyOutput) {\n\t\tcase \"text\":\n\t\t\tresult = this.wikifyContainer.textContent;\n\t\t\tbreak;\n\t\tcase \"formattedtext\":\n\t\t\tresult = this.wikifyContainer.formattedTextContent;\n\t\t\tbreak;\n\t\tcase \"html\":\n\t\t\tresult = this.wikifyContainer.innerHTML;\n\t\t\tbreak;\n\t\tcase \"parsetree\":\n\t\t\tresult = JSON.stringify(this.wikifyParser.tree,0,$tw.config.preferences.jsonSpaces);\n\t\t\tbreak;\n\t\tcase \"widgettree\":\n\t\t\tresult = JSON.stringify(this.getWidgetTree(),0,$tw.config.preferences.jsonSpaces);\n\t\t\tbreak;\n\t}\n\treturn result;\n};\n\n/*\nReturn a string of the widget tree\n*/\nWikifyWidget.prototype.getWidgetTree = function() {\n\tvar copyNode = function(widgetNode,resultNode) {\n\t\t\tvar type = widgetNode.parseTreeNode.type;\n\t\t\tresultNode.type = type;\n\t\t\tswitch(type) {\n\t\t\t\tcase \"element\":\n\t\t\t\t\tresultNode.tag = widgetNode.parseTreeNode.tag;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"text\":\n\t\t\t\t\tresultNode.text = widgetNode.parseTreeNode.text;\n\t\t\t\t\tbreak;\t\n\t\t\t}\n\t\t\tif(Object.keys(widgetNode.attributes || {}).length > 0) {\n\t\t\t\tresultNode.attributes = {};\n\t\t\t\t$tw.utils.each(widgetNode.attributes,function(attr,attrName) {\n\t\t\t\t\tresultNode.attributes[attrName] = widgetNode.getAttribute(attrName);\n\t\t\t\t});\n\t\t\t}\n\t\t\tif(Object.keys(widgetNode.children || {}).length > 0) {\n\t\t\t\tresultNode.children = [];\n\t\t\t\t$tw.utils.each(widgetNode.children,function(widgetChildNode) {\n\t\t\t\t\tvar node = {};\n\t\t\t\t\tresultNode.children.push(node);\n\t\t\t\t\tcopyNode(widgetChildNode,node);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tresults = {};\n\tcopyNode(this.wikifyWidgetNode,results);\n\treturn results;\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nWikifyWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\t// Refresh ourselves entirely if any of our attributes have changed\n\tif(changedAttributes.name || changedAttributes.text || changedAttributes.type || changedAttributes.mode || changedAttributes.output) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\t// Refresh the widget tree\n\t\tif(this.wikifyWidgetNode.refresh(changedTiddlers)) {\n\t\t\t// Check if there was any change\n\t\t\tvar result = this.getResult();\n\t\t\tif(result !== this.wikifyResult) {\n\t\t\t\t// If so, save the change\n\t\t\t\tthis.wikifyResult = result;\n\t\t\t\tthis.setVariable(this.wikifyName,this.wikifyResult);\n\t\t\t\t// Refresh each of our child widgets\n\t\t\t\t$tw.utils.each(this.children,function(childWidget) {\n\t\t\t\t\tchildWidget.refreshSelf();\n\t\t\t\t});\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t// Just refresh the children\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports.wikify = WikifyWidget;\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/core/modules/wiki-bulkops.js": {
"title": "$:/core/modules/wiki-bulkops.js",
"text": "/*\\\ntitle: $:/core/modules/wiki-bulkops.js\ntype: application/javascript\nmodule-type: wikimethod\n\nBulk tiddler operations such as rename.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nRename a tiddler, and relink any tags or lists that reference it.\n*/\nfunction renameTiddler(fromTitle,toTitle,options) {\n\tfromTitle = (fromTitle || \"\").trim();\n\ttoTitle = (toTitle || \"\").trim();\n\toptions = options || {};\n\tif(fromTitle && toTitle && fromTitle !== toTitle) {\n\t\t// Rename the tiddler itself\n\t\tvar oldTiddler = this.getTiddler(fromTitle),\n\t\t\tnewTiddler = new $tw.Tiddler(oldTiddler,{title: toTitle},this.getModificationFields());\n\t\tnewTiddler = $tw.hooks.invokeHook(\"th-renaming-tiddler\",newTiddler,oldTiddler);\n\t\tthis.addTiddler(newTiddler);\n\t\tthis.deleteTiddler(fromTitle);\n\t\t// Rename any tags or lists that reference it\n\t\tthis.relinkTiddler(fromTitle,toTitle,options)\n\t}\n}\n\n/*\nRelink any tags or lists that reference a given tiddler\n*/\nfunction relinkTiddler(fromTitle,toTitle,options) {\n\tvar self = this;\n\tfromTitle = (fromTitle || \"\").trim();\n\ttoTitle = (toTitle || \"\").trim();\n\toptions = options || {};\n\tif(fromTitle && toTitle && fromTitle !== toTitle) {\n\t\tthis.each(function(tiddler,title) {\n\t\t\tvar type = tiddler.fields.type || \"\";\n\t\t\t// Don't touch plugins or JavaScript modules\n\t\t\tif(!tiddler.fields[\"plugin-type\"] && type !== \"application/javascript\") {\n\t\t\t\tvar tags = (tiddler.fields.tags || []).slice(0),\n\t\t\t\t\tlist = (tiddler.fields.list || []).slice(0),\n\t\t\t\t\tisModified = false;\n\t\t\t\tif(!options.dontRenameInTags) {\n\t\t\t\t\t// Rename tags\n\t\t\t\t\t$tw.utils.each(tags,function (title,index) {\n\t\t\t\t\t\tif(title === fromTitle) {\nconsole.log(\"Renaming tag '\" + tags[index] + \"' to '\" + toTitle + \"' of tiddler '\" + tiddler.fields.title + \"'\");\n\t\t\t\t\t\t\ttags[index] = toTitle;\n\t\t\t\t\t\t\tisModified = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif(!options.dontRenameInLists) {\n\t\t\t\t\t// Rename lists\n\t\t\t\t\t$tw.utils.each(list,function (title,index) {\n\t\t\t\t\t\tif(title === fromTitle) {\nconsole.log(\"Renaming list item '\" + list[index] + \"' to '\" + toTitle + \"' of tiddler '\" + tiddler.fields.title + \"'\");\n\t\t\t\t\t\t\tlist[index] = toTitle;\n\t\t\t\t\t\t\tisModified = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tif(isModified) {\n\t\t\t\t\tvar newTiddler = new $tw.Tiddler(tiddler,{tags: tags, list: list},self.getModificationFields())\n\t\t\t\t\tnewTiddler = $tw.hooks.invokeHook(\"th-relinking-tiddler\",newTiddler,tiddler);\n\t\t\t\t\tself.addTiddler(newTiddler);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n};\n\nexports.renameTiddler = renameTiddler;\nexports.relinkTiddler = relinkTiddler;\n\n})();\n",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/core/modules/wiki.js": {
"title": "$:/core/modules/wiki.js",
"text": "/*\\\ntitle: $:/core/modules/wiki.js\ntype: application/javascript\nmodule-type: wikimethod\n\nExtension methods for the $tw.Wiki object\n\nAdds the following properties to the wiki object:\n\n* `eventListeners` is a hashmap by type of arrays of listener functions\n* `changedTiddlers` is a hashmap describing changes to named tiddlers since wiki change events were last dispatched. Each entry is a hashmap containing two fields:\n\tmodified: true/false\n\tdeleted: true/false\n* `changeCount` is a hashmap by tiddler title containing a numerical index that starts at zero and is incremented each time a tiddler is created changed or deleted\n* `caches` is a hashmap by tiddler title containing a further hashmap of named cache objects. Caches are automatically cleared when a tiddler is modified or deleted\n* `globalCache` is a hashmap by cache name of cache objects that are cleared whenever any tiddler change occurs\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar widget = require(\"$:/core/modules/widgets/widget.js\");\n\nvar USER_NAME_TITLE = \"$:/status/UserName\",\n\tTIMESTAMP_DISABLE_TITLE = \"$:/config/TimestampDisable\";\n\n/*\nGet the value of a text reference. Text references can have any of these forms:\n\t<tiddlertitle>\n\t<tiddlertitle>!!<fieldname>\n\t!!<fieldname> - specifies a field of the current tiddlers\n\t<tiddlertitle>##<index>\n*/\nexports.getTextReference = function(textRef,defaultText,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tif(tr.field) {\n\t\tvar tiddler = this.getTiddler(title);\n\t\tif(tr.field === \"title\") { // Special case so we can return the title of a non-existent tiddler\n\t\t\treturn title;\n\t\t} else if(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\treturn tiddler.getFieldString(tr.field);\n\t\t} else {\n\t\t\treturn defaultText;\n\t\t}\n\t} else if(tr.index) {\n\t\treturn this.extractTiddlerDataItem(title,tr.index,defaultText);\n\t} else {\n\t\treturn this.getTiddlerText(title,defaultText);\n\t}\n};\n\nexports.setTextReference = function(textRef,value,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle = tr.title || currTiddlerTitle;\n\tthis.setText(title,tr.field,tr.index,value);\n};\n\nexports.setText = function(title,field,index,value,options) {\n\toptions = options || {};\n\tvar creationFields = options.suppressTimestamp ? {} : this.getCreationFields(),\n\t\tmodificationFields = options.suppressTimestamp ? {} : this.getModificationFields();\n\t// Check if it is a reference to a tiddler field\n\tif(index) {\n\t\tvar data = this.getTiddlerData(title,Object.create(null));\n\t\tif(value !== undefined) {\n\t\t\tdata[index] = value;\n\t\t} else {\n\t\t\tdelete data[index];\n\t\t}\n\t\tthis.setTiddlerData(title,data,modificationFields);\n\t} else {\n\t\tvar tiddler = this.getTiddler(title),\n\t\t\tfields = {title: title};\n\t\tfields[field || \"text\"] = value;\n\t\tthis.addTiddler(new $tw.Tiddler(creationFields,tiddler,fields,modificationFields));\n\t}\n};\n\nexports.deleteTextReference = function(textRef,currTiddlerTitle) {\n\tvar tr = $tw.utils.parseTextReference(textRef),\n\t\ttitle,tiddler,fields;\n\t// Check if it is a reference to a tiddler\n\tif(tr.title && !tr.field) {\n\t\tthis.deleteTiddler(tr.title);\n\t// Else check for a field reference\n\t} else if(tr.field) {\n\t\ttitle = tr.title || currTiddlerTitle;\n\t\ttiddler = this.getTiddler(title);\n\t\tif(tiddler && $tw.utils.hop(tiddler.fields,tr.field)) {\n\t\t\tfields = Object.create(null);\n\t\t\tfields[tr.field] = undefined;\n\t\t\tthis.addTiddler(new $tw.Tiddler(tiddler,fields,this.getModificationFields()));\n\t\t}\n\t}\n};\n\nexports.addEventListener = function(type,listener) {\n\tthis.eventListeners = this.eventListeners || {};\n\tthis.eventListeners[type] = this.eventListeners[type] || [];\n\tthis.eventListeners[type].push(listener);\t\n};\n\nexports.removeEventListener = function(type,listener) {\n\tvar listeners = this.eventListeners[type];\n\tif(listeners) {\n\t\tvar p = listeners.indexOf(listener);\n\t\tif(p !== -1) {\n\t\t\tlisteners.splice(p,1);\n\t\t}\n\t}\n};\n\nexports.dispatchEvent = function(type /*, args */) {\n\tvar args = Array.prototype.slice.call(arguments,1),\n\t\tlisteners = this.eventListeners[type];\n\tif(listeners) {\n\t\tfor(var p=0; p<listeners.length; p++) {\n\t\t\tvar listener = listeners[p];\n\t\t\tlistener.apply(listener,args);\n\t\t}\n\t}\n};\n\n/*\nCauses a tiddler to be marked as changed, incrementing the change count, and triggers event handlers.\nThis method should be called after the changes it describes have been made to the wiki.tiddlers[] array.\n\ttitle: Title of tiddler\n\tisDeleted: defaults to false (meaning the tiddler has been created or modified),\n\t\ttrue if the tiddler has been deleted\n*/\nexports.enqueueTiddlerEvent = function(title,isDeleted) {\n\t// Record the touch in the list of changed tiddlers\n\tthis.changedTiddlers = this.changedTiddlers || Object.create(null);\n\tthis.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null);\n\tthis.changedTiddlers[title][isDeleted ? \"deleted\" : \"modified\"] = true;\n\t// Increment the change count\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\tthis.changeCount[title]++;\n\t} else {\n\t\tthis.changeCount[title] = 1;\n\t}\n\t// Trigger events\n\tthis.eventListeners = this.eventListeners || {};\n\tif(!this.eventsTriggered) {\n\t\tvar self = this;\n\t\t$tw.utils.nextTick(function() {\n\t\t\tvar changes = self.changedTiddlers;\n\t\t\tself.changedTiddlers = Object.create(null);\n\t\t\tself.eventsTriggered = false;\n\t\t\tif($tw.utils.count(changes) > 0) {\n\t\t\t\tself.dispatchEvent(\"change\",changes);\n\t\t\t}\n\t\t});\n\t\tthis.eventsTriggered = true;\n\t}\n};\n\nexports.getSizeOfTiddlerEventQueue = function() {\n\treturn $tw.utils.count(this.changedTiddlers);\n};\n\nexports.clearTiddlerEventQueue = function() {\n\tthis.changedTiddlers = Object.create(null);\n\tthis.changeCount = Object.create(null);\n};\n\nexports.getChangeCount = function(title) {\n\tthis.changeCount = this.changeCount || Object.create(null);\n\tif($tw.utils.hop(this.changeCount,title)) {\n\t\treturn this.changeCount[title];\n\t} else {\n\t\treturn 0;\n\t}\n};\n\n/*\nGenerate an unused title from the specified base\n*/\nexports.generateNewTitle = function(baseTitle,options) {\n\toptions = options || {};\n\tvar c = 0,\n\t\ttitle = baseTitle;\n\twhile(this.tiddlerExists(title) || this.isShadowTiddler(title) || this.findDraft(title)) {\n\t\ttitle = baseTitle + \n\t\t\t(options.prefix || \" \") + \n\t\t\t(++c);\n\t}\n\treturn title;\n};\n\nexports.isSystemTiddler = function(title) {\n\treturn title && title.indexOf(\"$:/\") === 0;\n};\n\nexports.isTemporaryTiddler = function(title) {\n\treturn title && title.indexOf(\"$:/temp/\") === 0;\n};\n\nexports.isImageTiddler = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\t\t\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type || \"text/vnd.tiddlywiki\"];\n\t\treturn !!contentTypeInfo && contentTypeInfo.flags.indexOf(\"image\") !== -1;\n\t} else {\n\t\treturn null;\n\t}\n};\n\n/*\nLike addTiddler() except it will silently reject any plugin tiddlers that are older than the currently loaded version. Returns true if the tiddler was imported\n*/\nexports.importTiddler = function(tiddler) {\n\tvar existingTiddler = this.getTiddler(tiddler.fields.title);\n\t// Check if we're dealing with a plugin\n\tif(tiddler && tiddler.hasField(\"plugin-type\") && tiddler.hasField(\"version\") && existingTiddler && existingTiddler.hasField(\"plugin-type\") && existingTiddler.hasField(\"version\")) {\n\t\t// Reject the incoming plugin if it is older\n\t\tif(!$tw.utils.checkVersions(tiddler.fields.version,existingTiddler.fields.version)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Fall through to adding the tiddler\n\tthis.addTiddler(tiddler);\n\treturn true;\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is created\n*/\nexports.getCreationFields = function() {\n\tif(this.getTiddlerText(TIMESTAMP_DISABLE_TITLE,\"\").toLowerCase() !== \"yes\") {\n\t\tvar fields = {\n\t\t\t\tcreated: new Date()\n\t\t\t},\n\t\t\tcreator = this.getTiddlerText(USER_NAME_TITLE);\n\t\tif(creator) {\n\t\t\tfields.creator = creator;\n\t\t}\n\t\treturn fields;\n\t} else {\n\t\treturn {};\n\t}\n};\n\n/*\nReturn a hashmap of the fields that should be set when a tiddler is modified\n*/\nexports.getModificationFields = function() {\n\tif(this.getTiddlerText(TIMESTAMP_DISABLE_TITLE,\"\").toLowerCase() !== \"yes\") {\n\t\tvar fields = Object.create(null),\n\t\t\tmodifier = this.getTiddlerText(USER_NAME_TITLE);\n\t\tfields.modified = new Date();\n\t\tif(modifier) {\n\t\t\tfields.modifier = modifier;\n\t\t}\n\t\treturn fields;\n\t} else {\n\t\treturn {};\n\t}\n};\n\n/*\nReturn a sorted array of tiddler titles. Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.getTiddlers = function(options) {\n\toptions = options || Object.create(null);\n\tvar self = this,\n\t\tsortField = options.sortField || \"title\",\n\t\ttiddlers = [], t, titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tif(options.includeSystem || !self.isSystemTiddler(title)) {\n\t\t\tif(!options.excludeTag || !tiddler.hasTag(options.excludeTag)) {\n\t\t\t\ttiddlers.push(tiddler);\n\t\t\t}\n\t\t}\n\t});\n\ttiddlers.sort(function(a,b) {\n\t\tvar aa = a.fields[sortField].toLowerCase() || \"\",\n\t\t\tbb = b.fields[sortField].toLowerCase() || \"\";\n\t\tif(aa < bb) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tif(aa > bb) {\n\t\t\t\treturn 1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t});\n\tfor(t=0; t<tiddlers.length; t++) {\n\t\ttitles.push(tiddlers[t].fields.title);\n\t}\n\treturn titles;\n};\n\nexports.countTiddlers = function(excludeTag) {\n\tvar tiddlers = this.getTiddlers({excludeTag: excludeTag});\n\treturn $tw.utils.count(tiddlers);\n};\n\n/*\nReturns a function iterator(callback) that iterates through the specified titles, and invokes the callback with callback(tiddler,title)\n*/\nexports.makeTiddlerIterator = function(titles) {\n\tvar self = this;\n\tif(!$tw.utils.isArray(titles)) {\n\t\ttitles = Object.keys(titles);\n\t} else {\n\t\ttitles = titles.slice(0);\n\t}\n\treturn function(callback) {\n\t\ttitles.forEach(function(title) {\n\t\t\tcallback(self.getTiddler(title),title);\n\t\t});\n\t};\n};\n\n/*\nSort an array of tiddler titles by a specified field\n\ttitles: array of titles (sorted in place)\n\tsortField: name of field to sort by\n\tisDescending: true if the sort should be descending\n\tisCaseSensitive: true if the sort should consider upper and lower case letters to be different\n*/\nexports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,isNumeric) {\n\tvar self = this;\n\ttitles.sort(function(a,b) {\n\t\tvar x,y,\n\t\t\tcompareNumbers = function(x,y) {\n\t\t\t\tvar result = \n\t\t\t\t\tisNaN(x) && !isNaN(y) ? (isDescending ? -1 : 1) :\n\t\t\t\t\t!isNaN(x) && isNaN(y) ? (isDescending ? 1 : -1) :\n\t\t\t\t\t\t\t\t\t\t\t(isDescending ? y - x : x - y);\n\t\t\t\treturn result;\n\t\t\t};\n\t\tif(sortField !== \"title\") {\n\t\t\tvar tiddlerA = self.getTiddler(a),\n\t\t\t\ttiddlerB = self.getTiddler(b);\n\t\t\tif(tiddlerA) {\n\t\t\t\ta = tiddlerA.fields[sortField] || \"\";\n\t\t\t} else {\n\t\t\t\ta = \"\";\n\t\t\t}\n\t\t\tif(tiddlerB) {\n\t\t\t\tb = tiddlerB.fields[sortField] || \"\";\n\t\t\t} else {\n\t\t\t\tb = \"\";\n\t\t\t}\n\t\t}\n\t\tx = Number(a);\n\t\ty = Number(b);\n\t\tif(isNumeric && (!isNaN(x) || !isNaN(y))) {\n\t\t\treturn compareNumbers(x,y);\n\t\t} else if($tw.utils.isDate(a) && $tw.utils.isDate(b)) {\n\t\t\treturn isDescending ? b - a : a - b;\n\t\t} else {\n\t\t\ta = String(a);\n\t\t\tb = String(b);\n\t\t\tif(!isCaseSensitive) {\n\t\t\t\ta = a.toLowerCase();\n\t\t\t\tb = b.toLowerCase();\n\t\t\t}\n\t\t\treturn isDescending ? b.localeCompare(a) : a.localeCompare(b);\n\t\t}\n\t});\n};\n\n/*\nFor every tiddler invoke a callback(title,tiddler) with `this` set to the wiki object. Options include:\nsortField: field to sort by\nexcludeTag: tag to exclude\nincludeSystem: whether to include system tiddlers (defaults to false)\n*/\nexports.forEachTiddler = function(/* [options,]callback */) {\n\tvar arg = 0,\n\t\toptions = arguments.length >= 2 ? arguments[arg++] : {},\n\t\tcallback = arguments[arg++],\n\t\ttitles = this.getTiddlers(options),\n\t\tt, tiddler;\n\tfor(t=0; t<titles.length; t++) {\n\t\ttiddler = this.getTiddler(titles[t]);\n\t\tif(tiddler) {\n\t\t\tcallback.call(this,tiddler.fields.title,tiddler);\n\t\t}\n\t}\n};\n\n/*\nReturn an array of tiddler titles that are directly linked from the specified tiddler\n*/\nexports.getTiddlerLinks = function(title) {\n\tvar self = this;\n\t// We'll cache the links so they only get computed if the tiddler changes\n\treturn this.getCacheForTiddler(title,\"links\",function() {\n\t\t// Parse the tiddler\n\t\tvar parser = self.parseTiddler(title);\n\t\t// Count up the links\n\t\tvar links = [],\n\t\t\tcheckParseTree = function(parseTree) {\n\t\t\t\tfor(var t=0; t<parseTree.length; t++) {\n\t\t\t\t\tvar parseTreeNode = parseTree[t];\n\t\t\t\t\tif(parseTreeNode.type === \"link\" && parseTreeNode.attributes.to && parseTreeNode.attributes.to.type === \"string\") {\n\t\t\t\t\t\tvar value = parseTreeNode.attributes.to.value;\n\t\t\t\t\t\tif(links.indexOf(value) === -1) {\n\t\t\t\t\t\t\tlinks.push(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(parseTreeNode.children) {\n\t\t\t\t\t\tcheckParseTree(parseTreeNode.children);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\tif(parser) {\n\t\t\tcheckParseTree(parser.tree);\n\t\t}\n\t\treturn links;\n\t});\n};\n\n/*\nReturn an array of tiddler titles that link to the specified tiddler\n*/\nexports.getTiddlerBacklinks = function(targetTitle) {\n\tvar self = this,\n\t\tbacklinks = [];\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\tif(links.indexOf(targetTitle) !== -1) {\n\t\t\tbacklinks.push(title);\n\t\t}\n\t});\n\treturn backlinks;\n};\n\n/*\nReturn a hashmap of tiddler titles that are referenced but not defined. Each value is the number of times the missing tiddler is referenced\n*/\nexports.getMissingTitles = function() {\n\tvar self = this,\n\t\tmissing = [];\n// We should cache the missing tiddler list, even if we recreate it every time any tiddler is modified\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tif((!self.tiddlerExists(link) && !self.isShadowTiddler(link)) && missing.indexOf(link) === -1) {\n\t\t\t\tmissing.push(link);\n\t\t\t}\n\t\t});\n\t});\n\treturn missing;\n};\n\nexports.getOrphanTitles = function() {\n\tvar self = this,\n\t\torphans = this.getTiddlers();\n\tthis.forEachTiddler(function(title,tiddler) {\n\t\tvar links = self.getTiddlerLinks(title);\n\t\t$tw.utils.each(links,function(link) {\n\t\t\tvar p = orphans.indexOf(link);\n\t\t\tif(p !== -1) {\n\t\t\t\torphans.splice(p,1);\n\t\t\t}\n\t\t});\n\t});\n\treturn orphans; // Todo\n};\n\n/*\nRetrieves a list of the tiddler titles that are tagged with a given tag\n*/\nexports.getTiddlersWithTag = function(tag) {\n\tvar self = this;\n\treturn this.getGlobalCache(\"taglist-\" + tag,function() {\n\t\tvar tagmap = self.getTagMap();\n\t\treturn self.sortByList(tagmap[tag],tag);\n\t});\n};\n\n/*\nGet a hashmap by tag of arrays of tiddler titles\n*/\nexports.getTagMap = function() {\n\tvar self = this;\n\treturn this.getGlobalCache(\"tagmap\",function() {\n\t\tvar tags = Object.create(null),\n\t\t\tstoreTags = function(tagArray,title) {\n\t\t\t\tif(tagArray) {\n\t\t\t\t\tfor(var index=0; index<tagArray.length; index++) {\n\t\t\t\t\t\tvar tag = tagArray[index];\n\t\t\t\t\t\tif($tw.utils.hop(tags,tag)) {\n\t\t\t\t\t\t\ttags[tag].push(title);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttags[tag] = [title];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttitle, tiddler;\n\t\t// Collect up all the tags\n\t\tself.eachShadow(function(tiddler,title) {\n\t\t\tif(!self.tiddlerExists(title)) {\n\t\t\t\ttiddler = self.getTiddler(title);\n\t\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t\t}\n\t\t});\n\t\tself.each(function(tiddler,title) {\n\t\t\tstoreTags(tiddler.fields.tags,title);\n\t\t});\n\t\treturn tags;\n\t});\n};\n\n/*\nLookup a given tiddler and return a list of all the tiddlers that include it in the specified list field\n*/\nexports.findListingsOfTiddler = function(targetTitle,fieldName) {\n\tfieldName = fieldName || \"list\";\n\tvar titles = [];\n\tthis.each(function(tiddler,title) {\n\t\tvar list = $tw.utils.parseStringArray(tiddler.fields[fieldName]);\n\t\tif(list && list.indexOf(targetTitle) !== -1) {\n\t\t\ttitles.push(title);\n\t\t}\n\t});\n\treturn titles;\n};\n\n/*\nSorts an array of tiddler titles according to an ordered list\n*/\nexports.sortByList = function(array,listTitle) {\n\tvar list = this.getTiddlerList(listTitle);\n\tif(!array || array.length === 0) {\n\t\treturn [];\n\t} else {\n\t\tvar titles = [], t, title;\n\t\t// First place any entries that are present in the list\n\t\tfor(t=0; t<list.length; t++) {\n\t\t\ttitle = list[t];\n\t\t\tif(array.indexOf(title) !== -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Then place any remaining entries\n\t\tfor(t=0; t<array.length; t++) {\n\t\t\ttitle = array[t];\n\t\t\tif(list.indexOf(title) === -1) {\n\t\t\t\ttitles.push(title);\n\t\t\t}\n\t\t}\n\t\t// Finally obey the list-before and list-after fields of each tiddler in turn\n\t\tvar sortedTitles = titles.slice(0);\n\t\tfor(t=0; t<sortedTitles.length; t++) {\n\t\t\ttitle = sortedTitles[t];\n\t\t\tvar currPos = titles.indexOf(title),\n\t\t\t\tnewPos = -1,\n\t\t\t\ttiddler = this.getTiddler(title);\n\t\t\tif(tiddler) {\n\t\t\t\tvar beforeTitle = tiddler.fields[\"list-before\"],\n\t\t\t\t\tafterTitle = tiddler.fields[\"list-after\"];\n\t\t\t\tif(beforeTitle === \"\") {\n\t\t\t\t\tnewPos = 0;\n\t\t\t\t} else if(beforeTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(beforeTitle);\n\t\t\t\t} else if(afterTitle) {\n\t\t\t\t\tnewPos = titles.indexOf(afterTitle);\n\t\t\t\t\tif(newPos >= 0) {\n\t\t\t\t\t\t++newPos;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(newPos === -1) {\n\t\t\t\t\tnewPos = currPos;\n\t\t\t\t}\n\t\t\t\tif(newPos !== currPos) {\n\t\t\t\t\ttitles.splice(currPos,1);\n\t\t\t\t\tif(newPos >= currPos) {\n\t\t\t\t\t\tnewPos--;\n\t\t\t\t\t}\n\t\t\t\t\ttitles.splice(newPos,0,title);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn titles;\n\t}\n};\n\nexports.getSubTiddler = function(title,subTiddlerTitle) {\n\tvar bundleInfo = this.getPluginInfo(title) || this.getTiddlerDataCached(title);\n\tif(bundleInfo && bundleInfo.tiddlers) {\n\t\tvar subTiddler = bundleInfo.tiddlers[subTiddlerTitle];\n\t\tif(subTiddler) {\n\t\t\treturn new $tw.Tiddler(subTiddler);\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nRetrieve a tiddler as a JSON string of the fields\n*/\nexports.getTiddlerAsJson = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\tvar fields = Object.create(null);\n\t\t$tw.utils.each(tiddler.fields,function(value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\treturn JSON.stringify(fields);\n\t} else {\n\t\treturn JSON.stringify({title: title});\n\t}\n};\n\n/*\nGet the content of a tiddler as a JavaScript object. How this is done depends on the type of the tiddler:\n\napplication/json: the tiddler JSON is parsed into an object\napplication/x-tiddler-dictionary: the tiddler is parsed as sequence of name:value pairs\n\nOther types currently just return null.\n\ntitleOrTiddler: string tiddler title or a tiddler object\ndefaultData: default data to be returned if the tiddler is missing or doesn't contain data\n\nNote that the same value is returned for repeated calls for the same tiddler data. The value is frozen to prevent modification; otherwise modifications would be visible to all callers\n*/\nexports.getTiddlerDataCached = function(titleOrTiddler,defaultData) {\n\tvar self = this,\n\t\ttiddler = titleOrTiddler;\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\ttiddler = this.getTiddler(tiddler);\t\n\t}\n\tif(tiddler) {\n\t\treturn this.getCacheForTiddler(tiddler.fields.title,\"data\",function() {\n\t\t\t// Return the frozen value\n\t\t\tvar value = self.getTiddlerData(tiddler.fields.title,undefined);\n\t\t\t$tw.utils.deepFreeze(value);\n\t\t\treturn value;\n\t\t}) || defaultData;\n\t} else {\n\t\treturn defaultData;\n\t}\n};\n\n/*\nAlternative, uncached version of getTiddlerDataCached(). The return value can be mutated freely and reused\n*/\nexports.getTiddlerData = function(titleOrTiddler,defaultData) {\n\tvar tiddler = titleOrTiddler,\n\t\tdata;\n\tif(!(tiddler instanceof $tw.Tiddler)) {\n\t\ttiddler = this.getTiddler(tiddler);\t\n\t}\n\tif(tiddler && tiddler.fields.text) {\n\t\tswitch(tiddler.fields.type) {\n\t\t\tcase \"application/json\":\n\t\t\t\t// JSON tiddler\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse(tiddler.fields.text);\n\t\t\t\t} catch(ex) {\n\t\t\t\t\treturn defaultData;\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\tcase \"application/x-tiddler-dictionary\":\n\t\t\t\treturn $tw.utils.parseFields(tiddler.fields.text);\n\t\t}\n\t}\n\treturn defaultData;\n};\n\n/*\nExtract an indexed field from within a data tiddler\n*/\nexports.extractTiddlerDataItem = function(titleOrTiddler,index,defaultText) {\n\tvar data = this.getTiddlerDataCached(titleOrTiddler,Object.create(null)),\n\t\ttext;\n\tif(data && $tw.utils.hop(data,index)) {\n\t\ttext = data[index];\n\t}\n\tif(typeof text === \"string\" || typeof text === \"number\") {\n\t\treturn text.toString();\n\t} else {\n\t\treturn defaultText;\n\t}\n};\n\n/*\nSet a tiddlers content to a JavaScript object. Currently this is done by setting the tiddler's type to \"application/json\" and setting the text to the JSON text of the data.\ntitle: title of tiddler\ndata: object that can be serialised to JSON\nfields: optional hashmap of additional tiddler fields to be set\n*/\nexports.setTiddlerData = function(title,data,fields) {\n\tvar existingTiddler = this.getTiddler(title),\n\t\tnewFields = {\n\t\t\ttitle: title\n\t};\n\tif(existingTiddler && existingTiddler.fields.type === \"application/x-tiddler-dictionary\") {\n\t\tnewFields.text = $tw.utils.makeTiddlerDictionary(data);\n\t} else {\n\t\tnewFields.type = \"application/json\";\n\t\tnewFields.text = JSON.stringify(data,null,$tw.config.preferences.jsonSpaces);\n\t}\n\tthis.addTiddler(new $tw.Tiddler(this.getCreationFields(),existingTiddler,fields,newFields,this.getModificationFields()));\n};\n\n/*\nReturn the content of a tiddler as an array containing each line\n*/\nexports.getTiddlerList = function(title,field,index) {\n\tif(index) {\n\t\treturn $tw.utils.parseStringArray(this.extractTiddlerDataItem(title,index,\"\"));\n\t}\n\tfield = field || \"list\";\n\tvar tiddler = this.getTiddler(title);\n\tif(tiddler) {\n\t\treturn ($tw.utils.parseStringArray(tiddler.fields[field]) || []).slice(0);\n\t}\n\treturn [];\n};\n\n// Return a named global cache object. Global cache objects are cleared whenever a tiddler change occurs\nexports.getGlobalCache = function(cacheName,initializer) {\n\tthis.globalCache = this.globalCache || Object.create(null);\n\tif($tw.utils.hop(this.globalCache,cacheName)) {\n\t\treturn this.globalCache[cacheName];\n\t} else {\n\t\tthis.globalCache[cacheName] = initializer();\n\t\treturn this.globalCache[cacheName];\n\t}\n};\n\nexports.clearGlobalCache = function() {\n\tthis.globalCache = Object.create(null);\n};\n\n// Return the named cache object for a tiddler. If the cache doesn't exist then the initializer function is invoked to create it\nexports.getCacheForTiddler = function(title,cacheName,initializer) {\n\tthis.caches = this.caches || Object.create(null);\n\tvar caches = this.caches[title];\n\tif(caches && caches[cacheName]) {\n\t\treturn caches[cacheName];\n\t} else {\n\t\tif(!caches) {\n\t\t\tcaches = Object.create(null);\n\t\t\tthis.caches[title] = caches;\n\t\t}\n\t\tcaches[cacheName] = initializer();\n\t\treturn caches[cacheName];\n\t}\n};\n\n// Clear all caches associated with a particular tiddler, or, if the title is null, clear all the caches for all the tiddlers\nexports.clearCache = function(title) {\n\tif(title) {\n\t\tthis.caches = this.caches || Object.create(null);\n\t\tif($tw.utils.hop(this.caches,title)) {\n\t\t\tdelete this.caches[title];\n\t\t}\n\t} else {\n\t\tthis.caches = Object.create(null);\n\t}\n};\n\nexports.initParsers = function(moduleType) {\n\t// Install the parser modules\n\t$tw.Wiki.parsers = {};\n\tvar self = this;\n\t$tw.modules.forEachModuleOfType(\"parser\",function(title,module) {\n\t\tfor(var f in module) {\n\t\t\tif($tw.utils.hop(module,f)) {\n\t\t\t\t$tw.Wiki.parsers[f] = module[f]; // Store the parser class\n\t\t\t}\n\t\t}\n\t});\n};\n\n/*\nParse a block of text of a specified MIME type\n\ttype: content type of text to be parsed\n\ttext: text\n\toptions: see below\nOptions include:\n\tparseAsInline: if true, the text of the tiddler will be parsed as an inline run\n\t_canonical_uri: optional string of the canonical URI of this content\n*/\nexports.parseText = function(type,text,options) {\n\ttext = text || \"\";\n\toptions = options || {};\n\t// Select a parser\n\tvar Parser = $tw.Wiki.parsers[type];\n\tif(!Parser && $tw.utils.getFileExtensionInfo(type)) {\n\t\tParser = $tw.Wiki.parsers[$tw.utils.getFileExtensionInfo(type).type];\n\t}\n\tif(!Parser) {\n\t\tParser = $tw.Wiki.parsers[options.defaultType || \"text/vnd.tiddlywiki\"];\n\t}\n\tif(!Parser) {\n\t\treturn null;\n\t}\n\t// Return the parser instance\n\treturn new Parser(type,text,{\n\t\tparseAsInline: options.parseAsInline,\n\t\twiki: this,\n\t\t_canonical_uri: options._canonical_uri\n\t});\n};\n\n/*\nParse a tiddler according to its MIME type\n*/\nexports.parseTiddler = function(title,options) {\n\toptions = $tw.utils.extend({},options);\n\tvar cacheType = options.parseAsInline ? \"inlineParseTree\" : \"blockParseTree\",\n\t\ttiddler = this.getTiddler(title),\n\t\tself = this;\n\treturn tiddler ? this.getCacheForTiddler(title,cacheType,function() {\n\t\t\tif(tiddler.hasField(\"_canonical_uri\")) {\n\t\t\t\toptions._canonical_uri = tiddler.fields._canonical_uri;\n\t\t\t}\n\t\t\treturn self.parseText(tiddler.fields.type,tiddler.fields.text,options);\n\t\t}) : null;\n};\n\nexports.parseTextReference = function(title,field,index,options) {\n\tvar tiddler,text;\n\tif(options.subTiddler) {\n\t\ttiddler = this.getSubTiddler(title,options.subTiddler);\n\t} else {\n\t\ttiddler = this.getTiddler(title);\n\t\tif(field === \"text\" || (!field && !index)) {\n\t\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\n\t\t\treturn this.parseTiddler(title,options);\n\t\t}\n\t}\n\tif(field === \"text\" || (!field && !index)) {\n\t\tif(tiddler && tiddler.fields) {\n\t\t\treturn this.parseText(tiddler.fields.type || \"text/vnd.tiddlywiki\",tiddler.fields.text,options);\t\t\t\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t} else if(field) {\n\t\tif(field === \"title\") {\n\t\t\ttext = title;\n\t\t} else {\n\t\t\tif(!tiddler || !tiddler.hasField(field)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\ttext = tiddler.fields[field];\n\t\t}\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text.toString(),options);\n\t} else if(index) {\n\t\tthis.getTiddlerText(title); // Force the tiddler to be lazily loaded\n\t\ttext = this.extractTiddlerDataItem(tiddler,index,undefined);\n\t\tif(text === undefined) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.parseText(\"text/vnd.tiddlywiki\",text,options);\n\t}\n};\n\n/*\nMake a widget tree for a parse tree\nparser: parser object\noptions: see below\nOptions include:\ndocument: optional document to use\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.makeWidget = function(parser,options) {\n\toptions = options || {};\n\tvar widgetNode = {\n\t\t\ttype: \"widget\",\n\t\t\tchildren: []\n\t\t},\n\t\tcurrWidgetNode = widgetNode;\n\t// Create set variable widgets for each variable\n\t$tw.utils.each(options.variables,function(value,name) {\n\t\tvar setVariableWidget = {\n\t\t\ttype: \"set\",\n\t\t\tattributes: {\n\t\t\t\tname: {type: \"string\", value: name},\n\t\t\t\tvalue: {type: \"string\", value: value}\n\t\t\t},\n\t\t\tchildren: []\n\t\t};\n\t\tcurrWidgetNode.children = [setVariableWidget];\n\t\tcurrWidgetNode = setVariableWidget;\n\t});\n\t// Add in the supplied parse tree nodes\n\tcurrWidgetNode.children = parser ? parser.tree : [];\n\t// Create the widget\n\treturn new widget.widget(widgetNode,{\n\t\twiki: this,\n\t\tdocument: options.document || $tw.fakeDocument,\n\t\tparentWidget: options.parentWidget\n\t});\n};\n\n/*\nMake a widget tree for transclusion\ntitle: target tiddler title\noptions: as for wiki.makeWidget() plus:\noptions.field: optional field to transclude (defaults to \"text\")\noptions.mode: transclusion mode \"inline\" or \"block\"\noptions.children: optional array of children for the transclude widget\noptions.importVariables: optional importvariables filter string for macros to be included\noptions.importPageMacros: optional boolean; if true, equivalent to passing \"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\" to options.importVariables\n*/\nexports.makeTranscludeWidget = function(title,options) {\n\toptions = options || {};\n\tvar parseTreeDiv = {tree: [{\n\t\t\ttype: \"element\",\n\t\t\ttag: \"div\",\n\t\t\tchildren: []}]},\n\t\tparseTreeImportVariables = {\n\t\t\ttype: \"importvariables\",\n\t\t\tattributes: {\n\t\t\t\tfilter: {\n\t\t\t\t\tname: \"filter\",\n\t\t\t\t\ttype: \"string\"\n\t\t\t\t}\n\t\t\t},\n\t\t\tisBlock: false,\n\t\t\tchildren: []},\n\t\tparseTreeTransclude = {\n\t\t\ttype: \"transclude\",\n\t\t\tattributes: {\n\t\t\t\ttiddler: {\n\t\t\t\t\tname: \"tiddler\",\n\t\t\t\t\ttype: \"string\",\n\t\t\t\t\tvalue: title}},\n\t\t\tisBlock: !options.parseAsInline};\n\tif(options.importVariables || options.importPageMacros) {\n\t\tif(options.importVariables) {\n\t\t\tparseTreeImportVariables.attributes.filter.value = options.importVariables;\n\t\t} else if(options.importPageMacros) {\n\t\t\tparseTreeImportVariables.attributes.filter.value = \"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\";\n\t\t}\n\t\tparseTreeDiv.tree[0].children.push(parseTreeImportVariables);\n\t\tparseTreeImportVariables.children.push(parseTreeTransclude);\n\t} else {\n\t\tparseTreeDiv.tree[0].children.push(parseTreeTransclude);\n\t}\n\tif(options.field) {\n\t\tparseTreeTransclude.attributes.field = {type: \"string\", value: options.field};\n\t}\n\tif(options.mode) {\n\t\tparseTreeTransclude.attributes.mode = {type: \"string\", value: options.mode};\n\t}\n\tif(options.children) {\n\t\tparseTreeTransclude.children = options.children;\n\t}\n\treturn $tw.wiki.makeWidget(parseTreeDiv,options);\n};\n\n/*\nParse text in a specified format and render it into another format\n\toutputType: content type for the output\n\ttextType: content type of the input text\n\ttext: input text\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderText = function(outputType,textType,text,options) {\n\toptions = options || {};\n\tvar parser = this.parseText(textType,text,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\"div\");\n\twidgetNode.render(container,null);\n\treturn outputType === \"text/html\" ? container.innerHTML : container.textContent;\n};\n\n/*\nParse text from a tiddler and render it into another format\n\toutputType: content type for the output\n\ttitle: title of the tiddler to be rendered\n\toptions: see below\nOptions include:\nvariables: hashmap of variables to set\nparentWidget: optional parent widget for the root node\n*/\nexports.renderTiddler = function(outputType,title,options) {\n\toptions = options || {};\n\tvar parser = this.parseTiddler(title,options),\n\t\twidgetNode = this.makeWidget(parser,options);\n\tvar container = $tw.fakeDocument.createElement(\"div\");\n\twidgetNode.render(container,null);\n\treturn outputType === \"text/html\" ? container.innerHTML : (outputType === \"text/plain-formatted\" ? container.formattedTextContent : container.textContent);\n};\n\n/*\nReturn an array of tiddler titles that match a search string\n\ttext: The text string to search for\n\toptions: see below\nOptions available:\n\tsource: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)\n\texclude: An array of tiddler titles to exclude from the search\n\tinvert: If true returns tiddlers that do not contain the specified string\n\tcaseSensitive: If true forces a case sensitive search\n\tliteral: If true, searches for literal string, rather than separate search terms\n\tfield: If specified, restricts the search to the specified field\n*/\nexports.search = function(text,options) {\n\toptions = options || {};\n\tvar self = this,\n\t\tt,\n\t\tinvert = !!options.invert;\n\t// Convert the search string into a regexp for each term\n\tvar terms, searchTermsRegExps,\n\t\tflags = options.caseSensitive ? \"\" : \"i\";\n\tif(options.literal) {\n\t\tif(text.length === 0) {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [new RegExp(\"(\" + $tw.utils.escapeRegExp(text) + \")\",flags)];\n\t\t}\n\t} else {\n\t\tterms = text.split(/ +/);\n\t\tif(terms.length === 1 && terms[0] === \"\") {\n\t\t\tsearchTermsRegExps = null;\n\t\t} else {\n\t\t\tsearchTermsRegExps = [];\n\t\t\tfor(t=0; t<terms.length; t++) {\n\t\t\t\tsearchTermsRegExps.push(new RegExp(\"(\" + $tw.utils.escapeRegExp(terms[t]) + \")\",flags));\n\t\t\t}\n\t\t}\n\t}\n\t// Function to check a given tiddler for the search term\n\tvar searchTiddler = function(title) {\n\t\tif(!searchTermsRegExps) {\n\t\t\treturn true;\n\t\t}\n\t\tvar tiddler = self.getTiddler(title);\n\t\tif(!tiddler) {\n\t\t\ttiddler = new $tw.Tiddler({title: title, text: \"\", type: \"text/vnd.tiddlywiki\"});\n\t\t}\n\t\tvar contentTypeInfo = $tw.config.contentTypeInfo[tiddler.fields.type] || $tw.config.contentTypeInfo[\"text/vnd.tiddlywiki\"],\n\t\t\tmatch;\n\t\tfor(var t=0; t<searchTermsRegExps.length; t++) {\n\t\t\tmatch = false;\n\t\t\tif(options.field) {\n\t\t\t\tmatch = searchTermsRegExps[t].test(tiddler.getFieldString(options.field));\n\t\t\t} else {\n\t\t\t\t// Search title, tags and body\n\t\t\t\tif(contentTypeInfo.encoding === \"utf8\") {\n\t\t\t\t\tmatch = match || searchTermsRegExps[t].test(tiddler.fields.text);\n\t\t\t\t}\n\t\t\t\tvar tags = tiddler.fields.tags ? tiddler.fields.tags.join(\"\\0\") : \"\";\n\t\t\t\tmatch = match || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.title);\n\t\t\t}\n\t\t\tif(!match) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t};\n\t// Loop through all the tiddlers doing the search\n\tvar results = [],\n\t\tsource = options.source || this.each;\n\tsource(function(tiddler,title) {\n\t\tif(searchTiddler(title) !== options.invert) {\n\t\t\tresults.push(title);\n\t\t}\n\t});\n\t// Remove any of the results we have to exclude\n\tif(options.exclude) {\n\t\tfor(t=0; t<options.exclude.length; t++) {\n\t\t\tvar p = results.indexOf(options.exclude[t]);\n\t\t\tif(p !== -1) {\n\t\t\t\tresults.splice(p,1);\n\t\t\t}\n\t\t}\n\t}\n\treturn results;\n};\n\n/*\nTrigger a load for a tiddler if it is skinny. Returns the text, or undefined if the tiddler is missing, null if the tiddler is being lazily loaded.\n*/\nexports.getTiddlerText = function(title,defaultText) {\n\tvar tiddler = this.getTiddler(title);\n\t// Return undefined if the tiddler isn't found\n\tif(!tiddler) {\n\t\treturn defaultText;\n\t}\n\tif(tiddler.fields.text !== undefined) {\n\t\t// Just return the text if we've got it\n\t\treturn tiddler.fields.text;\n\t} else {\n\t\t// Tell any listeners about the need to lazily load this tiddler\n\t\tthis.dispatchEvent(\"lazyLoad\",title);\n\t\t// Indicate that the text is being loaded\n\t\treturn null;\n\t}\n};\n\n/*\nCheck whether the text of a tiddler matches a given value. By default, the comparison is case insensitive, and any spaces at either end of the tiddler text is trimmed\n*/\nexports.checkTiddlerText = function(title,targetText,options) {\n\toptions = options || {};\n\tvar text = this.getTiddlerText(title,\"\");\n\tif(!options.noTrim) {\n\t\ttext = text.trim();\n\t}\n\tif(!options.caseSensitive) {\n\t\ttext = text.toLowerCase();\n\t\ttargetText = targetText.toLowerCase();\n\t}\n\treturn text === targetText;\n}\n\n/*\nRead an array of browser File objects, invoking callback(tiddlerFieldsArray) once they're all read\n*/\nexports.readFiles = function(files,options) {\n\tvar callback;\n\tif(typeof options === \"function\") {\n\t\tcallback = options;\n\t\toptions = {};\n\t} else {\n\t\tcallback = options.callback;\n\t}\n\tvar result = [],\n\t\toutstanding = files.length,\n\t\treadFileCallback = function(tiddlerFieldsArray) {\n\t\t\tresult.push.apply(result,tiddlerFieldsArray);\n\t\t\tif(--outstanding === 0) {\n\t\t\t\tcallback(result);\n\t\t\t}\n\t\t};\n\tfor(var f=0; f<files.length; f++) {\n\t\tthis.readFile(files[f],Object.assign({},options,{callback: readFileCallback}));\n\t}\n\treturn files.length;\n};\n\n/*\nRead a browser File object, invoking callback(tiddlerFieldsArray) with an array of tiddler fields objects\n*/\nexports.readFile = function(file,options) {\n\tvar callback;\n\tif(typeof options === \"function\") {\n\t\tcallback = options;\n\t\toptions = {};\n\t} else {\n\t\tcallback = options.callback;\n\t}\n\t// Get the type, falling back to the filename extension\n\tvar self = this,\n\t\ttype = file.type;\n\tif(type === \"\" || !type) {\n\t\tvar dotPos = file.name.lastIndexOf(\".\");\n\t\tif(dotPos !== -1) {\n\t\t\tvar fileExtensionInfo = $tw.utils.getFileExtensionInfo(file.name.substr(dotPos));\n\t\t\tif(fileExtensionInfo) {\n\t\t\t\ttype = fileExtensionInfo.type;\n\t\t\t}\n\t\t}\n\t}\n\t// Figure out if we're reading a binary file\n\tvar contentTypeInfo = $tw.config.contentTypeInfo[type],\n\t\tisBinary = contentTypeInfo ? contentTypeInfo.encoding === \"base64\" : false;\n\t// Log some debugging information\n\tif($tw.log.IMPORT) {\n\t\tconsole.log(\"Importing file '\" + file.name + \"', type: '\" + type + \"', isBinary: \" + isBinary);\n\t}\n\t// Give the hook a chance to process the drag\n\tif($tw.hooks.invokeHook(\"th-importing-file\",{\n\t\tfile: file,\n\t\ttype: type,\n\t\tisBinary: isBinary,\n\t\tcallback: callback\n\t}) !== true) {\n\t\tthis.readFileContent(file,type,isBinary,options.deserializer,callback);\n\t}\n};\n\n/*\nLower level utility to read the content of a browser File object, invoking callback(tiddlerFieldsArray) with an array of tiddler fields objects\n*/\nexports.readFileContent = function(file,type,isBinary,deserializer,callback) {\n\tvar self = this;\n\t// Create the FileReader\n\tvar reader = new FileReader();\n\t// Onload\n\treader.onload = function(event) {\n\t\tvar text = event.target.result,\n\t\t\ttiddlerFields = {title: file.name || \"Untitled\", type: type};\n\t\tif(isBinary) {\n\t\t\tvar commaPos = text.indexOf(\",\");\n\t\t\tif(commaPos !== -1) {\n\t\t\t\ttext = text.substr(commaPos + 1);\n\t\t\t}\n\t\t}\n\t\t// Check whether this is an encrypted TiddlyWiki file\n\t\tvar encryptedJson = $tw.utils.extractEncryptedStoreArea(text);\n\t\tif(encryptedJson) {\n\t\t\t// If so, attempt to decrypt it with the current password\n\t\t\t$tw.utils.decryptStoreAreaInteractive(encryptedJson,function(tiddlers) {\n\t\t\t\tcallback(tiddlers);\n\t\t\t});\n\t\t} else {\n\t\t\t// Otherwise, just try to deserialise any tiddlers in the file\n\t\t\tcallback(self.deserializeTiddlers(type,text,tiddlerFields,{deserializer: deserializer}));\n\t\t}\n\t};\n\t// Kick off the read\n\tif(isBinary) {\n\t\treader.readAsDataURL(file);\n\t} else {\n\t\treader.readAsText(file);\n\t}\n};\n\n/*\nFind any existing draft of a specified tiddler\n*/\nexports.findDraft = function(targetTitle) {\n\tvar draftTitle = undefined;\n\tthis.forEachTiddler({includeSystem: true},function(title,tiddler) {\n\t\tif(tiddler.fields[\"draft.title\"] && tiddler.fields[\"draft.of\"] === targetTitle) {\n\t\t\tdraftTitle = title;\n\t\t}\n\t});\n\treturn draftTitle;\n}\n\n/*\nCheck whether the specified draft tiddler has been modified.\nIf the original tiddler doesn't exist, create a vanilla tiddler variable,\nto check if additional fields have been added.\n*/\nexports.isDraftModified = function(title) {\n\tvar tiddler = this.getTiddler(title);\n\tif(!tiddler.isDraft()) {\n\t\treturn false;\n\t}\n\tvar ignoredFields = [\"created\", \"modified\", \"title\", \"draft.title\", \"draft.of\"],\n\t\torigTiddler = this.getTiddler(tiddler.fields[\"draft.of\"]) || new $tw.Tiddler({text:\"\", tags:[]}),\n\t\ttitleModified = tiddler.fields[\"draft.title\"] !== tiddler.fields[\"draft.of\"];\n\treturn titleModified || !tiddler.isEqual(origTiddler,ignoredFields);\n};\n\n/*\nAdd a new record to the top of the history stack\ntitle: a title string or an array of title strings\nfromPageRect: page coordinates of the origin of the navigation\nhistoryTitle: title of history tiddler (defaults to $:/HistoryList)\n*/\nexports.addToHistory = function(title,fromPageRect,historyTitle) {\n\tvar story = new $tw.Story({wiki: this, historyTitle: historyTitle});\n\tstory.addToHistory(title,fromPageRect);\n};\n\n/*\nInvoke the available upgrader modules\ntitles: array of tiddler titles to be processed\ntiddlers: hashmap by title of tiddler fields of pending import tiddlers. These can be modified by the upgraders. An entry with no fields indicates a tiddler that was pending import has been suppressed. When entries are added to the pending import the tiddlers hashmap may have entries that are not present in the titles array\nReturns a hashmap of messages keyed by tiddler title.\n*/\nexports.invokeUpgraders = function(titles,tiddlers) {\n\t// Collect up the available upgrader modules\n\tvar self = this;\n\tif(!this.upgraderModules) {\n\t\tthis.upgraderModules = [];\n\t\t$tw.modules.forEachModuleOfType(\"upgrader\",function(title,module) {\n\t\t\tif(module.upgrade) {\n\t\t\t\tself.upgraderModules.push(module);\n\t\t\t}\n\t\t});\n\t}\n\t// Invoke each upgrader in turn\n\tvar messages = {};\n\tfor(var t=0; t<this.upgraderModules.length; t++) {\n\t\tvar upgrader = this.upgraderModules[t],\n\t\t\tupgraderMessages = upgrader.upgrade(this,titles,tiddlers);\n\t\t$tw.utils.extend(messages,upgraderMessages);\n\t}\n\treturn messages;\n};\n\n})();\n\n",
"type": "application/javascript",
"module-type": "wikimethod"
},
"$:/palettes/Blanca": {
"title": "$:/palettes/Blanca",
"name": "Blanca",
"description": "A clean white palette to let you focus",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #66cccc\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ffffff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #7897f3\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ccc\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #ffffff\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #7897f3\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #eeeeee\ntab-border-selected: #cccccc\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffeedd\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: #eee\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #ff9900\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Blue": {
"title": "$:/palettes/Blue",
"name": "Blue",
"description": "A blue theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #fff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour foreground>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333353\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #ddddff\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: <<colour page-background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #5959c0\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: #ccccdd\ntab-border-selected: #ccccdd\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #eeeeff\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #666666\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #ffffff\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #ffffff\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #5959c0\ntoolbar-new-button: #5eb95e\ntoolbar-options-button: rgb(128, 88, 165)\ntoolbar-save-button: #0e90d2\ntoolbar-info-button: #0e90d2\ntoolbar-edit-button: rgb(243, 123, 29)\ntoolbar-close-button: #dd514c\ntoolbar-delete-button: #dd514c\ntoolbar-cancel-button: rgb(243, 123, 29)\ntoolbar-done-button: #5eb95e\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Muted": {
"title": "$:/palettes/Muted",
"name": "Muted",
"description": "Bright tiddlers on a muted background",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #6f6f70\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #29a6ee\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #c2c1c2\nsidebar-foreground-shadow: rgba(255,255,255,0)\nsidebar-foreground: #d3d2d4\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #6f6f70\nsidebar-tab-background: #666667\nsidebar-tab-border-selected: #999\nsidebar-tab-border: #515151\nsidebar-tab-divider: #999\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: #999\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #d1d0d2\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #d5ad34\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/ContrastLight": {
"title": "$:/palettes/ContrastLight",
"name": "Contrast (Light)",
"description": "High contrast and unambiguous (light version)",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #f00\nalert-border: <<colour background>>\nalert-highlight: <<colour foreground>>\nalert-muted-foreground: #800\nbackground: #fff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: <<colour background>>\nbutton-foreground: <<colour foreground>>\nbutton-border: <<colour foreground>>\ncode-background: <<colour background>>\ncode-border: <<colour foreground>>\ncode-foreground: <<colour foreground>>\ndirty-indicator: #f00\ndownload-background: #080\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: <<colour foreground>>\ndropdown-tab-background: <<colour foreground>>\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #00a\nexternal-link-foreground: #00e\nforeground: #000\nmessage-background: <<colour foreground>>\nmessage-border: <<colour background>>\nmessage-foreground: <<colour background>>\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: <<colour foreground>>\nmodal-footer-background: <<colour background>>\nmodal-footer-border: <<colour foreground>>\nmodal-header-border: <<colour foreground>>\nmuted-foreground: <<colour foreground>>\nnotification-background: <<colour background>>\nnotification-border: <<colour foreground>>\npage-background: <<colour background>>\npre-background: <<colour background>>\npre-border: <<colour foreground>>\nprimary: #00f\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: <<colour background>>\nsidebar-controls-foreground: <<colour foreground>>\nsidebar-foreground-shadow: rgba(0,0,0, 0)\nsidebar-foreground: <<colour foreground>>\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: <<colour foreground>>\nsidebar-tab-background-selected: <<colour background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: <<colour foreground>>\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: <<colour foreground>>\nsidebar-tiddler-link-foreground: <<colour primary>>\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: <<colour foreground>>\ntab-border-selected: <<colour foreground>>\ntab-border: <<colour foreground>>\ntab-divider: <<colour foreground>>\ntab-foreground-selected: <<colour foreground>>\ntab-foreground: <<colour background>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #000\ntag-foreground: #fff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour foreground>>\ntiddler-controls-foreground-hover: #ddd\ntiddler-controls-foreground-selected: #fdd\ntiddler-controls-foreground: <<colour foreground>>\ntiddler-editor-background: <<colour background>>\ntiddler-editor-border-image: <<colour foreground>>\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: <<colour background>>\ntiddler-editor-fields-odd: <<colour background>>\ntiddler-info-background: <<colour background>>\ntiddler-info-border: <<colour foreground>>\ntiddler-info-tab-background: <<colour background>>\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: <<colour foreground>>\ntiddler-title-foreground: <<colour foreground>>\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: <<colour foreground>>\nvery-muted-foreground: #888888\n"
},
"$:/palettes/ContrastDark": {
"title": "$:/palettes/ContrastDark",
"name": "Contrast (Dark)",
"description": "High contrast and unambiguous (dark version)",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #f00\nalert-border: <<colour background>>\nalert-highlight: <<colour foreground>>\nalert-muted-foreground: #800\nbackground: #000\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: <<colour background>>\nbutton-foreground: <<colour foreground>>\nbutton-border: <<colour foreground>>\ncode-background: <<colour background>>\ncode-border: <<colour foreground>>\ncode-foreground: <<colour foreground>>\ndirty-indicator: #f00\ndownload-background: #080\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: <<colour foreground>>\ndropdown-tab-background: <<colour foreground>>\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #00a\nexternal-link-foreground: #00e\nforeground: #fff\nmessage-background: <<colour foreground>>\nmessage-border: <<colour background>>\nmessage-foreground: <<colour background>>\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: <<colour foreground>>\nmodal-footer-background: <<colour background>>\nmodal-footer-border: <<colour foreground>>\nmodal-header-border: <<colour foreground>>\nmuted-foreground: <<colour foreground>>\nnotification-background: <<colour background>>\nnotification-border: <<colour foreground>>\npage-background: <<colour background>>\npre-background: <<colour background>>\npre-border: <<colour foreground>>\nprimary: #00f\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: <<colour background>>\nsidebar-controls-foreground: <<colour foreground>>\nsidebar-foreground-shadow: rgba(0,0,0, 0)\nsidebar-foreground: <<colour foreground>>\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: <<colour foreground>>\nsidebar-tab-background-selected: <<colour background>>\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: <<colour foreground>>\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: <<colour foreground>>\nsidebar-tiddler-link-foreground: <<colour primary>>\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: <<colour background>>\ntab-background: <<colour foreground>>\ntab-border-selected: <<colour foreground>>\ntab-border: <<colour foreground>>\ntab-divider: <<colour foreground>>\ntab-foreground-selected: <<colour foreground>>\ntab-foreground: <<colour background>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #fff\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour foreground>>\ntiddler-controls-foreground-hover: #ddd\ntiddler-controls-foreground-selected: #fdd\ntiddler-controls-foreground: <<colour foreground>>\ntiddler-editor-background: <<colour background>>\ntiddler-editor-border-image: <<colour foreground>>\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: <<colour background>>\ntiddler-editor-fields-odd: <<colour background>>\ntiddler-info-background: <<colour background>>\ntiddler-info-border: <<colour foreground>>\ntiddler-info-tab-background: <<colour background>>\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: <<colour foreground>>\ntiddler-title-foreground: <<colour foreground>>\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: <<colour foreground>>\nvery-muted-foreground: #888888\n"
},
"$:/palettes/DarkPhotos": {
"title": "$:/palettes/DarkPhotos",
"created": "20150402111612188",
"description": "Good with dark photo backgrounds",
"modified": "20150402112344080",
"name": "DarkPhotos",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background: \nbutton-foreground: \nbutton-border: \ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #ddd\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #336438\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #ccf\nsidebar-controls-foreground: #fff\nsidebar-foreground-shadow: rgba(0,0,0, 0.5)\nsidebar-foreground: #fff\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #eee\nsidebar-tab-background-selected: rgba(255,255,255, 0.8)\nsidebar-tab-background: rgba(255,255,255, 0.4)\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: rgba(255,255,255, 0.2)\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #aaf\nsidebar-tiddler-link-foreground: #ddf\nsite-title-foreground: #fff\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ec6\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button: \ntoolbar-options-button: \ntoolbar-save-button: \ntoolbar-info-button: \ntoolbar-edit-button: \ntoolbar-close-button: \ntoolbar-delete-button: \ntoolbar-cancel-button: \ntoolbar-done-button: \nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Rocker": {
"title": "$:/palettes/Rocker",
"name": "Rocker",
"description": "A dark theme",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #999999\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #000\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #cc0000\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #ffffff\nsidebar-foreground-shadow: rgba(255,255,255, 0.0)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #000\nsidebar-tab-background: <<colour tab-background>>\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: <<colour tab-divider>>\nsidebar-tab-foreground-selected: \nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #ffbb99\nsidebar-tiddler-link-foreground: #cc0000\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ffbb99\ntag-foreground: #000\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #cc0000\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/SolarFlare": {
"title": "$:/palettes/SolarFlare",
"name": "Solar Flare",
"description": "Warm, relaxing earth colours",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": ": Background Tones\n\nbase03: #002b36\nbase02: #073642\n\n: Content Tones\n\nbase01: #586e75\nbase00: #657b83\nbase0: #839496\nbase1: #93a1a1\n\n: Background Tones\n\nbase2: #eee8d5\nbase3: #fdf6e3\n\n: Accent Colors\n\nyellow: #b58900\norange: #cb4b16\nred: #dc322f\nmagenta: #d33682\nviolet: #6c71c4\nblue: #268bd2\ncyan: #2aa198\ngreen: #859900\n\n: Additional Tones (RA)\n\nbase10: #c0c4bb\nviolet-muted: #7c81b0\nblue-muted: #4e7baa\n\nyellow-hot: #ffcc44\norange-hot: #eb6d20\nred-hot: #ff2222\nblue-hot: #2298ee\ngreen-hot: #98ee22\n\n: Palette\n\n: Do not use colour macro for background and foreground\nbackground: #fdf6e3\n download-foreground: <<colour background>>\n dragger-foreground: <<colour background>>\n dropdown-background: <<colour background>>\n modal-background: <<colour background>>\n sidebar-foreground-shadow: <<colour background>>\n tiddler-background: <<colour background>>\n tiddler-border: <<colour background>>\n tiddler-link-background: <<colour background>>\n tab-background-selected: <<colour background>>\n dropdown-tab-background-selected: <<colour tab-background-selected>>\nforeground: #657b83\n dragger-background: <<colour foreground>>\n tab-foreground: <<colour foreground>>\n tab-foreground-selected: <<colour tab-foreground>>\n sidebar-tab-foreground-selected: <<colour tab-foreground-selected>>\n sidebar-tab-foreground: <<colour tab-foreground>>\n sidebar-button-foreground: <<colour foreground>>\n sidebar-controls-foreground: <<colour foreground>>\n sidebar-foreground: <<colour foreground>>\n: base03\n: base02\n: base01\n alert-muted-foreground: <<colour base01>>\n: base00\n code-foreground: <<colour base00>>\n message-foreground: <<colour base00>>\n tag-foreground: <<colour base00>>\n: base0\n sidebar-tiddler-link-foreground: <<colour base0>>\n: base1\n muted-foreground: <<colour base1>>\n blockquote-bar: <<colour muted-foreground>>\n dropdown-border: <<colour muted-foreground>>\n sidebar-muted-foreground: <<colour muted-foreground>>\n tiddler-title-foreground: <<colour muted-foreground>>\n site-title-foreground: <<colour tiddler-title-foreground>>\n: base2\n modal-footer-background: <<colour base2>>\n page-background: <<colour base2>>\n modal-backdrop: <<colour page-background>>\n notification-background: <<colour page-background>>\n code-background: <<colour page-background>>\n code-border: <<colour code-background>>\n pre-background: <<colour page-background>>\n pre-border: <<colour pre-background>>\n sidebar-tab-background-selected: <<colour page-background>>\n table-header-background: <<colour base2>>\n tag-background: <<colour base2>>\n tiddler-editor-background: <<colour base2>>\n tiddler-info-background: <<colour base2>>\n tiddler-info-tab-background: <<colour base2>>\n tab-background: <<colour base2>>\n dropdown-tab-background: <<colour tab-background>>\n: base3\n alert-background: <<colour base3>>\n message-background: <<colour base3>>\n: yellow\n: orange\n: red\n: magenta\n alert-highlight: <<colour magenta>>\n: violet\n external-link-foreground: <<colour violet>>\n: blue\n: cyan\n: green\n: base10\n tiddler-controls-foreground: <<colour base10>>\n: violet-muted\n external-link-foreground-visited: <<colour violet-muted>>\n: blue-muted\n primary: <<colour blue-muted>>\n download-background: <<colour primary>>\n tiddler-link-foreground: <<colour primary>>\n\nalert-border: #b99e2f\ndirty-indicator: #ff0000\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nmessage-border: #cfd6e6\nmodal-border: #999999\nsidebar-controls-foreground-hover:\nsidebar-muted-foreground-hover:\nsidebar-tab-background: #ded8c5\nsidebar-tiddler-link-foreground-hover:\nstatic-alert-foreground: #aaaaaa\ntab-border: #cccccc\n modal-footer-border: <<colour tab-border>>\n modal-header-border: <<colour tab-border>>\n notification-border: <<colour tab-border>>\n sidebar-tab-border: <<colour tab-border>>\n tab-border-selected: <<colour tab-border>>\n sidebar-tab-border-selected: <<colour tab-border-selected>>\ntab-divider: #d8d8d8\n sidebar-tab-divider: <<colour tab-divider>>\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-border: #dddddd\ntiddler-subtitle-foreground: #c0c0c0\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/palettes/Vanilla": {
"title": "$:/palettes/Vanilla",
"name": "Vanilla",
"description": "Pale and unobtrusive",
"tags": "$:/tags/Palette",
"type": "application/x-tiddler-dictionary",
"text": "alert-background: #ffe476\nalert-border: #b99e2f\nalert-highlight: #881122\nalert-muted-foreground: #b99e2f\nbackground: #ffffff\nblockquote-bar: <<colour muted-foreground>>\nbutton-background:\nbutton-foreground:\nbutton-border:\ncode-background: #f7f7f9\ncode-border: #e1e1e8\ncode-foreground: #dd1144\ndirty-indicator: #ff0000\ndownload-background: #34c734\ndownload-foreground: <<colour background>>\ndragger-background: <<colour foreground>>\ndragger-foreground: <<colour background>>\ndropdown-background: <<colour background>>\ndropdown-border: <<colour muted-foreground>>\ndropdown-tab-background-selected: #fff\ndropdown-tab-background: #ececec\ndropzone-background: rgba(0,200,0,0.7)\nexternal-link-background-hover: inherit\nexternal-link-background-visited: inherit\nexternal-link-background: inherit\nexternal-link-foreground-hover: inherit\nexternal-link-foreground-visited: #0000aa\nexternal-link-foreground: #0000ee\nforeground: #333333\nmessage-background: #ecf2ff\nmessage-border: #cfd6e6\nmessage-foreground: #547599\nmodal-backdrop: <<colour foreground>>\nmodal-background: <<colour background>>\nmodal-border: #999999\nmodal-footer-background: #f5f5f5\nmodal-footer-border: #dddddd\nmodal-header-border: #eeeeee\nmuted-foreground: #bbb\nnotification-background: #ffffdd\nnotification-border: #999999\npage-background: #f4f4f4\npre-background: #f5f5f5\npre-border: #cccccc\nprimary: #5778d8\nsidebar-button-foreground: <<colour foreground>>\nsidebar-controls-foreground-hover: #000000\nsidebar-controls-foreground: #aaaaaa\nsidebar-foreground-shadow: rgba(255,255,255, 0.8)\nsidebar-foreground: #acacac\nsidebar-muted-foreground-hover: #444444\nsidebar-muted-foreground: #c0c0c0\nsidebar-tab-background-selected: #f4f4f4\nsidebar-tab-background: #e0e0e0\nsidebar-tab-border-selected: <<colour tab-border-selected>>\nsidebar-tab-border: <<colour tab-border>>\nsidebar-tab-divider: #e4e4e4\nsidebar-tab-foreground-selected:\nsidebar-tab-foreground: <<colour tab-foreground>>\nsidebar-tiddler-link-foreground-hover: #444444\nsidebar-tiddler-link-foreground: #999999\nsite-title-foreground: <<colour tiddler-title-foreground>>\nstatic-alert-foreground: #aaaaaa\ntab-background-selected: #ffffff\ntab-background: #d8d8d8\ntab-border-selected: #d8d8d8\ntab-border: #cccccc\ntab-divider: #d8d8d8\ntab-foreground-selected: <<colour tab-foreground>>\ntab-foreground: #666666\ntable-border: #dddddd\ntable-footer-background: #a8a8a8\ntable-header-background: #f0f0f0\ntag-background: #ec6\ntag-foreground: #ffffff\ntiddler-background: <<colour background>>\ntiddler-border: <<colour background>>\ntiddler-controls-foreground-hover: #888888\ntiddler-controls-foreground-selected: #444444\ntiddler-controls-foreground: #cccccc\ntiddler-editor-background: #f8f8f8\ntiddler-editor-border-image: #ffffff\ntiddler-editor-border: #cccccc\ntiddler-editor-fields-even: #e0e8e0\ntiddler-editor-fields-odd: #f0f4f0\ntiddler-info-background: #f8f8f8\ntiddler-info-border: #dddddd\ntiddler-info-tab-background: #f8f8f8\ntiddler-link-background: <<colour background>>\ntiddler-link-foreground: <<colour primary>>\ntiddler-subtitle-foreground: #c0c0c0\ntiddler-title-foreground: #182955\ntoolbar-new-button:\ntoolbar-options-button:\ntoolbar-save-button:\ntoolbar-info-button:\ntoolbar-edit-button:\ntoolbar-close-button:\ntoolbar-delete-button:\ntoolbar-cancel-button:\ntoolbar-done-button:\nuntagged-background: #999999\nvery-muted-foreground: #888888\n"
},
"$:/core/readme": {
"title": "$:/core/readme",
"text": "This plugin contains TiddlyWiki's core components, comprising:\n\n* JavaScript code modules\n* Icons\n* Templates needed to create TiddlyWiki's user interface\n* British English (''en-GB'') translations of the localisable strings used by the core\n"
},
"$:/library/sjcl.js/license": {
"title": "$:/library/sjcl.js/license",
"type": "text/plain",
"text": "SJCL is open. You can use, modify and redistribute it under a BSD\nlicense or under the GNU GPL, version 2.0.\n\n---------------------------------------------------------------------\n\nhttp://opensource.org/licenses/BSD-2-Clause\n\nCopyright (c) 2009-2015, Emily Stark, Mike Hamburg and Dan Boneh at\nStanford University. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n---------------------------------------------------------------------\n\nhttp://opensource.org/licenses/GPL-2.0\n\nThe Stanford Javascript Crypto Library (hosted here on GitHub) is a\nproject by the Stanford Computer Security Lab to build a secure,\npowerful, fast, small, easy-to-use, cross-browser library for\ncryptography in Javascript.\n\nCopyright (c) 2009-2015, Emily Stark, Mike Hamburg and Dan Boneh at\nStanford University.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the\nFree Software Foundation; either version 2 of the License, or (at your\noption) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details.\n\nYou should have received a copy of the GNU General Public License along\nwith this program; if not, write to the Free Software Foundation, Inc.,\n59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"
},
"$:/core/templates/MOTW.html": {
"title": "$:/core/templates/MOTW.html",
"text": "\\rules only filteredtranscludeinline transcludeinline entity\n<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->\n<!-- saved from url=(0021)https://tiddlywiki.com --> "
},
"$:/core/templates/alltiddlers.template.html": {
"title": "$:/core/templates/alltiddlers.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "<!-- This template is provided for backwards compatibility with older versions of TiddlyWiki -->\n\n<$set name=\"exportFilter\" value=\"[!is[system]sort[title]]\">\n\n{{$:/core/templates/exporters/StaticRiver}}\n\n</$set>\n"
},
"$:/core/templates/canonical-uri-external-image": {
"title": "$:/core/templates/canonical-uri-external-image",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external images.\n\nChange the `./images/` part to a different base URI. The URI can be relative or absolute.\n\n-->\n./images/<$view field=\"title\" format=\"doubleurlencoded\"/>"
},
"$:/core/templates/canonical-uri-external-raw": {
"title": "$:/core/templates/canonical-uri-external-raw",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external raw files that are stored in the same directory\n\n-->\n<$view field=\"title\" format=\"doubleurlencoded\"/>"
},
"$:/core/templates/canonical-uri-external-text": {
"title": "$:/core/templates/canonical-uri-external-text",
"text": "<!--\n\nThis template is used to assign the ''_canonical_uri'' field to external text files.\n\nChange the `./text/` part to a different base URI. The URI can be relative or absolute.\n\n-->\n./text/<$view field=\"title\" format=\"doubleurlencoded\"/>.tid"
},
"$:/core/templates/css-tiddler": {
"title": "$:/core/templates/css-tiddler",
"text": "<!--\n\nThis template is used for saving CSS tiddlers as a style tag with data attributes representing the tiddler fields.\n\n-->`<style`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/css\">`<$view field=\"text\" format=\"text\" />`</style>`"
},
"$:/core/templates/exporters/CsvFile": {
"title": "$:/core/templates/exporters/CsvFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/CsvFile}}",
"extension": ".csv",
"text": "\\define renderContent()\n<$text text=<<csvtiddlers filter:\"\"\"$(exportFilter)$\"\"\" format:\"quoted-comma-sep\">>/>\n\\end\n<<renderContent>>\n"
},
"$:/core/templates/exporters/JsonFile": {
"title": "$:/core/templates/exporters/JsonFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/JsonFile}}",
"extension": ".json",
"text": "\\define renderContent()\n<$text text=<<jsontiddlers filter:\"\"\"$(exportFilter)$\"\"\">>/>\n\\end\n<<renderContent>>\n"
},
"$:/core/templates/exporters/StaticRiver": {
"title": "$:/core/templates/exporters/StaticRiver",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/StaticRiver}}",
"extension": ".html",
"text": "\\define tv-wikilink-template() #$uri_encoded$\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<style type=\"text/css\">\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n</style>\n</head>\n<body class=\"tc-body\">\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n<section class=\"tc-story-river\">\n{{$:/core/templates/exporters/StaticRiver/Content||$:/core/templates/html-tiddler}}\n</section>\n</body>\n</html>\n"
},
"$:/core/templates/exporters/StaticRiver/Content": {
"title": "$:/core/templates/exporters/StaticRiver/Content",
"text": "\\define renderContent()\n{{{ $(exportFilter)$ ||$:/core/templates/static-tiddler}}}\n\\end\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n<<renderContent>>\n</$importvariables>\n"
},
"$:/core/templates/exporters/TidFile": {
"title": "$:/core/templates/exporters/TidFile",
"tags": "$:/tags/Exporter",
"description": "{{$:/language/Exporters/TidFile}}",
"extension": ".tid",
"text": "\\define renderContent()\n{{{ $(exportFilter)$ +[limit[1]] ||$:/core/templates/tid-tiddler}}}\n\\end\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\"><<renderContent>></$importvariables>"
},
"$:/core/templates/html-div-tiddler": {
"title": "$:/core/templates/html-div-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as an HTML DIV tag with attributes representing the tiddler fields.\n\n-->`<div`<$fields template=' $name$=\"$encoded_value$\"'></$fields>`>\n<pre>`<$view field=\"text\" format=\"htmlencoded\" />`</pre>\n</div>`\n"
},
"$:/core/templates/html-tiddler": {
"title": "$:/core/templates/html-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as raw HTML\n\n--><$view field=\"text\" format=\"htmlwikified\" />"
},
"$:/core/templates/javascript-tiddler": {
"title": "$:/core/templates/javascript-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields.\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\">`<$view field=\"text\" format=\"text\" />`</script>`"
},
"$:/core/templates/json-tiddler": {
"title": "$:/core/templates/json-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as raw JSON\n\n--><$text text=<<jsontiddler>>/>"
},
"$:/core/templates/module-tiddler": {
"title": "$:/core/templates/module-tiddler",
"text": "<!--\n\nThis template is used for saving JavaScript tiddlers as a script tag with data attributes representing the tiddler fields. The body of the tiddler is wrapped in a call to the `$tw.modules.define` function in order to define the body of the tiddler as a module\n\n-->`<script`<$fields template=' data-tiddler-$name$=\"$encoded_value$\"'></$fields>` type=\"text/javascript\" data-module=\"yes\">$tw.modules.define(\"`<$view field=\"title\" format=\"jsencoded\" />`\",\"`<$view field=\"module-type\" format=\"jsencoded\" />`\",function(module,exports,require) {`<$view field=\"text\" format=\"text\" />`});\n</script>`"
},
"$:/core/templates/plain-text-tiddler": {
"title": "$:/core/templates/plain-text-tiddler",
"text": "<$view field=\"text\" format=\"text\" />"
},
"$:/core/templates/raw-static-tiddler": {
"title": "$:/core/templates/raw-static-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers as static HTML\n\n--><$view field=\"text\" format=\"plainwikified\" />"
},
"$:/core/save/all": {
"title": "$:/core/save/all",
"text": "\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] $(publishFilter)$\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/empty": {
"title": "$:/core/save/empty",
"text": "\\define saveTiddlerFilter()\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]]\n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/lazy-all": {
"title": "$:/core/save/lazy-all",
"text": "\\define saveTiddlerFilter()\n[is[system]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] +[sort[title]] \n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/save/lazy-images": {
"title": "$:/core/save/lazy-images",
"text": "\\define saveTiddlerFilter()\n[is[tiddler]] -[prefix[$:/state/popup/]] -[[$:/HistoryList]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] -[!is[system]is[image]] +[sort[title]] \n\\end\n{{$:/core/templates/tiddlywiki5.html}}\n"
},
"$:/core/templates/single.tiddler.window": {
"title": "$:/core/templates/single.tiddler.window",
"text": "<$set name=\"themeTitle\" value={{$:/view}}>\n\n<$set name=\"tempCurrentTiddler\" value=<<currentTiddler>>>\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$set name=\"currentTiddler\" value=<<tempCurrentTiddler>>>\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$navigator story=\"$:/StoryList\" history=\"$:/HistoryList\">\n\n<$transclude mode=\"block\"/>\n\n</$navigator>\n\n</$importvariables>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n"
},
"$:/core/templates/split-recipe": {
"title": "$:/core/templates/split-recipe",
"text": "<$list filter=\"[!is[system]]\">\ntiddler: <$view field=\"title\" format=\"urlencoded\"/>.tid\n</$list>\n"
},
"$:/core/templates/static-tiddler": {
"title": "$:/core/templates/static-tiddler",
"text": "<a name=<<currentTiddler>>>\n<$transclude tiddler=\"$:/core/ui/ViewTemplate\"/>\n</a>"
},
"$:/core/templates/static.area": {
"title": "$:/core/templates/static.area",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n{{{ [all[shadows+tiddlers]tag[$:/tags/RawStaticContent]!has[draft.of]] ||$:/core/templates/raw-static-tiddler}}}\n{{$:/core/templates/static.content||$:/core/templates/html-tiddler}}\n</$reveal>\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\nThis file contains an encrypted ~TiddlyWiki. Enable ~JavaScript and enter the decryption password when prompted.\n</$reveal>\n"
},
"$:/core/templates/static.content": {
"title": "$:/core/templates/static.content",
"text": "<!-- For Google, and people without JavaScript-->\nThis [[TiddlyWiki|https://tiddlywiki.com]] contains the following tiddlers:\n\n<ul>\n<$list filter=<<saveTiddlerFilter>>>\n<li><$view field=\"title\" format=\"text\"></$view></li>\n</$list>\n</ul>\n"
},
"$:/core/templates/static.template.css": {
"title": "$:/core/templates/static.template.css",
"text": "{{$:/boot/boot.css||$:/core/templates/plain-text-tiddler}}\n\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n"
},
"$:/core/templates/static.template.html": {
"title": "$:/core/templates/static.template.html",
"type": "text/vnd.tiddlywiki-html",
"text": "\\define tv-wikilink-template() static/$uri_doubleencoded$.html\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"mobile-web-app-capable\" content=\"yes\"/>\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<style type=\"text/css\">\n{{$:/core/ui/PageStylesheet||$:/core/templates/wikified-tiddler}}\n</style>\n</head>\n<body class=\"tc-body\">\n{{$:/StaticBanner||$:/core/templates/html-tiddler}}\n{{$:/core/ui/PageTemplate||$:/core/templates/html-tiddler}}\n</body>\n</html>\n"
},
"$:/core/templates/static.tiddler.html": {
"title": "$:/core/templates/static.tiddler.html",
"text": "\\define tv-wikilink-template() $uri_doubleencoded$.html\n\\define tv-config-toolbar-icons() no\n\\define tv-config-toolbar-text() no\n\\define tv-config-toolbar-class() tc-btn-invisible\n`<!doctype html>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"`{{$:/core/templates/version}}`\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"mobile-web-app-capable\" content=\"yes\"/>\n<meta name=\"format-detection\" content=\"telephone=no\">\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<link rel=\"stylesheet\" href=\"static.css\">\n<title>`<$view field=\"caption\"><$view field=\"title\"/></$view>: {{$:/core/wiki/title}}`</title>\n</head>\n<body class=\"tc-body\">\n`{{$:/StaticBanner||$:/core/templates/html-tiddler}}`\n<section class=\"tc-story-river\">\n`<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n<$view tiddler=\"$:/core/ui/ViewTemplate\" format=\"htmlwikified\"/>\n</$importvariables>`\n</section>\n</body>\n</html>\n`"
},
"$:/core/templates/store.area.template.html": {
"title": "$:/core/templates/store.area.template.html",
"text": "<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n`<div id=\"storeArea\" style=\"display:none;\">`\n<$list filter=<<saveTiddlerFilter>> template=\"$:/core/templates/html-div-tiddler\"/>\n`</div>`\n</$reveal>\n<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\n`<!--~~ Encrypted tiddlers ~~-->`\n`<pre id=\"encryptedStoreArea\" type=\"text/plain\" style=\"display:none;\">`\n<$encrypt filter=<<saveTiddlerFilter>>/>\n`</pre>`\n</$reveal>"
},
"$:/core/templates/tid-tiddler": {
"title": "$:/core/templates/tid-tiddler",
"text": "<!--\n\nThis template is used for saving tiddlers in TiddlyWeb *.tid format\n\n--><$fields exclude='text bag' template='$name$: $value$\n'></$fields>`\n`<$view field=\"text\" format=\"text\" />"
},
"$:/core/templates/tiddler-metadata": {
"title": "$:/core/templates/tiddler-metadata",
"text": "<!--\n\nThis template is used for saving tiddler metadata *.meta files\n\n--><$fields exclude='text bag' template='$name$: $value$\n'></$fields>"
},
"$:/core/templates/tiddlywiki5.html": {
"title": "$:/core/templates/tiddlywiki5.html",
"text": "\\rules only filteredtranscludeinline transcludeinline\n<!doctype html>\n{{$:/core/templates/MOTW.html}}<html>\n<head>\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />\n<meta name=\"application-name\" content=\"TiddlyWiki\" />\n<meta name=\"generator\" content=\"TiddlyWiki\" />\n<meta name=\"tiddlywiki-version\" content=\"{{$:/core/templates/version}}\" />\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\" />\n<meta name=\"mobile-web-app-capable\" content=\"yes\"/>\n<meta name=\"format-detection\" content=\"telephone=no\" />\n<meta name=\"copyright\" content=\"{{$:/core/copyright.txt}}\" />\n<link id=\"faviconLink\" rel=\"shortcut icon\" href=\"favicon.ico\">\n<title>{{$:/core/wiki/title}}</title>\n<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->\n\n<!--~~ Raw markup ~~-->\n{{{ [all[shadows+tiddlers]tag[$:/core/wiki/rawmarkup]] [all[shadows+tiddlers]tag[$:/tags/RawMarkup]] ||$:/core/templates/plain-text-tiddler}}}\n{{{ [all[shadows+tiddlers]tag[$:/tags/RawMarkupWikified]] ||$:/core/templates/raw-static-tiddler}}}\n</head>\n<body class=\"tc-body\">\n<!--~~ Static styles ~~-->\n<div id=\"styleArea\">\n{{$:/boot/boot.css||$:/core/templates/css-tiddler}}\n</div>\n<!--~~ Static content for Google and browsers without JavaScript ~~-->\n<noscript>\n<div id=\"splashArea\">\n{{$:/core/templates/static.area}}\n</div>\n</noscript>\n<!--~~ Ordinary tiddlers ~~-->\n{{$:/core/templates/store.area.template.html}}\n<!--~~ Library modules ~~-->\n<div id=\"libraryModules\" style=\"display:none;\">\n{{{ [is[system]type[application/javascript]library[yes]] ||$:/core/templates/javascript-tiddler}}}\n</div>\n<!--~~ Boot kernel prologue ~~-->\n<div id=\"bootKernelPrefix\" style=\"display:none;\">\n{{ $:/boot/bootprefix.js ||$:/core/templates/javascript-tiddler}}\n</div>\n<!--~~ Boot kernel ~~-->\n<div id=\"bootKernel\" style=\"display:none;\">\n{{ $:/boot/boot.js ||$:/core/templates/javascript-tiddler}}\n</div>\n</body>\n</html>\n"
},
"$:/core/templates/version": {
"title": "$:/core/templates/version",
"text": "<<version>>"
},
"$:/core/templates/wikified-tiddler": {
"title": "$:/core/templates/wikified-tiddler",
"text": "<$transclude />"
},
"$:/core/ui/AboveStory/tw2-plugin-check": {
"title": "$:/core/ui/AboveStory/tw2-plugin-check",
"tags": "$:/tags/AboveStory",
"text": "\\define lingo-base() $:/language/AboveStory/ClassicPlugin/\n<$list filter=\"[all[system+tiddlers]tag[systemConfig]limit[1]]\">\n\n<div class=\"tc-message-box\">\n\n<<lingo Warning>>\n\n<ul>\n\n<$list filter=\"[all[system+tiddlers]tag[systemConfig]]\">\n\n<li>\n\n<$link><$view field=\"title\"/></$link>\n\n</li>\n\n</$list>\n\n</ul>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/AdvancedSearch/Filter": {
"title": "$:/core/ui/AdvancedSearch/Filter",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Filter/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<<lingo Filter/Hint>>\n\n<div class=\"tc-search tc-advanced-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch/FilterButton]!has[draft.of]]\"><$transclude/></$list>\n</div>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$set name=\"resultCount\" value=\"\"\"<$count filter={{$:/temp/advancedsearch}}/>\"\"\">\n<div class=\"tc-search-results\">\n<<lingo Filter/Matches>>\n<$list filter={{$:/temp/advancedsearch}} template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$set>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Filter/FilterButtons/clear": {
"title": "$:/core/ui/AdvancedSearch/Filter/FilterButtons/clear",
"tags": "$:/tags/AdvancedSearch/FilterButton",
"text": "<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Filter/FilterButtons/delete": {
"title": "$:/core/ui/AdvancedSearch/Filter/FilterButtons/delete",
"tags": "$:/tags/AdvancedSearch/FilterButton",
"text": "<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button popup=<<qualify \"$:/state/filterDeleteDropdown\">> class=\"tc-btn-invisible\">\n{{$:/core/images/delete-button}}\n</$button>\n</$reveal>\n\n<$reveal state=<<qualify \"$:/state/filterDeleteDropdown\">> type=\"popup\" position=\"belowleft\" animate=\"yes\">\n<div class=\"tc-block-dropdown-wrapper\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<div class=\"tc-dropdown-item-plain\">\n<$set name=\"resultCount\" value=\"\"\"<$count filter={{$:/temp/advancedsearch}}/>\"\"\">\nAre you sure you wish to delete <<resultCount>> tiddler(s)?\n</$set>\n</div>\n<div class=\"tc-dropdown-item-plain\">\n<$button class=\"tc-btn\">\n<$action-deletetiddler $filter={{$:/temp/advancedsearch}}/>\nDelete these tiddlers\n</$button>\n</div>\n</div>\n</div>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown": {
"title": "$:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown",
"tags": "$:/tags/AdvancedSearch/FilterButton",
"text": "<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/filterDropdown\">> class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n</$button>\n</span>\n\n<$reveal state=<<qualify \"$:/state/filterDropdown\">> type=\"popup\" position=\"belowleft\" animate=\"yes\">\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n<div class=\"tc-block-dropdown-wrapper\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Filter]]\"><$link to={{!!filter}}><$transclude field=\"description\"/></$link>\n</$list>\n</div>\n</div>\n</$linkcatcher>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Filter/FilterButtons/export": {
"title": "$:/core/ui/AdvancedSearch/Filter/FilterButtons/export",
"tags": "$:/tags/AdvancedSearch/FilterButton",
"text": "<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$macrocall $name=\"exportButton\" exportFilter={{$:/temp/advancedsearch}} lingoBase=\"$:/language/Buttons/ExportTiddlers/\"/>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Shadows": {
"title": "$:/core/ui/AdvancedSearch/Shadows",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Shadows/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Shadows/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$list filter=\"[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]\" emptyMessage=\"\"\"<div class=\"tc-search-results\">{{$:/language/Search/Search/TooShort}}</div>\"\"\" variable=\"listItem\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[all[shadows]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo Shadows/Matches>>\n\n<$list filter=\"[all[shadows]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$list>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/Standard": {
"title": "$:/core/ui/AdvancedSearch/Standard",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/Standard/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo Standard/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$list filter=\"[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]\" emptyMessage=\"\"\"<div class=\"tc-search-results\">{{$:/language/Search/Search/TooShort}}</div>\"\"\" variable=\"listItem\">\n<$set name=\"searchTiddler\" value=\"$:/temp/advancedsearch\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\n<$transclude/>\n</$list>\n\"\"\">\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\n</$list>\n</$set>\n</$list>\n</$reveal>\n"
},
"$:/core/ui/AdvancedSearch/System": {
"title": "$:/core/ui/AdvancedSearch/System",
"tags": "$:/tags/AdvancedSearch",
"caption": "{{$:/language/Search/System/Caption}}",
"text": "\\define lingo-base() $:/language/Search/\n<$linkcatcher to=\"$:/temp/advancedsearch\">\n\n<<lingo System/Hint>>\n\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/advancedsearch\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n\n</$linkcatcher>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"nomatch\" text=\"\">\n\n<$list filter=\"[{$:/temp/advancedsearch}minlength{$:/config/Search/MinLength}limit[1]]\" emptyMessage=\"\"\"<div class=\"tc-search-results\">{{$:/language/Search/Search/TooShort}}</div>\"\"\" variable=\"listItem\">\n\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[is[system]search{$:/temp/advancedsearch}] -[[$:/temp/advancedsearch]]\"/>\"\"\">\n\n<div class=\"tc-search-results\">\n\n<<lingo System/Matches>>\n\n<$list filter=\"[is[system]search{$:/temp/advancedsearch}sort[title]limit[250]] -[[$:/temp/advancedsearch]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n</div>\n\n</$set>\n\n</$list>\n\n</$reveal>\n\n<$reveal state=\"$:/temp/advancedsearch\" type=\"match\" text=\"\">\n\n</$reveal>\n"
},
"$:/AdvancedSearch": {
"title": "$:/AdvancedSearch",
"icon": "$:/core/images/advanced-search-button",
"color": "#bbb",
"text": "<div class=\"tc-advanced-search\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/AdvancedSearch]!has[draft.of]]\" \"$:/core/ui/AdvancedSearch/System\">>\n</div>\n"
},
"$:/core/ui/AlertTemplate": {
"title": "$:/core/ui/AlertTemplate",
"text": "<div class=\"tc-alert\">\n<div class=\"tc-alert-toolbar\">\n<$button class=\"tc-btn-invisible\"><$action-deletetiddler $tiddler=<<currentTiddler>>/>{{$:/core/images/delete-button}}</$button>\n</div>\n<div class=\"tc-alert-subtitle\">\n<$view field=\"component\"/> - <$view field=\"modified\" format=\"date\" template=\"0hh:0mm:0ss DD MM YYYY\"/> <$reveal type=\"nomatch\" state=\"!!count\" text=\"\"><span class=\"tc-alert-highlight\">({{$:/language/Count}}: <$view field=\"count\"/>)</span></$reveal>\n</div>\n<div class=\"tc-alert-body\">\n\n<$transclude/>\n\n</div>\n</div>\n"
},
"$:/core/ui/BinaryWarning": {
"title": "$:/core/ui/BinaryWarning",
"text": "\\define lingo-base() $:/language/BinaryWarning/\n<div class=\"tc-binary-warning\">\n\n<<lingo Prompt>>\n\n</div>\n"
},
"$:/core/ui/Components/plugin-info": {
"title": "$:/core/ui/Components/plugin-info",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n\\define popup-state-macro()\n$(qualified-state)$-$(currentTiddler)$\n\\end\n\n\\define tabs-state-macro()\n$(popup-state)$-$(pluginInfoType)$\n\\end\n\n\\define plugin-icon-title()\n$(currentTiddler)$/icon\n\\end\n\n\\define plugin-disable-title()\n$:/config/Plugins/Disabled/$(currentTiddler)$\n\\end\n\n\\define plugin-table-body(type,disabledMessage,default-popup-state)\n<div class=\"tc-plugin-info-chunk tc-small-icon\">\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\" default=\"\"\"$default-popup-state$\"\"\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\" default=\"\"\"$default-popup-state$\"\"\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>\n<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\n</$transclude>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<h1>\n''<$view field=\"description\"><$view field=\"title\"/></$view>'' $disabledMessage$\n</h1>\n<h2>\n<$view field=\"title\"/>\n</h2>\n<h2>\n<div><em><$view field=\"version\"/></em></div>\n</h2>\n</div>\n\\end\n\n\\define plugin-info(type,default-popup-state)\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\n<$link to={{!!title}} class=\"tc-plugin-info\">\n<<plugin-table-body type:\"$type$\" default-popup-state:\"\"\"$default-popup-state$\"\"\">>\n</$link>\n</$reveal>\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\n<$link to={{!!title}} class=\"tc-plugin-info tc-plugin-info-disabled\">\n<<plugin-table-body type:\"$type$\" default-popup-state:\"\"\"$default-popup-state$\"\"\" disabledMessage:\"<$macrocall $name='lingo' title='Disabled/Status'/>\">>\n</$link>\n</$reveal>\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>> default=\"\"\"$default-popup-state$\"\"\">\n<div class=\"tc-plugin-info-dropdown\">\n<div class=\"tc-plugin-info-dropdown-body\">\n<$list filter=\"[all[current]] -[[$:/core]]\">\n<div style=\"float:right;\">\n<$reveal type=\"nomatch\" state=<<plugin-disable-title>> text=\"yes\">\n<$button set=<<plugin-disable-title>> setTo=\"yes\" tooltip={{$:/language/ControlPanel/Plugins/Disable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Disable/Caption}}>\n<<lingo Disable/Caption>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<plugin-disable-title>> text=\"yes\">\n<$button set=<<plugin-disable-title>> setTo=\"no\" tooltip={{$:/language/ControlPanel/Plugins/Enable/Hint}} aria-label={{$:/language/ControlPanel/Plugins/Enable/Caption}}>\n<<lingo Enable/Caption>>\n</$button>\n</$reveal>\n</div>\n</$list>\n<$set name=\"tabsList\" filter=\"[<currentTiddler>list[]] contents\">\n<$macrocall $name=\"tabs\" state=<<tabs-state-macro>> tabsList=<<tabsList>> default={{{ [enlist<tabsList>] }}} template=\"$:/core/ui/PluginInfo\"/>\n</$set>\n</div>\n</div>\n</$reveal>\n</$set>\n\\end\n\n<$macrocall $name=\"plugin-info\" type=<<plugin-type>> default-popup-state=<<default-popup-state>>/>\n"
},
"$:/core/ui/Components/tag-link": {
"title": "$:/core/ui/Components/tag-link",
"text": "<$link>\n<$set name=\"backgroundColor\" value={{!!color}}>\n<span style=<<tag-styles>> class=\"tc-tag-label\">\n<$view field=\"title\" format=\"text\"/>\n</span>\n</$set>\n</$link>"
},
"$:/core/ui/ControlPanel/Advanced": {
"title": "$:/core/ui/ControlPanel/Advanced",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Advanced/Caption}}",
"text": "{{$:/language/ControlPanel/Advanced/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Advanced]!has[draft.of]]\" \"$:/core/ui/ControlPanel/TiddlerFields\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/Appearance": {
"title": "$:/core/ui/ControlPanel/Appearance",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Appearance/Caption}}",
"text": "{{$:/language/ControlPanel/Appearance/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Appearance]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Theme\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/Basics": {
"title": "$:/core/ui/ControlPanel/Basics",
"tags": "$:/tags/ControlPanel/Info",
"caption": "{{$:/language/ControlPanel/Basics/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Basics/\n\n\\define show-filter-count(filter)\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" $value=\"\"\"$filter$\"\"\"/>\n<$action-setfield $tiddler=\"$:/state/tab--1498284803\" $value=\"$:/core/ui/AdvancedSearch/Filter\"/>\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\n''<$count filter=\"\"\"$filter$\"\"\"/>''\n{{$:/core/images/advanced-search-button}}\n</$button>\n\\end\n\n|<<lingo Version/Prompt>> |''<<version>>'' |\n|<$link to=\"$:/SiteTitle\"><<lingo Title/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteTitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/SiteSubtitle\"><<lingo Subtitle/Prompt>></$link> |<$edit-text tiddler=\"$:/SiteSubtitle\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/status/UserName\"><<lingo Username/Prompt>></$link> |<$edit-text tiddler=\"$:/status/UserName\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/config/AnimationDuration\"><<lingo AnimDuration/Prompt>></$link> |<$edit-text tiddler=\"$:/config/AnimationDuration\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/DefaultTiddlers\"><<lingo DefaultTiddlers/Prompt>></$link> |<<lingo DefaultTiddlers/TopHint>><br> <$edit tag=\"textarea\" tiddler=\"$:/DefaultTiddlers\" class=\"tc-edit-texteditor\"/><br>//<<lingo DefaultTiddlers/BottomHint>>// |\n|<$link to=\"$:/config/NewJournal/Title\"><<lingo NewJournal/Title/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Title\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/config/NewJournal/Text\"><<lingo NewJournal/Text/Prompt>></$link> |<$edit tiddler=\"$:/config/NewJournal/Text\" tag=\"textarea\" class=\"tc-edit-texteditor\" default=\"\"/> |\n|<$link to=\"$:/config/NewJournal/Tags\"><<lingo NewJournal/Tags/Prompt>></$link> |<$edit-text tiddler=\"$:/config/NewJournal/Tags\" default=\"\" tag=\"input\"/> |\n|<<lingo Language/Prompt>> |{{$:/snippets/minilanguageswitcher}} |\n|<<lingo Tiddlers/Prompt>> |<<show-filter-count \"[!is[system]sort[title]]\">> |\n|<<lingo Tags/Prompt>> |<<show-filter-count \"[tags[]sort[title]]\">> |\n|<<lingo SystemTiddlers/Prompt>> |<<show-filter-count \"[is[system]sort[title]]\">> |\n|<<lingo ShadowTiddlers/Prompt>> |<<show-filter-count \"[all[shadows]sort[title]]\">> |\n|<<lingo OverriddenShadowTiddlers/Prompt>> |<<show-filter-count \"[is[tiddler]is[shadow]sort[title]]\">> |\n"
},
"$:/core/ui/ControlPanel/EditorTypes": {
"title": "$:/core/ui/ControlPanel/EditorTypes",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/EditorTypes/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/EditorTypes/\n\n<<lingo Hint>>\n\n<table>\n<tbody>\n<tr>\n<th><<lingo Type/Caption>></th>\n<th><<lingo Editor/Caption>></th>\n</tr>\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/config/EditorTypeMappings/]sort[title]]\">\n<tr>\n<td>\n<$link>\n<$list filter=\"[all[current]removeprefix[$:/config/EditorTypeMappings/]]\">\n<$text text={{!!title}}/>\n</$list>\n</$link>\n</td>\n<td>\n<$view field=\"text\"/>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n"
},
"$:/core/ui/ControlPanel/Info": {
"title": "$:/core/ui/ControlPanel/Info",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Info/Caption}}",
"text": "{{$:/language/ControlPanel/Info/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Info]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Basics\">>\n</div>\n"
},
"$:/core/ui/ControlPanel/KeyboardShortcuts": {
"title": "$:/core/ui/ControlPanel/KeyboardShortcuts",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/KeyboardShortcuts/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/\n\n\\define new-shortcut(title)\n<div class=\"tc-dropdown-item-plain\">\n<$edit-shortcut tiddler=\"$title$\" placeholder={{$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt}} style=\"width:auto;\"/> <$button>\n<<lingo Add/Caption>>\n<$action-listops\n\t$tiddler=\"$(shortcutTitle)$\"\n\t$field=\"text\"\n\t$subfilter=\"[{$title$}]\"\n/>\n<$action-deletetiddler\n\t$tiddler=\"$title$\"\n/>\n</$button>\n</div>\n\\end\n\n\\define shortcut-list-item(caption)\n<td>\n</td>\n<td style=\"text-align:right;font-size:0.7em;\">\n<<lingo Platform/$caption$>>\n</td>\n<td>\n<div style=\"position:relative;\">\n<$button popup=<<qualify \"$:/state/dropdown/$(shortcutTitle)$\">> class=\"tc-btn-invisible\">\n{{$:/core/images/edit-button}}\n</$button>\n<$macrocall $name=\"displayshortcuts\" $output=\"text/html\" shortcuts={{$(shortcutTitle)$}} prefix=\"<kbd>\" separator=\"</kbd> <kbd>\" suffix=\"</kbd>\"/>\n\n<$reveal state=<<qualify \"$:/state/dropdown/$(shortcutTitle)$\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-block-dropdown-wrapper\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown tc-popup-keep\">\n<$list filter=\"[list[$(shortcutTitle)$!!text]sort[title]]\" variable=\"shortcut\" emptyMessage=\"\"\"\n<div class=\"tc-dropdown-item-plain\">\n//<<lingo NoShortcuts/Caption>>//\n</div>\n\"\"\">\n<div class=\"tc-dropdown-item-plain\">\n<$button class=\"tc-btn-invisible\" tooltip=<<lingo Remove/Hint>>>\n<$action-listops\n\t$tiddler=\"$(shortcutTitle)$\"\n\t$field=\"text\"\n\t$subfilter=\"+[remove<shortcut>]\"\n/>\n×\n</$button>\n<kbd>\n<$macrocall $name=\"displayshortcuts\" $output=\"text/html\" shortcuts=<<shortcut>>/>\n</kbd>\n</div>\n</$list>\n<hr/>\n<$macrocall $name=\"new-shortcut\" title=<<qualify \"$:/state/new-shortcut/$(shortcutTitle)$\">>/>\n</div>\n</div>\n</$reveal>\n</div>\n</td>\n\\end\n\n\\define shortcut-list(caption,prefix)\n<tr>\n<$list filter=\"[all[tiddlers+shadows][$prefix$$(shortcutName)$]]\" variable=\"shortcutTitle\">\n<<shortcut-list-item \"$caption$\">>\n</$list>\n</tr>\n\\end\n\n\\define shortcut-editor()\n<<shortcut-list \"All\" \"$:/config/shortcuts/\">>\n<<shortcut-list \"Mac\" \"$:/config/shortcuts-mac/\">>\n<<shortcut-list \"NonMac\" \"$:/config/shortcuts-not-mac/\">>\n<<shortcut-list \"Linux\" \"$:/config/shortcuts-linux/\">>\n<<shortcut-list \"NonLinux\" \"$:/config/shortcuts-not-linux/\">>\n<<shortcut-list \"Windows\" \"$:/config/shortcuts-windows/\">>\n<<shortcut-list \"NonWindows\" \"$:/config/shortcuts-not-windows/\">>\n\\end\n\n\\define shortcut-preview()\n<$macrocall $name=\"displayshortcuts\" $output=\"text/html\" shortcuts={{$(shortcutPrefix)$$(shortcutName)$}} prefix=\"<kbd>\" separator=\"</kbd> <kbd>\" suffix=\"</kbd>\"/>\n\\end\n\n\\define shortcut-item-inner()\n<tr>\n<td>\n<$reveal type=\"nomatch\" state=<<dropdownStateTitle>> text=\"open\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield\n\t$tiddler=<<dropdownStateTitle>>\n\t$value=\"open\"\n/>\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<dropdownStateTitle>> text=\"open\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield\n\t$tiddler=<<dropdownStateTitle>>\n\t$value=\"close\"\n/>\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n''<$text text=<<shortcutName>>/>''\n</td>\n<td>\n<$transclude tiddler=\"$:/config/ShortcutInfo/$(shortcutName)$\"/>\n</td>\n<td>\n<$list filter=\"$:/config/shortcuts/ $:/config/shortcuts-mac/ $:/config/shortcuts-not-mac/ $:/config/shortcuts-linux/ $:/config/shortcuts-not-linux/ $:/config/shortcuts-windows/ $:/config/shortcuts-not-windows/\" variable=\"shortcutPrefix\">\n<<shortcut-preview>>\n</$list>\n</td>\n</tr>\n<$set name=\"dropdownState\" value={{$(dropdownStateTitle)$}}>\n<$list filter=\"[<dropdownState>prefix[open]]\" variable=\"listItem\">\n<<shortcut-editor>>\n</$list>\n</$set>\n\\end\n\n\\define shortcut-item()\n<$set name=\"dropdownStateTitle\" value=<<qualify \"$:/state/dropdown/keyboardshortcut/$(shortcutName)$\">>>\n<<shortcut-item-inner>>\n</$set>\n\\end\n\n<table>\n<tbody>\n<$list filter=\"[all[shadows+tiddlers]removeprefix[$:/config/ShortcutInfo/]]\" variable=\"shortcutName\">\n<<shortcut-item>>\n</$list>\n</tbody>\n</table>\n"
},
"$:/core/ui/ControlPanel/LoadedModules": {
"title": "$:/core/ui/ControlPanel/LoadedModules",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/LoadedModules/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n<<lingo LoadedModules/Hint>>\n\n{{$:/snippets/modules}}\n"
},
"$:/core/ui/ControlPanel/Modals/AddPlugins": {
"title": "$:/core/ui/ControlPanel/Modals/AddPlugins",
"subtitle": "{{$:/core/images/download-button}} {{$:/language/ControlPanel/Plugins/Add/Caption}}",
"text": "\\define install-plugin-button()\n<$button>\n<$action-sendmessage $message=\"tm-load-plugin-from-library\" url={{!!url}} title={{$(assetInfo)$!!original-title}}/>\n<$list filter=\"[<assetInfo>get[original-title]get[version]]\" variable=\"installedVersion\" emptyMessage=\"\"\"{{$:/language/ControlPanel/Plugins/Install/Caption}}\"\"\">\n{{$:/language/ControlPanel/Plugins/Reinstall/Caption}}\n</$list>\n</$button>\n\\end\n\n\\define popup-state-macro()\n$:/state/add-plugin-info/$(connectionTiddler)$/$(assetInfo)$\n\\end\n\n\\define display-plugin-info(type)\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\n<div class=\"tc-plugin-info\">\n<div class=\"tc-plugin-info-chunk tc-small-icon\">\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<$list filter=\"[<assetInfo>has[icon]]\" emptyMessage=\"\"\"<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\"\"\">\n<img src={{$(assetInfo)$!!icon}}/>\n</$list>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<h1><$view tiddler=<<assetInfo>> field=\"description\"/></h1>\n<h2><$view tiddler=<<assetInfo>> field=\"original-title\"/></h2>\n<div><em><$view tiddler=<<assetInfo>> field=\"version\"/></em></div>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<<install-plugin-button>>\n</div>\n</div>\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>>>\n<div class=\"tc-plugin-info-dropdown\">\n<div class=\"tc-plugin-info-dropdown-message\">\n<$list filter=\"[<assetInfo>get[original-title]get[version]]\" variable=\"installedVersion\" emptyMessage=\"\"\"{{$:/language/ControlPanel/Plugins/NotInstalled/Hint}}\"\"\">\n<em>\n{{$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint}}\n</em>\n</$list>\n</div>\n<div class=\"tc-plugin-info-dropdown-body\">\n<$transclude tiddler=<<assetInfo>> field=\"readme\" mode=\"block\"/>\n</div>\n</div>\n</$reveal>\n</$set>\n\\end\n\n\\define load-plugin-library-button()\n<$button class=\"tc-btn-big-green\">\n<$action-sendmessage $message=\"tm-load-plugin-library\" url={{!!url}} infoTitlePrefix=\"$:/temp/RemoteAssetInfo/\"/>\n{{$:/core/images/chevron-right}} {{$:/language/ControlPanel/Plugins/OpenPluginLibrary}}\n</$button>\n\\end\n\n\\define display-server-assets(type)\n{{$:/language/Search/Search}}: <$edit-text tiddler=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" default=\"\" type=\"search\" tag=\"input\"/>\n<$reveal state=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" type=\"nomatch\" text=\"\">\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"\"\"$:/temp/RemoteAssetSearch/$(currentTiddler)$\"\"\" $field=\"text\" $value=\"\"/>\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n<div class=\"tc-plugin-library-listing\">\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[$type$]search{$:/temp/RemoteAssetSearch/$(currentTiddler)$}sort[description]]\" variable=\"assetInfo\">\n<<display-plugin-info \"$type$\">>\n</$list>\n</div>\n\\end\n\n\\define display-server-connection()\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/ServerConnection]suffix{!!url}]\" variable=\"connectionTiddler\" emptyMessage=<<load-plugin-library-button>>>\n\n<<tabs \"[[$:/core/ui/ControlPanel/Plugins/Add/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Add/Themes]] [[$:/core/ui/ControlPanel/Plugins/Add/Languages]]\" \"$:/core/ui/ControlPanel/Plugins/Add/Plugins\">>\n\n</$list>\n\\end\n\n\\define close-library-button()\n<$reveal type='nomatch' state='$:/temp/ServerConnection/$(PluginLibraryURL)$' text=''>\n<$button class='tc-btn-big-green'>\n<$action-sendmessage $message=\"tm-unload-plugin-library\" url={{!!url}}/>\n{{$:/core/images/chevron-left}} {{$:/language/ControlPanel/Plugins/ClosePluginLibrary}}\n<$action-deletetiddler $filter=\"[prefix[$:/temp/ServerConnection/$(PluginLibraryURL)$]][prefix[$:/temp/RemoteAssetInfo/$(PluginLibraryURL)$]]\"/>\n</$button>\n</$reveal>\n\\end\n\n\\define plugin-library-listing()\n<$list filter=\"[all[tiddlers+shadows]tag[$:/tags/PluginLibrary]]\">\n<div class=\"tc-plugin-library\">\n\n!! <$link><$transclude field=\"caption\"><$view field=\"title\"/></$transclude></$link>\n\n//<$view field=\"url\"/>//\n\n<$transclude/>\n\n<$set name=PluginLibraryURL value={{!!url}}>\n<<close-library-button>>\n</$set>\n\n<<display-server-connection>>\n</div>\n</$list>\n\\end\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<div>\n<<plugin-library-listing>>\n</div>\n\n</$importvariables>\n"
},
"$:/core/ui/ControlPanel/Palette": {
"title": "$:/core/ui/ControlPanel/Palette",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Palette/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\n\n{{$:/snippets/paletteswitcher}}\n\n<$reveal type=\"nomatch\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"yes\"><<lingo ShowEditor/Caption>></$button>\n\n</$reveal>\n\n<$reveal type=\"match\" state=\"$:/state/ShowPaletteEditor\" text=\"yes\">\n\n<$button set=\"$:/state/ShowPaletteEditor\" setTo=\"no\"><<lingo HideEditor/Caption>></$button>\n{{$:/snippets/paletteeditor}}\n\n</$reveal>\n\n"
},
"$:/core/ui/ControlPanel/Parsing": {
"title": "$:/core/ui/ControlPanel/Parsing",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/Parsing/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Parsing/\n\n\\define toggle(Type)\n<$checkbox\ntiddler=\"\"\"$:/config/WikiParserRules/$Type$/$(rule)$\"\"\"\nfield=\"text\"\nchecked=\"enable\"\nunchecked=\"disable\"\ndefault=\"enable\">\n<<rule>>\n</$checkbox>\n\\end\n\n\\define rules(type,Type)\n<$list filter=\"[wikiparserrules[$type$]]\" variable=\"rule\">\n<dd><<toggle $Type$>></dd>\n</$list>\n\\end\n\n<<lingo Hint>>\n\n<dl>\n<dt><<lingo Pragma/Caption>></dt>\n<<rules pragma Pragma>>\n<dt><<lingo Inline/Caption>></dt>\n<<rules inline Inline>>\n<dt><<lingo Block/Caption>></dt>\n<<rules block Block>>\n</dl>"
},
"$:/core/ui/ControlPanel/Plugins/Add/Languages": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Languages",
"caption": "{{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[language]]\"/>)",
"text": "<<display-server-assets language>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Add/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[plugin]]\"/>)",
"text": "<<display-server-assets plugin>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Add/Themes": {
"title": "$:/core/ui/ControlPanel/Plugins/Add/Themes",
"caption": "{{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter=\"[all[tiddlers+shadows]tag[$:/tags/RemoteAssetInfo]server-url{!!url}original-plugin-type[theme]]\"/>)",
"text": "<<display-server-assets theme>>\n"
},
"$:/core/ui/ControlPanel/Plugins/AddPlugins": {
"title": "$:/core/ui/ControlPanel/Plugins/AddPlugins",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n<$button message=\"tm-modal\" param=\"$:/core/ui/ControlPanel/Modals/AddPlugins\" tooltip={{$:/language/ControlPanel/Plugins/Add/Hint}} class=\"tc-btn-big-green\" style=\"background:blue;\">\n{{$:/core/images/download-button}} <<lingo Add/Caption>>\n</$button>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Languages": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Languages",
"caption": "{{$:/language/ControlPanel/Plugins/Languages/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[language]]\"/>)",
"text": "<<plugin-table language>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Plugins/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[plugin]]\"/>)",
"text": "<<plugin-table plugin>>\n"
},
"$:/core/ui/ControlPanel/Plugins/Installed/Themes": {
"title": "$:/core/ui/ControlPanel/Plugins/Installed/Themes",
"caption": "{{$:/language/ControlPanel/Plugins/Themes/Caption}} (<$count filter=\"[!has[draft.of]plugin-type[theme]]\"/>)",
"text": "<<plugin-table theme>>\n"
},
"$:/core/ui/ControlPanel/Plugins": {
"title": "$:/core/ui/ControlPanel/Plugins",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Plugins/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Plugins/\n\n\\define plugin-table(type)\n<$set name=\"plugin-type\" value=\"\"\"$type$\"\"\">\n<$set name=\"qualified-state\" value=<<qualify \"$:/state/plugin-info\">>>\n<$list filter=\"[!has[draft.of]plugin-type[$type$]sort[description]]\" emptyMessage=<<lingo \"Empty/Hint\">> template=\"$:/core/ui/Components/plugin-info\"/>\n</$set>\n</$set>\n\\end\n\n{{$:/core/ui/ControlPanel/Plugins/AddPlugins}}\n\n<<lingo Installed/Hint>>\n\n<<tabs \"[[$:/core/ui/ControlPanel/Plugins/Installed/Plugins]] [[$:/core/ui/ControlPanel/Plugins/Installed/Themes]] [[$:/core/ui/ControlPanel/Plugins/Installed/Languages]]\" \"$:/core/ui/ControlPanel/Plugins/Installed/Plugins\">>\n"
},
"$:/core/ui/ControlPanel/Saving/DownloadSaver": {
"title": "$:/core/ui/ControlPanel/Saving/DownloadSaver",
"tags": "$:/tags/ControlPanel/Saving",
"caption": "{{$:/language/ControlPanel/Saving/DownloadSaver/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Saving/DownloadSaver/\n\n<<lingo Hint>>\n\n!! <$link to=\"$:/config/DownloadSaver/AutoSave\"><<lingo AutoSave/Hint>></$link>\n\n<$checkbox tiddler=\"$:/config/DownloadSaver/AutoSave\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <<lingo AutoSave/Description>> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Saving/General": {
"title": "$:/core/ui/ControlPanel/Saving/General",
"tags": "$:/tags/ControlPanel/Saving",
"caption": "{{$:/language/ControlPanel/Saving/General/Caption}}",
"list-before": "",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/\n\n{{$:/language/ControlPanel/Saving/General/Hint}}\n\n!! <$link to=\"$:/config/AutoSave\"><<lingo AutoSave/Caption>></$link>\n\n<<lingo AutoSave/Hint>>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"yes\"> <<lingo AutoSave/Enabled/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/AutoSave\" value=\"no\"> <<lingo AutoSave/Disabled/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Saving/TiddlySpot": {
"title": "$:/core/ui/ControlPanel/Saving/TiddlySpot",
"tags": "$:/tags/ControlPanel/Saving",
"caption": "{{$:/language/ControlPanel/Saving/TiddlySpot/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Saving/TiddlySpot/\n\n\\define backupURL()\nhttp://$(userName)$.tiddlyspot.com/backup/\n\\end\n\\define backupLink()\n<$reveal type=\"nomatch\" state=\"$:/UploadName\" text=\"\">\n<$set name=\"userName\" value={{$:/UploadName}}>\n<$reveal type=\"match\" state=\"$:/UploadURL\" text=\"\">\n<<backupURL>>\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/UploadURL\" text=\"\">\n<$macrocall $name=resolvePath source={{$:/UploadBackupDir}} root={{$:/UploadURL}}>>\n</$reveal>\n</$set>\n</$reveal>\n\\end\n\n<<lingo Description>>\n\n|<<lingo UserName>> |<$edit-text tiddler=\"$:/UploadName\" default=\"\" tag=\"input\"/> |\n|<<lingo Password>> |<$password name=\"upload\"/> |\n|<<lingo Backups>> |<<backupLink>> |\n\n''<<lingo Advanced/Heading>>''\n\n|<<lingo ServerURL>> |<$edit-text tiddler=\"$:/UploadURL\" default=\"\" tag=\"input\"/> |\n|<<lingo Filename>> |<$edit-text tiddler=\"$:/UploadFilename\" default=\"index.html\" tag=\"input\"/> |\n|<<lingo UploadDir>> |<$edit-text tiddler=\"$:/UploadDir\" default=\".\" tag=\"input\"/> |\n|<<lingo BackupDir>> |<$edit-text tiddler=\"$:/UploadBackupDir\" default=\".\" tag=\"input\"/> |\n\n<<lingo TiddlySpot/Hint>>"
},
"$:/core/ui/ControlPanel/Saving": {
"title": "$:/core/ui/ControlPanel/Saving",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Saving/Caption}}",
"text": "{{$:/language/ControlPanel/Saving/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Saving]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Saving/General\">>\n</div>\n"
},
"$:/core/buttonstyles/Borderless": {
"title": "$:/core/buttonstyles/Borderless",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless}}",
"text": "tc-btn-invisible"
},
"$:/core/buttonstyles/Boxed": {
"title": "$:/core/buttonstyles/Boxed",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed}}",
"text": "tc-btn-boxed"
},
"$:/core/buttonstyles/Rounded": {
"title": "$:/core/buttonstyles/Rounded",
"tags": "$:/tags/ToolbarButtonStyle",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded}}",
"text": "tc-btn-rounded"
},
"$:/core/ui/ControlPanel/Settings/CamelCase": {
"title": "$:/core/ui/ControlPanel/Settings/CamelCase",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/CamelCase/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/CamelCase/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/WikiParserRules/Inline/wikilink\" field=\"text\" checked=\"enable\" unchecked=\"disable\" default=\"enable\"> <$link to=\"$:/config/WikiParserRules/Inline/wikilink\"><<lingo Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings/DefaultSidebarTab": {
"title": "$:/core/ui/ControlPanel/Settings/DefaultSidebarTab",
"caption": "{{$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption}}",
"tags": "$:/tags/ControlPanel/Settings",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/DefaultSidebarTab/\n\n<$link to=\"$:/config/DefaultSidebarTab\"><<lingo Hint>></$link>\n\n<$select tiddler=\"$:/config/DefaultSidebarTab\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\">\n<option value=<<currentTiddler>>><$transclude field=\"caption\"><$text text=<<currentTiddler>>/></$transclude></option>\n</$list>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/EditorToolbar": {
"title": "$:/core/ui/ControlPanel/Settings/EditorToolbar",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/EditorToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/EditorToolbar/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/TextEditor/EnableToolbar\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"> <$link to=\"$:/config/TextEditor/EnableToolbar\"><<lingo Description>></$link> </$checkbox>\n\n"
},
"$:/core/ui/ControlPanel/Settings/InfoPanelMode": {
"title": "$:/core/ui/ControlPanel/Settings/InfoPanelMode",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/InfoPanelMode/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/InfoPanelMode/\n<$link to=\"$:/config/TiddlerInfo/Mode\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/TiddlerInfo/Mode\" value=\"popup\"> <<lingo Popup/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/TiddlerInfo/Mode\" value=\"sticky\"> <<lingo Sticky/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/LinkToBehaviour": {
"title": "$:/core/ui/ControlPanel/Settings/LinkToBehaviour",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/LinkToBehaviour/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/LinkToBehaviour/\n\n<$link to=\"$:/config/Navigation/openLinkFromInsideRiver\"><<lingo \"InsideRiver/Hint\">></$link>\n\n<$select tiddler=\"$:/config/Navigation/openLinkFromInsideRiver\">\n <option value=\"above\"><<lingo \"OpenAbove\">></option>\n <option value=\"below\"><<lingo \"OpenBelow\">></option>\n <option value=\"top\"><<lingo \"OpenAtTop\">></option>\n <option value=\"bottom\"><<lingo \"OpenAtBottom\">></option>\n</$select>\n\n<$link to=\"$:/config/Navigation/openLinkFromOutsideRiver\"><<lingo \"OutsideRiver/Hint\">></$link>\n\n<$select tiddler=\"$:/config/Navigation/openLinkFromOutsideRiver\">\n <option value=\"top\"><<lingo \"OpenAtTop\">></option>\n <option value=\"bottom\"><<lingo \"OpenAtBottom\">></option>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/MissingLinks": {
"title": "$:/core/ui/ControlPanel/Settings/MissingLinks",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/MissingLinks/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/MissingLinks/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/MissingLinks\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"> <$link to=\"$:/config/MissingLinks\"><<lingo Description>></$link> </$checkbox>\n\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationAddressBar": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationAddressBar",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationAddressBar/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationAddressBar/\n\n<$link to=\"$:/config/Navigation/UpdateAddressBar\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permaview\"> <<lingo Permaview/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"permalink\"> <<lingo Permalink/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateAddressBar\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/NavigationHistory": {
"title": "$:/core/ui/ControlPanel/Settings/NavigationHistory",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/NavigationHistory/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/NavigationHistory/\n<$link to=\"$:/config/Navigation/UpdateHistory\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"yes\"> <<lingo Yes/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Navigation/UpdateHistory\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/PerformanceInstrumentation": {
"title": "$:/core/ui/ControlPanel/Settings/PerformanceInstrumentation",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/PerformanceInstrumentation/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/Performance/Instrumentation\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <$link to=\"$:/config/Performance/Instrumentation\"><<lingo Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings/TitleLinks": {
"title": "$:/core/ui/ControlPanel/Settings/TitleLinks",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/TitleLinks/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/TitleLinks/\n<$link to=\"$:/config/Tiddlers/TitleLinks\"><<lingo Hint>></$link>\n\n<$radio tiddler=\"$:/config/Tiddlers/TitleLinks\" value=\"yes\"> <<lingo Yes/Description>> </$radio>\n\n<$radio tiddler=\"$:/config/Tiddlers/TitleLinks\" value=\"no\"> <<lingo No/Description>> </$radio>\n"
},
"$:/core/ui/ControlPanel/Settings/ToolbarButtonStyle": {
"title": "$:/core/ui/ControlPanel/Settings/ToolbarButtonStyle",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/\n<$link to=\"$:/config/Toolbar/ButtonClass\"><<lingo \"Hint\">></$link>\n\n<$select tiddler=\"$:/config/Toolbar/ButtonClass\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]\">\n<option value={{!!text}}>{{!!caption}}</option>\n</$list>\n</$select>\n"
},
"$:/core/ui/ControlPanel/Settings/ToolbarButtons": {
"title": "$:/core/ui/ControlPanel/Settings/ToolbarButtons",
"tags": "$:/tags/ControlPanel/Settings",
"caption": "{{$:/language/ControlPanel/Settings/ToolbarButtons/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtons/\n<<lingo Hint>>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Icons\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"yes\"> <$link to=\"$:/config/Toolbar/Icons\"><<lingo Icons/Description>></$link> </$checkbox>\n\n<$checkbox tiddler=\"$:/config/Toolbar/Text\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> <$link to=\"$:/config/Toolbar/Text\"><<lingo Text/Description>></$link> </$checkbox>\n"
},
"$:/core/ui/ControlPanel/Settings": {
"title": "$:/core/ui/ControlPanel/Settings",
"tags": "$:/tags/ControlPanel",
"caption": "{{$:/language/ControlPanel/Settings/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/Settings/\n\n<<lingo Hint>>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Settings]]\">\n\n<div style=\"border-top:1px solid #eee;\">\n\n!! <$link><$transclude field=\"caption\"/></$link>\n\n<$transclude/>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/ControlPanel/StoryView": {
"title": "$:/core/ui/ControlPanel/StoryView",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/StoryView/Caption}}",
"text": "{{$:/snippets/viewswitcher}}\n"
},
"$:/core/ui/ControlPanel/Theme": {
"title": "$:/core/ui/ControlPanel/Theme",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Theme/Caption}}",
"text": "{{$:/snippets/themeswitcher}}\n"
},
"$:/core/ui/ControlPanel/TiddlerFields": {
"title": "$:/core/ui/ControlPanel/TiddlerFields",
"tags": "$:/tags/ControlPanel/Advanced",
"caption": "{{$:/language/ControlPanel/TiddlerFields/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n\n<<lingo TiddlerFields/Hint>>\n\n{{$:/snippets/allfields}}"
},
"$:/core/ui/ControlPanel/Toolbars/EditToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/EditToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/EditToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\n\\define config-base() $:/config/EditToolbarButtons/Visibility/\n\n{{$:/language/ControlPanel/Toolbars/EditToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$macrocall $name=\"list-tagged-draggable\" tag=\"$:/tags/EditToolbar\" itemTemplate=\"$:/core/ui/ControlPanel/Toolbars/ItemTemplate\"/>\n\n</$set>\n\n</$set>"
},
"$:/core/ui/ControlPanel/Toolbars/EditorItemTemplate": {
"title": "$:/core/ui/ControlPanel/Toolbars/EditorItemTemplate",
"text": "\\define config-title()\n$(config-base)$$(currentTiddler)$\n\\end\n\n<$draggable tiddler=<<currentTiddler>>>\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <span class=\"tc-icon-wrapper\"><$transclude tiddler={{!!icon}}/></span> <$transclude field=\"caption\"/> -- <i class=\"tc-muted\"><$transclude field=\"description\"/></i>\n</$draggable>\n"
},
"$:/core/ui/ControlPanel/Toolbars/EditorToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/EditorToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/EditorToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\n\\define config-base() $:/config/EditorToolbarButtons/Visibility/\n\n{{$:/language/ControlPanel/Toolbars/EditorToolbar/Hint}}\n\n<$macrocall $name=\"list-tagged-draggable\" tag=\"$:/tags/EditorToolbar\" itemTemplate=\"$:/core/ui/ControlPanel/Toolbars/EditorItemTemplate\"/>\n"
},
"$:/core/ui/ControlPanel/Toolbars/ItemTemplate": {
"title": "$:/core/ui/ControlPanel/Toolbars/ItemTemplate",
"text": "\\define config-title()\n$(config-base)$$(currentTiddler)$\n\\end\n\n<$draggable tiddler=<<currentTiddler>>>\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <span class=\"tc-icon-wrapper\"> <$transclude field=\"caption\"/> <i class=\"tc-muted\">-- <$transclude field=\"description\"/></i></span>\n</$draggable>\n"
},
"$:/core/ui/ControlPanel/Toolbars/PageControls": {
"title": "$:/core/ui/ControlPanel/Toolbars/PageControls",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/PageControls/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\n\\define config-base() $:/config/PageControlButtons/Visibility/\n\n{{$:/language/ControlPanel/Toolbars/PageControls/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$macrocall $name=\"list-tagged-draggable\" tag=\"$:/tags/PageControls\" itemTemplate=\"$:/core/ui/ControlPanel/Toolbars/ItemTemplate\"/>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/ControlPanel/Toolbars/ViewToolbar": {
"title": "$:/core/ui/ControlPanel/Toolbars/ViewToolbar",
"tags": "$:/tags/ControlPanel/Toolbars",
"caption": "{{$:/language/ControlPanel/Toolbars/ViewToolbar/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\n\\define config-base() $:/config/ViewToolbarButtons/Visibility/\n\n{{$:/language/ControlPanel/Toolbars/ViewToolbar/Hint}}\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$macrocall $name=\"list-tagged-draggable\" tag=\"$:/tags/ViewToolbar\" itemTemplate=\"$:/core/ui/ControlPanel/Toolbars/ItemTemplate\"/>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/ControlPanel/Toolbars": {
"title": "$:/core/ui/ControlPanel/Toolbars",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ControlPanel/Toolbars/Caption}}",
"text": "{{$:/language/ControlPanel/Toolbars/Hint}}\n\n<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel/Toolbars]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Toolbars/ViewToolbar\" \"$:/state/tabs/controlpanel/toolbars\" \"tc-vertical\">>\n</div>\n"
},
"$:/ControlPanel": {
"title": "$:/ControlPanel",
"icon": "$:/core/images/options-button",
"color": "#bbb",
"text": "<div class=\"tc-control-panel\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/ControlPanel]!has[draft.of]]\" \"$:/core/ui/ControlPanel/Info\">>\n</div>\n"
},
"$:/core/ui/DefaultSearchResultList": {
"title": "$:/core/ui/DefaultSearchResultList",
"tags": "$:/tags/SearchResults",
"caption": "{{$:/language/Search/DefaultResults/Caption}}",
"text": "\\define searchResultList()\n//<small>{{$:/language/Search/Matches/Title}}</small>//\n\n<$list filter=\"[!is[system]search:title{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n//<small>{{$:/language/Search/Matches/All}}</small>//\n\n<$list filter=\"[!is[system]search{$(searchTiddler)$}sort[title]limit[250]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n\n\\end\n<<searchResultList>>\n"
},
"$:/core/ui/EditTemplate/body/preview/output": {
"title": "$:/core/ui/EditTemplate/body/preview/output",
"tags": "$:/tags/EditPreview",
"caption": "{{$:/language/EditTemplate/Body/Preview/Type/Output}}",
"text": "<$set name=\"tv-tiddler-preview\" value=\"yes\">\n\n<$transclude />\n\n</$set>\n"
},
"$:/core/ui/EditTemplate/body/editor": {
"title": "$:/core/ui/EditTemplate/body/editor",
"text": "<$edit\n\n field=\"text\"\n class=\"tc-edit-texteditor\"\n placeholder={{$:/language/EditTemplate/Body/Placeholder}}\n\n><$set\n\n name=\"targetTiddler\"\n value=<<currentTiddler>>\n\n><$list\n\n filter=\"[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]\"\n\n><$reveal\n\n type=\"nomatch\"\n state=<<config-visibility-title>>\n text=\"hide\"\n class=\"tc-text-editor-toolbar-item-wrapper\"\n\n><$transclude\n\n tiddler=\"$:/core/ui/EditTemplate/body/toolbar/button\"\n mode=\"inline\"\n\n/></$reveal></$list></$set></$edit>\n"
},
"$:/core/ui/EditTemplate/body/toolbar/button": {
"title": "$:/core/ui/EditTemplate/body/toolbar/button",
"text": "\\define toolbar-button-icon()\n<$list\n\n filter=\"[all[current]!has[custom-icon]]\"\n variable=\"no-custom-icon\"\n\n><$transclude\n\n tiddler={{!!icon}}\n\n/></$list>\n\\end\n\n\\define toolbar-button-tooltip()\n{{!!description}}<$macrocall $name=\"displayshortcuts\" $output=\"text/plain\" shortcuts={{!!shortcuts}} prefix=\"` - [\" separator=\"] [\" suffix=\"]`\"/>\n\\end\n\n\\define toolbar-button()\n<$list\n\n filter={{!!condition}}\n variable=\"list-condition\"\n\n><$wikify\n\n name=\"tooltip-text\"\n text=<<toolbar-button-tooltip>>\n mode=\"inline\"\n output=\"text\"\n\n><$list\n\n filter=\"[all[current]!has[dropdown]]\"\n variable=\"no-dropdown\"\n\n><$button\n\n class=\"tc-btn-invisible $(buttonClasses)$\"\n tooltip=<<tooltip-text>>\n\n><span\n\n data-tw-keyboard-shortcut={{!!shortcuts}}\n\n/><<toolbar-button-icon>><$transclude\n\n tiddler=<<currentTiddler>>\n field=\"text\"\n\n/></$button></$list><$list\n\n filter=\"[all[current]has[dropdown]]\"\n variable=\"dropdown\"\n\n><$set\n\n name=\"dropdown-state\"\n value=<<qualify \"$:/state/EditorToolbarDropdown\">>\n\n><$button\n\n popup=<<dropdown-state>>\n class=\"tc-popup-keep tc-btn-invisible $(buttonClasses)$\"\n selectedClass=\"tc-selected\"\n tooltip=<<tooltip-text>>\n\n><span\n\n data-tw-keyboard-shortcut={{!!shortcuts}}\n\n/><<toolbar-button-icon>><$transclude\n\n tiddler=<<currentTiddler>>\n field=\"text\"\n\n/></$button><$reveal\n\n state=<<dropdown-state>>\n type=\"popup\"\n position=\"below\"\n animate=\"yes\"\n tag=\"span\"\n\n><div\n\n class=\"tc-drop-down tc-popup-keep\"\n\n><$transclude\n\n tiddler={{!!dropdown}}\n mode=\"block\"\n\n/></div></$reveal></$set></$list></$wikify></$list>\n\\end\n\n\\define toolbar-button-outer()\n<$set\n\n name=\"buttonClasses\"\n value={{!!button-classes}}\n\n><<toolbar-button>></$set>\n\\end\n\n<<toolbar-button-outer>>"
},
"$:/core/ui/EditTemplate/body": {
"title": "$:/core/ui/EditTemplate/body",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Body/\n\\define config-visibility-title()\n$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$\n\\end\n<$list filter=\"[is[current]has[_canonical_uri]]\">\n\n<div class=\"tc-message-box\">\n\n<<lingo External/Hint>>\n\n<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>\n\n<$edit-text field=\"_canonical_uri\" class=\"tc-edit-fields\"></$edit-text>\n\n</div>\n\n</$list>\n\n<$list filter=\"[is[current]!has[_canonical_uri]]\">\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"match\" text=\"yes\">\n\n<div class=\"tc-tiddler-preview\">\n\n<$transclude tiddler=\"$:/core/ui/EditTemplate/body/editor\" mode=\"inline\"/>\n\n<div class=\"tc-tiddler-preview-preview\">\n\n<$transclude tiddler={{$:/state/editpreviewtype}} mode=\"inline\">\n\n<$transclude tiddler=\"$:/core/ui/EditTemplate/body/preview/output\" mode=\"inline\"/>\n\n</$transclude>\n\n</div>\n\n</div>\n\n</$reveal>\n\n<$reveal state=\"$:/state/showeditpreview\" type=\"nomatch\" text=\"yes\">\n\n<$transclude tiddler=\"$:/core/ui/EditTemplate/body/editor\" mode=\"inline\"/>\n\n</$reveal>\n\n</$list>\n"
},
"$:/core/ui/EditTemplate/controls": {
"title": "$:/core/ui/EditTemplate/controls",
"tags": "$:/tags/EditTemplate",
"text": "\\define config-title()\n$:/config/EditToolbarButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-tiddler-title tc-tiddler-edit-title\">\n<$view field=\"title\"/>\n<span class=\"tc-tiddler-controls tc-titlebar\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>\n<div style=\"clear: both;\"></div>\n</div>\n"
},
"$:/core/ui/EditTemplate/fields": {
"title": "$:/core/ui/EditTemplate/fields",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n\\define config-title()\n$:/config/EditTemplateFields/Visibility/$(currentField)$\n\\end\n\n\\define config-filter()\n[[hide]] -[title{$(config-title)$}]\n\\end\n\n\\define new-field-inner()\n<$reveal type=\"nomatch\" text=\"\" default=<<name>>>\n<$button>\n<$action-sendmessage $message=\"tm-add-field\" $name=<<name>> $value=<<value>>/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<<lingo Fields/Add/Button>>\n</$button>\n</$reveal>\n<$reveal type=\"match\" text=\"\" default=<<name>>>\n<$button>\n<<lingo Fields/Add/Button>>\n</$button>\n</$reveal>\n\\end\n\n\\define new-field()\n<$set name=\"name\" value={{$:/temp/newfieldname}}>\n<$set name=\"value\" value={{$:/temp/newfieldvalue}}>\n<<new-field-inner>>\n</$set>\n</$set>\n\\end\n\n<div class=\"tc-edit-fields\">\n<table class=\"tc-edit-fields\">\n<tbody>\n<$list filter=\"[all[current]fields[]] +[sort[title]]\" variable=\"currentField\">\n<$list filter=<<config-filter>> variable=\"temp\">\n<tr class=\"tc-edit-field\">\n<td class=\"tc-edit-field-name\">\n<$text text=<<currentField>>/>:</td>\n<td class=\"tc-edit-field-value\">\n<$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}}/>\n</td>\n<td class=\"tc-edit-field-remove\">\n<$button class=\"tc-btn-invisible\" tooltip={{$:/language/EditTemplate/Field/Remove/Hint}} aria-label={{$:/language/EditTemplate/Field/Remove/Caption}}>\n<$action-deletefield $field=<<currentField>>/>\n{{$:/core/images/delete-button}}\n</$button>\n</td>\n</tr>\n</$list>\n</$list>\n</tbody>\n</table>\n</div>\n\n<$fieldmangler>\n<div class=\"tc-edit-field-add\">\n<em class=\"tc-edit\">\n<<lingo Fields/Add/Prompt>>\n</em>\n<span class=\"tc-edit-field-add-name\">\n<$edit-text tiddler=\"$:/temp/newfieldname\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Name/Placeholder}} focusPopup=<<qualify \"$:/state/popup/field-dropdown\">> class=\"tc-edit-texteditor tc-popup-handle\"/>\n</span>\n<$button popup=<<qualify \"$:/state/popup/field-dropdown\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Field/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Field/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/field-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$linkcatcher to=\"$:/temp/newfieldname\">\n<div class=\"tc-dropdown-item\">\n<<lingo Fields/Add/Dropdown/User>>\n</div>\n<$list filter=\"[!is[shadow]!is[system]fields[]search:title{$:/temp/newfieldname}sort[]] -created -creator -draft.of -draft.title -modified -modifier -tags -text -title -type\" variable=\"currentField\">\n<$link to=<<currentField>>>\n<<currentField>>\n</$link>\n</$list>\n<div class=\"tc-dropdown-item\">\n<<lingo Fields/Add/Dropdown/System>>\n</div>\n<$list filter=\"[fields[]search:title{$:/temp/newfieldname}sort[]] -[!is[shadow]!is[system]fields[]]\" variable=\"currentField\">\n<$link to=<<currentField>>>\n<<currentField>>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n<span class=\"tc-edit-field-add-value\">\n<$edit-text tiddler=\"$:/temp/newfieldvalue\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Fields/Add/Value/Placeholder}} class=\"tc-edit-texteditor\"/>\n</span>\n<span class=\"tc-edit-field-add-button\">\n<$macrocall $name=\"new-field\"/>\n</span>\n</div>\n</$fieldmangler>\n"
},
"$:/core/ui/EditTemplate/shadow": {
"title": "$:/core/ui/EditTemplate/shadow",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/Shadow/\n\\define pluginLinkBody()\n<$link to=\"\"\"$(pluginTitle)$\"\"\">\n<$text text=\"\"\"$(pluginTitle)$\"\"\"/>\n</$link>\n\\end\n<$list filter=\"[all[current]get[draft.of]is[shadow]!is[tiddler]]\">\n\n<$list filter=\"[all[current]shadowsource[]]\" variable=\"pluginTitle\">\n\n<$set name=\"pluginLink\" value=<<pluginLinkBody>>>\n<div class=\"tc-message-box\">\n\n<<lingo Warning>>\n\n</div>\n</$set>\n</$list>\n\n</$list>\n\n<$list filter=\"[all[current]get[draft.of]is[shadow]is[tiddler]]\">\n\n<$list filter=\"[all[current]shadowsource[]]\" variable=\"pluginTitle\">\n\n<$set name=\"pluginLink\" value=<<pluginLinkBody>>>\n<div class=\"tc-message-box\">\n\n<<lingo OverriddenWarning>>\n\n</div>\n</$set>\n</$list>\n\n</$list>"
},
"$:/core/ui/EditTemplate/tags": {
"title": "$:/core/ui/EditTemplate/tags",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n\n\\define tag-styles()\nbackground-color:$(backgroundColor)$;\nfill:$(foregroundColor)$;\ncolor:$(foregroundColor)$;\n\\end\n\n\\define tag-body-inner(colour,fallbackTarget,colourA,colourB)\n<$vars foregroundColor=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"$fallbackTarget$\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">> backgroundColor=\"\"\"$colour$\"\"\">\n<span style=<<tag-styles>> class=\"tc-tag-label\">\n<$view field=\"title\" format=\"text\" />\n<$button message=\"tm-remove-tag\" param={{!!title}} class=\"tc-btn-invisible tc-remove-tag-button\">×</$button>\n</span>\n</$vars>\n\\end\n\n\\define tag-body(colour,palette)\n<$macrocall $name=\"tag-body-inner\" colour=\"\"\"$colour$\"\"\" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>\n\\end\n\n\\define tag-picker-actions()\n<$action-listops\n\t$tiddler=<<currentTiddler>>\n\t$field=\"tags\"\n\t$subfilter=\"[<tag>] [all[current]tags[]]\"\n/>\n\\end\n\n<div class=\"tc-edit-tags\">\n<$fieldmangler>\n<$list filter=\"[all[current]tags[]sort[title]]\" storyview=\"pop\">\n<$macrocall $name=\"tag-body\" colour={{!!color}} palette={{$:/palette}}/>\n</$list>\n</$fieldmangler>\n<$macrocall $name=\"tag-picker\" actions=<<tag-picker-actions>>/>\n</div>\n"
},
"$:/core/ui/EditTemplate/title": {
"title": "$:/core/ui/EditTemplate/title",
"tags": "$:/tags/EditTemplate",
"text": "<$edit-text field=\"draft.title\" class=\"tc-titlebar tc-edit-texteditor\" focus=\"true\"/>\n\n<$vars pattern=\"\"\"[\\|\\[\\]{}]\"\"\" bad-chars=\"\"\"`| [ ] { }`\"\"\">\n\n<$list filter=\"[is[current]regexp:draft.title<pattern>]\" variable=\"listItem\">\n\n<div class=\"tc-message-box\">\n\n{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}\n\n</div>\n\n</$list>\n\n</$vars>\n\n<$reveal state=\"!!draft.title\" type=\"nomatch\" text={{!!draft.of}} tag=\"div\">\n\n<$list filter=\"[{!!draft.title}!is[missing]]\" variable=\"listItem\">\n\n<div class=\"tc-message-box\">\n\n{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}\n\n</div>\n\n</$list>\n\n<$list filter=\"[{!!draft.of}!is[missing]]\" variable=\"listItem\">\n\n<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>\n\n<$checkbox tiddler=\"$:/config/RelinkOnRename\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"no\"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>\n\n</$vars>\n\n</$list>\n\n</$reveal>\n\n\n"
},
"$:/core/ui/EditTemplate/type": {
"title": "$:/core/ui/EditTemplate/type",
"tags": "$:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/EditTemplate/\n<div class=\"tc-type-selector\"><$fieldmangler>\n<em class=\"tc-edit\"><<lingo Type/Prompt>></em> <$edit-text field=\"type\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Type/Placeholder}} focusPopup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-edit-typeeditor tc-popup-handle\"/> <$button popup=<<qualify \"$:/state/popup/type-dropdown\">> class=\"tc-btn-invisible tc-btn-dropdown\" tooltip={{$:/language/EditTemplate/Type/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Type/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <$button message=\"tm-remove-field\" param=\"type\" class=\"tc-btn-invisible tc-btn-icon\" tooltip={{$:/language/EditTemplate/Type/Delete/Hint}} aria-label={{$:/language/EditTemplate/Type/Delete/Caption}}>{{$:/core/images/delete-button}}</$button>\n</$fieldmangler></div>\n\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/popup/type-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n<$linkcatcher to=\"!!type\">\n<$list filter='[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]each[group]sort[group-sort]]'>\n<div class=\"tc-dropdown-item\">\n<$text text={{!!group}}/>\n</div>\n<$list filter=\"[all[shadows+tiddlers]prefix[$:/language/Docs/Types/]group{!!group}] +[sort[description]]\"><$link to={{!!name}}><$view field=\"description\"/> (<$view field=\"name\"/>)</$link>\n</$list>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>"
},
"$:/core/ui/EditTemplate": {
"title": "$:/core/ui/EditTemplate",
"text": "\\define actions()\n<$action-sendmessage $message=\"tm-add-tag\" $param={{$:/temp/NewTagName}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n<$action-sendmessage $message=\"tm-add-field\" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<$action-sendmessage $message=\"tm-save-tiddler\"/>\n\\end\n\\define frame-classes()\ntc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$\n\\end\n<div class=<<frame-classes>>>\n<$fieldmangler>\n<$set name=\"storyTiddler\" value=<<currentTiddler>>>\n<$keyboard key=\"((cancel-edit-tiddler))\" message=\"tm-cancel-tiddler\">\n<$keyboard key=\"((save-tiddler))\" actions=<<actions>>>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\" variable=\"listItem\">\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n<$transclude tiddler=<<listItem>>/>\n</$set>\n</$list>\n</$keyboard>\n</$keyboard>\n</$set>\n</$fieldmangler>\n</div>\n"
},
"$:/core/ui/Buttons/cancel": {
"title": "$:/core/ui/Buttons/cancel",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/cancel-button}} {{$:/language/Buttons/Cancel/Caption}}",
"description": "{{$:/language/Buttons/Cancel/Hint}}",
"text": "<$button message=\"tm-cancel-tiddler\" tooltip={{$:/language/Buttons/Cancel/Hint}} aria-label={{$:/language/Buttons/Cancel/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/cancel-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/delete": {
"title": "$:/core/ui/Buttons/delete",
"tags": "$:/tags/EditToolbar $:/tags/ViewToolbar",
"caption": "{{$:/core/images/delete-button}} {{$:/language/Buttons/Delete/Caption}}",
"description": "{{$:/language/Buttons/Delete/Hint}}",
"text": "<$button message=\"tm-delete-tiddler\" tooltip={{$:/language/Buttons/Delete/Hint}} aria-label={{$:/language/Buttons/Delete/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/delete-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/save": {
"title": "$:/core/ui/Buttons/save",
"tags": "$:/tags/EditToolbar",
"caption": "{{$:/core/images/done-button}} {{$:/language/Buttons/Save/Caption}}",
"description": "{{$:/language/Buttons/Save/Hint}}",
"text": "<$fieldmangler><$button tooltip={{$:/language/Buttons/Save/Hint}} aria-label={{$:/language/Buttons/Save/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-add-tag\" $param={{$:/temp/NewTagName}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n<$action-sendmessage $message=\"tm-add-field\" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<$action-sendmessage $message=\"tm-save-tiddler\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/done-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Save/Caption}}/></span>\n</$list>\n</$button></$fieldmangler>\n"
},
"$:/core/ui/EditorToolbar/bold": {
"title": "$:/core/ui/EditorToolbar/bold",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/bold",
"caption": "{{$:/language/Buttons/Bold/Caption}}",
"description": "{{$:/language/Buttons/Bold/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((bold))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"''\"\n\tsuffix=\"''\"\n/>\n"
},
"$:/core/ui/EditorToolbar/clear-dropdown": {
"title": "$:/core/ui/EditorToolbar/clear-dropdown",
"text": "''{{$:/language/Buttons/Clear/Hint}}''\n\n<div class=\"tc-colour-chooser\">\n\n<$macrocall $name=\"colour-picker\" actions=\"\"\"\n\n<$action-sendmessage\n\t$message=\"tm-edit-bitmap-operation\"\n\t$param=\"clear\"\n\tcolour=<<colour-picker-value>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n\"\"\"/>\n\n</div>\n"
},
"$:/core/ui/EditorToolbar/clear": {
"title": "$:/core/ui/EditorToolbar/clear",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/erase",
"caption": "{{$:/language/Buttons/Clear/Caption}}",
"description": "{{$:/language/Buttons/Clear/Hint}}",
"condition": "[<targetTiddler>is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/clear-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/editor-height-dropdown": {
"title": "$:/core/ui/EditorToolbar/editor-height-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/EditorHeight/\n''<<lingo Hint>>''\n\n<$radio tiddler=\"$:/config/TextEditor/EditorHeight/Mode\" value=\"auto\"> {{$:/core/images/auto-height}} <<lingo Caption/Auto>></$radio>\n\n<$radio tiddler=\"$:/config/TextEditor/EditorHeight/Mode\" value=\"fixed\"> {{$:/core/images/fixed-height}} <<lingo Caption/Fixed>> <$edit-text tag=\"input\" tiddler=\"$:/config/TextEditor/EditorHeight/Height\" default=\"100px\"/></$radio>\n"
},
"$:/core/ui/EditorToolbar/editor-height": {
"title": "$:/core/ui/EditorToolbar/editor-height",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/fixed-height",
"custom-icon": "yes",
"caption": "{{$:/language/Buttons/EditorHeight/Caption}}",
"description": "{{$:/language/Buttons/EditorHeight/Hint}}",
"condition": "[<targetTiddler>!is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/editor-height-dropdown",
"text": "<$reveal tag=\"span\" state=\"$:/config/TextEditor/EditorHeight/Mode\" type=\"match\" text=\"fixed\">\n{{$:/core/images/fixed-height}}\n</$reveal>\n<$reveal tag=\"span\" state=\"$:/config/TextEditor/EditorHeight/Mode\" type=\"match\" text=\"auto\">\n{{$:/core/images/auto-height}}\n</$reveal>\n"
},
"$:/core/ui/EditorToolbar/excise-dropdown": {
"title": "$:/core/ui/EditorToolbar/excise-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/Excise/\n\n\\define body(config-title)\n''<<lingo Hint>>''\n\n<<lingo Caption/NewTitle>> <$edit-text tag=\"input\" tiddler=\"$config-title$/new-title\" default=\"\" focus=\"true\"/>\n\n<$set name=\"new-title\" value={{$config-title$/new-title}}>\n<$list filter=\"\"\"[<new-title>is[tiddler]]\"\"\">\n<div class=\"tc-error\">\n<<lingo Caption/TiddlerExists>>\n</div>\n</$list>\n</$set>\n\n<$checkbox tiddler=\"\"\"$config-title$/tagnew\"\"\" field=\"text\" checked=\"yes\" unchecked=\"no\" default=\"false\"> <<lingo Caption/Tag>></$checkbox>\n\n<<lingo Caption/Replace>> <$select tiddler=\"\"\"$config-title$/type\"\"\" default=\"transclude\">\n<option value=\"link\"><<lingo Caption/Replace/Link>></option>\n<option value=\"transclude\"><<lingo Caption/Replace/Transclusion>></option>\n<option value=\"macro\"><<lingo Caption/Replace/Macro>></option>\n</$select>\n\n<$reveal state=\"\"\"$config-title$/type\"\"\" type=\"match\" text=\"macro\">\n<<lingo Caption/MacroName>> <$edit-text tag=\"input\" tiddler=\"\"\"$config-title$/macro-title\"\"\" default=\"translink\"/>\n</$reveal>\n\n<$button>\n<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"excise\"\n\ttitle={{$config-title$/new-title}}\n\ttype={{$config-title$/type}}\n\tmacro={{$config-title$/macro-title}}\n\ttagnew={{$config-title$/tagnew}}\n/>\n<$action-deletetiddler\n\t$tiddler=\"$config-title$/new-title\"\n/>\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n<<lingo Caption/Excise>>\n</$button>\n\\end\n\n<$macrocall $name=\"body\" config-title=<<qualify \"$:/state/Excise/\">>/>\n"
},
"$:/core/ui/EditorToolbar/excise": {
"title": "$:/core/ui/EditorToolbar/excise",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/excise",
"caption": "{{$:/language/Buttons/Excise/Caption}}",
"description": "{{$:/language/Buttons/Excise/Hint}}",
"condition": "[<targetTiddler>!is[image]]",
"shortcuts": "((excise))",
"dropdown": "$:/core/ui/EditorToolbar/excise-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/heading-1": {
"title": "$:/core/ui/EditorToolbar/heading-1",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-1",
"caption": "{{$:/language/Buttons/Heading1/Caption}}",
"description": "{{$:/language/Buttons/Heading1/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"button-classes": "tc-text-editor-toolbar-item-start-group",
"shortcuts": "((heading-1))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"1\"\n/>\n"
},
"$:/core/ui/EditorToolbar/heading-2": {
"title": "$:/core/ui/EditorToolbar/heading-2",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-2",
"caption": "{{$:/language/Buttons/Heading2/Caption}}",
"description": "{{$:/language/Buttons/Heading2/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((heading-2))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"2\"\n/>\n"
},
"$:/core/ui/EditorToolbar/heading-3": {
"title": "$:/core/ui/EditorToolbar/heading-3",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-3",
"caption": "{{$:/language/Buttons/Heading3/Caption}}",
"description": "{{$:/language/Buttons/Heading3/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((heading-3))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"3\"\n/>\n"
},
"$:/core/ui/EditorToolbar/heading-4": {
"title": "$:/core/ui/EditorToolbar/heading-4",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-4",
"caption": "{{$:/language/Buttons/Heading4/Caption}}",
"description": "{{$:/language/Buttons/Heading4/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((heading-4))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"4\"\n/>\n"
},
"$:/core/ui/EditorToolbar/heading-5": {
"title": "$:/core/ui/EditorToolbar/heading-5",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-5",
"caption": "{{$:/language/Buttons/Heading5/Caption}}",
"description": "{{$:/language/Buttons/Heading5/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((heading-5))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"5\"\n/>\n"
},
"$:/core/ui/EditorToolbar/heading-6": {
"title": "$:/core/ui/EditorToolbar/heading-6",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/heading-6",
"caption": "{{$:/language/Buttons/Heading6/Caption}}",
"description": "{{$:/language/Buttons/Heading6/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((heading-6))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"!\"\n\tcount=\"6\"\n/>\n"
},
"$:/core/ui/EditorToolbar/italic": {
"title": "$:/core/ui/EditorToolbar/italic",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/italic",
"caption": "{{$:/language/Buttons/Italic/Caption}}",
"description": "{{$:/language/Buttons/Italic/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((italic))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"//\"\n\tsuffix=\"//\"\n/>\n"
},
"$:/core/ui/EditorToolbar/line-width-dropdown": {
"title": "$:/core/ui/EditorToolbar/line-width-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/LineWidth/\n\n\\define toolbar-line-width-inner()\n<$button tag=\"a\" tooltip=\"\"\"$(line-width)$\"\"\">\n\n<$action-setfield\n\t$tiddler=\"$:/config/BitmapEditor/LineWidth\"\n\t$value=\"$(line-width)$\"\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<div style=\"display: inline-block; margin: 4px calc(80px - $(line-width)$); background-color: #000; width: calc(100px + $(line-width)$ * 2); height: $(line-width)$; border-radius: 120px; vertical-align: middle;\"/>\n\n<span style=\"margin-left: 8px;\">\n\n<$text text=\"\"\"$(line-width)$\"\"\"/>\n\n<$reveal state=\"$:/config/BitmapEditor/LineWidth\" type=\"match\" text=\"\"\"$(line-width)$\"\"\" tag=\"span\">\n\n<$entity entity=\" \"/>\n\n<$entity entity=\"✓\"/>\n\n</$reveal>\n\n</span>\n\n</$button>\n\\end\n\n''<<lingo Hint>>''\n\n<$list filter={{$:/config/BitmapEditor/LineWidths}} variable=\"line-width\">\n\n<<toolbar-line-width-inner>>\n\n</$list>\n"
},
"$:/core/ui/EditorToolbar/line-width": {
"title": "$:/core/ui/EditorToolbar/line-width",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/line-width",
"caption": "{{$:/language/Buttons/LineWidth/Caption}}",
"description": "{{$:/language/Buttons/LineWidth/Hint}}",
"condition": "[<targetTiddler>is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/line-width-dropdown",
"text": "<$text text={{$:/config/BitmapEditor/LineWidth}}/>"
},
"$:/core/ui/EditorToolbar/link-dropdown": {
"title": "$:/core/ui/EditorToolbar/link-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/Link/\n\n\\define link-actions()\n<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"make-link\"\n\ttext={{$(linkTiddler)$}}\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<searchTiddler>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<linkTiddler>>\n/>\n\\end\n\n\\define external-link()\n<$button class=\"tc-btn-invisible\" style=\"width: auto; display: inline-block; background-colour: inherit;\">\n<$action-sendmessage $message=\"tm-edit-text-operation\" $param=\"make-link\" text={{$(searchTiddler)$}}\n/>\n{{$:/core/images/chevron-right}}\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<searchTiddler>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<linkTiddler>>\n/>\n</$button>\n\\end\n\n\n\\define body(config-title)\n''<<lingo Hint>>''\n\n<$vars searchTiddler=\"\"\"$config-title$/search\"\"\" linkTiddler=\"\"\"$config-title$/link\"\"\" linktext=\"\" >\n\n<$edit-text tiddler=<<searchTiddler>> type=\"search\" tag=\"input\" focus=\"true\" placeholder={{$:/language/Search/Search}} default=\"\"/>\n<$reveal tag=\"span\" state=<<searchTiddler>> type=\"nomatch\" text=\"\">\n<<external-link>>\n<$button class=\"tc-btn-invisible\" style=\"width: auto; display: inline-block; background-colour: inherit;\">\n<$action-setfield $tiddler=<<searchTiddler>> text=\"\" />\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n\n<$reveal tag=\"div\" state=<<searchTiddler>> type=\"nomatch\" text=\"\">\n\n<$linkcatcher actions=<<link-actions>> to=<<linkTiddler>>>\n\n{{$:/core/ui/SearchResults}}\n\n</$linkcatcher>\n\n</$reveal>\n\n</$vars>\n\n\\end\n\n<$macrocall $name=\"body\" config-title=<<qualify \"$:/state/Link/\">>/>"
},
"$:/core/ui/EditorToolbar/link": {
"title": "$:/core/ui/EditorToolbar/link",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/link",
"caption": "{{$:/language/Buttons/Link/Caption}}",
"description": "{{$:/language/Buttons/Link/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"button-classes": "tc-text-editor-toolbar-item-start-group",
"shortcuts": "((link))",
"dropdown": "$:/core/ui/EditorToolbar/link-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/list-bullet": {
"title": "$:/core/ui/EditorToolbar/list-bullet",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/list-bullet",
"caption": "{{$:/language/Buttons/ListBullet/Caption}}",
"description": "{{$:/language/Buttons/ListBullet/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((list-bullet))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"*\"\n\tcount=\"1\"\n/>\n"
},
"$:/core/ui/EditorToolbar/list-number": {
"title": "$:/core/ui/EditorToolbar/list-number",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/list-number",
"caption": "{{$:/language/Buttons/ListNumber/Caption}}",
"description": "{{$:/language/Buttons/ListNumber/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((list-number))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"prefix-lines\"\n\tcharacter=\"#\"\n\tcount=\"1\"\n/>\n"
},
"$:/core/ui/EditorToolbar/mono-block": {
"title": "$:/core/ui/EditorToolbar/mono-block",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/mono-block",
"caption": "{{$:/language/Buttons/MonoBlock/Caption}}",
"description": "{{$:/language/Buttons/MonoBlock/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"button-classes": "tc-text-editor-toolbar-item-start-group",
"shortcuts": "((mono-block))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-lines\"\n\tprefix=\"\n```\"\n\tsuffix=\"```\"\n/>\n"
},
"$:/core/ui/EditorToolbar/mono-line": {
"title": "$:/core/ui/EditorToolbar/mono-line",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/mono-line",
"caption": "{{$:/language/Buttons/MonoLine/Caption}}",
"description": "{{$:/language/Buttons/MonoLine/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((mono-line))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"`\"\n\tsuffix=\"`\"\n/>\n"
},
"$:/core/ui/EditorToolbar/more-dropdown": {
"title": "$:/core/ui/EditorToolbar/more-dropdown",
"text": "\\define config-title()\n$:/config/EditorToolbarButtons/Visibility/$(toolbarItem)$\n\\end\n\n\\define conditional-button()\n<$list filter={{$(toolbarItem)$!!condition}} variable=\"condition\">\n<$transclude tiddler=\"$:/core/ui/EditTemplate/body/toolbar/button\" mode=\"inline\"/> <$transclude tiddler=<<toolbarItem>> field=\"description\"/>\n</$list>\n\\end\n\n<div class=\"tc-text-editor-toolbar-more\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]] -[[$:/core/ui/EditorToolbar/more]]\">\n<$reveal type=\"match\" state=<<config-visibility-title>> text=\"hide\" tag=\"div\">\n<<conditional-button>>\n</$reveal>\n</$list>\n</div>\n"
},
"$:/core/ui/EditorToolbar/more": {
"title": "$:/core/ui/EditorToolbar/more",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/down-arrow",
"caption": "{{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"condition": "[<targetTiddler>]",
"dropdown": "$:/core/ui/EditorToolbar/more-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/opacity-dropdown": {
"title": "$:/core/ui/EditorToolbar/opacity-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/Opacity/\n\n\\define toolbar-opacity-inner()\n<$button tag=\"a\" tooltip=\"\"\"$(opacity)$\"\"\">\n\n<$action-setfield\n\t$tiddler=\"$:/config/BitmapEditor/Opacity\"\n\t$value=\"$(opacity)$\"\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<div style=\"display: inline-block; vertical-align: middle; background-color: $(current-paint-colour)$; opacity: $(opacity)$; width: 1em; height: 1em; border-radius: 50%;\"/>\n\n<span style=\"margin-left: 8px;\">\n\n<$text text=\"\"\"$(opacity)$\"\"\"/>\n\n<$reveal state=\"$:/config/BitmapEditor/Opacity\" type=\"match\" text=\"\"\"$(opacity)$\"\"\" tag=\"span\">\n\n<$entity entity=\" \"/>\n\n<$entity entity=\"✓\"/>\n\n</$reveal>\n\n</span>\n\n</$button>\n\\end\n\n\\define toolbar-opacity()\n''<<lingo Hint>>''\n\n<$list filter={{$:/config/BitmapEditor/Opacities}} variable=\"opacity\">\n\n<<toolbar-opacity-inner>>\n\n</$list>\n\\end\n\n<$set name=\"current-paint-colour\" value={{$:/config/BitmapEditor/Colour}}>\n\n<$set name=\"current-opacity\" value={{$:/config/BitmapEditor/Opacity}}>\n\n<<toolbar-opacity>>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/EditorToolbar/opacity": {
"title": "$:/core/ui/EditorToolbar/opacity",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/opacity",
"caption": "{{$:/language/Buttons/Opacity/Caption}}",
"description": "{{$:/language/Buttons/Opacity/Hint}}",
"condition": "[<targetTiddler>is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/opacity-dropdown",
"text": "<$text text={{$:/config/BitmapEditor/Opacity}}/>\n"
},
"$:/core/ui/EditorToolbar/paint-dropdown": {
"title": "$:/core/ui/EditorToolbar/paint-dropdown",
"text": "''{{$:/language/Buttons/Paint/Hint}}''\n\n<$macrocall $name=\"colour-picker\" actions=\"\"\"\n\n<$action-setfield\n\t$tiddler=\"$:/config/BitmapEditor/Colour\"\n\t$value=<<colour-picker-value>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n\"\"\"/>\n"
},
"$:/core/ui/EditorToolbar/paint": {
"title": "$:/core/ui/EditorToolbar/paint",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/paint",
"caption": "{{$:/language/Buttons/Paint/Caption}}",
"description": "{{$:/language/Buttons/Paint/Hint}}",
"condition": "[<targetTiddler>is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/paint-dropdown",
"text": "\\define toolbar-paint()\n<div style=\"display: inline-block; vertical-align: middle; background-color: $(colour-picker-value)$; width: 1em; height: 1em; border-radius: 50%;\"/>\n\\end\n<$set name=\"colour-picker-value\" value={{$:/config/BitmapEditor/Colour}}>\n<<toolbar-paint>>\n</$set>\n"
},
"$:/core/ui/EditorToolbar/picture-dropdown": {
"title": "$:/core/ui/EditorToolbar/picture-dropdown",
"text": "\\define replacement-text()\n[img[$(imageTitle)$]]\n\\end\n\n''{{$:/language/Buttons/Picture/Hint}}''\n\n<$macrocall $name=\"image-picker\" actions=\"\"\"\n\n<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"replace-selection\"\n\ttext=<<replacement-text>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n\"\"\"/>\n"
},
"$:/core/ui/EditorToolbar/picture": {
"title": "$:/core/ui/EditorToolbar/picture",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/picture",
"caption": "{{$:/language/Buttons/Picture/Caption}}",
"description": "{{$:/language/Buttons/Picture/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((picture))",
"dropdown": "$:/core/ui/EditorToolbar/picture-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/preview-type-dropdown": {
"title": "$:/core/ui/EditorToolbar/preview-type-dropdown",
"text": "\\define preview-type-button()\n<$button tag=\"a\">\n\n<$action-setfield $tiddler=\"$:/state/editpreviewtype\" $value=\"$(previewType)$\"/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<$transclude tiddler=<<previewType>> field=\"caption\" mode=\"inline\">\n\n<$view tiddler=<<previewType>> field=\"title\" mode=\"inline\"/>\n\n</$transclude> \n\n<$reveal tag=\"span\" state=\"$:/state/editpreviewtype\" type=\"match\" text=<<previewType>> default=\"$:/core/ui/EditTemplate/body/preview/output\">\n\n<$entity entity=\" \"/>\n\n<$entity entity=\"✓\"/>\n\n</$reveal>\n\n</$button>\n\\end\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]]\" variable=\"previewType\">\n\n<<preview-type-button>>\n\n</$list>\n"
},
"$:/core/ui/EditorToolbar/preview-type": {
"title": "$:/core/ui/EditorToolbar/preview-type",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/chevron-down",
"caption": "{{$:/language/Buttons/PreviewType/Caption}}",
"description": "{{$:/language/Buttons/PreviewType/Hint}}",
"condition": "[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]butfirst[]limit[1]]",
"button-classes": "tc-text-editor-toolbar-item-adjunct",
"dropdown": "$:/core/ui/EditorToolbar/preview-type-dropdown"
},
"$:/core/ui/EditorToolbar/preview": {
"title": "$:/core/ui/EditorToolbar/preview",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/preview-open",
"custom-icon": "yes",
"caption": "{{$:/language/Buttons/Preview/Caption}}",
"description": "{{$:/language/Buttons/Preview/Hint}}",
"condition": "[<targetTiddler>]",
"button-classes": "tc-text-editor-toolbar-item-start-group",
"shortcuts": "((preview))",
"text": "<$reveal state=\"$:/state/showeditpreview\" type=\"match\" text=\"yes\" tag=\"span\">\n{{$:/core/images/preview-open}}\n<$action-setfield $tiddler=\"$:/state/showeditpreview\" $value=\"no\"/>\n</$reveal>\n<$reveal state=\"$:/state/showeditpreview\" type=\"nomatch\" text=\"yes\" tag=\"span\">\n{{$:/core/images/preview-closed}}\n<$action-setfield $tiddler=\"$:/state/showeditpreview\" $value=\"yes\"/>\n</$reveal>\n"
},
"$:/core/ui/EditorToolbar/quote": {
"title": "$:/core/ui/EditorToolbar/quote",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/quote",
"caption": "{{$:/language/Buttons/Quote/Caption}}",
"description": "{{$:/language/Buttons/Quote/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((quote))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-lines\"\n\tprefix=\"\n<<<\"\n\tsuffix=\"<<<\"\n/>\n"
},
"$:/core/ui/EditorToolbar/size-dropdown": {
"title": "$:/core/ui/EditorToolbar/size-dropdown",
"text": "\\define lingo-base() $:/language/Buttons/Size/\n\n\\define toolbar-button-size-preset(config-title)\n<$set name=\"width\" filter=\"$(sizePair)$ +[first[]]\">\n\n<$set name=\"height\" filter=\"$(sizePair)$ +[last[]]\">\n\n<$button tag=\"a\">\n\n<$action-setfield\n\t$tiddler=\"\"\"$config-title$/new-width\"\"\"\n\t$value=<<width>>\n/>\n\n<$action-setfield\n\t$tiddler=\"\"\"$config-title$/new-height\"\"\"\n\t$value=<<height>>\n/>\n\n<$action-deletetiddler\n\t$tiddler=\"\"\"$config-title$/presets-popup\"\"\"\n/>\n\n<$text text=<<width>>/> × <$text text=<<height>>/>\n\n</$button>\n\n</$set>\n\n</$set>\n\\end\n\n\\define toolbar-button-size(config-title)\n''{{$:/language/Buttons/Size/Hint}}''\n\n<<lingo Caption/Width>> <$edit-text tag=\"input\" tiddler=\"\"\"$config-title$/new-width\"\"\" default=<<tv-bitmap-editor-width>> focus=\"true\" size=\"8\"/> <<lingo Caption/Height>> <$edit-text tag=\"input\" tiddler=\"\"\"$config-title$/new-height\"\"\" default=<<tv-bitmap-editor-height>> size=\"8\"/> <$button popup=\"\"\"$config-title$/presets-popup\"\"\" class=\"tc-btn-invisible tc-popup-keep\" style=\"width: auto; display: inline-block; background-colour: inherit;\" selectedClass=\"tc-selected\">\n{{$:/core/images/down-arrow}}\n</$button>\n\n<$reveal tag=\"span\" state=\"\"\"$config-title$/presets-popup\"\"\" type=\"popup\" position=\"belowleft\" animate=\"yes\">\n\n<div class=\"tc-drop-down tc-popup-keep\">\n\n<$list filter={{$:/config/BitmapEditor/ImageSizes}} variable=\"sizePair\">\n\n<$macrocall $name=\"toolbar-button-size-preset\" config-title=\"$config-title$\"/>\n\n</$list>\n\n</div>\n\n</$reveal>\n\n<$button>\n<$action-sendmessage\n\t$message=\"tm-edit-bitmap-operation\"\n\t$param=\"resize\"\n\twidth={{$config-title$/new-width}}\n\theight={{$config-title$/new-height}}\n/>\n<$action-deletetiddler\n\t$tiddler=\"\"\"$config-title$/new-width\"\"\"\n/>\n<$action-deletetiddler\n\t$tiddler=\"\"\"$config-title$/new-height\"\"\"\n/>\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n<<lingo Caption/Resize>>\n</$button>\n\\end\n\n<$macrocall $name=\"toolbar-button-size\" config-title=<<qualify \"$:/state/Size/\">>/>\n"
},
"$:/core/ui/EditorToolbar/size": {
"title": "$:/core/ui/EditorToolbar/size",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/size",
"caption": "{{$:/language/Buttons/Size/Caption}}",
"description": "{{$:/language/Buttons/Size/Hint}}",
"condition": "[<targetTiddler>is[image]]",
"dropdown": "$:/core/ui/EditorToolbar/size-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/stamp-dropdown": {
"title": "$:/core/ui/EditorToolbar/stamp-dropdown",
"text": "\\define toolbar-button-stamp-inner()\n<$button tag=\"a\">\n\n<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"replace-selection\"\n\ttext={{$(snippetTitle)$}}\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<$view tiddler=<<snippetTitle>> field=\"caption\" mode=\"inline\">\n\n<$view tiddler=<<snippetTitle>> field=\"title\" mode=\"inline\"/>\n\n</$view>\n\n</$button>\n\\end\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TextEditor/Snippet]!has[draft.of]sort[caption]]\" variable=\"snippetTitle\">\n\n<<toolbar-button-stamp-inner>>\n\n</$list>\n\n----\n\n<$button tag=\"a\">\n\n<$action-sendmessage\n\t$message=\"tm-new-tiddler\"\n\ttags=\"$:/tags/TextEditor/Snippet\"\n\tcaption={{$:/language/Buttons/Stamp/New/Title}}\n\ttext={{$:/language/Buttons/Stamp/New/Text}}\n/>\n\n<$action-deletetiddler\n\t$tiddler=<<dropdown-state>>\n/>\n\n<em>\n\n<$text text={{$:/language/Buttons/Stamp/Caption/New}}/>\n\n</em>\n\n</$button>\n"
},
"$:/core/ui/EditorToolbar/stamp": {
"title": "$:/core/ui/EditorToolbar/stamp",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/stamp",
"caption": "{{$:/language/Buttons/Stamp/Caption}}",
"description": "{{$:/language/Buttons/Stamp/Hint}}",
"condition": "[<targetTiddler>!is[image]]",
"shortcuts": "((stamp))",
"dropdown": "$:/core/ui/EditorToolbar/stamp-dropdown",
"text": ""
},
"$:/core/ui/EditorToolbar/strikethrough": {
"title": "$:/core/ui/EditorToolbar/strikethrough",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/strikethrough",
"caption": "{{$:/language/Buttons/Strikethrough/Caption}}",
"description": "{{$:/language/Buttons/Strikethrough/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((strikethrough))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"~~\"\n\tsuffix=\"~~\"\n/>\n"
},
"$:/core/ui/EditorToolbar/subscript": {
"title": "$:/core/ui/EditorToolbar/subscript",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/subscript",
"caption": "{{$:/language/Buttons/Subscript/Caption}}",
"description": "{{$:/language/Buttons/Subscript/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((subscript))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\",,\"\n\tsuffix=\",,\"\n/>\n"
},
"$:/core/ui/EditorToolbar/superscript": {
"title": "$:/core/ui/EditorToolbar/superscript",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/superscript",
"caption": "{{$:/language/Buttons/Superscript/Caption}}",
"description": "{{$:/language/Buttons/Superscript/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((superscript))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"^^\"\n\tsuffix=\"^^\"\n/>\n"
},
"$:/core/ui/EditorToolbar/underline": {
"title": "$:/core/ui/EditorToolbar/underline",
"tags": "$:/tags/EditorToolbar",
"icon": "$:/core/images/underline",
"caption": "{{$:/language/Buttons/Underline/Caption}}",
"description": "{{$:/language/Buttons/Underline/Hint}}",
"condition": "[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]",
"shortcuts": "((underline))",
"text": "<$action-sendmessage\n\t$message=\"tm-edit-text-operation\"\n\t$param=\"wrap-selection\"\n\tprefix=\"__\"\n\tsuffix=\"__\"\n/>\n"
},
"$:/core/Filters/AllTags": {
"title": "$:/core/Filters/AllTags",
"tags": "$:/tags/Filter",
"filter": "[tags[]!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTags}}",
"text": ""
},
"$:/core/Filters/AllTiddlers": {
"title": "$:/core/Filters/AllTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]sort[title]]",
"description": "{{$:/language/Filters/AllTiddlers}}",
"text": ""
},
"$:/core/Filters/Drafts": {
"title": "$:/core/Filters/Drafts",
"tags": "$:/tags/Filter",
"filter": "[has[draft.of]sort[title]]",
"description": "{{$:/language/Filters/Drafts}}",
"text": ""
},
"$:/core/Filters/Missing": {
"title": "$:/core/Filters/Missing",
"tags": "$:/tags/Filter",
"filter": "[all[missing]sort[title]]",
"description": "{{$:/language/Filters/Missing}}",
"text": ""
},
"$:/core/Filters/Orphans": {
"title": "$:/core/Filters/Orphans",
"tags": "$:/tags/Filter",
"filter": "[all[orphans]sort[title]]",
"description": "{{$:/language/Filters/Orphans}}",
"text": ""
},
"$:/core/Filters/OverriddenShadowTiddlers": {
"title": "$:/core/Filters/OverriddenShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[shadow]]",
"description": "{{$:/language/Filters/OverriddenShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentSystemTiddlers": {
"title": "$:/core/Filters/RecentSystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentSystemTiddlers}}",
"text": ""
},
"$:/core/Filters/RecentTiddlers": {
"title": "$:/core/Filters/RecentTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]has[modified]!sort[modified]limit[50]]",
"description": "{{$:/language/Filters/RecentTiddlers}}",
"text": ""
},
"$:/core/Filters/ShadowTiddlers": {
"title": "$:/core/Filters/ShadowTiddlers",
"tags": "$:/tags/Filter",
"filter": "[all[shadows]sort[title]]",
"description": "{{$:/language/Filters/ShadowTiddlers}}",
"text": ""
},
"$:/core/Filters/StoryList": {
"title": "$:/core/Filters/StoryList",
"tags": "$:/tags/Filter",
"filter": "[list[$:/StoryList]] -$:/AdvancedSearch",
"description": "{{$:/language/Filters/StoryList}}",
"text": ""
},
"$:/core/Filters/SystemTags": {
"title": "$:/core/Filters/SystemTags",
"tags": "$:/tags/Filter",
"filter": "[all[shadows+tiddlers]tags[]is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTags}}",
"text": ""
},
"$:/core/Filters/SystemTiddlers": {
"title": "$:/core/Filters/SystemTiddlers",
"tags": "$:/tags/Filter",
"filter": "[is[system]sort[title]]",
"description": "{{$:/language/Filters/SystemTiddlers}}",
"text": ""
},
"$:/core/Filters/TypedTiddlers": {
"title": "$:/core/Filters/TypedTiddlers",
"tags": "$:/tags/Filter",
"filter": "[!is[system]has[type]each[type]sort[type]] -[type[text/vnd.tiddlywiki]]",
"description": "{{$:/language/Filters/TypedTiddlers}}",
"text": ""
},
"$:/core/ui/ImportListing": {
"title": "$:/core/ui/ImportListing",
"text": "\\define lingo-base() $:/language/Import/\n\n\\define messageField()\nmessage-$(payloadTiddler)$\n\\end\n\n\\define selectionField()\nselection-$(payloadTiddler)$\n\\end\n\n\\define previewPopupState()\n$(currentTiddler)$!!popup-$(payloadTiddler)$\n\\end\n\n\\define select-all-actions()\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" variable=\"payloadTiddler\">\n<$action-setfield $field={{{ [<payloadTiddler>addprefix[selection-]] }}} $value={{$:/state/import/select-all}}/>\n</$list>\n\\end\n\n<table>\n<tbody>\n<tr>\n<th>\n<$checkbox tiddler=\"$:/state/import/select-all\" field=\"text\" checked=\"checked\" unchecked=\"unchecked\" default=\"checked\" actions=<<select-all-actions>>>\n<<lingo Listing/Select/Caption>>\n</$checkbox>\n</th>\n<th>\n<<lingo Listing/Title/Caption>>\n</th>\n<th>\n<<lingo Listing/Status/Caption>>\n</th>\n</tr>\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" variable=\"payloadTiddler\">\n<tr>\n<td>\n<$checkbox field=<<selectionField>> checked=\"checked\" unchecked=\"unchecked\" default=\"checked\"/>\n</td>\n<td>\n<$reveal type=\"nomatch\" state=<<previewPopupState>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"yes\">\n{{$:/core/images/right-arrow}} <$text text=<<payloadTiddler>>/>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<previewPopupState>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<previewPopupState>> setTo=\"no\">\n{{$:/core/images/down-arrow}} <$text text=<<payloadTiddler>>/>\n</$button>\n</$reveal>\n</td>\n<td>\n<$view field=<<messageField>>/>\n</td>\n</tr>\n<tr>\n<td colspan=\"3\">\n<$reveal type=\"match\" text=\"yes\" state=<<previewPopupState>>>\n<$transclude subtiddler=<<payloadTiddler>> mode=\"block\"/>\n</$reveal>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n"
},
"$:/core/ui/ListItemTemplate": {
"title": "$:/core/ui/ListItemTemplate",
"text": "<div class=\"tc-menu-list-item\">\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</div>"
},
"$:/Manager/ItemMain/Fields": {
"title": "$:/Manager/ItemMain/Fields",
"tags": "$:/tags/Manager/ItemMain",
"caption": "{{$:/language/Manager/Item/Fields}}",
"text": "<table>\n<tbody>\n<$list filter=\"[all[current]fields[]sort[title]] -text\" template=\"$:/core/ui/TiddlerFieldTemplate\" variable=\"listItem\"/>\n</tbody>\n</table>\n"
},
"$:/Manager/ItemMain/RawText": {
"title": "$:/Manager/ItemMain/RawText",
"tags": "$:/tags/Manager/ItemMain",
"caption": "{{$:/language/Manager/Item/RawText}}",
"text": "<pre><code><$view/></code></pre>\n"
},
"$:/Manager/ItemMain/WikifiedText": {
"title": "$:/Manager/ItemMain/WikifiedText",
"tags": "$:/tags/Manager/ItemMain",
"caption": "{{$:/language/Manager/Item/WikifiedText}}",
"text": "<$transclude mode=\"block\"/>\n"
},
"$:/Manager/ItemSidebar/Colour": {
"title": "$:/Manager/ItemSidebar/Colour",
"tags": "$:/tags/Manager/ItemSidebar",
"caption": "{{$:/language/Manager/Item/Colour}}",
"text": "\\define swatch-styles()\nheight: 1em;\nbackground-color: $(colour)$\n\\end\n\n<$vars colour={{!!color}}>\n<p style=<<swatch-styles>>/>\n</$vars>\n<p>\n<$edit-text field=\"color\" tag=\"input\" type=\"color\"/> / <$edit-text field=\"color\" tag=\"input\" type=\"text\" size=\"9\"/>\n</p>\n"
},
"$:/Manager/ItemSidebar/Icon": {
"title": "$:/Manager/ItemSidebar/Icon",
"tags": "$:/tags/Manager/ItemSidebar",
"caption": "{{$:/language/Manager/Item/Icon}}",
"text": "<p>\n<div class=\"tc-manager-icon-editor\">\n<$button popup=<<qualify \"$:/state/popup/image-picker\">> class=\"tc-btn-invisible\">\n<$transclude tiddler={{!!icon}}>\n{{$:/language/Manager/Item/Icon/None}}\n</$transclude>\n</$button>\n<div class=\"tc-block-dropdown-wrapper\" style=\"position: static;\">\n<$reveal state=<<qualify \"$:/state/popup/image-picker\">> type=\"nomatch\" text=\"\" default=\"\" tag=\"div\" class=\"tc-popup\">\n<div class=\"tc-block-dropdown tc-popup-keep\" style=\"width: 80%; left: 10%; right: 10%; padding: 0.5em;\">\n<$macrocall $name=\"image-picker-include-tagged-images\" actions=\"\"\"\n<$action-setfield $field=\"icon\" $value=<<imageTitle>>/>\n<$action-deletetiddler $tiddler=<<qualify \"$:/state/popup/image-picker\">>/>\n\"\"\"/>\n</div>\n</$reveal>\n</div>\n</div>\n</p>\n"
},
"$:/Manager/ItemSidebar/Tags": {
"title": "$:/Manager/ItemSidebar/Tags",
"tags": "$:/tags/Manager/ItemSidebar",
"caption": "{{$:/language/Manager/Item/Tags}}",
"text": "\\define tag-checkbox-actions()\n<$action-listops\n\t$tiddler=\"$:/config/Manager/RecentTags\"\n\t$subfilter=\"[<tag>] [list[$:/config/Manager/RecentTags]] +[limit[12]]\"\n/>\n\\end\n\n\\define tag-picker-actions()\n<<tag-checkbox-actions>>\n<$action-listops\n\t$tiddler=<<currentTiddler>>\n\t$field=\"tags\"\n\t$subfilter=\"[<tag>] [all[current]tags[]]\"\n/>\n\\end\n\n<p>\n<$list filter=\"[is[current]tags[]] [list[$:/config/Manager/RecentTags]] +[sort[title]] \" variable=\"tag\">\n<div>\n<$checkbox tiddler=<<currentTiddler>> tag=<<tag>> actions=<<tag-checkbox-actions>>>\n<$macrocall $name=\"tag-pill\" tag=<<tag>>/>\n</$checkbox>\n</div>\n</$list>\n</p>\n<p>\n<$macrocall $name=\"tag-picker\" actions=<<tag-picker-actions>>/>\n</p>\n"
},
"$:/Manager/ItemSidebar/Tools": {
"title": "$:/Manager/ItemSidebar/Tools",
"tags": "$:/tags/Manager/ItemSidebar",
"caption": "{{$:/language/Manager/Item/Tools}}",
"text": "<p>\n<$button to=<<currentTiddler>>>{{$:/core/images/link}} open</$button>\n</p>\n<p>\n<$button message=\"tm-edit-tiddler\" param=<<currentTiddler>>>{{$:/core/images/edit-button}} edit</$button>\n</p>\n"
},
"$:/Manager": {
"title": "$:/Manager",
"icon": "$:/core/images/list",
"color": "#bbb",
"text": "\\define lingo-base() $:/language/Manager/\n\n\\define list-item-content-item()\n<div class=\"tc-manager-list-item-content-item\">\n\t<$vars state-title=\"\"\"$:/state/popup/manager/item/$(listItem)$\"\"\">\n\t\t<$reveal state=<<state-title>> type=\"match\" text=\"show\" default=\"show\" tag=\"div\">\n\t\t\t<$button set=<<state-title>> setTo=\"hide\" class=\"tc-btn-invisible tc-manager-list-item-content-item-heading\">\n\t\t\t\t{{$:/core/images/down-arrow}} <$transclude tiddler=<<listItem>> field=\"caption\"/>\n\t\t\t</$button>\n\t\t</$reveal>\n\t\t<$reveal state=<<state-title>> type=\"nomatch\" text=\"show\" default=\"show\" tag=\"div\">\n\t\t\t<$button set=<<state-title>> setTo=\"show\" class=\"tc-btn-invisible tc-manager-list-item-content-item-heading\">\n\t\t\t\t{{$:/core/images/right-arrow}} <$transclude tiddler=<<listItem>> field=\"caption\"/>\n\t\t\t</$button>\n\t\t</$reveal>\n\t\t<$reveal state=<<state-title>> type=\"match\" text=\"show\" default=\"show\" tag=\"div\" class=\"tc-manager-list-item-content-item-body\">\n\t\t\t<$transclude tiddler=<<listItem>>/>\n\t\t</$reveal>\n\t</$vars>\n</div>\n\\end\n\n<div class=\"tc-manager-wrapper\">\n\t<div class=\"tc-manager-controls\">\n\t\t<div class=\"tc-manager-control\">\n\t\t\t<<lingo Controls/Show/Prompt>> <$select tiddler=\"$:/config/Manager/Show\" default=\"tiddlers\">\n\t\t\t\t<option value=\"tiddlers\"><<lingo Controls/Show/Option/Tiddlers>></option>\n\t\t\t\t<option value=\"tags\"><<lingo Controls/Show/Option/Tags>></option>\n\t\t\t</$select>\n\t\t</div>\n\t\t<div class=\"tc-manager-control\">\n\t\t\t<<lingo Controls/Search/Prompt>> <$edit-text tiddler=\"$:/config/Manager/Filter\" tag=\"input\" default=\"\" placeholder={{$:/language/Manager/Controls/Search/Placeholder}}/>\n\t\t</div>\n\t\t<div class=\"tc-manager-control\">\n\t\t\t<<lingo Controls/FilterByTag/Prompt>> <$select tiddler=\"$:/config/Manager/Tag\" default=\"\">\n\t\t\t\t<option value=\"\"><<lingo Controls/FilterByTag/None>></option>\n\t\t\t\t<$list filter=\"[!is{$:/config/Manager/System}tags[]!is[system]sort[title]]\" variable=\"tag\">\n\t\t\t\t\t<option value=<<tag>>><$text text=<<tag>>/></option>\n\t\t\t\t</$list>\n\t\t\t</$select>\n\t\t</div>\n\t\t<div class=\"tc-manager-control\">\n\t\t\t<<lingo Controls/Sort/Prompt>> <$select tiddler=\"$:/config/Manager/Sort\" default=\"title\">\n\t\t\t\t<optgroup label=\"Common\">\n\t\t\t\t\t<$list filter=\"title modified modifier created creator created\" variable=\"field\">\n\t\t\t\t\t\t<option value=<<field>>><$text text=<<field>>/></option>\n\t\t\t\t\t</$list>\n\t\t\t\t</optgroup>\n\t\t\t\t<optgroup label=\"All\">\n\t\t\t\t\t<$list filter=\"[all{$:/config/Manager/Show}!is{$:/config/Manager/System}fields[]sort[title]] -title -modified -modifier -created -creator -created\" variable=\"field\">\n\t\t\t\t\t\t<option value=<<field>>><$text text=<<field>>/></option>\n\t\t\t\t\t</$list>\n\t\t\t\t</optgroup>\n\t\t\t</$select>\n\t\t\t<$checkbox tiddler=\"$:/config/Manager/Order\" field=\"text\" checked=\"reverse\" unchecked=\"forward\" default=\"forward\">\n\t\t\t\t<<lingo Controls/Order/Prompt>>\n\t\t\t</$checkbox>\n\t\t</div>\n\t\t<div class=\"tc-manager-control\">\n\t\t\t<$checkbox tiddler=\"$:/config/Manager/System\" field=\"text\" checked=\"\" unchecked=\"system\" default=\"system\">\n\t\t\t\t{{$:/language/SystemTiddlers/Include/Prompt}}\n\t\t\t</$checkbox>\n\t\t</div>\n\t</div>\n\t<div class=\"tc-manager-list\">\n\t\t<$list filter=\"[all{$:/config/Manager/Show}!is{$:/config/Manager/System}search{$:/config/Manager/Filter}tag:strict{$:/config/Manager/Tag}sort{$:/config/Manager/Sort}order{$:/config/Manager/Order}]\">\n\t\t\t<$vars transclusion=<<currentTiddler>>>\n\t\t\t\t<div style=\"tc-manager-list-item\">\n\t\t\t\t\t<$button popup=<<qualify \"$:/state/manager/popup\">> class=\"tc-btn-invisible tc-manager-list-item-heading\" selectedClass=\"tc-manager-list-item-heading-selected\">\n\t\t\t\t\t\t<$text text=<<currentTiddler>>/>\n\t\t\t\t\t</$button>\n\t\t\t\t\t<$reveal state=<<qualify \"$:/state/manager/popup\">> type=\"nomatch\" text=\"\" default=\"\" tag=\"div\" class=\"tc-manager-list-item-content tc-popup-handle\">\n\t\t\t\t\t\t<div class=\"tc-manager-list-item-content-tiddler\">\n\t\t\t\t\t\t\t<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Manager/ItemMain]!has[draft.of]]\" variable=\"listItem\">\n\t\t\t\t\t\t\t\t<<list-item-content-item>>\n\t\t\t\t\t\t\t</$list>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"tc-manager-list-item-content-sidebar\">\n\t\t\t\t\t\t\t<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Manager/ItemSidebar]!has[draft.of]]\" variable=\"listItem\">\n\t\t\t\t\t\t\t\t<<list-item-content-item>>\n\t\t\t\t\t\t\t</$list>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</$reveal>\n\t\t\t\t</div>\n\t\t\t</$vars>\n\t\t</$list>\n\t</div>\n</div>\n"
},
"$:/core/ui/MissingTemplate": {
"title": "$:/core/ui/MissingTemplate",
"text": "<div class=\"tc-tiddler-missing\">\n<$button popup=<<qualify \"$:/state/popup/missing\">> class=\"tc-btn-invisible tc-missing-tiddler-label\">\n<$view field=\"title\" format=\"text\" />\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/missing\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\n<hr>\n<$list filter=\"[all[current]backlinks[]sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n</div>\n"
},
"$:/core/ui/MoreSideBar/All": {
"title": "$:/core/ui/MoreSideBar/All",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/All/Caption}}",
"text": "<$list filter={{$:/core/Filters/AllTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Drafts": {
"title": "$:/core/ui/MoreSideBar/Drafts",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Drafts/Caption}}",
"text": "<$list filter={{$:/core/Filters/Drafts!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Explorer": {
"title": "$:/core/ui/MoreSideBar/Explorer",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Explorer/Caption}}",
"text": "<<tree \"$:/\">>\n"
},
"$:/core/ui/MoreSideBar/Missing": {
"title": "$:/core/ui/MoreSideBar/Missing",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Missing/Caption}}",
"text": "<$list filter={{$:/core/Filters/Missing!!filter}} template=\"$:/core/ui/MissingTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Orphans": {
"title": "$:/core/ui/MoreSideBar/Orphans",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Orphans/Caption}}",
"text": "<$list filter={{$:/core/Filters/Orphans!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Plugins": {
"title": "$:/core/ui/MoreSideBar/Plugins",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/ControlPanel/Plugins/Caption}}",
"text": "\n{{$:/language/ControlPanel/Plugins/Installed/Hint}}\n\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/MoreSideBar/Plugins]!has[draft.of]]\" \"$:/core/ui/MoreSideBar/Plugins/Plugins\">>\n"
},
"$:/core/ui/MoreSideBar/Recent": {
"title": "$:/core/ui/MoreSideBar/Recent",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\n"
},
"$:/core/ui/MoreSideBar/Shadows": {
"title": "$:/core/ui/MoreSideBar/Shadows",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Shadows/Caption}}",
"text": "<$list filter={{$:/core/Filters/ShadowTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/System": {
"title": "$:/core/ui/MoreSideBar/System",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/System/Caption}}",
"text": "<$list filter={{$:/core/Filters/SystemTiddlers!!filter}} template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/MoreSideBar/Tags": {
"title": "$:/core/ui/MoreSideBar/Tags",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Tags/Caption}}",
"text": "<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n{{$:/core/ui/Buttons/tag-manager}}\n\n</$set>\n\n</$set>\n\n</$set>\n\n<$list filter={{$:/core/Filters/AllTags!!filter}}>\n\n<$transclude tiddler=\"$:/core/ui/TagTemplate\"/>\n\n</$list>\n\n<hr class=\"tc-untagged-separator\">\n\n{{$:/core/ui/UntaggedTemplate}}\n"
},
"$:/core/ui/MoreSideBar/Types": {
"title": "$:/core/ui/MoreSideBar/Types",
"tags": "$:/tags/MoreSideBar",
"caption": "{{$:/language/SideBar/Types/Caption}}",
"text": "<$list filter={{$:/core/Filters/TypedTiddlers!!filter}}>\n<div class=\"tc-menu-list-item\">\n<$view field=\"type\"/>\n<$list filter=\"[type{!!type}!is[system]sort[title]]\">\n<div class=\"tc-menu-list-subitem\">\n<$link to={{!!title}}><$view field=\"title\"/></$link>\n</div>\n</$list>\n</div>\n</$list>\n"
},
"$:/core/ui/MoreSideBar/Plugins/Languages": {
"title": "$:/core/ui/MoreSideBar/Plugins/Languages",
"tags": "$:/tags/MoreSideBar/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Languages/Caption}}",
"text": "<$list filter=\"[!has[draft.of]plugin-type[language]sort[description]]\" template=\"$:/core/ui/PluginListItemTemplate\" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>\n"
},
"$:/core/ui/MoreSideBar/Plugins/Plugins": {
"title": "$:/core/ui/MoreSideBar/Plugins/Plugins",
"tags": "$:/tags/MoreSideBar/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Plugins/Caption}}",
"text": "<$list filter=\"[!has[draft.of]plugin-type[plugin]sort[description]]\" template=\"$:/core/ui/PluginListItemTemplate\" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}>>/>\n"
},
"$:/core/ui/MoreSideBar/Plugins/Theme": {
"title": "$:/core/ui/MoreSideBar/Plugins/Theme",
"tags": "$:/tags/MoreSideBar/Plugins",
"caption": "{{$:/language/ControlPanel/Plugins/Themes/Caption}}",
"text": "<$list filter=\"[!has[draft.of]plugin-type[theme]sort[description]]\" template=\"$:/core/ui/PluginListItemTemplate\" emptyMessage={{$:/language/ControlPanel/Plugins/Empty/Hint}}/>\n"
},
"$:/core/ui/Buttons/advanced-search": {
"title": "$:/core/ui/Buttons/advanced-search",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/advanced-search-button}} {{$:/language/Buttons/AdvancedSearch/Caption}}",
"description": "{{$:/language/Buttons/AdvancedSearch/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/advanced-search-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/AdvancedSearch/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/AdvancedSearch]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/close-all": {
"title": "$:/core/ui/Buttons/close-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/close-all-button}} {{$:/language/Buttons/CloseAll/Caption}}",
"description": "{{$:/language/Buttons/CloseAll/Hint}}",
"text": "<$button message=\"tm-close-all-tiddlers\" tooltip={{$:/language/Buttons/CloseAll/Hint}} aria-label={{$:/language/Buttons/CloseAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/CloseAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/control-panel": {
"title": "$:/core/ui/Buttons/control-panel",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/options-button}} {{$:/language/Buttons/ControlPanel/Caption}}",
"description": "{{$:/language/Buttons/ControlPanel/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/ControlPanel\" tooltip={{$:/language/Buttons/ControlPanel/Hint}} aria-label={{$:/language/Buttons/ControlPanel/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/options-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/ControlPanel]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/encryption": {
"title": "$:/core/ui/Buttons/encryption",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/locked-padlock}} {{$:/language/Buttons/Encryption/Caption}}",
"description": "{{$:/language/Buttons/Encryption/Hint}}",
"text": "<$reveal type=\"match\" state=\"$:/isEncrypted\" text=\"yes\">\n<$button message=\"tm-clear-password\" tooltip={{$:/language/Buttons/Encryption/ClearPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/ClearPassword/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/locked-padlock}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/isEncrypted\" text=\"yes\">\n<$button message=\"tm-set-password\" tooltip={{$:/language/Buttons/Encryption/SetPassword/Hint}} aria-label={{$:/language/Buttons/Encryption/SetPassword/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/unlocked-padlock}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>"
},
"$:/core/ui/Buttons/export-page": {
"title": "$:/core/ui/Buttons/export-page",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportPage/Caption}}",
"description": "{{$:/language/Buttons/ExportPage/Hint}}",
"text": "<$macrocall $name=\"exportButton\" exportFilter=\"[!is[system]sort[title]]\" lingoBase=\"$:/language/Buttons/ExportPage/\"/>"
},
"$:/core/ui/Buttons/fold-all": {
"title": "$:/core/ui/Buttons/fold-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/fold-all-button}} {{$:/language/Buttons/FoldAll/Caption}}",
"description": "{{$:/language/Buttons/FoldAll/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/FoldAll/Hint}} aria-label={{$:/language/Buttons/FoldAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-all-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FoldAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/full-screen": {
"title": "$:/core/ui/Buttons/full-screen",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/full-screen-button}} {{$:/language/Buttons/FullScreen/Caption}}",
"description": "{{$:/language/Buttons/FullScreen/Hint}}",
"text": "<$button message=\"tm-full-screen\" tooltip={{$:/language/Buttons/FullScreen/Hint}} aria-label={{$:/language/Buttons/FullScreen/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/full-screen-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/FullScreen/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/home": {
"title": "$:/core/ui/Buttons/home",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/home-button}} {{$:/language/Buttons/Home/Caption}}",
"description": "{{$:/language/Buttons/Home/Hint}}",
"text": "<$button message=\"tm-home\" tooltip={{$:/language/Buttons/Home/Hint}} aria-label={{$:/language/Buttons/Home/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/home-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Home/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/import": {
"title": "$:/core/ui/Buttons/import",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/import-button}} {{$:/language/Buttons/Import/Caption}}",
"description": "{{$:/language/Buttons/Import/Hint}}",
"text": "<div class=\"tc-file-input-wrapper\">\n<$button tooltip={{$:/language/Buttons/Import/Hint}} aria-label={{$:/language/Buttons/Import/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/import-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Import/Caption}}/></span>\n</$list>\n</$button>\n<$browse tooltip={{$:/language/Buttons/Import/Hint}}/>\n</div>"
},
"$:/core/ui/Buttons/language": {
"title": "$:/core/ui/Buttons/language",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/globe}} {{$:/language/Buttons/Language/Caption}}",
"description": "{{$:/language/Buttons/Language/Hint}}",
"text": "\\define flag-title()\n$(languagePluginTitle)$/icon\n\\end\n<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/language\">> tooltip={{$:/language/Buttons/Language/Hint}} aria-label={{$:/language/Buttons/Language/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n<span class=\"tc-image-button\">\n<$set name=\"languagePluginTitle\" value={{$:/language}}>\n<$image source=<<flag-title>>/>\n</$set>\n</span>\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Language/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/language\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down tc-drop-down-language-chooser\">\n<$linkcatcher to=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\n<$link>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/language\" text=<<currentTiddler>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/language\" text=<<currentTiddler>>>\n \n</$reveal>\n</span>\n<span class=\"tc-image-button\">\n<$set name=\"languagePluginTitle\" value=<<currentTiddler>>>\n<$transclude subtiddler=<<flag-title>>>\n<$list filter=\"[all[current]field:title[$:/languages/en-GB]]\">\n<$transclude tiddler=\"$:/languages/en-GB/icon\"/>\n</$list>\n</$transclude>\n</$set>\n</span>\n<$view field=\"description\">\n<$view field=\"name\">\n<$view field=\"title\"/>\n</$view>\n</$view>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/manager": {
"title": "$:/core/ui/Buttons/manager",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/list}} {{$:/language/Buttons/Manager/Caption}}",
"description": "{{$:/language/Buttons/Manager/Hint}}",
"text": "\\define manager-button(class)\n<$button to=\"$:/Manager\" tooltip={{$:/language/Buttons/Manager/Hint}} aria-label={{$:/language/Buttons/Manager/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/list}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Manager/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/Manager]]\" emptyMessage=<<manager-button>>>\n<<manager-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/more-page-actions": {
"title": "$:/core/ui/Buttons/more-page-actions",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/down-arrow}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/More/Caption}}/></span>\n</$list>\n</$button><$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]] -[[$:/core/ui/Buttons/more-page-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$set>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>"
},
"$:/core/ui/Buttons/new-image": {
"title": "$:/core/ui/Buttons/new-image",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-image-button}} {{$:/language/Buttons/NewImage/Caption}}",
"description": "{{$:/language/Buttons/NewImage/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/NewImage/Hint}} aria-label={{$:/language/Buttons/NewImage/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" type=\"image/jpeg\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-image-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewImage/Caption}}/></span>\n</$list>\n</$button>\n"
},
"$:/core/ui/Buttons/new-journal": {
"title": "$:/core/ui/Buttons/new-journal",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournal/Caption}}",
"description": "{{$:/language/Buttons/NewJournal/Hint}}",
"text": "\\define journalButton()\n<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=\"$(journalTags)$\" text=\"$(journalText)$\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-journal-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>\n</$list>\n</$button>\n\\end\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\n<$set name=\"journalText\" value={{$:/config/NewJournal/Text}}>\n<<journalButton>>\n</$set></$set></$set>"
},
"$:/core/ui/Buttons/new-tiddler": {
"title": "$:/core/ui/Buttons/new-tiddler",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/new-button}} {{$:/language/Buttons/NewTiddler/Caption}}",
"description": "{{$:/language/Buttons/NewTiddler/Hint}}",
"text": "<$button message=\"tm-new-tiddler\" tooltip={{$:/language/Buttons/NewTiddler/Hint}} aria-label={{$:/language/Buttons/NewTiddler/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/palette": {
"title": "$:/core/ui/Buttons/palette",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/palette}} {{$:/language/Buttons/Palette/Caption}}",
"description": "{{$:/language/Buttons/Palette/Hint}}",
"text": "<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/palette\">> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/palette}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Palette/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/palette\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\" style=\"font-size:0.7em;\">\n{{$:/snippets/paletteswitcher}}\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/print": {
"title": "$:/core/ui/Buttons/print",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/print-button}} {{$:/language/Buttons/Print/Caption}}",
"description": "{{$:/language/Buttons/Print/Hint}}",
"text": "<$button message=\"tm-print\" tooltip={{$:/language/Buttons/Print/Hint}} aria-label={{$:/language/Buttons/Print/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/print-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Print/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/refresh": {
"title": "$:/core/ui/Buttons/refresh",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/refresh-button}} {{$:/language/Buttons/Refresh/Caption}}",
"description": "{{$:/language/Buttons/Refresh/Hint}}",
"text": "<$button message=\"tm-browser-refresh\" tooltip={{$:/language/Buttons/Refresh/Hint}} aria-label={{$:/language/Buttons/Refresh/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/refresh-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Refresh/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/save-wiki": {
"title": "$:/core/ui/Buttons/save-wiki",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/save-button}} {{$:/language/Buttons/SaveWiki/Caption}}",
"description": "{{$:/language/Buttons/SaveWiki/Hint}}",
"text": "<$button message=\"tm-save-wiki\" param={{$:/config/SaveWikiButton/Template}} tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>\n<span class=\"tc-dirty-indicator\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/save-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>\n</$list>\n</span>\n</$button>"
},
"$:/core/ui/Buttons/storyview": {
"title": "$:/core/ui/Buttons/storyview",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/storyview-classic}} {{$:/language/Buttons/StoryView/Caption}}",
"description": "{{$:/language/Buttons/StoryView/Hint}}",
"text": "\\define icon()\n$:/core/images/storyview-$(storyview)$\n\\end\n<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/storyview\">> tooltip={{$:/language/Buttons/StoryView/Hint}} aria-label={{$:/language/Buttons/StoryView/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n<$set name=\"storyview\" value={{$:/view}}>\n<$transclude tiddler=<<icon>>/>\n</$set>\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/storyview\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$:/view\">\n<$list filter=\"[storyviews[]]\" variable=\"storyview\">\n<$link to=<<storyview>>>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/view\" text=<<storyview>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/view\" text=<<storyview>>>\n \n</$reveal>\n</span>\n<$transclude tiddler=<<icon>>/>\n<$text text=<<storyview>>/></$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/tag-manager": {
"title": "$:/core/ui/Buttons/tag-manager",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/tag-button}} {{$:/language/Buttons/TagManager/Caption}}",
"description": "{{$:/language/Buttons/TagManager/Hint}}",
"text": "\\define control-panel-button(class)\n<$button to=\"$:/TagManager\" tooltip={{$:/language/Buttons/TagManager/Hint}} aria-label={{$:/language/Buttons/TagManager/Caption}} class=\"\"\"$(tv-config-toolbar-class)$ $class$\"\"\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/tag-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/TagManager/Caption}}/></span>\n</$list>\n</$button>\n\\end\n\n<$list filter=\"[list[$:/StoryList]] +[field:title[$:/TagManager]]\" emptyMessage=<<control-panel-button>>>\n<<control-panel-button \"tc-selected\">>\n</$list>\n"
},
"$:/core/ui/Buttons/theme": {
"title": "$:/core/ui/Buttons/theme",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}}",
"description": "{{$:/language/Buttons/Theme/Hint}}",
"text": "<span class=\"tc-popup-keep\">\n<$button popup=<<qualify \"$:/state/popup/theme\">> tooltip={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/theme-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<qualify \"$:/state/popup/theme\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\" variable=\"themeTitle\">\n<$link to=<<themeTitle>>>\n<span class=\"tc-drop-down-bullet\">\n<$reveal type=\"match\" state=\"$:/theme\" text=<<themeTitle>>>\n•\n</$reveal>\n<$reveal type=\"nomatch\" state=\"$:/theme\" text=<<themeTitle>>>\n \n</$reveal>\n</span>\n<$view tiddler=<<themeTitle>> field=\"name\"/>\n</$link>\n</$list>\n</$linkcatcher>\n</div>\n</$reveal>"
},
"$:/core/ui/Buttons/timestamp": {
"title": "$:/core/ui/Buttons/timestamp",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/timestamp-on}} {{$:/language/Buttons/Timestamp/Caption}}",
"description": "{{$:/language/Buttons/Timestamp/Hint}}",
"text": "<$reveal type=\"nomatch\" state=\"$:/config/TimestampDisable\" text=\"yes\">\n<$button tooltip={{$:/language/Buttons/Timestamp/On/Hint}} aria-label={{$:/language/Buttons/Timestamp/On/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-setfield $tiddler=\"$:/config/TimestampDisable\" $value=\"yes\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/timestamp-on}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Timestamp/On/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=\"$:/config/TimestampDisable\" text=\"yes\">\n<$button tooltip={{$:/language/Buttons/Timestamp/Off/Hint}} aria-label={{$:/language/Buttons/Timestamp/Off/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-setfield $tiddler=\"$:/config/TimestampDisable\" $value=\"no\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/timestamp-off}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/Timestamp/Off/Caption}}/></span>\n</$list>\n</$button>\n</$reveal>"
},
"$:/core/ui/Buttons/unfold-all": {
"title": "$:/core/ui/Buttons/unfold-all",
"tags": "$:/tags/PageControls",
"caption": "{{$:/core/images/unfold-all-button}} {{$:/language/Buttons/UnfoldAll/Caption}}",
"description": "{{$:/language/Buttons/UnfoldAll/Hint}}",
"text": "<$button tooltip={{$:/language/Buttons/UnfoldAll/Hint}} aria-label={{$:/language/Buttons/UnfoldAll/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-unfold-all-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/unfold-all-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$:/language/Buttons/UnfoldAll/Caption}}/></span>\n</$list>\n</$button>"
},
"$:/core/ui/PageTemplate/pagecontrols": {
"title": "$:/core/ui/PageTemplate/pagecontrols",
"text": "\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-page-controls\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n<$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\">\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n</$set>\n</$reveal>\n</$list>\n</div>\n\n"
},
"$:/core/ui/PageStylesheet": {
"title": "$:/core/ui/PageStylesheet",
"text": "<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Stylesheet]!has[draft.of]]\">\n<$transclude mode=\"block\"/>\n</$list>\n\n</$set>\n\n</$set>\n\n</$importvariables>\n"
},
"$:/core/ui/PageTemplate/alerts": {
"title": "$:/core/ui/PageTemplate/alerts",
"tags": "$:/tags/PageTemplate",
"text": "<div class=\"tc-alerts\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Alert]!has[draft.of]]\" template=\"$:/core/ui/AlertTemplate\" storyview=\"pop\"/>\n\n</div>\n"
},
"$:/core/ui/PageTemplate/pluginreloadwarning": {
"title": "$:/core/ui/PageTemplate/pluginreloadwarning",
"tags": "$:/tags/PageTemplate",
"text": "\\define lingo-base() $:/language/\n\n<$list filter=\"[has[plugin-type]haschanged[]!plugin-type[import]limit[1]]\">\n\n<$reveal type=\"nomatch\" state=\"$:/temp/HidePluginWarning\" text=\"yes\">\n\n<div class=\"tc-plugin-reload-warning\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<<lingo PluginReloadWarning>> <$button set=\"$:/temp/HidePluginWarning\" setTo=\"yes\" class=\"tc-btn-invisible\">{{$:/core/images/close-button}}</$button>\n\n</$set>\n\n</div>\n\n</$reveal>\n\n</$list>\n"
},
"$:/core/ui/PageTemplate/sidebar": {
"title": "$:/core/ui/PageTemplate/sidebar",
"tags": "$:/tags/PageTemplate",
"text": "<$scrollable fallthrough=\"no\" class=\"tc-sidebar-scrollable\">\n\n<div class=\"tc-sidebar-header\">\n\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\" retain=\"yes\" animate=\"yes\">\n\n<h1 class=\"tc-site-title\">\n\n<$transclude tiddler=\"$:/SiteTitle\" mode=\"inline\"/>\n\n</h1>\n\n<div class=\"tc-site-subtitle\">\n\n<$transclude tiddler=\"$:/SiteSubtitle\" mode=\"inline\"/>\n\n</div>\n\n{{||$:/core/ui/PageTemplate/pagecontrols}}\n\n<$transclude tiddler=\"$:/core/ui/SideBarLists\" mode=\"inline\"/>\n\n</$reveal>\n\n</div>\n\n</$scrollable>"
},
"$:/core/ui/PageTemplate/story": {
"title": "$:/core/ui/PageTemplate/story",
"tags": "$:/tags/PageTemplate",
"text": "<section class=\"tc-story-river\">\n\n<section class=\"story-backdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" template=\"$:/core/ui/ViewTemplate\" editTemplate=\"$:/core/ui/EditTemplate\" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>\n\n<section class=\"story-frontdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n</section>\n"
},
"$:/core/ui/PageTemplate/topleftbar": {
"title": "$:/core/ui/PageTemplate/topleftbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-left\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopLeftBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\n"
},
"$:/core/ui/PageTemplate/toprightbar": {
"title": "$:/core/ui/PageTemplate/toprightbar",
"tags": "$:/tags/PageTemplate",
"text": "<span class=\"tc-topbar tc-topbar-right\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TopRightBar]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$list>\n\n</span>\n"
},
"$:/core/ui/PageTemplate": {
"title": "$:/core/ui/PageTemplate",
"text": "\\define containerClasses()\ntc-page-container tc-page-view-$(themeTitle)$ tc-language-$(languageTitle)$\n\\end\n\n<$importvariables filter=\"[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]\">\n\n<$set name=\"tv-config-toolbar-icons\" value={{$:/config/Toolbar/Icons}}>\n\n<$set name=\"tv-config-toolbar-text\" value={{$:/config/Toolbar/Text}}>\n\n<$set name=\"tv-config-toolbar-class\" value={{$:/config/Toolbar/ButtonClass}}>\n\n<$set name=\"themeTitle\" value={{$:/view}}>\n\n<$set name=\"currentTiddler\" value={{$:/language}}>\n\n<$set name=\"languageTitle\" value={{!!name}}>\n\n<$set name=\"currentTiddler\" value=\"\">\n\n<div class=<<containerClasses>>>\n\n<$navigator story=\"$:/StoryList\" history=\"$:/HistoryList\" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>\n\n<$dropzone>\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]\" variable=\"listItem\">\n\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\n\n</$dropzone>\n\n</$navigator>\n\n</div>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</$importvariables>\n"
},
"$:/core/ui/PluginInfo": {
"title": "$:/core/ui/PluginInfo",
"text": "\\define localised-info-tiddler-title()\n$(currentTiddler)$/$(languageTitle)$/$(currentTab)$\n\\end\n\\define info-tiddler-title()\n$(currentTiddler)$/$(currentTab)$\n\\end\n\\define default-tiddler-title()\n$:/core/ui/PluginInfo/Default/$(currentTab)$\n\\end\n<$transclude tiddler=<<localised-info-tiddler-title>> mode=\"block\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode=\"block\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode=\"block\">\n<$transclude tiddler=<<default-tiddler-title>> mode=\"block\">\n{{$:/language/ControlPanel/Plugin/NoInfoFound/Hint}}\n</$transclude>\n</$transclude>\n</$transclude>\n</$transclude>\n"
},
"$:/core/ui/PluginInfo/Default/contents": {
"title": "$:/core/ui/PluginInfo/Default/contents",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/\n<<lingo Hint>>\n<ul>\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" emptyMessage=<<lingo Empty/Hint>>>\n<li>\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</li>\n</$list>\n</ul>\n"
},
"$:/core/ui/PluginListItemTemplate": {
"title": "$:/core/ui/PluginListItemTemplate",
"text": "<div class=\"tc-menu-list-item\">\n<$link to={{!!title}}>\n<$view field=\"description\">\n<$view field=\"title\"/>\n</$view>\n</$link>\n</div>"
},
"$:/core/ui/SearchResults": {
"title": "$:/core/ui/SearchResults",
"text": "<div class=\"tc-search-results\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]butfirst[]limit[1]]\" emptyMessage=\"\"\"\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\">\n<$transclude mode=\"block\"/>\n</$list>\n\"\"\">\n\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SearchResults]!has[draft.of]]\" default={{$:/config/SearchResults/Default}}/>\n\n</$list>\n\n</div>\n"
},
"$:/core/ui/SideBar/More": {
"title": "$:/core/ui/SideBar/More",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/More/Caption}}",
"text": "<div class=\"tc-more-sidebar\">\n<<tabs \"[all[shadows+tiddlers]tag[$:/tags/MoreSideBar]!has[draft.of]]\" \"$:/core/ui/MoreSideBar/Tags\" \"$:/state/tab/moresidebar\" \"tc-vertical\">>\n</div>\n"
},
"$:/core/ui/SideBar/Open": {
"title": "$:/core/ui/SideBar/Open",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Open/Caption}}",
"text": "\\define lingo-base() $:/language/CloseAll/\n\n\\define drop-actions()\n<$action-listops $tiddler=\"$:/StoryList\" $subfilter=\"+[insertbefore:currentTiddler<actionTiddler>]\"/>\n\\end\n\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" storyview=\"pop\">\n<div style=\"position: relative;\">\n<$droppable actions=<<drop-actions>>>\n<div class=\"tc-droppable-placeholder\">\n \n</div>\n<div>\n<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=\"tc-btn-invisible tc-btn-mini\">×</$button> <$link to={{!!title}}><$view field=\"title\"/></$link>\n</div>\n</$droppable>\n</div>\n</$list>\n<$tiddler tiddler=\"\">\n<$droppable actions=<<drop-actions>>>\n<div class=\"tc-droppable-placeholder\">\n \n</div>\n<$button message=\"tm-close-all-tiddlers\" class=\"tc-btn-invisible tc-btn-mini\"><<lingo Button>></$button>\n</$droppable>\n</$tiddler>\n"
},
"$:/core/ui/SideBar/Recent": {
"title": "$:/core/ui/SideBar/Recent",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Recent/Caption}}",
"text": "<$macrocall $name=\"timeline\" format={{$:/language/RecentChanges/DateFormat}}/>\n"
},
"$:/core/ui/SideBar/Tools": {
"title": "$:/core/ui/SideBar/Tools",
"tags": "$:/tags/SideBar",
"caption": "{{$:/language/SideBar/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/ControlPanel/\n\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n\n<<lingo Basics/Version/Prompt>> <<version>>\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]]\" variable=\"listItem\">\n\n<div style=\"position:relative;\" class={{{ [<listItem>encodeuricomponent[]addprefix[tc-btn-]] }}}>\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</div>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/SideBarLists": {
"title": "$:/core/ui/SideBarLists",
"text": "<div class=\"tc-sidebar-lists\">\n\n<$set name=\"searchTiddler\" value=\"$:/temp/search\">\n<div class=\"tc-search\">\n<$edit-text tiddler=\"$:/temp/search\" type=\"search\" tag=\"input\" focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify \"$:/state/popup/search-dropdown\">> class=\"tc-popup-handle\"/>\n<$reveal state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\n<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/advancedsearch\" text={{$:/temp/search}}/>\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\"/>\n<$action-navigate $to=\"$:/AdvancedSearch\"/>\n{{$:/core/images/advanced-search-button}}\n</$button>\n<$button class=\"tc-btn-invisible\">\n<$action-setfield $tiddler=\"$:/temp/search\" text=\"\" />\n{{$:/core/images/close-button}}\n</$button>\n<$button popup=<<qualify \"$:/state/popup/search-dropdown\">> class=\"tc-btn-invisible\">\n{{$:/core/images/down-arrow}}\n<$list filter=\"[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]\" variable=\"listItem\">\n<$set name=\"resultCount\" value=\"\"\"<$count filter=\"[!is[system]search{$(searchTiddler)$}]\"/>\"\"\">\n{{$:/language/Search/Matches}}\n</$set>\n</$list>\n</$button>\n</$reveal>\n<$reveal state=\"$:/temp/search\" type=\"match\" text=\"\">\n<$button to=\"$:/AdvancedSearch\" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class=\"tc-btn-invisible\">\n{{$:/core/images/advanced-search-button}}\n</$button>\n</$reveal>\n</div>\n\n<$reveal tag=\"div\" class=\"tc-block-dropdown-wrapper\" state=\"$:/temp/search\" type=\"nomatch\" text=\"\">\n\n<$reveal tag=\"div\" class=\"tc-block-dropdown tc-search-drop-down tc-popup-handle\" state=<<qualify \"$:/state/popup/search-dropdown\">> type=\"nomatch\" text=\"\" default=\"\">\n\n<$list filter=\"[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]\" emptyMessage=\"\"\"<div class=\"tc-search-results\">{{$:/language/Search/Search/TooShort}}</div>\"\"\" variable=\"listItem\">\n\n{{$:/core/ui/SearchResults}}\n\n</$list>\n\n</$reveal>\n\n</$reveal>\n\n</$set>\n\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]\" default={{$:/config/DefaultSidebarTab}} state=\"$:/state/tab/sidebar\" />\n\n</div>\n"
},
"$:/TagManager": {
"title": "$:/TagManager",
"icon": "$:/core/images/tag-button",
"color": "#bbb",
"caption": "{{$:/language/TagManager/Caption}}",
"text": "\\define lingo-base() $:/language/TagManager/\n\\define iconEditorTab(type)\n<$list filter=\"[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[sort[title]] +[$type$is[system]]\">\n<$link to={{!!title}}>\n<$transclude/> <$view field=\"title\"/>\n</$link>\n</$list>\n\\end\n\\define iconEditor(title)\n<div class=\"tc-drop-down-wrapper\">\n<$button popup=<<qualify \"$:/state/popup/icon/$title$\">> class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/icon/$title$\">> type=\"popup\" position=\"belowleft\" text=\"\" default=\"\">\n<div class=\"tc-drop-down\">\n<$linkcatcher to=\"$title$!!icon\">\n<<iconEditorTab type:\"!\">>\n<hr/>\n<<iconEditorTab type:\"\">>\n</$linkcatcher>\n</div>\n</$reveal>\n</div>\n\\end\n\\define qualifyTitle(title)\n$title$$(currentTiddler)$\n\\end\n\\define toggleButton(state)\n<$reveal state=\"$state$\" type=\"match\" text=\"closed\" default=\"closed\">\n<$button set=\"$state$\" setTo=\"open\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\n{{$:/core/images/info-button}}\n</$button>\n</$reveal>\n<$reveal state=\"$state$\" type=\"match\" text=\"open\" default=\"closed\">\n<$button set=\"$state$\" setTo=\"closed\" class=\"tc-btn-invisible tc-btn-dropdown\" selectedClass=\"tc-selected\">\n{{$:/core/images/info-button}}\n</$button>\n</$reveal>\n\\end\n<table class=\"tc-tag-manager-table\">\n<tbody>\n<tr>\n<th><<lingo Colour/Heading>></th>\n<th class=\"tc-tag-manager-tag\"><<lingo Tag/Heading>></th>\n<th><<lingo Count/Heading>></th>\n<th><<lingo Icon/Heading>></th>\n<th><<lingo Info/Heading>></th>\n</tr>\n<$list filter=\"[tags[]!is[system]sort[title]]\">\n<tr>\n<td><$edit-text field=\"color\" tag=\"input\" type=\"color\"/></td>\n<td><$macrocall $name=\"tag\" tag=<<currentTiddler>>/></td>\n<td><$count filter=\"[all[current]tagging[]]\"/></td>\n<td>\n<$macrocall $name=\"iconEditor\" title={{!!title}}/>\n</td>\n<td>\n<$macrocall $name=\"toggleButton\" state=<<qualifyTitle \"$:/state/tag-manager/\">> /> \n</td>\n</tr>\n<tr>\n<td></td>\n<td colspan=\"4\">\n<$reveal state=<<qualifyTitle \"$:/state/tag-manager/\">> type=\"match\" text=\"open\" default=\"\">\n<table>\n<tbody>\n<tr><td><<lingo Colour/Heading>></td><td><$edit-text field=\"color\" tag=\"input\" type=\"text\" size=\"9\"/></td></tr>\n<tr><td><<lingo Icon/Heading>></td><td><$edit-text field=\"icon\" tag=\"input\" size=\"45\"/></td></tr>\n</tbody>\n</table>\n</$reveal>\n</td>\n</tr>\n</$list>\n<tr>\n<td></td>\n<td>\n{{$:/core/ui/UntaggedTemplate}}\n</td>\n<td>\n<small class=\"tc-menu-list-count\"><$count filter=\"[untagged[]!is[system]] -[tags[]]\"/></small>\n</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n"
},
"$:/core/ui/TagTemplate": {
"title": "$:/core/ui/TagTemplate",
"text": "<span class=\"tc-tag-list-item\">\n<$set name=\"transclusion\" value=<<currentTiddler>>>\n<$macrocall $name=\"tag-pill-body\" tag=<<currentTiddler>> icon={{!!icon}} colour={{!!color}} palette={{$:/palette}} element-tag=\"\"\"$button\"\"\" element-attributes=\"\"\"popup=<<qualify \"$:/state/popup/tag\">> dragFilter='[all[current]tagging[]]' tag='span'\"\"\"/>\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\" animate=\"yes\" class=\"tc-drop-down\">\n<$transclude tiddler=\"$:/core/ui/ListItemTemplate\"/>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TagDropdown]!has[draft.of]]\" variable=\"listItem\"> \n<$transclude tiddler=<<listItem>>/> \n</$list>\n<hr>\n<$macrocall $name=\"list-tagged-draggable\" tag=<<currentTiddler>>/>\n</$reveal>\n</$set>\n</span>\n"
},
"$:/core/ui/TiddlerFieldTemplate": {
"title": "$:/core/ui/TiddlerFieldTemplate",
"text": "<tr class=\"tc-view-field\">\n<td class=\"tc-view-field-name\">\n<$text text=<<listItem>>/>\n</td>\n<td class=\"tc-view-field-value\">\n<$view field=<<listItem>>/>\n</td>\n</tr>"
},
"$:/core/ui/TiddlerFields": {
"title": "$:/core/ui/TiddlerFields",
"text": "<table class=\"tc-view-field-table\">\n<tbody>\n<$list filter=\"[all[current]fields[]sort[title]] -text\" template=\"$:/core/ui/TiddlerFieldTemplate\" variable=\"listItem\"/>\n</tbody>\n</table>\n"
},
"$:/core/ui/TiddlerInfo/Advanced/PluginInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/PluginInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/PluginInfo/\n<$list filter=\"[all[current]has[plugin-type]]\">\n\n! <<lingo Heading>>\n\n<<lingo Hint>>\n<ul>\n<$list filter=\"[all[current]plugintiddlers[]sort[title]]\" emptyMessage=<<lingo Empty/Hint>>>\n<li>\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</li>\n</$list>\n</ul>\n\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Advanced/ShadowInfo": {
"title": "$:/core/ui/TiddlerInfo/Advanced/ShadowInfo",
"tags": "$:/tags/TiddlerInfo/Advanced",
"text": "\\define lingo-base() $:/language/TiddlerInfo/Advanced/ShadowInfo/\n<$set name=\"infoTiddler\" value=<<currentTiddler>>>\n\n''<<lingo Heading>>''\n\n<$list filter=\"[all[current]!is[shadow]]\">\n\n<<lingo NotShadow/Hint>>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]]\">\n\n<<lingo Shadow/Hint>>\n\n<$list filter=\"[all[current]shadowsource[]]\">\n\n<$set name=\"pluginTiddler\" value=<<currentTiddler>>>\n<<lingo Shadow/Source>>\n</$set>\n\n</$list>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\">\n\n<<lingo OverriddenShadow/Hint>>\n\n</$list>\n\n\n</$list>\n</$set>\n"
},
"$:/core/ui/TiddlerInfo/Advanced": {
"title": "$:/core/ui/TiddlerInfo/Advanced",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Advanced/Caption}}",
"text": "<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo/Advanced]!has[draft.of]]\" variable=\"listItem\">\n<$transclude tiddler=<<listItem>>/>\n\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Fields": {
"title": "$:/core/ui/TiddlerInfo/Fields",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Fields/Caption}}",
"text": "<$transclude tiddler=\"$:/core/ui/TiddlerFields\"/>\n"
},
"$:/core/ui/TiddlerInfo/List": {
"title": "$:/core/ui/TiddlerInfo/List",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/List/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[list{!!title}]\" emptyMessage=<<lingo List/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/Listed": {
"title": "$:/core/ui/TiddlerInfo/Listed",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Listed/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]listed[]!is[system]]\" emptyMessage=<<lingo Listed/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/References": {
"title": "$:/core/ui/TiddlerInfo/References",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/References/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]backlinks[]sort[title]]\" emptyMessage=<<lingo References/Empty>> template=\"$:/core/ui/ListItemTemplate\">\n</$list>\n"
},
"$:/core/ui/TiddlerInfo/Tagging": {
"title": "$:/core/ui/TiddlerInfo/Tagging",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tagging/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n<$list filter=\"[all[current]tagging[]]\" emptyMessage=<<lingo Tagging/Empty>> template=\"$:/core/ui/ListItemTemplate\"/>\n"
},
"$:/core/ui/TiddlerInfo/Tools": {
"title": "$:/core/ui/TiddlerInfo/Tools",
"tags": "$:/tags/TiddlerInfo",
"caption": "{{$:/language/TiddlerInfo/Tools/Caption}}",
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\">\n\n<$checkbox tiddler=<<config-title>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"show\"/> <$transclude tiddler=<<listItem>>/> <i class=\"tc-muted\"><$transclude tiddler=<<listItem>> field=\"description\"/></i>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n"
},
"$:/core/ui/TiddlerInfo": {
"title": "$:/core/ui/TiddlerInfo",
"text": "<div style=\"position:relative;\">\n<div class=\"tc-tiddler-controls\" style=\"position:absolute;right:0;\">\n<$reveal state=\"$:/config/TiddlerInfo/Mode\" type=\"match\" text=\"sticky\">\n<$button set=<<tiddlerInfoState>> setTo=\"\" tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=\"tc-btn-invisible\">\n{{$:/core/images/close-button}}\n</$button>\n</$reveal>\n</div>\n</div>\n\n<$macrocall $name=\"tabs\" tabsList=\"[all[shadows+tiddlers]tag[$:/tags/TiddlerInfo]!has[draft.of]]\" default={{$:/config/TiddlerInfo/Default}}/>"
},
"$:/core/ui/TopBar/menu": {
"title": "$:/core/ui/TopBar/menu",
"tags": "$:/tags/TopRightBar",
"text": "<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"no\" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-right}}</$button>\n</$reveal>\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"yes\" tooltip={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-left}}</$button>\n</$reveal>\n"
},
"$:/core/ui/UntaggedTemplate": {
"title": "$:/core/ui/UntaggedTemplate",
"text": "\\define lingo-base() $:/language/SideBar/\n<$button popup=<<qualify \"$:/state/popup/tag\">> class=\"tc-btn-invisible tc-untagged-label tc-tag-label\">\n<<lingo Tags/Untagged/Caption>>\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/tag\">> type=\"popup\" position=\"below\">\n<div class=\"tc-drop-down\">\n<$list filter=\"[untagged[]!is[system]] -[tags[]] +[sort[title]]\" template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate/body": {
"title": "$:/core/ui/ViewTemplate/body",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal tag=\"div\" class=\"tc-tiddler-body\" type=\"nomatch\" state=<<folded-state>> text=\"hide\" retain=\"yes\" animate=\"yes\">\n\n<$list filter=\"[all[current]!has[plugin-type]!field:hide-body[yes]]\">\n\n<$transclude>\n\n<$transclude tiddler=\"$:/language/MissingTiddler/Hint\"/>\n\n</$transclude>\n\n</$list>\n\n</$reveal>"
},
"$:/core/ui/ViewTemplate/classic": {
"title": "$:/core/ui/ViewTemplate/classic",
"tags": "$:/tags/ViewTemplate $:/tags/EditTemplate",
"text": "\\define lingo-base() $:/language/ClassicWarning/\n<$list filter=\"[all[current]type[text/x-tiddlywiki]]\">\n<div class=\"tc-message-box\">\n\n<<lingo Hint>>\n\n<$button set=\"!!type\" setTo=\"text/vnd.tiddlywiki\"><<lingo Upgrade/Caption>></$button>\n\n</div>\n</$list>\n"
},
"$:/core/ui/ViewTemplate/import": {
"title": "$:/core/ui/ViewTemplate/import",
"tags": "$:/tags/ViewTemplate",
"text": "\\define lingo-base() $:/language/Import/\n\n<$list filter=\"[all[current]field:plugin-type[import]]\">\n\n<div class=\"tc-import\">\n\n<<lingo Listing/Hint>>\n\n<$button message=\"tm-delete-tiddler\" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button>\n<$button message=\"tm-perform-import\" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>\n\n{{||$:/core/ui/ImportListing}}\n\n<$button message=\"tm-delete-tiddler\" param=<<currentTiddler>>><<lingo Listing/Cancel/Caption>></$button>\n<$button message=\"tm-perform-import\" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>\n\n</div>\n\n</$list>\n"
},
"$:/core/ui/ViewTemplate/plugin": {
"title": "$:/core/ui/ViewTemplate/plugin",
"tags": "$:/tags/ViewTemplate",
"text": "<$list filter=\"[all[current]has[plugin-type]] -[all[current]field:plugin-type[import]]\">\n<$set name=\"plugin-type\" value={{!!plugin-type}}>\n<$set name=\"default-popup-state\" value=\"yes\">\n<$set name=\"qualified-state\" value=<<qualify \"$:/state/plugin-info\">>>\n{{||$:/core/ui/Components/plugin-info}}\n</$set>\n</$set>\n</$set>\n</$list>\n"
},
"$:/core/ui/ViewTemplate/subtitle": {
"title": "$:/core/ui/ViewTemplate/subtitle",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" tag=\"div\" retain=\"yes\" animate=\"yes\">\n<div class=\"tc-subtitle\">\n<$link to={{!!modifier}}>\n<$view field=\"modifier\"/>\n</$link> <$view field=\"modified\" format=\"date\" template={{$:/language/Tiddler/DateFormat}}/>\n</div>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate/tags": {
"title": "$:/core/ui/ViewTemplate/tags",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" tag=\"div\" retain=\"yes\" animate=\"yes\">\n<div class=\"tc-tags-wrapper\"><$list filter=\"[all[current]tags[]sort[title]]\" template=\"$:/core/ui/TagTemplate\" storyview=\"pop\"/></div>\n</$reveal>"
},
"$:/core/ui/ViewTemplate/title": {
"title": "$:/core/ui/ViewTemplate/title",
"tags": "$:/tags/ViewTemplate",
"text": "\\define title-styles()\nfill:$(foregroundColor)$;\n\\end\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<div class=\"tc-tiddler-title\">\n<div class=\"tc-titlebar\">\n<span class=\"tc-tiddler-controls\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]]\" variable=\"listItem\"><$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\"><$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\"><$transclude tiddler=<<listItem>>/></$set></$reveal></$list>\n</span>\n<$set name=\"tv-wikilinks\" value={{$:/config/Tiddlers/TitleLinks}}>\n<$link>\n<$set name=\"foregroundColor\" value={{!!color}}>\n<span class=\"tc-tiddler-title-icon\" style=<<title-styles>>>\n<$transclude tiddler={{!!icon}}/>\n</span>\n</$set>\n<$list filter=\"[all[current]removeprefix[$:/]]\">\n<h2 class=\"tc-title\" title={{$:/language/SystemTiddler/Tooltip}}>\n<span class=\"tc-system-title-prefix\">$:/</span><$text text=<<currentTiddler>>/>\n</h2>\n</$list>\n<$list filter=\"[all[current]!prefix[$:/]]\">\n<h2 class=\"tc-title\">\n<$view field=\"title\"/>\n</h2>\n</$list>\n</$link>\n</$set>\n</div>\n\n<$reveal type=\"nomatch\" text=\"\" default=\"\" state=<<tiddlerInfoState>> class=\"tc-tiddler-info tc-popup-handle\" animate=\"yes\" retain=\"yes\">\n\n<$transclude tiddler=\"$:/core/ui/TiddlerInfo\"/>\n\n</$reveal>\n</div>"
},
"$:/core/ui/ViewTemplate/unfold": {
"title": "$:/core/ui/ViewTemplate/unfold",
"tags": "$:/tags/ViewTemplate",
"text": "<$reveal tag=\"div\" type=\"nomatch\" state=\"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar\" text=\"hide\">\n<$reveal tag=\"div\" type=\"nomatch\" state=<<folded-state>> text=\"hide\" default=\"show\" retain=\"yes\" animate=\"yes\">\n<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=\"tc-fold-banner\">\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n{{$:/core/images/chevron-up}}\n</$button>\n</$reveal>\n<$reveal tag=\"div\" type=\"nomatch\" state=<<folded-state>> text=\"show\" default=\"show\" retain=\"yes\" animate=\"yes\">\n<$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class=\"tc-unfold-banner\">\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n{{$:/core/images/chevron-down}}\n</$button>\n</$reveal>\n</$reveal>\n"
},
"$:/core/ui/ViewTemplate": {
"title": "$:/core/ui/ViewTemplate",
"text": "\\define frame-classes()\ntc-tiddler-frame tc-tiddler-view-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$\n\\end\n\\define folded-state()\n$:/state/folded/$(currentTiddler)$\n\\end\n<$set name=\"storyTiddler\" value=<<currentTiddler>>><$set name=\"tiddlerInfoState\" value=<<qualify \"$:/state/popup/tiddler-info\">>><$tiddler tiddler=<<currentTiddler>>><div class=<<frame-classes>>><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]\" variable=\"listItem\"><$transclude tiddler=<<listItem>>/></$list>\n</div>\n</$tiddler></$set></$set>\n"
},
"$:/core/ui/Buttons/clone": {
"title": "$:/core/ui/Buttons/clone",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/clone-button}} {{$:/language/Buttons/Clone/Caption}}",
"description": "{{$:/language/Buttons/Clone/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-new-tiddler\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/Clone/Hint}} aria-label={{$:/language/Buttons/Clone/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/clone-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Clone/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/close-others": {
"title": "$:/core/ui/Buttons/close-others",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-others-button}} {{$:/language/Buttons/CloseOthers/Caption}}",
"description": "{{$:/language/Buttons/CloseOthers/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-close-other-tiddlers\" param=<<currentTiddler>> tooltip={{$:/language/Buttons/CloseOthers/Hint}} aria-label={{$:/language/Buttons/CloseOthers/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-others-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/CloseOthers/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/close": {
"title": "$:/core/ui/Buttons/close",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/close-button}} {{$:/language/Buttons/Close/Caption}}",
"description": "{{$:/language/Buttons/Close/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-close-tiddler\" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/close-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/Close/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/edit": {
"title": "$:/core/ui/Buttons/edit",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/edit-button}} {{$:/language/Buttons/Edit/Caption}}",
"description": "{{$:/language/Buttons/Edit/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-edit-tiddler\" tooltip={{$:/language/Buttons/Edit/Hint}} aria-label={{$:/language/Buttons/Edit/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/edit-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Edit/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/export-tiddler": {
"title": "$:/core/ui/Buttons/export-tiddler",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/export-button}} {{$:/language/Buttons/ExportTiddler/Caption}}",
"description": "{{$:/language/Buttons/ExportTiddler/Hint}}",
"text": "\\define makeExportFilter()\n[[$(currentTiddler)$]]\n\\end\n<$macrocall $name=\"exportButton\" exportFilter=<<makeExportFilter>> lingoBase=\"$:/language/Buttons/ExportTiddler/\" baseFilename=<<currentTiddler>>/>"
},
"$:/core/ui/Buttons/fold-bar": {
"title": "$:/core/ui/Buttons/fold-bar",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/chevron-up}} {{$:/language/Buttons/Fold/FoldBar/Caption}}",
"description": "{{$:/language/Buttons/Fold/FoldBar/Hint}}",
"text": "<!-- This dummy toolbar button is here to allow visibility of the fold-bar to be controlled as if it were a toolbar button -->"
},
"$:/core/ui/Buttons/fold-others": {
"title": "$:/core/ui/Buttons/fold-others",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/fold-others-button}} {{$:/language/Buttons/FoldOthers/Caption}}",
"description": "{{$:/language/Buttons/FoldOthers/Hint}}",
"text": "\\whitespace trim\n<$button tooltip={{$:/language/Buttons/FoldOthers/Hint}} aria-label={{$:/language/Buttons/FoldOthers/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-other-tiddlers\" $param=<<currentTiddler>> foldedStatePrefix=\"$:/state/folded/\"/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-others-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/FoldOthers/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/fold": {
"title": "$:/core/ui/Buttons/fold",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/fold-button}} {{$:/language/Buttons/Fold/Caption}}",
"description": "{{$:/language/Buttons/Fold/Hint}}",
"text": "\\whitespace trim\n<$reveal type=\"nomatch\" state=<<folded-state>> text=\"hide\" default=\"show\">\n<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/fold-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Fold/Caption}}/>\n</span>\n</$list>\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<folded-state>> text=\"hide\" default=\"show\">\n<$button tooltip={{$:/language/Buttons/Unfold/Hint}} aria-label={{$:/language/Buttons/Unfold/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-fold-tiddler\" $param=<<currentTiddler>> foldedState=<<folded-state>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\" variable=\"listItem\">\n{{$:/core/images/unfold-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Unfold/Caption}}/>\n</span>\n</$list>\n</$button>\n</$reveal>"
},
"$:/core/ui/Buttons/info": {
"title": "$:/core/ui/Buttons/info",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/info-button}} {{$:/language/Buttons/Info/Caption}}",
"description": "{{$:/language/Buttons/Info/Hint}}",
"text": "\\whitespace trim\n\\define button-content()\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/info-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/Info/Caption}}/>\n</span>\n</$list>\n\\end\n<$reveal state=\"$:/config/TiddlerInfo/Mode\" type=\"match\" text=\"popup\">\n<$button popup=<<tiddlerInfoState>> tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$macrocall $name=\"button-content\" mode=\"inline\"/>\n</$button>\n</$reveal>\n<$reveal state=\"$:/config/TiddlerInfo/Mode\" type=\"match\" text=\"sticky\">\n<$reveal state=<<tiddlerInfoState>> type=\"match\" text=\"\" default=\"\">\n<$button set=<<tiddlerInfoState>> setTo=\"yes\" tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$macrocall $name=\"button-content\" mode=\"inline\"/>\n</$button>\n</$reveal>\n<$reveal state=<<tiddlerInfoState>> type=\"nomatch\" text=\"\" default=\"\">\n<$button set=<<tiddlerInfoState>> setTo=\"\" tooltip={{$:/language/Buttons/Info/Hint}} aria-label={{$:/language/Buttons/Info/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$macrocall $name=\"button-content\" mode=\"inline\"/>\n</$button>\n</$reveal>\n</$reveal>"
},
"$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/core/ui/Buttons/more-tiddler-actions",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}}",
"description": "{{$:/language/Buttons/More/Hint}}",
"text": "\\whitespace trim\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<$button popup=<<qualify \"$:/state/popup/more\">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/down-arrow}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/More/Caption}}/>\n</span>\n</$list>\n</$button>\n<$reveal state=<<qualify \"$:/state/popup/more\">> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$set>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>"
},
"$:/core/ui/Buttons/new-here": {
"title": "$:/core/ui/Buttons/new-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-here-button}} {{$:/language/Buttons/NewHere/Caption}}",
"description": "{{$:/language/Buttons/NewHere/Hint}}",
"text": "\\whitespace trim\n\\define newHereButtonTags()\n[[$(currentTiddler)$]]\n\\end\n\\define newHereButton()\n<$button tooltip={{$:/language/Buttons/NewHere/Hint}} aria-label={{$:/language/Buttons/NewHere/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" tags=<<newHereButtonTags>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-here-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/NewHere/Caption}}/>\n</span>\n</$list>\n</$button>\n\\end\n<<newHereButton>>"
},
"$:/core/ui/Buttons/new-journal-here": {
"title": "$:/core/ui/Buttons/new-journal-here",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/new-journal-button}} {{$:/language/Buttons/NewJournalHere/Caption}}",
"description": "{{$:/language/Buttons/NewJournalHere/Hint}}",
"text": "\\whitespace trim\n\\define journalButtonTags()\n[[$(currentTiddlerTag)$]] $(journalTags)$\n\\end\n\\define journalButton()\n<$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} aria-label={{$:/language/Buttons/NewJournalHere/Caption}} class=<<tv-config-toolbar-class>>>\n<$action-sendmessage $message=\"tm-new-tiddler\" title=<<now \"$(journalTitleTemplate)$\">> tags=<<journalButtonTags>>/>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/new-journal-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/>\n</span>\n</$list>\n</$button>\n\\end\n<$set name=\"journalTitleTemplate\" value={{$:/config/NewJournal/Title}}>\n<$set name=\"journalTags\" value={{$:/config/NewJournal/Tags}}>\n<$set name=\"currentTiddlerTag\" value=<<currentTiddler>>>\n<<journalButton>>\n</$set>\n</$set>\n</$set>"
},
"$:/core/ui/Buttons/open-window": {
"title": "$:/core/ui/Buttons/open-window",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/open-window}} {{$:/language/Buttons/OpenWindow/Caption}}",
"description": "{{$:/language/Buttons/OpenWindow/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-open-window\" tooltip={{$:/language/Buttons/OpenWindow/Hint}} aria-label={{$:/language/Buttons/OpenWindow/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/open-window}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/OpenWindow/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/permalink": {
"title": "$:/core/ui/Buttons/permalink",
"tags": "$:/tags/ViewToolbar",
"caption": "{{$:/core/images/permalink-button}} {{$:/language/Buttons/Permalink/Caption}}",
"description": "{{$:/language/Buttons/Permalink/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-permalink\" tooltip={{$:/language/Buttons/Permalink/Hint}} aria-label={{$:/language/Buttons/Permalink/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/permalink-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Permalink/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/core/ui/Buttons/permaview": {
"title": "$:/core/ui/Buttons/permaview",
"tags": "$:/tags/ViewToolbar $:/tags/PageControls",
"caption": "{{$:/core/images/permaview-button}} {{$:/language/Buttons/Permaview/Caption}}",
"description": "{{$:/language/Buttons/Permaview/Hint}}",
"text": "\\whitespace trim\n<$button message=\"tm-permaview\" tooltip={{$:/language/Buttons/Permaview/Hint}} aria-label={{$:/language/Buttons/Permaview/Caption}} class=<<tv-config-toolbar-class>>>\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/permaview-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/Permaview/Caption}}/>\n</span>\n</$list>\n</$button>"
},
"$:/DefaultTiddlers": {
"title": "$:/DefaultTiddlers",
"text": "GettingStarted\n"
},
"$:/temp/advancedsearch": {
"title": "$:/temp/advancedsearch",
"text": ""
},
"$:/snippets/allfields": {
"title": "$:/snippets/allfields",
"text": "\\define renderfield(title)\n<tr class=\"tc-view-field\"><td class=\"tc-view-field-name\">''$title$'':</td><td class=\"tc-view-field-value\">//{{$:/language/Docs/Fields/$title$}}//</td></tr>\n\\end\n<table class=\"tc-view-field-table\"><tbody><$list filter=\"[fields[]sort[title]]\" variable=\"listItem\"><$macrocall $name=\"renderfield\" title=<<listItem>>/></$list>\n</tbody></table>\n"
},
"$:/config/AnimationDuration": {
"title": "$:/config/AnimationDuration",
"text": "400"
},
"$:/config/AutoSave": {
"title": "$:/config/AutoSave",
"text": "yes"
},
"$:/config/BitmapEditor/Colour": {
"title": "$:/config/BitmapEditor/Colour",
"text": "#444"
},
"$:/config/BitmapEditor/ImageSizes": {
"title": "$:/config/BitmapEditor/ImageSizes",
"text": "[[62px 100px]] [[100px 62px]] [[124px 200px]] [[200px 124px]] [[248px 400px]] [[371px 600px]] [[400px 248px]] [[556px 900px]] [[600px 371px]] [[742px 1200px]] [[900px 556px]] [[1200px 742px]]"
},
"$:/config/BitmapEditor/LineWidth": {
"title": "$:/config/BitmapEditor/LineWidth",
"text": "3px"
},
"$:/config/BitmapEditor/LineWidths": {
"title": "$:/config/BitmapEditor/LineWidths",
"text": "0.25px 0.5px 1px 2px 3px 4px 6px 8px 10px 16px 20px 28px 40px 56px 80px"
},
"$:/config/BitmapEditor/Opacities": {
"title": "$:/config/BitmapEditor/Opacities",
"text": "0.01 0.025 0.05 0.075 0.1 0.15 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0"
},
"$:/config/BitmapEditor/Opacity": {
"title": "$:/config/BitmapEditor/Opacity",
"text": "1.0"
},
"$:/config/DefaultSidebarTab": {
"title": "$:/config/DefaultSidebarTab",
"text": "$:/core/ui/SideBar/Open"
},
"$:/config/DownloadSaver/AutoSave": {
"title": "$:/config/DownloadSaver/AutoSave",
"text": "no"
},
"$:/config/Drafts/TypingTimeout": {
"title": "$:/config/Drafts/TypingTimeout",
"text": "400"
},
"$:/config/EditTemplateFields/Visibility/title": {
"title": "$:/config/EditTemplateFields/Visibility/title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/tags": {
"title": "$:/config/EditTemplateFields/Visibility/tags",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/text": {
"title": "$:/config/EditTemplateFields/Visibility/text",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/creator": {
"title": "$:/config/EditTemplateFields/Visibility/creator",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/created": {
"title": "$:/config/EditTemplateFields/Visibility/created",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modified": {
"title": "$:/config/EditTemplateFields/Visibility/modified",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/modifier": {
"title": "$:/config/EditTemplateFields/Visibility/modifier",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/type": {
"title": "$:/config/EditTemplateFields/Visibility/type",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.title": {
"title": "$:/config/EditTemplateFields/Visibility/draft.title",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/draft.of": {
"title": "$:/config/EditTemplateFields/Visibility/draft.of",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/revision": {
"title": "$:/config/EditTemplateFields/Visibility/revision",
"text": "hide"
},
"$:/config/EditTemplateFields/Visibility/bag": {
"title": "$:/config/EditTemplateFields/Visibility/bag",
"text": "hide"
},
"$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-4": {
"title": "$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-4",
"text": "hide"
},
"$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-5": {
"title": "$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-5",
"text": "hide"
},
"$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-6": {
"title": "$:/config/EditorToolbarButtons/Visibility/$:/core/ui/EditorToolbar/heading-6",
"text": "hide"
},
"$:/config/EditorTypeMappings/image/gif": {
"title": "$:/config/EditorTypeMappings/image/gif",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpeg": {
"title": "$:/config/EditorTypeMappings/image/jpeg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/jpg": {
"title": "$:/config/EditorTypeMappings/image/jpg",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/png": {
"title": "$:/config/EditorTypeMappings/image/png",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/image/x-icon": {
"title": "$:/config/EditorTypeMappings/image/x-icon",
"text": "bitmap"
},
"$:/config/EditorTypeMappings/text/vnd.tiddlywiki": {
"title": "$:/config/EditorTypeMappings/text/vnd.tiddlywiki",
"text": "text"
},
"$:/config/Manager/Show": {
"title": "$:/config/Manager/Show",
"text": "tiddlers"
},
"$:/config/Manager/Filter": {
"title": "$:/config/Manager/Filter",
"text": ""
},
"$:/config/Manager/Order": {
"title": "$:/config/Manager/Order",
"text": "forward"
},
"$:/config/Manager/Sort": {
"title": "$:/config/Manager/Sort",
"text": "title"
},
"$:/config/Manager/System": {
"title": "$:/config/Manager/System",
"text": "system"
},
"$:/config/Manager/Tag": {
"title": "$:/config/Manager/Tag",
"text": ""
},
"$:/state/popup/manager/item/$:/Manager/ItemMain/RawText": {
"title": "$:/state/popup/manager/item/$:/Manager/ItemMain/RawText",
"text": "hide"
},
"$:/config/MissingLinks": {
"title": "$:/config/MissingLinks",
"text": "yes"
},
"$:/config/Navigation/UpdateAddressBar": {
"title": "$:/config/Navigation/UpdateAddressBar",
"text": "no"
},
"$:/config/Navigation/UpdateHistory": {
"title": "$:/config/Navigation/UpdateHistory",
"text": "no"
},
"$:/config/OfficialPluginLibrary": {
"title": "$:/config/OfficialPluginLibrary",
"tags": "$:/tags/PluginLibrary",
"url": "https://tiddlywiki.com/library/v5.1.15/index.html",
"caption": "{{$:/language/OfficialPluginLibrary}}",
"text": "{{$:/language/OfficialPluginLibrary/Hint}}\n"
},
"$:/config/Navigation/openLinkFromInsideRiver": {
"title": "$:/config/Navigation/openLinkFromInsideRiver",
"text": "below"
},
"$:/config/Navigation/openLinkFromOutsideRiver": {
"title": "$:/config/Navigation/openLinkFromOutsideRiver",
"text": "top"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/advanced-search",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/close-all",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/encryption",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/export-page",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/fold-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/fold-all",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/home",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/refresh",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/import",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/language",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/tag-manager",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/manager": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/manager",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-journal",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-image": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-image",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/palette": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/palette",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/print": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/print",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/storyview",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/timestamp": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/timestamp",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/theme",
"text": "hide"
},
"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/unfold-all": {
"title": "$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/unfold-all",
"text": "hide"
},
"$:/config/Performance/Instrumentation": {
"title": "$:/config/Performance/Instrumentation",
"text": "no"
},
"$:/config/SaveWikiButton/Template": {
"title": "$:/config/SaveWikiButton/Template",
"text": "$:/core/save/all"
},
"$:/config/SaverFilter": {
"title": "$:/config/SaverFilter",
"text": "[all[]] -[[$:/HistoryList]] -[[$:/StoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[[$:/UploadName]] -[prefix[$:/state/]] -[prefix[$:/temp/]]"
},
"$:/config/Search/AutoFocus": {
"title": "$:/config/Search/AutoFocus",
"text": "true"
},
"$:/config/Search/MinLength": {
"title": "$:/config/Search/MinLength",
"text": "3"
},
"$:/config/SearchResults/Default": {
"title": "$:/config/SearchResults/Default",
"text": "$:/core/ui/DefaultSearchResultList"
},
"$:/config/ShortcutInfo/bold": {
"title": "$:/config/ShortcutInfo/bold",
"text": "{{$:/language/Buttons/Bold/Hint}}"
},
"$:/config/ShortcutInfo/cancel-edit-tiddler": {
"title": "$:/config/ShortcutInfo/cancel-edit-tiddler",
"text": "{{$:/language/Buttons/Cancel/Hint}}"
},
"$:/config/ShortcutInfo/excise": {
"title": "$:/config/ShortcutInfo/excise",
"text": "{{$:/language/Buttons/Excise/Hint}}"
},
"$:/config/ShortcutInfo/heading-1": {
"title": "$:/config/ShortcutInfo/heading-1",
"text": "{{$:/language/Buttons/Heading1/Hint}}"
},
"$:/config/ShortcutInfo/heading-2": {
"title": "$:/config/ShortcutInfo/heading-2",
"text": "{{$:/language/Buttons/Heading2/Hint}}"
},
"$:/config/ShortcutInfo/heading-3": {
"title": "$:/config/ShortcutInfo/heading-3",
"text": "{{$:/language/Buttons/Heading3/Hint}}"
},
"$:/config/ShortcutInfo/heading-4": {
"title": "$:/config/ShortcutInfo/heading-4",
"text": "{{$:/language/Buttons/Heading4/Hint}}"
},
"$:/config/ShortcutInfo/heading-5": {
"title": "$:/config/ShortcutInfo/heading-5",
"text": "{{$:/language/Buttons/Heading5/Hint}}"
},
"$:/config/ShortcutInfo/heading-6": {
"title": "$:/config/ShortcutInfo/heading-6",
"text": "{{$:/language/Buttons/Heading6/Hint}}"
},
"$:/config/ShortcutInfo/italic": {
"title": "$:/config/ShortcutInfo/italic",
"text": "{{$:/language/Buttons/Italic/Hint}}"
},
"$:/config/ShortcutInfo/link": {
"title": "$:/config/ShortcutInfo/link",
"text": "{{$:/language/Buttons/Link/Hint}}"
},
"$:/config/ShortcutInfo/list-bullet": {
"title": "$:/config/ShortcutInfo/list-bullet",
"text": "{{$:/language/Buttons/ListBullet/Hint}}"
},
"$:/config/ShortcutInfo/list-number": {
"title": "$:/config/ShortcutInfo/list-number",
"text": "{{$:/language/Buttons/ListNumber/Hint}}"
},
"$:/config/ShortcutInfo/mono-block": {
"title": "$:/config/ShortcutInfo/mono-block",
"text": "{{$:/language/Buttons/MonoBlock/Hint}}"
},
"$:/config/ShortcutInfo/mono-line": {
"title": "$:/config/ShortcutInfo/mono-line",
"text": "{{$:/language/Buttons/MonoLine/Hint}}"
},
"$:/config/ShortcutInfo/picture": {
"title": "$:/config/ShortcutInfo/picture",
"text": "{{$:/language/Buttons/Picture/Hint}}"
},
"$:/config/ShortcutInfo/preview": {
"title": "$:/config/ShortcutInfo/preview",
"text": "{{$:/language/Buttons/Preview/Hint}}"
},
"$:/config/ShortcutInfo/quote": {
"title": "$:/config/ShortcutInfo/quote",
"text": "{{$:/language/Buttons/Quote/Hint}}"
},
"$:/config/ShortcutInfo/save-tiddler": {
"title": "$:/config/ShortcutInfo/save-tiddler",
"text": "{{$:/language/Buttons/Save/Hint}}"
},
"$:/config/ShortcutInfo/stamp": {
"title": "$:/config/ShortcutInfo/stamp",
"text": "{{$:/language/Buttons/Stamp/Hint}}"
},
"$:/config/ShortcutInfo/strikethrough": {
"title": "$:/config/ShortcutInfo/strikethrough",
"text": "{{$:/language/Buttons/Strikethrough/Hint}}"
},
"$:/config/ShortcutInfo/subscript": {
"title": "$:/config/ShortcutInfo/subscript",
"text": "{{$:/language/Buttons/Subscript/Hint}}"
},
"$:/config/ShortcutInfo/superscript": {
"title": "$:/config/ShortcutInfo/superscript",
"text": "{{$:/language/Buttons/Superscript/Hint}}"
},
"$:/config/ShortcutInfo/underline": {
"title": "$:/config/ShortcutInfo/underline",
"text": "{{$:/language/Buttons/Underline/Hint}}"
},
"$:/config/SyncFilter": {
"title": "$:/config/SyncFilter",
"text": "[is[tiddler]] -[[$:/HistoryList]] -[[$:/Import]] -[[$:/isEncrypted]] -[prefix[$:/status/]] -[prefix[$:/state/]] -[prefix[$:/temp/]]"
},
"$:/config/TextEditor/EditorHeight/Height": {
"title": "$:/config/TextEditor/EditorHeight/Height",
"text": "400px"
},
"$:/config/TextEditor/EditorHeight/Mode": {
"title": "$:/config/TextEditor/EditorHeight/Mode",
"text": "auto"
},
"$:/config/TiddlerInfo/Default": {
"title": "$:/config/TiddlerInfo/Default",
"text": "$:/core/ui/TiddlerInfo/Fields"
},
"$:/config/TiddlerInfo/Mode": {
"title": "$:/config/TiddlerInfo/Mode",
"text": "popup"
},
"$:/config/Tiddlers/TitleLinks": {
"title": "$:/config/Tiddlers/TitleLinks",
"text": "no"
},
"$:/config/Toolbar/ButtonClass": {
"title": "$:/config/Toolbar/ButtonClass",
"text": "tc-btn-invisible"
},
"$:/config/Toolbar/Icons": {
"title": "$:/config/Toolbar/Icons",
"text": "yes"
},
"$:/config/Toolbar/Text": {
"title": "$:/config/Toolbar/Text",
"text": "no"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/close-others",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/info",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/more-tiddler-actions",
"text": "show"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal-here",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permalink",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/permaview",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/delete": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/delete",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar",
"text": "hide"
},
"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others": {
"title": "$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others",
"text": "hide"
},
"$:/config/shortcuts-mac/bold": {
"title": "$:/config/shortcuts-mac/bold",
"text": "meta-B"
},
"$:/config/shortcuts-mac/italic": {
"title": "$:/config/shortcuts-mac/italic",
"text": "meta-I"
},
"$:/config/shortcuts-mac/underline": {
"title": "$:/config/shortcuts-mac/underline",
"text": "meta-U"
},
"$:/config/shortcuts-not-mac/bold": {
"title": "$:/config/shortcuts-not-mac/bold",
"text": "ctrl-B"
},
"$:/config/shortcuts-not-mac/italic": {
"title": "$:/config/shortcuts-not-mac/italic",
"text": "ctrl-I"
},
"$:/config/shortcuts-not-mac/underline": {
"title": "$:/config/shortcuts-not-mac/underline",
"text": "ctrl-U"
},
"$:/config/shortcuts/cancel-edit-tiddler": {
"title": "$:/config/shortcuts/cancel-edit-tiddler",
"text": "escape"
},
"$:/config/shortcuts/excise": {
"title": "$:/config/shortcuts/excise",
"text": "ctrl-E"
},
"$:/config/shortcuts/heading-1": {
"title": "$:/config/shortcuts/heading-1",
"text": "ctrl-1"
},
"$:/config/shortcuts/heading-2": {
"title": "$:/config/shortcuts/heading-2",
"text": "ctrl-2"
},
"$:/config/shortcuts/heading-3": {
"title": "$:/config/shortcuts/heading-3",
"text": "ctrl-3"
},
"$:/config/shortcuts/heading-4": {
"title": "$:/config/shortcuts/heading-4",
"text": "ctrl-4"
},
"$:/config/shortcuts/heading-5": {
"title": "$:/config/shortcuts/heading-5",
"text": "ctrl-5"
},
"$:/config/shortcuts/heading-6": {
"title": "$:/config/shortcuts/heading-6",
"text": "ctrl-6"
},
"$:/config/shortcuts/link": {
"title": "$:/config/shortcuts/link",
"text": "ctrl-L"
},
"$:/config/shortcuts/list-bullet": {
"title": "$:/config/shortcuts/list-bullet",
"text": "ctrl-shift-L"
},
"$:/config/shortcuts/list-number": {
"title": "$:/config/shortcuts/list-number",
"text": "ctrl-shift-N"
},
"$:/config/shortcuts/mono-block": {
"title": "$:/config/shortcuts/mono-block",
"text": "ctrl-shift-M"
},
"$:/config/shortcuts/mono-line": {
"title": "$:/config/shortcuts/mono-line",
"text": "ctrl-M"
},
"$:/config/shortcuts/picture": {
"title": "$:/config/shortcuts/picture",
"text": "ctrl-shift-I"
},
"$:/config/shortcuts/preview": {
"title": "$:/config/shortcuts/preview",
"text": "alt-P"
},
"$:/config/shortcuts/quote": {
"title": "$:/config/shortcuts/quote",
"text": "ctrl-Q"
},
"$:/config/shortcuts/save-tiddler": {
"title": "$:/config/shortcuts/save-tiddler",
"text": "ctrl+enter"
},
"$:/config/shortcuts/stamp": {
"title": "$:/config/shortcuts/stamp",
"text": "ctrl-S"
},
"$:/config/shortcuts/strikethrough": {
"title": "$:/config/shortcuts/strikethrough",
"text": "ctrl-T"
},
"$:/config/shortcuts/subscript": {
"title": "$:/config/shortcuts/subscript",
"text": "ctrl-shift-B"
},
"$:/config/shortcuts/superscript": {
"title": "$:/config/shortcuts/superscript",
"text": "ctrl-shift-P"
},
"$:/config/WikiParserRules/Inline/wikilink": {
"title": "$:/config/WikiParserRules/Inline/wikilink",
"text": "enable"
},
"$:/snippets/currpalettepreview": {
"title": "$:/snippets/currpalettepreview",
"text": "\\define swatchStyle()\nbackground-color: $(swatchColour)$;\n\\end\n\\define swatch(colour)\n<$set name=\"swatchColour\" value={{##$colour$}}>\n<div class=\"tc-swatch\" style=<<swatchStyle>>/>\n</$set>\n\\end\n<div class=\"tc-swatches-horiz\">\n<<swatch foreground>>\n<<swatch background>>\n<<swatch muted-foreground>>\n<<swatch primary>>\n<<swatch page-background>>\n<<swatch tab-background>>\n<<swatch tiddler-info-background>>\n</div>\n"
},
"$:/snippets/download-wiki-button": {
"title": "$:/snippets/download-wiki-button",
"text": "\\define lingo-base() $:/language/ControlPanel/Tools/Download/\n<$button class=\"tc-btn-big-green\">\n<$action-sendmessage $message=\"tm-download-file\" $param=\"$:/core/save/all\" filename=\"index.html\"/>\n<<lingo Full/Caption>> {{$:/core/images/save-button}}\n</$button>"
},
"$:/language": {
"title": "$:/language",
"text": "$:/languages/en-GB"
},
"$:/snippets/languageswitcher": {
"title": "$:/snippets/languageswitcher",
"text": "{{$:/language/ControlPanel/Basics/Language/Prompt}} <$select tiddler=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[description]]\">\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\n</$list>\n</$select>"
},
"$:/core/macros/CSS": {
"title": "$:/core/macros/CSS",
"tags": "$:/tags/Macro",
"text": "\\define colour(name)\n<$transclude tiddler={{$:/palette}} index=\"$name$\"><$transclude tiddler=\"$:/palettes/Vanilla\" index=\"$name$\"/></$transclude>\n\\end\n\n\\define color(name)\n<<colour $name$>>\n\\end\n\n\\define box-shadow(shadow)\n``\n -webkit-box-shadow: $shadow$;\n -moz-box-shadow: $shadow$;\n box-shadow: $shadow$;\n``\n\\end\n\n\\define filter(filter)\n``\n -webkit-filter: $filter$;\n -moz-filter: $filter$;\n filter: $filter$;\n``\n\\end\n\n\\define transition(transition)\n``\n -webkit-transition: $transition$;\n -moz-transition: $transition$;\n transition: $transition$;\n``\n\\end\n\n\\define transform-origin(origin)\n``\n -webkit-transform-origin: $origin$;\n -moz-transform-origin: $origin$;\n transform-origin: $origin$;\n``\n\\end\n\n\\define background-linear-gradient(gradient)\n``\nbackground-image: linear-gradient($gradient$);\nbackground-image: -o-linear-gradient($gradient$);\nbackground-image: -moz-linear-gradient($gradient$);\nbackground-image: -webkit-linear-gradient($gradient$);\nbackground-image: -ms-linear-gradient($gradient$);\n``\n\\end\n\n\\define column-count(columns)\n``\n-moz-column-count: $columns$;\n-webkit-column-count: $columns$;\ncolumn-count: $columns$;\n``\n\\end\n\n\\define datauri(title)\n<$macrocall $name=\"makedatauri\" type={{$title$!!type}} text={{$title$}}/>\n\\end\n\n\\define if-sidebar(text)\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"yes\" default=\"yes\">$text$</$reveal>\n\\end\n\n\\define if-no-sidebar(text)\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"yes\" default=\"yes\">$text$</$reveal>\n\\end\n"
},
"$:/core/macros/colour-picker": {
"title": "$:/core/macros/colour-picker",
"tags": "$:/tags/Macro",
"text": "\\define colour-picker-update-recent()\n<$action-listops\n\t$tiddler=\"$:/config/ColourPicker/Recent\"\n\t$subfilter=\"$(colour-picker-value)$ [list[$:/config/ColourPicker/Recent]remove[$(colour-picker-value)$]] +[limit[8]]\"\n/>\n\\end\n\n\\define colour-picker-inner(actions)\n<$button tag=\"a\" tooltip=\"\"\"$(colour-picker-value)$\"\"\">\n\n$(colour-picker-update-recent)$\n\n$actions$\n\n<div style=\"background-color: $(colour-picker-value)$; width: 100%; height: 100%; border-radius: 50%;\"/>\n\n</$button>\n\\end\n\n\\define colour-picker-recent-inner(actions)\n<$set name=\"colour-picker-value\" value=\"$(recentColour)$\">\n<$macrocall $name=\"colour-picker-inner\" actions=\"\"\"$actions$\"\"\"/>\n</$set>\n\\end\n\n\\define colour-picker-recent(actions)\n{{$:/language/ColourPicker/Recent}} <$list filter=\"[list[$:/config/ColourPicker/Recent]]\" variable=\"recentColour\">\n<$macrocall $name=\"colour-picker-recent-inner\" actions=\"\"\"$actions$\"\"\"/></$list>\n\\end\n\n\\define colour-picker(actions)\n<div class=\"tc-colour-chooser\">\n\n<$macrocall $name=\"colour-picker-recent\" actions=\"\"\"$actions$\"\"\"/>\n\n---\n\n<$list filter=\"LightPink Pink Crimson LavenderBlush PaleVioletRed HotPink DeepPink MediumVioletRed Orchid Thistle Plum Violet Magenta Fuchsia DarkMagenta Purple MediumOrchid DarkViolet DarkOrchid Indigo BlueViolet MediumPurple MediumSlateBlue SlateBlue DarkSlateBlue Lavender GhostWhite Blue MediumBlue MidnightBlue DarkBlue Navy RoyalBlue CornflowerBlue LightSteelBlue LightSlateGrey SlateGrey DodgerBlue AliceBlue SteelBlue LightSkyBlue SkyBlue DeepSkyBlue LightBlue PowderBlue CadetBlue Azure LightCyan PaleTurquoise Cyan Aqua DarkTurquoise DarkSlateGrey DarkCyan Teal MediumTurquoise LightSeaGreen Turquoise Aquamarine MediumAquamarine MediumSpringGreen MintCream SpringGreen MediumSeaGreen SeaGreen Honeydew LightGreen PaleGreen DarkSeaGreen LimeGreen Lime ForestGreen Green DarkGreen Chartreuse LawnGreen GreenYellow DarkOliveGreen YellowGreen OliveDrab Beige LightGoldenrodYellow Ivory LightYellow Yellow Olive DarkKhaki LemonChiffon PaleGoldenrod Khaki Gold Cornsilk Goldenrod DarkGoldenrod FloralWhite OldLace Wheat Moccasin Orange PapayaWhip BlanchedAlmond NavajoWhite AntiqueWhite Tan BurlyWood Bisque DarkOrange Linen Peru PeachPuff SandyBrown Chocolate SaddleBrown Seashell Sienna LightSalmon Coral OrangeRed DarkSalmon Tomato MistyRose Salmon Snow LightCoral RosyBrown IndianRed Red Brown FireBrick DarkRed Maroon White WhiteSmoke Gainsboro LightGrey Silver DarkGrey Grey DimGrey Black\" variable=\"colour-picker-value\">\n<$macrocall $name=\"colour-picker-inner\" actions=\"\"\"$actions$\"\"\"/>\n</$list>\n\n---\n\n<$edit-text tiddler=\"$:/config/ColourPicker/New\" tag=\"input\" default=\"\" placeholder=\"\"/> \n<$edit-text tiddler=\"$:/config/ColourPicker/New\" type=\"color\" tag=\"input\"/>\n<$set name=\"colour-picker-value\" value={{$:/config/ColourPicker/New}}>\n<$macrocall $name=\"colour-picker-inner\" actions=\"\"\"$actions$\"\"\"/>\n</$set>\n\n</div>\n\n\\end\n"
},
"$:/core/macros/export": {
"title": "$:/core/macros/export",
"tags": "$:/tags/Macro",
"text": "\\define exportButtonFilename(baseFilename)\n$baseFilename$$(extension)$\n\\end\n\n\\define exportButton(exportFilter:\"[!is[system]sort[title]]\",lingoBase,baseFilename:\"tiddlers\")\n<span class=\"tc-popup-keep\"><$button popup=<<qualify \"$:/state/popup/export\">> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/export-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$lingoBase$Caption}}/></span>\n</$list>\n</$button></span><$reveal state=<<qualify \"$:/state/popup/export\">> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Exporter]]\">\n<$set name=\"extension\" value={{!!extension}}>\n<$button class=\"tc-btn-invisible\">\n<$action-sendmessage $message=\"tm-download-file\" $param=<<currentTiddler>> exportFilter=\"\"\"$exportFilter$\"\"\" filename=<<exportButtonFilename \"\"\"$baseFilename$\"\"\">>/>\n<$action-deletetiddler $tiddler=<<qualify \"$:/state/popup/export\">>/>\n<$transclude field=\"description\"/>\n</$button>\n</$set>\n</$list>\n</div>\n</$reveal>\n\\end\n"
},
"$:/core/macros/image-picker": {
"title": "$:/core/macros/image-picker",
"created": "20170715180840889",
"modified": "20170715180914005",
"tags": "$:/tags/Macro",
"type": "text/vnd.tiddlywiki",
"text": "\\define image-picker-thumbnail(actions)\n<$button tag=\"a\" tooltip=\"\"\"$(imageTitle)$\"\"\">\n$actions$\n<$transclude tiddler=<<imageTitle>>/>\n</$button>\n\\end\n\n\\define image-picker-list(filter,actions)\n<$list filter=\"\"\"$filter$\"\"\" variable=\"imageTitle\">\n<$macrocall $name=\"image-picker-thumbnail\" actions=\"\"\"$actions$\"\"\"/>\n</$list>\n\\end\n\n\\define image-picker(actions,filter:\"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]\",subfilter:\"\")\n<div class=\"tc-image-chooser\">\n<$vars state-system=<<qualify \"$:/state/image-picker/system\">>>\n<$checkbox tiddler=<<state-system>> field=\"text\" checked=\"show\" unchecked=\"hide\" default=\"hide\">\n{{$:/language/SystemTiddlers/Include/Prompt}}\n</$checkbox>\n<$reveal state=<<state-system>> type=\"match\" text=\"hide\" default=\"hide\" tag=\"div\">\n<$macrocall $name=\"image-picker-list\" filter=\"\"\"$filter$ +[!is[system]]\"\"\" actions=\"\"\"$actions$\"\"\"/>\n</$reveal>\n<$reveal state=<<state-system>> type=\"nomatch\" text=\"hide\" default=\"hide\" tag=\"div\">\n<$macrocall $name=\"image-picker-list\" filter=\"\"\"$filter$\"\"\" actions=\"\"\"$actions$\"\"\"/>\n</$reveal>\n</$vars>\n</div>\n\\end\n\n\\define image-picker-include-tagged-images(actions)\n<$macrocall $name=\"image-picker\" filter=\"[all[shadows+tiddlers]is[image]] [all[shadows+tiddlers]tag[$:/tags/Image]] -[type[application/pdf]] +[!has[draft.of]sort[title]]\" actions=\"\"\"$actions$\"\"\"/>\n\\end\n"
},
"$:/core/macros/lingo": {
"title": "$:/core/macros/lingo",
"tags": "$:/tags/Macro",
"text": "\\define lingo-base()\n$:/language/\n\\end\n\n\\define lingo(title)\n{{$(lingo-base)$$title$}}\n\\end\n"
},
"$:/core/macros/list": {
"title": "$:/core/macros/list",
"tags": "$:/tags/Macro",
"text": "\\define list-links(filter,type:\"ul\",subtype:\"li\",class:\"\")\n<$type$ class=\"$class$\">\n<$list filter=\"$filter$\">\n<$subtype$>\n<$link to={{!!title}}>\n<$transclude field=\"caption\">\n<$view field=\"title\"/>\n</$transclude>\n</$link>\n</$subtype$>\n</$list>\n</$type$>\n\\end\n\n\\define list-links-draggable-drop-actions()\n<$action-listops $tiddler=<<targetTiddler>> $field=<<targetField>> $subfilter=\"+[insertbefore:currentTiddler<actionTiddler>]\"/>\n\\end\n\n\\define list-links-draggable(tiddler,field:\"list\",type:\"ul\",subtype:\"li\",class:\"\",itemTemplate)\n<$vars targetTiddler=\"\"\"$tiddler$\"\"\" targetField=\"\"\"$field$\"\"\">\n<$type$ class=\"$class$\">\n<$list filter=\"[list[$tiddler$!!$field$]]\">\n<$droppable actions=<<list-links-draggable-drop-actions>> tag=\"\"\"$subtype$\"\"\">\n<div class=\"tc-droppable-placeholder\">\n \n</div>\n<div>\n<$link to={{!!title}}>\n<$transclude tiddler=\"\"\"$itemTemplate$\"\"\">\n<$transclude field=\"caption\">\n<$view field=\"title\"/>\n</$transclude>\n</$transclude>\n</$link>\n</div>\n</$droppable>\n</$list>\n<$tiddler tiddler=\"\">\n<$droppable actions=<<list-links-draggable-drop-actions>> tag=\"\"\"$subtype$\"\"\">\n<div class=\"tc-droppable-placeholder\">\n \n</div>\n<div>\n \n</div>\n</$droppable>\n</$tiddler>\n</$type$>\n</$vars>\n\\end\n\n\\define list-tagged-draggable-drop-actions()\n<!-- Save the current ordering of the tiddlers with this tag -->\n<$set name=\"order\" filter=\"[<tag>tagging[]]\">\n<!-- Remove any list-after or list-before fields from the tiddlers with this tag -->\n<$list filter=\"[<tag>tagging[]]\">\n<$action-deletefield $field=\"list-before\"/>\n<$action-deletefield $field=\"list-after\"/>\n</$list>\n<!-- Assign the list field of the tag with the current ordering -->\n<$action-setfield $tiddler=<<tag>> $field=\"list\" $value=<<order>>/>\n<!-- Add the newly inserted item to the list -->\n<$action-listops $tiddler=<<tag>> $field=\"list\" $subfilter=\"+[insertbefore:currentTiddler<actionTiddler>]\"/>\n<!-- Make sure the newly added item has the right tag -->\n<$action-listops $tiddler=<<actionTiddler>> $tags=\"[<tag>]\"/>\n</$set>\n\\end\n\n\\define list-tagged-draggable(tag,itemTemplate,elementTag:\"div\")\n<$set name=\"tag\" value=\"\"\"$tag$\"\"\">\n<$list filter=\"[<tag>tagging[]]\">\n<$elementTag$ class=\"tc-menu-list-item\">\n<$droppable actions=<<list-tagged-draggable-drop-actions>>>\n<$elementTag$ class=\"tc-droppable-placeholder\">\n \n</$elementTag$>\n<$elementTag$>\n<$transclude tiddler=\"\"\"$itemTemplate$\"\"\">\n<$link to={{!!title}}>\n<$view field=\"title\"/>\n</$link>\n</$transclude>\n</$elementTag$>\n</$droppable>\n</$elementTag$>\n</$list>\n<$tiddler tiddler=\"\">\n<$droppable actions=<<list-tagged-draggable-drop-actions>>>\n<$elementTag$ class=\"tc-droppable-placeholder\">\n \n</$elementTag$>\n<$elementTag$ style=\"height:0.5em;\">\n</$elementTag$>\n</$droppable>\n</$tiddler>\n</$set>\n\\end\n"
},
"$:/core/macros/tabs": {
"title": "$:/core/macros/tabs",
"tags": "$:/tags/Macro",
"text": "\\define tabs(tabsList,default,state:\"$:/state/tab\",class,template,buttonTemplate)\n<div class=\"tc-tab-set $class$\">\n<div class=\"tc-tab-buttons $class$\">\n<$list filter=\"$tabsList$\" variable=\"currentTab\"><$set name=\"save-currentTiddler\" value=<<currentTiddler>>><$tiddler tiddler=<<currentTab>>><$button set=<<qualify \"$state$\">> setTo=<<currentTab>> default=\"$default$\" selectedClass=\"tc-tab-selected\" tooltip={{!!tooltip}}>\n<$tiddler tiddler=<<save-currentTiddler>>>\n<$set name=\"tv-wikilinks\" value=\"no\">\n<$transclude tiddler=\"$buttonTemplate$\" mode=\"inline\">\n<$transclude tiddler=<<currentTab>> field=\"caption\">\n<$macrocall $name=\"currentTab\" $type=\"text/plain\" $output=\"text/plain\"/>\n</$transclude>\n</$transclude>\n</$set></$tiddler></$button></$tiddler></$set></$list>\n</div>\n<div class=\"tc-tab-divider $class$\"/>\n<div class=\"tc-tab-content $class$\">\n<$list filter=\"$tabsList$\" variable=\"currentTab\">\n\n<$reveal type=\"match\" state=<<qualify \"$state$\">> text=<<currentTab>> default=\"$default$\">\n\n<$transclude tiddler=\"$template$\" mode=\"block\">\n\n<$transclude tiddler=<<currentTab>> mode=\"block\"/>\n\n</$transclude>\n\n</$reveal>\n\n</$list>\n</div>\n</div>\n\\end\n"
},
"$:/core/macros/tag-picker": {
"title": "$:/core/macros/tag-picker",
"tags": "$:/tags/Macro",
"text": "\\define add-tag-actions()\n<$action-sendmessage $message=\"tm-add-tag\" $param={{$:/temp/NewTagName}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n\\end\n\n\\define tag-button()\n<$button class=\"tc-btn-invisible\" tag=\"a\">\n$(actions)$\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n<$macrocall $name=\"tag-pill\" tag=<<tag>>/>\n</$button>\n\\end\n\n\\define tag-picker(actions)\n<$set name=\"actions\" value=\"\"\"$actions$\"\"\">\n<div class=\"tc-edit-add-tag\">\n<span class=\"tc-add-tag-name\">\n<$keyboard key=\"ENTER\" actions=<<add-tag-actions>>>\n<$edit-text tiddler=\"$:/temp/NewTagName\" tag=\"input\" default=\"\" placeholder={{$:/language/EditTemplate/Tags/Add/Placeholder}} focusPopup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-edit-texteditor tc-popup-handle\"/>\n</$keyboard>\n</span> <$button popup=<<qualify \"$:/state/popup/tags-auto-complete\">> class=\"tc-btn-invisible\" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button> <span class=\"tc-add-tag-button\">\n<$set name=\"tag\" value={{$:/temp/NewTagName}}>\n<$button set=\"$:/temp/NewTagName\" setTo=\"\" class=\"\">\n$actions$\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n{{$:/language/EditTemplate/Tags/Add/Button}}\n</$button>\n</$set>\n</span>\n</div>\n<div class=\"tc-block-dropdown-wrapper\">\n<$reveal state=<<qualify \"$:/state/popup/tags-auto-complete\">> type=\"nomatch\" text=\"\" default=\"\">\n<div class=\"tc-block-dropdown\">\n<$list filter=\"[tags[]!is[system]search:title{$:/temp/NewTagName}sort[]]\" variable=\"tag\">\n<<tag-button>>\n</$list>\n<hr>\n<$list filter=\"[tags[]is[system]search:title{$:/temp/NewTagName}sort[]]\" variable=\"tag\">\n<<tag-button>>\n</$list>\n</div>\n</$reveal>\n</div>\n</$set>\n\\end\n"
},
"$:/core/macros/tag": {
"title": "$:/core/macros/tag",
"tags": "$:/tags/Macro",
"text": "\\define tag-pill-styles()\nbackground-color:$(backgroundColor)$;\nfill:$(foregroundColor)$;\ncolor:$(foregroundColor)$;\n\\end\n\n\\define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions)\n<$vars foregroundColor=<<contrastcolour target:\"\"\"$colour$\"\"\" fallbackTarget:\"\"\"$fallbackTarget$\"\"\" colourA:\"\"\"$colourA$\"\"\" colourB:\"\"\"$colourB$\"\"\">> backgroundColor=\"\"\"$colour$\"\"\">\n<$element-tag$ $element-attributes$ class=\"tc-tag-label tc-btn-invisible\" style=<<tag-pill-styles>>>\n$actions$<$transclude tiddler=\"\"\"$icon$\"\"\"/> <$view tiddler=\"\"\"$tag$\"\"\" field=\"title\" format=\"text\" />\n</$element-tag$>\n</$vars>\n\\end\n\n\\define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions)\n<$macrocall $name=\"tag-pill-inner\" tag=\"\"\"$tag$\"\"\" icon=\"\"\"$icon$\"\"\" colour=\"\"\"$colour$\"\"\" fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag=\"\"\"$element-tag$\"\"\" element-attributes=\"\"\"$element-attributes$\"\"\" actions=\"\"\"$actions$\"\"\"/>\n\\end\n\n\\define tag-pill(tag,element-tag:\"span\",element-attributes:\"\",actions:\"\")\n<span class=\"tc-tag-list-item\">\n<$macrocall $name=\"tag-pill-body\" tag=\"\"\"$tag$\"\"\" icon={{$tag$!!icon}} colour={{$tag$!!color}} palette={{$:/palette}} element-tag=\"\"\"$element-tag$\"\"\" element-attributes=\"\"\"$element-attributes$\"\"\" actions=\"\"\"$actions$\"\"\"/>\n</span>\n\\end\n\n\\define tag(tag)\n{{$tag$||$:/core/ui/TagTemplate}}\n\\end\n"
},
"$:/core/macros/thumbnails": {
"title": "$:/core/macros/thumbnails",
"tags": "$:/tags/Macro",
"text": "\\define thumbnail(link,icon,color,background-color,image,caption,width:\"280\",height:\"157\")\n<$link to=\"\"\"$link$\"\"\"><div class=\"tc-thumbnail-wrapper\">\n<div class=\"tc-thumbnail-image\" style=\"width:$width$px;height:$height$px;\"><$reveal type=\"nomatch\" text=\"\" default=\"\"\"$image$\"\"\" tag=\"div\" style=\"width:$width$px;height:$height$px;\">\n[img[$image$]]\n</$reveal><$reveal type=\"match\" text=\"\" default=\"\"\"$image$\"\"\" tag=\"div\" class=\"tc-thumbnail-background\" style=\"width:$width$px;height:$height$px;background-color:$background-color$;\"></$reveal></div><div class=\"tc-thumbnail-icon\" style=\"fill:$color$;color:$color$;\">\n$icon$\n</div><div class=\"tc-thumbnail-caption\">\n$caption$\n</div>\n</div></$link>\n\\end\n\n\\define thumbnail-right(link,icon,color,background-color,image,caption,width:\"280\",height:\"157\")\n<div class=\"tc-thumbnail-right-wrapper\"><<thumbnail \"\"\"$link$\"\"\" \"\"\"$icon$\"\"\" \"\"\"$color$\"\"\" \"\"\"$background-color$\"\"\" \"\"\"$image$\"\"\" \"\"\"$caption$\"\"\" \"\"\"$width$\"\"\" \"\"\"$height$\"\"\">></div>\n\\end\n\n\\define list-thumbnails(filter,width:\"280\",height:\"157\")\n<$list filter=\"\"\"$filter$\"\"\"><$macrocall $name=\"thumbnail\" link={{!!link}} icon={{!!icon}} color={{!!color}} background-color={{!!background-color}} image={{!!image}} caption={{!!caption}} width=\"\"\"$width$\"\"\" height=\"\"\"$height$\"\"\"/></$list>\n\\end\n"
},
"$:/core/macros/timeline": {
"title": "$:/core/macros/timeline",
"created": "20141212105914482",
"modified": "20141212110330815",
"tags": "$:/tags/Macro",
"text": "\\define timeline-title()\n<!-- Override this macro with a global macro \n of the same name if you need to change \n how titles are displayed on the timeline \n -->\n<$view field=\"title\"/>\n\\end\n\\define timeline(limit:\"100\",format:\"DDth MMM YYYY\",subfilter:\"\",dateField:\"modified\")\n<div class=\"tc-timeline\">\n<$list filter=\"[!is[system]$subfilter$has[$dateField$]!sort[$dateField$]limit[$limit$]eachday[$dateField$]]\">\n<div class=\"tc-menu-list-item\">\n<$view field=\"$dateField$\" format=\"date\" template=\"$format$\"/>\n<$list filter=\"[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]\">\n<div class=\"tc-menu-list-subitem\">\n<$link to={{!!title}}>\n<<timeline-title>>\n</$link>\n</div>\n</$list>\n</div>\n</$list>\n</div>\n\\end\n"
},
"$:/core/macros/toc": {
"title": "$:/core/macros/toc",
"tags": "$:/tags/Macro",
"text": "\\define toc-caption()\n<$set name=\"tv-wikilinks\" value=\"no\">\n <$transclude field=\"caption\">\n <$view field=\"title\"/>\n </$transclude>\n</$set>\n\\end\n\n\\define toc-body(tag,sort:\"\",itemClassFilter,exclude,path)\n<ol class=\"tc-toc\">\n <$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] $exclude$\"\"\">\n <$vars item=<<currentTiddler>> path=\"\"\"$path$/$tag$\"\"\" excluded=\"\"\"$exclude$ -[[$tag$]]\"\"\">\n <$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" emptyValue=\"toc-item\" value=\"toc-item-selected\">\n <li class=<<toc-item-class>>>\n <$list filter=\"[all[current]toc-link[no]]\" emptyMessage=\"<$link><$view field='caption'><$view field='title'/></$view></$link>\">\n <<toc-caption>>\n </$list>\n <$macrocall $name=\"toc-body\" tag=<<item>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=<<excluded>> path=<<path>>/>\n </li>\n </$set>\n </$vars>\n </$list>\n</ol>\n\\end\n\n\\define toc(tag,sort:\"\",itemClassFilter:\" \")\n<<toc-body tag:\"\"\"$tag$\"\"\" sort:\"\"\"$sort$\"\"\" itemClassFilter:\"\"\"$itemClassFilter$\"\"\">>\n\\end\n\n\\define toc-linked-expandable-body(tag,sort:\"\",itemClassFilter,exclude,path)\n<!-- helper function -->\n<$set name=\"toc-state\" value=<<qualify \"\"\"$:/state/toc$path$-$(currentTiddler)$\"\"\">>>\n <$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" emptyValue=\"toc-item\" value=\"toc-item-selected\">\n <li class=<<toc-item-class>>>\n <$link>\n <$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n {{$:/core/images/right-arrow}}\n </$button>\n </$reveal>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n {{$:/core/images/down-arrow}}\n </$button>\n </$reveal>\n <<toc-caption>>\n </$link>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=\"\"\"$exclude$\"\"\" path=\"\"\"$path$\"\"\"/>\n </$reveal>\n </li>\n </$set>\n</$set>\n\\end\n\n\\define toc-unlinked-expandable-body(tag,sort:\"\",itemClassFilter:\" \",exclude,path)\n<!-- helper function -->\n<$set name=\"toc-state\" value=<<qualify \"\"\"$:/state/toc$path$-$(currentTiddler)$\"\"\">>>\n <$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" emptyValue=\"toc-item\" value=\"toc-item-selected\">\n <li class=<<toc-item-class>>>\n <$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n {{$:/core/images/right-arrow}}\n <<toc-caption>>\n </$button>\n </$reveal>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n {{$:/core/images/down-arrow}}\n <<toc-caption>>\n </$button>\n </$reveal>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$macrocall $name=\"toc-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=\"\"\"$exclude$\"\"\" path=\"\"\"$path$\"\"\"/>\n </$reveal>\n </li>\n </$set>\n</$set>\n\\end\n\n\\define toc-expandable-empty-message()\n<<toc-linked-expandable-body tag:\"\"\"$(tag)$\"\"\" sort:\"\"\"$(sort)$\"\"\" itemClassFilter:\"\"\"$(itemClassFilter)$\"\"\" exclude:\"\"\"$(excluded)$\"\"\" path:\"\"\"$(path)$\"\"\">>\n\\end\n\n\\define toc-expandable(tag,sort:\"\",itemClassFilter:\" \",exclude,path)\n<$vars tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" excluded=\"\"\"$exclude$ -[[$tag$]]\"\"\" path=\"\"\"$path$/$tag$\"\"\">\n <ol class=\"tc-toc toc-expandable\">\n <$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] $exclude$\"\"\">\n <$list filter=\"[all[current]toc-link[no]]\" emptyMessage=<<toc-expandable-empty-message>> >\n <$macrocall $name=\"toc-unlinked-expandable-body\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"itemClassFilter\"\"\" exclude=<<excluded>> path=<<path>> />\n </$list>\n </$list>\n </ol>\n</$vars>\n\\end\n\n\\define toc-linked-selective-expandable-body(tag,sort:\"\",itemClassFilter:\" \",exclude,path)\n<$set name=\"toc-state\" value=<<qualify \"\"\"$:/state/toc$path$-$(currentTiddler)$\"\"\">>>\n <$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" emptyValue=\"toc-item\" value=\"toc-item-selected\" >\n <li class=<<toc-item-class>>>\n <$link>\n <$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button>\">\n <$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n {{$:/core/images/right-arrow}}\n </$button>\n </$reveal>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n {{$:/core/images/down-arrow}}\n </$button>\n </$reveal>\n </$list>\n <<toc-caption>>\n </$link>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$macrocall $name=\"toc-selective-expandable\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=\"\"\"$exclude$\"\"\" path=\"\"\"$path$\"\"\"/>\n </$reveal>\n </li>\n </$set>\n</$set>\n\\end\n\n\\define toc-unlinked-selective-expandable-body(tag,sort:\"\",itemClassFilter:\" \",exclude,path)\n<$set name=\"toc-state\" value=<<qualify \"\"\"$:/state/toc$path$-$(currentTiddler)$\"\"\">>>\n <$set name=\"toc-item-class\" filter=\"\"\"$itemClassFilter$\"\"\" emptyValue=\"toc-item\" value=\"toc-item-selected\">\n <li class=<<toc-item-class>>>\n <$list filter=\"[all[current]tagging[]limit[1]]\" variable=\"ignore\" emptyMessage=\"<$button class='tc-btn-invisible'>{{$:/core/images/blank}}</$button> <$view field='caption'><$view field='title'/></$view>\">\n <$reveal type=\"nomatch\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"open\" class=\"tc-btn-invisible\">\n {{$:/core/images/right-arrow}}\n <<toc-caption>>\n </$button>\n </$reveal>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$button set=<<toc-state>> setTo=\"close\" class=\"tc-btn-invisible\">\n {{$:/core/images/down-arrow}}\n <<toc-caption>>\n </$button>\n </$reveal>\n </$list>\n <$reveal type=\"match\" state=<<toc-state>> text=\"open\">\n <$macrocall $name=\"\"\"toc-selective-expandable\"\"\" tag=<<currentTiddler>> sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=\"\"\"$exclude$\"\"\" path=\"\"\"$path$\"\"\"/>\n </$reveal>\n </li>\n </$set>\n</$set>\n\\end\n\n\\define toc-selective-expandable-empty-message()\n<<toc-linked-selective-expandable-body tag:\"\"\"$(tag)$\"\"\" sort:\"\"\"$(sort)$\"\"\" itemClassFilter:\"\"\"$(itemClassFilter)$\"\"\" exclude:\"\"\"$(excluded)$\"\"\" path:\"\"\"$(path)$\"\"\">>\n\\end\n\n\\define toc-selective-expandable(tag,sort:\"\",itemClassFilter,exclude,path)\n<$vars tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" excluded=\"\"\"$exclude$ -[[$tag$]]\"\"\" path=\"\"\"$path$/$tag$\"\"\">\n <ol class=\"tc-toc toc-selective-expandable\">\n <$list filter=\"\"\"[all[shadows+tiddlers]tag[$tag$]!has[draft.of]$sort$] $exclude$\"\"\">\n <$list filter=\"[all[current]toc-link[no]]\" variable=\"ignore\" emptyMessage=<<toc-selective-expandable-empty-message>> >\n <$macrocall $name=toc-unlinked-selective-expandable-body tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=\"\"\"$itemClassFilter$\"\"\" exclude=<<excluded>> path=<<path>> >\n </$list>\n </$list>\n </ol>\n</$vars>\n\\end\n\n\\define toc-tabbed-selected-item-filter(selectedTiddler)\n[all[current]field:title{$selectedTiddler$}]\n\\end\n\n\\define toc-tabbed-external-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\n<$tiddler tiddler={{$selectedTiddler$}}>\n <div class=\"tc-tabbed-table-of-contents\">\n <$linkcatcher to=\"$selectedTiddler$\">\n <div class=\"tc-table-of-contents\">\n <$macrocall $name=\"toc-selective-expandable\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" itemClassFilter=<<toc-tabbed-selected-item-filter selectedTiddler:\"\"\"$selectedTiddler$\"\"\">>/>\n </div>\n </$linkcatcher>\n <div class=\"tc-tabbed-table-of-contents-content\">\n <$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"nomatch\" text=\"\">\n <$transclude mode=\"block\" tiddler=\"$template$\">\n <h1><<toc-caption>></h1>\n <$transclude mode=\"block\">$missingText$</$transclude>\n </$transclude>\n </$reveal>\n <$reveal state=\"\"\"$selectedTiddler$\"\"\" type=\"match\" text=\"\">\n $unselectedText$\n </$reveal>\n </div>\n </div>\n</$tiddler>\n\\end\n\n\\define toc-tabbed-internal-nav(tag,sort:\"\",selectedTiddler:\"$:/temp/toc/selectedTiddler\",unselectedText,missingText,template:\"\")\n<$linkcatcher to=\"\"\"$selectedTiddler$\"\"\">\n <$macrocall $name=\"toc-tabbed-external-nav\" tag=\"\"\"$tag$\"\"\" sort=\"\"\"$sort$\"\"\" selectedTiddler=\"\"\"$selectedTiddler$\"\"\" unselectedText=\"\"\"$unselectedText$\"\"\" missingText=\"\"\"$missingText$\"\"\" template=\"\"\"$template$\"\"\"/>\n</$linkcatcher>\n\\end\n\n"
},
"$:/core/macros/translink": {
"title": "$:/core/macros/translink",
"tags": "$:/tags/Macro",
"text": "\\define translink(title,mode:\"block\")\n<div style=\"border:1px solid #ccc; padding: 0.5em; background: black; foreground; white;\">\n<$link to=\"\"\"$title$\"\"\">\n<$text text=\"\"\"$title$\"\"\"/>\n</$link>\n<div style=\"border:1px solid #ccc; padding: 0.5em; background: white; foreground; black;\">\n<$transclude tiddler=\"\"\"$title$\"\"\" mode=\"$mode$\">\n\"<$text text=\"\"\"$title$\"\"\"/>\" is missing\n</$transclude>\n</div>\n</div>\n\\end\n"
},
"$:/core/macros/tree": {
"title": "$:/core/macros/tree",
"tags": "$:/tags/Macro",
"text": "\\define leaf-node(prefix)\n<li>\n<$list filter=\"\"\"[[$prefix$$(chunk)$]is[shadow]] [[$prefix$$(chunk)$]is[tiddler]] +[removeprefix[$prefix$]] +[limit[1]]\"\"\" \nemptyMessage=\"\"\"<$text text=\"$prefix$$(chunk)$\"/>\"\"\">\n<span>{{$:/core/images/file}}</span> <$link to=\"\"\"$prefix$$(chunk)$\"\"\">\n<$view field=\"title\"/>\n</$link> \n</$list>\n</li>\n\\end\n\n\\define branch-node(prefix)\n<$reveal type=\"nomatch\" text=\"\" default=\"\"\"$(chunk)$\"\"\">\n<li> \n<$list filter=\"\"\"[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]\"\"\">\n<$reveal type=\"nomatch\" state=\"\"\"$:/state/tree/$prefix$$(chunk)$\"\"\" text=\"show\">\n<$button set=\"\"\"$:/state/tree/$prefix$$(chunk)$\"\"\" setTo=\"show\" class=\"tc-btn-invisible\">{{$:/core/images/folder}} <$text text=\"\"\"$(chunk)$\"\"\"/></$button>\n</$reveal>\n<$reveal type=\"match\" state=\"\"\"$:/state/tree/$prefix$$(chunk)$\"\"\" text=\"show\">\n<$button set=\"\"\"$:/state/tree/$prefix$$(chunk)$\"\"\" setTo=\"hide\" class=\"tc-btn-invisible\">{{$:/core/images/folder}} <$text text=\"\"\"$(chunk)$\"\"\"/></$button>\n</$reveal>\n</$list>\n<$list filter=\"\"\"[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]] +[limit[1]]\"\"\"><span>(<$count filter=\"\"\"[all[shadows+tiddlers]prefix[$prefix$$(chunk)$]] -[[$prefix$$(chunk)$]]\"\"\"/>)</span>\n<$reveal type=\"match\" state=\"\"\"$:/state/tree/$prefix$$(chunk)$\"\"\" text=\"show\">\n<$macrocall $name=\"tree-node\" prefix=\"\"\"$prefix$$(chunk)$\"\"\"/>\n</$reveal>\n</$list>\n</li>\n</$reveal>\n\\end\n\n\\define tree-node(prefix)\n<ol>\n<$list filter=\"[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[!suffix[/]]\" variable=\"chunk\">\n<<leaf-node \"\"\"$prefix$\"\"\">>\n</$list>\n<$list filter=\"[all[shadows+tiddlers]removeprefix[$prefix$]splitbefore[/]sort[title]] +[suffix[/]]\" variable=\"chunk\">\n<<branch-node \"\"\"$prefix$\"\"\">>\n</$list>\n</ol>\n\\end\n\n\\define tree(prefix)\n<div class=\"tc-tree\">\n<span><$text text=\"\"\"$prefix$\"\"\"/></span>\n<div>\n<$macrocall $name=\"tree-node\" prefix=\"\"\"$prefix$\"\"\"/>\n</div>\n</div>\n\\end\n"
},
"$:/snippets/minilanguageswitcher": {
"title": "$:/snippets/minilanguageswitcher",
"text": "<$select tiddler=\"$:/language\">\n<$list filter=\"[[$:/languages/en-GB]] [plugin-type[language]sort[title]]\">\n<option value=<<currentTiddler>>><$view field=\"description\"><$view field=\"name\"><$view field=\"title\"/></$view></$view></option>\n</$list>\n</$select>"
},
"$:/snippets/minithemeswitcher": {
"title": "$:/snippets/minithemeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\n<<lingo Prompt>> <$select tiddler=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\">\n<option value=<<currentTiddler>>><$view field=\"name\"><$view field=\"title\"/></$view></option>\n</$list>\n</$select>"
},
"$:/snippets/modules": {
"title": "$:/snippets/modules",
"text": "\\define describeModuleType(type)\n{{$:/language/Docs/ModuleTypes/$type$}}\n\\end\n<$list filter=\"[moduletypes[]]\">\n\n!! <$macrocall $name=\"currentTiddler\" $type=\"text/plain\" $output=\"text/plain\"/>\n\n<$macrocall $name=\"describeModuleType\" type=<<currentTiddler>>/>\n\n<ul><$list filter=\"[all[current]modules[]]\"><li><$link><<currentTiddler>></$link>\n</li>\n</$list>\n</ul>\n</$list>\n"
},
"$:/palette": {
"title": "$:/palette",
"text": "$:/palettes/Vanilla"
},
"$:/snippets/paletteeditor": {
"title": "$:/snippets/paletteeditor",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/Editor/\n\\define describePaletteColour(colour)\n<$transclude tiddler=\"$:/language/Docs/PaletteColours/$colour$\"><$text text=\"$colour$\"/></$transclude>\n\\end\n<$set name=\"currentTiddler\" value={{$:/palette}}>\n\n<<lingo Prompt>> <$link to={{$:/palette}}><$macrocall $name=\"currentTiddler\" $output=\"text/plain\"/></$link>\n\n<$list filter=\"[all[current]is[shadow]is[tiddler]]\" variable=\"listItem\">\n<<lingo Prompt/Modified>>\n<$button message=\"tm-delete-tiddler\" param={{$:/palette}}><<lingo Reset/Caption>></$button>\n</$list>\n\n<$list filter=\"[all[current]is[shadow]!is[tiddler]]\" variable=\"listItem\">\n<<lingo Clone/Prompt>>\n</$list>\n\n<$button message=\"tm-new-tiddler\" param={{$:/palette}}><<lingo Clone/Caption>></$button>\n\n<table>\n<tbody>\n<$list filter=\"[all[current]indexes[]]\" variable=\"colourName\">\n<tr>\n<td>\n''<$macrocall $name=\"describePaletteColour\" colour=<<colourName>>/>''<br/>\n<$macrocall $name=\"colourName\" $output=\"text/plain\"/>\n</td>\n<td>\n<$edit-text index=<<colourName>> tag=\"input\"/>\n<br>\n<$edit-text index=<<colourName>> type=\"color\" tag=\"input\"/>\n</td>\n</tr>\n</$list>\n</tbody>\n</table>\n</$set>\n"
},
"$:/snippets/palettepreview": {
"title": "$:/snippets/palettepreview",
"text": "<$set name=\"currentTiddler\" value={{$:/palette}}>\n<$transclude tiddler=\"$:/snippets/currpalettepreview\"/>\n</$set>\n"
},
"$:/snippets/paletteswitcher": {
"title": "$:/snippets/paletteswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Palette/\n<div class=\"tc-prompt\">\n<<lingo Prompt>> <$view tiddler={{$:/palette}} field=\"name\"/>\n</div>\n\n<$linkcatcher to=\"$:/palette\">\n<div class=\"tc-chooser\"><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Palette]sort[description]]\"><div class=\"tc-chooser-item\"><$link to={{!!title}}><div><$reveal state=\"$:/palette\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/palette\" type=\"nomatch\" text={{!!title}}> </$reveal> ''<$view field=\"name\" format=\"text\"/>'' - <$view field=\"description\" format=\"text\"/></div><$transclude tiddler=\"$:/snippets/currpalettepreview\"/></$link></div>\n</$list>\n</div>\n</$linkcatcher>"
},
"$:/temp/search": {
"title": "$:/temp/search",
"text": ""
},
"$:/tags/AdvancedSearch": {
"title": "$:/tags/AdvancedSearch",
"list": "[[$:/core/ui/AdvancedSearch/Standard]] [[$:/core/ui/AdvancedSearch/System]] [[$:/core/ui/AdvancedSearch/Shadows]] [[$:/core/ui/AdvancedSearch/Filter]]"
},
"$:/tags/AdvancedSearch/FilterButton": {
"title": "$:/tags/AdvancedSearch/FilterButton",
"list": "$:/core/ui/AdvancedSearch/Filter/FilterButtons/dropdown $:/core/ui/AdvancedSearch/Filter/FilterButtons/clear $:/core/ui/AdvancedSearch/Filter/FilterButtons/export $:/core/ui/AdvancedSearch/Filter/FilterButtons/delete"
},
"$:/tags/ControlPanel": {
"title": "$:/tags/ControlPanel",
"list": "$:/core/ui/ControlPanel/Info $:/core/ui/ControlPanel/Appearance $:/core/ui/ControlPanel/Settings $:/core/ui/ControlPanel/Saving $:/core/ui/ControlPanel/Plugins $:/core/ui/ControlPanel/Tools $:/core/ui/ControlPanel/Internals"
},
"$:/tags/ControlPanel/Info": {
"title": "$:/tags/ControlPanel/Info",
"list": "$:/core/ui/ControlPanel/Basics $:/core/ui/ControlPanel/Advanced"
},
"$:/tags/ControlPanel/Plugins": {
"title": "$:/tags/ControlPanel/Plugins",
"list": "[[$:/core/ui/ControlPanel/Plugins/Installed]] [[$:/core/ui/ControlPanel/Plugins/Add]]"
},
"$:/tags/EditTemplate": {
"title": "$:/tags/EditTemplate",
"list": "[[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/shadow]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]"
},
"$:/tags/EditToolbar": {
"title": "$:/tags/EditToolbar",
"list": "[[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/cancel]] [[$:/core/ui/Buttons/save]]"
},
"$:/tags/EditorToolbar": {
"title": "$:/tags/EditorToolbar",
"list": "$:/core/ui/EditorToolbar/paint $:/core/ui/EditorToolbar/opacity $:/core/ui/EditorToolbar/line-width $:/core/ui/EditorToolbar/clear $:/core/ui/EditorToolbar/bold $:/core/ui/EditorToolbar/italic $:/core/ui/EditorToolbar/strikethrough $:/core/ui/EditorToolbar/underline $:/core/ui/EditorToolbar/superscript $:/core/ui/EditorToolbar/subscript $:/core/ui/EditorToolbar/mono-line $:/core/ui/EditorToolbar/mono-block $:/core/ui/EditorToolbar/quote $:/core/ui/EditorToolbar/list-bullet $:/core/ui/EditorToolbar/list-number $:/core/ui/EditorToolbar/heading-1 $:/core/ui/EditorToolbar/heading-2 $:/core/ui/EditorToolbar/heading-3 $:/core/ui/EditorToolbar/heading-4 $:/core/ui/EditorToolbar/heading-5 $:/core/ui/EditorToolbar/heading-6 $:/core/ui/EditorToolbar/link $:/core/ui/EditorToolbar/excise $:/core/ui/EditorToolbar/picture $:/core/ui/EditorToolbar/stamp $:/core/ui/EditorToolbar/size $:/core/ui/EditorToolbar/editor-height $:/core/ui/EditorToolbar/more $:/core/ui/EditorToolbar/preview $:/core/ui/EditorToolbar/preview-type"
},
"$:/tags/Manager/ItemMain": {
"title": "$:/tags/Manager/ItemMain",
"list": "$:/Manager/ItemMain/WikifiedText $:/Manager/ItemMain/RawText $:/Manager/ItemMain/Fields"
},
"$:/tags/Manager/ItemSidebar": {
"title": "$:/tags/Manager/ItemSidebar",
"list": "$:/Manager/ItemSidebar/Tags $:/Manager/ItemSidebar/Colour $:/Manager/ItemSidebar/Icon $:/Manager/ItemSidebar/Tools"
},
"$:/tags/MoreSideBar": {
"title": "$:/tags/MoreSideBar",
"list": "[[$:/core/ui/MoreSideBar/All]] [[$:/core/ui/MoreSideBar/Recent]] [[$:/core/ui/MoreSideBar/Tags]] [[$:/core/ui/MoreSideBar/Missing]] [[$:/core/ui/MoreSideBar/Drafts]] [[$:/core/ui/MoreSideBar/Orphans]] [[$:/core/ui/MoreSideBar/Types]] [[$:/core/ui/MoreSideBar/System]] [[$:/core/ui/MoreSideBar/Shadows]] [[$:/core/ui/MoreSideBar/Explorer]] [[$:/core/ui/MoreSideBar/Plugins]]",
"text": ""
},
"$:/tags/PageControls": {
"title": "$:/tags/PageControls",
"list": "[[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/fold-all]] [[$:/core/ui/Buttons/unfold-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/new-journal]] [[$:/core/ui/Buttons/new-image]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/export-page]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/advanced-search]] [[$:/core/ui/Buttons/manager]] [[$:/core/ui/Buttons/tag-manager]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/palette]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/timestamp]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/print]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/refresh]] [[$:/core/ui/Buttons/more-page-actions]]"
},
"$:/tags/PageTemplate": {
"title": "$:/tags/PageTemplate",
"list": "[[$:/core/ui/PageTemplate/topleftbar]] [[$:/core/ui/PageTemplate/toprightbar]] [[$:/core/ui/PageTemplate/sidebar]] [[$:/core/ui/PageTemplate/story]] [[$:/core/ui/PageTemplate/alerts]]",
"text": ""
},
"$:/tags/SideBar": {
"title": "$:/tags/SideBar",
"list": "[[$:/core/ui/SideBar/Open]] [[$:/core/ui/SideBar/Recent]] [[$:/core/ui/SideBar/Tools]] [[$:/core/ui/SideBar/More]]",
"text": ""
},
"$:/tags/TiddlerInfo": {
"title": "$:/tags/TiddlerInfo",
"list": "[[$:/core/ui/TiddlerInfo/Tools]] [[$:/core/ui/TiddlerInfo/References]] [[$:/core/ui/TiddlerInfo/Tagging]] [[$:/core/ui/TiddlerInfo/List]] [[$:/core/ui/TiddlerInfo/Listed]] [[$:/core/ui/TiddlerInfo/Fields]]",
"text": ""
},
"$:/tags/TiddlerInfo/Advanced": {
"title": "$:/tags/TiddlerInfo/Advanced",
"list": "[[$:/core/ui/TiddlerInfo/Advanced/ShadowInfo]] [[$:/core/ui/TiddlerInfo/Advanced/PluginInfo]]"
},
"$:/tags/ViewTemplate": {
"title": "$:/tags/ViewTemplate",
"list": "[[$:/core/ui/ViewTemplate/title]] [[$:/core/ui/ViewTemplate/unfold]] [[$:/core/ui/ViewTemplate/subtitle]] [[$:/core/ui/ViewTemplate/tags]] [[$:/core/ui/ViewTemplate/classic]] [[$:/core/ui/ViewTemplate/body]]"
},
"$:/tags/ViewToolbar": {
"title": "$:/tags/ViewToolbar",
"list": "[[$:/core/ui/Buttons/more-tiddler-actions]] [[$:/core/ui/Buttons/info]] [[$:/core/ui/Buttons/new-here]] [[$:/core/ui/Buttons/new-journal-here]] [[$:/core/ui/Buttons/clone]] [[$:/core/ui/Buttons/export-tiddler]] [[$:/core/ui/Buttons/edit]] [[$:/core/ui/Buttons/delete]] [[$:/core/ui/Buttons/permalink]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/open-window]] [[$:/core/ui/Buttons/close-others]] [[$:/core/ui/Buttons/close]] [[$:/core/ui/Buttons/fold-others]] [[$:/core/ui/Buttons/fold]]"
},
"$:/snippets/themeswitcher": {
"title": "$:/snippets/themeswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/Theme/\n<<lingo Prompt>> <$view tiddler={{$:/theme}} field=\"name\"/>\n\n<$linkcatcher to=\"$:/theme\">\n<$list filter=\"[plugin-type[theme]sort[title]]\"><div><$reveal state=\"$:/theme\" type=\"match\" text={{!!title}}>•</$reveal><$reveal state=\"$:/theme\" type=\"nomatch\" text={{!!title}}> </$reveal> <$link to={{!!title}}>''<$view field=\"name\" format=\"text\"/>'' <$view field=\"description\" format=\"text\"/></$link></div>\n</$list>\n</$linkcatcher>"
},
"$:/core/wiki/title": {
"title": "$:/core/wiki/title",
"text": "{{$:/SiteTitle}} --- {{$:/SiteSubtitle}}"
},
"$:/view": {
"title": "$:/view",
"text": "classic"
},
"$:/snippets/viewswitcher": {
"title": "$:/snippets/viewswitcher",
"text": "\\define lingo-base() $:/language/ControlPanel/StoryView/\n<<lingo Prompt>> <$select tiddler=\"$:/view\">\n<$list filter=\"[storyviews[]]\">\n<option><$view field=\"title\"/></option>\n</$list>\n</$select>"
}
}
}
/*\
title: $:/core/modules/editor/operations/text/insert-text.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to insert text at pointer
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["delete-text"] = function(event,operation) {
var props = Object.getOwnPropertyNames(operation);
console.log(props);
for (var i = 0; i<props.length; i++){
console.log(operation[props[i]]);
}
operation.replacement = "";
operation.cutStart = operation.selStart - 1;
operation.cutEnd = operation.selStart;
operation.newSelStart = operation.cutEnd - 1;
operation.newSelEnd = operation.cutEnd - 1;
};
})();
/*\
title: $:/core/modules/editor/operations/text/insert-text.js
type: application/javascript
module-type: texteditoroperation
Text editor operation to insert text at pointer
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["insert-text"] = function(event,operation) {
operation.replacement = event.paramObject.text;
operation.cutStart = operation.selEnd;
operation.cutEnd = operation.selEnd;
operation.newSelStart = operation.selEnd + operation.replacement.length;
operation.newSelEnd = operation.selEnd + operation.replacement.length;
};
})();
/*\
title: $:/core/modules/utils/dom.js
type: application/javascript
module-type: utils
Various static DOM-related utility functions.
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Determines whether element 'a' contains element 'b'
Code thanks to John Resig, http://ejohn.org/blog/comparing-document-position/
*/
exports.domContains = function(a,b) {
return a.contains ?
a !== b && a.contains(b) :
!!(a.compareDocumentPosition(b) & 16);
};
exports.removeChildren = function(node) {
while(node.hasChildNodes()) {
node.removeChild(node.firstChild);
}
};
exports.hasClass = function(el,className) {
return el && el.className && el.className.toString().split(" ").indexOf(className) !== -1;
};
exports.addClass = function(el,className) {
var c = el.className.split(" ");
if(c.indexOf(className) === -1) {
c.push(className);
}
el.className = c.join(" ");
};
exports.removeClass = function(el,className) {
var c = el.className.split(" "),
p = c.indexOf(className);
if(p !== -1) {
c.splice(p,1);
el.className = c.join(" ");
}
};
exports.toggleClass = function(el,className,status) {
if(status === undefined) {
status = !exports.hasClass(el,className);
}
if(status) {
exports.addClass(el,className);
} else {
exports.removeClass(el,className);
}
};
/*
Get the first parent element that has scrollbars or use the body as fallback.
*/
exports.getScrollContainer = function(el) {
var doc = el.ownerDocument;
while(el.parentNode) {
el = el.parentNode;
if(el.scrollTop) {
return el;
}
}
return doc.body;
};
/*
Get the scroll position of the viewport
Returns:
{
x: horizontal scroll position in pixels,
y: vertical scroll position in pixels
}
*/
exports.getScrollPosition = function() {
if("scrollX" in window || "scrollY" in window) {
return {x: window.scrollX, y: window.scrollY};
} else {
return {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};
}
};
/*
Adjust the height of a textarea to fit its content, preserving scroll position, and return the height
*/
exports.resizeTextAreaToFit = function(domNode,minHeight) {
// Get the scroll container and register the current scroll position
var container = $tw.utils.getScrollContainer(domNode),
scrollTop = container.scrollTop;
// Measure the specified minimum height
domNode.style.height = minHeight;
var measuredHeight = domNode.offsetHeight;
// Set its height to auto so that it snaps to the correct height
domNode.style.height = "auto";
// Calculate the revised height
var newHeight = Math.max(domNode.scrollHeight + domNode.offsetHeight - domNode.clientHeight,measuredHeight);
// Only try to change the height if it has changed
if(newHeight !== domNode.offsetHeight) {
domNode.style.height = newHeight + "px";
// Make sure that the dimensions of the textarea are recalculated
$tw.utils.forceLayout(domNode);
// Set the container to the position we registered at the beginning
container.scrollTop = scrollTop;
}
return newHeight;
};
/*
Gets the bounding rectangle of an element in absolute page coordinates
*/
exports.getBoundingPageRect = function(element) {
var scrollPos = $tw.utils.getScrollPosition(),
clientRect = element.getBoundingClientRect();
return {
left: clientRect.left + scrollPos.x,
width: clientRect.width,
right: clientRect.right + scrollPos.x,
top: clientRect.top + scrollPos.y,
height: clientRect.height,
bottom: clientRect.bottom + scrollPos.y
};
};
/*
Saves a named password in the browser
*/
exports.savePassword = function(name,password) {
try {
if(window.localStorage) {
localStorage.setItem("tw5-password-" + name,password);
}
} catch(e) {
}
};
/*
Retrieve a named password from the browser
*/
exports.getPassword = function(name) {
try {
return window.localStorage ? localStorage.getItem("tw5-password-" + name) : "";
} catch(e) {
return "";
}
};
/*
Force layout of a dom node and its descendents
*/
exports.forceLayout = function(element) {
var dummy = element.offsetWidth;
};
/*
Pulse an element for debugging purposes
*/
exports.pulseElement = function(element) {
// Event handler to remove the class at the end
element.addEventListener($tw.browser.animationEnd,function handler(event) {
element.removeEventListener($tw.browser.animationEnd,handler,false);
$tw.utils.removeClass(element,"pulse");
},false);
// Apply the pulse class
$tw.utils.removeClass(element,"pulse");
$tw.utils.forceLayout(element);
$tw.utils.addClass(element,"pulse");
};
/*
Attach specified event handlers to a DOM node
domNode: where to attach the event handlers
events: array of event handlers to be added (see below)
Each entry in the events array is an object with these properties:
handlerFunction: optional event handler function
handlerObject: optional event handler object
handlerMethod: optionally specifies object handler method name (defaults to `handleEvent`)
*/
exports.addEventListeners = function(domNode,events) {
$tw.utils.each(events,function(eventInfo) {
var handler;
if(eventInfo.handlerFunction) {
handler = eventInfo.handlerFunction;
} else if(eventInfo.handlerObject) {
if(eventInfo.handlerMethod) {
handler = function(event) {
eventInfo.handlerObject[eventInfo.handlerMethod].call(eventInfo.handlerObject,event);
};
} else {
handler = eventInfo.handlerObject;
}
}
domNode.addEventListener(eventInfo.name,handler,false);
});
};
/*
Get the computed styles applied to an element as an array of strings of individual CSS properties
*/
exports.getComputedStyles = function(domNode) {
var textAreaStyles = window.getComputedStyle(domNode,null),
styleDefs = [],
name;
for(var t=0; t<textAreaStyles.length; t++) {
name = textAreaStyles[t];
styleDefs.push(name + ": " + textAreaStyles.getPropertyValue(name) + ";");
}
return styleDefs;
};
/*
Apply a set of styles passed as an array of strings of individual CSS properties
*/
exports.setStyles = function(domNode,styleDefs) {
domNode.style.cssText = styleDefs.join("");
};
/*
Copy the computed styles from a source element to a destination element
*/
exports.copyStyles = function(srcDomNode,dstDomNode) {
$tw.utils.setStyles(dstDomNode,$tw.utils.getComputedStyles(srcDomNode));
};
})();
/*\
title: $:/core/modules/utils/dom/dragndrop.js
type: application/javascript
module-type: utils
Browser data transfer utilities, used with the clipboard and drag and drop
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Options:
domNode: dom node to make draggable
dragImageType: "pill" or "dom"
dragTiddlerFn: optional function to retrieve the title of tiddler to drag
dragFilterFn: optional function to retreive the filter defining a list of tiddlers to drag
widget: widget to use as the contect for the filter
*/
exports.makeDraggable = function(options) {
var dragImageType = options.dragImageType || "dom",
dragImage,
domNode = options.domNode;
// Make the dom node draggable (not necessary for anchor tags)
if((domNode.tagName || "").toLowerCase() !== "a") {
domNode.setAttribute("draggable","true");
}
// Add event handlers
$tw.utils.addEventListeners(domNode,[
{name: "dragstart", handlerFunction: function(event) {
if (event.dataTransfer === undefined) {
return false;
}
// Collect the tiddlers being dragged
var dragTiddler = options.dragTiddlerFn && options.dragTiddlerFn(),
dragFilter = options.dragFilterFn && options.dragFilterFn(),
titles = dragTiddler ? [dragTiddler] : [];
if(dragFilter) {
titles.push.apply(titles,options.widget.wiki.filterTiddlers(dragFilter,options.widget));
}
var titleString = $tw.utils.stringifyList(titles);
// Check that we've something to drag
if(titles.length > 0 && event.target === domNode) {
// Mark the drag in progress
$tw.dragInProgress = domNode;
// Set the dragging class on the element being dragged
$tw.utils.addClass(event.target,"tc-dragging");
// Create the drag image elements
dragImage = options.widget.document.createElement("div");
dragImage.className = "tc-tiddler-dragger";
var inner = options.widget.document.createElement("div");
inner.className = "tc-tiddler-dragger-inner";
inner.appendChild(options.widget.document.createTextNode(
titles.length === 1 ?
titles[0] :
titles.length + " tiddlers"
));
dragImage.appendChild(inner);
options.widget.document.body.appendChild(dragImage);
// Set the data transfer properties
var dataTransfer = event.dataTransfer;
// Set up the image
dataTransfer.effectAllowed = "all";
if(dataTransfer.setDragImage) {
if(dragImageType === "pill") {
dataTransfer.setDragImage(dragImage.firstChild,-16,-16);
} else {
var r = domNode.getBoundingClientRect();
dataTransfer.setDragImage(domNode,event.clientX-r.left,event.clientY-r.top);
}
}
// Set up the data transfer
if(dataTransfer.clearData) {
dataTransfer.clearData();
}
var jsonData = [];
if(titles.length > 1) {
titles.forEach(function(title) {
jsonData.push(options.widget.wiki.getTiddlerAsJson(title));
});
jsonData = "[" + jsonData.join(",") + "]";
} else {
jsonData = options.widget.wiki.getTiddlerAsJson(titles[0]);
}
// IE doesn't like these content types
if(!$tw.browser.isIE) {
dataTransfer.setData("text/vnd.tiddler",jsonData);
dataTransfer.setData("text/plain",titleString);
dataTransfer.setData("text/x-moz-url","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
}
dataTransfer.setData("URL","data:text/vnd.tiddler," + encodeURIComponent(jsonData));
dataTransfer.setData("Text",titleString);
event.stopPropagation();
}
return false;
}},
{name: "dragend", handlerFunction: function(event) {
if(event.target === domNode) {
$tw.dragInProgress = null;
// Remove the dragging class on the element being dragged
$tw.utils.removeClass(event.target,"tc-dragging");
// Delete the drag image element
if(dragImage) {
dragImage.parentNode.removeChild(dragImage);
dragImage = null;
}
}
return false;
}}
]);
};
exports.importDataTransfer = function(dataTransfer,fallbackTitle,callback) {
// Try each provided data type in turn
for(var t=0; t<importDataTypes.length; t++) {
if(!$tw.browser.isIE || importDataTypes[t].IECompatible) {
// Get the data
var dataType = importDataTypes[t];
var data = dataTransfer.getData(dataType.type);
// Import the tiddlers in the data
if(data !== "" && data !== null) {
if($tw.log.IMPORT) {
console.log("Importing data type '" + dataType.type + "', data: '" + data + "'")
}
var tiddlerFields = dataType.toTiddlerFieldsArray(data,fallbackTitle);
callback(tiddlerFields);
return;
}
}
}
};
var importDataTypes = [
{type: "text/vnd.tiddler", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {
return parseJSONTiddlers(data,fallbackTitle);
}},
{type: "URL", IECompatible: true, toTiddlerFieldsArray: function(data,fallbackTitle) {
// Check for tiddler data URI
var match = decodeURIComponent(data).match(/^data\:text\/vnd\.tiddler,(.*)/i);
if(match) {
return parseJSONTiddlers(match[1],fallbackTitle);
} else {
return [{title: fallbackTitle, text: data}]; // As URL string
}
}},
{type: "text/x-moz-url", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {
// Check for tiddler data URI
var match = decodeURIComponent(data).match(/^data\:text\/vnd\.tiddler,(.*)/i);
if(match) {
return parseJSONTiddlers(match[1],fallbackTitle);
} else {
return [{title: fallbackTitle, text: data}]; // As URL string
}
}},
{type: "text/html", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {
return [{title: fallbackTitle, text: data}];
}},
{type: "text/plain", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {
return [{title: fallbackTitle, text: data}];
}},
{type: "Text", IECompatible: true, toTiddlerFieldsArray: function(data,fallbackTitle) {
return [{title: fallbackTitle, text: data}];
}},
{type: "text/uri-list", IECompatible: false, toTiddlerFieldsArray: function(data,fallbackTitle) {
return [{title: fallbackTitle, text: data}];
}}
];
function parseJSONTiddlers(json,fallbackTitle) {
var data = JSON.parse(json);
if(!$tw.utils.isArray(data)) {
data = [data];
}
data.forEach(function(fields) {
fields.title = fields.title || fallbackTitle;
});
return data;
};
})();
/*\
title: $:/core/modules/utils/dom/scroller.js
type: application/javascript
module-type: utils
Module that creates a $tw.utils.Scroller object prototype that manages scrolling in the browser
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Event handler for when the `tm-scroll` event hits the document body
*/
var PageScroller = function() {
this.idRequestFrame = null;
this.requestAnimationFrame = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function(callback) {
return window.setTimeout(callback, 1000/60);
};
this.cancelAnimationFrame = window.cancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
function(id) {
window.clearTimeout(id);
};
};
PageScroller.prototype.cancelScroll = function() {
if(this.idRequestFrame) {
this.cancelAnimationFrame.call(window,this.idRequestFrame);
this.idRequestFrame = null;
}
};
/*
Handle an event
*/
PageScroller.prototype.handleEvent = function(event) {
if(event.type === "tm-scroll") {
return this.scrollIntoView(event.target);
}
return true;
};
/*
Handle a scroll event hitting the page document
*/
PageScroller.prototype.scrollIntoView = function(element) {
var duration = $tw.utils.getAnimationDuration();
// Now get ready to scroll the body
this.cancelScroll();
this.startTime = Date.now();
var scrollPosition = $tw.utils.getScrollPosition();
// Get the client bounds of the element and adjust by the scroll position
var clientBounds = element.getBoundingClientRect(),
bounds = {
left: clientBounds.left + scrollPosition.x,
top: clientBounds.top + scrollPosition.y,
width: clientBounds.width,
height: clientBounds.height
};
// We'll consider the horizontal and vertical scroll directions separately via this function
// targetPos/targetSize - position and size of the target element
// currentPos/currentSize - position and size of the current scroll viewport
// returns: new position of the scroll viewport
var getEndPos = function(targetPos,targetSize,currentPos,currentSize) {
var newPos = currentPos;
// If the target is above/left of the current view, then scroll to it's top/left
if(targetPos <= currentPos) {
newPos = targetPos;
// If the target is smaller than the window and the scroll position is too far up, then scroll till the target is at the bottom of the window
} else if(targetSize < currentSize && currentPos < (targetPos + targetSize - currentSize)) {
newPos = targetPos + targetSize - currentSize;
// If the target is big, then just scroll to the top
} else if(currentPos < targetPos) {
newPos = targetPos;
// Otherwise, stay where we are
} else {
newPos = currentPos;
}
// If we are scrolling within 50 pixels of the top/left then snap to zero
var tiddlerScrollOffset = parseInt($tw.wiki.getTiddlerText("$:/config/Tiddlerscrolloffset","50"),10);
if(newPos < tiddlerScrollOffset) {
newPos = 0;
}
return newPos;
},
endX = getEndPos(bounds.left,bounds.width,scrollPosition.x,window.innerWidth),
endY = getEndPos(bounds.top,bounds.height,scrollPosition.y,window.innerHeight);
// Only scroll if the position has changed
if(endX !== scrollPosition.x || endY !== scrollPosition.y) {
var self = this,
drawFrame;
drawFrame = function () {
var t;
if(duration <= 0) {
t = 1;
} else {
t = ((Date.now()) - self.startTime) / duration;
}
if(t >= 1) {
self.cancelScroll();
t = 1;
}
t = $tw.utils.slowInSlowOut(t);
window.scrollTo(scrollPosition.x + (endX - scrollPosition.x) * t,scrollPosition.y + (endY - scrollPosition.y) * t);
if(t < 1) {
self.idRequestFrame = self.requestAnimationFrame.call(window,drawFrame);
}
};
drawFrame();
}
};
exports.PageScroller = PageScroller;
})();
/*\
title: $:/core/modules/widgets/reveal.js
type: application/javascript
module-type: widget
Reveal widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var RevealWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
RevealWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
RevealWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
var tag = this.parseTreeNode.isBlock ? "div" : "span";
if(this.revealTag && $tw.config.htmlUnsafeElements.indexOf(this.revealTag) === -1) {
tag = this.revealTag;
}
var domNode = this.document.createElement(tag);
var classes = this["class"].split(" ") || [];
classes.push("tc-reveal");
domNode.className = classes.join(" ");
if(this.style) {
domNode.setAttribute("style",this.style);
}
parent.insertBefore(domNode,nextSibling);
this.renderChildren(domNode,null);
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tc-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(!this.isOpen) {
domNode.setAttribute("hidden","true");
}
this.domNodes.push(domNode);
};
RevealWidget.prototype.positionPopup = function(domNode) {
domNode.style.position = "absolute";
domNode.style.zIndex = "1000";
switch(this.position) {
case "left":
domNode.style.left = (this.popup.left - domNode.offsetWidth) + "px";
domNode.style.top = this.popup.top + "px";
break;
case "above":
domNode.style.left = this.popup.left + "px";
domNode.style.top = (this.popup.top - domNode.offsetHeight) + "px";
break;
case "aboveleft":
domNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + "px";
domNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + "px";
break;
case "aboveright":
domNode.style.left = (this.popup.left + this.popup.width) + "px";
domNode.style.top = (this.popup.top + this.popup.height - domNode.offsetHeight) + "px";
break;
case "right":
domNode.style.left = (this.popup.left + this.popup.width) + "px";
domNode.style.top = this.popup.top + "px";
break;
case "belowleft":
domNode.style.left = (this.popup.left + this.popup.width - domNode.offsetWidth) + "px";
domNode.style.top = (this.popup.top + this.popup.height) + "px";
break;
default: // Below
domNode.style.left = this.popup.left + "px";
domNode.style.top = (this.popup.top + this.popup.height) + "px";
break;
}
};
/*
Compute the internal state of the widget
*/
RevealWidget.prototype.execute = function() {
// Get our parameters
this.state = this.getAttribute("state");
this.revealTag = this.getAttribute("tag");
this.type = this.getAttribute("type");
this.text = this.getAttribute("text");
this.position = this.getAttribute("position");
this["class"] = this.getAttribute("class","");
this.style = this.getAttribute("style","");
this["default"] = this.getAttribute("default","");
this.animate = this.getAttribute("animate","no");
this.retain = this.getAttribute("retain","no");
this.openAnimation = this.animate === "no" ? undefined : "open";
this.closeAnimation = this.animate === "no" ? undefined : "close";
// Compute the title of the state tiddler and read it
this.stateTitle = this.state;
this.readState();
// Construct the child widgets
var childNodes = this.isOpen ? this.parseTreeNode.children : [];
this.hasChildNodes = this.isOpen;
this.makeChildWidgets(childNodes);
};
/*
Read the state tiddler
*/
RevealWidget.prototype.readState = function() {
// Read the information from the state tiddler
var state = this.stateTitle ? this.wiki.getTextReference(this.stateTitle,this["default"],this.getVariable("currentTiddler")) : this["default"];
switch(this.type) {
case "popup":
this.readPopupState(state);
break;
case "match":
this.readMatchState(state);
break;
case "nomatch":
this.readMatchState(state);
this.isOpen = !this.isOpen;
break;
}
};
RevealWidget.prototype.readMatchState = function(state) {
this.isOpen = state === this.text;
};
RevealWidget.prototype.readPopupState = function(state) {
var popupLocationRegExp = /^\((-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+),(-?[0-9\.E]+)\)$/,
match = popupLocationRegExp.exec(state);
// Check if the state matches the location regexp
if(match) {
// If so, we're open
this.isOpen = true;
// Get the location
this.popup = {
left: parseFloat(match[1]),
top: parseFloat(match[2]),
width: parseFloat(match[3]),
height: parseFloat(match[4])
};
} else {
// If not, we're closed
this.isOpen = false;
}
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
RevealWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.state || changedAttributes.type || changedAttributes.text || changedAttributes.position || changedAttributes["default"] || changedAttributes.animate) {
this.refreshSelf();
return true;
} else {
var refreshed = false,
currentlyOpen = this.isOpen;
this.readState();
if(this.isOpen !== currentlyOpen) {
if(this.retain === "yes") {
this.updateState();
} else {
this.refreshSelf();
refreshed = true;
}
}
return this.refreshChildren(changedTiddlers) || refreshed;
}
};
/*
Called by refresh() to dynamically show or hide the content
*/
RevealWidget.prototype.updateState = function() {
// Read the current state
this.readState();
// Construct the child nodes if needed
var domNode = this.domNodes[0];
if(this.isOpen && !this.hasChildNodes) {
this.hasChildNodes = true;
this.makeChildWidgets(this.parseTreeNode.children);
this.renderChildren(domNode,null);
}
// Animate our DOM node
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {
this.positionPopup(domNode);
$tw.utils.addClass(domNode,"tc-popup"); // Make sure that clicks don't dismiss popups within the revealed content
}
if(this.isOpen) {
domNode.removeAttribute("hidden");
$tw.anim.perform(this.openAnimation,domNode);
} else {
$tw.anim.perform(this.closeAnimation,domNode,{callback: function() {
domNode.setAttribute("hidden","true");
}});
}
};
exports.reveal = RevealWidget;
})();
\whitespace trim
\define config-title()
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
\end
<$button popup=<<qualify "$:/state/popup/more">> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text=" "/>
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem">
<$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal>
<$edit
field="text"
class="tc-edit-texteditor"
placeholder={{$:/language/EditTemplate/Body/Placeholder}}
><$set
name="targetTiddler"
value=<<currentTiddler>>
><$list
filter="[all[shadows+tiddlers]tag[$:/tags/EditorToolbar]!has[draft.of]]"
><$reveal
type="nomatch"
state=<<config-visibility-title>>
text="hide"
class="tc-text-editor-toolbar-item-wrapper"
><$transclude
tiddler="$:/core/ui/EditTemplate/body/toolbar/button"
mode="inline"
/></$reveal></$list><$transclude
tiddler="$:/plugins/BTC/osckbd/Buttons/keyboard"
mode="inline"
/></$set></$edit>
<$scrollable fallthrough="no" class="tc-sidebar-scrollable animated fadeInRight">
<div class="tc-sidebar-header">
<$reveal state="$:/state/sidebar" type="match" text="yes" default="yes" retain="yes" animate="yes">
<h1 class="tc-site-title">
<$transclude tiddler="$:/SiteTitle" mode="inline"/>
</h1>
<div class="tc-site-subtitle">
<$transclude tiddler="$:/SiteSubtitle" mode="inline"/>
</div>
{{||$:/core/ui/PageTemplate/pagecontrols}}
<$transclude tiddler="$:/core/ui/SideBarLists" mode="inline"/>
</$reveal>
</div>
</$scrollable>
<section class="tc-story-river">
<section class="story-backdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/AboveStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/core/ui/ViewTemplate" editTemplate="$:/core/ui/EditTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
<section class="story-frontdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
</section>
<$reveal state="$:/view" type="nomatch" text="muuri">
<$pan $steps="100" $targets="tc-story-river-slider" $decimals="0" $direction="horizontal" $state={{$:/core/ui/PageTemplate/story!!slidebar-state}} $statetiddler="$:/state/slidebar" $startactions="""<$action-setfield $tiddler="$:/state/sidebar" $field="text" $value="yes"/>""" $endactions="""<$set name="viewPortWidth" value=<<viewport width>>><$vars viewPortLimit=<<formula "<<viewPortWidth>> - 200 ">>><$set name="sliderBelowLimit" value=<<formula "gte({{$:/state/slidebar!!center-x}}, <<viewPortLimit>> )">>>
<$list filter="[<sliderBelowLimit>regexp[^TRUE$]]"><$action-setfield $tiddler="$:/core/ui/PageTemplate/story" $field="slidebar-state" $value="off"/><$action-setfield $field="slidebar-state" $tiddler="$:/core/ui/PageTemplate/story" $value="on"/>
<$action-setfield $tiddler="$:/state/sidebar" $field="text" $value="no"/>
</$list>
</$set></$vars></$set>""">
<div class="tc-story-river-slider">
</div>
</$pan>
</$reveal>
<div class="tc-sidebar-lists">
<$set name="searchTiddler" value="$:/temp/search">
<div class="tc-search">
<$edit-text tiddler="$:/temp/search" type="search" tag="input" focus={{$:/config/Search/AutoFocus}} focusPopup=<<qualify "$:/state/popup/search-dropdown">> class="tc-popup-handle"/>
<$reveal state="$:/temp/search" type="nomatch" text="">
<$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="tc-btn-invisible">
<$action-setfield $tiddler="$:/temp/advancedsearch" text={{$:/temp/search}}/>
<$action-setfield $tiddler="$:/temp/search" text=""/>
<$action-navigate $to="$:/AdvancedSearch"/>
{{$:/core/images/advanced-search-button}}
</$button>
<$button class="tc-btn-invisible">
<$action-setfield $tiddler="$:/temp/search" text="" />
{{$:/core/images/close-button}}
</$button>
<$button popup=<<qualify "$:/state/popup/search-dropdown">> class="tc-btn-invisible">
{{$:/core/images/down-arrow}}
<$list filter="[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]" variable="listItem">
<$set name="resultCount" value="""<$count filter="[!is[system]search{$(searchTiddler)$}]"/>""">
{{$:/language/Search/Matches}}
</$set>
</$list>
</$button>
</$reveal>
<$reveal state="$:/temp/search" type="match" text="">
<$button to="$:/AdvancedSearch" tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} class="tc-btn-invisible">
{{$:/core/images/advanced-search-button}}
</$button>
</$reveal>
</div>
<$reveal tag="div" class="tc-block-dropdown-wrapper" state="$:/temp/search" type="nomatch" text="">
<$reveal tag="div" class="tc-block-dropdown tc-search-drop-down tc-popup-handle" state=<<qualify "$:/state/popup/search-dropdown">> type="nomatch" text="" default="">
<$list filter="[{$:/temp/search}minlength{$:/config/Search/MinLength}limit[1]]" emptyMessage="""<div class="tc-search-results">{{$:/language/Search/Search/TooShort}}</div>""" variable="listItem">
{{$:/core/ui/SearchResults}}
</$list>
</$reveal>
</$reveal>
</$set>
<$set name="sidebarTabTiddler" filter="[all[tiddlers]prefix[$:/state/tab/sidebar]]">
<$set name="currentSidebarTab" filter="[<sidebarTabTiddler>get[text]]">
''Swipe left/right inside the tabs to change tabs''
<$swipe $velocity="0.8" $direction="left" $targets="tc-tab-content" $state="on" $actions="""<$set name="sideBarTabsList" filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]]"><$action-listops $tiddler="$:/core/ui/SideBarLists" $subfilter=<<sideBarTabsList>>/><$list filter="[<currentSidebarTab>next[$:/core/ui/SideBarLists]]"><$action-setfield $tiddler=<<sidebarTabTiddler>> $value=<<currentTiddler>>/></$list></$set>""">
<$swipe $velocity="0.8" $direction="right" $targets="tc-tab-content" $state="on" $actions="""<$set name="sideBarTabsList" filter="[all[shadows+tiddlers]tag[$:/tags/SideBar]]"><$action-listops $tiddler="$:/core/ui/SideBarLists" $subfilter=<<sideBarTabsList>>/><$list filter="[<currentSidebarTab>previous[$:/core/ui/SideBarLists]]"><$action-setfield $tiddler=<<sidebarTabTiddler>> $value=<<currentTiddler>>/></$list></$set>""">
<$macrocall $name="tabs" tabsList="[all[shadows+tiddlers]tag[$:/tags/SideBar]!has[draft.of]]" default={{$:/config/DefaultSidebarTab}} state="$:/state/tab/sidebar" />
</$swipe>
</$swipe>
</$set>
</$set>
</div>
The following tiddlers were imported:
# [[$:/editions/tw5.com/if-macro.js]]
alert-background: #ffca13
alert-border: #ffca13
alert-highlight: <<colour primary>>
alert-muted-foreground: <<colour muted-foreground>>
background: #eae6e1
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour page-background>>
button-foreground: <<colour muted-foreground>>
button-border: <<colour page-background>>
code-background: <<colour page-background>>
code-border: <<colour page-background>>
code-foreground: <<colour muted-foreground>>
dirty-indicator: <<colour primary>>
download-background: #ffca13
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour background>>
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour background>>
dropzone-background: <<colour primary>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #9e6129
external-link-foreground: <<colour primary>>
foreground: #433f36
message-background: #9e6129
message-border: #9e6129
message-foreground: <<colour foreground>>
modal-backdrop: <<colour foreground>>
modal-background: <<colour background>>
modal-border: <<colour background>>
modal-footer-background: <<colour background>>
modal-footer-border: <<colour foreground>>
modal-header-border: <<colour muted-foreground>>
muted-foreground: #737373
notification-background: #ffca13
notification-border: #ffca13
page-background: #cfcdcd
pre-background: <<colour page-background>>
pre-border: <<colour page-background>>
primary: #2d539b
sidebar-button-foreground: <<colour primary>>
sidebar-controls-foreground-hover: inherit
sidebar-controls-foreground: <<colour muted-foreground>>
sidebar-foreground-shadow: #d8d8d8
sidebar-foreground: <<colour primary>>
sidebar-muted-foreground-hover: inherit
sidebar-muted-foreground: <<colour muted-foreground>>
sidebar-tab-background-selected: <<colour background>>
sidebar-tab-background: <<colour background>>
sidebar-tab-border-selected: <<colour primary>>
sidebar-tab-border: <<colour background>>
sidebar-tab-divider: <<colour primary>>
sidebar-tab-foreground-selected: <<colour foreground>>
sidebar-tab-foreground: <<colour muted-foreground>>
sidebar-tiddler-link-foreground-hover: inherit
sidebar-tiddler-link-foreground: <<colour muted-foreground>>
site-title-foreground: <<colour foreground>>
static-alert-foreground: <<colour foreground>>
tab-background-selected: <<colour page-background>>
tab-background: <<colour page-background>>
tab-border-selected: <<colour page-background>>
tab-border: <<colour page-background>>
tab-divider: <<colour page-background>>
tab-foreground-selected: <<colour primary>>
tab-foreground: <<colour tab-foreground>>
table-border: <<colour page-background>>
table-footer-background: <<colour page-background>>
table-header-background: <<colour page-background>>
tag-background: #ffca13
tag-foreground: #a26624
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: inherit
tiddler-controls-foreground-selected: inherit
tiddler-controls-foreground: <<colour muted-foreground>>
tiddler-editor-background: <<colour background>>
tiddler-editor-border-image: <<colour background>>
tiddler-editor-border: <<colour background>>
tiddler-editor-fields-even: <<colour tag-background>>
tiddler-editor-fields-odd: <<colour page-background>>
tiddler-info-background: <<colour background>>
tiddler-info-border: <<colour page-background>>
tiddler-info-tab-background: <<colour background>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour muted-foreground>>
tiddler-title-foreground: <<colour primary>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #c0bbb6
very-muted-foreground: #898989
alert-background: #644a7d
alert-border: #644a7d
alert-highlight: <<colour primary>>
alert-muted-foreground: <<colour muted-foreground>>
background: #2A2B30
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour page-background>>
button-foreground: <<colour foreground>>
button-border: <<colour page-background>>
code-background: <<colour page-background>>
code-border: <<colour page-background>>
code-foreground: <<colour muted-foreground>>
dirty-indicator: <<colour primary>>
download-background: #644a7d
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour background>>
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour background>>
dropzone-background: <<colour primary>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #644a7d
external-link-foreground: <<colour primary>>
foreground: #cecece
message-background: #644a7d
message-border: #644a7d
message-foreground: <<colour foreground>>
modal-backdrop: <<colour page-background>>
modal-background: <<colour background>>
modal-border: <<colour background>>
modal-footer-background: <<colour background>>
modal-footer-border: <<colour muted-foreground>>
modal-header-border: <<colour muted-foreground>>
muted-foreground: #8d8d8d
notification-background: #644a7d
notification-border: #644a7d
page-background: #1c1d22
pre-background: <<colour page-background>>
pre-border: <<colour page-background>>
primary: #c80000
sidebar-button-foreground: <<colour foreground>>
sidebar-controls-foreground-hover: inherit
sidebar-controls-foreground: <<colour muted-foreground>>
sidebar-foreground-shadow: transparent
sidebar-foreground: <<colour foreground>>
sidebar-muted-foreground-hover: inherit
sidebar-muted-foreground: <<colour foreground>>
sidebar-tab-background-selected: <<colour background>>
sidebar-tab-background: <<colour background>>
sidebar-tab-border-selected: <<colour background>>
sidebar-tab-border: <<colour background>>
sidebar-tab-divider: <<colour background>>
sidebar-tab-foreground-selected: <<colour primary>>
sidebar-tab-foreground: <<colour muted-foreground>>
sidebar-tiddler-link-foreground-hover: inherit
sidebar-tiddler-link-foreground: <<colour muted-foreground>>
site-title-foreground: white
static-alert-foreground: <<colour foreground>>
tab-background-selected: <<colour page-background>>
tab-background: <<colour page-background>>
tab-border-selected: <<colour page-background>>
tab-border: <<colour page-background>>
tab-divider: <<colour page-background>>
tab-foreground-selected: <<colour primary>>
tab-foreground: <<colour tab-foreground>>
table-border: <<colour page-background>>
table-footer-background: rgba(0, 0, 0, 0.2)
table-header-background: rgba(0, 0, 0, 0.1)
tag-background: #644a7d
tag-foreground: <<colour foreground>>
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: inherit
tiddler-controls-foreground-selected: <<colour foreground>>
tiddler-controls-foreground: <<colour muted-foreground>>
tiddler-editor-background: <<colour background>>
tiddler-editor-border-image: <<colour background>>
tiddler-editor-border: <<colour background>>
tiddler-editor-fields-even: #3a3a3a
tiddler-editor-fields-odd: <<colour page-background>>
tiddler-info-background: <<colour background>>
tiddler-info-border: <<colour page-background>>
tiddler-info-tab-background: <<colour background>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour muted-foreground>>
tiddler-title-foreground: <<colour primary>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #644a7d
very-muted-foreground: #3a3a3a
alert-background: <<colour tag-background>>
alert-border: <<colour tag-background>>
alert-highlight: <<colour primary>>
alert-muted-foreground: <<colour muted-foreground>>
background: #fbfbfb
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour page-background>>
button-foreground: <<colour muted-foreground>>
button-border: <<colour page-background>>
code-background: <<colour page-background>>
code-border: <<colour page-background>>
code-foreground: <<colour muted-foreground>>
dirty-indicator: <<colour primary>>
download-background: <<colour tag-background>>
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour background>>
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour background>>
dropzone-background: <<colour primary>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #237544
external-link-foreground: #40EFF2
foreground: #38363B
message-background: #D7DCDF
message-border: #D7DCDF
message-foreground: <<colour foreground>>
modal-backdrop: <<colour foreground>>
modal-background: <<colour background>>
modal-border: <<colour background>>
modal-footer-background: <<colour background>>
modal-footer-border: <<colour muted-foreground>>
modal-header-border: <<colour muted-foreground>>
muted-foreground: #868686
notification-background: <<colour tag-background>>
notification-border: <<colour tag-background>>
page-background: #ebeeef
pre-background: <<colour page-background>>
pre-border: <<colour page-background>>
primary: #237544
sidebar-button-foreground: <<colour primary>>
sidebar-controls-foreground-hover: inherit
sidebar-controls-foreground: <<colour muted-foreground>>
sidebar-foreground-shadow: #d8d8d8
sidebar-foreground: <<colour primary>>
sidebar-muted-foreground-hover: inherit
sidebar-muted-foreground: <<colour muted-foreground>>
sidebar-tab-background-selected: <<colour background>>
sidebar-tab-background: <<colour background>>
sidebar-tab-border-selected: <<colour primary>>
sidebar-tab-border: <<colour background>>
sidebar-tab-divider: <<colour primary>>
sidebar-tab-foreground-selected: <<colour foreground>>
sidebar-tab-foreground: <<colour muted-foreground>>
sidebar-tiddler-link-foreground-hover: inherit
sidebar-tiddler-link-foreground: <<colour muted-foreground>>
site-title-foreground: <<colour foreground>>
static-alert-foreground: <<colour foreground>>
tab-background-selected: <<colour page-background>>
tab-background: <<colour page-background>>
tab-border-selected: <<colour page-background>>
tab-border: <<colour page-background>>
tab-divider: <<colour page-background>>
tab-foreground-selected: <<colour primary>>
tab-foreground: <<colour tab-foreground>>
table-border: <<colour page-background>>
table-footer-background: <<colour page-background>>
table-header-background: <<colour page-background>>
tag-background: #94DC20
tag-foreground: <<general primary>>
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: <<colour tag-background>>
tiddler-controls-foreground-selected: inherit
tiddler-controls-foreground: <<colour muted-foreground>>
tiddler-editor-background: <<colour background>>
tiddler-editor-border-image: <<colour background>>
tiddler-editor-border: <<colour background>>
tiddler-editor-fields-even: <<colour tag-background>>
tiddler-editor-fields-odd: <<colour page-background>>
tiddler-info-background: <<colour background>>
tiddler-info-border: <<colour page-background>>
tiddler-info-tab-background: <<colour background>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour muted-foreground>>
tiddler-title-foreground: <<colour primary>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #d2cfcc
very-muted-foreground: #a3a3a3
alert-background: #644a7d
alert-border: #644a7d
alert-highlight: <<colour primary>>
alert-muted-foreground: <<colour muted-foreground>>
background: #2A2B30
blockquote-bar: <<colour muted-foreground>>
button-background: <<colour page-background>>
button-foreground: <<colour foreground>>
button-border: <<colour page-background>>
code-background: <<colour page-background>>
code-border: <<colour page-background>>
code-foreground: <<colour muted-foreground>>
dirty-indicator: <<colour primary>>
download-background: #644a7d
download-foreground: <<colour background>>
dragger-background: <<colour foreground>>
dragger-foreground: <<colour background>>
dropdown-background: <<colour background>>
dropdown-border: <<colour background>>
dropdown-tab-background-selected: <<colour background>>
dropdown-tab-background: <<colour background>>
dropzone-background: <<colour primary>>
external-link-background-hover: inherit
external-link-background-visited: inherit
external-link-background: inherit
external-link-foreground-hover: inherit
external-link-foreground-visited: #644a7d
external-link-foreground: #f0b000
foreground: #cecece
message-background: #644a7d
message-border: #644a7d
message-foreground: <<colour foreground>>
modal-backdrop: <<colour page-background>>
modal-background: <<colour background>>
modal-border: <<colour background>>
modal-footer-background: <<colour background>>
modal-footer-border: <<colour background>>
modal-header-border: <<colour muted-foreground>>
muted-foreground: #8d8d8d
notification-background: #644a7d
notification-border: #644a7d
page-background: #1c1d22
pre-background: <<colour page-background>>
pre-border: <<colour page-background>>
primary: #00a9c7
sidebar-button-foreground: <<colour foreground>>
sidebar-controls-foreground-hover: inherit
sidebar-controls-foreground: <<colour muted-foreground>>
sidebar-foreground-shadow: transparent
sidebar-foreground: <<colour foreground>>
sidebar-muted-foreground-hover: inherit
sidebar-muted-foreground: <<colour foreground>>
sidebar-tab-background-selected: <<colour background>>
sidebar-tab-background: <<colour background>>
sidebar-tab-border-selected: <<colour background>>
sidebar-tab-border: <<colour background>>
sidebar-tab-divider: <<colour background>>
sidebar-tab-foreground-selected: <<colour primary>>
sidebar-tab-foreground: <<colour muted-foreground>>
sidebar-tiddler-link-foreground-hover: inherit
sidebar-tiddler-link-foreground: <<colour muted-foreground>>
site-title-foreground: white
static-alert-foreground: <<colour foreground>>
tab-background-selected: <<colour page-background>>
tab-background: <<colour page-background>>
tab-border-selected: <<colour page-background>>
tab-border: <<colour page-background>>
tab-divider: <<colour page-background>>
tab-foreground-selected: <<colour primary>>
tab-foreground: <<colour tab-foreground>>
table-border: <<colour page-background>>
table-footer-background: rgba(0, 0, 0, 0.1)
table-header-background: rgba(0, 0, 0, 0.2)
tag-background: #644a7d
tag-foreground: <<colour foreground>>
tiddler-background: <<colour background>>
tiddler-border: <<colour background>>
tiddler-controls-foreground-hover: inherit
tiddler-controls-foreground-selected: <<colour foreground>>
tiddler-controls-foreground: <<colour muted-foreground>>
tiddler-editor-background: <<colour background>>
tiddler-editor-border-image: <<colour background>>
tiddler-editor-border: <<colour background>>
tiddler-editor-fields-even: #3a3a3a
tiddler-editor-fields-odd: <<colour page-background>>
tiddler-info-background: <<colour background>>
tiddler-info-border: <<colour page-background>>
tiddler-info-tab-background: <<colour background>>
tiddler-link-background: <<colour background>>
tiddler-link-foreground: <<colour primary>>
tiddler-subtitle-foreground: <<colour muted-foreground>>
tiddler-title-foreground: <<colour primary>>
toolbar-new-button:
toolbar-options-button:
toolbar-save-button:
toolbar-info-button:
toolbar-edit-button:
toolbar-close-button:
toolbar-delete-button:
toolbar-cancel-button:
toolbar-done-button:
untagged-background: #3a3a3a
very-muted-foreground: #3a3a3a
\define note(text)
<div class="tc-doc-note">
<p>
$text$
</p>
</div>
\end
\define info(text)
<div class="tc-doc-info">
<p>
$text$
</p>
</div>
\end
\define attention(text)
<div class="tc-doc-attention">
<p>
$text$
</p>
</div>
\end
\define example(text)
<a target="blank" class="tc-doc-example-link" href="$text$">Try it yourself <<awesome lightbulb-o>></a>
\end
{
"tiddlers": {
"$:/plugins/ahahn/tinka/docs/Help Tab": {
"title": "$:/plugins/ahahn/tinka/docs/Help Tab",
"type": "text/vnd.tiddlywiki",
"text": "!!Using the Help Tab\n\nWhen working on a plugin, it is often handy to be able to navigate quickly between the plugin tiddlers. That is what the Help Tab is for.\nAfter enabling it in the \"Tinka Plugin Management\" tab for a specific plugin in the Control Panel, it gives you an additional sidebar tab, that contains a list of all the tiddlers that are contained in the plugin in question. Furthermore, it also shows you tiddlers that live in the same \"directory\" which are likely tiddlers that you want to add to the plugin eventually.\n\nIf you have tiddlers whose names aren't prefixed by the plugin path, you can use the Filter search included in the help tab to select those. For example, if the rest of your tiddlers is scattered somewhere in the wiki, but tagged with <span class=\"tc-tag-label\">myPlugin</span>, you could use the filter: `[tag[myPlugin]]` to select them.\n\nAlso included in the Help Tab is a button to quickly add a new tiddler to a plugin without having to type out the whole `$:/plugins.../...` path and an option to disable the Help Tab again. Lastly, the \"Quick Package\" button gives you the option of quickly integrating changes you made to individual tiddlers into the plugin. Note that the \"Quick Package\" Button will only integrate the changes you made to tiddlers already contained in the plugin into the plugin tiddler itself, you can't add new tiddlers to a plugin this way. For those tasks, you will still have to use the control panel menu.\n"
},
"$:/plugins/ahahn/tinka/docs/How to create a new plugin": {
"title": "$:/plugins/ahahn/tinka/docs/How to create a new plugin",
"type": "text/vnd.tiddlywiki",
"text": "!! How to create a new plugin\n\nTo create a completely new plugin, first go to the Control Panel extension Tinka provides and click on the \"Create new Plugin\" button. Next enter the ''plugin type'' of the plugin you want to create or choose a type from the dropdown menu. Usually you will want to use either the value \"''plugin''\" or \"''theme''\", as this covers most cases of plugins.\n\nNext is the ''plugin path'': This is the name of the tiddler where the finished plugin is going to be stored in. TiddlyWiki uses a special naming theme for these, so you will mostly find that the actual tiddlers that contain a plugin are named in this scheme:\n\n`$:/plugins/myOrganisation/pluginName`. \n\nThis ensures that plugins can be not only immideately recognized, but are also separate from other tiddlers in the wiki.\n\nAfter also entering a title for your new plugin or theme, you are basically good to go. These three fields: ''plugin type'', ''plugin path'' and the ''plugin title'' are all the fields that are required for a functioning plugin. In theory, you could now go ahead and press the \"''Package Plugin''\" button, which will give you an empty plugin shell to which you can add tiddlers later.\n\nIn most cases however it is desired to also fill out the rest of the metadata fields. In detail, these are:\n\n* ''Author:'' Name of the plugin author.\n* ''Source:'' Website or URL of the plugin, also the place where updates are found.\n* ''Dependents:'' List of plugins this plugin depends on (usually empty, but e.g. `$:/core`)\n* ''List'': List of tiddlers contained in the plugin, that will serve as readme tiddlers, when inspecting a plugin via the control panel. (e.g. `$:/plugins/ahahn/tinka/readme`)\n* ''Version:'' Version of your plugin in the format: X.X.X\n* ''Core-Version:'' Usually the minimal TiddlyWiki version your plugin requires in order for it to work (e.g //>=5.1.8//)\n\nDepending on the plugin type you chose, you might also come across the following metadata fields:\n\n* ''Description:'' For plugins, this contains the plugin title that is shown in the control panel.\n* ''Name:'' For themes, this contains the theme title that is shown in the control panel.\n\nAfter entering the metadata, all that is left is to select the tiddlers you want to include in the plugin. You can search for these via the default search field, but you can also use a filter to find them (e.g. based on a tag). In most cases it is sufficient to enter the name of the plugin into the default search in order to find the tiddlers that belong to the plugin. Lastly, just click the \"''Package Plugin''\" button and you're done, you have now created your first plugin. A save&refresh will be required for it to be loaded into TiddlyWiki.\n"
},
"$:/plugins/ahahn/tinka/icon": {
"title": "$:/plugins/ahahn/tinka/icon",
"type": "image/svg+xml",
"text": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Created with Inkscape (http://www.inkscape.org/) -->\n\n<svg\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n xmlns:cc=\"http://creativecommons.org/ns#\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:svg=\"http://www.w3.org/2000/svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\"\n xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n width=\"28\"\n height=\"28\"\n id=\"svg2\"\n version=\"1.1\"\n inkscape:version=\"0.48.4 r9939\"\n sodipodi:docname=\"tinka_logo.svg\">\n <defs\n id=\"defs4\" />\n <sodipodi:namedview\n id=\"base\"\n pagecolor=\"#ffffff\"\n bordercolor=\"#666666\"\n borderopacity=\"1.0\"\n inkscape:pageopacity=\"0.0\"\n inkscape:pageshadow=\"2\"\n inkscape:zoom=\"22.627417\"\n inkscape:cx=\"12.192879\"\n inkscape:cy=\"16.062665\"\n inkscape:document-units=\"px\"\n inkscape:current-layer=\"layer1\"\n showgrid=\"false\"\n inkscape:window-width=\"1920\"\n inkscape:window-height=\"1137\"\n inkscape:window-x=\"-8\"\n inkscape:window-y=\"-8\"\n inkscape:window-maximized=\"1\" />\n <metadata\n id=\"metadata7\">\n <rdf:RDF>\n <cc:Work\n rdf:about=\"\">\n <dc:format>image/svg+xml</dc:format>\n <dc:type\n rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" />\n <dc:title></dc:title>\n </cc:Work>\n </rdf:RDF>\n </metadata>\n <g\n inkscape:label=\"Ebene 1\"\n inkscape:groupmode=\"layer\"\n id=\"layer1\"\n transform=\"translate(0,-1024.3622)\">\n <g\n id=\"g2987\"\n transform=\"matrix(0.21875,0,0,0.21875,-0.03334395,1024.3224)\"\n style=\"fill-rule:evenodd\">\n <path\n id=\"path2989\"\n d=\"m 40.397288,76.445699 0,18.894708 14.119729,0 0,0 c -4.64e-4,-0.0019 -9.28e-4,-0.0038 -0.0014,-0.0057 0.09369,0.0038 0.187859,0.0057 0.282472,0.0057 3.817607,0 6.912389,-3.094782 6.912389,-6.912389 0,-1.808236 -0.694317,-3.454305 -1.830894,-4.686151 l 0,0 c 0.0154,-0.0077 0.03082,-0.01536 0.04626,-0.02299 -1.041794,-1.210214 -1.671559,-2.785252 -1.671559,-4.50738 0,-3.817607 3.094781,-6.912389 6.912388,-6.912389 3.817607,0 6.912389,3.094782 6.912389,6.912389 0,1.983922 -0.835789,3.772635 -2.174474,5.033245 l 0,0 c 0.02875,0.01818 0.05739,0.0365 0.08594,0.05496 l 0,0 c -0.859106,1.151989 -1.367662,2.580762 -1.367662,4.128315 0,3.430479 2.498947,6.277297 5.775777,6.81939 -0.0073,0.03105 -0.01478,0.06205 -0.02239,0.093 l 21.320134,0 0,-19.772549 0,0 c -0.04975,0.013 -0.09964,0.02563 -0.149675,0.0379 0.0038,-0.09369 0.0057,-0.187859 0.0057,-0.282472 0,-3.817607 -3.094782,-6.912389 -6.912389,-6.912389 -1.808236,0 -3.454305,0.694317 -4.686152,1.830894 l 0,0 c -0.0077,-0.0154 -0.01536,-0.03082 -0.02299,-0.04626 -1.210214,1.041794 -2.785253,1.671559 -4.507381,1.671559 -3.817607,0 -6.912388,-3.094781 -6.912388,-6.912388 0,-3.817607 3.094781,-6.912389 6.912388,-6.912389 1.983923,0 3.772636,0.835789 5.033245,2.174474 l 0,0 c 0.01818,-0.02875 0.0365,-0.05739 0.05496,-0.08594 l 0,0 c 1.151989,0.859106 2.580762,1.367662 4.128315,1.367662 3.430479,0 6.277297,-2.498947 6.81939,-5.775777 0.07936,0.01871 0.158369,0.03834 0.237007,0.05889 l 0,-15.740322 -21.320134,0 0,0 c 0.0076,-0.03094 0.01507,-0.06194 0.02239,-0.093 l 0,0 c -3.27683,-0.542092 -5.775777,-3.388911 -5.775777,-6.81939 0,-1.547552 0.508556,-2.976326 1.367662,-4.128315 -0.02855,-0.01846 -0.0572,-0.03678 -0.08594,-0.05496 1.338685,-1.260609 2.174474,-3.049323 2.174474,-5.033245 C 72.07907,20.094782 68.984288,17 65.166681,17 c -3.817607,0 -6.912388,3.094782 -6.912388,6.912389 0,1.722128 0.629765,3.297167 1.671559,4.50738 l 0,0 c -0.01544,0.0076 -0.03086,0.01529 -0.04626,0.02299 1.136577,1.231846 1.830894,2.877915 1.830894,4.686151 0,3.817607 -3.094782,6.912389 -6.912389,6.912389 -0.09461,0 -0.188783,-0.0019 -0.282472,-0.0057 l 0,0 c 4.63e-4,0.0019 9.27e-4,0.0038 0.0014,0.0057 l -14.119729,0 0,12.846368 0,0 c 0.0944,0.455349 0.144008,0.927098 0.144008,1.410434 0,3.817607 -3.094782,6.912389 -6.912389,6.912389 -1.547552,0 -2.976326,-0.508556 -4.128315,-1.367663 -0.01846,0.02855 -0.03678,0.0572 -0.05496,0.08594 -1.260609,-1.338685 -3.049323,-2.174474 -5.033245,-2.174474 -3.817607,0 -6.912389,3.094781 -6.912389,6.912388 0,3.817607 3.094782,6.912389 6.912389,6.912389 1.722128,0 3.297167,-0.629765 4.50738,-1.671559 l 0,0 c 0.0076,0.01544 0.01529,0.03086 0.02299,0.04626 1.231846,-1.136577 2.877915,-1.830894 4.686151,-1.830894 3.817607,0 6.912389,3.094782 6.912389,6.912389 0,0.483335 -0.04961,0.955085 -0.144008,1.410434 z M 64,0 l 54.5596,32 0,64 L 64,128 9.4403996,96 l 0,-64 L 64,0 z\"\n inkscape:connector-curvature=\"0\" />\n </g>\n <path\n sodipodi:type=\"arc\"\n style=\"fill:#630fb2;fill-opacity:1;fill-rule:nonzero;stroke:none\"\n id=\"path2999\"\n sodipodi:cx=\"456.42856\"\n sodipodi:cy=\"165.93361\"\n sodipodi:rx=\"162.14285\"\n sodipodi:ry=\"162.14285\"\n d=\"m 618.57141,165.93361 a 162.14285,162.14285 0 1 1 -0.002,-0.80734\"\n sodipodi:start=\"0\"\n sodipodi:end=\"6.2782061\"\n sodipodi:open=\"true\"\n transform=\"matrix(0.06593776,0,0,0.06593776,-16.215024,1027.2261)\" />\n <path\n style=\"fill:#3cff80;fill-opacity:1;fill-rule:nonzero;stroke:none\"\n d=\"m 14.745406,1034.4667 -1.99638,3.2989 0,0.1196 0,7.1336 0,3.4185 1.99638,-3.299 0,-0.1195 0,-7.1336 0,-3.4185 z\"\n id=\"rect3769\"\n inkscape:connector-curvature=\"0\" />\n <path\n style=\"fill:#ffa600;fill-opacity:1;fill-rule:nonzero;stroke:none\"\n d=\"m 7.3063061,1034.2471 3.2989499,-3.1032 0.11951,0 7.13365,0 3.41846,0 -3.29895,3.1032 -0.11951,0 -7.13365,0 -3.4184599,0 z\"\n id=\"rect3769-0\"\n inkscape:connector-curvature=\"0\" />\n </g>\n</svg>\n"
},
"$:/plugins/ahahn/tinka/tinka-backupPlugin.js": {
"text": "/*\\\r\ntitle: $:/plugins/ahahn/tinka/tinka-backupPlugin.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nTinka's backup action widget to backup a plugin.\r\n \r\nBacks up the specified plugin tiddler and modifies the \r\n'plugin-type' and 'title' field accordingly.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar CommonAction = require(\"$:/plugins/ahahn/tinka/tinkaCommonAction.js\").tinkaCommonAction;\r\n\r\nvar BackupPluginWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n this.setup(false,false,{\r\n \"$plugin\": \"\",\r\n \"$restore\": \"no\"\r\n },false);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nBackupPluginWidget.prototype = new CommonAction();\r\n\r\n/*\r\nSmall string table\r\n*/\r\nBackupPluginWidget.prototype.CONFIRM_OVERRIDE = \"You are about to restore a backup, but another version of this plugin is already active. Do you want to backup the current version (if not already existing) and restore this backup anyway ?\"; \r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nBackupPluginWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n this.actionPlugin = this.param[\"$plugin\"];\r\n this.actionRestore = this.param[\"$restore\"];\r\n\r\n\tif(this.actionPlugin) {\r\n \tif(this.actionRestore == \"yes\") {\r\n \tvar backupTiddler = this.wiki.getTiddler(this.actionPlugin);\r\n \tvar operationConfirmed = true;\r\n \tif(backupTiddler instanceof $tw.Tiddler) { \r\n \t\t\tif(this.checkIfExists(backupTiddler.fields[\"original-title\"])) {\r\n \toperationConfirmed = confirm(this.CONFIRM_OVERRIDE);\r\n \tif(operationConfirmed) {\r\n // after backing up, delete current $original-title Tiddler\r\n this.backupPlugin(backupTiddler.fields[\"original-title\"]);\r\n this.wiki.deleteTiddler(backupTiddler.fields[\"original-title\"]); \t\r\n }\r\n }\r\n \r\n \tif(operationConfirmed) {\r\n var pluginType = this.determinePluginType(backupTiddler.fields[\"plugin-type\"]);\r\n this.wiki.addTiddler(new $tw.Tiddler(backupTiddler,{\r\n \"title\": backupTiddler.fields[\"original-title\"],\r\n \"original-title\": undefined,\r\n \"plugin-type\": pluginType\r\n }));\r\n \t}\r\n }\r\n }\r\n \telse {\r\n \t\tthis.backupPlugin(this.actionPlugin);\r\n \t}\r\n }\r\n \treturn true; // Action was invoked\r\n};\r\n\r\nBackupPluginWidget.prototype.determinePluginType = function(name) {\r\n\tvar reg = /(.*)-backup/;\r\n \tvar matches = name.match(reg);\r\n \t\r\n \tif(matches != null) {\r\n \t\treturn matches[1]; \r\n }\r\n \r\n \treturn \"plugin\";\r\n}\r\n\r\n\r\nBackupPluginWidget.prototype.backupPlugin = function(plugin) {\r\n\tvar pluginTiddler = this.wiki.getTiddler(plugin);\r\n var didBackup = false;\r\n \tif(pluginTiddler instanceof $tw.Tiddler) {\r\n var backupTitle = this.getBackupTitle(pluginTiddler.fields.title,pluginTiddler.fields.version);\r\n didBackup = true;\r\n \r\n \t//Don't make a backup if a backup already exists\r\n \tif(!this.checkIfExists(backupTitle)) {\r\n var backupTiddler = new $tw.Tiddler(pluginTiddler,{\r\n \"title\": backupTitle,\r\n \"original-title\": pluginTiddler.fields.title,\r\n \"plugin-type\": \"\" + pluginTiddler.fields[\"plugin-type\"] + \"-backup\"\r\n });\r\n\r\n this.wiki.addTiddler(backupTiddler); \r\n \t}\r\n }\r\n \treturn didBackup;\r\n}\r\n\r\nBackupPluginWidget.prototype.getBackupTitle = function(title,version) {\r\n \treturn \"\" + title + \"-\" + version + \"-backup\";\r\n};\r\n \r\nBackupPluginWidget.prototype.checkIfExists = function(tiddler) {\r\n\treturn this.wiki.getTiddler(tiddler) != undefined;\r\n}\r\n\r\nexports[\"tinka-backupPlugin\"] = BackupPluginWidget;\r\n\r\n})();\r\n",
"title": "$:/plugins/ahahn/tinka/tinka-backupPlugin.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/tinka-check.js": {
"text": "/*\\\ntitle: $:/plugins/ahahn/tinka/tinka-check.js\ntype: application/javascript\nmodule-type: widget\n\nChecks param \"text\" for match with \"pattern\".\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar TinkaCommonActionWidget = require(\"$:/plugins/ahahn/tinka/tinkaCommonAction.js\").tinkaCommonAction;\n\nvar CheckAction = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.setup(false,true,[\"text\", \"pattern\"],true);\n};\n\nCheckAction.prototype = new TinkaCommonActionWidget();\n/*\nInvoke the action associated with this widget\n*/\nCheckAction.prototype.invokeAction = function(triggeringWidget,event) {\n\t//important: recompute Attributes\n\tthis.processAttributes();\n\tvar regexp = new RegExp(this.param[\"pattern\"]);\n\t\n\tif(regexp.test(this.param[\"text\"])) {\n\t\tvar ev = {};\n\t\tev.verb = \"pass\";\n\t\tev.data = event;\n\t\tthis.invokeActions(triggeringWidget,ev); \n\t}\n\telse {\n\t\tvar ev = {};\n\t\tev.verb = \"fail\";\n\t\tev.data = event;\n\t\tthis.invokeActions(triggeringWidget,ev);\n\t}\n\t\n\treturn true; // Action was invoked\n};\n\nexports[\"tinka-check\"] = CheckAction;\n\n})();\n",
"title": "$:/plugins/ahahn/tinka/tinka-check.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/tinka-filter.js": {
"text": "/*\\\ntitle: $:/plugins/ahahn/tinka/tinka-filter.js\ntype: application/javascript\nmodule-type: widget\n\nWidgets to filters actions according to their verb.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar TinkaCommonActionWidget = require(\"$:/plugins/ahahn/tinka/tinkaCommonAction.js\").tinkaCommonAction;\n\nvar FilterAction = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n\tthis.setup(false, true, [\"verb\"], true);\n};\n\nFilterAction.prototype = new TinkaCommonActionWidget();\n/*\nInvoke the action associated with this widget\n*/\nFilterAction.prototype.invokeAction = function(triggeringWidget,event) {\n\tif (event.verb === this.param[\"verb\"]) {\n\t\tthis.invokeActions(triggeringWidget, event);\n\t}\n\treturn true; // Action was invoked\n};\n\nexports[\"tinka-filter\"] = FilterAction;\n\n})();\n",
"title": "$:/plugins/ahahn/tinka/tinka-filter.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/tinka-repackagePlugin.js": {
"text": "/*\\\r\ntitle: $:/plugins/ahahn/tinka/tinka-repackagePlugin.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nrepackagePlugin action widget\r\n\r\n<$repackagePlugin $plugin=<<target>> $repackage=\"yes\" $diff=<<qualified-modify-diff>> />\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar CommonAction = require(\"$:/plugins/ahahn/tinka/tinkaCommonAction.js\").tinkaCommonAction;\r\n\r\n \r\nvar repackagePluginWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n this.setup(false,false,[\"$plugin\",\"$create\",\"$diff\"],false);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nrepackagePluginWidget.prototype = new CommonAction();\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nrepackagePluginWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n \tvar diff = {};\r\n \tvar title = \"\";\r\n\tthis.actionPlugin = this.param[\"$plugin\"];\r\n\tthis.actionCreate = this.param[\"$create\"];\r\n \tthis.actionDiff = this.param[\"$diff\"];\r\n\r\n \tif(this.actionPlugin) {\r\n title = this.actionPlugin;\r\n if(this.actionDiff) {\r\n \tvar tid = this.wiki.getTiddler(this.actionDiff);\r\n diff = tid || {};\r\n }\r\n \r\n if(this.actionCreate == \"yes\") {\r\n //create new plugin Tiddler with the data from the diff tiddler\r\n var pluginTid = {};\r\n \r\n title = diff.fields[\"create-title\"] || this.actionPlugin;\r\n pluginTid.title = title;\r\n pluginTid[\"text\"] =\t\"{\\\"tiddlers\\\": {}}\";\r\n pluginTid[\"type\"] = \"application/json\";\r\n pluginTid[\"author\"] = diff.fields[\"create-author\"];\r\n pluginTid[\"description\"] = diff.fields[\"create-description\"];\r\n\t\tpluginTid[\"name\"] = diff.fields[\"create-name\"];\r\n pluginTid[\"list\"] = diff.fields[\"create-list\"];\r\n pluginTid[\"plugin-type\"] = diff.fields[\"create-plugin-type\"];\r\n pluginTid[\"dependents\"] = diff.fields[\"create-dependents\"];\r\n pluginTid[\"version\"] = diff.fields[\"create-version\"];\r\n pluginTid[\"core-version\"] = diff.fields[\"create-core-version\"];\r\n this.wiki.addTiddler(new $tw.Tiddler(pluginTid));\r\n }\r\n \r\n //execute repackaging\r\n $tw.utils.repackPlugin(title,diff.fields.addTiddlers,diff.fields.removeTiddlers);\r\n \t}\r\n};\r\n\r\nexports[\"tinka-repackagePlugin\"] = repackagePluginWidget;\r\n\r\n})();\r\n",
"title": "$:/plugins/ahahn/tinka/tinka-repackagePlugin.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/tinka-saveTaglistToField.js": {
"text": "/*\\\r\ntitle: $:/plugins/ahahn/tinka/tinka-saveTaglistToField.js\r\ntype: application/javascript\r\nmodule-type: widget\r\n\r\nSaves a tiddlers list of tags to a csv field.\r\n\r\n\\*/\r\n(function(){\r\n\r\n/*jslint node: true, browser: true */\r\n/*global $tw: false */\r\n\"use strict\";\r\n\r\nvar CommonAction = require(\"$:/plugins/ahahn/tinka/tinkaCommonAction.js\").tinkaCommonAction;\r\n\r\nvar SaveTaglistToFieldWidget = function(parseTreeNode,options) {\r\n\tthis.initialise(parseTreeNode,options);\r\n this.setup(false,false,[\"$target\",\"$tiddler\",\"$field\"],false);\r\n};\r\n\r\n/*\r\nInherit from the base widget class\r\n*/\r\nSaveTaglistToFieldWidget.prototype = new CommonAction();\r\n\r\n/*\r\nInvoke the action associated with this widget\r\n*/\r\nSaveTaglistToFieldWidget.prototype.invokeAction = function(triggeringWidget,event) {\r\n\tvar taglist = [];\r\n \tvar field = \"text\";\r\n \r\n if(this.param[\"$target\"]) {\r\n \tvar targetTags = this.wiki.getTiddler(this.param[\"$target\"]);\r\n \t\r\n \tif(targetTags) {\r\n \t\ttaglist = targetTags.fields.tags || [];\r\n \t}\r\n }\r\n \r\n \tif(this.param[\"$field\"]) {\r\n \t\tfield = this.param[\"$field\"];\r\n \t}\r\n \r\n \tif(this.param[\"$tiddler\"]) {\r\n \t\t//save taglist in field on tiddler\r\n \tthis.wiki.setTextReference(this.param[\"$tiddler\"]+ \"!!\" +field,taglist,this.getVariable(\"currentTiddler\")); \r\n \t}\r\n\r\n return true; // Action was invoked\r\n};\r\n\r\nexports[\"tinka-saveTaglistToField\"] = SaveTaglistToFieldWidget;\r\n\r\n})();\r\n",
"title": "$:/plugins/ahahn/tinka/tinka-saveTaglistToField.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/tinkaCommonAction.js": {
"text": "/*\\\ntitle: $:/plugins/ahahn/tinka/tinkaCommonAction.js\ntype: application/javascript\nmodule-type: widget\n\nTinka common action widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar CommonActionWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nCommonActionWidget.prototype = new Widget();\n\n/*\nSetup an action widget with these properties\n*/\nCommonActionWidget.prototype.setup = function(allowPropagation,doRenderChildren,preparedParams,refreshOnAttributeChange) {\n\tthis.doRenderChildren = doRenderChildren;\n\tthis.preparedParams = preparedParams;\n\tthis.allowPropagation = allowPropagation;\n\tthis.refreshOnAttributeChange = refreshOnAttributeChange;\n};\n \n \n/*\nRender this widget into the DOM\n*/\nCommonActionWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n \tif(this.doRenderChildren) {\n\t\tthis.renderChildren(parent,nextSibling);\n \t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nCommonActionWidget.prototype.execute = function() {\n this.processAttributes();\n\t// Construct the child widgets\n\tif(this.doRenderChildren) {\n\t\tthis.makeChildWidgets();\n\t}\n};\n\t\n/*\nCompute the values of our attributes\n*/\nCommonActionWidget.prototype.processAttributes = function() {\n\tvar self = this;\n\tthis.computeAttributes();\n\tthis.param = {};\n\n if(this.isObject(this.preparedParams) && !this.isArray(this.preparedParams)) {\n $tw.utils.each(this.preparedParams,function(def, name) {\n self.param[name] = self.getAttribute(name,def);\n });\n }\n else {\n $tw.utils.each(this.preparedParams,function(name) {\n self.param[name] = self.getAttribute(name);\n });\n }\n};\n\nCommonActionWidget.prototype.allowActionPropagation = function() {\n\treturn this.allowPropagation;\t\n};\n\nCommonActionWidget.prototype.isEmptyObject = function(obj) {\n\tfor(var prop in obj) {\n if(obj.hasOwnProperty(prop))\n return false;\n }\n\n return true;\n};\n\nCommonActionWidget.prototype.isObject = function(obj) {\n return ((obj !== null) && (typeof obj === 'object'));\n};\n\nCommonActionWidget.prototype.isArray = function(obj) {\n return (Object.prototype.toString.call(obj) === '[object Array]');\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nCommonActionWidget.prototype.refresh = function(changedTiddlers) {\n \tvar changedAttributes = this.computeAttributes();\n\t\t\n\tif(!this.isEmptyObject(changedAttributes) && this.refreshOnAttributeChange) {\n\t\tthis.refreshSelf();\n\t\treturn true;\n }\n\telse if (!this.isEmptyObject(changedAttributes)) {\n\t\tthis.processAttributes();\n\t}\n\t\n\treturn this.refreshChildren(changedTiddlers);\t\t\n};\n\nexports.tinkaCommonAction = CommonActionWidget;\n\n})();\n",
"title": "$:/plugins/ahahn/tinka/tinkaCommonAction.js",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/ahahn/tinka/license": {
"title": "$:/plugins/ahahn/tinka/license",
"type": "text/vnd.tiddlywiki",
"caption": "license",
"text": "Tinka Plugin for Tiddlywiki5\n\nCopyright (c) 2017 Andreas Hahn <tinka.plugin@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n"
},
"$:/plugins/ahahn/tinka/emptyDiff": {
"title": "$:/plugins/ahahn/tinka/emptyDiff",
"type": "text/vnd.tiddlywiki",
"text": ""
},
"$:/plugins/ahahn/tinka/tinka-export": {
"tags": "$:/tags/Macro",
"title": "$:/plugins/ahahn/tinka/tinka-export",
"type": "text/vnd.tiddlywiki",
"text": "\\define tinkaExportButtonFilename(baseFilename)\n$baseFilename$$(extension)$\n\\end\n\n\\define tinkaExportQualifiedState()\n$:/state/popup/tinkaExport-$(currentTiddler)$\n\\end\n\n\\define tinkaExportButton(exportFilter:\"[!is[system]sort[title]]\",lingoBase,baseFilename:\"tiddlers\")\n<span class=\"tc-popup-keep\">\n<$button popup=<<tinkaExportQualifiedState>> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/export-button}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\"><$text text={{$lingoBase$Caption}}/></span>\n</$list>\n</$button>\n</span>\n<$reveal state=<<tinkaExportQualifiedState>> type=\"popup\" position=\"below\" animate=\"yes\">\n<div class=\"tc-drop-down\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/Exporter]]\">\n<$set name=\"extension\" value={{!!extension}}>\n<$button class=\"tc-btn-invisible\">\n<$action-sendmessage $message=\"tm-download-file\" $param=<<currentTiddler>> exportFilter=\"\"\"$exportFilter$\"\"\" filename=<<exportButtonFilename \"\"\"$baseFilename$\"\"\">>/>\n<$action-deletetiddler $tiddler=<<tinkaExportQualifiedState>>/>\n<$transclude field=\"description\"/>\n</$button>\n</$set>\n</$list>\n</div>\n</$reveal>\n\\end\n"
},
"$:/plugins/ahahn/tinka/readme": {
"title": "$:/plugins/ahahn/tinka/readme",
"type": "text/vnd.tiddlywiki",
"text": "This is a Control Panel extension that aims to simplify the plugin creation and editing process. After installing, you will find a new tab in your control panel that makes creating and modifying plugins a little bit easier.\n\n<a target=\"blank\" href=\"http://tinkaplugin.github.io\">Project Homepage on tinkaplugin.github.io</a>\n\n!! Version History\n\n!!! 2017-05-13 Release of version 0.4.0\n\nThis release fixes the following bugs:\n\n''Changelog''\n\n* Themes will now get the correct prefix `$:/themes/` when packaging\n* Fixed search results not linking properly\n* Added description field when creating a new theme\n\n\n!!! 2017-03-01 Release of version 0.3.0\n\nAfter more than a year, Tinka is now on <a target=\"blank\" href=\"http://tinkaplugin.github.io\">github</a> and also released under the [[MIT license|$:/plugins/ahahn/tinka/license]].\n\n''Changelog''\n\n* Packaging success now produces a modal that actively reminds the user to refresh the wiki.\n* The search tab state is now kept in a temporary system tiddler.\n* Added warning when repackaging themes that are not active.\n* The 'Help Tab' functionality is now also available for plugins that do not follow the `$:/plugins/...` naming convention. In particular this applies to themes and core plugins.\n* Fixed wrong headings for some modal dialogs.\n* Older action widgets remodeled to use the (new) CommonAction widget as a base.\n* Fixed error check that prevented users to enter a minimal core version dependency when creating a new plugin.\n\n!!! 2015-09-20 Release of version 0.2.0-beta\n\n''Changelog''\n\n* Added Help-Tab capabilities to quickly navigate between plugin tiddlers.\n* Moved Create-Plugin wizard to its own tab.\n* Redid Create-Plugin UI to be easier and more accessible.\n* Backups can now also be downloaded/exported.\n* Added more documentation.\n\n!!! 2015-05-18 Release of version 0.1.0\n\n''Changelog''\n\n* The metadata section now include edit fields for the `name` and `source` fields.\n* The //default search// box now only searches for title matches.\n* Backups can now be exported/downloaded.\n* <div>Backups can now be restored and made active again. If another version of the plugin is already active, the option is given to back it up,before restoring the backup.\n\n\n''Warning: For this mechanism to work, there has to be an 'original-title' field present in the backup tiddler. This is automatically added by Tinka, however earlier versions of Tinka did not add this field. If you want to restore a backup from an earlier version of Tinka, you will have to add the 'original-title' field manually and populate it with the former title of the plugin tiddler, in order for the restore function to work.''\n</div>\n\n!!! 2015-04-30 Release of version 0.0.2\n\n''Changelog''\n\n* The list of plugin tiddlers is now hidden by default, since some lists can get very long.\n* Added a different search option (default/filter)\n* Improved Documentation slightly\n* Added a backup option, so a plugin can be backed up before repackaging.\n\n \n!!! 2015-04-29 Release of version 0.0.1\n"
},
"$:/plugins/ahahn/tinka/style": {
"list-after": "$:/themes/tiddlywiki/vanilla/base",
"tags": "$:/tags/Stylesheet",
"title": "$:/plugins/ahahn/tinka/style",
"type": "text/vnd.tiddlywiki",
"text": "\n/* ==button styles== */\n\nbutton.tinka-blue, button.tinka-orange {\n font-weight: normal;\n font-size: 1em;\n color: #fff;\n fill: #fff;\n}\n\n.tinka-blue {\n background-color: #5E9FCA;\n}\n\n.tinka-orange {\n background-color: #FF8C19;\n}\n\n.tinka-archive-buttons {\n padding-left: 30px;\n display: inline-block;\n}\n\nbutton.tinka-sidebar-button, button.tinka-invisible {\n color: #acacac;\n fill: #acacac;\n}\n\n.tinka-enlarge {\n font-size: 1.5em;\n padding: 1.5em;\n}\n\n.tinka-enlarge svg {\n font-size: 3em;\n}\n\n.tinka-orb {\n border-radius: 10pt;\n}\n\n.tc-dirty .tinka-button-refresh {\n display: none;\n}\n\n/* ==container styles== */\n\n.tinka-centered-container {\n text-align: center;\n padding: 1em;\n}\n\n.tinka-note {\n display:block;\n padding-left: 5px;\n background-color: #FFF9B0;\n color: #7F7A32;\n border: 1px solid #7F7A32;\n border-radius: 5px;\n font-style: italic;\n font-size: 0.8em;\n}\n\n.tinka-note-red {\n display:block;\n padding-left: 5px;\n background-color: #E8DEE0;\n color: #E82C0C;\n border: 1px solid #E82C0C;\n border-radius: 5px;\n font-style: italic;\n font-size: 0.8em;\n}\n\n/* ==text formatting== */\n\n.tinka-list-item {\n\tlist-style: none;\n}\n\n.tinka-saving {\n display: none;\n}\n\n.tc-dirty .tinka-saving {\n display: inline;\n}\n\n.tinka-success {\n color: #26CC50;\n}\n\n.tinka-success .tc-image-done-button, .tinka-success .tc-image-save-button {\n fill: #26CC50;\n}\n\n.tinka-error {\n color: #F00;\n}\n\n.tinka-error .tc-image-close-button {\n fill: #F00;\n}\n\ntable.tinka-meta-table tr td {\n padding: 5px;\n}\n\n/* ==forms style== */\n.tc-control-panel input.tinka-inline-edit {\n width: 30%;\n min-width: 30pt;\n}\n\n.tc-control-panel input.tinka-full-edit, input.tinka-full-edit {\n width: 100%;\n}\n"
},
"$:/plugins/ahahn/tinka/backupList": {
"caption": "Archive",
"list-after": "$:/plugins/ahahn/tinka/pluginManagement",
"tags": "$:/tags/tinka/ControlPanel",
"title": "$:/plugins/ahahn/tinka/backupList",
"type": "text/vnd.tiddlywiki",
"text": "\\define plugin-export()\n[title[$(currentTiddler)$]]\n\\end\n\n\\define plugin-icon-title()\n$(currentTiddler)$/icon\n\\end\n\n\\define plugin-disable-title()\n$:/config/Plugins/Disabled/$(currentTiddler)$\n\\end\n\n\\define plugin-table-body(type,disabledMessage)\n<div class=\"tc-plugin-info-chunk\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>\n<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\n</$transclude></div>\n<div class=\"tc-plugin-info-chunk\">\n<h1>''<$view field=\"description\"><$view field=\"title\"/></$view>'' $disabledMessage$\n</h1>\n<h2>\n<$view field=\"title\"/>\n</h2>\n<h2>\n<div><em><$view field=\"version\"/></em></div>\n</h2></div>\n<div class=\"tinka-archive-buttons\">\n<$macrocall $name=\"tinkaExportButton\" exportFilter=<<plugin-export>> />\n<$button class=\"tc-btn-big-green tinka-blue\">\n<$tinka-backupPlugin $plugin=<<currentTiddler>> $restore=\"yes\"/>\n<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/restoreSuccess\" />Restore</$button>\n</div>\n\\end\n\n\\define plugin-table(type)\n<$list filter=\"[!has[draft.of]plugin-type[$type$]sort[description]]\" emptyMessage=<<lingo \"Empty/Hint\">>>\n<$link to={{!!title}} class=\"tc-plugin-info\">\n<<plugin-table-body type:\"$type$\">>\n</$link>\n</$list>\n\\end\n\n!!Backups\n\n<<plugin-table plugin-backup>>\n<<plugin-table theme-backup>>\n<<plugin-table language-backup>>\n"
},
"$:/plugins/ahahn/tinka/controlPanelExtension": {
"caption": "Tinka Plugin Management",
"tags": "$:/tags/ControlPanel",
"title": "$:/plugins/ahahn/tinka/controlPanelExtension",
"type": "text/vnd.tiddlywiki",
"text": "<<tabs \"[[$:/plugins/ahahn/tinka/pluginManagement]] [[$:/plugins/ahahn/tinka/createDialog]] [[$:/plugins/ahahn/tinka/backupList]]\" \"$:/plugins/ahahn/tinka/pluginManagement\" \"$:/temp/tinka/cpTabs\">>\n"
},
"$:/plugins/ahahn/tinka/createDialog": {
"caption": "Create a new Plugin",
"tags": "$:/tags/tinka/ControlPanel",
"title": "$:/plugins/ahahn/tinka/createDialog",
"type": "text/vnd.tiddlywiki",
"text": "\\define plugin-tiddler-selection()\n[[$(target)$]plugintiddlers[]]\n\\end\n\n\\define qualified-modify-add()\n$(qualifiedTiddler)$-$(target)$-add\n\\end\n\n\\define qualified-modify-diff()\n$(qualifiedTiddler)$-$(target)$-diff\n\\end\n\n\\define diff-plugin-title()\n$(qualifiedTiddler)$-$(target)$-diff!!create-title\n\\end\n\n\\define added-filter()\n[[$(addedTiddlers)$]tags[]]\n\\end\n\n\\define concatPluginTitle(prefix, sep)\n$prefix$$(createTitleOrg)$$sep$$(createTitleName)$\n\\end\n\n\\define tiddlerReference(ref)\n$(currentTiddler)$$ref$\n\\end\n\n\\define varsReference(ref)\n$(TinkaVars)$$ref$\n\\end\n\n\n!! Create New Plugin\n\n<span class=\"tinka-note\">Usage: Enter the necessary metadata for your plugin and use the Filter selection below to pick the tiddlers that should be added to the plugin. After selecting the tiddlers, press 'Package Plugin'. Refer to the [[Documentation|$:/plugins/ahahn/tinka/usage]] for further help.</span>\n\n<$set name=\"target\" value=\"skeleton\">\n<$set name=\"qualifiedTiddler\" value=<<qualify \"$:/temp/tinka/modify\">> >\n\n!!! Step 1: Enter Metadata\n\n\n<$set name=\"currentTiddler\" value=<<qualified-modify-diff>>>\n\t<$transclude mode=\"block\" tiddler=\"$:/plugins/ahahn/tinka/createMetadata\"/>\n</$set>\n\n!!! Step 2: Add Tiddlers\n\nUse the search box below to select the tiddlers you want to add to the plugin.\n\n{{$:/plugins/ahahn/tinka/searchDisplay}}\n\n\n''Added Tiddlers''\n\n<$set name=\"addedTiddlers\" value=<<qualified-modify-add>> >\n<ul>\n<$list filter=<<added-filter>> emptyMessage=\"<i>No tiddlers added.</i>\">\n\t\t<li class=\"tinka-list-item\">\n <$checkbox tiddler=<<qualified-modify-add>> tag={{!!title}} />\n <$link to={{!!title}}>{{!!title}}</$link>\n </li>\n</$list>\n</ul>\n</$set>\n\n\n<$button class=\"tc-btn-big-green tinka-orange\">\n<$set name=\"TinkaVars\" value=\"$:/temp/tinka/CreateVars\">\n<$set name=\"currentTiddler\" value=<<qualified-modify-diff>>>\n\t<$action-deletetiddler $tiddler=<<TinkaVars>> />\n\t<$action-setfield $tiddler=<<TinkaVars>> result=\"false\" />\n\n\t<!-- Check whether a plugin title was given -->\n\t<$tinka-check text={{!!create-title-org}} pattern=\"^[^\\s]+$\">\n\t\t<$tinka-filter verb=\"fail\">\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorTitle=\"The plugin title is not allowed to be empty or contain whitespaces.\"/>\n\t\t</$tinka-filter>\n\t</$tinka-check>\n\t\t\n\t<$tinka-check text={{!!create-title-name}} pattern=\"^[^\\s]+$\">\n\t\t<$tinka-filter verb=\"fail\">\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorTitle=\"The plugin path is not allowed to be empty or contain whitespaces.\"/>\n\t\t</$tinka-filter>\n\t</$tinka-check>\n\t\t\n\t<!-- Check whether a plugin type is set-->\n\t<$tinka-check text={{!!create-plugin-type}} pattern=\"^.+$\">\n\t\t<$tinka-filter verb=\"fail\">\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorType=\"You have to set a plugin type.\"/>\n\t\t</$tinka-filter>\n\t</$tinka-check>\n\t\t\n\t\t<!-- Check whether a name was given, depending on the plugin type-->\n\t\t<$reveal state=<<tiddlerReference \"!!create-plugin-type\">> type=\"match\" text=\"plugin\">\n\t\t\t<$tinka-check text={{!!create-description}} pattern=\"^.+$\">\n\t\t\t\t<$tinka-filter verb=\"fail\">\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorPlugin=\"You have to enter a plugin title.\"/>\n\t\t\t\t</$tinka-filter>\n\t\t\t</$tinka-check>\n\t\t</$reveal>\n\t\t<$reveal state=<<tiddlerReference \"!!create-plugin-type\">> type=\"match\" text=\"theme\">\n\t\t\t<$tinka-check text={{!!create-name}} pattern=\"^.+$\">\n\t\t\t\t<$tinka-filter verb=\"fail\">\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorTheme=\"You have to enter a theme title.\"/>\n\t\t\t\t</$tinka-filter>\n\t\t\t</$tinka-check>\n\t\t</$reveal>\n\t\t\n\t\t<!--Check Version numbers, if entered-->\n\t\t<$reveal state=<<tiddlerReference \"!!create-version\">> type=\"nomatch\" text=\"\">\n\t\t\t<$tinka-check text={{!!create-version}} pattern=\"^(\\d)+\\.(\\d)+\\.(\\d)+(-\\w+)?$\">\n\t\t\t\t<$tinka-filter verb=\"fail\">\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorVersion=\"Version numbers must have the following format: X.X.X (e.g. 1.0.0).\"/>\n\t\t\t\t</$tinka-filter>\n\t\t\t</$tinka-check>\n\t\t</$reveal>\n\t\t\n\t\t<$reveal state=<<tiddlerReference \"!!create-core-version\">> type=\"nomatch\" text=\"\">\n\t\t\t<$tinka-check text={{!!create-core-version}} pattern=\"^(>|>=|<|<=)?(\\d)+\\.(\\d)+\\.(\\d)+(-\\w+)?$\">\n\t\t\t\t<$tinka-filter verb=\"fail\">\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> result=\"true\"/>\n\t\t\t\t\t<$action-setfield $tiddler=<<TinkaVars>> errorCoreVersion=\"The core version number must have the following format: [>|>=|<|<=|]X.X.X-AAAA (e.g. >=5.1.8).\"/>\n\t\t\t\t</$tinka-filter>\n\t\t\t</$tinka-check>\n\t\t</$reveal>\n\n\t<$set name=\"currentTiddler\" value=<<TinkaVars>> >\n\t<$tinka-check text={{!!result}} pattern=\"^false$\">\n\t<$set name=\"currentTiddler\" value=<<qualified-modify-diff>>>\n\t<$tinka-filter verb=\"pass\">\n\t<!--Compute the plugin title (create-title> from the create-title-org and create-title-name fields -->\n\n\t\t<$set name=\"createTitleOrg\" value={{!!create-title-org}}>\n\t\t\t<$set name=\"createTitleName\" value={{!!create-title-name}}>\n <!--If the plugin is a theme, use a different plugin-prefix -->\n <$reveal state=<<tiddlerReference \"!!create-plugin-type\">> type=\"match\" text=\"theme\">\n\t\t\t\t <$action-setfield create-title=<<concatPluginTitle \"$:/themes/\" \"/\">> />\n </$reveal>\n\n <$reveal state=<<tiddlerReference \"!!create-plugin-type\">> type=\"nomatch\" text=\"theme\">\n\t\t\t\t <$action-setfield create-title=<<concatPluginTitle \"$:/plugins/\" \"/\">> />\n </$reveal>\n\t\t\t</$set>\n\t\t</$set>\n\t\n\t\t<$tinka-saveTaglistToField $target=<<qualified-modify-add>> $tiddler=<<qualified-modify-diff>> $field=\"addTiddlers\"/>\n\t\t<$tinka-repackagePlugin $plugin=\"$:/plugins/unknown/newPlugin\" $create=\"yes\" $diff=<<qualified-modify-diff>> />\n\t\t<$action-deletetiddler $tiddler=<<qualified-modify-add>>/>\n\t\t<$action-deletetiddler $tiddler=<<qualified-modify-diff>>/>\n\t\t<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/packageSuccess\" />\n\t</$tinka-filter>\n\t<$tinka-filter verb=\"fail\">\n\t\t<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/packageErrors\" errorVars=<<TinkaVars>>/>\n\t</$tinka-filter>\n\t</$set>\n\t</$tinka-check>\n\t</$set>\n</$set>\n</$set>\nPackage plugin</$button>\n\n\n</$set>\n</$set>\n"
},
"$:/plugins/ahahn/tinka/createMetadata/noSpecialPluginType": {
"title": "$:/plugins/ahahn/tinka/createMetadata/noSpecialPluginType",
"type": "text/vnd.tiddlywiki",
"text": "<tr>\n \t<td>Description:</td>\n <td><$edit-text tag=\"input\" type=\"text\" placeholder=\"e.g. Tinka - Plugin Packer\" field=\"create-description\"/></td>\n \n <td>Name:</td>\n <td><$edit-text tag=\"input\" type=\"text\" field=\"create-name\"/></td>\n</tr>\n"
},
"$:/plugins/ahahn/tinka/createMetadata/pluginPluginType": {
"title": "$:/plugins/ahahn/tinka/createMetadata/pluginPluginType",
"type": "text/vnd.tiddlywiki",
"text": "<tr>\n \t<td>''Plugin Title:''</td>\n <td colspan=\"3\"><$edit-text class=\"tinka-full-edit\" tag=\"input\" type=\"text\" placeholder=\"e.g. Tinka - Plugin Packer\" field=\"create-description\"/></td>\n</tr>\n"
},
"$:/plugins/ahahn/tinka/createMetadata/tableEnd": {
"title": "$:/plugins/ahahn/tinka/createMetadata/tableEnd",
"type": "text/vnd.tiddlywiki",
"text": "<tr>\n <td>Version:</td>\n <td><$edit-text tag=\"input\" type=\"text\" field=\"create-version\"/></td>\n \n\t\t<td>Core-Version:</td>\n <td><$edit-text type=\"text\" placeholder=\"e.g. >=5.1.8\" tag=\"input\" field=\"create-core-version\"/></td>\n\t</tr>\n"
},
"$:/plugins/ahahn/tinka/createMetadata/tableHead": {
"title": "$:/plugins/ahahn/tinka/createMetadata/tableHead",
"type": "text/vnd.tiddlywiki",
"text": "\t<tr>\n\t\t<td>''Plugin Path:''</td>\n <td colspan=\"3\">`$:/plugins/`<$edit-text class=\"tinka-inline-edit\" type=\"text\" placeholder=\"e.g. myName\" tag=\"input\" field=\"create-title-org\"/>`/`<$edit-text type=\"text\" class=\"tinka-inline-edit\" placeholder=\"e.g. myPlugin\" tag=\"input\" field=\"create-title-name\" /></td> \n\t</tr>\n \n <tr>\n\t\t<td>Author:</td>\n <td><$edit-text type=\"text\" placeholder=\"e.g. John Doe\" tag=\"input\" field=\"create-author\"/></td>\n\t\t\n\t\t<td>Source:</td>\n <td><$edit-text tag=\"input\" type=\"text\" placeholder=\"e.g. http://twguides.org\" field=\"source\"/></td>\n\t</tr>\n\n\t<tr>\n\t\t<td>Dependents:</td>\n <td><$edit-text tag=\"input\" type=\"text\" field=\"create-dependents\"/></td>\n \n <td>List:</td>\n <td><$edit-text tag=\"input\" type=\"text\" placeholder=\"e.g. readme usage\" field=\"create-list\"/></td>\n \t</tr>\n"
},
"$:/plugins/ahahn/tinka/createMetadata/themePluginType": {
"title": "$:/plugins/ahahn/tinka/createMetadata/themePluginType",
"type": "text/vnd.tiddlywiki",
"text": "<tr>\n <td>''Theme Title:''</td>\n <td colspan=\"3\"><$edit-text class=\"tinka-full-edit\" tag=\"input\" type=\"text\" placeholder=\"e.g. My cool theme\" field=\"create-name\"/></td>\n</tr>\n\n<tr>\n <td>Description:</td>\n <td colspan=\"3\"><$edit-text class=\"tinka-full-edit\" tag=\"input\" type=\"text\" placeholder=\"e.g. My description\" field=\"create-description\"/></td>\n</tr>\n"
},
"$:/plugins/ahahn/tinka/createMetadata": {
"create-plugin-type": "plugin",
"create-title": "",
"created": "20150429174811520",
"modified": "20170225181341996",
"tags": "",
"title": "$:/plugins/ahahn/tinka/createMetadata",
"type": "text/vnd.tiddlywiki",
"text": "''Plugin-Type:'' <$edit-text tag=\"input\" type=\"text\" field=\"create-plugin-type\"/>\n <$button popup=\"$:/temp/tinka/NewPluginPopup\" class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\n\t\n\t\t<$reveal state=\"$:/temp/tinka/NewPluginPopup\" type=\"popup\" position=\"below\">\n\t\t<div class=\"tc-block-dropdown tc-edit-type-dropdown\">\n\t\t<$linkcatcher to=\"!!create-plugin-type\">\n\t\t\t<$link to=\"plugin\">Plugin</$link>\n\t\t\t<$link to=\"theme\">Theme</$link>\n\t\t</$linkcatcher>\n\t\t</div>\n\t\t</$reveal>\n\n<$reveal state=\"!!create-plugin-type\" type=\"nomatch\" text=\"plugin\" >\n\t<$reveal state=\"!!create-plugin-type\" type=\"nomatch\" text=\"theme\" >\n\t\t<table class=\"tinka-meta-table\">\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableHead\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/noSpecialPluginType\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableEnd\" />\n\t\t</table>\n\t</$reveal>\n</$reveal>\n\n<$reveal state=\"!!create-plugin-type\" type=\"match\" text=\"plugin\">\n\t\t<table class=\"tinka-meta-table\">\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableHead\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/pluginPluginType\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableEnd\" />\n\t\t</table>\n</$reveal>\n\n<$reveal state=\"!!create-plugin-type\" type=\"match\" text=\"theme\">\n\t\t<table class=\"tinka-meta-table\">\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableHead\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/themePluginType\" />\n\t\t<$transclude tiddler=\"$:/plugins/ahahn/tinka/createMetadata/tableEnd\" />\n\t\t</table>\n</$reveal>\n\n''bold'' = //required field//\n"
},
"$:/plugins/ahahn/tinka/dropdownManage": {
"title": "$:/plugins/ahahn/tinka/dropdownManage",
"type": "text/vnd.tiddlywiki",
"text": "\\define plugin-tiddler-selection()\n[[$(target)$]plugintiddlers[]]\n\\end\n\n\\define qualified-remove-popup()\n$:/state/popup/$(qualifiedTiddler)$-$(target)$-remove-popup\n\\end\n\n\\define qualified-modify-remove()\n$(qualifiedTiddler)$-$(target)$-remove\n\\end\n\n\\define qualified-modify-add()\n$(qualifiedTiddler)$-$(target)$-add\n\\end\n\n\\define qualified-modify-diff()\n$(qualifiedTiddler)$-$(target)$-diff\n\\end\n\n\\define target-type()\n$(target)$!!plugin-type\n\\end\n\n\\define added-filter()\n[[$(addedTiddlers)$]tags[]]\n\\end\n\n\\define pluginSuffixFilter()\n[[$(target)$]prefix[$:/plugins/]removeprefix[$:/plugins/]] [[$(target)$]!prefix[$:/plugins/]]\n\\end\n\n\\define sideTabNameBuilder()\n$:/plugins/ahahn/tinka/temp/$(pluginSuffix)$ - Help Tab\n\\end\n\n\\define helpTabCaption()\n$(pluginSuffix)$ - Help Tab\n\\end\n\n\\define helpTabText()\n<$set name=\"pluginPrefix\" value=\"$(target)$\" >\n<$set name=\"currentTiddler\" value=\"$(sideTabName)$\" >\n\n<$transclude tiddler=\"$:/plugins/ahahn/tinka/pluginSidePanel\" />\n\n</$set>\n</$set>\n\\end\n\n<$set name=\"qualifiedTiddler\" value=<<qualify \"$:/temp/tinka/modify\">> >\n\n<$list filter=<<pluginSuffixFilter>> variable=\"pluginSuffix\">\n<<SidebarTabName>>\n<$set name=\"sideTabName\" value=<<sideTabNameBuilder>> >\n\n<$reveal state=<<sideTabName>> type=\"match\" text=\"\">\n<$button>Enable Help-Tab\n<$action-setfield $tiddler=<<sideTabName>> text=<<helpTabText>> caption=<<helpTabCaption>> tags=\"$:/tags/SideBar\" />\n</$button>\n\n</$reveal>\n\n<$reveal state=<<sideTabName>> type=\"nomatch\" text=\"\">\n<$button>Disable Help-Tab\n<$action-deletetiddler $tiddler=<<sideTabName>> />\n</$button>\n</$reveal>\n</$set>\n</$list>\n\nIf you have edited the shadow tiddlers that belong to the plugin, just repackage without making any changes. That way the packaged plugin will incorporate the changes made to the individual tiddlers. Refer to the [[Documentation|$:/plugins/ahahn/tinka/usage]] for help.\n\nIt is recommended to create a backup before repackaging a plugin.\n\n!!! Edit Metadata\n<span class=\"tinka-note\">Note: Changes will be committed immediately.</span>\n\n<$set name=\"currentTiddler\" value=<<target>>>\n\t<$transclude mode=\"block\" tiddler=\"$:/plugins/ahahn/tinka/editMetadata\"/>\n</$set>\n\n!!! Remove Tiddlers\n<span class=\"tinka-note\">Note: Re-packaging required for changes to take effect.</span>\n\n<$reveal type=\"match\" text=\"\" state=<<qualified-remove-popup>> ><$button set=<<qualified-remove-popup>> setTo=\"show\" class=\"tc-btn-invisible\">{{$:/core/images/right-arrow}} Show plugin tiddlers</$button></$reveal>\n<$reveal type=\"nomatch\" text=\"\" state=<<qualified-remove-popup>> >\n<$button set=<<qualified-remove-popup>> setTo=\"\" class=\"tc-btn-invisible\">{{$:/core/images/down-arrow}} Hide plugin tiddlers</$button>\n<ul>\n\t<$list filter=<<plugin-tiddler-selection>> emptyMessage=\"<i>No tiddlers in plugin.</i>\">\n\t\t<li class=\"tinka-list-item\">\n <$checkbox tiddler=<<qualified-modify-remove>> tag={{!!title}} />\n <$link to={{!!title}}><$text text={{!!title}} /></$link></li>\n\t</$list>\n</ul>\n</$reveal>\n\n!!! Add Tiddlers\n<span class=\"tinka-note\">Note: Re-packaging required for changes to take effect.</span>\n\nUse the search box below to select the tiddlers you want to add to the plugin.\n\n{{$:/plugins/ahahn/tinka/searchDisplay}}\n\n\n''Added Tiddlers''\n\n<$set name=\"addedTiddlers\" value=<<qualified-modify-add>> >\n<ul>\n<$list filter=<<added-filter>> emptyMessage=\"<i>No tiddlers added.</i>\">\n\t\t<li class=\"tinka-list-item\">\n <$checkbox tiddler=<<qualified-modify-add>> tag={{!!title}} />\n <$link to={{!!title}}>{{!!title}}</$link>\n </li>\n</$list>\n</ul>\n</$set>\n\n<$reveal state=<<target-type>> type=\"match\" text=\"theme\">\n<span class=\"tinka-note-red\">Warning: Themes can only be repackaged if the theme is currently active or loaded as a dependant!</span>\n</$reveal>\n\n\n<$button class=\"tc-btn-big-green tinka-orange\">\n<$tinka-saveTaglistToField $target=<<qualified-modify-remove>> $tiddler=<<qualified-modify-diff>> $field=\"removeTiddlers\"/>\n<$tinka-saveTaglistToField $target=<<qualified-modify-add>> $tiddler=<<qualified-modify-diff>> $field=\"addTiddlers\"/>\n<$tinka-repackagePlugin $plugin=<<target>> $create=\"no\" $diff=<<qualified-modify-diff>> />\n<$action-deletetiddler $tiddler=<<qualified-modify-remove>>/>\n<$action-deletetiddler $tiddler=<<qualified-modify-add>>/>\n<$action-deletetiddler $tiddler=<<qualified-modify-diff>>/>\n<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/packageSuccess\" />Re-package plugin</$button>\n<$button class=\"tc-btn-big-green tinka-blue\">\n<$tinka-backupPlugin $plugin=<<target>> />\n<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/backupSuccess\" />Create Backup</$button>\n\n</$set>\n"
},
"$:/plugins/ahahn/tinka/editMetadata": {
"title": "$:/plugins/ahahn/tinka/editMetadata",
"type": "text/vnd.tiddlywiki",
"text": "|tinka-meta-table|k\n|Author:|<$edit-text type=\"text\" tag=\"input\" field=\"author\"/>|Description:|<$edit-text tag=\"input\" type=\"text\" field=\"description\"/>|\n|Dependents:|<$edit-text tag=\"input\" type=\"text\" field=\"dependents\"/>|List:|<$edit-text tag=\"input\" type=\"text\" field=\"list\"/>|\n|Plugin-Type:|<$edit-text tag=\"input\" type=\"text\" field=\"plugin-type\"/>|Version:|<$edit-text tag=\"input\" type=\"text\" field=\"version\"/>|\n|Source:|<$edit-text tag=\"input\" type=\"text\" field=\"source\"/>|Name:|<$edit-text tag=\"input\" type=\"text\" field=\"name\"/>|\n|Core-Version:|<$edit-text tag=\"input\" type=\"text\" field=\"core-version\"/>|||\n"
},
"$:/plugins/ahahn/tinka/backupSuccess": {
"caption": "Backup Success",
"subtitle": "Backup Success",
"title": "$:/plugins/ahahn/tinka/backupSuccess",
"type": "text/vnd.tiddlywiki",
"text": "<div class=\"tinka-success\">\n\n!!{{$:/core/images/done-button}} Backup Success !\n\nA backup of the plugin was successfully created.\n\n</div>\n"
},
"$:/plugins/ahahn/tinka/packageErrors": {
"caption": "Packaging Errors!",
"subtitle": "Packaging Errors!",
"title": "$:/plugins/ahahn/tinka/packageErrors",
"type": "text/vnd.tiddlywiki",
"text": "\\define errorFilter()\n[[$(errorVars)$]fields[]prefix[error]]\n\\end\n\n\n<div class=\"tinka-error\">\n\n!!{{$:/core/images/close-button}} There were some errors !\n\nThe follwoing errors occured whilst processing your request:\n\n<ul>\n\t<$list filter=<<errorFilter>> variable=\"errorField\">\n\t\t<li><$view tiddler=<<errorVars>> field=<<errorField>> /></li>\n\t</$list>\n</ul>\n</div>\n"
},
"$:/plugins/ahahn/tinka/packageSuccess": {
"caption": "Packaging Success",
"subtitle": "Packaging Success",
"title": "$:/plugins/ahahn/tinka/packageSuccess",
"type": "text/vnd.tiddlywiki",
"text": "<div class=\"tinka-success\">\n\n!!{{$:/core/images/done-button}} (Re-)Packaging Success !\n\nThe plugin was successfully (re-)packaged. It is recommended to <u>save and reload</u> the wiki now in order to avoid plugins to misbehave.\n\n <div class=\"tinka-centered-container\">\n <span class=\"tinka-saving\">{{$:/core/images/save-button}} Saving...<br/><sub>(If your wiki doesn't save automatically, please save&reload manually.)</sub></span>\n <$button class=\"tc-btn-big-green tinka-enlarge tinka-orb tinka-button-refresh\">\n <$action-sendmessage $message=\"tm-browser-refresh\" />\n {{$:/core/images/refresh-button}}\n <p>\n <b>RELOAD NOW!</b>\n </p>\n </$button>\n </div>\n</div>\n"
},
"$:/plugins/ahahn/tinka/restoreSuccess": {
"caption": "Restore Successful",
"subtitle": "Restore Successful",
"title": "$:/plugins/ahahn/tinka/restoreSuccess",
"type": "text/vnd.tiddlywiki",
"text": "<div class=\"tinka-success\">\n\n!!{{$:/core/images/done-button}} Restore Success !\n\nThe backup was successfully restored!\n\n</div>\n"
},
"$:/plugins/ahahn/tinka/pluginManagement": {
"caption": "Installed",
"tags": "$:/tags/tinka/ControlPanel",
"title": "$:/plugins/ahahn/tinka/pluginManagement",
"type": "text/vnd.tiddlywiki",
"text": "\\define popup-state-macro()\n$:/state/popup-$(qualified-state)$-$(currentTiddler)$\n\\end\n\n\\define tabs-state-macro()\n$(popup-state)$-$(pluginInfoType)$\n\\end\n\n\\define plugin-icon-title()\n$(currentTiddler)$/icon\n\\end\n\n\\define plugin-disable-title()\n$:/config/Plugins/Disabled/$(currentTiddler)$\n\\end\n\n\\define plugin-table-body(type,disabledMessage)\n<div class=\"tc-plugin-info-chunk tc-small-icon\">\n<$reveal type=\"nomatch\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"yes\">\n{{$:/core/images/right-arrow}}\n</$button>\n</$reveal>\n<$reveal type=\"match\" state=<<popup-state>> text=\"yes\">\n<$button class=\"tc-btn-invisible tc-btn-dropdown\" set=<<popup-state>> setTo=\"no\">\n{{$:/core/images/down-arrow}}\n</$button>\n</$reveal>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<$transclude tiddler=<<currentTiddler>> subtiddler=<<plugin-icon-title>>>\n<$transclude tiddler=\"$:/core/images/plugin-generic-$type$\"/>\n</$transclude>\n</div>\n<div class=\"tc-plugin-info-chunk\">\n<h1>\n''<$view field=\"description\"><$view field=\"title\"/></$view>'' $disabledMessage$\n</h1>\n<h2>\n<$view field=\"title\"/>\n</h2>\n<h2>\n<div><em><$view field=\"version\"/></em></div>\n</h2>\n</div>\n\\end\n\n\\define plugin-table(type)\n<$set name=\"qualified-state\" value=<<qualify \"$:/state/plugin-info\">>>\n<$list filter=\"[!has[draft.of]plugin-type[$type$]sort[description]]\" emptyMessage=<<lingo \"Empty/Hint\">>>\n<$set name=\"popup-state\" value=<<popup-state-macro>>>\n<$link to={{!!title}} class=\"tc-plugin-info\">\n<<plugin-table-body type:\"$type$\">>\n</$link>\n<$reveal type=\"match\" text=\"yes\" state=<<popup-state>>>\n<div class=\"tc-plugin-info-dropdown\">\n<div class=\"tc-plugin-info-dropdown-body\">\n<$set name=\"target\" value={{!!title}}>\n\n{{$:/plugins/ahahn/tinka/dropdownManage}}\n\n</$set>\n</div>\n</div>\n</$reveal>\n</$set>\n</$list>\n</$set>\n\\end\n\n!!Installed Plugins\n\n<<plugin-table plugin>>\n\n!!Installed Themes\n\n<<plugin-table theme>>\n"
},
"$:/plugins/ahahn/tinka/pluginSidePanel": {
"title": "$:/plugins/ahahn/tinka/pluginSidePanel",
"type": "text/vnd.tiddlywiki",
"text": "\\define pluginFilter()\n[[$(pluginPrefix)$]plugintiddlers[]sort[]]\n\\end\n\n\\define pluginDirFilter()\n[all[tiddlers]prefix[$(pluginPrefix)$]sort[]]\n\\end\n\n\\define newPluginTiddler()\n$(pluginPrefix)$/New Tiddler\n\\end\n\n<$button class=\"tc-btn-invisible tinka-invisible\">\n<$action-sendmessage $message=\"tm-new-tiddler\" $param=<<newPluginTiddler>> />''\n{{$:/core/images/new-button}} Add Tiddler''</$button>\n\n!!!Shadow tiddlers contained in the plugin:\n\n<$list filter=<<pluginFilter>> template=\"$:/core/ui/ListItemTemplate\"/>\n\n!!!Normal tiddlers in the plugin directory:\n<$list filter=<<pluginDirFilter>> template=\"$:/core/ui/ListItemTemplate\"/>\n\n<$reveal state=\"!!extender\" type=\"nomatch\" text=\"open\">\n<$button set=\"!!extender\" setTo=\"open\" class=\"tc-btn-invisible tinka-sidebar-button\"><h3>{{$:/core/images/chevron-right}} Filter search</h3></$button>\n</$reveal>\n<$reveal state=\"!!extender\" type=\"match\" text=\"open\">\n<$button set=\"!!extender\" setTo=\"close\" class=\"tc-btn-invisible tinka-sidebar-button\"><h3>{{$:/core/images/chevron-down}} Filter search</h3></$button>\n<div>\n<$edit-text type=\"search\" tiddler=\"$:/plugins/ahahn/tinka/temp/helpTabSearch\" field=\"filterSearch\" />\n<$list filter={{$:/plugins/ahahn/tinka/temp/helpTabSearch!!filterSearch}} template=\"$:/core/ui/ListItemTemplate\"/>\n</div>\n</$reveal>\n\n<$button class=\"tc-btn-big-green tinka-orange\">\n<$tinka-repackagePlugin $plugin=<<pluginPrefix>> $create=\"no\" $diff=\"$:/plugins/ahahn/tinka/emptyDiff\" />\n<$action-sendmessage $message=\"tm-modal\" $param=\"$:/plugins/ahahn/tinka/packageSuccess\" />Quick-Package</$button>\n<$button class=\"tc-btn-big-green tinka-blue\">\n<$action-deletetiddler $tiddler=<<currentTiddler>> />\nDisable Help Tab</$button>\n"
},
"$:/plugins/ahahn/tinka/search-default": {
"caption": "Default search",
"tags": "$:/tags/TinkaSearch",
"title": "$:/plugins/ahahn/tinka/search-default",
"type": "text/vnd.tiddlywiki",
"text": "\\define searchstring()\n[all[tiddlers]search:title{$(searchTiddler)$}sort[title]]\n\\end\n\nEnter search term: <$edit-text tiddler=\"$:/temp/tinka/search\" type=\"search\" default=\"\" tag=\"input\"/> <$reveal state=\"$:/temp/tinka/search\" type=\"nomatch\" text=\"\"><$button class=\"tc-btn-invisible\" set=\"$:/temp/tinka/search\" setTo=\"\">{{$:/core/images/close-button}}</$button></$reveal>\n\n<$reveal state=\"$:/temp/tinka/search\" type=\"nomatch\" text=\"\">\n <$set name=\"searchTiddler\" value=\"$:/temp/tinka/search\">\n <ul>\n <$list filter=<<searchstring>> emptyMessage=\"<li class='tinka-list-item'><i>No Tiddlers selected.</i></li>\">\n <li class=\"tinka-list-item\">\n <$checkbox tiddler=<<qualified-modify-add>> tag={{!!title}} />\n <$link to={{!!title}}><$text text={{!!title}} /></$link>\n </li>\n </$list>\n </ul>\n </$set>\n</$reveal>\n\n<!--Empty search string would list all tiddlers-->\n<$reveal state=\"$:/temp/tinka/search\" type=\"match\" text=\"\">\n <ul>\n <li class=\"tinka-list-item\"><i>No Tiddlers selected.</i></li>\n </ul>\n</$reveal>\n\n\n"
},
"$:/plugins/ahahn/tinka/search-filter": {
"caption": "Filter search",
"list-after": "$:/plugins/ahahn/tinka/search-default",
"tags": "$:/tags/TinkaSearch",
"title": "$:/plugins/ahahn/tinka/search-filter",
"type": "text/vnd.tiddlywiki",
"text": "Enter Filterstring to select tiddlers: <$edit-text tiddler=\"$:/temp/tinka/search\" type=\"search\" default=\"\" tag=\"input\"/> <$reveal state=\"$:/temp/tinka/search\" type=\"nomatch\" text=\"\"><$button class=\"tc-btn-invisible\" set=\"$:/temp/tinka/search\" setTo=\"\">{{$:/core/images/close-button}}</$button></$reveal>\n<ul>\n<$list filter={{$:/temp/tinka/search}} emptyMessage=\"<li class='tinka-list-item'><i>No Tiddlers selected.</i></li>\">\n\t\t<li class=\"tinka-list-item\">\n <$checkbox tiddler=<<qualified-modify-add>> tag={{!!title}} />\n <$link to={{!!title}}><$text text={{!!title}} /></$link>\n </li>\n</$list>\n</ul>\n"
},
"$:/plugins/ahahn/tinka/searchDisplay": {
"title": "$:/plugins/ahahn/tinka/searchDisplay",
"type": "text/vnd.tiddlywiki",
"text": "<<tabs \"[[$:/plugins/ahahn/tinka/search-default]] [[$:/plugins/ahahn/tinka/search-filter]]\" \"$:/plugins/ahahn/tinka/search-default\" \"$:/temp/tinka/searchTab\">>\n"
},
"$:/plugins/ahahn/tinka/usage": {
"caption": "Usage/Help",
"created": "20150430092825762",
"modified": "20170225181342015",
"tags": "",
"title": "$:/plugins/ahahn/tinka/usage",
"type": "text/vnd.tiddlywiki",
"text": "{{$:/plugins/ahahn/tinka/docs/How to create a new plugin}}\n\n{{$:/plugins/ahahn/tinka/docs/Help Tab}}\n\n!! Notes\n\nWhen packaging or repackaging a plugin, the version number of the plugin is automatically increased. This might not be wanted in all cases and has to be manually corrected after packaging.\n\nAlso version suffixes such as:\n\n* -prerelease\n* -beta\n\nare supported and will be appended to the new version number when present.\n\n!! Plugin mechanism\nFor more information about how the plugin mechanism in TiddlyWiki works, see the official documentation: http://tiddlywiki.com/#PluginMechanism\n\n!! Filter language\nFilters are useful to select a subset of tiddlers from a wiki. If you are new to filters, learn more about them here: http://tiddlywiki.com/#Filters"
}
}
}
/*!
* (The MIT License)
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Version: 0.35.1
* Release date: 25/01/2018 (built at 25/01/2018 10:06:15)
*/
/**
* Fix for bootstrap styles
*/
.handsontable .table th, .handsontable .table td {
border-top: none;
}
.handsontable tr {
background: #fff;
}
.handsontable td {
background-color: inherit;
}
.handsontable .table caption + thead tr:first-child th,
.handsontable .table caption + thead tr:first-child td,
.handsontable .table colgroup + thead tr:first-child th,
.handsontable .table colgroup + thead tr:first-child td,
.handsontable .table thead:first-child tr:first-child th,
.handsontable .table thead:first-child tr:first-child td {
border-top: 1px solid #CCCCCC;
}
/* table-bordered */
.handsontable .table-bordered {
border: 0;
border-collapse: separate;
}
.handsontable .table-bordered th,
.handsontable .table-bordered td {
border-left: none;
}
.handsontable .table-bordered th:first-child,
.handsontable .table-bordered td:first-child {
border-left: 1px solid #CCCCCC;
}
.handsontable .table > tbody > tr > td,
.handsontable .table > tbody > tr > th,
.handsontable .table > tfoot > tr > td,
.handsontable .table > tfoot > tr > th,
.handsontable .table > thead > tr > td,
.handsontable .table > thead > tr > th {
line-height: 21px;
padding: 0 4px;
}
.col-lg-1.handsontable, .col-lg-10.handsontable, .col-lg-11.handsontable, .col-lg-12.handsontable,
.col-lg-2.handsontable, .col-lg-3.handsontable, .col-lg-4.handsontable, .col-lg-5.handsontable, .col-lg-6.handsontable, .col-lg-7.handsontable, .col-lg-8.handsontable, .col-lg-9.handsontable,
.col-md-1.handsontable, .col-md-10.handsontable, .col-md-11.handsontable, .col-md-12.handsontable,
.col-md-2.handsontable, .col-md-3.handsontable, .col-md-4.handsontable, .col-md-5.handsontable, .col-md-6.handsontable, .col-md-7.handsontable, .col-md-8.handsontable, .col-md-9.handsontable
.col-sm-1.handsontable, .col-sm-10.handsontable, .col-sm-11.handsontable, .col-sm-12.handsontable,
.col-sm-2.handsontable, .col-sm-3.handsontable, .col-sm-4.handsontable, .col-sm-5.handsontable, .col-sm-6.handsontable, .col-sm-7.handsontable, .col-sm-8.handsontable, .col-sm-9.handsontable
.col-xs-1.handsontable, .col-xs-10.handsontable, .col-xs-11.handsontable, .col-xs-12.handsontable,
.col-xs-2.handsontable, .col-xs-3.handsontable, .col-xs-4.handsontable, .col-xs-5.handsontable, .col-xs-6.handsontable, .col-xs-7.handsontable, .col-xs-8.handsontable, .col-xs-9.handsontable {
padding-left: 0;
padding-right: 0;
}
.handsontable .table-striped > tbody > tr:nth-of-type(even) {
background-color: #FFF;
}
.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; /*must be 0, otherwise blank space appears in scroll demo after scrolling max to the right */
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;
/* it must be separate, otherwise there are offset miscalculations in WebKit: http://stackoverflow.com/questions/2655987/border-collapse-differences-in-ff-and-webkit */
/* this actually only changes appearance of user selection - does not make text unselectable */
/* -webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
-ms-user-select: none;
user-select: none; */ /* no browser supports unprefixed version */
border-spacing: 0;
margin: 0;
border-width: 0;
table-layout: fixed;
width: 0;
outline-width: 0;
/* reset bootstrap table style. for more info see: https://github.com/handsontable/handsontable/issues/224 */
max-width: none;
max-height: none;
}
.handsontable col {
width: 30px;
}
.handsontable col.rowHeader {
width: 30px;
}
.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;
/* top, bottom padding different than 0 is handled poorly by FF with HTML5 doctype */
background-color: #FFF;
vertical-align: top;
overflow: hidden;
outline-width: 0;
white-space: pre-line;
/* preserve new line character in cell */
background-clip: padding-box;
}
.handsontable td.htInvalid {
background-color: #ff4c42 !important; /*gives priority over td.area selection background*/
}
.handsontable td.htNoWrap {
white-space: nowrap;
}
.handsontable th:last-child {
/*Foundation framework fix*/
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;
}
/* selection */
.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;
}
#hot-display-license-info {
font-size: 9px;
color: #323232 ;
padding: 5px 0 3px 0;
font-family: Helvetica, Arial, sans-serif;
text-align: left;
}
/* plugins */
/* row + column resizer*/
.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: 30px;
}
.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;
}
/* border line */
.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%); /* FF3.6+ */
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))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(181,209,255,0.34) 0%,rgba(181,209,255,0.34) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(181,209,255,0.34) 0%,rgba(181,209,255,0.34) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(181,209,255,0.34) 0%,rgba(181,209,255,0.34) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(181,209,255,0.34) 0%,rgba(181,209,255,0.34) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#57b5d1ff', endColorstr='#57b5d1ff',GradientType=0 ); /* IE6-9 */
background-color: #fff;
}
/* fill handle */
.handsontable .wtBorder.corner {
font-size: 0;
cursor: crosshair;
}
.handsontable .htBorder.htFillBorder {
background: red;
width: 1px;
height: 1px;
}
.handsontableInput {
border:none;
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;
/*below are needed to overwrite stuff added by jQuery UI Bootstrap theme*/
display: block;
color: #000;
border-radius: 0;
background-color: #FFF;
/*overwrite styles potentionally made by a framework*/
}
.handsontableInputHolder {
position: absolute;
top: 0;
left: 0;
z-index: 100;
}
.htSelectEditor {
-webkit-appearance: menulist-button !important;
position: absolute;
width: auto;
}
/*
TextRenderer readOnly cell
*/
.handsontable .htDimmed {
color: #777;
}
.handsontable .htSubmenu {
position: relative;
}
.handsontable .htSubmenu :after{
content: '\25B6';
color: #777;
position: absolute;
right: 5px;
}
/*
TextRenderer horizontal alignment
*/
.handsontable .htLeft{
text-align: left;
}
.handsontable .htCenter{
text-align: center;
}
.handsontable .htRight{
text-align: right;
}
.handsontable .htJustify{
text-align: justify;
}
/*
TextRenderer vertical alignment
*/
.handsontable .htTop{
vertical-align: top;
}
.handsontable .htMiddle{
vertical-align: middle;
}
.handsontable .htBottom{
vertical-align: bottom;
}
/*
TextRenderer placeholder value
*/
.handsontable .htPlaceholder {
color: #999;
}
/*
AutocompleteRenderer down arrow
*/
.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;
}
/*
CheckboxRenderer
*/
.handsontable .htCheckboxRendererInput {
display: inline-block;
vertical-align: middle;
}
.handsontable .htCheckboxRendererInput.noValue {
opacity: 0.5;
}
.handsontable .htCheckboxRendererLabel {
cursor: pointer;
display: inline-block;
width: 100%;
}
@-webkit-keyframes opacity-hide {
from {
opacity: 1;
}
to {
opacity: 0;
/*display: none;*/
}
}
@keyframes opacity-hide {
from {
/*display: block;*/
opacity: 1;
}
to {
opacity: 0;
/*display: none;*/
}
}
@-webkit-keyframes opacity-show {
from {
opacity: 0;
/*display: none;*/
}
to {
opacity: 1;
/*display: block;*/
}
}
@keyframes opacity-show {
from {
opacity: 0;
/*display: none;*/
}
to {
opacity: 1;
/*display: block;*/
}
}
/**
* Handsontable in Handsontable
*/
.handsontable .handsontable.ht_clone_top .wtHider {
padding: 0 0 5px 0;
}
/**
* Autocomplete Editor
*/
.handsontable .autocompleteEditor.handsontable {
padding-right: 17px;
}
.handsontable .autocompleteEditor.handsontable.htMacScroll {
padding-right: 15px;
}
/**
* Handsontable listbox theme
*/
.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;
}
/*
Cell borders
*/
.htBordered{
/*box-sizing: border-box !important;*/
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;
/*top: -300%;*/
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 {
/*left: 5px;*/
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;
}
/*WalkontableDebugOverlay*/
.wtDebugHidden {
display: none;
}
.wtDebugVisible {
display: block;
-webkit-animation-duration: 0.5s;
-webkit-animation-name: wtFadeInFromNone;
animation-duration: 0.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 Text Editor stylesheet
*/
.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;
}
/* Initial left/top coordinates - overwritten when actual position is set */
.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: 0px;
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);
/*margin-top: 17pt;*/
/*margin-left: 20pt;*/
}
.htMobileEditorContainer .leftButton:active:after {
border-color: #cfcfcf;
}
.htMobileEditorContainer .rightButton:after {
border-top: 2px solid #288ffe;
border-left: 2px solid #288ffe;
-webkit-transform: rotate(135deg);
/*margin-top: 17pt;*/
/*margin-left: 10pt;*/
}
.htMobileEditorContainer .rightButton:active:after {
border-color: #cfcfcf;
}
.htMobileEditorContainer .upButton:after {
/*border-top: 2px solid #cfcfcf;*/
border-top: 2px solid #288ffe;
border-left: 2px solid #288ffe;
-webkit-transform: rotate(45deg);
/*margin-top: 22pt;*/
/*margin-left: 15pt;*/
}
.htMobileEditorContainer .upButton:active:after {
border-color: #cfcfcf;
}
.htMobileEditorContainer .downButton:after {
border-top: 2px solid #288ffe;
border-left: 2px solid #288ffe;
-webkit-transform: rotate(225deg);
/*margin-top: 15pt;*/
/*margin-left: 15pt;*/
}
.htMobileEditorContainer .downButton:active:after {
border-color: #cfcfcf;
}
.handsontable.hide-tween {
-webkit-animation: opacity-hide 0.3s;
animation: opacity-hide 0.3s;
animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
}
.handsontable.show-tween {
-webkit-animation: opacity-show 0.3s;
animation: opacity-show 0.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: none;
border-left: 3px solid #ccc;
background-color: #fff;
width: 215px;
height: 90px;
font-size: 12px;
padding: 5px;
outline: 0px !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; /* needs to be higher than 1050 - z-index for Twitter Bootstrap modal (#1569) */
}
.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;
}
textarea#HandsontableCopyPaste {
position: fixed !important;
top: 0 !important;
right: 100% !important;
overflow: hidden;
opacity: 0;
outline: 0 none !important;
}
.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;
}
/*# sourceMappingURL=handsontable.css.map*/
/*!
* (The MIT License)
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright (c) 2015 Handsoncode sp. z o.o. <hello@handsoncode.net>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Version: 0.35.1
* Release date: 25/01/2018 (built at 25/01/2018 10:06:15)
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("Handsontable", [], factory);
else if(typeof exports === 'object')
exports["Handsontable"] = factory();
else
root["Handsontable"] = factory();
})(typeof self !== 'undefined' ? self : this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 318);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.HTML_CHARACTERS = undefined;
exports.getParent = getParent;
exports.closest = closest;
exports.closestDown = closestDown;
exports.isChildOf = isChildOf;
exports.isChildOfWebComponentTable = isChildOfWebComponentTable;
exports.polymerWrap = polymerWrap;
exports.polymerUnwrap = polymerUnwrap;
exports.index = index;
exports.overlayContainsElement = overlayContainsElement;
exports.hasClass = hasClass;
exports.addClass = addClass;
exports.removeClass = removeClass;
exports.removeTextNodes = removeTextNodes;
exports.empty = empty;
exports.fastInnerHTML = fastInnerHTML;
exports.fastInnerText = fastInnerText;
exports.isVisible = isVisible;
exports.offset = offset;
exports.getWindowScrollTop = getWindowScrollTop;
exports.getWindowScrollLeft = getWindowScrollLeft;
exports.getScrollTop = getScrollTop;
exports.getScrollLeft = getScrollLeft;
exports.getScrollableElement = getScrollableElement;
exports.getTrimmingContainer = getTrimmingContainer;
exports.getStyle = getStyle;
exports.getComputedStyle = getComputedStyle;
exports.outerWidth = outerWidth;
exports.outerHeight = outerHeight;
exports.innerHeight = innerHeight;
exports.innerWidth = innerWidth;
exports.addEvent = addEvent;
exports.removeEvent = removeEvent;
exports.getCaretPosition = getCaretPosition;
exports.getSelectionEndPosition = getSelectionEndPosition;
exports.getSelectionText = getSelectionText;
exports.setCaretPosition = setCaretPosition;
exports.getScrollbarWidth = getScrollbarWidth;
exports.hasVerticalScrollbar = hasVerticalScrollbar;
exports.hasHorizontalScrollbar = hasHorizontalScrollbar;
exports.setOverlayPosition = setOverlayPosition;
exports.getCssTransform = getCssTransform;
exports.resetCssTransform = resetCssTransform;
exports.isInput = isInput;
exports.isOutsideInput = isOutsideInput;
var _browser = __webpack_require__(28);
var _feature = __webpack_require__(39);
/**
* Get the parent of the specified node in the DOM tree.
*
* @param {HTMLElement} element Element from which traversing is started.
* @param {Number} [level=0] Traversing deep level.
* @return {HTMLElement|null}
*/
function getParent(element) {
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var iteration = -1;
var parent = null;
while (element != null) {
if (iteration === level) {
parent = element;
break;
}
if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
element = element.host;
} else {
iteration++;
element = element.parentNode;
}
}
return parent;
}
/**
* Goes up the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.
* This method goes up through web components.
*
* @param {HTMLElement} element Element from which traversing is started
* @param {Array} nodes Array of elements or Array of elements name
* @param {HTMLElement} [until]
* @returns {HTMLElement|null}
*/
function closest(element, nodes, until) {
while (element != null && element !== until) {
if (element.nodeType === Node.ELEMENT_NODE && (nodes.indexOf(element.nodeName) > -1 || nodes.indexOf(element) > -1)) {
return element;
}
if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
element = element.host;
} else {
element = element.parentNode;
}
}
return null;
}
/**
* Goes "down" the DOM tree (including given element) until it finds an element that matches the nodes or nodes name.
*
* @param {HTMLElement} element Element from which traversing is started
* @param {Array} nodes Array of elements or Array of elements name
* @param {HTMLElement} [until]
* @returns {HTMLElement|null}
*/
function closestDown(element, nodes, until) {
var matched = [];
while (element) {
element = closest(element, nodes, until);
if (!element || until && !until.contains(element)) {
break;
}
matched.push(element);
if (element.host && element.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
element = element.host;
} else {
element = element.parentNode;
}
}
var length = matched.length;
return length ? matched[length - 1] : null;
}
/**
* Goes up the DOM tree and checks if element is child of another element.
*
* @param child Child element
* @param {Object|String} parent Parent element OR selector of the parent element.
* If string provided, function returns `true` for the first occurrence of element with that class.
* @returns {Boolean}
*/
function isChildOf(child, parent) {
var node = child.parentNode;
var queriedParents = [];
if (typeof parent === 'string') {
queriedParents = Array.prototype.slice.call(document.querySelectorAll(parent), 0);
} else {
queriedParents.push(parent);
}
while (node != null) {
if (queriedParents.indexOf(node) > -1) {
return true;
}
node = node.parentNode;
}
return false;
}
/**
* Check if an element is part of `hot-table` web component.
*
* @param {Element} element
* @returns {Boolean}
*/
function isChildOfWebComponentTable(element) {
var hotTableName = 'hot-table',
result = false,
parentNode;
parentNode = polymerWrap(element);
function isHotTable(element) {
return element.nodeType === Node.ELEMENT_NODE && element.nodeName === hotTableName.toUpperCase();
}
while (parentNode != null) {
if (isHotTable(parentNode)) {
result = true;
break;
} else if (parentNode.host && parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
result = isHotTable(parentNode.host);
if (result) {
break;
}
parentNode = parentNode.host;
}
parentNode = parentNode.parentNode;
}
return result;
}
/**
* Wrap element into polymer/webcomponent container if exists
*
* @param element
* @returns {*}
*/
function polymerWrap(element) {
/* global Polymer */
return typeof Polymer !== 'undefined' && typeof wrap === 'function' ? wrap(element) : element;
}
/**
* Unwrap element from polymer/webcomponent container if exists
*
* @param element
* @returns {*}
*/
function polymerUnwrap(element) {
/* global Polymer */
return typeof Polymer !== 'undefined' && typeof unwrap === 'function' ? unwrap(element) : element;
}
/**
* Counts index of element within its parent
* WARNING: for performance reasons, assumes there are only element nodes (no text nodes). This is true for Walkotnable
* Otherwise would need to check for nodeType or use previousElementSibling
*
* @see http://jsperf.com/sibling-index/10
* @param {Element} element
* @return {Number}
*/
function index(element) {
var i = 0;
if (element.previousSibling) {
/* eslint-disable no-cond-assign */
while (element = element.previousSibling) {
++i;
}
}
return i;
}
/**
* Check if the provided overlay contains the provided element
*
* @param {String} overlay
* @param {HTMLElement} element
* @returns {boolean}
*/
function overlayContainsElement(overlayType, element) {
var overlayElement = document.querySelector('.ht_clone_' + overlayType);
return overlayElement ? overlayElement.contains(element) : null;
}
var classListSupport = !!document.documentElement.classList;
var _hasClass, _addClass, _removeClass;
function filterEmptyClassNames(classNames) {
var len = 0,
result = [];
if (!classNames || !classNames.length) {
return result;
}
while (classNames[len]) {
result.push(classNames[len]);
len++;
}
return result;
}
if (classListSupport) {
var isSupportMultipleClassesArg = function () {
var element = document.createElement('div');
element.classList.add('test', 'test2');
return element.classList.contains('test2');
}();
_hasClass = function _hasClass(element, className) {
if (element.classList === void 0 || className === '') {
return false;
}
return element.classList.contains(className);
};
_addClass = function _addClass(element, className) {
var len = 0;
if (typeof className === 'string') {
className = className.split(' ');
}
className = filterEmptyClassNames(className);
if (isSupportMultipleClassesArg) {
element.classList.add.apply(element.classList, className);
} else {
while (className && className[len]) {
element.classList.add(className[len]);
len++;
}
}
};
_removeClass = function _removeClass(element, className) {
var len = 0;
if (typeof className === 'string') {
className = className.split(' ');
}
className = filterEmptyClassNames(className);
if (isSupportMultipleClassesArg) {
element.classList.remove.apply(element.classList, className);
} else {
while (className && className[len]) {
element.classList.remove(className[len]);
len++;
}
}
};
} else {
var createClassNameRegExp = function createClassNameRegExp(className) {
return new RegExp('(\\s|^)' + className + '(\\s|$)');
};
_hasClass = function _hasClass(element, className) {
// http://snipplr.com/view/3561/addclass-removeclass-hasclass/
return element.className !== void 0 && createClassNameRegExp(className).test(element.className);
};
_addClass = function _addClass(element, className) {
var len = 0,
_className = element.className;
if (typeof className === 'string') {
className = className.split(' ');
}
if (_className === '') {
_className = className.join(' ');
} else {
while (className && className[len]) {
if (!createClassNameRegExp(className[len]).test(_className)) {
_className += ' ' + className[len];
}
len++;
}
}
element.className = _className;
};
_removeClass = function _removeClass(element, className) {
var len = 0,
_className = element.className;
if (typeof className === 'string') {
className = className.split(' ');
}
while (className && className[len]) {
// String.prototype.trim is defined in polyfill.js
_className = _className.replace(createClassNameRegExp(className[len]), ' ').trim();
len++;
}
if (element.className !== _className) {
element.className = _className;
}
};
}
/**
* Checks if element has class name
*
* @param {HTMLElement} element
* @param {String} className Class name to check
* @returns {Boolean}
*/
function hasClass(element, className) {
return _hasClass(element, className);
}
/**
* Add class name to an element
*
* @param {HTMLElement} element
* @param {String|Array} className Class name as string or array of strings
*/
function addClass(element, className) {
return _addClass(element, className);
}
/**
* Remove class name from an element
*
* @param {HTMLElement} element
* @param {String|Array} className Class name as string or array of strings
*/
function removeClass(element, className) {
return _removeClass(element, className);
}
function removeTextNodes(element, parent) {
if (element.nodeType === 3) {
parent.removeChild(element); // bye text nodes!
} else if (['TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TR'].indexOf(element.nodeName) > -1) {
var childs = element.childNodes;
for (var i = childs.length - 1; i >= 0; i--) {
removeTextNodes(childs[i], element);
}
}
}
/**
* Remove childs function
* WARNING - this doesn't unload events and data attached by jQuery
* http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/9
* http://jsperf.com/jquery-html-vs-empty-vs-innerhtml/11 - no siginificant improvement with Chrome remove() method
*
* @param element
* @returns {void}
*/
//
function empty(element) {
var child;
/* eslint-disable no-cond-assign */
while (child = element.lastChild) {
element.removeChild(child);
}
}
var HTML_CHARACTERS = exports.HTML_CHARACTERS = /(<(.*)>|&(.*);)/;
/**
* Insert content into element trying avoid innerHTML method.
* @return {void}
*/
function fastInnerHTML(element, content) {
if (HTML_CHARACTERS.test(content)) {
element.innerHTML = content;
} else {
fastInnerText(element, content);
}
}
/**
* Insert text content into element
* @return {void}
*/
var textContextSupport = !!document.createTextNode('test').textContent;
function fastInnerText(element, content) {
var child = element.firstChild;
if (child && child.nodeType === 3 && child.nextSibling === null) {
// fast lane - replace existing text node
if (textContextSupport) {
// http://jsperf.com/replace-text-vs-reuse
child.textContent = content;
} else {
// http://jsperf.com/replace-text-vs-reuse
child.data = content;
}
} else {
// slow lane - empty element and insert a text node
empty(element);
element.appendChild(document.createTextNode(content));
}
}
/**
* Returns true if element is attached to the DOM and visible, false otherwise
* @param elem
* @returns {boolean}
*/
function isVisible(elem) {
var next = elem;
while (polymerUnwrap(next) !== document.documentElement) {
// until <html> reached
if (next === null) {
// parent detached from DOM
return false;
} else if (next.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
if (next.host) {
// this is Web Components Shadow DOM
// see: http://w3c.github.io/webcomponents/spec/shadow/#encapsulation
// according to spec, should be if (next.ownerDocument !== window.document), but that doesn't work yet
if (next.host.impl) {
// Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features disabled
return isVisible(next.host.impl);
} else if (next.host) {
// Chrome 33.0.1723.0 canary (2013-11-29) Web Platform features enabled
return isVisible(next.host);
}
throw new Error('Lost in Web Components world');
} else {
return false; // this is a node detached from document in IE8
}
} else if (next.style.display === 'none') {
return false;
}
next = next.parentNode;
}
return true;
}
/**
* Returns elements top and left offset relative to the document. Function is not compatible with jQuery offset.
*
* @param {HTMLElement} elem
* @return {Object} Returns object with `top` and `left` props
*/
function offset(elem) {
var offsetLeft, offsetTop, lastElem, docElem, box;
docElem = document.documentElement;
if ((0, _feature.hasCaptionProblem)() && elem.firstChild && elem.firstChild.nodeName === 'CAPTION') {
// fixes problem with Firefox ignoring <caption> in TABLE offset (see also export outerHeight)
// http://jsperf.com/offset-vs-getboundingclientrect/8
box = elem.getBoundingClientRect();
return {
top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)
};
}
offsetLeft = elem.offsetLeft;
offsetTop = elem.offsetTop;
lastElem = elem;
/* eslint-disable no-cond-assign */
while (elem = elem.offsetParent) {
// from my observation, document.body always has scrollLeft/scrollTop == 0
if (elem === document.body) {
break;
}
offsetLeft += elem.offsetLeft;
offsetTop += elem.offsetTop;
lastElem = elem;
}
// slow - http://jsperf.com/offset-vs-getboundingclientrect/6
if (lastElem && lastElem.style.position === 'fixed') {
// if(lastElem !== document.body) { //faster but does gives false positive in Firefox
offsetLeft += window.pageXOffset || docElem.scrollLeft;
offsetTop += window.pageYOffset || docElem.scrollTop;
}
return {
left: offsetLeft,
top: offsetTop
};
}
/**
* Returns the document's scrollTop property.
*
* @returns {Number}
*/
function getWindowScrollTop() {
var res = window.scrollY;
if (res === void 0) {
// IE8-11
res = document.documentElement.scrollTop;
}
return res;
}
/**
* Returns the document's scrollLeft property.
*
* @returns {Number}
*/
function getWindowScrollLeft() {
var res = window.scrollX;
if (res === void 0) {
// IE8-11
res = document.documentElement.scrollLeft;
}
return res;
}
/**
* Returns the provided element's scrollTop property.
*
* @param element
* @returns {Number}
*/
function getScrollTop(element) {
if (element === window) {
return getWindowScrollTop();
}
return element.scrollTop;
}
/**
* Returns the provided element's scrollLeft property.
*
* @param element
* @returns {Number}
*/
function getScrollLeft(element) {
if (element === window) {
return getWindowScrollLeft();
}
return element.scrollLeft;
}
/**
* Returns a DOM element responsible for scrolling of the provided element.
*
* @param {HTMLElement} element
* @returns {HTMLElement} Element's scrollable parent
*/
function getScrollableElement(element) {
var el = element.parentNode,
props = ['auto', 'scroll'],
overflow,
overflowX,
overflowY,
computedStyle = '',
computedOverflow = '',
computedOverflowY = '',
computedOverflowX = '';
while (el && el.style && document.body !== el) {
overflow = el.style.overflow;
overflowX = el.style.overflowX;
overflowY = el.style.overflowY;
if (overflow == 'scroll' || overflowX == 'scroll' || overflowY == 'scroll') {
return el;
} else if (window.getComputedStyle) {
computedStyle = window.getComputedStyle(el);
computedOverflow = computedStyle.getPropertyValue('overflow');
computedOverflowY = computedStyle.getPropertyValue('overflow-y');
computedOverflowX = computedStyle.getPropertyValue('overflow-x');
if (computedOverflow === 'scroll' || computedOverflowX === 'scroll' || computedOverflowY === 'scroll') {
return el;
}
}
// The '+ 1' after the scrollHeight/scrollWidth is to prevent problems with zoomed out Chrome.
if (el.clientHeight <= el.scrollHeight + 1 && (props.indexOf(overflowY) !== -1 || props.indexOf(overflow) !== -1 || props.indexOf(computedOverflow) !== -1 || props.indexOf(computedOverflowY) !== -1)) {
return el;
}
if (el.clientWidth <= el.scrollWidth + 1 && (props.indexOf(overflowX) !== -1 || props.indexOf(overflow) !== -1 || props.indexOf(computedOverflow) !== -1 || props.indexOf(computedOverflowX) !== -1)) {
return el;
}
el = el.parentNode;
}
return window;
}
/**
* Returns a DOM element responsible for trimming the provided element.
*
* @param {HTMLElement} base Base element
* @returns {HTMLElement} Base element's trimming parent
*/
function getTrimmingContainer(base) {
var el = base.parentNode;
while (el && el.style && document.body !== el) {
if (el.style.overflow !== 'visible' && el.style.overflow !== '') {
return el;
} else if (window.getComputedStyle) {
var computedStyle = window.getComputedStyle(el);
if (computedStyle.getPropertyValue('overflow') !== 'visible' && computedStyle.getPropertyValue('overflow') !== '') {
return el;
}
}
el = el.parentNode;
}
return window;
}
/**
* Returns a style property for the provided element. (Be it an inline or external style).
*
* @param {HTMLElement} element
* @param {String} prop Wanted property
* @returns {String|undefined} Element's style property
*/
function getStyle(element, prop) {
/* eslint-disable */
if (!element) {
return;
} else if (element === window) {
if (prop === 'width') {
return window.innerWidth + 'px';
} else if (prop === 'height') {
return window.innerHeight + 'px';
}
return;
}
var styleProp = element.style[prop],
computedStyle;
if (styleProp !== '' && styleProp !== void 0) {
return styleProp;
} else {
computedStyle = getComputedStyle(element);
if (computedStyle[prop] !== '' && computedStyle[prop] !== void 0) {
return computedStyle[prop];
}
}
}
/**
* Returns a computed style object for the provided element. (Needed if style is declared in external stylesheet).
*
* @param element
* @returns {IEElementStyle|CssStyle} Elements computed style object
*/
function getComputedStyle(element) {
return element.currentStyle || document.defaultView.getComputedStyle(element);
}
/**
* Returns the element's outer width.
*
* @param element
* @returns {number} Element's outer width
*/
function outerWidth(element) {
return element.offsetWidth;
}
/**
* Returns the element's outer height
*
* @param elem
* @returns {number} Element's outer height
*/
function outerHeight(elem) {
if ((0, _feature.hasCaptionProblem)() && elem.firstChild && elem.firstChild.nodeName === 'CAPTION') {
// fixes problem with Firefox ignoring <caption> in TABLE.offsetHeight
// jQuery (1.10.1) still has this unsolved
// may be better to just switch to getBoundingClientRect
// http://bililite.com/blog/2009/03/27/finding-the-size-of-a-table/
// http://lists.w3.org/Archives/Public/www-style/2009Oct/0089.html
// http://bugs.jquery.com/ticket/2196
// http://lists.w3.org/Archives/Public/www-style/2009Oct/0140.html#start140
return elem.offsetHeight + elem.firstChild.offsetHeight;
}
return elem.offsetHeight;
}
/**
* Returns the element's inner height.
*
* @param element
* @returns {number} Element's inner height
*/
function innerHeight(element) {
return element.clientHeight || element.innerHeight;
}
/**
* Returns the element's inner width.
*
* @param element
* @returns {number} Element's inner width
*/
function innerWidth(element) {
return element.clientWidth || element.innerWidth;
}
function addEvent(element, event, callback) {
if (window.addEventListener) {
element.addEventListener(event, callback, false);
} else {
element.attachEvent('on' + event, callback);
}
}
function removeEvent(element, event, callback) {
if (window.removeEventListener) {
element.removeEventListener(event, callback, false);
} else {
element.detachEvent('on' + event, callback);
}
}
/**
* Returns caret position in text input
*
* @author http://stackoverflow.com/questions/263743/how-to-get-caret-position-in-textarea
* @return {Number}
*/
function getCaretPosition(el) {
if (el.selectionStart) {
return el.selectionStart;
} else if (document.selection) {
// IE8
el.focus();
var r = document.selection.createRange();
if (r == null) {
return 0;
}
var re = el.createTextRange();
var rc = re.duplicate();
re.moveToBookmark(r.getBookmark());
rc.setEndPoint('EndToStart', re);
return rc.text.length;
}
return 0;
}
/**
* Returns end of the selection in text input
*
* @return {Number}
*/
function getSelectionEndPosition(el) {
if (el.selectionEnd) {
return el.selectionEnd;
} else if (document.selection) {
// IE8
var r = document.selection.createRange();
if (r == null) {
return 0;
}
var re = el.createTextRange();
return re.text.indexOf(r.text) + r.text.length;
}
return 0;
}
/**
* Returns text under selection.
*
* @returns {String}
*/
function getSelectionText() {
var text = '';
if (window.getSelection) {
text = window.getSelection().toString();
} else if (document.selection && document.selection.type !== 'Control') {
text = document.selection.createRange().text;
}
return text;
}
/**
* Sets caret position in text input.
*
* @author http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/
* @param {Element} element
* @param {Number} pos
* @param {Number} endPos
*/
function setCaretPosition(element, pos, endPos) {
if (endPos === void 0) {
endPos = pos;
}
if (element.setSelectionRange) {
element.focus();
try {
element.setSelectionRange(pos, endPos);
} catch (err) {
var elementParent = element.parentNode;
var parentDisplayValue = elementParent.style.display;
elementParent.style.display = 'block';
element.setSelectionRange(pos, endPos);
elementParent.style.display = parentDisplayValue;
}
} else if (element.createTextRange) {
// IE8
var range = element.createTextRange();
range.collapse(true);
range.moveEnd('character', endPos);
range.moveStart('character', pos);
range.select();
}
}
var cachedScrollbarWidth;
// http://stackoverflow.com/questions/986937/how-can-i-get-the-browsers-scrollbar-sizes
function walkontableCalculateScrollbarWidth() {
var inner = document.createElement('div');
inner.style.height = '200px';
inner.style.width = '100%';
var outer = document.createElement('div');
outer.style.boxSizing = 'content-box';
outer.style.height = '150px';
outer.style.left = '0px';
outer.style.overflow = 'hidden';
outer.style.position = 'absolute';
outer.style.top = '0px';
outer.style.width = '200px';
outer.style.visibility = 'hidden';
outer.appendChild(inner);
(document.body || document.documentElement).appendChild(outer);
var w1 = inner.offsetWidth;
outer.style.overflow = 'scroll';
var w2 = inner.offsetWidth;
if (w1 == w2) {
w2 = outer.clientWidth;
}
(document.body || document.documentElement).removeChild(outer);
return w1 - w2;
}
/**
* Returns the computed width of the native browser scroll bar.
*
* @return {Number} width
*/
function getScrollbarWidth() {
if (cachedScrollbarWidth === void 0) {
cachedScrollbarWidth = walkontableCalculateScrollbarWidth();
}
return cachedScrollbarWidth;
}
/**
* Checks if the provided element has a vertical scrollbar.
*
* @param {HTMLElement} element
* @returns {Boolean}
*/
function hasVerticalScrollbar(element) {
return element.offsetWidth !== element.clientWidth;
}
/**
* Checks if the provided element has a vertical scrollbar.
*
* @param {HTMLElement} element
* @returns {Boolean}
*/
function hasHorizontalScrollbar(element) {
return element.offsetHeight !== element.clientHeight;
}
/**
* Sets overlay position depending on it's type and used browser
*/
function setOverlayPosition(overlayElem, left, top) {
if ((0, _browser.isIE8)() || (0, _browser.isIE9)()) {
overlayElem.style.top = top;
overlayElem.style.left = left;
} else if ((0, _browser.isSafari)()) {
overlayElem.style['-webkit-transform'] = 'translate3d(' + left + ',' + top + ',0)';
} else {
overlayElem.style.transform = 'translate3d(' + left + ',' + top + ',0)';
}
}
function getCssTransform(element) {
var transform;
if (element.style.transform && (transform = element.style.transform) !== '') {
return ['transform', transform];
} else if (element.style['-webkit-transform'] && (transform = element.style['-webkit-transform']) !== '') {
return ['-webkit-transform', transform];
}
return -1;
}
function resetCssTransform(element) {
if (element.style.transform && element.style.transform !== '') {
element.style.transform = '';
} else if (element.style['-webkit-transform'] && element.style['-webkit-transform'] !== '') {
element.style['-webkit-transform'] = '';
}
}
/**
* Determines if the given DOM element is an input field.
* Notice: By 'input' we mean input, textarea and select nodes
*
* @param {HTMLElement} element - DOM element
* @returns {Boolean}
*/
function isInput(element) {
var inputs = ['INPUT', 'SELECT', 'TEXTAREA'];
return element && (inputs.indexOf(element.nodeName) > -1 || element.contentEditable === 'true');
}
/**
* Determines if the given DOM element is an input field placed OUTSIDE of HOT.
* Notice: By 'input' we mean input, textarea and select nodes
*
* @param {HTMLElement} element - DOM element
* @returns {Boolean}
*/
function isOutsideInput(element) {
return isInput(element) && element.className.indexOf('handsontableInput') == -1 && element.className.indexOf('copyPaste') == -1;
}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.duckSchema = duckSchema;
exports.inherit = inherit;
exports.extend = extend;
exports.deepExtend = deepExtend;
exports.deepClone = deepClone;
exports.clone = clone;
exports.mixin = mixin;
exports.isObjectEquals = isObjectEquals;
exports.isObject = isObject;
exports.defineGetter = defineGetter;
exports.objectEach = objectEach;
exports.getProperty = getProperty;
exports.deepObjectSize = deepObjectSize;
exports.createObjectPropListener = createObjectPropListener;
exports.hasOwnProperty = hasOwnProperty;
var _array = __webpack_require__(2);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/**
* Generate schema for passed object.
*
* @param {Array|Object} object
* @returns {Array|Object}
*/
function duckSchema(object) {
var schema;
if (Array.isArray(object)) {
schema = [];
} else {
schema = {};
objectEach(object, function (value, key) {
if (key === '__children') {
return;
}
if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !Array.isArray(value)) {
schema[key] = duckSchema(value);
} else if (Array.isArray(value)) {
if (value.length && _typeof(value[0]) === 'object' && !Array.isArray(value[0])) {
schema[key] = [duckSchema(value[0])];
} else {
schema[key] = [];
}
} else {
schema[key] = null;
}
});
}
return schema;
}
/**
* Inherit without without calling parent constructor, and setting `Child.prototype.constructor` to `Child` instead of `Parent`.
* Creates temporary dummy function to call it as constructor.
* Described in ticket: https://github.com/handsontable/handsontable/pull/516
*
* @param {Object} Child child class
* @param {Object} Parent parent class
* @return {Object} extended Child
*/
function inherit(Child, Parent) {
Parent.prototype.constructor = Parent;
Child.prototype = new Parent();
Child.prototype.constructor = Child;
return Child;
}
/**
* Perform shallow extend of a target object with extension's own properties.
*
* @param {Object} target An object that will receive the new properties.
* @param {Object} extension An object containing additional properties to merge into the target.
*/
function extend(target, extension) {
objectEach(extension, function (value, key) {
target[key] = value;
});
return target;
}
/**
* Perform deep extend of a target object with extension's own properties.
*
* @param {Object} target An object that will receive the new properties.
* @param {Object} extension An object containing additional properties to merge into the target.
*/
function deepExtend(target, extension) {
objectEach(extension, function (value, key) {
if (extension[key] && _typeof(extension[key]) === 'object') {
if (!target[key]) {
if (Array.isArray(extension[key])) {
target[key] = [];
} else if (Object.prototype.toString.call(extension[key]) === '[object Date]') {
target[key] = extension[key];
} else {
target[key] = {};
}
}
deepExtend(target[key], extension[key]);
} else {
target[key] = extension[key];
}
});
}
/**
* Perform deep clone of an object.
* WARNING! Only clones JSON properties. Will cause error when `obj` contains a function, Date, etc.
*
* @param {Object} obj An object that will be cloned
* @return {Object}
*/
function deepClone(obj) {
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') {
return JSON.parse(JSON.stringify(obj));
}
return obj;
}
/**
* Shallow clone object.
*
* @param {Object} object
* @returns {Object}
*/
function clone(object) {
var result = {};
objectEach(object, function (value, key) {
result[key] = value;
});
return result;
}
/**
* Extend the Base object (usually prototype) of the functionality the `mixins` objects.
*
* @param {Object} Base Base object which will be extended.
* @param {Object} mixins The object of the functionality will be "copied".
* @returns {Object}
*/
function mixin(Base) {
if (!Base.MIXINS) {
Base.MIXINS = [];
}
for (var _len = arguments.length, mixins = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
mixins[_key - 1] = arguments[_key];
}
(0, _array.arrayEach)(mixins, function (mixin) {
Base.MIXINS.push(mixin.MIXIN_NAME);
objectEach(mixin, function (value, key) {
if (Base.prototype[key] !== void 0) {
throw new Error('Mixin conflict. Property \'' + key + '\' already exist and cannot be overwritten.');
}
if (typeof value === 'function') {
Base.prototype[key] = value;
} else {
var getter = function _getter(propertyName, initialValue) {
propertyName = '_' + propertyName;
var initValue = function initValue(value) {
if (Array.isArray(value) || isObject(value)) {
value = deepClone(value);
}
return value;
};
return function () {
if (this[propertyName] === void 0) {
this[propertyName] = initValue(initialValue);
}
return this[propertyName];
};
};
var setter = function _setter(propertyName) {
propertyName = '_' + propertyName;
return function (value) {
this[propertyName] = value;
};
};
Object.defineProperty(Base.prototype, key, {
get: getter(key, value),
set: setter(key),
configurable: true
});
}
});
});
return Base;
}
/**
* Checks if two objects or arrays are (deep) equal
*
* @param {Object|Array} object1
* @param {Object|Array} object2
* @returns {Boolean}
*/
function isObjectEquals(object1, object2) {
return JSON.stringify(object1) === JSON.stringify(object2);
}
/**
* Determines whether given object is a plain Object.
* Note: String and Array are not plain Objects
* @param {*} obj
* @returns {boolean}
*/
function isObject(obj) {
return Object.prototype.toString.call(obj) == '[object Object]';
}
function defineGetter(object, property, value, options) {
options.value = value;
options.writable = options.writable !== false;
options.enumerable = options.enumerable !== false;
options.configurable = options.configurable !== false;
Object.defineProperty(object, property, options);
}
/**
* A specialized version of `.forEach` for objects.
*
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function objectEach(object, iteratee) {
for (var key in object) {
if (!object.hasOwnProperty || object.hasOwnProperty && Object.prototype.hasOwnProperty.call(object, key)) {
if (iteratee(object[key], key, object) === false) {
break;
}
}
}
return object;
}
/**
* Get object property by its name. Access to sub properties can be achieved by dot notation (e.q. `'foo.bar.baz'`).
*
* @param {Object} object Object which value will be exported.
* @param {String} name Object property name.
* @returns {*}
*/
function getProperty(object, name) {
var names = name.split('.');
var result = object;
objectEach(names, function (name) {
result = result[name];
if (result === void 0) {
result = void 0;
return false;
}
});
return result;
}
/**
* Return object length (recursively).
*
* @param {*} object Object for which we want get length.
* @returns {Number}
*/
function deepObjectSize(object) {
if (!isObject(object)) {
return 0;
}
var recursObjLen = function recursObjLen(obj) {
var result = 0;
if (isObject(obj)) {
objectEach(obj, function (key) {
result += recursObjLen(key);
});
} else {
result++;
}
return result;
};
return recursObjLen(object);
}
/**
* Create object with property where its value change will be observed.
*
* @param {*} [defaultValue=undefined] Default value.
* @param {String} [propertyToListen='value'] Property to listen.
* @returns {Object}
*/
function createObjectPropListener(defaultValue) {
var _holder;
var propertyToListen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'value';
var privateProperty = '_' + propertyToListen;
var holder = (_holder = {
_touched: false
}, _defineProperty(_holder, privateProperty, defaultValue), _defineProperty(_holder, 'isTouched', function isTouched() {
return this._touched;
}), _holder);
Object.defineProperty(holder, propertyToListen, {
get: function get() {
return this[privateProperty];
},
set: function set(value) {
this._touched = true;
this[privateProperty] = value;
},
enumerable: true,
configurable: true
});
return holder;
}
/**
* Check if at specified `key` there is any value for `object`.
*
* @param {Object} object Object to search value at specyfic key.
* @param {String} key String key to check.
*/
function hasOwnProperty(object, key) {
return Object.prototype.hasOwnProperty.call(object, key);
}
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.to2dArray = to2dArray;
exports.extendArray = extendArray;
exports.pivot = pivot;
exports.arrayReduce = arrayReduce;
exports.arrayFilter = arrayFilter;
exports.arrayMap = arrayMap;
exports.arrayEach = arrayEach;
exports.arraySum = arraySum;
exports.arrayMax = arrayMax;
exports.arrayMin = arrayMin;
exports.arrayAvg = arrayAvg;
exports.arrayFlatten = arrayFlatten;
exports.arrayUnique = arrayUnique;
function to2dArray(arr) {
var i = 0,
ilen = arr.length;
while (i < ilen) {
arr[i] = [arr[i]];
i++;
}
}
function extendArray(arr, extension) {
var i = 0,
ilen = extension.length;
while (i < ilen) {
arr.push(extension[i]);
i++;
}
}
function pivot(arr) {
var pivotedArr = [];
if (!arr || arr.length === 0 || !arr[0] || arr[0].length === 0) {
return pivotedArr;
}
var rowCount = arr.length;
var colCount = arr[0].length;
for (var i = 0; i < rowCount; i++) {
for (var j = 0; j < colCount; j++) {
if (!pivotedArr[j]) {
pivotedArr[j] = [];
}
pivotedArr[j][i] = arr[i][j];
}
}
return pivotedArr;
}
/**
* A specialized version of `.reduce` for arrays without support for callback
* shorthands and `this` binding.
*
* {@link https://github.com/lodash/lodash/blob/master/lodash.js}
*
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {Boolean} [initFromArray] Specify using the first element of `array` as the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initFromArray) {
var index = -1,
length = array.length;
if (initFromArray && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
/**
* A specialized version of `.filter` for arrays without support for callback
* shorthands and `this` binding.
*
* {@link https://github.com/lodash/lodash/blob/master/lodash.js}
*
* @param {Array} array The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array.length,
resIndex = -1,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[++resIndex] = value;
}
}
return result;
}
/**
* A specialized version of `.map` for arrays without support for callback
* shorthands and `this` binding.
*
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array.length,
resIndex = -1,
result = [];
while (++index < length) {
var value = array[index];
result[++resIndex] = iteratee(value, index, array);
}
return result;
}
/**
* A specialized version of `.forEach` for arrays without support for callback
* shorthands and `this` binding.
*
* {@link https://github.com/lodash/lodash/blob/master/lodash.js}
*
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
/**
* Calculate sum value for each item of the array.
*
* @param {Array} array The array to process.
* @returns {Number} Returns calculated sum value.
*/
function arraySum(array) {
return arrayReduce(array, function (a, b) {
return a + b;
}, 0);
}
/**
* Returns the highest value from an array. Can be array of numbers or array of strings.
* NOTICE: Mixed values is not supported.
*
* @param {Array} array The array to process.
* @returns {Number} Returns the highest value from an array.
*/
function arrayMax(array) {
return arrayReduce(array, function (a, b) {
return a > b ? a : b;
}, Array.isArray(array) ? array[0] : void 0);
}
/**
* Returns the lowest value from an array. Can be array of numbers or array of strings.
* NOTICE: Mixed values is not supported.
*
* @param {Array} array The array to process.
* @returns {Number} Returns the lowest value from an array.
*/
function arrayMin(array) {
return arrayReduce(array, function (a, b) {
return a < b ? a : b;
}, Array.isArray(array) ? array[0] : void 0);
}
/**
* Calculate average value for each item of the array.
*
* @param {Array} array The array to process.
* @returns {Number} Returns calculated average value.
*/
function arrayAvg(array) {
if (!array.length) {
return 0;
}
return arraySum(array) / array.length;
}
/**
* Flatten multidimensional array.
*
* @param {Array} array Array of Arrays
* @returns {Array}
*/
function arrayFlatten(array) {
return arrayReduce(array, function (initial, value) {
return initial.concat(Array.isArray(value) ? arrayFlatten(value) : value);
}, []);
}
/**
* Unique values in the array.
*
* @param {Array} array The array to process.
* @returns {Array}
*/
function arrayUnique(array) {
var unique = [];
arrayEach(array, function (value) {
if (unique.indexOf(value) === -1) {
unique.push(value);
}
});
return unique;
}
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var core = __webpack_require__(43);
var hide = __webpack_require__(31);
var redefine = __webpack_require__(30);
var ctx = __webpack_require__(32);
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
var key, own, out, exp;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
// export native or passed
out = (own ? target : source)[key];
// bind timers to global for call from export context
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// extend global
if (target) redefine(target, key, out, type & $export.U);
// export
if (exports[key] != out) hide(exports, key, exp);
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
}
};
global.core = core;
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
exports.getListenersCounter = getListenersCounter;
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _feature = __webpack_require__(39);
var _event = __webpack_require__(12);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Counter which tracks unregistered listeners (useful for detecting memory leaks).
*
* @type {Number}
*/
var listenersCounter = 0;
/**
* Event DOM manager for internal use in Handsontable.
*
* @class EventManager
* @util
*/
var EventManager = function () {
/**
* @param {Object} [context=null]
* @private
*/
function EventManager() {
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
_classCallCheck(this, EventManager);
this.context = context || this;
if (!this.context.eventListeners) {
this.context.eventListeners = [];
}
}
/**
* Register specified listener (`eventName`) to the element.
*
* @param {Element} element Target element.
* @param {String} eventName Event name.
* @param {Function} callback Function which will be called after event occur.
* @returns {Function} Returns function which you can easily call to remove that event
*/
_createClass(EventManager, [{
key: 'addEventListener',
value: function addEventListener(element, eventName, callback) {
var _this = this;
var context = this.context;
function callbackProxy(event) {
event = extendEvent(context, event);
callback.call(this, event);
}
this.context.eventListeners.push({
element: element,
event: eventName,
callback: callback,
callbackProxy: callbackProxy
});
if (window.addEventListener) {
element.addEventListener(eventName, callbackProxy, false);
} else {
element.attachEvent('on' + eventName, callbackProxy);
}
listenersCounter++;
return function () {
_this.removeEventListener(element, eventName, callback);
};
}
/**
* Remove the event listener previously registered.
*
* @param {Element} element Target element.
* @param {String} eventName Event name.
* @param {Function} callback Function to remove from the event target. It must be the same as during registration listener.
*/
}, {
key: 'removeEventListener',
value: function removeEventListener(element, eventName, callback) {
var len = this.context.eventListeners.length;
var tmpEvent = void 0;
while (len--) {
tmpEvent = this.context.eventListeners[len];
if (tmpEvent.event == eventName && tmpEvent.element == element) {
if (callback && callback != tmpEvent.callback) {
/* eslint-disable no-continue */
continue;
}
this.context.eventListeners.splice(len, 1);
if (tmpEvent.element.removeEventListener) {
tmpEvent.element.removeEventListener(tmpEvent.event, tmpEvent.callbackProxy, false);
} else {
tmpEvent.element.detachEvent('on' + tmpEvent.event, tmpEvent.callbackProxy);
}
listenersCounter--;
}
}
}
/**
* Clear all previously registered events.
*
* @private
* @since 0.15.0-beta3
*/
}, {
key: 'clearEvents',
value: function clearEvents() {
if (!this.context) {
return;
}
var len = this.context.eventListeners.length;
while (len--) {
var event = this.context.eventListeners[len];
if (event) {
this.removeEventListener(event.element, event.event, event.callback);
}
}
}
/**
* Clear all previously registered events.
*/
}, {
key: 'clear',
value: function clear() {
this.clearEvents();
}
/**
* Destroy instance of EventManager.
*/
}, {
key: 'destroy',
value: function destroy() {
this.clearEvents();
this.context = null;
}
/**
* Trigger event at the specified target element.
*
* @param {Element} element Target element.
* @param {String} eventName Event name.
*/
}, {
key: 'fireEvent',
value: function fireEvent(element, eventName) {
var options = {
bubbles: true,
cancelable: eventName !== 'mousemove',
view: window,
detail: 0,
screenX: 0,
screenY: 0,
clientX: 1,
clientY: 1,
ctrlKey: false,
altKey: false,
shiftKey: false,
metaKey: false,
button: 0,
relatedTarget: undefined
};
var event;
if (document.createEvent) {
event = document.createEvent('MouseEvents');
event.initMouseEvent(eventName, options.bubbles, options.cancelable, options.view, options.detail, options.screenX, options.screenY, options.clientX, options.clientY, options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, options.relatedTarget || document.body.parentNode);
} else {
event = document.createEventObject();
}
if (element.dispatchEvent) {
element.dispatchEvent(event);
} else {
element.fireEvent('on' + eventName, event);
}
}
}]);
return EventManager;
}();
/**
* @param {Object} context
* @param {Event} event
* @private
* @returns {*}
*/
function extendEvent(context, event) {
var componentName = 'HOT-TABLE';
var isHotTableSpotted = void 0;
var fromElement = void 0;
var realTarget = void 0;
var target = void 0;
var len = void 0;
var nativeStopImmediatePropagation = void 0;
event.isTargetWebComponent = false;
event.realTarget = event.target;
nativeStopImmediatePropagation = event.stopImmediatePropagation;
event.stopImmediatePropagation = function () {
nativeStopImmediatePropagation.apply(this);
(0, _event.stopImmediatePropagation)(this);
};
if (!EventManager.isHotTableEnv) {
return event;
}
event = (0, _element.polymerWrap)(event);
len = event.path ? event.path.length : 0;
while (len--) {
if (event.path[len].nodeName === componentName) {
isHotTableSpotted = true;
} else if (isHotTableSpotted && event.path[len].shadowRoot) {
target = event.path[len];
break;
}
if (len === 0 && !target) {
target = event.path[len];
}
}
if (!target) {
target = event.target;
}
event.isTargetWebComponent = true;
if ((0, _feature.isWebComponentSupportedNatively)()) {
event.realTarget = event.srcElement || event.toElement;
} else if ((0, _object.hasOwnProperty)(context, 'hot') || context.isHotTableEnv || context.wtTable) {
// Polymer doesn't support `event.target` property properly we must emulate it ourselves
if ((0, _object.hasOwnProperty)(context, 'hot')) {
// Custom element
fromElement = context.hot ? context.hot.view.wt.wtTable.TABLE : null;
} else if (context.isHotTableEnv) {
// Handsontable.Core
fromElement = context.view.activeWt.wtTable.TABLE.parentNode.parentNode;
} else if (context.wtTable) {
// Walkontable
fromElement = context.wtTable.TABLE.parentNode.parentNode;
}
realTarget = (0, _element.closest)(event.target, [componentName], fromElement);
if (realTarget) {
event.realTarget = fromElement.querySelector(componentName) || event.target;
} else {
event.realTarget = event.target;
}
}
Object.defineProperty(event, 'target', {
get: function get() {
return (0, _element.polymerWrap)(target);
},
enumerable: true,
configurable: true
});
return event;
}
exports.default = EventManager;
function getListenersCounter() {
return listenersCounter;
};
/***/ }),
/* 5 */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.isNumeric = isNumeric;
exports.rangeEach = rangeEach;
exports.rangeEachReverse = rangeEachReverse;
exports.valueAccordingPercent = valueAccordingPercent;
/**
* Checks if value of n is a numeric one
* http://jsperf.com/isnan-vs-isnumeric/4
* @param n
* @returns {boolean}
*/
function isNumeric(n) {
/* eslint-disable */
var t = typeof n === 'undefined' ? 'undefined' : _typeof(n);
return t == 'number' ? !isNaN(n) && isFinite(n) : t == 'string' ? !n.length ? false : n.length == 1 ? /\d/.test(n) : /^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(n) : t == 'object' ? !!n && typeof n.valueOf() == 'number' && !(n instanceof Date) : false;
}
/**
* A specialized version of `.forEach` defined by ranges.
*
* @param {Number} rangeFrom The number from start iterate.
* @param {Number|Function} rangeTo The number where finish iterate or function as a iteratee.
* @param {Function} [iteratee] The function invoked per iteration.
*/
function rangeEach(rangeFrom, rangeTo, iteratee) {
var index = -1;
if (typeof rangeTo === 'function') {
iteratee = rangeTo;
rangeTo = rangeFrom;
} else {
index = rangeFrom - 1;
}
while (++index <= rangeTo) {
if (iteratee(index) === false) {
break;
}
}
}
/**
* A specialized version of `.forEach` defined by ranges iterable in reverse order.
*
* @param {Number} rangeFrom The number from start iterate.
* @param {Number} rangeTo The number where finish iterate.
* @param {Function} iteratee The function invoked per iteration.
*/
function rangeEachReverse(rangeFrom, rangeTo, iteratee) {
var index = rangeFrom + 1;
if (typeof rangeTo === 'function') {
iteratee = rangeTo;
rangeTo = 0;
}
while (--index >= rangeTo) {
if (iteratee(index) === false) {
break;
}
}
}
/**
* Calculate value from percent.
*
* @param {Number} value Base value from percent will be calculated.
* @param {String|Number} percent Can be Number or String (eq. `'33%'`).
* @returns {Number}
*/
function valueAccordingPercent(value, percent) {
percent = parseInt(percent.toString().replace('%', ''), 10);
percent = parseInt(value * percent / 100, 10);
return percent;
}
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getPluginName = exports.getRegistredPluginNames = exports.getPlugin = exports.registerPlugin = undefined;
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _object = __webpack_require__(1);
var _string = __webpack_require__(36);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var registeredPlugins = new WeakMap();
/**
* Registers plugin under given name
*
* @param {String} pluginName
* @param {Function} PluginClass
*/
/**
* Utility to register plugins and common namespace for keeping reference to all plugins classes
*/
function registerPlugin(pluginName, PluginClass) {
pluginName = (0, _string.toUpperCaseFirst)(pluginName);
_pluginHooks2.default.getSingleton().add('construct', function () {
var holder = void 0;
if (!registeredPlugins.has(this)) {
registeredPlugins.set(this, {});
}
holder = registeredPlugins.get(this);
if (!holder[pluginName]) {
holder[pluginName] = new PluginClass(this);
}
});
_pluginHooks2.default.getSingleton().add('afterDestroy', function () {
if (registeredPlugins.has(this)) {
var pluginsHolder = registeredPlugins.get(this);
(0, _object.objectEach)(pluginsHolder, function (plugin) {
return plugin.destroy();
});
registeredPlugins.delete(this);
}
});
}
/**
* @param {Object} instance
* @param {String|Function} pluginName
* @returns {Function} pluginClass Returns plugin instance if exists or `undefined` if not exists.
*/
function getPlugin(instance, pluginName) {
if (typeof pluginName != 'string') {
throw Error('Only strings can be passed as "plugin" parameter');
}
var _pluginName = (0, _string.toUpperCaseFirst)(pluginName);
if (!registeredPlugins.has(instance) || !registeredPlugins.get(instance)[_pluginName]) {
return void 0;
}
return registeredPlugins.get(instance)[_pluginName];
}
/**
* Get all registred plugins names for concrete Handsontable instance.
*
* @param {Object} hotInstance
* @returns {Array}
*/
function getRegistredPluginNames(hotInstance) {
return registeredPlugins.has(hotInstance) ? Object.keys(registeredPlugins.get(hotInstance)) : [];
}
/**
* Get plugin name.
*
* @param {Object} hotInstance
* @param {Object} plugin
* @returns {String|null}
*/
function getPluginName(hotInstance, plugin) {
var pluginName = null;
if (registeredPlugins.has(hotInstance)) {
(0, _object.objectEach)(registeredPlugins.get(hotInstance), function (pluginInstance, name) {
if (pluginInstance === plugin) {
pluginName = name;
}
});
}
return pluginName;
}
exports.registerPlugin = registerPlugin;
exports.getPlugin = getPlugin;
exports.getRegistredPluginNames = getRegistredPluginNames;
exports.getPluginName = getPluginName;
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
/**
* Constants for parts of translation.
*/
var CONTEXT_MENU_ITEMS_NAMESPACE = exports.CONTEXT_MENU_ITEMS_NAMESPACE = 'ContextMenu:items';
var CONTEXTMENU_ITEMS_ROW_ABOVE = exports.CONTEXTMENU_ITEMS_ROW_ABOVE = CONTEXT_MENU_ITEMS_NAMESPACE + '.insertRowAbove';
var CONTEXTMENU_ITEMS_ROW_BELOW = exports.CONTEXTMENU_ITEMS_ROW_BELOW = CONTEXT_MENU_ITEMS_NAMESPACE + '.insertRowBelow';
var CONTEXTMENU_ITEMS_INSERT_LEFT = exports.CONTEXTMENU_ITEMS_INSERT_LEFT = CONTEXT_MENU_ITEMS_NAMESPACE + '.insertColumnOnTheLeft';
var CONTEXTMENU_ITEMS_INSERT_RIGHT = exports.CONTEXTMENU_ITEMS_INSERT_RIGHT = CONTEXT_MENU_ITEMS_NAMESPACE + '.insertColumnOnTheRight';
var CONTEXTMENU_ITEMS_REMOVE_ROW = exports.CONTEXTMENU_ITEMS_REMOVE_ROW = CONTEXT_MENU_ITEMS_NAMESPACE + '.removeRow';
var CONTEXTMENU_ITEMS_REMOVE_COLUMN = exports.CONTEXTMENU_ITEMS_REMOVE_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.removeColumn';
var CONTEXTMENU_ITEMS_UNDO = exports.CONTEXTMENU_ITEMS_UNDO = CONTEXT_MENU_ITEMS_NAMESPACE + '.undo';
var CONTEXTMENU_ITEMS_REDO = exports.CONTEXTMENU_ITEMS_REDO = CONTEXT_MENU_ITEMS_NAMESPACE + '.redo';
var CONTEXTMENU_ITEMS_READ_ONLY = exports.CONTEXTMENU_ITEMS_READ_ONLY = CONTEXT_MENU_ITEMS_NAMESPACE + '.readOnly';
var CONTEXTMENU_ITEMS_CLEAR_COLUMN = exports.CONTEXTMENU_ITEMS_CLEAR_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.clearColumn';
var CONTEXTMENU_ITEMS_COPY = exports.CONTEXTMENU_ITEMS_COPY = CONTEXT_MENU_ITEMS_NAMESPACE + '.copy';
var CONTEXTMENU_ITEMS_CUT = exports.CONTEXTMENU_ITEMS_CUT = CONTEXT_MENU_ITEMS_NAMESPACE + '.cut';
var CONTEXTMENU_ITEMS_FREEZE_COLUMN = exports.CONTEXTMENU_ITEMS_FREEZE_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.freezeColumn';
var CONTEXTMENU_ITEMS_UNFREEZE_COLUMN = exports.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.unfreezeColumn';
var CONTEXTMENU_ITEMS_MERGE_CELLS = exports.CONTEXTMENU_ITEMS_MERGE_CELLS = CONTEXT_MENU_ITEMS_NAMESPACE + '.mergeCells';
var CONTEXTMENU_ITEMS_UNMERGE_CELLS = exports.CONTEXTMENU_ITEMS_UNMERGE_CELLS = CONTEXT_MENU_ITEMS_NAMESPACE + '.unmergeCells';
var CONTEXTMENU_ITEMS_ADD_COMMENT = exports.CONTEXTMENU_ITEMS_ADD_COMMENT = CONTEXT_MENU_ITEMS_NAMESPACE + '.addComment';
var CONTEXTMENU_ITEMS_EDIT_COMMENT = exports.CONTEXTMENU_ITEMS_EDIT_COMMENT = CONTEXT_MENU_ITEMS_NAMESPACE + '.editComment';
var CONTEXTMENU_ITEMS_REMOVE_COMMENT = exports.CONTEXTMENU_ITEMS_REMOVE_COMMENT = CONTEXT_MENU_ITEMS_NAMESPACE + '.removeComment';
var CONTEXTMENU_ITEMS_READ_ONLY_COMMENT = exports.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT = CONTEXT_MENU_ITEMS_NAMESPACE + '.readOnlyComment';
var CONTEXTMENU_ITEMS_ALIGNMENT = exports.CONTEXTMENU_ITEMS_ALIGNMENT = CONTEXT_MENU_ITEMS_NAMESPACE + '.align';
var CONTEXTMENU_ITEMS_ALIGNMENT_LEFT = exports.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.left';
var CONTEXTMENU_ITEMS_ALIGNMENT_CENTER = exports.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.center';
var CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT = exports.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.right';
var CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY = exports.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.justify';
var CONTEXTMENU_ITEMS_ALIGNMENT_TOP = exports.CONTEXTMENU_ITEMS_ALIGNMENT_TOP = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.top';
var CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE = exports.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.middle';
var CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM = exports.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM = CONTEXT_MENU_ITEMS_NAMESPACE + '.align.bottom';
var CONTEXTMENU_ITEMS_BORDERS = exports.CONTEXTMENU_ITEMS_BORDERS = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders';
var CONTEXTMENU_ITEMS_BORDERS_TOP = exports.CONTEXTMENU_ITEMS_BORDERS_TOP = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders.top';
var CONTEXTMENU_ITEMS_BORDERS_RIGHT = exports.CONTEXTMENU_ITEMS_BORDERS_RIGHT = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders.right';
var CONTEXTMENU_ITEMS_BORDERS_BOTTOM = exports.CONTEXTMENU_ITEMS_BORDERS_BOTTOM = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders.bottom';
var CONTEXTMENU_ITEMS_BORDERS_LEFT = exports.CONTEXTMENU_ITEMS_BORDERS_LEFT = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders.left';
var CONTEXTMENU_ITEMS_REMOVE_BORDERS = exports.CONTEXTMENU_ITEMS_REMOVE_BORDERS = CONTEXT_MENU_ITEMS_NAMESPACE + '.borders.remove';
var CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD = exports.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD = CONTEXT_MENU_ITEMS_NAMESPACE + '.nestedHeaders.insertChildRow';
var CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD = exports.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD = CONTEXT_MENU_ITEMS_NAMESPACE + '.nestedHeaders.detachFromParent';
var CONTEXTMENU_ITEMS_HIDE_COLUMN = exports.CONTEXTMENU_ITEMS_HIDE_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.hideColumn';
var CONTEXTMENU_ITEMS_SHOW_COLUMN = exports.CONTEXTMENU_ITEMS_SHOW_COLUMN = CONTEXT_MENU_ITEMS_NAMESPACE + '.showColumn';
var CONTEXTMENU_ITEMS_HIDE_ROW = exports.CONTEXTMENU_ITEMS_HIDE_ROW = CONTEXT_MENU_ITEMS_NAMESPACE + '.hideRow';
var CONTEXTMENU_ITEMS_SHOW_ROW = exports.CONTEXTMENU_ITEMS_SHOW_ROW = CONTEXT_MENU_ITEMS_NAMESPACE + '.showRow';
var FILTERS_NAMESPACE = exports.FILTERS_NAMESPACE = 'Filters:';
var FILTERS_CONDITIONS_NAMESPACE = exports.FILTERS_CONDITIONS_NAMESPACE = FILTERS_NAMESPACE + 'conditions';
var FILTERS_CONDITIONS_NONE = exports.FILTERS_CONDITIONS_NONE = FILTERS_CONDITIONS_NAMESPACE + '.none';
var FILTERS_CONDITIONS_EMPTY = exports.FILTERS_CONDITIONS_EMPTY = FILTERS_CONDITIONS_NAMESPACE + '.isEmpty';
var FILTERS_CONDITIONS_NOT_EMPTY = exports.FILTERS_CONDITIONS_NOT_EMPTY = FILTERS_CONDITIONS_NAMESPACE + '.isNotEmpty';
var FILTERS_CONDITIONS_EQUAL = exports.FILTERS_CONDITIONS_EQUAL = FILTERS_CONDITIONS_NAMESPACE + '.isEqualTo';
var FILTERS_CONDITIONS_NOT_EQUAL = exports.FILTERS_CONDITIONS_NOT_EQUAL = FILTERS_CONDITIONS_NAMESPACE + '.isNotEqualTo';
var FILTERS_CONDITIONS_BEGINS_WITH = exports.FILTERS_CONDITIONS_BEGINS_WITH = FILTERS_CONDITIONS_NAMESPACE + '.beginsWith';
var FILTERS_CONDITIONS_ENDS_WITH = exports.FILTERS_CONDITIONS_ENDS_WITH = FILTERS_CONDITIONS_NAMESPACE + '.endsWith';
var FILTERS_CONDITIONS_CONTAINS = exports.FILTERS_CONDITIONS_CONTAINS = FILTERS_CONDITIONS_NAMESPACE + '.contains';
var FILTERS_CONDITIONS_NOT_CONTAIN = exports.FILTERS_CONDITIONS_NOT_CONTAIN = FILTERS_CONDITIONS_NAMESPACE + '.doesNotContain';
var FILTERS_CONDITIONS_BY_VALUE = exports.FILTERS_CONDITIONS_BY_VALUE = FILTERS_CONDITIONS_NAMESPACE + '.byValue';
var FILTERS_CONDITIONS_GREATER_THAN = exports.FILTERS_CONDITIONS_GREATER_THAN = FILTERS_CONDITIONS_NAMESPACE + '.greaterThan';
var FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL = exports.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL = FILTERS_CONDITIONS_NAMESPACE + '.greaterThanOrEqualTo';
var FILTERS_CONDITIONS_LESS_THAN = exports.FILTERS_CONDITIONS_LESS_THAN = FILTERS_CONDITIONS_NAMESPACE + '.lessThan';
var FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL = exports.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL = FILTERS_CONDITIONS_NAMESPACE + '.lessThanOrEqualTo';
var FILTERS_CONDITIONS_BETWEEN = exports.FILTERS_CONDITIONS_BETWEEN = FILTERS_CONDITIONS_NAMESPACE + '.isBetween';
var FILTERS_CONDITIONS_NOT_BETWEEN = exports.FILTERS_CONDITIONS_NOT_BETWEEN = FILTERS_CONDITIONS_NAMESPACE + '.isNotBetween';
var FILTERS_CONDITIONS_AFTER = exports.FILTERS_CONDITIONS_AFTER = FILTERS_CONDITIONS_NAMESPACE + '.after';
var FILTERS_CONDITIONS_BEFORE = exports.FILTERS_CONDITIONS_BEFORE = FILTERS_CONDITIONS_NAMESPACE + '.before';
var FILTERS_CONDITIONS_TODAY = exports.FILTERS_CONDITIONS_TODAY = FILTERS_CONDITIONS_NAMESPACE + '.today';
var FILTERS_CONDITIONS_TOMORROW = exports.FILTERS_CONDITIONS_TOMORROW = FILTERS_CONDITIONS_NAMESPACE + '.tomorrow';
var FILTERS_CONDITIONS_YESTERDAY = exports.FILTERS_CONDITIONS_YESTERDAY = FILTERS_CONDITIONS_NAMESPACE + '.yesterday';
var FILTERS_DIVS_FILTER_BY_CONDITION = exports.FILTERS_DIVS_FILTER_BY_CONDITION = FILTERS_NAMESPACE + 'labels.filterByCondition';
var FILTERS_DIVS_FILTER_BY_VALUE = exports.FILTERS_DIVS_FILTER_BY_VALUE = FILTERS_NAMESPACE + 'labels.filterByValue';
var FILTERS_LABELS_CONJUNCTION = exports.FILTERS_LABELS_CONJUNCTION = FILTERS_NAMESPACE + 'labels.conjunction';
var FILTERS_LABELS_DISJUNCTION = exports.FILTERS_LABELS_DISJUNCTION = FILTERS_NAMESPACE + 'labels.disjunction';
var FILTERS_VALUES_BLANK_CELLS = exports.FILTERS_VALUES_BLANK_CELLS = FILTERS_NAMESPACE + 'values.blankCells';
var FILTERS_BUTTONS_SELECT_ALL = exports.FILTERS_BUTTONS_SELECT_ALL = FILTERS_NAMESPACE + 'buttons.selectAll';
var FILTERS_BUTTONS_CLEAR = exports.FILTERS_BUTTONS_CLEAR = FILTERS_NAMESPACE + 'buttons.clear';
var FILTERS_BUTTONS_OK = exports.FILTERS_BUTTONS_OK = FILTERS_NAMESPACE + 'buttons.ok';
var FILTERS_BUTTONS_CANCEL = exports.FILTERS_BUTTONS_CANCEL = FILTERS_NAMESPACE + 'buttons.cancel';
var FILTERS_BUTTONS_PLACEHOLDER_SEARCH = exports.FILTERS_BUTTONS_PLACEHOLDER_SEARCH = FILTERS_NAMESPACE + 'buttons.placeholder.search';
var FILTERS_BUTTONS_PLACEHOLDER_VALUE = exports.FILTERS_BUTTONS_PLACEHOLDER_VALUE = FILTERS_NAMESPACE + 'buttons.placeholder.value';
var FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE = exports.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE = FILTERS_NAMESPACE + 'buttons.placeholder.secondValue';
/***/ }),
/* 9 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getRegisteredRenderers = exports.getRegisteredRendererNames = exports.hasRenderer = exports.getRenderer = exports.registerRenderer = undefined;
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _cellDecorator = __webpack_require__(357);
var _cellDecorator2 = _interopRequireDefault(_cellDecorator);
var _autocompleteRenderer = __webpack_require__(358);
var _autocompleteRenderer2 = _interopRequireDefault(_autocompleteRenderer);
var _checkboxRenderer = __webpack_require__(359);
var _checkboxRenderer2 = _interopRequireDefault(_checkboxRenderer);
var _htmlRenderer = __webpack_require__(360);
var _htmlRenderer2 = _interopRequireDefault(_htmlRenderer);
var _numericRenderer = __webpack_require__(361);
var _numericRenderer2 = _interopRequireDefault(_numericRenderer);
var _passwordRenderer = __webpack_require__(363);
var _passwordRenderer2 = _interopRequireDefault(_passwordRenderer);
var _textRenderer = __webpack_require__(364);
var _textRenderer2 = _interopRequireDefault(_textRenderer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _staticRegister = (0, _staticRegister3.default)('renderers'),
register = _staticRegister.register,
getItem = _staticRegister.getItem,
hasItem = _staticRegister.hasItem,
getNames = _staticRegister.getNames,
getValues = _staticRegister.getValues;
register('base', _cellDecorator2.default);
register('autocomplete', _autocompleteRenderer2.default);
register('checkbox', _checkboxRenderer2.default);
register('html', _htmlRenderer2.default);
register('numeric', _numericRenderer2.default);
register('password', _passwordRenderer2.default);
register('text', _textRenderer2.default);
/**
* Retrieve renderer function.
*
* @param {String} name Renderer identification.
* @returns {Function} Returns renderer function.
*/
function _getItem(name) {
if (typeof name === 'function') {
return name;
}
if (!hasItem(name)) {
throw Error('No registered renderer found under "' + name + '" name');
}
return getItem(name);
}
exports.registerRenderer = register;
exports.getRenderer = _getItem;
exports.hasRenderer = hasItem;
exports.getRegisteredRendererNames = getNames;
exports.getRegisteredRenderers = getValues;
/***/ }),
/* 10 */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(73)('wks');
var uid = __webpack_require__(48);
var Symbol = __webpack_require__(13).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/* 11 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @description
* Handsontable events are the common interface that function in 2 ways: as __callbacks__ and as __hooks__.
*
* @example
*
* ```js
* // Using events as callbacks:
* ...
* var hot1 = new Handsontable(document.getElementById('example1'), {
* afterChange: function(changes, source) {
* $.ajax({
* url: "save.php',
* data: change
* });
* }
* });
* ...
* ```
*
* ```js
* // Using events as plugin hooks:
* ...
* var hot1 = new Handsontable(document.getElementById('example1'), {
* myPlugin: true
* });
*
* var hot2 = new Handsontable(document.getElementById('example2'), {
* myPlugin: false
* });
*
* // global hook
* Handsontable.hooks.add('afterChange', function() {
* // Fired twice - for hot1 and hot2
* if (this.getSettings().myPlugin) {
* // function body - will only run for hot1
* }
* });
*
* // local hook (has same effect as a callback)
* hot2.addHook('afterChange', function() {
* // function body - will only run in #example2
* });
* ```
* ...
*/
// @TODO: Move plugin description hooks to plugin?
var REGISTERED_HOOKS = [
/**
* Callback fired after resetting a cell's meta.
*
* @event Hooks#afterCellMetaReset
* @since 0.11
*/
'afterCellMetaReset',
/**
* @description
* Callback fired after one or more cells has been changed. Its main use case is to save the input.
*
* __Note:__ For performance reasons, the `changes` array is null for `"loadData"` source.
*
* @event Hooks#afterChange
* @param {Array} changes 2D array containing information about each of the edited cells `[[row, prop, oldVal, newVal], ...]`.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterChange',
/**
* @description
* Fired after observing changes.
*
* @event Hooks#afterChangesObserved
*/
'afterChangesObserved',
/**
* @description
* Fired after setting up the Context Menu's default options. These options are a collection which user can select by setting
* an array of keys or an array of objects in `contextMenu` option.
*
* @event Hooks#afterContextMenuDefaultOptions
* @param {Array} predefinedItems Array of objects containing information about the pre-defined Context Menu items.
*/
'afterContextMenuDefaultOptions',
/**
* @description
* Fired before setting up the Context Menu's items but after filtering these options by user (`contextMenu` option). This hook
* can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.
*
* @event Hooks#beforeContextMenuSetItems
* @param {Array} menuItems Array of objects containing information about to generated Context Menu items.
*/
'beforeContextMenuSetItems',
/**
* @description
* Fired after setting up the Context Menu's default options. These options are a collection which user can select by setting
* an array of keys or an array of objects in `contextMenu` option.
*
* @pro
* @event Hooks#afterDropdownMenuDefaultOptions
* @param {Array} predefinedItems Array of objects containing information about the pre-defined Context Menu items.
*/
'afterDropdownMenuDefaultOptions',
/**
* @description
* Fired before setting up the Dropdown Menu's items but after filtering these options by user (`dropdownMenu` option). This hook
* can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.
*
* @pro
* @event Hooks#beforeDropdownMenuSetItems
* @param {Array} menuItems Array of objects containing information about to generated Dropdown Menu items.
*/
'beforeDropdownMenuSetItems',
/**
* @description
* Fired after hiding the Context Menu.
*
* @event Hooks#afterContextMenuHide
* @param {Object} context The Context menu instance.
*/
'afterContextMenuHide',
/**
* @description
* Fired after opening the Context Menu.
*
* @event Hooks#afterContextMenuShow
* @param {Object} context The Context Menu instance.
*/
'afterContextMenuShow',
/**
* @description
* Fired after reaching the copy limit while copying data.
*
* @event Hooks#afterCopyLimit
* @param {Number} selectedRows Count of selected copyable rows.
* @param {Number} selectedColumns Count of selected copyable columns.
* @param {Number} copyRowsLimit Current copy rows limit.
* @param {Number} copyColumnsLimit Current copy columns limit.
*/
'afterCopyLimit',
/**
* Callback is fired before a new column was created.
*
* @since 0.28.0
* @event Hooks#beforeCreateCol
* @param {Number} index Represents the visual index of first newly created column in the data source array.
* @param {Number} amount Number of newly created columns in the data source array.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'beforeCreateCol',
/**
* Callback is fired after a new column was created.
*
* @event Hooks#afterCreateCol
* @param {Number} index Represents the visual index of first newly created column in the data source array.
* @param {Number} amount Number of newly created columns in the data source array.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterCreateCol',
/**
* Callback is fired before a new row was created.
*
* @since 0.28.0
* @event Hooks#beforeCreateRow
* @param {Number} index Represents the visual index of first newly created row in the data source array.
* @param {Number} amount Number of newly created rows in the data source array.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'beforeCreateRow',
/**
* Callback is fired after a new row was created.
*
* @event Hooks#afterCreateRow
* @param {Number} index Represents the visual index of first newly created row in the data source array.
* @param {Number} amount Number of newly created rows in the data source array.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterCreateRow',
/**
* Fired after the current cell is deselected.
*
* @event Hooks#afterDeselect
*/
'afterDeselect',
/**
* Fired after destroying the Handsontable instance.
*
* @event Hooks#afterDestroy
*/
'afterDestroy',
/**
* Fired on a `keydown` event on the document body.
*
* @event Hooks#afterDocumentKeyDown
* @param {Event} event A `keydown` event.
*/
'afterDocumentKeyDown',
/**
* Callback fired after getting the cell settings.
*
* @event Hooks#afterGetCellMeta
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Object} cellProperties Object containing the cell properties.
*/
'afterGetCellMeta',
/**
* Callback fired after retrieving information about a column header and appending it to the table header.
*
* @event Hooks#afterGetColHeader
* @param {Number} col Visual column index.
* @param {Element} TH Header's TH element.
*/
'afterGetColHeader',
/**
* Callback fired after retrieving information about a column header and appending it to the table header.
*
* @event Hooks#afterGetRowHeader
* @param {Number} row Visual row index.
* @param {Element} TH Header's TH element.
*/
'afterGetRowHeader',
/**
* Callback fired after Handsontable instance is initiated.
*
* @event Hooks#afterInit
*/
'afterInit',
/**
* Callback fired after new data is loaded (by `loadData` method) into the data source array.
*
* @event Hooks#afterLoadData
* @param {Boolean} firstTime flag that determines whether the data has been loaded during the initialization.
*/
'afterLoadData',
/**
* Fired after a scroll event, which is identified as a momentum scroll (e.g. on an iPad).
*
* @event Hooks#afterMomentumScroll
*/
'afterMomentumScroll',
/**
* Fired after a `mousedown` event is triggered on the cell corner (the drag handle).
*
* @event Hooks#afterOnCellCornerMouseDown
* @since 0.11
* @param {Object} event `mousedown` event object.
*/
'afterOnCellCornerMouseDown',
/**
* Fired after a `dblclick` event is triggered on the cell corner (the drag handle).
*
* @event Hooks#afterOnCellCornerDblClick
* @since 0.30.0
* @param {Object} event `dblclick` event object.
*/
'afterOnCellCornerDblClick',
/**
* Callback fired after clicking on a cell or row/column header.
* In case the row/column header was clicked, the index is negative.
* For example clicking on the row header of cell (0, 0) results with `afterOnCellMouseDown` called
* with coords `{row: 0, col: -1}`.
*
* @event Hooks#afterOnCellMouseDown
* @since 0.11
* @param {Object} event `mousedown` event object.
* @param {Object} coords Coordinates object containing the visual row and visual column indexes of the clicked cell.
* @param {Element} TD Cell's TD (or TH) element.
*/
'afterOnCellMouseDown',
/**
* Callback fired after hovering a cell or row/column header with the mouse cursor.
* In case the row/column header was hovered, the index is negative.
* For example, hovering over the row header of cell (0, 0) results with `afterOnCellMouseOver` called
* with coords `{row: 0, col: -1}`.
*
* @event Hooks#afterOnCellMouseOver
* @since 0.11
* @param {Object} event `mouseover` event object.
* @param {Object} coords Hovered cell's visual coordinate object.
* @param {Element} TD Cell's TD (or TH) element.
*/
'afterOnCellMouseOver',
/**
* Callback fired after leaving a cell or row/column header with the mouse cursor.
*
* @event Hooks#afterOnCellMouseOut
* @since 0.31.1
* @param {Object} event `mouseout` event object.
* @param {Object} coords Leaved cell's visual coordinate object.
* @param {Element} TD Cell's TD (or TH) element.
*/
'afterOnCellMouseOut',
/**
* Callback is fired when one or more columns are removed.
*
* @event Hooks#afterRemoveCol
* @param {Number} index Is an visual index of starter column.
* @param {Number} amount Is an amount of removed columns.
*/
'afterRemoveCol',
/**
* Callback is fired when one or more rows are removed.
*
* @event Hooks#afterRemoveRow
* @param {Number} index Is an visual index of starter row.
* @param {Number} amount Is an amount of removed rows.
*/
'afterRemoveRow',
/**
* Callback fired after the Handsontable table is rendered.
*
* @event Hooks#afterRender
* @param {Boolean} isForced Is `true` if rendering was triggered by a change of settings or data; or `false` if
* rendering was triggered by scrolling or moving selection.
*/
'afterRender',
/**
* Fired before starting rendering the cell.
*
* @event Hooks#beforeRenderer
* @since 0.24.2
* @param {Element} TD Currently rendered cell's TD element.
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String|Number} prop Column property name or a column index, if datasource is an array of arrays.
* @param {String} value Value of the rendered cell.
* @param {Object} cellProperties Object containing the cell's properties.
*/
'beforeRenderer',
/**
* Fired after finishing rendering the cell (after the renderer finishes).
*
* @event Hooks#afterRenderer
* @since 0.11.0
* @param {Element} TD Currently rendered cell's TD element.
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String|Number} prop Column property name or a column index, if datasource is an array of arrays.
* @param {String} value Value of the rendered cell.
* @param {Object} cellProperties Object containing the cell's properties.
*/
'afterRenderer',
/**
* Fired after the horizontal scroll event.
*
* @event Hooks#afterScrollHorizontally
* @since 0.11
*/
'afterScrollHorizontally',
/**
* Fired after the vertical scroll event.
*
* @event Hooks#afterScrollVertically
* @since 0.11
*/
'afterScrollVertically',
/**
* Callback fired after one or more cells are selected (e.g. during mouse move).
*
* @event Hooks#afterSelection
* @param {Number} r Selection start visual row index.
* @param {Number} c Selection start visual column index.
* @param {Number} r2 Selection end visual row index.
* @param {Number} c2 Selection end visual column index.
* @param {Object} preventScrolling Object with `value` property where its value change will be observed.
* * @example
* ```js
* handsontable({
* afterSelection: function (r, c, r2, c2, preventScrolling) {
* // setting if prevent scrolling after selection
*
* preventScrolling.value = true;
* }
* })
* ```
*/
'afterSelection',
/**
* Callback fired after one or more cells are selected. The `p` argument represents the source object property name instead of the column number.
*
* @event Hooks#afterSelectionByProp
* @param {Number} r Selection start visual row index.
* @param {String} p Selection start data source object property name.
* @param {Number} r2 Selection end visual row index.
* @param {String} p2 Selection end data source object property name.
* @param {Object} preventScrolling Object with `value` property where its value change will be observed.
* * @example
* ```js
* handsontable({
* afterSelectionByProp: function (r, c, r2, c2, preventScrolling) {
* // setting if prevent scrolling after selection
*
* preventScrolling.value = true;
* }
* })
* ```
*/
'afterSelectionByProp',
/**
* Callback fired after one or more cells are selected (e.g. on mouse up).
*
* @event Hooks#afterSelectionEnd
* @param {Number} r Selection start visual row index.
* @param {Number} c Selection start visual column index.
* @param {Number} r2 Selection end visual row index.
* @param {Number} c2 Selection end visual column index.
*/
'afterSelectionEnd',
/**
* Callback fired after one or more cells are selected (e.g. on mouse up). The `p` argument represents the data source object
* property name instead of the column number.
*
* @event Hooks#afterSelectionEndByProp
* @param {Number} r Selection start visual row index.
* @param {String} p Selection start data source object property index.
* @param {Number} r2 Selection end visual row index.
* @param {String} p2 Selection end data source object property index.
*/
'afterSelectionEndByProp',
/**
* Called after cell meta is changed.
*
* @event Hooks#afterSetCellMeta
* @since 0.11.0
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} key The updated meta key.
* @param {*} value The updated meta value.
*/
'afterSetCellMeta',
/**
* Called after cell meta is removed.
*
* @event Hooks#afterRemoveCellMeta
* @since 0.33.1
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} key The removed meta key.
* @param {*} value Value which was under removed key of cell meta.
*/
'afterRemoveCellMeta',
/**
* Called after cell data was changed.
*
* @event Hooks#afterSetDataAtCell
* @since 0.28.0
* @param {Array} changes An array of changes in format `[[row, col, oldValue, value], ...]`.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterSetDataAtCell',
/**
* Called after cell data was changed.
*
* @event Hooks#afterSetDataAtRowProp
* @since 0.28.0
* @param {Array} changes An array of changes in format `[[row, prop, oldValue, value], ...]`.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterSetDataAtRowProp',
/**
* Fired after calling the `updateSettings` method.
*
* @event Hooks#afterUpdateSettings
* @param {Object} settings New settings object.
*/
'afterUpdateSettings',
/**
* @description
* A plugin hook executed after validator function, only if validator function is defined.
* Validation result is the first parameter. This can be used to determinate if validation passed successfully or not.
*
* __Returning false from the callback will mark the cell as invalid.__
*
* @event Hooks#afterValidate
* @since 0.9.5
* @param {Boolean} isValid `true` if valid, `false` if not.
* @param {*} value The value in question.
* @param {Number} row Row index.
* @param {String|Number} prop Property name / column index.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'afterValidate',
/**
* Fired before successful change of language (when proper language code was set)
*
* @event Hooks#beforeLanguageChange
* @since 0.35.0
* @param {String} languageCode New language code.
*/
'beforeLanguageChange',
/**
* Fired after successful change of language (when proper language code was set)
*
* @event Hooks#afterLanguageChange
* @since 0.35.0
* @param {String} languageCode New language code.
*/
'afterLanguageChange',
/**
* Fired before populating the data in the autofill feature.
*
* @event Hooks#beforeAutofill
* @param {Object} start Object containing information about first filled cell: `{row: 2, col: 0}`.
* @param {Object} end Object containing information about last filled cell: `{row: 4, col: 1}`.
* @param {Array} data 2D array containing information about fill pattern: `[["1', "Ted"], ["1', "John"]]`.
*/
'beforeAutofill',
/**
* Fired before aligning the cell contents.
*
* @event Hooks#beforeCellAlignment
* @param stateBefore
* @param range
* @param {String} type Type of the alignment - either `horizontal` or `vertical`
* @param {String} alignmentClass String defining the alignment class added to the cell.
* Possible values:
* * `htLeft`,
* * `htCenter`,
* * `htRight`,
* * `htJustify`
* for horizontal alignment,
*
*
* * `htTop`,
* * `htMiddle`,
* * `htBottom`
* for vertical alignment.
*/
'beforeCellAlignment',
/**
* Callback fired before one or more cells is changed. Its main purpose is to alter changes silently before input.
*
* @event Hooks#beforeChange
* @param {Array} changes 2D array containing information about each of the edited cells.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
* @example
* ```js
* // To disregard a single change, set changes[i] to null or remove it from array using changes.splice(i, 1).
* ...
* new Handsontable(document.getElementById('example'), {
* beforeChange: function(changes, source) {
* // [[row, prop, oldVal, newVal], ...]
* changes[0] = null;
* }
* });
* ...
*
* // To alter a single change, overwrite the desired value to changes[i][3].
* ...
* new Handsontable(document.getElementById('example'), {
* beforeChange: function(changes, source) {
* // [[row, prop, oldVal, newVal], ...]
* changes[0][3] = 10;
* }
* });
* ...
*
* // To cancel all edit, return false from the callback or set array length to 0 (changes.length = 0).
* ...
* new Handsontable(document.getElementById('example'), {
* beforeChange: function(changes, source) {
* // [[row, prop, oldVal, newVal], ...]
* return false;
* }
* });
* ...
* ```
*/
'beforeChange',
/**
* Fired right before rendering the changes.
*
* @event Hooks#beforeChangeRender
* @since 0.11
* @param {Array} changes Array in form of [row, prop, oldValue, newValue].
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'beforeChangeRender',
/**
* Fired before drawing the borders.
*
* @event Hooks#beforeDrawBorders
* @param {Array} corners Array specifying the current selection borders.
* @param {String} borderClassName Specifies the border class name.
*/
'beforeDrawBorders',
/**
* Callback fired before getting cell settings.
*
* @event Hooks#beforeGetCellMeta
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Object} cellProperties Object containing the cell's properties.
*/
'beforeGetCellMeta',
/**
* Called before cell meta is removed.
*
* @event Hooks#beforeRemoveCellMeta
* @since 0.33.1
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} key The removed meta key.
* @param {*} value Value which is under removed key of cell meta.
*/
'beforeRemoveCellMeta',
/**
* @description
* Callback fired before Handsontable instance is initiated.
*
* @event Hooks#beforeInit
*/
'beforeInit',
/**
* Callback fired before Walkontable instance is initiated.
*
* @since 0.11
* @event Hooks#beforeInitWalkontable
* @param {Object} walkontableConfig Walkontable configuration object.
*/
'beforeInitWalkontable',
/**
* Callback fired before keydown event is handled. It can be used to overwrite default key bindings.
* Caution - in your `beforeKeyDown` handler you need to call `event.stopImmediatePropagation()` to prevent default key behavior.
*
* @event Hooks#beforeKeyDown
* @since 0.9.0
* @param {Event} event Original DOM event.
*/
'beforeKeyDown',
/**
* Fired after the user clicked a cell, but before all the calculations related with it.
*
* @event Hooks#beforeOnCellMouseDown
* @param {Event} event The `mousedown` event object.
* @param {CellCoords} coords Cell coords object containing the visual coordinates of the clicked cell.
* @param {Element} TD TD element.
*/
'beforeOnCellMouseDown',
/**
* Fired after the user moved cursor over a cell, but before all the calculations related with it.
*
* @event Hooks#beforeOnCellMouseOver
* @param {Event} event The `mouseover` event object.
* @param {CellCoords} coords CellCoords object containing the visual coordinates of the clicked cell.
* @param {Element} TD TD element.
* @param {Object} blockCalculations Contain keys 'row' and 'column' with boolean value.
*/
'beforeOnCellMouseOver',
/**
* Fired after the user moved cursor out from a cell, but before all the calculations related with it.
*
* @event Hooks#beforeOnCellMouseOut
* @since 0.31.1
* @param {Event} event The `mouseout` event object.
* @param {WalkontableCellCoords} coords WalkontableCellCoords object containing the visual coordinates of the leaved cell.
* @param {Element} TD TD element.
*/
'beforeOnCellMouseOut',
/**
* Callback is fired when one or more columns are about to be removed.
*
* @event Hooks#beforeRemoveCol
* @param {Number} index Visual index of starter column.
* @param {Number} amount Amount of columns to be removed.
* @param {Array} [visualCols] Consists of visual indexes of processed columns.
*/
'beforeRemoveCol',
/**
* Callback is fired when one or more rows are about to be removed.
*
* @event Hooks#beforeRemoveRow
* @param {Number} index Visual index of starter column.
* @param {Number} amount Amount of columns to be removed.
* @param {Array} [visualRows] Consists of visual indexes of processed rows.
*/
'beforeRemoveRow',
/**
* Callback fired before Handsontable table is rendered.
*
* @event Hooks#beforeRender
* @param {Boolean} isForced If `true` rendering was triggered by a change of settings or data; or `false` if
* rendering was triggered by scrolling or moving selection.
*/
'beforeRender',
/**
* Callback fired before setting range is started.
*
* @event Hooks#beforeSetRangeStart
* @param {Array} coords CellCoords array.
*/
'beforeSetRangeStart',
/**
* Callback fired before setting range is ended.
*
* @event Hooks#beforeSetRangeEnd
* @param {Array} coords CellCoords array.
*/
'beforeSetRangeEnd',
/**
* Fired before the logic of handling a touch scroll, when user started scrolling on a touch-enabled device.
*
* @event Hooks#beforeTouchScroll
*/
'beforeTouchScroll',
/**
* @description
* A plugin hook executed before validator function, only if validator function is defined.
* This can be used to manipulate the value of changed cell before it is applied to the validator function.
*
* __Notice:__ this will not affect values of changes. This will change value ONLY for validation!
*
* @event Hooks#beforeValidate
* @since 0.9.5
* @param {*} value Value of the cell.
* @param {Number} row Row index.
* @param {String|Number} prop Property name / column index.
* @param {String} [source] String that identifies source of hook call
* ([list of all available sources]{@link http://docs.handsontable.com/tutorial-using-callbacks.html#page-source-definition}).
*/
'beforeValidate',
/**
* Callback fired before cell value is rendered into the DOM (through renderer function).
*
* @event Hooks#beforeValueRender
* @since 0.29.0
* @param {*} value Cell value to render.
*/
'beforeValueRender',
/**
* Callback fired after Handsontable instance is constructed (via `new` operator).
*
* @event Hooks#construct
* @since 0.16.1
*/
'construct',
/**
* Callback fired after Handsontable instance is initiated but before table is rendered.
*
* @event Hooks#init
* @since 0.16.1
*/
'init',
/**
* Fired when a column index is about to be modified by a callback function.
*
* @event Hooks#modifyCol
* @since 0.11
* @param {Number} col Visual column index.
*/
'modifyCol',
/**
* Fired when a column index is about to be de-modified by a callback function.
*
* @event Hooks#unmodifyCol
* @since 0.23.0
* @param {Number} col Physical column index.
*/
'unmodifyCol',
/**
* Fired when a physical row index is about to be de-modified by a callback function.
*
* @event Hooks#unmodifyRow
* @since 0.26.2
* @param {Number} row Physical row index.
*/
'unmodifyRow',
/**
* Fired when a column header index is about to be modified by a callback function.
*
* @event Hooks#modifyColHeader
* @since 0.20.0
* @param {Number} column Visual column header index.
*/
'modifyColHeader',
/**
* Fired when a column width is about to be modified by a callback function.
*
* @event Hooks#modifyColWidth
* @since 0.11
* @param {Number} width Current column width.
* @param {Number} col Column index.
*/
'modifyColWidth',
/**
* Fired when a row index is about to be modified by a callback function.
*
* @event Hooks#modifyRow
* @since 0.11
* @param {Number} row Row index.
*/
'modifyRow',
/**
* Fired when a row header index is about to be modified by a callback function.
*
* @event Hooks#modifyRowHeader
* @since 0.20.0
* @param {Number} row Row header index.
*/
'modifyRowHeader',
/**
* Fired when a row height is about to be modified by a callback function.
*
* @event Hooks#modifyRowHeight
* @since 0.11.0
* @param {Number} height Row height.
* @param {Number} row Row index.
*/
'modifyRowHeight',
/**
* Fired when a data was retrieved or modified.
*
* @event Hooks#modifyData
* @since 0.28.0
* @param {Number} row Row height.
* @param {Number} column Column index.
* @param {Object} valueHolder Object which contains original value which can be modified by overwriting `.value` property.
* @param {String} ioMode String which indicates for what operation hook is fired (`get` or `set`).
*/
'modifyData',
/**
* Fired when a data was retrieved or modified.
*
* @event Hooks#modifyRowData
* @since 0.28.0
* @param {Number} row Physical row index.
*/
'modifyRowData',
/**
* Fired after loading data using the Persistent State plugin.
*
* @event Hooks#persistentStateLoad
* @param {String} key Key string.
* @param {Object} valuePlaceholder Object containing the loaded data.
*/
'persistentStateLoad',
/**
* Fired after resetting data using the Persistent State plugin.
*
* @event Hooks#persistentStateReset
* @param {String} key Key string.
*/
'persistentStateReset',
/**
* Fired after resetting data using the Persistent State plugin.
*
* @event Hooks#persistentStateSave
* @param {String} key Key string.
* @param {Mixed} value Value to save.
*/
'persistentStateSave',
/**
* Fired before sorting the column. If you return `false` value then sorting will be not applied by
* Handsontable (useful for server-side sorting).
*
* @event Hooks#beforeColumnSort
* @param {Number} column Sorted visual column index.
* @param {Boolean} order Soring order where:
* * `true` means ascending order,
* * `false` means descending order,
* * `undefined` means original order.
*/
'beforeColumnSort',
/**
* Fired after sorting the column.
*
* @event Hooks#afterColumnSort
* @param {Number} column Sorted visual column index.
* @param {Boolean} order Soring order where:
* * `true` means ascending order
* * `false` means descending order
* * `undefined` means original order
*/
'afterColumnSort',
/**
* @description
* Fired after setting range of autofill.
* Both arguments are provided in the following format:
* ```js
* [startRow, startColumn, endRow, endColumn]
* ```
*
* @event Hooks#modifyAutofillRange
* @param {Array} startArea Array of visual coordinates of the starting point for the drag-down operation.
* @param {Array} entireArea Array of visual coordinates of the entire area of the drag-down operation.
*/
'modifyAutofillRange',
/**
* Fired to allow modifying the copyable range with a callback function.
*
* @since 0.19.0
* @event Hooks#modifyCopyableRange
* @param {Array} copyableRanges Array of objects defining copyable cells.
*/
'modifyCopyableRange',
/**
* Called before copying the values into clipboard and before clearing values of the selected cells.
*
* @event Hooks#beforeCut
* @since 0.31.1
* @param {Array} data An array of arrays which contains data to cut.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* which will be cut out.
* @returns {*} If returns `false` then operation of the cutting out is cancelled.
*
* @example
* ```js
* // To disregard a single row, remove it from array using data.splice(i, 1).
* ...
* new Handsontable(document.getElementById('example'), {
* beforeCut: function(data, coords) {
* // data -> [[1, 2, 3], [4, 5, 6]]
* data.splice(0, 1);
* // data -> [[4, 5, 6]]
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
* }
* });
* ...
*
* // To cancel cutting out, return false from the callback.
* ...
* new Handsontable(document.getElementById('example'), {
* beforeCut: function(data, coords) {
* return false;
* }
* });
* ...
* ```
*/
'beforeCut',
/**
* Fired after data are cutted out from the table.
*
* @event Hooks#afterCut
* @since 0.31.1
* @param {Array} data An array of arrays which contains the cutted out data.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* which was cut out.
*/
'afterCut',
/**
* Fired before values are copied into clipboard.
*
* @event Hooks#beforeCopy
* @since 0.31.1
* @param {Array} data An array of arrays which contains data to copied.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* which will copied.
* @returns {*} If returns `false` then copying is cancelled.
*
* @example
* ```js
* // To disregard a single row, remove it from array using data.splice(i, 1).
* ...
* new Handsontable(document.getElementById('example'), {
* beforeCopy: function(data, coords) {
* // data -> [[1, 2, 3], [4, 5, 6]]
* data.splice(0, 1);
* // data -> [[4, 5, 6]]
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
* }
* });
* ...
*
* // To cancel copying, return false from the callback.
* ...
* new Handsontable(document.getElementById('example'), {
* beforeCopy: function(data, coords) {
* return false;
* }
* });
* ...
* ```
*/
'beforeCopy',
/**
* Fired after data are pasted into table.
*
* @event Hooks#afterCopy
* @since 0.31.1
* @param {Array} data An array of arrays which contains the copied data.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* which was copied.
*/
'afterCopy',
/**
* Fired before values are pasted into table.
*
* @event Hooks#beforePaste
* @since 0.31.1
* @param {Array} data An array of arrays which contains data to paste.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* that correspond to the previously selected area.
* @returns {*} If returns `false` then pasting is cancelled.
*
* @example
* ```js
* // To disregard a single row, remove it from array using data.splice(i, 1).
* ...
* new Handsontable(document.getElementById('example'), {
* beforePaste: function(data, coords) {
* // data -> [[1, 2, 3], [4, 5, 6]]
* data.splice(0, 1);
* // data -> [[4, 5, 6]]
* // coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
* }
* });
* ...
*
* // To cancel pasting, return false from the callback.
* ...
* new Handsontable(document.getElementById('example'), {
* beforePaste: function(data, coords) {
* return false;
* }
* });
* ...
* ```
*/
'beforePaste',
/**
* Fired after values are pasted into table.
*
* @event Hooks#afterPaste
* @since 0.31.1
* @param {Array} data An array of arrays which contains the pasted data.
* @param {Array} coords An array of objects with ranges of the visual indexes (`startRow`, `startCol`, `endRow`, `endCol`)
* that correspond to the previously selected area.
*/
'afterPaste',
/**
* Fired before change order of the visual indexes.
*
* @event Hooks#beforeColumnMove
* @param {Array} columns Array of visual column indexes to be moved.
* @param {Number} target Visual column index being a target for moved columns.
*/
'beforeColumnMove',
/**
* Fired after change order of the visual indexes.
*
* @event Hooks#afterColumnMove
* @param {Array} columns Array of visual column indexes that were moved.
* @param {Number} target Visual column index being a target for moved columns.
*/
'afterColumnMove',
/**
* Fired before change order of the visual indexes.
*
* @event Hooks#beforeRowMove
* @param {Array} rows Array of visual row indexes to be moved.
* @param {Number} target Visual row index being a target for moved rows.
*/
'beforeRowMove',
/**
* Fired after change order of the visual indexes.
*
* @event Hooks#afterRowMove
* @param {Array} rows Array of visual row indexes that were moved.
* @param {Number} target Visual row index being a target for moved rows.
*/
'afterRowMove',
/**
* Fired before rendering the table with modified column sizes.
*
* @event Hooks#beforeColumnResize
* @param {Number} currentColumn Visual index of the resized column.
* @param {Number} newSize Calculated new column width.
* @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.
* @returns {Number} Returns a new column size or `undefined`, if column size should be calculated automatically.
*/
'beforeColumnResize',
/**
* Fired after rendering the table with modified column sizes.
*
* @event Hooks#afterColumnResize
* @param {Number} currentColumn Visual index of the resized column.
* @param {Number} newSize Calculated new column width.
* @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.
*/
'afterColumnResize',
/**
* Fired before rendering the table with modified row sizes.
*
* @event Hooks#beforeRowResize
* @param {Number} currentRow Visual index of the resized row.
* @param {Number} newSize Calculated new row height.
* @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.
* @returns {Number} Returns the new row size or `undefined` if row size should be calculated automatically.
*/
'beforeRowResize',
/**
* Fired after rendering the table with modified row sizes.
*
* @event Hooks#afterRowResize
* @param {Number} currentRow Visual index of the resized row.
* @param {Number} newSize Calculated new row height.
* @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.
*/
'afterRowResize',
/**
* Fired after getting the column header renderers.
*
* @event Hooks#afterGetColumnHeaderRenderers
* @param {Array} array Array of the column header renderers.
*/
'afterGetColumnHeaderRenderers',
/**
* Fired after getting the row header renderers.
*
* @event Hooks#afterGetRowHeaderRenderers
* @param {Array} array Array of the row header renderers.
*/
'afterGetRowHeaderRenderers',
/**
* Fired before applying stretched column width to column.
*
* @event Hooks#beforeStretchingColumnWidth
* @param {Number} stretchedWidth Calculated width.
* @param {Number} column Visual column index.
* @returns {Number} Returns new width which will be applied to the column element.
*/
'beforeStretchingColumnWidth',
/**
* Fired before applying [filtering]{@link http://docs.handsontable.com/pro/demo-filtering.html}.
*
* @pro
* @event Hooks#beforeFilter
* @param {Array} conditionsStack An array of objects with added formulas.
* @returns {Boolean} If hook returns `false` value then filtering won't be applied on the UI side (server-side filtering).
*/
'beforeFilter',
/**
* Fired after applying [filtering]{@link http://docs.handsontable.com/pro/demo-filtering.html}.
*
* @pro
* @event Hooks#afterFilter
* @param {Array} conditionsStack An array of objects with added formulas.
*/
'afterFilter',
/**
* Used to modify the column header height.
*
* @event Hooks#modifyColumnHeaderHeight
* @since 0.25.0
* @param {Number} col Visual column index.
*/
'modifyColumnHeaderHeight',
/**
* Fired before the undo action. Contains information about the action that is being undone.
*
* @event Hooks#beforeUndo
* @since 0.26.2
* @param {Object} action The action object. Contains information about the action being undone. The `actionType`
* property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).
*/
'beforeUndo',
/**
* Fired after the undo action. Contains information about the action that is being undone.
*
* @event Hooks#afterUndo
* @since 0.26.2
* @param {Object} action The action object. Contains information about the action being undone. The `actionType`
* property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).
*/
'afterUndo',
/**
* Fired before the redo action. Contains information about the action that is being redone.
*
* @event Hooks#beforeRedo
* @since 0.26.2
* @param {Object} action The action object. Contains information about the action being redone. The `actionType`
* property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).
*/
'beforeRedo',
/**
* Fired after the redo action. Contains information about the action that is being redone.
*
* @event Hooks#afterRedo
* @since 0.26.2
* @param {Object} action The action object. Contains information about the action being redone. The `actionType`
* property of the object specifies the type of the action in a String format. (e.g. `'remove_row'`).
*/
'afterRedo',
/**
* Used to modify the row header width.
*
* @event Hooks#modifyRowHeaderWidth
* @param {Number} rowHeaderWidth Row header width.
*/
'modifyRowHeaderWidth',
/**
* Fired from the `populateFromArray` method during the `autofill` process. Fired for each "autofilled" cell individually.
*
* @event Hooks#beforeAutofillInsidePopulate
* @param {Object} index Object containing `row` and `col` properties, defining the number of rows/columns from the initial cell of the autofill.
* @param {String} direction Declares the direction of the autofill. Possible values: `up`, `down`, `left`, `right`.
* @param {Array} input Array of arrays. Contains an array of rows with data being used in the autofill.
* @param {Array} deltas The deltas array passed to the `populateFromArray` method.
*/
'beforeAutofillInsidePopulate',
/**
* Fired when the start of the selection is being modified. (e.g. moving the selection with the arrow keys).
*
* @event Hooks#modifyTransformStart
* @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
*/
'modifyTransformStart',
/**
* Fired when the end of the selection is being modified. (e.g. moving the selection with the arrow keys).
*
* @event Hooks#modifyTransformEnd
* @param {CellCoords} delta Cell coords object declaring the delta of the new selection relative to the previous one.
*/
'modifyTransformEnd',
/**
* Fired after the start of the selection is being modified. (e.g. moving the selection with the arrow keys).
*
* @event Hooks#afterModifyTransformStart
* @param {CellCoords} coords Coords of the freshly selected cell.
* @param {Number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.
* @param {Number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.
*/
'afterModifyTransformStart',
/**
* Fired after the end of the selection is being modified. (e.g. moving the selection with the arrow keys).
*
* @event Hooks#afterModifyTransformEnd
* @param {CellCoords} coords Visual coords of the freshly selected cell.
* @param {Number} rowTransformDir `-1` if trying to select a cell with a negative row index. `0` otherwise.
* @param {Number} colTransformDir `-1` if trying to select a cell with a negative column index. `0` otherwise.
*/
'afterModifyTransformEnd',
/**
* Fired inside the `viewportRowCalculatorOverride` method. Allows modifying the row calculator parameters.
*
* @event Hooks#afterViewportRowCalculatorOverride
* @param {Object} calc The row calculator.
*/
'afterViewportRowCalculatorOverride',
/**
* Fired inside the `viewportColumnCalculatorOverride` method. Allows modifying the row calculator parameters.
*
* @event Hooks#afterViewportColumnCalculatorOverride
* @param {Object} calc The row calculator.
*/
'afterViewportColumnCalculatorOverride',
/**
* Fired after initializing all the plugins.
*
* @event Hooks#afterPluginsInitialized
*/
'afterPluginsInitialized',
/**
* Used when saving/loading the manual row heights state.
*
* @event Hooks#manualRowHeights
* @param {Array} state The current manual row heights state.
*/
'manualRowHeights',
/**
* Used to skip the length cache calculation for a defined period of time.
*
* @event Hooks#skipLengthCache
* @param {Number} delay The delay in milliseconds.
*/
'skipLengthCache',
/**
* Fired after trimming rows in the TrimRows plugin.
*
* @pro
* @event Hooks#afterTrimRow
* @param {Array} rows Physical indexes of trimmed rows.
*/
'afterTrimRow',
/**
* Fired after untrimming rows in the TrimRows plugin.
*
* @pro
* @event Hooks#afterUntrimRow
* @param {Array} rows Physical indexes of untrimmed rows.
*/
'afterUntrimRow',
/**
* Fired after opening the dropdown menu.
*
* @pro
* @event Hooks#afterDropdownMenuShow
* @param {DropdownMenu} instance The DropdownMenu instance.
*/
'afterDropdownMenuShow',
/**
* Fired after hiding the dropdown menu.
*
* @pro
* @event Hooks#afterDropdownMenuHide
* @param {DropdownMenu} instance The DropdownMenu instance.
*/
'afterDropdownMenuHide',
/**
* Used to check whether the provided row index is hidden.
*
* @pro
* @event Hooks#hiddenRow
* @param {Number} row The visual row index in question.
*/
'hiddenRow',
/**
* Used to check whether the provided column index is hidden.
*
* @pro
* @event Hooks#hiddenColumn
* @param {Number} column The visual column index in question.
*/
'hiddenColumn',
/**
* Fired before adding a children to the NestedRows structure.
*
* @pro
* @event Hooks#beforeAddChild
* @param {Object} parent The parent object.
* @param {Object|undefined} element The element added as a child. If `undefined`, a blank child was added.
* @param {Number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.
*/
'beforeAddChild',
/**
* Fired after adding a children to the NestedRows structure.
*
* @pro
* @event Hooks#afterAddChild
* @param {Object} parent The parent object.
* @param {Object|undefined} element The element added as a child. If `undefined`, a blank child was added.
* @param {Number|undefined} index The index within the parent where the new child was added. If `undefined`, the element was added as the last child.
*/
'afterAddChild',
/**
* Fired before detaching a child from its parent in the NestedRows plugin.
*
* @pro
* @event Hooks#beforeDetachChild
* @param {Object} parent An object representing the parent from which the element is to be detached.
* @param {Object} element The detached element.
*/
'beforeDetachChild',
/**
* Fired after detaching a child from its parent in the NestedRows plugin.
*
* @pro
* @event Hooks#afterDetachChild
* @param {Object} parent An object representing the parent from which the element was detached.
* @param {Object} element The detached element.
*/
'afterDetachChild',
/**
* Fired after the editor is opened and rendered.
*
* @event Hooks#afterBeginEditing
* @param {Number} row Row index of the edited cell.
* @param {Number} column Column index of the edited cell.
*/
'afterBeginEditing',
/**
* Fired after the listening is turned on.
*
* @event Hooks#afterListen
* @since 0.34.5
*/
'afterListen',
/**
* Fired after the listening is turned off.
*
* @event Hooks#afterUnlisten
* @since 0.34.5
*/
'afterUnlisten'];
var Hooks = function () {
_createClass(Hooks, null, [{
key: 'getSingleton',
value: function getSingleton() {
return globalSingleton;
}
/**
*
*/
}]);
function Hooks() {
_classCallCheck(this, Hooks);
this.globalBucket = this.createEmptyBucket();
}
/**
* Returns a new object with empty handlers related to every registered hook name.
*
* @returns {Object} The empty bucket object.
*
* @example
* ```js
* Handsontable.hooks.createEmptyBucket();
* // Results:
* {
* ...
* afterCreateCol: [],
* afterCreateRow: [],
* beforeInit: [],
* ...
* }
* ```
*/
_createClass(Hooks, [{
key: 'createEmptyBucket',
value: function createEmptyBucket() {
var bucket = Object.create(null);
// eslint-disable-next-line no-return-assign
(0, _array.arrayEach)(REGISTERED_HOOKS, function (hook) {
return bucket[hook] = [];
});
return bucket;
}
/**
* Get hook bucket based on the context of the object or if argument is `undefined`, get the global hook bucket.
*
* @param {Object} [context=null] A Handsontable instance.
* @returns {Object} Returns a global or Handsontable instance bucket.
*/
}, {
key: 'getBucket',
value: function getBucket() {
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
if (context) {
if (!context.pluginHookBucket) {
context.pluginHookBucket = this.createEmptyBucket();
}
return context.pluginHookBucket;
}
return this.globalBucket;
}
/**
* Adds a listener (globally or locally) to a specified hook name.
* If the `context` parameter is provided, the hook will be added only to the instance it references.
* Otherwise, the callback will be used everytime the hook fires on any Handsontable instance.
* You can provide an array of callback functions as the `callback` argument, this way they will all be fired
* once the hook is triggered.
*
* @see Core#addHook
* @param {String} key Hook name.
* @param {Function|Array} callback Callback function or an array of functions.
* @param {Object} [context=null] The context for the hook callback to be added - a Handsontable instance or leave empty.
* @returns {Hooks} Instance of Hooks.
*
* @example
* ```js
* // single callback, added locally
* Handsontable.hooks.add('beforeInit', myCallback, hotInstance);
*
* // single callback, added globally
* Handsontable.hooks.add('beforeInit', myCallback);
*
* // multiple callbacks, added locally
* Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback], hotInstance);
*
* // multiple callbacks, added globally
* Handsontable.hooks.add('beforeInit', [myCallback, anotherCallback]);
* ```
*/
}, {
key: 'add',
value: function add(key, callback) {
var _this = this;
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (Array.isArray(callback)) {
(0, _array.arrayEach)(callback, function (c) {
return _this.add(key, c, context);
});
} else {
var bucket = this.getBucket(context);
if (typeof bucket[key] === 'undefined') {
this.register(key);
bucket[key] = [];
}
callback.skip = false;
if (bucket[key].indexOf(callback) === -1) {
// only add a hook if it has not already been added (adding the same hook twice is now silently ignored)
var foundInitialHook = false;
if (callback.initialHook) {
(0, _array.arrayEach)(bucket[key], function (cb, i) {
if (cb.initialHook) {
bucket[key][i] = callback;
foundInitialHook = true;
return false;
}
});
}
if (!foundInitialHook) {
bucket[key].push(callback);
}
}
}
return this;
}
/**
* Adds a listener to a specified hook. After the hook runs this listener will be automatically removed from the bucket.
*
* @see Core#addHookOnce
* @param {String} key Hook/Event name.
* @param {Function|Array} callback Callback function.
* @param {Object} [context=null] A Handsontable instance.
*
* @example
* ```js
* Handsontable.hooks.once('beforeInit', myCallback, hotInstance);
* ```
*/
}, {
key: 'once',
value: function once(key, callback) {
var _this2 = this;
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (Array.isArray(callback)) {
(0, _array.arrayEach)(callback, function (c) {
return _this2.once(key, c, context);
});
} else {
callback.runOnce = true;
this.add(key, callback, context);
}
}
/**
* Removes a listener from a hook with a given name. If the `context` argument is provided, it removes a listener from a local hook assigned to the given Handsontable instance.
*
* @see Core#removeHook
* @param {String} key Hook/Event name.
* @param {Function} callback Callback function (needs the be the function that was previously added to the hook).
* @param {Object} [context=null] Handsontable instance.
* @return {Boolean} Returns `true` if hook was removed, `false` otherwise.
*
* @example
* ```js
* Handsontable.hooks.remove('beforeInit', myCallback);
* ```
*/
}, {
key: 'remove',
value: function remove(key, callback) {
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var bucket = this.getBucket(context);
if (typeof bucket[key] !== 'undefined') {
if (bucket[key].indexOf(callback) >= 0) {
callback.skip = true;
return true;
}
}
return false;
}
/**
* Checks whether there are any registered listeners for the provided hook name.
* If the `context` parameter is provided, it only checks for listeners assigned to the given Handsontable instance.
*
* @param {String} key Hook name.
* @param {Object} [context=null] A Handsontable instance.
* @returns {Boolean} `true` for success, `false` otherwise.
*/
}, {
key: 'has',
value: function has(key) {
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var bucket = this.getBucket(context);
return !!(bucket[key] !== void 0 && bucket[key].length);
}
/**
* Runs all local and global callbacks assigned to the hook identified by the `key` parameter.
* It returns either a return value from the last called callback or the first parameter (`p1`) passed to the `run` function.
*
* @see Core#runHooks
* @param {Object} context Handsontable instance.
* @param {String} key Hook/Event name.
* @param {*} [p1] Parameter to be passed as an argument to the callback function.
* @param {*} [p2] Parameter to be passed as an argument to the callback function.
* @param {*} [p3] Parameter to be passed as an argument to the callback function.
* @param {*} [p4] Parameter to be passed as an argument to the callback function.
* @param {*} [p5] Parameter to be passed as an argument to the callback function.
* @param {*} [p6] Parameter to be passed as an argument to the callback function.
* @returns {*} Either a return value from the last called callback or `p1`.
*
* @example
* ```js
* Handsontable.hooks.run(hot, 'beforeInit');
* ```
*/
}, {
key: 'run',
value: function run(context, key, p1, p2, p3, p4, p5, p6) {
{
var globalHandlers = this.globalBucket[key];
var index = -1;
var length = globalHandlers ? globalHandlers.length : 0;
if (length) {
// Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.
while (++index < length) {
if (!globalHandlers[index] || globalHandlers[index].skip) {
/* eslint-disable no-continue */
continue;
}
// performance considerations - http://jsperf.com/call-vs-apply-for-a-plugin-architecture
var res = globalHandlers[index].call(context, p1, p2, p3, p4, p5, p6);
if (res !== void 0) {
p1 = res;
}
if (globalHandlers[index] && globalHandlers[index].runOnce) {
this.remove(key, globalHandlers[index]);
}
}
}
}
{
var localHandlers = this.getBucket(context)[key];
var _index = -1;
var _length = localHandlers ? localHandlers.length : 0;
if (_length) {
// Do not optimise this loop with arrayEach or arrow function! If you do You'll decrease perf because of GC.
while (++_index < _length) {
if (!localHandlers[_index] || localHandlers[_index].skip) {
/* eslint-disable no-continue */
continue;
}
// performance considerations - http://jsperf.com/call-vs-apply-for-a-plugin-architecture
var _res = localHandlers[_index].call(context, p1, p2, p3, p4, p5, p6);
if (_res !== void 0) {
p1 = _res;
}
if (localHandlers[_index] && localHandlers[_index].runOnce) {
this.remove(key, localHandlers[_index], context);
}
}
}
}
return p1;
}
/**
* Destroy all listeners connected to the context. If no context is provided, the global listeners will be destroyed.
*
* @param {Object} [context=null] A Handsontable instance.
* @example
* ```js
* // destroy the global listeners
* Handsontable.hooks.destroy();
*
* // destroy the local listeners
* Handsontable.hooks.destroy(hotInstance);
* ```
*/
}, {
key: 'destroy',
value: function destroy() {
var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
// eslint-disable-next-line no-return-assign
(0, _object.objectEach)(this.getBucket(context), function (value, key, bucket) {
return bucket[key].length = 0;
});
}
/**
* Registers a hook name (adds it to the list of the known hook names). Used by plugins.
* It is not necessary to call register, but if you use it, your plugin hook will be used returned by
* the `getRegistered` method. (which itself is used in the demo http://docs.handsontable.com/tutorial-callbacks.html).
*
* @param key {String} The hook name.
*
* @example
* ```js
* Handsontable.hooks.register('myHook');
* ```
*/
}, {
key: 'register',
value: function register(key) {
if (!this.isRegistered(key)) {
REGISTERED_HOOKS.push(key);
}
}
/**
* Deregisters a hook name (removes it from the list of known hook names).
*
* @param key {String} Hook name.
*
* @example
* ```js
* Handsontable.hooks.deregister('myHook');
* ```
*/
}, {
key: 'deregister',
value: function deregister(key) {
if (this.isRegistered(key)) {
REGISTERED_HOOKS.splice(REGISTERED_HOOKS.indexOf(key), 1);
}
}
/**
* Returns a boolean depending on if a hook by such name has been registered.
*
* @param key {String} Hook name.
* @returns {Boolean} `true` for success, `false` otherwise.
*
* @example
* ```js
* Handsontable.hooks.isRegistered('beforeInit');
*
* // Results:
* true
* ```
*/
}, {
key: 'isRegistered',
value: function isRegistered(key) {
return REGISTERED_HOOKS.indexOf(key) >= 0;
}
/**
* Returns an array of registered hooks.
*
* @returns {Array} An array of registered hooks.
*
* @example
* ```js
* Handsontable.hooks.getRegistered();
*
* // Results:
* [
* ...
* 'beforeInit',
* 'beforeRender',
* 'beforeSetRangeEnd',
* 'beforeDrawBorders',
* 'beforeChange',
* ...
* ]
* ```
*/
}, {
key: 'getRegistered',
value: function getRegistered() {
return REGISTERED_HOOKS;
}
}]);
return Hooks;
}();
var globalSingleton = new Hooks();
exports.default = Hooks;
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.stopImmediatePropagation = stopImmediatePropagation;
exports.isImmediatePropagationStopped = isImmediatePropagationStopped;
exports.stopPropagation = stopPropagation;
exports.pageX = pageX;
exports.pageY = pageY;
exports.isRightClick = isRightClick;
exports.isLeftClick = isLeftClick;
var _element = __webpack_require__(0);
/**
* Prevent other listeners of the same event from being called.
*
* @param {Event} event
*/
function stopImmediatePropagation(event) {
event.isImmediatePropagationEnabled = false;
event.cancelBubble = true;
}
/**
* Check if event was stopped by `stopImmediatePropagation`.
*
* @param event {Event}
* @returns {Boolean}
*/
function isImmediatePropagationStopped(event) {
return event.isImmediatePropagationEnabled === false;
}
/**
* Prevent further propagation of the current event (prevent bubbling).
*
* @param event {Event}
*/
function stopPropagation(event) {
// ie8
// http://msdn.microsoft.com/en-us/library/ie/ff975462(v=vs.85).aspx
if (typeof event.stopPropagation === 'function') {
event.stopPropagation();
} else {
event.cancelBubble = true;
}
}
/**
* Get horizontal coordinate of the event object relative to the whole document.
*
* @param {Event} event
* @returns {Number}
*/
function pageX(event) {
if (event.pageX) {
return event.pageX;
}
return event.clientX + (0, _element.getWindowScrollLeft)();
}
/**
* Get vertical coordinate of the event object relative to the whole document.
*
* @param {Event} event
* @returns {Number}
*/
function pageY(event) {
if (event.pageY) {
return event.pageY;
}
return event.clientY + (0, _element.getWindowScrollTop)();
}
/**
* Check if provided event was triggered by clicking the right mouse button.
*
* @param {Event} event DOM Event.
* @returns {Boolean}
*/
function isRightClick(event) {
return event.button === 2;
}
/**
* Check if provided event was triggered by clicking the left mouse button.
*
* @param {Event} event DOM Event.
* @returns {Boolean}
*/
function isLeftClick(event) {
return event.button === 0;
}
/***/ }),
/* 13 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math
? window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func
: Function('return this')();
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _recordTranslator = __webpack_require__(308);
var _plugins = __webpack_require__(7);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var privatePool = new WeakMap();
var initializedPlugins = null;
/**
* @private
*/
var BasePlugin = function () {
/**
* @param {Object} hotInstance Handsontable instance.
*/
function BasePlugin(hotInstance) {
var _this = this;
_classCallCheck(this, BasePlugin);
/**
* Handsontable instance.
*
* @type {Core}
*/
(0, _object.defineGetter)(this, 'hot', hotInstance, {
writable: false
});
(0, _object.defineGetter)(this, 't', (0, _recordTranslator.getTranslator)(hotInstance), {
writable: false
});
privatePool.set(this, { hooks: {} });
initializedPlugins = null;
this.pluginName = null;
this.pluginsInitializedCallbacks = [];
this.isPluginsReady = false;
this.enabled = false;
this.initialized = false;
this.hot.addHook('afterPluginsInitialized', function () {
return _this.onAfterPluginsInitialized();
});
this.hot.addHook('afterUpdateSettings', function () {
return _this.onUpdateSettings();
});
this.hot.addHook('beforeInit', function () {
return _this.init();
});
}
_createClass(BasePlugin, [{
key: 'init',
value: function init() {
this.pluginName = (0, _plugins.getPluginName)(this.hot, this);
if (this.isEnabled && this.isEnabled()) {
this.enablePlugin();
}
if (!initializedPlugins) {
initializedPlugins = (0, _plugins.getRegistredPluginNames)(this.hot);
}
if (initializedPlugins.indexOf(this.pluginName) >= 0) {
initializedPlugins.splice(initializedPlugins.indexOf(this.pluginName), 1);
}
if (!initializedPlugins.length) {
this.hot.runHooks('afterPluginsInitialized');
}
this.initialized = true;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
this.enabled = true;
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
if (this.eventManager) {
this.eventManager.clear();
}
this.clearHooks();
this.enabled = false;
}
/**
* Add listener to plugin hooks system.
*
* @param {String} name
* @param {Function} callback
*/
}, {
key: 'addHook',
value: function addHook(name, callback) {
privatePool.get(this).hooks[name] = privatePool.get(this).hooks[name] || [];
var hooks = privatePool.get(this).hooks[name];
this.hot.addHook(name, callback);
hooks.push(callback);
privatePool.get(this).hooks[name] = hooks;
}
/**
* Remove all hooks listeners by hook name.
*
* @param {String} name
*/
}, {
key: 'removeHooks',
value: function removeHooks(name) {
var _this2 = this;
(0, _array.arrayEach)(privatePool.get(this).hooks[name] || [], function (callback) {
_this2.hot.removeHook(name, callback);
});
}
/**
* Clear all hooks.
*/
}, {
key: 'clearHooks',
value: function clearHooks() {
var _this3 = this;
var hooks = privatePool.get(this).hooks;
(0, _object.objectEach)(hooks, function (callbacks, name) {
return _this3.removeHooks(name);
});
hooks.length = 0;
}
/**
* Register function which will be immediately called after all plugins initialized.
*
* @param {Function} callback
*/
}, {
key: 'callOnPluginsReady',
value: function callOnPluginsReady(callback) {
if (this.isPluginsReady) {
callback();
} else {
this.pluginsInitializedCallbacks.push(callback);
}
}
/**
* On after plugins initialized listener.
*
* @private
*/
}, {
key: 'onAfterPluginsInitialized',
value: function onAfterPluginsInitialized() {
(0, _array.arrayEach)(this.pluginsInitializedCallbacks, function (callback) {
return callback();
});
this.pluginsInitializedCallbacks.length = 0;
this.isPluginsReady = true;
}
/**
* On update settings listener.
*
* @private
*/
}, {
key: 'onUpdateSettings',
value: function onUpdateSettings() {
if (this.isEnabled) {
if (this.enabled && !this.isEnabled()) {
this.disablePlugin();
}
if (!this.enabled && this.isEnabled()) {
this.enablePlugin();
}
if (this.enabled && this.isEnabled()) {
this.updatePlugin();
}
}
}
/**
* Updates the plugin to use the latest options you have specified.
*
* @private
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {}
/**
* Destroy plugin.
*/
}, {
key: 'destroy',
value: function destroy() {
var _this4 = this;
if (this.eventManager) {
this.eventManager.destroy();
}
this.clearHooks();
(0, _object.objectEach)(this, function (value, property) {
if (property !== 'hot' && property !== 't') {
_this4[property] = null;
}
});
delete this.t;
delete this.hot;
}
}]);
return BasePlugin;
}();
exports.default = BasePlugin;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.Viewport = exports.TableRenderer = exports.Table = exports.Settings = exports.Selection = exports.Scroll = exports.Overlays = exports.Event = exports.Core = exports.default = exports.Border = exports.TopLeftCornerOverlay = exports.TopOverlay = exports.LeftOverlay = exports.DebugOverlay = exports.RowFilter = exports.ColumnFilter = exports.CellRange = exports.CellCoords = exports.ViewportRowsCalculator = exports.ViewportColumnsCalculator = undefined;
__webpack_require__(91);
__webpack_require__(106);
__webpack_require__(107);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(114);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(122);
__webpack_require__(123);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(128);
__webpack_require__(129);
__webpack_require__(130);
__webpack_require__(131);
__webpack_require__(132);
__webpack_require__(133);
__webpack_require__(134);
__webpack_require__(136);
__webpack_require__(138);
__webpack_require__(139);
__webpack_require__(140);
__webpack_require__(141);
__webpack_require__(142);
__webpack_require__(143);
__webpack_require__(144);
__webpack_require__(145);
__webpack_require__(146);
__webpack_require__(147);
__webpack_require__(148);
__webpack_require__(149);
__webpack_require__(150);
__webpack_require__(81);
__webpack_require__(151);
__webpack_require__(152);
__webpack_require__(154);
__webpack_require__(155);
__webpack_require__(156);
__webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
__webpack_require__(160);
__webpack_require__(162);
__webpack_require__(163);
__webpack_require__(164);
__webpack_require__(167);
__webpack_require__(168);
__webpack_require__(169);
var _viewportColumns = __webpack_require__(170);
var _viewportColumns2 = _interopRequireDefault(_viewportColumns);
var _viewportRows = __webpack_require__(171);
var _viewportRows2 = _interopRequireDefault(_viewportRows);
var _coords = __webpack_require__(53);
var _coords2 = _interopRequireDefault(_coords);
var _range = __webpack_require__(82);
var _range2 = _interopRequireDefault(_range);
var _column = __webpack_require__(172);
var _column2 = _interopRequireDefault(_column);
var _row = __webpack_require__(173);
var _row2 = _interopRequireDefault(_row);
var _debug = __webpack_require__(340);
var _debug2 = _interopRequireDefault(_debug);
var _left = __webpack_require__(343);
var _left2 = _interopRequireDefault(_left);
var _top = __webpack_require__(344);
var _top2 = _interopRequireDefault(_top);
var _topLeftCorner = __webpack_require__(345);
var _topLeftCorner2 = _interopRequireDefault(_topLeftCorner);
var _border = __webpack_require__(302);
var _border2 = _interopRequireDefault(_border);
var _core = __webpack_require__(174);
var _core2 = _interopRequireDefault(_core);
var _event = __webpack_require__(295);
var _event2 = _interopRequireDefault(_event);
var _overlays = __webpack_require__(296);
var _overlays2 = _interopRequireDefault(_overlays);
var _scroll = __webpack_require__(297);
var _scroll2 = _interopRequireDefault(_scroll);
var _selection = __webpack_require__(346);
var _selection2 = _interopRequireDefault(_selection);
var _settings = __webpack_require__(298);
var _settings2 = _interopRequireDefault(_settings);
var _table = __webpack_require__(299);
var _table2 = _interopRequireDefault(_table);
var _tableRenderer = __webpack_require__(300);
var _tableRenderer2 = _interopRequireDefault(_tableRenderer);
var _viewport = __webpack_require__(301);
var _viewport2 = _interopRequireDefault(_viewport);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.ViewportColumnsCalculator = _viewportColumns2.default;
exports.ViewportRowsCalculator = _viewportRows2.default;
exports.CellCoords = _coords2.default;
exports.CellRange = _range2.default;
exports.ColumnFilter = _column2.default;
exports.RowFilter = _row2.default;
exports.DebugOverlay = _debug2.default;
exports.LeftOverlay = _left2.default;
exports.TopOverlay = _top2.default;
exports.TopLeftCornerOverlay = _topLeftCorner2.default;
exports.Border = _border2.default;
exports.default = _core2.default;
exports.Core = _core2.default;
exports.Event = _event2.default;
exports.Overlays = _overlays2.default;
exports.Scroll = _scroll2.default;
exports.Selection = _selection2.default;
exports.Settings = _settings2.default;
exports.Table = _table2.default;
exports.TableRenderer = _tableRenderer2.default;
exports.Viewport = _viewport2.default;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getRegisteredEditors = exports.getRegisteredEditorNames = exports.hasEditor = exports.getEditorInstance = exports.getEditor = exports.registerEditor = undefined;
exports.RegisteredEditor = RegisteredEditor;
exports._getEditorInstance = _getEditorInstance;
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _baseEditor = __webpack_require__(47);
var _baseEditor2 = _interopRequireDefault(_baseEditor);
var _autocompleteEditor = __webpack_require__(303);
var _autocompleteEditor2 = _interopRequireDefault(_autocompleteEditor);
var _checkboxEditor = __webpack_require__(348);
var _checkboxEditor2 = _interopRequireDefault(_checkboxEditor);
var _dateEditor = __webpack_require__(349);
var _dateEditor2 = _interopRequireDefault(_dateEditor);
var _dropdownEditor = __webpack_require__(352);
var _dropdownEditor2 = _interopRequireDefault(_dropdownEditor);
var _handsontableEditor = __webpack_require__(304);
var _handsontableEditor2 = _interopRequireDefault(_handsontableEditor);
var _mobileTextEditor = __webpack_require__(353);
var _mobileTextEditor2 = _interopRequireDefault(_mobileTextEditor);
var _numericEditor = __webpack_require__(354);
var _numericEditor2 = _interopRequireDefault(_numericEditor);
var _passwordEditor = __webpack_require__(355);
var _passwordEditor2 = _interopRequireDefault(_passwordEditor);
var _selectEditor = __webpack_require__(356);
var _selectEditor2 = _interopRequireDefault(_selectEditor);
var _textEditor = __webpack_require__(54);
var _textEditor2 = _interopRequireDefault(_textEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var registeredEditorClasses = new WeakMap(); /**
* Utility to register editors and common namespace for keeping reference to all editor classes
*/
var _staticRegister = (0, _staticRegister3.default)('editors'),
register = _staticRegister.register,
getItem = _staticRegister.getItem,
hasItem = _staticRegister.hasItem,
getNames = _staticRegister.getNames,
getValues = _staticRegister.getValues;
_register('base', _baseEditor2.default);
_register('autocomplete', _autocompleteEditor2.default);
_register('checkbox', _checkboxEditor2.default);
_register('date', _dateEditor2.default);
_register('dropdown', _dropdownEditor2.default);
_register('handsontable', _handsontableEditor2.default);
_register('mobile', _mobileTextEditor2.default);
_register('numeric', _numericEditor2.default);
_register('password', _passwordEditor2.default);
_register('select', _selectEditor2.default);
_register('text', _textEditor2.default);
function RegisteredEditor(editorClass) {
var instances = {};
var Clazz = editorClass;
this.getConstructor = function () {
return editorClass;
};
this.getInstance = function (hotInstance) {
if (!(hotInstance.guid in instances)) {
instances[hotInstance.guid] = new Clazz(hotInstance);
}
return instances[hotInstance.guid];
};
_pluginHooks2.default.getSingleton().add('afterDestroy', function () {
instances = {};
});
}
/**
* Returns instance (singleton) of editor class.
*
* @param {String} name Name of an editor under which it has been stored.
* @param {Object} hotInstance Instance of Handsontable.
* @returns {Function} Returns instance of editor.
*/
function _getEditorInstance(name, hotInstance) {
var editor = void 0;
if (typeof name === 'function') {
if (!registeredEditorClasses.get(name)) {
_register(null, name);
}
editor = registeredEditorClasses.get(name);
} else if (typeof name === 'string') {
editor = getItem(name);
} else {
throw Error('Only strings and functions can be passed as "editor" parameter');
}
if (!editor) {
throw Error('No editor registered under name "' + name + '"');
}
return editor.getInstance(hotInstance);
}
/**
* Retrieve editor class.
*
* @param {String} name Editor identification.
* @returns {Function} Returns editor class.
*/
function _getItem(name) {
if (!hasItem(name)) {
throw Error('No registered editor found under "' + name + '" name');
}
return getItem(name).getConstructor();
}
/**
* Register editor class under specified name.
*
* @param {String} name Editor identification.
* @param {Function} editorClass Editor class.
*/
function _register(name, editorClass) {
var editorWrapper = new RegisteredEditor(editorClass);
if (typeof name === 'string') {
register(name, editorWrapper);
}
registeredEditorClasses.set(editorClass, editorWrapper);
}
exports.registerEditor = _register;
exports.getEditor = _getItem;
exports.getEditorInstance = _getEditorInstance;
exports.hasEditor = hasItem;
exports.getRegisteredEditorNames = getNames;
exports.getRegisteredEditors = getValues;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _templateObject = _taggedTemplateLiteral(['\n Your license key of Handsontable Pro has expired.\u200C\u200C\u200C\u200C \n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n '], ['\n Your license key of Handsontable Pro has expired.\u200C\u200C\u200C\u200C\\x20\n Renew your maintenance plan at https://handsontable.com or downgrade to the previous version of the software.\n ']);
exports.stringify = stringify;
exports.isDefined = isDefined;
exports.isUndefined = isUndefined;
exports.isEmpty = isEmpty;
exports.isRegExp = isRegExp;
exports._injectProductInfo = _injectProductInfo;
var _moment = __webpack_require__(40);
var _moment2 = _interopRequireDefault(_moment);
var _templateLiteralTag = __webpack_require__(294);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
/**
* Converts any value to string.
*
* @param {*} value
* @returns {String}
*/
function stringify(value) {
var result = void 0;
switch (typeof value === 'undefined' ? 'undefined' : _typeof(value)) {
case 'string':
case 'number':
result = '' + value;
break;
case 'object':
result = value === null ? '' : value.toString();
break;
case 'undefined':
result = '';
break;
default:
result = value.toString();
break;
}
return result;
}
/**
* Checks if given variable is defined.
*
* @param {*} variable Variable to check.
* @returns {Boolean}
*/
function isDefined(variable) {
return typeof variable !== 'undefined';
}
/**
* Checks if given variable is undefined.
*
* @param {*} variable Variable to check.
* @returns {Boolean}
*/
function isUndefined(variable) {
return typeof variable === 'undefined';
}
/**
* Check if given variable is null, empty string or undefined.
*
* @param {*} variable Variable to check.
* @returns {Boolean}
*/
function isEmpty(variable) {
return variable === null || variable === '' || isUndefined(variable);
}
/**
* Check if given variable is a regular expression.
*
* @param {*} variable Variable to check.
* @returns {Boolean}
*/
function isRegExp(variable) {
return Object.prototype.toString.call(variable) === '[object RegExp]';
}
/* eslint-disable */
var _m = '\x6C\x65\x6E\x67\x74\x68';
var _hd = function _hd(v) {
return parseInt(v, 16);
};
var _pi = function _pi(v) {
return parseInt(v, 10);
};
var _ss = function _ss(v, s, l) {
return v['\x73\x75\x62\x73\x74\x72'](s, l);
};
var _cp = function _cp(v) {
return v['\x63\x6F\x64\x65\x50\x6F\x69\x6E\x74\x41\x74'](0) - 65;
};
var _norm = function _norm(v) {
return ('' + v).replace(/\-/g, '');
};
var _extractTime = function _extractTime(v) {
return _hd(_ss(_norm(v), _hd('12'), _cp('\x46'))) / (_hd(_ss(_norm(v), _cp('\x42'), ~~![][_m])) || 9);
};
var _ignored = function _ignored() {
return typeof location !== 'undefined' && /^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);
};
var _notified = false;
function _injectProductInfo(key, element) {
key = _norm(key || '');
var warningMessage = '';
var showDomMessage = true;
var schemaValidity = _checkKeySchema(key);
var ignored = _ignored();
var trial = isEmpty(key) || key === 'trial';
if (trial || schemaValidity) {
if (schemaValidity) {
var releaseTime = Math.floor((0, _moment2.default)('25/01/2018', 'DD/MM/YYYY').toDate().getTime() / 8.64e7);
var keyGenTime = _extractTime(key);
if (keyGenTime > 45000 || keyGenTime !== parseInt(keyGenTime, 10)) {
warningMessage = 'The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.';
}
if (!warningMessage) {
if (releaseTime > keyGenTime + 1) {
warningMessage = (0, _templateLiteralTag.toSingleLine)(_templateObject);
}
showDomMessage = releaseTime > keyGenTime + 15;
}
} else {
warningMessage = 'Evaluation version of Handsontable Pro. Not licensed for use in a production environment.';
}
} else {
warningMessage = 'The license key provided to Handsontable Pro is invalid. Make sure you pass it correctly.';
}
if (ignored) {
warningMessage = false;
showDomMessage = false;
}
if (warningMessage && !_notified) {
console[trial ? 'info' : 'warn'](warningMessage);
_notified = true;
}
if (showDomMessage && element.parentNode) {
var message = document.createElement('div');
message.id = 'hot-display-license-info';
message.appendChild(document.createTextNode('Evaluation version of Handsontable Pro.'));
message.appendChild(document.createElement('br'));
message.appendChild(document.createTextNode('Not licensed for production use.'));
element.parentNode.insertBefore(message, element.nextSibling);
}
}
function _checkKeySchema(v) {
var z = [][_m];
var p = z;
if (v[_m] !== _cp('\x5A')) {
return false;
}
for (var c = '', i = '\x42\x3C\x48\x34\x50\x2B'.split(''), j = _cp(i.shift()); j; j = _cp(i.shift() || 'A')) {
--j < ''[_m] ? p = p | (_pi('' + _pi(_hd(c) + (_hd(_ss(v, Math.abs(j), 2)) + []).padStart(2, '0'))) % 97 || 2) >> 1 : c = _ss(v, j, !j ? 6 : i[_m] === 1 ? 9 : 8);
}
return p === z;
}
/* eslint-enable */
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(5);
module.exports = function (it) {
if (!isObject(it)) throw TypeError(it + ' is not an object!');
return it;
};
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(18);
var IE8_DOM_DEFINE = __webpack_require__(93);
var toPrimitive = __webpack_require__(69);
var dP = Object.defineProperty;
exports.f = __webpack_require__(22) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY_CODES = undefined;
exports.isPrintableChar = isPrintableChar;
exports.isMetaKey = isMetaKey;
exports.isCtrlKey = isCtrlKey;
exports.isKey = isKey;
var _array = __webpack_require__(2);
var KEY_CODES = exports.KEY_CODES = {
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
};
/**
* Returns true if keyCode represents a printable character.
*
* @param {Number} keyCode
* @returns {Boolean}
*/
function isPrintableChar(keyCode) {
return keyCode == 32 || // space
keyCode >= 48 && keyCode <= 57 || // 0-9
keyCode >= 96 && keyCode <= 111 || // numpad
keyCode >= 186 && keyCode <= 192 || // ;=,-./`
keyCode >= 219 && keyCode <= 222 || // []{}\|"'
keyCode >= 226 || // special chars (229 for Asian chars)
keyCode >= 65 && keyCode <= 90; // a-z
}
/**
* @param {Number} keyCode
* @returns {Boolean}
*/
function isMetaKey(keyCode) {
var metaKeys = [KEY_CODES.ARROW_DOWN, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_RIGHT, KEY_CODES.HOME, KEY_CODES.END, KEY_CODES.DELETE, KEY_CODES.BACKSPACE, KEY_CODES.F1, KEY_CODES.F2, KEY_CODES.F3, KEY_CODES.F4, KEY_CODES.F5, KEY_CODES.F6, KEY_CODES.F7, KEY_CODES.F8, KEY_CODES.F9, KEY_CODES.F10, KEY_CODES.F11, KEY_CODES.F12, KEY_CODES.TAB, KEY_CODES.PAGE_DOWN, KEY_CODES.PAGE_UP, KEY_CODES.ENTER, KEY_CODES.ESCAPE, KEY_CODES.SHIFT, KEY_CODES.CAPS_LOCK, KEY_CODES.ALT];
return metaKeys.indexOf(keyCode) !== -1;
}
/**
* @param {Number} keyCode
* @returns {Boolean}
*/
function isCtrlKey(keyCode) {
return [KEY_CODES.CONTROL_LEFT, 224, KEY_CODES.COMMAND_LEFT, KEY_CODES.COMMAND_RIGHT].indexOf(keyCode) !== -1;
}
/**
* @param {Number} keyCode
* @param {String} baseCode
* @returns {Boolean}
*/
function isKey(keyCode, baseCode) {
var keys = baseCode.split('|');
var result = false;
(0, _array.arrayEach)(keys, function (key) {
if (keyCode === KEY_CODES[key]) {
result = true;
return false;
}
});
return result;
}
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.normalizeSelection = normalizeSelection;
exports.isSeparator = isSeparator;
exports.hasSubMenu = hasSubMenu;
exports.isDisabled = isDisabled;
exports.isSelectionDisabled = isSelectionDisabled;
exports.getValidSelection = getValidSelection;
exports.prepareVerticalAlignClass = prepareVerticalAlignClass;
exports.prepareHorizontalAlignClass = prepareHorizontalAlignClass;
exports.getAlignmentClasses = getAlignmentClasses;
exports.align = align;
exports.checkSelectionConsistency = checkSelectionConsistency;
exports.markLabelAsSelected = markLabelAsSelected;
exports.isItemHidden = isItemHidden;
exports.filterSeparators = filterSeparators;
var _array = __webpack_require__(2);
var _element = __webpack_require__(0);
var _separator = __webpack_require__(88);
function normalizeSelection(selRange) {
return {
start: selRange.getTopLeftCorner(),
end: selRange.getBottomRightCorner()
};
}
function isSeparator(cell) {
return (0, _element.hasClass)(cell, 'htSeparator');
}
function hasSubMenu(cell) {
return (0, _element.hasClass)(cell, 'htSubmenu');
}
function isDisabled(cell) {
return (0, _element.hasClass)(cell, 'htDisabled');
}
function isSelectionDisabled(cell) {
return (0, _element.hasClass)(cell, 'htSelectionDisabled');
}
function getValidSelection(hot) {
var selected = hot.getSelected();
if (!selected) {
return null;
}
if (selected[0] < 0) {
return null;
}
return selected;
}
function prepareVerticalAlignClass(className, alignment) {
if (className.indexOf(alignment) != -1) {
return className;
}
className = className.replace('htTop', '').replace('htMiddle', '').replace('htBottom', '').replace(' ', '');
className += ' ' + alignment;
return className;
}
function prepareHorizontalAlignClass(className, alignment) {
if (className.indexOf(alignment) != -1) {
return className;
}
className = className.replace('htLeft', '').replace('htCenter', '').replace('htRight', '').replace('htJustify', '').replace(' ', '');
className += ' ' + alignment;
return className;
}
function getAlignmentClasses(range, callback) {
var classes = {};
for (var row = range.from.row; row <= range.to.row; row++) {
for (var col = range.from.col; col <= range.to.col; col++) {
if (!classes[row]) {
classes[row] = [];
}
classes[row][col] = callback(row, col);
}
}
return classes;
}
function align(range, type, alignment, cellDescriptor, propertySetter) {
if (range.from.row == range.to.row && range.from.col == range.to.col) {
applyAlignClassName(range.from.row, range.from.col, type, alignment, cellDescriptor, propertySetter);
} else {
for (var row = range.from.row; row <= range.to.row; row++) {
for (var col = range.from.col; col <= range.to.col; col++) {
applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter);
}
}
}
}
function applyAlignClassName(row, col, type, alignment, cellDescriptor, propertySetter) {
var cellMeta = cellDescriptor(row, col);
var className = alignment;
if (cellMeta.className) {
if (type === 'vertical') {
className = prepareVerticalAlignClass(cellMeta.className, alignment);
} else {
className = prepareHorizontalAlignClass(cellMeta.className, alignment);
}
}
propertySetter(row, col, 'className', className);
}
function checkSelectionConsistency(range, comparator) {
var result = false;
if (range) {
range.forAll(function (row, col) {
if (comparator(row, col)) {
result = true;
return false;
}
});
}
return result;
}
function markLabelAsSelected(label) {
// workaround for https://github.com/handsontable/handsontable/issues/1946
return '<span class="selected">' + String.fromCharCode(10003) + '</span>' + label;
}
function isItemHidden(item, instance) {
return !item.hidden || !(typeof item.hidden == 'function' && item.hidden.call(instance));
}
function shiftSeparators(items, separator) {
var result = items.slice(0);
for (var i = 0; i < result.length;) {
if (result[i].name === separator) {
result.shift();
} else {
break;
}
}
return result;
}
function popSeparators(items, separator) {
var result = items.slice(0);
result.reverse();
result = shiftSeparators(result, separator);
result.reverse();
return result;
}
function removeDuplicatedSeparators(items) {
var result = [];
(0, _array.arrayEach)(items, function (value, index) {
if (index > 0) {
if (result[result.length - 1].name !== value.name) {
result.push(value);
}
} else {
result.push(value);
}
});
return result;
}
function filterSeparators(items) {
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _separator.KEY;
var result = items.slice(0);
result = shiftSeparators(result, separator);
result = popSeparators(result, separator);
result = removeDuplicatedSeparators(result);
return result;
}
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(23)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 23 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (e) {
return true;
}
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(71);
var defined = __webpack_require__(38);
module.exports = function (it) {
return IObject(defined(it));
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(55);
var min = Math.min;
module.exports = function (it) {
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
// most Object methods by ES6 should accept primitives
var $export = __webpack_require__(3);
var core = __webpack_require__(43);
var fails = __webpack_require__(23);
module.exports = function (KEY, exec) {
var fn = (core.Object || {})[KEY] || Object[KEY];
var exp = {};
exp[KEY] = exec(fn);
$export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
};
/***/ }),
/* 27 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.isIE8 = isIE8;
exports.isIE9 = isIE9;
exports.isSafari = isSafari;
exports.isChrome = isChrome;
exports.isMobileBrowser = isMobileBrowser;
var _isIE8 = !document.createTextNode('test').textContent;
function isIE8() {
return _isIE8;
}
var _isIE9 = !!document.documentMode;
function isIE9() {
return _isIE9;
}
var _isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
function isSafari() {
return _isSafari;
}
var _isChrome = /Chrome/.test(navigator.userAgent) && /Google/.test(navigator.vendor);
function isChrome() {
return _isChrome;
}
function isMobileBrowser(userAgent) {
if (!userAgent) {
userAgent = navigator.userAgent;
}
return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent)
);
}
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getRegisteredValidators = exports.getRegisteredValidatorNames = exports.hasValidator = exports.getValidator = exports.registerValidator = undefined;
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _autocompleteValidator = __webpack_require__(365);
var _autocompleteValidator2 = _interopRequireDefault(_autocompleteValidator);
var _dateValidator = __webpack_require__(366);
var _dateValidator2 = _interopRequireDefault(_dateValidator);
var _numericValidator = __webpack_require__(367);
var _numericValidator2 = _interopRequireDefault(_numericValidator);
var _timeValidator = __webpack_require__(368);
var _timeValidator2 = _interopRequireDefault(_timeValidator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _staticRegister = (0, _staticRegister3.default)('validators'),
register = _staticRegister.register,
getItem = _staticRegister.getItem,
hasItem = _staticRegister.hasItem,
getNames = _staticRegister.getNames,
getValues = _staticRegister.getValues;
register('autocomplete', _autocompleteValidator2.default);
register('date', _dateValidator2.default);
register('numeric', _numericValidator2.default);
register('time', _timeValidator2.default);
/**
* Retrieve validator function.
*
* @param {String} name Validator identification.
* @returns {Function} Returns validator function.
*/
function _getItem(name) {
if (typeof name === 'function') {
return name;
}
if (!hasItem(name)) {
throw Error('No registered validator found under "' + name + '" name');
}
return getItem(name);
}
exports.registerValidator = register;
exports.getValidator = _getItem;
exports.hasValidator = hasItem;
exports.getRegisteredValidatorNames = getNames;
exports.getRegisteredValidators = getValues;
/***/ }),
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var hide = __webpack_require__(31);
var has = __webpack_require__(27);
var SRC = __webpack_require__(48)('src');
var TO_STRING = 'toString';
var $toString = Function[TO_STRING];
var TPL = ('' + $toString).split(TO_STRING);
__webpack_require__(43).inspectSource = function (it) {
return $toString.call(it);
};
(module.exports = function (O, key, val, safe) {
var isFunction = typeof val == 'function';
if (isFunction) has(val, 'name') || hide(val, 'name', key);
if (O[key] === val) return;
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
if (O === global) {
O[key] = val;
} else if (!safe) {
delete O[key];
hide(O, key, val);
} else if (O[key]) {
O[key] = val;
} else {
hide(O, key, val);
}
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, TO_STRING, function toString() {
return typeof this == 'function' && this[SRC] || $toString.call(this);
});
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(19);
var createDesc = __webpack_require__(49);
module.exports = __webpack_require__(22) ? function (object, key, value) {
return dP.f(object, key, createDesc(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(58);
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(38);
module.exports = function (it) {
return Object(defined(it));
};
/***/ }),
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
var META = __webpack_require__(48)('meta');
var isObject = __webpack_require__(5);
var has = __webpack_require__(27);
var setDesc = __webpack_require__(19).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var FREEZE = !__webpack_require__(23)(function () {
return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
setDesc(it, META, { value: {
i: 'O' + ++id, // object ID
w: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMeta(it);
// return object ID
} return it[META].i;
};
var getWeak = function (it, create) {
if (!has(it, META)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMeta(it);
// return hash weak collections IDs
} return it[META].w;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
return it;
};
var meta = module.exports = {
KEY: META,
NEED: false,
fastKey: fastKey,
getWeak: getWeak,
onFreeze: onFreeze
};
/***/ }),
/* 35 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _core = __webpack_require__(174);
var _core2 = _interopRequireDefault(_core);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var registeredOverlays = {};
/**
* Creates an overlay over the original Walkontable instance. The overlay renders the clone of the original Walkontable
* and (optionally) implements behavior needed for native horizontal and vertical scrolling.
*
* @class Overlay
*/
var Overlay = function () {
_createClass(Overlay, null, [{
key: 'registerOverlay',
/**
* Register overlay class.
*
* @param {String} type Overlay type, one of the CLONE_TYPES value
* @param {Overlay} overlayClass Overlay class extended from base overlay class {@link Overlay}
*/
value: function registerOverlay(type, overlayClass) {
if (Overlay.CLONE_TYPES.indexOf(type) === -1) {
throw new Error('Unsupported overlay (' + type + ').');
}
registeredOverlays[type] = overlayClass;
}
/**
* Create new instance of overlay type.
*
* @param {String} type Overlay type, one of the CLONE_TYPES value
* @param {Walkontable} wot Walkontable instance
*/
}, {
key: 'createOverlay',
value: function createOverlay(type, wot) {
return new registeredOverlays[type](wot);
}
/**
* Check if specified overlay was registered.
*
* @param {String} type Overlay type, one of the CLONE_TYPES value
* @returns {Boolean}
*/
}, {
key: 'hasOverlay',
value: function hasOverlay(type) {
return registeredOverlays[type] !== void 0;
}
/**
* Checks if overlay object (`overlay`) is instance of overlay type (`type`).
*
* @param {Overlay} overlay Overlay object
* @param {String} type Overlay type, one of the CLONE_TYPES value
* @returns {Boolean}
*/
}, {
key: 'isOverlayTypeOf',
value: function isOverlayTypeOf(overlay, type) {
if (!overlay || !registeredOverlays[type]) {
return false;
}
return overlay instanceof registeredOverlays[type];
}
/**
* @param {Walkontable} wotInstance
*/
}, {
key: 'CLONE_TOP',
/**
* @type {String}
*/
get: function get() {
return 'top';
}
/**
* @type {String}
*/
}, {
key: 'CLONE_BOTTOM',
get: function get() {
return 'bottom';
}
/**
* @type {String}
*/
}, {
key: 'CLONE_LEFT',
get: function get() {
return 'left';
}
/**
* @type {String}
*/
}, {
key: 'CLONE_TOP_LEFT_CORNER',
get: function get() {
return 'top_left_corner';
}
/**
* @type {String}
*/
}, {
key: 'CLONE_BOTTOM_LEFT_CORNER',
get: function get() {
return 'bottom_left_corner';
}
/**
* @type {String}
*/
}, {
key: 'CLONE_DEBUG',
get: function get() {
return 'debug';
}
/**
* List of all availables clone types
*
* @type {Array}
*/
}, {
key: 'CLONE_TYPES',
get: function get() {
return [Overlay.CLONE_TOP, Overlay.CLONE_BOTTOM, Overlay.CLONE_LEFT, Overlay.CLONE_TOP_LEFT_CORNER, Overlay.CLONE_BOTTOM_LEFT_CORNER, Overlay.CLONE_DEBUG];
}
}]);
function Overlay(wotInstance) {
_classCallCheck(this, Overlay);
(0, _object.defineGetter)(this, 'wot', wotInstance, {
writable: false
});
// legacy support, deprecated in the future
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 = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
this.areElementSizesAdjusted = false;
this.updateStateOfRendering();
}
/**
* Update internal state of object with an information about the need of full rendering of the overlay.
*
* @returns {Boolean} Returns `true` if the state has changed since the last check.
*/
_createClass(Overlay, [{
key: 'updateStateOfRendering',
value: function updateStateOfRendering() {
var previousState = this.needFullRender;
this.needFullRender = this.shouldBeRendered();
var changed = previousState !== this.needFullRender;
if (changed && !this.needFullRender) {
this.reset();
}
return changed;
}
/**
* Checks if overlay should be fully rendered
*
* @returns {Boolean}
*/
}, {
key: 'shouldBeRendered',
value: function shouldBeRendered() {
return true;
}
/**
* Update the trimming container.
*/
}, {
key: 'updateTrimmingContainer',
value: function updateTrimmingContainer() {
this.trimmingContainer = (0, _element.getTrimmingContainer)(this.hider.parentNode.parentNode);
}
/**
* Update the main scrollable element.
*/
}, {
key: 'updateMainScrollableElement',
value: function updateMainScrollableElement() {
this.mainTableScrollableElement = (0, _element.getScrollableElement)(this.wot.wtTable.TABLE);
}
/**
* Make a clone of table for overlay
*
* @param {String} direction Can be `Overlay.CLONE_TOP`, `Overlay.CLONE_LEFT`,
* `Overlay.CLONE_TOP_LEFT_CORNER`, `Overlay.CLONE_DEBUG`
* @returns {Walkontable}
*/
}, {
key: 'makeClone',
value: function makeClone(direction) {
if (Overlay.CLONE_TYPES.indexOf(direction) === -1) {
throw new Error('Clone type "' + direction + '" is not supported.');
}
var clone = document.createElement('DIV');
var clonedTable = document.createElement('TABLE');
clone.className = 'ht_clone_' + direction + ' handsontable';
clone.style.position = 'absolute';
clone.style.top = 0;
clone.style.left = 0;
clone.style.overflow = 'hidden';
clonedTable.className = this.wot.wtTable.TABLE.className;
clone.appendChild(clonedTable);
this.type = direction;
this.wot.wtTable.wtRootElement.parentNode.appendChild(clone);
var preventOverflow = this.wot.getSetting('preventOverflow');
if (preventOverflow === true || preventOverflow === 'horizontal' && this.type === Overlay.CLONE_TOP || preventOverflow === 'vertical' && this.type === Overlay.CLONE_LEFT) {
this.mainTableScrollableElement = window;
} else {
this.mainTableScrollableElement = (0, _element.getScrollableElement)(this.wot.wtTable.TABLE);
}
return new _core2.default({
cloneSource: this.wot,
cloneOverlay: this,
table: clonedTable
});
}
/**
* Refresh/Redraw overlay
*
* @param {Boolean} [fastDraw=false]
*/
}, {
key: 'refresh',
value: function refresh() {
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
// When hot settings are changed we allow to refresh overlay once before blocking
var nextCycleRenderFlag = this.shouldBeRendered();
if (this.clone && (this.needFullRender || nextCycleRenderFlag)) {
this.clone.draw(fastDraw);
}
this.needFullRender = nextCycleRenderFlag;
}
/**
* Reset overlay styles to initial values.
*/
}, {
key: 'reset',
value: function reset() {
if (!this.clone) {
return;
}
var holder = this.clone.wtTable.holder;
var hider = this.clone.wtTable.hider;
var holderStyle = holder.style;
var hidderStyle = hider.style;
var rootStyle = holder.parentNode.style;
(0, _array.arrayEach)([holderStyle, hidderStyle, rootStyle], function (style) {
style.width = '';
style.height = '';
});
}
/**
* Destroy overlay instance
*/
}, {
key: 'destroy',
value: function destroy() {
new _eventManager2.default(this.clone).destroy();
}
}]);
return Overlay;
}();
exports.default = Overlay;
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.toUpperCaseFirst = toUpperCaseFirst;
exports.equalsIgnoreCase = equalsIgnoreCase;
exports.randomString = randomString;
exports.isPercentValue = isPercentValue;
exports.substitute = substitute;
exports.stripTags = stripTags;
var _mixed = __webpack_require__(17);
var _number = __webpack_require__(6);
/**
* Convert string to upper case first letter.
*
* @param {String} string String to convert.
* @returns {String}
*/
function toUpperCaseFirst(string) {
return string[0].toUpperCase() + string.substr(1);
}
/**
* Compare strings case insensitively.
*
* @param {...String} strings Strings to compare.
* @returns {Boolean}
*/
function equalsIgnoreCase() {
var unique = [];
for (var _len = arguments.length, strings = Array(_len), _key = 0; _key < _len; _key++) {
strings[_key] = arguments[_key];
}
var length = strings.length;
while (length--) {
var string = (0, _mixed.stringify)(strings[length]).toLowerCase();
if (unique.indexOf(string) === -1) {
unique.push(string);
}
}
return unique.length === 1;
}
/**
* Generates a random hex string. Used as namespace for Handsontable instance events.
*
* @return {String} Returns 16-long character random string (eq. `'92b1bfc74ec4'`).
*/
function randomString() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
}
return s4() + s4() + s4() + s4();
}
/**
* Checks if value is valid percent.
*
* @param {String} value
* @returns {Boolean}
*/
function isPercentValue(value) {
return (/^([0-9][0-9]?%$)|(^100%$)/.test(value)
);
}
/**
* Substitute strings placed beetwen square brackets into value defined in `variables` object. String names defined in
* square brackets must be the same as property name of `variables` object.
*
* @param {String} template Template string.
* @param {Object} variables Object which contains all available values which can be injected into template.
* @returns {String}
*/
function substitute(template) {
var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return ('' + template).replace(/(?:\\)?\[([^[\]]+)]/g, function (match, name) {
if (match.charAt(0) === '\\') {
return match.substr(1, match.length - 1);
}
return variables[name] === void 0 ? '' : variables[name];
});
}
var STRIP_TAGS_REGEX = /<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi;
/**
* Strip any HTML tag from the string.
*
* @param {String} string String to cut HTML from.
* @return {String}
*/
function stripTags(string) {
string += '';
return string.replace(STRIP_TAGS_REGEX, '');
}
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(94);
var enumBugKeys = __webpack_require__(74);
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/* 38 */
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.requestAnimationFrame = requestAnimationFrame;
exports.cancelAnimationFrame = cancelAnimationFrame;
exports.isTouchSupported = isTouchSupported;
exports.isWebComponentSupportedNatively = isWebComponentSupportedNatively;
exports.hasCaptionProblem = hasCaptionProblem;
exports.getComparisonFunction = getComparisonFunction;
// https://gist.github.com/paulirish/1579671
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
var _requestAnimationFrame = window.requestAnimationFrame;
var _cancelAnimationFrame = window.cancelAnimationFrame;
for (var x = 0; x < vendors.length && !_requestAnimationFrame; ++x) {
_requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
_cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
}
if (!_requestAnimationFrame) {
_requestAnimationFrame = function _requestAnimationFrame(callback) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
var id = window.setTimeout(function () {
callback(currTime + timeToCall);
}, timeToCall);
lastTime = currTime + timeToCall;
return id;
};
}
if (!_cancelAnimationFrame) {
_cancelAnimationFrame = function _cancelAnimationFrame(id) {
clearTimeout(id);
};
}
/**
* Polyfill for requestAnimationFrame
*
* @param {Function} callback
* @returns {Number}
*/
function requestAnimationFrame(callback) {
return _requestAnimationFrame.call(window, callback);
}
/**
* Polyfill for cancelAnimationFrame
*
* @param {Number} id
*/
function cancelAnimationFrame(id) {
_cancelAnimationFrame.call(window, id);
}
function isTouchSupported() {
return 'ontouchstart' in window;
}
/**
* Checks if browser is support web components natively
*
* @returns {Boolean}
*/
function isWebComponentSupportedNatively() {
var test = document.createElement('div');
return !!(test.createShadowRoot && test.createShadowRoot.toString().match(/\[native code\]/));
}
var _hasCaptionProblem;
function detectCaptionProblem() {
var TABLE = document.createElement('TABLE');
TABLE.style.borderSpacing = 0;
TABLE.style.borderWidth = 0;
TABLE.style.padding = 0;
var TBODY = document.createElement('TBODY');
TABLE.appendChild(TBODY);
TBODY.appendChild(document.createElement('TR'));
TBODY.firstChild.appendChild(document.createElement('TD'));
TBODY.firstChild.firstChild.innerHTML = '<tr><td>t<br>t</td></tr>';
var CAPTION = document.createElement('CAPTION');
CAPTION.innerHTML = 'c<br>c<br>c<br>c';
CAPTION.style.padding = 0;
CAPTION.style.margin = 0;
TABLE.insertBefore(CAPTION, TBODY);
document.body.appendChild(TABLE);
_hasCaptionProblem = TABLE.offsetHeight < 2 * TABLE.lastChild.offsetHeight; // boolean
document.body.removeChild(TABLE);
}
function hasCaptionProblem() {
if (_hasCaptionProblem === void 0) {
detectCaptionProblem();
}
return _hasCaptionProblem;
}
var comparisonFunction = void 0;
/**
* Get string comparison function for sorting purposes. It supports multilingual string comparison base on Internationalization API.
*
* @param {String} [language]
* @param {Object} [options]
* @returns {*}
*/
function getComparisonFunction(language) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (comparisonFunction) {
return comparisonFunction;
}
if ((typeof Intl === 'undefined' ? 'undefined' : _typeof(Intl)) === 'object') {
comparisonFunction = new Intl.Collator(language, options).compare;
} else if (typeof String.prototype.localeCompare === 'function') {
comparisonFunction = function comparisonFunction(a, b) {
return ('' + a).localeCompare(b);
};
} else {
comparisonFunction = function comparisonFunction(a, b) {
if (a === b) {
return 0;
}
return a > b ? -1 : 1;
};
}
return comparisonFunction;
}
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
//! version : 2.20.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
true ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.moment = factory()
}(this, (function () { 'use strict';
var hookCallback;
function hooks () {
return hookCallback.apply(null, arguments);
}
// This is done to register the method called with moment()
// without creating circular dependencies.
function setHookCallback (callback) {
hookCallback = callback;
}
function isArray(input) {
return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
}
function isObject(input) {
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return input != null && Object.prototype.toString.call(input) === '[object Object]';
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return (Object.getOwnPropertyNames(obj).length === 0);
} else {
var k;
for (k in obj) {
if (obj.hasOwnProperty(k)) {
return false;
}
}
return true;
}
}
function isUndefined(input) {
return input === void 0;
}
function isNumber(input) {
return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
}
function isDate(input) {
return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
}
function map(arr, fn) {
var res = [], i;
for (i = 0; i < arr.length; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, 'toString')) {
a.toString = b.toString;
}
if (hasOwnProp(b, 'valueOf')) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC (input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty : false,
unusedTokens : [],
unusedInput : [],
overflow : -2,
charsLeftOver : 0,
nullInput : false,
invalidMonth : null,
invalidFormat : false,
userInvalidated : false,
iso : false,
parsedDateParts : [],
meridiem : null,
rfc2822 : false,
weekdayMismatch : false
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function (fun) {
var t = Object(this);
var len = t.length >>> 0;
for (var i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
if (m._isValid == null) {
var flags = getParsingFlags(m);
var parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
var isNowValid = !isNaN(m._d.getTime()) &&
flags.overflow < 0 &&
!flags.empty &&
!flags.invalidMonth &&
!flags.invalidWeekday &&
!flags.weekdayMismatch &&
!flags.nullInput &&
!flags.invalidFormat &&
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) {
isNowValid = isNowValid &&
flags.charsLeftOver === 0 &&
flags.unusedTokens.length === 0 &&
flags.bigHour === undefined;
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
}
else {
return isNowValid;
}
}
return m._isValid;
}
function createInvalid (flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
}
else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var momentProperties = hooks.momentProperties = [];
function copyConfig(to, from) {
var i, prop, val;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
}
if (!isUndefined(from._i)) {
to._i = from._i;
}
if (!isUndefined(from._f)) {
to._f = from._f;
}
if (!isUndefined(from._l)) {
to._l = from._l;
}
if (!isUndefined(from._strict)) {
to._strict = from._strict;
}
if (!isUndefined(from._tzm)) {
to._tzm = from._tzm;
}
if (!isUndefined(from._isUTC)) {
to._isUTC = from._isUTC;
}
if (!isUndefined(from._offset)) {
to._offset = from._offset;
}
if (!isUndefined(from._pf)) {
to._pf = getParsingFlags(from);
}
if (!isUndefined(from._locale)) {
to._locale = from._locale;
}
if (momentProperties.length > 0) {
for (i = 0; i < momentProperties.length; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
to[prop] = val;
}
}
}
return to;
}
var updateInProgress = false;
// Moment prototype object
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = new Date(NaN);
}
// Prevent infinite loop in case updateOffset creates new moment
// objects.
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment (obj) {
return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
}
function absFloor (number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if ((dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
diffs++;
}
}
return diffs + lengthDiff;
}
function warn(msg) {
if (hooks.suppressDeprecationWarnings === false &&
(typeof console !== 'undefined') && console.warn) {
console.warn('Deprecation warning: ' + msg);
}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [];
var arg;
for (var i = 0; i < arguments.length; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
for (var key in arguments[0]) {
arg += key + ': ' + arguments[0][key] + ', ';
}
arg = arg.slice(0, -2); // Remove trailing comma and space
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
}
function set (config) {
var prop, i;
for (i in config) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
this._config = config;
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
// TODO: Remove "ordinalParse" fallback in next major release.
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
'|' + (/\d{1,2}/).source);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig), prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (hasOwnProp(parentConfig, prop) &&
!hasOwnProp(childConfig, prop) &&
isObject(parentConfig[prop])) {
// make sure changes to properties don't modify parent config
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function (obj) {
var i, res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[Last] dddd [at] LT',
sameElse : 'L'
};
function calendar (key, mom, now) {
var output = this._calendar[key] || this._calendar['sameElse'];
return isFunction(output) ? output.call(mom, now) : output;
}
var defaultLongDateFormat = {
LTS : 'h:mm:ss A',
LT : 'h:mm A',
L : 'MM/DD/YYYY',
LL : 'MMMM D, YYYY',
LLL : 'MMMM D, YYYY h:mm A',
LLLL : 'dddd, MMMM D, YYYY h:mm A'
};
function longDateFormat (key) {
var format = this._longDateFormat[key],
formatUpper = this._longDateFormat[key.toUpperCase()];
if (format || !formatUpper) {
return format;
}
this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
return val.slice(1);
});
return this._longDateFormat[key];
}
var defaultInvalidDate = 'Invalid date';
function invalidDate () {
return this._invalidDate;
}
var defaultOrdinal = '%d';
var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal (number) {
return this._ordinal.replace('%d', number);
}
var defaultRelativeTime = {
future : 'in %s',
past : '%s ago',
s : 'a few seconds',
ss : '%d seconds',
m : 'a minute',
mm : '%d minutes',
h : 'an hour',
hh : '%d hours',
d : 'a day',
dd : '%d days',
M : 'a month',
MM : '%d months',
y : 'a year',
yy : '%d years'
};
function relativeTime (number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return (isFunction(output)) ?
output(number, withoutSuffix, string, isFuture) :
output.replace(/%d/i, number);
}
function pastFuture (diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
var aliases = {};
function addUnitAlias (unit, shorthand) {
var lowerCase = unit.toLowerCase();
aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
}
function normalizeUnits(units) {
return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {};
function addUnitPriority(unit, priority) {
priorities[unit] = priority;
}
function getPrioritizedUnits(unitsObj) {
var units = [];
for (var u in unitsObj) {
units.push({unit: u, priority: priorities[u]});
}
units.sort(function (a, b) {
return a.priority - b.priority;
});
return units;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (sign ? (forceSign ? '+' : '') : '-') +
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
}
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
var formatFunctions = {};
var formatTokenFunctions = {};
// token: 'M'
// padded: ['MM', 2]
// ordinal: 'Mo'
// callback: function () { this.month() + 1 }
function addFormatToken (token, padded, ordinal, callback) {
var func = callback;
if (typeof callback === 'string') {
func = function () {
return this[callback]();
};
}
if (token) {
formatTokenFunctions[token] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function () {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal) {
formatTokenFunctions[ordinal] = function () {
return this.localeData().ordinal(func.apply(this, arguments), token);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, '');
}
return input.replace(/\\/g, '');
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens), i, length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = '', i;
for (i = 0; i < length; i++) {
output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format = expandFormat(format, m.localeData());
formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
return formatFunctions[format](m);
}
function expandFormat(format, locale) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
var match1 = /\d/; // 0 - 9
var match2 = /\d\d/; // 00 - 99
var match3 = /\d{3}/; // 000 - 999
var match4 = /\d{4}/; // 0000 - 9999
var match6 = /[+-]?\d{6}/; // -999999 - 999999
var match1to2 = /\d\d?/; // 0 - 99
var match3to4 = /\d\d\d\d?/; // 999 - 9999
var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
var match1to3 = /\d{1,3}/; // 0 - 999
var match1to4 = /\d{1,4}/; // 0 - 9999
var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
var matchUnsigned = /\d+/; // 0 - inf
var matchSigned = /[+-]?\d+/; // -inf - inf
var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
var regexes = {};
function addRegexToken (token, regex, strictRegex) {
regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
return (isStrict && strictRegex) ? strictRegex : regex;
};
}
function getParseRegexForToken (token, config) {
if (!hasOwnProp(regexes, token)) {
return new RegExp(unescapeFormat(token));
}
return regexes[token](config._strict, config._locale);
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function unescapeFormat(s) {
return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
}));
}
function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
var tokens = {};
function addParseToken (token, callback) {
var i, func = callback;
if (typeof token === 'string') {
token = [token];
}
if (isNumber(callback)) {
func = function (input, array) {
array[callback] = toInt(input);
};
}
for (i = 0; i < token.length; i++) {
tokens[token[i]] = func;
}
}
function addWeekParseToken (token, callback) {
addParseToken(token, function (input, array, config, token) {
config._w = config._w || {};
callback(input, config._w, config, token);
});
}
function addTimeToArrayFromToken(token, input, config) {
if (input != null && hasOwnProp(tokens, token)) {
tokens[token](input, config._a, config, token);
}
}
var YEAR = 0;
var MONTH = 1;
var DATE = 2;
var HOUR = 3;
var MINUTE = 4;
var SECOND = 5;
var MILLISECOND = 6;
var WEEK = 7;
var WEEKDAY = 8;
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? '' + y : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// ALIASES
addUnitAlias('year', 'y');
// PRIORITIES
addUnitPriority('year', 1);
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear () {
return isLeapYear(this.year());
}
function makeGetSet (unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get (mom, unit) {
return mom.isValid() ?
mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
}
function set$1 (mom, unit, value) {
if (mom.isValid() && !isNaN(value)) {
if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
}
else {
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
}
}
}
// MOMENTS
function stringGet (units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet (units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units);
for (var i = 0; i < prioritized.length; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
function mod(n, x) {
return ((n % x) + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function (o) {
// I know
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
}
// FORMATTING
addFormatToken('M', ['MM', 2], 'Mo', function () {
return this.month() + 1;
});
addFormatToken('MMM', 0, 0, function (format) {
return this.localeData().monthsShort(this, format);
});
addFormatToken('MMMM', 0, 0, function (format) {
return this.localeData().months(this, format);
});
// ALIASES
addUnitAlias('month', 'M');
// PRIORITY
addUnitPriority('month', 8);
// PARSING
addRegexToken('M', match1to2);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
return locale.monthsRegex(isStrict);
});
addParseToken(['M', 'MM'], function (input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
var month = config._locale.monthsParse(input, token, config._strict);
// if we didn't find a month name, mark the date as invalid.
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
// LOCALES
var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
function localeMonths (m, format) {
if (!m) {
return isArray(this._months) ? this._months :
this._months['standalone'];
}
return isArray(this._months) ? this._months[m.month()] :
this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
}
var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
function localeMonthsShort (m, format) {
if (!m) {
return isArray(this._monthsShort) ? this._monthsShort :
this._monthsShort['standalone'];
}
return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
}
function handleStrictParse(monthName, format, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse (monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
}
if (!strict && !this._monthsParse[i]) {
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
return i;
} else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
// MOMENTS
function setMonth (mom, value) {
var dayOfMonth;
if (!mom.isValid()) {
// No op
return mom;
}
if (typeof value === 'string') {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
// TODO: Another silent failure?
if (!isNumber(value)) {
return mom;
}
}
}
dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
return mom;
}
function getSetMonth (value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, 'Month');
}
}
function getDaysInMonth () {
return daysInMonth(this.year(), this.month());
}
var defaultMonthsShortRegex = matchWord;
function monthsShortRegex (isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, '_monthsShortRegex')) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict ?
this._monthsShortStrictRegex : this._monthsShortRegex;
}
}
var defaultMonthsRegex = matchWord;
function monthsRegex (isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, '_monthsRegex')) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict ?
this._monthsStrictRegex : this._monthsRegex;
}
}
function computeMonthsParse () {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [], longPieces = [], mixedPieces = [],
i, mom;
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
shortPieces.push(this.monthsShort(mom, ''));
longPieces.push(this.months(mom, ''));
mixedPieces.push(this.months(mom, ''));
mixedPieces.push(this.monthsShort(mom, ''));
}
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 12; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
}
for (i = 0; i < 24; i++) {
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
}
function createDate (y, m, d, h, M, s, ms) {
// can't just apply() to create a date:
// https://stackoverflow.com/q/181348
var date = new Date(y, m, d, h, M, s, ms);
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
date.setFullYear(y);
}
return date;
}
function createUTCDate (y) {
var date = new Date(Date.UTC.apply(null, arguments));
// the Date.UTC function remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
return date;
}
// start-of-first-week - start-of-year
function firstWeekOffset(year, dow, doy) {
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
fwd = 7 + dow - doy,
// first-week day local weekday -- which local weekday is fwd
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7,
weekOffset = firstWeekOffset(year, dow, doy),
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
resYear, resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
resWeek, resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset(year, dow, doy),
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
// FORMATTING
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
// ALIASES
addUnitAlias('week', 'w');
addUnitAlias('isoWeek', 'W');
// PRIORITIES
addUnitPriority('week', 5);
addUnitPriority('isoWeek', 5);
// PARSING
addRegexToken('w', match1to2);
addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2);
addRegexToken('WW', match1to2, match2);
addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
week[token.substr(0, 1)] = toInt(input);
});
// HELPERS
// LOCALES
function localeWeek (mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
};
function localeFirstDayOfWeek () {
return this._week.dow;
}
function localeFirstDayOfYear () {
return this._week.doy;
}
// MOMENTS
function getSetWeek (input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, 'd');
}
function getSetISOWeek (input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, 'd');
}
// FORMATTING
addFormatToken('d', 0, 'do', 'day');
addFormatToken('dd', 0, 0, function (format) {
return this.localeData().weekdaysMin(this, format);
});
addFormatToken('ddd', 0, 0, function (format) {
return this.localeData().weekdaysShort(this, format);
});
addFormatToken('dddd', 0, 0, function (format) {
return this.localeData().weekdays(this, format);
});
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
// ALIASES
addUnitAlias('day', 'd');
addUnitAlias('weekday', 'e');
addUnitAlias('isoWeekday', 'E');
// PRIORITY
addUnitPriority('day', 11);
addUnitPriority('weekday', 11);
addUnitPriority('isoWeekday', 11);
// PARSING
addRegexToken('d', match1to2);
addRegexToken('e', match1to2);
addRegexToken('E', match1to2);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict);
// if we didn't get a weekday name, mark the date as invalid
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
week[token] = toInt(input);
});
// HELPERS
function parseWeekday(input, locale) {
if (typeof input !== 'string') {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale.weekdaysParse(input);
if (typeof input === 'number') {
return input;
}
return null;
}
function parseIsoWeekday(input, locale) {
if (typeof input === 'string') {
return locale.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
// LOCALES
var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
function localeWeekdays (m, format) {
if (!m) {
return isArray(this._weekdays) ? this._weekdays :
this._weekdays['standalone'];
}
return isArray(this._weekdays) ? this._weekdays[m.day()] :
this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
}
var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
function localeWeekdaysShort (m) {
return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
}
var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
function localeWeekdaysMin (m) {
return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse (weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
}
if (!this._weekdaysParse[i]) {
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
// MOMENTS
function getSetDayOfWeek (input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
} else {
return day;
}
}
function getSetLocaleDayOfWeek (input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, 'd');
}
function getSetISODayOfWeek (input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
var defaultWeekdaysRegex = matchWord;
function weekdaysRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysRegex')) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict ?
this._weekdaysStrictRegex : this._weekdaysRegex;
}
}
var defaultWeekdaysShortRegex = matchWord;
function weekdaysShortRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict ?
this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
}
}
var defaultWeekdaysMinRegex = matchWord;
function weekdaysMinRegex (isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict ?
this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
}
}
function computeWeekdaysParse () {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
i, mom, minp, shortp, longp;
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
minp = this.weekdaysMin(mom, '');
shortp = this.weekdaysShort(mom, '');
longp = this.weekdays(mom, '');
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
for (i = 0; i < 7; i++) {
shortPieces[i] = regexEscape(shortPieces[i]);
longPieces[i] = regexEscape(longPieces[i]);
mixedPieces[i] = regexEscape(mixedPieces[i]);
}
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
}
// FORMATTING
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken('hmmss', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2);
});
addFormatToken('Hmm', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken('Hmmss', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2);
});
function meridiem (token, lowercase) {
addFormatToken(token, 0, 0, function () {
return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
});
}
meridiem('a', true);
meridiem('A', false);
// ALIASES
addUnitAlias('hour', 'h');
// PRIORITY
addUnitPriority('hour', 13);
// PARSING
function matchMeridiem (isStrict, locale) {
return locale._meridiemParse;
}
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2);
addRegexToken('h', match1to2);
addRegexToken('k', match1to2);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
addRegexToken('hmm', match3to4);
addRegexToken('hmmss', match5to6);
addRegexToken('Hmm', match3to4);
addRegexToken('Hmmss', match5to6);
addParseToken(['H', 'HH'], HOUR);
addParseToken(['k', 'kk'], function (input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(['a', 'A'], function (input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken('hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken('hmmss', function (input, array, config) {
var pos1 = input.length - 4;
var pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken('Hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken('Hmmss', function (input, array, config) {
var pos1 = input.length - 4;
var pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
// LOCALES
function localeIsPM (input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return ((input + '').toLowerCase().charAt(0) === 'p');
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
function localeMeridiem (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
}
// MOMENTS
// Setting the hour should keep the time, because the user explicitly
// specified which hour he wants. So trying to maintain the same hour (in
// a new timezone) makes sense. Adding/subtracting hours does not follow
// this rule.
var getSetHour = makeGetSet('Hours', true);
// months
// week
// weekdays
// meridiem
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse
};
// internal storage for locale config files
var locales = {};
var localeFamilies = {};
var globalLocale;
function normalizeLocale(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) {
var i = 0, j, next, locale, split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
locale = loadLocale(split.slice(0, j).join('-'));
if (locale) {
return locale;
}
if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return null;
}
function loadLocale(name) {
var oldLocale = null;
// TODO: Find a better way to register and load all the locales in Node
if (!locales[name] && (typeof module !== 'undefined') &&
module && module.exports) {
try {
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
__webpack_require__(342)("./" + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
return locales[name];
}
// This function will load locale and then set the global locale. If
// no arguments are passed in, it will simply return the current global
// locale key.
function getSetGlobalLocale (key, values) {
var data;
if (key) {
if (isUndefined(values)) {
data = getLocale(key);
}
else {
data = defineLocale(key, values);
}
if (data) {
// moment.duration._locale = moment._locale = data;
globalLocale = data;
}
}
return globalLocale._abbr;
}
function defineLocale (name, config) {
if (config !== null) {
var parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple('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.');
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name: name,
config: config
});
return null;
}
}
locales[name] = new Locale(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function (x) {
defineLocale(x.name, x.config);
});
}
// backwards compat for now: also set the locale
// make sure we set the locale AFTER all child locales have been
// created, so we won't end up with the child locale set.
getSetGlobalLocale(name);
return locales[name];
} else {
// useful for testing
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale, tmpLocale, parentConfig = baseConfig;
// MERGE
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
locale = new Locale(config);
locale.parentLocale = locales[name];
locales[name] = locale;
// backwards compat for now: also set the locale
getSetGlobalLocale(name);
} else {
// pass null for config to unupdate, useful for tests
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
// returns locale data
function getLocale (key) {
var locale;
if (key && key._locale && key._locale._abbr) {
key = key._locale._abbr;
}
if (!key) {
return globalLocale;
}
if (!isArray(key)) {
//short-circuit everything else
locale = loadLocale(key);
if (locale) {
return locale;
}
key = [key];
}
return chooseLocale(key);
}
function listLocales() {
return keys(locales);
}
function checkOverflow (m) {
var overflow;
var a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
-1;
if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
// Pick the first defined of two or three arguments.
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
// hooks is actually the exported moment object
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function configFromArray (config) {
var i, date, input = [], currentDate, expectedWeekday, yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
}
// Check for 24:00:00.000
if (config._a[HOUR] === 24 &&
config._a[MINUTE] === 0 &&
config._a[SECOND] === 0 &&
config._a[MILLISECOND] === 0) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
// check for mismatching day of week
if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
// TODO: We need to take the current isoWeekYear, but that depends on
// how we interpret now (local, utc, fixed offset). So create
// a now version of current config (take local/utc/offset flags, and
// create now).
weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
var curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
// Default to current week.
week = defaults(w.w, curWeek.week);
if (w.d != null) {
// weekday -- low day numbers are considered next week
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
// local weekday -- counting starts from begining of week
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
// default to begining of week
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
var extendedIsoRegex = /^\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)?)?$/;
var basicIsoRegex = /^\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)?)?$/;
var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
var isoDates = [
['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/, false],
['YYYY-DDD', /\d{4}-\d{3}/],
['YYYY-MM', /\d{4}-\d\d/, false],
['YYYYYYMMDD', /[+-]\d{10}/],
['YYYYMMDD', /\d{8}/],
// YYYYMM is NOT allowed by the standard
['GGGG[W]WWE', /\d{4}W\d{3}/],
['GGGG[W]WW', /\d{4}W\d{2}/, false],
['YYYYDDD', /\d{7}/]
];
// iso time formats and regexes
var isoTimes = [
['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/]
];
var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
// date from iso format
function configFromISO(config) {
var i, l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime, dateFormat, timeFormat, tzFormat;
if (match) {
getParsingFlags(config).iso = true;
for (i = 0, l = isoDates.length; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match[3]) {
for (i = 0, l = isoTimes.length; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
// match[2] should be 'T' or space
timeFormat = (match[2] || ' ') + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match[4]) {
if (tzRegex.exec(match[4])) {
tzFormat = 'Z';
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
var result = [
untruncateYear(yearStr),
defaultLocaleMonthsShort.indexOf(monthStr),
parseInt(dayStr, 10),
parseInt(hourStr, 10),
parseInt(minuteStr, 10)
];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2000 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
// TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
var obsOffsets = {
UT: 0,
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60
};
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets[obsOffset];
} else if (militaryOffset) {
// the only allowed military tz is Z
return 0;
} else {
var hm = parseInt(numOffset, 10);
var m = hm % 100, h = (hm - m) / 100;
return h * 60 + m;
}
}
// date and time from ref 2822 format
function configFromRFC2822(config) {
var match = rfc2822.exec(preprocessRFC2822(config._i));
if (match) {
var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
if (!checkWeekday(match[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match[8], match[9], match[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
// date from iso format or fallback
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
// Final attempt, use Input Fallback
hooks.createFromInputFallback(config);
}
hooks.createFromInputFallback = deprecate(
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
'discouraged and will be removed in an upcoming major release. Please refer to ' +
'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
);
// constant that refers to the ISO standard
hooks.ISO_8601 = function () {};
// constant that refers to the RFC 2822 form
hooks.RFC_2822 = function () {};
// date from string and format string
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var string = '' + config._i,
i, parsedInput, tokens, token, skipped,
stringLength = string.length,
totalParsedInputLength = 0;
tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
for (i = 0; i < tokens.length; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
// console.log('token', token, 'parsedInput', parsedInput,
// 'regex', getParseRegexForToken(token, config));
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
}
else {
getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
}
else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
if (config._a[HOUR] <= 12 &&
getParsingFlags(config).bigHour === true &&
config._a[HOUR] > 0) {
getParsingFlags(config).bigHour = undefined;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
// handle meridiem
config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap (locale, hour, meridiem) {
var isPm;
if (meridiem == null) {
// nothing to do
return hour;
}
if (locale.meridiemHour != null) {
return locale.meridiemHour(hour, meridiem);
} else if (locale.isPM != null) {
// Fallback
isPm = locale.isPM(meridiem);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
// this is not supposed to happen
return hour;
}
}
// date from string and array of format strings
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore;
if (config._f.length === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < config._f.length; i++) {
currentScore = 0;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (!isValid(tempConfig)) {
continue;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += getParsingFlags(tempConfig).charsLeftOver;
//or tokens
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (scoreToBeat == null || currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i);
config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
return obj && parseInt(obj, 10);
});
configFromArray(config);
}
function createFromConfig (config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
// Adding is smart enough around DST
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
}
function prepareConfig (config) {
var input = config._i,
format = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || (format === undefined && input === '')) {
return createInvalid({nullInput: true});
}
if (typeof input === 'string') {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate(input)) {
config._d = input;
} else if (isArray(format)) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined(input)) {
config._d = new Date(hooks.now());
} else if (isDate(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function (obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber(input)) {
// from milliseconds
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC (input, format, locale, strict, isUTC) {
var c = {};
if (locale === true || locale === false) {
strict = locale;
locale = undefined;
}
if ((isObject(input) && isObjectEmpty(input)) ||
(isArray(input) && input.length === 0)) {
input = undefined;
}
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale;
c._i = input;
c._f = format;
c._strict = strict;
return createFromConfig(c);
}
function createLocal (input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, false);
}
var prototypeMin = deprecate(
'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}
);
var prototypeMax = deprecate(
'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
}
);
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
// TODO: Use [].sort instead?
function min () {
var args = [].slice.call(arguments, 0);
return pickBy('isBefore', args);
}
function max () {
var args = [].slice.call(arguments, 0);
return pickBy('isAfter', args);
}
var now = function () {
return Date.now ? Date.now() : +(new Date());
};
var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
function isDurationValid(m) {
for (var key in m) {
if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
return false;
}
}
var unitHasDecimal = false;
for (var i = 0; i < ordering.length; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false; // only allow non-integers for smallest unit
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration (duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
quarters = normalizedInput.quarter || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
// representation for dateAddRemove
this._milliseconds = +milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days +
weeks * 7;
// It is impossible to translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months +
quarters * 3 +
years * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration (obj) {
return obj instanceof Duration;
}
function absRound (number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
// FORMATTING
function offset (token, separator) {
addFormatToken(token, 0, 0, function () {
var offset = this.utcOffset();
var sign = '+';
if (offset < 0) {
offset = -offset;
sign = '-';
}
return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
});
}
offset('Z', ':');
offset('ZZ', '');
// PARSING
addRegexToken('Z', matchShortOffset);
addRegexToken('ZZ', matchShortOffset);
addParseToken(['Z', 'ZZ'], function (input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
// HELPERS
// timezone chunker
// '+10:00' > ['10', '00']
// '-1530' > ['-15', '30']
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || '').match(matcher);
if (matches === null) {
return null;
}
var chunk = matches[matches.length - 1] || [];
var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
var minutes = +(parts[1] * 60) + toInt(parts[2]);
return minutes === 0 ?
0 :
parts[0] === '+' ? minutes : -minutes;
}
// Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
// Use low-level api, because this fn is low-level api.
res._d.setTime(res._d.valueOf() + diff);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset (m) {
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
}
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
hooks.updateOffset = function () {};
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function getSetOffset (input, keepLocalTime, keepMinutes) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === 'string') {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, 'm');
}
if (offset !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(this, createDuration(input - offset, 'm'), 1, false);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset : getDateOffset(this);
}
}
function getSetZone (input, keepLocalTime) {
if (input != null) {
if (typeof input !== 'string') {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC (keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal (keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), 'm');
}
}
return this;
}
function setOffsetToParsedOffset () {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === 'string') {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
}
else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset (input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime () {
return (
this.utcOffset() > this.clone().month(0).utcOffset() ||
this.utcOffset() > this.clone().month(5).utcOffset()
);
}
function isDaylightSavingTimeShifted () {
if (!isUndefined(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {};
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted = this.isValid() &&
compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal () {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset () {
return this.isValid() ? this._isUTC : false;
}
function isUtc () {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
// ASP.NET json date format regex
var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day
var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration (input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
diffRes;
if (isDuration(input)) {
duration = {
ms : input._milliseconds,
d : input._days,
M : input._months
};
} else if (isNumber(input)) {
duration = {};
if (key) {
duration[key] = input;
} else {
duration.milliseconds = input;
}
} else if (!!(match = aspNetRegex.exec(input))) {
sign = (match[1] === '-') ? -1 : 1;
duration = {
y : 0,
d : toInt(match[DATE]) * sign,
h : toInt(match[HOUR]) * sign,
m : toInt(match[MINUTE]) * sign,
s : toInt(match[SECOND]) * sign,
ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
};
} else if (!!(match = isoRegex.exec(input))) {
sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
duration = {
y : parseIso(match[2], sign),
M : parseIso(match[3], sign),
w : parseIso(match[4], sign),
d : parseIso(match[5], sign),
h : parseIso(match[6], sign),
m : parseIso(match[7], sign),
s : parseIso(match[8], sign)
};
} else if (duration == null) {// checks for null or undefined
duration = {};
} else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration(duration);
if (isDuration(input) && hasOwnProp(input, '_locale')) {
ret._locale = input._locale;
}
return ret;
}
createDuration.fn = Duration.prototype;
createDuration.invalid = createInvalid$1;
function parseIso (inp, sign) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
var res = {milliseconds: 0, months: 0};
res.months = other.month() - base.month() +
(other.year() - base.year()) * 12;
if (base.clone().add(res.months, 'M').isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return {milliseconds: 0, months: 0};
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
// TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) {
return function (val, period) {
var dur, tmp;
//invert the arguments, but complain about it
if (period !== null && !isNaN(+period)) {
deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
tmp = val; val = period; period = tmp;
}
val = typeof val === 'string' ? +val : val;
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract (mom, duration, isAdding, updateOffset) {
var milliseconds = duration._milliseconds,
days = absRound(duration._days),
months = absRound(duration._months);
if (!mom.isValid()) {
// No op
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months) {
setMonth(mom, get(mom, 'Month') + months * isAdding);
}
if (days) {
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
}
if (milliseconds) {
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days || months);
}
}
var add = createAdder(1, 'add');
var subtract = createAdder(-1, 'subtract');
function getCalendarFormat(myMoment, now) {
var diff = myMoment.diff(now, 'days', true);
return diff < -6 ? 'sameElse' :
diff < -1 ? 'lastWeek' :
diff < 0 ? 'lastDay' :
diff < 1 ? 'sameDay' :
diff < 2 ? 'nextDay' :
diff < 7 ? 'nextWeek' : 'sameElse';
}
function calendar$1 (time, formats) {
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var now = time || createLocal(),
sod = cloneWithOffset(now, this).startOf('day'),
format = hooks.calendarFormat(this, sod) || 'sameElse';
var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
}
function clone () {
return new Moment(this);
}
function isAfter (input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
if (units === 'millisecond') {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore (input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
if (units === 'millisecond') {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween (from, to, units, inclusivity) {
inclusivity = inclusivity || '()';
return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
(inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
}
function isSame (input, units) {
var localInput = isMoment(input) ? input : createLocal(input),
inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units || 'millisecond');
if (units === 'millisecond') {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
}
}
function isSameOrAfter (input, units) {
return this.isSame(input, units) || this.isAfter(input,units);
}
function isSameOrBefore (input, units) {
return this.isSame(input, units) || this.isBefore(input,units);
}
function diff (input, units, asFloat) {
var that,
zoneDelta,
delta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case 'year': output = monthDiff(this, that) / 12; break;
case 'month': output = monthDiff(this, that); break;
case 'quarter': output = monthDiff(this, that) / 3; break;
case 'second': output = (this - that) / 1e3; break; // 1000
case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
default: output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff (a, b) {
// difference in months
var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
anchor = a.clone().add(wholeMonthDiff, 'months'),
anchor2, adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor2 - anchor);
}
//check for negative zero, return zero if negative zero
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString () {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true;
var m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ');
}
if (isFunction(Date.prototype.toISOString)) {
// native implementation is ~50x faster, use it when we can
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this._d.valueOf()).toISOString().replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ');
}
/**
* Return a human readable representation of a moment that can
* also be evaluated to get a new moment which is the same
*
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
*/
function inspect () {
if (!this.isValid()) {
return 'moment.invalid(/* ' + this._i + ' */)';
}
var func = 'moment';
var zone = '';
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
zone = 'Z';
}
var prefix = '[' + func + '("]';
var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
var datetime = '-MM-DD[T]HH:mm:ss.SSS';
var suffix = zone + '[")]';
return this.format(prefix + year + datetime + suffix);
}
function format (inputString) {
if (!inputString) {
inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from (time, withoutSuffix) {
if (this.isValid() &&
((isMoment(time) && time.isValid()) ||
createLocal(time).isValid())) {
return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow (withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to (time, withoutSuffix) {
if (this.isValid() &&
((isMoment(time) && time.isValid()) ||
createLocal(time).isValid())) {
return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow (withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
// If passed a locale key, it will set the locale for this
// instance. Otherwise, it will return the locale configuration
// variables for this instance.
function locale (key) {
var newLocaleData;
if (key === undefined) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate(
'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
function (key) {
if (key === undefined) {
return this.localeData();
} else {
return this.locale(key);
}
}
);
function localeData () {
return this._locale;
}
function startOf (units) {
units = normalizeUnits(units);
// the following switch intentionally omits break keywords
// to utilize falling through the cases.
switch (units) {
case 'year':
this.month(0);
/* falls through */
case 'quarter':
case 'month':
this.date(1);
/* falls through */
case 'week':
case 'isoWeek':
case 'day':
case 'date':
this.hours(0);
/* falls through */
case 'hour':
this.minutes(0);
/* falls through */
case 'minute':
this.seconds(0);
/* falls through */
case 'second':
this.milliseconds(0);
}
// weeks are a special case
if (units === 'week') {
this.weekday(0);
}
if (units === 'isoWeek') {
this.isoWeekday(1);
}
// quarters are also special
if (units === 'quarter') {
this.month(Math.floor(this.month() / 3) * 3);
}
return this;
}
function endOf (units) {
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond') {
return this;
}
// 'date' is an alias for 'day', so it should be considered as such.
if (units === 'date') {
units = 'day';
}
return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
}
function valueOf () {
return this._d.valueOf() - ((this._offset || 0) * 60000);
}
function unix () {
return Math.floor(this.valueOf() / 1000);
}
function toDate () {
return new Date(this.valueOf());
}
function toArray () {
var m = this;
return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
}
function toObject () {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds()
};
}
function toJSON () {
// new Date(NaN).toJSON() === null
return this.isValid() ? this.toISOString() : null;
}
function isValid$2 () {
return isValid(this);
}
function parsingFlags () {
return extend({}, getParsingFlags(this));
}
function invalidAt () {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict
};
}
// FORMATTING
addFormatToken(0, ['gg', 2], 0, function () {
return this.weekYear() % 100;
});
addFormatToken(0, ['GG', 2], 0, function () {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken (token, getter) {
addFormatToken(0, [token, token.length], 0, getter);
}
addWeekYearFormatToken('gggg', 'weekYear');
addWeekYearFormatToken('ggggg', 'weekYear');
addWeekYearFormatToken('GGGG', 'isoWeekYear');
addWeekYearFormatToken('GGGGG', 'isoWeekYear');
// ALIASES
addUnitAlias('weekYear', 'gg');
addUnitAlias('isoWeekYear', 'GG');
// PRIORITY
addUnitPriority('weekYear', 1);
addUnitPriority('isoWeekYear', 1);
// PARSING
addRegexToken('G', matchSigned);
addRegexToken('g', matchSigned);
addRegexToken('GG', match1to2, match2);
addRegexToken('gg', match1to2, match2);
addRegexToken('GGGG', match1to4, match4);
addRegexToken('gggg', match1to4, match4);
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
week[token.substr(0, 2)] = toInt(input);
});
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
});
// MOMENTS
function getSetWeekYear (input) {
return getSetWeekYearHelper.call(this,
input,
this.week(),
this.weekday(),
this.localeData()._week.dow,
this.localeData()._week.doy);
}
function getSetISOWeekYear (input) {
return getSetWeekYearHelper.call(this,
input, this.isoWeek(), this.isoWeekday(), 1, 4);
}
function getISOWeeksInYear () {
return weeksInYear(this.year(), 1, 4);
}
function getWeeksInYear () {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
// FORMATTING
addFormatToken('Q', 0, 'Qo', 'quarter');
// ALIASES
addUnitAlias('quarter', 'Q');
// PRIORITY
addUnitPriority('quarter', 7);
// PARSING
addRegexToken('Q', match1);
addParseToken('Q', function (input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
// MOMENTS
function getSetQuarter (input) {
return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
}
// FORMATTING
addFormatToken('D', ['DD', 2], 'Do', 'date');
// ALIASES
addUnitAlias('date', 'D');
// PRIOROITY
addUnitPriority('date', 9);
// PARSING
addRegexToken('D', match1to2);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release.
return isStrict ?
(locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
locale._dayOfMonthOrdinalParseLenient;
});
addParseToken(['D', 'DD'], DATE);
addParseToken('Do', function (input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
// MOMENTS
var getSetDayOfMonth = makeGetSet('Date', true);
// FORMATTING
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
// ALIASES
addUnitAlias('dayOfYear', 'DDD');
// PRIORITY
addUnitPriority('dayOfYear', 4);
// PARSING
addRegexToken('DDD', match1to3);
addRegexToken('DDDD', match3);
addParseToken(['DDD', 'DDDD'], function (input, array, config) {
config._dayOfYear = toInt(input);
});
// HELPERS
// MOMENTS
function getSetDayOfYear (input) {
var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
}
// FORMATTING
addFormatToken('m', ['mm', 2], 0, 'minute');
// ALIASES
addUnitAlias('minute', 'm');
// PRIORITY
addUnitPriority('minute', 14);
// PARSING
addRegexToken('m', match1to2);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
// MOMENTS
var getSetMinute = makeGetSet('Minutes', false);
// FORMATTING
addFormatToken('s', ['ss', 2], 0, 'second');
// ALIASES
addUnitAlias('second', 's');
// PRIORITY
addUnitPriority('second', 15);
// PARSING
addRegexToken('s', match1to2);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
// MOMENTS
var getSetSecond = makeGetSet('Seconds', false);
// FORMATTING
addFormatToken('S', 0, 0, function () {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ['SS', 2], 0, function () {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ['SSS', 3], 0, 'millisecond');
addFormatToken(0, ['SSSS', 4], 0, function () {
return this.millisecond() * 10;
});
addFormatToken(0, ['SSSSS', 5], 0, function () {
return this.millisecond() * 100;
});
addFormatToken(0, ['SSSSSS', 6], 0, function () {
return this.millisecond() * 1000;
});
addFormatToken(0, ['SSSSSSS', 7], 0, function () {
return this.millisecond() * 10000;
});
addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
return this.millisecond() * 100000;
});
addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
return this.millisecond() * 1000000;
});
// ALIASES
addUnitAlias('millisecond', 'ms');
// PRIORITY
addUnitPriority('millisecond', 16);
// PARSING
addRegexToken('S', match1to3, match1);
addRegexToken('SS', match1to3, match2);
addRegexToken('SSS', match1to3, match3);
var token;
for (token = 'SSSS'; token.length <= 9; token += 'S') {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(('0.' + input) * 1000);
}
for (token = 'S'; token.length <= 9; token += 'S') {
addParseToken(token, parseMs);
}
// MOMENTS
var getSetMillisecond = makeGetSet('Milliseconds', false);
// FORMATTING
addFormatToken('z', 0, 0, 'zoneAbbr');
addFormatToken('zz', 0, 0, 'zoneName');
// MOMENTS
function getZoneAbbr () {
return this._isUTC ? 'UTC' : '';
}
function getZoneName () {
return this._isUTC ? 'Coordinated Universal Time' : '';
}
var proto = Moment.prototype;
proto.add = add;
proto.calendar = calendar$1;
proto.clone = clone;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
// Year
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
// Week Year
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
// Quarter
proto.quarter = proto.quarters = getSetQuarter;
// Month
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
// Week
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.isoWeeksInYear = getISOWeeksInYear;
// Day
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
// Hour
proto.hour = proto.hours = getSetHour;
// Minute
proto.minute = proto.minutes = getSetMinute;
// Second
proto.second = proto.seconds = getSetSecond;
// Millisecond
proto.millisecond = proto.milliseconds = getSetMillisecond;
// Offset
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
// Timezone
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
// Deprecations
proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
function createUnix (input) {
return createLocal(input * 1000);
}
function createInZone () {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat (string) {
return string;
}
var proto$1 = Locale.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set;
// Month
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
// Week
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
// Day of Week
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
// Hours
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1 (format, index, field, setter) {
var locale = getLocale();
var utc = createUTC().set(setter, index);
return locale[field](utc, format);
}
function listMonthsImpl (format, index, field) {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
if (index != null) {
return get$1(format, index, field, 'month');
}
var i;
var out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format, i, field, 'month');
}
return out;
}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function listWeekdaysImpl (localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
}
var locale = getLocale(),
shift = localeSorted ? locale._week.dow : 0;
if (index != null) {
return get$1(format, (index + shift) % 7, field, 'day');
}
var i;
var out = [];
for (i = 0; i < 7; i++) {
out[i] = get$1(format, (i + shift) % 7, field, 'day');
}
return out;
}
function listMonths (format, index) {
return listMonthsImpl(format, index, 'months');
}
function listMonthsShort (format, index) {
return listMonthsImpl(format, index, 'monthsShort');
}
function listWeekdays (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
}
function listWeekdaysShort (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
}
function listWeekdaysMin (localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
}
getSetGlobalLocale('en', {
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal : function (number) {
var b = number % 10,
output = (toInt(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
// Side effect imports
hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
var mathAbs = Math.abs;
function abs () {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1 (duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
// supports only 2.0-style add(1, 's') or add(duration)
function add$1 (input, value) {
return addSubtract$1(this, input, value, 1);
}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function subtract$1 (input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil (number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble () {
var milliseconds = this._milliseconds;
var days = this._days;
var months = this._months;
var data = this._data;
var seconds, minutes, hours, years, monthsFromDays;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0))) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
}
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absFloor(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absFloor(seconds / 60);
data.minutes = minutes % 60;
hours = absFloor(minutes / 60);
data.hours = hours % 24;
days += absFloor(hours / 24);
// convert days to months
monthsFromDays = absFloor(daysToMonths(days));
months += monthsFromDays;
days -= absCeil(monthsToDays(monthsFromDays));
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
data.days = days;
data.months = months;
data.years = years;
return this;
}
function daysToMonths (days) {
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return days * 4800 / 146097;
}
function monthsToDays (months) {
// the reverse of daysToMonths
return months * 146097 / 4800;
}
function as (units) {
if (!this.isValid()) {
return NaN;
}
var days;
var months;
var milliseconds = this._milliseconds;
units = normalizeUnits(units);
if (units === 'month' || units === 'year') {
days = this._days + milliseconds / 864e5;
months = this._months + daysToMonths(days);
return units === 'month' ? months : months / 12;
} else {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case 'week' : return days / 7 + milliseconds / 6048e5;
case 'day' : return days + milliseconds / 864e5;
case 'hour' : return days * 24 + milliseconds / 36e5;
case 'minute' : return days * 1440 + milliseconds / 6e4;
case 'second' : return days * 86400 + milliseconds / 1000;
// Math.floor prevents floating point math errors here
case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
default: throw new Error('Unknown unit ' + units);
}
}
}
// TODO: Use this.as('ms')?
function valueOf$1 () {
if (!this.isValid()) {
return NaN;
}
return (
this._milliseconds +
this._days * 864e5 +
(this._months % 12) * 2592e6 +
toInt(this._months / 12) * 31536e6
);
}
function makeAs (alias) {
return function () {
return this.as(alias);
};
}
var asMilliseconds = makeAs('ms');
var asSeconds = makeAs('s');
var asMinutes = makeAs('m');
var asHours = makeAs('h');
var asDays = makeAs('d');
var asWeeks = makeAs('w');
var asMonths = makeAs('M');
var asYears = makeAs('y');
function clone$1 () {
return createDuration(this);
}
function get$2 (units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + 's']() : NaN;
}
function makeGetter(name) {
return function () {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter('milliseconds');
var seconds = makeGetter('seconds');
var minutes = makeGetter('minutes');
var hours = makeGetter('hours');
var days = makeGetter('days');
var months = makeGetter('months');
var years = makeGetter('years');
function weeks () {
return absFloor(this.days() / 7);
}
var round = Math.round;
var thresholds = {
ss: 44, // a few seconds to seconds
s : 45, // seconds to minute
m : 45, // minutes to hour
h : 22, // hours to day
d : 26, // days to month
M : 11 // months to year
};
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
var duration = createDuration(posNegDuration).abs();
var seconds = round(duration.as('s'));
var minutes = round(duration.as('m'));
var hours = round(duration.as('h'));
var days = round(duration.as('d'));
var months = round(duration.as('M'));
var years = round(duration.as('y'));
var a = seconds <= thresholds.ss && ['s', seconds] ||
seconds < thresholds.s && ['ss', seconds] ||
minutes <= 1 && ['m'] ||
minutes < thresholds.m && ['mm', minutes] ||
hours <= 1 && ['h'] ||
hours < thresholds.h && ['hh', hours] ||
days <= 1 && ['d'] ||
days < thresholds.d && ['dd', days] ||
months <= 1 && ['M'] ||
months < thresholds.M && ['MM', months] ||
years <= 1 && ['y'] || ['yy', years];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale;
return substituteTimeAgo.apply(null, a);
}
// This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding (roundingFunction) {
if (roundingFunction === undefined) {
return round;
}
if (typeof(roundingFunction) === 'function') {
round = roundingFunction;
return true;
}
return false;
}
// This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold (threshold, limit) {
if (thresholds[threshold] === undefined) {
return false;
}
if (limit === undefined) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === 's') {
thresholds.ss = limit - 1;
}
return true;
}
function humanize (withSuffix) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var locale = this.localeData();
var output = relativeTime$1(this, !withSuffix, locale);
if (withSuffix) {
output = locale.pastFuture(+this, output);
}
return locale.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return ((x > 0) - (x < 0)) || +x;
}
function toISOString$1() {
// for ISO strings we do not use the normal bubbling rules:
// * milliseconds bubble up until they become hours
// * days do not bubble at all
// * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds = abs$1(this._milliseconds) / 1000;
var days = abs$1(this._days);
var months = abs$1(this._months);
var minutes, hours, years;
// 3600 seconds -> 60 minutes -> 1 hour
minutes = absFloor(seconds / 60);
hours = absFloor(minutes / 60);
seconds %= 60;
minutes %= 60;
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
var Y = years;
var M = months;
var D = days;
var h = hours;
var m = minutes;
var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
var total = this.asSeconds();
if (!total) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
var totalSign = total < 0 ? '-' : '';
var ymSign = sign(this._months) !== sign(total) ? '-' : '';
var daysSign = sign(this._days) !== sign(total) ? '-' : '';
var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
return totalSign + 'P' +
(Y ? ymSign + Y + 'Y' : '') +
(M ? ymSign + M + 'M' : '') +
(D ? daysSign + D + 'D' : '') +
((h || m || s) ? 'T' : '') +
(h ? hmsSign + h + 'H' : '') +
(m ? hmsSign + m + 'M' : '') +
(s ? hmsSign + s + 'S' : '');
}
var proto$2 = Duration.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
// Deprecations
proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
proto$2.lang = lang;
// Side effect imports
// FORMATTING
addFormatToken('X', 0, 0, 'unix');
addFormatToken('x', 0, 0, 'valueOf');
// PARSING
addRegexToken('x', matchSigned);
addRegexToken('X', matchTimestamp);
addParseToken('X', function (input, array, config) {
config._d = new Date(parseFloat(input, 10) * 1000);
});
addParseToken('x', function (input, array, config) {
config._d = new Date(toInt(input));
});
// Side effect imports
hooks.version = '2.20.1';
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
// currently HTML5 input type only supports 24-hour formats
hooks.HTML5_FMT = {
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
DATE: 'YYYY-MM-DD', // <input type="date" />
TIME: 'HH:mm', // <input type="time" />
TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
WEEK: 'YYYY-[W]WW', // <input type="week" />
MONTH: 'YYYY-MM' // <input type="month" />
};
return hooks;
})));
/*** EXPORTS FROM exports-to-window-loader ***/
window['moment'] = __webpack_require__(40);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(341)(module)))
/***/ }),
/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.isFunction = isFunction;
exports.throttle = throttle;
exports.throttleAfterHits = throttleAfterHits;
exports.debounce = debounce;
exports.pipe = pipe;
exports.partial = partial;
exports.curry = curry;
exports.curryRight = curryRight;
var _array = __webpack_require__(2);
/**
* Checks if given variable is function.
*
* @param {*} func Variable to check.
* @returns {Boolean}
*/
function isFunction(func) {
return typeof func === 'function';
}
/**
* Creates throttle function that enforces a maximum number of times a function (`func`) can be called over time (`wait`).
*
* @param {Function} func Function to invoke.
* @param {Number} wait Delay in miliseconds.
* @returns {Function}
*/
function throttle(func) {
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
var lastCalled = 0;
var result = {
lastCallThrottled: true
};
var lastTimer = null;
function _throttle() {
var _this = this;
var args = arguments;
var stamp = Date.now();
var needCall = false;
result.lastCallThrottled = true;
if (!lastCalled) {
lastCalled = stamp;
needCall = true;
}
var remaining = wait - (stamp - lastCalled);
if (needCall) {
result.lastCallThrottled = false;
func.apply(this, args);
} else {
if (lastTimer) {
clearTimeout(lastTimer);
}
lastTimer = setTimeout(function () {
result.lastCallThrottled = false;
func.apply(_this, args);
lastCalled = 0;
lastTimer = void 0;
}, remaining);
}
return result;
}
return _throttle;
}
/**
* Creates throttle function that enforces a maximum number of times a function (`func`) can be called over
* time (`wait`) after specified hits.
*
* @param {Function} func Function to invoke.
* @param {Number} wait Delay in miliseconds.
* @param {Number} hits Number of hits after throttling will be applied.
* @returns {Function}
*/
function throttleAfterHits(func) {
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
var hits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
var funcThrottle = throttle(func, wait);
var remainHits = hits;
function _clearHits() {
remainHits = hits;
}
function _throttleAfterHits() {
if (remainHits) {
remainHits--;
return func.apply(this, arguments);
}
return funcThrottle.apply(this, arguments);
}
_throttleAfterHits.clearHits = _clearHits;
return _throttleAfterHits;
}
/**
* Creates debounce function that enforces a function (`func`) not be called again until a certain amount of time (`wait`)
* has passed without it being called.
*
* @param {Function} func Function to invoke.
* @param {Number} wait Delay in milliseconds.
* @returns {Function}
*/
function debounce(func) {
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
var lastTimer = null;
var result = void 0;
function _debounce() {
var _this2 = this;
var args = arguments;
if (lastTimer) {
clearTimeout(lastTimer);
}
lastTimer = setTimeout(function () {
result = func.apply(_this2, args);
}, wait);
return result;
}
return _debounce;
}
/**
* Creates the function that returns the result of calling the given functions. Result of the first function is passed to
* the second as an argument and so on. Only first function in the chain can handle multiple arguments.
*
* @param {Function} functions Functions to compose.
* @returns {Function}
*/
function pipe() {
for (var _len = arguments.length, functions = Array(_len), _key = 0; _key < _len; _key++) {
functions[_key] = arguments[_key];
}
var firstFunc = functions[0],
restFunc = functions.slice(1);
return function _pipe() {
return (0, _array.arrayReduce)(restFunc, function (acc, fn) {
return fn(acc);
}, firstFunc.apply(this, arguments));
};
}
/**
* Creates the function that returns the function with cached arguments.
*
* @param {Function} func Function to partialization.
* @param {Array} params Function arguments to cache.
* @returns {Function}
*/
function partial(func) {
for (var _len2 = arguments.length, params = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
params[_key2 - 1] = arguments[_key2];
}
return function _partial() {
for (var _len3 = arguments.length, restParams = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
restParams[_key3] = arguments[_key3];
}
return func.apply(this, params.concat(restParams));
};
}
/**
* Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched
* to the arguments defined in `func` then function will be invoked.
* Arguments are added to the stack in direction from the left to the right.
*
* @example
* ```
* var replace = curry(function(find, replace, string) {
* return string.replace(find, replace);
* });
*
* // returns function with bounded first argument
* var replace = replace('foo')
*
* // returns replaced string - all arguments was passed so function was invoked
* replace('bar', 'Some test with foo...');
*
* ```
*
* @param {Function} func Function to currying.
* @returns {Function}
*/
function curry(func) {
var argsLength = func.length;
function given(argsSoFar) {
return function _curry() {
for (var _len4 = arguments.length, params = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
params[_key4] = arguments[_key4];
}
var passedArgsSoFar = argsSoFar.concat(params);
var result = void 0;
if (passedArgsSoFar.length >= argsLength) {
result = func.apply(this, passedArgsSoFar);
} else {
result = given(passedArgsSoFar);
}
return result;
};
}
return given([]);
}
/**
* Creates the functions that returns the function with cached arguments. If count if passed arguments will be matched
* to the arguments defined in `func` then function will be invoked.
* Arguments are added to the stack in direction from the right to the left.
*
* @example
* ```
* var replace = curry(function(find, replace, string) {
* return string.replace(find, replace);
* });
*
* // returns function with bounded first argument
* var replace = replace('Some test with foo...')
*
* // returns replaced string - all arguments was passed so function was invoked
* replace('bar', 'foo');
*
* ```
*
* @param {Function} func Function to currying.
* @returns {Function}
*/
function curryRight(func) {
var argsLength = func.length;
function given(argsSoFar) {
return function _curry() {
for (var _len5 = arguments.length, params = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
params[_key5] = arguments[_key5];
}
var passedArgsSoFar = argsSoFar.concat(params.reverse());
var result = void 0;
if (passedArgsSoFar.length >= argsLength) {
result = func.apply(this, passedArgsSoFar);
} else {
result = given(passedArgsSoFar);
}
return result;
};
}
return given([]);
}
/***/ }),
/* 42 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/* 43 */
/***/ (function(module, exports) {
var core = module.exports = { version: '2.5.3' };
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
/***/ }),
/* 44 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(5);
module.exports = function (it, TYPE) {
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
return it;
};
/***/ }),
/* 45 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.31 Array.prototype[@@unscopables]
var UNSCOPABLES = __webpack_require__(10)('unscopables');
var ArrayProto = Array.prototype;
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(31)(ArrayProto, UNSCOPABLES, {});
module.exports = function (key) {
ArrayProto[UNSCOPABLES][key] = true;
};
/***/ }),
/* 46 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = staticRegister;
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var collection = exports.collection = new Map();
function staticRegister() {
var namespace = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'common';
if (!collection.has(namespace)) {
collection.set(namespace, new Map());
}
var subCollection = collection.get(namespace);
/**
* Register an item to the collection. If the item under the same was exist earlier then this item will be replaced with new one.
*
* @param {String} name Identification of the item.
* @param {*} item Item to save in the collection.
*/
function register(name, item) {
subCollection.set(name, item);
}
/**
* Retrieve the item from the collection.
*
* @param {String} name Identification of the item.
* @returns {*} Returns item which was saved in the collection.
*/
function getItem(name) {
return subCollection.get(name);
}
/**
* Check if item under specyfied name is exists.
*
* @param {String} name Identification of the item.
* @returns {Boolean} Returns `true` or `false` depends on if element exists in the collection.
*/
function hasItem(name) {
return subCollection.has(name);
}
/**
* Retrieve list of names registered from the collection.
*
* @returns {Array} Returns an array of strings with all names under which objects are stored.
*/
function getNames() {
return [].concat(_toConsumableArray(subCollection.keys()));
}
/**
* Retrieve all registered values from the collection.
*
* @returns {Array} Returns an array with all values stored in the collection.
*/
function getValues() {
return [].concat(_toConsumableArray(subCollection.values()));
}
return {
register: register,
getItem: getItem,
hasItem: hasItem,
getNames: getNames,
getValues: getValues
};
}
/***/ }),
/* 47 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.EditorState = undefined;
var _src = __webpack_require__(15);
var _mixed = __webpack_require__(17);
var EditorState = exports.EditorState = {
VIRGIN: 'STATE_VIRGIN', // before editing
EDITING: 'STATE_EDITING',
WAITING: 'STATE_WAITING', // waiting for async validation
FINISHED: 'STATE_FINISHED'
};
function BaseEditor(instance) {
this.instance = instance;
this.state = EditorState.VIRGIN;
this._opened = false;
this._fullEditMode = false;
this._closeCallback = null;
this.init();
}
BaseEditor.prototype._fireCallbacks = function (result) {
if (this._closeCallback) {
this._closeCallback(result);
this._closeCallback = null;
}
};
BaseEditor.prototype.init = function () {};
BaseEditor.prototype.getValue = function () {
throw Error('Editor getValue() method unimplemented');
};
BaseEditor.prototype.setValue = function (newValue) {
throw Error('Editor setValue() method unimplemented');
};
BaseEditor.prototype.open = function () {
throw Error('Editor open() method unimplemented');
};
BaseEditor.prototype.close = function () {
throw Error('Editor close() method unimplemented');
};
BaseEditor.prototype.prepare = function (row, col, prop, td, originalValue, cellProperties) {
this.TD = td;
this.row = row;
this.col = col;
this.prop = prop;
this.originalValue = originalValue;
this.cellProperties = cellProperties;
this.state = EditorState.VIRGIN;
};
BaseEditor.prototype.extend = function () {
var baseClass = this.constructor;
function Editor() {
baseClass.apply(this, arguments);
}
function inherit(Child, Parent) {
function Bridge() {}
Bridge.prototype = Parent.prototype;
Child.prototype = new Bridge();
Child.prototype.constructor = Child;
return Child;
}
return inherit(Editor, baseClass);
};
BaseEditor.prototype.saveValue = function (value, ctrlDown) {
var selection = void 0;
var tmp = void 0;
// if ctrl+enter and multiple cells selected, behave like Excel (finish editing and apply to all cells)
if (ctrlDown) {
selection = this.instance.getSelected();
if (selection[0] > selection[2]) {
tmp = selection[0];
selection[0] = selection[2];
selection[2] = tmp;
}
if (selection[1] > selection[3]) {
tmp = selection[1];
selection[1] = selection[3];
selection[3] = tmp;
}
} else {
selection = [this.row, this.col, null, null];
}
this.instance.populateFromArray(selection[0], selection[1], value, selection[2], selection[3], 'edit');
};
BaseEditor.prototype.beginEditing = function (newInitialValue, event) {
if (this.state !== EditorState.VIRGIN) {
return;
}
this.instance.view.scrollViewport(new _src.CellCoords(this.row, this.col));
this.instance.view.render();
this.state = EditorState.EDITING;
newInitialValue = typeof newInitialValue === 'string' ? newInitialValue : this.originalValue;
this.setValue((0, _mixed.stringify)(newInitialValue));
this.open(event);
this._opened = true;
this.focus();
// only rerender the selections (FillHandle should disappear when beginediting is triggered)
this.instance.view.render();
this.instance.runHooks('afterBeginEditing', this.row, this.col);
};
BaseEditor.prototype.finishEditing = function (restoreOriginalValue, ctrlDown, callback) {
var _this = this,
val;
if (callback) {
var previousCloseCallback = this._closeCallback;
this._closeCallback = function (result) {
if (previousCloseCallback) {
previousCloseCallback(result);
}
callback(result);
_this.instance.view.render();
};
}
if (this.isWaiting()) {
return;
}
if (this.state == EditorState.VIRGIN) {
this.instance._registerTimeout(setTimeout(function () {
_this._fireCallbacks(true);
}, 0));
return;
}
if (this.state == EditorState.EDITING) {
if (restoreOriginalValue) {
this.cancelChanges();
this.instance.view.render();
return;
}
var value = this.getValue();
if (this.instance.getSettings().trimWhitespace) {
// We trim only string values
val = [[typeof value === 'string' ? String.prototype.trim.call(value || '') : value]];
} else {
val = [[value]];
}
this.state = EditorState.WAITING;
this.saveValue(val, ctrlDown);
if (this.instance.getCellValidator(this.cellProperties)) {
this.instance.addHookOnce('postAfterValidate', function (result) {
_this.state = EditorState.FINISHED;
_this.discardEditor(result);
});
} else {
this.state = EditorState.FINISHED;
this.discardEditor(true);
}
}
};
BaseEditor.prototype.cancelChanges = function () {
this.state = EditorState.FINISHED;
this.discardEditor();
};
BaseEditor.prototype.discardEditor = function (result) {
if (this.state !== EditorState.FINISHED) {
return;
}
// validator was defined and failed
if (result === false && this.cellProperties.allowInvalid !== true) {
this.instance.selectCell(this.row, this.col);
this.focus();
this.state = EditorState.EDITING;
this._fireCallbacks(false);
} else {
this.close();
this._opened = false;
this._fullEditMode = false;
this.state = EditorState.VIRGIN;
this._fireCallbacks(true);
}
};
/**
* Switch editor into full edit mode. In this state navigation keys don't close editor. This mode is activated
* automatically after hit ENTER or F2 key on the cell or while editing cell press F2 key.
*/
BaseEditor.prototype.enableFullEditMode = function () {
this._fullEditMode = true;
};
/**
* Checks if editor is in full edit mode.
*
* @returns {Boolean}
*/
BaseEditor.prototype.isInFullEditMode = function () {
return this._fullEditMode;
};
BaseEditor.prototype.isOpened = function () {
return this._opened;
};
BaseEditor.prototype.isWaiting = function () {
return this.state === EditorState.WAITING;
};
BaseEditor.prototype.checkEditorSection = function () {
var totalRows = this.instance.countRows();
var section = '';
if (this.row < this.instance.getSettings().fixedRowsTop) {
if (this.col < this.instance.getSettings().fixedColumnsLeft) {
section = 'top-left-corner';
} else {
section = 'top';
}
} else if (this.instance.getSettings().fixedRowsBottom && this.row >= totalRows - this.instance.getSettings().fixedRowsBottom) {
if (this.col < this.instance.getSettings().fixedColumnsLeft) {
section = 'bottom-left-corner';
} else {
section = 'bottom';
}
} else if (this.col < this.instance.getSettings().fixedColumnsLeft) {
section = 'left';
}
return section;
};
exports.default = BaseEditor;
/***/ }),
/* 48 */
/***/ (function(module, exports) {
var id = 0;
var px = Math.random();
module.exports = function (key) {
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
/***/ }),
/* 49 */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/* 50 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/* 51 */
/***/ (function(module, exports, __webpack_require__) {
var def = __webpack_require__(19).f;
var has = __webpack_require__(27);
var TAG = __webpack_require__(10)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
};
/***/ }),
/* 52 */
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/* 53 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* CellCoords holds cell coordinates (row, column) and few method to validate them and
* retrieve as an array or an object
*
* @class CellCoords
*/
var CellCoords = function () {
/**
* @param {Number} row Row index
* @param {Number} col Column index
*/
function CellCoords(row, col) {
_classCallCheck(this, CellCoords);
if (typeof row !== 'undefined' && typeof col !== 'undefined') {
this.row = row;
this.col = col;
} else {
this.row = null;
this.col = null;
}
}
/**
* Checks if given set of coordinates is valid in context of a given Walkontable instance
*
* @param {Walkontable} wotInstance
* @returns {Boolean}
*/
_createClass(CellCoords, [{
key: 'isValid',
value: function isValid(wotInstance) {
// is it a valid cell index (0 or higher)
if (this.row < 0 || this.col < 0) {
return false;
}
// is selection within total rows and columns
if (this.row >= wotInstance.getSetting('totalRows') || this.col >= wotInstance.getSetting('totalColumns')) {
return false;
}
return true;
}
/**
* Checks if this cell coords are the same as cell coords given as a parameter
*
* @param {CellCoords} cellCoords
* @returns {Boolean}
*/
}, {
key: 'isEqual',
value: function isEqual(cellCoords) {
if (cellCoords === this) {
return true;
}
return this.row === cellCoords.row && this.col === cellCoords.col;
}
/**
* Checks if tested coordinates are positioned in south-east from this cell coords
*
* @param {Object} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isSouthEastOf',
value: function isSouthEastOf(testedCoords) {
return this.row >= testedCoords.row && this.col >= testedCoords.col;
}
/**
* Checks if tested coordinates are positioned in north-east from this cell coords
*
* @param {Object} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isNorthWestOf',
value: function isNorthWestOf(testedCoords) {
return this.row <= testedCoords.row && this.col <= testedCoords.col;
}
/**
* Checks if tested coordinates are positioned in south-west from this cell coords
*
* @param {Object} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isSouthWestOf',
value: function isSouthWestOf(testedCoords) {
return this.row >= testedCoords.row && this.col <= testedCoords.col;
}
/**
* Checks if tested coordinates are positioned in north-east from this cell coords
*
* @param {Object} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isNorthEastOf',
value: function isNorthEastOf(testedCoords) {
return this.row <= testedCoords.row && this.col >= testedCoords.col;
}
}]);
return CellCoords;
}();
exports.default = CellCoords;
/***/ }),
/* 54 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _autoResize = __webpack_require__(347);
var _autoResize2 = _interopRequireDefault(_autoResize);
var _baseEditor = __webpack_require__(47);
var _baseEditor2 = _interopRequireDefault(_baseEditor);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _unicode = __webpack_require__(20);
var _event = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var TextEditor = _baseEditor2.default.prototype.extend();
/**
* @private
* @editor TextEditor
* @class TextEditor
* @dependencies autoResize
*/
TextEditor.prototype.init = function () {
var that = this;
this.createElements();
this.eventManager = new _eventManager2.default(this);
this.bindEvents();
this.autoResize = (0, _autoResize2.default)();
this.instance.addHook('afterDestroy', function () {
that.destroy();
});
};
TextEditor.prototype.getValue = function () {
return this.TEXTAREA.value;
};
TextEditor.prototype.setValue = function (newValue) {
this.TEXTAREA.value = newValue;
};
var onBeforeKeyDown = function onBeforeKeyDown(event) {
var instance = this,
that = instance.getActiveEditor(),
ctrlDown;
// catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;
// Process only events that have been fired in the editor
if (event.target !== that.TEXTAREA || (0, _event.isImmediatePropagationStopped)(event)) {
return;
}
if (event.keyCode === 17 || event.keyCode === 224 || event.keyCode === 91 || event.keyCode === 93) {
// when CTRL or its equivalent is pressed and cell is edited, don't prepare selectable text in textarea
(0, _event.stopImmediatePropagation)(event);
return;
}
switch (event.keyCode) {
case _unicode.KEY_CODES.ARROW_RIGHT:
if (that.isInFullEditMode()) {
if (!that.isWaiting() && !that.allowKeyEventPropagation || !that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode)) {
(0, _event.stopImmediatePropagation)(event);
}
}
break;
case _unicode.KEY_CODES.ARROW_LEFT:
if (that.isInFullEditMode()) {
if (!that.isWaiting() && !that.allowKeyEventPropagation || !that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode)) {
(0, _event.stopImmediatePropagation)(event);
}
}
break;
case _unicode.KEY_CODES.ARROW_UP:
case _unicode.KEY_CODES.ARROW_DOWN:
if (that.isInFullEditMode()) {
if (!that.isWaiting() && !that.allowKeyEventPropagation || !that.isWaiting() && that.allowKeyEventPropagation && !that.allowKeyEventPropagation(event.keyCode)) {
(0, _event.stopImmediatePropagation)(event);
}
}
break;
case _unicode.KEY_CODES.ENTER:
var selected = that.instance.getSelected();
var isMultipleSelection = !(selected[0] === selected[2] && selected[1] === selected[3]);
if (ctrlDown && !isMultipleSelection || event.altKey) {
// if ctrl+enter or alt+enter, add new line
if (that.isOpened()) {
var caretPosition = (0, _element.getCaretPosition)(that.TEXTAREA),
value = that.getValue();
var newValue = value.slice(0, caretPosition) + '\n' + value.slice(caretPosition);
that.setValue(newValue);
(0, _element.setCaretPosition)(that.TEXTAREA, caretPosition + 1);
} else {
that.beginEditing(that.originalValue + '\n');
}
(0, _event.stopImmediatePropagation)(event);
}
event.preventDefault(); // don't add newline to field
break;
case _unicode.KEY_CODES.A:
case _unicode.KEY_CODES.X:
case _unicode.KEY_CODES.C:
case _unicode.KEY_CODES.V:
if (ctrlDown) {
(0, _event.stopImmediatePropagation)(event); // CTRL+A, CTRL+C, CTRL+V, CTRL+X should only work locally when cell is edited (not in table context)
}
break;
case _unicode.KEY_CODES.BACKSPACE:
case _unicode.KEY_CODES.DELETE:
case _unicode.KEY_CODES.HOME:
case _unicode.KEY_CODES.END:
(0, _event.stopImmediatePropagation)(event); // backspace, delete, home, end should only work locally when cell is edited (not in table context)
break;
default:
break;
}
if ([_unicode.KEY_CODES.ARROW_UP, _unicode.KEY_CODES.ARROW_RIGHT, _unicode.KEY_CODES.ARROW_DOWN, _unicode.KEY_CODES.ARROW_LEFT].indexOf(event.keyCode) === -1) {
that.autoResize.resize(String.fromCharCode(event.keyCode));
}
};
TextEditor.prototype.open = function () {
this.refreshDimensions(); // need it instantly, to prevent https://github.com/handsontable/handsontable/issues/348
this.instance.addHook('beforeKeyDown', onBeforeKeyDown);
};
TextEditor.prototype.close = function (tdOutside) {
this.textareaParentStyle.display = 'none';
this.autoResize.unObserve();
if (document.activeElement === this.TEXTAREA) {
this.instance.listen(); // don't refocus the table if user focused some cell outside of HT on purpose
}
this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);
};
TextEditor.prototype.focus = function () {
this.TEXTAREA.focus();
(0, _element.setCaretPosition)(this.TEXTAREA, this.TEXTAREA.value.length);
};
TextEditor.prototype.createElements = function () {
// this.$body = $(document.body);
this.TEXTAREA = document.createElement('TEXTAREA');
(0, _element.addClass)(this.TEXTAREA, 'handsontableInput');
this.textareaStyle = this.TEXTAREA.style;
this.textareaStyle.width = 0;
this.textareaStyle.height = 0;
this.TEXTAREA_PARENT = document.createElement('DIV');
(0, _element.addClass)(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 that = this;
this.instance._registerTimeout(setTimeout(function () {
that.refreshDimensions();
}, 0));
};
TextEditor.prototype.getEditedCell = function () {
var editorSection = this.checkEditorSection(),
editedCell;
switch (editorSection) {
case 'top':
editedCell = this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.textareaParentStyle.zIndex = 101;
break;
case 'top-left-corner':
editedCell = this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.textareaParentStyle.zIndex = 103;
break;
case 'bottom-left-corner':
editedCell = this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.textareaParentStyle.zIndex = 103;
break;
case 'left':
editedCell = this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.textareaParentStyle.zIndex = 102;
break;
case 'bottom':
editedCell = this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.textareaParentStyle.zIndex = 102;
break;
default:
editedCell = this.instance.getCell(this.row, this.col);
this.textareaParentStyle.zIndex = '';
break;
}
return editedCell != -1 && editedCell != -2 ? editedCell : void 0;
};
TextEditor.prototype.refreshValue = function () {
var sourceData = this.instance.getSourceDataAtCell(this.row, this.prop);
this.originalValue = sourceData;
this.setValue(sourceData);
this.refreshDimensions();
};
TextEditor.prototype.refreshDimensions = function () {
if (this.state !== _baseEditor.EditorState.EDITING) {
return;
}
this.TD = this.getEditedCell();
// TD is outside of the viewport.
if (!this.TD) {
this.close(true);
return;
}
var currentOffset = (0, _element.offset)(this.TD),
containerOffset = (0, _element.offset)(this.instance.rootElement),
scrollableContainer = (0, _element.getScrollableElement)(this.TD),
totalRowsCount = this.instance.countRows(),
// If colHeaders is disabled, cells in the first row have border-top
editTopModifier = currentOffset.top === containerOffset.top ? 0 : 1,
editTop = currentOffset.top - containerOffset.top - editTopModifier - (scrollableContainer.scrollTop || 0),
editLeft = currentOffset.left - containerOffset.left - 1 - (scrollableContainer.scrollLeft || 0),
settings = this.instance.getSettings(),
rowHeadersCount = this.instance.hasRowHeaders(),
colHeadersCount = this.instance.hasColHeaders(),
editorSection = this.checkEditorSection(),
backgroundColor = this.TD.style.backgroundColor,
cssTransformOffset;
// TODO: Refactor this to the new instance.getCell method (from #ply-59), after 0.12.1 is released
switch (editorSection) {
case 'top':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);
break;
case 'left':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);
break;
case 'top-left-corner':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);
break;
case 'bottom-left-corner':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);
break;
case 'bottom':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);
break;
default:
break;
}
if (colHeadersCount && this.instance.getSelected()[0] === 0 || settings.fixedRowsBottom && this.instance.getSelected()[0] === totalRowsCount - settings.fixedRowsBottom) {
editTop += 1;
}
if (this.instance.getSelected()[1] === 0) {
editLeft += 1;
}
if (cssTransformOffset && cssTransformOffset != -1) {
this.textareaParentStyle[cssTransformOffset[0]] = cssTransformOffset[1];
} else {
(0, _element.resetCssTransform)(this.TEXTAREA_PARENT);
}
this.textareaParentStyle.top = editTop + 'px';
this.textareaParentStyle.left = editLeft + 'px';
var firstRowOffset = this.instance.view.wt.wtViewport.rowsRenderCalculator.startPosition;
var firstColumnOffset = this.instance.view.wt.wtViewport.columnsRenderCalculator.startPosition;
var horizontalScrollPosition = this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition();
var verticalScrollPosition = this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition();
var scrollbarWidth = (0, _element.getScrollbarWidth)();
var cellTopOffset = this.TD.offsetTop + firstRowOffset - verticalScrollPosition;
var cellLeftOffset = this.TD.offsetLeft + firstColumnOffset - horizontalScrollPosition;
var width = (0, _element.innerWidth)(this.TD) - 8;
var actualVerticalScrollbarWidth = (0, _element.hasVerticalScrollbar)(scrollableContainer) ? scrollbarWidth : 0;
var actualHorizontalScrollbarWidth = (0, _element.hasHorizontalScrollbar)(scrollableContainer) ? scrollbarWidth : 0;
var maxWidth = this.instance.view.maximumVisibleElementWidth(cellLeftOffset) - 9 - actualVerticalScrollbarWidth;
var height = this.TD.scrollHeight + 1;
var maxHeight = Math.max(this.instance.view.maximumVisibleElementHeight(cellTopOffset) - actualHorizontalScrollbarWidth, 23);
var cellComputedStyle = (0, _element.getComputedStyle)(this.TD);
this.TEXTAREA.style.fontSize = cellComputedStyle.fontSize;
this.TEXTAREA.style.fontFamily = cellComputedStyle.fontFamily;
this.TEXTAREA.style.backgroundColor = ''; // RESET STYLE
this.TEXTAREA.style.backgroundColor = backgroundColor ? backgroundColor : (0, _element.getComputedStyle)(this.TEXTAREA).backgroundColor;
this.autoResize.init(this.TEXTAREA, {
minHeight: Math.min(height, maxHeight),
maxHeight: maxHeight, // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
minWidth: Math.min(width, maxWidth),
maxWidth: maxWidth // TEXTAREA should never be wider than visible part of the viewport (should not cover the scrollbar)
}, true);
this.textareaParentStyle.display = 'block';
};
TextEditor.prototype.bindEvents = function () {
var editor = this;
this.eventManager.addEventListener(this.TEXTAREA, 'cut', function (event) {
(0, _event.stopPropagation)(event);
});
this.eventManager.addEventListener(this.TEXTAREA, 'paste', function (event) {
(0, _event.stopPropagation)(event);
});
this.instance.addHook('afterScrollHorizontally', function () {
editor.refreshDimensions();
});
this.instance.addHook('afterScrollVertically', function () {
editor.refreshDimensions();
});
this.instance.addHook('afterColumnResize', function () {
editor.refreshDimensions();
editor.focus();
});
this.instance.addHook('afterRowResize', function () {
editor.refreshDimensions();
editor.focus();
});
this.instance.addHook('afterDestroy', function () {
editor.eventManager.destroy();
});
};
TextEditor.prototype.destroy = function () {
this.eventManager.destroy();
};
exports.default = TextEditor;
/***/ }),
/* 55 */
/***/ (function(module, exports) {
// 7.1.4 ToInteger
var ceil = Math.ceil;
var floor = Math.floor;
module.exports = function (it) {
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
/***/ }),
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(55);
var max = Math.max;
var min = Math.min;
module.exports = function (index, length) {
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(30);
module.exports = function (target, src, safe) {
for (var key in src) redefine(target, key, src[key], safe);
return target;
};
/***/ }),
/* 58 */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/* 59 */
/***/ (function(module, exports) {
module.exports = function (it, Constructor, name, forbiddenField) {
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
throw TypeError(name + ': incorrect invocation!');
} return it;
};
/***/ }),
/* 60 */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(32);
var call = __webpack_require__(97);
var isArrayIter = __webpack_require__(98);
var anObject = __webpack_require__(18);
var toLength = __webpack_require__(25);
var getIterFn = __webpack_require__(99);
var BREAK = {};
var RETURN = {};
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
var f = ctx(fn, that, entries ? 2 : 1);
var index = 0;
var length, step, iterator, result;
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
if (result === BREAK || result === RETURN) return result;
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
result = call(iterator, f, step.value, entries);
if (result === BREAK || result === RETURN) return result;
}
};
exports.BREAK = BREAK;
exports.RETURN = RETURN;
/***/ }),
/* 61 */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/* 62 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(13);
var $export = __webpack_require__(3);
var redefine = __webpack_require__(30);
var redefineAll = __webpack_require__(57);
var meta = __webpack_require__(34);
var forOf = __webpack_require__(60);
var anInstance = __webpack_require__(59);
var isObject = __webpack_require__(5);
var fails = __webpack_require__(23);
var $iterDetect = __webpack_require__(75);
var setToStringTag = __webpack_require__(51);
var inheritIfRequired = __webpack_require__(321);
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
var Base = global[NAME];
var C = Base;
var ADDER = IS_MAP ? 'set' : 'add';
var proto = C && C.prototype;
var O = {};
var fixMethod = function (KEY) {
var fn = proto[KEY];
redefine(proto, KEY,
KEY == 'delete' ? function (a) {
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'has' ? function has(a) {
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'get' ? function get(a) {
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
} : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
: function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
);
};
if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
new C().entries().next();
}))) {
// create collection constructor
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
redefineAll(C.prototype, methods);
meta.NEED = true;
} else {
var instance = new C();
// early implementations not supports chaining
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
// most early implementations doesn't supports iterables, most modern - not close it correctly
var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
// for early implementations -0 and +0 not the same
var BUGGY_ZERO = !IS_WEAK && fails(function () {
// V8 ~ Chromium 42- fails only with 5+ elements
var $instance = new C();
var index = 5;
while (index--) $instance[ADDER](index, index);
return !$instance.has(-0);
});
if (!ACCEPT_ITERABLES) {
C = wrapper(function (target, iterable) {
anInstance(target, C, NAME);
var that = inheritIfRequired(new Base(), target, C);
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
return that;
});
C.prototype = proto;
proto.constructor = C;
}
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
// weak collections should not contains .clear method
if (IS_WEAK && proto.clear) delete proto.clear;
}
setToStringTag(C, NAME);
O[NAME] = C;
$export($export.G + $export.W + $export.F * (C != Base), O);
if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
return C;
};
/***/ }),
/* 63 */
/***/ (function(module, exports, __webpack_require__) {
var pIE = __webpack_require__(52);
var createDesc = __webpack_require__(49);
var toIObject = __webpack_require__(24);
var toPrimitive = __webpack_require__(69);
var has = __webpack_require__(27);
var IE8_DOM_DEFINE = __webpack_require__(93);
var gOPD = Object.getOwnPropertyDescriptor;
exports.f = __webpack_require__(22) ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return gOPD(O, P);
} catch (e) { /* empty */ }
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
};
/***/ }),
/* 64 */
/***/ (function(module, exports, __webpack_require__) {
// 0 -> Array#forEach
// 1 -> Array#map
// 2 -> Array#filter
// 3 -> Array#some
// 4 -> Array#every
// 5 -> Array#find
// 6 -> Array#findIndex
var ctx = __webpack_require__(32);
var IObject = __webpack_require__(71);
var toObject = __webpack_require__(33);
var toLength = __webpack_require__(25);
var asc = __webpack_require__(322);
module.exports = function (TYPE, $create) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
var create = $create || asc;
return function ($this, callbackfn, that) {
var O = toObject($this);
var self = IObject(O);
var f = ctx(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var val, res;
for (;length > index; index++) if (NO_HOLES || index in self) {
val = self[index];
res = f(val, index, O);
if (TYPE) {
if (IS_MAP) result[index] = res; // map
else if (res) switch (TYPE) {
case 3: return true; // some
case 5: return val; // find
case 6: return index; // findIndex
case 2: result.push(val); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
};
};
/***/ }),
/* 65 */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/* 66 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var hide = __webpack_require__(31);
var redefine = __webpack_require__(30);
var fails = __webpack_require__(23);
var defined = __webpack_require__(38);
var wks = __webpack_require__(10);
module.exports = function (KEY, length, exec) {
var SYMBOL = wks(KEY);
var fns = exec(defined, SYMBOL, ''[KEY]);
var strfn = fns[0];
var rxfn = fns[1];
if (fails(function () {
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
})) {
redefine(String.prototype, KEY, strfn);
hide(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return rxfn.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return rxfn.call(string, this); }
);
}
};
/***/ }),
/* 67 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.DEFAULT_LANGUAGE_CODE = exports.getLanguagesDictionaries = exports.getDefaultLanguageDictionary = exports.hasLanguageDictionary = exports.getLanguageDictionary = exports.registerLanguageDictionary = undefined;
var _object = __webpack_require__(1);
var _utils = __webpack_require__(312);
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _enUS = __webpack_require__(384);
var _enUS2 = _interopRequireDefault(_enUS);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var DEFAULT_LANGUAGE_CODE = _enUS2.default.languageCode;
var _staticRegister = (0, _staticRegister3.default)('languagesDictionaries'),
registerGloballyLanguageDictionary = _staticRegister.register,
getGlobalLanguageDictionary = _staticRegister.getItem,
hasGlobalLanguageDictionary = _staticRegister.hasItem,
getGlobalLanguagesDictionaries = _staticRegister.getValues;
/**
* Register language dictionary for specific language code.
*
* @param {String|Object} languageCodeOrDictionary Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE' or object representing dictionary.
* @param {Object} dictionary Dictionary for specific language (optional if first parameter has already dictionary).
*/
function registerLanguage(languageCodeOrDictionary, dictionary) {
var languageCode = languageCodeOrDictionary;
// Dictionary passed as first argument.
if ((0, _object.isObject)(languageCodeOrDictionary)) {
dictionary = languageCodeOrDictionary;
languageCode = dictionary.languageCode;
}
extendLanguageDictionary(languageCode, dictionary);
registerGloballyLanguageDictionary(languageCode, (0, _object.deepClone)(dictionary));
// We do not allow user to work with dictionary by reference, it can cause lot of bugs.
return (0, _object.deepClone)(dictionary);
};
/**
* Get language dictionary for specific language code.
*
* @param {String} languageCode Language code.
* @returns {Object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).
*/
function getLanguage(languageCode) {
if (!hasLanguage(languageCode)) {
return null;
}
return (0, _object.deepClone)(getGlobalLanguageDictionary(languageCode));
}
/**
*
* Get if language with specified language code was registered.
*
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.
* @returns {Boolean}
*/
function hasLanguage(languageCode) {
return hasGlobalLanguageDictionary(languageCode);
}
/**
* Get default language dictionary.
*
* @returns {Object} Object with constants representing identifiers for translation (as keys) and corresponding translation phrases (as values).
*/
function getDefaultLanguage() {
return _enUS2.default;
}
/**
* Extend handled dictionary by default language dictionary. As result, if any dictionary key isn't defined for specific language, it will be filled with default language value ("dictionary gaps" are supplemented).
*
* @private
* @param {String} languageCode Language code.
* @param {Object} dictionary Dictionary which is extended.
*/
function extendLanguageDictionary(languageCode, dictionary) {
if (languageCode !== DEFAULT_LANGUAGE_CODE) {
(0, _utils.extendNotExistingKeys)(dictionary, getGlobalLanguageDictionary(DEFAULT_LANGUAGE_CODE));
}
}
/**
* Get registered language dictionaries.
*
* @returns {Array}
*/
function getLanguages() {
return getGlobalLanguagesDictionaries();
}
exports.registerLanguageDictionary = registerLanguage;
exports.getLanguageDictionary = getLanguage;
exports.hasLanguageDictionary = hasLanguage;
exports.getDefaultLanguageDictionary = getDefaultLanguage;
exports.getLanguagesDictionaries = getLanguages;
exports.DEFAULT_LANGUAGE_CODE = DEFAULT_LANGUAGE_CODE;
/**
* Automatically registers default dictionary.
*/
registerLanguage(_enUS2.default);
/***/ }),
/* 68 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(5);
var document = __webpack_require__(13).document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/* 69 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(5);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (it, S) {
if (!isObject(it)) return it;
var fn, val;
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/* 70 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
var anObject = __webpack_require__(18);
var dPs = __webpack_require__(319);
var enumBugKeys = __webpack_require__(74);
var IE_PROTO = __webpack_require__(72)('IE_PROTO');
var Empty = function () { /* empty */ };
var PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var createDict = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = __webpack_require__(68)('iframe');
var i = enumBugKeys.length;
var lt = '<';
var gt = '>';
var iframeDocument;
iframe.style.display = 'none';
__webpack_require__(96).appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
result = new Empty();
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = createDict();
return Properties === undefined ? result : dPs(result, Properties);
};
/***/ }),
/* 71 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(42);
// eslint-disable-next-line no-prototype-builtins
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
return cof(it) == 'String' ? it.split('') : Object(it);
};
/***/ }),
/* 72 */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(73)('keys');
var uid = __webpack_require__(48);
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/* 73 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var SHARED = '__core-js_shared__';
var store = global[SHARED] || (global[SHARED] = {});
module.exports = function (key) {
return store[key] || (store[key] = {});
};
/***/ }),
/* 74 */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
/***/ }),
/* 75 */
/***/ (function(module, exports, __webpack_require__) {
var ITERATOR = __webpack_require__(10)('iterator');
var SAFE_CLOSING = false;
try {
var riter = [7][ITERATOR]();
riter['return'] = function () { SAFE_CLOSING = true; };
// eslint-disable-next-line no-throw-literal
Array.from(riter, function () { throw 2; });
} catch (e) { /* empty */ }
module.exports = function (exec, skipClosing) {
if (!skipClosing && !SAFE_CLOSING) return false;
var safe = false;
try {
var arr = [7];
var iter = arr[ITERATOR]();
iter.next = function () { return { done: safe = true }; };
arr[ITERATOR] = function () { return iter; };
exec(arr);
} catch (e) { /* empty */ }
return safe;
};
/***/ }),
/* 76 */
/***/ (function(module, exports, __webpack_require__) {
var ctx = __webpack_require__(32);
var invoke = __webpack_require__(325);
var html = __webpack_require__(96);
var cel = __webpack_require__(68);
var global = __webpack_require__(13);
var process = global.process;
var setTask = global.setImmediate;
var clearTask = global.clearImmediate;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function () {
var id = +this;
// eslint-disable-next-line no-prototype-builtins
if (queue.hasOwnProperty(id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var listener = function (event) {
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!setTask || !clearTask) {
setTask = function setImmediate(fn) {
var args = [];
var i = 1;
while (arguments.length > i) args.push(arguments[i++]);
queue[++counter] = function () {
// eslint-disable-next-line no-new-func
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
clearTask = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (__webpack_require__(42)(process) == 'process') {
defer = function (id) {
process.nextTick(ctx(run, id, 1));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(ctx(run, id, 1));
};
// Browsers with MessageChannel, includes WebWorkers
} else if (MessageChannel) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = listener;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
defer = function (id) {
global.postMessage(id + '', '*');
};
global.addEventListener('message', listener, false);
// IE8-
} else if (ONREADYSTATECHANGE in cel('script')) {
defer = function (id) {
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
set: setTask,
clear: clearTask
};
/***/ }),
/* 77 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
var $keys = __webpack_require__(94);
var hiddenKeys = __webpack_require__(74).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
};
/***/ }),
/* 78 */
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__(137);
var defined = __webpack_require__(38);
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
var MATCH = __webpack_require__(10)('match');
module.exports = function (KEY) {
var re = /./;
try {
'/./'[KEY](re);
} catch (e) {
try {
re[MATCH] = false;
return !'/./'[KEY](re);
} catch (f) { /* empty */ }
} return true;
};
/***/ }),
/* 80 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(19);
var createDesc = __webpack_require__(49);
module.exports = function (object, index, value) {
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
else object[index] = value;
};
/***/ }),
/* 81 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var addToUnscopables = __webpack_require__(45);
var step = __webpack_require__(103);
var Iterators = __webpack_require__(50);
var toIObject = __webpack_require__(24);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
module.exports = __webpack_require__(101)(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
}, function () {
var O = this._t;
var kind = this._k;
var index = this._i++;
if (!O || index >= O.length) {
this._t = undefined;
return step(1);
}
if (kind == 'keys') return step(0, index);
if (kind == 'values') return step(0, O[index]);
return step(0, [index, O[index]]);
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
Iterators.Arguments = Iterators.Array;
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/* 82 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _coords = __webpack_require__(53);
var _coords2 = _interopRequireDefault(_coords);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* A cell range is a set of exactly two CellCoords (that can be the same or different)
*
* @class CellRange
*/
var CellRange = function () {
/**
* @param {CellCoords} highlight Used to draw bold border around a cell where selection was
* started and to edit the cell when you press Enter
* @param {CellCoords} from Usually the same as highlight, but in Excel there is distinction - one can change
* highlight within a selection
* @param {CellCoords} to End selection
*/
function CellRange(highlight, from, to) {
_classCallCheck(this, CellRange);
this.highlight = highlight;
this.from = from;
this.to = to;
}
/**
* Checks if given coords are valid in context of a given Walkontable instance
*
* @param {Walkontable} wotInstance
* @returns {Boolean}
*/
_createClass(CellRange, [{
key: 'isValid',
value: function isValid(wotInstance) {
return this.from.isValid(wotInstance) && this.to.isValid(wotInstance);
}
/**
* Checks if this cell range is restricted to one cell
*
* @returns {Boolean}
*/
}, {
key: 'isSingle',
value: function isSingle() {
return this.from.row === this.to.row && this.from.col === this.to.col;
}
/**
* Returns selected range height (in number of rows)
*
* @returns {Number}
*/
}, {
key: 'getHeight',
value: function getHeight() {
return Math.max(this.from.row, this.to.row) - Math.min(this.from.row, this.to.row) + 1;
}
/**
* Returns selected range width (in number of columns)
*
* @returns {Number}
*/
}, {
key: 'getWidth',
value: function getWidth() {
return Math.max(this.from.col, this.to.col) - Math.min(this.from.col, this.to.col) + 1;
}
/**
* Checks if given cell coords is within `from` and `to` cell coords of this range
*
* @param {CellCoords} cellCoords
* @returns {Boolean}
*/
}, {
key: 'includes',
value: function includes(cellCoords) {
var row = cellCoords.row,
col = cellCoords.col;
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
return topLeft.row <= row && bottomRight.row >= row && topLeft.col <= col && bottomRight.col >= col;
}
/**
* Checks if given range is within of this range
*
* @param {CellRange} testedRange
* @returns {Boolean}
*/
}, {
key: 'includesRange',
value: function includesRange(testedRange) {
return this.includes(testedRange.getTopLeftCorner()) && this.includes(testedRange.getBottomRightCorner());
}
/**
* Checks if given range is equal to this range
*
* @param {CellRange} testedRange
* @returns {Boolean}
*/
}, {
key: 'isEqual',
value: function isEqual(testedRange) {
return Math.min(this.from.row, this.to.row) == Math.min(testedRange.from.row, testedRange.to.row) && Math.max(this.from.row, this.to.row) == Math.max(testedRange.from.row, testedRange.to.row) && Math.min(this.from.col, this.to.col) == Math.min(testedRange.from.col, testedRange.to.col) && Math.max(this.from.col, this.to.col) == Math.max(testedRange.from.col, testedRange.to.col);
}
/**
* Checks if tested range overlaps with the range.
* Range A is considered to to be overlapping with range B if intersection of A and B or B and A is not empty.
*
* @param {CellRange} testedRange
* @returns {Boolean}
*/
}, {
key: 'overlaps',
value: function overlaps(testedRange) {
return testedRange.isSouthEastOf(this.getTopLeftCorner()) && testedRange.isNorthWestOf(this.getBottomRightCorner());
}
/**
* @param {CellRange} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isSouthEastOf',
value: function isSouthEastOf(testedCoords) {
return this.getTopLeftCorner().isSouthEastOf(testedCoords) || this.getBottomRightCorner().isSouthEastOf(testedCoords);
}
/**
* @param {CellRange} testedCoords
* @returns {Boolean}
*/
}, {
key: 'isNorthWestOf',
value: function isNorthWestOf(testedCoords) {
return this.getTopLeftCorner().isNorthWestOf(testedCoords) || this.getBottomRightCorner().isNorthWestOf(testedCoords);
}
/**
* Adds a cell to a range (only if exceeds corners of the range). Returns information if range was expanded
*
* @param {CellCoords} cellCoords
* @returns {Boolean}
*/
}, {
key: 'expand',
value: function expand(cellCoords) {
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
if (cellCoords.row < topLeft.row || cellCoords.col < topLeft.col || cellCoords.row > bottomRight.row || cellCoords.col > bottomRight.col) {
this.from = new _coords2.default(Math.min(topLeft.row, cellCoords.row), Math.min(topLeft.col, cellCoords.col));
this.to = new _coords2.default(Math.max(bottomRight.row, cellCoords.row), Math.max(bottomRight.col, cellCoords.col));
return true;
}
return false;
}
/**
* @param {CellRange} expandingRange
* @returns {Boolean}
*/
}, {
key: 'expandByRange',
value: function expandByRange(expandingRange) {
if (this.includesRange(expandingRange) || !this.overlaps(expandingRange)) {
return false;
}
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
var topRight = this.getTopRightCorner();
var bottomLeft = this.getBottomLeftCorner();
var expandingTopLeft = expandingRange.getTopLeftCorner();
var expandingBottomRight = expandingRange.getBottomRightCorner();
var resultTopRow = Math.min(topLeft.row, expandingTopLeft.row);
var resultTopCol = Math.min(topLeft.col, expandingTopLeft.col);
var resultBottomRow = Math.max(bottomRight.row, expandingBottomRight.row);
var resultBottomCol = Math.max(bottomRight.col, expandingBottomRight.col);
var finalFrom = new _coords2.default(resultTopRow, resultTopCol),
finalTo = new _coords2.default(resultBottomRow, resultBottomCol);
var isCorner = new CellRange(finalFrom, finalFrom, finalTo).isCorner(this.from, expandingRange),
onlyMerge = expandingRange.isEqual(new CellRange(finalFrom, finalFrom, finalTo));
if (isCorner && !onlyMerge) {
if (this.from.col > finalFrom.col) {
finalFrom.col = resultBottomCol;
finalTo.col = resultTopCol;
}
if (this.from.row > finalFrom.row) {
finalFrom.row = resultBottomRow;
finalTo.row = resultTopRow;
}
}
this.from = finalFrom;
this.to = finalTo;
return true;
}
/**
* @returns {String}
*/
}, {
key: 'getDirection',
value: function getDirection() {
if (this.from.isNorthWestOf(this.to)) {
// NorthWest - SouthEast
return 'NW-SE';
} else if (this.from.isNorthEastOf(this.to)) {
// NorthEast - SouthWest
return 'NE-SW';
} else if (this.from.isSouthEastOf(this.to)) {
// SouthEast - NorthWest
return 'SE-NW';
} else if (this.from.isSouthWestOf(this.to)) {
// SouthWest - NorthEast
return 'SW-NE';
}
}
/**
* @param {String} direction
*/
}, {
key: 'setDirection',
value: function setDirection(direction) {
switch (direction) {
case 'NW-SE':
var _ref = [this.getTopLeftCorner(), this.getBottomRightCorner()];
this.from = _ref[0];
this.to = _ref[1];
break;
case 'NE-SW':
var _ref2 = [this.getTopRightCorner(), this.getBottomLeftCorner()];
this.from = _ref2[0];
this.to = _ref2[1];
break;
case 'SE-NW':
var _ref3 = [this.getBottomRightCorner(), this.getTopLeftCorner()];
this.from = _ref3[0];
this.to = _ref3[1];
break;
case 'SW-NE':
var _ref4 = [this.getBottomLeftCorner(), this.getTopRightCorner()];
this.from = _ref4[0];
this.to = _ref4[1];
break;
default:
break;
}
}
/**
* Get top left corner of this range
*
* @returns {CellCoords}
*/
}, {
key: 'getTopLeftCorner',
value: function getTopLeftCorner() {
return new _coords2.default(Math.min(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));
}
/**
* Get bottom right corner of this range
*
* @returns {CellCoords}
*/
}, {
key: 'getBottomRightCorner',
value: function getBottomRightCorner() {
return new _coords2.default(Math.max(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));
}
/**
* Get top right corner of this range
*
* @returns {CellCoords}
*/
}, {
key: 'getTopRightCorner',
value: function getTopRightCorner() {
return new _coords2.default(Math.min(this.from.row, this.to.row), Math.max(this.from.col, this.to.col));
}
/**
* Get bottom left corner of this range
*
* @returns {CellCoords}
*/
}, {
key: 'getBottomLeftCorner',
value: function getBottomLeftCorner() {
return new _coords2.default(Math.max(this.from.row, this.to.row), Math.min(this.from.col, this.to.col));
}
/**
* @param {CellCoords} coords
* @param {CellRange} expandedRange
* @returns {*}
*/
}, {
key: 'isCorner',
value: function isCorner(coords, expandedRange) {
if (expandedRange) {
if (expandedRange.includes(coords)) {
if (this.getTopLeftCorner().isEqual(new _coords2.default(expandedRange.from.row, expandedRange.from.col)) || this.getTopRightCorner().isEqual(new _coords2.default(expandedRange.from.row, expandedRange.to.col)) || this.getBottomLeftCorner().isEqual(new _coords2.default(expandedRange.to.row, expandedRange.from.col)) || this.getBottomRightCorner().isEqual(new _coords2.default(expandedRange.to.row, expandedRange.to.col))) {
return true;
}
}
}
return coords.isEqual(this.getTopLeftCorner()) || coords.isEqual(this.getTopRightCorner()) || coords.isEqual(this.getBottomLeftCorner()) || coords.isEqual(this.getBottomRightCorner());
}
/**
* @param {CellCoords} coords
* @param {CellRange} expandedRange
* @returns {CellCoords}
*/
}, {
key: 'getOppositeCorner',
value: function getOppositeCorner(coords, expandedRange) {
if (!(coords instanceof _coords2.default)) {
return false;
}
if (expandedRange) {
if (expandedRange.includes(coords)) {
if (this.getTopLeftCorner().isEqual(new _coords2.default(expandedRange.from.row, expandedRange.from.col))) {
return this.getBottomRightCorner();
}
if (this.getTopRightCorner().isEqual(new _coords2.default(expandedRange.from.row, expandedRange.to.col))) {
return this.getBottomLeftCorner();
}
if (this.getBottomLeftCorner().isEqual(new _coords2.default(expandedRange.to.row, expandedRange.from.col))) {
return this.getTopRightCorner();
}
if (this.getBottomRightCorner().isEqual(new _coords2.default(expandedRange.to.row, expandedRange.to.col))) {
return this.getTopLeftCorner();
}
}
}
if (coords.isEqual(this.getBottomRightCorner())) {
return this.getTopLeftCorner();
} else if (coords.isEqual(this.getTopLeftCorner())) {
return this.getBottomRightCorner();
} else if (coords.isEqual(this.getTopRightCorner())) {
return this.getBottomLeftCorner();
} else if (coords.isEqual(this.getBottomLeftCorner())) {
return this.getTopRightCorner();
}
}
/**
* @param {CellRange} range
* @returns {Array}
*/
}, {
key: 'getBordersSharedWith',
value: function getBordersSharedWith(range) {
if (!this.includesRange(range)) {
return [];
}
var thisBorders = {
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)
};
var rangeBorders = {
top: Math.min(range.from.row, range.to.row),
bottom: Math.max(range.from.row, range.to.row),
left: Math.min(range.from.col, range.to.col),
right: Math.max(range.from.col, range.to.col)
};
var result = [];
if (thisBorders.top == rangeBorders.top) {
result.push('top');
}
if (thisBorders.right == rangeBorders.right) {
result.push('right');
}
if (thisBorders.bottom == rangeBorders.bottom) {
result.push('bottom');
}
if (thisBorders.left == rangeBorders.left) {
result.push('left');
}
return result;
}
/**
* Get inner selected cell coords defined by this range
*
* @returns {Array}
*/
}, {
key: 'getInner',
value: function getInner() {
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
var out = [];
for (var r = topLeft.row; r <= bottomRight.row; r++) {
for (var c = topLeft.col; c <= bottomRight.col; c++) {
if (!(this.from.row === r && this.from.col === c) && !(this.to.row === r && this.to.col === c)) {
out.push(new _coords2.default(r, c));
}
}
}
return out;
}
/**
* Get all selected cell coords defined by this range
*
* @returns {Array}
*/
}, {
key: 'getAll',
value: function getAll() {
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
var out = [];
for (var r = topLeft.row; r <= bottomRight.row; r++) {
for (var c = topLeft.col; c <= bottomRight.col; c++) {
if (topLeft.row === r && topLeft.col === c) {
out.push(topLeft);
} else if (bottomRight.row === r && bottomRight.col === c) {
out.push(bottomRight);
} else {
out.push(new _coords2.default(r, c));
}
}
}
return out;
}
/**
* Runs a callback function against all cells in the range. You can break the iteration by returning
* `false` in the callback function
*
* @param callback {Function}
*/
}, {
key: 'forAll',
value: function forAll(callback) {
var topLeft = this.getTopLeftCorner();
var bottomRight = this.getBottomRightCorner();
for (var r = topLeft.row; r <= bottomRight.row; r++) {
for (var c = topLeft.col; c <= bottomRight.col; c++) {
var breakIteration = callback(r, c);
if (breakIteration === false) {
return;
}
}
}
}
}]);
return CellRange;
}();
exports.default = CellRange;
/***/ }),
/* 83 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getRegisteredCellTypes = exports.getRegisteredCellTypeNames = exports.hasCellType = exports.getCellType = exports.registerCellType = undefined;
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var _autocompleteType = __webpack_require__(369);
var _autocompleteType2 = _interopRequireDefault(_autocompleteType);
var _checkboxType = __webpack_require__(370);
var _checkboxType2 = _interopRequireDefault(_checkboxType);
var _dateType = __webpack_require__(371);
var _dateType2 = _interopRequireDefault(_dateType);
var _dropdownType = __webpack_require__(372);
var _dropdownType2 = _interopRequireDefault(_dropdownType);
var _handsontableType = __webpack_require__(373);
var _handsontableType2 = _interopRequireDefault(_handsontableType);
var _numericType = __webpack_require__(374);
var _numericType2 = _interopRequireDefault(_numericType);
var _passwordType = __webpack_require__(375);
var _passwordType2 = _interopRequireDefault(_passwordType);
var _textType = __webpack_require__(376);
var _textType2 = _interopRequireDefault(_textType);
var _timeType = __webpack_require__(377);
var _timeType2 = _interopRequireDefault(_timeType);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _staticRegister = (0, _staticRegister3.default)('cellTypes'),
register = _staticRegister.register,
getItem = _staticRegister.getItem,
hasItem = _staticRegister.hasItem,
getNames = _staticRegister.getNames,
getValues = _staticRegister.getValues;
_register('autocomplete', _autocompleteType2.default);
_register('checkbox', _checkboxType2.default);
_register('date', _dateType2.default);
_register('dropdown', _dropdownType2.default);
_register('handsontable', _handsontableType2.default);
_register('numeric', _numericType2.default);
_register('password', _passwordType2.default);
_register('text', _textType2.default);
_register('time', _timeType2.default);
/**
* Retrieve cell type object.
*
* @param {String} name Cell type identification.
* @returns {Object} Returns cell type object.
*/
function _getItem(name) {
if (!hasItem(name)) {
throw Error('You declared cell type "' + name + '" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by "Handsontable.cellTypes.registerCellType" method');
}
return getItem(name);
}
/**
* Register cell type under specified name.
*
* @param {String} name Cell type identification.
* @param {Object} type An object with contains keys (eq: `editor`, `renderer`, `validator`) which describes specified behaviour of the cell.
*/
function _register(name, type) {
var editor = type.editor,
renderer = type.renderer,
validator = type.validator;
if (editor) {
(0, _editors.registerEditor)(name, editor);
}
if (renderer) {
(0, _renderers.registerRenderer)(name, renderer);
}
if (validator) {
(0, _validators.registerValidator)(name, validator);
}
register(name, type);
}
exports.registerCellType = _register;
exports.getCellType = _getItem;
exports.hasCellType = hasItem;
exports.getRegisteredCellTypeNames = getNames;
exports.getRegisteredCellTypes = getValues;
/***/ }),
/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
exports.default = Core;
var _element = __webpack_require__(0);
var _setting = __webpack_require__(85);
var _function = __webpack_require__(41);
var _mixed = __webpack_require__(17);
var _browser = __webpack_require__(28);
var _dataMap = __webpack_require__(378);
var _dataMap2 = _interopRequireDefault(_dataMap);
var _editorManager = __webpack_require__(381);
var _editorManager2 = _interopRequireDefault(_editorManager);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _plugins = __webpack_require__(7);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var _string = __webpack_require__(36);
var _number = __webpack_require__(6);
var _tableView = __webpack_require__(382);
var _tableView2 = _interopRequireDefault(_tableView);
var _dataSource = __webpack_require__(383);
var _dataSource2 = _interopRequireDefault(_dataSource);
var _data = __webpack_require__(86);
var _recordTranslator = __webpack_require__(308);
var _rootInstance = __webpack_require__(309);
var _src = __webpack_require__(15);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _defaultSettings = __webpack_require__(310);
var _defaultSettings2 = _interopRequireDefault(_defaultSettings);
var _cellTypes = __webpack_require__(83);
var _i18n = __webpack_require__(311);
var _dictionariesManager = __webpack_require__(67);
var _utils = __webpack_require__(312);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var activeGuid = null;
/**
* Handsontable constructor
*
* @core
* @constructor Core
* @description
*
* After Handsontable is constructed, you can modify the grid behavior using the available public methods.
*
* ---
* ## How to call methods
*
* These are 2 equal ways to call a Handsontable method:
*
* ```js
* // all following examples assume that you constructed Handsontable like this
* var ht = new Handsontable(document.getElementById('example1'), options);
*
* // now, to use setDataAtCell method, you can either:
* ht.setDataAtCell(0, 0, 'new value');
* ```
*
* Alternatively, you can call the method using jQuery wrapper (__obsolete__, requires initialization using our jQuery guide
* ```js
* $('#example1').handsontable('setDataAtCell', 0, 0, 'new value');
* ```
* ---
*/
function Core(rootElement, userSettings) {
var rootInstanceSymbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var priv,
datamap,
dataSource,
grid,
selection,
editorManager,
instance = this,
GridSettings = function GridSettings() {},
eventManager = new _eventManager2.default(instance);
(0, _object.extend)(GridSettings.prototype, _defaultSettings2.default.prototype); // create grid settings as a copy of default settings
(0, _object.extend)(GridSettings.prototype, userSettings); // overwrite defaults with user settings
(0, _object.extend)(GridSettings.prototype, expandType(userSettings));
(0, _utils.applyLanguageSetting)(GridSettings.prototype, userSettings.language);
if ((0, _rootInstance.hasValidParameter)(rootInstanceSymbol)) {
(0, _rootInstance.registerAsRootInstance)(this);
}
this.rootElement = rootElement;
this.isHotTableEnv = (0, _element.isChildOfWebComponentTable)(this.rootElement);
_eventManager2.default.isHotTableEnv = this.isHotTableEnv;
this.container = document.createElement('div');
this.renderCall = false;
rootElement.insertBefore(this.container, rootElement.firstChild);
if (false) {
(0, _mixed._injectProductInfo)(userSettings.licenseKey, rootElement);
}
this.guid = 'ht_' + (0, _string.randomString)(); // this is the namespace for global events
var recordTranslator = (0, _recordTranslator.getTranslator)(instance);
dataSource = new _dataSource2.default(instance);
if (!this.rootElement.id || this.rootElement.id.substring(0, 3) === 'ht_') {
this.rootElement.id = this.guid; // if root element does not have an id, assign a random id
}
priv = {
cellSettings: [],
columnSettings: [],
columnsSettingConflicts: ['data', 'width', 'language'],
settings: new GridSettings(), // current settings instance
selRange: null, // exposed by public method `getSelectedRange`
isPopulated: null,
scrollable: null,
firstRun: true
};
grid = {
/**
* Inserts or removes rows and columns
*
* @memberof Core#
* @function alter
* @private
* @param {String} action Possible values: "insert_row", "insert_col", "remove_row", "remove_col"
* @param {Number} index
* @param {Number} amount
* @param {String} [source] Optional. Source of hook runner.
* @param {Boolean} [keepEmptyRows] Optional. Flag for preventing deletion of empty rows.
*/
alter: function alter(action, index, amount, source, keepEmptyRows) {
var delta;
amount = amount || 1;
function spliceWith(data, index, count, toInject) {
var valueFactory = function valueFactory() {
var result = void 0;
if (toInject === 'array') {
result = [];
} else if (toInject === 'object') {
result = {};
}
return result;
};
var spliceArgs = (0, _array.arrayMap)(new Array(count), function () {
return valueFactory();
});
spliceArgs.unshift(index, 0);
data.splice.apply(data, _toConsumableArray(spliceArgs));
}
/* eslint-disable no-case-declarations */
switch (action) {
case 'insert_row':
var numberOfSourceRows = instance.countSourceRows();
if (instance.getSettings().maxRows === numberOfSourceRows) {
return;
}
index = (0, _mixed.isDefined)(index) ? index : numberOfSourceRows;
delta = datamap.createRow(index, amount, source);
spliceWith(priv.cellSettings, index, amount, 'array');
if (delta) {
if (selection.isSelected() && priv.selRange.from.row >= index) {
priv.selRange.from.row += delta;
selection.transformEnd(delta, 0); // will call render() internally
} else {
selection.refreshBorders(); // it will call render and prepare methods
}
}
break;
case 'insert_col':
delta = datamap.createCol(index, amount, source);
for (var row = 0, len = instance.countSourceRows(); row < len; row++) {
if (priv.cellSettings[row]) {
spliceWith(priv.cellSettings[row], index, amount);
}
}
if (delta) {
if (Array.isArray(instance.getSettings().colHeaders)) {
var spliceArray = [index, 0];
spliceArray.length += delta; // inserts empty (undefined) elements at the end of an array
Array.prototype.splice.apply(instance.getSettings().colHeaders, spliceArray); // inserts empty (undefined) elements into the colHeader array
}
if (selection.isSelected() && priv.selRange.from.col >= index) {
priv.selRange.from.col += delta;
selection.transformEnd(0, delta); // will call render() internally
} else {
selection.refreshBorders(); // it will call render and prepare methods
}
}
break;
case 'remove_row':
datamap.removeRow(index, amount, source);
priv.cellSettings.splice(index, amount);
var totalRows = instance.countRows();
var fixedRowsTop = instance.getSettings().fixedRowsTop;
if (fixedRowsTop >= index + 1) {
instance.getSettings().fixedRowsTop -= Math.min(amount, fixedRowsTop - index);
}
var fixedRowsBottom = instance.getSettings().fixedRowsBottom;
if (fixedRowsBottom && index >= totalRows - fixedRowsBottom) {
instance.getSettings().fixedRowsBottom -= Math.min(amount, fixedRowsBottom);
}
grid.adjustRowsAndCols();
selection.refreshBorders(); // it will call render and prepare methods
break;
case 'remove_col':
var visualColumnIndex = recordTranslator.toPhysicalColumn(index);
datamap.removeCol(index, amount, source);
for (var _row = 0, _len = instance.countSourceRows(); _row < _len; _row++) {
if (priv.cellSettings[_row]) {
// if row hasn't been rendered it wouldn't have cellSettings
priv.cellSettings[_row].splice(visualColumnIndex, amount);
}
}
var fixedColumnsLeft = instance.getSettings().fixedColumnsLeft;
if (fixedColumnsLeft >= index + 1) {
instance.getSettings().fixedColumnsLeft -= Math.min(amount, fixedColumnsLeft - index);
}
if (Array.isArray(instance.getSettings().colHeaders)) {
if (typeof visualColumnIndex === 'undefined') {
visualColumnIndex = -1;
}
instance.getSettings().colHeaders.splice(visualColumnIndex, amount);
}
grid.adjustRowsAndCols();
selection.refreshBorders(); // it will call render and prepare methods
break;
default:
throw new Error('There is no such action "' + action + '"');
}
if (!keepEmptyRows) {
grid.adjustRowsAndCols(); // makes sure that we did not add rows that will be removed in next refresh
}
},
/**
* Makes sure there are empty rows at the bottom of the table
*/
adjustRowsAndCols: function adjustRowsAndCols() {
if (priv.settings.minRows) {
// should I add empty rows to data source to meet minRows?
var rows = instance.countRows();
if (rows < priv.settings.minRows) {
for (var r = 0, minRows = priv.settings.minRows; r < minRows - rows; r++) {
datamap.createRow(instance.countRows(), 1, 'auto');
}
}
}
if (priv.settings.minSpareRows) {
var emptyRows = instance.countEmptyRows(true);
// should I add empty rows to meet minSpareRows?
if (emptyRows < priv.settings.minSpareRows) {
for (; emptyRows < priv.settings.minSpareRows && instance.countSourceRows() < priv.settings.maxRows; emptyRows++) {
datamap.createRow(instance.countRows(), 1, 'auto');
}
}
}
{
var emptyCols = void 0;
// count currently empty cols
if (priv.settings.minCols || priv.settings.minSpareCols) {
emptyCols = instance.countEmptyCols(true);
}
// should I add empty cols to meet minCols?
if (priv.settings.minCols && !priv.settings.columns && instance.countCols() < priv.settings.minCols) {
for (; instance.countCols() < priv.settings.minCols; emptyCols++) {
datamap.createCol(instance.countCols(), 1, 'auto');
}
}
// should I add empty cols to meet minSpareCols?
if (priv.settings.minSpareCols && !priv.settings.columns && instance.dataType === 'array' && emptyCols < priv.settings.minSpareCols) {
for (; emptyCols < priv.settings.minSpareCols && instance.countCols() < priv.settings.maxCols; emptyCols++) {
datamap.createCol(instance.countCols(), 1, 'auto');
}
}
}
var rowCount = instance.countRows();
var colCount = instance.countCols();
if (rowCount === 0 || colCount === 0) {
selection.deselect();
}
if (selection.isSelected()) {
var selectionChanged = false;
var fromRow = priv.selRange.from.row;
var fromCol = priv.selRange.from.col;
var toRow = priv.selRange.to.row;
var toCol = priv.selRange.to.col;
// if selection is outside, move selection to last row
if (fromRow > rowCount - 1) {
fromRow = rowCount - 1;
selectionChanged = true;
if (toRow > fromRow) {
toRow = fromRow;
}
} else if (toRow > rowCount - 1) {
toRow = rowCount - 1;
selectionChanged = true;
if (fromRow > toRow) {
fromRow = toRow;
}
}
// if selection is outside, move selection to last row
if (fromCol > colCount - 1) {
fromCol = colCount - 1;
selectionChanged = true;
if (toCol > fromCol) {
toCol = fromCol;
}
} else if (toCol > colCount - 1) {
toCol = colCount - 1;
selectionChanged = true;
if (fromCol > toCol) {
fromCol = toCol;
}
}
if (selectionChanged) {
instance.selectCell(fromRow, fromCol, toRow, toCol);
}
}
if (instance.view) {
instance.view.wt.wtOverlays.adjustElementsSize();
}
},
/**
* Populate the data from the provided 2d array from the given cell coordinates.
*
* @private
* @param {Object} start Start selection position. Visual indexes.
* @param {Array} input 2d data array.
* @param {Object} [end] End selection position (only for drag-down mode). Visual indexes.
* @param {String} [source="populateFromArray"] Source information string.
* @param {String} [method="overwrite"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.
* @param {String} direction (left|right|up|down) String specifying the direction.
* @param {Array} deltas The deltas array. A difference between values of adjacent cells.
* Useful **only** when the type of handled cells is `numeric`.
* @returns {Object|undefined} ending td in pasted area (only if any cell was changed).
*/
populateFromArray: function populateFromArray(start, input, end, source, method, direction, deltas) {
// TODO: either remove or implement the `direction` argument. Currently it's not working at all.
var r,
rlen,
c,
clen,
setData = [],
current = {};
rlen = input.length;
if (rlen === 0) {
return false;
}
var repeatCol,
repeatRow,
cmax,
rmax,
baseEnd = {
row: end === null ? null : end.row,
col: end === null ? null : end.col
};
/* eslint-disable no-case-declarations */
// insert data with specified pasteMode method
switch (method) {
case 'shift_down':
repeatCol = end ? end.col - start.col + 1 : 0;
repeatRow = end ? end.row - start.row + 1 : 0;
input = (0, _data.translateRowsToColumns)(input);
for (c = 0, clen = input.length, cmax = Math.max(clen, repeatCol); c < cmax; c++) {
if (c < clen) {
var _instance;
for (r = 0, rlen = input[c].length; r < repeatRow - rlen; r++) {
input[c].push(input[c][r % rlen]);
}
input[c].unshift(start.col + c, start.row, 0);
(_instance = instance).spliceCol.apply(_instance, _toConsumableArray(input[c]));
} else {
var _instance2;
input[c % clen][0] = start.col + c;
(_instance2 = instance).spliceCol.apply(_instance2, _toConsumableArray(input[c % clen]));
}
}
break;
case 'shift_right':
repeatCol = end ? end.col - start.col + 1 : 0;
repeatRow = end ? end.row - start.row + 1 : 0;
for (r = 0, rlen = input.length, rmax = Math.max(rlen, repeatRow); r < rmax; r++) {
if (r < rlen) {
var _instance3;
for (c = 0, clen = input[r].length; c < repeatCol - clen; c++) {
input[r].push(input[r][c % clen]);
}
input[r].unshift(start.row + r, start.col, 0);
(_instance3 = instance).spliceRow.apply(_instance3, _toConsumableArray(input[r]));
} else {
var _instance4;
input[r % rlen][0] = start.row + r;
(_instance4 = instance).spliceRow.apply(_instance4, _toConsumableArray(input[r % rlen]));
}
}
break;
case 'overwrite':
default:
// overwrite and other not specified options
current.row = start.row;
current.col = start.col;
var selected = { // selected range
row: end && start ? end.row - start.row + 1 : 1,
col: end && start ? end.col - start.col + 1 : 1
};
var skippedRow = 0;
var skippedColumn = 0;
var pushData = true;
var cellMeta = void 0;
var getInputValue = function getInputValue(row) {
var col = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var rowValue = input[row % input.length];
if (col !== null) {
return rowValue[col % rowValue.length];
}
return rowValue;
};
var rowInputLength = input.length;
var rowSelectionLength = end ? end.row - start.row + 1 : 0;
if (end) {
rlen = rowSelectionLength;
} else {
rlen = Math.max(rowInputLength, rowSelectionLength);
}
for (r = 0; r < rlen; r++) {
if (end && current.row > end.row && rowSelectionLength > rowInputLength || !priv.settings.allowInsertRow && current.row > instance.countRows() - 1 || current.row >= priv.settings.maxRows) {
break;
}
var visualRow = r - skippedRow;
var colInputLength = getInputValue(visualRow).length;
var colSelectionLength = end ? end.col - start.col + 1 : 0;
if (end) {
clen = colSelectionLength;
} else {
clen = Math.max(colInputLength, colSelectionLength);
}
current.col = start.col;
cellMeta = instance.getCellMeta(current.row, current.col);
if ((source === 'CopyPaste.paste' || source === 'Autofill.autofill') && cellMeta.skipRowOnPaste) {
skippedRow++;
current.row++;
rlen++;
/* eslint-disable no-continue */
continue;
}
skippedColumn = 0;
for (c = 0; c < clen; c++) {
if (end && current.col > end.col && colSelectionLength > colInputLength || !priv.settings.allowInsertColumn && current.col > instance.countCols() - 1 || current.col >= priv.settings.maxCols) {
break;
}
cellMeta = instance.getCellMeta(current.row, current.col);
if ((source === 'CopyPaste.paste' || source === 'Autofill.fill') && cellMeta.skipColumnOnPaste) {
skippedColumn++;
current.col++;
clen++;
continue;
}
if (cellMeta.readOnly) {
current.col++;
/* eslint-disable no-continue */
continue;
}
var visualColumn = c - skippedColumn;
var value = getInputValue(visualRow, visualColumn);
var orgValue = instance.getDataAtCell(current.row, current.col);
var index = {
row: visualRow,
col: visualColumn
};
if (source === 'Autofill.fill') {
var result = instance.runHooks('beforeAutofillInsidePopulate', index, direction, input, deltas, {}, selected);
if (result) {
value = (0, _mixed.isUndefined)(result.value) ? value : result.value;
}
}
if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
if (orgValue === null || (typeof orgValue === 'undefined' ? 'undefined' : _typeof(orgValue)) !== 'object') {
pushData = false;
} else {
var orgValueSchema = (0, _object.duckSchema)(orgValue[0] || orgValue);
var valueSchema = (0, _object.duckSchema)(value[0] || value);
/* eslint-disable max-depth */
if ((0, _object.isObjectEquals)(orgValueSchema, valueSchema)) {
value = (0, _object.deepClone)(value);
} else {
pushData = false;
}
}
} else if (orgValue !== null && (typeof orgValue === 'undefined' ? 'undefined' : _typeof(orgValue)) === 'object') {
pushData = false;
}
if (pushData) {
setData.push([current.row, current.col, value]);
}
pushData = true;
current.col++;
}
current.row++;
}
instance.setDataAtCell(setData, null, null, source || 'populateFromArray');
break;
}
}
};
/* eslint-disable no-multi-assign */
this.selection = selection = { // this public assignment is only temporary
inProgress: false,
selectedHeader: {
cols: false,
rows: false
},
/**
* @param {Boolean} [rows=false]
* @param {Boolean} [cols=false]
* @param {Boolean} [corner=false]
*/
setSelectedHeaders: function setSelectedHeaders() {
var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var cols = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var corner = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
instance.selection.selectedHeader.rows = rows;
instance.selection.selectedHeader.cols = cols;
instance.selection.selectedHeader.corner = corner;
},
/**
* Sets inProgress to `true`. This enables onSelectionEnd and onSelectionEndByProp to function as desired.
*/
begin: function begin() {
instance.selection.inProgress = true;
},
/**
* Sets inProgress to `false`. Triggers onSelectionEnd and onSelectionEndByProp.
*/
finish: function finish() {
var sel = instance.getSelected();
instance.runHooks('afterSelectionEnd', sel[0], sel[1], sel[2], sel[3]);
instance.runHooks('afterSelectionEndByProp', sel[0], instance.colToProp(sel[1]), sel[2], instance.colToProp(sel[3]));
instance.selection.inProgress = false;
},
/**
* @returns {Boolean}
*/
isInProgress: function isInProgress() {
return instance.selection.inProgress;
},
/**
* Starts selection range on given td object.
*
* @param {CellCoords} coords Visual coords.
* @param keepEditorOpened
*/
setRangeStart: function setRangeStart(coords, keepEditorOpened) {
instance.runHooks('beforeSetRangeStart', coords);
priv.selRange = new _src.CellRange(coords, coords, coords);
selection.setRangeEnd(coords, null, keepEditorOpened);
},
/**
* Starts selection range on given td object.
*
* @param {CellCoords} coords Visual coords.
* @param keepEditorOpened
*/
setRangeStartOnly: function setRangeStartOnly(coords) {
instance.runHooks('beforeSetRangeStartOnly', coords);
priv.selRange = new _src.CellRange(coords, coords, coords);
},
/**
* Ends selection range on given td object.
*
* @param {CellCoords} coords Visual coords.
* @param {Boolean} [scrollToCell=true] If `true`, viewport will be scrolled to range end
* @param {Boolean} [keepEditorOpened] If `true`, cell editor will be still opened after changing selection range
*/
setRangeEnd: function setRangeEnd(coords, scrollToCell, keepEditorOpened) {
if (priv.selRange === null) {
return;
}
var disableVisualSelection,
isHeaderSelected = false,
areCoordsPositive = true;
var firstVisibleRow = instance.view.wt.wtTable.getFirstVisibleRow();
var firstVisibleColumn = instance.view.wt.wtTable.getFirstVisibleColumn();
var newRangeCoords = {
row: null,
col: null
};
// trigger handlers
instance.runHooks('beforeSetRangeEnd', coords);
instance.selection.begin();
newRangeCoords.row = coords.row < 0 ? firstVisibleRow : coords.row;
newRangeCoords.col = coords.col < 0 ? firstVisibleColumn : coords.col;
priv.selRange.to = new _src.CellCoords(newRangeCoords.row, newRangeCoords.col);
if (!priv.settings.multiSelect) {
priv.selRange.from = coords;
}
// set up current selection
instance.view.wt.selections.current.clear();
disableVisualSelection = instance.getCellMeta(priv.selRange.highlight.row, priv.selRange.highlight.col).disableVisualSelection;
if (typeof disableVisualSelection === 'string') {
disableVisualSelection = [disableVisualSelection];
}
if (disableVisualSelection === false || Array.isArray(disableVisualSelection) && disableVisualSelection.indexOf('current') === -1) {
instance.view.wt.selections.current.add(priv.selRange.highlight);
}
// set up area selection
instance.view.wt.selections.area.clear();
if ((disableVisualSelection === false || Array.isArray(disableVisualSelection) && disableVisualSelection.indexOf('area') === -1) && selection.isMultiple()) {
instance.view.wt.selections.area.add(priv.selRange.from);
instance.view.wt.selections.area.add(priv.selRange.to);
}
// set up highlight
if (priv.settings.currentHeaderClassName || priv.settings.currentRowClassName || priv.settings.currentColClassName) {
instance.view.wt.selections.highlight.clear();
instance.view.wt.selections.highlight.add(priv.selRange.from);
instance.view.wt.selections.highlight.add(priv.selRange.to);
}
var preventScrolling = (0, _object.createObjectPropListener)('value');
// trigger handlers
instance.runHooks('afterSelection', priv.selRange.from.row, priv.selRange.from.col, priv.selRange.to.row, priv.selRange.to.col, preventScrolling);
instance.runHooks('afterSelectionByProp', priv.selRange.from.row, datamap.colToProp(priv.selRange.from.col), priv.selRange.to.row, datamap.colToProp(priv.selRange.to.col), preventScrolling);
if (instance.selection.selectedHeader.cols || instance.selection.selectedHeader.rows) {
isHeaderSelected = true;
}
if (coords.row < 0 || coords.col < 0) {
areCoordsPositive = false;
}
if (preventScrolling.isTouched()) {
scrollToCell = !preventScrolling.value;
}
if (scrollToCell !== false && !isHeaderSelected && areCoordsPositive) {
if (priv.selRange.from && !selection.isMultiple()) {
instance.view.scrollViewport(priv.selRange.from);
} else {
instance.view.scrollViewport(coords);
}
}
if (selection.selectedHeader.rows && selection.selectedHeader.cols) {
(0, _element.addClass)(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);
} else if (selection.selectedHeader.rows) {
(0, _element.removeClass)(instance.rootElement, 'ht__selection--columns');
(0, _element.addClass)(instance.rootElement, 'ht__selection--rows');
} else if (selection.selectedHeader.cols) {
(0, _element.removeClass)(instance.rootElement, 'ht__selection--rows');
(0, _element.addClass)(instance.rootElement, 'ht__selection--columns');
} else {
(0, _element.removeClass)(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);
}
selection.refreshBorders(null, keepEditorOpened);
},
/**
* Destroys editor, redraws borders around cells, prepares editor.
*
* @param {Boolean} [revertOriginal]
* @param {Boolean} [keepEditor]
*/
refreshBorders: function refreshBorders(revertOriginal, keepEditor) {
if (!keepEditor) {
editorManager.destroyEditor(revertOriginal);
}
instance.view.render();
if (selection.isSelected() && !keepEditor) {
editorManager.prepareEditor();
}
},
/**
* Returns information if we have a multiselection.
*
* @returns {Boolean}
*/
isMultiple: function isMultiple() {
var isMultiple = !(priv.selRange.to.col === priv.selRange.from.col && priv.selRange.to.row === priv.selRange.from.row),
modifier = instance.runHooks('afterIsMultipleSelection', isMultiple);
if (isMultiple) {
return modifier;
}
},
/**
* Selects cell relative to current cell (if possible).
*/
transformStart: function transformStart(rowDelta, colDelta, force, keepEditorOpened) {
var delta = new _src.CellCoords(rowDelta, colDelta),
rowTransformDir = 0,
colTransformDir = 0,
totalRows,
totalCols,
coords,
fixedRowsBottom;
instance.runHooks('modifyTransformStart', delta);
totalRows = instance.countRows();
totalCols = instance.countCols();
fixedRowsBottom = instance.getSettings().fixedRowsBottom;
if (priv.selRange.highlight.row + rowDelta > totalRows - 1) {
if (force && priv.settings.minSpareRows > 0 && !(fixedRowsBottom && priv.selRange.highlight.row >= totalRows - fixedRowsBottom - 1)) {
instance.alter('insert_row', totalRows);
totalRows = instance.countRows();
} else if (priv.settings.autoWrapCol) {
delta.row = 1 - totalRows;
delta.col = priv.selRange.highlight.col + delta.col == totalCols - 1 ? 1 - totalCols : 1;
}
} else if (priv.settings.autoWrapCol && priv.selRange.highlight.row + delta.row < 0 && priv.selRange.highlight.col + delta.col >= 0) {
delta.row = totalRows - 1;
delta.col = priv.selRange.highlight.col + delta.col == 0 ? totalCols - 1 : -1;
}
if (priv.selRange.highlight.col + delta.col > totalCols - 1) {
if (force && priv.settings.minSpareCols > 0) {
instance.alter('insert_col', totalCols);
totalCols = instance.countCols();
} else if (priv.settings.autoWrapRow) {
delta.row = priv.selRange.highlight.row + delta.row == totalRows - 1 ? 1 - totalRows : 1;
delta.col = 1 - totalCols;
}
} else if (priv.settings.autoWrapRow && priv.selRange.highlight.col + delta.col < 0 && priv.selRange.highlight.row + delta.row >= 0) {
delta.row = priv.selRange.highlight.row + delta.row == 0 ? totalRows - 1 : -1;
delta.col = totalCols - 1;
}
coords = new _src.CellCoords(priv.selRange.highlight.row + delta.row, priv.selRange.highlight.col + delta.col);
if (coords.row < 0) {
rowTransformDir = -1;
coords.row = 0;
} else if (coords.row > 0 && coords.row >= totalRows) {
rowTransformDir = 1;
coords.row = totalRows - 1;
}
if (coords.col < 0) {
colTransformDir = -1;
coords.col = 0;
} else if (coords.col > 0 && coords.col >= totalCols) {
colTransformDir = 1;
coords.col = totalCols - 1;
}
instance.runHooks('afterModifyTransformStart', coords, rowTransformDir, colTransformDir);
selection.setRangeStart(coords, keepEditorOpened);
},
/**
* Sets selection end cell relative to current selection end cell (if possible).
*/
transformEnd: function transformEnd(rowDelta, colDelta) {
var delta = new _src.CellCoords(rowDelta, colDelta),
rowTransformDir = 0,
colTransformDir = 0,
totalRows,
totalCols,
coords;
instance.runHooks('modifyTransformEnd', delta);
totalRows = instance.countRows();
totalCols = instance.countCols();
coords = new _src.CellCoords(priv.selRange.to.row + delta.row, priv.selRange.to.col + delta.col);
if (coords.row < 0) {
rowTransformDir = -1;
coords.row = 0;
} else if (coords.row > 0 && coords.row >= totalRows) {
rowTransformDir = 1;
coords.row = totalRows - 1;
}
if (coords.col < 0) {
colTransformDir = -1;
coords.col = 0;
} else if (coords.col > 0 && coords.col >= totalCols) {
colTransformDir = 1;
coords.col = totalCols - 1;
}
instance.runHooks('afterModifyTransformEnd', coords, rowTransformDir, colTransformDir);
selection.setRangeEnd(coords, true);
},
/**
* Returns `true` if currently there is a selection on screen, `false` otherwise.
*
* @returns {Boolean}
*/
isSelected: function isSelected() {
return priv.selRange !== null;
},
/**
* Returns `true` if coords is within current selection coords.
*
* @param {CellCoords} coords
* @returns {Boolean}
*/
inInSelection: function inInSelection(coords) {
if (!selection.isSelected()) {
return false;
}
return priv.selRange.includes(coords);
},
/**
* Deselects all selected cells
*/
deselect: function deselect() {
if (!selection.isSelected()) {
return;
}
instance.selection.inProgress = false; // needed by HT inception
priv.selRange = null;
instance.view.wt.selections.current.clear();
instance.view.wt.selections.area.clear();
if (priv.settings.currentHeaderClassName || priv.settings.currentRowClassName || priv.settings.currentColClassName) {
instance.view.wt.selections.highlight.clear();
}
editorManager.destroyEditor();
selection.refreshBorders();
(0, _element.removeClass)(instance.rootElement, ['ht__selection--rows', 'ht__selection--columns']);
instance.runHooks('afterDeselect');
},
/**
* Select all cells
*/
selectAll: function selectAll() {
if (!priv.settings.multiSelect) {
return;
}
selection.setSelectedHeaders(true, true, true);
selection.setRangeStart(new _src.CellCoords(0, 0));
selection.setRangeEnd(new _src.CellCoords(instance.countRows() - 1, instance.countCols() - 1), false);
},
/**
* Deletes data from selected cells
*/
empty: function empty() {
if (!selection.isSelected()) {
return;
}
var topLeft = priv.selRange.getTopLeftCorner();
var bottomRight = priv.selRange.getBottomRightCorner();
var r,
c,
changes = [];
for (r = topLeft.row; r <= bottomRight.row; r++) {
for (c = topLeft.col; c <= bottomRight.col; c++) {
if (!instance.getCellMeta(r, c).readOnly) {
changes.push([r, c, '']);
}
}
}
instance.setDataAtCell(changes);
}
};
/**
* Internal function to set `language` key of settings.
*
* @private
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'
* @fires Hooks#afterLanguageChange
*/
function setLanguage(languageCode) {
var normalizedLanguageCode = (0, _utils.normalizeLanguageCode)(languageCode);
if ((0, _dictionariesManager.hasLanguageDictionary)(normalizedLanguageCode)) {
instance.runHooks('beforeLanguageChange', normalizedLanguageCode);
GridSettings.prototype.language = normalizedLanguageCode;
instance.runHooks('afterLanguageChange', normalizedLanguageCode);
} else {
(0, _utils.warnUserAboutLanguageRegistration)(languageCode);
}
}
this.init = function () {
dataSource.setData(priv.settings.data);
instance.runHooks('beforeInit');
if ((0, _browser.isMobileBrowser)()) {
(0, _element.addClass)(instance.rootElement, 'mobile');
}
this.updateSettings(priv.settings, true);
this.view = new _tableView2.default(this);
editorManager = new _editorManager2.default(instance, priv, selection, datamap);
this.forceFullRender = true; // used when data was changed
instance.runHooks('init');
this.view.render();
if (_typeof(priv.firstRun) === 'object') {
instance.runHooks('afterChange', priv.firstRun[0], priv.firstRun[1]);
priv.firstRun = false;
}
instance.runHooks('afterInit');
};
function ValidatorsQueue() {
// moved this one level up so it can be used in any function here. Probably this should be moved to a separate file
var resolved = false;
return {
validatorsInQueue: 0,
valid: true,
addValidatorToQueue: function addValidatorToQueue() {
this.validatorsInQueue++;
resolved = false;
},
removeValidatorFormQueue: function removeValidatorFormQueue() {
this.validatorsInQueue = this.validatorsInQueue - 1 < 0 ? 0 : this.validatorsInQueue - 1;
this.checkIfQueueIsEmpty();
},
onQueueEmpty: function onQueueEmpty(valid) {},
checkIfQueueIsEmpty: function checkIfQueueIsEmpty() {
if (this.validatorsInQueue == 0 && resolved == false) {
resolved = true;
this.onQueueEmpty(this.valid);
}
}
};
}
/**
* Get parsed number from numeric string.
*
* @param {String} numericData Float (separated by a dot or a comma) or integer.
* @returns {Number} Number if we get data in parsable format, not changed value otherwise.
*/
function getParsedNumber(numericData) {
// Unifying "float like" string. Change from value with comma determiner to value with dot determiner,
// for example from `450,65` to `450.65`.
var unifiedNumericData = numericData.replace(',', '.');
if (isNaN(parseFloat(unifiedNumericData)) === false) {
return parseFloat(unifiedNumericData);
}
return numericData;
}
function validateChanges(changes, source, callback) {
var waitingForValidator = new ValidatorsQueue();
var isNumericData = function isNumericData(value) {
return value.length > 0 && /^-?[\d\s]*(\.|,)?\d*$/.test(value);
};
waitingForValidator.onQueueEmpty = resolve;
for (var i = changes.length - 1; i >= 0; i--) {
if (changes[i] === null) {
changes.splice(i, 1);
} else {
var _changes$i = _slicedToArray(changes[i], 4),
row = _changes$i[0],
prop = _changes$i[1],
newValue = _changes$i[3];
var col = datamap.propToCol(prop);
var cellProperties = instance.getCellMeta(row, col);
if (cellProperties.type === 'numeric' && typeof newValue === 'string' && isNumericData(newValue)) {
changes[i][3] = getParsedNumber(newValue);
}
/* eslint-disable no-loop-func */
if (instance.getCellValidator(cellProperties)) {
waitingForValidator.addValidatorToQueue();
instance.validateCell(changes[i][3], cellProperties, function (i, cellProperties) {
return function (result) {
if (typeof result !== 'boolean') {
throw new Error('Validation error: result is not boolean');
}
if (result === false && cellProperties.allowInvalid === false) {
changes.splice(i, 1); // cancel the change
cellProperties.valid = true; // we cancelled the change, so cell value is still valid
var cell = instance.getCell(cellProperties.visualRow, cellProperties.visualCol);
(0, _element.removeClass)(cell, instance.getSettings().invalidCellClassName);
--i;
}
waitingForValidator.removeValidatorFormQueue();
};
}(i, cellProperties), source);
}
}
}
waitingForValidator.checkIfQueueIsEmpty();
function resolve() {
var beforeChangeResult;
if (changes.length) {
beforeChangeResult = instance.runHooks('beforeChange', changes, source);
if ((0, _function.isFunction)(beforeChangeResult)) {
console.warn('Your beforeChange callback returns a function. It\'s not supported since Handsontable 0.12.1 (and the returned function will not be executed).');
} else if (beforeChangeResult === false) {
changes.splice(0, changes.length); // invalidate all changes (remove everything from array)
}
}
callback(); // called when async validators are resolved and beforeChange was not async
}
}
/**
* Internal function to apply changes. Called after validateChanges
*
* @private
* @param {Array} changes Array in form of [row, prop, oldValue, newValue]
* @param {String} source String that identifies how this change will be described in changes array (useful in onChange callback)
* @fires Hooks#beforeChangeRender
* @fires Hooks#afterChange
*/
function applyChanges(changes, source) {
var i = changes.length - 1;
if (i < 0) {
return;
}
for (; i >= 0; i--) {
var skipThisChange = false;
if (changes[i] === null) {
changes.splice(i, 1);
/* eslint-disable no-continue */
continue;
}
if (changes[i][2] == null && changes[i][3] == null) {
/* eslint-disable no-continue */
continue;
}
if (priv.settings.allowInsertRow) {
while (changes[i][0] > instance.countRows() - 1) {
var numberOfCreatedRows = datamap.createRow(void 0, void 0, source);
if (numberOfCreatedRows === 0) {
skipThisChange = true;
break;
}
}
}
if (skipThisChange) {
/* eslint-disable no-continue */
continue;
}
if (instance.dataType === 'array' && (!priv.settings.columns || priv.settings.columns.length === 0) && priv.settings.allowInsertColumn) {
while (datamap.propToCol(changes[i][1]) > instance.countCols() - 1) {
datamap.createCol(void 0, void 0, source);
}
}
datamap.set(changes[i][0], changes[i][1], changes[i][3]);
}
instance.forceFullRender = true; // used when data was changed
grid.adjustRowsAndCols();
instance.runHooks('beforeChangeRender', changes, source);
selection.refreshBorders(null, true);
instance.view.wt.wtOverlays.adjustElementsSize();
instance.runHooks('afterChange', changes, source || 'edit');
var activeEditor = instance.getActiveEditor();
if (activeEditor && (0, _mixed.isDefined)(activeEditor.refreshValue)) {
activeEditor.refreshValue();
}
}
this.validateCell = function (value, cellProperties, callback, source) {
var validator = instance.getCellValidator(cellProperties);
function done(valid) {
var col = cellProperties.visualCol,
row = cellProperties.visualRow,
td = instance.getCell(row, col, true);
if (td && td.nodeName != 'TH') {
instance.view.wt.wtSettings.settings.cellRenderer(row, col, td);
}
callback(valid);
}
if ((0, _mixed.isRegExp)(validator)) {
validator = function (validator) {
return function (value, callback) {
callback(validator.test(value));
};
}(validator);
}
if ((0, _function.isFunction)(validator)) {
value = instance.runHooks('beforeValidate', value, cellProperties.visualRow, cellProperties.prop, source);
// To provide consistent behaviour, validation should be always asynchronous
instance._registerTimeout(setTimeout(function () {
validator.call(cellProperties, value, function (valid) {
valid = instance.runHooks('afterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);
cellProperties.valid = valid;
done(valid);
instance.runHooks('postAfterValidate', valid, value, cellProperties.visualRow, cellProperties.prop, source);
});
}, 0));
} else {
// resolve callback even if validator function was not found
instance._registerTimeout(setTimeout(function () {
cellProperties.valid = true;
done(cellProperties.valid);
}, 0));
}
};
function setDataInputToArray(row, propOrCol, value) {
if ((typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') {
// is it an array of changes
return row;
}
return [[row, propOrCol, value]];
}
/**
* @description
* Set new value to a cell. To change many cells at once, pass an array of `changes` in format `[[row, col, value], ...]` as
* the only parameter. `col` is the index of a __visible__ column (note that if columns were reordered,
* the current visible order will be used). `source` is a flag for before/afterChange events. If you pass only array of
* changes then `source` could be set as second parameter.
*
* @memberof Core#
* @function setDataAtCell
* @param {Number|Array} row Visual row index or array of changes in format `[[row, col, value], ...]`.
* @param {Number} col Visual column index.
* @param {String} value New value.
* @param {String} [source] String that identifies how this change will be described in the changes array (useful in onAfterChange or onBeforeChange callback).
*/
this.setDataAtCell = function (row, col, value, source) {
var input = setDataInputToArray(row, col, value),
i,
ilen,
changes = [],
prop;
for (i = 0, ilen = input.length; i < ilen; i++) {
if (_typeof(input[i]) !== 'object') {
throw new Error('Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter');
}
if (typeof input[i][1] !== 'number') {
throw new Error('Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`');
}
prop = datamap.colToProp(input[i][1]);
changes.push([input[i][0], prop, dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
}
if (!source && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') {
source = col;
}
instance.runHooks('afterSetDataAtCell', changes, source);
validateChanges(changes, source, function () {
applyChanges(changes, source);
});
};
/**
* @description
* Set new value to a cell. To change many cells at once, pass an array of `changes` in format `[[row, prop, value], ...]` as
* the only parameter. `prop` is the name of the object property (e.g. `first.name`). `source` is a flag for before/afterChange events.
* If you pass only array of changes then `source` could be set as second parameter.
*
* @memberof Core#
* @function setDataAtRowProp
* @param {Number|Array} row Visual row index or array of changes in format `[[row, prop, value], ...]`.
* @param {String} prop Property name or the source string.
* @param {String} value Value to be set.
* @param {String} [source] String that identifies how this change will be described in changes array (useful in onChange callback).
*/
this.setDataAtRowProp = function (row, prop, value, source) {
var input = setDataInputToArray(row, prop, value),
i,
ilen,
changes = [];
for (i = 0, ilen = input.length; i < ilen; i++) {
changes.push([input[i][0], input[i][1], dataSource.getAtCell(recordTranslator.toPhysicalRow(input[i][0]), input[i][1]), input[i][2]]);
}
if (!source && (typeof row === 'undefined' ? 'undefined' : _typeof(row)) === 'object') {
source = prop;
}
instance.runHooks('afterSetDataAtRowProp', changes, source);
validateChanges(changes, source, function () {
applyChanges(changes, source);
});
};
/**
* Listen to the keyboard input on document body.
*
* @memberof Core#
* @function listen
* @since 0.11
* @param {Boolean} [modifyDocumentFocus=true] If `true`, currently focused element will be blured (which returns focus
* to the document.body). Otherwise the active element does not lose its focus.
*/
this.listen = function () {
var modifyDocumentFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
if (modifyDocumentFocus) {
var invalidActiveElement = !document.activeElement || document.activeElement && document.activeElement.nodeName === void 0;
if (document.activeElement && document.activeElement !== document.body && !invalidActiveElement) {
document.activeElement.blur();
} else if (invalidActiveElement) {
// IE
document.body.focus();
}
}
if (instance && !instance.isListening()) {
activeGuid = instance.guid;
instance.runHooks('afterListen');
}
};
/**
* Stop listening to keyboard input on the document body.
*
* @memberof Core#
* @function unlisten
* @since 0.11
*/
this.unlisten = function () {
if (this.isListening()) {
activeGuid = null;
instance.runHooks('afterUnlisten');
}
};
/**
* Returns `true` if the current Handsontable instance is listening to keyboard input on document body.
*
* @memberof Core#
* @function isListening
* @since 0.11
* @returns {Boolean} `true` if the instance is listening, `false` otherwise.
*/
this.isListening = function () {
return activeGuid === instance.guid;
};
/**
* Destroys the current editor, renders and selects the current cell.
*
* @memberof Core#
* @function destroyEditor
* @param {Boolean} [revertOriginal] If != `true`, edited data is saved. Otherwise the previous value is restored.
*/
this.destroyEditor = function (revertOriginal) {
selection.refreshBorders(revertOriginal);
};
/**
* Populate cells at position with 2D input array (e.g. `[[1, 2], [3, 4]]`).
* Use `endRow`, `endCol` when you want to cut input when a certain row is reached.
* Optional `source` parameter (default value "populateFromArray") is used to identify this call in the resulting events (beforeChange, afterChange).
* Optional `populateMethod` parameter (default value "overwrite", possible values "shift_down" and "shift_right")
* has the same effect as pasteMode option {@link Options#pasteMode}
*
* @memberof Core#
* @function populateFromArray
* @since 0.9.0
* @param {Number} row Start visual row index.
* @param {Number} col Start visual column index.
* @param {Array} input 2d array
* @param {Number} [endRow] End visual row index (use when you want to cut input when certain row is reached).
* @param {Number} [endCol] End visual column index (use when you want to cut input when certain column is reached).
* @param {String} [source="populateFromArray"] Source string.
* @param {String} [method="overwrite"] Populate method. Possible options: `shift_down`, `shift_right`, `overwrite`.
* @param {String} direction Populate direction. (left|right|up|down)
* @param {Array} deltas Deltas array.
* @returns {Object|undefined} The ending TD element in pasted area (only if any cells were changed).
*/
this.populateFromArray = function (row, col, input, endRow, endCol, source, method, direction, deltas) {
var c;
if (!((typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && _typeof(input[0]) === 'object')) {
throw new Error('populateFromArray parameter `input` must be an array of arrays'); // API changed in 0.9-beta2, let's check if you use it correctly
}
c = typeof endRow === 'number' ? new _src.CellCoords(endRow, endCol) : null;
return grid.populateFromArray(new _src.CellCoords(row, col), input, c, source, method, direction, deltas);
};
/**
* Adds/removes data from the column. This function is modelled after Array.splice.
* Parameter `col` is the index of the column in which do you want to do splice.
* Parameter `index` is the row index at which to start changing the array.
* If negative, will begin that many elements from the end. Parameter `amount`, is the number of the old array elements to remove.
* If the amount is 0, no elements are removed. Fourth and further parameters are the `elements` to add to the array.
* If you don't specify any elements, spliceCol simply removes elements from the array.
* {@link DataMap#spliceCol}
*
* @memberof Core#
* @function spliceCol
* @since 0.9-beta2
* @param {Number} col Index of the column in which do you want to do splice.
* @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end.
* @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.
* @param {*} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.
*/
this.spliceCol = function (col, index, amount /* , elements... */) {
var _datamap;
return (_datamap = datamap).spliceCol.apply(_datamap, arguments);
};
/**
* Adds/removes data from the row. This function works is modelled after Array.splice.
* Parameter `row` is the index of row in which do you want to do splice.
* Parameter `index` is the column index at which to start changing the array.
* If negative, will begin that many elements from the end. Parameter `amount`, is the number of old array elements to remove.
* If the amount is 0, no elements are removed. Fourth and further parameters are the `elements` to add to the array.
* If you don't specify any elements, spliceCol simply removes elements from the array.
* {@link DataMap#spliceRow}
*
* @memberof Core#
* @function spliceRow
* @since 0.11
* @param {Number} row Index of column in which do you want to do splice.
* @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end.
* @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.
* @param {*} [elements] The elements to add to the array. If you don't specify any elements, spliceCol simply removes elements from the array.
*/
this.spliceRow = function (row, index, amount /* , elements... */) {
var _datamap2;
return (_datamap2 = datamap).spliceRow.apply(_datamap2, arguments);
};
/**
* Returns indexes of the currently selected cells as an array `[startRow, startCol, endRow, endCol]`.
*
* Start row and start col are the coordinates of the active cell (where the selection was started).
*
* @memberof Core#
* @function getSelected
* @returns {Array} Array of the selection's indexes.
*/
this.getSelected = function () {
// https://github.com/handsontable/handsontable/issues/44 //cjl
if (selection.isSelected()) {
return [priv.selRange.from.row, priv.selRange.from.col, priv.selRange.to.row, priv.selRange.to.col];
}
};
/**
* Returns the current selection as a CellRange object.
*
* @memberof Core#
* @function getSelectedRange
* @since 0.11
* @returns {CellRange} Selected range object or undefined` if there is no selection.
*/
this.getSelectedRange = function () {
// https://github.com/handsontable/handsontable/issues/44 //cjl
if (selection.isSelected()) {
return priv.selRange;
}
};
/**
* Rerender the table.
*
* @memberof Core#
* @function render
*/
this.render = function () {
if (instance.view) {
instance.renderCall = true;
instance.forceFullRender = true; // used when data was changed
selection.refreshBorders(null, true);
}
};
/**
* Reset all cells in the grid to contain data from the data array.
*
* @memberof Core#
* @function loadData
* @param {Array} data Array of arrays or array of objects containing data.
* @fires Hooks#afterLoadData
* @fires Hooks#afterChange
*/
this.loadData = function (data) {
if (Array.isArray(priv.settings.dataSchema)) {
instance.dataType = 'array';
} else if ((0, _function.isFunction)(priv.settings.dataSchema)) {
instance.dataType = 'function';
} else {
instance.dataType = 'object';
}
if (datamap) {
datamap.destroy();
}
datamap = new _dataMap2.default(instance, priv, GridSettings);
if ((typeof data === 'undefined' ? 'undefined' : _typeof(data)) === 'object' && data !== null) {
if (!(data.push && data.splice)) {
// check if data is array. Must use duck-type check so Backbone Collections also pass it
// when data is not an array, attempt to make a single-row array of it
data = [data];
}
} else if (data === null) {
data = [];
var row;
var r = 0;
var rlen = 0;
var dataSchema = datamap.getSchema();
for (r = 0, rlen = priv.settings.startRows; r < rlen; r++) {
if ((instance.dataType === 'object' || instance.dataType === 'function') && priv.settings.dataSchema) {
row = (0, _object.deepClone)(dataSchema);
data.push(row);
} else if (instance.dataType === 'array') {
row = (0, _object.deepClone)(dataSchema[0]);
data.push(row);
} else {
row = [];
for (var c = 0, clen = priv.settings.startCols; c < clen; c++) {
row.push(null);
}
data.push(row);
}
}
} else {
throw new Error('loadData only accepts array of objects or array of arrays (' + (typeof data === 'undefined' ? 'undefined' : _typeof(data)) + ' given)');
}
priv.isPopulated = false;
GridSettings.prototype.data = data;
if (Array.isArray(data[0])) {
instance.dataType = 'array';
}
datamap.dataSource = data;
dataSource.data = data;
dataSource.dataType = instance.dataType;
dataSource.colToProp = datamap.colToProp.bind(datamap);
dataSource.propToCol = datamap.propToCol.bind(datamap);
clearCellSettingCache();
grid.adjustRowsAndCols();
instance.runHooks('afterLoadData', priv.firstRun);
if (priv.firstRun) {
priv.firstRun = [null, 'loadData'];
} else {
instance.runHooks('afterChange', null, 'loadData');
instance.render();
}
priv.isPopulated = true;
function clearCellSettingCache() {
priv.cellSettings.length = 0;
}
};
/**
* Returns the current data object (the same one that was passed by `data` configuration option or `loadData` method,
* unless the `modifyRow` hook was used to trim some of the rows. If that's the case - use the {@link Core#getSourceData} method.).
* Optionally you can provide cell range by defining `row`, `col`, `row2`, `col2` to get only a fragment of grid data.
*
* Note: getData functionality changed with the release of version 0.20. If you're looking for the previous functionality,
* you should use the {@link Core#getSourceData} method.
*
* @memberof Core#
* @function getData
* @param {Number} [r] From visual row index.
* @param {Number} [c] From visual column index.
* @param {Number} [r2] To visual row index.
* @param {Number} [c2] To visual column index.
* @returns {Array} Array with the data.
*/
this.getData = function (r, c, r2, c2) {
if ((0, _mixed.isUndefined)(r)) {
return datamap.getAll();
}
return datamap.getRange(new _src.CellCoords(r, c), new _src.CellCoords(r2, c2), datamap.DESTINATION_RENDERER);
};
/**
* Returns a string value of the selected range. Each column is separated by tab, each row is separated by a new line character.
* {@link DataMap#getCopyableText}
*
* @memberof Core#
* @function getCopyableText
* @since 0.11
* @param {Number} startRow From visual row index.
* @param {Number} startCol From visual column index.
* @param {Number} endRow To visual row index.
* @param {Number} endCol To visual column index.
* @returns {String}
*/
this.getCopyableText = function (startRow, startCol, endRow, endCol) {
return datamap.getCopyableText(new _src.CellCoords(startRow, startCol), new _src.CellCoords(endRow, endCol));
};
/**
* Returns the data's copyable value at specified row and column index ({@link DataMap#getCopyable}).
*
* @memberof Core#
* @function getCopyableData
* @since 0.19.0
* @param {Number} row Visual row index.
* @param {Number} column Visual column index.
* @returns {String}
*/
this.getCopyableData = function (row, column) {
return datamap.getCopyable(row, datamap.colToProp(column));
};
/**
* Returns schema provided by constructor settings. If it doesn't exist then it returns the schema based on the data
* structure in the first row.
*
* @memberof Core#
* @function getSchema
* @since 0.13.2
* @returns {Object} Schema object.
*/
this.getSchema = function () {
return datamap.getSchema();
};
/**
* Use it if you need to change configuration after initialization. The `settings` parameter is an object containing the new
* settings, declared the same way as in the initial settings object.
* Note, that although the `updateSettings` method doesn't overwrite the previously declared settings, it might reset
* the settings made post-initialization. (for example - ignore changes made using the columnResize feature).
*
* @memberof Core#
* @function updateSettings
* @param {Object} settings New settings object.
* @param {Boolean} init Calls this method in the initialization mode. Internal use only.
* Used by API could be cause of the unexpected behaviour of the Handsontable.
* @example
* ```js
* hot.updateSettings({
* contextMenu: true,
* colHeaders: true,
* fixedRowsTop: 2
* });
* ```
* @fires Hooks#afterCellMetaReset
* @fires Hooks#afterUpdateSettings
*/
this.updateSettings = function (settings, init) {
var columnsAsFunc = false;
var i = void 0;
var j = void 0;
var clen = void 0;
if ((0, _mixed.isDefined)(settings.rows)) {
throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');
}
if ((0, _mixed.isDefined)(settings.cols)) {
throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');
}
for (i in settings) {
if (i === 'data') {
/* eslint-disable-next-line no-continue */
continue; // loadData will be triggered later
} else if (i === 'language') {
setLanguage(settings.language);
/* eslint-disable-next-line no-continue */
continue;
} else if (_pluginHooks2.default.getSingleton().getRegistered().indexOf(i) > -1) {
if ((0, _function.isFunction)(settings[i]) || Array.isArray(settings[i])) {
settings[i].initialHook = true;
instance.addHook(i, settings[i]);
}
} else if (!init && (0, _object.hasOwnProperty)(settings, i)) {
// Update settings
GridSettings.prototype[i] = settings[i];
}
}
// Load data or create data map
if (settings.data === void 0 && priv.settings.data === void 0) {
instance.loadData(null); // data source created just now
} else if (settings.data !== void 0) {
instance.loadData(settings.data); // data source given as option
} else if (settings.columns !== void 0) {
datamap.createMap();
}
clen = instance.countCols();
var columnSetting = settings.columns || GridSettings.prototype.columns;
// Init columns constructors configuration
if (columnSetting && (0, _function.isFunction)(columnSetting)) {
clen = instance.countSourceCols();
columnsAsFunc = true;
}
// Clear cellSettings cache
if (settings.cell !== void 0 || settings.cells !== void 0 || settings.columns !== void 0) {
priv.cellSettings.length = 0;
}
if (clen > 0) {
var proto = void 0;
var column = void 0;
for (i = 0, j = 0; i < clen; i++) {
if (columnsAsFunc && !columnSetting(i)) {
/* eslint-disable no-continue */
continue;
}
priv.columnSettings[j] = (0, _setting.columnFactory)(GridSettings, priv.columnsSettingConflicts);
// shortcut for prototype
proto = priv.columnSettings[j].prototype;
// Use settings provided by user
if (columnSetting) {
if (columnsAsFunc) {
column = columnSetting(i);
} else {
column = columnSetting[j];
}
if (column) {
(0, _object.extend)(proto, column);
(0, _object.extend)(proto, expandType(column));
}
}
j++;
}
}
if ((0, _mixed.isDefined)(settings.cell)) {
for (var key in settings.cell) {
if ((0, _object.hasOwnProperty)(settings.cell, key)) {
var cell = settings.cell[key];
instance.setCellMetaObject(cell.row, cell.col, cell);
}
}
}
instance.runHooks('afterCellMetaReset');
if ((0, _mixed.isDefined)(settings.className)) {
if (GridSettings.prototype.className) {
(0, _element.removeClass)(instance.rootElement, GridSettings.prototype.className);
}
if (settings.className) {
(0, _element.addClass)(instance.rootElement, settings.className);
}
}
var currentHeight = instance.rootElement.style.height;
if (currentHeight !== '') {
currentHeight = parseInt(instance.rootElement.style.height, 10);
}
var height = settings.height;
if ((0, _function.isFunction)(height)) {
height = height();
}
if (init) {
var initialStyle = instance.rootElement.getAttribute('style');
if (initialStyle) {
instance.rootElement.setAttribute('data-initialstyle', instance.rootElement.getAttribute('style'));
}
}
if (height === null) {
var _initialStyle = instance.rootElement.getAttribute('data-initialstyle');
if (_initialStyle && (_initialStyle.indexOf('height') > -1 || _initialStyle.indexOf('overflow') > -1)) {
instance.rootElement.setAttribute('style', _initialStyle);
} else {
instance.rootElement.style.height = '';
instance.rootElement.style.overflow = '';
}
} else if (height !== void 0) {
instance.rootElement.style.height = height + 'px';
instance.rootElement.style.overflow = 'hidden';
}
if (typeof settings.width !== 'undefined') {
var width = settings.width;
if ((0, _function.isFunction)(width)) {
width = width();
}
instance.rootElement.style.width = width + 'px';
}
if (!init) {
datamap.clearLengthCache(); // force clear cache length on updateSettings() #3416
if (instance.view) {
instance.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked();
}
instance.runHooks('afterUpdateSettings', settings);
}
grid.adjustRowsAndCols();
if (instance.view && !priv.firstRun) {
instance.forceFullRender = true; // used when data was changed
selection.refreshBorders(null, true);
}
if (!init && instance.view && (currentHeight === '' || height === '' || height === void 0) && currentHeight !== height) {
instance.view.wt.wtOverlays.updateMainScrollableElements();
}
};
/**
* Get value from the selected cell.
*
* @memberof Core#
* @function getValue
* @since 0.11
* @returns {*} Value of selected cell.
*/
this.getValue = function () {
var sel = instance.getSelected();
if (GridSettings.prototype.getValue) {
if ((0, _function.isFunction)(GridSettings.prototype.getValue)) {
return GridSettings.prototype.getValue.call(instance);
} else if (sel) {
return instance.getData()[sel[0]][GridSettings.prototype.getValue];
}
} else if (sel) {
return instance.getDataAtCell(sel[0], sel[1]);
}
};
function expandType(obj) {
if (!(0, _object.hasOwnProperty)(obj, 'type')) {
// ignore obj.prototype.type
return;
}
var type,
expandedType = {};
if (_typeof(obj.type) === 'object') {
type = obj.type;
} else if (typeof obj.type === 'string') {
type = (0, _cellTypes.getCellType)(obj.type);
}
for (var i in type) {
if ((0, _object.hasOwnProperty)(type, i) && !(0, _object.hasOwnProperty)(obj, i)) {
expandedType[i] = type[i];
}
}
return expandedType;
}
/**
* Returns the object settings.
*
* @memberof Core#
* @function getSettings
* @returns {Object} Object containing the current grid settings.
*/
this.getSettings = function () {
return priv.settings;
};
/**
* Clears the data from the grid. (The table settings remain intact.)
*
* @memberof Core#
* @function clear
* @since 0.11
*/
this.clear = function () {
selection.selectAll();
selection.empty();
};
/**
* @memberof Core#
* @function alter
* @param {String} action See grid.alter for possible values: `"insert_row"`, `"insert_col"`, `"remove_row"`, `"remove_col"`
* @param {Number} index Visual index of the row/column before which the new row/column will be inserted/removed.
* @param {Number} [amount = 1] Amound of rows/columns to be inserted/removed.
* @param {String} [source] Source indicator.
* @param {Boolean} [keepEmptyRows] Flag for preventing deletion of empty rows.
* @description
*
* Allows altering the table structure by either inserting/removing rows or inserting/removing columns:
*
* Insert new row(s) above the row with a given `index`. If index is `null` or `undefined`, the new row will be
* added after the last row.
* ```js
* var hot = new Handsontable(document.getElementById('example'));
* hot.alter('insert_row', 10);
* ```
*
* Insert new column(s) before the column with a given `index`. If index is `null` or `undefined`, the new column
* will be added after the last column.
* ```js
* var hot = new Handsontable(document.getElementById('example'));
* hot.alter('insert_col', 10);
* ```
*
* Remove the row(s) at the given `index`.
* ```js
* var hot = new Handsontable(document.getElementById('example'));
* hot.alter('remove_row', 10);
* ```
*
* Remove the column(s) at the given `index`.
* ```js
* var hot = new Handsontable(document.getElementById('example'));
* hot.alter('remove_col', 10);
* ```
*/
this.alter = function (action, index, amount, source, keepEmptyRows) {
grid.alter(action, index, amount, source, keepEmptyRows);
};
/**
* Returns a TD element for the given `row` and `col` arguments, if it is rendered on screen.
* Returns `null` if the TD is not rendered on screen (probably because that part of the table is not visible).
*
* @memberof Core#
* @function getCell
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Boolean} topmost If set to true, it returns the TD element from the topmost overlay. For example,
* if the wanted cell is in the range of fixed rows, it will return a TD element from the `top` overlay.
* @returns {Element} The cell's TD element.
*/
this.getCell = function (row, col, topmost) {
return instance.view.getCellAtCoords(new _src.CellCoords(row, col), topmost);
};
/**
* Returns the coordinates of the cell, provided as a HTML Element.
*
* @memberof Core#
* @function getCoords
* @param {Element} elem The HTML Element representing the cell.
* @returns {CellCoords} Visual coordinates object.
*/
this.getCoords = function (elem) {
return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable, elem);
};
/**
* Returns the property name that corresponds with the given column index. {@link DataMap#colToProp}
* If the data source is an array of arrays, it returns the columns index.
*
* @memberof Core#
* @function colToProp
* @param {Number} col Visual column index.
* @returns {String|Number} Column property or physical column index.
*/
this.colToProp = function (col) {
return datamap.colToProp(col);
};
/**
* Returns column index that corresponds with the given property. {@link DataMap#propToCol}
*
* @memberof Core#
* @function propToCol
* @param {String|Number} prop Property name or physical column index.
* @returns {Number} Visual column index.
*/
this.propToCol = function (prop) {
return datamap.propToCol(prop);
};
/**
* Translate physical row index into visual.
*
* @since 0.29.0
* @memberof Core#
* @function toVisualRow
* @param {Number} row Physical row index.
* @returns {Number} Returns visual row index.
*/
this.toVisualRow = function (row) {
return recordTranslator.toVisualRow(row);
};
/**
* Translate physical column index into visual.
*
* @since 0.29.0
* @memberof Core#
* @function toVisualColumn
* @param {Number} column Physical column index.
* @returns {Number} Returns visual column index.
*/
this.toVisualColumn = function (column) {
return recordTranslator.toVisualColumn(column);
};
/**
* Translate visual row index into physical.
* If displayed rows order is different than the order of rows stored in memory (i.e. sorting is applied)
* to retrieve valid physical row index you can use this method.
*
* @since 0.29.0
* @memberof Core#
* @function toPhysicalRow
* @param {Number} row Visual row index.
* @returns {Number} Returns physical row index.
*/
this.toPhysicalRow = function (row) {
return recordTranslator.toPhysicalRow(row);
};
/**
* Translate visual column index into physical.
* If displayed columns order is different than the order of columns stored in memory (i.e. manual column move is applied)
* to retrieve valid physical column index you can use this method.
*
* @since 0.29.0
* @memberof Core#
* @function toPhysicalColumn
* @param {Number} column Visual column index.
* @returns {Number} Returns physical column index.
*/
this.toPhysicalColumn = function (column) {
return recordTranslator.toPhysicalColumn(column);
};
/**
* @description
* Returns the cell value at `row`, `col`. `row` and `col` are the __visible__ indexes (note, that if columns were reordered or sorted,
* the currently visible order will be used).
*
* @memberof Core#
* @function getDataAtCell
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {String|Boolean|null} Data at cell.
*/
this.getDataAtCell = function (row, col) {
return datamap.get(row, datamap.colToProp(col));
};
/**
* Return value at `row`, `prop`. (Uses {@link DataMap#get})
*
* @memberof Core#
* @function getDataAtRowProp
* @param {Number} row Visual row index.
* @param {String} prop Property name.
* @returns {*} Cell value.
*/
this.getDataAtRowProp = function (row, prop) {
return datamap.get(row, prop);
};
/**
* @description
* Returns array of column values from the data source. `col` is the __visible__ index of the column.
* Note, that if columns were reordered or sorted, the currently visible order will be used.
*
* @memberof Core#
* @function getDataAtCol
* @since 0.9-beta2
* @param {Number} col Visual column index.
* @returns {Array} Array of cell values.
*/
this.getDataAtCol = function (col) {
var out = [];
return out.concat.apply(out, _toConsumableArray(datamap.getRange(new _src.CellCoords(0, col), new _src.CellCoords(priv.settings.data.length - 1, col), datamap.DESTINATION_RENDERER)));
};
/**
* Given the object property name (e.g. `'first.name'`), returns an array of column's values from the data source.
* You can also provide a column index as the first argument.
*
* @memberof Core#
* @function getDataAtProp
* @since 0.9-beta2
* @param {String|Number} prop Property name / physical column index.
* @returns {Array} Array of cell values.
*/
// TODO: Getting data from `datamap` should work on visual indexes.
this.getDataAtProp = function (prop) {
var out = [],
range;
range = datamap.getRange(new _src.CellCoords(0, datamap.propToCol(prop)), new _src.CellCoords(priv.settings.data.length - 1, datamap.propToCol(prop)), datamap.DESTINATION_RENDERER);
return out.concat.apply(out, _toConsumableArray(range));
};
/**
* Returns the source data object (the same that was passed by `data` configuration option or `loadData` method).
* Optionally you can provide a cell range by using the `row`, `col`, `row2`, `col2` arguments, to get only a fragment of grid data.
*
* @memberof Core#
* @function getSourceData
* @since 0.20.0
* @param {Number} [r] From physical row index.
* @param {Number} [c] From physical column index (or visual index, if data type is an array of objects).
* @param {Number} [r2] To physical row index.
* @param {Number} [c2] To physical column index (or visual index, if data type is an array of objects).
* @returns {Array} Array of grid data.
*/
this.getSourceData = function (r, c, r2, c2) {
var data = void 0;
if (r === void 0) {
data = dataSource.getData();
} else {
data = dataSource.getByRange(new _src.CellCoords(r, c), new _src.CellCoords(r2, c2));
}
return data;
};
/**
* Returns the source data object as an arrays of arrays format even when source data was provided in another format.
* Optionally you can provide a cell range by using the `row`, `col`, `row2`, `col2` arguments, to get only a fragment of grid data.
*
* @memberof Core#
* @function getSourceDataArray
* @since 0.28.0
* @param {Number} [r] From physical row index.
* @param {Number} [c] From physical column index (or visual index, if data type is an array of objects).
* @param {Number} [r2] To physical row index.
* @param {Number} [c2] To physical column index (or visual index, if data type is an array of objects).
* @returns {Array} An array of arrays.
*/
this.getSourceDataArray = function (r, c, r2, c2) {
var data = void 0;
if (r === void 0) {
data = dataSource.getData(true);
} else {
data = dataSource.getByRange(new _src.CellCoords(r, c), new _src.CellCoords(r2, c2), true);
}
return data;
};
/**
* Returns an array of column values from the data source. `col` is the index of the row in the data source.
*
* @memberof Core#
* @function getSourceDataAtCol
* @since 0.11.0-beta3
* @param {Number} column Visual column index.
* @returns {Array} Array of the column's cell values.
*/
// TODO: Getting data from `sourceData` should work always on physical indexes.
this.getSourceDataAtCol = function (column) {
return dataSource.getAtColumn(column);
};
/**
* Returns a single row of the data (array or object, depending on what you have). `row` is the index of the row in the data source.
*
* @memberof Core#
* @function getSourceDataAtRow
* @since 0.11.0-beta3
* @param {Number} row Physical row index.
* @returns {Array|Object} Single row of data.
*/
this.getSourceDataAtRow = function (row) {
return dataSource.getAtRow(row);
};
/**
* Returns a single value from the data source.
*
* @memberof Core#
* @function getSourceDataAtCell
* @param {Number} row Physical row index.
* @param {Number} column Visual column index.
* @returns {*} Cell data.
* @since 0.20.0
*/
// TODO: Getting data from `sourceData` should work always on physical indexes.
this.getSourceDataAtCell = function (row, column) {
return dataSource.getAtCell(row, column);
};
/**
* @description
* Returns a single row of the data. The `row` argument is the __visible__ index of the row.
*
* @memberof Core#
* @function getDataAtRow
* @param {Number} row Visual row index.
* @returns {Array} Array of row's cell data.
* @since 0.9-beta2
*/
this.getDataAtRow = function (row) {
var data = datamap.getRange(new _src.CellCoords(row, 0), new _src.CellCoords(row, this.countCols() - 1), datamap.DESTINATION_RENDERER);
return data[0] || [];
};
/**
* @description
* Returns a data type defined in the Handsontable settings under the `type` key ([Options#type](http://docs.handsontable.com/Options.html#type)).
* If there are cells with different types in the selected range, it returns `'mixed'`.
*
* @since 0.18.1
* @memberof Core#
* @function getDataType
* @param {Number} rowFrom From visual row index.
* @param {Number} columnFrom From visual column index.
* @param {Number} rowTo To visual row index.
* @param {Number} columnTo To visual column index.
* @returns {String} Cell type (e.q: `'mixed'`, `'text'`, `'numeric'`, `'autocomplete'`).
*/
this.getDataType = function (rowFrom, columnFrom, rowTo, columnTo) {
var _this = this;
var previousType = null;
var currentType = null;
if (rowFrom === void 0) {
rowFrom = 0;
rowTo = this.countRows();
columnFrom = 0;
columnTo = this.countCols();
}
if (rowTo === void 0) {
rowTo = rowFrom;
}
if (columnTo === void 0) {
columnTo = columnFrom;
}
var type = 'mixed';
(0, _number.rangeEach)(Math.min(rowFrom, rowTo), Math.max(rowFrom, rowTo), function (row) {
var isTypeEqual = true;
(0, _number.rangeEach)(Math.min(columnFrom, columnTo), Math.max(columnFrom, columnTo), function (column) {
var cellType = _this.getCellMeta(row, column);
currentType = cellType.type;
if (previousType) {
isTypeEqual = previousType === currentType;
} else {
previousType = currentType;
}
return isTypeEqual;
});
type = isTypeEqual ? currentType : 'mixed';
return isTypeEqual;
});
return type;
};
/**
* Remove a property defined by the `key` argument from the cell meta object for the provided `row` and `col` coordinates.
*
* @memberof Core#
* @function removeCellMeta
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} key Property name.
* @fires Hooks#beforeRemoveCellMeta
* @fires Hooks#afterRemoveCellMeta
*/
this.removeCellMeta = function (row, col, key) {
var _recordTranslator$toP = recordTranslator.toPhysical(row, col),
_recordTranslator$toP2 = _slicedToArray(_recordTranslator$toP, 2),
physicalRow = _recordTranslator$toP2[0],
physicalColumn = _recordTranslator$toP2[1];
var cachedValue = priv.cellSettings[physicalRow][physicalColumn][key];
var hookResult = instance.runHooks('beforeRemoveCellMeta', row, col, key, cachedValue);
if (hookResult !== false) {
delete priv.cellSettings[physicalRow][physicalColumn][key];
instance.runHooks('afterRemoveCellMeta', row, col, key, cachedValue);
}
cachedValue = null;
};
/**
* Remove one or more rows from the cell meta object.
*
* @since 0.30.0
* @param {Number} index An integer that specifies at what position to add/remove items, Use negative values to specify the position from the end of the array.
* @param {Number} deleteAmount The number of items to be removed. If set to 0, no items will be removed.
* @param {Array} items The new items to be added to the array.
*/
this.spliceCellsMeta = function (index, deleteAmount) {
var _priv$cellSettings;
for (var _len2 = arguments.length, items = Array(_len2 > 2 ? _len2 - 2 : 0), _key = 2; _key < _len2; _key++) {
items[_key - 2] = arguments[_key];
}
(_priv$cellSettings = priv.cellSettings).splice.apply(_priv$cellSettings, [index, deleteAmount].concat(items));
};
/**
* Set cell meta data object defined by `prop` to the corresponding params `row` and `col`.
*
* @memberof Core#
* @function setCellMetaObject
* @since 0.11
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Object} prop Meta object.
*/
this.setCellMetaObject = function (row, col, prop) {
if ((typeof prop === 'undefined' ? 'undefined' : _typeof(prop)) === 'object') {
for (var key in prop) {
if ((0, _object.hasOwnProperty)(prop, key)) {
var value = prop[key];
this.setCellMeta(row, col, key, value);
}
}
}
};
/**
* Sets a property defined by the `key` object to the meta object of a cell corresponding to params `row` and `col`.
*
* @memberof Core#
* @function setCellMeta
* @since 0.11
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} key Property name.
* @param {String} val Property value.
* @fires Hooks#afterSetCellMeta
*/
this.setCellMeta = function (row, col, key, val) {
var _recordTranslator$toP3 = recordTranslator.toPhysical(row, col),
_recordTranslator$toP4 = _slicedToArray(_recordTranslator$toP3, 2),
physicalRow = _recordTranslator$toP4[0],
physicalColumn = _recordTranslator$toP4[1];
if (!priv.columnSettings[physicalColumn]) {
priv.columnSettings[physicalColumn] = (0, _setting.columnFactory)(GridSettings, priv.columnsSettingConflicts);
}
if (!priv.cellSettings[physicalRow]) {
priv.cellSettings[physicalRow] = [];
}
if (!priv.cellSettings[physicalRow][physicalColumn]) {
priv.cellSettings[physicalRow][physicalColumn] = new priv.columnSettings[physicalColumn]();
}
priv.cellSettings[physicalRow][physicalColumn][key] = val;
instance.runHooks('afterSetCellMeta', row, col, key, val);
};
/**
* Get all the cells meta settings at least once generated in the table (in order of cell initialization).
*
* @since 0.19.0
* @returns {Array} Returns Array of ColumnSettings object.
*/
this.getCellsMeta = function () {
return (0, _array.arrayFlatten)(priv.cellSettings);
};
/**
* Returns the cell properties object for the given `row` and `col` coordinates.
*
* @memberof Core#
* @function getCellMeta
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {Object} The cell properties object.
* @fires Hooks#beforeGetCellMeta
* @fires Hooks#afterGetCellMeta
*/
this.getCellMeta = function (row, col) {
var prop = datamap.colToProp(col);
var cellProperties = void 0;
var _recordTranslator$toP5 = recordTranslator.toPhysical(row, col),
_recordTranslator$toP6 = _slicedToArray(_recordTranslator$toP5, 2),
physicalRow = _recordTranslator$toP6[0],
physicalColumn = _recordTranslator$toP6[1];
// Workaround for #11. Connected also with #3849. It should be fixed within #4497.
if (physicalRow === null) {
physicalRow = row;
}
if (!priv.columnSettings[physicalColumn]) {
priv.columnSettings[physicalColumn] = (0, _setting.columnFactory)(GridSettings, priv.columnsSettingConflicts);
}
if (!priv.cellSettings[physicalRow]) {
priv.cellSettings[physicalRow] = [];
}
if (!priv.cellSettings[physicalRow][physicalColumn]) {
priv.cellSettings[physicalRow][physicalColumn] = new priv.columnSettings[physicalColumn]();
}
cellProperties = priv.cellSettings[physicalRow][physicalColumn]; // retrieve cellProperties from cache
cellProperties.row = physicalRow;
cellProperties.col = physicalColumn;
cellProperties.visualRow = row;
cellProperties.visualCol = col;
cellProperties.prop = prop;
cellProperties.instance = instance;
instance.runHooks('beforeGetCellMeta', row, col, cellProperties);
(0, _object.extend)(cellProperties, expandType(cellProperties)); // for `type` added in beforeGetCellMeta
if (cellProperties.cells) {
var settings = cellProperties.cells.call(cellProperties, physicalRow, physicalColumn, prop);
if (settings) {
(0, _object.extend)(cellProperties, settings);
(0, _object.extend)(cellProperties, expandType(settings)); // for `type` added in cells
}
}
instance.runHooks('afterGetCellMeta', row, col, cellProperties);
return cellProperties;
};
/**
* Returns a row off the cell meta array.
*
* @memberof Core#
* @function getCellMetaAtRow
* @since 0.30.0
* @param {Number} row Physical index of the row to return cell meta for.
* @returns {Array}
*/
this.getCellMetaAtRow = function (row) {
return priv.cellSettings[row];
};
/**
* Checks if the data format and config allows user to modify the column structure.
* @returns {boolean}
*/
this.isColumnModificationAllowed = function () {
return !(instance.dataType === 'object' || instance.getSettings().columns);
};
var rendererLookup = (0, _data.cellMethodLookupFactory)('renderer');
/**
* Returns the cell renderer function by given `row` and `col` arguments.
*
* @memberof Core#
* @function getCellRenderer
* @since 0.11
* @param {Number|Object} row Visual row index or cell meta object.
* @param {Number} [col] Visual column index.
* @returns {Function} The renderer function.
*/
this.getCellRenderer = function (row, col) {
return (0, _renderers.getRenderer)(rendererLookup.call(this, row, col));
};
/**
* Returns the cell editor by the provided `row` and `col` arguments.
*
* @memberof Core#
* @function getCellEditor
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {Object} The Editor object.
*/
this.getCellEditor = (0, _data.cellMethodLookupFactory)('editor');
var validatorLookup = (0, _data.cellMethodLookupFactory)('validator');
/**
* Returns the cell validator by `row` and `col`, provided a validator is defined. If not - it doesn't return anything.
*
* @memberof Core#
* @function getCellValidator
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {Function|RegExp|undefined} The validator function.
*/
this.getCellValidator = function (row, col) {
var validator = validatorLookup.call(this, row, col);
if (typeof validator === 'string') {
validator = (0, _validators.getValidator)(validator);
}
return validator;
};
/**
* Validates all cells using their validator functions and calls callback when finished.
*
* If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.
*
* @memberof Core#
* @function validateCells
* @param {Function} [callback] The callback function.
*/
this.validateCells = function (callback) {
this._validateCells(callback);
};
/**
* Validates rows using their validator functions and calls callback when finished.
*
* If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.
*
* @memberof Core#
* @function validateRows
* @param {Array} [rows] Array of validation target visual row indexes.
* @param {Function} [callback] The callback function.
*/
this.validateRows = function (rows, callback) {
if (!Array.isArray(rows)) {
throw new Error('validateRows parameter `rows` must be an array');
}
this._validateCells(callback, rows);
};
/**
* Validates columns using their validator functions and calls callback when finished.
*
* If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.
*
* @memberof Core#
* @function validateColumns
* @param {Array} [columns] Array of validation target visual columns indexes.
* @param {Function} [callback] The callback function.
*/
this.validateColumns = function (columns, callback) {
if (!Array.isArray(columns)) {
throw new Error('validateColumns parameter `columns` must be an array');
}
this._validateCells(callback, undefined, columns);
};
/**
* Validates all cells using their validator functions and calls callback when finished.
*
* If one of the cells is invalid, the callback will be fired with `'valid'` arguments as `false` - otherwise it would equal `true`.
*
* Private use intended.
*
* @private
* @memberof Core#
* @function _validateCells
* @param {Function} [callback] The callback function.
* @param {Array} [rows] Optional. Array of validation target visual row indexes.
* @param {Array} [columns] Optional. Array of validation target visual column indexes.
*/
this._validateCells = function (callback, rows, columns) {
var waitingForValidator = new ValidatorsQueue();
if (callback) {
waitingForValidator.onQueueEmpty = callback;
}
var i = instance.countRows() - 1;
while (i >= 0) {
if (rows !== undefined && rows.indexOf(i) === -1) {
i--;
continue;
}
var j = instance.countCols() - 1;
while (j >= 0) {
if (columns !== undefined && columns.indexOf(j) === -1) {
j--;
continue;
}
waitingForValidator.addValidatorToQueue();
instance.validateCell(instance.getDataAtCell(i, j), instance.getCellMeta(i, j), function (result) {
if (typeof result !== 'boolean') {
throw new Error('Validation error: result is not boolean');
}
if (result === false) {
waitingForValidator.valid = false;
}
waitingForValidator.removeValidatorFormQueue();
}, 'validateCells');
j--;
}
i--;
}
waitingForValidator.checkIfQueueIsEmpty();
};
/**
* Returns an array of row headers' values (if they are enabled). If param `row` was given, it returns the header of the given row as a string.
*
* @memberof Core#
* @function getRowHeader
* @param {Number} [row] Visual row index.
* @fires Hooks#modifyRowHeader
* @returns {Array|String} Array of header values / single header value.
*/
this.getRowHeader = function (row) {
var rowHeader = priv.settings.rowHeaders;
if (row !== void 0) {
row = instance.runHooks('modifyRowHeader', row);
}
if (row === void 0) {
rowHeader = [];
(0, _number.rangeEach)(instance.countRows() - 1, function (i) {
rowHeader.push(instance.getRowHeader(i));
});
} else if (Array.isArray(rowHeader) && rowHeader[row] !== void 0) {
rowHeader = rowHeader[row];
} else if ((0, _function.isFunction)(rowHeader)) {
rowHeader = rowHeader(row);
} else if (rowHeader && typeof rowHeader !== 'string' && typeof rowHeader !== 'number') {
rowHeader = row + 1;
}
return rowHeader;
};
/**
* Returns information about if this table is configured to display row headers.
*
* @memberof Core#
* @function hasRowHeaders
* @returns {Boolean} `true` if the instance has the row headers enabled, `false` otherwise.
* @since 0.11
*/
this.hasRowHeaders = function () {
return !!priv.settings.rowHeaders;
};
/**
* Returns information about if this table is configured to display column headers.
*
* @memberof Core#
* @function hasColHeaders
* @since 0.11
* @returns {Boolean} `True` if the instance has the column headers enabled, `false` otherwise.
*/
this.hasColHeaders = function () {
if (priv.settings.colHeaders !== void 0 && priv.settings.colHeaders !== null) {
// Polymer has empty value = null
return !!priv.settings.colHeaders;
}
for (var i = 0, ilen = instance.countCols(); i < ilen; i++) {
if (instance.getColHeader(i)) {
return true;
}
}
return false;
};
/**
* Returns an array of column headers (in string format, if they are enabled). If param `col` is given, it returns the header at the given column as a string.
*
* @memberof Core#
* @function getColHeader
* @param {Number} [col] Visual column index.
* @fires Hooks#modifyColHeader
* @returns {Array|String} The column header(s).
*/
this.getColHeader = function (col) {
var columnsAsFunc = priv.settings.columns && (0, _function.isFunction)(priv.settings.columns);
var result = priv.settings.colHeaders;
col = instance.runHooks('modifyColHeader', col);
if (col === void 0) {
var out = [];
var ilen = columnsAsFunc ? instance.countSourceCols() : instance.countCols();
for (var i = 0; i < ilen; i++) {
out.push(instance.getColHeader(i));
}
result = out;
} else {
var translateVisualIndexToColumns = function translateVisualIndexToColumns(col) {
var arr = [];
var columnsLen = instance.countSourceCols();
var index = 0;
for (; index < columnsLen; index++) {
if ((0, _function.isFunction)(instance.getSettings().columns) && instance.getSettings().columns(index)) {
arr.push(index);
}
}
return arr[col];
};
var baseCol = col;
col = instance.runHooks('modifyCol', col);
var prop = translateVisualIndexToColumns(col);
if (priv.settings.columns && (0, _function.isFunction)(priv.settings.columns) && priv.settings.columns(prop) && priv.settings.columns(prop).title) {
result = priv.settings.columns(prop).title;
} else if (priv.settings.columns && priv.settings.columns[col] && priv.settings.columns[col].title) {
result = priv.settings.columns[col].title;
} else if (Array.isArray(priv.settings.colHeaders) && priv.settings.colHeaders[col] !== void 0) {
result = priv.settings.colHeaders[col];
} else if ((0, _function.isFunction)(priv.settings.colHeaders)) {
result = priv.settings.colHeaders(col);
} else if (priv.settings.colHeaders && typeof priv.settings.colHeaders !== 'string' && typeof priv.settings.colHeaders !== 'number') {
result = (0, _data.spreadsheetColumnLabel)(baseCol); // see #1458
}
}
return result;
};
/**
* Return column width from settings (no guessing). Private use intended.
*
* @private
* @memberof Core#
* @function _getColWidthFromSettings
* @param {Number} col Visual col index.
* @returns {Number}
*/
this._getColWidthFromSettings = function (col) {
var cellProperties = instance.getCellMeta(0, col);
var width = cellProperties.width;
if (width === void 0 || width === priv.settings.width) {
width = cellProperties.colWidths;
}
if (width !== void 0 && width !== null) {
switch (typeof width === 'undefined' ? 'undefined' : _typeof(width)) {
case 'object':
// array
width = width[col];
break;
case 'function':
width = width(col);
break;
default:
break;
}
if (typeof width === 'string') {
width = parseInt(width, 10);
}
}
return width;
};
/**
* Returns the width of the requested column.
*
* @memberof Core#
* @function getColWidth
* @since 0.11
* @param {Number} col Visual column index.
* @returns {Number} Column width.
* @fires Hooks#modifyColWidth
*/
this.getColWidth = function (col) {
var width = instance._getColWidthFromSettings(col);
width = instance.runHooks('modifyColWidth', width, col);
if (width === void 0) {
width = _src.ViewportColumnsCalculator.DEFAULT_WIDTH;
}
return width;
};
/**
* Return row height from settings (no guessing). Private use intended.
*
* @private
* @memberof Core#
* @function _getRowHeightFromSettings
* @param {Number} row Visual row index.
* @returns {Number}
*/
this._getRowHeightFromSettings = function (row) {
// let cellProperties = instance.getCellMeta(row, 0);
// let height = cellProperties.height;
//
// if (height === void 0 || height === priv.settings.height) {
// height = cellProperties.rowHeights;
// }
var height = priv.settings.rowHeights;
if (height !== void 0 && height !== null) {
switch (typeof height === 'undefined' ? 'undefined' : _typeof(height)) {
case 'object':
// array
height = height[row];
break;
case 'function':
height = height(row);
break;
default:
break;
}
if (typeof height === 'string') {
height = parseInt(height, 10);
}
}
return height;
};
/**
* Returns the row height.
*
* @memberof Core#
* @function getRowHeight
* @since 0.11
* @param {Number} row Visual row index.
* @returns {Number} The given row's height.
* @fires Hooks#modifyRowHeight
*/
this.getRowHeight = function (row) {
var height = instance._getRowHeightFromSettings(row);
height = instance.runHooks('modifyRowHeight', height, row);
return height;
};
/**
* Returns the total number of rows in the data source.
*
* @memberof Core#
* @function countSourceRows
* @since 0.20.0
* @returns {Number} Total number in rows in data source.
*/
this.countSourceRows = function () {
var sourceLength = instance.runHooks('modifySourceLength');
return sourceLength || (instance.getSourceData() ? instance.getSourceData().length : 0);
};
/**
* Returns the total number of columns in the data source.
*
* @memberof Core#
* @function countSourceCols
* @since 0.26.1
* @returns {Number} Total number in columns in data source.
*/
this.countSourceCols = function () {
var len = 0;
var obj = instance.getSourceData() && instance.getSourceData()[0] ? instance.getSourceData()[0] : [];
if ((0, _object.isObject)(obj)) {
len = (0, _object.deepObjectSize)(obj);
} else {
len = obj.length || 0;
}
return len;
};
/**
* Returns the total number of rows in the grid.
*
* @memberof Core#
* @function countRows
* @returns {Number} Total number in rows the grid.
*/
this.countRows = function () {
return datamap.getLength();
};
/**
* Returns the total number of columns in the grid.
*
* @memberof Core#
* @function countCols
* @returns {Number} Total number of columns.
*/
this.countCols = function () {
var maxCols = this.getSettings().maxCols;
var dataHasLength = false;
var dataLen = 0;
if (instance.dataType === 'array') {
dataHasLength = priv.settings.data && priv.settings.data[0] && priv.settings.data[0].length;
}
if (dataHasLength) {
dataLen = priv.settings.data[0].length;
}
if (priv.settings.columns) {
var columnsIsFunction = (0, _function.isFunction)(priv.settings.columns);
if (columnsIsFunction) {
if (instance.dataType === 'array') {
var columnLen = 0;
for (var i = 0; i < dataLen; i++) {
if (priv.settings.columns(i)) {
columnLen++;
}
}
dataLen = columnLen;
} else if (instance.dataType === 'object' || instance.dataType === 'function') {
dataLen = datamap.colToPropCache.length;
}
} else {
dataLen = priv.settings.columns.length;
}
} else if (instance.dataType === 'object' || instance.dataType === 'function') {
dataLen = datamap.colToPropCache.length;
}
return Math.min(maxCols, dataLen);
};
/**
* Returns an visual index of the first rendered row.
*
* @memberof Core#
* @function rowOffset
* @returns {Number} Visual index of first rendered row.
*/
this.rowOffset = function () {
return instance.view.wt.wtTable.getFirstRenderedRow();
};
/**
* Returns the visual index of the first rendered column.
*
* @memberof Core#
* @function colOffset
* @returns {Number} Visual index of the first visible column.
*/
this.colOffset = function () {
return instance.view.wt.wtTable.getFirstRenderedColumn();
};
/**
* Returns the number of rendered rows (including rows partially or fully rendered outside viewport).
*
* @memberof Core#
* @function countRenderedRows
* @returns {Number} Returns -1 if table is not visible.
*/
this.countRenderedRows = function () {
return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedRowsCount() : -1;
};
/**
* Returns the number of visible rows (rendered rows that fully fit inside viewport).
*
* @memberof Core#
* @function countVisibleRows
* @returns {Number} Number of visible rows or -1.
*/
this.countVisibleRows = function () {
return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleRowsCount() : -1;
};
/**
* Returns the number of rendered columns (including columns partially or fully rendered outside viewport).
*
* @memberof Core#
* @function countRenderedCols
* @returns {Number} Returns -1 if table is not visible.
*/
this.countRenderedCols = function () {
return instance.view.wt.drawn ? instance.view.wt.wtTable.getRenderedColumnsCount() : -1;
};
/**
* Returns the number of visible columns. Returns -1 if table is not visible
*
* @memberof Core#
* @function countVisibleCols
* @return {Number} Number of visible columns or -1.
*/
this.countVisibleCols = function () {
return instance.view.wt.drawn ? instance.view.wt.wtTable.getVisibleColumnsCount() : -1;
};
/**
* Returns the number of empty rows. If the optional ending parameter is `true`, returns the
* number of empty rows at the bottom of the table.
*
* @memberof Core#
* @function countEmptyRows
* @param {Boolean} [ending] If `true`, will only count empty rows at the end of the data source.
* @returns {Number} Count empty rows
* @fires Hooks#modifyRow
*/
this.countEmptyRows = function (ending) {
var i = instance.countRows() - 1,
empty = 0,
row;
while (i >= 0) {
row = instance.runHooks('modifyRow', i);
if (instance.isEmptyRow(row)) {
empty++;
} else if (ending) {
break;
}
i--;
}
return empty;
};
/**
* Returns the number of empty columns. If the optional ending parameter is `true`, returns the number of empty
* columns at right hand edge of the table.
*
* @memberof Core#
* @function countEmptyCols
* @param {Boolean} [ending] If `true`, will only count empty columns at the end of the data source row.
* @returns {Number} Count empty cols
*/
this.countEmptyCols = function (ending) {
if (instance.countRows() < 1) {
return 0;
}
var i = instance.countCols() - 1,
empty = 0;
while (i >= 0) {
if (instance.isEmptyCol(i)) {
empty++;
} else if (ending) {
break;
}
i--;
}
return empty;
};
/**
* Check if all cells in the row declared by the `row` argument are empty.
*
* @memberof Core#
* @function isEmptyRow
* @param {Number} row Row index.
* @returns {Boolean} `true` if the row at the given `row` is empty, `false` otherwise.
*/
this.isEmptyRow = function (row) {
return priv.settings.isEmptyRow.call(instance, row);
};
/**
* Check if all cells in the the column declared by the `col` argument are empty.
*
* @memberof Core#
* @function isEmptyCol
* @param {Number} col Column index.
* @returns {Boolean} `true` if the column at the given `col` is empty, `false` otherwise.
*/
this.isEmptyCol = function (col) {
return priv.settings.isEmptyCol.call(instance, col);
};
/**
* Select cell specified by `row` and `col` values or a range of cells finishing at `endRow`, `endCol`.
* By default, viewport will be scrolled to selection.
* After the `selectCell` method had finished, the instance will be listening to keyboard input on the document.
*
* @memberof Core#
* @function selectCell
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Number} [endRow] Visual end row index (if selecting a range).
* @param {Number} [endCol] Visual end column index (if selecting a range).
* @param {Boolean} [scrollToCell=true] If `true`, the viewport will be scrolled to the selection.
* @param {Boolean} [changeListener=true] If `false`, Handsontable will not change keyboard events listener to himself.
* @returns {Boolean} `true` if selection was successful, `false` otherwise.
*/
this.selectCell = function (row, col, endRow, endCol, scrollToCell, changeListener) {
var coords;
changeListener = (0, _mixed.isUndefined)(changeListener) || changeListener === true;
if (typeof row !== 'number' || row < 0 || row >= instance.countRows()) {
return false;
}
if (typeof col !== 'number' || col < 0 || col >= instance.countCols()) {
return false;
}
if ((0, _mixed.isDefined)(endRow)) {
if (typeof endRow !== 'number' || endRow < 0 || endRow >= instance.countRows()) {
return false;
}
if (typeof endCol !== 'number' || endCol < 0 || endCol >= instance.countCols()) {
return false;
}
}
coords = new _src.CellCoords(row, col);
priv.selRange = new _src.CellRange(coords, coords, coords);
if (changeListener) {
instance.listen();
}
if ((0, _mixed.isUndefined)(endRow)) {
selection.setRangeEnd(priv.selRange.from, scrollToCell);
} else {
selection.setRangeEnd(new _src.CellCoords(endRow, endCol), scrollToCell);
}
instance.selection.finish();
return true;
};
/**
* Select the cell specified by the `row` and `prop` arguments, or a range finishing at `endRow`, `endProp`.
* By default, viewport will be scrolled to selection.
*
* @memberof Core#
* @function selectCellByProp
* @param {Number} row Visual row index.
* @param {String} prop Property name.
* @param {Number} [endRow] visual end row index (if selecting a range).
* @param {String} [endProp] End property name (if selecting a range).
* @param {Boolean} [scrollToCell=true] If `true`, viewport will be scrolled to the selection.
* @returns {Boolean} `true` if selection was successful, `false` otherwise.
*/
this.selectCellByProp = function (row, prop, endRow, endProp, scrollToCell) {
var _instance5;
arguments[1] = datamap.propToCol(arguments[1]);
if ((0, _mixed.isDefined)(arguments[3])) {
arguments[3] = datamap.propToCol(arguments[3]);
}
return (_instance5 = instance).selectCell.apply(_instance5, arguments);
};
/**
* Deselects the current cell selection on grid.
*
* @memberof Core#
* @function deselectCell
*/
this.deselectCell = function () {
selection.deselect();
};
/**
* Scroll viewport to coords specified by the `row` and `column` arguments.
*
* @since 0.24.3
* @memberof Core#
* @function scrollViewportTo
* @param {Number} [row] Visual row index.
* @param {Number} [column] Visual column index.
* @param {Boolean} [snapToBottom = false] If `true`, viewport is scrolled to show the cell on the bottom of the table.
* @param {Boolean} [snapToRight = false] If `true`, viewport is scrolled to show the cell on the right side of the table.
* @returns {Boolean} `true` if scroll was successful, `false` otherwise.
*/
this.scrollViewportTo = function (row, column) {
var snapToBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var snapToRight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
if (row !== void 0 && (row < 0 || row >= instance.countRows())) {
return false;
}
if (column !== void 0 && (column < 0 || column >= instance.countCols())) {
return false;
}
var result = false;
if (row !== void 0 && column !== void 0) {
instance.view.wt.wtOverlays.topOverlay.scrollTo(row, snapToBottom);
instance.view.wt.wtOverlays.leftOverlay.scrollTo(column, snapToRight);
result = true;
}
if (typeof row === 'number' && typeof column !== 'number') {
instance.view.wt.wtOverlays.topOverlay.scrollTo(row, snapToBottom);
result = true;
}
if (typeof column === 'number' && typeof row !== 'number') {
instance.view.wt.wtOverlays.leftOverlay.scrollTo(column, snapToRight);
result = true;
}
return result;
};
/**
* Removes grid from the DOM.
*
* @memberof Core#
* @function destroy
* @fires Hooks#afterDestroy
*/
this.destroy = function () {
instance._clearTimeouts();
if (instance.view) {
// in case HT is destroyed before initialization has finished
instance.view.destroy();
}
if (dataSource) {
dataSource.destroy();
}
dataSource = null;
if (false) {
var licenseInfo = document.querySelector('#hot-display-license-info');
if (licenseInfo) {
licenseInfo.parentNode.removeChild(licenseInfo);
}
}
(0, _element.empty)(instance.rootElement);
eventManager.destroy();
instance.runHooks('afterDestroy');
_pluginHooks2.default.getSingleton().destroy(instance);
for (var i in instance) {
if ((0, _object.hasOwnProperty)(instance, i)) {
// replace instance methods with post mortem
if ((0, _function.isFunction)(instance[i])) {
instance[i] = postMortem;
} else if (i !== 'guid') {
// replace instance properties with null (restores memory)
// it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests
instance[i] = null;
}
}
}
// replace private properties with null (restores memory)
// it should not be necessary but this prevents a memory leak side effects that show itself in Jasmine tests
if (datamap) {
datamap.destroy();
}
datamap = null;
priv = null;
grid = null;
selection = null;
editorManager = null;
instance = null;
GridSettings = null;
};
/**
* Replacement for all methods after Handsotnable was destroyed.
*
* @private
*/
function postMortem() {
throw new Error('This method cannot be called because this Handsontable instance has been destroyed');
}
/**
* Returns the active editor object.
*
* @memberof Core#
* @function getActiveEditor
* @returns {Object} The active editor object.
*/
this.getActiveEditor = function () {
return editorManager.getActiveEditor();
};
/**
* Returns plugin instance using the plugin name provided.
*
* @memberof Core#
* @function getPlugin
* @param {String} pluginName The plugin name.
* @returns {*} The plugin instance.
* @since 0.15.0
*/
this.getPlugin = function (pluginName) {
return (0, _plugins.getPlugin)(this, pluginName);
};
/**
* Returns the Handsontable instance.
*
* @memberof Core#
* @function getInstance
* @returns {Handsontable} The Handsontable instance.
*/
this.getInstance = function () {
return instance;
};
/**
* Adds listener to the specified hook name (only for this Handsontable instance).
*
* @memberof Core#
* @function addHook
* @see Hooks#add
* @param {String} key Hook name.
* @param {Function|Array} callback Function or array of Functions.
*
* @example
* ```js
* hot.addHook('beforeInit', myCallback);
* ```
*/
this.addHook = function (key, callback) {
_pluginHooks2.default.getSingleton().add(key, callback, instance);
};
/**
* Check if for a specified hook name there are added listeners (only for this Handsontable instance).
*
* @memberof Core#
* @function hasHook
* @see Hooks#has
* @param {String} key Hook name
* @return {Boolean}
*
* @example
* ```js
* var hasBeforeInitListeners = hot.hasHook('beforeInit');
* ```
*/
this.hasHook = function (key) {
return _pluginHooks2.default.getSingleton().has(key, instance);
};
/**
* Adds listener to specified hook name (only for this Handsontable instance).
* After the listener is triggered, it will be automatically removed.
*
* @memberof Core#
* @function addHookOnce
* @see Hooks#once
* @param {String} key Hook name.
* @param {Function|Array} callback Function or array of Functions.
*
* @example
* ```js
* hot.addHookOnce('beforeInit', myCallback);
* ```
*/
this.addHookOnce = function (key, callback) {
_pluginHooks2.default.getSingleton().once(key, callback, instance);
};
/**
* Removes the hook listener previously registered with {@link Core#addHook}.
*
* @memberof Core#
* @function removeHook
* @see Hooks#remove
* @param {String} key Hook name.
* @param {Function} callback Function which have been registered via {@link Core#addHook}.
*
* @example
* ```js
* hot.removeHook('beforeInit', myCallback);
* ```
*/
this.removeHook = function (key, callback) {
_pluginHooks2.default.getSingleton().remove(key, callback, instance);
};
/**
* Run the callbacks for the hook provided in the `key` argument using the parameters given in the other arguments.
*
* @memberof Core#
* @function runHooks
* @see Hooks#run
* @param {String} key Hook name.
* @param {*} [p1] Argument passed to the callback.
* @param {*} [p2] Argument passed to the callback.
* @param {*} [p3] Argument passed to the callback.
* @param {*} [p4] Argument passed to the callback.
* @param {*} [p5] Argument passed to the callback.
* @param {*} [p6] Argument passed to the callback.
* @returns {*}
*
* @example
* ```js
* hot.runHooks('beforeInit');
* ```
*/
this.runHooks = function (key, p1, p2, p3, p4, p5, p6) {
return _pluginHooks2.default.getSingleton().run(instance, key, p1, p2, p3, p4, p5, p6);
};
/**
* Get phrase for specified dictionary key.
*
* @memberof Core#
* @function getTranslatedPhrase
* @since 0.35.0
* @param {String} dictionaryKey Constant which is dictionary key.
* @param {*} extraArguments Arguments which will be handled by formatters.
*
* @returns {String}
*/
this.getTranslatedPhrase = function (dictionaryKey, extraArguments) {
return (0, _i18n.getTranslatedPhrase)(priv.settings.language, dictionaryKey, extraArguments);
};
this.timeouts = [];
/**
* Sets timeout. Purpose of this method is to clear all known timeouts when `destroy` method is called.
*
* @param {*} handle
* @private
*/
this._registerTimeout = function (handle) {
this.timeouts.push(handle);
};
/**
* Clears all known timeouts.
*
* @private
*/
this._clearTimeouts = function () {
for (var i = 0, ilen = this.timeouts.length; i < ilen; i++) {
clearTimeout(this.timeouts[i]);
}
};
_pluginHooks2.default.getSingleton().run(instance, 'construct');
};
/***/ }),
/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.columnFactory = columnFactory;
var _object = __webpack_require__(1);
/* eslint-disable import/prefer-default-export */
/**
* Factory for columns constructors.
*
* @param {Object} GridSettings
* @param {Array} conflictList
* @return {Object} ColumnSettings
*/
function columnFactory(GridSettings, conflictList) {
function ColumnSettings() {};
(0, _object.inherit)(ColumnSettings, GridSettings);
// Clear conflict settings
for (var i = 0, len = conflictList.length; i < len; i++) {
ColumnSettings.prototype[conflictList[i]] = void 0;
}
return ColumnSettings;
}
/***/ }),
/* 86 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.spreadsheetColumnLabel = spreadsheetColumnLabel;
exports.spreadsheetColumnIndex = spreadsheetColumnIndex;
exports.createSpreadsheetData = createSpreadsheetData;
exports.createSpreadsheetObjectData = createSpreadsheetObjectData;
exports.createEmptySpreadsheetData = createEmptySpreadsheetData;
exports.translateRowsToColumns = translateRowsToColumns;
exports.cellMethodLookupFactory = cellMethodLookupFactory;
var _cellTypes = __webpack_require__(83);
var _object = __webpack_require__(1);
var COLUMN_LABEL_BASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var COLUMN_LABEL_BASE_LENGTH = COLUMN_LABEL_BASE.length;
/**
* Generates spreadsheet-like column names: A, B, C, ..., Z, AA, AB, etc.
*
* @param {Number} index Column index.
* @returns {String}
*/
function spreadsheetColumnLabel(index) {
var dividend = index + 1;
var columnLabel = '';
var modulo = void 0;
while (dividend > 0) {
modulo = (dividend - 1) % COLUMN_LABEL_BASE_LENGTH;
columnLabel = String.fromCharCode(65 + modulo) + columnLabel;
dividend = parseInt((dividend - modulo) / COLUMN_LABEL_BASE_LENGTH, 10);
}
return columnLabel;
}
/**
* Generates spreadsheet-like column index from theirs labels: A, B, C ...., Z, AA, AB, etc.
*
* @param {String} label Column label.
* @returns {Number}
*/
function spreadsheetColumnIndex(label) {
var result = 0;
if (label) {
for (var i = 0, j = label.length - 1; i < label.length; i += 1, j -= 1) {
result += Math.pow(COLUMN_LABEL_BASE_LENGTH, j) * (COLUMN_LABEL_BASE.indexOf(label[i]) + 1);
}
}
--result;
return result;
}
/**
* Creates 2D array of Excel-like values "A1", "A2", ...
*
* @param {Number} rows Number of rows to generate.
* @param {Number} columns Number of columns to generate.
* @returns {Array}
*/
function createSpreadsheetData() {
var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
var columns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
var _rows = [],
i,
j;
for (i = 0; i < rows; i++) {
var row = [];
for (j = 0; j < columns; j++) {
row.push(spreadsheetColumnLabel(j) + (i + 1));
}
_rows.push(row);
}
return _rows;
}
/**
* Creates 2D array of Excel-like values "A1", "A2", as an array of objects.
*
* @param {Number} rows Number of rows to generate.
* @param {Number} colCount Number of columns to generate.
* @returns {Array}
*/
function createSpreadsheetObjectData() {
var rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
var colCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
var _rows = [],
i,
j;
for (i = 0; i < rows; i++) {
var row = {};
for (j = 0; j < colCount; j++) {
row['prop' + j] = spreadsheetColumnLabel(j) + (i + 1);
}
_rows.push(row);
}
return _rows;
}
/**
* Generates an empty data object.
*
* @param {Number} rows Number of rows to generate.
* @param {Number} columns Number of columns to generate
* @returns {Array}
*/
function createEmptySpreadsheetData(rows, columns) {
var data = [];
var row = void 0;
for (var i = 0; i < rows; i++) {
row = [];
for (var j = 0; j < columns; j++) {
row.push('');
}
data.push(row);
}
return data;
}
function translateRowsToColumns(input) {
var i,
ilen,
j,
jlen,
output = [],
olen = 0;
for (i = 0, ilen = input.length; i < ilen; i++) {
for (j = 0, jlen = input[i].length; j < jlen; j++) {
if (j == olen) {
output.push([]);
olen++;
}
output[j].push(input[i][j]);
}
}
return output;
}
/**
* Factory that produces a function for searching methods (or any properties) which could be defined directly in
* table configuration or implicitly, within cell type definition.
*
* For example: renderer can be defined explicitly using "renderer" property in column configuration or it can be
* defined implicitly using "type" property.
*
* Methods/properties defined explicitly always takes precedence over those defined through "type".
*
* If the method/property is not found in an object, searching is continued recursively through prototype chain, until
* it reaches the Object.prototype.
*
*
* @param methodName {String} name of the method/property to search (i.e. 'renderer', 'validator', 'copyable')
* @param allowUndefined {Boolean} [optional] if false, the search is continued if methodName has not been found in cell "type"
* @returns {Function}
*/
function cellMethodLookupFactory(methodName, allowUndefined) {
allowUndefined = typeof allowUndefined == 'undefined' ? true : allowUndefined;
return function cellMethodLookup(row, col) {
return function getMethodFromProperties(properties) {
if (!properties) {
return; // method not found
} else if ((0, _object.hasOwnProperty)(properties, methodName) && properties[methodName] !== void 0) {
// check if it is own and is not empty
return properties[methodName]; // method defined directly
} else if ((0, _object.hasOwnProperty)(properties, 'type') && properties.type) {
// check if it is own and is not empty
var type;
if (typeof properties.type != 'string') {
throw new Error('Cell type must be a string ');
}
type = (0, _cellTypes.getCellType)(properties.type);
if ((0, _object.hasOwnProperty)(type, methodName)) {
return type[methodName]; // method defined in type.
} else if (allowUndefined) {
return; // method does not defined in type (eg. validator), returns undefined
}
}
return getMethodFromProperties(Object.getPrototypeOf(properties));
}(typeof row == 'number' ? this.getCellMeta(row, col) : row);
};
}
/***/ }),
/* 87 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class GhostTable
* @util
*/
var GhostTable = function () {
function GhostTable(hotInstance) {
_classCallCheck(this, GhostTable);
/**
* Handsontable instance.
*
* @type {Core}
*/
this.hot = hotInstance;
/**
* Container element where every table will be injected.
*
* @type {HTMLElement|null}
*/
this.container = null;
/**
* Flag which determine is table was injected to DOM.
*
* @type {Boolean}
*/
this.injected = false;
/**
* Added rows collection.
*
* @type {Array}
*/
this.rows = [];
/**
* Added columns collection.
*
* @type {Array}
*/
this.columns = [];
/**
* Samples prepared for calculations.
*
* @type {Map}
* @default {null}
*/
this.samples = null;
/**
* Ghost table settings.
*
* @type {Object}
* @default {Object}
*/
this.settings = {
useHeaders: true
};
}
/**
* Add row.
*
* @param {Number} row Row index.
* @param {Map} samples Samples Map object.
*/
_createClass(GhostTable, [{
key: 'addRow',
value: function addRow(row, samples) {
if (this.columns.length) {
throw new Error('Doesn\'t support multi-dimensional table');
}
if (!this.rows.length) {
this.container = this.createContainer(this.hot.rootElement.className);
}
var rowObject = { row: row };
this.rows.push(rowObject);
this.samples = samples;
this.table = this.createTable(this.hot.table.className);
this.table.colGroup.appendChild(this.createColGroupsCol());
this.table.tr.appendChild(this.createRow(row));
this.container.container.appendChild(this.table.fragment);
rowObject.table = this.table.table;
}
/**
* Add a row consisting of the column headers.
*/
}, {
key: 'addColumnHeadersRow',
value: function addColumnHeadersRow(samples) {
if (this.hot.getColHeader(0) != null) {
var rowObject = { row: -1 };
this.rows.push(rowObject);
this.container = this.createContainer(this.hot.rootElement.className);
this.samples = samples;
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);
rowObject.table = this.table.table;
}
}
/**
* Add column.
*
* @param {Number} column Column index.
* @param {Map} samples Samples Map object.
*/
}, {
key: 'addColumn',
value: function addColumn(column, samples) {
if (this.rows.length) {
throw new Error('Doesn\'t support multi-dimensional table');
}
if (!this.columns.length) {
this.container = this.createContainer(this.hot.rootElement.className);
}
var columnObject = { col: column };
this.columns.push(columnObject);
this.samples = samples;
this.table = this.createTable(this.hot.table.className);
if (this.getSetting('useHeaders') && this.hot.getColHeader(column) !== null) {
this.hot.view.appendColHeader(column, this.table.th);
}
this.table.tBody.appendChild(this.createCol(column));
this.container.container.appendChild(this.table.fragment);
columnObject.table = this.table.table;
}
/**
* Get calculated heights.
*
* @param {Function} callback Callback which will be fired for each calculated row.
*/
}, {
key: 'getHeights',
value: function getHeights(callback) {
if (!this.injected) {
this.injectTable();
}
(0, _array.arrayEach)(this.rows, function (row) {
// -1 <- reduce border-top from table
callback(row.row, (0, _element.outerHeight)(row.table) - 1);
});
}
/**
* Get calculated widths.
*
* @param {Function} callback Callback which will be fired for each calculated column.
*/
}, {
key: 'getWidths',
value: function getWidths(callback) {
if (!this.injected) {
this.injectTable();
}
(0, _array.arrayEach)(this.columns, function (column) {
callback(column.col, (0, _element.outerWidth)(column.table));
});
}
/**
* Set the Ghost Table settings to the provided object.
*
* @param {Object} settings New Ghost Table Settings
*/
}, {
key: 'setSettings',
value: function setSettings(settings) {
this.settings = settings;
}
/**
* Set a single setting of the Ghost Table.
*
* @param {String} name Setting name.
* @param {*} value Setting value.
*/
}, {
key: 'setSetting',
value: function setSetting(name, value) {
if (!this.settings) {
this.settings = {};
}
this.settings[name] = value;
}
/**
* Get the Ghost Table settings.
*
* @returns {Object|null}
*/
}, {
key: 'getSettings',
value: function getSettings() {
return this.settings;
}
/**
* Get a single Ghost Table setting.
*
* @param {String} name
* @returns {Boolean|null}
*/
}, {
key: 'getSetting',
value: function getSetting(name) {
if (this.settings) {
return this.settings[name];
}
return null;
}
/**
* Create colgroup col elements.
*
* @returns {DocumentFragment}
*/
}, {
key: 'createColGroupsCol',
value: function createColGroupsCol() {
var _this = this;
var d = document;
var fragment = d.createDocumentFragment();
if (this.hot.hasRowHeaders()) {
fragment.appendChild(this.createColElement(-1));
}
this.samples.forEach(function (sample) {
(0, _array.arrayEach)(sample.strings, function (string) {
fragment.appendChild(_this.createColElement(string.col));
});
});
return fragment;
}
/**
* Create table row element.
*
* @param {Number} row Row index.
* @returns {DocumentFragment} Returns created table row elements.
*/
}, {
key: 'createRow',
value: function createRow(row) {
var _this2 = this;
var d = document;
var fragment = d.createDocumentFragment();
var th = d.createElement('th');
if (this.hot.hasRowHeaders()) {
this.hot.view.appendRowHeader(row, th);
fragment.appendChild(th);
}
this.samples.forEach(function (sample) {
(0, _array.arrayEach)(sample.strings, function (string) {
var column = string.col;
var cellProperties = _this2.hot.getCellMeta(row, column);
cellProperties.col = column;
cellProperties.row = row;
var renderer = _this2.hot.getCellRenderer(cellProperties);
var td = d.createElement('td');
renderer(_this2.hot, td, row, column, _this2.hot.colToProp(column), string.value, cellProperties);
fragment.appendChild(td);
});
});
return fragment;
}
}, {
key: 'createColumnHeadersRow',
value: function createColumnHeadersRow() {
var _this3 = this;
var d = document;
var fragment = d.createDocumentFragment();
if (this.hot.hasRowHeaders()) {
var th = d.createElement('th');
this.hot.view.appendColHeader(-1, th);
fragment.appendChild(th);
}
this.samples.forEach(function (sample) {
(0, _array.arrayEach)(sample.strings, function (string) {
var column = string.col;
var th = d.createElement('th');
_this3.hot.view.appendColHeader(column, th);
fragment.appendChild(th);
});
});
return fragment;
}
/**
* Create table column elements.
*
* @param {Number} column Column index.
* @returns {DocumentFragment} Returns created column table column elements.
*/
}, {
key: 'createCol',
value: function createCol(column) {
var _this4 = this;
var d = document;
var fragment = d.createDocumentFragment();
this.samples.forEach(function (sample) {
(0, _array.arrayEach)(sample.strings, function (string) {
var row = string.row;
var cellProperties = _this4.hot.getCellMeta(row, column);
cellProperties.col = column;
cellProperties.row = row;
var renderer = _this4.hot.getCellRenderer(cellProperties);
var td = d.createElement('td');
var tr = d.createElement('tr');
renderer(_this4.hot, td, row, column, _this4.hot.colToProp(column), string.value, cellProperties);
tr.appendChild(td);
fragment.appendChild(tr);
});
});
return fragment;
}
/**
* Remove table from document and reset internal state.
*/
}, {
key: 'clean',
value: function clean() {
this.rows.length = 0;
this.rows[-1] = void 0;
this.columns.length = 0;
if (this.samples) {
this.samples.clear();
}
this.samples = null;
this.removeTable();
}
/**
* Inject generated table into document.
*
* @param {HTMLElement} [parent=null]
*/
}, {
key: 'injectTable',
value: function injectTable() {
var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
if (!this.injected) {
(parent || this.hot.rootElement).appendChild(this.container.fragment);
this.injected = true;
}
}
/**
* Remove table from document.
*/
}, {
key: 'removeTable',
value: function removeTable() {
if (this.injected && this.container.container.parentNode) {
this.container.container.parentNode.removeChild(this.container.container);
this.container = null;
this.injected = false;
}
}
/**
* Create col element.
*
* @param {Number} column Column index.
* @returns {HTMLElement}
*/
}, {
key: 'createColElement',
value: function createColElement(column) {
var d = document;
var col = d.createElement('col');
col.style.width = this.hot.view.wt.wtTable.getStretchedColumnWidth(column) + 'px';
return col;
}
/**
* Create table element.
*
* @param {String} className
* @returns {Object}
*/
}, {
key: 'createTable',
value: function createTable() {
var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var d = document;
var fragment = d.createDocumentFragment();
var table = d.createElement('table');
var tHead = d.createElement('thead');
var tBody = d.createElement('tbody');
var colGroup = d.createElement('colgroup');
var tr = d.createElement('tr');
var th = d.createElement('th');
if (this.isVertical()) {
table.appendChild(colGroup);
}
if (this.isHorizontal()) {
tr.appendChild(th);
tHead.appendChild(tr);
table.style.tableLayout = 'auto';
table.style.width = 'auto';
}
table.appendChild(tHead);
if (this.isVertical()) {
tBody.appendChild(tr);
}
table.appendChild(tBody);
(0, _element.addClass)(table, className);
fragment.appendChild(table);
return { fragment: fragment, table: table, tHead: tHead, tBody: tBody, colGroup: colGroup, tr: tr, th: th };
}
/**
* Create container for tables.
*
* @param {String} className
* @returns {Object}
*/
}, {
key: 'createContainer',
value: function createContainer() {
var className = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var d = document;
var fragment = d.createDocumentFragment();
var container = d.createElement('div');
className = 'htGhostTable htAutoSize ' + className.trim();
(0, _element.addClass)(container, className);
fragment.appendChild(container);
return { fragment: fragment, container: container };
}
/**
* Checks if table is raised vertically (checking rows).
*
* @returns {Boolean}
*/
}, {
key: 'isVertical',
value: function isVertical() {
return !!(this.rows.length && !this.columns.length);
}
/**
* Checks if table is raised horizontally (checking columns).
*
* @returns {Boolean}
*/
}, {
key: 'isHorizontal',
value: function isHorizontal() {
return !!(this.columns.length && !this.rows.length);
}
}]);
return GhostTable;
}();
exports.default = GhostTable;
/***/ }),
/* 88 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = separatorItem;
var KEY = exports.KEY = '---------';
function separatorItem() {
return {
name: KEY
};
}
/***/ }),
/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
var MIXIN_NAME = 'localHooks';
/**
* Mixin object to extend objects functionality for local hooks.
*
* @type {Object}
*/
var localHooks = {
/**
* Internal hooks storage.
*/
_localHooks: Object.create(null),
/**
* Add hook to the collection.
*
* @param {String} key Hook name.
* @param {Function} callback Hook callback
*/
addLocalHook: function addLocalHook(key, callback) {
if (!this._localHooks[key]) {
this._localHooks[key] = [];
}
this._localHooks[key].push(callback);
},
/**
* Run hooks.
*
* @param {String} key Hook name.
* @param {*} params
*/
runLocalHooks: function runLocalHooks(key) {
var _this = this;
for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
params[_key - 1] = arguments[_key];
}
if (this._localHooks[key]) {
(0, _array.arrayEach)(this._localHooks[key], function (callback) {
return callback.apply(_this, params);
});
}
},
/**
* Clear all added hooks.
*/
clearLocalHooks: function clearLocalHooks() {
this._localHooks = {};
}
};
(0, _object.defineGetter)(localHooks, 'MIXIN_NAME', MIXIN_NAME, {
writable: false,
enumerable: false
});
exports.default = localHooks;
/***/ }),
/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.ITEMS = exports.UNDO = exports.SEPARATOR = exports.ROW_BELOW = exports.ROW_ABOVE = exports.REMOVE_ROW = exports.REMOVE_COLUMN = exports.REDO = exports.READ_ONLY = exports.COLUMN_RIGHT = exports.COLUMN_LEFT = exports.CLEAR_COLUMN = exports.ALIGNMENT = undefined;
var _predefinedItems2;
var _alignment = __webpack_require__(403);
Object.defineProperty(exports, 'ALIGNMENT', {
enumerable: true,
get: function get() {
return _alignment.KEY;
}
});
var _clearColumn = __webpack_require__(404);
Object.defineProperty(exports, 'CLEAR_COLUMN', {
enumerable: true,
get: function get() {
return _clearColumn.KEY;
}
});
var _columnLeft = __webpack_require__(405);
Object.defineProperty(exports, 'COLUMN_LEFT', {
enumerable: true,
get: function get() {
return _columnLeft.KEY;
}
});
var _columnRight = __webpack_require__(406);
Object.defineProperty(exports, 'COLUMN_RIGHT', {
enumerable: true,
get: function get() {
return _columnRight.KEY;
}
});
var _readOnly = __webpack_require__(407);
Object.defineProperty(exports, 'READ_ONLY', {
enumerable: true,
get: function get() {
return _readOnly.KEY;
}
});
var _redo = __webpack_require__(408);
Object.defineProperty(exports, 'REDO', {
enumerable: true,
get: function get() {
return _redo.KEY;
}
});
var _removeColumn = __webpack_require__(409);
Object.defineProperty(exports, 'REMOVE_COLUMN', {
enumerable: true,
get: function get() {
return _removeColumn.KEY;
}
});
var _removeRow = __webpack_require__(410);
Object.defineProperty(exports, 'REMOVE_ROW', {
enumerable: true,
get: function get() {
return _removeRow.KEY;
}
});
var _rowAbove = __webpack_require__(411);
Object.defineProperty(exports, 'ROW_ABOVE', {
enumerable: true,
get: function get() {
return _rowAbove.KEY;
}
});
var _rowBelow = __webpack_require__(412);
Object.defineProperty(exports, 'ROW_BELOW', {
enumerable: true,
get: function get() {
return _rowBelow.KEY;
}
});
var _separator = __webpack_require__(88);
Object.defineProperty(exports, 'SEPARATOR', {
enumerable: true,
get: function get() {
return _separator.KEY;
}
});
var _undo = __webpack_require__(413);
Object.defineProperty(exports, 'UNDO', {
enumerable: true,
get: function get() {
return _undo.KEY;
}
});
exports.predefinedItems = predefinedItems;
exports.addItem = addItem;
var _object = __webpack_require__(1);
var _alignment2 = _interopRequireDefault(_alignment);
var _clearColumn2 = _interopRequireDefault(_clearColumn);
var _columnLeft2 = _interopRequireDefault(_columnLeft);
var _columnRight2 = _interopRequireDefault(_columnRight);
var _readOnly2 = _interopRequireDefault(_readOnly);
var _redo2 = _interopRequireDefault(_redo);
var _removeColumn2 = _interopRequireDefault(_removeColumn);
var _removeRow2 = _interopRequireDefault(_removeRow);
var _rowAbove2 = _interopRequireDefault(_rowAbove);
var _rowBelow2 = _interopRequireDefault(_rowBelow);
var _separator2 = _interopRequireDefault(_separator);
var _undo2 = _interopRequireDefault(_undo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var ITEMS = exports.ITEMS = [_rowAbove.KEY, _rowBelow.KEY, _columnLeft.KEY, _columnRight.KEY, _clearColumn.KEY, _removeRow.KEY, _removeColumn.KEY, _undo.KEY, _redo.KEY, _readOnly.KEY, _alignment.KEY, _separator.KEY];
var _predefinedItems = (_predefinedItems2 = {}, _defineProperty(_predefinedItems2, _separator.KEY, _separator2.default), _defineProperty(_predefinedItems2, _rowAbove.KEY, _rowAbove2.default), _defineProperty(_predefinedItems2, _rowBelow.KEY, _rowBelow2.default), _defineProperty(_predefinedItems2, _columnLeft.KEY, _columnLeft2.default), _defineProperty(_predefinedItems2, _columnRight.KEY, _columnRight2.default), _defineProperty(_predefinedItems2, _clearColumn.KEY, _clearColumn2.default), _defineProperty(_predefinedItems2, _removeRow.KEY, _removeRow2.default), _defineProperty(_predefinedItems2, _removeColumn.KEY, _removeColumn2.default), _defineProperty(_predefinedItems2, _undo.KEY, _undo2.default), _defineProperty(_predefinedItems2, _redo.KEY, _redo2.default), _defineProperty(_predefinedItems2, _readOnly.KEY, _readOnly2.default), _defineProperty(_predefinedItems2, _alignment.KEY, _alignment2.default), _predefinedItems2);
/**
* Gets new object with all predefined menu items.
*
* @returns {Object}
*/
function predefinedItems() {
var items = {};
(0, _object.objectEach)(_predefinedItems, function (itemFactory, key) {
items[key] = itemFactory();
});
return items;
}
/**
* Add new predefined menu item to the collection.
*
* @param {String} key Menu command id.
* @param {Object} item Object command descriptor.
*/
function addItem(key, item) {
if (ITEMS.indexOf(key) === -1) {
_predefinedItems[key] = item;
}
}
/***/ }),
/* 91 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(92);
var validate = __webpack_require__(44);
var MAP = 'Map';
// 23.1 Map Objects
module.exports = __webpack_require__(62)(MAP, function (get) {
return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.1.3.6 Map.prototype.get(key)
get: function get(key) {
var entry = strong.getEntry(validate(this, MAP), key);
return entry && entry.v;
},
// 23.1.3.9 Map.prototype.set(key, value)
set: function set(key, value) {
return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
}
}, strong, true);
/***/ }),
/* 92 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var dP = __webpack_require__(19).f;
var create = __webpack_require__(70);
var redefineAll = __webpack_require__(57);
var ctx = __webpack_require__(32);
var anInstance = __webpack_require__(59);
var forOf = __webpack_require__(60);
var $iterDefine = __webpack_require__(101);
var step = __webpack_require__(103);
var setSpecies = __webpack_require__(104);
var DESCRIPTORS = __webpack_require__(22);
var fastKey = __webpack_require__(34).fastKey;
var validate = __webpack_require__(44);
var SIZE = DESCRIPTORS ? '_s' : 'size';
var getEntry = function (that, key) {
// fast case
var index = fastKey(key);
var entry;
if (index !== 'F') return that._i[index];
// frozen object case
for (entry = that._f; entry; entry = entry.n) {
if (entry.k == key) return entry;
}
};
module.exports = {
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, NAME, '_i');
that._t = NAME; // collection type
that._i = create(null); // index
that._f = undefined; // first entry
that._l = undefined; // last entry
that[SIZE] = 0; // size
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.1.3.1 Map.prototype.clear()
// 23.2.3.2 Set.prototype.clear()
clear: function clear() {
for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
entry.r = true;
if (entry.p) entry.p = entry.p.n = undefined;
delete data[entry.i];
}
that._f = that._l = undefined;
that[SIZE] = 0;
},
// 23.1.3.3 Map.prototype.delete(key)
// 23.2.3.4 Set.prototype.delete(value)
'delete': function (key) {
var that = validate(this, NAME);
var entry = getEntry(that, key);
if (entry) {
var next = entry.n;
var prev = entry.p;
delete that._i[entry.i];
entry.r = true;
if (prev) prev.n = next;
if (next) next.p = prev;
if (that._f == entry) that._f = next;
if (that._l == entry) that._l = prev;
that[SIZE]--;
} return !!entry;
},
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /* , that = undefined */) {
validate(this, NAME);
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var entry;
while (entry = entry ? entry.n : this._f) {
f(entry.v, entry.k, this);
// revert to the last existing entry
while (entry && entry.r) entry = entry.p;
}
},
// 23.1.3.7 Map.prototype.has(key)
// 23.2.3.7 Set.prototype.has(value)
has: function has(key) {
return !!getEntry(validate(this, NAME), key);
}
});
if (DESCRIPTORS) dP(C.prototype, 'size', {
get: function () {
return validate(this, NAME)[SIZE];
}
});
return C;
},
def: function (that, key, value) {
var entry = getEntry(that, key);
var prev, index;
// change existing entry
if (entry) {
entry.v = value;
// create new entry
} else {
that._l = entry = {
i: index = fastKey(key, true), // <- index
k: key, // <- key
v: value, // <- value
p: prev = that._l, // <- previous entry
n: undefined, // <- next entry
r: false // <- removed
};
if (!that._f) that._f = entry;
if (prev) prev.n = entry;
that[SIZE]++;
// add to index
if (index !== 'F') that._i[index] = entry;
} return that;
},
getEntry: getEntry,
setStrong: function (C, NAME, IS_MAP) {
// add .keys, .values, .entries, [@@iterator]
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
$iterDefine(C, NAME, function (iterated, kind) {
this._t = validate(iterated, NAME); // target
this._k = kind; // kind
this._l = undefined; // previous
}, function () {
var that = this;
var kind = that._k;
var entry = that._l;
// revert to the last existing entry
while (entry && entry.r) entry = entry.p;
// get next entry
if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
// or finish the iteration
that._t = undefined;
return step(1);
}
// return step by kind
if (kind == 'keys') return step(0, entry.k);
if (kind == 'values') return step(0, entry.v);
return step(0, [entry.k, entry.v]);
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
// add [@@species], 23.1.2.2, 23.2.2.2
setSpecies(NAME);
}
};
/***/ }),
/* 93 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(22) && !__webpack_require__(23)(function () {
return Object.defineProperty(__webpack_require__(68)('div'), 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(27);
var toIObject = __webpack_require__(24);
var arrayIndexOf = __webpack_require__(95)(false);
var IE_PROTO = __webpack_require__(72)('IE_PROTO');
module.exports = function (object, names) {
var O = toIObject(object);
var i = 0;
var result = [];
var key;
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/* 95 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(24);
var toLength = __webpack_require__(25);
var toAbsoluteIndex = __webpack_require__(56);
module.exports = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
if (O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
/***/ }),
/* 96 */
/***/ (function(module, exports, __webpack_require__) {
var document = __webpack_require__(13).document;
module.exports = document && document.documentElement;
/***/ }),
/* 97 */
/***/ (function(module, exports, __webpack_require__) {
// call something on iterator step with safe closing on error
var anObject = __webpack_require__(18);
module.exports = function (iterator, fn, value, entries) {
try {
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch (e) {
var ret = iterator['return'];
if (ret !== undefined) anObject(ret.call(iterator));
throw e;
}
};
/***/ }),
/* 98 */
/***/ (function(module, exports, __webpack_require__) {
// check on default Array iterator
var Iterators = __webpack_require__(50);
var ITERATOR = __webpack_require__(10)('iterator');
var ArrayProto = Array.prototype;
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
};
/***/ }),
/* 99 */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(100);
var ITERATOR = __webpack_require__(10)('iterator');
var Iterators = __webpack_require__(50);
module.exports = __webpack_require__(43).getIteratorMethod = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/* 100 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
var cof = __webpack_require__(42);
var TAG = __webpack_require__(10)('toStringTag');
// ES3 wrong here
var ARG = cof(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (e) { /* empty */ }
};
module.exports = function (it) {
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
// builtinTag case
: ARG ? cof(O)
// ES3 arguments fallback
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
/***/ }),
/* 101 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(61);
var $export = __webpack_require__(3);
var redefine = __webpack_require__(30);
var hide = __webpack_require__(31);
var has = __webpack_require__(27);
var Iterators = __webpack_require__(50);
var $iterCreate = __webpack_require__(320);
var setToStringTag = __webpack_require__(51);
var getPrototypeOf = __webpack_require__(102);
var ITERATOR = __webpack_require__(10)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
var VALUES = 'values';
var returnThis = function () { return this; };
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
$iterCreate(Constructor, NAME, next);
var getMethod = function (kind) {
if (!BUGGY && kind in proto) return proto[kind];
switch (kind) {
case KEYS: return function keys() { return new Constructor(this, kind); };
case VALUES: return function values() { return new Constructor(this, kind); };
} return function entries() { return new Constructor(this, kind); };
};
var TAG = NAME + ' Iterator';
var DEF_VALUES = DEFAULT == VALUES;
var VALUES_BUG = false;
var proto = Base.prototype;
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
var $default = (!BUGGY && $native) || getMethod(DEFAULT);
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
var methods, key, IteratorPrototype;
// Fix native
if ($anyNative) {
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
// Set @@toStringTag to native iterators
setToStringTag(IteratorPrototype, TAG, true);
// fix for some old engines
if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEF_VALUES && $native && $native.name !== VALUES) {
VALUES_BUG = true;
$default = function values() { return $native.call(this); };
}
// Define iterator
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
hide(proto, ITERATOR, $default);
}
// Plug for library
Iterators[NAME] = $default;
Iterators[TAG] = returnThis;
if (DEFAULT) {
methods = {
values: DEF_VALUES ? $default : getMethod(VALUES),
keys: IS_SET ? $default : getMethod(KEYS),
entries: $entries
};
if (FORCED) for (key in methods) {
if (!(key in proto)) redefine(proto, key, methods[key]);
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
}
return methods;
};
/***/ }),
/* 102 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
var has = __webpack_require__(27);
var toObject = __webpack_require__(33);
var IE_PROTO = __webpack_require__(72)('IE_PROTO');
var ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectProto : null;
};
/***/ }),
/* 103 */
/***/ (function(module, exports) {
module.exports = function (done, value) {
return { value: value, done: !!done };
};
/***/ }),
/* 104 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(13);
var dP = __webpack_require__(19);
var DESCRIPTORS = __webpack_require__(22);
var SPECIES = __webpack_require__(10)('species');
module.exports = function (KEY) {
var C = global[KEY];
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
configurable: true,
get: function () { return this; }
});
};
/***/ }),
/* 105 */
/***/ (function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
var isObject = __webpack_require__(5);
var anObject = __webpack_require__(18);
var check = function (O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
};
module.exports = {
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function (test, buggy, set) {
try {
set = __webpack_require__(32)(Function.call, __webpack_require__(63).f(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch (e) { buggy = true; }
return function setPrototypeOf(O, proto) {
check(O, proto);
if (buggy) O.__proto__ = proto;
else set(O, proto);
return O;
};
}({}, false) : undefined),
check: check
};
/***/ }),
/* 106 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var strong = __webpack_require__(92);
var validate = __webpack_require__(44);
var SET = 'Set';
// 23.2 Set Objects
module.exports = __webpack_require__(62)(SET, function (get) {
return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.2.3.1 Set.prototype.add(value)
add: function add(value) {
return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
}
}, strong);
/***/ }),
/* 107 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var each = __webpack_require__(64)(0);
var redefine = __webpack_require__(30);
var meta = __webpack_require__(34);
var assign = __webpack_require__(109);
var weak = __webpack_require__(110);
var isObject = __webpack_require__(5);
var fails = __webpack_require__(23);
var validate = __webpack_require__(44);
var WEAK_MAP = 'WeakMap';
var getWeak = meta.getWeak;
var isExtensible = Object.isExtensible;
var uncaughtFrozenStore = weak.ufstore;
var tmp = {};
var InternalMap;
var wrapper = function (get) {
return function WeakMap() {
return get(this, arguments.length > 0 ? arguments[0] : undefined);
};
};
var methods = {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key) {
if (isObject(key)) {
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
return data ? data[this._i] : undefined;
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value) {
return weak.def(validate(this, WEAK_MAP), key, value);
}
};
// 23.3 WeakMap Objects
var $WeakMap = module.exports = __webpack_require__(62)(WEAK_MAP, wrapper, methods, weak, true, true);
// IE11 WeakMap frozen keys fix
if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
assign(InternalMap.prototype, methods);
meta.NEED = true;
each(['delete', 'has', 'get', 'set'], function (key) {
var proto = $WeakMap.prototype;
var method = proto[key];
redefine(proto, key, function (a, b) {
// store frozen objects on internal weakmap shim
if (isObject(a) && !isExtensible(a)) {
if (!this._f) this._f = new InternalMap();
var result = this._f[key](a, b);
return key == 'set' ? this : result;
// store all the rest on native weakmap
} return method.call(this, a, b);
});
});
}
/***/ }),
/* 108 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
var cof = __webpack_require__(42);
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(37);
var gOPS = __webpack_require__(65);
var pIE = __webpack_require__(52);
var toObject = __webpack_require__(33);
var IObject = __webpack_require__(71);
var $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(23)(function () {
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var S = Symbol();
var K = 'abcdefghijklmnopqrst';
A[S] = 7;
K.split('').forEach(function (k) { B[k] = k; });
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var aLen = arguments.length;
var index = 1;
var getSymbols = gOPS.f;
var isEnum = pIE.f;
while (aLen > index) {
var S = IObject(arguments[index++]);
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
} return T;
} : $assign;
/***/ }),
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefineAll = __webpack_require__(57);
var getWeak = __webpack_require__(34).getWeak;
var anObject = __webpack_require__(18);
var isObject = __webpack_require__(5);
var anInstance = __webpack_require__(59);
var forOf = __webpack_require__(60);
var createArrayMethod = __webpack_require__(64);
var $has = __webpack_require__(27);
var validate = __webpack_require__(44);
var arrayFind = createArrayMethod(5);
var arrayFindIndex = createArrayMethod(6);
var id = 0;
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (that) {
return that._l || (that._l = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
this.a = [];
};
var findUncaughtFrozen = function (store, key) {
return arrayFind(store.a, function (it) {
return it[0] === key;
});
};
UncaughtFrozenStore.prototype = {
get: function (key) {
var entry = findUncaughtFrozen(this, key);
if (entry) return entry[1];
},
has: function (key) {
return !!findUncaughtFrozen(this, key);
},
set: function (key, value) {
var entry = findUncaughtFrozen(this, key);
if (entry) entry[1] = value;
else this.a.push([key, value]);
},
'delete': function (key) {
var index = arrayFindIndex(this.a, function (it) {
return it[0] === key;
});
if (~index) this.a.splice(index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, NAME, '_i');
that._t = NAME; // collection type
that._i = id++; // collection id
that._l = undefined; // leak store for uncaught frozen objects
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
});
redefineAll(C.prototype, {
// 23.3.3.2 WeakMap.prototype.delete(key)
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function (key) {
if (!isObject(key)) return false;
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
return data && $has(data, this._i) && delete data[this._i];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key) {
if (!isObject(key)) return false;
var data = getWeak(key);
if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
return data && $has(data, this._i);
}
});
return C;
},
def: function (that, key, value) {
var data = getWeak(anObject(key), true);
if (data === true) uncaughtFrozenStore(that).set(key, value);
else data[that._i] = value;
return that;
},
ufstore: uncaughtFrozenStore
};
/***/ }),
/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var weak = __webpack_require__(110);
var validate = __webpack_require__(44);
var WEAK_SET = 'WeakSet';
// 23.4 WeakSet Objects
__webpack_require__(62)(WEAK_SET, function (get) {
return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
}, {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value) {
return weak.def(validate(this, WEAK_SET), value, true);
}
}, weak, false, true);
/***/ }),
/* 112 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var LIBRARY = __webpack_require__(61);
var global = __webpack_require__(13);
var ctx = __webpack_require__(32);
var classof = __webpack_require__(100);
var $export = __webpack_require__(3);
var isObject = __webpack_require__(5);
var aFunction = __webpack_require__(58);
var anInstance = __webpack_require__(59);
var forOf = __webpack_require__(60);
var speciesConstructor = __webpack_require__(324);
var task = __webpack_require__(76).set;
var microtask = __webpack_require__(326)();
var newPromiseCapabilityModule = __webpack_require__(113);
var perform = __webpack_require__(327);
var promiseResolve = __webpack_require__(328);
var PROMISE = 'Promise';
var TypeError = global.TypeError;
var process = global.process;
var $Promise = global[PROMISE];
var isNode = classof(process) == 'process';
var empty = function () { /* empty */ };
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
var USE_NATIVE = !!function () {
try {
// correct subclassing with @@species support
var promise = $Promise.resolve(1);
var FakePromise = (promise.constructor = {})[__webpack_require__(10)('species')] = function (exec) {
exec(empty, empty);
};
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
} catch (e) { /* empty */ }
}();
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, isReject) {
if (promise._n) return;
promise._n = true;
var chain = promise._c;
microtask(function () {
var value = promise._v;
var ok = promise._s == 1;
var i = 0;
var run = function (reaction) {
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then;
try {
if (handler) {
if (!ok) {
if (promise._h == 2) onHandleUnhandled(promise);
promise._h = 1;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value);
if (domain) domain.exit();
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (e) {
reject(e);
}
};
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
promise._c = [];
promise._n = false;
if (isReject && !promise._h) onUnhandled(promise);
});
};
var onUnhandled = function (promise) {
task.call(global, function () {
var value = promise._v;
var unhandled = isUnhandled(promise);
var result, handler, console;
if (unhandled) {
result = perform(function () {
if (isNode) {
process.emit('unhandledRejection', value, promise);
} else if (handler = global.onunhandledrejection) {
handler({ promise: promise, reason: value });
} else if ((console = global.console) && console.error) {
console.error('Unhandled promise rejection', value);
}
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
} promise._a = undefined;
if (unhandled && result.e) throw result.v;
});
};
var isUnhandled = function (promise) {
return promise._h !== 1 && (promise._a || promise._c).length === 0;
};
var onHandleUnhandled = function (promise) {
task.call(global, function () {
var handler;
if (isNode) {
process.emit('rejectionHandled', promise);
} else if (handler = global.onrejectionhandled) {
handler({ promise: promise, reason: promise._v });
}
});
};
var $reject = function (value) {
var promise = this;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
promise._v = value;
promise._s = 2;
if (!promise._a) promise._a = promise._c.slice();
notify(promise, true);
};
var $resolve = function (value) {
var promise = this;
var then;
if (promise._d) return;
promise._d = true;
promise = promise._w || promise; // unwrap
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
if (then = isThenable(value)) {
microtask(function () {
var wrapper = { _w: promise, _d: false }; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
} catch (e) {
$reject.call(wrapper, e);
}
});
} else {
promise._v = value;
promise._s = 1;
notify(promise, false);
}
} catch (e) {
$reject.call({ _w: promise, _d: false }, e); // wrap
}
};
// constructor polyfill
if (!USE_NATIVE) {
// 25.4.3.1 Promise(executor)
$Promise = function Promise(executor) {
anInstance(this, $Promise, PROMISE, '_h');
aFunction(executor);
Internal.call(this);
try {
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
} catch (err) {
$reject.call(this, err);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
this._c = []; // <- awaiting reactions
this._a = undefined; // <- checked in isUnhandled reactions
this._s = 0; // <- state
this._d = false; // <- done
this._v = undefined; // <- value
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
this._n = false; // <- notify
};
Internal.prototype = __webpack_require__(57)($Promise.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
then: function then(onFulfilled, onRejected) {
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = isNode ? process.domain : undefined;
this._c.push(reaction);
if (this._a) this._a.push(reaction);
if (this._s) notify(this, false);
return reaction.promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
this.promise = promise;
this.resolve = ctx($resolve, promise, 1);
this.reject = ctx($reject, promise, 1);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === $Promise || C === Wrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
__webpack_require__(51)($Promise, PROMISE);
__webpack_require__(104)(PROMISE);
Wrapper = __webpack_require__(43)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
reject: function reject(r) {
var capability = newPromiseCapability(this);
var $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
resolve: function resolve(x) {
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
}
});
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(75)(function (iter) {
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var values = [];
var index = 0;
var remaining = 1;
forOf(iterable, false, function (promise) {
var $index = index++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
C.resolve(promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[$index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.e) reject(result.v);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
forOf(iterable, false, function (promise) {
C.resolve(promise).then(capability.resolve, reject);
});
});
if (result.e) reject(result.v);
return capability.promise;
}
});
/***/ }),
/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 25.4.1.5 NewPromiseCapability(C)
var aFunction = __webpack_require__(58);
function PromiseCapability(C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve);
this.reject = aFunction(reject);
}
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/* 114 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// ECMAScript 6 symbols shim
var global = __webpack_require__(13);
var has = __webpack_require__(27);
var DESCRIPTORS = __webpack_require__(22);
var $export = __webpack_require__(3);
var redefine = __webpack_require__(30);
var META = __webpack_require__(34).KEY;
var $fails = __webpack_require__(23);
var shared = __webpack_require__(73);
var setToStringTag = __webpack_require__(51);
var uid = __webpack_require__(48);
var wks = __webpack_require__(10);
var wksExt = __webpack_require__(115);
var wksDefine = __webpack_require__(329);
var enumKeys = __webpack_require__(330);
var isArray = __webpack_require__(108);
var anObject = __webpack_require__(18);
var isObject = __webpack_require__(5);
var toIObject = __webpack_require__(24);
var toPrimitive = __webpack_require__(69);
var createDesc = __webpack_require__(49);
var _create = __webpack_require__(70);
var gOPNExt = __webpack_require__(116);
var $GOPD = __webpack_require__(63);
var $DP = __webpack_require__(19);
var $keys = __webpack_require__(37);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
var $Symbol = global.Symbol;
var $JSON = global.JSON;
var _stringify = $JSON && $JSON.stringify;
var PROTOTYPE = 'prototype';
var HIDDEN = wks('_hidden');
var TO_PRIMITIVE = wks('toPrimitive');
var isEnum = {}.propertyIsEnumerable;
var SymbolRegistry = shared('symbol-registry');
var AllSymbols = shared('symbols');
var OPSymbols = shared('op-symbols');
var ObjectProto = Object[PROTOTYPE];
var USE_NATIVE = typeof $Symbol == 'function';
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDesc = DESCRIPTORS && $fails(function () {
return _create(dP({}, 'a', {
get: function () { return dP(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (it, key, D) {
var protoDesc = gOPD(ObjectProto, key);
if (protoDesc) delete ObjectProto[key];
dP(it, key, D);
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
} : dP;
var wrap = function (tag) {
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
sym._k = tag;
return sym;
};
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return it instanceof $Symbol;
};
var $defineProperty = function defineProperty(it, key, D) {
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
anObject(it);
key = toPrimitive(key, true);
anObject(D);
if (has(AllSymbols, key)) {
if (!D.enumerable) {
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
it[HIDDEN][key] = true;
} else {
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
D = _create(D, { enumerable: createDesc(0, false) });
} return setSymbolDesc(it, key, D);
} return dP(it, key, D);
};
var $defineProperties = function defineProperties(it, P) {
anObject(it);
var keys = enumKeys(P = toIObject(P));
var i = 0;
var l = keys.length;
var key;
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
return it;
};
var $create = function create(it, P) {
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
};
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
var E = isEnum.call(this, key = toPrimitive(key, true));
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
it = toIObject(it);
key = toPrimitive(key, true);
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
var D = gOPD(it, key);
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
return D;
};
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
var IS_OP = it === ObjectProto;
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
} return result;
};
// 19.4.1.1 Symbol([description])
if (!USE_NATIVE) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
var $set = function (value) {
if (this === ObjectProto) $set.call(OPSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDesc(this, tag, createDesc(1, value));
};
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
return wrap(tag);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return this._k;
});
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
__webpack_require__(77).f = gOPNExt.f = $getOwnPropertyNames;
__webpack_require__(52).f = $propertyIsEnumerable;
__webpack_require__(65).f = $getOwnPropertySymbols;
if (DESCRIPTORS && !__webpack_require__(61)) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
wksExt.f = function (name) {
return wrap(wks(name));
};
}
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
for (var es6Symbols = (
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
// 19.4.2.1 Symbol.for(key)
'for': function (key) {
return has(SymbolRegistry, key += '')
? SymbolRegistry[key]
: SymbolRegistry[key] = $Symbol(key);
},
// 19.4.2.5 Symbol.keyFor(sym)
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
},
useSetter: function () { setter = true; },
useSimple: function () { setter = false; }
});
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
// 19.1.2.2 Object.create(O [, Properties])
create: $create,
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
defineProperty: $defineProperty,
// 19.1.2.3 Object.defineProperties(O, Properties)
defineProperties: $defineProperties,
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
// 19.1.2.7 Object.getOwnPropertyNames(O)
getOwnPropertyNames: $getOwnPropertyNames,
// 19.1.2.8 Object.getOwnPropertySymbols(O)
getOwnPropertySymbols: $getOwnPropertySymbols
});
// 24.3.2 JSON.stringify(value [, replacer [, space]])
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
var S = $Symbol();
// MS Edge converts symbol values to JSON as {}
// WebKit converts symbol values to JSON as null
// V8 throws on boxed symbols
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
})), 'JSON', {
stringify: function stringify(it) {
var args = [it];
var i = 1;
var replacer, $replacer;
while (arguments.length > i) args.push(arguments[i++]);
$replacer = replacer = args[1];
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return _stringify.apply($JSON, args);
}
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(31)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
setToStringTag(Math, 'Math', true);
// 24.3.3 JSON[@@toStringTag]
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/* 115 */
/***/ (function(module, exports, __webpack_require__) {
exports.f = __webpack_require__(10);
/***/ }),
/* 116 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
var toIObject = __webpack_require__(24);
var gOPN = __webpack_require__(77).f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return gOPN(it);
} catch (e) {
return windowNames.slice();
}
};
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
};
/***/ }),
/* 117 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.5 Object.freeze(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(34).onFreeze;
__webpack_require__(26)('freeze', function ($freeze) {
return function freeze(it) {
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
};
});
/***/ }),
/* 118 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.17 Object.seal(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(34).onFreeze;
__webpack_require__(26)('seal', function ($seal) {
return function seal(it) {
return $seal && isObject(it) ? $seal(meta(it)) : it;
};
});
/***/ }),
/* 119 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.15 Object.preventExtensions(O)
var isObject = __webpack_require__(5);
var meta = __webpack_require__(34).onFreeze;
__webpack_require__(26)('preventExtensions', function ($preventExtensions) {
return function preventExtensions(it) {
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
};
});
/***/ }),
/* 120 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.12 Object.isFrozen(O)
var isObject = __webpack_require__(5);
__webpack_require__(26)('isFrozen', function ($isFrozen) {
return function isFrozen(it) {
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
};
});
/***/ }),
/* 121 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.13 Object.isSealed(O)
var isObject = __webpack_require__(5);
__webpack_require__(26)('isSealed', function ($isSealed) {
return function isSealed(it) {
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
};
});
/***/ }),
/* 122 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.11 Object.isExtensible(O)
var isObject = __webpack_require__(5);
__webpack_require__(26)('isExtensible', function ($isExtensible) {
return function isExtensible(it) {
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
};
});
/***/ }),
/* 123 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
var toIObject = __webpack_require__(24);
var $getOwnPropertyDescriptor = __webpack_require__(63).f;
__webpack_require__(26)('getOwnPropertyDescriptor', function () {
return function getOwnPropertyDescriptor(it, key) {
return $getOwnPropertyDescriptor(toIObject(it), key);
};
});
/***/ }),
/* 124 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 Object.getPrototypeOf(O)
var toObject = __webpack_require__(33);
var $getPrototypeOf = __webpack_require__(102);
__webpack_require__(26)('getPrototypeOf', function () {
return function getPrototypeOf(it) {
return $getPrototypeOf(toObject(it));
};
});
/***/ }),
/* 125 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 Object.keys(O)
var toObject = __webpack_require__(33);
var $keys = __webpack_require__(37);
__webpack_require__(26)('keys', function () {
return function keys(it) {
return $keys(toObject(it));
};
});
/***/ }),
/* 126 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 Object.getOwnPropertyNames(O)
__webpack_require__(26)('getOwnPropertyNames', function () {
return __webpack_require__(116).f;
});
/***/ }),
/* 127 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
var $export = __webpack_require__(3);
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(109) });
/***/ }),
/* 128 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.10 Object.is(value1, value2)
var $export = __webpack_require__(3);
$export($export.S, 'Object', { is: __webpack_require__(331) });
/***/ }),
/* 129 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__(3);
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(105).set });
/***/ }),
/* 130 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(19).f;
var FProto = Function.prototype;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// 19.2.4.2 name
NAME in FProto || __webpack_require__(22) && dP(FProto, NAME, {
configurable: true,
get: function () {
try {
return ('' + this).match(nameRE)[1];
} catch (e) {
return '';
}
}
});
/***/ }),
/* 131 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(3);
var toIObject = __webpack_require__(24);
var toLength = __webpack_require__(25);
$export($export.S, 'String', {
// 21.1.2.4 String.raw(callSite, ...substitutions)
raw: function raw(callSite) {
var tpl = toIObject(callSite.raw);
var len = toLength(tpl.length);
var aLen = arguments.length;
var res = [];
var i = 0;
while (len > i) {
res.push(String(tpl[i++]));
if (i < aLen) res.push(String(arguments[i]));
} return res.join('');
}
});
/***/ }),
/* 132 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(3);
var toAbsoluteIndex = __webpack_require__(56);
var fromCharCode = String.fromCharCode;
var $fromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var res = [];
var aLen = arguments.length;
var i = 0;
var code;
while (aLen > i) {
code = +arguments[i++];
if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
res.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
);
} return res.join('');
}
});
/***/ }),
/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(3);
var $at = __webpack_require__(332)(false);
$export($export.P, 'String', {
// 21.1.3.3 String.prototype.codePointAt(pos)
codePointAt: function codePointAt(pos) {
return $at(this, pos);
}
});
/***/ }),
/* 134 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(3);
$export($export.P, 'String', {
// 21.1.3.13 String.prototype.repeat(count)
repeat: __webpack_require__(135)
});
/***/ }),
/* 135 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toInteger = __webpack_require__(55);
var defined = __webpack_require__(38);
module.exports = function repeat(count) {
var str = String(defined(this));
var res = '';
var n = toInteger(count);
if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
return res;
};
/***/ }),
/* 136 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
var $export = __webpack_require__(3);
var toLength = __webpack_require__(25);
var context = __webpack_require__(78);
var STARTS_WITH = 'startsWith';
var $startsWith = ''[STARTS_WITH];
$export($export.P + $export.F * __webpack_require__(79)(STARTS_WITH), 'String', {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = context(this, searchString, STARTS_WITH);
var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return $startsWith
? $startsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/* 137 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.8 IsRegExp(argument)
var isObject = __webpack_require__(5);
var cof = __webpack_require__(42);
var MATCH = __webpack_require__(10)('match');
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
};
/***/ }),
/* 138 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
var $export = __webpack_require__(3);
var toLength = __webpack_require__(25);
var context = __webpack_require__(78);
var ENDS_WITH = 'endsWith';
var $endsWith = ''[ENDS_WITH];
$export($export.P + $export.F * __webpack_require__(79)(ENDS_WITH), 'String', {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = context(this, searchString, ENDS_WITH);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
var search = String(searchString);
return $endsWith
? $endsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ }),
/* 139 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
var $export = __webpack_require__(3);
var context = __webpack_require__(78);
var INCLUDES = 'includes';
$export($export.P + $export.F * __webpack_require__(79)(INCLUDES), 'String', {
includes: function includes(searchString /* , position = 0 */) {
return !!~context(this, searchString, INCLUDES)
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/* 140 */
/***/ (function(module, exports, __webpack_require__) {
// 21.2.5.3 get RegExp.prototype.flags()
if (__webpack_require__(22) && /./g.flags != 'g') __webpack_require__(19).f(RegExp.prototype, 'flags', {
configurable: true,
get: __webpack_require__(333)
});
/***/ }),
/* 141 */
/***/ (function(module, exports, __webpack_require__) {
// @@match logic
__webpack_require__(66)('match', 1, function (defined, MATCH, $match) {
// 21.1.3.11 String.prototype.match(regexp)
return [function match(regexp) {
'use strict';
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[MATCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
}, $match];
});
/***/ }),
/* 142 */
/***/ (function(module, exports, __webpack_require__) {
// @@replace logic
__webpack_require__(66)('replace', 2, function (defined, REPLACE, $replace) {
// 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
return [function replace(searchValue, replaceValue) {
'use strict';
var O = defined(this);
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
return fn !== undefined
? fn.call(searchValue, O, replaceValue)
: $replace.call(String(O), searchValue, replaceValue);
}, $replace];
});
/***/ }),
/* 143 */
/***/ (function(module, exports, __webpack_require__) {
// @@split logic
__webpack_require__(66)('split', 2, function (defined, SPLIT, $split) {
'use strict';
var isRegExp = __webpack_require__(137);
var _split = $split;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
''[$SPLIT](/.?/)[LENGTH]
) {
var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
// based on es5-shim implementation, need to rework it
$split = function (separator, limit) {
var string = String(this);
if (separator === undefined && limit === 0) return [];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) return _split.call(string, separator, limit);
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var separator2, match, lastIndex, lastLength, i;
// Doesn't need flags gy, but they don't hurt
if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
while (match = separatorCopy.exec(string)) {
// `separatorCopy.lastIndex` is not reliable cross-browser
lastIndex = match.index + match[0][LENGTH];
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
// Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
// eslint-disable-next-line no-loop-func
if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
});
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
lastLength = match[0][LENGTH];
lastLastIndex = lastIndex;
if (output[LENGTH] >= splitLimit) break;
}
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
}
if (lastLastIndex === string[LENGTH]) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
};
// Chakra, V8
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
$split = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
};
}
// 21.1.3.17 String.prototype.split(separator, limit)
return [function split(separator, limit) {
var O = defined(this);
var fn = separator == undefined ? undefined : separator[SPLIT];
return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
}, $split];
});
/***/ }),
/* 144 */
/***/ (function(module, exports, __webpack_require__) {
// @@search logic
__webpack_require__(66)('search', 1, function (defined, SEARCH, $search) {
// 21.1.3.15 String.prototype.search(regexp)
return [function search(regexp) {
'use strict';
var O = defined(this);
var fn = regexp == undefined ? undefined : regexp[SEARCH];
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
}, $search];
});
/***/ }),
/* 145 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ctx = __webpack_require__(32);
var $export = __webpack_require__(3);
var toObject = __webpack_require__(33);
var call = __webpack_require__(97);
var isArrayIter = __webpack_require__(98);
var toLength = __webpack_require__(25);
var createProperty = __webpack_require__(80);
var getIterFn = __webpack_require__(99);
$export($export.S + $export.F * !__webpack_require__(75)(function (iter) { Array.from(iter); }), 'Array', {
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var aLen = arguments.length;
var mapfn = aLen > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var index = 0;
var iterFn = getIterFn(O);
var length, result, step, iterator;
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
// if object isn't iterable or it's array with default iterator - use simple case
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
}
} else {
length = toLength(O.length);
for (result = new C(length); length > index; index++) {
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
}
}
result.length = index;
return result;
}
});
/***/ }),
/* 146 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__(3);
var createProperty = __webpack_require__(80);
// WebKit Array.of isn't generic
$export($export.S + $export.F * __webpack_require__(23)(function () {
function F() { /* empty */ }
return !(Array.of.call(F) instanceof F);
}), 'Array', {
// 22.1.2.3 Array.of( ...items)
of: function of(/* ...args */) {
var index = 0;
var aLen = arguments.length;
var result = new (typeof this == 'function' ? this : Array)(aLen);
while (aLen > index) createProperty(result, index, arguments[index++]);
result.length = aLen;
return result;
}
});
/***/ }),
/* 147 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var $export = __webpack_require__(3);
$export($export.P, 'Array', { copyWithin: __webpack_require__(334) });
__webpack_require__(45)('copyWithin');
/***/ }),
/* 148 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
var $export = __webpack_require__(3);
var $find = __webpack_require__(64)(5);
var KEY = 'find';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(45)(KEY);
/***/ }),
/* 149 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
var $export = __webpack_require__(3);
var $find = __webpack_require__(64)(6);
var KEY = 'findIndex';
var forced = true;
// Shouldn't skip holes
if (KEY in []) Array(1)[KEY](function () { forced = false; });
$export($export.P + $export.F * forced, 'Array', {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(45)(KEY);
/***/ }),
/* 150 */
/***/ (function(module, exports, __webpack_require__) {
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var $export = __webpack_require__(3);
$export($export.P, 'Array', { fill: __webpack_require__(335) });
__webpack_require__(45)('fill');
/***/ }),
/* 151 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.2 Number.isFinite(number)
var $export = __webpack_require__(3);
var _isFinite = __webpack_require__(13).isFinite;
$export($export.S, 'Number', {
isFinite: function isFinite(it) {
return typeof it == 'number' && _isFinite(it);
}
});
/***/ }),
/* 152 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var $export = __webpack_require__(3);
$export($export.S, 'Number', { isInteger: __webpack_require__(153) });
/***/ }),
/* 153 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.3 Number.isInteger(number)
var isObject = __webpack_require__(5);
var floor = Math.floor;
module.exports = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ }),
/* 154 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.5 Number.isSafeInteger(number)
var $export = __webpack_require__(3);
var isInteger = __webpack_require__(153);
var abs = Math.abs;
$export($export.S, 'Number', {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
}
});
/***/ }),
/* 155 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.4 Number.isNaN(number)
var $export = __webpack_require__(3);
$export($export.S, 'Number', {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
return number != number;
}
});
/***/ }),
/* 156 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.1 Number.EPSILON
var $export = __webpack_require__(3);
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
/***/ }),
/* 157 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.10 Number.MIN_SAFE_INTEGER
var $export = __webpack_require__(3);
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
/***/ }),
/* 158 */
/***/ (function(module, exports, __webpack_require__) {
// 20.1.2.6 Number.MAX_SAFE_INTEGER
var $export = __webpack_require__(3);
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
/***/ }),
/* 159 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/Array.prototype.includes
var $export = __webpack_require__(3);
var $includes = __webpack_require__(95)(true);
$export($export.P, 'Array', {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
__webpack_require__(45)('includes');
/***/ }),
/* 160 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(3);
var $values = __webpack_require__(161)(false);
$export($export.S, 'Object', {
values: function values(it) {
return $values(it);
}
});
/***/ }),
/* 161 */
/***/ (function(module, exports, __webpack_require__) {
var getKeys = __webpack_require__(37);
var toIObject = __webpack_require__(24);
var isEnum = __webpack_require__(52).f;
module.exports = function (isEntries) {
return function (it) {
var O = toIObject(it);
var keys = getKeys(O);
var length = keys.length;
var i = 0;
var result = [];
var key;
while (length > i) if (isEnum.call(O, key = keys[i++])) {
result.push(isEntries ? [key, O[key]] : O[key]);
} return result;
};
};
/***/ }),
/* 162 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-values-entries
var $export = __webpack_require__(3);
var $entries = __webpack_require__(161)(true);
$export($export.S, 'Object', {
entries: function entries(it) {
return $entries(it);
}
});
/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-object-getownpropertydescriptors
var $export = __webpack_require__(3);
var ownKeys = __webpack_require__(336);
var toIObject = __webpack_require__(24);
var gOPD = __webpack_require__(63);
var createProperty = __webpack_require__(80);
$export($export.S, 'Object', {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
var O = toIObject(object);
var getDesc = gOPD.f;
var keys = ownKeys(O);
var result = {};
var i = 0;
var key, desc;
while (keys.length > i) {
desc = getDesc(O, key = keys[i++]);
if (desc !== undefined) createProperty(result, key, desc);
}
return result;
}
});
/***/ }),
/* 164 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(3);
var $pad = __webpack_require__(165);
var userAgent = __webpack_require__(166);
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
}
});
/***/ }),
/* 165 */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(25);
var repeat = __webpack_require__(135);
var defined = __webpack_require__(38);
module.exports = function (that, maxLength, fillString, left) {
var S = String(defined(that));
var stringLength = S.length;
var fillStr = fillString === undefined ? ' ' : String(fillString);
var intMaxLength = toLength(maxLength);
if (intMaxLength <= stringLength || fillStr == '') return S;
var fillLen = intMaxLength - stringLength;
var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
return left ? stringFiller + S : S + stringFiller;
};
/***/ }),
/* 166 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var navigator = global.navigator;
module.exports = navigator && navigator.userAgent || '';
/***/ }),
/* 167 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__(3);
var $pad = __webpack_require__(165);
var userAgent = __webpack_require__(166);
// https://github.com/zloirock/core-js/issues/280
$export($export.P + $export.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent), 'String', {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ }),
/* 168 */
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(3);
var $task = __webpack_require__(76);
$export($export.G + $export.B, {
setImmediate: $task.set,
clearImmediate: $task.clear
});
/***/ }),
/* 169 */
/***/ (function(module, exports, __webpack_require__) {
var $iterators = __webpack_require__(81);
var getKeys = __webpack_require__(37);
var redefine = __webpack_require__(30);
var global = __webpack_require__(13);
var hide = __webpack_require__(31);
var Iterators = __webpack_require__(50);
var wks = __webpack_require__(10);
var ITERATOR = wks('iterator');
var TO_STRING_TAG = wks('toStringTag');
var ArrayValues = Iterators.Array;
var DOMIterables = {
CSSRuleList: true, // TODO: Not spec compliant, should be false.
CSSStyleDeclaration: false,
CSSValueList: false,
ClientRectList: false,
DOMRectList: false,
DOMStringList: false,
DOMTokenList: true,
DataTransferItemList: false,
FileList: false,
HTMLAllCollection: false,
HTMLCollection: false,
HTMLFormElement: false,
HTMLSelectElement: false,
MediaList: true, // TODO: Not spec compliant, should be false.
MimeTypeArray: false,
NamedNodeMap: false,
NodeList: true,
PaintRequestList: false,
Plugin: false,
PluginArray: false,
SVGLengthList: false,
SVGNumberList: false,
SVGPathSegList: false,
SVGPointList: false,
SVGStringList: false,
SVGTransformList: false,
SourceBufferList: false,
StyleSheetList: true, // TODO: Not spec compliant, should be false.
TextTrackCueList: false,
TextTrackList: false,
TouchList: false
};
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
var NAME = collections[i];
var explicit = DOMIterables[NAME];
var Collection = global[NAME];
var proto = Collection && Collection.prototype;
var key;
if (proto) {
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = ArrayValues;
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
}
}
/***/ }),
/* 170 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var privatePool = new WeakMap();
/**
* Calculates indexes of columns to render OR columns that are visible.
* To redo the calculation, you need to create a new calculator.
*
* @class ViewportColumnsCalculator
*/
var ViewportColumnsCalculator = function () {
_createClass(ViewportColumnsCalculator, null, [{
key: 'DEFAULT_WIDTH',
/**
* Default column width
*
* @type {Number}
*/
get: function get() {
return 50;
}
/**
* @param {Number} viewportWidth Width of the viewport
* @param {Number} scrollOffset Current horizontal scroll position of the viewport
* @param {Number} totalColumns Total number of rows
* @param {Function} columnWidthFn Function that returns the width of the column at a given index (in px)
* @param {Function} overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin)
* @param {Boolean} onlyFullyVisible if `true`, only startRow and endRow will be indexes of rows that are fully in viewport
* @param {Boolean} stretchH
* @param {Function} [stretchingColumnWidthFn] Function that returns the new width of the stretched column.
*/
}]);
function ViewportColumnsCalculator(viewportWidth, scrollOffset, totalColumns, columnWidthFn, overrideFn, onlyFullyVisible, stretchH) {
var stretchingColumnWidthFn = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : function (width) {
return width;
};
_classCallCheck(this, ViewportColumnsCalculator);
privatePool.set(this, {
viewportWidth: viewportWidth,
scrollOffset: scrollOffset,
totalColumns: totalColumns,
columnWidthFn: columnWidthFn,
overrideFn: overrideFn,
onlyFullyVisible: onlyFullyVisible,
stretchingColumnWidthFn: stretchingColumnWidthFn
});
/**
* Number of rendered/visible columns
*
* @type {Number}
*/
this.count = 0;
/**
* Index of the first rendered/visible column (can be overwritten using overrideFn)
*
* @type {Number|null}
*/
this.startColumn = null;
/**
* Index of the last rendered/visible column (can be overwritten using overrideFn)
*
* @type {null}
*/
this.endColumn = null;
/**
* Position of the first rendered/visible column (in px)
*
* @type {Number|null}
*/
this.startPosition = null;
this.stretchAllRatio = 0;
this.stretchLastWidth = 0;
this.stretch = stretchH;
this.totalTargetWidth = 0;
this.needVerifyLastColumnWidth = true;
this.stretchAllColumnsWidth = [];
this.calculate();
}
/**
* Calculates viewport
*/
_createClass(ViewportColumnsCalculator, [{
key: 'calculate',
value: function calculate() {
var sum = 0;
var needReverse = true;
var startPositions = [];
var columnWidth = void 0;
var priv = privatePool.get(this);
var onlyFullyVisible = priv.onlyFullyVisible;
var overrideFn = priv.overrideFn;
var scrollOffset = priv.scrollOffset;
var totalColumns = priv.totalColumns;
var viewportWidth = priv.viewportWidth;
for (var i = 0; i < totalColumns; i++) {
columnWidth = this._getColumnWidth(i);
if (sum <= scrollOffset && !onlyFullyVisible) {
this.startColumn = i;
}
// +1 pixel for row header width compensation for horizontal scroll > 0
var compensatedViewportWidth = scrollOffset > 0 ? viewportWidth + 1 : viewportWidth;
if (sum >= scrollOffset && sum + columnWidth <= scrollOffset + compensatedViewportWidth) {
if (this.startColumn == null) {
this.startColumn = i;
}
this.endColumn = i;
}
startPositions.push(sum);
sum += columnWidth;
if (!onlyFullyVisible) {
this.endColumn = i;
}
if (sum >= scrollOffset + viewportWidth) {
needReverse = false;
break;
}
}
if (this.endColumn === totalColumns - 1 && needReverse) {
this.startColumn = this.endColumn;
while (this.startColumn > 0) {
var viewportSum = startPositions[this.endColumn] + columnWidth - startPositions[this.startColumn - 1];
if (viewportSum <= viewportWidth || !onlyFullyVisible) {
this.startColumn--;
}
if (viewportSum > viewportWidth) {
break;
}
}
}
if (this.startColumn !== null && overrideFn) {
overrideFn(this);
}
this.startPosition = startPositions[this.startColumn];
if (this.startPosition == void 0) {
this.startPosition = null;
}
if (this.startColumn !== null) {
this.count = this.endColumn - this.startColumn + 1;
}
}
/**
* Recalculate columns stretching.
*
* @param {Number} totalWidth
*/
}, {
key: 'refreshStretching',
value: function refreshStretching(totalWidth) {
if (this.stretch === 'none') {
return;
}
this.totalTargetWidth = totalWidth;
var priv = privatePool.get(this);
var totalColumns = priv.totalColumns;
var sumAll = 0;
for (var i = 0; i < totalColumns; i++) {
var columnWidth = this._getColumnWidth(i);
var permanentColumnWidth = priv.stretchingColumnWidthFn(void 0, i);
if (typeof permanentColumnWidth === 'number') {
totalWidth -= permanentColumnWidth;
} else {
sumAll += columnWidth;
}
}
var remainingSize = totalWidth - sumAll;
if (this.stretch === 'all' && remainingSize > 0) {
this.stretchAllRatio = totalWidth / sumAll;
this.stretchAllColumnsWidth = [];
this.needVerifyLastColumnWidth = true;
} else if (this.stretch === 'last' && totalWidth !== Infinity) {
var _columnWidth = this._getColumnWidth(totalColumns - 1);
var lastColumnWidth = remainingSize + _columnWidth;
this.stretchLastWidth = lastColumnWidth >= 0 ? lastColumnWidth : _columnWidth;
}
}
/**
* Get stretched column width based on stretchH (all or last) setting passed in handsontable instance.
*
* @param {Number} column
* @param {Number} baseWidth
* @returns {Number|null}
*/
}, {
key: 'getStretchedColumnWidth',
value: function getStretchedColumnWidth(column, baseWidth) {
var result = null;
if (this.stretch === 'all' && this.stretchAllRatio !== 0) {
result = this._getStretchedAllColumnWidth(column, baseWidth);
} else if (this.stretch === 'last' && this.stretchLastWidth !== 0) {
result = this._getStretchedLastColumnWidth(column);
}
return result;
}
/**
* @param {Number} column
* @param {Number} baseWidth
* @returns {Number}
* @private
*/
}, {
key: '_getStretchedAllColumnWidth',
value: function _getStretchedAllColumnWidth(column, baseWidth) {
var sumRatioWidth = 0;
var priv = privatePool.get(this);
var totalColumns = priv.totalColumns;
if (!this.stretchAllColumnsWidth[column]) {
var stretchedWidth = Math.round(baseWidth * this.stretchAllRatio);
var newStretchedWidth = priv.stretchingColumnWidthFn(stretchedWidth, column);
if (newStretchedWidth === void 0) {
this.stretchAllColumnsWidth[column] = stretchedWidth;
} else {
this.stretchAllColumnsWidth[column] = isNaN(newStretchedWidth) ? this._getColumnWidth(column) : newStretchedWidth;
}
}
if (this.stretchAllColumnsWidth.length === totalColumns && this.needVerifyLastColumnWidth) {
this.needVerifyLastColumnWidth = false;
for (var i = 0; i < this.stretchAllColumnsWidth.length; i++) {
sumRatioWidth += this.stretchAllColumnsWidth[i];
}
if (sumRatioWidth !== this.totalTargetWidth) {
this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length - 1] += this.totalTargetWidth - sumRatioWidth;
}
}
return this.stretchAllColumnsWidth[column];
}
/**
* @param {Number} column
* @returns {Number|null}
* @private
*/
}, {
key: '_getStretchedLastColumnWidth',
value: function _getStretchedLastColumnWidth(column) {
var priv = privatePool.get(this);
var totalColumns = priv.totalColumns;
if (column === totalColumns - 1) {
return this.stretchLastWidth;
}
return null;
}
/**
* @param {Number} column Column index.
* @returns {Number}
* @private
*/
}, {
key: '_getColumnWidth',
value: function _getColumnWidth(column) {
var width = privatePool.get(this).columnWidthFn(column);
if (width === void 0) {
width = ViewportColumnsCalculator.DEFAULT_WIDTH;
}
return width;
}
}]);
return ViewportColumnsCalculator;
}();
exports.default = ViewportColumnsCalculator;
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var privatePool = new WeakMap();
/**
* Calculates indexes of rows to render OR rows that are visible.
* To redo the calculation, you need to create a new calculator.
*
* @class ViewportRowsCalculator
*/
var ViewportRowsCalculator = function () {
_createClass(ViewportRowsCalculator, null, [{
key: "DEFAULT_HEIGHT",
/**
* Default row height
*
* @type {Number}
*/
get: function get() {
return 23;
}
/**
* @param {Number} viewportHeight Height of the viewport
* @param {Number} scrollOffset Current vertical scroll position of the viewport
* @param {Number} totalRows Total number of rows
* @param {Function} rowHeightFn Function that returns the height of the row at a given index (in px)
* @param {Function} overrideFn Function that changes calculated this.startRow, this.endRow (used by MergeCells plugin)
* @param {Boolean} onlyFullyVisible if `true`, only startRow and endRow will be indexes of rows that are fully in viewport
* @param {Number} horizontalScrollbarHeight
*/
}]);
function ViewportRowsCalculator(viewportHeight, scrollOffset, totalRows, rowHeightFn, overrideFn, onlyFullyVisible, horizontalScrollbarHeight) {
_classCallCheck(this, ViewportRowsCalculator);
privatePool.set(this, {
viewportHeight: viewportHeight,
scrollOffset: scrollOffset,
totalRows: totalRows,
rowHeightFn: rowHeightFn,
overrideFn: overrideFn,
onlyFullyVisible: onlyFullyVisible,
horizontalScrollbarHeight: horizontalScrollbarHeight
});
/**
* Number of rendered/visible rows
*
* @type {Number}
*/
this.count = 0;
/**
* Index of the first rendered/visible row (can be overwritten using overrideFn)
*
* @type {Number|null}
*/
this.startRow = null;
/**
* Index of the last rendered/visible row (can be overwritten using overrideFn)
*
* @type {null}
*/
this.endRow = null;
/**
* Position of the first rendered/visible row (in px)
*
* @type {Number|null}
*/
this.startPosition = null;
this.calculate();
}
/**
* Calculates viewport
*/
_createClass(ViewportRowsCalculator, [{
key: "calculate",
value: function calculate() {
var sum = 0;
var needReverse = true;
var startPositions = [];
var priv = privatePool.get(this);
var onlyFullyVisible = priv.onlyFullyVisible;
var overrideFn = priv.overrideFn;
var rowHeightFn = priv.rowHeightFn;
var scrollOffset = priv.scrollOffset;
var totalRows = priv.totalRows;
var viewportHeight = priv.viewportHeight;
var horizontalScrollbarHeight = priv.horizontalScrollbarHeight || 0;
var rowHeight = void 0;
// Calculate the number (start and end index) of rows needed
for (var i = 0; i < totalRows; i++) {
rowHeight = rowHeightFn(i);
if (rowHeight === undefined) {
rowHeight = ViewportRowsCalculator.DEFAULT_HEIGHT;
}
if (sum <= scrollOffset && !onlyFullyVisible) {
this.startRow = i;
}
// the row is within the "visible range"
if (sum >= scrollOffset && sum + rowHeight <= scrollOffset + viewportHeight - horizontalScrollbarHeight) {
if (this.startRow === null) {
this.startRow = i;
}
this.endRow = i;
}
startPositions.push(sum);
sum += rowHeight;
if (!onlyFullyVisible) {
this.endRow = i;
}
if (sum >= scrollOffset + viewportHeight - horizontalScrollbarHeight) {
needReverse = false;
break;
}
}
// If the estimation has reached the last row and there is still some space available in the viewport,
// we need to render in reverse in order to fill the whole viewport with rows
if (this.endRow === totalRows - 1 && needReverse) {
this.startRow = this.endRow;
while (this.startRow > 0) {
// rowHeight is the height of the last row
var viewportSum = startPositions[this.endRow] + rowHeight - startPositions[this.startRow - 1];
if (viewportSum <= viewportHeight - horizontalScrollbarHeight || !onlyFullyVisible) {
this.startRow--;
}
if (viewportSum >= viewportHeight - horizontalScrollbarHeight) {
break;
}
}
}
if (this.startRow !== null && overrideFn) {
overrideFn(this);
}
this.startPosition = startPositions[this.startRow];
if (this.startPosition == void 0) {
this.startPosition = null;
}
if (this.startRow !== null) {
this.count = this.endRow - this.startRow + 1;
}
}
}]);
return ViewportRowsCalculator;
}();
exports.default = ViewportRowsCalculator;
/***/ }),
/* 172 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class ColumnFilter
*/
var ColumnFilter = function () {
/**
* @param {Number} offset
* @param {Number} total
* @param {Number} countTH
*/
function ColumnFilter(offset, total, countTH) {
_classCallCheck(this, ColumnFilter);
this.offset = offset;
this.total = total;
this.countTH = countTH;
}
/**
* @param index
* @returns {Number}
*/
_createClass(ColumnFilter, [{
key: "offsetted",
value: function offsetted(index) {
return index + this.offset;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "unOffsetted",
value: function unOffsetted(index) {
return index - this.offset;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "renderedToSource",
value: function renderedToSource(index) {
return this.offsetted(index);
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "sourceToRendered",
value: function sourceToRendered(index) {
return this.unOffsetted(index);
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "offsettedTH",
value: function offsettedTH(index) {
return index - this.countTH;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "unOffsettedTH",
value: function unOffsettedTH(index) {
return index + this.countTH;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "visibleRowHeadedColumnToSourceColumn",
value: function visibleRowHeadedColumnToSourceColumn(index) {
return this.renderedToSource(this.offsettedTH(index));
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "sourceColumnToVisibleRowHeadedColumn",
value: function sourceColumnToVisibleRowHeadedColumn(index) {
return this.unOffsettedTH(this.sourceToRendered(index));
}
}]);
return ColumnFilter;
}();
exports.default = ColumnFilter;
/***/ }),
/* 173 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class RowFilter
*/
var RowFilter = function () {
/**
* @param {Number} offset
* @param {Number} total
* @param {Number} countTH
*/
function RowFilter(offset, total, countTH) {
_classCallCheck(this, RowFilter);
this.offset = offset;
this.total = total;
this.countTH = countTH;
}
/**
* @param index
* @returns {Number}
*/
_createClass(RowFilter, [{
key: "offsetted",
value: function offsetted(index) {
return index + this.offset;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "unOffsetted",
value: function unOffsetted(index) {
return index - this.offset;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "renderedToSource",
value: function renderedToSource(index) {
return this.offsetted(index);
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "sourceToRendered",
value: function sourceToRendered(index) {
return this.unOffsetted(index);
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "offsettedTH",
value: function offsettedTH(index) {
return index - this.countTH;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "unOffsettedTH",
value: function unOffsettedTH(index) {
return index + this.countTH;
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "visibleColHeadedRowToSourceRow",
value: function visibleColHeadedRowToSourceRow(index) {
return this.renderedToSource(this.offsettedTH(index));
}
/**
* @param index
* @returns {Number}
*/
}, {
key: "sourceRowToVisibleColHeadedRow",
value: function sourceRowToVisibleColHeadedRow(index) {
return this.unOffsettedTH(this.sourceToRendered(index));
}
}]);
return RowFilter;
}();
exports.default = RowFilter;
/***/ }),
/* 174 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _string = __webpack_require__(36);
var _event = __webpack_require__(295);
var _event2 = _interopRequireDefault(_event);
var _overlays = __webpack_require__(296);
var _overlays2 = _interopRequireDefault(_overlays);
var _scroll = __webpack_require__(297);
var _scroll2 = _interopRequireDefault(_scroll);
var _settings = __webpack_require__(298);
var _settings2 = _interopRequireDefault(_settings);
var _table = __webpack_require__(299);
var _table2 = _interopRequireDefault(_table);
var _viewport = __webpack_require__(301);
var _viewport2 = _interopRequireDefault(_viewport);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Walkontable
*/
var Walkontable = function () {
/**
* @param {Object} settings
*/
function Walkontable(settings) {
_classCallCheck(this, Walkontable);
var originalHeaders = [];
// this is the namespace for global events
this.guid = 'wt_' + (0, _string.randomString)();
// bootstrap from settings
if (settings.cloneSource) {
this.cloneSource = settings.cloneSource;
this.cloneOverlay = settings.cloneOverlay;
this.wtSettings = settings.cloneSource.wtSettings;
this.wtTable = new _table2.default(this, settings.table, settings.wtRootElement);
this.wtScroll = new _scroll2.default(this);
this.wtViewport = settings.cloneSource.wtViewport;
this.wtEvent = new _event2.default(this);
this.selections = this.cloneSource.selections;
} else {
this.wtSettings = new _settings2.default(this, settings);
this.wtTable = new _table2.default(this, settings.table);
this.wtScroll = new _scroll2.default(this);
this.wtViewport = new _viewport2.default(this);
this.wtEvent = new _event2.default(this);
this.selections = this.getSetting('selections');
this.wtOverlays = new _overlays2.default(this);
this.exportSettingsAsClassNames();
}
// find original headers
if (this.wtTable.THEAD.childNodes.length && this.wtTable.THEAD.childNodes[0].childNodes.length) {
for (var c = 0, clen = this.wtTable.THEAD.childNodes[0].childNodes.length; c < clen; c++) {
originalHeaders.push(this.wtTable.THEAD.childNodes[0].childNodes[c].innerHTML);
}
if (!this.getSetting('columnHeaders').length) {
this.update('columnHeaders', [function (column, TH) {
(0, _element.fastInnerText)(TH, originalHeaders[column]);
}]);
}
}
this.drawn = false;
this.drawInterrupted = false;
}
/**
* Force rerender of Walkontable
*
* @param {Boolean} [fastDraw=false] When `true`, try to refresh only the positions of borders without rerendering
* the data. It will only work if Table.draw() does not force
* rendering anyway
* @returns {Walkontable}
*/
_createClass(Walkontable, [{
key: 'draw',
value: function draw() {
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
this.drawInterrupted = false;
if (!fastDraw && !(0, _element.isVisible)(this.wtTable.TABLE)) {
// draw interrupted because TABLE is not visible
this.drawInterrupted = true;
} else {
this.wtTable.draw(fastDraw);
}
return this;
}
/**
* Returns the TD at coords. If topmost is set to true, returns TD from the topmost overlay layer,
* if not set or set to false, returns TD from the master table.
*
* @param {CellCoords} coords
* @param {Boolean} [topmost=false]
* @returns {Object}
*/
}, {
key: 'getCell',
value: function getCell(coords) {
var topmost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!topmost) {
return this.wtTable.getCell(coords);
}
var totalRows = this.wtSettings.getSetting('totalRows');
var fixedRowsTop = this.wtSettings.getSetting('fixedRowsTop');
var fixedRowsBottom = this.wtSettings.getSetting('fixedRowsBottom');
var fixedColumns = this.wtSettings.getSetting('fixedColumnsLeft');
if (coords.row < fixedRowsTop && coords.col < fixedColumns) {
return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(coords);
} else if (coords.row < fixedRowsTop) {
return this.wtOverlays.topOverlay.clone.wtTable.getCell(coords);
} else if (coords.col < fixedColumns && coords.row >= totalRows - fixedRowsBottom) {
if (this.wtOverlays.bottomLeftCornerOverlay && this.wtOverlays.bottomLeftCornerOverlay.clone) {
return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(coords);
}
} else if (coords.col < fixedColumns) {
return this.wtOverlays.leftOverlay.clone.wtTable.getCell(coords);
} else if (coords.row < totalRows && coords.row > totalRows - fixedRowsBottom) {
if (this.wtOverlays.bottomOverlay && this.wtOverlays.bottomOverlay.clone) {
return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(coords);
}
}
return this.wtTable.getCell(coords);
}
/**
* @param {Object} settings
* @param {*} value
* @returns {Walkontable}
*/
}, {
key: 'update',
value: function update(settings, value) {
return this.wtSettings.update(settings, value);
}
/**
* Scroll the viewport to a row at the given index in the data source
*
* @param {Number} row
* @returns {Walkontable}
*/
}, {
key: 'scrollVertical',
value: function scrollVertical(row) {
this.wtOverlays.topOverlay.scrollTo(row);
this.getSetting('onScrollVertically');
return this;
}
/**
* Scroll the viewport to a column at the given index in the data source
*
* @param {Number} column
* @returns {Walkontable}
*/
}, {
key: 'scrollHorizontal',
value: function scrollHorizontal(column) {
this.wtOverlays.leftOverlay.scrollTo(column);
this.getSetting('onScrollHorizontally');
return this;
}
/**
* Scrolls the viewport to a cell (rerenders if needed)
*
* @param {CellCoords} coords
* @returns {Walkontable}
*/
}, {
key: 'scrollViewport',
value: function scrollViewport(coords) {
this.wtScroll.scrollViewport(coords);
return this;
}
/**
* @returns {Array}
*/
}, {
key: 'getViewport',
value: function getViewport() {
return [this.wtTable.getFirstVisibleRow(), this.wtTable.getFirstVisibleColumn(), this.wtTable.getLastVisibleRow(), this.wtTable.getLastVisibleColumn()];
}
/**
* Get overlay name
*
* @returns {String}
*/
}, {
key: 'getOverlayName',
value: function getOverlayName() {
return this.cloneOverlay ? this.cloneOverlay.type : 'master';
}
/**
* Check overlay type of this Walkontable instance.
*
* @param {String} name Clone type @see {Overlay.CLONE_TYPES}.
* @returns {Boolean}
*/
}, {
key: 'isOverlayName',
value: function isOverlayName(name) {
if (this.cloneOverlay) {
return this.cloneOverlay.type === name;
}
return false;
}
/**
* Export settings as class names added to the parent element of the table.
*/
}, {
key: 'exportSettingsAsClassNames',
value: function exportSettingsAsClassNames() {
var _this = this;
var toExport = {
rowHeaders: ['array'],
columnHeaders: ['array']
};
var allClassNames = [];
var newClassNames = [];
(0, _object.objectEach)(toExport, function (optionType, key) {
if (optionType.indexOf('array') > -1 && _this.getSetting(key).length) {
newClassNames.push('ht' + (0, _string.toUpperCaseFirst)(key));
}
allClassNames.push('ht' + (0, _string.toUpperCaseFirst)(key));
});
(0, _element.removeClass)(this.wtTable.wtRootElement.parentNode, allClassNames);
(0, _element.addClass)(this.wtTable.wtRootElement.parentNode, newClassNames);
}
/**
* Get/Set Walkontable instance setting
*
* @param {String} key
* @param {*} [param1]
* @param {*} [param2]
* @param {*} [param3]
* @param {*} [param4]
* @returns {*}
*/
}, {
key: 'getSetting',
value: function getSetting(key, param1, param2, param3, param4) {
// this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
return this.wtSettings.getSetting(key, param1, param2, param3, param4);
}
/**
* Checks if setting exists
*
* @param {String} key
* @returns {Boolean}
*/
}, {
key: 'hasSetting',
value: function hasSetting(key) {
return this.wtSettings.has(key);
}
/**
* Destroy instance
*/
}, {
key: 'destroy',
value: function destroy() {
this.wtOverlays.destroy();
this.wtEvent.destroy();
}
}]);
return Walkontable;
}();
exports.default = Walkontable;
/***/ }),
/* 175 */
/***/ (function(module, exports) {
/***/ }),
/* 176 */
/***/ (function(module, exports) {
/***/ }),
/* 177 */
/***/ (function(module, exports) {
/***/ }),
/* 178 */
/***/ (function(module, exports) {
/***/ }),
/* 179 */
/***/ (function(module, exports) {
/***/ }),
/* 180 */
/***/ (function(module, exports) {
/***/ }),
/* 181 */
/***/ (function(module, exports) {
/***/ }),
/* 182 */
/***/ (function(module, exports) {
/***/ }),
/* 183 */
/***/ (function(module, exports) {
/***/ }),
/* 184 */
/***/ (function(module, exports) {
/***/ }),
/* 185 */
/***/ (function(module, exports) {
/***/ }),
/* 186 */
/***/ (function(module, exports) {
/***/ }),
/* 187 */
/***/ (function(module, exports) {
/***/ }),
/* 188 */
/***/ (function(module, exports) {
/***/ }),
/* 189 */
/***/ (function(module, exports) {
/***/ }),
/* 190 */
/***/ (function(module, exports) {
/***/ }),
/* 191 */
/***/ (function(module, exports) {
/***/ }),
/* 192 */
/***/ (function(module, exports) {
/***/ }),
/* 193 */
/***/ (function(module, exports) {
/***/ }),
/* 194 */
/***/ (function(module, exports) {
/***/ }),
/* 195 */
/***/ (function(module, exports) {
/***/ }),
/* 196 */
/***/ (function(module, exports) {
/***/ }),
/* 197 */
/***/ (function(module, exports) {
/***/ }),
/* 198 */
/***/ (function(module, exports) {
/***/ }),
/* 199 */
/***/ (function(module, exports) {
/***/ }),
/* 200 */
/***/ (function(module, exports) {
/***/ }),
/* 201 */
/***/ (function(module, exports) {
/***/ }),
/* 202 */
/***/ (function(module, exports) {
/***/ }),
/* 203 */
/***/ (function(module, exports) {
/***/ }),
/* 204 */
/***/ (function(module, exports) {
/***/ }),
/* 205 */
/***/ (function(module, exports) {
/***/ }),
/* 206 */
/***/ (function(module, exports) {
/***/ }),
/* 207 */
/***/ (function(module, exports) {
/***/ }),
/* 208 */
/***/ (function(module, exports) {
/***/ }),
/* 209 */
/***/ (function(module, exports) {
/***/ }),
/* 210 */
/***/ (function(module, exports) {
/***/ }),
/* 211 */
/***/ (function(module, exports) {
/***/ }),
/* 212 */
/***/ (function(module, exports) {
/***/ }),
/* 213 */
/***/ (function(module, exports) {
/***/ }),
/* 214 */
/***/ (function(module, exports) {
/***/ }),
/* 215 */
/***/ (function(module, exports) {
/***/ }),
/* 216 */
/***/ (function(module, exports) {
/***/ }),
/* 217 */
/***/ (function(module, exports) {
/***/ }),
/* 218 */
/***/ (function(module, exports) {
/***/ }),
/* 219 */
/***/ (function(module, exports) {
/***/ }),
/* 220 */
/***/ (function(module, exports) {
/***/ }),
/* 221 */
/***/ (function(module, exports) {
/***/ }),
/* 222 */
/***/ (function(module, exports) {
/***/ }),
/* 223 */
/***/ (function(module, exports) {
/***/ }),
/* 224 */
/***/ (function(module, exports) {
/***/ }),
/* 225 */
/***/ (function(module, exports) {
/***/ }),
/* 226 */
/***/ (function(module, exports) {
/***/ }),
/* 227 */
/***/ (function(module, exports) {
/***/ }),
/* 228 */
/***/ (function(module, exports) {
/***/ }),
/* 229 */
/***/ (function(module, exports) {
/***/ }),
/* 230 */
/***/ (function(module, exports) {
/***/ }),
/* 231 */
/***/ (function(module, exports) {
/***/ }),
/* 232 */
/***/ (function(module, exports) {
/***/ }),
/* 233 */
/***/ (function(module, exports) {
/***/ }),
/* 234 */
/***/ (function(module, exports) {
/***/ }),
/* 235 */
/***/ (function(module, exports) {
/***/ }),
/* 236 */
/***/ (function(module, exports) {
/***/ }),
/* 237 */
/***/ (function(module, exports) {
/***/ }),
/* 238 */
/***/ (function(module, exports) {
/***/ }),
/* 239 */
/***/ (function(module, exports) {
/***/ }),
/* 240 */
/***/ (function(module, exports) {
/***/ }),
/* 241 */
/***/ (function(module, exports) {
/***/ }),
/* 242 */
/***/ (function(module, exports) {
/***/ }),
/* 243 */
/***/ (function(module, exports) {
/***/ }),
/* 244 */
/***/ (function(module, exports) {
/***/ }),
/* 245 */
/***/ (function(module, exports) {
/***/ }),
/* 246 */
/***/ (function(module, exports) {
/***/ }),
/* 247 */
/***/ (function(module, exports) {
/***/ }),
/* 248 */
/***/ (function(module, exports) {
/***/ }),
/* 249 */
/***/ (function(module, exports) {
/***/ }),
/* 250 */
/***/ (function(module, exports) {
/***/ }),
/* 251 */
/***/ (function(module, exports) {
/***/ }),
/* 252 */
/***/ (function(module, exports) {
/***/ }),
/* 253 */
/***/ (function(module, exports) {
/***/ }),
/* 254 */
/***/ (function(module, exports) {
/***/ }),
/* 255 */
/***/ (function(module, exports) {
/***/ }),
/* 256 */
/***/ (function(module, exports) {
/***/ }),
/* 257 */
/***/ (function(module, exports) {
/***/ }),
/* 258 */
/***/ (function(module, exports) {
/***/ }),
/* 259 */
/***/ (function(module, exports) {
/***/ }),
/* 260 */
/***/ (function(module, exports) {
/***/ }),
/* 261 */
/***/ (function(module, exports) {
/***/ }),
/* 262 */
/***/ (function(module, exports) {
/***/ }),
/* 263 */
/***/ (function(module, exports) {
/***/ }),
/* 264 */
/***/ (function(module, exports) {
/***/ }),
/* 265 */
/***/ (function(module, exports) {
/***/ }),
/* 266 */
/***/ (function(module, exports) {
/***/ }),
/* 267 */
/***/ (function(module, exports) {
/***/ }),
/* 268 */
/***/ (function(module, exports) {
/***/ }),
/* 269 */
/***/ (function(module, exports) {
/***/ }),
/* 270 */
/***/ (function(module, exports) {
/***/ }),
/* 271 */
/***/ (function(module, exports) {
/***/ }),
/* 272 */
/***/ (function(module, exports) {
/***/ }),
/* 273 */
/***/ (function(module, exports) {
/***/ }),
/* 274 */
/***/ (function(module, exports) {
/***/ }),
/* 275 */
/***/ (function(module, exports) {
/***/ }),
/* 276 */
/***/ (function(module, exports) {
/***/ }),
/* 277 */
/***/ (function(module, exports) {
/***/ }),
/* 278 */
/***/ (function(module, exports) {
/***/ }),
/* 279 */
/***/ (function(module, exports) {
/***/ }),
/* 280 */
/***/ (function(module, exports) {
/***/ }),
/* 281 */
/***/ (function(module, exports) {
/***/ }),
/* 282 */
/***/ (function(module, exports) {
/***/ }),
/* 283 */
/***/ (function(module, exports) {
/***/ }),
/* 284 */
/***/ (function(module, exports) {
/***/ }),
/* 285 */
/***/ (function(module, exports) {
/***/ }),
/* 286 */
/***/ (function(module, exports) {
/***/ }),
/* 287 */
/***/ (function(module, exports) {
/***/ }),
/* 288 */
/***/ (function(module, exports) {
/***/ }),
/* 289 */
/***/ (function(module, exports) {
/***/ }),
/* 290 */
/***/ (function(module, exports) {
/***/ }),
/* 291 */
/***/ (function(module, exports) {
/***/ }),
/* 292 */
/***/ (function(module, exports) {
/***/ }),
/* 293 */
/***/ (function(module, exports) {
/***/ }),
/* 294 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.toSingleLine = toSingleLine;
var _array = __webpack_require__(2);
/**
* Tags a multiline string and return new one without line break characters and following spaces.
*
* @param {Array} strings Parts of the entire string without expressions.
* @param {...String} expressions Expressions converted to strings, which are added to the entire string.
* @returns {String}
*/
function toSingleLine(strings) {
for (var _len = arguments.length, expressions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
expressions[_key - 1] = arguments[_key];
}
var result = (0, _array.arrayReduce)(strings, function (previousValue, currentValue, index) {
var valueWithoutWhiteSpaces = currentValue.replace(/(?:\r?\n\s+)/g, '');
var expressionForIndex = expressions[index] ? expressions[index] : '';
return previousValue + valueWithoutWhiteSpaces + expressionForIndex;
}, '');
return result.trim();
} /* eslint-disable import/prefer-default-export */
/***/ }),
/* 295 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _function = __webpack_require__(41);
var _browser = __webpack_require__(28);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
*
*/
function Event(instance) {
var that = this;
var eventManager = new _eventManager2.default(instance);
this.instance = instance;
var dblClickOrigin = [null, null];
this.dblClickTimeout = [null, null];
var onMouseDown = function onMouseDown(event) {
var activeElement = document.activeElement;
var getParentNode = (0, _function.partial)(_element.getParent, event.realTarget);
var realTarget = event.realTarget;
// ignore focusable element from mouse down processing (https://github.com/handsontable/handsontable/issues/3555)
if (realTarget === activeElement || getParentNode(0) === activeElement || getParentNode(1) === activeElement) {
return;
}
var cell = that.parentCell(realTarget);
if ((0, _element.hasClass)(realTarget, 'corner')) {
that.instance.getSetting('onCellCornerMouseDown', event, realTarget);
} else if (cell.TD) {
if (that.instance.hasSetting('onCellMouseDown')) {
that.instance.getSetting('onCellMouseDown', event, cell.coords, cell.TD, that.instance);
}
}
if (event.button !== 2) {
// if not right mouse button
if (cell.TD) {
dblClickOrigin[0] = cell.TD;
clearTimeout(that.dblClickTimeout[0]);
that.dblClickTimeout[0] = setTimeout(function () {
dblClickOrigin[0] = null;
}, 1000);
}
}
};
var onTouchMove = function onTouchMove(event) {
that.instance.touchMoving = true;
};
var longTouchTimeout;
var onTouchStart = function onTouchStart(event) {
var container = this;
eventManager.addEventListener(this, 'touchmove', onTouchMove);
// Prevent cell selection when scrolling with touch event - not the best solution performance-wise
that.checkIfTouchMove = setTimeout(function () {
if (that.instance.touchMoving === true) {
that.instance.touchMoving = void 0;
eventManager.removeEventListener('touchmove', onTouchMove, false);
}
onMouseDown(event);
}, 30);
};
var onMouseOver = function onMouseOver(event) {
var table, td, mainWOT;
if (that.instance.hasSetting('onCellMouseOver')) {
table = that.instance.wtTable.TABLE;
td = (0, _element.closestDown)(event.realTarget, ['TD', 'TH'], table);
mainWOT = that.instance.cloneSource || that.instance;
if (td && td !== mainWOT.lastMouseOver && (0, _element.isChildOf)(td, table)) {
mainWOT.lastMouseOver = td;
that.instance.getSetting('onCellMouseOver', event, that.instance.wtTable.getCoords(td), td, that.instance);
}
}
};
var onMouseOut = function onMouseOut(event) {
var table = void 0;
var lastTD = void 0;
var nextTD = void 0;
if (that.instance.hasSetting('onCellMouseOut')) {
table = that.instance.wtTable.TABLE;
lastTD = (0, _element.closestDown)(event.realTarget, ['TD', 'TH'], table);
nextTD = (0, _element.closestDown)(event.relatedTarget, ['TD', 'TH'], table);
if (lastTD && lastTD !== nextTD && (0, _element.isChildOf)(lastTD, table)) {
that.instance.getSetting('onCellMouseOut', event, that.instance.wtTable.getCoords(lastTD), lastTD, that.instance);
}
}
};
var onMouseUp = function onMouseUp(event) {
if (event.button !== 2) {
// if not right mouse button
var cell = that.parentCell(event.realTarget);
if (cell.TD === dblClickOrigin[0] && cell.TD === dblClickOrigin[1]) {
if ((0, _element.hasClass)(event.realTarget, 'corner')) {
that.instance.getSetting('onCellCornerDblClick', event, cell.coords, cell.TD, that.instance);
} else {
that.instance.getSetting('onCellDblClick', event, cell.coords, cell.TD, that.instance);
}
dblClickOrigin[0] = null;
dblClickOrigin[1] = null;
} else if (cell.TD === dblClickOrigin[0]) {
that.instance.getSetting('onCellMouseUp', event, cell.coords, cell.TD, that.instance);
dblClickOrigin[1] = cell.TD;
clearTimeout(that.dblClickTimeout[1]);
that.dblClickTimeout[1] = setTimeout(function () {
dblClickOrigin[1] = null;
}, 500);
} else if (cell.TD && that.instance.hasSetting('onCellMouseUp')) {
that.instance.getSetting('onCellMouseUp', event, cell.coords, cell.TD, that.instance);
}
}
};
var onTouchEnd = function onTouchEnd(event) {
clearTimeout(longTouchTimeout);
// that.instance.longTouch == void 0;
event.preventDefault();
onMouseUp(event);
// eventManager.removeEventListener(that.instance.wtTable.holder, "mouseup", onMouseUp);
};
eventManager.addEventListener(this.instance.wtTable.holder, 'mousedown', onMouseDown);
eventManager.addEventListener(this.instance.wtTable.TABLE, 'mouseover', onMouseOver);
eventManager.addEventListener(this.instance.wtTable.TABLE, 'mouseout', onMouseOut);
eventManager.addEventListener(this.instance.wtTable.holder, 'mouseup', onMouseUp);
// check if full HOT instance, or detached WOT AND run on mobile device
if (this.instance.wtTable.holder.parentNode.parentNode && (0, _browser.isMobileBrowser)() && !that.instance.wtTable.isWorkingOnClone()) {
var classSelector = '.' + this.instance.wtTable.holder.parentNode.className.split(' ').join('.');
eventManager.addEventListener(this.instance.wtTable.holder, 'touchstart', function (event) {
that.instance.touchApplied = true;
if ((0, _element.isChildOf)(event.target, classSelector)) {
onTouchStart.call(event.target, event);
}
});
eventManager.addEventListener(this.instance.wtTable.holder, 'touchend', function (event) {
that.instance.touchApplied = false;
if ((0, _element.isChildOf)(event.target, classSelector)) {
onTouchEnd.call(event.target, event);
}
});
if (!that.instance.momentumScrolling) {
that.instance.momentumScrolling = {};
}
eventManager.addEventListener(this.instance.wtTable.holder, 'scroll', function (event) {
clearTimeout(that.instance.momentumScrolling._timeout);
if (!that.instance.momentumScrolling.ongoing) {
that.instance.getSetting('onBeforeTouchScroll');
}
that.instance.momentumScrolling.ongoing = true;
that.instance.momentumScrolling._timeout = setTimeout(function () {
if (!that.instance.touchApplied) {
that.instance.momentumScrolling.ongoing = false;
that.instance.getSetting('onAfterMomentumScroll');
}
}, 200);
});
}
eventManager.addEventListener(window, 'resize', function () {
if (that.instance.getSetting('stretchH') !== 'none') {
that.instance.draw();
}
});
this.destroy = function () {
clearTimeout(this.dblClickTimeout[0]);
clearTimeout(this.dblClickTimeout[1]);
eventManager.destroy();
};
}
Event.prototype.parentCell = function (elem) {
var cell = {};
var TABLE = this.instance.wtTable.TABLE;
var TD = (0, _element.closestDown)(elem, ['TD', 'TH'], TABLE);
if (TD) {
cell.coords = this.instance.wtTable.getCoords(TD);
cell.TD = TD;
} else if ((0, _element.hasClass)(elem, 'wtBorder') && (0, _element.hasClass)(elem, 'current')) {
cell.coords = this.instance.selections.current.cellRange.highlight; // selections.current is current selected cell
cell.TD = this.instance.wtTable.getCell(cell.coords);
} else if ((0, _element.hasClass)(elem, 'wtBorder') && (0, _element.hasClass)(elem, 'area')) {
if (this.instance.selections.area.cellRange) {
cell.coords = this.instance.selections.area.cellRange.to; // selections.area is area selected cells
cell.TD = this.instance.wtTable.getCell(cell.coords);
}
}
return cell;
};
exports.default = Event;
/***/ }),
/* 296 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
var _unicode = __webpack_require__(20);
var _browser = __webpack_require__(28);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Overlays
*/
var Overlays = function () {
/**
* @param {Walkontable} wotInstance
*/
function Overlays(wotInstance) {
_classCallCheck(this, Overlays);
this.wot = wotInstance;
// legacy support
this.instance = this.wot;
this.eventManager = new _eventManager2.default(this.wot);
this.wot.update('scrollbarWidth', (0, _element.getScrollbarWidth)());
this.wot.update('scrollbarHeight', (0, _element.getScrollbarWidth)());
this.scrollableElement = (0, _element.getScrollableElement)(this.wot.wtTable.TABLE);
this.prepareOverlays();
this.destroyed = false;
this.keyPressed = false;
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 = false;
this.horizontalScrolling = false;
this.delegatedScrollCallback = false;
this.registeredListeners = [];
this.registerListeners();
}
/**
* Prepare overlays based on user settings.
*
* @returns {Boolean} Returns `true` if changes applied to overlay needs scroll synchronization.
*/
_createClass(Overlays, [{
key: 'prepareOverlays',
value: function prepareOverlays() {
var syncScroll = false;
if (this.topOverlay) {
syncScroll = this.topOverlay.updateStateOfRendering() || syncScroll;
} else {
this.topOverlay = _base2.default.createOverlay(_base2.default.CLONE_TOP, this.wot);
}
if (!_base2.default.hasOverlay(_base2.default.CLONE_BOTTOM)) {
this.bottomOverlay = {
needFullRender: false,
updateStateOfRendering: function updateStateOfRendering() {
return false;
}
};
}
if (!_base2.default.hasOverlay(_base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
this.bottomLeftCornerOverlay = {
needFullRender: false,
updateStateOfRendering: function updateStateOfRendering() {
return false;
}
};
}
if (this.bottomOverlay) {
syncScroll = this.bottomOverlay.updateStateOfRendering() || syncScroll;
} else {
this.bottomOverlay = _base2.default.createOverlay(_base2.default.CLONE_BOTTOM, this.wot);
}
if (this.leftOverlay) {
syncScroll = this.leftOverlay.updateStateOfRendering() || syncScroll;
} else {
this.leftOverlay = _base2.default.createOverlay(_base2.default.CLONE_LEFT, this.wot);
}
if (this.topOverlay.needFullRender && this.leftOverlay.needFullRender) {
if (this.topLeftCornerOverlay) {
syncScroll = this.topLeftCornerOverlay.updateStateOfRendering() || syncScroll;
} else {
this.topLeftCornerOverlay = _base2.default.createOverlay(_base2.default.CLONE_TOP_LEFT_CORNER, this.wot);
}
}
if (this.bottomOverlay.needFullRender && this.leftOverlay.needFullRender) {
if (this.bottomLeftCornerOverlay) {
syncScroll = this.bottomLeftCornerOverlay.updateStateOfRendering() || syncScroll;
} else {
this.bottomLeftCornerOverlay = _base2.default.createOverlay(_base2.default.CLONE_BOTTOM_LEFT_CORNER, this.wot);
}
}
if (this.wot.getSetting('debug') && !this.debug) {
this.debug = _base2.default.createOverlay(_base2.default.CLONE_DEBUG, this.wot);
}
return syncScroll;
}
/**
* Refresh and redraw table
*/
}, {
key: 'refreshAll',
value: function refreshAll() {
if (!this.wot.drawn) {
return;
}
if (!this.wot.wtTable.holder.parentNode) {
// Walkontable was detached from DOM, but this handler was not removed
this.destroy();
return;
}
this.wot.draw(true);
if (this.verticalScrolling) {
this.leftOverlay.onScroll();
}
if (this.horizontalScrolling) {
this.topOverlay.onScroll();
}
this.verticalScrolling = false;
this.horizontalScrolling = false;
}
/**
* Register all necessary event listeners.
*/
}, {
key: 'registerListeners',
value: function registerListeners() {
var _this = this;
var topOverlayScrollable = this.topOverlay.mainTableScrollableElement;
var leftOverlayScrollable = this.leftOverlay.mainTableScrollableElement;
var listenersToRegister = [];
listenersToRegister.push([document.documentElement, 'keydown', function (event) {
return _this.onKeyDown(event);
}]);
listenersToRegister.push([document.documentElement, 'keyup', function () {
return _this.onKeyUp();
}]);
listenersToRegister.push([document, 'visibilitychange', function () {
return _this.onKeyUp();
}]);
listenersToRegister.push([topOverlayScrollable, 'scroll', function (event) {
return _this.onTableScroll(event);
}]);
if (topOverlayScrollable !== leftOverlayScrollable) {
listenersToRegister.push([leftOverlayScrollable, 'scroll', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.topOverlay.needFullRender) {
listenersToRegister.push([this.topOverlay.clone.wtTable.holder, 'scroll', function (event) {
return _this.onTableScroll(event);
}]);
listenersToRegister.push([this.topOverlay.clone.wtTable.holder, 'wheel', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.bottomOverlay.needFullRender) {
listenersToRegister.push([this.bottomOverlay.clone.wtTable.holder, 'scroll', function (event) {
return _this.onTableScroll(event);
}]);
listenersToRegister.push([this.bottomOverlay.clone.wtTable.holder, 'wheel', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.leftOverlay.needFullRender) {
listenersToRegister.push([this.leftOverlay.clone.wtTable.holder, 'scroll', function (event) {
return _this.onTableScroll(event);
}]);
listenersToRegister.push([this.leftOverlay.clone.wtTable.holder, 'wheel', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.topLeftCornerOverlay && this.topLeftCornerOverlay.needFullRender) {
listenersToRegister.push([this.topLeftCornerOverlay.clone.wtTable.holder, 'wheel', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.needFullRender) {
listenersToRegister.push([this.bottomLeftCornerOverlay.clone.wtTable.holder, 'wheel', function (event) {
return _this.onTableScroll(event);
}]);
}
if (this.topOverlay.trimmingContainer !== window && this.leftOverlay.trimmingContainer !== window) {
// This is necessary?
// eventManager.addEventListener(window, 'scroll', (event) => this.refreshAll(event));
listenersToRegister.push([window, 'wheel', function (event) {
var overlay = void 0;
var deltaY = event.wheelDeltaY || event.deltaY;
var deltaX = event.wheelDeltaX || event.deltaX;
if (_this.topOverlay.clone.wtTable.holder.contains(event.realTarget)) {
overlay = 'top';
} else if (_this.bottomOverlay.clone && _this.bottomOverlay.clone.wtTable.holder.contains(event.realTarget)) {
overlay = 'bottom';
} else if (_this.leftOverlay.clone.wtTable.holder.contains(event.realTarget)) {
overlay = 'left';
} else if (_this.topLeftCornerOverlay && _this.topLeftCornerOverlay.clone && _this.topLeftCornerOverlay.clone.wtTable.holder.contains(event.realTarget)) {
overlay = 'topLeft';
} else if (_this.bottomLeftCornerOverlay && _this.bottomLeftCornerOverlay.clone && _this.bottomLeftCornerOverlay.clone.wtTable.holder.contains(event.realTarget)) {
overlay = 'bottomLeft';
}
if (overlay == 'top' && deltaY !== 0 || overlay == 'left' && deltaX !== 0 || overlay == 'bottom' && deltaY !== 0 || (overlay === 'topLeft' || overlay === 'bottomLeft') && (deltaY !== 0 || deltaX !== 0)) {
event.preventDefault();
}
}]);
}
while (listenersToRegister.length) {
var listener = listenersToRegister.pop();
this.eventManager.addEventListener(listener[0], listener[1], listener[2]);
this.registeredListeners.push(listener);
}
}
/**
* Deregister all previously registered listeners.
*/
}, {
key: 'deregisterListeners',
value: function deregisterListeners() {
while (this.registeredListeners.length) {
var listener = this.registeredListeners.pop();
this.eventManager.removeEventListener(listener[0], listener[1], listener[2]);
}
}
/**
* Scroll listener
*
* @param {Event} event
*/
}, {
key: 'onTableScroll',
value: function onTableScroll(event) {
// if mobile browser, do not update scroll positions, as the overlays are hidden during the scroll
if ((0, _browser.isMobileBrowser)()) {
return;
}
var masterHorizontal = this.leftOverlay.mainTableScrollableElement;
var masterVertical = this.topOverlay.mainTableScrollableElement;
var target = event.target;
// For key press, sync only master -> overlay position because while pressing Walkontable.render is triggered
// by hot.refreshBorder
if (this.keyPressed) {
if (masterVertical !== window && target !== window && !event.target.contains(masterVertical) || masterHorizontal !== window && target !== window && !event.target.contains(masterHorizontal)) {
return;
}
}
if (event.type === 'scroll') {
this.syncScrollPositions(event);
} else {
this.translateMouseWheelToScroll(event);
}
}
/**
* Key down listener
*/
}, {
key: 'onKeyDown',
value: function onKeyDown(event) {
this.keyPressed = (0, _unicode.isKey)(event.keyCode, 'ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT');
}
/**
* Key up listener
*/
}, {
key: 'onKeyUp',
value: function onKeyUp() {
this.keyPressed = false;
}
/**
* Translate wheel event into scroll event and sync scroll overlays position
*
* @private
* @param {Event} event
* @returns {Boolean}
*/
}, {
key: 'translateMouseWheelToScroll',
value: function translateMouseWheelToScroll(event) {
var topOverlay = this.topOverlay.clone.wtTable.holder;
var bottomOverlay = this.bottomOverlay.clone ? this.bottomOverlay.clone.wtTable.holder : null;
var leftOverlay = this.leftOverlay.clone.wtTable.holder;
var topLeftCornerOverlay = this.topLeftCornerOverlay && this.topLeftCornerOverlay.clone ? this.topLeftCornerOverlay.clone.wtTable.holder : null;
var bottomLeftCornerOverlay = this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone ? this.bottomLeftCornerOverlay.clone.wtTable.holder : null;
var mouseWheelSpeedRatio = -0.2;
var deltaY = event.wheelDeltaY || -1 * event.deltaY;
var deltaX = event.wheelDeltaX || -1 * event.deltaX;
var parentHolder = null;
var eventMockup = { type: 'wheel' };
var tempElem = event.target;
var delta = null;
// Fix for extremely slow header scrolling with a mousewheel on Firefox
if (event.deltaMode === 1) {
deltaY *= 120;
deltaX *= 120;
}
while (tempElem != document && tempElem != null) {
if (tempElem.className.indexOf('wtHolder') > -1) {
parentHolder = tempElem;
break;
}
tempElem = tempElem.parentNode;
}
eventMockup.target = parentHolder;
if (parentHolder === topLeftCornerOverlay || parentHolder === bottomLeftCornerOverlay) {
this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * deltaX, 'x');
this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * deltaY, 'y');
} else {
if (parentHolder === topOverlay || parentHolder === bottomOverlay) {
delta = deltaY;
} else if (parentHolder === leftOverlay) {
delta = deltaX;
}
this.syncScrollPositions(eventMockup, mouseWheelSpeedRatio * delta);
}
return false;
}
/**
* Synchronize scroll position between master table and overlay table.
*
* @private
* @param {Event|Object} event
* @param {Number} [fakeScrollValue=null]
* @param {String} [fakeScrollDirection=null] `x` or `y`.
*/
}, {
key: 'syncScrollPositions',
value: function syncScrollPositions(event) {
var fakeScrollValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var fakeScrollDirection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
if (this.destroyed) {
return;
}
if (arguments.length === 0) {
this.syncScrollWithMaster();
return;
}
var masterHorizontal = this.leftOverlay.mainTableScrollableElement;
var masterVertical = this.topOverlay.mainTableScrollableElement;
var target = event.target;
var tempScrollValue = 0;
var scrollValueChanged = false;
var topOverlay = void 0;
var leftOverlay = void 0;
var topLeftCornerOverlay = void 0;
var bottomLeftCornerOverlay = void 0;
var bottomOverlay = void 0;
var delegatedScroll = false;
var preventOverflow = this.wot.getSetting('preventOverflow');
if (this.topOverlay.needFullRender) {
topOverlay = this.topOverlay.clone.wtTable.holder;
}
if (this.bottomOverlay.needFullRender) {
bottomOverlay = this.bottomOverlay.clone.wtTable.holder;
}
if (this.leftOverlay.needFullRender) {
leftOverlay = this.leftOverlay.clone.wtTable.holder;
}
if (this.leftOverlay.needFullRender && this.topOverlay.needFullRender) {
topLeftCornerOverlay = this.topLeftCornerOverlay.clone.wtTable.holder;
}
if (this.leftOverlay.needFullRender && this.bottomOverlay.needFullRender) {
bottomLeftCornerOverlay = this.bottomLeftCornerOverlay.clone.wtTable.holder;
}
if (target === document) {
target = window;
}
if (target === masterHorizontal || target === masterVertical) {
if (preventOverflow) {
tempScrollValue = (0, _element.getScrollLeft)(this.scrollableElement);
} else {
tempScrollValue = (0, _element.getScrollLeft)(target);
}
// if scrolling the master table - populate the scroll values to both top and left overlays
this.horizontalScrolling = this.overlayScrollPositions.master.left !== tempScrollValue;
this.overlayScrollPositions.master.left = tempScrollValue;
scrollValueChanged = true;
if (this.pendingScrollCallbacks.master.left > 0) {
this.pendingScrollCallbacks.master.left--;
} else {
if (topOverlay && topOverlay.scrollLeft !== tempScrollValue) {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.top.left++;
}
topOverlay.scrollLeft = tempScrollValue;
delegatedScroll = masterHorizontal !== window;
}
if (bottomOverlay && bottomOverlay.scrollLeft !== tempScrollValue) {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.bottom.left++;
}
bottomOverlay.scrollLeft = tempScrollValue;
delegatedScroll = masterHorizontal !== window;
}
}
tempScrollValue = (0, _element.getScrollTop)(target);
this.verticalScrolling = this.overlayScrollPositions.master.top !== tempScrollValue;
this.overlayScrollPositions.master.top = tempScrollValue;
scrollValueChanged = true;
if (this.pendingScrollCallbacks.master.top > 0) {
this.pendingScrollCallbacks.master.top--;
} else if (leftOverlay && leftOverlay.scrollTop !== tempScrollValue) {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.left.top++;
}
leftOverlay.scrollTop = tempScrollValue;
delegatedScroll = masterVertical !== window;
}
} else if (target === bottomOverlay) {
tempScrollValue = (0, _element.getScrollLeft)(target);
// if scrolling the bottom overlay - populate the horizontal scroll to the master table
this.overlayScrollPositions.bottom.left = tempScrollValue;
scrollValueChanged = true;
if (this.pendingScrollCallbacks.bottom.left > 0) {
this.pendingScrollCallbacks.bottom.left--;
} else {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.master.left++;
}
masterHorizontal.scrollLeft = tempScrollValue;
if (topOverlay && topOverlay.scrollLeft !== tempScrollValue) {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.top.left++;
}
topOverlay.scrollLeft = tempScrollValue;
delegatedScroll = masterVertical !== window;
}
}
// "fake" scroll value calculated from the mousewheel event
if (fakeScrollValue !== null) {
scrollValueChanged = true;
masterVertical.scrollTop += fakeScrollValue;
}
} else if (target === topOverlay) {
tempScrollValue = (0, _element.getScrollLeft)(target);
// if scrolling the top overlay - populate the horizontal scroll to the master table
this.overlayScrollPositions.top.left = tempScrollValue;
scrollValueChanged = true;
if (this.pendingScrollCallbacks.top.left > 0) {
this.pendingScrollCallbacks.top.left--;
} else {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.master.left++;
}
masterHorizontal.scrollLeft = tempScrollValue;
}
// "fake" scroll value calculated from the mousewheel event
if (fakeScrollValue !== null) {
scrollValueChanged = true;
masterVertical.scrollTop += fakeScrollValue;
}
if (bottomOverlay && bottomOverlay.scrollLeft !== tempScrollValue) {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.bottom.left++;
}
bottomOverlay.scrollLeft = tempScrollValue;
delegatedScroll = masterVertical !== window;
}
} else if (target === leftOverlay) {
tempScrollValue = (0, _element.getScrollTop)(target);
// if scrolling the left overlay - populate the vertical scroll to the master table
if (this.overlayScrollPositions.left.top !== tempScrollValue) {
this.overlayScrollPositions.left.top = tempScrollValue;
scrollValueChanged = true;
if (this.pendingScrollCallbacks.left.top > 0) {
this.pendingScrollCallbacks.left.top--;
} else {
if (fakeScrollValue == null) {
this.pendingScrollCallbacks.master.top++;
}
masterVertical.scrollTop = tempScrollValue;
}
}
// "fake" scroll value calculated from the mousewheel event
if (fakeScrollValue !== null) {
scrollValueChanged = true;
masterVertical.scrollLeft += fakeScrollValue;
}
} else if (target === topLeftCornerOverlay || target === bottomLeftCornerOverlay) {
if (fakeScrollValue !== null) {
scrollValueChanged = true;
if (fakeScrollDirection === 'x') {
masterVertical.scrollLeft += fakeScrollValue;
} else if (fakeScrollDirection === 'y') {
masterVertical.scrollTop += fakeScrollValue;
}
}
}
if (!this.keyPressed && scrollValueChanged && event.type === 'scroll') {
if (this.delegatedScrollCallback) {
this.delegatedScrollCallback = false;
} else {
this.refreshAll();
}
if (delegatedScroll) {
this.delegatedScrollCallback = true;
}
}
}
/**
* Synchronize overlay scrollbars with the master scrollbar
*/
}, {
key: 'syncScrollWithMaster',
value: function syncScrollWithMaster() {
var master = this.topOverlay.mainTableScrollableElement;
var scrollLeft = master.scrollLeft,
scrollTop = master.scrollTop;
if (this.topOverlay.needFullRender) {
this.topOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;
}
if (this.bottomOverlay.needFullRender) {
this.bottomOverlay.clone.wtTable.holder.scrollLeft = scrollLeft;
}
if (this.leftOverlay.needFullRender) {
this.leftOverlay.clone.wtTable.holder.scrollTop = scrollTop;
}
}
/**
* Update the main scrollable elements for all the overlays.
*/
}, {
key: 'updateMainScrollableElements',
value: function updateMainScrollableElements() {
this.deregisterListeners();
this.leftOverlay.updateMainScrollableElement();
this.topOverlay.updateMainScrollableElement();
if (this.bottomOverlay.needFullRender) {
this.bottomOverlay.updateMainScrollableElement();
}
this.scrollableElement = (0, _element.getScrollableElement)(this.wot.wtTable.TABLE);
this.registerListeners();
}
/**
*
*/
}, {
key: 'destroy',
value: function destroy() {
this.eventManager.destroy();
this.topOverlay.destroy();
if (this.bottomOverlay.clone) {
this.bottomOverlay.destroy();
}
this.leftOverlay.destroy();
if (this.topLeftCornerOverlay) {
this.topLeftCornerOverlay.destroy();
}
if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {
this.bottomLeftCornerOverlay.destroy();
}
if (this.debug) {
this.debug.destroy();
}
this.destroyed = true;
}
/**
* @param {Boolean} [fastDraw=false]
*/
}, {
key: 'refresh',
value: function refresh() {
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (this.topOverlay.areElementSizesAdjusted && this.leftOverlay.areElementSizesAdjusted) {
var container = this.wot.wtTable.wtRootElement.parentNode || this.wot.wtTable.wtRootElement;
var width = container.clientWidth;
var height = container.clientHeight;
if (width !== this.spreaderLastSize.width || height !== this.spreaderLastSize.height) {
this.spreaderLastSize.width = width;
this.spreaderLastSize.height = height;
this.adjustElementsSize();
}
}
if (this.bottomOverlay.clone) {
this.bottomOverlay.refresh(fastDraw);
}
this.leftOverlay.refresh(fastDraw);
this.topOverlay.refresh(fastDraw);
if (this.topLeftCornerOverlay) {
this.topLeftCornerOverlay.refresh(fastDraw);
}
if (this.bottomLeftCornerOverlay && this.bottomLeftCornerOverlay.clone) {
this.bottomLeftCornerOverlay.refresh(fastDraw);
}
if (this.debug) {
this.debug.refresh(fastDraw);
}
}
/**
* Adjust overlays elements size and master table size
*
* @param {Boolean} [force=false]
*/
}, {
key: 'adjustElementsSize',
value: function adjustElementsSize() {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var totalColumns = this.wot.getSetting('totalColumns');
var totalRows = this.wot.getSetting('totalRows');
var headerRowSize = this.wot.wtViewport.getRowHeaderWidth();
var headerColumnSize = this.wot.wtViewport.getColumnHeaderHeight();
var hiderStyle = this.wot.wtTable.hider.style;
hiderStyle.width = headerRowSize + this.leftOverlay.sumCellSizes(0, totalColumns) + 'px';
hiderStyle.height = headerColumnSize + this.topOverlay.sumCellSizes(0, totalRows) + 1 + 'px';
this.topOverlay.adjustElementsSize(force);
this.leftOverlay.adjustElementsSize(force);
if (this.bottomOverlay.clone) {
this.bottomOverlay.adjustElementsSize(force);
}
}
/**
*
*/
}, {
key: 'applyToDOM',
value: function applyToDOM() {
if (!this.topOverlay.areElementSizesAdjusted || !this.leftOverlay.areElementSizesAdjusted) {
this.adjustElementsSize();
}
this.topOverlay.applyToDOM();
if (this.bottomOverlay.clone) {
this.bottomOverlay.applyToDOM();
}
this.leftOverlay.applyToDOM();
}
/**
* Get the parent overlay of the provided element.
*
* @param {HTMLElement} element
* @returns {Object|null}
*/
}, {
key: 'getParentOverlay',
value: function getParentOverlay(element) {
if (!element) {
return null;
}
var overlays = [this.topOverlay, this.leftOverlay, this.bottomOverlay, this.topLeftCornerOverlay, this.bottomLeftCornerOverlay];
var result = null;
(0, _array.arrayEach)(overlays, function (elem, i) {
if (!elem) {
return;
}
if (elem.clone && elem.clone.wtTable.TABLE.contains(element)) {
result = elem.clone;
}
});
return result;
}
}]);
return Overlays;
}();
exports.default = Overlays;
/***/ }),
/* 297 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _number = __webpack_require__(6);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Scroll
*/
var Scroll = function () {
/**
* @param {Walkontable} wotInstance
*/
function Scroll(wotInstance) {
_classCallCheck(this, Scroll);
this.wot = wotInstance;
// legacy support
this.instance = wotInstance;
}
/**
* Scrolls viewport to a cell by minimum number of cells
*
* @param {CellCoords} coords
*/
_createClass(Scroll, [{
key: 'scrollViewport',
value: function scrollViewport(coords) {
if (!this.wot.drawn) {
return;
}
var _getVariables2 = this._getVariables(),
topOverlay = _getVariables2.topOverlay,
leftOverlay = _getVariables2.leftOverlay,
totalRows = _getVariables2.totalRows,
totalColumns = _getVariables2.totalColumns,
fixedRowsTop = _getVariables2.fixedRowsTop,
fixedRowsBottom = _getVariables2.fixedRowsBottom,
fixedColumnsLeft = _getVariables2.fixedColumnsLeft;
if (coords.row < 0 || coords.row > Math.max(totalRows - 1, 0)) {
throw new Error('row ' + coords.row + ' does not exist');
}
if (coords.col < 0 || coords.col > Math.max(totalColumns - 1, 0)) {
throw new Error('column ' + coords.col + ' does not exist');
}
if (coords.row >= fixedRowsTop && coords.row < this.getFirstVisibleRow()) {
topOverlay.scrollTo(coords.row);
} else if (coords.row > this.getLastVisibleRow() && coords.row < totalRows - fixedRowsBottom) {
topOverlay.scrollTo(coords.row, true);
}
if (coords.col >= fixedColumnsLeft && coords.col < this.getFirstVisibleColumn()) {
leftOverlay.scrollTo(coords.col);
} else if (coords.col > this.getLastVisibleColumn()) {
leftOverlay.scrollTo(coords.col, true);
}
}
/**
* Get first visible row based on virtual dom and how table is visible in browser window viewport.
*
* @returns {Number}
*/
}, {
key: 'getFirstVisibleRow',
value: function getFirstVisibleRow() {
var _getVariables3 = this._getVariables(),
topOverlay = _getVariables3.topOverlay,
wtTable = _getVariables3.wtTable,
wtViewport = _getVariables3.wtViewport,
totalRows = _getVariables3.totalRows,
fixedRowsTop = _getVariables3.fixedRowsTop;
var firstVisibleRow = wtTable.getFirstVisibleRow();
if (topOverlay.mainTableScrollableElement === window) {
var rootElementOffset = (0, _element.offset)(wtTable.wtRootElement);
var totalTableHeight = (0, _element.innerHeight)(wtTable.hider);
var windowHeight = (0, _element.innerHeight)(window);
var windowScrollTop = (0, _element.getScrollTop)(window);
// Only calculate firstVisibleRow when table didn't filled (from up) whole viewport space
if (rootElementOffset.top + totalTableHeight - windowHeight <= windowScrollTop) {
var rowsHeight = wtViewport.getColumnHeaderHeight();
rowsHeight += topOverlay.sumCellSizes(0, fixedRowsTop);
(0, _number.rangeEachReverse)(totalRows, 1, function (row) {
rowsHeight += topOverlay.sumCellSizes(row - 1, row);
if (rootElementOffset.top + totalTableHeight - rowsHeight <= windowScrollTop) {
// Return physical row + 1
firstVisibleRow = row;
return false;
}
});
}
}
return firstVisibleRow;
}
/**
* Get last visible row based on virtual dom and how table is visible in browser window viewport.
*
* @returns {Number}
*/
}, {
key: 'getLastVisibleRow',
value: function getLastVisibleRow() {
var _getVariables4 = this._getVariables(),
topOverlay = _getVariables4.topOverlay,
wtTable = _getVariables4.wtTable,
wtViewport = _getVariables4.wtViewport,
totalRows = _getVariables4.totalRows;
var lastVisibleRow = wtTable.getLastVisibleRow();
if (topOverlay.mainTableScrollableElement === window) {
var rootElementOffset = (0, _element.offset)(wtTable.wtRootElement);
var windowHeight = (0, _element.innerHeight)(window);
var windowScrollTop = (0, _element.getScrollTop)(window);
// Only calculate lastVisibleRow when table didn't filled (from bottom) whole viewport space
if (rootElementOffset.top > windowScrollTop) {
var rowsHeight = wtViewport.getColumnHeaderHeight();
(0, _number.rangeEach)(1, totalRows, function (row) {
rowsHeight += topOverlay.sumCellSizes(row - 1, row);
if (rootElementOffset.top + rowsHeight - windowScrollTop >= windowHeight) {
// Return physical row - 1 (-2 because rangeEach gives row index + 1 - sumCellSizes requirements)
lastVisibleRow = row - 2;
return false;
}
});
}
}
return lastVisibleRow;
}
/**
* Get first visible column based on virtual dom and how table is visible in browser window viewport.
*
* @returns {Number}
*/
}, {
key: 'getFirstVisibleColumn',
value: function getFirstVisibleColumn() {
var _getVariables5 = this._getVariables(),
leftOverlay = _getVariables5.leftOverlay,
wtTable = _getVariables5.wtTable,
wtViewport = _getVariables5.wtViewport,
totalColumns = _getVariables5.totalColumns,
fixedColumnsLeft = _getVariables5.fixedColumnsLeft;
var firstVisibleColumn = wtTable.getFirstVisibleColumn();
if (leftOverlay.mainTableScrollableElement === window) {
var rootElementOffset = (0, _element.offset)(wtTable.wtRootElement);
var totalTableWidth = (0, _element.innerWidth)(wtTable.hider);
var windowWidth = (0, _element.innerWidth)(window);
var windowScrollLeft = (0, _element.getScrollLeft)(window);
// Only calculate firstVisibleColumn when table didn't filled (from left) whole viewport space
if (rootElementOffset.left + totalTableWidth - windowWidth <= windowScrollLeft) {
var columnsWidth = wtViewport.getRowHeaderWidth();
(0, _number.rangeEachReverse)(totalColumns, 1, function (column) {
columnsWidth += leftOverlay.sumCellSizes(column - 1, column);
if (rootElementOffset.left + totalTableWidth - columnsWidth <= windowScrollLeft) {
// Return physical column + 1
firstVisibleColumn = column;
return false;
}
});
}
}
return firstVisibleColumn;
}
/**
* Get last visible column based on virtual dom and how table is visible in browser window viewport.
*
* @returns {Number}
*/
}, {
key: 'getLastVisibleColumn',
value: function getLastVisibleColumn() {
var _getVariables6 = this._getVariables(),
leftOverlay = _getVariables6.leftOverlay,
wtTable = _getVariables6.wtTable,
wtViewport = _getVariables6.wtViewport,
totalColumns = _getVariables6.totalColumns;
var lastVisibleColumn = wtTable.getLastVisibleColumn();
if (leftOverlay.mainTableScrollableElement === window) {
var rootElementOffset = (0, _element.offset)(wtTable.wtRootElement);
var windowWidth = (0, _element.innerWidth)(window);
var windowScrollLeft = (0, _element.getScrollLeft)(window);
// Only calculate lastVisibleColumn when table didn't filled (from right) whole viewport space
if (rootElementOffset.left > windowScrollLeft) {
var columnsWidth = wtViewport.getRowHeaderWidth();
(0, _number.rangeEach)(1, totalColumns, function (column) {
columnsWidth += leftOverlay.sumCellSizes(column - 1, column);
if (rootElementOffset.left + columnsWidth - windowScrollLeft >= windowWidth) {
// Return physical column - 1 (-2 because rangeEach gives column index + 1 - sumCellSizes requirements)
lastVisibleColumn = column - 2;
return false;
}
});
}
}
return lastVisibleColumn;
}
/**
* Returns collection of variables used to rows and columns visibility calculations.
*
* @returns {Object}
* @private
*/
}, {
key: '_getVariables',
value: function _getVariables() {
var wot = this.wot;
var topOverlay = wot.wtOverlays.topOverlay;
var leftOverlay = wot.wtOverlays.leftOverlay;
var wtTable = wot.wtTable;
var wtViewport = wot.wtViewport;
var totalRows = wot.getSetting('totalRows');
var totalColumns = wot.getSetting('totalColumns');
var fixedRowsTop = wot.getSetting('fixedRowsTop');
var fixedRowsBottom = wot.getSetting('fixedRowsBottom');
var fixedColumnsLeft = wot.getSetting('fixedColumnsLeft');
return {
topOverlay: topOverlay,
leftOverlay: leftOverlay,
wtTable: wtTable,
wtViewport: wtViewport,
totalRows: totalRows,
totalColumns: totalColumns,
fixedRowsTop: fixedRowsTop,
fixedRowsBottom: fixedRowsBottom,
fixedColumnsLeft: fixedColumnsLeft
};
}
}]);
return Scroll;
}();
exports.default = Scroll;
/***/ }),
/* 298 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Settings
*/
var Settings = function () {
/**
* @param {Walkontable} wotInstance
* @param {Object} settings
*/
function Settings(wotInstance, settings) {
var _this = this;
_classCallCheck(this, Settings);
this.wot = wotInstance;
// legacy support
this.instance = wotInstance;
// default settings. void 0 means it is required, null means it can be empty
this.defaults = {
table: void 0,
debug: false, // shows WalkontableDebugOverlay
// presentation mode
externalRowCalculator: false,
stretchH: 'none', // values: all, last, none
currentRowClassName: null,
currentColumnClassName: null,
preventOverflow: function preventOverflow() {
return false;
},
// data source
data: void 0,
freezeOverlays: false,
fixedColumnsLeft: 0,
fixedRowsTop: 0,
fixedRowsBottom: 0,
minSpareRows: 0,
// this must be array of functions: [function (row, TH) {}]
rowHeaders: function rowHeaders() {
return [];
},
// this must be array of functions: [function (column, TH) {}]
columnHeaders: function columnHeaders() {
return [];
},
totalRows: void 0,
totalColumns: void 0,
cellRenderer: function cellRenderer(row, column, TD) {
var cellData = _this.getSetting('data', row, column);
(0, _element.fastInnerText)(TD, cellData === void 0 || cellData === null ? '' : cellData);
},
// columnWidth: 50,
columnWidth: function columnWidth(col) {
// return undefined means use default size for the rendered cell content
},
rowHeight: function rowHeight(row) {
// return undefined means use default size for the rendered cell content
},
defaultRowHeight: 23,
defaultColumnWidth: 50,
selections: null,
hideBorderOnMouseDownOver: false,
viewportRowCalculatorOverride: null,
viewportColumnCalculatorOverride: null,
// callbacks
onCellMouseDown: null,
onCellMouseOver: null,
onCellMouseOut: null,
onCellMouseUp: null,
// onCellMouseOut: null,
onCellDblClick: null,
onCellCornerMouseDown: null,
onCellCornerDblClick: null,
beforeDraw: null,
onDraw: null,
onBeforeDrawBorders: null,
onScrollVertically: null,
onScrollHorizontally: null,
onBeforeTouchScroll: null,
onAfterMomentumScroll: null,
onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(width) {
return width;
},
onModifyRowHeaderWidth: null,
// constants
scrollbarWidth: 10,
scrollbarHeight: 10,
renderAllRows: false,
groups: false,
rowHeaderWidth: null,
columnHeaderHeight: null,
headerClassName: null
};
// reference to settings
this.settings = {};
for (var i in this.defaults) {
if ((0, _object.hasOwnProperty)(this.defaults, i)) {
if (settings[i] !== void 0) {
this.settings[i] = settings[i];
} else if (this.defaults[i] === void 0) {
throw new Error('A required setting "' + i + '" was not provided');
} else {
this.settings[i] = this.defaults[i];
}
}
}
}
/**
* Update settings
*
* @param {Object} settings
* @param {*} value
* @returns {Walkontable}
*/
_createClass(Settings, [{
key: 'update',
value: function update(settings, value) {
if (value === void 0) {
// settings is object
for (var i in settings) {
if ((0, _object.hasOwnProperty)(settings, i)) {
this.settings[i] = settings[i];
}
}
} else {
// if value is defined then settings is the key
this.settings[settings] = value;
}
return this.wot;
}
/**
* Get setting by name
*
* @param {String} key
* @param {*} param1
* @param {*} param2
* @param {*} param3
* @param {*} param4
* @returns {*}
*/
}, {
key: 'getSetting',
value: function getSetting(key, param1, param2, param3, param4) {
if (typeof this.settings[key] === 'function') {
// this is faster than .apply - https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
return this.settings[key](param1, param2, param3, param4);
} else if (param1 !== void 0 && Array.isArray(this.settings[key])) {
// perhaps this can be removed, it is only used in tests
return this.settings[key][param1];
}
return this.settings[key];
}
/**
* Checks if setting exists
*
* @param {Boolean} key
* @returns {Boolean}
*/
}, {
key: 'has',
value: function has(key) {
return !!this.settings[key];
}
}]);
return Settings;
}();
exports.default = Settings;
/***/ }),
/* 299 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _function = __webpack_require__(41);
var _coords = __webpack_require__(53);
var _coords2 = _interopRequireDefault(_coords);
var _range = __webpack_require__(82);
var _range2 = _interopRequireDefault(_range);
var _column = __webpack_require__(172);
var _column2 = _interopRequireDefault(_column);
var _row = __webpack_require__(173);
var _row2 = _interopRequireDefault(_row);
var _tableRenderer = __webpack_require__(300);
var _tableRenderer2 = _interopRequireDefault(_tableRenderer);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
*
*/
var Table = function () {
/**
* @param {Walkontable} wotInstance
* @param {HTMLTableElement} table
*/
function Table(wotInstance, table) {
var _this = this;
_classCallCheck(this, Table);
this.wot = wotInstance;
// legacy support
this.instance = this.wot;
this.TABLE = table;
this.TBODY = null;
this.THEAD = null;
this.COLGROUP = null;
this.tableOffset = 0;
this.holderOffset = 0;
(0, _element.removeTextNodes)(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 = false;
var origRowHeaderWidth = this.wot.wtSettings.settings.rowHeaderWidth;
// Fix for jumping row headers (https://github.com/handsontable/handsontable/issues/3850)
this.wot.wtSettings.settings.rowHeaderWidth = function () {
return _this._modifyRowHeaderWidth(origRowHeaderWidth);
};
}
/**
*
*/
_createClass(Table, [{
key: 'fixTableDomTree',
value: function fixTableDomTree() {
this.TBODY = this.TABLE.querySelector('tbody');
if (!this.TBODY) {
this.TBODY = document.createElement('tbody');
this.TABLE.appendChild(this.TBODY);
}
this.THEAD = this.TABLE.querySelector('thead');
if (!this.THEAD) {
this.THEAD = document.createElement('thead');
this.TABLE.insertBefore(this.THEAD, this.TBODY);
}
this.COLGROUP = this.TABLE.querySelector('colgroup');
if (!this.COLGROUP) {
this.COLGROUP = document.createElement('colgroup');
this.TABLE.insertBefore(this.COLGROUP, this.THEAD);
}
if (this.wot.getSetting('columnHeaders').length && !this.THEAD.childNodes.length) {
this.THEAD.appendChild(document.createElement('TR'));
}
}
/**
* @param table
* @returns {HTMLElement}
*/
}, {
key: 'createSpreader',
value: function createSpreader(table) {
var parent = table.parentNode;
var spreader = void 0;
if (!parent || parent.nodeType !== 1 || !(0, _element.hasClass)(parent, 'wtHolder')) {
spreader = document.createElement('div');
spreader.className = 'wtSpreader';
if (parent) {
// if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
parent.insertBefore(spreader, table);
}
spreader.appendChild(table);
}
spreader.style.position = 'relative';
return spreader;
}
/**
* @param spreader
* @returns {HTMLElement}
*/
}, {
key: 'createHider',
value: function createHider(spreader) {
var parent = spreader.parentNode;
var hider = void 0;
if (!parent || parent.nodeType !== 1 || !(0, _element.hasClass)(parent, 'wtHolder')) {
hider = document.createElement('div');
hider.className = 'wtHider';
if (parent) {
// if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
parent.insertBefore(hider, spreader);
}
hider.appendChild(spreader);
}
return hider;
}
/**
*
* @param hider
* @returns {HTMLElement}
*/
}, {
key: 'createHolder',
value: function createHolder(hider) {
var parent = hider.parentNode;
var holder = void 0;
if (!parent || parent.nodeType !== 1 || !(0, _element.hasClass)(parent, 'wtHolder')) {
holder = document.createElement('div');
holder.style.position = 'relative';
holder.className = 'wtHolder';
if (parent) {
// if TABLE is detached (e.g. in Jasmine test), it has no parentNode so we cannot attach holder to it
parent.insertBefore(holder, hider);
}
if (!this.isWorkingOnClone()) {
holder.parentNode.className += 'ht_master handsontable';
}
holder.appendChild(hider);
}
return holder;
}
}, {
key: 'alignOverlaysWithTrimmingContainer',
value: function alignOverlaysWithTrimmingContainer() {
var trimmingElement = (0, _element.getTrimmingContainer)(this.wtRootElement);
if (!this.isWorkingOnClone()) {
this.holder.parentNode.style.position = 'relative';
if (trimmingElement === window) {
var preventOverflow = this.wot.getSetting('preventOverflow');
if (!preventOverflow) {
this.holder.style.overflow = 'visible';
this.wtRootElement.style.overflow = 'visible';
}
} else {
this.holder.style.width = (0, _element.getStyle)(trimmingElement, 'width');
this.holder.style.height = (0, _element.getStyle)(trimmingElement, 'height');
this.holder.style.overflow = '';
}
}
}
}, {
key: 'isWorkingOnClone',
value: function isWorkingOnClone() {
return !!this.wot.cloneSource;
}
/**
* Redraws the table
*
* @param {Boolean} fastDraw If TRUE, will try to avoid full redraw and only update the border positions. If FALSE or UNDEFINED, will perform a full redraw
* @returns {Table}
*/
}, {
key: 'draw',
value: function draw(fastDraw) {
var _wot = this.wot,
wtOverlays = _wot.wtOverlays,
wtViewport = _wot.wtViewport;
var totalRows = this.instance.getSetting('totalRows');
var rowHeaders = this.wot.getSetting('rowHeaders').length;
var columnHeaders = this.wot.getSetting('columnHeaders').length;
var syncScroll = false;
if (!this.isWorkingOnClone()) {
this.holderOffset = (0, _element.offset)(this.holder);
fastDraw = wtViewport.createRenderCalculators(fastDraw);
if (rowHeaders && !this.wot.getSetting('fixedColumnsLeft')) {
var leftScrollPos = wtOverlays.leftOverlay.getScrollPosition();
var previousState = this.correctHeaderWidth;
this.correctHeaderWidth = leftScrollPos > 0;
if (previousState !== this.correctHeaderWidth) {
fastDraw = false;
}
}
}
if (!this.isWorkingOnClone()) {
syncScroll = wtOverlays.prepareOverlays();
}
if (fastDraw) {
if (!this.isWorkingOnClone()) {
// in case we only scrolled without redraw, update visible rows information in oldRowsCalculator
wtViewport.createVisibleCalculators();
}
if (wtOverlays) {
wtOverlays.refresh(true);
}
} else {
if (this.isWorkingOnClone()) {
this.tableOffset = this.wot.cloneSource.wtTable.tableOffset;
} else {
this.tableOffset = (0, _element.offset)(this.TABLE);
}
var startRow = void 0;
if (_base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_DEBUG) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_TOP) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_TOP_LEFT_CORNER)) {
startRow = 0;
} else if (_base2.default.isOverlayTypeOf(this.instance.cloneOverlay, _base2.default.CLONE_BOTTOM) || _base2.default.isOverlayTypeOf(this.instance.cloneOverlay, _base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
startRow = Math.max(totalRows - this.wot.getSetting('fixedRowsBottom'), 0);
} else {
startRow = wtViewport.rowsRenderCalculator.startRow;
}
var startColumn = void 0;
if (_base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_DEBUG) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_LEFT) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_TOP_LEFT_CORNER) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
startColumn = 0;
} else {
startColumn = wtViewport.columnsRenderCalculator.startColumn;
}
this.rowFilter = new _row2.default(startRow, totalRows, columnHeaders);
this.columnFilter = new _column2.default(startColumn, this.wot.getSetting('totalColumns'), rowHeaders);
this.alignOverlaysWithTrimmingContainer();
this._doDraw(); // creates calculator after draw
}
this.refreshSelections(fastDraw);
if (!this.isWorkingOnClone()) {
wtOverlays.topOverlay.resetFixedPosition();
if (wtOverlays.bottomOverlay.clone) {
wtOverlays.bottomOverlay.resetFixedPosition();
}
wtOverlays.leftOverlay.resetFixedPosition();
if (wtOverlays.topLeftCornerOverlay) {
wtOverlays.topLeftCornerOverlay.resetFixedPosition();
}
if (wtOverlays.bottomLeftCornerOverlay && wtOverlays.bottomLeftCornerOverlay.clone) {
wtOverlays.bottomLeftCornerOverlay.resetFixedPosition();
}
}
if (syncScroll) {
wtOverlays.syncScrollWithMaster();
}
this.wot.drawn = true;
return this;
}
}, {
key: '_doDraw',
value: function _doDraw() {
var wtRenderer = new _tableRenderer2.default(this);
wtRenderer.render();
}
}, {
key: 'removeClassFromCells',
value: function removeClassFromCells(className) {
var nodes = this.TABLE.querySelectorAll('.' + className);
for (var i = 0, len = nodes.length; i < len; i++) {
(0, _element.removeClass)(nodes[i], className);
}
}
}, {
key: 'refreshSelections',
value: function refreshSelections(fastDraw) {
if (!this.wot.selections) {
return;
}
var len = this.wot.selections.length;
if (fastDraw) {
for (var i = 0; i < len; i++) {
// there was no rerender, so we need to remove classNames by ourselves
if (this.wot.selections[i].settings.className) {
this.removeClassFromCells(this.wot.selections[i].settings.className);
}
if (this.wot.selections[i].settings.highlightHeaderClassName) {
this.removeClassFromCells(this.wot.selections[i].settings.highlightHeaderClassName);
}
if (this.wot.selections[i].settings.highlightRowClassName) {
this.removeClassFromCells(this.wot.selections[i].settings.highlightRowClassName);
}
if (this.wot.selections[i].settings.highlightColumnClassName) {
this.removeClassFromCells(this.wot.selections[i].settings.highlightColumnClassName);
}
}
}
for (var _i = 0; _i < len; _i++) {
this.wot.selections[_i].draw(this.wot, fastDraw);
}
}
/**
* Get cell element at coords.
*
* @param {CellCoords} coords
* @returns {HTMLElement|Number} HTMLElement on success or Number one of the exit codes on error:
* -1 row before viewport
* -2 row after viewport
*/
}, {
key: 'getCell',
value: function getCell(coords) {
if (this.isRowBeforeRenderedRows(coords.row)) {
// row before rendered rows
return -1;
} else if (this.isRowAfterRenderedRows(coords.row)) {
// row after rendered rows
return -2;
}
var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(coords.row)];
if (TR) {
return TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(coords.col)];
}
}
/**
* getColumnHeader
*
* @param {Number} col Column index
* @param {Number} [level=0] Header level (0 = most distant to the table)
* @returns {Object} HTMLElement on success or undefined on error
*/
}, {
key: 'getColumnHeader',
value: function getColumnHeader(col) {
var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var TR = this.THEAD.childNodes[level];
if (TR) {
return TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(col)];
}
}
/**
* getRowHeader
*
* @param {Number} row Row index
* @returns {HTMLElement} HTMLElement on success or Number one of the exit codes on error: `null table doesn't have row headers`
*/
}, {
key: 'getRowHeader',
value: function getRowHeader(row) {
if (this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0) === 0) {
return null;
}
var TR = this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
if (TR) {
return TR.childNodes[0];
}
}
/**
* Returns cell coords object for a given TD (or a child element of a TD element).
*
* @param {HTMLTableCellElement} TD A cell DOM element (or a child of one).
* @returns {CellCoords|null} The coordinates of the provided TD element (or the closest TD element) or null, if the provided element is not applicable.
*/
}, {
key: 'getCoords',
value: function getCoords(TD) {
if (TD.nodeName !== 'TD' && TD.nodeName !== 'TH') {
TD = (0, _element.closest)(TD, ['TD', 'TH']);
}
if (TD === null) {
return null;
}
var TR = TD.parentNode;
var CONTAINER = TR.parentNode;
var row = (0, _element.index)(TR);
var col = TD.cellIndex;
if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, TD) || (0, _element.overlayContainsElement)(_base2.default.CLONE_TOP, TD)) {
if (CONTAINER.nodeName === 'THEAD') {
row -= CONTAINER.childNodes.length;
}
} else if (CONTAINER === this.THEAD) {
row = this.rowFilter.visibleColHeadedRowToSourceRow(row);
} else {
row = this.rowFilter.renderedToSource(row);
}
if ((0, _element.overlayContainsElement)(_base2.default.CLONE_TOP_LEFT_CORNER, TD) || (0, _element.overlayContainsElement)(_base2.default.CLONE_LEFT, TD)) {
col = this.columnFilter.offsettedTH(col);
} else {
col = this.columnFilter.visibleRowHeadedColumnToSourceColumn(col);
}
return new _coords2.default(row, col);
}
}, {
key: 'getTrForRow',
value: function getTrForRow(row) {
return this.TBODY.childNodes[this.rowFilter.sourceToRendered(row)];
}
}, {
key: 'getFirstRenderedRow',
value: function getFirstRenderedRow() {
return this.wot.wtViewport.rowsRenderCalculator.startRow;
}
}, {
key: 'getFirstVisibleRow',
value: function getFirstVisibleRow() {
return this.wot.wtViewport.rowsVisibleCalculator.startRow;
}
}, {
key: 'getFirstRenderedColumn',
value: function getFirstRenderedColumn() {
return this.wot.wtViewport.columnsRenderCalculator.startColumn;
}
/**
* @returns {Number} Returns -1 if no row is visible
*/
}, {
key: 'getFirstVisibleColumn',
value: function getFirstVisibleColumn() {
return this.wot.wtViewport.columnsVisibleCalculator.startColumn;
}
/**
* @returns {Number} Returns -1 if no row is visible
*/
}, {
key: 'getLastRenderedRow',
value: function getLastRenderedRow() {
return this.wot.wtViewport.rowsRenderCalculator.endRow;
}
}, {
key: 'getLastVisibleRow',
value: function getLastVisibleRow() {
return this.wot.wtViewport.rowsVisibleCalculator.endRow;
}
}, {
key: 'getLastRenderedColumn',
value: function getLastRenderedColumn() {
return this.wot.wtViewport.columnsRenderCalculator.endColumn;
}
/**
* @returns {Number} Returns -1 if no column is visible
*/
}, {
key: 'getLastVisibleColumn',
value: function getLastVisibleColumn() {
return this.wot.wtViewport.columnsVisibleCalculator.endColumn;
}
}, {
key: 'isRowBeforeRenderedRows',
value: function isRowBeforeRenderedRows(row) {
return this.rowFilter && this.rowFilter.sourceToRendered(row) < 0 && row >= 0;
}
}, {
key: 'isRowAfterViewport',
value: function isRowAfterViewport(row) {
return this.rowFilter && this.rowFilter.sourceToRendered(row) > this.getLastVisibleRow();
}
}, {
key: 'isRowAfterRenderedRows',
value: function isRowAfterRenderedRows(row) {
return this.rowFilter && this.rowFilter.sourceToRendered(row) > this.getLastRenderedRow();
}
}, {
key: 'isColumnBeforeViewport',
value: function isColumnBeforeViewport(column) {
return this.columnFilter && this.columnFilter.sourceToRendered(column) < 0 && column >= 0;
}
}, {
key: 'isColumnAfterViewport',
value: function isColumnAfterViewport(column) {
return this.columnFilter && this.columnFilter.sourceToRendered(column) > this.getLastVisibleColumn();
}
}, {
key: 'isLastRowFullyVisible',
value: function isLastRowFullyVisible() {
return this.getLastVisibleRow() === this.getLastRenderedRow();
}
}, {
key: 'isLastColumnFullyVisible',
value: function isLastColumnFullyVisible() {
return this.getLastVisibleColumn() === this.getLastRenderedColumn();
}
}, {
key: 'getRenderedColumnsCount',
value: function getRenderedColumnsCount() {
var columnsCount = this.wot.wtViewport.columnsRenderCalculator.count;
var totalColumns = this.wot.getSetting('totalColumns');
if (this.wot.isOverlayName(_base2.default.CLONE_DEBUG)) {
columnsCount = totalColumns;
} else if (this.wot.isOverlayName(_base2.default.CLONE_LEFT) || this.wot.isOverlayName(_base2.default.CLONE_TOP_LEFT_CORNER) || this.wot.isOverlayName(_base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
return Math.min(this.wot.getSetting('fixedColumnsLeft'), totalColumns);
}
return columnsCount;
}
}, {
key: 'getRenderedRowsCount',
value: function getRenderedRowsCount() {
var rowsCount = this.wot.wtViewport.rowsRenderCalculator.count;
var totalRows = this.wot.getSetting('totalRows');
if (this.wot.isOverlayName(_base2.default.CLONE_DEBUG)) {
rowsCount = totalRows;
} else if (this.wot.isOverlayName(_base2.default.CLONE_TOP) || this.wot.isOverlayName(_base2.default.CLONE_TOP_LEFT_CORNER)) {
rowsCount = Math.min(this.wot.getSetting('fixedRowsTop'), totalRows);
} else if (this.wot.isOverlayName(_base2.default.CLONE_BOTTOM) || this.wot.isOverlayName(_base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
rowsCount = Math.min(this.wot.getSetting('fixedRowsBottom'), totalRows);
}
return rowsCount;
}
}, {
key: 'getVisibleRowsCount',
value: function getVisibleRowsCount() {
return this.wot.wtViewport.rowsVisibleCalculator.count;
}
}, {
key: 'allRowsInViewport',
value: function allRowsInViewport() {
return this.wot.getSetting('totalRows') == this.getVisibleRowsCount();
}
/**
* Checks if any of the row's cells content exceeds its initial height, and if so, returns the oversized height
*
* @param {Number} sourceRow
* @returns {Number}
*/
}, {
key: 'getRowHeight',
value: function getRowHeight(sourceRow) {
var height = this.wot.wtSettings.settings.rowHeight(sourceRow);
var oversizedHeight = this.wot.wtViewport.oversizedRows[sourceRow];
if (oversizedHeight !== void 0) {
height = height === void 0 ? oversizedHeight : Math.max(height, oversizedHeight);
}
return height;
}
}, {
key: 'getColumnHeaderHeight',
value: function getColumnHeaderHeight(level) {
var height = this.wot.wtSettings.settings.defaultRowHeight;
var oversizedHeight = this.wot.wtViewport.oversizedColumnHeaders[level];
if (oversizedHeight !== void 0) {
height = height ? Math.max(height, oversizedHeight) : oversizedHeight;
}
return height;
}
}, {
key: 'getVisibleColumnsCount',
value: function getVisibleColumnsCount() {
return this.wot.wtViewport.columnsVisibleCalculator.count;
}
}, {
key: 'allColumnsInViewport',
value: function allColumnsInViewport() {
return this.wot.getSetting('totalColumns') == this.getVisibleColumnsCount();
}
}, {
key: 'getColumnWidth',
value: function getColumnWidth(sourceColumn) {
var width = this.wot.wtSettings.settings.columnWidth;
if (typeof width === 'function') {
width = width(sourceColumn);
} else if ((typeof width === 'undefined' ? 'undefined' : _typeof(width)) === 'object') {
width = width[sourceColumn];
}
return width || this.wot.wtSettings.settings.defaultColumnWidth;
}
}, {
key: 'getStretchedColumnWidth',
value: function getStretchedColumnWidth(sourceColumn) {
var columnWidth = this.getColumnWidth(sourceColumn);
var width = columnWidth == null ? this.instance.wtSettings.settings.defaultColumnWidth : columnWidth;
var calculator = this.wot.wtViewport.columnsRenderCalculator;
if (calculator) {
var stretchedWidth = calculator.getStretchedColumnWidth(sourceColumn, width);
if (stretchedWidth) {
width = stretchedWidth;
}
}
return width;
}
/**
* Modify row header widths provided by user in class contructor.
*
* @private
*/
}, {
key: '_modifyRowHeaderWidth',
value: function _modifyRowHeaderWidth(rowHeaderWidthFactory) {
var widths = (0, _function.isFunction)(rowHeaderWidthFactory) ? rowHeaderWidthFactory() : null;
if (Array.isArray(widths)) {
widths = [].concat(_toConsumableArray(widths));
widths[widths.length - 1] = this._correctRowHeaderWidth(widths[widths.length - 1]);
} else {
widths = this._correctRowHeaderWidth(widths);
}
return widths;
}
/**
* Correct row header width if necessary.
*
* @private
*/
}, {
key: '_correctRowHeaderWidth',
value: function _correctRowHeaderWidth(width) {
if (typeof width !== 'number') {
width = this.wot.getSetting('defaultColumnWidth');
}
if (this.correctHeaderWidth) {
width++;
}
return width;
}
}]);
return Table;
}();
exports.default = Table;
/***/ }),
/* 300 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var performanceWarningAppeared = false;
/**
* @class TableRenderer
*/
var TableRenderer = function () {
/**
* @param {WalkontableTable} wtTable
*/
function TableRenderer(wtTable) {
_classCallCheck(this, TableRenderer);
this.wtTable = wtTable;
this.wot = wtTable.instance;
// legacy support
this.instance = wtTable.instance;
this.rowFilter = wtTable.rowFilter;
this.columnFilter = wtTable.columnFilter;
this.TABLE = wtTable.TABLE;
this.THEAD = wtTable.THEAD;
this.TBODY = wtTable.TBODY;
this.COLGROUP = wtTable.COLGROUP;
this.rowHeaders = [];
this.rowHeaderCount = 0;
this.columnHeaders = [];
this.columnHeaderCount = 0;
this.fixedRowsTop = 0;
this.fixedRowsBottom = 0;
}
/**
*
*/
_createClass(TableRenderer, [{
key: 'render',
value: function render() {
if (!this.wtTable.isWorkingOnClone()) {
var skipRender = {};
this.wot.getSetting('beforeDraw', true, skipRender);
if (skipRender.skipRender === true) {
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 columnsToRender = this.wtTable.getRenderedColumnsCount();
var rowsToRender = this.wtTable.getRenderedRowsCount();
var totalColumns = this.wot.getSetting('totalColumns');
var totalRows = this.wot.getSetting('totalRows');
var workspaceWidth = void 0;
var adjusted = false;
if (_base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_BOTTOM) || _base2.default.isOverlayTypeOf(this.wot.cloneOverlay, _base2.default.CLONE_BOTTOM_LEFT_CORNER)) {
// do NOT render headers on the bottom or bottom-left corner overlay
this.columnHeaders = [];
this.columnHeaderCount = 0;
}
if (totalColumns >= 0) {
// prepare COL and TH elements for rendering
this.adjustAvailableNodes();
adjusted = true;
// adjust column widths according to user widths settings
this.renderColumnHeaders();
// Render table rows
this.renderRows(totalRows, rowsToRender, columnsToRender);
if (!this.wtTable.isWorkingOnClone()) {
workspaceWidth = this.wot.wtViewport.getWorkspaceWidth();
this.wot.wtViewport.containerWidth = null;
}
this.adjustColumnWidths(columnsToRender);
this.markOversizedColumnHeaders();
this.adjustColumnHeaderHeights();
}
if (!adjusted) {
this.adjustAvailableNodes();
}
this.removeRedundantRows(rowsToRender);
if (!this.wtTable.isWorkingOnClone() || this.wot.isOverlayName(_base2.default.CLONE_BOTTOM)) {
this.markOversizedRows();
}
if (!this.wtTable.isWorkingOnClone()) {
this.wot.wtViewport.createVisibleCalculators();
this.wot.wtOverlays.refresh(false);
this.wot.wtOverlays.applyToDOM();
var hiderWidth = (0, _element.outerWidth)(this.wtTable.hider);
var tableWidth = (0, _element.outerWidth)(this.wtTable.TABLE);
if (hiderWidth !== 0 && tableWidth !== hiderWidth) {
// Recalculate the column widths, if width changes made in the overlays removed the scrollbar, thus changing the viewport width.
this.adjustColumnWidths(columnsToRender);
}
if (workspaceWidth !== this.wot.wtViewport.getWorkspaceWidth()) {
// workspace width changed though to shown/hidden vertical scrollbar. Let's reapply stretching
this.wot.wtViewport.containerWidth = null;
var firstRendered = this.wtTable.getFirstRenderedColumn();
var lastRendered = this.wtTable.getLastRenderedColumn();
var defaultColumnWidth = this.wot.getSetting('defaultColumnWidth');
var rowHeaderWidthSetting = this.wot.getSetting('rowHeaderWidth');
rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);
if (rowHeaderWidthSetting != null) {
for (var i = 0; i < this.rowHeaderCount; i++) {
var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting;
width = width == null ? defaultColumnWidth : width;
this.COLGROUP.childNodes[i].style.width = width + 'px';
}
}
for (var _i = firstRendered; _i < lastRendered; _i++) {
var _width = this.wtTable.getStretchedColumnWidth(_i);
var renderedIndex = this.columnFilter.sourceToRendered(_i);
this.COLGROUP.childNodes[renderedIndex + this.rowHeaderCount].style.width = _width + 'px';
}
}
this.wot.getSetting('onDraw', true);
} else if (this.wot.isOverlayName(_base2.default.CLONE_BOTTOM)) {
this.wot.cloneSource.wtOverlays.adjustElementsSize();
}
}
/**
* @param {Number} renderedRowsCount
*/
}, {
key: 'removeRedundantRows',
value: function removeRedundantRows(renderedRowsCount) {
while (this.wtTable.tbodyChildrenLength > renderedRowsCount) {
this.TBODY.removeChild(this.TBODY.lastChild);
this.wtTable.tbodyChildrenLength--;
}
}
/**
* @param {Number} totalRows
* @param {Number} rowsToRender
* @param {Number} columnsToRender
*/
}, {
key: 'renderRows',
value: function renderRows(totalRows, rowsToRender, columnsToRender) {
var lastTD = void 0,
TR = void 0;
var visibleRowIndex = 0;
var sourceRowIndex = this.rowFilter.renderedToSource(visibleRowIndex);
var isWorkingOnClone = this.wtTable.isWorkingOnClone();
while (sourceRowIndex < totalRows && sourceRowIndex >= 0) {
if (!performanceWarningAppeared && visibleRowIndex > 1000) {
performanceWarningAppeared = true;
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.');
}
if (rowsToRender !== void 0 && visibleRowIndex === rowsToRender) {
// We have as much rows as needed for this clone
break;
}
TR = this.getOrCreateTrForRow(visibleRowIndex, TR);
// Render row headers
this.renderRowHeaders(sourceRowIndex, TR);
// Add and/or remove TDs to TR to match the desired number
this.adjustColumns(TR, columnsToRender + this.rowHeaderCount);
lastTD = this.renderCells(sourceRowIndex, TR, columnsToRender);
if (!isWorkingOnClone ||
// Necessary to refresh oversized row heights after editing cell in overlays
this.wot.isOverlayName(_base2.default.CLONE_BOTTOM)) {
// Reset the oversized row cache for this row
this.resetOversizedRow(sourceRowIndex);
}
if (TR.firstChild) {
// if I have 2 fixed columns with one-line content and the 3rd column has a multiline content, this is
// the way to make sure that the overlay will has same row height
var height = this.wot.wtTable.getRowHeight(sourceRowIndex);
if (height) {
// Decrease height. 1 pixel will be "replaced" by 1px border top
height--;
TR.firstChild.style.height = height + 'px';
} else {
TR.firstChild.style.height = '';
}
}
visibleRowIndex++;
sourceRowIndex = this.rowFilter.renderedToSource(visibleRowIndex);
}
}
/**
* Reset the oversized row cache for the provided index
*
* @param {Number} sourceRow Row index
*/
}, {
key: 'resetOversizedRow',
value: function resetOversizedRow(sourceRow) {
if (this.wot.getSetting('externalRowCalculator')) {
return;
}
if (this.wot.wtViewport.oversizedRows && this.wot.wtViewport.oversizedRows[sourceRow]) {
this.wot.wtViewport.oversizedRows[sourceRow] = void 0;
}
}
/**
* Check if any of the rendered rows is higher than expected, and if so, cache them
*/
}, {
key: 'markOversizedRows',
value: function markOversizedRows() {
if (this.wot.getSetting('externalRowCalculator')) {
return;
}
var rowCount = this.instance.wtTable.TBODY.childNodes.length;
var expectedTableHeight = rowCount * this.instance.wtSettings.settings.defaultRowHeight;
var actualTableHeight = (0, _element.innerHeight)(this.instance.wtTable.TBODY) - 1;
var previousRowHeight = void 0;
var rowInnerHeight = void 0;
var sourceRowIndex = void 0;
var currentTr = void 0;
var rowHeader = void 0;
var totalRows = this.instance.getSetting('totalRows');
if (expectedTableHeight === actualTableHeight && !this.instance.getSetting('fixedRowsBottom')) {
// If the actual table height equals rowCount * default single row height, no row is oversized -> no need to iterate over them
return;
}
while (rowCount) {
rowCount--;
sourceRowIndex = this.instance.wtTable.rowFilter.renderedToSource(rowCount);
previousRowHeight = this.instance.wtTable.getRowHeight(sourceRowIndex);
currentTr = this.instance.wtTable.getTrForRow(sourceRowIndex);
rowHeader = currentTr.querySelector('th');
if (rowHeader) {
rowInnerHeight = (0, _element.innerHeight)(rowHeader);
} else {
rowInnerHeight = (0, _element.innerHeight)(currentTr) - 1;
}
if (!previousRowHeight && this.instance.wtSettings.settings.defaultRowHeight < rowInnerHeight || previousRowHeight < rowInnerHeight) {
this.instance.wtViewport.oversizedRows[sourceRowIndex] = ++rowInnerHeight;
}
}
}
/**
* Check if any of the rendered columns is higher than expected, and if so, cache them.
*/
}, {
key: 'markOversizedColumnHeaders',
value: function markOversizedColumnHeaders() {
var overlayName = this.wot.getOverlayName();
if (!this.columnHeaderCount || this.wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName] || this.wtTable.isWorkingOnClone()) {
return;
}
var columnCount = this.wtTable.getRenderedColumnsCount();
for (var i = 0; i < this.columnHeaderCount; i++) {
for (var renderedColumnIndex = -1 * this.rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {
this.markIfOversizedColumnHeader(renderedColumnIndex);
}
}
this.wot.wtViewport.hasOversizedColumnHeadersMarked[overlayName] = true;
}
/**
*
*/
}, {
key: 'adjustColumnHeaderHeights',
value: function adjustColumnHeaderHeights() {
var columnHeaders = this.wot.getSetting('columnHeaders');
var children = this.wot.wtTable.THEAD.childNodes;
var oversizedColumnHeaders = this.wot.wtViewport.oversizedColumnHeaders;
for (var i = 0, len = columnHeaders.length; i < len; i++) {
if (oversizedColumnHeaders[i]) {
if (!children[i] || children[i].childNodes.length === 0) {
return;
}
children[i].childNodes[0].style.height = oversizedColumnHeaders[i] + 'px';
}
}
}
/**
* Check if column header for the specified column is higher than expected, and if so, cache it
*
* @param {Number} col Index of column
*/
}, {
key: 'markIfOversizedColumnHeader',
value: function markIfOversizedColumnHeader(col) {
var sourceColIndex = this.wot.wtTable.columnFilter.renderedToSource(col);
var level = this.columnHeaderCount;
var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;
var previousColHeaderHeight = void 0;
var currentHeader = void 0;
var currentHeaderHeight = void 0;
var columnHeaderHeightSetting = this.wot.getSetting('columnHeaderHeight') || [];
while (level) {
level--;
previousColHeaderHeight = this.wot.wtTable.getColumnHeaderHeight(level);
currentHeader = this.wot.wtTable.getColumnHeader(sourceColIndex, level);
if (!currentHeader) {
/* eslint-disable no-continue */
continue;
}
currentHeaderHeight = (0, _element.innerHeight)(currentHeader);
if (!previousColHeaderHeight && defaultRowHeight < currentHeaderHeight || previousColHeaderHeight < currentHeaderHeight) {
this.wot.wtViewport.oversizedColumnHeaders[level] = currentHeaderHeight;
}
if (Array.isArray(columnHeaderHeightSetting)) {
if (columnHeaderHeightSetting[level] != null) {
this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level];
}
} else if (!isNaN(columnHeaderHeightSetting)) {
this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting;
}
if (this.wot.wtViewport.oversizedColumnHeaders[level] < (columnHeaderHeightSetting[level] || columnHeaderHeightSetting)) {
this.wot.wtViewport.oversizedColumnHeaders[level] = columnHeaderHeightSetting[level] || columnHeaderHeightSetting;
}
}
}
/**
* @param {Number} sourceRowIndex
* @param {HTMLTableRowElement} TR
* @param {Number} columnsToRender
* @returns {HTMLTableCellElement}
*/
}, {
key: 'renderCells',
value: function renderCells(sourceRowIndex, TR, columnsToRender) {
var TD = void 0;
var sourceColIndex = void 0;
for (var visibleColIndex = 0; visibleColIndex < columnsToRender; visibleColIndex++) {
sourceColIndex = this.columnFilter.renderedToSource(visibleColIndex);
if (visibleColIndex === 0) {
TD = TR.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(sourceColIndex)];
} else {
TD = TD.nextSibling; // http://jsperf.com/nextsibling-vs-indexed-childnodes
}
// If the number of headers has been reduced, we need to replace excess TH with TD
if (TD.nodeName == 'TH') {
TD = replaceThWithTd(TD, TR);
}
if (!(0, _element.hasClass)(TD, 'hide')) {
TD.className = '';
}
TD.removeAttribute('style');
this.wot.wtSettings.settings.cellRenderer(sourceRowIndex, sourceColIndex, TD);
}
return TD;
}
/**
* @param {Number} columnsToRender Number of columns to render.
*/
}, {
key: 'adjustColumnWidths',
value: function adjustColumnWidths(columnsToRender) {
var scrollbarCompensation = 0;
var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;
var mainHolder = sourceInstance.wtTable.holder;
var defaultColumnWidth = this.wot.getSetting('defaultColumnWidth');
var rowHeaderWidthSetting = this.wot.getSetting('rowHeaderWidth');
if (mainHolder.offsetHeight < mainHolder.scrollHeight) {
scrollbarCompensation = (0, _element.getScrollbarWidth)();
}
this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth() - scrollbarCompensation);
rowHeaderWidthSetting = this.instance.getSetting('onModifyRowHeaderWidth', rowHeaderWidthSetting);
if (rowHeaderWidthSetting != null) {
for (var i = 0; i < this.rowHeaderCount; i++) {
var width = Array.isArray(rowHeaderWidthSetting) ? rowHeaderWidthSetting[i] : rowHeaderWidthSetting;
width = width == null ? defaultColumnWidth : width;
this.COLGROUP.childNodes[i].style.width = width + 'px';
}
}
for (var renderedColIndex = 0; renderedColIndex < columnsToRender; renderedColIndex++) {
var _width2 = this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(renderedColIndex));
this.COLGROUP.childNodes[renderedColIndex + this.rowHeaderCount].style.width = _width2 + 'px';
}
}
/**
* @param {HTMLTableCellElement} TR
*/
}, {
key: 'appendToTbody',
value: function appendToTbody(TR) {
this.TBODY.appendChild(TR);
this.wtTable.tbodyChildrenLength++;
}
/**
* @param {Number} rowIndex
* @param {HTMLTableRowElement} currentTr
* @returns {HTMLTableCellElement}
*/
}, {
key: 'getOrCreateTrForRow',
value: function getOrCreateTrForRow(rowIndex, currentTr) {
var TR = void 0;
if (rowIndex >= this.wtTable.tbodyChildrenLength) {
TR = this.createRow();
this.appendToTbody(TR);
} else if (rowIndex === 0) {
TR = this.TBODY.firstChild;
} else {
// http://jsperf.com/nextsibling-vs-indexed-childnodes
TR = currentTr.nextSibling;
}
if (TR.className) {
TR.removeAttribute('class');
}
return TR;
}
/**
* @returns {HTMLTableCellElement}
*/
}, {
key: 'createRow',
value: function createRow() {
var TR = document.createElement('TR');
for (var visibleColIndex = 0; visibleColIndex < this.rowHeaderCount; visibleColIndex++) {
TR.appendChild(document.createElement('TH'));
}
return TR;
}
/**
* @param {Number} row
* @param {Number} col
* @param {HTMLTableCellElement} TH
*/
}, {
key: 'renderRowHeader',
value: function renderRowHeader(row, col, TH) {
TH.className = '';
TH.removeAttribute('style');
this.rowHeaders[col](row, TH, col);
}
/**
* @param {Number} row
* @param {HTMLTableCellElement} TR
*/
}, {
key: 'renderRowHeaders',
value: function renderRowHeaders(row, TR) {
for (var TH = TR.firstChild, visibleColIndex = 0; visibleColIndex < this.rowHeaderCount; visibleColIndex++) {
// If the number of row headers increased we need to create TH or replace an existing TD node with TH
if (!TH) {
TH = document.createElement('TH');
TR.appendChild(TH);
} else if (TH.nodeName == 'TD') {
TH = replaceTdWithTh(TH, TR);
}
this.renderRowHeader(row, visibleColIndex, TH);
// http://jsperf.com/nextsibling-vs-indexed-childnodes
TH = TH.nextSibling;
}
}
/**
* Adjust the number of COL and TH elements to match the number of columns and headers that need to be rendered
*/
}, {
key: 'adjustAvailableNodes',
value: function adjustAvailableNodes() {
this.adjustColGroups();
this.adjustThead();
}
/**
* Renders the column headers
*/
}, {
key: 'renderColumnHeaders',
value: function renderColumnHeaders() {
if (!this.columnHeaderCount) {
return;
}
var columnCount = this.wtTable.getRenderedColumnsCount();
for (var i = 0; i < this.columnHeaderCount; i++) {
var TR = this.getTrForColumnHeaders(i);
for (var renderedColumnIndex = -1 * this.rowHeaderCount; renderedColumnIndex < columnCount; renderedColumnIndex++) {
var sourceCol = this.columnFilter.renderedToSource(renderedColumnIndex);
this.renderColumnHeader(i, sourceCol, TR.childNodes[renderedColumnIndex + this.rowHeaderCount]);
}
}
}
/**
* Adjusts the number of COL elements to match the number of columns that need to be rendered
*/
}, {
key: 'adjustColGroups',
value: function adjustColGroups() {
var columnCount = this.wtTable.getRenderedColumnsCount();
while (this.wtTable.colgroupChildrenLength < columnCount + this.rowHeaderCount) {
this.COLGROUP.appendChild(document.createElement('COL'));
this.wtTable.colgroupChildrenLength++;
}
while (this.wtTable.colgroupChildrenLength > columnCount + this.rowHeaderCount) {
this.COLGROUP.removeChild(this.COLGROUP.lastChild);
this.wtTable.colgroupChildrenLength--;
}
if (this.rowHeaderCount) {
(0, _element.addClass)(this.COLGROUP.childNodes[0], 'rowHeader');
}
}
/**
* Adjusts the number of TH elements in THEAD to match the number of headers and columns that need to be rendered
*/
}, {
key: 'adjustThead',
value: function adjustThead() {
var columnCount = this.wtTable.getRenderedColumnsCount();
var TR = this.THEAD.firstChild;
if (this.columnHeaders.length) {
for (var i = 0, len = this.columnHeaders.length; i < len; i++) {
TR = this.THEAD.childNodes[i];
if (!TR) {
TR = document.createElement('TR');
this.THEAD.appendChild(TR);
}
this.theadChildrenLength = TR.childNodes.length;
while (this.theadChildrenLength < columnCount + this.rowHeaderCount) {
TR.appendChild(document.createElement('TH'));
this.theadChildrenLength++;
}
while (this.theadChildrenLength > columnCount + this.rowHeaderCount) {
TR.removeChild(TR.lastChild);
this.theadChildrenLength--;
}
}
var theadChildrenLength = this.THEAD.childNodes.length;
if (theadChildrenLength > this.columnHeaders.length) {
for (var _i2 = this.columnHeaders.length; _i2 < theadChildrenLength; _i2++) {
this.THEAD.removeChild(this.THEAD.lastChild);
}
}
} else if (TR) {
(0, _element.empty)(TR);
}
}
/**
* @param {Number} index
* @returns {HTMLTableCellElement}
*/
}, {
key: 'getTrForColumnHeaders',
value: function getTrForColumnHeaders(index) {
return this.THEAD.childNodes[index];
}
/**
* @param {Number} row
* @param {Number} col
* @param {HTMLTableCellElement} TH
* @returns {*}
*/
}, {
key: 'renderColumnHeader',
value: function renderColumnHeader(row, col, TH) {
TH.className = '';
TH.removeAttribute('style');
return this.columnHeaders[row](col, TH, row);
}
/**
* Add and/or remove the TDs to match the desired number
*
* @param {HTMLTableCellElement} TR Table row in question
* @param {Number} desiredCount The desired number of TDs in the TR
*/
}, {
key: 'adjustColumns',
value: function adjustColumns(TR, desiredCount) {
var count = TR.childNodes.length;
while (count < desiredCount) {
var TD = document.createElement('TD');
TR.appendChild(TD);
count++;
}
while (count > desiredCount) {
TR.removeChild(TR.lastChild);
count--;
}
}
/**
* @param {Number} columnsToRender
*/
}, {
key: 'removeRedundantColumns',
value: function removeRedundantColumns(columnsToRender) {
while (this.wtTable.tbodyChildrenLength > columnsToRender) {
this.TBODY.removeChild(this.TBODY.lastChild);
this.wtTable.tbodyChildrenLength--;
}
}
}]);
return TableRenderer;
}();
function replaceTdWithTh(TD, TR) {
var TH = document.createElement('TH');
TR.insertBefore(TH, TD);
TR.removeChild(TD);
return TH;
}
function replaceThWithTd(TH, TR) {
var TD = document.createElement('TD');
TR.insertBefore(TD, TH);
TR.removeChild(TH);
return TD;
}
exports.default = TableRenderer;
/***/ }),
/* 301 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _viewportColumns = __webpack_require__(170);
var _viewportColumns2 = _interopRequireDefault(_viewportColumns);
var _viewportRows = __webpack_require__(171);
var _viewportRows2 = _interopRequireDefault(_viewportRows);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Viewport
*/
var Viewport = function () {
/**
* @param wotInstance
*/
function Viewport(wotInstance) {
var _this = this;
_classCallCheck(this, Viewport);
this.wot = wotInstance;
// legacy support
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 _eventManager2.default(this.wot);
this.eventManager.addEventListener(window, 'resize', function () {
_this.clientHeight = _this.getWorkspaceHeight();
});
}
/**
* @returns {number}
*/
_createClass(Viewport, [{
key: 'getWorkspaceHeight',
value: function getWorkspaceHeight() {
var trimmingContainer = this.instance.wtOverlays.topOverlay.trimmingContainer;
var elemHeight = void 0;
var height = 0;
if (trimmingContainer === window) {
height = document.documentElement.clientHeight;
} else {
elemHeight = (0, _element.outerHeight)(trimmingContainer);
// returns height without DIV scrollbar
height = elemHeight > 0 && trimmingContainer.clientHeight > 0 ? trimmingContainer.clientHeight : Infinity;
}
return height;
}
}, {
key: 'getWorkspaceWidth',
value: function getWorkspaceWidth() {
var width = void 0;
var totalColumns = this.wot.getSetting('totalColumns');
var trimmingContainer = this.instance.wtOverlays.leftOverlay.trimmingContainer;
var overflow = void 0;
var stretchSetting = this.wot.getSetting('stretchH');
var docOffsetWidth = document.documentElement.offsetWidth;
var preventOverflow = this.wot.getSetting('preventOverflow');
if (preventOverflow) {
return (0, _element.outerWidth)(this.instance.wtTable.wtRootElement);
}
if (this.wot.getSetting('freezeOverlays')) {
width = Math.min(docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);
} else {
width = Math.min(this.getContainerFillWidth(), docOffsetWidth - this.getWorkspaceOffset().left, docOffsetWidth);
}
if (trimmingContainer === window && totalColumns > 0 && this.sumColumnWidths(0, totalColumns - 1) > width) {
// in case sum of column widths is higher than available stylesheet width, let's assume using the whole window
// otherwise continue below, which will allow stretching
// this is used in `scroll_window.html`
// TODO test me
return document.documentElement.clientWidth;
}
if (trimmingContainer !== window) {
overflow = (0, _element.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer, 'overflow');
if (overflow == 'scroll' || overflow == 'hidden' || overflow == 'auto') {
// this is used in `scroll.html`
// TODO test me
return Math.max(width, trimmingContainer.clientWidth);
}
}
if (stretchSetting === 'none' || !stretchSetting) {
// if no stretching is used, return the maximum used workspace width
return Math.max(width, (0, _element.outerWidth)(this.instance.wtTable.TABLE));
}
// if stretching is used, return the actual container width, so the columns can fit inside it
return width;
}
/**
* Checks if viewport has vertical scroll
*
* @returns {Boolean}
*/
}, {
key: 'hasVerticalScroll',
value: function hasVerticalScroll() {
return this.getWorkspaceActualHeight() > this.getWorkspaceHeight();
}
/**
* Checks if viewport has horizontal scroll
*
* @returns {Boolean}
*/
}, {
key: 'hasHorizontalScroll',
value: function hasHorizontalScroll() {
return this.getWorkspaceActualWidth() > this.getWorkspaceWidth();
}
/**
* @param from
* @param length
* @returns {Number}
*/
}, {
key: 'sumColumnWidths',
value: function sumColumnWidths(from, length) {
var sum = 0;
while (from < length) {
sum += this.wot.wtTable.getColumnWidth(from);
from++;
}
return sum;
}
/**
* @returns {Number}
*/
}, {
key: 'getContainerFillWidth',
value: function getContainerFillWidth() {
if (this.containerWidth) {
return this.containerWidth;
}
var mainContainer = this.instance.wtTable.holder;
var fillWidth = void 0;
var dummyElement = void 0;
dummyElement = document.createElement('div');
dummyElement.style.width = '100%';
dummyElement.style.height = '1px';
mainContainer.appendChild(dummyElement);
fillWidth = dummyElement.offsetWidth;
this.containerWidth = fillWidth;
mainContainer.removeChild(dummyElement);
return fillWidth;
}
/**
* @returns {Number}
*/
}, {
key: 'getWorkspaceOffset',
value: function getWorkspaceOffset() {
return (0, _element.offset)(this.wot.wtTable.TABLE);
}
/**
* @returns {Number}
*/
}, {
key: 'getWorkspaceActualHeight',
value: function getWorkspaceActualHeight() {
return (0, _element.outerHeight)(this.wot.wtTable.TABLE);
}
/**
* @returns {Number}
*/
}, {
key: 'getWorkspaceActualWidth',
value: function getWorkspaceActualWidth() {
return (0, _element.outerWidth)(this.wot.wtTable.TABLE) || (0, _element.outerWidth)(this.wot.wtTable.TBODY) || (0, _element.outerWidth)(this.wot.wtTable.THEAD); // IE8 reports 0 as <table> offsetWidth;
}
/**
* @returns {Number}
*/
}, {
key: 'getColumnHeaderHeight',
value: function getColumnHeaderHeight() {
if (isNaN(this.columnHeaderHeight)) {
this.columnHeaderHeight = (0, _element.outerHeight)(this.wot.wtTable.THEAD);
}
return this.columnHeaderHeight;
}
/**
* @returns {Number}
*/
}, {
key: 'getViewportHeight',
value: function getViewportHeight() {
var containerHeight = this.getWorkspaceHeight();
var columnHeaderHeight = void 0;
if (containerHeight === Infinity) {
return containerHeight;
}
columnHeaderHeight = this.getColumnHeaderHeight();
if (columnHeaderHeight > 0) {
containerHeight -= columnHeaderHeight;
}
return containerHeight;
}
/**
* @returns {Number}
*/
}, {
key: 'getRowHeaderWidth',
value: function getRowHeaderWidth() {
var rowHeadersHeightSetting = this.instance.getSetting('rowHeaderWidth');
var rowHeaders = this.instance.getSetting('rowHeaders');
if (rowHeadersHeightSetting) {
this.rowHeaderWidth = 0;
for (var i = 0, len = rowHeaders.length; i < len; i++) {
this.rowHeaderWidth += rowHeadersHeightSetting[i] || rowHeadersHeightSetting;
}
}
if (this.wot.cloneSource) {
return this.wot.cloneSource.wtViewport.getRowHeaderWidth();
}
if (isNaN(this.rowHeaderWidth)) {
if (rowHeaders.length) {
var TH = this.instance.wtTable.TABLE.querySelector('TH');
this.rowHeaderWidth = 0;
for (var _i = 0, _len = rowHeaders.length; _i < _len; _i++) {
if (TH) {
this.rowHeaderWidth += (0, _element.outerWidth)(TH);
TH = TH.nextSibling;
} else {
// yes this is a cheat but it worked like that before, just taking assumption from CSS instead of measuring.
// TODO: proper fix
this.rowHeaderWidth += 50;
}
}
} else {
this.rowHeaderWidth = 0;
}
}
this.rowHeaderWidth = this.instance.getSetting('onModifyRowHeaderWidth', this.rowHeaderWidth) || this.rowHeaderWidth;
return this.rowHeaderWidth;
}
/**
* @returns {Number}
*/
}, {
key: 'getViewportWidth',
value: function getViewportWidth() {
var containerWidth = this.getWorkspaceWidth();
var rowHeaderWidth = void 0;
if (containerWidth === Infinity) {
return containerWidth;
}
rowHeaderWidth = this.getRowHeaderWidth();
if (rowHeaderWidth > 0) {
return containerWidth - rowHeaderWidth;
}
return containerWidth;
}
/**
* Creates:
* - rowsRenderCalculator (before draw, to qualify rows for rendering)
* - rowsVisibleCalculator (after draw, to measure which rows are actually visible)
*
* @returns {ViewportRowsCalculator}
*/
}, {
key: 'createRowsCalculator',
value: function createRowsCalculator() {
var _this2 = this;
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var height = void 0;
var pos = void 0;
var fixedRowsTop = void 0;
var scrollbarHeight = void 0;
var fixedRowsBottom = void 0;
var fixedRowsHeight = void 0;
var totalRows = void 0;
this.rowHeaderWidth = NaN;
if (this.wot.wtSettings.settings.renderAllRows && !visible) {
height = Infinity;
} else {
height = this.getViewportHeight();
}
pos = this.wot.wtOverlays.topOverlay.getScrollPosition() - this.wot.wtOverlays.topOverlay.getTableParentOffset();
if (pos < 0) {
pos = 0;
}
fixedRowsTop = this.wot.getSetting('fixedRowsTop');
fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');
totalRows = this.wot.getSetting('totalRows');
if (fixedRowsTop) {
fixedRowsHeight = this.wot.wtOverlays.topOverlay.sumCellSizes(0, fixedRowsTop);
pos += fixedRowsHeight;
height -= fixedRowsHeight;
}
if (fixedRowsBottom && this.wot.wtOverlays.bottomOverlay.clone) {
fixedRowsHeight = this.wot.wtOverlays.bottomOverlay.sumCellSizes(totalRows - fixedRowsBottom, totalRows);
height -= fixedRowsHeight;
}
if (this.wot.wtTable.holder.clientHeight === this.wot.wtTable.holder.offsetHeight) {
scrollbarHeight = 0;
} else {
scrollbarHeight = (0, _element.getScrollbarWidth)();
}
return new _viewportRows2.default(height, pos, this.wot.getSetting('totalRows'), function (sourceRow) {
return _this2.wot.wtTable.getRowHeight(sourceRow);
}, visible ? null : this.wot.wtSettings.settings.viewportRowCalculatorOverride, visible, scrollbarHeight);
}
/**
* Creates:
* - columnsRenderCalculator (before draw, to qualify columns for rendering)
* - columnsVisibleCalculator (after draw, to measure which columns are actually visible)
*
* @returns {ViewportRowsCalculator}
*/
}, {
key: 'createColumnsCalculator',
value: function createColumnsCalculator() {
var _this3 = this;
var visible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var width = this.getViewportWidth();
var pos = void 0;
var fixedColumnsLeft = void 0;
this.columnHeaderHeight = NaN;
pos = this.wot.wtOverlays.leftOverlay.getScrollPosition() - this.wot.wtOverlays.leftOverlay.getTableParentOffset();
if (pos < 0) {
pos = 0;
}
fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft');
if (fixedColumnsLeft) {
var fixedColumnsWidth = this.wot.wtOverlays.leftOverlay.sumCellSizes(0, fixedColumnsLeft);
pos += fixedColumnsWidth;
width -= fixedColumnsWidth;
}
if (this.wot.wtTable.holder.clientWidth !== this.wot.wtTable.holder.offsetWidth) {
width -= (0, _element.getScrollbarWidth)();
}
return new _viewportColumns2.default(width, pos, this.wot.getSetting('totalColumns'), function (sourceCol) {
return _this3.wot.wtTable.getColumnWidth(sourceCol);
}, visible ? null : this.wot.wtSettings.settings.viewportColumnCalculatorOverride, visible, this.wot.getSetting('stretchH'), function (stretchedWidth, column) {
return _this3.wot.getSetting('onBeforeStretchingColumnWidth', stretchedWidth, column);
});
}
/**
* Creates rowsRenderCalculator and columnsRenderCalculator (before draw, to determine what rows and
* cols should be rendered)
*
* @param fastDraw {Boolean} If `true`, will try to avoid full redraw and only update the border positions.
* If `false` or `undefined`, will perform a full redraw
* @returns fastDraw {Boolean} The fastDraw value, possibly modified
*/
}, {
key: 'createRenderCalculators',
value: function createRenderCalculators() {
var fastDraw = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (fastDraw) {
var proposedRowsVisibleCalculator = this.createRowsCalculator(true);
var proposedColumnsVisibleCalculator = this.createColumnsCalculator(true);
if (!(this.areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) && this.areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator))) {
fastDraw = false;
}
}
if (!fastDraw) {
this.rowsRenderCalculator = this.createRowsCalculator();
this.columnsRenderCalculator = this.createColumnsCalculator();
}
// delete temporarily to make sure that renderers always use rowsRenderCalculator, not rowsVisibleCalculator
this.rowsVisibleCalculator = null;
this.columnsVisibleCalculator = null;
return fastDraw;
}
/**
* Creates rowsVisibleCalculator and columnsVisibleCalculator (after draw, to determine what are
* the actually visible rows and columns)
*/
}, {
key: 'createVisibleCalculators',
value: function createVisibleCalculators() {
this.rowsVisibleCalculator = this.createRowsCalculator(true);
this.columnsVisibleCalculator = this.createColumnsCalculator(true);
}
/**
* Returns information whether proposedRowsVisibleCalculator viewport
* is contained inside rows rendered in previous draw (cached in rowsRenderCalculator)
*
* @param {Object} proposedRowsVisibleCalculator
* @returns {Boolean} Returns `true` if all proposed visible rows are already rendered (meaning: redraw is not needed).
* Returns `false` if at least one proposed visible row is not already rendered (meaning: redraw is needed)
*/
}, {
key: 'areAllProposedVisibleRowsAlreadyRendered',
value: function areAllProposedVisibleRowsAlreadyRendered(proposedRowsVisibleCalculator) {
if (this.rowsVisibleCalculator) {
if (proposedRowsVisibleCalculator.startRow < this.rowsRenderCalculator.startRow || proposedRowsVisibleCalculator.startRow === this.rowsRenderCalculator.startRow && proposedRowsVisibleCalculator.startRow > 0) {
return false;
} else if (proposedRowsVisibleCalculator.endRow > this.rowsRenderCalculator.endRow || proposedRowsVisibleCalculator.endRow === this.rowsRenderCalculator.endRow && proposedRowsVisibleCalculator.endRow < this.wot.getSetting('totalRows') - 1) {
return false;
}
return true;
}
return false;
}
/**
* Returns information whether proposedColumnsVisibleCalculator viewport
* is contained inside column rendered in previous draw (cached in columnsRenderCalculator)
*
* @param {Object} proposedColumnsVisibleCalculator
* @returns {Boolean} Returns `true` if all proposed visible columns are already rendered (meaning: redraw is not needed).
* Returns `false` if at least one proposed visible column is not already rendered (meaning: redraw is needed)
*/
}, {
key: 'areAllProposedVisibleColumnsAlreadyRendered',
value: function areAllProposedVisibleColumnsAlreadyRendered(proposedColumnsVisibleCalculator) {
if (this.columnsVisibleCalculator) {
if (proposedColumnsVisibleCalculator.startColumn < this.columnsRenderCalculator.startColumn || proposedColumnsVisibleCalculator.startColumn === this.columnsRenderCalculator.startColumn && proposedColumnsVisibleCalculator.startColumn > 0) {
return false;
} else if (proposedColumnsVisibleCalculator.endColumn > this.columnsRenderCalculator.endColumn || proposedColumnsVisibleCalculator.endColumn === this.columnsRenderCalculator.endColumn && proposedColumnsVisibleCalculator.endColumn < this.wot.getSetting('totalColumns') - 1) {
return false;
}
return true;
}
return false;
}
/**
* Resets values in keys of the hasOversizedColumnHeadersMarked object after updateSettings.
*/
}, {
key: 'resetHasOversizedColumnHeadersMarked',
value: function resetHasOversizedColumnHeadersMarked() {
(0, _object.objectEach)(this.hasOversizedColumnHeadersMarked, function (value, key, object) {
object[key] = void 0;
});
}
}]);
return Viewport;
}();
exports.default = Viewport;
/***/ }),
/* 302 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _event = __webpack_require__(12);
var _object = __webpack_require__(1);
var _browser = __webpack_require__(28);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _coords = __webpack_require__(53);
var _coords2 = _interopRequireDefault(_coords);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
*
*/
var Border = function () {
/**
* @param {Walkontable} wotInstance
* @param {Object} settings
*/
function Border(wotInstance, settings) {
_classCallCheck(this, Border);
if (!settings) {
return;
}
this.eventManager = new _eventManager2.default(wotInstance);
this.instance = wotInstance;
this.wot = wotInstance;
this.settings = settings;
this.mouseDown = false;
this.main = null;
this.top = null;
this.left = null;
this.bottom = null;
this.right = null;
this.topStyle = null;
this.leftStyle = null;
this.bottomStyle = null;
this.rightStyle = null;
this.cornerDefaultStyle = {
width: '5px',
height: '5px',
borderWidth: '2px',
borderStyle: 'solid',
borderColor: '#FFF'
};
this.corner = null;
this.cornerStyle = null;
this.createBorders(settings);
this.registerListeners();
}
/**
* Register all necessary events
*/
_createClass(Border, [{
key: 'registerListeners',
value: function registerListeners() {
var _this2 = this;
this.eventManager.addEventListener(document.body, 'mousedown', function () {
return _this2.onMouseDown();
});
this.eventManager.addEventListener(document.body, 'mouseup', function () {
return _this2.onMouseUp();
});
var _loop = function _loop(c, len) {
_this2.eventManager.addEventListener(_this2.main.childNodes[c], 'mouseenter', function (event) {
return _this2.onMouseEnter(event, _this2.main.childNodes[c]);
});
};
for (var c = 0, len = this.main.childNodes.length; c < len; c++) {
_loop(c, len);
}
}
/**
* Mouse down listener
*
* @private
*/
}, {
key: 'onMouseDown',
value: function onMouseDown() {
this.mouseDown = true;
}
/**
* Mouse up listener
*
* @private
*/
}, {
key: 'onMouseUp',
value: function onMouseUp() {
this.mouseDown = false;
}
/**
* Mouse enter listener for fragment selection functionality.
*
* @private
* @param {Event} event Dom event
* @param {HTMLElement} parentElement Part of border element.
*/
}, {
key: 'onMouseEnter',
value: function onMouseEnter(event, parentElement) {
if (!this.mouseDown || !this.wot.getSetting('hideBorderOnMouseDownOver')) {
return;
}
event.preventDefault();
(0, _event.stopImmediatePropagation)(event);
var _this = this;
var bounds = parentElement.getBoundingClientRect();
// Hide border to prevents selection jumping when fragmentSelection is enabled.
parentElement.style.display = 'none';
function isOutside(event) {
if (event.clientY < Math.floor(bounds.top)) {
return true;
}
if (event.clientY > Math.ceil(bounds.top + bounds.height)) {
return true;
}
if (event.clientX < Math.floor(bounds.left)) {
return true;
}
if (event.clientX > Math.ceil(bounds.left + bounds.width)) {
return true;
}
}
function handler(event) {
if (isOutside(event)) {
_this.eventManager.removeEventListener(document.body, 'mousemove', handler);
parentElement.style.display = 'block';
}
}
this.eventManager.addEventListener(document.body, 'mousemove', handler);
}
/**
* Create border elements
*
* @param {Object} settings
*/
}, {
key: 'createBorders',
value: function createBorders(settings) {
this.main = document.createElement('div');
var borderDivs = ['top', 'left', 'bottom', 'right', 'corner'];
var style = this.main.style;
style.position = 'absolute';
style.top = 0;
style.left = 0;
for (var i = 0; i < 5; i++) {
var position = borderDivs[i];
var div = document.createElement('div');
div.className = 'wtBorder ' + (this.settings.className || ''); // + borderDivs[i];
if (this.settings[position] && this.settings[position].hide) {
div.className += ' hidden';
}
style = div.style;
style.backgroundColor = this.settings[position] && this.settings[position].color ? this.settings[position].color : settings.border.color;
style.height = this.settings[position] && this.settings[position].width ? this.settings[position].width + 'px' : settings.border.width + 'px';
style.width = this.settings[position] && this.settings[position].width ? this.settings[position].width + 'px' : settings.border.width + 'px';
this.main.appendChild(div);
}
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(' ');
if ((0, _browser.isMobileBrowser)()) {
this.createMultipleSelectorHandles();
}
this.disappear();
if (!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);
}
/**
* Create multiple selector handler for mobile devices
*/
}, {
key: 'createMultipleSelectorHandles',
value: function createMultipleSelectorHandles() {
this.selectionHandles = {
topLeft: document.createElement('DIV'),
topLeftHitArea: document.createElement('DIV'),
bottomRight: document.createElement('DIV'),
bottomRightHitArea: document.createElement('DIV')
};
var width = 10;
var hitAreaWidth = 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 hitAreaStyle = {
position: 'absolute',
height: hitAreaWidth + 'px',
width: hitAreaWidth + 'px',
'border-radius': parseInt(hitAreaWidth / 1.5, 10) + 'px'
};
for (var prop in hitAreaStyle) {
if ((0, _object.hasOwnProperty)(hitAreaStyle, prop)) {
this.selectionHandles.styles.bottomRightHitArea[prop] = hitAreaStyle[prop];
this.selectionHandles.styles.topLeftHitArea[prop] = hitAreaStyle[prop];
}
}
var handleStyle = {
position: 'absolute',
height: width + 'px',
width: width + 'px',
'border-radius': parseInt(width / 1.5, 10) + 'px',
background: '#F5F5FF',
border: '1px solid #4285c8'
};
for (var _prop in handleStyle) {
if ((0, _object.hasOwnProperty)(handleStyle, _prop)) {
this.selectionHandles.styles.bottomRight[_prop] = handleStyle[_prop];
this.selectionHandles.styles.topLeft[_prop] = handleStyle[_prop];
}
}
this.main.appendChild(this.selectionHandles.topLeft);
this.main.appendChild(this.selectionHandles.bottomRight);
this.main.appendChild(this.selectionHandles.topLeftHitArea);
this.main.appendChild(this.selectionHandles.bottomRightHitArea);
}
}, {
key: 'isPartRange',
value: function isPartRange(row, col) {
if (this.wot.selections.area.cellRange) {
if (row != this.wot.selections.area.cellRange.to.row || col != this.wot.selections.area.cellRange.to.col) {
return true;
}
}
return false;
}
}, {
key: 'updateMultipleSelectionHandlesPosition',
value: function updateMultipleSelectionHandlesPosition(row, col, top, left, width, height) {
var handleWidth = parseInt(this.selectionHandles.styles.topLeft.width, 10);
var hitAreaWidth = parseInt(this.selectionHandles.styles.topLeftHitArea.width, 10);
this.selectionHandles.styles.topLeft.top = parseInt(top - handleWidth, 10) + 'px';
this.selectionHandles.styles.topLeft.left = parseInt(left - handleWidth, 10) + 'px';
this.selectionHandles.styles.topLeftHitArea.top = parseInt(top - hitAreaWidth / 4 * 3, 10) + 'px';
this.selectionHandles.styles.topLeftHitArea.left = parseInt(left - hitAreaWidth / 4 * 3, 10) + 'px';
this.selectionHandles.styles.bottomRight.top = parseInt(top + height, 10) + 'px';
this.selectionHandles.styles.bottomRight.left = parseInt(left + width, 10) + 'px';
this.selectionHandles.styles.bottomRightHitArea.top = parseInt(top + height - hitAreaWidth / 4, 10) + 'px';
this.selectionHandles.styles.bottomRightHitArea.left = parseInt(left + width - hitAreaWidth / 4, 10) + 'px';
if (this.settings.border.multipleSelectionHandlesVisible && this.settings.border.multipleSelectionHandlesVisible()) {
this.selectionHandles.styles.topLeft.display = 'block';
this.selectionHandles.styles.topLeftHitArea.display = 'block';
if (this.isPartRange(row, col)) {
this.selectionHandles.styles.bottomRight.display = 'none';
this.selectionHandles.styles.bottomRightHitArea.display = 'none';
} else {
this.selectionHandles.styles.bottomRight.display = 'block';
this.selectionHandles.styles.bottomRightHitArea.display = 'block';
}
} else {
this.selectionHandles.styles.topLeft.display = 'none';
this.selectionHandles.styles.bottomRight.display = 'none';
this.selectionHandles.styles.topLeftHitArea.display = 'none';
this.selectionHandles.styles.bottomRightHitArea.display = 'none';
}
if (row == this.wot.wtSettings.getSetting('fixedRowsTop') || col == this.wot.wtSettings.getSetting('fixedColumnsLeft')) {
this.selectionHandles.styles.topLeft.zIndex = '9999';
this.selectionHandles.styles.topLeftHitArea.zIndex = '9999';
} else {
this.selectionHandles.styles.topLeft.zIndex = '';
this.selectionHandles.styles.topLeftHitArea.zIndex = '';
}
}
/**
* Show border around one or many cells
*
* @param {Array} corners
*/
}, {
key: 'appear',
value: function appear(corners) {
if (this.disabled) {
return;
}
var isMultiple, fromTD, toTD, fromOffset, toOffset, containerOffset, top, minTop, left, minLeft, height, width, fromRow, fromColumn, toRow, toColumn, trimmingContainer, cornerOverlappingContainer, ilen;
ilen = this.wot.wtTable.getRenderedRowsCount();
for (var i = 0; i < ilen; i++) {
var s = this.wot.wtTable.rowFilter.renderedToSource(i);
if (s >= corners[0] && s <= corners[2]) {
fromRow = s;
break;
}
}
for (var _i = ilen - 1; _i >= 0; _i--) {
var _s = this.wot.wtTable.rowFilter.renderedToSource(_i);
if (_s >= corners[0] && _s <= corners[2]) {
toRow = _s;
break;
}
}
ilen = this.wot.wtTable.getRenderedColumnsCount();
for (var _i2 = 0; _i2 < ilen; _i2++) {
var _s2 = this.wot.wtTable.columnFilter.renderedToSource(_i2);
if (_s2 >= corners[1] && _s2 <= corners[3]) {
fromColumn = _s2;
break;
}
}
for (var _i3 = ilen - 1; _i3 >= 0; _i3--) {
var _s3 = this.wot.wtTable.columnFilter.renderedToSource(_i3);
if (_s3 >= corners[1] && _s3 <= corners[3]) {
toColumn = _s3;
break;
}
}
if (fromRow === void 0 || fromColumn === void 0) {
this.disappear();
return;
}
isMultiple = fromRow !== toRow || fromColumn !== toColumn;
fromTD = this.wot.wtTable.getCell(new _coords2.default(fromRow, fromColumn));
toTD = isMultiple ? this.wot.wtTable.getCell(new _coords2.default(toRow, toColumn)) : fromTD;
fromOffset = (0, _element.offset)(fromTD);
toOffset = isMultiple ? (0, _element.offset)(toTD) : fromOffset;
containerOffset = (0, _element.offset)(this.wot.wtTable.TABLE);
minTop = fromOffset.top;
height = toOffset.top + (0, _element.outerHeight)(toTD) - minTop;
minLeft = fromOffset.left;
width = toOffset.left + (0, _element.outerWidth)(toTD) - minLeft;
top = minTop - containerOffset.top - 1;
left = minLeft - containerOffset.left - 1;
var style = (0, _element.getComputedStyle)(fromTD);
if (parseInt(style.borderTopWidth, 10) > 0) {
top += 1;
height = height > 0 ? height - 1 : 0;
}
if (parseInt(style.borderLeftWidth, 10) > 0) {
left += 1;
width = width > 0 ? width - 1 : 0;
}
this.topStyle.top = top + 'px';
this.topStyle.left = left + 'px';
this.topStyle.width = width + 'px';
this.topStyle.display = 'block';
this.leftStyle.top = top + 'px';
this.leftStyle.left = left + 'px';
this.leftStyle.height = height + 'px';
this.leftStyle.display = 'block';
var delta = Math.floor(this.settings.border.width / 2);
this.bottomStyle.top = top + height - delta + 'px';
this.bottomStyle.left = left + 'px';
this.bottomStyle.width = width + 'px';
this.bottomStyle.display = 'block';
this.rightStyle.top = top + 'px';
this.rightStyle.left = left + width - delta + 'px';
this.rightStyle.height = height + 1 + 'px';
this.rightStyle.display = 'block';
if ((0, _browser.isMobileBrowser)() || !this.hasSetting(this.settings.border.cornerVisible) || this.isPartRange(toRow, toColumn)) {
this.cornerStyle.display = 'none';
} else {
this.cornerStyle.top = top + height - 4 + 'px';
this.cornerStyle.left = left + width - 4 + 'px';
this.cornerStyle.borderRightWidth = this.cornerDefaultStyle.borderWidth;
this.cornerStyle.width = this.cornerDefaultStyle.width;
// Hide the fill handle, so the possible further adjustments won't force unneeded scrollbars.
this.cornerStyle.display = 'none';
trimmingContainer = (0, _element.getTrimmingContainer)(this.wot.wtTable.TABLE);
if (toColumn === this.wot.getSetting('totalColumns') - 1) {
cornerOverlappingContainer = toTD.offsetLeft + (0, _element.outerWidth)(toTD) + parseInt(this.cornerDefaultStyle.width, 10) / 2 >= (0, _element.innerWidth)(trimmingContainer);
if (cornerOverlappingContainer) {
this.cornerStyle.left = Math.floor(left + width - 3 - parseInt(this.cornerDefaultStyle.width, 10) / 2) + 'px';
this.cornerStyle.borderRightWidth = 0;
}
}
if (toRow === this.wot.getSetting('totalRows') - 1) {
cornerOverlappingContainer = toTD.offsetTop + (0, _element.outerHeight)(toTD) + parseInt(this.cornerDefaultStyle.height, 10) / 2 >= (0, _element.innerHeight)(trimmingContainer);
if (cornerOverlappingContainer) {
this.cornerStyle.top = Math.floor(top + height - 3 - parseInt(this.cornerDefaultStyle.height, 10) / 2) + 'px';
this.cornerStyle.borderBottomWidth = 0;
}
}
this.cornerStyle.display = 'block';
}
if ((0, _browser.isMobileBrowser)()) {
this.updateMultipleSelectionHandlesPosition(fromRow, fromColumn, top, left, width, height);
}
}
/**
* Hide border
*/
}, {
key: 'disappear',
value: function disappear() {
this.topStyle.display = 'none';
this.leftStyle.display = 'none';
this.bottomStyle.display = 'none';
this.rightStyle.display = 'none';
this.cornerStyle.display = 'none';
if ((0, _browser.isMobileBrowser)()) {
this.selectionHandles.styles.topLeft.display = 'none';
this.selectionHandles.styles.bottomRight.display = 'none';
}
}
/**
* @param {Function} setting
* @returns {*}
*/
}, {
key: 'hasSetting',
value: function hasSetting(setting) {
if (typeof setting === 'function') {
return setting();
}
return !!setting;
}
}]);
return Border;
}();
exports.default = Border;
/***/ }),
/* 303 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _unicode = __webpack_require__(20);
var _mixed = __webpack_require__(17);
var _string = __webpack_require__(36);
var _array = __webpack_require__(2);
var _element = __webpack_require__(0);
var _handsontableEditor = __webpack_require__(304);
var _handsontableEditor2 = _interopRequireDefault(_handsontableEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var AutocompleteEditor = _handsontableEditor2.default.prototype.extend();
/**
* @private
* @editor AutocompleteEditor
* @class AutocompleteEditor
* @dependencies HandsontableEditor
*/
AutocompleteEditor.prototype.init = function () {
_handsontableEditor2.default.prototype.init.apply(this, arguments);
this.query = null;
this.strippedChoices = [];
this.rawChoices = [];
};
AutocompleteEditor.prototype.getValue = function () {
var _this2 = this;
var selectedValue = this.rawChoices.find(function (value) {
var strippedValue = _this2.stripValueIfNeeded(value);
return strippedValue === _this2.TEXTAREA.value;
});
if ((0, _mixed.isDefined)(selectedValue)) {
return selectedValue;
}
return this.TEXTAREA.value;
};
AutocompleteEditor.prototype.createElements = function () {
_handsontableEditor2.default.prototype.createElements.apply(this, arguments);
(0, _element.addClass)(this.htContainer, 'autocompleteEditor');
(0, _element.addClass)(this.htContainer, window.navigator.platform.indexOf('Mac') === -1 ? '' : 'htMacScroll');
};
var skipOne = false;
function onBeforeKeyDown(event) {
skipOne = false;
var editor = this.getActiveEditor();
if ((0, _unicode.isPrintableChar)(event.keyCode) || event.keyCode === _unicode.KEY_CODES.BACKSPACE || event.keyCode === _unicode.KEY_CODES.DELETE || event.keyCode === _unicode.KEY_CODES.INSERT) {
var timeOffset = 0;
// on ctl+c / cmd+c don't update suggestion list
if (event.keyCode === _unicode.KEY_CODES.C && (event.ctrlKey || event.metaKey)) {
return;
}
if (!editor.isOpened()) {
timeOffset += 10;
}
if (editor.htEditor) {
editor.instance._registerTimeout(setTimeout(function () {
editor.queryChoices(editor.TEXTAREA.value);
skipOne = true;
}, timeOffset));
}
}
}
AutocompleteEditor.prototype.prepare = function () {
this.instance.addHook('beforeKeyDown', onBeforeKeyDown);
_handsontableEditor2.default.prototype.prepare.apply(this, arguments);
};
AutocompleteEditor.prototype.open = function () {
// Ugly fix for handsontable which grab window object for autocomplete scroll listener instead table element.
this.TEXTAREA_PARENT.style.overflow = 'auto';
_handsontableEditor2.default.prototype.open.apply(this, arguments);
this.TEXTAREA_PARENT.style.overflow = '';
var choicesListHot = this.htEditor.getInstance();
var _this = this;
var trimDropdown = this.cellProperties.trimDropdown === void 0 ? true : this.cellProperties.trimDropdown;
this.TEXTAREA.style.visibility = 'visible';
this.focus();
choicesListHot.updateSettings({
colWidths: trimDropdown ? [(0, _element.outerWidth)(this.TEXTAREA) - 2] : void 0,
width: trimDropdown ? (0, _element.outerWidth)(this.TEXTAREA) + (0, _element.getScrollbarWidth)() + 2 : void 0,
afterRenderer: function afterRenderer(TD, row, col, prop, value, cellProperties) {
var _this$cellProperties = _this.cellProperties,
filteringCaseSensitive = _this$cellProperties.filteringCaseSensitive,
allowHtml = _this$cellProperties.allowHtml;
var indexOfMatch = void 0;
var match = void 0;
value = (0, _mixed.stringify)(value);
if (value && !allowHtml) {
indexOfMatch = filteringCaseSensitive === true ? value.indexOf(this.query) : value.toLowerCase().indexOf(_this.query.toLowerCase());
if (indexOfMatch !== -1) {
match = value.substr(indexOfMatch, _this.query.length);
value = value.replace(match, '<strong>' + match + '</strong>');
}
}
TD.innerHTML = value;
},
autoColumnSize: true,
modifyColWidth: function modifyColWidth(width, col) {
// workaround for <strong> text overlapping the dropdown, not really accurate
var autoWidths = this.getPlugin('autoColumnSize').widths;
if (autoWidths[col]) {
width = autoWidths[col];
}
return trimDropdown ? width : width + 15;
}
});
// Add additional space for autocomplete holder
this.htEditor.view.wt.wtTable.holder.parentNode.style['padding-right'] = (0, _element.getScrollbarWidth)() + 2 + 'px';
if (skipOne) {
skipOne = false;
}
_this.instance._registerTimeout(setTimeout(function () {
_this.queryChoices(_this.TEXTAREA.value);
}, 0));
};
AutocompleteEditor.prototype.close = function () {
_handsontableEditor2.default.prototype.close.apply(this, arguments);
};
AutocompleteEditor.prototype.queryChoices = function (query) {
var _this3 = this;
this.query = query;
var source = this.cellProperties.source;
if (typeof source == 'function') {
source.call(this.cellProperties, query, function (choices) {
_this3.rawChoices = choices;
_this3.updateChoicesList(_this3.stripValuesIfNeeded(choices));
});
} else if (Array.isArray(source)) {
this.rawChoices = source;
this.updateChoicesList(this.stripValuesIfNeeded(source));
} else {
this.updateChoicesList([]);
}
};
AutocompleteEditor.prototype.updateChoicesList = function (choices) {
var pos = (0, _element.getCaretPosition)(this.TEXTAREA);
var endPos = (0, _element.getSelectionEndPosition)(this.TEXTAREA);
var sortByRelevanceSetting = this.cellProperties.sortByRelevance;
var filterSetting = this.cellProperties.filter;
var orderByRelevance = null;
var highlightIndex = null;
if (sortByRelevanceSetting) {
orderByRelevance = AutocompleteEditor.sortByRelevance(this.stripValueIfNeeded(this.getValue()), choices, this.cellProperties.filteringCaseSensitive);
}
var orderByRelevanceLength = Array.isArray(orderByRelevance) ? orderByRelevance.length : 0;
if (filterSetting === false) {
if (orderByRelevanceLength) {
highlightIndex = orderByRelevance[0];
}
} else {
var sorted = [];
for (var i = 0, choicesCount = choices.length; i < choicesCount; i++) {
if (sortByRelevanceSetting && orderByRelevanceLength <= i) {
break;
}
if (orderByRelevanceLength) {
sorted.push(choices[orderByRelevance[i]]);
} else {
sorted.push(choices[i]);
}
}
highlightIndex = 0;
choices = sorted;
}
this.strippedChoices = choices;
this.htEditor.loadData((0, _array.pivot)([choices]));
this.updateDropdownHeight();
this.flipDropdownIfNeeded();
if (this.cellProperties.strict === true) {
this.highlightBestMatchingChoice(highlightIndex);
}
this.instance.listen(false);
(0, _element.setCaretPosition)(this.TEXTAREA, pos, pos === endPos ? void 0 : endPos);
};
AutocompleteEditor.prototype.flipDropdownIfNeeded = function () {
var textareaOffset = (0, _element.offset)(this.TEXTAREA);
var textareaHeight = (0, _element.outerHeight)(this.TEXTAREA);
var dropdownHeight = this.getDropdownHeight();
var trimmingContainer = (0, _element.getTrimmingContainer)(this.instance.view.wt.wtTable.TABLE);
var trimmingContainerScrollTop = trimmingContainer.scrollTop;
var headersHeight = (0, _element.outerHeight)(this.instance.view.wt.wtTable.THEAD);
var containerOffset = {
row: 0,
col: 0
};
if (trimmingContainer !== window) {
containerOffset = (0, _element.offset)(trimmingContainer);
}
var spaceAbove = textareaOffset.top - containerOffset.top - headersHeight + trimmingContainerScrollTop;
var spaceBelow = trimmingContainer.scrollHeight - spaceAbove - headersHeight - textareaHeight;
var flipNeeded = dropdownHeight > spaceBelow && spaceAbove > spaceBelow;
if (flipNeeded) {
this.flipDropdown(dropdownHeight);
} else {
this.unflipDropdown();
}
this.limitDropdownIfNeeded(flipNeeded ? spaceAbove : spaceBelow, dropdownHeight);
return flipNeeded;
};
AutocompleteEditor.prototype.limitDropdownIfNeeded = function (spaceAvailable, dropdownHeight) {
if (dropdownHeight > spaceAvailable) {
var tempHeight = 0;
var i = 0;
var lastRowHeight = 0;
var height = null;
do {
lastRowHeight = this.htEditor.getRowHeight(i) || this.htEditor.view.wt.wtSettings.settings.defaultRowHeight;
tempHeight += lastRowHeight;
i++;
} while (tempHeight < spaceAvailable);
height = tempHeight - lastRowHeight;
if (this.htEditor.flipped) {
this.htEditor.rootElement.style.top = parseInt(this.htEditor.rootElement.style.top, 10) + dropdownHeight - height + 'px';
}
this.setDropdownHeight(tempHeight - lastRowHeight);
}
};
AutocompleteEditor.prototype.flipDropdown = function (dropdownHeight) {
var dropdownStyle = this.htEditor.rootElement.style;
dropdownStyle.position = 'absolute';
dropdownStyle.top = -dropdownHeight + 'px';
this.htEditor.flipped = true;
};
AutocompleteEditor.prototype.unflipDropdown = function () {
var dropdownStyle = this.htEditor.rootElement.style;
if (dropdownStyle.position === 'absolute') {
dropdownStyle.position = '';
dropdownStyle.top = '';
}
this.htEditor.flipped = void 0;
};
AutocompleteEditor.prototype.updateDropdownHeight = function () {
var currentDropdownWidth = this.htEditor.getColWidth(0) + (0, _element.getScrollbarWidth)() + 2;
var trimDropdown = this.cellProperties.trimDropdown;
this.htEditor.updateSettings({
height: this.getDropdownHeight(),
width: trimDropdown ? void 0 : currentDropdownWidth
});
this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer();
};
AutocompleteEditor.prototype.setDropdownHeight = function (height) {
this.htEditor.updateSettings({
height: height
});
};
AutocompleteEditor.prototype.finishEditing = function (restoreOriginalValue) {
if (!restoreOriginalValue) {
this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);
}
_handsontableEditor2.default.prototype.finishEditing.apply(this, arguments);
};
AutocompleteEditor.prototype.highlightBestMatchingChoice = function (index) {
if (typeof index === 'number') {
this.htEditor.selectCell(index, 0, void 0, void 0, void 0, false);
} else {
this.htEditor.deselectCell();
}
};
/**
* Filters and sorts by relevance
* @param value
* @param choices
* @param caseSensitive
* @returns {Array} array of indexes in original choices array
*/
AutocompleteEditor.sortByRelevance = function (value, choices, caseSensitive) {
var choicesRelevance = [];
var currentItem = void 0;
var valueLength = value.length;
var valueIndex = void 0;
var charsLeft = void 0;
var result = [];
var i = void 0;
var choicesCount = choices.length;
if (valueLength === 0) {
for (i = 0; i < choicesCount; i++) {
result.push(i);
}
return result;
}
for (i = 0; i < choicesCount; i++) {
currentItem = (0, _string.stripTags)((0, _mixed.stringify)(choices[i]));
if (caseSensitive) {
valueIndex = currentItem.indexOf(value);
} else {
valueIndex = currentItem.toLowerCase().indexOf(value.toLowerCase());
}
if (valueIndex !== -1) {
charsLeft = currentItem.length - valueIndex - valueLength;
choicesRelevance.push({
baseIndex: i,
index: valueIndex,
charsLeft: charsLeft,
value: currentItem
});
}
}
choicesRelevance.sort(function (a, b) {
if (b.index === -1) {
return -1;
}
if (a.index === -1) {
return 1;
}
if (a.index < b.index) {
return -1;
} else if (b.index < a.index) {
return 1;
} else if (a.index === b.index) {
if (a.charsLeft < b.charsLeft) {
return -1;
} else if (a.charsLeft > b.charsLeft) {
return 1;
}
}
return 0;
});
for (i = 0, choicesCount = choicesRelevance.length; i < choicesCount; i++) {
result.push(choicesRelevance[i].baseIndex);
}
return result;
};
AutocompleteEditor.prototype.getDropdownHeight = function () {
var firstRowHeight = this.htEditor.getInstance().getRowHeight(0) || 23;
var visibleRows = this.cellProperties.visibleRows;
return this.strippedChoices.length >= visibleRows ? visibleRows * firstRowHeight : this.strippedChoices.length * firstRowHeight + 8;
};
AutocompleteEditor.prototype.stripValueIfNeeded = function (value) {
return this.stripValuesIfNeeded([value])[0];
};
AutocompleteEditor.prototype.stripValuesIfNeeded = function (values) {
var allowHtml = this.cellProperties.allowHtml;
var stringifiedValues = (0, _array.arrayMap)(values, function (value) {
return (0, _mixed.stringify)(value);
});
var strippedValues = (0, _array.arrayMap)(stringifiedValues, function (value) {
return allowHtml ? value : (0, _string.stripTags)(value);
});
return strippedValues;
};
AutocompleteEditor.prototype.allowKeyEventPropagation = function (keyCode) {
var selected = { row: this.htEditor.getSelectedRange() ? this.htEditor.getSelectedRange().from.row : -1 };
var allowed = false;
if (keyCode === _unicode.KEY_CODES.ARROW_DOWN && selected.row > 0 && selected.row < this.htEditor.countRows() - 1) {
allowed = true;
}
if (keyCode === _unicode.KEY_CODES.ARROW_UP && selected.row > -1) {
allowed = true;
}
return allowed;
};
AutocompleteEditor.prototype.discardEditor = function (result) {
_handsontableEditor2.default.prototype.discardEditor.apply(this, arguments);
this.instance.view.render();
};
exports.default = AutocompleteEditor;
/***/ }),
/* 304 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _unicode = __webpack_require__(20);
var _object = __webpack_require__(1);
var _element = __webpack_require__(0);
var _event = __webpack_require__(12);
var _textEditor = __webpack_require__(54);
var _textEditor2 = _interopRequireDefault(_textEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var HandsontableEditor = _textEditor2.default.prototype.extend();
/**
* @private
* @editor HandsontableEditor
* @class HandsontableEditor
* @dependencies TextEditor
*/
HandsontableEditor.prototype.createElements = function () {
_textEditor2.default.prototype.createElements.apply(this, arguments);
var DIV = document.createElement('DIV');
DIV.className = 'handsontableEditor';
this.TEXTAREA_PARENT.appendChild(DIV);
this.htContainer = DIV;
this.assignHooks();
};
HandsontableEditor.prototype.prepare = function (td, row, col, prop, value, cellProperties) {
_textEditor2.default.prototype.prepare.apply(this, arguments);
var parent = this;
var options = {
startRows: 0,
startCols: 0,
minRows: 0,
minCols: 0,
className: 'listbox',
copyPaste: false,
autoColumnSize: false,
autoRowSize: false,
readOnly: true,
fillHandle: false,
afterOnCellMouseDown: function afterOnCellMouseDown(_, coords) {
var value = this.getSourceData(coords.row, coords.col);
// if the value is undefined then it means we don't want to set the value
if (value !== void 0) {
parent.setValue(value);
}
parent.instance.destroyEditor();
}
};
if (this.cellProperties.handsontable) {
(0, _object.extend)(options, cellProperties.handsontable);
}
this.htOptions = options;
};
var onBeforeKeyDown = function onBeforeKeyDown(event) {
if ((0, _event.isImmediatePropagationStopped)(event)) {
return;
}
var editor = this.getActiveEditor();
var innerHOT = editor.htEditor.getInstance();
var rowToSelect;
var selectedRow;
if (event.keyCode == _unicode.KEY_CODES.ARROW_DOWN) {
if (!innerHOT.getSelected() && !innerHOT.flipped) {
rowToSelect = 0;
} else if (innerHOT.getSelected()) {
if (innerHOT.flipped) {
rowToSelect = innerHOT.getSelected()[0] + 1;
} else if (!innerHOT.flipped) {
selectedRow = innerHOT.getSelected()[0];
var lastRow = innerHOT.countRows() - 1;
rowToSelect = Math.min(lastRow, selectedRow + 1);
}
}
} else if (event.keyCode == _unicode.KEY_CODES.ARROW_UP) {
if (!innerHOT.getSelected() && innerHOT.flipped) {
rowToSelect = innerHOT.countRows() - 1;
} else if (innerHOT.getSelected()) {
if (innerHOT.flipped) {
selectedRow = innerHOT.getSelected()[0];
rowToSelect = Math.max(0, selectedRow - 1);
} else {
selectedRow = innerHOT.getSelected()[0];
rowToSelect = selectedRow - 1;
}
}
}
if (rowToSelect !== void 0) {
if (rowToSelect < 0 || innerHOT.flipped && rowToSelect > innerHOT.countRows() - 1) {
innerHOT.deselectCell();
} else {
innerHOT.selectCell(rowToSelect, 0);
}
if (innerHOT.getData().length) {
event.preventDefault();
(0, _event.stopImmediatePropagation)(event);
editor.instance.listen();
editor.TEXTAREA.focus();
}
}
};
HandsontableEditor.prototype.open = function () {
this.instance.addHook('beforeKeyDown', onBeforeKeyDown);
_textEditor2.default.prototype.open.apply(this, arguments);
if (this.htEditor) {
this.htEditor.destroy();
}
// Construct and initialise a new Handsontable
this.htEditor = new this.instance.constructor(this.htContainer, this.htOptions);
this.htEditor.init();
if (this.cellProperties.strict) {
this.htEditor.selectCell(0, 0);
this.TEXTAREA.style.visibility = 'hidden';
} else {
this.htEditor.deselectCell();
this.TEXTAREA.style.visibility = 'visible';
}
(0, _element.setCaretPosition)(this.TEXTAREA, 0, this.TEXTAREA.value.length);
};
HandsontableEditor.prototype.close = function () {
this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);
this.instance.listen();
_textEditor2.default.prototype.close.apply(this, arguments);
};
HandsontableEditor.prototype.focus = function () {
this.instance.listen();
_textEditor2.default.prototype.focus.apply(this, arguments);
};
HandsontableEditor.prototype.beginEditing = function (initialValue) {
var onBeginEditing = this.instance.getSettings().onBeginEditing;
if (onBeginEditing && onBeginEditing() === false) {
return;
}
_textEditor2.default.prototype.beginEditing.apply(this, arguments);
};
HandsontableEditor.prototype.finishEditing = function (isCancelled, ctrlDown) {
if (this.htEditor && this.htEditor.isListening()) {
// if focus is still in the HOT editor
this.instance.listen(); // return the focus to the parent HOT instance
}
if (this.htEditor && this.htEditor.getSelected()) {
var value = this.htEditor.getInstance().getValue();
if (value !== void 0) {
// if the value is undefined then it means we don't want to set the value
this.setValue(value);
}
}
return _textEditor2.default.prototype.finishEditing.apply(this, arguments);
};
HandsontableEditor.prototype.assignHooks = function () {
var _this = this;
this.instance.addHook('afterDestroy', function () {
if (_this.htEditor) {
_this.htEditor.destroy();
}
});
};
exports.default = HandsontableEditor;
/***/ }),
/* 305 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
* numbro.js
* version : 1.11.0
* author : Företagsplatsen AB
* license : MIT
* http://www.foretagsplatsen.se
*/
(function () {
'use strict';
/************************************
Constants
************************************/
var numbro,
VERSION = '1.11.0',
binarySuffixes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'],
decimalSuffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
bytes = {
general: { scale: 1024, suffixes: decimalSuffixes, marker: 'bd' },
binary: { scale: 1024, suffixes: binarySuffixes, marker: 'b' },
decimal: { scale: 1000, suffixes: decimalSuffixes, marker: 'd' }
},
// general must be before the others because it reuses their characters!
byteFormatOrder = [ bytes.general, bytes.binary, bytes.decimal ],
// internal storage for culture config files
cultures = {},
// Todo: Remove in 2.0.0
languages = cultures,
currentCulture = 'en-US',
zeroFormat = null,
defaultFormat = '0,0',
defaultCurrencyFormat = '0$',
// check for nodeJS
hasModule = (typeof module !== 'undefined' && module.exports),
// default culture
enUS = {
delimiters: {
thousands: ',',
decimal: '.'
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function(number) {
var b = number % 10;
return (~~(number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
},
currency: {
symbol: '$',
position: 'prefix'
},
defaults: {
currencyFormat: ',0000 a'
},
formats: {
fourDigits: '0000 a',
fullWithTwoDecimals: '$ ,0.00',
fullWithTwoDecimalsNoCurrency: ',0.00'
}
};
/************************************
Constructors
************************************/
// Numbro prototype object
function Numbro(number) {
this._value = number;
}
function numberLength(number) {
if (number === 0) { return 1; }
return Math.floor(Math.log(Math.abs(number)) / Math.LN10) + 1;
}
function zeroes(count) {
var i, ret = '';
for (i = 0; i < count; i++) {
ret += '0';
}
return ret;
}
/**
* Implementation of toFixed() for numbers with exponents
* This function may return negative representations for zero values e.g. "-0.0"
*/
function toFixedLargeSmall(value, precision) {
var mantissa,
beforeDec,
afterDec,
exponent,
prefix,
endStr,
zerosStr,
str;
str = value.toString();
mantissa = str.split('e')[0];
exponent = str.split('e')[1];
beforeDec = mantissa.split('.')[0];
afterDec = mantissa.split('.')[1] || '';
if (+exponent > 0) {
// exponent is positive - add zeros after the numbers
str = beforeDec + afterDec + zeroes(exponent - afterDec.length);
} else {
// exponent is negative
if (+beforeDec < 0) {
prefix = '-0';
} else {
prefix = '0';
}
// tack on the decimal point if needed
if (precision > 0) {
prefix += '.';
}
zerosStr = zeroes((-1 * exponent) - 1);
// substring off the end to satisfy the precision
endStr = (zerosStr + Math.abs(beforeDec) + afterDec).substr(0, precision);
str = prefix + endStr;
}
// only add percision 0's if the exponent is positive
if (+exponent > 0 && precision > 0) {
str += '.' + zeroes(precision);
}
return str;
}
/**
* Implementation of toFixed() that treats floats more like decimals
*
* Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present
* problems for accounting- and finance-related software.
*
* Also removes negative signs for zero-formatted numbers. e.g. -0.01 w/ precision 1 -> 0.0
*/
function toFixed(value, precision, roundingFunction, optionals) {
var power = Math.pow(10, precision),
optionalsRegExp,
output;
if (value.toString().indexOf('e') > -1) {
// toFixed returns scientific notation for numbers above 1e21 and below 1e-7
output = toFixedLargeSmall(value, precision);
// remove the leading negative sign if it exists and should not be present (e.g. -0.00)
if (output.charAt(0) === '-' && +output >= 0) {
output = output.substr(1); // chop off the '-'
}
}
else {
// Multiply up by precision, round accurately, then divide and use native toFixed():
output = (roundingFunction(value + 'e+' + precision) / power).toFixed(precision);
}
if (optionals) {
optionalsRegExp = new RegExp('0{1,' + optionals + '}$');
output = output.replace(optionalsRegExp, '');
}
return output;
}
/************************************
Formatting
************************************/
// determine what type of formatting we need to do
function formatNumbro(n, format, roundingFunction) {
var output,
escapedFormat = format.replace(/\{[^\{\}]*\}/g, '');
// figure out what kind of format we are dealing with
if (escapedFormat.indexOf('$') > -1) { // currency!!!!!
output = formatCurrency(n, cultures[currentCulture].currency.symbol, format, roundingFunction);
} else if (escapedFormat.indexOf('%') > -1) { // percentage
output = formatPercentage(n, format, roundingFunction);
} else if (escapedFormat.indexOf(':') > -1) { // time
output = formatTime(n, format);
} else { // plain ol' numbers or bytes
output = formatNumber(n._value, format, roundingFunction);
}
// return string
return output;
}
// revert to number
function unformatNumbro(n, string) {
var stringOriginal = string,
thousandRegExp,
millionRegExp,
billionRegExp,
trillionRegExp,
bytesMultiplier = false,
power;
if (string.indexOf(':') > -1) {
n._value = unformatTime(string);
} else {
if (string === zeroFormat) {
n._value = 0;
} else {
if (cultures[currentCulture].delimiters.decimal !== '.') {
string = string.replace(/\./g, '').replace(cultures[currentCulture].delimiters.decimal, '.');
}
// see if abbreviations are there so that we can multiply to the correct number
thousandRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.thousand +
'(?:\\)|(\\' + cultures[currentCulture].currency.symbol + ')?(?:\\))?)?$');
millionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.million +
'(?:\\)|(\\' + cultures[currentCulture].currency.symbol + ')?(?:\\))?)?$');
billionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.billion +
'(?:\\)|(\\' + cultures[currentCulture].currency.symbol + ')?(?:\\))?)?$');
trillionRegExp = new RegExp('[^a-zA-Z]' + cultures[currentCulture].abbreviations.trillion +
'(?:\\)|(\\' + cultures[currentCulture].currency.symbol + ')?(?:\\))?)?$');
// see if bytes are there so that we can multiply to the correct number
for (power = 1; power < binarySuffixes.length && !bytesMultiplier; ++power) {
if (string.indexOf(binarySuffixes[power]) > -1) {
bytesMultiplier = Math.pow(1024, power);
} else if (string.indexOf(decimalSuffixes[power]) > -1) {
bytesMultiplier = Math.pow(1000, power);
}
}
var str = string.replace(/[^0-9\.]+/g, '');
if (str === '') {
// An empty string is not a number.
n._value = NaN;
} else {
// do some math to create our number
n._value = ((bytesMultiplier) ? bytesMultiplier : 1) *
((stringOriginal.match(thousandRegExp)) ? Math.pow(10, 3) : 1) *
((stringOriginal.match(millionRegExp)) ? Math.pow(10, 6) : 1) *
((stringOriginal.match(billionRegExp)) ? Math.pow(10, 9) : 1) *
((stringOriginal.match(trillionRegExp)) ? Math.pow(10, 12) : 1) *
((string.indexOf('%') > -1) ? 0.01 : 1) *
(((string.split('-').length +
Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2) ? 1 : -1) *
Number(str);
// round if we are talking about bytes
n._value = (bytesMultiplier) ? Math.ceil(n._value) : n._value;
}
}
}
return n._value;
}
function formatCurrency(n, currencySymbol, originalFormat, roundingFunction) {
var format = originalFormat,
symbolIndex = format.indexOf('$'),
openParenIndex = format.indexOf('('),
plusSignIndex = format.indexOf('+'),
minusSignIndex = format.indexOf('-'),
space = '',
decimalSeparator = '',
spliceIndex,
output;
if(format.indexOf('$') === -1){
// Use defaults instead of the format provided
if (cultures[currentCulture].currency.position === 'infix') {
decimalSeparator = currencySymbol;
if (cultures[currentCulture].currency.spaceSeparated) {
decimalSeparator = ' ' + decimalSeparator + ' ';
}
} else if (cultures[currentCulture].currency.spaceSeparated) {
space = ' ';
}
} else {
// check for space before or after currency
if (format.indexOf(' $') > -1) {
space = ' ';
format = format.replace(' $', '');
} else if (format.indexOf('$ ') > -1) {
space = ' ';
format = format.replace('$ ', '');
} else {
format = format.replace('$', '');
}
}
// Format The Number
output = formatNumber(n._value, format, roundingFunction, decimalSeparator);
if (originalFormat.indexOf('$') === -1) {
// Use defaults instead of the format provided
switch (cultures[currentCulture].currency.position) {
case 'postfix':
if (output.indexOf(')') > -1) {
output = output.split('');
output.splice(-1, 0, space + currencySymbol);
output = output.join('');
} else {
output = output + space + currencySymbol;
}
break;
case 'infix':
break;
case 'prefix':
if (output.indexOf('(') > -1 || output.indexOf('-') > -1) {
output = output.split('');
spliceIndex = Math.max(openParenIndex, minusSignIndex) + 1;
output.splice(spliceIndex, 0, currencySymbol + space);
output = output.join('');
} else {
output = currencySymbol + space + output;
}
break;
default:
throw Error('Currency position should be among ["prefix", "infix", "postfix"]');
}
} else {
// position the symbol
if (symbolIndex <= 1) {
if (output.indexOf('(') > -1 || output.indexOf('+') > -1 || output.indexOf('-') > -1) {
output = output.split('');
spliceIndex = 1;
if (symbolIndex < openParenIndex || symbolIndex < plusSignIndex || symbolIndex < minusSignIndex) {
// the symbol appears before the "(", "+" or "-"
spliceIndex = 0;
}
output.splice(spliceIndex, 0, currencySymbol + space);
output = output.join('');
} else {
output = currencySymbol + space + output;
}
} else {
if (output.indexOf(')') > -1) {
output = output.split('');
output.splice(-1, 0, space + currencySymbol);
output = output.join('');
} else {
output = output + space + currencySymbol;
}
}
}
return output;
}
function formatForeignCurrency(n, foreignCurrencySymbol, originalFormat, roundingFunction) {
return formatCurrency(n, foreignCurrencySymbol, originalFormat, roundingFunction);
}
function formatPercentage(n, format, roundingFunction) {
var space = '',
output,
value = n._value * 100;
// check for space before %
if (format.indexOf(' %') > -1) {
space = ' ';
format = format.replace(' %', '');
} else {
format = format.replace('%', '');
}
output = formatNumber(value, format, roundingFunction);
if (output.indexOf(')') > -1) {
output = output.split('');
output.splice(-1, 0, space + '%');
output = output.join('');
} else {
output = output + space + '%';
}
return output;
}
function formatTime(n) {
var hours = Math.floor(n._value / 60 / 60),
minutes = Math.floor((n._value - (hours * 60 * 60)) / 60),
seconds = Math.round(n._value - (hours * 60 * 60) - (minutes * 60));
return hours + ':' +
((minutes < 10) ? '0' + minutes : minutes) + ':' +
((seconds < 10) ? '0' + seconds : seconds);
}
function unformatTime(string) {
var timeArray = string.split(':'),
seconds = 0;
// turn hours and minutes into seconds and add them all up
if (timeArray.length === 3) {
// hours
seconds = seconds + (Number(timeArray[0]) * 60 * 60);
// minutes
seconds = seconds + (Number(timeArray[1]) * 60);
// seconds
seconds = seconds + Number(timeArray[2]);
} else if (timeArray.length === 2) {
// minutes
seconds = seconds + (Number(timeArray[0]) * 60);
// seconds
seconds = seconds + Number(timeArray[1]);
}
return Number(seconds);
}
function formatByteUnits (value, suffixes, scale) {
var suffix = suffixes[0],
power,
min,
max,
abs = Math.abs(value);
if (abs >= scale) {
for (power = 1; power < suffixes.length; ++power) {
min = Math.pow(scale, power);
max = Math.pow(scale, power + 1);
if (abs >= min && abs < max) {
suffix = suffixes[power];
value = value / min;
break;
}
}
// values greater than or equal to [scale] YB never set the suffix
if (suffix === suffixes[0]) {
value = value / Math.pow(scale, suffixes.length - 1);
suffix = suffixes[suffixes.length - 1];
}
}
return { value: value, suffix: suffix };
}
function formatNumber (value, format, roundingFunction, sep) {
var negP = false,
signed = false,
optDec = false,
abbr = '',
abbrK = false, // force abbreviation to thousands
abbrM = false, // force abbreviation to millions
abbrB = false, // force abbreviation to billions
abbrT = false, // force abbreviation to trillions
abbrForce = false, // force abbreviation
bytes = '',
byteFormat,
units,
ord = '',
abs = Math.abs(value),
totalLength,
length,
minimumPrecision,
pow,
w,
intPrecision,
precision,
prefix,
postfix,
thousands,
d = '',
forcedNeg = false,
neg = false,
indexOpenP,
indexMinus,
paren = '',
minlen,
i;
// check if number is zero and a custom zero format has been set
if (value === 0 && zeroFormat !== null) {
return zeroFormat;
}
if (!isFinite(value)) {
return '' + value;
}
if (format.indexOf('{') === 0) {
var end = format.indexOf('}');
if (end === -1) {
throw Error('Format should also contain a "}"');
}
prefix = format.slice(1, end);
format = format.slice(end + 1);
} else {
prefix = '';
}
if (format.indexOf('}') === format.length - 1 && format.length) {
var start = format.indexOf('{');
if (start === -1) {
throw Error('Format should also contain a "{"');
}
postfix = format.slice(start + 1, -1);
format = format.slice(0, start + 1);
} else {
postfix = '';
}
// check for min length
var info;
if (format.indexOf('.') === -1) {
info = format.match(/([0-9]+).*/);
} else {
info = format.match(/([0-9]+)\..*/);
}
minlen = info === null ? -1 : info[1].length;
// see if we should use parentheses for negative number or if we should prefix with a sign
// if both are present we default to parentheses
if (format.indexOf('-') !== -1) {
forcedNeg = true;
}
if (format.indexOf('(') > -1) {
negP = true;
format = format.slice(1, -1);
} else if (format.indexOf('+') > -1) {
signed = true;
format = format.replace(/\+/g, '');
}
// see if abbreviation is wanted
if (format.indexOf('a') > -1) {
intPrecision = format.split('.')[0].match(/[0-9]+/g) || ['0'];
intPrecision = parseInt(intPrecision[0], 10);
// check if abbreviation is specified
abbrK = format.indexOf('aK') >= 0;
abbrM = format.indexOf('aM') >= 0;
abbrB = format.indexOf('aB') >= 0;
abbrT = format.indexOf('aT') >= 0;
abbrForce = abbrK || abbrM || abbrB || abbrT;
// check for space before abbreviation
if (format.indexOf(' a') > -1) {
abbr = ' ';
format = format.replace(' a', '');
} else {
format = format.replace('a', '');
}
totalLength = numberLength(value);
minimumPrecision = totalLength % 3;
minimumPrecision = minimumPrecision === 0 ? 3 : minimumPrecision;
if (intPrecision && abs !== 0) {
pow = 3 * ~~((Math.min(intPrecision, totalLength) - minimumPrecision) / 3);
abs = abs / Math.pow(10, pow);
}
if (totalLength !== intPrecision) {
if (abs >= Math.pow(10, 12) && !abbrForce || abbrT) {
// trillion
abbr = abbr + cultures[currentCulture].abbreviations.trillion;
value = value / Math.pow(10, 12);
} else if (abs < Math.pow(10, 12) && abs >= Math.pow(10, 9) && !abbrForce || abbrB) {
// billion
abbr = abbr + cultures[currentCulture].abbreviations.billion;
value = value / Math.pow(10, 9);
} else if (abs < Math.pow(10, 9) && abs >= Math.pow(10, 6) && !abbrForce || abbrM) {
// million
abbr = abbr + cultures[currentCulture].abbreviations.million;
value = value / Math.pow(10, 6);
} else if (abs < Math.pow(10, 6) && abs >= Math.pow(10, 3) && !abbrForce || abbrK) {
// thousand
abbr = abbr + cultures[currentCulture].abbreviations.thousand;
value = value / Math.pow(10, 3);
}
}
length = numberLength(value);
if (intPrecision && length < intPrecision && format.indexOf('.') === -1) {
format += '[.]';
format += zeroes(intPrecision - length);
}
}
// see if we are formatting
// binary-decimal bytes (1024 MB), binary bytes (1024 MiB), or decimal bytes (1000 MB)
for (i = 0; i < byteFormatOrder.length; ++i) {
byteFormat = byteFormatOrder[i];
if (format.indexOf(byteFormat.marker) > -1) {
// check for space before
if (format.indexOf(' ' + byteFormat.marker) >-1) {
bytes = ' ';
}
// remove the marker (with the space if it had one)
format = format.replace(bytes + byteFormat.marker, '');
units = formatByteUnits(value, byteFormat.suffixes, byteFormat.scale);
value = units.value;
bytes = bytes + units.suffix;
break;
}
}
// see if ordinal is wanted
if (format.indexOf('o') > -1) {
// check for space before
if (format.indexOf(' o') > -1) {
ord = ' ';
format = format.replace(' o', '');
} else {
format = format.replace('o', '');
}
if (cultures[currentCulture].ordinal) {
ord = ord + cultures[currentCulture].ordinal(value);
}
}
if (format.indexOf('[.]') > -1) {
optDec = true;
format = format.replace('[.]', '.');
}
precision = format.split('.')[1];
thousands = format.indexOf(',');
if (precision) {
var dSplit = [];
if (precision.indexOf('*') !== -1) {
d = value.toString();
dSplit = d.split('.');
if (dSplit.length > 1) {
d = toFixed(value, dSplit[1].length, roundingFunction);
}
} else {
if (precision.indexOf('[') > -1) {
precision = precision.replace(']', '');
precision = precision.split('[');
d = toFixed(value, (precision[0].length + precision[1].length), roundingFunction,
precision[1].length);
} else {
d = toFixed(value, precision.length, roundingFunction);
}
}
dSplit = d.split('.');
w = dSplit[0];
if (dSplit.length > 1 && dSplit[1].length) {
var p = sep ? abbr + sep : cultures[currentCulture].delimiters.decimal;
d = p + dSplit[1];
} else {
d = '';
}
if (optDec && Number(d.slice(1)) === 0) {
d = '';
}
} else {
w = toFixed(value, 0, roundingFunction);
}
// format number
if (w.indexOf('-') > -1) {
w = w.slice(1);
neg = true;
}
if (w.length < minlen) {
w = zeroes(minlen - w.length) + w;
}
if (thousands > -1) {
w = w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' +
cultures[currentCulture].delimiters.thousands);
}
if (format.indexOf('.') === 0) {
w = '';
}
indexOpenP = format.indexOf('(');
indexMinus = format.indexOf('-');
if (indexOpenP < indexMinus) {
paren = ((negP && neg) ? '(' : '') + (((forcedNeg && neg) || (!negP && neg)) ? '-' : '');
} else {
paren = (((forcedNeg && neg) || (!negP && neg)) ? '-' : '') + ((negP && neg) ? '(' : '');
}
return prefix +
paren + ((!neg && signed && value !== 0) ? '+' : '') +
w + d +
((ord) ? ord : '') +
((abbr && !sep) ? abbr : '') +
((bytes) ? bytes : '') +
((negP && neg) ? ')' : '') +
postfix;
}
/************************************
Top Level Functions
************************************/
numbro = function(input) {
if (numbro.isNumbro(input)) {
input = input.value();
} else if (typeof input === 'string' || typeof input === 'number') {
input = numbro.fn.unformat(input);
} else {
input = NaN;
}
return new Numbro(Number(input));
};
// version number
numbro.version = VERSION;
// compare numbro object
numbro.isNumbro = function(obj) {
return obj instanceof Numbro;
};
/**
* This function allow the user to set a new language with a fallback if
* the language does not exist. If no fallback language is provided,
* it fallbacks to english.
*
* @deprecated Since in version 1.6.0. It will be deleted in version 2.0
* `setCulture` should be used instead.
*/
numbro.setLanguage = function(newLanguage, fallbackLanguage) {
console.warn('`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead');
var key = newLanguage,
prefix = newLanguage.split('-')[0],
matchingLanguage = null;
if (!languages[key]) {
Object.keys(languages).forEach(function(language) {
if (!matchingLanguage && language.split('-')[0] === prefix) {
matchingLanguage = language;
}
});
key = matchingLanguage || fallbackLanguage || 'en-US';
}
chooseCulture(key);
};
/**
* This function allow the user to set a new culture with a fallback if
* the culture does not exist. If no fallback culture is provided,
* it falls back to "en-US".
*/
numbro.setCulture = function(newCulture, fallbackCulture) {
var key = newCulture,
suffix = newCulture.split('-')[1],
matchingCulture = null;
if (!cultures[key]) {
if (suffix) {
Object.keys(cultures).forEach(function(language) {
if (!matchingCulture && language.split('-')[1] === suffix) {
matchingCulture = language;
}
});
}
key = matchingCulture || fallbackCulture || 'en-US';
}
chooseCulture(key);
};
/**
* This function will load languages and then set the global language. If
* no arguments are passed in, it will simply return the current global
* language key.
*
* @deprecated Since in version 1.6.0. It will be deleted in version 2.0
* `culture` should be used instead.
*/
numbro.language = function(key, values) {
console.warn('`language` is deprecated since version 1.6.0. Use `culture` instead');
if (!key) {
return currentCulture;
}
if (key && !values) {
if (!languages[key]) {
throw new Error('Unknown language : ' + key);
}
chooseCulture(key);
}
if (values || !languages[key]) {
setCulture(key, values);
}
return numbro;
};
/**
* This function will load cultures and then set the global culture. If
* no arguments are passed in, it will simply return the current global
* culture code.
*/
numbro.culture = function(code, values) {
if (!code) {
return currentCulture;
}
if (code && !values) {
if (!cultures[code]) {
throw new Error('Unknown culture : ' + code);
}
chooseCulture(code);
}
if (values || !cultures[code]) {
setCulture(code, values);
}
return numbro;
};
/**
* This function provides access to the loaded language data. If
* no arguments are passed in, it will simply return the current
* global language object.
*
* @deprecated Since in version 1.6.0. It will be deleted in version 2.0
* `culture` should be used instead.
*/
numbro.languageData = function(key) {
console.warn('`languageData` is deprecated since version 1.6.0. Use `cultureData` instead');
if (!key) {
return languages[currentCulture];
}
if (!languages[key]) {
throw new Error('Unknown language : ' + key);
}
return languages[key];
};
/**
* This function provides access to the loaded culture data. If
* no arguments are passed in, it will simply return the current
* global culture object.
*/
numbro.cultureData = function(code) {
if (!code) {
return cultures[currentCulture];
}
if (!cultures[code]) {
throw new Error('Unknown culture : ' + code);
}
return cultures[code];
};
numbro.culture('en-US', enUS);
/**
* @deprecated Since in version 1.6.0. It will be deleted in version 2.0
* `cultures` should be used instead.
*/
numbro.languages = function() {
console.warn('`languages` is deprecated since version 1.6.0. Use `cultures` instead');
return languages;
};
numbro.cultures = function() {
return cultures;
};
numbro.zeroFormat = function(format) {
zeroFormat = typeof(format) === 'string' ? format : null;
};
numbro.defaultFormat = function(format) {
defaultFormat = typeof(format) === 'string' ? format : '0.0';
};
numbro.defaultCurrencyFormat = function (format) {
defaultCurrencyFormat = typeof(format) === 'string' ? format : '0$';
};
numbro.validate = function(val, culture) {
var _decimalSep,
_thousandSep,
_currSymbol,
_valArray,
_abbrObj,
_thousandRegEx,
cultureData,
temp;
//coerce val to string
if (typeof val !== 'string') {
val += '';
if (console.warn) {
console.warn('Numbro.js: Value is not string. It has been co-erced to: ', val);
}
}
//trim whitespaces from either sides
val = val.trim();
//replace the initial '+' or '-' sign if present
val = val.replace(/^[+-]?/, '');
//if val is just digits return true
if ( !! val.match(/^\d+$/)) {
return true;
}
//if val is empty return false
if (val === '') {
return false;
}
//get the decimal and thousands separator from numbro.cultureData
try {
//check if the culture is understood by numbro. if not, default it to current culture
cultureData = numbro.cultureData(culture);
} catch (e) {
cultureData = numbro.cultureData(numbro.culture());
}
//setup the delimiters and currency symbol based on culture
_currSymbol = cultureData.currency.symbol;
_abbrObj = cultureData.abbreviations;
_decimalSep = cultureData.delimiters.decimal;
if (cultureData.delimiters.thousands === '.') {
_thousandSep = '\\.';
} else {
_thousandSep = cultureData.delimiters.thousands;
}
// validating currency symbol
temp = val.match(/^[^\d\.\,]+/);
if (temp !== null) {
val = val.substr(1);
if (temp[0] !== _currSymbol) {
return false;
}
}
//validating abbreviation symbol
temp = val.match(/[^\d]+$/);
if (temp !== null) {
val = val.slice(0, -1);
if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million &&
temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {
return false;
}
}
_thousandRegEx = new RegExp(_thousandSep + '{2}');
if (!val.match(/[^\d.,]/g)) {
_valArray = val.split(_decimalSep);
if (_valArray.length > 2) {
return false;
} else {
if (_valArray.length < 2) {
return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx));
} else {
if (_valArray[0] === '') {
// for values without leading zero eg. .984
return (!_valArray[0].match(_thousandRegEx) &&
!!_valArray[1].match(/^\d+$/));
} else if (_valArray[0].length === 1) {
return ( !! _valArray[0].match(/^\d+$/) &&
!_valArray[0].match(_thousandRegEx) &&
!! _valArray[1].match(/^\d+$/));
} else {
return ( !! _valArray[0].match(/^\d+.*\d$/) &&
!_valArray[0].match(_thousandRegEx) &&
!! _valArray[1].match(/^\d+$/));
}
}
}
}
return false;
};
/**
* * @deprecated Since in version 1.6.0. It will be deleted in version 2.0
* `loadCulturesInNode` should be used instead.
*/
numbro.loadLanguagesInNode = function() {
console.warn('`loadLanguagesInNode` is deprecated since version 1.6.0. Use `loadCulturesInNode` instead');
numbro.loadCulturesInNode();
};
numbro.loadCulturesInNode = function() {
// TODO: Rename the folder in 2.0.0
var cultures = __webpack_require__(362);
for(var langLocaleCode in cultures) {
if(langLocaleCode) {
numbro.culture(langLocaleCode, cultures[langLocaleCode]);
}
}
};
/************************************
Helpers
************************************/
function setCulture(code, values) {
cultures[code] = values;
}
function chooseCulture(code) {
currentCulture = code;
var defaults = cultures[code].defaults;
if (defaults && defaults.format) {
numbro.defaultFormat(defaults.format);
}
if (defaults && defaults.currencyFormat) {
numbro.defaultCurrencyFormat(defaults.currencyFormat);
}
}
function inNodejsRuntime() {
return (typeof process !== 'undefined') &&
(process.browser === undefined) &&
process.title &&
(
process.title.indexOf('node') !== -1 ||
process.title.indexOf('meteor-tool') > 0 ||
process.title === 'grunt' ||
process.title === 'gulp'
) &&
("function" !== 'undefined');
}
/************************************
Floating-point helpers
************************************/
// The floating-point helper functions and implementation
// borrows heavily from sinful.js: http://guipn.github.io/sinful.js/
/**
* Array.prototype.reduce for browsers that don't support it
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce#Compatibility
*/
if ('function' !== typeof Array.prototype.reduce) {
Array.prototype.reduce = function(callback, optInitialValue) {
if (null === this || 'undefined' === typeof this) {
// At the moment all modern browsers, that support strict mode, have
// native implementation of Array.prototype.reduce. For instance, IE8
// does not support strict mode, so this check is actually useless.
throw new TypeError('Array.prototype.reduce called on null or undefined');
}
if ('function' !== typeof callback) {
throw new TypeError(callback + ' is not a function');
}
var index,
value,
length = this.length >>> 0,
isValueSet = false;
if (1 < arguments.length) {
value = optInitialValue;
isValueSet = true;
}
for (index = 0; length > index; ++index) {
if (this.hasOwnProperty(index)) {
if (isValueSet) {
value = callback(value, this[index], index, this);
} else {
value = this[index];
isValueSet = true;
}
}
}
if (!isValueSet) {
throw new TypeError('Reduce of empty array with no initial value');
}
return value;
};
}
/**
* Computes the multiplier necessary to make x >= 1,
* effectively eliminating miscalculations caused by
* finite precision.
*/
function multiplier(x) {
var parts = x.toString().split('.');
if (parts.length < 2) {
return 1;
}
return Math.pow(10, parts[1].length);
}
/**
* Given a variable number of arguments, returns the maximum
* multiplier that must be used to normalize an operation involving
* all of them.
*/
function correctionFactor() {
var args = Array.prototype.slice.call(arguments);
return args.reduce(function(prev, next) {
var mp = multiplier(prev),
mn = multiplier(next);
return mp > mn ? mp : mn;
}, -Infinity);
}
/************************************
Numbro Prototype
************************************/
numbro.fn = Numbro.prototype = {
clone: function() {
return numbro(this);
},
format: function(inputString, roundingFunction) {
return formatNumbro(this,
inputString ? inputString : defaultFormat,
(roundingFunction !== undefined) ? roundingFunction : Math.round
);
},
formatCurrency: function(inputString, roundingFunction) {
return formatCurrency(this,
cultures[currentCulture].currency.symbol,
inputString ? inputString : defaultCurrencyFormat,
(roundingFunction !== undefined) ? roundingFunction : Math.round
);
},
formatForeignCurrency: function(currencySymbol, inputString, roundingFunction) {
return formatForeignCurrency(this,
currencySymbol,
inputString ? inputString : defaultCurrencyFormat,
(roundingFunction !== undefined) ? roundingFunction : Math.round
);
},
unformat: function(inputString) {
if (typeof inputString === 'number') {
return inputString;
} else if (typeof inputString === 'string') {
var result = unformatNumbro(this, inputString);
// Any unparseable string (represented as NaN in the result) is
// converted into undefined.
return isNaN(result) ? undefined : result;
} else {
return undefined;
}
},
binaryByteUnits: function() {
return formatByteUnits(this._value, bytes.binary.suffixes, bytes.binary.scale).suffix;
},
byteUnits: function() {
return formatByteUnits(this._value, bytes.general.suffixes, bytes.general.scale).suffix;
},
decimalByteUnits: function() {
return formatByteUnits(this._value, bytes.decimal.suffixes, bytes.decimal.scale).suffix;
},
value: function() {
return this._value;
},
valueOf: function() {
return this._value;
},
set: function(value) {
this._value = Number(value);
return this;
},
add: function(value) {
var corrFactor = correctionFactor.call(null, this._value, value);
function cback(accum, curr) {
return accum + corrFactor * curr;
}
this._value = [this._value, value].reduce(cback, 0) / corrFactor;
return this;
},
subtract: function(value) {
var corrFactor = correctionFactor.call(null, this._value, value);
function cback(accum, curr) {
return accum - corrFactor * curr;
}
this._value = [value].reduce(cback, this._value * corrFactor) / corrFactor;
return this;
},
multiply: function(value) {
function cback(accum, curr) {
var corrFactor = correctionFactor(accum, curr),
result = accum * corrFactor;
result *= curr * corrFactor;
result /= corrFactor * corrFactor;
return result;
}
this._value = [this._value, value].reduce(cback, 1);
return this;
},
divide: function(value) {
function cback(accum, curr) {
var corrFactor = correctionFactor(accum, curr);
return (accum * corrFactor) / (curr * corrFactor);
}
this._value = [this._value, value].reduce(cback);
return this;
},
difference: function(value) {
return Math.abs(numbro(this._value).subtract(value).value());
}
};
/************************************
Exposing Numbro
************************************/
if (inNodejsRuntime()) {
//Todo: Rename the folder in 2.0.0
numbro.loadCulturesInNode();
}
// CommonJS module is defined
if (hasModule) {
module.exports = numbro;
} else {
/*global ender:false */
if (typeof ender === 'undefined') {
// here, `this` means `window` in the browser, or `global` on the server
// add `numbro` as a global object via a string identifier,
// for Closure Compiler 'advanced' mode
this.numbro = numbro;
}
/*global define:false */
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() {
return numbro;
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
}
}.call(typeof window === 'undefined' ? this : window));
/*** EXPORTS FROM exports-to-window-loader ***/
window['numbro'] = __webpack_require__(305);
/***/ }),
/* 306 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getNormalizedDate = getNormalizedDate;
/* eslint-disable import/prefer-default-export */
/**
* Get normalized Date object for the ISO formatted date strings.
* Natively, the date object parsed from a ISO 8601 string will be offsetted by the timezone difference, which may result in returning a wrong date.
* See: Github issue #3338.
*
* @param {String} dateString String representing the date.
* @returns {Date} The proper Date object.
*/
function getNormalizedDate(dateString) {
var nativeDate = new Date(dateString);
// NaN if dateString is not in ISO format
if (!isNaN(new Date(dateString + "T00:00").getDate())) {
// Compensate timezone offset
return new Date(nativeDate.getTime() + nativeDate.getTimezoneOffset() * 60000);
}
return nativeDate;
}
/***/ }),
/* 307 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* SheetClip - Spreadsheet Clipboard Parser
* version 0.2
*
* This tiny library transforms JavaScript arrays to strings that are pasteable by LibreOffice, OpenOffice,
* Google Docs and Microsoft Excel.
*
* Copyright 2012, Marcin Warpechowski
* Licensed under the MIT license.
* http://github.com/warpech/sheetclip/
*/
/*jslint white: true*/
(function (global) {
"use strict";
function countQuotes(str) {
return str.split('"').length - 1;
}
var SheetClip = {
/**
* Decode spreadsheet string into array
*
* @param {String} str
* @returns {Array}
*/
parse: function parse(str) {
var r,
rLen,
rows,
arr = [],
a = 0,
c,
cLen,
multiline,
last;
rows = str.split('\n');
if (rows.length > 1 && rows[rows.length - 1] === '') {
rows.pop();
}
for (r = 0, rLen = rows.length; r < rLen; r += 1) {
rows[r] = rows[r].split('\t');
for (c = 0, cLen = rows[r].length; c < cLen; c += 1) {
if (!arr[a]) {
arr[a] = [];
}
if (multiline && c === 0) {
last = arr[a].length - 1;
arr[a][last] = arr[a][last] + '\n' + rows[r][0];
if (multiline && countQuotes(rows[r][0]) & 1) {
//& 1 is a bitwise way of performing mod 2
multiline = false;
arr[a][last] = arr[a][last].substring(0, arr[a][last].length - 1).replace(/""/g, '"');
}
} else {
if (c === cLen - 1 && rows[r][c].indexOf('"') === 0 && countQuotes(rows[r][c]) & 1) {
arr[a].push(rows[r][c].substring(1).replace(/""/g, '"'));
multiline = true;
} else {
arr[a].push(rows[r][c].replace(/""/g, '"'));
multiline = false;
}
}
}
if (!multiline) {
a += 1;
}
}
return arr;
},
/**
* Encode array into valid spreadsheet string
*
* @param arr
* @returns {String}
*/
stringify: function stringify(arr) {
var r,
rLen,
c,
cLen,
str = '',
val;
for (r = 0, rLen = arr.length; r < rLen; r += 1) {
cLen = arr[r].length;
for (c = 0; c < cLen; c += 1) {
if (c > 0) {
str += '\t';
}
val = arr[r][c];
if (typeof val === 'string') {
if (val.indexOf('\n') > -1) {
str += '"' + val.replace(/"/g, '""') + '"';
} else {
str += val;
}
} else if (val === null || val === void 0) {
// void 0 resolves to undefined
str += '';
} else {
str += val;
}
}
if (r !== rLen - 1) {
str += '\n';
}
}
return str;
}
};
if (true) {
exports.parse = SheetClip.parse;
exports.stringify = SheetClip.stringify;
} else {
global.SheetClip = SheetClip;
}
})(window);
/***/ }),
/* 308 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.RecordTranslator = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
exports.registerIdentity = registerIdentity;
exports.getTranslator = getTranslator;
var _core = __webpack_require__(84);
var _core2 = _interopRequireDefault(_core);
var _object = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class RecordTranslator
* @util
*/
var RecordTranslator = function () {
function RecordTranslator(hot) {
_classCallCheck(this, RecordTranslator);
this.hot = hot;
}
/**
* Translate physical row index into visual.
*
* @param {Number} row Physical row index.
* @returns {Number} Returns visual row index.
*/
_createClass(RecordTranslator, [{
key: 'toVisualRow',
value: function toVisualRow(row) {
return this.hot.runHooks('unmodifyRow', row);
}
/**
* Translate physical column index into visual.
*
* @param {Number} column Physical column index.
* @returns {Number} Returns visual column index.
*/
}, {
key: 'toVisualColumn',
value: function toVisualColumn(column) {
return this.hot.runHooks('unmodifyCol', column);
}
/**
* Translate physical coordinates into visual. Can be passed as separate 2 arguments (row, column) or as an object in first
* argument with `row` and `column` keys.
*
* @param {Number|Object} row Physical coordinates or row index.
* @param {Number} [column] Physical column index.
* @returns {Object|Array} Returns an object with visual records or an array if coordinates passed as separate arguments.
*/
}, {
key: 'toVisual',
value: function toVisual(row, column) {
var result = void 0;
if ((0, _object.isObject)(row)) {
result = {
row: this.toVisualRow(row.row),
column: this.toVisualColumn(row.column)
};
} else {
result = [this.toVisualRow(row), this.toVisualColumn(column)];
}
return result;
}
/**
* Translate visual row index into physical.
*
* @param {Number} row Visual row index.
* @returns {Number} Returns physical row index.
*/
}, {
key: 'toPhysicalRow',
value: function toPhysicalRow(row) {
return this.hot.runHooks('modifyRow', row);
}
/**
* Translate visual column index into physical.
*
* @param {Number} column Visual column index.
* @returns {Number} Returns physical column index.
*/
}, {
key: 'toPhysicalColumn',
value: function toPhysicalColumn(column) {
return this.hot.runHooks('modifyCol', column);
}
/**
* Translate visual coordinates into physical. Can be passed as separate 2 arguments (row, column) or as an object in first
* argument with `row` and `column` keys.
*
* @param {Number|Object} row Visual coordinates or row index.
* @param {Number} [column] Visual column index.
* @returns {Object|Array} Returns an object with physical records or an array if coordinates passed as separate arguments.
*/
}, {
key: 'toPhysical',
value: function toPhysical(row, column) {
var result = void 0;
if ((0, _object.isObject)(row)) {
result = {
row: this.toPhysicalRow(row.row),
column: this.toPhysicalColumn(row.column)
};
} else {
result = [this.toPhysicalRow(row), this.toPhysicalColumn(column)];
}
return result;
}
}]);
return RecordTranslator;
}();
exports.RecordTranslator = RecordTranslator;
var identities = new WeakMap();
var translatorSingletons = new WeakMap();
function registerIdentity(identity, hot) {
identities.set(identity, hot);
}
function getTranslator(identity) {
var singleton = void 0;
if (!(identity instanceof _core2.default)) {
if (!identities.has(identity)) {
throw Error('Record translator was not registered for this object identity');
}
identity = identities.get(identity);
}
if (translatorSingletons.has(identity)) {
singleton = translatorSingletons.get(identity);
} else {
singleton = new RecordTranslator(identity);
translatorSingletons.set(identity, singleton);
}
return singleton;
}
/***/ }),
/* 309 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.registerAsRootInstance = registerAsRootInstance;
exports.hasValidParameter = hasValidParameter;
exports.isRootInstance = isRootInstance;
var holder = exports.holder = new WeakMap();
var rootInstanceSymbol = exports.rootInstanceSymbol = Symbol('rootInstance');
/**
* Register an object as a root instance.
*
* @param {Object} object An object to associate with root instance flag.
*/
function registerAsRootInstance(object) {
holder.set(object, true);
}
/**
* Check if the source of the root indication call is valid.
*
* @param {Symbol} rootSymbol A symbol as a source of truth.
* @return {Boolean}
*/
function hasValidParameter(rootSymbol) {
return rootSymbol === rootInstanceSymbol;
}
/**
* Check if passed an object was flagged as a root instance.
*
* @param {Object} object An object to check.
* @return {Boolean}
*/
function isRootInstance(object) {
return holder.has(object);
}
/***/ }),
/* 310 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _mixed = __webpack_require__(17);
var _object = __webpack_require__(1);
/**
* @alias Options
* @constructor
* @description
* ## Constructor options
*
* Constructor options are applied using an object literal passed as a second argument to the Handsontable constructor.
*
* ```js
* var hot = new Handsontable(document.getElementById('example1'), {
* data: myArray,
* width: 400,
* height: 300
* });
* ```
*
* ---
* ## Cascading configuration
*
* Handsontable 0.9 and newer is using *Cascading Configuration*, which is a fast way to provide configuration options
* for the entire table, including its columns and particular cells.
*
* Consider the following example:
* ```js
* var hot = new Handsontable(document.getElementById('example'), {
* readOnly: true,
* columns: [
* {readOnly: false},
* {},
* {}
* ],
* cells: function (row, col, prop) {
* var cellProperties = {};
*
* if (row === 0 && col === 0) {
* cellProperties.readOnly = true;
* }
*
* return cellProperties;
* }
* });
* ```
*
* The above notation will result in all TDs being *read only*, except for first column TDs which will be *editable*, except for the TD in top left corner which will still be *read only*.
*
* ### The Cascading Configuration model
*
* ##### 1. Constructor
*
* Configuration options that are provided using first-level `handsontable(container, {option: "value"})` and `updateSettings` method.
*
* ##### 2. Columns
*
* Configuration options that are provided using second-level object `handsontable(container, {columns: {option: "value"}]})`
*
* ##### 3. Cells
*
* Configuration options that are provided using third-level function `handsontable(container, {cells: function: (row, col, prop){ }})`
*
* ---
* ## Architecture performance
*
* The Cascading Configuration model is based on prototypical inheritance. It is much faster and memory efficient compared
* to the previous model that used jQuery extend. See: [http://jsperf.com/extending-settings](http://jsperf.com/extending-settings).
*
* ---
* __Important notice:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.
*/
function DefaultSettings() {};
DefaultSettings.prototype = {
/**
* License key for commercial version of Handsontable.
*
* @pro
* @type {String}
* @default 'trial'
*/
licenseKey: 'trial',
/**
* @description
* Initial data source that will be bound to the data grid __by reference__ (editing data grid alters the data source).
* Can be declared as an Array of Arrays, Array of Objects or a Function.
*
* See [Understanding binding as reference](http://docs.handsontable.com/tutorial-data-binding.html#page-reference).
*
* @type {Array|Function}
* @default undefined
*/
data: void 0,
/**
* @description
* Defines the structure of a new row when data source is an array of objects.
*
* See [data-schema](http://docs.handsontable.com/tutorial-data-sources.html#page-data-schema) for examples.
*
* @type {Object}
* @default undefined
*/
dataSchema: void 0,
/**
* Width of the grid. Can be a value or a function that returns a value.
*
* @type {Number|Function}
* @default undefined
*/
width: void 0,
/**
* Height of the grid. Can be a number or a function that returns a number.
*
* @type {Number|Function}
* @default undefined
*/
height: void 0,
/**
* @description
* Initial number of rows.
*
* __Notice:__ This option only has effect in Handsontable constructor and only if `data` option is not provided
*
* @type {Number}
* @default 5
*/
startRows: 5,
/**
* @description
* Initial number of columns.
*
* __Notice:__ This option only has effect in Handsontable constructor and only if `data` option is not provided
*
* @type {Number}
* @default 5
*/
startCols: 5,
/**
* Setting `true` or `false` will enable or disable the default row headers (1, 2, 3).
* You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.
* If a function is set the index of the row is passed as a parameter.
*
* @type {Boolean|Array|Function}
* @default null
* @example
* ```js
* ...
* // as boolean
* rowHeaders: true,
* ...
*
* ...
* // as array
* rowHeaders: [1, 2, 3],
* ...
*
* ...
* // as function
* rowHeaders: function(index) {
* return index + ': AB';
* },
* ...
* ```
*/
rowHeaders: void 0,
/**
* Setting `true` or `false` will enable or disable the default column headers (A, B, C).
* You can also define an array `['One', 'Two', 'Three', ...]` or a function to define the headers.
* If a function is set, then the index of the column is passed as a parameter.
*
* @type {Boolean|Array|Function}
* @default null
* @example
* ```js
* ...
* // as boolean
* colHeaders: true,
* ...
*
* ...
* // as array
* colHeaders: ['A', 'B', 'C'],
* ...
*
* ...
* // as function
* colHeaders: function(index) {
* return index + ': AB';
* },
* ...
* ```
*/
colHeaders: null,
/**
* Defines column widths in pixels. Accepts number, string (that will be converted to a number),
* array of numbers (if you want to define column width separately for each column) or a
* function (if you want to set column width dynamically on each render).
*
* @type {Array|Function|Number|String}
* @default undefined
* @example
* ```js
* ...
* // as numeric, for each column.
* colWidths: 100,
* ...
*
* * ...
* // as string, for each column.
* colWidths: '100px',
* ...
*
* ...
* // as array, based on visual indexes. The rest of the columns have a default width.
* colWidths: [100, 120, 90],
* ...
*
* ...
* // as function, based on visual indexes.
* colWidths: function(index) {
* return index * 10;
* },
* ...
* ```
*/
colWidths: void 0,
/**
* Defines row heights in pixels. Accepts numbers, strings (that will be converted into a number),
* array of numbers (if you want to define row height separately for each row) or a
* function (if you want to set row height dynamically on each render).
* If the ManualRowResize or AutoRowSize plugins are enabled, this is also the minimum height that can be set
* via either of those two plugins.
* Height should be equal or greater than 23px. Table is rendered incorrectly if height is less than 23px.
*
* @type {Array|Function|Number|String}
* @default undefined
* @example
* ```js
* ...
* // as numeric, for each row.
* rowHeights: 100,
* ...
*
* * ...
* // as string, for each row.
* rowHeights: '100px',
* ...
*
* ...
* // as array, based on visual indexes. The rest of the rows have a default height.
* rowHeights: [100, 120, 90],
* ...
*
* ...
* // as function, based on visual indexes.
* rowHeights: function(index) {
* return index * 10;
* },
* ...
* ```
*/
rowHeights: void 0,
/**
* @description
* Defines the cell properties and data binding for certain columns.
*
* __Notice:__ Using this option sets a fixed number of columns (options `startCols`, `minCols`, `maxCols` will be ignored).
*
* See [documentation -> datasources.html](http://docs.handsontable.com/tutorial-data-sources.html#page-nested) for examples.
*
* @type {Array|Function}
* @default undefined
* @example
* ```js
* ...
* // as an array of objects. Order of the objects in array is representation of physical indexes.
* columns: [
* {
* // column options for the first column
* type: 'numeric',
* numericFormat: {
* pattern: '0,0.00 $'
* }
* },
* {
* // column options for the second column
* type: 'text',
* readOnly: true
* }
* ],
* ...
*
* // or as function, based on physical indexes
* ...
* columns: function(index) {
* return {
* type: index > 0 ? 'numeric' : 'text',
* readOnly: index < 1
* }
* }
* ...
* ```
*/
columns: void 0,
/**
* @description
* Defines the cell properties for given `row`, `col`, `prop` coordinates.
* Any constructor or column option may be overwritten for a particular cell (row/column combination)
* using the `cells` property in the Handsontable constructor.
*
* __Note:__ Parameters `row` and `col` always represent __physical indexes__. Example below show how to execute
* operations based on the __visual__ representation of Handsontable.
*
* Possible values of `prop`:
* - property name for column's data source object, when dataset is an [array of objects](/tutorial-data-sources.html#page-object)
* - the same number as `col`, when dataset is an [array of arrays](/tutorial-data-sources.html#page-array)
*
* @type {Function}
* @default undefined
* @example
* ```js
* ...
* cells: function (row, col, prop) {
* var cellProperties = {};
* var visualRowIndex = this.instance.toVisualRow(row);
* var visualColIndex = this.instance.toVisualColumn(col);
*
* if (visualRowIndex === 0 && visualColIndex === 0) {
* cellProperties.readOnly = true;
* }
*
* return cellProperties;
* },
* ...
* ```
*/
cells: void 0,
/**
* Any constructor or column option may be overwritten for a particular cell (row/column combination), using `cell`
* array passed to the Handsontable constructor.
*
* @type {Array}
* @default []
* @example
* ```js
* ...
* cell: [
* {row: 0, col: 0, readOnly: true}
* ],
* ...
* ```
*/
cell: [],
/**
* @description
* If `true`, enables the {@link Comments} plugin, which enables an option to apply cell comments through the context menu
* (configurable with context menu keys `commentsAddEdit`, `commentsRemove`).
*
* To initialize Handsontable with predefined comments, provide cell coordinates and comment text values in a form of an array.
*
* See [Comments](http://docs.handsontable.com/demo-comments_.html) demo for examples.
*
* @since 0.11.0
* @type {Boolean|Array}
* @default false
* @example
* ```js
* ...
* comments: [{row: 1, col: 1, comment: {value: "Test comment"}}],
* ...
* ```
*/
comments: false,
/**
* @description
* If `true`, enables the Custom Borders plugin, which enables an option to apply custom borders through the context menu (configurable with context menu key `borders`).
*
* To initialize Handsontable with predefined custom borders, provide cell coordinates and border styles in a form of an array.
*
* See [Custom Borders](http://docs.handsontable.com/demo-custom-borders.html) demo for examples.
*
* @since 0.11.0
* @type {Boolean|Array}
* @default false
* @example
* ```js
* ...
* customBorders: [
* {range: {
* from: {row: 1, col: 1},
* to: {row: 3, col: 4}},
* left: {},
* right: {},
* top: {},
* bottom: {}
* }
* ],
* ...
*
* // or
* ...
* customBorders: [
* {row: 2, col: 2, left: {width: 2, color: 'red'},
* right: {width: 1, color: 'green'}, top: '', bottom: ''}
* ],
* ...
* ```
*/
customBorders: false,
/**
* Minimum number of rows. At least that number of rows will be created during initialization.
*
* @type {Number}
* @default 0
*/
minRows: 0,
/**
* Minimum number of columns. At least that number of columns will be created during initialization.
*
* @type {Number}
* @default 0
*/
minCols: 0,
/**
* Maximum number of rows. If set to a value lower than the initial row count, the data will be trimmed to the provided value as the number of rows.
*
* @type {Number}
* @default Infinity
*/
maxRows: Infinity,
/**
* Maximum number of cols. If set to a value lower than the initial col count, the data will be trimmed to the provided value as the number of cols.
*
* @type {Number}
* @default Infinity
*/
maxCols: Infinity,
/**
* When set to 1 (or more), Handsontable will add a new row at the end of grid if there are no more empty rows.
* (unless the number of rows exceeds the one set in the `maxRows` property)
*
* @type {Number}
* @default 0
*/
minSpareRows: 0,
/**
* When set to 1 (or more), Handsontable will add a new column at the end of grid if there are no more empty columns.
* (unless the number of rows exceeds the one set in the `maxCols` property)
*
* @type {Number}
* @default 0
*/
minSpareCols: 0,
/**
* If set to `false`, there won't be an option to insert new rows in the Context Menu.
*
* @type {Boolean}
* @default true
*/
allowInsertRow: true,
/**
* If set to `false`, there won't be an option to insert new columns in the Context Menu.
*
* @type {Boolean}
* @default true
*/
allowInsertColumn: true,
/**
* If set to `false`, there won't be an option to remove rows in the Context Menu.
*
* @type {Boolean}
* @default true
*/
allowRemoveRow: true,
/**
* If set to `false`, there won't be an option to remove columns in the Context Menu.
*
* @type {Boolean}
* @default true
*/
allowRemoveColumn: true,
/**
* If true, selection of multiple cells using keyboard or mouse is allowed.
*
* @type {Boolean}
* @default true
*/
multiSelect: true,
/**
* Enables the fill handle (drag-down and copy-down) functionality, which shows a small rectangle in bottom
* right corner of the selected area, that let's you expand values to the adjacent cells.
*
* Possible values: `true` (to enable in all directions), `'vertical'` or `'horizontal'` (to enable in one direction),
* `false` (to disable completely). Setting to `true` enables the fillHandle plugin.
*
* Since 0.23.0 you can pass object to plugin which allows you to add more options for this functionality. If `autoInsertRow`
* option is `true`, fill-handler will create new rows till it reaches the last row. It is enabled by default.
*
* @example
* ```js
* ...
* fillHandle: true // enable plugin in all directions and with autoInsertRow as true
* ...
* // or
* ...
* fillHandle: 'vertical' // enable plugin in vertical direction and with autoInsertRow as true
* ...
* // or
* ...
* fillHandle: { // enable plugin in both directions and with autoInsertRow as false
* autoInsertRow: false,
* }
* // or
* ...
* fillHandle: { // enable plugin in vertical direction and with autoInsertRow as false
* autoInsertRow: false,
* direction: 'vertical' // 'vertical' or 'horizontal'
* }
* ```
*
* @type {Boolean|String|Object}
* @default true
*/
fillHandle: true,
/**
* Allows to specify the number of fixed (or *frozen*) rows at the top of the table.
*
* @type {Number}
* @default 0
* @example
* ```js
* fixedRowsTop: 3 // This would freeze the top 3 rows of the table.
* ```
*/
fixedRowsTop: 0,
/**
* Allows to specify the number of fixed (or *frozen*) rows at the bottom of the table.
*
* @pro
* @type {Number}
* @default 0
* @example
* ```js
* fixedRowsBottom: 3 // This would freeze the top 3 rows of the table.
* ```
*/
fixedRowsBottom: 0,
/**
* Allows to specify the number of fixed (or *frozen*) columns on the left of the table.
*
* @type {Number}
* @default 0
* @example
* ```js
* fixedColumnsLeft: 3 // This would freeze the top 3 rows of the table.
* ```
*/
fixedColumnsLeft: 0,
/**
* If `true`, mouse click outside the grid will deselect the current selection.
* Can be a function that takes the click event target and returns a boolean.
*
* @type {Boolean|Function}
* @default true
*/
outsideClickDeselects: true,
/**
* If `true`, <kbd>ENTER</kbd> begins editing mode (like in Google Docs). If `false`, <kbd>ENTER</kbd> moves to next
* row (like Excel) and adds a new row if necessary. <kbd>TAB</kbd> adds new column if necessary.
*
* @type {Boolean}
* @default true
*/
enterBeginsEditing: true,
/**
* Defines the cursor movement after <kbd>ENTER</kbd> was pressed (<kbd>SHIFT</kbd> + <kbd>ENTER</kbd> uses a negative vector).
* Can be an object or a function that returns an object. The event argument passed to the function
* is a DOM Event object received after the <kbd>ENTER</kbd> key has been pressed. This event object can be used to check
* whether user pressed <kbd>ENTER</kbd> or <kbd>SHIFT</kbd> + <kbd>ENTER</kbd>.
*
* @type {Object|Function}
* @default {row: 1, col: 0}
*/
enterMoves: { row: 1, col: 0 },
/**
* Defines the cursor movement after <kbd>TAB</kbd> is pressed (<kbd>SHIFT</kbd> + <kbd>TAB</kbd> uses a negative vector).
* Can be an object or a function that returns an object. The event argument passed to the function
* is a DOM Event object received after the <kbd>TAB</kbd> key has been pressed. This event object can be used to check
* whether user pressed <kbd>TAB</kbd> or <kbd>SHIFT</kbd> + <kbd>TAB</kbd>.
*
* @type {Object}
* @default {row: 0, col: 1}
*/
tabMoves: { row: 0, col: 1 },
/**
* If `true`, pressing <kbd>TAB</kbd> or right arrow in the last column will move to first column in next row.
*
* @type {Boolean}
* @default false
*/
autoWrapRow: false,
/**
* If `true`, pressing <kbd>ENTER</kbd> or down arrow in the last row will move to the first row in the next column.
*
* @type {Boolean}
* @default false
*/
autoWrapCol: false,
/**
* @description
* Turns on saving the state of column sorting, column positions and column sizes in local storage.
*
* You can save any sort of data in local storage to preserve table state between page reloads.
* In order to enable data storage mechanism, `persistentState` option must be set to `true` (you can set it
* either during Handsontable initialization or using the `updateSettings` method). When `persistentState` is enabled it exposes 3 hooks:
*
* __persistentStateSave__ (key: String, value: Mixed)
*
* * Saves value under given key in browser local storage.
*
* __persistentStateLoad__ (key: String, valuePlaceholder: Object)
*
* * Loads `value`, saved under given key, form browser local storage. The loaded `value` will be saved in `valuePlaceholder.value`
* (this is due to specific behaviour of `Hooks.run()` method). If no value have been saved under key `valuePlaceholder.value`
* will be `undefined`.
*
* __persistentStateReset__ (key: String)
*
* * Clears the value saved under `key`. If no `key` is given, all values associated with table will be cleared.
*
* __Note:__ The main reason behind using `persistentState` hooks rather than regular LocalStorage API is that it
* ensures separation of data stored by multiple Handsontable instances. In other words, if you have two (or more)
* instances of Handsontable on one page, data saved by one instance won't be accessible by the second instance.
* Those two instances can store data under the same key and no data would be overwritten.
*
* __Important:__ In order for the data separation to work properly, make sure that each instance of Handsontable has a unique `id`.
*
* @type {Boolean}
* @default false
*/
persistentState: void 0,
/**
* Class name for all visible rows in the current selection.
*
* @type {String}
* @default undefined
* @example
* ```js
* currentRowClassName: 'currentRow' // This will add a 'currentRow' class name to appropriate table cells.
* ```
*/
currentRowClassName: void 0,
/**
* Class name for all visible columns in the current selection.
*
* @type {String}
* @default undefined
* @example
* ```js
* currentColClassName: 'currentColumn' // This will add a 'currentColumn' class name to appropriate table cells.
* ```
*/
currentColClassName: void 0,
/**
* Class name for all visible headers in current selection.
*
* @type {String}
* @since 0.27.0
* @default 'ht__highlight'
* @example
* ```js
* currentHeaderClassName: 'ht__highlight' // This will add a 'ht__highlight' class name to appropriate table headers.
* ```
*/
currentHeaderClassName: 'ht__highlight',
/**
* Class name for the Handsontable container element.
*
* @type {String|Array}
* @default undefined
*/
className: void 0,
/**
* Class name for all tables inside container element.
*
* @since 0.17.0
* @type {String|Array}
* @default undefined
*/
tableClassName: void 0,
/**
* @description
* Defines how the columns react, when the declared table width is different than the calculated sum of all column widths.
* [See more](http://docs.handsontable.com/demo-stretching.html) mode. Possible values:
* * `'none'` Disable stretching
* * `'last'` Stretch only the last column
* * `'all'` Stretch all the columns evenly
*
* @type {String}
* @default 'none'
*/
stretchH: 'none',
/**
* Lets you overwrite the default `isEmptyRow` method, which checks if row at the provided index is empty.
*
* @type {Function}
* @param {Number} row Visual row index.
* @returns {Boolean}
*/
isEmptyRow: function isEmptyRow(row) {
var col, colLen, value, meta;
for (col = 0, colLen = this.countCols(); col < colLen; col++) {
value = this.getDataAtCell(row, col);
if (value !== '' && value !== null && (0, _mixed.isDefined)(value)) {
if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
meta = this.getCellMeta(row, col);
return (0, _object.isObjectEquals)(this.getSchema()[meta.prop], value);
}
return false;
}
}
return true;
},
/**
* Lets you overwrite the default `isEmptyCol` method, which checks if column at the provided index is empty.
*
* @type {Function}
* @param {Number} col Visual column index
* @returns {Boolean}
*/
isEmptyCol: function isEmptyCol(col) {
var row, rowLen, value;
for (row = 0, rowLen = this.countRows(); row < rowLen; row++) {
value = this.getDataAtCell(row, col);
if (value !== '' && value !== null && (0, _mixed.isDefined)(value)) {
return false;
}
}
return true;
},
/**
* When set to `true`, the table is re-rendered when it is detected that it was made visible in DOM.
*
* @type {Boolean}
* @default true
*/
observeDOMVisibility: true,
/**
* If set to `true`, Handsontable will accept values that were marked as invalid by the cell `validator`.
* It will result with *invalid* cells being treated as *valid* (will save the *invalid* value into the Handsontable data source).
* If set to `false`, Handsontable will *not* accept the invalid values and won't allow the user to close the editor.
* This option will be particularly useful when used with the Autocomplete's `strict` mode.
*
* @type {Boolean}
* @default true
* @since 0.9.5
*/
allowInvalid: true,
/**
* If set to `true`, Handsontable will accept values that are empty (`null`, `undefined` or `''`).
* If set to `false`, Handsontable will *not* accept the empty values and mark cell as invalid.
*
* @example
* ```js
* ...
* allowEmpty: true // allow empty values for all cells (whole table)
* ...
* // or
* ...
* columns: [
* // allow empty values only for 'date' column
* {data: 'date', dateFormat: 'DD/MM/YYYY', allowEmpty: true}
* ]
* ...
* ```
*
* @type {Boolean}
* @default true
* @since 0.23.0
*/
allowEmpty: true,
/**
* CSS class name for cells that did not pass validation.
*
* @type {String}
* @default 'htInvalid'
*/
invalidCellClassName: 'htInvalid',
/**
* When set to an non-empty string, displayed as the cell content for empty cells. If a value of a different type is provided,
* it will be stringified and applied as a string.
*
* @type {Mixed}
* @default false
*/
placeholder: false,
/**
* CSS class name for cells that have a placeholder in use.
*
* @type {String}
* @default 'htPlaceholder'
*/
placeholderCellClassName: 'htPlaceholder',
/**
* CSS class name for read-only cells.
*
* @type {String}
* @default 'htDimmed'
*/
readOnlyCellClassName: 'htDimmed',
/**
* @description
* If a string is provided, it may be one of the following predefined values:
* * `autocomplete`,
* * `checkbox`,
* * `html`,
* * `numeric`,
* * `password`.
* * `text`.
*
* Or you can [register](http://docs.handsontable.com/demo-custom-renderers.html) the custom renderer under specified name and use
* its name as an alias in your configuration.
*
* If a function is provided, it will receive the following arguments:
* ```js
* function(instance, TD, row, col, prop, value, cellProperties) {}
* ```
*
* You can read more about custom renderes [in the documentation](http://docs.handsontable.com/demo-custom-renderers.html).
*
* @example
* ```js
* ...
* Handsontable.renderers.registerRenderer('my.renderer', function(instance, TD, row, col, prop, value, cellProperties) {
* TD.innerHTML = value;
* });
* ...
* columns: [
* {
* editor: 'select',
* renderer: 'autocomplete' // as string
* },
* {
* renderer: 'my.renderer' // custom renderer as an alias
* },
* {
* // renderer as custom function
* renderer: function(hotInstance, TD, row, col, prop, value, cellProperties) {
* TD.style.color = 'blue';
* TD.innerHTML = value;
* }
* }
* ]
* ...
* ```
*
* @type {String|Function}
* @default undefined
*/
renderer: void 0,
/**
* CSS class name added to the commented cells.
*
* @type {String}
* @default 'htCommentCell'
*/
commentedCellClassName: 'htCommentCell',
/**
* If set to `true`, it enables the browser's native selection of a fragment of the text within a single cell, between adjacent cells or in a whole table.
* If set to `'cell'`, it enables the possibility of selecting a fragment of the text within a single cell's body.
*
* @type {Boolean|String}
* @default false
*/
fragmentSelection: false,
/**
* @description
* Make cell [read only](http://docs.handsontable.com/demo-read-only.html).
*
* @type {Boolean}
* @default false
*/
readOnly: false,
/**
* @description
* When added to a `column` property, it skips the column on paste and pastes the data on the next column to the right.
*
* @type {Boolean}
* @default false
*/
skipColumnOnPaste: false,
/**
* @description
* Setting to true enables the search plugin (see [demo](http://docs.handsontable.com/demo-search-for-values.html)).
*
* @type {Boolean}
* @default false
*/
search: false,
/**
* @description
* Shortcut to define the combination of the cell renderer, editor and validator for the column, cell or whole table.
*
* Possible values:
* * [autocomplete](http://docs.handsontable.com/demo-autocomplete.html)
* * [checkbox](http://docs.handsontable.com/demo-checkbox.html)
* * [date](http://docs.handsontable.com/demo-date.html)
* * [dropdown](http://docs.handsontable.com/demo-dropdown.html)
* * [handsontable](http://docs.handsontable.com/demo-handsontable.html)
* * [numeric](http://docs.handsontable.com/demo-numeric.html)
* * [password](http://docs.handsontable.com/demo-password.html)
* * text
* * [time](http://docs.handsontable.com/demo-time.html)
*
* Or you can register the custom cell type under specified name and use
* its name as an alias in your configuration.
*
* @example
* ```js
* ...
* Handsontable.cellTypes.registerCellType('my.type', {
* editor: MyEditorClass,
* renderer: function(hot, td, row, col, prop, value, cellProperties) {
* td.innerHTML = value;
* },
* validator: function(value, callback) {
* callback(value === 'foo' ? true : false);
* }
* });
* ...
* columns: [
* {
* type: 'text'
* },
* {
* type: 'my.type' // an alias to custom type
* },
* {
* type: 'checkbox'
* }
* ]
* ...
* ```
*
* @type {String}
* @default 'text'
*/
type: 'text',
/**
* @description
* Make cell copyable (pressing <kbd>CTRL</kbd> + <kbd>C</kbd> on your keyboard moves its value to system clipboard).
*
* __Note:__ this setting is `false` by default for cells with type `password`.
*
* @type {Boolean}
* @default true
* @since 0.10.2
*/
copyable: true,
/**
* Defines the editor for the table/column/cell.
*
* If a string is provided, it may be one of the following predefined values:
* * [autocomplete](http://docs.handsontable.com/demo-autocomplete.html)
* * [checkbox](http://docs.handsontable.com/demo-checkbox.html)
* * [date](http://docs.handsontable.com/demo-date.html)
* * [dropdown](http://docs.handsontable.com/demo-dropdown.html)
* * [handsontable](http://docs.handsontable.com/demo-handsontable.html)
* * [mobile](http://docs.handsontable.com/demo-mobiles-and-tablets.html)
* * [password](http://docs.handsontable.com/demo-password.html)
* * [select](http://docs.handsontable.com/demo-select.html)
* * text
*
* Or you can [register](http://docs.handsontable.com/tutorial-cell-editor.html#registering-an-editor) the custom editor under specified name and use
* its name as an alias in your configuration.
*
* To disable cell editing completely set `editor` property to `false`.
*
* @example
* ```js
* ...
* columns: [
* {
* editor: 'select'
* },
* {
* editor: false
* }
* ]
* ...
* ```
*
* @type {String|Function|Boolean}
* @default 'text'
*/
editor: void 0,
/**
* @description
* Autocomplete definitions. See [autocomplete demo](http://docs.handsontable.com/demo-autocomplete.html) for examples and definitions.
*
* @type {Array}
* @default undefined
*/
autoComplete: void 0,
/**
* Control number of choices for the autocomplete (or dropdown) typed cells. After exceeding it, a scrollbar for the dropdown list of choices will appear.
*
* @since 0.18.0
* @type {Number}
* @default 10
*/
visibleRows: 10,
/**
* Makes autocomplete or dropdown width the same as the edited cell width. If `false` then editor will be scaled
* according to its content.
*
* @since 0.17.0
* @type {Boolean}
* @default true
*/
trimDropdown: true,
/**
* Setting to true enables the debug mode, currently used to test the correctness of the row and column
* header fixed positioning on a layer above the master table.
*
* @type {Boolean}
* @default false
*/
debug: false,
/**
* When set to `true`, the text of the cell content is wrapped if it does not fit in the fixed column width.
*
* @type {Boolean}
* @default true
* @since 0.11.0
*/
wordWrap: true,
/**
* CSS class name added to cells with cell meta `wordWrap: false`.
*
* @type {String}
* @default 'htNoWrap'
* @since 0.11.0
*/
noWordWrapClassName: 'htNoWrap',
/**
* @description
* Defines if the right-click context menu should be enabled. Context menu allows to create new row or
* column at any place in the grid among [other features](http://docs.handsontable.com/demo-context-menu.html).
* Possible values:
* * `true` (to enable default options),
* * `false` (to disable completely)
* * an array of [predefined options](https://docs.handsontable.com/demo-context-menu.html#page-specific),
* * an object [with defined structure](http://docs.handsontable.com/demo-context-menu.html#page-custom)
*
* See [the context menu demo](http://docs.handsontable.com/demo-context-menu.html) for examples.
*
* @example
* ```js
* ...
* // as a boolean
* contextMenu: true
* ...
* // as an array
* contextMenu: ['row_above', 'row_below', '--------', 'undo', 'redo']
* ...
* ```
* ...
* // as an object (`name` attribute is required in the custom keys)
* contextMenu: {
* items: {
* "option1": {
* name: "option1"
* },
* "option2": {
* name: "option2",
* submenu: {
* items: [
* {
* key: "option2:suboption1",
* name: "option2:suboption1",
* callback: function(key, options) {
* ...
* }
* },
* ...
* ]
* }
* }
* }
* }
* ...
* ```
* @type {Boolean|Array|Object}
* @default undefined
*/
contextMenu: void 0,
/**
* @description
* Disable or enable the copy/paste functionality.
*
* @example
* ```js
* ...
* copyPaste: false,
* ...
* ```
*
* @type {Boolean}
* @default true
*/
copyPaste: true,
/**
* If `true`, undo/redo functionality is enabled.
*
* @type {Boolean}
* @default undefined
*/
undo: void 0,
/**
* @description
* Turns on [Column sorting](http://docs.handsontable.com/demo-sorting-data.html).
* Can be either a boolean (true/false) or an object with a declared sorting options. See the below example:
*
* @example
* ```js
* ...
* // as boolean
* columnSorting: true
* ...
* // as a object with initial order (sort ascending column at index 2)
* columnSorting: {
* column: 2,
* sortOrder: true, // true = ascending, false = descending, undefined = original order
* sortEmptyCells: true // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table
* }
* ...
* ```
*
* @type {Boolean|Object}
* @default undefined
*/
columnSorting: void 0,
/**
* @description
* Turns on [Manual column move](http://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial
* column order, if set to an array of column indexes.
*
* @example
* ```js
* ...
* // as boolean
* manualColumnMove: true
* ...
* // as a array with initial order (move column index at 0 to 1 and move column index at 1 to 4)
* manualColumnMove: [1, 4]
* ...
* ```
*
* @type {Boolean|Array}
* @default undefined
*/
manualColumnMove: void 0,
/**
* @description
* Turns on [Manual column resize](http://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial
* column resized widths, if set to an array of numbers.
*
* @example
* ```js
* ...
* // as boolean
* manualColumnResize: true
* ...
* // as a array with initial widths (column at 0 index has 40px and column at 1 index has 50px)
* manualColumnResize: [40, 50]
* ...
* ```
*
* @type {Boolean|Array}
* @default undefined
*/
manualColumnResize: void 0,
/**
* @description
* Turns on [Manual row move](http://docs.handsontable.com/demo-moving-rows-and-columns.html), if set to a boolean or define initial
* row order, if set to an array of row indexes.
*
* @example
* ```js
* ...
* // as boolean
* manualRowMove: true
* ...
* // as a array with initial order (move row index at 0 to 1 and move row index at 1 to 4)
* manualRowMove: [1, 4]
* ...
* ```
*
* @type {Boolean|Array}
* @default undefined
* @since 0.11.0
*/
manualRowMove: void 0,
/**
* @description
* Turns on [Manual row resize](http://docs.handsontable.com/demo-resizing.html), if set to a boolean or define initial
* row resized heights, if set to an array of numbers.
*
* @example
* ```js
* ...
* // as boolean
* manualRowResize: true
* ...
* // as a array with initial heights (row at 0 index has 40px and row at 1 index has 50px)
* manualRowResize: [40, 50]
* ...
* ```
*
* @type {Boolean|Array}
* @default undefined
* @since 0.11.0
*/
manualRowResize: void 0,
/**
* @description
* If set to `true`, it enables a possibility to merge cells. If set to an array of objects, it merges the cells provided in the objects (see the example below).
* [More information on the demo page.](http://docs.handsontable.com/demo-merge-cells.html)
*
* @example
* ```js
* // enables the mergeCells plugin:
* margeCells: true
* ...
* // declares a list of merged sections:
* mergeCells: [
* {row: 1, col: 1, rowspan: 3, colspan: 3}, // rowspan and colspan properties declare the width and height of a merged section in cells
* {row: 3, col: 4, rowspan: 2, colspan: 2},
* {row: 5, col: 6, rowspan: 3, colspan: 3}
* ]
* ```
* @type {Boolean|Array}
* @default false
*/
mergeCells: false,
/**
* Number of rows to be rendered outside of the visible part of the table.
* By default, it's set to `'auto'`, which makes Handsontable to attempt to calculate the best offset performance-wise.
*
* You may test out different values to find the best one that works for your specific implementation.
*
* @type {Number|String}
* @default 'auto'
*/
viewportRowRenderingOffset: 'auto',
/**
* Number of columns to be rendered outside of the visible part of the table.
* By default, it's set to `'auto'`, which makes Handsontable try calculating the best offset performance-wise.
*
* You may experiment with the value to find the one that works best for your specific implementation.
*
* @type {Number|String}
* @default 'auto'
*/
viewportColumnRenderingOffset: 'auto',
/**
* A function, regular expression or a string, which will be used in the process of cell validation.
* If a function is used, be sure to execute the callback argument with either `true` (`callback(true)`) if the validation passed
* or with `false` (`callback(false)`), if the validation failed.
* Note, that `this` in the function points to the `cellProperties` object.
*
* If a string is provided, it may be one of the following predefined values:
* * `autocomplete`,
* * `date`,
* * `numeric`,
* * `time`.
*
* Or you can [register](http://docs.handsontable.com/demo-data-validation.html) the validator function under specified name and use
* its name as an alias in your configuration.
*
* See more [in the demo](http://docs.handsontable.com/demo-data-validation.html).
*
* @example
* ```js
* // as a function
* columns: [
* {
* validator: function(value, callback) { // validation rules }
* }
* ]
* ...
* // as a regexp
* columns: [
* {
* validator: /^[0-9]$/ // regular expression
* }
* ]
* // as a string
* columns: [
* {
* validator: 'numeric'
* }
* ]
* ```
* @type {Function|RegExp|String}
* @default undefined
* @since 0.9.5
*/
validator: void 0,
/**
* @description
* Disable visual cells selection.
*
* Possible values:
* * `true` - Disables any type of visual selection (current and area selection),
* * `false` - Enables any type of visual selection. This is default value.
* * `current` - Disables the selection of a currently selected cell, the area selection is still present.
* * `area` - Disables the area selection, the currently selected cell selection is still present.
*
* @type {Boolean|String|Array}
* @default false
* @since 0.13.2
* @example
* ```js
* ...
* // as boolean
* disableVisualSelection: true,
* ...
*
* ...
* // as string ('current' or 'area')
* disableVisualSelection: 'current',
* ...
*
* ...
* // as array
* disableVisualSelection: ['current', 'area'],
* ...
* ```
*/
disableVisualSelection: false,
/**
* @description
* Set whether to display the current sorting order indicator (a triangle icon in the column header, specifying the sorting order).
*
* @type {Boolean}
* @default false
* @since 0.15.0-beta3
*/
sortIndicator: void 0,
/**
* Disable or enable ManualColumnFreeze plugin.
*
* @type {Boolean}
* @default false
*/
manualColumnFreeze: void 0,
/**
* @description
* Defines whether Handsontable should trim the whitespace at the beginning and the end of the cell contents.
*
* @type {Boolean}
* @default true
*/
trimWhitespace: true,
settings: void 0,
/**
* @description
* Defines data source for Autocomplete or Dropdown cell types.
*
* @example
* ```js
* ...
* // source as a array
* columns: [{
* type: 'autocomplete',
* source: ['A', 'B', 'C', 'D']
* }]
* ...
* // source as a function
* columns: [{
* type: 'autocomplete',
* source: function(query, callback) {
* fetch('http://example.com/query?q=' + query, function(response) {
* callback(response.items);
* })
* }
* }]
* ...
* ```
*
* @type {Array|Function}
* @default undefined
*/
source: void 0,
/**
* @description
* Defines the column header name.
*
* @example
* ```js
* ...
* columns: [{
* title: 'First name',
* type: 'text',
* },
* {
* title: 'Last name',
* type: 'text',
* }]
* ...
* ```
*
* @type {String}
* @default undefined
*/
title: void 0,
/**
* Data template for `'checkbox'` type when checkbox is checked.
*
* @example
* ```js
* checkedTemplate: 'good'
*
* // if a checkbox-typed cell is checked, then getDataAtCell(x,y), where x and y are the coordinates of the cell
* // will return 'good'.
* ```
* @type {Boolean|String}
* @default true
*/
checkedTemplate: void 0,
/**
* Data template for `'checkbox'` type when checkbox is unchecked.
*
* @example
* ```js
* uncheckedTemplate: 'bad'
*
* // if a checkbox-typed cell is not checked, then getDataAtCell(x,y), where x and y are the coordinates of the cell
* // will return 'bad'.
* ```
* @type {Boolean|String}
* @default false
*/
uncheckedTemplate: void 0,
/**
* @description
* Object which describes if renderer should create checkbox element with label element as a parent. Option desired for
* [checkbox](http://docs.handsontable.com/demo-checkbox.html)-typed cells.
*
* By default the [checkbox](http://docs.handsontable.com/demo-checkbox.html) renderer renders the checkbox without a label.
*
* Possible object properties:
* * `property` - Defines the property name of the data object, which will to be used as a label.
* (eg. `label: {property: 'name.last'}`). This option works only if data was passed as an array of objects.
* * `position` - String which describes where to place the label text (before or after checkbox element).
* Valid values are `'before'` and '`after`' (defaults to `'after'`).
* * `value` - String or a Function which will be used as label text.
*
* @example
* ```js
* ...
* columns: [{
* type: 'checkbox',
* label: {position: 'after', value: 'My label: '}
* }]
* ...
* ```
*
* @since 0.19.0
* @type {Object}
* @default undefined
*/
label: void 0,
/**
* Display format. This option is desired for [numeric-typed](http://docs.handsontable.com/demo-numeric.html) cells. Format is described by two properties:
*
* - pattern, which is handled by `numbro` for purpose of formatting numbers to desired pattern. List of supported patterns can be found [here](http://numbrojs.com/format.html#numbers).
* - culture, which is handled by `numbro` for purpose of formatting currencies. Examples showing how it works can be found [here](http://numbrojs.com/format.html#currency). List of supported cultures can be found [here](http://numbrojs.com/languages.html#supported-languages).
*
* __Note:__ Please keep in mind that this option is used only to format the displayed output! It has no effect on the input data provided for the cell. The numeric data can be entered to the table only as floats (separated by a dot or a comma) or integers, and are stored in the source dataset as JavaScript numbers.
*
* Since 0.26.0 Handsontable uses [numbro](http://numbrojs.com/) as a main library for numbers formatting.
*
* @example
* ```js
* ...
* columns: [{
* type: 'numeric',
* numericFormat: {
* pattern: '0,00',
* culture: 'en-US'
* }
* }]
* ...
* ```
*
* @since 0.35.0
* @type {Object}
*/
numericFormat: void 0,
/**
* Language for Handsontable translation. Possible language codes are: `en-US`, `pl-PL`.
*
* @type {String}
* @default 'en-US'
*/
language: void 0,
/**
* @description
* Data source for [select](http://docs.handsontable.com/demo-select.html)-typed cells.
*
* @example
* ```js
* ...
* columns: [{
* editor: 'select',
* selectOptions: ['A', 'B', 'C'],
* }]
* ...
* ```
*
* @type {Array}
*/
selectOptions: void 0,
/**
* Enables or disables the autoColumnSize plugin. Default value is `undefined`, which has the same effect as `true`.
* Disabling this plugin can increase performance, as no size-related calculations would be done.
*
* Column width calculations are divided into sync and async part. Each of this parts has their own advantages and
* disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't
* block the browser UI.
*
* To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.
* `syncLimit` option is available since 0.16.0.
*
* You can also use the `useHeaders` option to take the column headers with into calculation.
*
* @example
* ```js
* ...
* // as a number (300 columns in sync, rest async)
* autoColumnSize: {syncLimit: 300},
* ...
*
* ...
* // as a string (percent)
* autoColumnSize: {syncLimit: '40%'},
* ...
*
* ...
* // use headers width while calculation the column width
* autoColumnSize: {useHeaders: true},
* ...
*
* ```
*
* @type {Object|Boolean}
* @default {syncLimit: 50}
*/
autoColumnSize: void 0,
/**
* Enables or disables autoRowSize plugin. Default value is `undefined`, which has the same effect as `false` (disabled).
* Enabling this plugin can decrease performance, as size-related calculations would be performed.
*
* Row height calculations are divided into sync and async stages. Each of these stages has their own advantages and
* disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't
* block the browser UI.
*
* To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value.
* `syncLimit` options is available since 0.16.0.
*
* @example
* ```js
* ...
* // as number (300 columns in sync, rest async)
* autoRowSize: {syncLimit: 300},
* ...
*
* ...
* // as string (percent)
* autoRowSize: {syncLimit: '40%'},
* ...
* ```
* @type {Object|Boolean}
* @default {syncLimit: 1000}
*/
autoRowSize: void 0,
/**
* Date validation format.
*
* Option desired for `'date'` - typed cells.
*
* @example
* ```js
* ...
* columns: [{
* type: 'date',
* dateFormat: 'MM/DD/YYYY'
* }]
* ...
* ```
*
* @type {String}
* @default 'DD/MM/YYYY'
*/
dateFormat: void 0,
/**
* If `true` then dates will be automatically formatted to match the desired format.
*
* Option desired for `'date'`-typed typed cells.
*
* @example
* ```js
* ...
* columns: [{
* type: 'date',
* dateFormat: 'YYYY-MM-DD',
* correctFormat: true
* }]
* ...
* ```
*
* @type {Boolean}
* @default false
*/
correctFormat: false,
/**
* Definition of default value which will fill the empty cells.
*
* Option desired for `'date'`-typed cells.
*
* @example
* ```js
* ...
* columns: [{
* type: 'date',
* defaultData: '2015-02-02'
* }]
* ...
* ```
*
* @type {String}
*/
defaultDate: void 0,
/**
* If set to `true`, the value entered into the cell must match (case-sensitive) the autocomplete source. Otherwise, cell won't pass the validation.
* When filtering the autocomplete source list, the editor will be working in case-insensitive mode.
*
* Option desired for `autocomplete`-typed cells.
*
* @example
* ```js
* ...
* columns: [{
* type: 'autocomplete',
* source: ['A', 'B', 'C'],
* strict: true
* }]
* ...
* ```
*
* @type {Boolean}
*/
strict: void 0,
/**
* @description
* If typed `true`, data defined in `source` of the autocomplete or dropdown cell will be treated as HTML.
*
* __Warning:__ Enabling this option can cause serious XSS vulnerabilities.
*
* Option desired for `'autocomplete'`-typed cells.
* @example
* ```js
* ...
* columns: [{
* type: 'autocomplete',
* allowHtml: true,
* source: ['<b>foo</b>', '<b>bar</b>']
* }]
* ...
* ```
* @type {Boolean}
* @default false
*/
allowHtml: false,
/**
* If typed `true` then virtual rendering mechanism for handsontable will be disabled.
*
* @type {Boolean}
*/
renderAllRows: void 0,
/**
* Prevents table to overlap outside the parent element. If `'horizontal'` option is chosen then table will appear horizontal
* scrollbar in case where parent's width is narrower then table's width.
*
* Possible values:
* * `false` - Disables functionality (Default option).
* * `horizontal` - Prevents horizontal overflow table.
* * `vertical` - Prevents vertical overflow table (Not implemented yet).
*
* @since 0.20.3
* @example
* ```js
* ...
* preventOverflow: 'horizontal'
* ...
* ```
*
* @type {String|Boolean}
*/
preventOverflow: false,
/**
* @description
* Plugin allowing binding the table rows with their headers.
* If the plugin is enabled, the table row headers will "stick" to the rows, when they are hidden/moved. Basically, if at the initialization
* row 0 has a header titled "A", it will have it no matter what you do with the table.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|String}
* @example
*
* ```js
* ...
* var hot = new Handsontable(document.getElementById('example'), {
* date: getData(),
* bindRowsWithHeaders: true
* });
* ...
* ```
*
*/
bindRowsWithHeaders: void 0,
/**
* @description
* The CollapsibleColumns plugin allows collapsing of columns, covered by a header with the `colspan` property defined.
*
* Clicking the "collapse/expand" button collapses (or expands) all "child" headers except the first one.
*
* Setting the `collapsibleColumns` property to `true` will display a "collapse/expand" button in every header with a defined
* `colspan` property.
*
* To limit this functionality to a smaller group of headers, define the `collapsibleColumns` property as an array of objects, as in
* the example below.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Array}
* @example
* ```js
* ...
* collapsibleColumns: [
* {row: -4, col: 1, collapsible: true},
* {row: -3, col: 5, collapsible: true}
* ]
* ...
* // or
* ...
* collapsibleColumns: true
* ...
* ```
*/
collapsibleColumns: void 0,
/**
* @description
* Allows making pre-defined calculations on the cell values and display the results within Handsontable.
* See the demo for more information.
*
* @pro
* @since 1.0.0-beta1
* @type {Object}
*/
columnSummary: void 0,
/**
* This plugin allows adding a configurable dropdown menu to the table's column headers.
* The dropdown menu acts like the Context Menu, but is triggered by clicking the button in the header.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Object|Array}
*/
dropdownMenu: void 0,
/**
* The filters plugin.
* It allows filtering the table data either by the built-in component or with the API.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean}
*/
filters: void 0,
/**
* It allows Handsontable to process formula expressions defined in the provided data.
*
* @pro
* @since 1.7.0
* @type {Boolean}
*/
formulas: void 0,
/**
* @description
* GanttChart plugin enables a possibility to create a Gantt chart using a Handsontable instance.
* In this case, the whole table becomes read-only.
*
* @pro
* @since 1.0.0-beta1
* @type {Object}
*/
ganttChart: void 0,
/**
* @description
* Allows adding a tooltip to the table headers.
*
* Available options:
* * the `rows` property defines if tooltips should be added to row headers,
* * the `columns` property defines if tooltips should be added to column headers,
* * the `onlyTrimmed` property defines if tooltips should be added only to headers, which content is trimmed by the header itself (the content being wider then the header).
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Object}
*/
headerTooltips: void 0,
/**
* Plugin allowing hiding of certain columns.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Object}
*/
hiddenColumns: void 0,
/**
* @description
* Plugin allowing hiding of certain rows.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Object}
*/
hiddenRows: void 0,
/**
* @description
* Allows creating a nested header structure, using the HTML's colspan attribute.
*
* @pro
* @since 1.0.0-beta1
* @type {Array}
*/
nestedHeaders: void 0,
/**
* @description
* Plugin allowing hiding of certain rows.
*
* @pro
* @since 1.0.0-beta1
* @type {Boolean|Array}
*/
trimRows: void 0,
/**
* @description
* Allows setting a custom width of the row headers. You can provide a number or an array of widths, if many row header levels are defined.
*
* @since 0.22.0
* @type {Number|Array}
*/
rowHeaderWidth: void 0,
/**
* @description
* Allows setting a custom height of the column headers. You can provide a number or an array of heights, if many column header levels are defined.
*
* @since 0.22.0
* @type {Number|Array}
*/
columnHeaderHeight: void 0,
/**
* @description
* Enabling this plugin switches table into one-way data binding where changes are applied into data source (from outside table)
* will be automatically reflected in the table.
*
* For every data change [afterChangesObserved](Hooks.html#event:afterChangesObserved) hook will be fired.
*
* @type {Boolean}
* @default false
*/
observeChanges: void 0,
/**
* @description
* When passed to the `column` property, allows specifying a custom sorting function for the desired column.
*
* @since 0.24.0
* @type {Function}
* @example
* ```js
* columns: [
* {
* sortFunction: function(sortOrder) {
* return function(a, b) {
* // sorting function body.
* //
* // Function parameters:
* // sortOrder: If true, the order is ascending, if false - descending. undefined = original order
* // a, b: Two compared elements. These are 2-element arrays, with the first element being the row index, the second - cell value.
* }
* }
* }
* ]
* ```
*/
sortFunction: void 0,
/**
* If defined as 'true', the Autocomplete's suggestion list would be sorted by relevance (the closer to the left the match is, the higher the suggestion).
*
* Option desired for cells of the `'autocomplete'` type.
*
* @type {Boolean}
* @default true
*/
sortByRelevance: true,
/**
* If defined as 'true', when the user types into the input area the Autocomplete's suggestion list is updated to only
* include those choices starting with what has been typed; if defined as 'false' all suggestions remain shown, with
* those matching what has been typed marked in bold.
*
* @type {Boolean}
* @default true
*/
filter: true,
/**
* If defined as 'true', filtering in the Autocomplete Editor will be case-sensitive.
*
* @type {Boolean}
* @default: false
*/
filteringCaseSensitive: false,
/**
* @description
* Disable or enable the drag to scroll functionality.
*
* @example
* ```js
* ...
* dragToScroll: false,
* ...
* ```
*
* @type {Boolean}
* @default true
*/
dragToScroll: true
};
exports.default = DefaultSettings;
/***/ }),
/* 311 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getTranslatedPhrase = getTranslatedPhrase;
var _array = __webpack_require__(2);
var _dictionariesManager = __webpack_require__(67);
var _phraseFormatters = __webpack_require__(385);
var _mixed = __webpack_require__(17);
/**
* Get phrase for specified dictionary key.
*
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.
* @param {String} dictionaryKey Constant which is dictionary key.
* @param {*} argumentsForFormatters Arguments which will be handled by formatters.
*
* @returns {String}
*/
// eslint-disable-next-line import/prefer-default-export
function getTranslatedPhrase(languageCode, dictionaryKey, argumentsForFormatters) {
var languageDictionary = (0, _dictionariesManager.getLanguageDictionary)(languageCode);
if (languageDictionary === null) {
return null;
}
var phrasePropositions = languageDictionary[dictionaryKey];
if ((0, _mixed.isUndefined)(phrasePropositions)) {
return null;
}
var formattedPhrase = getFormattedPhrase(phrasePropositions, argumentsForFormatters);
if (Array.isArray(formattedPhrase)) {
return formattedPhrase[0];
}
return formattedPhrase;
}
/**
* Get formatted phrase from phrases propositions for specified dictionary key.
*
* @private
* @param {Array|string} phrasePropositions List of phrase propositions.
* @param {*} argumentsForFormatters Arguments which will be handled by formatters.
*
* @returns {Array|string}
*/
function getFormattedPhrase(phrasePropositions, argumentsForFormatters) {
var formattedPhrasePropositions = phrasePropositions;
(0, _array.arrayEach)((0, _phraseFormatters.getPhraseFormatters)(), function (formatter) {
formattedPhrasePropositions = formatter(phrasePropositions, argumentsForFormatters);
});
return formattedPhrasePropositions;
}
/***/ }),
/* 312 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _templateObject = _taggedTemplateLiteral(['Language with code "', '" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.'], ['Language with code "', '" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.']);
exports.extendNotExistingKeys = extendNotExistingKeys;
exports.createCellHeadersRange = createCellHeadersRange;
exports.normalizeLanguageCode = normalizeLanguageCode;
exports.applyLanguageSetting = applyLanguageSetting;
exports.warnUserAboutLanguageRegistration = warnUserAboutLanguageRegistration;
var _mixed = __webpack_require__(17);
var _object = __webpack_require__(1);
var _templateLiteralTag = __webpack_require__(294);
var _dictionariesManager = __webpack_require__(67);
function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
/**
* Perform shallow extend of a target object with only this extension's properties which doesn't exist in the target.
*
* @param {Object} target An object that will receive the new properties.
* @param {Object} extension An object containing additional properties to merge into the target.
*/
// TODO: Maybe it should be moved to global helpers? It's changed `extend` function.
function extendNotExistingKeys(target, extension) {
(0, _object.objectEach)(extension, function (value, key) {
if ((0, _mixed.isUndefined)(target[key])) {
target[key] = value;
}
});
return target;
}
/**
* Create range of values basing on cell indexes. For example, it will create below ranges for specified function arguments:
*
* createCellHeadersRange(2, 7) => `2-7`
* createCellHeadersRange(7, 2) => `2-7`
* createCellHeadersRange(0, 4, 'A', 'D') => `A-D`
* createCellHeadersRange(4, 0, 'D', 'A') => `A-D`
*
* @param {number} firstRowIndex Index of "first" cell
* @param {number} nextRowIndex Index of "next" cell
* @param {*} fromValue Value which will represent "first" cell
* @param {*} toValue Value which will represent "next" cell
* @returns {String} Value representing range i.e. A-Z, 11-15.
*/
function createCellHeadersRange(firstRowIndex, nextRowIndex) {
var fromValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : firstRowIndex;
var toValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : nextRowIndex;
// Will swap `fromValue` with `toValue` if it's necessary.
if (firstRowIndex > nextRowIndex) {
var _ref = [toValue, fromValue];
fromValue = _ref[0];
toValue = _ref[1];
}
return fromValue + '-' + toValue;
}
/**
* Normalize language code. It takes handled languageCode proposition and change it to proper languageCode.
* For example, when it takes `eN-us` as parameter it return `en-US`
*
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.
* @returns {String}
*/
function normalizeLanguageCode(languageCode) {
var languageCodePattern = /^([a-zA-Z]{2})-([a-zA-Z]{2})$/;
var partsOfLanguageCode = languageCodePattern.exec(languageCode);
if (partsOfLanguageCode) {
return partsOfLanguageCode[1].toLowerCase() + '-' + partsOfLanguageCode[2].toUpperCase();
}
return languageCode;
}
/**
* Set proper start language code. User may set language code which is not proper.
*
* @param {Object} settings Settings object.
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.
* @returns {String}
*/
function applyLanguageSetting(settings, languageCode) {
var normalizedLanguageCode = normalizeLanguageCode(languageCode);
if ((0, _dictionariesManager.hasLanguageDictionary)(normalizedLanguageCode)) {
settings.language = normalizedLanguageCode;
} else {
settings.language = _dictionariesManager.DEFAULT_LANGUAGE_CODE;
warnUserAboutLanguageRegistration(languageCode);
}
}
/**
*
* Warn user if there is no registered language.
*
* @param {String} languageCode Language code for specific language i.e. 'en-US', 'pt-BR', 'de-DE'.
*/
function warnUserAboutLanguageRegistration(languageCode) {
if ((0, _mixed.isDefined)(languageCode)) {
console.error((0, _templateLiteralTag.toSingleLine)(_templateObject, languageCode));
}
}
/***/ }),
/* 313 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
var _mixed = __webpack_require__(17);
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class SamplesGenerator
* @util
*/
var SamplesGenerator = function () {
_createClass(SamplesGenerator, null, [{
key: 'SAMPLE_COUNT',
/**
* Number of samples to take of each value length.
*
* @type {Number}
*/
get: function get() {
return 3;
}
}]);
function SamplesGenerator(dataFactory) {
_classCallCheck(this, SamplesGenerator);
/**
* Samples prepared for calculations.
*
* @type {Map}
* @default {null}
*/
this.samples = null;
/**
* Function which give the data to collect samples.
*
* @type {Function}
*/
this.dataFactory = dataFactory;
/**
* Custom number of samples to take of each value length.
*
* @type {Number}
* @default {null}
*/
this.customSampleCount = null;
/**
* `true` if duplicate samples collection should be allowed, `false` otherwise.
*
* @type {Boolean}
* @default {false}
*/
this.allowDuplicates = false;
}
/**
* Get the sample count for this instance.
*
* @returns {Number}
*/
_createClass(SamplesGenerator, [{
key: 'getSampleCount',
value: function getSampleCount() {
if (this.customSampleCount) {
return this.customSampleCount;
}
return SamplesGenerator.SAMPLE_COUNT;
}
}, {
key: 'setSampleCount',
/**
* Set the sample count.
*
* @param {Number} sampleCount Number of samples to be collected.
*/
value: function setSampleCount(sampleCount) {
this.customSampleCount = sampleCount;
}
/**
* Set if the generator should accept duplicate values.
*
* @param {Boolean} allowDuplicates `true` to allow duplicate values.
*/
}, {
key: 'setAllowDuplicates',
value: function setAllowDuplicates(allowDuplicates) {
this.allowDuplicates = allowDuplicates;
}
/**
* Generate samples for row. You can control which area should be sampled by passing `rowRange` object and `colRange` object.
*
* @param {Object|Number} rowRange
* @param {Object} colRange
* @returns {Object}
*/
}, {
key: 'generateRowSamples',
value: function generateRowSamples(rowRange, colRange) {
return this.generateSamples('row', colRange, rowRange);
}
/**
* Generate samples for column. You can control which area should be sampled by passing `colRange` object and `rowRange` object.
*
* @param {Object} colRange Column index.
* @param {Object} rowRange Column index.
* @returns {Object}
*/
}, {
key: 'generateColumnSamples',
value: function generateColumnSamples(colRange, rowRange) {
return this.generateSamples('col', rowRange, colRange);
}
/**
* Generate collection of samples.
*
* @param {String} type Type to generate. Can be `col` or `row`.
* @param {Object} range
* @param {Object|Number} specifierRange
* @returns {Map}
*/
}, {
key: 'generateSamples',
value: function generateSamples(type, range, specifierRange) {
var _this = this;
var samples = new Map();
if (typeof specifierRange === 'number') {
specifierRange = { from: specifierRange, to: specifierRange };
}
(0, _number.rangeEach)(specifierRange.from, specifierRange.to, function (index) {
var sample = _this.generateSample(type, range, index);
samples.set(index, sample);
});
return samples;
}
/**
* Generate sample for specified type (`row` or `col`).
*
* @param {String} type Samples type `row` or `col`.
* @param {Object} range
* @param {Number} specifierValue
* @returns {Map}
*/
}, {
key: 'generateSample',
value: function generateSample(type, range, specifierValue) {
var _this2 = this;
var samples = new Map();
var sampledValues = [];
var length = void 0;
(0, _number.rangeEach)(range.from, range.to, function (index) {
var value = void 0;
if (type === 'row') {
value = _this2.dataFactory(specifierValue, index);
} else if (type === 'col') {
value = _this2.dataFactory(index, specifierValue);
} else {
throw new Error('Unsupported sample type');
}
if ((0, _object.isObject)(value)) {
length = Object.keys(value).length;
} else if (Array.isArray(value)) {
length = value.length;
} else {
length = (0, _mixed.stringify)(value).length;
}
if (!samples.has(length)) {
samples.set(length, {
needed: _this2.getSampleCount(),
strings: []
});
}
var sample = samples.get(length);
if (sample.needed) {
var duplicate = sampledValues.indexOf(value) > -1;
if (!duplicate || _this2.allowDuplicates) {
var computedKey = type === 'row' ? 'col' : 'row';
sample.strings.push(_defineProperty({ value: value }, computedKey, index));
sampledValues.push(value);
sample.needed--;
}
}
});
return samples;
}
}]);
return SamplesGenerator;
}();
exports.default = SamplesGenerator;
/***/ }),
/* 314 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
var MIXIN_NAME = 'arrayMapper';
/**
* @type {Object}
*/
var arrayMapper = {
_arrayMap: [],
/**
* Get value by map index.
*
* @param {Number} index Array index.
* @return {*} Returns value mapped to passed index.
*/
getValueByIndex: function getValueByIndex(index) {
var value = void 0;
// eslint-disable-next-line no-cond-assign, no-return-assign
return (value = this._arrayMap[index]) === void 0 ? null : value;
},
/**
* Get map index by its value.
*
* @param {*} value Value to search.
* @returns {Number} Returns array index.
*/
getIndexByValue: function getIndexByValue(value) {
var index = void 0;
// eslint-disable-next-line no-cond-assign, no-return-assign
return (index = this._arrayMap.indexOf(value)) === -1 ? null : index;
},
/**
* Insert new items to array mapper starting at passed index. New entries will be a continuation of last value in the array.
*
* @param {Number} index Array index.
* @param {Number} [amount=1] Defines how many items will be created to an array.
* @returns {Array} Returns added items.
*/
insertItems: function insertItems(index) {
var _this = this;
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var newIndex = (0, _array.arrayMax)(this._arrayMap) + 1;
var addedItems = [];
(0, _number.rangeEach)(amount - 1, function (count) {
addedItems.push(_this._arrayMap.splice(index + count, 0, newIndex + count));
});
return addedItems;
},
/**
* Remove items from array mapper.
*
* @param {Number} index Array index.
* @param {Number} [amount=1] Defines how many items will be created to an array.
* @returns {Array} Returns removed items.
*/
removeItems: function removeItems(index) {
var _this2 = this;
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var removedItems = [];
if (Array.isArray(index)) {
var mapCopy = [].concat(this._arrayMap);
// Sort descending
index.sort(function (a, b) {
return b - a;
});
removedItems = (0, _array.arrayReduce)(index, function (acc, item) {
_this2._arrayMap.splice(item, 1);
return acc.concat(mapCopy.slice(item, item + 1));
}, []);
} else {
removedItems = this._arrayMap.splice(index, amount);
}
return removedItems;
},
/**
* Unshift items (remove and shift chunk of array to the left).
*
* @param {Number|Array} index Array index or Array of indexes to unshift.
* @param {Number} [amount=1] Defines how many items will be removed from an array (when index is passed as number).
*/
unshiftItems: function unshiftItems(index) {
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var removedItems = this.removeItems(index, amount);
function countRowShift(logicalRow) {
// Todo: compare perf between reduce vs sort->each->brake
return (0, _array.arrayReduce)(removedItems, function (count, removedLogicalRow) {
if (logicalRow > removedLogicalRow) {
count++;
}
return count;
}, 0);
}
this._arrayMap = (0, _array.arrayMap)(this._arrayMap, function (logicalRow, physicalRow) {
var rowShift = countRowShift(logicalRow);
if (rowShift) {
logicalRow -= rowShift;
}
return logicalRow;
});
},
/**
* Shift (right shifting) items starting at passed index.
*
* @param {Number} index Array index.
* @param {Number} [amount=1] Defines how many items will be created to an array.
*/
shiftItems: function shiftItems(index) {
var _this3 = this;
var amount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
this._arrayMap = (0, _array.arrayMap)(this._arrayMap, function (row) {
if (row >= index) {
row += amount;
}
return row;
});
(0, _number.rangeEach)(amount - 1, function (count) {
_this3._arrayMap.splice(index + count, 0, index + count);
});
},
/**
* Clear all stored index<->value information from an array.
*/
clearMap: function clearMap() {
this._arrayMap.length = 0;
}
};
(0, _object.defineGetter)(arrayMapper, 'MIXIN_NAME', MIXIN_NAME, {
writable: false,
enumerable: false
});
exports.default = arrayMapper;
/***/ }),
/* 315 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _number = __webpack_require__(6);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var STATE_INITIALIZED = 0;
var STATE_BUILT = 1;
var STATE_APPENDED = 2;
var UNIT = 'px';
/**
* @class
* @private
*/
var BaseUI = function () {
function BaseUI(hotInstance) {
_classCallCheck(this, BaseUI);
/**
* Instance of Handsontable.
*
* @type {Core}
*/
this.hot = hotInstance;
/**
* DOM element representing the ui element.
*
* @type {HTMLElement}
* @private
*/
this._element = null;
/**
* Flag which determines build state of element.
*
* @type {Boolean}
*/
this.state = STATE_INITIALIZED;
}
/**
* Add created UI elements to table.
*
* @param {HTMLElement} wrapper Element which are parent for our UI element.
*/
_createClass(BaseUI, [{
key: 'appendTo',
value: function appendTo(wrapper) {
wrapper.appendChild(this._element);
this.state = STATE_APPENDED;
}
/**
* Method for create UI element. Only create, without append to table.
*/
}, {
key: 'build',
value: function build() {
this._element = document.createElement('div');
this.state = STATE_BUILT;
}
/**
* Method for remove UI element.
*/
}, {
key: 'destroy',
value: function destroy() {
if (this.isAppended()) {
this._element.parentElement.removeChild(this._element);
}
this._element = null;
this.state = STATE_INITIALIZED;
}
/**
* Check if UI element are appended.
*
* @returns {Boolean}
*/
}, {
key: 'isAppended',
value: function isAppended() {
return this.state === STATE_APPENDED;
}
/**
* Check if UI element are built.
*
* @returns {Boolean}
*/
}, {
key: 'isBuilt',
value: function isBuilt() {
return this.state >= STATE_BUILT;
}
/**
* Setter for position.
*
* @param {Number} top New top position of the element.
* @param {Number} left New left position of the element.
*/
}, {
key: 'setPosition',
value: function setPosition(top, left) {
if ((0, _number.isNumeric)(top)) {
this._element.style.top = top + UNIT;
}
if ((0, _number.isNumeric)(left)) {
this._element.style.left = left + UNIT;
}
}
/**
* Getter for the element position.
*
* @returns {Object} Object contains left and top position of the element.
*/
}, {
key: 'getPosition',
value: function getPosition() {
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
};
}
/**
* Setter for the element size.
*
* @param {Number} width New width of the element.
* @param {Number} height New height of the element.
*/
}, {
key: 'setSize',
value: function setSize(width, height) {
if ((0, _number.isNumeric)(width)) {
this._element.style.width = width + UNIT;
}
if ((0, _number.isNumeric)(height)) {
this._element.style.height = height + UNIT;
}
}
/**
* Getter for the element position.
*
* @returns {Object} Object contains height and width of the element.
*/
}, {
key: 'getSize',
value: function getSize() {
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
};
}
/**
* Setter for the element offset. Offset means marginTop and marginLeft of the element.
*
* @param {Number} top New margin top of the element.
* @param {Number} left New margin left of the element.
*/
}, {
key: 'setOffset',
value: function setOffset(top, left) {
if ((0, _number.isNumeric)(top)) {
this._element.style.marginTop = top + UNIT;
}
if ((0, _number.isNumeric)(left)) {
this._element.style.marginLeft = left + UNIT;
}
}
/**
* Getter for the element offset.
*
* @returns {Object} Object contains top and left offset of the element.
*/
}, {
key: 'getOffset',
value: function getOffset() {
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
};
}
}]);
return BaseUI;
}();
exports.default = BaseUI;
/***/ }),
/* 316 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var STATE_INITIALIZED = 0;
var STATE_BUILT = 1;
var STATE_APPENDED = 2;
var UNIT = 'px';
/**
* @class
* @private
*/
var BaseUI = function () {
function BaseUI(hotInstance) {
_classCallCheck(this, BaseUI);
/**
* Instance of Handsontable.
*
* @type {Core}
*/
this.hot = hotInstance;
/**
* DOM element representing the ui element.
*
* @type {HTMLElement}
* @private
*/
this._element = null;
/**
* Flag which determines build state of element.
*
* @type {Boolean}
*/
this.state = STATE_INITIALIZED;
}
/**
* Add created UI elements to table.
*
* @param {HTMLElement} wrapper Element which are parent for our UI element.
*/
_createClass(BaseUI, [{
key: 'appendTo',
value: function appendTo(wrapper) {
wrapper.appendChild(this._element);
this.state = STATE_APPENDED;
}
/**
* Method for create UI element. Only create, without append to table.
*/
}, {
key: 'build',
value: function build() {
this._element = document.createElement('div');
this.state = STATE_BUILT;
}
/**
* Method for remove UI element.
*/
}, {
key: 'destroy',
value: function destroy() {
if (this.isAppended()) {
this._element.parentElement.removeChild(this._element);
}
this._element = null;
this.state = STATE_INITIALIZED;
}
/**
* Check if UI element are appended.
*
* @returns {Boolean}
*/
}, {
key: 'isAppended',
value: function isAppended() {
return this.state === STATE_APPENDED;
}
/**
* Check if UI element are built.
*
* @returns {Boolean}
*/
}, {
key: 'isBuilt',
value: function isBuilt() {
return this.state >= STATE_BUILT;
}
/**
* Setter for position.
*
* @param {Number} top New top position of the element.
* @param {Number} left New left position of the element.
*/
}, {
key: 'setPosition',
value: function setPosition(top, left) {
if (top !== void 0) {
this._element.style.top = top + UNIT;
}
if (left !== void 0) {
this._element.style.left = left + UNIT;
}
}
/**
* Getter for the element position.
*
* @returns {Object} Object contains left and top position of the element.
*/
}, {
key: 'getPosition',
value: function getPosition() {
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
};
}
/**
* Setter for the element size.
*
* @param {Number} width New width of the element.
* @param {Number} height New height of the element.
*/
}, {
key: 'setSize',
value: function setSize(width, height) {
if (width) {
this._element.style.width = width + UNIT;
}
if (height) {
this._element.style.height = height + UNIT;
}
}
/**
* Getter for the element position.
*
* @returns {Object} Object contains height and width of the element.
*/
}, {
key: 'getSize',
value: function getSize() {
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
};
}
/**
* Setter for the element offset. Offset means marginTop and marginLeft of the element.
*
* @param {Number} top New margin top of the element.
* @param {Number} left New margin left of the element.
*/
}, {
key: 'setOffset',
value: function setOffset(top, left) {
if (top) {
this._element.style.marginTop = top + UNIT;
}
if (left) {
this._element.style.marginLeft = left + UNIT;
}
}
/**
* Getter for the element offset.
*
* @returns {Object} Object contains top and left offset of the element.
*/
}, {
key: 'getOffset',
value: function getOffset() {
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
};
}
}]);
return BaseUI;
}();
exports.default = BaseUI;
/***/ }),
/* 317 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* json-patch-duplex.js version: 0.5.7
* (c) 2013 Joachim Wester
* MIT license
*/
var __extends = undefined && undefined.__extends || function (d, b) {
for (var p in b) {
if (b.hasOwnProperty(p)) d[p] = b[p];
}function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var OriginalError = Error;
var jsonpatch;
(function (jsonpatch) {
var _objectKeys = function _objectKeys(obj) {
if (_isArray(obj)) {
var keys = new Array(obj.length);
for (var k = 0; k < keys.length; k++) {
keys[k] = "" + k;
}
return keys;
}
if (Object.keys) {
return Object.keys(obj);
}
var keys = [];
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
keys.push(i);
}
}
return keys;
};
function _equals(a, b) {
switch (typeof a === 'undefined' ? 'undefined' : _typeof(a)) {
case 'undefined': //backward compatibility, but really I think we should return false
case 'boolean':
case 'string':
case 'number':
return a === b;
case 'object':
if (a === null) return b === null;
if (_isArray(a)) {
if (!_isArray(b) || a.length !== b.length) return false;
for (var i = 0, l = a.length; i < l; i++) {
if (!_equals(a[i], b[i])) return false;
}return true;
}
var bKeys = _objectKeys(b);
var bLength = bKeys.length;
if (_objectKeys(a).length !== bLength) return false;
for (var i = 0; i < bLength; i++) {
if (!_equals(a[i], b[i])) return false;
}return true;
default:
return false;
}
}
/* We use a Javascript hash to store each
function. Each hash entry (property) uses
the operation identifiers specified in rfc6902.
In this way, we can map each patch operation
to its dedicated function in efficient way.
*/
/* The operations applicable to an object */
var objOps = {
add: function add(obj, key) {
obj[key] = this.value;
return true;
},
remove: function remove(obj, key) {
delete obj[key];
return true;
},
replace: function replace(obj, key) {
obj[key] = this.value;
return true;
},
move: function move(obj, key, tree) {
var temp = { op: "_get", path: this.from };
apply(tree, [temp]);
apply(tree, [{ op: "remove", path: this.from }]);
apply(tree, [{ op: "add", path: this.path, value: temp.value }]);
return true;
},
copy: function copy(obj, key, tree) {
var temp = { op: "_get", path: this.from };
apply(tree, [temp]);
apply(tree, [{ op: "add", path: this.path, value: temp.value }]);
return true;
},
test: function test(obj, key) {
return _equals(obj[key], this.value);
},
_get: function _get(obj, key) {
this.value = obj[key];
}
};
/* The operations applicable to an array. Many are the same as for the object */
var arrOps = {
add: function add(arr, i) {
arr.splice(i, 0, this.value);
return true;
},
remove: function remove(arr, i) {
arr.splice(i, 1);
return true;
},
replace: function replace(arr, i) {
arr[i] = this.value;
return true;
},
move: objOps.move,
copy: objOps.copy,
test: objOps.test,
_get: objOps._get
};
/* The operations applicable to object root. Many are the same as for the object */
var rootOps = {
add: function add(obj) {
rootOps.remove.call(this, obj);
for (var key in this.value) {
if (this.value.hasOwnProperty(key)) {
obj[key] = this.value[key];
}
}
return true;
},
remove: function remove(obj) {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
objOps.remove.call(this, obj, key);
}
}
return true;
},
replace: function replace(obj) {
apply(obj, [{ op: "remove", path: this.path }]);
apply(obj, [{ op: "add", path: this.path, value: this.value }]);
return true;
},
move: objOps.move,
copy: objOps.copy,
test: function test(obj) {
return JSON.stringify(obj) === JSON.stringify(this.value);
},
_get: function _get(obj) {
this.value = obj;
}
};
var observeOps = {
add: function add(patches, path) {
var patch = {
op: "add",
path: path + escapePathComponent(this.name),
value: this.object[this.name] };
patches.push(patch);
},
'delete': function _delete(patches, path) {
var patch = {
op: "remove",
path: path + escapePathComponent(this.name)
};
patches.push(patch);
},
update: function update(patches, path) {
var patch = {
op: "replace",
path: path + escapePathComponent(this.name),
value: this.object[this.name]
};
patches.push(patch);
}
};
function escapePathComponent(str) {
if (str.indexOf('/') === -1 && str.indexOf('~') === -1) return str;
return str.replace(/~/g, '~0').replace(/\//g, '~1');
}
function _getPathRecursive(root, obj) {
var found;
for (var key in root) {
if (root.hasOwnProperty(key)) {
if (root[key] === obj) {
return escapePathComponent(key) + '/';
} else if (_typeof(root[key]) === 'object') {
found = _getPathRecursive(root[key], obj);
if (found != '') {
return escapePathComponent(key) + '/' + found;
}
}
}
}
return '';
}
function getPath(root, obj) {
if (root === obj) {
return '/';
}
var path = _getPathRecursive(root, obj);
if (path === '') {
throw new OriginalError("Object not found in root");
}
return '/' + path;
}
var beforeDict = [];
var Mirror = function () {
function Mirror(obj) {
this.observers = [];
this.obj = obj;
}
return Mirror;
}();
var ObserverInfo = function () {
function ObserverInfo(callback, observer) {
this.callback = callback;
this.observer = observer;
}
return ObserverInfo;
}();
function getMirror(obj) {
for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {
if (beforeDict[i].obj === obj) {
return beforeDict[i];
}
}
}
function getObserverFromMirror(mirror, callback) {
for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {
if (mirror.observers[j].callback === callback) {
return mirror.observers[j].observer;
}
}
}
function removeObserverFromMirror(mirror, observer) {
for (var j = 0, jlen = mirror.observers.length; j < jlen; j++) {
if (mirror.observers[j].observer === observer) {
mirror.observers.splice(j, 1);
return;
}
}
}
function unobserve(root, observer) {
observer.unobserve();
}
jsonpatch.unobserve = unobserve;
function deepClone(obj) {
if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === "object") {
return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
} else {
return obj; //no need to clone primitives
}
}
function observe(obj, callback) {
var patches = [];
var root = obj;
var observer;
var mirror = getMirror(obj);
if (!mirror) {
mirror = new Mirror(obj);
beforeDict.push(mirror);
} else {
observer = getObserverFromMirror(mirror, callback);
}
if (observer) {
return observer;
}
observer = {};
mirror.value = deepClone(obj);
if (callback) {
observer.callback = callback;
observer.next = null;
var intervals = this.intervals || [100, 1000, 10000, 60000];
if (intervals.push === void 0) {
throw new OriginalError("jsonpatch.intervals must be an array");
}
var currentInterval = 0;
var dirtyCheck = function dirtyCheck() {
generate(observer);
};
var fastCheck = function fastCheck() {
clearTimeout(observer.next);
observer.next = setTimeout(function () {
dirtyCheck();
currentInterval = 0;
observer.next = setTimeout(slowCheck, intervals[currentInterval++]);
}, 0);
};
var slowCheck = function slowCheck() {
dirtyCheck();
if (currentInterval == intervals.length) currentInterval = intervals.length - 1;
observer.next = setTimeout(slowCheck, intervals[currentInterval++]);
};
if (typeof window !== 'undefined') {
if (window.addEventListener) {
window.addEventListener('mousedown', fastCheck);
window.addEventListener('mouseup', fastCheck);
window.addEventListener('keydown', fastCheck);
} else {
document.documentElement.attachEvent('onmousedown', fastCheck);
document.documentElement.attachEvent('onmouseup', fastCheck);
document.documentElement.attachEvent('onkeydown', fastCheck);
}
}
observer.next = setTimeout(slowCheck, intervals[currentInterval++]);
}
observer.patches = patches;
observer.object = obj;
observer.unobserve = function () {
generate(observer);
clearTimeout(observer.next);
removeObserverFromMirror(mirror, observer);
if (typeof window !== 'undefined') {
if (window.removeEventListener) {
window.removeEventListener('mousedown', fastCheck);
window.removeEventListener('mouseup', fastCheck);
window.removeEventListener('keydown', fastCheck);
} else {
document.documentElement.detachEvent('onmousedown', fastCheck);
document.documentElement.detachEvent('onmouseup', fastCheck);
document.documentElement.detachEvent('onkeydown', fastCheck);
}
}
};
mirror.observers.push(new ObserverInfo(callback, observer));
return observer;
}
jsonpatch.observe = observe;
function generate(observer) {
var mirror;
for (var i = 0, ilen = beforeDict.length; i < ilen; i++) {
if (beforeDict[i].obj === observer.object) {
mirror = beforeDict[i];
break;
}
}
_generate(mirror.value, observer.object, observer.patches, "");
if (observer.patches.length) {
apply(mirror.value, observer.patches);
}
var temp = observer.patches;
if (temp.length > 0) {
observer.patches = [];
if (observer.callback) {
observer.callback(temp);
}
}
return temp;
}
jsonpatch.generate = generate;
// Dirty check if obj is different from mirror, generate patches and update mirror
function _generate(mirror, obj, patches, path) {
var newKeys = _objectKeys(obj);
var oldKeys = _objectKeys(mirror);
var changed = false;
var deleted = false;
//if ever "move" operation is implemented here, make sure this test runs OK: "should not generate the same patch twice (move)"
for (var t = oldKeys.length - 1; t >= 0; t--) {
var key = oldKeys[t];
var oldVal = mirror[key];
if (obj.hasOwnProperty(key)) {
var newVal = obj[key];
if ((typeof oldVal === 'undefined' ? 'undefined' : _typeof(oldVal)) == "object" && oldVal != null && (typeof newVal === 'undefined' ? 'undefined' : _typeof(newVal)) == "object" && newVal != null) {
_generate(oldVal, newVal, patches, path + "/" + escapePathComponent(key));
} else {
if (oldVal != newVal) {
changed = true;
patches.push({ op: "replace", path: path + "/" + escapePathComponent(key), value: deepClone(newVal) });
}
}
} else {
patches.push({ op: "remove", path: path + "/" + escapePathComponent(key) });
deleted = true; // property has been deleted
}
}
if (!deleted && newKeys.length == oldKeys.length) {
return;
}
for (var t = 0; t < newKeys.length; t++) {
var key = newKeys[t];
if (!mirror.hasOwnProperty(key)) {
patches.push({ op: "add", path: path + "/" + escapePathComponent(key), value: deepClone(obj[key]) });
}
}
}
var _isArray;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
_isArray = function _isArray(obj) {
return obj.push && typeof obj.length === 'number';
};
}
//3x faster than cached /^\d+$/.test(str)
function isInteger(str) {
var i = 0;
var len = str.length;
var charCode;
while (i < len) {
charCode = str.charCodeAt(i);
if (charCode >= 48 && charCode <= 57) {
i++;
continue;
}
return false;
}
return true;
}
/// Apply a json-patch operation on an object tree
function apply(tree, patches, validate) {
var result = false,
p = 0,
plen = patches.length,
patch,
key;
while (p < plen) {
patch = patches[p];
p++;
// Find the object
var path = patch.path || "";
var keys = path.split('/');
var obj = tree;
var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift
var len = keys.length;
var existingPathFragment = undefined;
while (true) {
key = keys[t];
if (validate) {
if (existingPathFragment === undefined) {
if (obj[key] === undefined) {
existingPathFragment = keys.slice(0, t).join('/');
} else if (t == len - 1) {
existingPathFragment = patch.path;
}
if (existingPathFragment !== undefined) {
this.validator(patch, p - 1, tree, existingPathFragment);
}
}
}
t++;
if (key === undefined) {
if (t >= len) {
result = rootOps[patch.op].call(patch, obj, key, tree); // Apply patch
break;
}
}
if (_isArray(obj)) {
if (key === '-') {
key = obj.length;
} else {
if (validate && !isInteger(key)) {
throw new JsonPatchError("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", p - 1, patch.path, patch);
}
key = parseInt(key, 10);
}
if (t >= len) {
if (validate && patch.op === "add" && key > obj.length) {
throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", p - 1, patch.path, patch);
}
result = arrOps[patch.op].call(patch, obj, key, tree); // Apply patch
break;
}
} else {
if (key && key.indexOf('~') != -1) key = key.replace(/~1/g, '/').replace(/~0/g, '~'); // escape chars
if (t >= len) {
result = objOps[patch.op].call(patch, obj, key, tree); // Apply patch
break;
}
}
obj = obj[key];
}
}
return result;
}
jsonpatch.apply = apply;
function compare(tree1, tree2) {
var patches = [];
_generate(tree1, tree2, patches, '');
return patches;
}
jsonpatch.compare = compare;
var JsonPatchError = function (_super) {
__extends(JsonPatchError, _super);
function JsonPatchError(message, name, index, operation, tree) {
_super.call(this, message);
this.message = message;
this.name = name;
this.index = index;
this.operation = operation;
this.tree = tree;
}
return JsonPatchError;
}(OriginalError);
jsonpatch.JsonPatchError = JsonPatchError;
jsonpatch.Error = JsonPatchError;
/**
* Recursively checks whether an object has any undefined values inside.
*/
function hasUndefined(obj) {
if (obj === undefined) {
return true;
}
if (typeof obj == "array" || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == "object") {
for (var i in obj) {
if (hasUndefined(obj[i])) {
return true;
}
}
}
return false;
}
/**
* Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.
* @param {object} operation - operation object (patch)
* @param {number} index - index of operation in the sequence
* @param {object} [tree] - object where the operation is supposed to be applied
* @param {string} [existingPathFragment] - comes along with `tree`
*/
function validator(operation, index, tree, existingPathFragment) {
if ((typeof operation === 'undefined' ? 'undefined' : _typeof(operation)) !== 'object' || operation === null || _isArray(operation)) {
throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, tree);
} else if (!objOps[operation.op]) {
throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, tree);
} else if (typeof operation.path !== 'string') {
throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, tree);
} else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {
throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, tree);
} else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {
throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, tree);
} else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {
throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, tree);
} else if (tree) {
if (operation.op == "add") {
var pathLen = operation.path.split("/").length;
var existingPathLen = existingPathFragment.split("/").length;
if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, tree);
}
} else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {
if (operation.path !== existingPathFragment) {
throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, tree);
}
} else if (operation.op === 'move' || operation.op === 'copy') {
var existingValue = { op: "_get", path: operation.from, value: undefined };
var error = jsonpatch.validate([existingValue], tree);
if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {
throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, tree);
}
}
}
}
jsonpatch.validator = validator;
/**
* Validates a sequence of operations. If `tree` parameter is provided, the sequence is additionally validated against the object tree.
* If error is encountered, returns a JsonPatchError object
* @param sequence
* @param tree
* @returns {JsonPatchError|undefined}
*/
function validate(sequence, tree) {
try {
if (!_isArray(sequence)) {
throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');
}
if (tree) {
tree = JSON.parse(JSON.stringify(tree)); //clone tree so that we can safely try applying operations
apply.call(this, tree, sequence, true);
} else {
for (var i = 0; i < sequence.length; i++) {
this.validator(sequence[i], i);
}
}
} catch (e) {
if (e instanceof JsonPatchError) {
return e;
} else {
throw e;
}
}
}
jsonpatch.validate = validate;
})(jsonpatch || (jsonpatch = {}));
if (true) {
exports.apply = jsonpatch.apply;
exports.observe = jsonpatch.observe;
exports.unobserve = jsonpatch.unobserve;
exports.generate = jsonpatch.generate;
exports.compare = jsonpatch.compare;
exports.validate = jsonpatch.validate;
exports.validator = jsonpatch.validator;
exports.JsonPatchError = jsonpatch.JsonPatchError;
exports.Error = jsonpatch.Error;
}
/***/ }),
/* 318 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
__webpack_require__(91);
__webpack_require__(106);
__webpack_require__(107);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(114);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(122);
__webpack_require__(123);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(128);
__webpack_require__(129);
__webpack_require__(130);
__webpack_require__(131);
__webpack_require__(132);
__webpack_require__(133);
__webpack_require__(134);
__webpack_require__(136);
__webpack_require__(138);
__webpack_require__(139);
__webpack_require__(140);
__webpack_require__(141);
__webpack_require__(142);
__webpack_require__(143);
__webpack_require__(144);
__webpack_require__(145);
__webpack_require__(146);
__webpack_require__(147);
__webpack_require__(148);
__webpack_require__(149);
__webpack_require__(150);
__webpack_require__(81);
__webpack_require__(151);
__webpack_require__(152);
__webpack_require__(154);
__webpack_require__(155);
__webpack_require__(156);
__webpack_require__(157);
__webpack_require__(158);
__webpack_require__(159);
__webpack_require__(160);
__webpack_require__(162);
__webpack_require__(163);
__webpack_require__(164);
__webpack_require__(167);
__webpack_require__(168);
__webpack_require__(169);
__webpack_require__(337);
__webpack_require__(338);
__webpack_require__(339);
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var _cellTypes = __webpack_require__(83);
var _core = __webpack_require__(84);
var _core2 = _interopRequireDefault(_core);
var _jquery = __webpack_require__(387);
var _jquery2 = _interopRequireDefault(_jquery);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _ghostTable = __webpack_require__(87);
var _ghostTable2 = _interopRequireDefault(_ghostTable);
var _array = __webpack_require__(2);
var arrayHelpers = _interopRequireWildcard(_array);
var _browser = __webpack_require__(28);
var browserHelpers = _interopRequireWildcard(_browser);
var _data = __webpack_require__(86);
var dataHelpers = _interopRequireWildcard(_data);
var _date = __webpack_require__(306);
var dateHelpers = _interopRequireWildcard(_date);
var _feature = __webpack_require__(39);
var featureHelpers = _interopRequireWildcard(_feature);
var _function = __webpack_require__(41);
var functionHelpers = _interopRequireWildcard(_function);
var _mixed = __webpack_require__(17);
var mixedHelpers = _interopRequireWildcard(_mixed);
var _number = __webpack_require__(6);
var numberHelpers = _interopRequireWildcard(_number);
var _object = __webpack_require__(1);
var objectHelpers = _interopRequireWildcard(_object);
var _setting = __webpack_require__(85);
var settingHelpers = _interopRequireWildcard(_setting);
var _string = __webpack_require__(36);
var stringHelpers = _interopRequireWildcard(_string);
var _unicode = __webpack_require__(20);
var unicodeHelpers = _interopRequireWildcard(_unicode);
var _element = __webpack_require__(0);
var domHelpers = _interopRequireWildcard(_element);
var _event = __webpack_require__(12);
var domEventHelpers = _interopRequireWildcard(_event);
var _index = __webpack_require__(388);
var plugins = _interopRequireWildcard(_index);
var _plugins = __webpack_require__(7);
var _defaultSettings = __webpack_require__(310);
var _defaultSettings2 = _interopRequireDefault(_defaultSettings);
var _rootInstance = __webpack_require__(309);
var _i18n = __webpack_require__(311);
var _constants = __webpack_require__(8);
var constants = _interopRequireWildcard(_constants);
var _dictionariesManager = __webpack_require__(67);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Handsontable(rootElement, userSettings) {
var instance = new _core2.default(rootElement, userSettings || {}, _rootInstance.rootInstanceSymbol);
instance.init();
return instance;
}
(0, _jquery2.default)(Handsontable);
Handsontable.Core = _core2.default;
Handsontable.DefaultSettings = _defaultSettings2.default;
Handsontable.EventManager = _eventManager2.default;
Handsontable._getListenersCounter = _eventManager.getListenersCounter; // For MemoryLeak tests
Handsontable.buildDate = '25/01/2018 10:06:15';
Handsontable.packageName = 'handsontable';
Handsontable.version = '0.35.1';
var baseVersion = '';
if (baseVersion) {
Handsontable.baseVersion = baseVersion;
}
// Export Hooks singleton
Handsontable.hooks = _pluginHooks2.default.getSingleton();
// TODO: Remove this exports after rewrite tests about this module
Handsontable.__GhostTable = _ghostTable2.default;
//
// Export all helpers to the Handsontable object
var HELPERS = [arrayHelpers, browserHelpers, dataHelpers, dateHelpers, featureHelpers, functionHelpers, mixedHelpers, numberHelpers, objectHelpers, settingHelpers, stringHelpers, unicodeHelpers];
var DOM = [domHelpers, domEventHelpers];
Handsontable.helper = {};
Handsontable.dom = {};
// Fill general helpers.
arrayHelpers.arrayEach(HELPERS, function (helper) {
arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), function (key) {
if (key.charAt(0) !== '_') {
Handsontable.helper[key] = helper[key];
}
});
});
// Fill DOM helpers.
arrayHelpers.arrayEach(DOM, function (helper) {
arrayHelpers.arrayEach(Object.getOwnPropertyNames(helper), function (key) {
if (key.charAt(0) !== '_') {
Handsontable.dom[key] = helper[key];
}
});
});
// Export cell types.
Handsontable.cellTypes = {};
arrayHelpers.arrayEach((0, _cellTypes.getRegisteredCellTypeNames)(), function (cellTypeName) {
Handsontable.cellTypes[cellTypeName] = (0, _cellTypes.getCellType)(cellTypeName);
});
Handsontable.cellTypes.registerCellType = _cellTypes.registerCellType;
Handsontable.cellTypes.getCellType = _cellTypes.getCellType;
// Export all registered editors from the Handsontable.
Handsontable.editors = {};
arrayHelpers.arrayEach((0, _editors.getRegisteredEditorNames)(), function (editorName) {
Handsontable.editors[stringHelpers.toUpperCaseFirst(editorName) + 'Editor'] = (0, _editors.getEditor)(editorName);
});
Handsontable.editors.registerEditor = _editors.registerEditor;
Handsontable.editors.getEditor = _editors.getEditor;
// Export all registered renderers from the Handsontable.
Handsontable.renderers = {};
arrayHelpers.arrayEach((0, _renderers.getRegisteredRendererNames)(), function (rendererName) {
var renderer = (0, _renderers.getRenderer)(rendererName);
if (rendererName === 'base') {
Handsontable.renderers.cellDecorator = renderer;
}
Handsontable.renderers[stringHelpers.toUpperCaseFirst(rendererName) + 'Renderer'] = renderer;
});
Handsontable.renderers.registerRenderer = _renderers.registerRenderer;
Handsontable.renderers.getRenderer = _renderers.getRenderer;
// Export all registered validators from the Handsontable.
Handsontable.validators = {};
arrayHelpers.arrayEach((0, _validators.getRegisteredValidatorNames)(), function (validatorName) {
Handsontable.validators[stringHelpers.toUpperCaseFirst(validatorName) + 'Validator'] = (0, _validators.getValidator)(validatorName);
});
Handsontable.validators.registerValidator = _validators.registerValidator;
Handsontable.validators.getValidator = _validators.getValidator;
// Export all registered plugins from the Handsontable.
Handsontable.plugins = {};
arrayHelpers.arrayEach(Object.getOwnPropertyNames(plugins), function (pluginName) {
var plugin = plugins[pluginName];
if (pluginName === 'Base') {
Handsontable.plugins[pluginName + 'Plugin'] = plugin;
} else {
Handsontable.plugins[pluginName] = plugin;
}
});
Handsontable.plugins.registerPlugin = _plugins.registerPlugin;
Handsontable.languages = {};
Handsontable.languages.dictionaryKeys = constants;
Handsontable.languages.getLanguageDictionary = _dictionariesManager.getLanguageDictionary;
Handsontable.languages.getLanguagesDictionaries = _dictionariesManager.getLanguagesDictionaries;
Handsontable.languages.registerLanguageDictionary = _dictionariesManager.registerLanguageDictionary;
// Alias to `getTranslatedPhrase` function, for more information check it API.
Handsontable.languages.getTranslatedPhrase = function () {
return _i18n.getTranslatedPhrase.apply(undefined, arguments);
};
exports.default = Handsontable;
/***/ }),
/* 319 */
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(19);
var anObject = __webpack_require__(18);
var getKeys = __webpack_require__(37);
module.exports = __webpack_require__(22) ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = getKeys(Properties);
var length = keys.length;
var i = 0;
var P;
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
return O;
};
/***/ }),
/* 320 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var create = __webpack_require__(70);
var descriptor = __webpack_require__(49);
var setToStringTag = __webpack_require__(51);
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
__webpack_require__(31)(IteratorPrototype, __webpack_require__(10)('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
setToStringTag(Constructor, NAME + ' Iterator');
};
/***/ }),
/* 321 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(5);
var setPrototypeOf = __webpack_require__(105).set;
module.exports = function (that, target, C) {
var S = target.constructor;
var P;
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
setPrototypeOf(that, P);
} return that;
};
/***/ }),
/* 322 */
/***/ (function(module, exports, __webpack_require__) {
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
var speciesConstructor = __webpack_require__(323);
module.exports = function (original, length) {
return new (speciesConstructor(original))(length);
};
/***/ }),
/* 323 */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(5);
var isArray = __webpack_require__(108);
var SPECIES = __webpack_require__(10)('species');
module.exports = function (original) {
var C;
if (isArray(original)) {
C = original.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return C === undefined ? Array : C;
};
/***/ }),
/* 324 */
/***/ (function(module, exports, __webpack_require__) {
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
var anObject = __webpack_require__(18);
var aFunction = __webpack_require__(58);
var SPECIES = __webpack_require__(10)('species');
module.exports = function (O, D) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
};
/***/ }),
/* 325 */
/***/ (function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
module.exports = function (fn, args, that) {
var un = that === undefined;
switch (args.length) {
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
: fn.call(that, args[0]);
case 2: return un ? fn(args[0], args[1])
: fn.call(that, args[0], args[1]);
case 3: return un ? fn(args[0], args[1], args[2])
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
} return fn.apply(that, args);
};
/***/ }),
/* 326 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var macrotask = __webpack_require__(76).set;
var Observer = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var isNode = __webpack_require__(42)(process) == 'process';
module.exports = function () {
var head, last, notify;
var flush = function () {
var parent, fn;
if (isNode && (parent = process.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
try {
fn();
} catch (e) {
if (head) notify();
else last = undefined;
throw e;
}
} last = undefined;
if (parent) parent.enter();
};
// Node.js
if (isNode) {
notify = function () {
process.nextTick(flush);
};
// browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
} else if (Observer && !(global.navigator && global.navigator.standalone)) {
var toggle = true;
var node = document.createTextNode('');
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
var promise = Promise.resolve();
notify = function () {
promise.then(flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function () {
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
return function (fn) {
var task = { fn: fn, next: undefined };
if (last) last.next = task;
if (!head) {
head = task;
notify();
} last = task;
};
};
/***/ }),
/* 327 */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { e: false, v: exec() };
} catch (e) {
return { e: true, v: e };
}
};
/***/ }),
/* 328 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(18);
var isObject = __webpack_require__(5);
var newPromiseCapability = __webpack_require__(113);
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/* 329 */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(13);
var core = __webpack_require__(43);
var LIBRARY = __webpack_require__(61);
var wksExt = __webpack_require__(115);
var defineProperty = __webpack_require__(19).f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
};
/***/ }),
/* 330 */
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
var getKeys = __webpack_require__(37);
var gOPS = __webpack_require__(65);
var pIE = __webpack_require__(52);
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
if (getSymbols) {
var symbols = getSymbols(it);
var isEnum = pIE.f;
var i = 0;
var key;
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
} return result;
};
/***/ }),
/* 331 */
/***/ (function(module, exports) {
// 7.2.9 SameValue(x, y)
module.exports = Object.is || function is(x, y) {
// eslint-disable-next-line no-self-compare
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
/***/ }),
/* 332 */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(55);
var defined = __webpack_require__(38);
// true -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
return function (that, pos) {
var s = String(defined(that));
var i = toInteger(pos);
var l = s.length;
var a, b;
if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
a = s.charCodeAt(i);
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
? TO_STRING ? s.charAt(i) : a
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
};
};
/***/ }),
/* 333 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.2.5.3 get RegExp.prototype.flags
var anObject = __webpack_require__(18);
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/* 334 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
var toObject = __webpack_require__(33);
var toAbsoluteIndex = __webpack_require__(56);
var toLength = __webpack_require__(25);
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
var O = toObject(this);
var len = toLength(O.length);
var to = toAbsoluteIndex(target, len);
var from = toAbsoluteIndex(start, len);
var end = arguments.length > 2 ? arguments[2] : undefined;
var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
var inc = 1;
if (from < to && to < from + count) {
inc = -1;
from += count - 1;
to += count - 1;
}
while (count-- > 0) {
if (from in O) O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ }),
/* 335 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
var toObject = __webpack_require__(33);
var toAbsoluteIndex = __webpack_require__(56);
var toLength = __webpack_require__(25);
module.exports = function fill(value /* , start = 0, end = @length */) {
var O = toObject(this);
var length = toLength(O.length);
var aLen = arguments.length;
var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
var end = aLen > 2 ? arguments[2] : undefined;
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
while (endPos > index) O[index++] = value;
return O;
};
/***/ }),
/* 336 */
/***/ (function(module, exports, __webpack_require__) {
// all object keys, includes non-enumerable and symbols
var gOPN = __webpack_require__(77);
var gOPS = __webpack_require__(65);
var anObject = __webpack_require__(18);
var Reflect = __webpack_require__(13).Reflect;
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
var keys = gOPN.f(anObject(it));
var getSymbols = gOPS.f;
return getSymbols ? keys.concat(getSymbols(it)) : keys;
};
/***/ }),
/* 337 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 338 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 339 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 340 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* A overlay that renders ALL available rows & columns positioned on top of the original Walkontable instance and all other overlays.
* Used for debugging purposes to see if the other overlays (that render only part of the rows & columns) are positioned correctly
*
* @class DebugOverlay
*/
var DebugOverlay = function (_Overlay) {
_inherits(DebugOverlay, _Overlay);
/**
* @param {Walkontable} wotInstance
*/
function DebugOverlay(wotInstance) {
_classCallCheck(this, DebugOverlay);
var _this = _possibleConstructorReturn(this, (DebugOverlay.__proto__ || Object.getPrototypeOf(DebugOverlay)).call(this, wotInstance));
_this.clone = _this.makeClone(_base2.default.CLONE_DEBUG);
_this.clone.wtTable.holder.style.opacity = 0.4;
_this.clone.wtTable.holder.style.textShadow = '0 0 2px #ff0000';
(0, _element.addClass)(_this.clone.wtTable.holder.parentNode, 'wtDebugVisible');
return _this;
}
return DebugOverlay;
}(_base2.default);
_base2.default.registerOverlay(_base2.default.CLONE_DEBUG, DebugOverlay);
exports.default = DebugOverlay;
/***/ }),
/* 341 */
/***/ (function(module, exports) {
module.exports = function(module) {
if(!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if(!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};
/***/ }),
/* 342 */
/***/ (function(module, exports, __webpack_require__) {
var map = {
"./af": 175,
"./af.js": 175,
"./ar": 176,
"./ar-dz": 177,
"./ar-dz.js": 177,
"./ar-kw": 178,
"./ar-kw.js": 178,
"./ar-ly": 179,
"./ar-ly.js": 179,
"./ar-ma": 180,
"./ar-ma.js": 180,
"./ar-sa": 181,
"./ar-sa.js": 181,
"./ar-tn": 182,
"./ar-tn.js": 182,
"./ar.js": 176,
"./az": 183,
"./az.js": 183,
"./be": 184,
"./be.js": 184,
"./bg": 185,
"./bg.js": 185,
"./bm": 186,
"./bm.js": 186,
"./bn": 187,
"./bn.js": 187,
"./bo": 188,
"./bo.js": 188,
"./br": 189,
"./br.js": 189,
"./bs": 190,
"./bs.js": 190,
"./ca": 191,
"./ca.js": 191,
"./cs": 192,
"./cs.js": 192,
"./cv": 193,
"./cv.js": 193,
"./cy": 194,
"./cy.js": 194,
"./da": 195,
"./da.js": 195,
"./de": 196,
"./de-at": 197,
"./de-at.js": 197,
"./de-ch": 198,
"./de-ch.js": 198,
"./de.js": 196,
"./dv": 199,
"./dv.js": 199,
"./el": 200,
"./el.js": 200,
"./en-au": 201,
"./en-au.js": 201,
"./en-ca": 202,
"./en-ca.js": 202,
"./en-gb": 203,
"./en-gb.js": 203,
"./en-ie": 204,
"./en-ie.js": 204,
"./en-nz": 205,
"./en-nz.js": 205,
"./eo": 206,
"./eo.js": 206,
"./es": 207,
"./es-do": 208,
"./es-do.js": 208,
"./es-us": 209,
"./es-us.js": 209,
"./es.js": 207,
"./et": 210,
"./et.js": 210,
"./eu": 211,
"./eu.js": 211,
"./fa": 212,
"./fa.js": 212,
"./fi": 213,
"./fi.js": 213,
"./fo": 214,
"./fo.js": 214,
"./fr": 215,
"./fr-ca": 216,
"./fr-ca.js": 216,
"./fr-ch": 217,
"./fr-ch.js": 217,
"./fr.js": 215,
"./fy": 218,
"./fy.js": 218,
"./gd": 219,
"./gd.js": 219,
"./gl": 220,
"./gl.js": 220,
"./gom-latn": 221,
"./gom-latn.js": 221,
"./gu": 222,
"./gu.js": 222,
"./he": 223,
"./he.js": 223,
"./hi": 224,
"./hi.js": 224,
"./hr": 225,
"./hr.js": 225,
"./hu": 226,
"./hu.js": 226,
"./hy-am": 227,
"./hy-am.js": 227,
"./id": 228,
"./id.js": 228,
"./is": 229,
"./is.js": 229,
"./it": 230,
"./it.js": 230,
"./ja": 231,
"./ja.js": 231,
"./jv": 232,
"./jv.js": 232,
"./ka": 233,
"./ka.js": 233,
"./kk": 234,
"./kk.js": 234,
"./km": 235,
"./km.js": 235,
"./kn": 236,
"./kn.js": 236,
"./ko": 237,
"./ko.js": 237,
"./ky": 238,
"./ky.js": 238,
"./lb": 239,
"./lb.js": 239,
"./lo": 240,
"./lo.js": 240,
"./lt": 241,
"./lt.js": 241,
"./lv": 242,
"./lv.js": 242,
"./me": 243,
"./me.js": 243,
"./mi": 244,
"./mi.js": 244,
"./mk": 245,
"./mk.js": 245,
"./ml": 246,
"./ml.js": 246,
"./mr": 247,
"./mr.js": 247,
"./ms": 248,
"./ms-my": 249,
"./ms-my.js": 249,
"./ms.js": 248,
"./mt": 250,
"./mt.js": 250,
"./my": 251,
"./my.js": 251,
"./nb": 252,
"./nb.js": 252,
"./ne": 253,
"./ne.js": 253,
"./nl": 254,
"./nl-be": 255,
"./nl-be.js": 255,
"./nl.js": 254,
"./nn": 256,
"./nn.js": 256,
"./pa-in": 257,
"./pa-in.js": 257,
"./pl": 258,
"./pl.js": 258,
"./pt": 259,
"./pt-br": 260,
"./pt-br.js": 260,
"./pt.js": 259,
"./ro": 261,
"./ro.js": 261,
"./ru": 262,
"./ru.js": 262,
"./sd": 263,
"./sd.js": 263,
"./se": 264,
"./se.js": 264,
"./si": 265,
"./si.js": 265,
"./sk": 266,
"./sk.js": 266,
"./sl": 267,
"./sl.js": 267,
"./sq": 268,
"./sq.js": 268,
"./sr": 269,
"./sr-cyrl": 270,
"./sr-cyrl.js": 270,
"./sr.js": 269,
"./ss": 271,
"./ss.js": 271,
"./sv": 272,
"./sv.js": 272,
"./sw": 273,
"./sw.js": 273,
"./ta": 274,
"./ta.js": 274,
"./te": 275,
"./te.js": 275,
"./tet": 276,
"./tet.js": 276,
"./th": 277,
"./th.js": 277,
"./tl-ph": 278,
"./tl-ph.js": 278,
"./tlh": 279,
"./tlh.js": 279,
"./tr": 280,
"./tr.js": 280,
"./tzl": 281,
"./tzl.js": 281,
"./tzm": 282,
"./tzm-latn": 283,
"./tzm-latn.js": 283,
"./tzm.js": 282,
"./uk": 284,
"./uk.js": 284,
"./ur": 285,
"./ur.js": 285,
"./uz": 286,
"./uz-latn": 287,
"./uz-latn.js": 287,
"./uz.js": 286,
"./vi": 288,
"./vi.js": 288,
"./x-pseudo": 289,
"./x-pseudo.js": 289,
"./yo": 290,
"./yo.js": 290,
"./zh-cn": 291,
"./zh-cn.js": 291,
"./zh-hk": 292,
"./zh-hk.js": 292,
"./zh-tw": 293,
"./zh-tw.js": 293
};
function webpackContext(req) {
return __webpack_require__(webpackContextResolve(req));
};
function webpackContextResolve(req) {
var id = map[req];
if(!(id + 1)) // check for number or string
throw new Error("Cannot find module '" + req + "'.");
return id;
};
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 342;
/***/ }),
/* 343 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @class LeftOverlay
*/
var LeftOverlay = function (_Overlay) {
_inherits(LeftOverlay, _Overlay);
/**
* @param {Walkontable} wotInstance
*/
function LeftOverlay(wotInstance) {
_classCallCheck(this, LeftOverlay);
var _this = _possibleConstructorReturn(this, (LeftOverlay.__proto__ || Object.getPrototypeOf(LeftOverlay)).call(this, wotInstance));
_this.clone = _this.makeClone(_base2.default.CLONE_LEFT);
return _this;
}
/**
* Checks if overlay should be fully rendered
*
* @returns {Boolean}
*/
_createClass(LeftOverlay, [{
key: 'shouldBeRendered',
value: function shouldBeRendered() {
return !!(this.wot.getSetting('fixedColumnsLeft') || this.wot.getSetting('rowHeaders').length);
}
/**
* Updates the left overlay position
*/
}, {
key: 'resetFixedPosition',
value: function resetFixedPosition() {
if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {
// removed from DOM
return;
}
var overlayRoot = this.clone.wtTable.holder.parentNode;
var headerPosition = 0;
var preventOverflow = this.wot.getSetting('preventOverflow');
if (this.trimmingContainer === window && (!preventOverflow || preventOverflow !== 'horizontal')) {
var box = this.wot.wtTable.hider.getBoundingClientRect();
var left = Math.ceil(box.left);
var right = Math.ceil(box.right);
var finalLeft = void 0;
var finalTop = void 0;
finalTop = this.wot.wtTable.hider.style.top;
finalTop = finalTop === '' ? 0 : finalTop;
if (left < 0 && right - overlayRoot.offsetWidth > 0) {
finalLeft = -left;
} else {
finalLeft = 0;
}
headerPosition = finalLeft;
finalLeft += 'px';
(0, _element.setOverlayPosition)(overlayRoot, finalLeft, finalTop);
} else {
headerPosition = this.getScrollPosition();
(0, _element.resetCssTransform)(overlayRoot);
}
this.adjustHeaderBordersPosition(headerPosition);
this.adjustElementsSize();
}
/**
* Sets the main overlay's horizontal scroll position
*
* @param {Number} pos
*/
}, {
key: 'setScrollPosition',
value: function setScrollPosition(pos) {
if (this.mainTableScrollableElement === window) {
window.scrollTo(pos, (0, _element.getWindowScrollTop)());
} else {
this.mainTableScrollableElement.scrollLeft = pos;
}
}
/**
* Triggers onScroll hook callback
*/
}, {
key: 'onScroll',
value: function onScroll() {
this.wot.getSetting('onScrollVertically');
}
/**
* Calculates total sum cells width
*
* @param {Number} from Column index which calculates started from
* @param {Number} to Column index where calculation is finished
* @returns {Number} Width sum
*/
}, {
key: 'sumCellSizes',
value: function sumCellSizes(from, to) {
var sum = 0;
var defaultColumnWidth = this.wot.wtSettings.defaultColumnWidth;
while (from < to) {
sum += this.wot.wtTable.getStretchedColumnWidth(from) || defaultColumnWidth;
from++;
}
return sum;
}
/**
* Adjust overlay root element, childs and master table element sizes (width, height).
*
* @param {Boolean} [force=false]
*/
}, {
key: 'adjustElementsSize',
value: function adjustElementsSize() {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
this.updateTrimmingContainer();
if (this.needFullRender || force) {
this.adjustRootElementSize();
this.adjustRootChildrenSize();
if (!force) {
this.areElementSizesAdjusted = true;
}
}
}
/**
* Adjust overlay root element size (width and height).
*/
}, {
key: 'adjustRootElementSize',
value: function adjustRootElementSize() {
var masterHolder = this.wot.wtTable.holder;
var scrollbarHeight = masterHolder.clientHeight === masterHolder.offsetHeight ? 0 : (0, _element.getScrollbarWidth)();
var overlayRoot = this.clone.wtTable.holder.parentNode;
var overlayRootStyle = overlayRoot.style;
var preventOverflow = this.wot.getSetting('preventOverflow');
var tableWidth = void 0;
if (this.trimmingContainer !== window || preventOverflow === 'vertical') {
var height = this.wot.wtViewport.getWorkspaceHeight() - scrollbarHeight;
height = Math.min(height, (0, _element.innerHeight)(this.wot.wtTable.wtRootElement));
overlayRootStyle.height = height + 'px';
} else {
overlayRootStyle.height = '';
}
this.clone.wtTable.holder.style.height = overlayRootStyle.height;
tableWidth = (0, _element.outerWidth)(this.clone.wtTable.TABLE);
overlayRootStyle.width = (tableWidth === 0 ? tableWidth : tableWidth + 4) + 'px';
}
/**
* Adjust overlay root childs size
*/
}, {
key: 'adjustRootChildrenSize',
value: function adjustRootChildrenSize() {
var scrollbarWidth = (0, _element.getScrollbarWidth)();
this.clone.wtTable.hider.style.height = this.hider.style.height;
this.clone.wtTable.holder.style.height = this.clone.wtTable.holder.parentNode.style.height;
if (scrollbarWidth === 0) {
scrollbarWidth = 30;
}
this.clone.wtTable.holder.style.width = parseInt(this.clone.wtTable.holder.parentNode.style.width, 10) + scrollbarWidth + 'px';
}
/**
* Adjust the overlay dimensions and position
*/
}, {
key: 'applyToDOM',
value: function applyToDOM() {
var total = this.wot.getSetting('totalColumns');
if (!this.areElementSizesAdjusted) {
this.adjustElementsSize();
}
if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {
this.spreader.style.left = this.wot.wtViewport.columnsRenderCalculator.startPosition + 'px';
} else if (total === 0) {
this.spreader.style.left = '0';
} else {
throw new Error('Incorrect value of the columnsRenderCalculator');
}
this.spreader.style.right = '';
if (this.needFullRender) {
this.syncOverlayOffset();
}
}
/**
* Synchronize calculated top position to an element
*/
}, {
key: 'syncOverlayOffset',
value: function syncOverlayOffset() {
if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {
this.clone.wtTable.spreader.style.top = this.wot.wtViewport.rowsRenderCalculator.startPosition + 'px';
} else {
this.clone.wtTable.spreader.style.top = '';
}
}
/**
* Scrolls horizontally to a column at the left edge of the viewport
*
* @param sourceCol {Number} Column index which you want to scroll to
* @param [beyondRendered=false] {Boolean} if `true`, scrolls according to the bottom edge (top edge is by default)
*/
}, {
key: 'scrollTo',
value: function scrollTo(sourceCol, beyondRendered) {
var newX = this.getTableParentOffset();
var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;
var mainHolder = sourceInstance.wtTable.holder;
var scrollbarCompensation = 0;
if (beyondRendered && mainHolder.offsetWidth !== mainHolder.clientWidth) {
scrollbarCompensation = (0, _element.getScrollbarWidth)();
}
if (beyondRendered) {
newX += this.sumCellSizes(0, sourceCol + 1);
newX -= this.wot.wtViewport.getViewportWidth();
} else {
newX += this.sumCellSizes(this.wot.getSetting('fixedColumnsLeft'), sourceCol);
}
newX += scrollbarCompensation;
this.setScrollPosition(newX);
}
/**
* Gets table parent left position
*
* @returns {Number}
*/
}, {
key: 'getTableParentOffset',
value: function getTableParentOffset() {
var preventOverflow = this.wot.getSetting('preventOverflow');
var offset = 0;
if (!preventOverflow && this.trimmingContainer === window) {
offset = this.wot.wtTable.holderOffset.left;
}
return offset;
}
/**
* Gets the main overlay's horizontal scroll position
*
* @returns {Number} Main table's vertical scroll position
*/
}, {
key: 'getScrollPosition',
value: function getScrollPosition() {
return (0, _element.getScrollLeft)(this.mainTableScrollableElement);
}
/**
* Adds css classes to hide the header border's header (cell-selection border hiding issue)
*
* @param {Number} position Header X position if trimming container is window or scroll top if not
*/
}, {
key: 'adjustHeaderBordersPosition',
value: function adjustHeaderBordersPosition(position) {
var masterParent = this.wot.wtTable.holder.parentNode;
var rowHeaders = this.wot.getSetting('rowHeaders');
var fixedColumnsLeft = this.wot.getSetting('fixedColumnsLeft');
var totalRows = this.wot.getSetting('totalRows');
if (totalRows) {
(0, _element.removeClass)(masterParent, 'emptyRows');
} else {
(0, _element.addClass)(masterParent, 'emptyRows');
}
if (fixedColumnsLeft && !rowHeaders.length) {
(0, _element.addClass)(masterParent, 'innerBorderLeft');
} else if (!fixedColumnsLeft && rowHeaders.length) {
var previousState = (0, _element.hasClass)(masterParent, 'innerBorderLeft');
if (position) {
(0, _element.addClass)(masterParent, 'innerBorderLeft');
} else {
(0, _element.removeClass)(masterParent, 'innerBorderLeft');
}
if (!previousState && position || previousState && !position) {
this.wot.wtOverlays.adjustElementsSize();
}
}
}
}]);
return LeftOverlay;
}(_base2.default);
_base2.default.registerOverlay(_base2.default.CLONE_LEFT, LeftOverlay);
exports.default = LeftOverlay;
/***/ }),
/* 344 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @class TopOverlay
*/
var TopOverlay = function (_Overlay) {
_inherits(TopOverlay, _Overlay);
/**
* @param {Walkontable} wotInstance
*/
function TopOverlay(wotInstance) {
_classCallCheck(this, TopOverlay);
var _this = _possibleConstructorReturn(this, (TopOverlay.__proto__ || Object.getPrototypeOf(TopOverlay)).call(this, wotInstance));
_this.clone = _this.makeClone(_base2.default.CLONE_TOP);
return _this;
}
/**
* Checks if overlay should be fully rendered
*
* @returns {Boolean}
*/
_createClass(TopOverlay, [{
key: 'shouldBeRendered',
value: function shouldBeRendered() {
return !!(this.wot.getSetting('fixedRowsTop') || this.wot.getSetting('columnHeaders').length);
}
/**
* Updates the top overlay position
*/
}, {
key: 'resetFixedPosition',
value: function resetFixedPosition() {
if (!this.needFullRender || !this.wot.wtTable.holder.parentNode) {
// removed from DOM
return;
}
var overlayRoot = this.clone.wtTable.holder.parentNode;
var headerPosition = 0;
var preventOverflow = this.wot.getSetting('preventOverflow');
if (this.trimmingContainer === window && (!preventOverflow || preventOverflow !== 'vertical')) {
var box = this.wot.wtTable.hider.getBoundingClientRect();
var top = Math.ceil(box.top);
var bottom = Math.ceil(box.bottom);
var finalLeft = void 0;
var finalTop = void 0;
finalLeft = this.wot.wtTable.hider.style.left;
finalLeft = finalLeft === '' ? 0 : finalLeft;
if (top < 0 && bottom - overlayRoot.offsetHeight > 0) {
finalTop = -top;
} else {
finalTop = 0;
}
headerPosition = finalTop;
finalTop += 'px';
(0, _element.setOverlayPosition)(overlayRoot, finalLeft, finalTop);
} else {
headerPosition = this.getScrollPosition();
(0, _element.resetCssTransform)(overlayRoot);
}
this.adjustHeaderBordersPosition(headerPosition);
this.adjustElementsSize();
}
/**
* Sets the main overlay's vertical scroll position
*
* @param {Number} pos
*/
}, {
key: 'setScrollPosition',
value: function setScrollPosition(pos) {
if (this.mainTableScrollableElement === window) {
window.scrollTo((0, _element.getWindowScrollLeft)(), pos);
} else {
this.mainTableScrollableElement.scrollTop = pos;
}
}
/**
* Triggers onScroll hook callback
*/
}, {
key: 'onScroll',
value: function onScroll() {
this.wot.getSetting('onScrollHorizontally');
}
/**
* Calculates total sum cells height
*
* @param {Number} from Row index which calculates started from
* @param {Number} to Row index where calculation is finished
* @returns {Number} Height sum
*/
}, {
key: 'sumCellSizes',
value: function sumCellSizes(from, to) {
var sum = 0;
var defaultRowHeight = this.wot.wtSettings.settings.defaultRowHeight;
while (from < to) {
var height = this.wot.wtTable.getRowHeight(from);
sum += height === void 0 ? defaultRowHeight : height;
from++;
}
return sum;
}
/**
* Adjust overlay root element, childs and master table element sizes (width, height).
*
* @param {Boolean} [force=false]
*/
}, {
key: 'adjustElementsSize',
value: function adjustElementsSize() {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
this.updateTrimmingContainer();
if (this.needFullRender || force) {
this.adjustRootElementSize();
this.adjustRootChildrenSize();
if (!force) {
this.areElementSizesAdjusted = true;
}
}
}
/**
* Adjust overlay root element size (width and height).
*/
}, {
key: 'adjustRootElementSize',
value: function adjustRootElementSize() {
var masterHolder = this.wot.wtTable.holder;
var scrollbarWidth = masterHolder.clientWidth === masterHolder.offsetWidth ? 0 : (0, _element.getScrollbarWidth)();
var overlayRoot = this.clone.wtTable.holder.parentNode;
var overlayRootStyle = overlayRoot.style;
var preventOverflow = this.wot.getSetting('preventOverflow');
var tableHeight = void 0;
if (this.trimmingContainer !== window || preventOverflow === 'horizontal') {
var width = this.wot.wtViewport.getWorkspaceWidth() - scrollbarWidth;
width = Math.min(width, (0, _element.innerWidth)(this.wot.wtTable.wtRootElement));
overlayRootStyle.width = width + 'px';
} else {
overlayRootStyle.width = '';
}
this.clone.wtTable.holder.style.width = overlayRootStyle.width;
tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE);
overlayRootStyle.height = (tableHeight === 0 ? tableHeight : tableHeight + 4) + 'px';
}
/**
* Adjust overlay root childs size
*/
}, {
key: 'adjustRootChildrenSize',
value: function adjustRootChildrenSize() {
var scrollbarWidth = (0, _element.getScrollbarWidth)();
this.clone.wtTable.hider.style.width = this.hider.style.width;
this.clone.wtTable.holder.style.width = this.clone.wtTable.holder.parentNode.style.width;
if (scrollbarWidth === 0) {
scrollbarWidth = 30;
}
this.clone.wtTable.holder.style.height = parseInt(this.clone.wtTable.holder.parentNode.style.height, 10) + scrollbarWidth + 'px';
}
/**
* Adjust the overlay dimensions and position
*/
}, {
key: 'applyToDOM',
value: function applyToDOM() {
var total = this.wot.getSetting('totalRows');
if (!this.areElementSizesAdjusted) {
this.adjustElementsSize();
}
if (typeof this.wot.wtViewport.rowsRenderCalculator.startPosition === 'number') {
this.spreader.style.top = this.wot.wtViewport.rowsRenderCalculator.startPosition + 'px';
} else if (total === 0) {
// can happen if there are 0 rows
this.spreader.style.top = '0';
} else {
throw new Error('Incorrect value of the rowsRenderCalculator');
}
this.spreader.style.bottom = '';
if (this.needFullRender) {
this.syncOverlayOffset();
}
}
/**
* Synchronize calculated left position to an element
*/
}, {
key: 'syncOverlayOffset',
value: function syncOverlayOffset() {
if (typeof this.wot.wtViewport.columnsRenderCalculator.startPosition === 'number') {
this.clone.wtTable.spreader.style.left = this.wot.wtViewport.columnsRenderCalculator.startPosition + 'px';
} else {
this.clone.wtTable.spreader.style.left = '';
}
}
/**
* Scrolls vertically to a row
*
* @param sourceRow {Number} Row index which you want to scroll to
* @param [bottomEdge=false] {Boolean} if `true`, scrolls according to the bottom edge (top edge is by default)
*/
}, {
key: 'scrollTo',
value: function scrollTo(sourceRow, bottomEdge) {
var newY = this.getTableParentOffset();
var sourceInstance = this.wot.cloneSource ? this.wot.cloneSource : this.wot;
var mainHolder = sourceInstance.wtTable.holder;
var scrollbarCompensation = 0;
if (bottomEdge && mainHolder.offsetHeight !== mainHolder.clientHeight) {
scrollbarCompensation = (0, _element.getScrollbarWidth)();
}
if (bottomEdge) {
var fixedRowsBottom = this.wot.getSetting('fixedRowsBottom');
var fixedRowsTop = this.wot.getSetting('fixedRowsTop');
var totalRows = this.wot.getSetting('totalRows');
newY += this.sumCellSizes(0, sourceRow + 1);
newY -= this.wot.wtViewport.getViewportHeight() - this.sumCellSizes(totalRows - fixedRowsBottom, totalRows);
// Fix 1 pixel offset when cell is selected
newY += 1;
} else {
newY += this.sumCellSizes(this.wot.getSetting('fixedRowsTop'), sourceRow);
}
newY += scrollbarCompensation;
this.setScrollPosition(newY);
}
/**
* Gets table parent top position
*
* @returns {Number}
*/
}, {
key: 'getTableParentOffset',
value: function getTableParentOffset() {
if (this.mainTableScrollableElement === window) {
return this.wot.wtTable.holderOffset.top;
}
return 0;
}
/**
* Gets the main overlay's vertical scroll position
*
* @returns {Number} Main table's vertical scroll position
*/
}, {
key: 'getScrollPosition',
value: function getScrollPosition() {
return (0, _element.getScrollTop)(this.mainTableScrollableElement);
}
/**
* Redraw borders of selection
*
* @param {WalkontableSelection} selection Selection for redraw
*/
}, {
key: 'redrawSelectionBorders',
value: function redrawSelectionBorders(selection) {
if (selection && selection.cellRange) {
var border = selection.getBorder(this.wot);
if (border) {
var corners = selection.getCorners();
border.disappear();
border.appear(corners);
}
}
}
/**
* Redrawing borders of all selections
*/
}, {
key: 'redrawAllSelectionsBorders',
value: function redrawAllSelectionsBorders() {
var selections = this.wot.selections;
this.redrawSelectionBorders(selections.current);
this.redrawSelectionBorders(selections.area);
this.redrawSelectionBorders(selections.fill);
this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh();
}
/**
* Adds css classes to hide the header border's header (cell-selection border hiding issue)
*
* @param {Number} position Header Y position if trimming container is window or scroll top if not
*/
}, {
key: 'adjustHeaderBordersPosition',
value: function adjustHeaderBordersPosition(position) {
var masterParent = this.wot.wtTable.holder.parentNode;
var totalColumns = this.wot.getSetting('totalColumns');
if (totalColumns) {
(0, _element.removeClass)(masterParent, 'emptyColumns');
} else {
(0, _element.addClass)(masterParent, 'emptyColumns');
}
if (this.wot.getSetting('fixedRowsTop') === 0 && this.wot.getSetting('columnHeaders').length > 0) {
var previousState = (0, _element.hasClass)(masterParent, 'innerBorderTop');
if (position || this.wot.getSetting('totalRows') === 0) {
(0, _element.addClass)(masterParent, 'innerBorderTop');
} else {
(0, _element.removeClass)(masterParent, 'innerBorderTop');
}
if (!previousState && position || previousState && !position) {
this.wot.wtOverlays.adjustElementsSize();
// cell borders should be positioned once again,
// because we added / removed 1px border from table header
this.redrawAllSelectionsBorders();
}
}
// nasty workaround for double border in the header, TODO: find a pure-css solution
if (this.wot.getSetting('rowHeaders').length === 0) {
var secondHeaderCell = this.clone.wtTable.THEAD.querySelectorAll('th:nth-of-type(2)');
if (secondHeaderCell) {
for (var i = 0; i < secondHeaderCell.length; i++) {
secondHeaderCell[i].style['border-left-width'] = 0;
}
}
}
}
}]);
return TopOverlay;
}(_base2.default);
_base2.default.registerOverlay(_base2.default.CLONE_TOP, TopOverlay);
exports.default = TopOverlay;
/***/ }),
/* 345 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _base = __webpack_require__(35);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @class TopLeftCornerOverlay
*/
var TopLeftCornerOverlay = function (_Overlay) {
_inherits(TopLeftCornerOverlay, _Overlay);
/**
* @param {Walkontable} wotInstance
*/
function TopLeftCornerOverlay(wotInstance) {
_classCallCheck(this, TopLeftCornerOverlay);
var _this = _possibleConstructorReturn(this, (TopLeftCornerOverlay.__proto__ || Object.getPrototypeOf(TopLeftCornerOverlay)).call(this, wotInstance));
_this.clone = _this.makeClone(_base2.default.CLONE_TOP_LEFT_CORNER);
return _this;
}
/**
* Checks if overlay should be fully rendered
*
* @returns {Boolean}
*/
_createClass(TopLeftCornerOverlay, [{
key: 'shouldBeRendered',
value: function shouldBeRendered() {
return !!((this.wot.getSetting('fixedRowsTop') || this.wot.getSetting('columnHeaders').length) && (this.wot.getSetting('fixedColumnsLeft') || this.wot.getSetting('rowHeaders').length));
}
/**
* Updates the corner overlay position
*/
}, {
key: 'resetFixedPosition',
value: function resetFixedPosition() {
this.updateTrimmingContainer();
if (!this.wot.wtTable.holder.parentNode) {
// removed from DOM
return;
}
var overlayRoot = this.clone.wtTable.holder.parentNode;
var tableHeight = (0, _element.outerHeight)(this.clone.wtTable.TABLE);
var tableWidth = (0, _element.outerWidth)(this.clone.wtTable.TABLE);
var preventOverflow = this.wot.getSetting('preventOverflow');
if (this.trimmingContainer === window) {
var box = this.wot.wtTable.hider.getBoundingClientRect();
var top = Math.ceil(box.top);
var left = Math.ceil(box.left);
var bottom = Math.ceil(box.bottom);
var right = Math.ceil(box.right);
var finalLeft = '0';
var finalTop = '0';
if (!preventOverflow || preventOverflow === 'vertical') {
if (left < 0 && right - overlayRoot.offsetWidth > 0) {
finalLeft = -left + 'px';
}
}
if (!preventOverflow || preventOverflow === 'horizontal') {
if (top < 0 && bottom - overlayRoot.offsetHeight > 0) {
finalTop = -top + 'px';
}
}
(0, _element.setOverlayPosition)(overlayRoot, finalLeft, finalTop);
} else {
(0, _element.resetCssTransform)(overlayRoot);
}
overlayRoot.style.height = (tableHeight === 0 ? tableHeight : tableHeight + 4) + 'px';
overlayRoot.style.width = (tableWidth === 0 ? tableWidth : tableWidth + 4) + 'px';
}
}]);
return TopLeftCornerOverlay;
}(_base2.default);
_base2.default.registerOverlay(_base2.default.CLONE_TOP_LEFT_CORNER, TopLeftCornerOverlay);
exports.default = TopLeftCornerOverlay;
/***/ }),
/* 346 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _border2 = __webpack_require__(302);
var _border3 = _interopRequireDefault(_border2);
var _coords = __webpack_require__(53);
var _coords2 = _interopRequireDefault(_coords);
var _range = __webpack_require__(82);
var _range2 = _interopRequireDefault(_range);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Selection
*/
var Selection = function () {
/**
* @param {Object} settings
* @param {CellRange} cellRange
*/
function Selection(settings, cellRange) {
_classCallCheck(this, Selection);
this.settings = settings;
this.cellRange = cellRange || null;
this.instanceBorders = {};
}
/**
* Each Walkontable clone requires it's own border for every selection. This method creates and returns selection
* borders per instance
*
* @param {Walkontable} wotInstance
* @returns {Border}
*/
_createClass(Selection, [{
key: 'getBorder',
value: function getBorder(wotInstance) {
if (this.instanceBorders[wotInstance.guid]) {
return this.instanceBorders[wotInstance.guid];
}
// where is this returned?
this.instanceBorders[wotInstance.guid] = new _border3.default(wotInstance, this.settings);
}
/**
* Checks if selection is empty
*
* @returns {Boolean}
*/
}, {
key: 'isEmpty',
value: function isEmpty() {
return this.cellRange === null;
}
/**
* Adds a cell coords to the selection
*
* @param {CellCoords} coords
*/
}, {
key: 'add',
value: function add(coords) {
if (this.isEmpty()) {
this.cellRange = new _range2.default(coords, coords, coords);
} else {
this.cellRange.expand(coords);
}
}
/**
* If selection range from or to property equals oldCoords, replace it with newCoords. Return boolean
* information about success
*
* @param {CellCoords} oldCoords
* @param {CellCoords} newCoords
* @returns {Boolean}
*/
}, {
key: 'replace',
value: function replace(oldCoords, newCoords) {
if (!this.isEmpty()) {
if (this.cellRange.from.isEqual(oldCoords)) {
this.cellRange.from = newCoords;
return true;
}
if (this.cellRange.to.isEqual(oldCoords)) {
this.cellRange.to = newCoords;
return true;
}
}
return false;
}
/**
* Clears selection
*/
}, {
key: 'clear',
value: function clear() {
this.cellRange = null;
}
/**
* Returns the top left (TL) and bottom right (BR) selection coordinates
*
* @returns {Array} Returns array of coordinates for example `[1, 1, 5, 5]`
*/
}, {
key: 'getCorners',
value: function getCorners() {
var topLeft = this.cellRange.getTopLeftCorner();
var bottomRight = this.cellRange.getBottomRightCorner();
return [topLeft.row, topLeft.col, bottomRight.row, bottomRight.col];
}
/**
* Adds class name to cell element at given coords
*
* @param {Walkontable} wotInstance Walkontable instance
* @param {Number} sourceRow Cell row coord
* @param {Number} sourceColumn Cell column coord
* @param {String} className Class name
*/
}, {
key: 'addClassAtCoords',
value: function addClassAtCoords(wotInstance, sourceRow, sourceColumn, className) {
var TD = wotInstance.wtTable.getCell(new _coords2.default(sourceRow, sourceColumn));
if ((typeof TD === 'undefined' ? 'undefined' : _typeof(TD)) === 'object') {
(0, _element.addClass)(TD, className);
}
}
/**
* @param wotInstance
*/
}, {
key: 'draw',
value: function draw(wotInstance) {
if (this.isEmpty()) {
if (this.settings.border) {
var border = this.getBorder(wotInstance);
if (border) {
border.disappear();
}
}
return;
}
var renderedRows = wotInstance.wtTable.getRenderedRowsCount();
var renderedColumns = wotInstance.wtTable.getRenderedColumnsCount();
var corners = this.getCorners();
var sourceRow = void 0,
sourceCol = void 0,
TH = void 0;
for (var column = 0; column < renderedColumns; column++) {
sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(column);
if (sourceCol >= corners[1] && sourceCol <= corners[3]) {
TH = wotInstance.wtTable.getColumnHeader(sourceCol);
if (TH) {
var newClasses = [];
if (this.settings.highlightHeaderClassName) {
newClasses.push(this.settings.highlightHeaderClassName);
}
if (this.settings.highlightColumnClassName) {
newClasses.push(this.settings.highlightColumnClassName);
}
(0, _element.addClass)(TH, newClasses);
}
}
}
for (var row = 0; row < renderedRows; row++) {
sourceRow = wotInstance.wtTable.rowFilter.renderedToSource(row);
if (sourceRow >= corners[0] && sourceRow <= corners[2]) {
TH = wotInstance.wtTable.getRowHeader(sourceRow);
if (TH) {
var _newClasses = [];
if (this.settings.highlightHeaderClassName) {
_newClasses.push(this.settings.highlightHeaderClassName);
}
if (this.settings.highlightRowClassName) {
_newClasses.push(this.settings.highlightRowClassName);
}
(0, _element.addClass)(TH, _newClasses);
}
}
for (var _column = 0; _column < renderedColumns; _column++) {
sourceCol = wotInstance.wtTable.columnFilter.renderedToSource(_column);
if (sourceRow >= corners[0] && sourceRow <= corners[2] && sourceCol >= corners[1] && sourceCol <= corners[3]) {
// selected cell
if (this.settings.className) {
this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.className);
}
} else if (sourceRow >= corners[0] && sourceRow <= corners[2]) {
// selection is in this row
if (this.settings.highlightRowClassName) {
this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.highlightRowClassName);
}
} else if (sourceCol >= corners[1] && sourceCol <= corners[3]) {
// selection is in this column
if (this.settings.highlightColumnClassName) {
this.addClassAtCoords(wotInstance, sourceRow, sourceCol, this.settings.highlightColumnClassName);
}
}
}
}
wotInstance.getSetting('onBeforeDrawBorders', corners, this.settings.className);
if (this.settings.border) {
var _border = this.getBorder(wotInstance);
if (_border) {
// warning! border.appear modifies corners!
_border.appear(corners);
}
}
}
}]);
return Selection;
}();
exports.default = Selection;
/***/ }),
/* 347 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* autoResize - resizes a DOM element to the width and height of another DOM element
*
* Copyright 2014, Marcin Warpechowski
* Licensed under the MIT license
*/
function autoResize() {
var defaults = {
minHeight: 200,
maxHeight: 300,
minWidth: 100,
maxWidth: 300
},
el,
body = document.body,
text = document.createTextNode(''),
span = document.createElement('SPAN'),
observe = function observe(element, event, handler) {
if (element.attachEvent) {
element.attachEvent('on' + event, handler);
} else {
element.addEventListener(event, handler, false);
}
},
_unObserve = function _unObserve(element, event, handler) {
if (element.removeEventListener) {
element.removeEventListener(event, handler, false);
} else {
element.detachEvent('on' + event, handler);
}
},
resize = function resize(newChar) {
var width, scrollHeight;
if (!newChar) {
newChar = "";
} else if (!/^[a-zA-Z \.,\\\/\|0-9]$/.test(newChar)) {
newChar = ".";
}
if (text.textContent !== void 0) {
text.textContent = el.value + newChar;
} else {
text.data = el.value + newChar; //IE8
}
span.style.fontSize = getComputedStyle(el).fontSize;
span.style.fontFamily = getComputedStyle(el).fontFamily;
span.style.whiteSpace = "pre";
body.appendChild(span);
width = span.clientWidth + 2;
body.removeChild(span);
el.style.height = defaults.minHeight + 'px';
if (defaults.minWidth > width) {
el.style.width = defaults.minWidth + 'px';
} else if (width > defaults.maxWidth) {
el.style.width = defaults.maxWidth + 'px';
} else {
el.style.width = width + 'px';
}
scrollHeight = el.scrollHeight ? el.scrollHeight - 1 : 0;
if (defaults.minHeight > scrollHeight) {
el.style.height = defaults.minHeight + 'px';
} else if (defaults.maxHeight < scrollHeight) {
el.style.height = defaults.maxHeight + 'px';
el.style.overflowY = 'visible';
} else {
el.style.height = scrollHeight + 'px';
}
},
delayedResize = function delayedResize() {
window.setTimeout(resize, 0);
},
extendDefaults = function extendDefaults(config) {
if (config && config.minHeight) {
if (config.minHeight == 'inherit') {
defaults.minHeight = el.clientHeight;
} else {
var minHeight = parseInt(config.minHeight);
if (!isNaN(minHeight)) {
defaults.minHeight = minHeight;
}
}
}
if (config && config.maxHeight) {
if (config.maxHeight == 'inherit') {
defaults.maxHeight = el.clientHeight;
} else {
var maxHeight = parseInt(config.maxHeight);
if (!isNaN(maxHeight)) {
defaults.maxHeight = maxHeight;
}
}
}
if (config && config.minWidth) {
if (config.minWidth == 'inherit') {
defaults.minWidth = el.clientWidth;
} else {
var minWidth = parseInt(config.minWidth);
if (!isNaN(minWidth)) {
defaults.minWidth = minWidth;
}
}
}
if (config && config.maxWidth) {
if (config.maxWidth == 'inherit') {
defaults.maxWidth = el.clientWidth;
} else {
var maxWidth = parseInt(config.maxWidth);
if (!isNaN(maxWidth)) {
defaults.maxWidth = maxWidth;
}
}
}
if (!span.firstChild) {
span.className = "autoResize";
span.style.display = 'inline-block';
span.appendChild(text);
}
},
_init = function _init(el_, config, doObserve) {
el = el_;
extendDefaults(config);
if (el.nodeName == 'TEXTAREA') {
el.style.resize = 'none';
el.style.overflowY = '';
el.style.height = defaults.minHeight + 'px';
el.style.minWidth = defaults.minWidth + 'px';
el.style.maxWidth = defaults.maxWidth + 'px';
el.style.overflowY = 'hidden';
}
if (doObserve) {
observe(el, 'change', resize);
observe(el, 'cut', delayedResize);
observe(el, 'paste', delayedResize);
observe(el, 'drop', delayedResize);
observe(el, 'keydown', delayedResize);
observe(el, 'focus', resize);
}
resize();
};
function getComputedStyle(element) {
return element.currentStyle || document.defaultView.getComputedStyle(element);
}
return {
init: function init(el_, config, doObserve) {
_init(el_, config, doObserve);
},
unObserve: function unObserve() {
_unObserve(el, 'change', resize);
_unObserve(el, 'cut', delayedResize);
_unObserve(el, 'paste', delayedResize);
_unObserve(el, 'drop', delayedResize);
_unObserve(el, 'keydown', delayedResize);
_unObserve(el, 'focus', resize);
},
resize: resize
};
}
if (true) {
module.exports = autoResize;
}
/***/ }),
/* 348 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _baseEditor = __webpack_require__(47);
var _baseEditor2 = _interopRequireDefault(_baseEditor);
var _element = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @editor CheckboxEditor
* @class CheckboxEditor
*/
var CheckboxEditor = function (_BaseEditor) {
_inherits(CheckboxEditor, _BaseEditor);
function CheckboxEditor() {
_classCallCheck(this, CheckboxEditor);
return _possibleConstructorReturn(this, (CheckboxEditor.__proto__ || Object.getPrototypeOf(CheckboxEditor)).apply(this, arguments));
}
_createClass(CheckboxEditor, [{
key: 'beginEditing',
value: function beginEditing(initialValue, event) {
// Just some events connected with checkbox editor are delegated here. Some `keydown` events like `enter` and `space` key press
// are handled inside `checkboxRenderer`. Some events come here from `editorManager`. Below `if` statement was created by author
// for purpose of handling only `doubleclick` event which may be done on a cell with checkbox.
if (event.type === 'mouseup') {
var checkbox = this.TD.querySelector('input[type="checkbox"]');
if (!(0, _element.hasClass)(checkbox, 'htBadValue')) {
checkbox.click();
}
}
}
}, {
key: 'finishEditing',
value: function finishEditing() {}
}, {
key: 'init',
value: function init() {}
}, {
key: 'open',
value: function open() {}
}, {
key: 'close',
value: function close() {}
}, {
key: 'getValue',
value: function getValue() {}
}, {
key: 'setValue',
value: function setValue() {}
}, {
key: 'focus',
value: function focus() {}
}]);
return CheckboxEditor;
}(_baseEditor2.default);
exports.default = CheckboxEditor;
/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _moment = __webpack_require__(40);
var _moment2 = _interopRequireDefault(_moment);
var _pikaday = __webpack_require__(350);
var _pikaday2 = _interopRequireDefault(_pikaday);
__webpack_require__(351);
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _unicode = __webpack_require__(20);
var _event = __webpack_require__(12);
var _textEditor = __webpack_require__(54);
var _textEditor2 = _interopRequireDefault(_textEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @editor DateEditor
* @class DateEditor
* @dependencies TextEditor moment pikaday
*/
var DateEditor = function (_TextEditor) {
_inherits(DateEditor, _TextEditor);
/**
* @param {Core} hotInstance Handsontable instance
* @private
*/
function DateEditor(hotInstance) {
_classCallCheck(this, DateEditor);
// TODO: Move this option to general settings
var _this = _possibleConstructorReturn(this, (DateEditor.__proto__ || Object.getPrototypeOf(DateEditor)).call(this, hotInstance));
_this.defaultDateFormat = 'DD/MM/YYYY';
_this.isCellEdited = false;
_this.parentDestroyed = false;
return _this;
}
_createClass(DateEditor, [{
key: 'init',
value: function init() {
var _this2 = this;
if (typeof _moment2.default !== 'function') {
throw new Error('You need to include moment.js to your project.');
}
if (typeof _pikaday2.default !== 'function') {
throw new Error('You need to include Pikaday to your project.');
}
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'init', this).call(this);
this.instance.addHook('afterDestroy', function () {
_this2.parentDestroyed = true;
_this2.destroyElements();
});
}
/**
* Create data picker instance
*/
}, {
key: 'createElements',
value: function createElements() {
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'createElements', this).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;
(0, _element.addClass)(this.datePicker, 'htDatepickerHolder');
document.body.appendChild(this.datePicker);
this.$datePicker = new _pikaday2.default(this.getDatePickerConfig());
var eventManager = new _eventManager2.default(this);
/**
* Prevent recognizing clicking on datepicker as clicking outside of table
*/
eventManager.addEventListener(this.datePicker, 'mousedown', function (event) {
return (0, _event.stopPropagation)(event);
});
this.hideDatepicker();
}
/**
* Destroy data picker instance
*/
}, {
key: 'destroyElements',
value: function destroyElements() {
this.$datePicker.destroy();
}
/**
* Prepare editor to appear
*
* @param {Number} row Row index
* @param {Number} col Column index
* @param {String} prop Property name (passed when datasource is an array of objects)
* @param {HTMLTableCellElement} td Table cell element
* @param {*} originalValue Original value
* @param {Object} cellProperties Object with cell properties ({@see Core#getCellMeta})
*/
}, {
key: 'prepare',
value: function prepare(row, col, prop, td, originalValue, cellProperties) {
this._opened = false;
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'prepare', this).call(this, row, col, prop, td, originalValue, cellProperties);
}
/**
* Open editor
*
* @param {Event} [event=null]
*/
}, {
key: 'open',
value: function open() {
var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'open', this).call(this);
this.showDatepicker(event);
}
/**
* Close editor
*/
}, {
key: 'close',
value: function close() {
var _this3 = this;
this._opened = false;
this.instance._registerTimeout(setTimeout(function () {
_this3.instance.selection.refreshBorders();
}, 0));
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'close', this).call(this);
}
/**
* @param {Boolean} [isCancelled=false]
* @param {Boolean} [ctrlDown=false]
*/
}, {
key: 'finishEditing',
value: function finishEditing() {
var isCancelled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var ctrlDown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (isCancelled) {
// pressed ESC, restore original value
// var value = this.instance.getDataAtCell(this.row, this.col);
var value = this.originalValue;
if (value !== void 0) {
this.setValue(value);
}
}
this.hideDatepicker();
_get(DateEditor.prototype.__proto__ || Object.getPrototypeOf(DateEditor.prototype), 'finishEditing', this).call(this, isCancelled, ctrlDown);
}
/**
* Show data picker
*
* @param {Event} event
*/
}, {
key: 'showDatepicker',
value: function showDatepicker(event) {
this.$datePicker.config(this.getDatePickerConfig());
var offset = this.TD.getBoundingClientRect();
var dateFormat = this.cellProperties.dateFormat || this.defaultDateFormat;
var datePickerConfig = this.$datePicker.config();
var dateStr = void 0;
var isMouseDown = this.instance.view.isMouseDown();
var isMeta = event ? (0, _unicode.isMetaKey)(event.keyCode) : false;
this.datePickerStyle.top = window.pageYOffset + offset.top + (0, _element.outerHeight)(this.TD) + 'px';
this.datePickerStyle.left = window.pageXOffset + offset.left + 'px';
this.$datePicker._onInputFocus = function () {};
datePickerConfig.format = dateFormat;
if (this.originalValue) {
dateStr = this.originalValue;
if ((0, _moment2.default)(dateStr, dateFormat, true).isValid()) {
this.$datePicker.setMoment((0, _moment2.default)(dateStr, dateFormat), true);
}
// workaround for date/time cells - pikaday resets the cell value to 12:00 AM by default, this will overwrite the value.
if (this.getValue() !== this.originalValue) {
this.setValue(this.originalValue);
}
if (!isMeta && !isMouseDown) {
this.setValue('');
}
} else if (this.cellProperties.defaultDate) {
dateStr = this.cellProperties.defaultDate;
datePickerConfig.defaultDate = dateStr;
if ((0, _moment2.default)(dateStr, dateFormat, true).isValid()) {
this.$datePicker.setMoment((0, _moment2.default)(dateStr, dateFormat), true);
}
if (!isMeta && !isMouseDown) {
this.setValue('');
}
} else {
// if a default date is not defined, set a soft-default-date: display the current day and month in the
// datepicker, but don't fill the editor input
this.$datePicker.gotoToday();
}
this.datePickerStyle.display = 'block';
this.$datePicker.show();
}
/**
* Hide data picker
*/
}, {
key: 'hideDatepicker',
value: function hideDatepicker() {
this.datePickerStyle.display = 'none';
this.$datePicker.hide();
}
/**
* Get date picker options.
*
* @returns {Object}
*/
}, {
key: 'getDatePickerConfig',
value: function getDatePickerConfig() {
var _this4 = this;
var htInput = this.TEXTAREA;
var options = {};
if (this.cellProperties && this.cellProperties.datePickerConfig) {
(0, _object.deepExtend)(options, this.cellProperties.datePickerConfig);
}
var origOnSelect = options.onSelect;
var origOnClose = options.onClose;
options.field = htInput;
options.trigger = htInput;
options.container = this.datePicker;
options.bound = false;
options.format = options.format || this.defaultDateFormat;
options.reposition = options.reposition || false;
options.onSelect = function (dateStr) {
if (!isNaN(dateStr.getTime())) {
dateStr = (0, _moment2.default)(dateStr).format(_this4.cellProperties.dateFormat || _this4.defaultDateFormat);
}
_this4.setValue(dateStr);
_this4.hideDatepicker();
if (origOnSelect) {
origOnSelect();
}
};
options.onClose = function () {
if (!_this4.parentDestroyed) {
_this4.finishEditing(false);
}
if (origOnClose) {
origOnClose();
}
};
return options;
}
}]);
return DateEditor;
}(_textEditor2.default);
exports.default = DateEditor;
/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {
/*!
* Pikaday
*
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
*/
(function (root, factory)
{
'use strict';
var moment;
if (true) {
// CommonJS module
// Load moment.js as an optional dependency
try { moment = __webpack_require__(40); } catch (e) {}
module.exports = factory(moment);
} else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function (req)
{
// Load moment.js as an optional dependency
var id = 'moment';
try { moment = req(id); } catch (e) {}
return factory(moment);
});
} else {
root.Pikaday = factory(root.moment);
}
}(this, function (moment)
{
'use strict';
/**
* feature detection and helper functions
*/
var hasMoment = typeof moment === 'function',
hasEventListeners = !!window.addEventListener,
document = window.document,
sto = window.setTimeout,
addEvent = function(el, e, callback, capture)
{
if (hasEventListeners) {
el.addEventListener(e, callback, !!capture);
} else {
el.attachEvent('on' + e, callback);
}
},
removeEvent = function(el, e, callback, capture)
{
if (hasEventListeners) {
el.removeEventListener(e, callback, !!capture);
} else {
el.detachEvent('on' + e, callback);
}
},
fireEvent = function(el, eventName, data)
{
var ev;
if (document.createEvent) {
ev = document.createEvent('HTMLEvents');
ev.initEvent(eventName, true, false);
ev = extend(ev, data);
el.dispatchEvent(ev);
} else if (document.createEventObject) {
ev = document.createEventObject();
ev = extend(ev, data);
el.fireEvent('on' + eventName, ev);
}
},
trim = function(str)
{
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g,'');
},
hasClass = function(el, cn)
{
return (' ' + el.className + ' ').indexOf(' ' + cn + ' ') !== -1;
},
addClass = function(el, cn)
{
if (!hasClass(el, cn)) {
el.className = (el.className === '') ? cn : el.className + ' ' + cn;
}
},
removeClass = function(el, cn)
{
el.className = trim((' ' + el.className + ' ').replace(' ' + cn + ' ', ' '));
},
isArray = function(obj)
{
return (/Array/).test(Object.prototype.toString.call(obj));
},
isDate = function(obj)
{
return (/Date/).test(Object.prototype.toString.call(obj)) && !isNaN(obj.getTime());
},
isWeekend = function(date)
{
var day = date.getDay();
return day === 0 || day === 6;
},
isLeapYear = function(year)
{
// solution by Matti Virkkunen: http://stackoverflow.com/a/4881951
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
},
getDaysInMonth = function(year, month)
{
return [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];
},
setToStartOfDay = function(date)
{
if (isDate(date)) date.setHours(0,0,0,0);
},
compareDates = function(a,b)
{
// weak date comparison (use setToStartOfDay(date) to ensure correct result)
return a.getTime() === b.getTime();
},
extend = function(to, from, overwrite)
{
var prop, hasProp;
for (prop in from) {
hasProp = to[prop] !== undefined;
if (hasProp && typeof from[prop] === 'object' && from[prop] !== null && from[prop].nodeName === undefined) {
if (isDate(from[prop])) {
if (overwrite) {
to[prop] = new Date(from[prop].getTime());
}
}
else if (isArray(from[prop])) {
if (overwrite) {
to[prop] = from[prop].slice(0);
}
} else {
to[prop] = extend({}, from[prop], overwrite);
}
} else if (overwrite || !hasProp) {
to[prop] = from[prop];
}
}
return to;
},
adjustCalendar = function(calendar) {
if (calendar.month < 0) {
calendar.year -= Math.ceil(Math.abs(calendar.month)/12);
calendar.month += 12;
}
if (calendar.month > 11) {
calendar.year += Math.floor(Math.abs(calendar.month)/12);
calendar.month -= 12;
}
return calendar;
},
/**
* defaults and localisation
*/
defaults = {
// bind the picker to a form field
field: null,
// automatically show/hide the picker on `field` focus (default `true` if `field` is set)
bound: undefined,
// position of the datepicker, relative to the field (default to bottom & left)
// ('bottom' & 'left' keywords are not used, 'top' & 'right' are modifier on the bottom/left position)
position: 'bottom left',
// automatically fit in the viewport even if it means repositioning from the position option
reposition: true,
// the default output format for `.toString()` and `field` value
format: 'YYYY-MM-DD',
// the initial date to view when first opened
defaultDate: null,
// make the `defaultDate` the initial selected value
setDefaultDate: false,
// first day of week (0: Sunday, 1: Monday etc)
firstDay: 0,
// the default flag for moment's strict date parsing
formatStrict: false,
// the minimum/earliest date that can be selected
minDate: null,
// the maximum/latest date that can be selected
maxDate: null,
// number of years either side, or array of upper/lower range
yearRange: 10,
// show week numbers at head of row
showWeekNumber: false,
// used internally (don't config outside)
minYear: 0,
maxYear: 9999,
minMonth: undefined,
maxMonth: undefined,
startRange: null,
endRange: null,
isRTL: false,
// Additional text to append to the year in the calendar title
yearSuffix: '',
// Render the month after year in the calendar title
showMonthAfterYear: false,
// Render days of the calendar grid that fall in the next or previous month
showDaysInNextAndPreviousMonths: false,
// how many months are visible
numberOfMonths: 1,
// when numberOfMonths is used, this will help you to choose where the main calendar will be (default `left`, can be set to `right`)
// only used for the first display or when a selected date is not visible
mainCalendar: 'left',
// Specify a DOM element to render the calendar in
container: undefined,
// internationalization
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 Classname
theme: null,
// callback function
onSelect: null,
onOpen: null,
onClose: null,
onDraw: null
},
/**
* templating functions to abstract HTML rendering
*/
renderDayName = function(opts, day, abbr)
{
day += opts.firstDay;
while (day >= 7) {
day -= 7;
}
return abbr ? opts.i18n.weekdaysShort[day] : opts.i18n.weekdays[day];
},
renderDay = function(opts)
{
var arr = [];
var ariaSelected = 'false';
if (opts.isEmpty) {
if (opts.showDaysInNextAndPreviousMonths) {
arr.push('is-outside-current-month');
} else {
return '<td class="is-empty"></td>';
}
}
if (opts.isDisabled) {
arr.push('is-disabled');
}
if (opts.isToday) {
arr.push('is-today');
}
if (opts.isSelected) {
arr.push('is-selected');
ariaSelected = 'true';
}
if (opts.isInRange) {
arr.push('is-inrange');
}
if (opts.isStartRange) {
arr.push('is-startrange');
}
if (opts.isEndRange) {
arr.push('is-endrange');
}
return '<td data-day="' + opts.day + '" class="' + arr.join(' ') + '" aria-selected="' + ariaSelected + '">' +
'<button class="pika-button pika-day" type="button" ' +
'data-pika-year="' + opts.year + '" data-pika-month="' + opts.month + '" data-pika-day="' + opts.day + '">' +
opts.day +
'</button>' +
'</td>';
},
renderWeek = function (d, m, y) {
// Lifted from http://javascript.about.com/library/blweekyear.htm, lightly modified.
var onejan = new Date(y, 0, 1),
weekNum = Math.ceil((((new Date(y, m, d) - onejan) / 86400000) + onejan.getDay()+1)/7);
return '<td class="pika-week">' + weekNum + '</td>';
},
renderRow = function(days, isRTL)
{
return '<tr>' + (isRTL ? days.reverse() : days).join('') + '</tr>';
},
renderBody = function(rows)
{
return '<tbody>' + rows.join('') + '</tbody>';
},
renderHead = function(opts)
{
var i, arr = [];
if (opts.showWeekNumber) {
arr.push('<th></th>');
}
for (i = 0; i < 7; i++) {
arr.push('<th scope="col"><abbr title="' + renderDayName(opts, i) + '">' + renderDayName(opts, i, true) + '</abbr></th>');
}
return '<thead><tr>' + (opts.isRTL ? arr.reverse() : arr).join('') + '</tr></thead>';
},
renderTitle = function(instance, c, year, month, refYear, randId)
{
var i, j, arr,
opts = instance._o,
isMinYear = year === opts.minYear,
isMaxYear = year === opts.maxYear,
html = '<div id="' + randId + '" class="pika-title" role="heading" aria-live="assertive">',
monthHtml,
yearHtml,
prev = true,
next = true;
for (arr = [], i = 0; i < 12; i++) {
arr.push('<option value="' + (year === refYear ? i - c : 12 + i - c) + '"' +
(i === month ? ' selected="selected"': '') +
((isMinYear && i < opts.minMonth) || (isMaxYear && i > opts.maxMonth) ? 'disabled="disabled"' : '') + '>' +
opts.i18n.months[i] + '</option>');
}
monthHtml = '<div class="pika-label">' + opts.i18n.months[month] + '<select class="pika-select pika-select-month" tabindex="-1">' + arr.join('') + '</select></div>';
if (isArray(opts.yearRange)) {
i = opts.yearRange[0];
j = opts.yearRange[1] + 1;
} else {
i = year - opts.yearRange;
j = 1 + year + opts.yearRange;
}
for (arr = []; i < j && i <= opts.maxYear; i++) {
if (i >= opts.minYear) {
arr.push('<option value="' + i + '"' + (i === year ? ' selected="selected"': '') + '>' + (i) + '</option>');
}
}
yearHtml = '<div class="pika-label">' + year + opts.yearSuffix + '<select class="pika-select pika-select-year" tabindex="-1">' + arr.join('') + '</select></div>';
if (opts.showMonthAfterYear) {
html += yearHtml + monthHtml;
} else {
html += monthHtml + yearHtml;
}
if (isMinYear && (month === 0 || opts.minMonth >= month)) {
prev = false;
}
if (isMaxYear && (month === 11 || opts.maxMonth <= month)) {
next = false;
}
if (c === 0) {
html += '<button class="pika-prev' + (prev ? '' : ' is-disabled') + '" type="button">' + opts.i18n.previousMonth + '</button>';
}
if (c === (instance._o.numberOfMonths - 1) ) {
html += '<button class="pika-next' + (next ? '' : ' is-disabled') + '" type="button">' + opts.i18n.nextMonth + '</button>';
}
return html += '</div>';
},
renderTable = function(opts, data, randId)
{
return '<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="' + randId + '">' + renderHead(opts) + renderBody(data) + '</table>';
},
/**
* Pikaday constructor
*/
Pikaday = function(options)
{
var self = this,
opts = self.config(options);
self._onMouseDown = function(e)
{
if (!self._v) {
return;
}
e = e || window.event;
var target = e.target || e.srcElement;
if (!target) {
return;
}
if (!hasClass(target, 'is-disabled')) {
if (hasClass(target, 'pika-button') && !hasClass(target, 'is-empty') && !hasClass(target.parentNode, 'is-disabled')) {
self.setDate(new Date(target.getAttribute('data-pika-year'), target.getAttribute('data-pika-month'), target.getAttribute('data-pika-day')));
if (opts.bound) {
sto(function() {
self.hide();
if (opts.field) {
opts.field.blur();
}
}, 100);
}
}
else if (hasClass(target, 'pika-prev')) {
self.prevMonth();
}
else if (hasClass(target, 'pika-next')) {
self.nextMonth();
}
}
if (!hasClass(target, 'pika-select')) {
// if this is touch event prevent mouse events emulation
if (e.preventDefault) {
e.preventDefault();
} else {
e.returnValue = false;
return false;
}
} else {
self._c = true;
}
};
self._onChange = function(e)
{
e = e || window.event;
var target = e.target || e.srcElement;
if (!target) {
return;
}
if (hasClass(target, 'pika-select-month')) {
self.gotoMonth(target.value);
}
else if (hasClass(target, 'pika-select-year')) {
self.gotoYear(target.value);
}
};
self._onKeyChange = function(e)
{
e = e || window.event;
if (self.isVisible()) {
switch(e.keyCode){
case 13:
case 27:
opts.field.blur();
break;
case 37:
e.preventDefault();
self.adjustDate('subtract', 1);
break;
case 38:
self.adjustDate('subtract', 7);
break;
case 39:
self.adjustDate('add', 1);
break;
case 40:
self.adjustDate('add', 7);
break;
}
}
};
self._onInputChange = function(e)
{
var date;
if (e.firedBy === self) {
return;
}
if (hasMoment) {
date = moment(opts.field.value, opts.format, opts.formatStrict);
date = (date && date.isValid()) ? date.toDate() : null;
}
else {
date = new Date(Date.parse(opts.field.value));
}
if (isDate(date)) {
self.setDate(date);
}
if (!self._v) {
self.show();
}
};
self._onInputFocus = function()
{
self.show();
};
self._onInputClick = function()
{
self.show();
};
self._onInputBlur = function()
{
// IE allows pika div to gain focus; catch blur the input field
var pEl = document.activeElement;
do {
if (hasClass(pEl, 'pika-single')) {
return;
}
}
while ((pEl = pEl.parentNode));
if (!self._c) {
self._b = sto(function() {
self.hide();
}, 50);
}
self._c = false;
};
self._onClick = function(e)
{
e = e || window.event;
var target = e.target || e.srcElement,
pEl = target;
if (!target) {
return;
}
if (!hasEventListeners && hasClass(target, 'pika-select')) {
if (!target.onchange) {
target.setAttribute('onchange', 'return;');
addEvent(target, 'change', self._onChange);
}
}
do {
if (hasClass(pEl, 'pika-single') || pEl === opts.trigger) {
return;
}
}
while ((pEl = pEl.parentNode));
if (self._v && target !== opts.trigger && pEl !== opts.trigger) {
self.hide();
}
};
self.el = document.createElement('div');
self.el.className = 'pika-single' + (opts.isRTL ? ' is-rtl' : '') + (opts.theme ? ' ' + opts.theme : '');
addEvent(self.el, 'mousedown', self._onMouseDown, true);
addEvent(self.el, 'touchend', self._onMouseDown, true);
addEvent(self.el, 'change', self._onChange);
addEvent(document, 'keydown', self._onKeyChange);
if (opts.field) {
if (opts.container) {
opts.container.appendChild(self.el);
} else if (opts.bound) {
document.body.appendChild(self.el);
} else {
opts.field.parentNode.insertBefore(self.el, opts.field.nextSibling);
}
addEvent(opts.field, 'change', self._onInputChange);
if (!opts.defaultDate) {
if (hasMoment && opts.field.value) {
opts.defaultDate = moment(opts.field.value, opts.format).toDate();
} else {
opts.defaultDate = new Date(Date.parse(opts.field.value));
}
opts.setDefaultDate = true;
}
}
var defDate = opts.defaultDate;
if (isDate(defDate)) {
if (opts.setDefaultDate) {
self.setDate(defDate, true);
} else {
self.gotoDate(defDate);
}
} else {
self.gotoDate(new Date());
}
if (opts.bound) {
this.hide();
self.el.className += ' is-bound';
addEvent(opts.trigger, 'click', self._onInputClick);
addEvent(opts.trigger, 'focus', self._onInputFocus);
addEvent(opts.trigger, 'blur', self._onInputBlur);
} else {
this.show();
}
};
/**
* public Pikaday API
*/
Pikaday.prototype = {
/**
* configure functionality
*/
config: function(options)
{
if (!this._o) {
this._o = extend({}, defaults, true);
}
var opts = extend(this._o, options, true);
opts.isRTL = !!opts.isRTL;
opts.field = (opts.field && opts.field.nodeName) ? opts.field : null;
opts.theme = (typeof opts.theme) === 'string' && opts.theme ? opts.theme : null;
opts.bound = !!(opts.bound !== undefined ? opts.field && opts.bound : opts.field);
opts.trigger = (opts.trigger && opts.trigger.nodeName) ? opts.trigger : opts.field;
opts.disableWeekends = !!opts.disableWeekends;
opts.disableDayFn = (typeof opts.disableDayFn) === 'function' ? opts.disableDayFn : null;
var nom = parseInt(opts.numberOfMonths, 10) || 1;
opts.numberOfMonths = nom > 4 ? 4 : nom;
if (!isDate(opts.minDate)) {
opts.minDate = false;
}
if (!isDate(opts.maxDate)) {
opts.maxDate = false;
}
if ((opts.minDate && opts.maxDate) && opts.maxDate < opts.minDate) {
opts.maxDate = opts.minDate = false;
}
if (opts.minDate) {
this.setMinDate(opts.minDate);
}
if (opts.maxDate) {
this.setMaxDate(opts.maxDate);
}
if (isArray(opts.yearRange)) {
var fallback = new Date().getFullYear() - 10;
opts.yearRange[0] = parseInt(opts.yearRange[0], 10) || fallback;
opts.yearRange[1] = parseInt(opts.yearRange[1], 10) || fallback;
} else {
opts.yearRange = Math.abs(parseInt(opts.yearRange, 10)) || defaults.yearRange;
if (opts.yearRange > 100) {
opts.yearRange = 100;
}
}
return opts;
},
/**
* return a formatted string of the current selection (using Moment.js if available)
*/
toString: function(format)
{
return !isDate(this._d) ? '' : hasMoment ? moment(this._d).format(format || this._o.format) : this._d.toDateString();
},
/**
* return a Moment.js object of the current selection (if available)
*/
getMoment: function()
{
return hasMoment ? moment(this._d) : null;
},
/**
* set the current selection from a Moment.js object (if available)
*/
setMoment: function(date, preventOnSelect)
{
if (hasMoment && moment.isMoment(date)) {
this.setDate(date.toDate(), preventOnSelect);
}
},
/**
* return a Date object of the current selection with fallback for the current date
*/
getDate: function()
{
return isDate(this._d) ? new Date(this._d.getTime()) : new Date();
},
/**
* set the current selection
*/
setDate: function(date, preventOnSelect)
{
if (!date) {
this._d = null;
if (this._o.field) {
this._o.field.value = '';
fireEvent(this._o.field, 'change', { firedBy: this });
}
return this.draw();
}
if (typeof date === 'string') {
date = new Date(Date.parse(date));
}
if (!isDate(date)) {
return;
}
var min = this._o.minDate,
max = this._o.maxDate;
if (isDate(min) && date < min) {
date = min;
} else if (isDate(max) && date > max) {
date = max;
}
this._d = new Date(date.getTime());
setToStartOfDay(this._d);
this.gotoDate(this._d);
if (this._o.field) {
this._o.field.value = this.toString();
fireEvent(this._o.field, 'change', { firedBy: this });
}
if (!preventOnSelect && typeof this._o.onSelect === 'function') {
this._o.onSelect.call(this, this.getDate());
}
},
/**
* change view to a specific date
*/
gotoDate: function(date)
{
var newCalendar = true;
if (!isDate(date)) {
return;
}
if (this.calendars) {
var firstVisibleDate = new Date(this.calendars[0].year, this.calendars[0].month, 1),
lastVisibleDate = new Date(this.calendars[this.calendars.length-1].year, this.calendars[this.calendars.length-1].month, 1),
visibleDate = date.getTime();
// get the end of the month
lastVisibleDate.setMonth(lastVisibleDate.getMonth()+1);
lastVisibleDate.setDate(lastVisibleDate.getDate()-1);
newCalendar = (visibleDate < firstVisibleDate.getTime() || lastVisibleDate.getTime() < visibleDate);
}
if (newCalendar) {
this.calendars = [{
month: date.getMonth(),
year: date.getFullYear()
}];
if (this._o.mainCalendar === 'right') {
this.calendars[0].month += 1 - this._o.numberOfMonths;
}
}
this.adjustCalendars();
},
adjustDate: function(sign, days) {
var day = this.getDate();
var difference = parseInt(days)*24*60*60*1000;
var newDay;
if (sign === 'add') {
newDay = new Date(day.valueOf() + difference);
} else if (sign === 'subtract') {
newDay = new Date(day.valueOf() - difference);
}
if (hasMoment) {
if (sign === 'add') {
newDay = moment(day).add(days, "days").toDate();
} else if (sign === 'subtract') {
newDay = moment(day).subtract(days, "days").toDate();
}
}
this.setDate(newDay);
},
adjustCalendars: function() {
this.calendars[0] = adjustCalendar(this.calendars[0]);
for (var c = 1; c < this._o.numberOfMonths; c++) {
this.calendars[c] = adjustCalendar({
month: this.calendars[0].month + c,
year: this.calendars[0].year
});
}
this.draw();
},
gotoToday: function()
{
this.gotoDate(new Date());
},
/**
* change view to a specific month (zero-index, e.g. 0: January)
*/
gotoMonth: function(month)
{
if (!isNaN(month)) {
this.calendars[0].month = parseInt(month, 10);
this.adjustCalendars();
}
},
nextMonth: function()
{
this.calendars[0].month++;
this.adjustCalendars();
},
prevMonth: function()
{
this.calendars[0].month--;
this.adjustCalendars();
},
/**
* change view to a specific full year (e.g. "2012")
*/
gotoYear: function(year)
{
if (!isNaN(year)) {
this.calendars[0].year = parseInt(year, 10);
this.adjustCalendars();
}
},
/**
* change the minDate
*/
setMinDate: function(value)
{
if(value instanceof Date) {
setToStartOfDay(value);
this._o.minDate = value;
this._o.minYear = value.getFullYear();
this._o.minMonth = value.getMonth();
} else {
this._o.minDate = defaults.minDate;
this._o.minYear = defaults.minYear;
this._o.minMonth = defaults.minMonth;
this._o.startRange = defaults.startRange;
}
this.draw();
},
/**
* change the maxDate
*/
setMaxDate: function(value)
{
if(value instanceof Date) {
setToStartOfDay(value);
this._o.maxDate = value;
this._o.maxYear = value.getFullYear();
this._o.maxMonth = value.getMonth();
} else {
this._o.maxDate = defaults.maxDate;
this._o.maxYear = defaults.maxYear;
this._o.maxMonth = defaults.maxMonth;
this._o.endRange = defaults.endRange;
}
this.draw();
},
setStartRange: function(value)
{
this._o.startRange = value;
},
setEndRange: function(value)
{
this._o.endRange = value;
},
/**
* refresh the HTML
*/
draw: function(force)
{
if (!this._v && !force) {
return;
}
var opts = this._o,
minYear = opts.minYear,
maxYear = opts.maxYear,
minMonth = opts.minMonth,
maxMonth = opts.maxMonth,
html = '',
randId;
if (this._y <= minYear) {
this._y = minYear;
if (!isNaN(minMonth) && this._m < minMonth) {
this._m = minMonth;
}
}
if (this._y >= maxYear) {
this._y = maxYear;
if (!isNaN(maxMonth) && this._m > maxMonth) {
this._m = maxMonth;
}
}
randId = 'pika-title-' + Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
for (var c = 0; c < opts.numberOfMonths; c++) {
html += '<div class="pika-lendar">' + renderTitle(this, c, this.calendars[c].year, this.calendars[c].month, this.calendars[0].year, randId) + this.render(this.calendars[c].year, this.calendars[c].month, randId) + '</div>';
}
this.el.innerHTML = html;
if (opts.bound) {
if(opts.field.type !== 'hidden') {
sto(function() {
opts.trigger.focus();
}, 1);
}
}
if (typeof this._o.onDraw === 'function') {
this._o.onDraw(this);
}
if (opts.bound) {
// let the screen reader user know to use arrow keys
opts.field.setAttribute('aria-label', 'Use the arrow keys to pick a date');
}
},
adjustPosition: function()
{
var field, pEl, width, height, viewportWidth, viewportHeight, scrollTop, left, top, clientRect;
if (this._o.container) return;
this.el.style.position = 'absolute';
field = this._o.trigger;
pEl = field;
width = this.el.offsetWidth;
height = this.el.offsetHeight;
viewportWidth = window.innerWidth || document.documentElement.clientWidth;
viewportHeight = window.innerHeight || document.documentElement.clientHeight;
scrollTop = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
if (typeof field.getBoundingClientRect === 'function') {
clientRect = field.getBoundingClientRect();
left = clientRect.left + window.pageXOffset;
top = clientRect.bottom + window.pageYOffset;
} else {
left = pEl.offsetLeft;
top = pEl.offsetTop + pEl.offsetHeight;
while((pEl = pEl.offsetParent)) {
left += pEl.offsetLeft;
top += pEl.offsetTop;
}
}
// default position is bottom & left
if ((this._o.reposition && left + width > viewportWidth) ||
(
this._o.position.indexOf('right') > -1 &&
left - width + field.offsetWidth > 0
)
) {
left = left - width + field.offsetWidth;
}
if ((this._o.reposition && top + height > viewportHeight + scrollTop) ||
(
this._o.position.indexOf('top') > -1 &&
top - height - field.offsetHeight > 0
)
) {
top = top - height - field.offsetHeight;
}
this.el.style.left = left + 'px';
this.el.style.top = top + 'px';
},
/**
* render HTML for a particular month
*/
render: function(year, month, randId)
{
var opts = this._o,
now = new Date(),
days = getDaysInMonth(year, month),
before = new Date(year, month, 1).getDay(),
data = [],
row = [];
setToStartOfDay(now);
if (opts.firstDay > 0) {
before -= opts.firstDay;
if (before < 0) {
before += 7;
}
}
var previousMonth = month === 0 ? 11 : month - 1,
nextMonth = month === 11 ? 0 : month + 1,
yearOfPreviousMonth = month === 0 ? year - 1 : year,
yearOfNextMonth = month === 11 ? year + 1 : year,
daysInPreviousMonth = getDaysInMonth(yearOfPreviousMonth, previousMonth);
var cells = days + before,
after = cells;
while(after > 7) {
after -= 7;
}
cells += 7 - after;
for (var i = 0, r = 0; i < cells; i++)
{
var day = new Date(year, month, 1 + (i - before)),
isSelected = isDate(this._d) ? compareDates(day, this._d) : false,
isToday = compareDates(day, now),
isEmpty = i < before || i >= (days + before),
dayNumber = 1 + (i - before),
monthNumber = month,
yearNumber = year,
isStartRange = opts.startRange && compareDates(opts.startRange, day),
isEndRange = opts.endRange && compareDates(opts.endRange, day),
isInRange = opts.startRange && opts.endRange && opts.startRange < day && day < opts.endRange,
isDisabled = (opts.minDate && day < opts.minDate) ||
(opts.maxDate && day > opts.maxDate) ||
(opts.disableWeekends && isWeekend(day)) ||
(opts.disableDayFn && opts.disableDayFn(day));
if (isEmpty) {
if (i < before) {
dayNumber = daysInPreviousMonth + dayNumber;
monthNumber = previousMonth;
yearNumber = yearOfPreviousMonth;
} else {
dayNumber = dayNumber - days;
monthNumber = nextMonth;
yearNumber = yearOfNextMonth;
}
}
var dayConfig = {
day: dayNumber,
month: monthNumber,
year: yearNumber,
isSelected: isSelected,
isToday: isToday,
isDisabled: isDisabled,
isEmpty: isEmpty,
isStartRange: isStartRange,
isEndRange: isEndRange,
isInRange: isInRange,
showDaysInNextAndPreviousMonths: opts.showDaysInNextAndPreviousMonths
};
row.push(renderDay(dayConfig));
if (++r === 7) {
if (opts.showWeekNumber) {
row.unshift(renderWeek(i - before, month, year));
}
data.push(renderRow(row, opts.isRTL));
row = [];
r = 0;
}
}
return renderTable(opts, data, randId);
},
isVisible: function()
{
return this._v;
},
show: function()
{
if (!this.isVisible()) {
removeClass(this.el, 'is-hidden');
this._v = true;
this.draw();
if (this._o.bound) {
addEvent(document, 'click', this._onClick);
this.adjustPosition();
}
if (typeof this._o.onOpen === 'function') {
this._o.onOpen.call(this);
}
}
},
hide: function()
{
var v = this._v;
if (v !== false) {
if (this._o.bound) {
removeEvent(document, 'click', this._onClick);
}
this.el.style.position = 'static'; // reset
this.el.style.left = 'auto';
this.el.style.top = 'auto';
addClass(this.el, 'is-hidden');
this._v = false;
if (v !== undefined && typeof this._o.onClose === 'function') {
this._o.onClose.call(this);
}
}
},
/**
* GAME OVER
*/
destroy: function()
{
this.hide();
removeEvent(this.el, 'mousedown', this._onMouseDown, true);
removeEvent(this.el, 'touchend', this._onMouseDown, true);
removeEvent(this.el, 'change', this._onChange);
if (this._o.field) {
removeEvent(this._o.field, 'change', this._onInputChange);
if (this._o.bound) {
removeEvent(this._o.trigger, 'click', this._onInputClick);
removeEvent(this._o.trigger, 'focus', this._onInputFocus);
removeEvent(this._o.trigger, 'blur', this._onInputBlur);
}
}
if (this.el.parentNode) {
this.el.parentNode.removeChild(this.el);
}
}
};
return Pikaday;
}));
/***/ }),
/* 351 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 352 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _autocompleteEditor = __webpack_require__(303);
var _autocompleteEditor2 = _interopRequireDefault(_autocompleteEditor);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @editor DropdownEditor
* @class DropdownEditor
* @dependencies AutocompleteEditor
*/
var DropdownEditor = function (_AutocompleteEditor) {
_inherits(DropdownEditor, _AutocompleteEditor);
function DropdownEditor() {
_classCallCheck(this, DropdownEditor);
return _possibleConstructorReturn(this, (DropdownEditor.__proto__ || Object.getPrototypeOf(DropdownEditor)).apply(this, arguments));
}
_createClass(DropdownEditor, [{
key: 'prepare',
value: function prepare(row, col, prop, td, originalValue, cellProperties) {
_get(DropdownEditor.prototype.__proto__ || Object.getPrototypeOf(DropdownEditor.prototype), 'prepare', this).call(this, row, col, prop, td, originalValue, cellProperties);
this.cellProperties.filter = false;
this.cellProperties.strict = true;
}
}]);
return DropdownEditor;
}(_autocompleteEditor2.default);
_pluginHooks2.default.getSingleton().add('beforeValidate', function (value, row, col, source) {
var cellMeta = this.getCellMeta(row, this.propToCol(col));
if (cellMeta.editor === DropdownEditor) {
if (cellMeta.strict === void 0) {
cellMeta.filter = false;
cellMeta.strict = true;
}
}
});
exports.default = DropdownEditor;
/***/ }),
/* 353 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _unicode = __webpack_require__(20);
var _event = __webpack_require__(12);
var _element = __webpack_require__(0);
var _baseEditor = __webpack_require__(47);
var _baseEditor2 = _interopRequireDefault(_baseEditor);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var MobileTextEditor = _baseEditor2.default.prototype.extend();
var domDimensionsCache = {};
/**
* @private
* @editor MobileTextEditor
* @class MobileTextEditor
*/
var createControls = function createControls() {
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 button in this.controls) {
if (Object.prototype.hasOwnProperty.call(this.controls, button)) {
this.positionControls.appendChild(this.controls[button]);
}
}
};
MobileTextEditor.prototype.valueChanged = function () {
return this.initValue != this.getValue();
};
MobileTextEditor.prototype.init = function () {
var that = this;
this.eventManager = new _eventManager2.default(this.instance);
this.createElements();
this.bindEvents();
this.instance.addHook('afterDestroy', function () {
that.destroy();
});
};
MobileTextEditor.prototype.getValue = function () {
return this.TEXTAREA.value;
};
MobileTextEditor.prototype.setValue = function (newValue) {
this.initValue = newValue;
this.TEXTAREA.value = newValue;
};
MobileTextEditor.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');
(0, _element.addClass)(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);
createControls.call(this);
document.body.appendChild(this.editorContainer);
};
MobileTextEditor.prototype.onBeforeKeyDown = function (event) {
var instance = this;
var that = instance.getActiveEditor();
if (event.target !== that.TEXTAREA || (0, _event.isImmediatePropagationStopped)(event)) {
return;
}
switch (event.keyCode) {
case _unicode.KEY_CODES.ENTER:
that.close();
event.preventDefault(); // don't add newline to field
break;
case _unicode.KEY_CODES.BACKSPACE:
(0, _event.stopImmediatePropagation)(event); // backspace, delete, home, end should only work locally when cell is edited (not in table context)
break;
default:
break;
}
};
MobileTextEditor.prototype.open = function () {
this.instance.addHook('beforeKeyDown', this.onBeforeKeyDown);
(0, _element.addClass)(this.editorContainer, 'active');
(0, _element.removeClass)(this.cellPointer, 'hidden');
this.updateEditorPosition();
};
MobileTextEditor.prototype.focus = function () {
this.TEXTAREA.focus();
(0, _element.setCaretPosition)(this.TEXTAREA, this.TEXTAREA.value.length);
};
MobileTextEditor.prototype.close = function () {
this.TEXTAREA.blur();
this.instance.removeHook('beforeKeyDown', this.onBeforeKeyDown);
(0, _element.removeClass)(this.editorContainer, 'active');
};
MobileTextEditor.prototype.scrollToView = function () {
var coords = this.instance.getSelectedRange().highlight;
this.instance.view.scrollViewport(coords);
};
MobileTextEditor.prototype.hideCellPointer = function () {
if (!(0, _element.hasClass)(this.cellPointer, 'hidden')) {
(0, _element.addClass)(this.cellPointer, 'hidden');
}
};
MobileTextEditor.prototype.updateEditorPosition = function (x, y) {
if (x && y) {
x = parseInt(x, 10);
y = parseInt(y, 10);
this.editorContainer.style.top = y + 'px';
this.editorContainer.style.left = x + 'px';
} else {
var selection = this.instance.getSelected(),
selectedCell = this.instance.getCell(selection[0], selection[1]);
// cache sizes
if (!domDimensionsCache.cellPointer) {
domDimensionsCache.cellPointer = {
height: (0, _element.outerHeight)(this.cellPointer),
width: (0, _element.outerWidth)(this.cellPointer)
};
}
if (!domDimensionsCache.editorContainer) {
domDimensionsCache.editorContainer = {
width: (0, _element.outerWidth)(this.editorContainer)
};
}
if (selectedCell !== undefined) {
var scrollLeft = this.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer == window ? 0 : (0, _element.getScrollLeft)(this.instance.view.wt.wtOverlays.leftOverlay.holder);
var scrollTop = this.instance.view.wt.wtOverlays.topOverlay.trimmingContainer == window ? 0 : (0, _element.getScrollTop)(this.instance.view.wt.wtOverlays.topOverlay.holder);
var selectedCellOffset = (0, _element.offset)(selectedCell),
selectedCellWidth = (0, _element.outerWidth)(selectedCell),
currentScrollPosition = {
x: scrollLeft,
y: scrollTop
};
this.editorContainer.style.top = parseInt(selectedCellOffset.top + (0, _element.outerHeight)(selectedCell) - currentScrollPosition.y + domDimensionsCache.cellPointer.height, 10) + 'px';
this.editorContainer.style.left = parseInt(window.innerWidth / 2 - domDimensionsCache.editorContainer.width / 2, 10) + 'px';
if (selectedCellOffset.left + selectedCellWidth / 2 > parseInt(this.editorContainer.style.left, 10) + domDimensionsCache.editorContainer.width) {
this.editorContainer.style.left = window.innerWidth - domDimensionsCache.editorContainer.width + 'px';
} else if (selectedCellOffset.left + selectedCellWidth / 2 < parseInt(this.editorContainer.style.left, 10) + 20) {
this.editorContainer.style.left = 0 + 'px';
}
this.cellPointer.style.left = parseInt(selectedCellOffset.left - domDimensionsCache.cellPointer.width / 2 - (0, _element.offset)(this.editorContainer).left + selectedCellWidth / 2 - currentScrollPosition.x, 10) + 'px';
}
}
};
MobileTextEditor.prototype.updateEditorData = function () {
var selected = this.instance.getSelected(),
selectedValue = this.instance.getDataAtCell(selected[0], selected[1]);
this.row = selected[0];
this.col = selected[1];
this.setValue(selectedValue);
this.updateEditorPosition();
};
MobileTextEditor.prototype.prepareAndSave = function () {
var val;
if (!this.valueChanged()) {
return;
}
if (this.instance.getSettings().trimWhitespace) {
val = [[String.prototype.trim.call(this.getValue())]];
} else {
val = [[this.getValue()]];
}
this.saveValue(val);
};
MobileTextEditor.prototype.bindEvents = function () {
var that = this;
this.eventManager.addEventListener(this.controls.leftButton, 'touchend', function (event) {
that.prepareAndSave();
that.instance.selection.transformStart(0, -1, null, true);
that.updateEditorData();
event.preventDefault();
});
this.eventManager.addEventListener(this.controls.rightButton, 'touchend', function (event) {
that.prepareAndSave();
that.instance.selection.transformStart(0, 1, null, true);
that.updateEditorData();
event.preventDefault();
});
this.eventManager.addEventListener(this.controls.upButton, 'touchend', function (event) {
that.prepareAndSave();
that.instance.selection.transformStart(-1, 0, null, true);
that.updateEditorData();
event.preventDefault();
});
this.eventManager.addEventListener(this.controls.downButton, 'touchend', function (event) {
that.prepareAndSave();
that.instance.selection.transformStart(1, 0, null, true);
that.updateEditorData();
event.preventDefault();
});
this.eventManager.addEventListener(this.moveHandle, 'touchstart', function (event) {
if (event.touches.length == 1) {
var touch = event.touches[0];
var onTouchPosition = {
x: that.editorContainer.offsetLeft,
y: that.editorContainer.offsetTop
};
var onTouchOffset = {
x: touch.pageX - onTouchPosition.x,
y: touch.pageY - onTouchPosition.y
};
that.eventManager.addEventListener(this, 'touchmove', function (event) {
var touch = event.touches[0];
that.updateEditorPosition(touch.pageX - onTouchOffset.x, touch.pageY - onTouchOffset.y);
that.hideCellPointer();
event.preventDefault();
});
}
});
this.eventManager.addEventListener(document.body, 'touchend', function (event) {
if (!(0, _element.isChildOf)(event.target, that.editorContainer) && !(0, _element.isChildOf)(event.target, that.instance.rootElement)) {
that.close();
}
});
this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.leftOverlay.holder, 'scroll', function (event) {
if (that.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer != window) {
that.hideCellPointer();
}
});
this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.topOverlay.holder, 'scroll', function (event) {
if (that.instance.view.wt.wtOverlays.topOverlay.trimmingContainer != window) {
that.hideCellPointer();
}
});
};
MobileTextEditor.prototype.destroy = function () {
this.eventManager.clear();
this.editorContainer.parentNode.removeChild(this.editorContainer);
};
exports.default = MobileTextEditor;
/***/ }),
/* 354 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _textEditor = __webpack_require__(54);
var _textEditor2 = _interopRequireDefault(_textEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @editor NumericEditor
* @class NumericEditor
*/
var NumericEditor = function (_TextEditor) {
_inherits(NumericEditor, _TextEditor);
function NumericEditor() {
_classCallCheck(this, NumericEditor);
return _possibleConstructorReturn(this, (NumericEditor.__proto__ || Object.getPrototypeOf(NumericEditor)).apply(this, arguments));
}
return NumericEditor;
}(_textEditor2.default);
exports.default = NumericEditor;
/***/ }),
/* 355 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _element = __webpack_require__(0);
var _textEditor = __webpack_require__(54);
var _textEditor2 = _interopRequireDefault(_textEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @editor PasswordEditor
* @class PasswordEditor
* @dependencies TextEditor
*/
var PasswordEditor = function (_TextEditor) {
_inherits(PasswordEditor, _TextEditor);
function PasswordEditor() {
_classCallCheck(this, PasswordEditor);
return _possibleConstructorReturn(this, (PasswordEditor.__proto__ || Object.getPrototypeOf(PasswordEditor)).apply(this, arguments));
}
_createClass(PasswordEditor, [{
key: 'createElements',
value: function createElements() {
_get(PasswordEditor.prototype.__proto__ || Object.getPrototypeOf(PasswordEditor.prototype), 'createElements', this).call(this);
this.TEXTAREA = document.createElement('input');
this.TEXTAREA.setAttribute('type', 'password');
this.TEXTAREA.className = 'handsontableInput';
this.textareaStyle = this.TEXTAREA.style;
this.textareaStyle.width = 0;
this.textareaStyle.height = 0;
(0, _element.empty)(this.TEXTAREA_PARENT);
this.TEXTAREA_PARENT.appendChild(this.TEXTAREA);
}
}]);
return PasswordEditor;
}(_textEditor2.default);
exports.default = PasswordEditor;
/***/ }),
/* 356 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _element = __webpack_require__(0);
var _event = __webpack_require__(12);
var _unicode = __webpack_require__(20);
var _baseEditor = __webpack_require__(47);
var _baseEditor2 = _interopRequireDefault(_baseEditor);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var SelectEditor = _baseEditor2.default.prototype.extend();
/**
* @private
* @editor SelectEditor
* @class SelectEditor
*/
SelectEditor.prototype.init = function () {
this.select = document.createElement('SELECT');
(0, _element.addClass)(this.select, 'htSelectEditor');
this.select.style.display = 'none';
this.instance.rootElement.appendChild(this.select);
this.registerHooks();
};
SelectEditor.prototype.registerHooks = function () {
var _this = this;
this.instance.addHook('afterScrollHorizontally', function () {
return _this.refreshDimensions();
});
this.instance.addHook('afterScrollVertically', function () {
return _this.refreshDimensions();
});
this.instance.addHook('afterColumnResize', function () {
return _this.refreshDimensions();
});
this.instance.addHook('afterRowResize', function () {
return _this.refreshDimensions();
});
};
SelectEditor.prototype.prepare = function () {
_baseEditor2.default.prototype.prepare.apply(this, arguments);
var selectOptions = this.cellProperties.selectOptions;
var options;
if (typeof selectOptions == 'function') {
options = this.prepareOptions(selectOptions(this.row, this.col, this.prop));
} else {
options = this.prepareOptions(selectOptions);
}
(0, _element.empty)(this.select);
for (var option in options) {
if (Object.prototype.hasOwnProperty.call(options, option)) {
var optionElement = document.createElement('OPTION');
optionElement.value = option;
(0, _element.fastInnerHTML)(optionElement, options[option]);
this.select.appendChild(optionElement);
}
}
};
SelectEditor.prototype.prepareOptions = function (optionsToPrepare) {
var preparedOptions = {};
if (Array.isArray(optionsToPrepare)) {
for (var i = 0, len = optionsToPrepare.length; i < len; i++) {
preparedOptions[optionsToPrepare[i]] = optionsToPrepare[i];
}
} else if ((typeof optionsToPrepare === 'undefined' ? 'undefined' : _typeof(optionsToPrepare)) == 'object') {
preparedOptions = optionsToPrepare;
}
return preparedOptions;
};
SelectEditor.prototype.getValue = function () {
return this.select.value;
};
SelectEditor.prototype.setValue = function (value) {
this.select.value = value;
};
var onBeforeKeyDown = function onBeforeKeyDown(event) {
var instance = this;
var editor = instance.getActiveEditor();
switch (event.keyCode) {
case _unicode.KEY_CODES.ARROW_UP:
var previousOptionIndex = editor.select.selectedIndex - 1;
if (previousOptionIndex >= 0) {
editor.select[previousOptionIndex].selected = true;
}
(0, _event.stopImmediatePropagation)(event);
event.preventDefault();
break;
case _unicode.KEY_CODES.ARROW_DOWN:
var nextOptionIndex = editor.select.selectedIndex + 1;
if (nextOptionIndex <= editor.select.length - 1) {
editor.select[nextOptionIndex].selected = true;
}
(0, _event.stopImmediatePropagation)(event);
event.preventDefault();
break;
default:
break;
}
};
SelectEditor.prototype.open = function () {
this._opened = true;
this.refreshDimensions();
this.select.style.display = '';
this.instance.addHook('beforeKeyDown', onBeforeKeyDown);
};
SelectEditor.prototype.close = function () {
this._opened = false;
this.select.style.display = 'none';
this.instance.removeHook('beforeKeyDown', onBeforeKeyDown);
};
SelectEditor.prototype.focus = function () {
this.select.focus();
};
SelectEditor.prototype.refreshValue = function () {
var sourceData = this.instance.getSourceDataAtCell(this.row, this.prop);
this.originalValue = sourceData;
this.setValue(sourceData);
this.refreshDimensions();
};
SelectEditor.prototype.refreshDimensions = function () {
if (this.state !== _baseEditor.EditorState.EDITING) {
return;
}
this.TD = this.getEditedCell();
// TD is outside of the viewport.
if (!this.TD) {
this.close();
return;
}
var width = (0, _element.outerWidth)(this.TD) + 1,
height = (0, _element.outerHeight)(this.TD) + 1,
currentOffset = (0, _element.offset)(this.TD),
containerOffset = (0, _element.offset)(this.instance.rootElement),
scrollableContainer = (0, _element.getScrollableElement)(this.TD),
editTop = currentOffset.top - containerOffset.top - 1 - (scrollableContainer.scrollTop || 0),
editLeft = currentOffset.left - containerOffset.left - 1 - (scrollableContainer.scrollLeft || 0),
editorSection = this.checkEditorSection(),
cssTransformOffset;
var settings = this.instance.getSettings();
var rowHeadersCount = settings.rowHeaders ? 1 : 0;
var colHeadersCount = settings.colHeaders ? 1 : 0;
switch (editorSection) {
case 'top':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);
break;
case 'left':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);
break;
case 'top-left-corner':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);
break;
case 'bottom-left-corner':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);
break;
case 'bottom':
cssTransformOffset = (0, _element.getCssTransform)(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode);
break;
default:
break;
}
if (this.instance.getSelected()[0] === 0) {
editTop += 1;
}
if (this.instance.getSelected()[1] === 0) {
editLeft += 1;
}
var selectStyle = this.select.style;
if (cssTransformOffset && cssTransformOffset != -1) {
selectStyle[cssTransformOffset[0]] = cssTransformOffset[1];
} else {
(0, _element.resetCssTransform)(this.select);
}
var cellComputedStyle = (0, _element.getComputedStyle)(this.TD);
if (parseInt(cellComputedStyle.borderTopWidth, 10) > 0) {
height -= 1;
}
if (parseInt(cellComputedStyle.borderLeftWidth, 10) > 0) {
width -= 1;
}
selectStyle.height = height + 'px';
selectStyle.minWidth = width + 'px';
selectStyle.top = editTop + 'px';
selectStyle.left = editLeft + 'px';
selectStyle.margin = '0px';
};
SelectEditor.prototype.getEditedCell = function () {
var editorSection = this.checkEditorSection(),
editedCell;
switch (editorSection) {
case 'top':
editedCell = this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.select.style.zIndex = 101;
break;
case 'corner':
editedCell = this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.select.style.zIndex = 103;
break;
case 'left':
editedCell = this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({
row: this.row,
col: this.col
});
this.select.style.zIndex = 102;
break;
default:
editedCell = this.instance.getCell(this.row, this.col);
this.select.style.zIndex = '';
break;
}
return editedCell != -1 && editedCell != -2 ? editedCell : void 0;
};
exports.default = SelectEditor;
/***/ }),
/* 357 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
function cellDecorator(instance, TD, row, col, prop, value, cellProperties) {
if (cellProperties.className) {
if (TD.className) {
TD.className = TD.className + ' ' + cellProperties.className;
} else {
TD.className = cellProperties.className;
}
}
if (cellProperties.readOnly) {
(0, _element.addClass)(TD, cellProperties.readOnlyCellClassName);
}
if (cellProperties.valid === false && cellProperties.invalidCellClassName) {
(0, _element.addClass)(TD, cellProperties.invalidCellClassName);
} else {
(0, _element.removeClass)(TD, cellProperties.invalidCellClassName);
}
if (cellProperties.wordWrap === false && cellProperties.noWordWrapClassName) {
(0, _element.addClass)(TD, cellProperties.noWordWrapClassName);
}
if (!value && cellProperties.placeholder) {
(0, _element.addClass)(TD, cellProperties.placeholderCellClassName);
}
} /**
* Adds appropriate CSS class to table cell, based on cellProperties
*/
exports.default = cellDecorator;
/***/ }),
/* 358 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _src = __webpack_require__(15);
var _index = __webpack_require__(9);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var clonableWRAPPER = document.createElement('DIV');
clonableWRAPPER.className = 'htAutocompleteWrapper';
var clonableARROW = document.createElement('DIV');
clonableARROW.className = 'htAutocompleteArrow';
// workaround for https://github.com/handsontable/handsontable/issues/1946
// this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
clonableARROW.appendChild(document.createTextNode(String.fromCharCode(9660)));
var wrapTdContentWithWrapper = function wrapTdContentWithWrapper(TD, WRAPPER) {
WRAPPER.innerHTML = TD.innerHTML;
(0, _element.empty)(TD);
TD.appendChild(WRAPPER);
};
/**
* Autocomplete renderer
*
* @private
* @renderer AutocompleteRenderer
* @param {Object} instance Handsontable instance
* @param {Element} TD Table cell where to render
* @param {Number} row
* @param {Number} col
* @param {String|Number} prop Row object property name
* @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)
* @param {Object} cellProperties Cell properites (shared by cell renderer and editor)
*/
function autocompleteRenderer(instance, TD, row, col, prop, value, cellProperties) {
var WRAPPER = clonableWRAPPER.cloneNode(true); // this is faster than createElement
var ARROW = clonableARROW.cloneNode(true); // this is faster than createElement
if (cellProperties.allowHtml) {
(0, _index.getRenderer)('html').apply(this, arguments);
} else {
(0, _index.getRenderer)('text').apply(this, arguments);
}
TD.appendChild(ARROW);
(0, _element.addClass)(TD, 'htAutocomplete');
if (!TD.firstChild) {
// http://jsperf.com/empty-node-if-needed
// otherwise empty fields appear borderless in demo/renderers.html (IE)
TD.appendChild(document.createTextNode(String.fromCharCode(160))); // workaround for https://github.com/handsontable/handsontable/issues/1946
// this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
}
if (!instance.acArrowListener) {
var eventManager = new _eventManager2.default(instance);
// not very elegant but easy and fast
instance.acArrowListener = function (event) {
if ((0, _element.hasClass)(event.target, 'htAutocompleteArrow')) {
instance.view.wt.getSetting('onCellDblClick', null, new _src.CellCoords(row, col), TD);
}
};
eventManager.addEventListener(instance.rootElement, 'mousedown', instance.acArrowListener);
// We need to unbind the listener after the table has been destroyed
instance.addHookOnce('afterDestroy', function () {
eventManager.destroy();
});
}
}
exports.default = autocompleteRenderer;
/***/ }),
/* 359 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _string = __webpack_require__(36);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _unicode = __webpack_require__(20);
var _function = __webpack_require__(41);
var _event = __webpack_require__(12);
var _index = __webpack_require__(9);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var isListeningKeyDownEvent = new WeakMap();
var isCheckboxListenerAdded = new WeakMap();
var BAD_VALUE_CLASS = 'htBadValue';
/**
* Checkbox renderer
*
* @private
* @param {Object} instance Handsontable instance
* @param {Element} TD Table cell where to render
* @param {Number} row
* @param {Number} col
* @param {String|Number} prop Row object property name
* @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)
* @param {Object} cellProperties Cell properties (shared by cell renderer and editor)
*/
function checkboxRenderer(instance, TD, row, col, prop, value, cellProperties) {
(0, _index.getRenderer)('base').apply(this, arguments);
var eventManager = registerEvents(instance);
var input = createInput();
var labelOptions = cellProperties.label;
var badValue = false;
if (typeof cellProperties.checkedTemplate === 'undefined') {
cellProperties.checkedTemplate = true;
}
if (typeof cellProperties.uncheckedTemplate === 'undefined') {
cellProperties.uncheckedTemplate = false;
}
(0, _element.empty)(TD); // TODO identify under what circumstances this line can be removed
if (value === cellProperties.checkedTemplate || (0, _string.equalsIgnoreCase)(value, cellProperties.checkedTemplate)) {
input.checked = true;
} else if (value === cellProperties.uncheckedTemplate || (0, _string.equalsIgnoreCase)(value, cellProperties.uncheckedTemplate)) {
input.checked = false;
} else if (value === null) {
// default value
(0, _element.addClass)(input, 'noValue');
} else {
input.style.display = 'none';
(0, _element.addClass)(input, BAD_VALUE_CLASS);
badValue = true;
}
input.setAttribute('data-row', row);
input.setAttribute('data-col', col);
if (!badValue && labelOptions) {
var labelText = '';
if (labelOptions.value) {
labelText = typeof labelOptions.value === 'function' ? labelOptions.value.call(this, row, col, prop, value) : labelOptions.value;
} else if (labelOptions.property) {
labelText = instance.getDataAtRowProp(row, labelOptions.property);
}
var label = createLabel(labelText);
if (labelOptions.position === 'before') {
label.appendChild(input);
} else {
label.insertBefore(input, label.firstChild);
}
input = label;
}
TD.appendChild(input);
if (badValue) {
TD.appendChild(document.createTextNode('#bad-value#'));
}
if (!isListeningKeyDownEvent.has(instance)) {
isListeningKeyDownEvent.set(instance, true);
instance.addHook('beforeKeyDown', onBeforeKeyDown);
}
/**
* On before key down DOM listener.
*
* @private
* @param {Event} event
*/
function onBeforeKeyDown(event) {
var toggleKeys = 'SPACE|ENTER';
var switchOffKeys = 'DELETE|BACKSPACE';
var isKeyCode = (0, _function.partial)(_unicode.isKey, event.keyCode);
if (isKeyCode(toggleKeys + '|' + switchOffKeys) && !(0, _event.isImmediatePropagationStopped)(event)) {
eachSelectedCheckboxCell(function () {
(0, _event.stopImmediatePropagation)(event);
event.preventDefault();
});
}
if (isKeyCode(toggleKeys)) {
changeSelectedCheckboxesState();
}
if (isKeyCode(switchOffKeys)) {
changeSelectedCheckboxesState(true);
}
}
/**
* Change checkbox checked property
*
* @private
* @param {Boolean} [uncheckCheckbox=false]
*/
function changeSelectedCheckboxesState() {
var uncheckCheckbox = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var selRange = instance.getSelectedRange();
if (!selRange) {
return;
}
var _selRange$getTopLeftC = selRange.getTopLeftCorner(),
startRow = _selRange$getTopLeftC.row,
startColumn = _selRange$getTopLeftC.col;
var _selRange$getBottomRi = selRange.getBottomRightCorner(),
endRow = _selRange$getBottomRi.row,
endColumn = _selRange$getBottomRi.col;
var changes = [];
for (var _row = startRow; _row <= endRow; _row += 1) {
for (var _col = startColumn; _col <= endColumn; _col += 1) {
var _cellProperties = instance.getCellMeta(_row, _col);
if (_cellProperties.type !== 'checkbox') {
return;
}
/* eslint-disable no-continue */
if (_cellProperties.readOnly === true) {
continue;
}
if (typeof _cellProperties.checkedTemplate === 'undefined') {
_cellProperties.checkedTemplate = true;
}
if (typeof _cellProperties.uncheckedTemplate === 'undefined') {
_cellProperties.uncheckedTemplate = false;
}
var dataAtCell = instance.getDataAtCell(_row, _col);
if (uncheckCheckbox === false) {
if ([_cellProperties.checkedTemplate, _cellProperties.checkedTemplate.toString()].includes(dataAtCell)) {
changes.push([_row, _col, _cellProperties.uncheckedTemplate]);
} else if ([_cellProperties.uncheckedTemplate, _cellProperties.uncheckedTemplate.toString(), null, void 0].includes(dataAtCell)) {
changes.push([_row, _col, _cellProperties.checkedTemplate]);
}
} else {
changes.push([_row, _col, _cellProperties.uncheckedTemplate]);
}
}
}
if (changes.length > 0) {
instance.setDataAtCell(changes);
}
}
/**
* Call callback for each found selected cell with checkbox type.
*
* @private
* @param {Function} callback
*/
function eachSelectedCheckboxCell(callback) {
var selRange = instance.getSelectedRange();
if (!selRange) {
return;
}
var topLeft = selRange.getTopLeftCorner();
var bottomRight = selRange.getBottomRightCorner();
for (var _row2 = topLeft.row; _row2 <= bottomRight.row; _row2++) {
for (var _col2 = topLeft.col; _col2 <= bottomRight.col; _col2++) {
var _cellProperties2 = instance.getCellMeta(_row2, _col2);
if (_cellProperties2.type !== 'checkbox') {
return;
}
var cell = instance.getCell(_row2, _col2);
if (cell == null) {
callback(_row2, _col2, _cellProperties2);
} else {
var checkboxes = cell.querySelectorAll('input[type=checkbox]');
if (checkboxes.length > 0 && !_cellProperties2.readOnly) {
callback(checkboxes);
}
}
}
}
}
}
/**
* Register checkbox listeners.
*
* @param {Handsontable} instance Handsontable instance.
* @returns {EventManager}
*/
function registerEvents(instance) {
var eventManager = isCheckboxListenerAdded.get(instance);
if (!eventManager) {
eventManager = new _eventManager2.default(instance);
eventManager.addEventListener(instance.rootElement, 'click', function (event) {
return onClick(event, instance);
});
eventManager.addEventListener(instance.rootElement, 'mouseup', function (event) {
return onMouseUp(event, instance);
});
eventManager.addEventListener(instance.rootElement, 'change', function (event) {
return onChange(event, instance);
});
isCheckboxListenerAdded.set(instance, eventManager);
}
return eventManager;
}
/**
* Create input element.
*
* @returns {Node}
*/
function createInput() {
var input = document.createElement('input');
input.className = 'htCheckboxRendererInput';
input.type = 'checkbox';
input.setAttribute('autocomplete', 'off');
input.setAttribute('tabindex', '-1');
return input.cloneNode(false);
}
/**
* Create label element.
*
* @returns {Node}
*/
function createLabel(text) {
var label = document.createElement('label');
label.className = 'htCheckboxRendererLabel';
label.appendChild(document.createTextNode(text));
return label.cloneNode(true);
}
/**
* `mouseup` callback.
*
* @private
* @param {Event} event `mouseup` event.
* @param {Object} instance Handsontable instance.
*/
function onMouseUp(event, instance) {
if (!isCheckboxInput(event.target)) {
return;
}
setTimeout(instance.listen, 10);
}
/**
* `click` callback.
*
* @private
* @param {Event} event `click` event.
* @param {Object} instance Handsontable instance.
*/
function onClick(event, instance) {
if (!isCheckboxInput(event.target)) {
return false;
}
var row = parseInt(event.target.getAttribute('data-row'), 10);
var col = parseInt(event.target.getAttribute('data-col'), 10);
var cellProperties = instance.getCellMeta(row, col);
if (cellProperties.readOnly) {
event.preventDefault();
}
}
/**
* `change` callback.
*
* @param {Event} event `change` event.
* @param {Object} instance Handsontable instance.
* @param {Object} cellProperties Reference to cell properties.
* @returns {Boolean}
*/
function onChange(event, instance) {
if (!isCheckboxInput(event.target)) {
return false;
}
var row = parseInt(event.target.getAttribute('data-row'), 10);
var col = parseInt(event.target.getAttribute('data-col'), 10);
var cellProperties = instance.getCellMeta(row, col);
if (!cellProperties.readOnly) {
var newCheckboxValue = null;
if (event.target.checked) {
newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? true : cellProperties.checkedTemplate;
} else {
newCheckboxValue = cellProperties.uncheckedTemplate === void 0 ? false : cellProperties.uncheckedTemplate;
}
instance.setDataAtCell(row, col, newCheckboxValue);
}
}
/**
* Check if the provided element is the checkbox input.
*
* @private
* @param {HTMLElement} element The element in question.
* @returns {Boolean}
*/
function isCheckboxInput(element) {
return element.tagName === 'INPUT' && element.getAttribute('type') === 'checkbox';
}
exports.default = checkboxRenderer;
/***/ }),
/* 360 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _index = __webpack_require__(9);
/**
* @private
* @renderer HtmlRenderer
* @param instance
* @param TD
* @param row
* @param col
* @param prop
* @param value
* @param cellProperties
*/
function htmlRenderer(instance, TD, row, col, prop, value, cellProperties) {
(0, _index.getRenderer)('base').apply(this, arguments);
if (value === null || value === void 0) {
value = '';
}
(0, _element.fastInnerHTML)(TD, value);
}
exports.default = htmlRenderer;
/***/ }),
/* 361 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _numbro = __webpack_require__(305);
var _numbro2 = _interopRequireDefault(_numbro);
var _index = __webpack_require__(9);
var _number = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Numeric cell renderer
*
* @private
* @renderer NumericRenderer
* @dependencies numbro
* @param {Object} instance Handsontable instance
* @param {Element} TD Table cell where to render
* @param {Number} row
* @param {Number} col
* @param {String|Number} prop Row object property name
* @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)
* @param {Object} cellProperties Cell properties (shared by cell renderer and editor)
*/
function numericRenderer(instance, TD, row, col, prop, value, cellProperties) {
if ((0, _number.isNumeric)(value)) {
var numericFormat = cellProperties.numericFormat;
var cellCulture = numericFormat && numericFormat.culture;
var cellFormatPattern = numericFormat && numericFormat.pattern;
var className = cellProperties.className || '';
var classArr = className.length ? className.split(' ') : [];
if (typeof cellCulture !== 'undefined') {
_numbro2.default.culture(cellCulture);
}
value = (0, _numbro2.default)(value).format(cellFormatPattern || '0');
if (classArr.indexOf('htLeft') < 0 && classArr.indexOf('htCenter') < 0 && classArr.indexOf('htRight') < 0 && classArr.indexOf('htJustify') < 0) {
classArr.push('htRight');
}
if (classArr.indexOf('htNumeric') < 0) {
classArr.push('htNumeric');
}
cellProperties.className = classArr.join(' ');
}
(0, _index.getRenderer)('text')(instance, TD, row, col, prop, value, cellProperties);
}
exports.default = numericRenderer;
/***/ }),
/* 362 */
/***/ (function(module, exports) {
/***/ }),
/* 363 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _index = __webpack_require__(9);
var _number = __webpack_require__(6);
/**
* @private
* @renderer PasswordRenderer
* @param instance
* @param TD
* @param row
* @param col
* @param prop
* @param value
* @param cellProperties
*/
function passwordRenderer(instance, TD, row, col, prop, value, cellProperties) {
(0, _index.getRenderer)('text').apply(this, arguments);
value = TD.innerHTML;
var hashLength = cellProperties.hashLength || value.length;
var hashSymbol = cellProperties.hashSymbol || '*';
var hash = '';
(0, _number.rangeEach)(hashLength - 1, function () {
hash += hashSymbol;
});
(0, _element.fastInnerHTML)(TD, hash);
}
exports.default = passwordRenderer;
/***/ }),
/* 364 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _element = __webpack_require__(0);
var _mixed = __webpack_require__(17);
var _index = __webpack_require__(9);
/**
* Default text renderer
*
* @private
* @renderer TextRenderer
* @param {Object} instance Handsontable instance
* @param {Element} TD Table cell where to render
* @param {Number} row
* @param {Number} col
* @param {String|Number} prop Row object property name
* @param value Value to render (remember to escape unsafe HTML before inserting to DOM!)
* @param {Object} cellProperties Cell properties (shared by cell renderer and editor)
*/
function textRenderer(instance, TD, row, col, prop, value, cellProperties) {
(0, _index.getRenderer)('base').apply(this, arguments);
if (!value && cellProperties.placeholder) {
value = cellProperties.placeholder;
}
var escaped = (0, _mixed.stringify)(value);
if (!instance.getSettings().trimWhitespace) {
escaped = escaped.replace(/ /g, String.fromCharCode(160));
}
if (cellProperties.rendererTemplate) {
(0, _element.empty)(TD);
var TEMPLATE = document.createElement('TEMPLATE');
TEMPLATE.setAttribute('bind', '{{}}');
TEMPLATE.innerHTML = cellProperties.rendererTemplate;
HTMLTemplateElement.decorate(TEMPLATE);
TEMPLATE.model = instance.getSourceDataAtRow(row);
TD.appendChild(TEMPLATE);
} else {
// this is faster than innerHTML. See: https://github.com/handsontable/handsontable/wiki/JavaScript-&-DOM-performance-tips
(0, _element.fastInnerText)(TD, escaped);
}
}
exports.default = textRenderer;
/***/ }),
/* 365 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = autocompleteValidator;
/**
* Autocomplete cell validator.
*
* @private
* @validator AutocompleteValidator
* @param {*} value - Value of edited cell
* @param {Function} callback - Callback called with validation result
*/
function autocompleteValidator(value, callback) {
if (value == null) {
value = '';
}
if (this.allowEmpty && value === '') {
callback(true);
return;
}
if (this.strict && this.source) {
if (typeof this.source === 'function') {
this.source(value, process(value, callback));
} else {
process(value, callback)(this.source);
}
} else {
callback(true);
}
};
/**
* Function responsible for validation of autocomplete value.
*
* @param {*} value - Value of edited cell
* @param {Function} callback - Callback called with validation result
*/
function process(value, callback) {
var originalVal = value;
return function (source) {
var found = false;
for (var s = 0, slen = source.length; s < slen; s++) {
if (originalVal === source[s]) {
found = true; // perfect match
break;
}
}
callback(found);
};
}
/***/ }),
/* 366 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = dateValidator;
exports.correctFormat = correctFormat;
var _moment = __webpack_require__(40);
var _moment2 = _interopRequireDefault(_moment);
var _date = __webpack_require__(306);
var _editors = __webpack_require__(16);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Date cell validator
*
* @private
* @validator DateValidator
* @dependencies moment
* @param {*} value - Value of edited cell
* @param {Function} callback - Callback called with validation result
*/
function dateValidator(value, callback) {
var valid = true;
var dateEditor = (0, _editors.getEditorInstance)('date', this.instance);
if (value == null) {
value = '';
}
var isValidDate = (0, _moment2.default)(new Date(value)).isValid() || (0, _moment2.default)(value, dateEditor.defaultDateFormat).isValid();
// is it in the specified format
var isValidFormat = (0, _moment2.default)(value, this.dateFormat || dateEditor.defaultDateFormat, true).isValid();
if (this.allowEmpty && value === '') {
isValidDate = true;
isValidFormat = true;
}
if (!isValidDate) {
valid = false;
}
if (!isValidDate && isValidFormat) {
valid = true;
}
if (isValidDate && !isValidFormat) {
if (this.correctFormat === true) {
// if format correction is enabled
var correctedValue = correctFormat(value, this.dateFormat);
var row = this.instance.runHooks('unmodifyRow', this.row);
var column = this.instance.runHooks('unmodifyCol', this.col);
this.instance.setDataAtCell(row, column, correctedValue, 'dateValidator');
valid = true;
} else {
valid = false;
}
}
callback(valid);
};
/**
* Format the given string using moment.js' format feature
*
* @param {String} value
* @param {String} dateFormat
* @returns {String}
*/
function correctFormat(value, dateFormat) {
var dateFromDate = (0, _moment2.default)((0, _date.getNormalizedDate)(value));
var dateFromMoment = (0, _moment2.default)(value, dateFormat);
var isAlphanumeric = value.search(/[A-z]/g) > -1;
var date = void 0;
if (dateFromDate.isValid() && dateFromDate.format('x') === dateFromMoment.format('x') || !dateFromMoment.isValid() || isAlphanumeric) {
date = dateFromDate;
} else {
date = dateFromMoment;
}
return date.format(dateFormat);
};
/***/ }),
/* 367 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = numericValidator;
/**
* Numeric cell validator
*
* @private
* @validator NumericValidator
* @param {*} value - Value of edited cell
* @param {*} callback - Callback called with validation result
*/
function numericValidator(value, callback) {
if (value == null) {
value = '';
}
if (this.allowEmpty && value === '') {
callback(true);
} else if (value === '') {
callback(false);
} else {
callback(/^-?\d*(\.|,)?\d*$/.test(value));
}
};
/***/ }),
/* 368 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = timeValidator;
var _moment = __webpack_require__(40);
var _moment2 = _interopRequireDefault(_moment);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Formats which are correctly parsed to time (supported by momentjs)
var STRICT_FORMATS = ['YYYY-MM-DDTHH:mm:ss.SSSZ', 'X', // Unix timestamp
'x' // Unix ms timestamp
];
/**
* Time cell validator
*
* @private
* @validator TimeValidator
* @dependencies moment
* @param {*} value - Value of edited cell
* @param {Function} callback - Callback called with validation result
*/
function timeValidator(value, callback) {
var valid = true;
var timeFormat = this.timeFormat || 'h:mm:ss a';
if (value === null) {
value = '';
}
value = /^\d{3,}$/.test(value) ? parseInt(value, 10) : value;
var twoDigitValue = /^\d{1,2}$/.test(value);
if (twoDigitValue) {
value += ':00';
}
var date = (0, _moment2.default)(value, STRICT_FORMATS, true).isValid() ? (0, _moment2.default)(value) : (0, _moment2.default)(value, timeFormat);
var isValidTime = date.isValid();
// is it in the specified format
var isValidFormat = (0, _moment2.default)(value, timeFormat, true).isValid() && !twoDigitValue;
if (this.allowEmpty && value === '') {
isValidTime = true;
isValidFormat = true;
}
if (!isValidTime) {
valid = false;
}
if (!isValidTime && isValidFormat) {
valid = true;
}
if (isValidTime && !isValidFormat) {
if (this.correctFormat === true) {
// if format correction is enabled
var correctedValue = date.format(timeFormat);
var row = this.instance.runHooks('unmodifyRow', this.row);
var column = this.instance.runHooks('unmodifyCol', this.col);
this.instance.setDataAtCell(row, column, correctedValue, 'timeValidator');
valid = true;
} else {
valid = false;
}
}
callback(valid);
};
/***/ }),
/* 369 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'autocomplete';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
renderer: (0, _renderers.getRenderer)(CELL_TYPE),
validator: (0, _validators.getValidator)(CELL_TYPE)
};
/***/ }),
/* 370 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var CELL_TYPE = 'checkbox';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
renderer: (0, _renderers.getRenderer)(CELL_TYPE)
};
/***/ }),
/* 371 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'date';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
// displays small gray arrow on right side of the cell
renderer: (0, _renderers.getRenderer)('autocomplete'),
validator: (0, _validators.getValidator)(CELL_TYPE)
};
/***/ }),
/* 372 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'dropdown';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
// displays small gray arrow on right side of the cell
renderer: (0, _renderers.getRenderer)('autocomplete'),
validator: (0, _validators.getValidator)('autocomplete')
};
/***/ }),
/* 373 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var CELL_TYPE = 'handsontable';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
// displays small gray arrow on right side of the cell
renderer: (0, _renderers.getRenderer)('autocomplete')
};
/***/ }),
/* 374 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'numeric';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
renderer: (0, _renderers.getRenderer)(CELL_TYPE),
validator: (0, _validators.getValidator)(CELL_TYPE),
dataType: 'number'
};
/***/ }),
/* 375 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'password';
exports.default = {
editor: (0, _editors.getEditor)(CELL_TYPE),
renderer: (0, _renderers.getRenderer)(CELL_TYPE),
copyable: false
};
/***/ }),
/* 376 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _browser = __webpack_require__(28);
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var CELL_TYPE = 'text';
exports.default = {
editor: (0, _browser.isMobileBrowser)() ? (0, _editors.getEditor)('mobile') : (0, _editors.getEditor)(CELL_TYPE),
renderer: (0, _renderers.getRenderer)(CELL_TYPE)
};
/***/ }),
/* 377 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _editors = __webpack_require__(16);
var _renderers = __webpack_require__(9);
var _validators = __webpack_require__(29);
var CELL_TYPE = 'time';
exports.default = {
editor: (0, _editors.getEditor)('text'),
// displays small gray arrow on right side of the cell
renderer: (0, _renderers.getRenderer)('text'),
validator: (0, _validators.getValidator)(CELL_TYPE)
};
/***/ }),
/* 378 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _SheetClip = __webpack_require__(307);
var _SheetClip2 = _interopRequireDefault(_SheetClip);
var _data = __webpack_require__(86);
var _setting = __webpack_require__(85);
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _interval = __webpack_require__(379);
var _interval2 = _interopRequireDefault(_interval);
var _number = __webpack_require__(6);
var _multiMap = __webpack_require__(380);
var _multiMap2 = _interopRequireDefault(_multiMap);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Utility class that gets and saves data from/to the data source using mapping of columns numbers to object property names
* @todo refactor arguments of methods getRange, getText to be numbers (not objects)
* @todo remove priv, GridSettings from object constructor
*
* @param {Object} instance Instance of Handsontable
* @param {*} priv
* @param {*} GridSettings Grid settings
* @util
* @class DataMap
*/
function DataMap(instance, priv, GridSettings) {
var _this = this;
this.instance = instance;
this.priv = priv;
this.GridSettings = GridSettings;
this.dataSource = this.instance.getSettings().data;
this.cachedLength = null;
this.skipCache = false;
this.latestSourceRowsCount = 0;
if (this.dataSource && this.dataSource[0]) {
this.duckSchema = this.recursiveDuckSchema(this.dataSource[0]);
} else {
this.duckSchema = {};
}
this.createMap();
this.interval = _interval2.default.create(function () {
return _this.clearLengthCache();
}, '15fps');
this.instance.addHook('skipLengthCache', function (delay) {
return _this.onSkipLengthCache(delay);
});
this.onSkipLengthCache(500);
}
DataMap.prototype.DESTINATION_RENDERER = 1;
DataMap.prototype.DESTINATION_CLIPBOARD_GENERATOR = 2;
/**
* @param {Object|Array} object
* @returns {Object|Array}
*/
DataMap.prototype.recursiveDuckSchema = function (object) {
return (0, _object.duckSchema)(object);
};
/**
* @param {Object} schema
* @param {Number} lastCol
* @param {Number} parent
* @returns {Number}
*/
DataMap.prototype.recursiveDuckColumns = function (schema, lastCol, parent) {
var prop, i;
if (typeof lastCol === 'undefined') {
lastCol = 0;
parent = '';
}
if ((typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object' && !Array.isArray(schema)) {
for (i in schema) {
if ((0, _object.hasOwnProperty)(schema, i)) {
if (schema[i] === null) {
prop = parent + i;
this.colToPropCache.push(prop);
this.propToColCache.set(prop, lastCol);
lastCol++;
} else {
lastCol = this.recursiveDuckColumns(schema[i], lastCol, i + '.');
}
}
}
}
return lastCol;
};
DataMap.prototype.createMap = function () {
var i = void 0;
var schema = this.getSchema();
if (typeof schema === 'undefined') {
throw new Error('trying to create `columns` definition but you didn\'t provide `schema` nor `data`');
}
this.colToPropCache = [];
this.propToColCache = new _multiMap2.default();
var columns = this.instance.getSettings().columns;
if (columns) {
var maxCols = this.instance.getSettings().maxCols;
var columnsLen = Math.min(maxCols, columns.length);
var filteredIndex = 0;
var columnsAsFunc = false;
var schemaLen = (0, _object.deepObjectSize)(schema);
if (typeof columns === 'function') {
columnsLen = schemaLen > 0 ? schemaLen : this.instance.countSourceCols();
columnsAsFunc = true;
}
for (i = 0; i < columnsLen; i++) {
var column = columnsAsFunc ? columns(i) : columns[i];
if ((0, _object.isObject)(column)) {
if (typeof column.data !== 'undefined') {
var index = columnsAsFunc ? filteredIndex : i;
this.colToPropCache[index] = column.data;
this.propToColCache.set(column.data, index);
}
filteredIndex++;
}
}
} else {
this.recursiveDuckColumns(schema);
}
};
/**
* Returns property name that corresponds with the given column index.
*
* @param {Number} col Visual column index.
* @returns {Number} Physical column index.
*/
DataMap.prototype.colToProp = function (col) {
col = this.instance.runHooks('modifyCol', col);
if (!isNaN(col) && this.colToPropCache && typeof this.colToPropCache[col] !== 'undefined') {
return this.colToPropCache[col];
}
return col;
};
/**
* @param {Object} prop
* @fires Hooks#modifyCol
* @returns {*}
*/
DataMap.prototype.propToCol = function (prop) {
var col;
if (typeof this.propToColCache.get(prop) === 'undefined') {
col = prop;
} else {
col = this.propToColCache.get(prop);
}
col = this.instance.runHooks('unmodifyCol', col);
return col;
};
/**
* @returns {Object}
*/
DataMap.prototype.getSchema = function () {
var schema = this.instance.getSettings().dataSchema;
if (schema) {
if (typeof schema === 'function') {
return schema();
}
return schema;
}
return this.duckSchema;
};
/**
* Creates row at the bottom of the data array.
*
* @param {Number} [index] Physical index of the row before which the new row will be inserted.
* @param {Number} [amount] An amount of rows to add.
* @param {String} [source] Source of method call.
* @fires Hooks#afterCreateRow
* @returns {Number} Returns number of created rows.
*/
DataMap.prototype.createRow = function (index, amount, source) {
var row,
colCount = this.instance.countCols(),
numberOfCreatedRows = 0,
currentIndex;
if (!amount) {
amount = 1;
}
if (typeof index !== 'number' || index >= this.instance.countSourceRows()) {
index = this.instance.countSourceRows();
}
this.instance.runHooks('beforeCreateRow', index, amount, source);
currentIndex = index;
var maxRows = this.instance.getSettings().maxRows;
while (numberOfCreatedRows < amount && this.instance.countSourceRows() < maxRows) {
if (this.instance.dataType === 'array') {
if (this.instance.getSettings().dataSchema) {
// Clone template array
row = (0, _object.deepClone)(this.getSchema());
} else {
row = [];
/* eslint-disable no-loop-func */
(0, _number.rangeEach)(colCount - 1, function () {
return row.push(null);
});
}
} else if (this.instance.dataType === 'function') {
row = this.instance.getSettings().dataSchema(index);
} else {
row = {};
(0, _object.deepExtend)(row, this.getSchema());
}
if (index === this.instance.countSourceRows()) {
this.dataSource.push(row);
} else {
this.spliceData(index, 0, row);
}
numberOfCreatedRows++;
currentIndex++;
}
this.instance.runHooks('afterCreateRow', index, numberOfCreatedRows, source);
this.instance.forceFullRender = true; // used when data was changed
return numberOfCreatedRows;
};
/**
* Creates col at the right of the data array.
*
* @param {Number} [index] Visual index of the column before which the new column will be inserted
* @param {Number} [amount] An amount of columns to add.
* @param {String} [source] Source of method call.
* @fires Hooks#afterCreateCol
* @returns {Number} Returns number of created columns
*/
DataMap.prototype.createCol = function (index, amount, source) {
if (!this.instance.isColumnModificationAllowed()) {
throw new Error('Cannot create new column. When data source in an object, ' + 'you can only have as much columns as defined in first data row, data schema or in the \'columns\' setting.' + 'If you want to be able to add new columns, you have to use array datasource.');
}
var rlen = this.instance.countSourceRows(),
data = this.dataSource,
constructor,
numberOfCreatedCols = 0,
currentIndex;
if (!amount) {
amount = 1;
}
if (typeof index !== 'number' || index >= this.instance.countCols()) {
index = this.instance.countCols();
}
this.instance.runHooks('beforeCreateCol', index, amount, source);
currentIndex = index;
var maxCols = this.instance.getSettings().maxCols;
while (numberOfCreatedCols < amount && this.instance.countCols() < maxCols) {
constructor = (0, _setting.columnFactory)(this.GridSettings, this.priv.columnsSettingConflicts);
if (typeof index !== 'number' || index >= this.instance.countCols()) {
if (rlen > 0) {
for (var r = 0; r < rlen; r++) {
if (typeof data[r] === 'undefined') {
data[r] = [];
}
data[r].push(null);
}
} else {
data.push([null]);
}
// Add new column constructor
this.priv.columnSettings.push(constructor);
} else {
for (var _r = 0; _r < rlen; _r++) {
data[_r].splice(currentIndex, 0, null);
}
// Add new column constructor at given index
this.priv.columnSettings.splice(currentIndex, 0, constructor);
}
numberOfCreatedCols++;
currentIndex++;
}
this.instance.runHooks('afterCreateCol', index, numberOfCreatedCols, source);
this.instance.forceFullRender = true; // used when data was changed
return numberOfCreatedCols;
};
/**
* Removes row from the data array.
*
* @param {Number} [index] Visual index of the row to be removed. If not provided, the last row will be removed
* @param {Number} [amount] Amount of the rows to be removed. If not provided, one row will be removed
* @param {String} [source] Source of method call.
* @fires Hooks#beforeRemoveRow
* @fires Hooks#afterRemoveRow
*/
DataMap.prototype.removeRow = function (index, amount, source) {
if (!amount) {
amount = 1;
}
if (typeof index !== 'number') {
index = -amount;
}
amount = this.instance.runHooks('modifyRemovedAmount', amount, index);
index = (this.instance.countSourceRows() + index) % this.instance.countSourceRows();
var logicRows = this.visualRowsToPhysical(index, amount);
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveRow', index, amount, logicRows, source);
if (actionWasNotCancelled === false) {
return;
}
var data = this.dataSource;
var newData = void 0;
newData = this.filterData(index, amount);
if (newData) {
data.length = 0;
Array.prototype.push.apply(data, newData);
}
this.instance.runHooks('afterRemoveRow', index, amount, logicRows, source);
this.instance.forceFullRender = true; // used when data was changed
};
/**
* Removes column from the data array.
*
* @param {Number} [index] Visual index of the column to be removed. If not provided, the last column will be removed
* @param {Number} [amount] Amount of the columns to be removed. If not provided, one column will be removed
* @param {String} [source] Source of method call.
* @fires Hooks#beforeRemoveCol
* @fires Hooks#afterRemoveCol
*/
DataMap.prototype.removeCol = function (index, amount, source) {
if (this.instance.dataType === 'object' || this.instance.getSettings().columns) {
throw new Error('cannot remove column with object data source or columns option specified');
}
if (!amount) {
amount = 1;
}
if (typeof index !== 'number') {
index = -amount;
}
index = (this.instance.countCols() + index) % this.instance.countCols();
var logicColumns = this.visualColumnsToPhysical(index, amount);
var descendingLogicColumns = logicColumns.slice(0).sort(function (a, b) {
return b - a;
});
var actionWasNotCancelled = this.instance.runHooks('beforeRemoveCol', index, amount, logicColumns, source);
if (actionWasNotCancelled === false) {
return;
}
var isTableUniform = true;
var removedColumnsCount = descendingLogicColumns.length;
var data = this.dataSource;
for (var c = 0; c < removedColumnsCount; c++) {
if (isTableUniform && logicColumns[0] !== logicColumns[c] - c) {
isTableUniform = false;
}
}
if (isTableUniform) {
for (var r = 0, rlen = this.instance.countSourceRows(); r < rlen; r++) {
data[r].splice(logicColumns[0], amount);
}
} else {
for (var _r2 = 0, _rlen = this.instance.countSourceRows(); _r2 < _rlen; _r2++) {
for (var _c = 0; _c < removedColumnsCount; _c++) {
data[_r2].splice(descendingLogicColumns[_c], 1);
}
}
for (var _c2 = 0; _c2 < removedColumnsCount; _c2++) {
this.priv.columnSettings.splice(logicColumns[_c2], 1);
}
}
this.instance.runHooks('afterRemoveCol', index, amount, logicColumns, source);
this.instance.forceFullRender = true; // used when data was changed
};
/**
* Add/Removes data from the column.
*
* @param {Number} col Physical index of column in which do you want to do splice
* @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end
* @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed
* @returns {Array} Returns removed portion of columns
*/
DataMap.prototype.spliceCol = function (col, index, amount /* , elements... */) {
var elements = arguments.length >= 4 ? [].slice.call(arguments, 3) : [];
var colData = this.instance.getDataAtCol(col);
var removed = colData.slice(index, index + amount);
var after = colData.slice(index + amount);
(0, _array.extendArray)(elements, after);
var i = 0;
while (i < amount) {
elements.push(null); // add null in place of removed elements
i++;
}
(0, _array.to2dArray)(elements);
this.instance.populateFromArray(index, col, elements, null, null, 'spliceCol');
return removed;
};
/**
* Add/Removes data from the row.
*
* @param {Number} row Physical index of row in which do you want to do splice
* @param {Number} index Index at which to start changing the array. If negative, will begin that many elements from the end.
* @param {Number} amount An integer indicating the number of old array elements to remove. If amount is 0, no elements are removed.
* @returns {Array} Returns removed portion of rows
*/
DataMap.prototype.spliceRow = function (row, index, amount /* , elements... */) {
var elements = arguments.length >= 4 ? [].slice.call(arguments, 3) : [];
var rowData = this.instance.getSourceDataAtRow(row);
var removed = rowData.slice(index, index + amount);
var after = rowData.slice(index + amount);
(0, _array.extendArray)(elements, after);
var i = 0;
while (i < amount) {
elements.push(null); // add null in place of removed elements
i++;
}
this.instance.populateFromArray(row, index, [elements], null, null, 'spliceRow');
return removed;
};
/**
* Add/remove row(s) to/from the data source.
*
* @param {Number} index Physical index of the element to remove.
* @param {Number} amount Number of rows to add/remove.
* @param {Object} element Row to add.
*/
DataMap.prototype.spliceData = function (index, amount, element) {
var continueSplicing = this.instance.runHooks('beforeDataSplice', index, amount, element);
if (continueSplicing !== false) {
this.dataSource.splice(index, amount, element);
}
};
/**
* Filter unwanted data elements from the data source.
*
* @param {Number} index Visual index of the element to remove.
* @param {Number} amount Number of rows to add/remove.
* @returns {Array}
*/
DataMap.prototype.filterData = function (index, amount) {
var physicalRows = this.visualRowsToPhysical(index, amount);
var continueSplicing = this.instance.runHooks('beforeDataFilter', index, amount, physicalRows);
if (continueSplicing !== false) {
var newData = this.dataSource.filter(function (row, index) {
return physicalRows.indexOf(index) == -1;
});
return newData;
}
};
/**
* Returns single value from the data array.
*
* @param {Number} row Visual row index.
* @param {Number} prop
*/
DataMap.prototype.get = function (row, prop) {
row = this.instance.runHooks('modifyRow', row);
var dataRow = this.dataSource[row];
// TODO: To remove, use 'modifyData' hook instead (see below)
var modifiedRowData = this.instance.runHooks('modifyRowData', row);
dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
//
var value = null;
// try to get value under property `prop` (includes dot)
if (dataRow && dataRow.hasOwnProperty && (0, _object.hasOwnProperty)(dataRow, prop)) {
value = dataRow[prop];
} else if (typeof prop === 'string' && prop.indexOf('.') > -1) {
var sliced = prop.split('.');
var out = dataRow;
if (!out) {
return null;
}
for (var i = 0, ilen = sliced.length; i < ilen; i++) {
out = out[sliced[i]];
if (typeof out === 'undefined') {
return null;
}
}
value = out;
} else if (typeof prop === 'function') {
/**
* allows for interacting with complex structures, for example
* d3/jQuery getter/setter properties:
*
* {columns: [{
* data: function(row, value){
* if(arguments.length === 1){
* return row.property();
* }
* row.property(value);
* }
* }]}
*/
value = prop(this.dataSource.slice(row, row + 1)[0]);
}
if (this.instance.hasHook('modifyData')) {
var valueHolder = (0, _object.createObjectPropListener)(value);
this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'get');
if (valueHolder.isTouched()) {
value = valueHolder.value;
}
}
return value;
};
var copyableLookup = (0, _data.cellMethodLookupFactory)('copyable', false);
/**
* Returns single value from the data array (intended for clipboard copy to an external application).
*
* @param {Number} row Physical row index.
* @param {Number} prop
* @returns {String}
*/
DataMap.prototype.getCopyable = function (row, prop) {
if (copyableLookup.call(this.instance, row, this.propToCol(prop))) {
return this.get(row, prop);
}
return '';
};
/**
* Saves single value to the data array.
*
* @param {Number} row Visual row index.
* @param {Number} prop
* @param {String} value
* @param {String} [source] Source of hook runner.
*/
DataMap.prototype.set = function (row, prop, value, source) {
row = this.instance.runHooks('modifyRow', row, source || 'datamapGet');
var dataRow = this.dataSource[row];
// TODO: To remove, use 'modifyData' hook instead (see below)
var modifiedRowData = this.instance.runHooks('modifyRowData', row);
dataRow = isNaN(modifiedRowData) ? modifiedRowData : dataRow;
//
if (this.instance.hasHook('modifyData')) {
var valueHolder = (0, _object.createObjectPropListener)(value);
this.instance.runHooks('modifyData', row, this.propToCol(prop), valueHolder, 'set');
if (valueHolder.isTouched()) {
value = valueHolder.value;
}
}
// try to set value under property `prop` (includes dot)
if (dataRow && dataRow.hasOwnProperty && (0, _object.hasOwnProperty)(dataRow, prop)) {
dataRow[prop] = value;
} else if (typeof prop === 'string' && prop.indexOf('.') > -1) {
var sliced = prop.split('.');
var out = dataRow;
var i = 0;
var ilen = void 0;
for (i = 0, ilen = sliced.length - 1; i < ilen; i++) {
if (typeof out[sliced[i]] === 'undefined') {
out[sliced[i]] = {};
}
out = out[sliced[i]];
}
out[sliced[i]] = value;
} else if (typeof prop === 'function') {
/* see the `function` handler in `get` */
prop(this.dataSource.slice(row, row + 1)[0], value);
} else {
dataRow[prop] = value;
}
};
/**
* This ridiculous piece of code maps rows Id that are present in table data to those displayed for user.
* The trick is, the physical row id (stored in settings.data) is not necessary the same
* as the visual (displayed) row id (e.g. when sorting is applied).
*
* @param {Number} index Visual row index.
* @param {Number} amount
* @fires Hooks#modifyRow
* @returns {Number}
*/
DataMap.prototype.visualRowsToPhysical = function (index, amount) {
var totalRows = this.instance.countSourceRows();
var physicRow = (totalRows + index) % totalRows;
var logicRows = [];
var rowsToRemove = amount;
var row;
while (physicRow < totalRows && rowsToRemove) {
row = this.instance.runHooks('modifyRow', physicRow);
logicRows.push(row);
rowsToRemove--;
physicRow++;
}
return logicRows;
};
/**
*
* @param index Visual column index.
* @param amount
* @returns {Array}
*/
DataMap.prototype.visualColumnsToPhysical = function (index, amount) {
var totalCols = this.instance.countCols();
var physicalCol = (totalCols + index) % totalCols;
var visualCols = [];
var colsToRemove = amount;
while (physicalCol < totalCols && colsToRemove) {
var col = this.instance.runHooks('modifyCol', physicalCol);
visualCols.push(col);
colsToRemove--;
physicalCol++;
}
return visualCols;
};
/**
* Clears the data array.
*/
DataMap.prototype.clear = function () {
for (var r = 0; r < this.instance.countSourceRows(); r++) {
for (var c = 0; c < this.instance.countCols(); c++) {
this.set(r, this.colToProp(c), '');
}
}
};
/**
* Clear cached data length.
*/
DataMap.prototype.clearLengthCache = function () {
this.cachedLength = null;
};
/**
* Get data length.
*
* @returns {Number}
*/
DataMap.prototype.getLength = function () {
var _this2 = this;
var maxRows = void 0,
maxRowsFromSettings = this.instance.getSettings().maxRows;
if (maxRowsFromSettings < 0 || maxRowsFromSettings === 0) {
maxRows = 0;
} else {
maxRows = maxRowsFromSettings || Infinity;
}
var length = this.instance.countSourceRows();
if (this.instance.hasHook('modifyRow')) {
var reValidate = this.skipCache;
this.interval.start();
if (length !== this.latestSourceRowsCount) {
reValidate = true;
}
this.latestSourceRowsCount = length;
if (this.cachedLength === null || reValidate) {
(0, _number.rangeEach)(length - 1, function (row) {
row = _this2.instance.runHooks('modifyRow', row);
if (row === null) {
--length;
}
});
this.cachedLength = length;
} else {
length = this.cachedLength;
}
} else {
this.interval.stop();
}
return Math.min(length, maxRows);
};
/**
* Returns the data array.
*
* @returns {Array}
*/
DataMap.prototype.getAll = function () {
var start = {
row: 0,
col: 0
};
var end = {
row: Math.max(this.instance.countSourceRows() - 1, 0),
col: Math.max(this.instance.countCols() - 1, 0)
};
if (start.row - end.row === 0 && !this.instance.countSourceRows()) {
return [];
}
return this.getRange(start, end, DataMap.prototype.DESTINATION_RENDERER);
};
/**
* Returns data range as array.
*
* @param {Object} [start] Start selection position. Visual indexes.
* @param {Object} [end] End selection position. Visual indexes.
* @param {Number} destination Destination of datamap.get
* @returns {Array}
*/
DataMap.prototype.getRange = function (start, end, destination) {
var r,
rlen,
c,
clen,
output = [],
row;
var maxRows = this.instance.getSettings().maxRows;
var maxCols = this.instance.getSettings().maxCols;
if (maxRows === 0 || maxCols === 0) {
return [];
}
var getFn = destination === this.DESTINATION_CLIPBOARD_GENERATOR ? this.getCopyable : this.get;
rlen = Math.min(Math.max(maxRows - 1, 0), Math.max(start.row, end.row));
clen = Math.min(Math.max(maxCols - 1, 0), Math.max(start.col, end.col));
for (r = Math.min(start.row, end.row); r <= rlen; r++) {
row = [];
var physicalRow = this.instance.runHooks('modifyRow', r);
for (c = Math.min(start.col, end.col); c <= clen; c++) {
if (physicalRow === null) {
break;
}
row.push(getFn.call(this, r, this.colToProp(c)));
}
if (physicalRow !== null) {
output.push(row);
}
}
return output;
};
/**
* Return data as text (tab separated columns).
*
* @param {Object} [start] Start selection position. Visual indexes.
* @param {Object} [end] End selection position. Visual indexes.
* @returns {String}
*/
DataMap.prototype.getText = function (start, end) {
return _SheetClip2.default.stringify(this.getRange(start, end, this.DESTINATION_RENDERER));
};
/**
* Return data as copyable text (tab separated columns intended for clipboard copy to an external application).
*
* @param {Object} [start] Start selection position. Visual indexes.
* @param {Object} [end] End selection position. Visual indexes.
* @returns {String}
*/
DataMap.prototype.getCopyableText = function (start, end) {
return _SheetClip2.default.stringify(this.getRange(start, end, this.DESTINATION_CLIPBOARD_GENERATOR));
};
/**
* `skipLengthCache` callback.
* @private
* @param {Number} delay Time of the delay in milliseconds.
*/
DataMap.prototype.onSkipLengthCache = function (delay) {
var _this3 = this;
this.skipCache = true;
setTimeout(function () {
_this3.skipCache = false;
}, delay);
};
/**
* Destroy instance.
*/
DataMap.prototype.destroy = function () {
this.interval.stop();
this.interval = null;
this.instance = null;
this.priv = null;
this.GridSettings = null;
this.dataSource = null;
this.cachedLength = null;
this.duckSchema = null;
};
exports.default = DataMap;
/***/ }),
/* 379 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
exports.parseDelay = parseDelay;
var _feature = __webpack_require__(39);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Interval
* @util
*/
var Interval = function () {
_createClass(Interval, null, [{
key: 'create',
value: function create(func, delay) {
return new Interval(func, delay);
}
}]);
function Interval(func, delay) {
var _this = this;
_classCallCheck(this, Interval);
/**
* Animation frame request id.
*
* @type {Number}
*/
this.timer = null;
/**
* Function to invoke repeatedly.
*
* @type {Function}
*/
this.func = func;
/**
* Number of milliseconds that function should wait before next call.
*/
this.delay = parseDelay(delay);
/**
* Flag which indicates if interval object was stopped.
*
* @type {Boolean}
* @default true
*/
this.stopped = true;
/**
* Interval time (in milliseconds) of the last callback call.
*
* @private
* @type {Number}
*/
this._then = null;
/**
* Bounded function `func`.
*
* @private
* @type {Function}
*/
this._callback = function () {
return _this.__callback();
};
}
/**
* Start loop.
*
* @returns {Interval}
*/
_createClass(Interval, [{
key: 'start',
value: function start() {
if (this.stopped) {
this._then = Date.now();
this.stopped = false;
this.timer = (0, _feature.requestAnimationFrame)(this._callback);
}
return this;
}
/**
* Stop looping.
*
* @returns {Interval}
*/
}, {
key: 'stop',
value: function stop() {
if (!this.stopped) {
this.stopped = true;
(0, _feature.cancelAnimationFrame)(this.timer);
this.timer = null;
}
return this;
}
/**
* Loop callback, fired on every animation frame.
*
* @private
*/
}, {
key: '__callback',
value: function __callback() {
this.timer = (0, _feature.requestAnimationFrame)(this._callback);
if (this.delay) {
var now = Date.now();
var elapsed = now - this._then;
if (elapsed > this.delay) {
this._then = now - elapsed % this.delay;
this.func();
}
} else {
this.func();
}
}
}]);
return Interval;
}();
exports.default = Interval;
function parseDelay(delay) {
if (typeof delay === 'string' && /fps$/.test(delay)) {
delay = 1000 / parseInt(delay.replace('fps', '') || 0, 10);
}
return delay;
}
/***/ }),
/* 380 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function MultiMap() {
var map = {
arrayMap: [],
weakMap: new WeakMap()
};
return {
get: function get(key) {
if (canBeAnArrayMapKey(key)) {
return map.arrayMap[key];
} else if (canBeAWeakMapKey(key)) {
return map.weakMap.get(key);
}
},
set: function set(key, value) {
if (canBeAnArrayMapKey(key)) {
map.arrayMap[key] = value;
} else if (canBeAWeakMapKey(key)) {
map.weakMap.set(key, value);
} else {
throw new Error('Invalid key type');
}
},
delete: function _delete(key) {
if (canBeAnArrayMapKey(key)) {
delete map.arrayMap[key];
} else if (canBeAWeakMapKey(key)) {
map.weakMap.delete(key);
}
}
};
function canBeAnArrayMapKey(obj) {
return obj !== null && !isNaNSymbol(obj) && (typeof obj == 'string' || typeof obj == 'number');
}
function canBeAWeakMapKey(obj) {
return obj !== null && ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) == 'object' || typeof obj == 'function');
}
function isNaNSymbol(obj) {
/* eslint-disable no-self-compare */
return obj !== obj; // NaN === NaN is always false
}
}
exports.default = MultiMap;
/***/ }),
/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _src = __webpack_require__(15);
var _unicode = __webpack_require__(20);
var _event = __webpack_require__(12);
var _editors = __webpack_require__(16);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _baseEditor = __webpack_require__(47);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function EditorManager(instance, priv, selection) {
var _this = this,
destroyed = false,
eventManager,
activeEditor;
eventManager = new _eventManager2.default(instance);
function moveSelectionAfterEnter(shiftKey) {
selection.setSelectedHeaders(false, false, false);
var enterMoves = typeof priv.settings.enterMoves === 'function' ? priv.settings.enterMoves(event) : priv.settings.enterMoves;
if (shiftKey) {
// move selection up
selection.transformStart(-enterMoves.row, -enterMoves.col);
} else {
// move selection down (add a new row if needed)
selection.transformStart(enterMoves.row, enterMoves.col, true);
}
}
function moveSelectionUp(shiftKey) {
if (shiftKey) {
if (selection.selectedHeader.cols) {
selection.setSelectedHeaders(selection.selectedHeader.rows, false, false);
}
selection.transformEnd(-1, 0);
} else {
selection.setSelectedHeaders(false, false, false);
selection.transformStart(-1, 0);
}
}
function moveSelectionDown(shiftKey) {
if (shiftKey) {
// expanding selection down with shift
selection.transformEnd(1, 0);
} else {
selection.setSelectedHeaders(false, false, false);
selection.transformStart(1, 0);
}
}
function moveSelectionRight(shiftKey) {
if (shiftKey) {
selection.transformEnd(0, 1);
} else {
selection.setSelectedHeaders(false, false, false);
selection.transformStart(0, 1);
}
}
function moveSelectionLeft(shiftKey) {
if (shiftKey) {
if (selection.selectedHeader.rows) {
selection.setSelectedHeaders(false, selection.selectedHeader.cols, false);
}
selection.transformEnd(0, -1);
} else {
selection.setSelectedHeaders(false, false, false);
selection.transformStart(0, -1);
}
}
function onKeyDown(event) {
var ctrlDown, rangeModifier;
if (!instance.isListening()) {
return;
}
instance.runHooks('beforeKeyDown', event);
if (destroyed) {
return;
}
if ((0, _event.isImmediatePropagationStopped)(event)) {
return;
}
priv.lastKeyCode = event.keyCode;
if (!selection.isSelected()) {
return;
}
// catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)
ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;
if (activeEditor && !activeEditor.isWaiting()) {
if (!(0, _unicode.isMetaKey)(event.keyCode) && !(0, _unicode.isCtrlKey)(event.keyCode) && !ctrlDown && !_this.isEditorOpened()) {
_this.openEditor('', event);
return;
}
}
rangeModifier = event.shiftKey ? selection.setRangeEnd : selection.setRangeStart;
switch (event.keyCode) {
case _unicode.KEY_CODES.A:
if (!_this.isEditorOpened() && ctrlDown) {
selection.selectAll();
event.preventDefault();
(0, _event.stopPropagation)(event);
}
break;
case _unicode.KEY_CODES.ARROW_UP:
if (_this.isEditorOpened() && !activeEditor.isWaiting()) {
_this.closeEditorAndSaveChanges(ctrlDown);
}
moveSelectionUp(event.shiftKey);
event.preventDefault();
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.ARROW_DOWN:
if (_this.isEditorOpened() && !activeEditor.isWaiting()) {
_this.closeEditorAndSaveChanges(ctrlDown);
}
moveSelectionDown(event.shiftKey);
event.preventDefault();
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.ARROW_RIGHT:
if (_this.isEditorOpened() && !activeEditor.isWaiting()) {
_this.closeEditorAndSaveChanges(ctrlDown);
}
moveSelectionRight(event.shiftKey);
event.preventDefault();
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.ARROW_LEFT:
if (_this.isEditorOpened() && !activeEditor.isWaiting()) {
_this.closeEditorAndSaveChanges(ctrlDown);
}
moveSelectionLeft(event.shiftKey);
event.preventDefault();
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.TAB:
selection.setSelectedHeaders(false, false, false);
var tabMoves = typeof priv.settings.tabMoves === 'function' ? priv.settings.tabMoves(event) : priv.settings.tabMoves;
if (event.shiftKey) {
// move selection left
selection.transformStart(-tabMoves.row, -tabMoves.col);
} else {
// move selection right (add a new column if needed)
selection.transformStart(tabMoves.row, tabMoves.col, true);
}
event.preventDefault();
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.BACKSPACE:
case _unicode.KEY_CODES.DELETE:
selection.empty(event);
_this.prepareEditor();
event.preventDefault();
break;
case _unicode.KEY_CODES.F2:
/* F2 */
_this.openEditor(null, event);
if (activeEditor) {
activeEditor.enableFullEditMode();
}
event.preventDefault(); // prevent Opera from opening 'Go to Page dialog'
break;
case _unicode.KEY_CODES.ENTER:
/* return/enter */
if (_this.isEditorOpened()) {
if (activeEditor && activeEditor.state !== _baseEditor.EditorState.WAITING) {
_this.closeEditorAndSaveChanges(ctrlDown);
}
moveSelectionAfterEnter(event.shiftKey);
} else if (instance.getSettings().enterBeginsEditing) {
_this.openEditor(null, event);
if (activeEditor) {
activeEditor.enableFullEditMode();
}
} else {
moveSelectionAfterEnter(event.shiftKey);
}
event.preventDefault(); // don't add newline to field
(0, _event.stopImmediatePropagation)(event); // required by HandsontableEditor
break;
case _unicode.KEY_CODES.ESCAPE:
if (_this.isEditorOpened()) {
_this.closeEditorAndRestoreOriginalValue(ctrlDown);
}
event.preventDefault();
break;
case _unicode.KEY_CODES.HOME:
selection.setSelectedHeaders(false, false, false);
if (event.ctrlKey || event.metaKey) {
rangeModifier(new _src.CellCoords(0, priv.selRange.from.col));
} else {
rangeModifier(new _src.CellCoords(priv.selRange.from.row, 0));
}
event.preventDefault(); // don't scroll the window
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.END:
selection.setSelectedHeaders(false, false, false);
if (event.ctrlKey || event.metaKey) {
rangeModifier(new _src.CellCoords(instance.countRows() - 1, priv.selRange.from.col));
} else {
rangeModifier(new _src.CellCoords(priv.selRange.from.row, instance.countCols() - 1));
}
event.preventDefault(); // don't scroll the window
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.PAGE_UP:
selection.setSelectedHeaders(false, false, false);
selection.transformStart(-instance.countVisibleRows(), 0);
event.preventDefault(); // don't page up the window
(0, _event.stopPropagation)(event);
break;
case _unicode.KEY_CODES.PAGE_DOWN:
selection.setSelectedHeaders(false, false, false);
selection.transformStart(instance.countVisibleRows(), 0);
event.preventDefault(); // don't page down the window
(0, _event.stopPropagation)(event);
break;
default:
break;
}
}
function init() {
instance.addHook('afterDocumentKeyDown', onKeyDown);
eventManager.addEventListener(document.documentElement, 'keydown', function (event) {
if (!destroyed) {
instance.runHooks('afterDocumentKeyDown', event);
}
});
function onDblClick(event, coords, elem) {
// may be TD or TH
if (elem.nodeName === 'TD') {
_this.openEditor(null, event);
if (activeEditor) {
activeEditor.enableFullEditMode();
}
}
}
instance.view.wt.update('onCellDblClick', onDblClick);
instance.addHook('afterDestroy', function () {
destroyed = true;
});
}
/**
* Destroy current editor, if exists.
*
* @function destroyEditor
* @memberof! Handsontable.EditorManager#
* @param {Boolean} revertOriginal
*/
this.destroyEditor = function (revertOriginal) {
this.closeEditor(revertOriginal);
};
/**
* Get active editor.
*
* @function getActiveEditor
* @memberof! Handsontable.EditorManager#
* @returns {*}
*/
this.getActiveEditor = function () {
return activeEditor;
};
/**
* Prepare text input to be displayed at given grid cell.
*
* @function prepareEditor
* @memberof! Handsontable.EditorManager#
*/
this.prepareEditor = function () {
var row, col, prop, td, originalValue, cellProperties, editorClass;
if (activeEditor && activeEditor.isWaiting()) {
this.closeEditor(false, false, function (dataSaved) {
if (dataSaved) {
_this.prepareEditor();
}
});
return;
}
row = priv.selRange.highlight.row;
col = priv.selRange.highlight.col;
prop = instance.colToProp(col);
td = instance.getCell(row, col);
originalValue = instance.getSourceDataAtCell(instance.runHooks('modifyRow', row), col);
cellProperties = instance.getCellMeta(row, col);
editorClass = instance.getCellEditor(cellProperties);
if (editorClass) {
activeEditor = (0, _editors.getEditorInstance)(editorClass, instance);
activeEditor.prepare(row, col, prop, td, originalValue, cellProperties);
} else {
activeEditor = void 0;
}
};
/**
* Check is editor is opened/showed.
*
* @function isEditorOpened
* @memberof! Handsontable.EditorManager#
* @returns {Boolean}
*/
this.isEditorOpened = function () {
return activeEditor && activeEditor.isOpened();
};
/**
* Open editor with initial value.
*
* @function openEditor
* @memberof! Handsontable.EditorManager#
* @param {null|String} newInitialValue new value from which editor will start if handled property it's not the `null`.
* @param {DOMEvent} event
*/
this.openEditor = function (newInitialValue, event) {
if (activeEditor && !activeEditor.cellProperties.readOnly) {
activeEditor.beginEditing(newInitialValue, event);
} else if (activeEditor && activeEditor.cellProperties.readOnly) {
// move the selection after opening the editor with ENTER key
if (event && event.keyCode === _unicode.KEY_CODES.ENTER) {
moveSelectionAfterEnter();
}
}
};
/**
* Close editor, finish editing cell.
*
* @function closeEditor
* @memberof! Handsontable.EditorManager#
* @param {Boolean} restoreOriginalValue
* @param {Boolean} [ctrlDown]
* @param {Function} [callback]
*/
this.closeEditor = function (restoreOriginalValue, ctrlDown, callback) {
if (activeEditor) {
activeEditor.finishEditing(restoreOriginalValue, ctrlDown, callback);
} else if (callback) {
callback(false);
}
};
/**
* Close editor and save changes.
*
* @function closeEditorAndSaveChanges
* @memberof! Handsontable.EditorManager#
* @param {Boolean} ctrlDown
*/
this.closeEditorAndSaveChanges = function (ctrlDown) {
return this.closeEditor(false, ctrlDown);
};
/**
* Close editor and restore original value.
*
* @function closeEditorAndRestoreOriginalValue
* @memberof! Handsontable.EditorManager#
* @param {Boolean} ctrlDown
*/
this.closeEditorAndRestoreOriginalValue = function (ctrlDown) {
return this.closeEditor(true, ctrlDown);
};
init();
}
exports.default = EditorManager;
/***/ }),
/* 382 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _element = __webpack_require__(0);
var _browser = __webpack_require__(28);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _event = __webpack_require__(12);
var _src = __webpack_require__(15);
var _src2 = _interopRequireDefault(_src);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Handsontable TableView constructor
* @param {Object} instance
*/
function TableView(instance) {
var _this = this;
var that = this;
this.eventManager = new _eventManager2.default(instance);
this.instance = instance;
this.settings = instance.getSettings();
this.selectionMouseDown = false;
var originalStyle = instance.rootElement.getAttribute('style');
if (originalStyle) {
instance.rootElement.setAttribute('data-originalstyle', originalStyle); // needed to retrieve original style in jsFiddle link generator in HT examples. may be removed in future versions
}
(0, _element.addClass)(instance.rootElement, 'handsontable');
var table = document.createElement('TABLE');
(0, _element.addClass)(table, 'htCore');
if (instance.getSettings().tableClassName) {
(0, _element.addClass)(table, instance.getSettings().tableClassName);
}
this.THEAD = document.createElement('THEAD');
table.appendChild(this.THEAD);
this.TBODY = document.createElement('TBODY');
table.appendChild(this.TBODY);
instance.table = table;
instance.container.insertBefore(table, instance.container.firstChild);
this.eventManager.addEventListener(instance.rootElement, 'mousedown', function (event) {
this.selectionMouseDown = true;
if (!that.isTextSelectionAllowed(event.target)) {
clearTextSelection();
event.preventDefault();
window.focus(); // make sure that window that contains HOT is active. Important when HOT is in iframe.
}
});
this.eventManager.addEventListener(instance.rootElement, 'mouseup', function (event) {
this.selectionMouseDown = false;
});
this.eventManager.addEventListener(instance.rootElement, 'mousemove', function (event) {
if (this.selectionMouseDown && !that.isTextSelectionAllowed(event.target)) {
clearTextSelection();
event.preventDefault();
}
});
this.eventManager.addEventListener(document.documentElement, 'keyup', function (event) {
if (instance.selection.isInProgress() && !event.shiftKey) {
instance.selection.finish();
}
});
var isMouseDown;
this.isMouseDown = function () {
return isMouseDown;
};
this.eventManager.addEventListener(document.documentElement, 'mouseup', function (event) {
if (instance.selection.isInProgress() && (0, _event.isLeftClick)(event)) {
// is left mouse button
instance.selection.finish();
}
isMouseDown = false;
if ((0, _element.isOutsideInput)(document.activeElement) || !instance.selection.isSelected() && !(0, _event.isRightClick)(event)) {
instance.unlisten();
}
});
this.eventManager.addEventListener(document.documentElement, 'mousedown', function (event) {
var originalTarget = event.target;
var next = event.target;
var eventX = event.x || event.clientX;
var eventY = event.y || event.clientY;
if (isMouseDown || !instance.rootElement) {
return; // it must have been started in a cell
}
// immediate click on "holder" means click on the right side of vertical scrollbar
if (next === instance.view.wt.wtTable.holder) {
var scrollbarWidth = (0, _element.getScrollbarWidth)();
if (document.elementFromPoint(eventX + scrollbarWidth, eventY) !== instance.view.wt.wtTable.holder || document.elementFromPoint(eventX, eventY + scrollbarWidth) !== instance.view.wt.wtTable.holder) {
return;
}
} else {
while (next !== document.documentElement) {
if (next === null) {
if (event.isTargetWebComponent) {
break;
}
// click on something that was a row but now is detached (possibly because your click triggered a rerender)
return;
}
if (next === instance.rootElement) {
// click inside container
return;
}
next = next.parentNode;
}
}
// function did not return until here, we have an outside click!
var outsideClickDeselects = typeof that.settings.outsideClickDeselects === 'function' ? that.settings.outsideClickDeselects(originalTarget) : that.settings.outsideClickDeselects;
if (outsideClickDeselects) {
instance.deselectCell();
} else {
instance.destroyEditor();
}
});
this.eventManager.addEventListener(table, 'selectstart', function (event) {
if (that.settings.fragmentSelection || (0, _element.isInput)(event.target)) {
return;
}
// https://github.com/handsontable/handsontable/issues/160
// Prevent text from being selected when performing drag down.
event.preventDefault();
});
var clearTextSelection = function clearTextSelection() {
// http://stackoverflow.com/questions/3169786/clear-text-selection-with-javascript
if (window.getSelection) {
if (window.getSelection().empty) {
// Chrome
window.getSelection().empty();
} else if (window.getSelection().removeAllRanges) {
// Firefox
window.getSelection().removeAllRanges();
}
} else if (document.selection) {
// IE?
document.selection.empty();
}
};
var selections = [new _src.Selection({
className: 'current',
border: {
width: 2,
color: '#5292F7',
// style: 'solid', // not used
cornerVisible: function cornerVisible() {
return that.settings.fillHandle && !that.isCellEdited() && !instance.selection.isMultiple();
},
multipleSelectionHandlesVisible: function multipleSelectionHandlesVisible() {
return !that.isCellEdited() && !instance.selection.isMultiple();
}
}
}), new _src.Selection({
className: 'area',
border: {
width: 1,
color: '#89AFF9',
// style: 'solid', // not used
cornerVisible: function cornerVisible() {
return that.settings.fillHandle && !that.isCellEdited() && instance.selection.isMultiple();
},
multipleSelectionHandlesVisible: function multipleSelectionHandlesVisible() {
return !that.isCellEdited() && instance.selection.isMultiple();
}
}
}), new _src.Selection({
className: 'highlight',
highlightHeaderClassName: that.settings.currentHeaderClassName,
highlightRowClassName: that.settings.currentRowClassName,
highlightColumnClassName: that.settings.currentColClassName
}), new _src.Selection({
className: 'fill',
border: {
width: 1,
color: 'red'
// style: 'solid' // not used
}
})];
selections.current = selections[0];
selections.area = selections[1];
selections.highlight = selections[2];
selections.fill = selections[3];
var walkontableConfig = {
debug: function debug() {
return that.settings.debug;
},
externalRowCalculator: this.instance.getPlugin('autoRowSize') && this.instance.getPlugin('autoRowSize').isEnabled(),
table: table,
preventOverflow: function preventOverflow() {
return _this.settings.preventOverflow;
},
stretchH: function stretchH() {
return that.settings.stretchH;
},
data: instance.getDataAtCell,
totalRows: function totalRows() {
return instance.countRows();
},
totalColumns: function totalColumns() {
return instance.countCols();
},
fixedColumnsLeft: function fixedColumnsLeft() {
return that.settings.fixedColumnsLeft;
},
fixedRowsTop: function fixedRowsTop() {
return that.settings.fixedRowsTop;
},
fixedRowsBottom: function fixedRowsBottom() {
return that.settings.fixedRowsBottom;
},
minSpareRows: function minSpareRows() {
return that.settings.minSpareRows;
},
renderAllRows: that.settings.renderAllRows,
rowHeaders: function rowHeaders() {
var headerRenderers = [];
if (instance.hasRowHeaders()) {
headerRenderers.push(function (row, TH) {
that.appendRowHeader(row, TH);
});
}
instance.runHooks('afterGetRowHeaderRenderers', headerRenderers);
return headerRenderers;
},
columnHeaders: function columnHeaders() {
var headerRenderers = [];
if (instance.hasColHeaders()) {
headerRenderers.push(function (column, TH) {
that.appendColHeader(column, TH);
});
}
instance.runHooks('afterGetColumnHeaderRenderers', headerRenderers);
return headerRenderers;
},
columnWidth: instance.getColWidth,
rowHeight: instance.getRowHeight,
cellRenderer: function cellRenderer(row, col, TD) {
var cellProperties = that.instance.getCellMeta(row, col);
var prop = that.instance.colToProp(col);
var value = that.instance.getDataAtRowProp(row, prop);
if (that.instance.hasHook('beforeValueRender')) {
value = that.instance.runHooks('beforeValueRender', value);
}
that.instance.runHooks('beforeRenderer', TD, row, col, prop, value, cellProperties);
that.instance.getCellRenderer(cellProperties)(that.instance, TD, row, col, prop, value, cellProperties);
that.instance.runHooks('afterRenderer', TD, row, col, prop, value, cellProperties);
},
selections: selections,
hideBorderOnMouseDownOver: function hideBorderOnMouseDownOver() {
return that.settings.fragmentSelection;
},
onCellMouseDown: function onCellMouseDown(event, coords, TD, wt) {
var blockCalculations = {
row: false,
column: false,
cells: false
};
instance.listen();
that.activeWt = wt;
isMouseDown = true;
instance.runHooks('beforeOnCellMouseDown', event, coords, TD, blockCalculations);
if ((0, _event.isImmediatePropagationStopped)(event)) {
return;
}
var actualSelection = instance.getSelectedRange();
var selection = instance.selection;
var selectedHeader = selection.selectedHeader;
if (event.shiftKey && actualSelection) {
if (coords.row >= 0 && coords.col >= 0 && !blockCalculations.cells) {
selection.setSelectedHeaders(false, false);
selection.setRangeEnd(coords);
} else if ((selectedHeader.cols || selectedHeader.rows) && coords.row >= 0 && coords.col >= 0 && !blockCalculations.cells) {
selection.setSelectedHeaders(false, false);
selection.setRangeEnd(new _src.CellCoords(coords.row, coords.col));
} else if (selectedHeader.cols && coords.row < 0 && !blockCalculations.column) {
selection.setRangeEnd(new _src.CellCoords(actualSelection.to.row, coords.col));
} else if (selectedHeader.rows && coords.col < 0 && !blockCalculations.row) {
selection.setRangeEnd(new _src.CellCoords(coords.row, actualSelection.to.col));
} else if ((!selectedHeader.cols && !selectedHeader.rows && coords.col < 0 || selectedHeader.cols && coords.col < 0) && !blockCalculations.row) {
selection.setSelectedHeaders(true, false);
selection.setRangeStartOnly(new _src.CellCoords(actualSelection.from.row, 0));
selection.setRangeEnd(new _src.CellCoords(coords.row, instance.countCols() - 1));
} else if ((!selectedHeader.cols && !selectedHeader.rows && coords.row < 0 || selectedHeader.rows && coords.row < 0) && !blockCalculations.column) {
selection.setSelectedHeaders(false, true);
selection.setRangeStartOnly(new _src.CellCoords(0, actualSelection.from.col));
selection.setRangeEnd(new _src.CellCoords(instance.countRows() - 1, coords.col));
}
} else {
var doNewSelection = true;
if (actualSelection) {
var from = actualSelection.from,
to = actualSelection.to;
var coordsNotInSelection = !selection.inInSelection(coords);
if (coords.row < 0 && selectedHeader.cols) {
var start = Math.min(from.col, to.col);
var end = Math.max(from.col, to.col);
doNewSelection = coords.col < start || coords.col > end;
} else if (coords.col < 0 && selectedHeader.rows) {
var _start = Math.min(from.row, to.row);
var _end = Math.max(from.row, to.row);
doNewSelection = coords.row < _start || coords.row > _end;
} else {
doNewSelection = coordsNotInSelection;
}
}
var rightClick = (0, _event.isRightClick)(event);
var leftClick = (0, _event.isLeftClick)(event) || event.type === 'touchstart';
// clicked row header and when some column was selected
if (coords.row < 0 && coords.col >= 0 && !blockCalculations.column) {
selection.setSelectedHeaders(false, true);
if (leftClick || rightClick && doNewSelection) {
selection.setRangeStartOnly(new _src.CellCoords(0, coords.col));
selection.setRangeEnd(new _src.CellCoords(Math.max(instance.countRows() - 1, 0), coords.col), false);
}
// clicked column header and when some row was selected
} else if (coords.col < 0 && coords.row >= 0 && !blockCalculations.row) {
selection.setSelectedHeaders(true, false);
if (leftClick || rightClick && doNewSelection) {
selection.setRangeStartOnly(new _src.CellCoords(coords.row, 0));
selection.setRangeEnd(new _src.CellCoords(coords.row, Math.max(instance.countCols() - 1, 0)), false);
}
} else if (coords.col >= 0 && coords.row >= 0 && !blockCalculations.cells) {
if (leftClick || rightClick && doNewSelection) {
selection.setSelectedHeaders(false, false);
selection.setRangeStart(coords);
}
} else if (coords.col < 0 && coords.row < 0) {
coords.row = 0;
coords.col = 0;
selection.setSelectedHeaders(false, false, true);
selection.setRangeStart(coords);
}
}
instance.runHooks('afterOnCellMouseDown', event, coords, TD);
that.activeWt = that.wt;
},
onCellMouseOut: function onCellMouseOut(event, coords, TD, wt) {
that.activeWt = wt;
instance.runHooks('beforeOnCellMouseOut', event, coords, TD);
if ((0, _event.isImmediatePropagationStopped)(event)) {
return;
}
instance.runHooks('afterOnCellMouseOut', event, coords, TD);
that.activeWt = that.wt;
},
onCellMouseOver: function onCellMouseOver(event, coords, TD, wt) {
var blockCalculations = {
row: false,
column: false,
cell: false
};
that.activeWt = wt;
instance.runHooks('beforeOnCellMouseOver', event, coords, TD, blockCalculations);
if ((0, _event.isImmediatePropagationStopped)(event)) {
return;
}
if (event.button === 0 && isMouseDown) {
if (coords.row >= 0 && coords.col >= 0) {
// is not a header
if (instance.selection.selectedHeader.cols && !blockCalculations.column) {
instance.selection.setRangeEnd(new _src.CellCoords(instance.countRows() - 1, coords.col), false);
} else if (instance.selection.selectedHeader.rows && !blockCalculations.row) {
instance.selection.setRangeEnd(new _src.CellCoords(coords.row, instance.countCols() - 1), false);
} else if (!blockCalculations.cell) {
instance.selection.setRangeEnd(coords);
}
} else {
/* eslint-disable no-lonely-if */
if (instance.selection.selectedHeader.cols && !blockCalculations.column) {
instance.selection.setRangeEnd(new _src.CellCoords(instance.countRows() - 1, coords.col), false);
} else if (instance.selection.selectedHeader.rows && !blockCalculations.row) {
instance.selection.setRangeEnd(new _src.CellCoords(coords.row, instance.countCols() - 1), false);
} else if (!blockCalculations.cell) {
instance.selection.setRangeEnd(coords);
}
}
}
instance.runHooks('afterOnCellMouseOver', event, coords, TD);
that.activeWt = that.wt;
},
onCellMouseUp: function onCellMouseUp(event, coords, TD, wt) {
that.activeWt = wt;
instance.runHooks('beforeOnCellMouseUp', event, coords, TD);
instance.runHooks('afterOnCellMouseUp', event, coords, TD);
that.activeWt = that.wt;
},
onCellCornerMouseDown: function onCellCornerMouseDown(event) {
event.preventDefault();
instance.runHooks('afterOnCellCornerMouseDown', event);
},
onCellCornerDblClick: function onCellCornerDblClick(event) {
event.preventDefault();
instance.runHooks('afterOnCellCornerDblClick', event);
},
beforeDraw: function beforeDraw(force, skipRender) {
that.beforeRender(force, skipRender);
},
onDraw: function onDraw(force) {
that.onDraw(force);
},
onScrollVertically: function onScrollVertically() {
instance.runHooks('afterScrollVertically');
},
onScrollHorizontally: function onScrollHorizontally() {
instance.runHooks('afterScrollHorizontally');
},
onBeforeDrawBorders: function onBeforeDrawBorders(corners, borderClassName) {
instance.runHooks('beforeDrawBorders', corners, borderClassName);
},
onBeforeTouchScroll: function onBeforeTouchScroll() {
instance.runHooks('beforeTouchScroll');
},
onAfterMomentumScroll: function onAfterMomentumScroll() {
instance.runHooks('afterMomentumScroll');
},
onBeforeStretchingColumnWidth: function onBeforeStretchingColumnWidth(stretchedWidth, column) {
return instance.runHooks('beforeStretchingColumnWidth', stretchedWidth, column);
},
onModifyRowHeaderWidth: function onModifyRowHeaderWidth(rowHeaderWidth) {
return instance.runHooks('modifyRowHeaderWidth', rowHeaderWidth);
},
viewportRowCalculatorOverride: function viewportRowCalculatorOverride(calc) {
var rows = instance.countRows();
var viewportOffset = that.settings.viewportRowRenderingOffset;
if (viewportOffset === 'auto' && that.settings.fixedRowsTop) {
viewportOffset = 10;
}
if (typeof viewportOffset === 'number') {
calc.startRow = Math.max(calc.startRow - viewportOffset, 0);
calc.endRow = Math.min(calc.endRow + viewportOffset, rows - 1);
}
if (viewportOffset === 'auto') {
var center = calc.startRow + calc.endRow - calc.startRow;
var offset = Math.ceil(center / rows * 12);
calc.startRow = Math.max(calc.startRow - offset, 0);
calc.endRow = Math.min(calc.endRow + offset, rows - 1);
}
instance.runHooks('afterViewportRowCalculatorOverride', calc);
},
viewportColumnCalculatorOverride: function viewportColumnCalculatorOverride(calc) {
var cols = instance.countCols();
var viewportOffset = that.settings.viewportColumnRenderingOffset;
if (viewportOffset === 'auto' && that.settings.fixedColumnsLeft) {
viewportOffset = 10;
}
if (typeof viewportOffset === 'number') {
calc.startColumn = Math.max(calc.startColumn - viewportOffset, 0);
calc.endColumn = Math.min(calc.endColumn + viewportOffset, cols - 1);
}
if (viewportOffset === 'auto') {
var center = calc.startColumn + calc.endColumn - calc.startColumn;
var offset = Math.ceil(center / cols * 12);
calc.startRow = Math.max(calc.startColumn - offset, 0);
calc.endColumn = Math.min(calc.endColumn + offset, cols - 1);
}
instance.runHooks('afterViewportColumnCalculatorOverride', calc);
},
rowHeaderWidth: function rowHeaderWidth() {
return that.settings.rowHeaderWidth;
},
columnHeaderHeight: function columnHeaderHeight() {
var columnHeaderHeight = instance.runHooks('modifyColumnHeaderHeight');
return that.settings.columnHeaderHeight || columnHeaderHeight;
}
};
instance.runHooks('beforeInitWalkontable', walkontableConfig);
this.wt = new _src2.default(walkontableConfig);
this.activeWt = this.wt;
if (!(0, _browser.isChrome)() && !(0, _browser.isSafari)()) {
this.eventManager.addEventListener(instance.rootElement, 'wheel', function (event) {
event.preventDefault();
var lineHeight = parseInt((0, _element.getComputedStyle)(document.body)['font-size'], 10);
var holder = that.wt.wtOverlays.scrollableElement;
var deltaY = event.wheelDeltaY || event.deltaY;
var deltaX = event.wheelDeltaX || event.deltaX;
switch (event.deltaMode) {
case 0:
holder.scrollLeft += deltaX;
holder.scrollTop += deltaY;
break;
case 1:
holder.scrollLeft += deltaX * lineHeight;
holder.scrollTop += deltaY * lineHeight;
break;
default:
break;
}
});
}
this.eventManager.addEventListener(that.wt.wtTable.spreader, 'mousedown', function (event) {
// right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
if (event.target === that.wt.wtTable.spreader && event.which === 3) {
(0, _event.stopPropagation)(event);
}
});
this.eventManager.addEventListener(that.wt.wtTable.spreader, 'contextmenu', function (event) {
// right mouse button exactly on spreader means right click on the right hand side of vertical scrollbar
if (event.target === that.wt.wtTable.spreader && event.which === 3) {
(0, _event.stopPropagation)(event);
}
});
this.eventManager.addEventListener(document.documentElement, 'click', function () {
if (that.settings.observeDOMVisibility) {
if (that.wt.drawInterrupted) {
that.instance.forceFullRender = true;
that.render();
}
}
});
}
TableView.prototype.isTextSelectionAllowed = function (el) {
if ((0, _element.isInput)(el)) {
return true;
}
var isChildOfTableBody = (0, _element.isChildOf)(el, this.instance.view.wt.wtTable.spreader);
if (this.settings.fragmentSelection === true && isChildOfTableBody) {
return true;
}
if (this.settings.fragmentSelection === 'cell' && this.isSelectedOnlyCell() && isChildOfTableBody) {
return true;
}
if (!this.settings.fragmentSelection && this.isCellEdited() && this.isSelectedOnlyCell()) {
return true;
}
return false;
};
/**
* Check if selected only one cell.
*
* @returns {Boolean}
*/
TableView.prototype.isSelectedOnlyCell = function () {
var _ref = this.instance.getSelected() || [],
_ref2 = _slicedToArray(_ref, 4),
row = _ref2[0],
col = _ref2[1],
rowEnd = _ref2[2],
colEnd = _ref2[3];
return row !== void 0 && row === rowEnd && col === colEnd;
};
TableView.prototype.isCellEdited = function () {
var activeEditor = this.instance.getActiveEditor();
return activeEditor && activeEditor.isOpened();
};
TableView.prototype.beforeRender = function (force, skipRender) {
if (force) {
// this.instance.forceFullRender = did Handsontable request full render?
this.instance.runHooks('beforeRender', this.instance.forceFullRender, skipRender);
}
};
TableView.prototype.onDraw = function (force) {
if (force) {
// this.instance.forceFullRender = did Handsontable request full render?
this.instance.runHooks('afterRender', this.instance.forceFullRender);
}
};
TableView.prototype.render = function () {
this.wt.draw(!this.instance.forceFullRender);
this.instance.forceFullRender = false;
this.instance.renderCall = false;
};
/**
* Returns td object given coordinates
*
* @param {CellCoords} coords
* @param {Boolean} topmost
*/
TableView.prototype.getCellAtCoords = function (coords, topmost) {
var td = this.wt.getCell(coords, topmost);
if (td < 0) {
// there was an exit code (cell is out of bounds)
return null;
}
return td;
};
/**
* Scroll viewport to selection.
*
* @param {CellCoords} coords
*/
TableView.prototype.scrollViewport = function (coords) {
this.wt.scrollViewport(coords);
};
/**
* Append row header to a TH element
* @param row
* @param TH
*/
TableView.prototype.appendRowHeader = function (row, TH) {
if (TH.firstChild) {
var container = TH.firstChild;
if (!(0, _element.hasClass)(container, 'relative')) {
(0, _element.empty)(TH);
this.appendRowHeader(row, TH);
return;
}
this.updateCellHeader(container.querySelector('.rowHeader'), row, this.instance.getRowHeader);
} else {
var div = document.createElement('div');
var span = document.createElement('span');
div.className = 'relative';
span.className = 'rowHeader';
this.updateCellHeader(span, row, this.instance.getRowHeader);
div.appendChild(span);
TH.appendChild(div);
}
this.instance.runHooks('afterGetRowHeader', row, TH);
};
/**
* Append column header to a TH element
* @param col
* @param TH
*/
TableView.prototype.appendColHeader = function (col, TH) {
if (TH.firstChild) {
var container = TH.firstChild;
if ((0, _element.hasClass)(container, 'relative')) {
this.updateCellHeader(container.querySelector('.colHeader'), col, this.instance.getColHeader);
} else {
(0, _element.empty)(TH);
this.appendColHeader(col, TH);
}
} else {
var div = document.createElement('div');
var span = document.createElement('span');
div.className = 'relative';
span.className = 'colHeader';
this.updateCellHeader(span, col, this.instance.getColHeader);
div.appendChild(span);
TH.appendChild(div);
}
this.instance.runHooks('afterGetColHeader', col, TH);
};
/**
* Update header cell content
*
* @since 0.15.0-beta4
* @param {HTMLElement} element Element to update
* @param {Number} index Row index or column index
* @param {Function} content Function which should be returns content for this cell
*/
TableView.prototype.updateCellHeader = function (element, index, content) {
var renderedIndex = index;
var parentOverlay = this.wt.wtOverlays.getParentOverlay(element) || this.wt;
// prevent wrong calculations from SampleGenerator
if (element.parentNode) {
if ((0, _element.hasClass)(element, 'colHeader')) {
renderedIndex = parentOverlay.wtTable.columnFilter.sourceToRendered(index);
} else if ((0, _element.hasClass)(element, 'rowHeader')) {
renderedIndex = parentOverlay.wtTable.rowFilter.sourceToRendered(index);
}
}
if (renderedIndex > -1) {
(0, _element.fastInnerHTML)(element, content(index));
} else {
// workaround for https://github.com/handsontable/handsontable/issues/1946
(0, _element.fastInnerText)(element, String.fromCharCode(160));
(0, _element.addClass)(element, 'cornerHeader');
}
};
/**
* Given a element's left position relative to the viewport, returns maximum element width until the right
* edge of the viewport (before scrollbar)
*
* @param {Number} leftOffset
* @return {Number}
*/
TableView.prototype.maximumVisibleElementWidth = function (leftOffset) {
var workspaceWidth = this.wt.wtViewport.getWorkspaceWidth();
var maxWidth = workspaceWidth - leftOffset;
return maxWidth > 0 ? maxWidth : 0;
};
/**
* Given a element's top position relative to the viewport, returns maximum element height until the bottom
* edge of the viewport (before scrollbar)
*
* @param {Number} topOffset
* @return {Number}
*/
TableView.prototype.maximumVisibleElementHeight = function (topOffset) {
var workspaceHeight = this.wt.wtViewport.getWorkspaceHeight();
var maxHeight = workspaceHeight - topOffset;
return maxHeight > 0 ? maxHeight : 0;
};
TableView.prototype.mainViewIsActive = function () {
return this.wt === this.activeWt;
};
TableView.prototype.destroy = function () {
this.wt.destroy();
this.eventManager.destroy();
};
exports.default = TableView;
/***/ }),
/* 383 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _number = __webpack_require__(6);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class DataSource
* @private
*/
var DataSource = function () {
function DataSource(hotInstance) {
var dataSource = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
_classCallCheck(this, DataSource);
/**
* Instance of Handsontable.
*
* @type {Handsontable}
*/
this.hot = hotInstance;
/**
* Data source
*
* @type {Array}
*/
this.data = dataSource;
/**
* Type of data source.
*
* @type {String}
* @default 'array'
*/
this.dataType = 'array';
this.colToProp = function () {};
this.propToCol = function () {};
}
/**
* Get all data.
*
* @param {Boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided
* in another format.
* @returns {Array}
*/
_createClass(DataSource, [{
key: 'getData',
value: function getData() {
var toArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var result = this.data;
if (toArray) {
result = this.getByRange({ row: 0, col: 0 }, { row: Math.max(this.countRows() - 1, 0), col: Math.max(this.countColumns() - 1, 0) }, true);
}
return result;
}
/**
* Set new data source.
*
* @param data {Array}
*/
}, {
key: 'setData',
value: function setData(data) {
this.data = data;
}
/**
* Returns array of column values from the data source. `column` is the index of the row in the data source.
*
* @param {Number} column Visual column index.
* @returns {Array}
*/
}, {
key: 'getAtColumn',
value: function getAtColumn(column) {
var _this = this;
var result = [];
(0, _array.arrayEach)(this.data, function (row) {
var property = _this.colToProp(column);
if (typeof property === 'string') {
row = (0, _object.getProperty)(row, property);
} else {
row = row[property];
}
result.push(row);
});
return result;
}
/**
* Returns a single row of the data (array or object, depending on what you have). `row` is the index of the row in the data source.
*
* @param {Number} row Physical row index.
* @returns {Array|Object}
*/
}, {
key: 'getAtRow',
value: function getAtRow(row) {
return this.data[row];
}
/**
* Returns a single value from the data.
*
* @param {Number} row Physical row index.
* @param {Number} column Visual column index.
* @returns {*}
*/
}, {
key: 'getAtCell',
value: function getAtCell(row, column) {
var result = null;
var modifyRowData = this.hot.runHooks('modifyRowData', row);
var dataRow = isNaN(modifyRowData) ? modifyRowData : this.data[row];
if (dataRow) {
var prop = this.colToProp(column);
if (typeof prop === 'string') {
result = (0, _object.getProperty)(dataRow, prop);
} else if (typeof prop === 'function') {
result = prop(this.data.slice(row, row + 1)[0]);
} else {
result = dataRow[prop];
}
}
return result;
}
/**
* Returns source data by passed range.
*
* @param {Object} start Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).
* @param {Object} end Object with physical `row` and `col` keys (or visual column index, if data type is an array of objects).
* @param {Boolean} [toArray=false] If `true` return source data as an array of arrays even when source data was provided
* in another format.
* @returns {Array}
*/
}, {
key: 'getByRange',
value: function getByRange(start, end) {
var _this2 = this;
var toArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var startRow = Math.min(start.row, end.row);
var startCol = Math.min(start.col, end.col);
var endRow = Math.max(start.row, end.row);
var endCol = Math.max(start.col, end.col);
var result = [];
(0, _number.rangeEach)(startRow, endRow, function (currentRow) {
var row = _this2.getAtRow(currentRow);
var newRow = void 0;
if (_this2.dataType === 'array') {
newRow = row.slice(startCol, endCol + 1);
} else if (_this2.dataType === 'object') {
newRow = toArray ? [] : {};
(0, _number.rangeEach)(startCol, endCol, function (column) {
var prop = _this2.colToProp(column);
if (toArray) {
newRow.push(row[prop]);
} else {
newRow[prop] = row[prop];
}
});
}
result.push(newRow);
});
return result;
}
/**
* Count number of rows.
*
* @returns {Number}
*/
}, {
key: 'countRows',
value: function countRows() {
return Array.isArray(this.data) ? this.data.length : 0;
}
/**
* Count number of columns.
*
* @returns {Number}
*/
}, {
key: 'countColumns',
value: function countColumns() {
var result = 0;
if (Array.isArray(this.data)) {
if (this.dataType === 'array') {
result = this.data[0].length;
} else if (this.dataType === 'object') {
result = Object.keys(this.data[0]).length;
}
}
return result;
}
/**
* Destroy instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.data = null;
this.hot = null;
}
}]);
return DataSource;
}();
exports.default = DataSource;
/***/ }),
/* 384 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _dictionary;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
* @preserve
* Authors: Handsoncode
* Last updated: Nov 15, 2017
*
* Description: Definition file for English - United States language-country.
*/
var dictionary = (_dictionary = {
languageCode: 'en-US'
}, _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_ABOVE, 'Insert row above'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ROW_BELOW, 'Insert row below'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_LEFT, 'Insert column left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_INSERT_RIGHT, 'Insert column right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_ROW, ['Remove row', 'Remove rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COLUMN, ['Remove column', 'Remove columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNDO, 'Undo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REDO, 'Redo'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY, 'Read only'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CLEAR_COLUMN, 'Clear column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT, 'Alignment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER, 'Center'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY, 'Justify'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE, 'Middle'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_FREEZE_COLUMN, 'Freeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN, 'Unfreeze column'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS, 'Borders'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_TOP, 'Top'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_RIGHT, 'Right'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_BOTTOM, 'Bottom'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_BORDERS_LEFT, 'Left'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_BORDERS, 'Remove border(s)'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_ADD_COMMENT, 'Add comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_EDIT_COMMENT, 'Edit comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_REMOVE_COMMENT, 'Delete comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT, 'Read-only comment'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_MERGE_CELLS, 'Merge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_UNMERGE_CELLS, 'Unmerge cells'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_COPY, 'Copy'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_CUT, 'Cut'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD, 'Insert child row'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD, 'Detach from parent'), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_COLUMN, ['Hide column', 'Hide columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_COLUMN, ['Show column', 'Show columns']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_HIDE_ROW, ['Hide row', 'Hide rows']), _defineProperty(_dictionary, C.CONTEXTMENU_ITEMS_SHOW_ROW, ['Show row', 'Show rows']), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NONE, 'None'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EMPTY, 'Is empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EMPTY, 'Is not empty'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_EQUAL, 'Is equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_EQUAL, 'Is not equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEGINS_WITH, 'Begins with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_ENDS_WITH, 'Ends with'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_CONTAINS, 'Contains'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_CONTAIN, 'Does not contain'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN, 'Greater than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL, 'Greater than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN, 'Less than'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL, 'Less than or equal to'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BETWEEN, 'Is between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_NOT_BETWEEN, 'Is not between'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_AFTER, 'After'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_BEFORE, 'Before'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TODAY, 'Today'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_TOMORROW, 'Tomorrow'), _defineProperty(_dictionary, C.FILTERS_CONDITIONS_YESTERDAY, 'Yesterday'), _defineProperty(_dictionary, C.FILTERS_VALUES_BLANK_CELLS, 'Blank cells'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_CONDITION, 'Filter by condition'), _defineProperty(_dictionary, C.FILTERS_DIVS_FILTER_BY_VALUE, 'Filter by value'), _defineProperty(_dictionary, C.FILTERS_LABELS_CONJUNCTION, 'And'), _defineProperty(_dictionary, C.FILTERS_LABELS_DISJUNCTION, 'Or'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_SELECT_ALL, 'Select all'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CLEAR, 'Clear'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_OK, 'OK'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_CANCEL, 'Cancel'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SEARCH, 'Search'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_VALUE, 'Value'), _defineProperty(_dictionary, C.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE, 'Second value'), _dictionary);
exports.default = dictionary;
/***/ }),
/* 385 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.getPhraseFormatters = exports.registerPhraseFormatter = undefined;
exports.register = register;
exports.getAll = getAll;
var _staticRegister2 = __webpack_require__(46);
var _staticRegister3 = _interopRequireDefault(_staticRegister2);
var _pluralize = __webpack_require__(386);
var _pluralize2 = _interopRequireDefault(_pluralize);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _staticRegister = (0, _staticRegister3.default)('phraseFormatters'),
registerGloballyPhraseFormatter = _staticRegister.register,
getGlobalPhraseFormatters = _staticRegister.getValues;
/**
* Register phrase formatter.
*
* @param {String} name Name of formatter.
* @param {Function} formatterFn Function which will be applied on phrase propositions. It will transform them if it's possible.
*/
function register(name, formatterFn) {
registerGloballyPhraseFormatter(name, formatterFn);
}
/**
* Get all registered previously formatters.
*
* @returns {Array}
*/
function getAll() {
return getGlobalPhraseFormatters();
}
exports.registerPhraseFormatter = register;
exports.getPhraseFormatters = getAll;
register('pluralize', _pluralize2.default);
/***/ }),
/* 386 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = pluralize;
/**
* Try to choose plural form from available phrase propositions.
*
* @param {Array} phrasePropositions List of phrases propositions.
* @param {number} pluralForm Number determining which phrase form should be used.
*
* @returns {String|Array} One particular phrase if it's possible, list of unchanged phrase propositions otherwise.
*/
function pluralize(phrasePropositions, pluralForm) {
var isPluralizable = Array.isArray(phrasePropositions) && Number.isInteger(pluralForm);
if (isPluralizable) {
return phrasePropositions[pluralForm];
}
return phrasePropositions;
};
/***/ }),
/* 387 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = jQueryWrapper;
function jQueryWrapper(Handsontable) {
var jQuery = typeof window === 'undefined' ? false : window.jQuery;
if (!jQuery) {
return;
}
jQuery.fn.handsontable = function (action) {
var $this = this.first(); // Use only first element from list
var instance = $this.data('handsontable');
// Init case
if (typeof action !== 'string') {
var userSettings = action || {};
if (instance) {
instance.updateSettings(userSettings);
} else {
instance = new Handsontable.Core($this[0], userSettings);
$this.data('handsontable', instance);
instance.init();
}
return $this;
}
// Action case
var args = [];
var output = void 0;
if (arguments.length > 1) {
for (var i = 1, ilen = arguments.length; i < ilen; i++) {
args.push(arguments[i]);
}
}
if (instance) {
if (typeof instance[action] !== 'undefined') {
output = instance[action].apply(instance, args);
if (action === 'destroy') {
$this.removeData();
}
} else {
throw new Error('Handsontable do not provide action: ' + action);
}
}
return output;
};
};
/***/ }),
/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.Base = exports.UndoRedo = exports.TouchScroll = exports.Search = exports.PersistentState = exports.ObserveChanges = exports.MultipleSelectionHandles = exports.MergeCells = exports.ManualRowResize = exports.ManualRowMove = exports.ManualColumnResize = exports.ManualColumnMove = exports.ManualColumnFreeze = exports.DragToScroll = exports.CustomBorders = exports.CopyPaste = exports.ContextMenu = exports.Comments = exports.ColumnSorting = exports.AutoRowSize = exports.AutoFill = exports.AutoColumnSize = undefined;
var _autoColumnSize = __webpack_require__(389);
var _autoColumnSize2 = _interopRequireDefault(_autoColumnSize);
var _autofill = __webpack_require__(390);
var _autofill2 = _interopRequireDefault(_autofill);
var _autoRowSize = __webpack_require__(392);
var _autoRowSize2 = _interopRequireDefault(_autoRowSize);
var _columnSorting = __webpack_require__(393);
var _columnSorting2 = _interopRequireDefault(_columnSorting);
var _comments = __webpack_require__(396);
var _comments2 = _interopRequireDefault(_comments);
var _contextMenu = __webpack_require__(400);
var _contextMenu2 = _interopRequireDefault(_contextMenu);
var _copyPaste = __webpack_require__(417);
var _copyPaste2 = _interopRequireDefault(_copyPaste);
var _customBorders = __webpack_require__(424);
var _customBorders2 = _interopRequireDefault(_customBorders);
var _dragToScroll = __webpack_require__(425);
var _dragToScroll2 = _interopRequireDefault(_dragToScroll);
var _manualColumnFreeze = __webpack_require__(426);
var _manualColumnFreeze2 = _interopRequireDefault(_manualColumnFreeze);
var _manualColumnMove = __webpack_require__(430);
var _manualColumnMove2 = _interopRequireDefault(_manualColumnMove);
var _manualColumnResize = __webpack_require__(435);
var _manualColumnResize2 = _interopRequireDefault(_manualColumnResize);
var _manualRowMove = __webpack_require__(436);
var _manualRowMove2 = _interopRequireDefault(_manualRowMove);
var _manualRowResize = __webpack_require__(441);
var _manualRowResize2 = _interopRequireDefault(_manualRowResize);
var _mergeCells = __webpack_require__(442);
var _mergeCells2 = _interopRequireDefault(_mergeCells);
var _multipleSelectionHandles = __webpack_require__(443);
var _multipleSelectionHandles2 = _interopRequireDefault(_multipleSelectionHandles);
var _observeChanges = __webpack_require__(444);
var _observeChanges2 = _interopRequireDefault(_observeChanges);
var _persistentState = __webpack_require__(447);
var _persistentState2 = _interopRequireDefault(_persistentState);
var _search = __webpack_require__(448);
var _search2 = _interopRequireDefault(_search);
var _touchScroll = __webpack_require__(449);
var _touchScroll2 = _interopRequireDefault(_touchScroll);
var _undoRedo = __webpack_require__(450);
var _undoRedo2 = _interopRequireDefault(_undoRedo);
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.AutoColumnSize = _autoColumnSize2.default;
exports.AutoFill = _autofill2.default;
exports.AutoRowSize = _autoRowSize2.default;
exports.ColumnSorting = _columnSorting2.default;
exports.Comments = _comments2.default;
exports.ContextMenu = _contextMenu2.default;
exports.CopyPaste = _copyPaste2.default;
exports.CustomBorders = _customBorders2.default;
exports.DragToScroll = _dragToScroll2.default;
exports.ManualColumnFreeze = _manualColumnFreeze2.default;
exports.ManualColumnMove = _manualColumnMove2.default;
exports.ManualColumnResize = _manualColumnResize2.default;
exports.ManualRowMove = _manualRowMove2.default;
exports.ManualRowResize = _manualRowResize2.default;
exports.MergeCells = _mergeCells2.default;
exports.MultipleSelectionHandles = _multipleSelectionHandles2.default;
exports.ObserveChanges = _observeChanges2.default;
exports.PersistentState = _persistentState2.default;
exports.Search = _search2.default;
exports.TouchScroll = _touchScroll2.default;
exports.UndoRedo = _undoRedo2.default;
exports.Base = _base2.default;
/***/ }),
/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _array = __webpack_require__(2);
var _feature = __webpack_require__(39);
var _element = __webpack_require__(0);
var _ghostTable = __webpack_require__(87);
var _ghostTable2 = _interopRequireDefault(_ghostTable);
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
var _plugins = __webpack_require__(7);
var _samplesGenerator = __webpack_require__(313);
var _samplesGenerator2 = _interopRequireDefault(_samplesGenerator);
var _string = __webpack_require__(36);
var _src = __webpack_require__(15);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var privatePool = new WeakMap();
/**
* @plugin AutoColumnSize
*
* @description
* This plugin allows to set column widths based on their widest cells.
*
* By default, the plugin is declared as `undefined`, which makes it enabled (same as if it was declared as `true`).
* Enabling this plugin may decrease the overall table performance, as it needs to calculate the widths of all cells to
* resize the columns accordingly.
* If you experience problems with the performance, try turning this feature off and declaring the column widths manually.
*
* Column width calculations are divided into sync and async part. Each of this parts has their own advantages and
* disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't
* block the browser UI.
*
* To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:
* ```js
* ...
* // as a number (300 columns in sync, rest async)
* autoColumnSize: {syncLimit: 300},
* ...
*
* ...
* // as a string (percent)
* autoColumnSize: {syncLimit: '40%'},
* ...
* ```
*
* To configure this plugin see {@link Options#autoColumnSize}.
*
* @example
* ```js
* ...
* var hot = new Handsontable(document.getElementById('example'), {
* date: getData(),
* autoColumnSize: true
* });
* // Access to plugin instance:
* var plugin = hot.getPlugin('autoColumnSize');
*
* plugin.getColumnWidth(4);
*
* if (plugin.isEnabled()) {
* // code...
* }
* ...
* ```
*/
var AutoColumnSize = function (_BasePlugin) {
_inherits(AutoColumnSize, _BasePlugin);
_createClass(AutoColumnSize, null, [{
key: 'CALCULATION_STEP',
get: function get() {
return 50;
}
}, {
key: 'SYNC_CALCULATION_LIMIT',
get: function get() {
return 50;
}
}]);
function AutoColumnSize(hotInstance) {
_classCallCheck(this, AutoColumnSize);
var _this = _possibleConstructorReturn(this, (AutoColumnSize.__proto__ || Object.getPrototypeOf(AutoColumnSize)).call(this, hotInstance));
privatePool.set(_this, {
/**
* Cached column header names. It is used to diff current column headers with previous state and detect which
* columns width should be updated.
*
* @private
* @type {Array}
*/
cachedColumnHeaders: []
});
/**
* Cached columns widths.
*
* @type {Array}
*/
_this.widths = [];
/**
* Instance of {@link GhostTable} for rows and columns size calculations.
*
* @type {GhostTable}
*/
_this.ghostTable = new _ghostTable2.default(_this.hot);
/**
* Instance of {@link SamplesGenerator} for generating samples necessary for columns width calculations.
*
* @type {SamplesGenerator}
*/
_this.samplesGenerator = new _samplesGenerator2.default(function (row, col) {
return _this.hot.getDataAtCell(row, col);
});
/**
* `true` only if the first calculation was performed
*
* @type {Boolean}
*/
_this.firstCalculation = true;
/**
* `true` if the size calculation is in progress.
*
* @type {Boolean}
*/
_this.inProgress = false;
// moved to constructor to allow auto-sizing the columns when the plugin is disabled
_this.addHook('beforeColumnResize', function (col, size, isDblClick) {
return _this.onBeforeColumnResize(col, size, isDblClick);
});
return _this;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(AutoColumnSize, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().autoColumnSize !== false && !this.hot.getSettings().colWidths;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
var setting = this.hot.getSettings().autoColumnSize;
if (setting && setting.useHeaders != null) {
this.ghostTable.setSetting('useHeaders', setting.useHeaders);
}
this.addHook('afterLoadData', function () {
return _this2.onAfterLoadData();
});
this.addHook('beforeChange', function (changes) {
return _this2.onBeforeChange(changes);
});
this.addHook('beforeRender', function (force) {
return _this2.onBeforeRender(force);
});
this.addHook('modifyColWidth', function (width, col) {
return _this2.getColumnWidth(col, width);
});
this.addHook('afterInit', function () {
return _this2.onAfterInit();
});
_get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'enablePlugin', this).call(this);
}
/**
* Update plugin state.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
var changedColumns = this.findColumnsWhereHeaderWasChanged();
if (changedColumns.length) {
this.clearCache(changedColumns);
}
_get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'disablePlugin', this).call(this);
}
/**
* Calculate a columns width.
*
* @param {Number|Object} colRange Column range object.
* @param {Number|Object} rowRange Row range object.
* @param {Boolean} [force=false] If `true` force calculate width even when value was cached earlier.
*/
}, {
key: 'calculateColumnsWidth',
value: function calculateColumnsWidth() {
var colRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countCols() - 1 };
var _this3 = this;
var rowRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: 0, to: this.hot.countRows() - 1 };
var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (typeof colRange === 'number') {
colRange = { from: colRange, to: colRange };
}
if (typeof rowRange === 'number') {
rowRange = { from: rowRange, to: rowRange };
}
(0, _number.rangeEach)(colRange.from, colRange.to, function (col) {
if (force || _this3.widths[col] === void 0 && !_this3.hot._getColWidthFromSettings(col)) {
var samples = _this3.samplesGenerator.generateColumnSamples(col, rowRange);
samples.forEach(function (sample, col) {
return _this3.ghostTable.addColumn(col, sample);
});
}
});
if (this.ghostTable.columns.length) {
this.ghostTable.getWidths(function (col, width) {
_this3.widths[col] = width;
});
this.ghostTable.clean();
}
}
/**
* Calculate all columns width.
*
* @param {Object|Number} rowRange Row range object.
*/
}, {
key: 'calculateAllColumnsWidth',
value: function calculateAllColumnsWidth() {
var _this4 = this;
var rowRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countRows() - 1 };
var current = 0;
var length = this.hot.countCols() - 1;
var timer = null;
this.inProgress = true;
var loop = function loop() {
// When hot was destroyed after calculating finished cancel frame
if (!_this4.hot) {
(0, _feature.cancelAnimationFrame)(timer);
_this4.inProgress = false;
return;
}
_this4.calculateColumnsWidth({
from: current,
to: Math.min(current + AutoColumnSize.CALCULATION_STEP, length)
}, rowRange);
current = current + AutoColumnSize.CALCULATION_STEP + 1;
if (current < length) {
timer = (0, _feature.requestAnimationFrame)(loop);
} else {
(0, _feature.cancelAnimationFrame)(timer);
_this4.inProgress = false;
// @TODO Should call once per render cycle, currently fired separately in different plugins
_this4.hot.view.wt.wtOverlays.adjustElementsSize(true);
// tmp
if (_this4.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {
_this4.hot.view.wt.wtOverlays.leftOverlay.clone.draw();
}
}
};
// sync
if (this.firstCalculation && this.getSyncCalculationLimit()) {
this.calculateColumnsWidth({ from: 0, to: this.getSyncCalculationLimit() }, rowRange);
this.firstCalculation = false;
current = this.getSyncCalculationLimit() + 1;
}
// async
if (current < length) {
loop();
} else {
this.inProgress = false;
}
}
/**
* Set the sampling options.
*
* @private
*/
}, {
key: 'setSamplingOptions',
value: function setSamplingOptions() {
var setting = this.hot.getSettings().autoColumnSize;
var samplingRatio = setting && (0, _object.hasOwnProperty)(setting, 'samplingRatio') ? this.hot.getSettings().autoColumnSize.samplingRatio : void 0;
var allowSampleDuplicates = setting && (0, _object.hasOwnProperty)(setting, 'allowSampleDuplicates') ? this.hot.getSettings().autoColumnSize.allowSampleDuplicates : void 0;
if (samplingRatio && !isNaN(samplingRatio)) {
this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));
}
if (allowSampleDuplicates) {
this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);
}
}
/**
* Recalculate all columns width (overwrite cache values).
*/
}, {
key: 'recalculateAllColumnsWidth',
value: function recalculateAllColumnsWidth() {
if (this.hot.view && (0, _element.isVisible)(this.hot.view.wt.wtTable.TABLE)) {
this.clearCache();
this.calculateAllColumnsWidth();
}
}
/**
* Get value which tells how many columns should be calculated synchronously. Rest of the columns will be calculated asynchronously.
*
* @returns {Number}
*/
}, {
key: 'getSyncCalculationLimit',
value: function getSyncCalculationLimit() {
/* eslint-disable no-bitwise */
var limit = AutoColumnSize.SYNC_CALCULATION_LIMIT;
var colsLimit = this.hot.countCols() - 1;
if ((0, _object.isObject)(this.hot.getSettings().autoColumnSize)) {
limit = this.hot.getSettings().autoColumnSize.syncLimit;
if ((0, _string.isPercentValue)(limit)) {
limit = (0, _number.valueAccordingPercent)(colsLimit, limit);
} else {
// Force to Number
limit >>= 0;
}
}
return Math.min(limit, colsLimit);
}
/**
* Get the calculated column width.
*
* @param {Number} col Column index.
* @param {Number} [defaultWidth] Default column width. It will be picked up if no calculated width found.
* @param {Boolean} [keepMinimum=true] If `true` then returned value won't be smaller then 50 (default column width).
* @returns {Number}
*/
}, {
key: 'getColumnWidth',
value: function getColumnWidth(col) {
var defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : void 0;
var keepMinimum = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
var width = defaultWidth;
if (width === void 0) {
width = this.widths[col];
if (keepMinimum && typeof width === 'number') {
width = Math.max(width, _src.ViewportColumnsCalculator.DEFAULT_WIDTH);
}
}
return width;
}
/**
* Get the first visible column.
*
* @returns {Number} Returns column index or -1 if table is not rendered.
*/
}, {
key: 'getFirstVisibleColumn',
value: function getFirstVisibleColumn() {
var wot = this.hot.view.wt;
if (wot.wtViewport.columnsVisibleCalculator) {
return wot.wtTable.getFirstVisibleColumn();
}
if (wot.wtViewport.columnsRenderCalculator) {
return wot.wtTable.getFirstRenderedColumn();
}
return -1;
}
/**
* Get the last visible column.
*
* @returns {Number} Returns column index or -1 if table is not rendered.
*/
}, {
key: 'getLastVisibleColumn',
value: function getLastVisibleColumn() {
var wot = this.hot.view.wt;
if (wot.wtViewport.columnsVisibleCalculator) {
return wot.wtTable.getLastVisibleColumn();
}
if (wot.wtViewport.columnsRenderCalculator) {
return wot.wtTable.getLastRenderedColumn();
}
return -1;
}
/**
* Collects all columns which titles has been changed in comparison to the previous state.
*
* @returns {Array} It returns an array of physical column indexes.
*/
}, {
key: 'findColumnsWhereHeaderWasChanged',
value: function findColumnsWhereHeaderWasChanged() {
var columnHeaders = this.hot.getColHeader();
var _privatePool$get = privatePool.get(this),
cachedColumnHeaders = _privatePool$get.cachedColumnHeaders;
var changedColumns = (0, _array.arrayReduce)(columnHeaders, function (acc, columnTitle, physicalColumn) {
var cachedColumnsLength = cachedColumnHeaders.length;
if (cachedColumnsLength - 1 < physicalColumn || cachedColumnHeaders[physicalColumn] !== columnTitle) {
acc.push(physicalColumn);
}
if (cachedColumnsLength - 1 < physicalColumn) {
cachedColumnHeaders.push(columnTitle);
} else {
cachedColumnHeaders[physicalColumn] = columnTitle;
}
return acc;
}, []);
return changedColumns;
}
/**
* Clear cache of calculated column widths. If you want to clear only selected columns pass an array with their indexes.
* Otherwise whole cache will be cleared.
*
* @param {Array} [columns=[]] List of column indexes (physical indexes) to clear.
*/
}, {
key: 'clearCache',
value: function clearCache() {
var _this5 = this;
var columns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
if (columns.length) {
(0, _array.arrayEach)(columns, function (physicalIndex) {
_this5.widths[physicalIndex] = void 0;
});
} else {
this.widths.length = 0;
}
}
/**
* Check if all widths were calculated. If not then return `true` (need recalculate).
*
* @returns {Boolean}
*/
}, {
key: 'isNeedRecalculate',
value: function isNeedRecalculate() {
return !!(0, _array.arrayFilter)(this.widths, function (item) {
return item === void 0;
}).length;
}
/**
* On before render listener.
*
* @private
*/
}, {
key: 'onBeforeRender',
value: function onBeforeRender() {
var force = this.hot.renderCall;
var rowsCount = this.hot.countRows();
// Keep last column widths unchanged for situation when all rows was deleted or trimmed (pro #6)
if (!rowsCount) {
return;
}
this.calculateColumnsWidth({ from: this.getFirstVisibleColumn(), to: this.getLastVisibleColumn() }, void 0, force);
if (this.isNeedRecalculate() && !this.inProgress) {
this.calculateAllColumnsWidth();
}
}
/**
* On after load data listener.
*
* @private
*/
}, {
key: 'onAfterLoadData',
value: function onAfterLoadData() {
var _this6 = this;
if (this.hot.view) {
this.recalculateAllColumnsWidth();
} else {
// first load - initialization
setTimeout(function () {
if (_this6.hot) {
_this6.recalculateAllColumnsWidth();
}
}, 0);
}
}
/**
* On before change listener.
*
* @private
* @param {Array} changes
*/
}, {
key: 'onBeforeChange',
value: function onBeforeChange(changes) {
var _this7 = this;
var changedColumns = (0, _array.arrayMap)(changes, function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
row = _ref2[0],
column = _ref2[1];
return _this7.hot.propToCol(column);
});
this.clearCache(changedColumns);
}
/**
* On before column resize listener.
*
* @private
* @param {Number} col
* @param {Number} size
* @param {Boolean} isDblClick
* @returns {Number}
*/
}, {
key: 'onBeforeColumnResize',
value: function onBeforeColumnResize(col, size, isDblClick) {
if (isDblClick) {
this.calculateColumnsWidth(col, void 0, true);
size = this.getColumnWidth(col, void 0, false);
}
return size;
}
/**
* On after Handsontable init fill plugin with all necessary values.
*
* @private
*/
}, {
key: 'onAfterInit',
value: function onAfterInit() {
privatePool.get(this).cachedColumnHeaders = this.hot.getColHeader();
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.ghostTable.clean();
_get(AutoColumnSize.prototype.__proto__ || Object.getPrototypeOf(AutoColumnSize.prototype), 'destroy', this).call(this);
}
}]);
return AutoColumnSize;
}(_base2.default);
(0, _plugins.registerPlugin)('autoColumnSize', AutoColumnSize);
exports.default = AutoColumnSize;
/***/ }),
/* 390 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _element = __webpack_require__(0);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _plugins = __webpack_require__(7);
var _src = __webpack_require__(15);
var _utils = __webpack_require__(391);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('modifyAutofillRange');
_pluginHooks2.default.getSingleton().register('beforeAutofill');
var INSERT_ROW_ALTER_ACTION_NAME = 'insert_row';
var INTERVAL_FOR_ADDING_ROW = 200;
/**
* This plugin provides "drag-down" and "copy-down" functionalities, both operated
* using the small square in the right bottom of the cell selection.
*
* "Drag-down" expands the value of the selected cells to the neighbouring
* cells when you drag the small square in the corner.
*
* "Copy-down" copies the value of the selection to all empty cells
* below when you double click the small square.
*
* @class Autofill
* @plugin Autofill
*/
var Autofill = function (_BasePlugin) {
_inherits(Autofill, _BasePlugin);
function Autofill(hotInstance) {
_classCallCheck(this, Autofill);
/**
* Event manager
*
* @type {EventManager}
*/
var _this = _possibleConstructorReturn(this, (Autofill.__proto__ || Object.getPrototypeOf(Autofill)).call(this, hotInstance));
_this.eventManager = new _eventManager2.default(_this);
/**
* Specifies if adding new row started.
*
* @type {Boolean}
*/
_this.addingStarted = false;
/**
* Specifies if there was mouse down on the cell corner.
*
* @type {Boolean}
*/
_this.mouseDownOnCellCorner = false;
/**
* Specifies if mouse was dragged outside Handsontable.
*
* @type {Boolean}
*/
_this.mouseDragOutside = false;
/**
* Specifies how many cell levels were dragged using the handle.
*
* @type {Boolean}
*/
_this.handleDraggedCells = 0;
/**
* Specifies allowed directions of drag.
*
* @type {Array}
*/
_this.directions = [];
/**
* Specifies if can insert new rows if needed.
*
* @type {Boolean}
*/
_this.autoInsertRow = false;
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(Autofill, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().fillHandle;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.mapSettings();
this.registerEvents();
this.addHook('afterOnCellCornerMouseDown', function (event) {
return _this2.onAfterCellCornerMouseDown(event);
});
this.addHook('afterOnCellCornerDblClick', function (event) {
return _this2.onCellCornerDblClick(event);
});
this.addHook('beforeOnCellMouseOver', function (event, coords, TD) {
return _this2.onBeforeCellMouseOver(coords);
});
_get(Autofill.prototype.__proto__ || Object.getPrototypeOf(Autofill.prototype), 'enablePlugin', this).call(this);
}
/**
* Update plugin for this Handsontable instance.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(Autofill.prototype.__proto__ || Object.getPrototypeOf(Autofill.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
this.clearMappedSettings();
_get(Autofill.prototype.__proto__ || Object.getPrototypeOf(Autofill.prototype), 'disablePlugin', this).call(this);
}
/**
* Get selection data
*
* @private
* @returns {Array} Array with the data.
*/
}, {
key: 'getSelectionData',
value: function getSelectionData() {
var selRange = {
from: this.hot.getSelectedRange().from,
to: this.hot.getSelectedRange().to
};
return this.hot.getData(selRange.from.row, selRange.from.col, selRange.to.row, selRange.to.col);
}
/**
* Try to apply fill values to the area in fill border, omitting the selection border.
*
* @private
* @returns {Boolean} reports if fill was applied.
*/
}, {
key: 'fillIn',
value: function fillIn() {
if (this.hot.view.wt.selections.fill.isEmpty()) {
return false;
}
var cornersOfSelectionAndDragAreas = this.hot.view.wt.selections.fill.getCorners();
this.resetSelectionOfDraggedArea();
var cornersOfSelectedCells = this.getCornersOfSelectedCells();
var _getDragDirectionAndR = (0, _utils.getDragDirectionAndRange)(cornersOfSelectedCells, cornersOfSelectionAndDragAreas),
directionOfDrag = _getDragDirectionAndR.directionOfDrag,
startOfDragCoords = _getDragDirectionAndR.startOfDragCoords,
endOfDragCoords = _getDragDirectionAndR.endOfDragCoords;
this.hot.runHooks('modifyAutofillRange', cornersOfSelectedCells, cornersOfSelectionAndDragAreas);
if (startOfDragCoords && startOfDragCoords.row > -1 && startOfDragCoords.col > -1) {
var selectionData = this.getSelectionData();
var deltas = (0, _utils.getDeltas)(startOfDragCoords, endOfDragCoords, selectionData, directionOfDrag);
var fillData = selectionData;
this.hot.runHooks('beforeAutofill', startOfDragCoords, endOfDragCoords, selectionData);
if (['up', 'left'].indexOf(directionOfDrag) > -1) {
fillData = [];
var dragLength = null;
var fillOffset = null;
if (directionOfDrag === 'up') {
dragLength = endOfDragCoords.row - startOfDragCoords.row + 1;
fillOffset = dragLength % selectionData.length;
for (var i = 0; i < dragLength; i++) {
fillData.push(selectionData[(i + (selectionData.length - fillOffset)) % selectionData.length]);
}
} else {
dragLength = endOfDragCoords.col - startOfDragCoords.col + 1;
fillOffset = dragLength % selectionData[0].length;
for (var _i = 0; _i < selectionData.length; _i++) {
fillData.push([]);
for (var j = 0; j < dragLength; j++) {
fillData[_i].push(selectionData[_i][(j + (selectionData[_i].length - fillOffset)) % selectionData[_i].length]);
}
}
}
}
this.hot.populateFromArray(startOfDragCoords.row, startOfDragCoords.col, fillData, endOfDragCoords.row, endOfDragCoords.col, this.pluginName + '.fill', null, directionOfDrag, deltas);
this.setSelection(cornersOfSelectionAndDragAreas);
} else {
// reset to avoid some range bug
this.hot.selection.refreshBorders();
}
return true;
}
/**
* Reduce the selection area if the handle was dragged outside of the table or on headers.
*
* @private
* @param {CellCoords} coords indexes of selection corners.
* @returns {CellCoords}
*/
}, {
key: 'reduceSelectionAreaIfNeeded',
value: function reduceSelectionAreaIfNeeded(coords) {
if (coords.row < 0) {
coords.row = 0;
}
if (coords.col < 0) {
coords.col = 0;
}
return coords;
}
/**
* Get the coordinates of the drag & drop borders.
*
* @private
* @param {CellCoords} coordsOfSelection `CellCoords` coord object.
* @returns {Array}
*/
}, {
key: 'getCoordsOfDragAndDropBorders',
value: function getCoordsOfDragAndDropBorders(coordsOfSelection) {
var topLeftCorner = this.hot.getSelectedRange().getTopLeftCorner();
var bottomRightCorner = this.hot.getSelectedRange().getBottomRightCorner();
var coords = void 0;
if (this.directions.includes(_utils.DIRECTIONS.vertical) && (bottomRightCorner.row < coordsOfSelection.row || topLeftCorner.row > coordsOfSelection.row)) {
coords = new _src.CellCoords(coordsOfSelection.row, bottomRightCorner.col);
} else if (this.directions.includes(_utils.DIRECTIONS.horizontal)) {
coords = new _src.CellCoords(bottomRightCorner.row, coordsOfSelection.col);
} else {
// wrong direction
return;
}
return this.reduceSelectionAreaIfNeeded(coords);
}
/**
* Show the fill border.
*
* @private
* @param {CellCoords} coordsOfSelection `CellCoords` coord object.
*/
}, {
key: 'showBorder',
value: function showBorder(coordsOfSelection) {
var coordsOfDragAndDropBorders = this.getCoordsOfDragAndDropBorders(coordsOfSelection);
if (coordsOfDragAndDropBorders) {
this.redrawBorders(coordsOfDragAndDropBorders);
}
}
/**
* Add new row
*
* @private
*/
}, {
key: 'addRow',
value: function addRow() {
var _this3 = this;
this.hot._registerTimeout(setTimeout(function () {
_this3.hot.alter(INSERT_ROW_ALTER_ACTION_NAME, void 0, 1, _this3.pluginName + '.fill');
_this3.addingStarted = false;
}, INTERVAL_FOR_ADDING_ROW));
}
/**
* Add new rows if they are needed to continue auto-filling values.
*
* @private
*/
}, {
key: 'addNewRowIfNeeded',
value: function addNewRowIfNeeded() {
if (this.hot.view.wt.selections.fill.cellRange && this.addingStarted === false && this.autoInsertRow) {
var cornersOfSelectedCells = this.hot.getSelected();
var cornersOfSelectedDragArea = this.hot.view.wt.selections.fill.getCorners();
var nrOfTableRows = this.hot.countRows();
if (cornersOfSelectedCells[2] < nrOfTableRows - 1 && cornersOfSelectedDragArea[2] === nrOfTableRows - 1) {
this.addingStarted = true;
this.addRow();
}
}
}
/**
* Get corners of selected cells.
*
* @private
* @returns {Array}
*/
}, {
key: 'getCornersOfSelectedCells',
value: function getCornersOfSelectedCells() {
if (this.hot.selection.isMultiple()) {
return this.hot.view.wt.selections.area.getCorners();
}
return this.hot.view.wt.selections.current.getCorners();
}
/**
* Get index of last adjacent filled in row
*
* @private
* @param {Array} cornersOfSelectedCells indexes of selection corners.
* @returns {Number} gives number greater than or equal to zero when selection adjacent can be applied.
* or -1 when selection adjacent can't be applied
*/
}, {
key: 'getIndexOfLastAdjacentFilledInRow',
value: function getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells) {
var data = this.hot.getData();
var nrOfTableRows = this.hot.countRows();
var lastFilledInRowIndex = void 0;
for (var rowIndex = cornersOfSelectedCells[2] + 1; rowIndex < nrOfTableRows; rowIndex++) {
for (var columnIndex = cornersOfSelectedCells[1]; columnIndex <= cornersOfSelectedCells[3]; columnIndex++) {
var dataInCell = data[rowIndex][columnIndex];
if (dataInCell) {
return -1;
}
}
var dataInNextLeftCell = data[rowIndex][cornersOfSelectedCells[1] - 1];
var dataInNextRightCell = data[rowIndex][cornersOfSelectedCells[3] + 1];
if (!!dataInNextLeftCell || !!dataInNextRightCell) {
lastFilledInRowIndex = rowIndex;
}
}
return lastFilledInRowIndex;
}
/**
* Add a selection from the start area to the specific row index.
*
* @private
* @param {Array} selectStartArea selection area from which we start to create more comprehensive selection.
* @param {Number} rowIndex
*/
}, {
key: 'addSelectionFromStartAreaToSpecificRowIndex',
value: function addSelectionFromStartAreaToSpecificRowIndex(selectStartArea, rowIndex) {
this.hot.view.wt.selections.fill.clear();
this.hot.view.wt.selections.fill.add(new _src.CellCoords(selectStartArea[0], selectStartArea[1]));
this.hot.view.wt.selections.fill.add(new _src.CellCoords(rowIndex, selectStartArea[3]));
}
/**
* Set selection based on passed corners.
*
* @private
* @param {Array} cornersOfArea
*/
}, {
key: 'setSelection',
value: function setSelection(cornersOfArea) {
this.hot.selection.setRangeStart(new _src.CellCoords(cornersOfArea[0], cornersOfArea[1]));
this.hot.selection.setRangeEnd(new _src.CellCoords(cornersOfArea[2], cornersOfArea[3]));
}
/**
* Try to select cells down to the last row in the left column and then returns if selection was applied.
*
* @private
* @returns {Boolean}
*/
}, {
key: 'selectAdjacent',
value: function selectAdjacent() {
var cornersOfSelectedCells = this.getCornersOfSelectedCells();
var lastFilledInRowIndex = this.getIndexOfLastAdjacentFilledInRow(cornersOfSelectedCells);
if (lastFilledInRowIndex === -1) {
return false;
}
this.addSelectionFromStartAreaToSpecificRowIndex(cornersOfSelectedCells, lastFilledInRowIndex);
return true;
}
/**
* Reset selection of dragged area.
*
* @private
*/
}, {
key: 'resetSelectionOfDraggedArea',
value: function resetSelectionOfDraggedArea() {
this.handleDraggedCells = 0;
this.hot.view.wt.selections.fill.clear();
}
/**
* Redraw borders.
*
* @private
* @param {CellCoords} coords `CellCoords` coord object.
*/
}, {
key: 'redrawBorders',
value: function redrawBorders(coords) {
this.hot.view.wt.selections.fill.clear();
this.hot.view.wt.selections.fill.add(this.hot.getSelectedRange().from);
this.hot.view.wt.selections.fill.add(this.hot.getSelectedRange().to);
this.hot.view.wt.selections.fill.add(coords);
this.hot.view.render();
}
/**
* Get if mouse was dragged outside.
*
* @private
* @param {MouseEvent} event `mousemove` event properties.
* @returns {Boolean}
*/
}, {
key: 'getIfMouseWasDraggedOutside',
value: function getIfMouseWasDraggedOutside(event) {
var tableBottom = (0, _element.offset)(this.hot.table).top - (window.pageYOffset || document.documentElement.scrollTop) + (0, _element.outerHeight)(this.hot.table);
var tableRight = (0, _element.offset)(this.hot.table).left - (window.pageXOffset || document.documentElement.scrollLeft) + (0, _element.outerWidth)(this.hot.table);
return event.clientY > tableBottom && event.clientX <= tableRight;
}
/**
* Bind the events used by the plugin.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this4 = this;
this.eventManager.addEventListener(document.documentElement, 'mouseup', function () {
return _this4.onMouseUp();
});
this.eventManager.addEventListener(document.documentElement, 'mousemove', function (event) {
return _this4.onMouseMove(event);
});
}
/**
* On cell corner double click callback.
*
* @private
*/
}, {
key: 'onCellCornerDblClick',
value: function onCellCornerDblClick() {
var selectionApplied = this.selectAdjacent();
if (selectionApplied) {
this.fillIn();
}
}
/**
* On after cell corner mouse down listener.
*
* @private
*/
}, {
key: 'onAfterCellCornerMouseDown',
value: function onAfterCellCornerMouseDown() {
this.handleDraggedCells = 1;
this.mouseDownOnCellCorner = true;
}
/**
* On before cell mouse over listener.
*
* @private
* @param {CellCoords} coords `CellCoords` coord object.
*/
}, {
key: 'onBeforeCellMouseOver',
value: function onBeforeCellMouseOver(coords) {
if (this.mouseDownOnCellCorner && !this.hot.view.isMouseDown() && this.handleDraggedCells) {
this.handleDraggedCells++;
this.showBorder(coords);
this.addNewRowIfNeeded();
}
}
/**
* On mouse up listener.
*
* @private
*/
}, {
key: 'onMouseUp',
value: function onMouseUp() {
if (this.handleDraggedCells) {
if (this.handleDraggedCells > 1) {
this.fillIn();
}
this.handleDraggedCells = 0;
this.mouseDownOnCellCorner = false;
}
}
/**
* On mouse move listener.
*
* @private
* @param {MouseEvent} event `mousemove` event properties.
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
var mouseWasDraggedOutside = this.getIfMouseWasDraggedOutside(event);
if (this.addingStarted === false && this.handleDraggedCells > 0 && mouseWasDraggedOutside) {
this.mouseDragOutside = true;
this.addingStarted = true;
} else {
this.mouseDragOutside = false;
}
if (this.mouseDragOutside && this.autoInsertRow) {
this.addRow();
}
}
/**
* Clear mapped settings.
*
* @private
*/
}, {
key: 'clearMappedSettings',
value: function clearMappedSettings() {
this.directions.length = 0;
this.autoInsertRow = false;
}
/**
* Map settings.
*
* @private
*/
}, {
key: 'mapSettings',
value: function mapSettings() {
var mappedSettings = (0, _utils.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);
this.directions = mappedSettings.directions;
this.autoInsertRow = mappedSettings.autoInsertRow;
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
_get(Autofill.prototype.__proto__ || Object.getPrototypeOf(Autofill.prototype), 'destroy', this).call(this);
}
}]);
return Autofill;
}(_base2.default);
(0, _plugins.registerPlugin)('autofill', Autofill);
exports.default = Autofill;
/***/ }),
/* 391 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.DIRECTIONS = undefined;
exports.getDeltas = getDeltas;
exports.getDragDirectionAndRange = getDragDirectionAndRange;
exports.getMappedFillHandleSetting = getMappedFillHandleSetting;
var _object = __webpack_require__(1);
var _mixed = __webpack_require__(17);
var _src = __webpack_require__(15);
var DIRECTIONS = exports.DIRECTIONS = {
horizontal: 'horizontal',
vertical: 'vertical'
};
/**
* Get deltas array.
*
* @param {CellCoords} start
* @param {CellCoords} end
* @param {Array} data
* @param {String} direction
* @returns {Array}
*/
function getDeltas(start, end, data, direction) {
var rowsLength = data.length;
var columnsLength = data ? data[0].length : 0;
var deltas = [];
var diffRow = end.row - start.row;
var diffCol = end.col - start.col;
if (['down', 'up'].indexOf(direction) !== -1) {
var arr = [];
for (var col = 0; col <= diffCol; col++) {
var startValue = parseInt(data[0][col], 10);
var endValue = parseInt(data[rowsLength - 1][col], 10);
var delta = (direction === 'down' ? endValue - startValue : startValue - endValue) / (rowsLength - 1) || 0;
arr.push(delta);
}
deltas.push(arr);
}
if (['right', 'left'].indexOf(direction) !== -1) {
for (var row = 0; row <= diffRow; row++) {
var _startValue = parseInt(data[row][0], 10);
var _endValue = parseInt(data[row][columnsLength - 1], 10);
var _delta = (direction === 'right' ? _endValue - _startValue : _startValue - _endValue) / (columnsLength - 1) || 0;
deltas.push([_delta]);
}
}
return deltas;
}
/**
* Get direction between positions and cords of selections difference (drag area)
*
* @param {Array} startSelection
* @param {Array} endSelection
* @returns {{direction: String, start: CellCoords, end: CellCoords}}
*/
function getDragDirectionAndRange(startSelection, endSelection) {
var startOfDragCoords = void 0,
endOfDragCoords = void 0,
directionOfDrag = void 0;
if (endSelection[0] === startSelection[0] && endSelection[1] < startSelection[1]) {
directionOfDrag = 'left';
startOfDragCoords = new _src.CellCoords(endSelection[0], endSelection[1]);
endOfDragCoords = new _src.CellCoords(endSelection[2], startSelection[1] - 1);
} else if (endSelection[0] === startSelection[0] && endSelection[3] > startSelection[3]) {
directionOfDrag = 'right';
startOfDragCoords = new _src.CellCoords(endSelection[0], startSelection[3] + 1);
endOfDragCoords = new _src.CellCoords(endSelection[2], endSelection[3]);
} else if (endSelection[0] < startSelection[0] && endSelection[1] === startSelection[1]) {
directionOfDrag = 'up';
startOfDragCoords = new _src.CellCoords(endSelection[0], endSelection[1]);
endOfDragCoords = new _src.CellCoords(startSelection[0] - 1, endSelection[3]);
} else if (endSelection[2] > startSelection[2] && endSelection[1] === startSelection[1]) {
directionOfDrag = 'down';
startOfDragCoords = new _src.CellCoords(startSelection[2] + 1, endSelection[1]);
endOfDragCoords = new _src.CellCoords(endSelection[2], endSelection[3]);
}
return {
directionOfDrag: directionOfDrag,
startOfDragCoords: startOfDragCoords,
endOfDragCoords: endOfDragCoords
};
}
/**
* Get mapped FillHandle setting containing information about
* allowed FillHandle directions and if allowed is automatic insertion of rows on drag
*
* @param {Boolean|Object} fillHandle property of Handsontable settings
* @returns {{directions: Array, autoInsertRow: Boolean}} object allowing access to information
* about FillHandle in more useful way
*/
function getMappedFillHandleSetting(fillHandle) {
var mappedSettings = {};
if (fillHandle === true) {
mappedSettings.directions = Object.keys(DIRECTIONS);
mappedSettings.autoInsertRow = true;
} else if ((0, _object.isObject)(fillHandle)) {
if ((0, _mixed.isDefined)(fillHandle.autoInsertRow)) {
// autoInsertRow for horizontal direction will be always false
if (fillHandle.direction === DIRECTIONS.horizontal) {
mappedSettings.autoInsertRow = false;
} else {
mappedSettings.autoInsertRow = fillHandle.autoInsertRow;
}
} else {
mappedSettings.autoInsertRow = false;
}
if ((0, _mixed.isDefined)(fillHandle.direction)) {
mappedSettings.directions = [fillHandle.direction];
} else {
mappedSettings.directions = Object.keys(DIRECTIONS);
}
} else if (typeof fillHandle === 'string') {
mappedSettings.directions = [fillHandle];
mappedSettings.autoInsertRow = true;
} else {
mappedSettings.directions = [];
mappedSettings.autoInsertRow = false;
}
return mappedSettings;
}
/***/ }),
/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _array = __webpack_require__(2);
var _feature = __webpack_require__(39);
var _element = __webpack_require__(0);
var _ghostTable = __webpack_require__(87);
var _ghostTable2 = _interopRequireDefault(_ghostTable);
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
var _plugins = __webpack_require__(7);
var _samplesGenerator = __webpack_require__(313);
var _samplesGenerator2 = _interopRequireDefault(_samplesGenerator);
var _string = __webpack_require__(36);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @plugin AutoRowSize
*
* @description
* This plugin allows to set row heights based on their highest cells.
*
* By default, the plugin is declared as `undefined`, which makes it disabled (same as if it was declared as `false`).
* Enabling this plugin may decrease the overall table performance, as it needs to calculate the heights of all cells to
* resize the rows accordingly.
* If you experience problems with the performance, try turning this feature off and declaring the row heights manually.
*
* Row height calculations are divided into sync and async part. Each of this parts has their own advantages and
* disadvantages. Synchronous calculations are faster but they block the browser UI, while the slower asynchronous operations don't
* block the browser UI.
*
* To configure the sync/async distribution, you can pass an absolute value (number of columns) or a percentage value to a config object:
* ```js
* ...
* // as a number (300 columns in sync, rest async)
* autoRowSize: {syncLimit: 300},
* ...
*
* ...
* // as a string (percent)
* autoRowSize: {syncLimit: '40%'},
* ...
* ```
*
* You can also use the `allowSampleDuplicates` option to allow sampling duplicate values when calculating the row height. Note, that this might have
* a negative impact on performance.
*
* To configure this plugin see {@link Options#autoRowSize}.
*
* @example
*
* ```js
* ...
* var hot = new Handsontable(document.getElementById('example'), {
* date: getData(),
* autoRowSize: true
* });
* // Access to plugin instance:
* var plugin = hot.getPlugin('autoRowSize');
*
* plugin.getRowHeight(4);
*
* if (plugin.isEnabled()) {
* // code...
* }
* ...
* ```
*/
var AutoRowSize = function (_BasePlugin) {
_inherits(AutoRowSize, _BasePlugin);
_createClass(AutoRowSize, null, [{
key: 'CALCULATION_STEP',
get: function get() {
return 50;
}
}, {
key: 'SYNC_CALCULATION_LIMIT',
get: function get() {
return 500;
}
}]);
function AutoRowSize(hotInstance) {
_classCallCheck(this, AutoRowSize);
/**
* Cached rows heights.
*
* @type {Array}
*/
var _this = _possibleConstructorReturn(this, (AutoRowSize.__proto__ || Object.getPrototypeOf(AutoRowSize)).call(this, hotInstance));
_this.heights = [];
/**
* Instance of {@link GhostTable} for rows and columns size calculations.
*
* @type {GhostTable}
*/
_this.ghostTable = new _ghostTable2.default(_this.hot);
/**
* Instance of {@link SamplesGenerator} for generating samples necessary for rows height calculations.
*
* @type {SamplesGenerator}
*/
_this.samplesGenerator = new _samplesGenerator2.default(function (row, col) {
if (row >= 0) {
return _this.hot.getDataAtCell(row, col);
} else if (row === -1) {
return _this.hot.getColHeader(col);
}
return null;
});
/**
* `true` if only the first calculation was performed.
*
* @type {Boolean}
*/
_this.firstCalculation = true;
/**
* `true` if the size calculation is in progress.
*
* @type {Boolean}
*/
_this.inProgress = false;
// moved to constructor to allow auto-sizing the rows when the plugin is disabled
_this.addHook('beforeRowResize', function (row, size, isDblClick) {
return _this.onBeforeRowResize(row, size, isDblClick);
});
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(AutoRowSize, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().autoRowSize === true || (0, _object.isObject)(this.hot.getSettings().autoRowSize);
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.setSamplingOptions();
this.addHook('afterLoadData', function () {
return _this2.onAfterLoadData();
});
this.addHook('beforeChange', function (changes) {
return _this2.onBeforeChange(changes);
});
this.addHook('beforeColumnMove', function () {
return _this2.recalculateAllRowsHeight();
});
this.addHook('beforeColumnResize', function () {
return _this2.recalculateAllRowsHeight();
});
this.addHook('beforeColumnSort', function () {
return _this2.clearCache();
});
this.addHook('beforeRender', function (force) {
return _this2.onBeforeRender(force);
});
this.addHook('beforeRowMove', function (rowStart, rowEnd) {
return _this2.onBeforeRowMove(rowStart, rowEnd);
});
this.addHook('modifyRowHeight', function (height, row) {
return _this2.getRowHeight(row, height);
});
this.addHook('modifyColumnHeaderHeight', function () {
return _this2.getColumnHeaderHeight();
});
_get(AutoRowSize.prototype.__proto__ || Object.getPrototypeOf(AutoRowSize.prototype), 'enablePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(AutoRowSize.prototype.__proto__ || Object.getPrototypeOf(AutoRowSize.prototype), 'disablePlugin', this).call(this);
}
/**
* Calculate a given rows height.
*
* @param {Number|Object} rowRange Row range object.
* @param {Number|Object} colRange Column range object.
* @param {Boolean} [force=false] If `true` force calculate height even when value was cached earlier.
*/
}, {
key: 'calculateRowsHeight',
value: function calculateRowsHeight() {
var rowRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countRows() - 1 };
var _this3 = this;
var colRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { from: 0, to: this.hot.countCols() - 1 };
var force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
if (typeof rowRange === 'number') {
rowRange = { from: rowRange, to: rowRange };
}
if (typeof colRange === 'number') {
colRange = { from: colRange, to: colRange };
}
if (this.hot.getColHeader(0) !== null) {
var samples = this.samplesGenerator.generateRowSamples(-1, colRange);
this.ghostTable.addColumnHeadersRow(samples.get(-1));
}
(0, _number.rangeEach)(rowRange.from, rowRange.to, function (row) {
// For rows we must calculate row height even when user had set height value manually.
// We can shrink column but cannot shrink rows!
if (force || _this3.heights[row] === void 0) {
var _samples = _this3.samplesGenerator.generateRowSamples(row, colRange);
_samples.forEach(function (sample, row) {
_this3.ghostTable.addRow(row, sample);
});
}
});
if (this.ghostTable.rows.length) {
this.ghostTable.getHeights(function (row, height) {
_this3.heights[row] = height;
});
this.ghostTable.clean();
}
}
/**
* Calculate the height of all the rows.
*
* @param {Object|Number} colRange Column range object.
*/
}, {
key: 'calculateAllRowsHeight',
value: function calculateAllRowsHeight() {
var _this4 = this;
var colRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { from: 0, to: this.hot.countCols() - 1 };
var current = 0;
var length = this.hot.countRows() - 1;
var timer = null;
this.inProgress = true;
var loop = function loop() {
// When hot was destroyed after calculating finished cancel frame
if (!_this4.hot) {
(0, _feature.cancelAnimationFrame)(timer);
_this4.inProgress = false;
return;
}
_this4.calculateRowsHeight({ from: current, to: Math.min(current + AutoRowSize.CALCULATION_STEP, length) }, colRange);
current = current + AutoRowSize.CALCULATION_STEP + 1;
if (current < length) {
timer = (0, _feature.requestAnimationFrame)(loop);
} else {
(0, _feature.cancelAnimationFrame)(timer);
_this4.inProgress = false;
// @TODO Should call once per render cycle, currently fired separately in different plugins
_this4.hot.view.wt.wtOverlays.adjustElementsSize(true);
// tmp
if (_this4.hot.view.wt.wtOverlays.leftOverlay.needFullRender) {
_this4.hot.view.wt.wtOverlays.leftOverlay.clone.draw();
}
}
};
// sync
if (this.firstCalculation && this.getSyncCalculationLimit()) {
this.calculateRowsHeight({ from: 0, to: this.getSyncCalculationLimit() }, colRange);
this.firstCalculation = false;
current = this.getSyncCalculationLimit() + 1;
}
// async
if (current < length) {
loop();
} else {
this.inProgress = false;
this.hot.view.wt.wtOverlays.adjustElementsSize(false);
}
}
/**
* Set the sampling options.
*
* @private
*/
}, {
key: 'setSamplingOptions',
value: function setSamplingOptions() {
var setting = this.hot.getSettings().autoRowSize;
var samplingRatio = setting && (0, _object.hasOwnProperty)(setting, 'samplingRatio') ? this.hot.getSettings().autoRowSize.samplingRatio : void 0;
var allowSampleDuplicates = setting && (0, _object.hasOwnProperty)(setting, 'allowSampleDuplicates') ? this.hot.getSettings().autoRowSize.allowSampleDuplicates : void 0;
if (samplingRatio && !isNaN(samplingRatio)) {
this.samplesGenerator.setSampleCount(parseInt(samplingRatio, 10));
}
if (allowSampleDuplicates) {
this.samplesGenerator.setAllowDuplicates(allowSampleDuplicates);
}
}
/**
* Recalculate all rows height (overwrite cache values).
*/
}, {
key: 'recalculateAllRowsHeight',
value: function recalculateAllRowsHeight() {
if ((0, _element.isVisible)(this.hot.view.wt.wtTable.TABLE)) {
this.clearCache();
this.calculateAllRowsHeight();
}
}
/**
* Get value which tells how much rows will be calculated synchronously. Rest rows will be calculated asynchronously.
*
* @returns {Number}
*/
}, {
key: 'getSyncCalculationLimit',
value: function getSyncCalculationLimit() {
/* eslint-disable no-bitwise */
var limit = AutoRowSize.SYNC_CALCULATION_LIMIT;
var rowsLimit = this.hot.countRows() - 1;
if ((0, _object.isObject)(this.hot.getSettings().autoRowSize)) {
limit = this.hot.getSettings().autoRowSize.syncLimit;
if ((0, _string.isPercentValue)(limit)) {
limit = (0, _number.valueAccordingPercent)(rowsLimit, limit);
} else {
// Force to Number
limit >>= 0;
}
}
return Math.min(limit, rowsLimit);
}
/**
* Get the calculated row height.
*
* @param {Number} row Visual row index.
* @param {Number} [defaultHeight] Default row height. It will be pick up if no calculated height found.
* @returns {Number}
*/
}, {
key: 'getRowHeight',
value: function getRowHeight(row) {
var defaultHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : void 0;
var height = defaultHeight;
if (this.heights[row] !== void 0 && this.heights[row] > (defaultHeight || 0)) {
height = this.heights[row];
}
return height;
}
/**
* Get the calculated column header height.
*
* @returns {Number|undefined}
*/
}, {
key: 'getColumnHeaderHeight',
value: function getColumnHeaderHeight() {
return this.heights[-1];
}
/**
* Get the first visible row.
*
* @returns {Number} Returns row index or -1 if table is not rendered.
*/
}, {
key: 'getFirstVisibleRow',
value: function getFirstVisibleRow() {
var wot = this.hot.view.wt;
if (wot.wtViewport.rowsVisibleCalculator) {
return wot.wtTable.getFirstVisibleRow();
}
if (wot.wtViewport.rowsRenderCalculator) {
return wot.wtTable.getFirstRenderedRow();
}
return -1;
}
/**
* Get the last visible row.
*
* @returns {Number} Returns row index or -1 if table is not rendered.
*/
}, {
key: 'getLastVisibleRow',
value: function getLastVisibleRow() {
var wot = this.hot.view.wt;
if (wot.wtViewport.rowsVisibleCalculator) {
return wot.wtTable.getLastVisibleRow();
}
if (wot.wtViewport.rowsRenderCalculator) {
return wot.wtTable.getLastRenderedRow();
}
return -1;
}
/**
* Clear cached heights.
*/
}, {
key: 'clearCache',
value: function clearCache() {
this.heights.length = 0;
this.heights[-1] = void 0;
}
/**
* Clear cache by range.
*
* @param {Object|Number} range Row range object.
*/
}, {
key: 'clearCacheByRange',
value: function clearCacheByRange(range) {
var _this5 = this;
if (typeof range === 'number') {
range = { from: range, to: range };
}
(0, _number.rangeEach)(Math.min(range.from, range.to), Math.max(range.from, range.to), function (row) {
_this5.heights[row] = void 0;
});
}
/**
* @returns {Boolean}
*/
}, {
key: 'isNeedRecalculate',
value: function isNeedRecalculate() {
return !!(0, _array.arrayFilter)(this.heights, function (item) {
return item === void 0;
}).length;
}
/**
* On before render listener.
*
* @private
*/
}, {
key: 'onBeforeRender',
value: function onBeforeRender() {
var force = this.hot.renderCall;
this.calculateRowsHeight({ from: this.getFirstVisibleRow(), to: this.getLastVisibleRow() }, void 0, force);
var fixedRowsBottom = this.hot.getSettings().fixedRowsBottom;
// Calculate rows height synchronously for bottom overlay
if (fixedRowsBottom) {
var totalRows = this.hot.countRows() - 1;
this.calculateRowsHeight({ from: totalRows - fixedRowsBottom, to: totalRows });
}
if (this.isNeedRecalculate() && !this.inProgress) {
this.calculateAllRowsHeight();
}
}
/**
* On before row move listener.
*
* @private
* @param {Number} from Row index where was grabbed.
* @param {Number} to Destination row index.
*/
}, {
key: 'onBeforeRowMove',
value: function onBeforeRowMove(from, to) {
this.clearCacheByRange({ from: from, to: to });
this.calculateAllRowsHeight();
}
/**
* On before row resize listener.
*
* @private
* @param {Number} row
* @param {Number} size
* @param {Boolean} isDblClick
* @returns {Number}
*/
}, {
key: 'onBeforeRowResize',
value: function onBeforeRowResize(row, size, isDblClick) {
if (isDblClick) {
this.calculateRowsHeight(row, void 0, true);
size = this.getRowHeight(row);
}
return size;
}
/**
* On after load data listener.
*
* @private
*/
}, {
key: 'onAfterLoadData',
value: function onAfterLoadData() {
var _this6 = this;
if (this.hot.view) {
this.recalculateAllRowsHeight();
} else {
// first load - initialization
setTimeout(function () {
if (_this6.hot) {
_this6.recalculateAllRowsHeight();
}
}, 0);
}
}
/**
* On before change listener.
*
* @private
* @param {Array} changes
*/
}, {
key: 'onBeforeChange',
value: function onBeforeChange(changes) {
var range = null;
if (changes.length === 1) {
range = changes[0][0];
} else if (changes.length > 1) {
range = {
from: changes[0][0],
to: changes[changes.length - 1][0]
};
}
if (range !== null) {
this.clearCacheByRange(range);
}
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.ghostTable.clean();
_get(AutoRowSize.prototype.__proto__ || Object.getPrototypeOf(AutoRowSize.prototype), 'destroy', this).call(this);
}
}]);
return AutoRowSize;
}(_base2.default);
(0, _plugins.registerPlugin)('autoRowSize', AutoRowSize);
exports.default = AutoRowSize;
/***/ }),
/* 393 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _moment = __webpack_require__(40);
var _moment2 = _interopRequireDefault(_moment);
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
var _mixed = __webpack_require__(17);
var _object = __webpack_require__(1);
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _plugins = __webpack_require__(7);
var _mergeSort = __webpack_require__(394);
var _mergeSort2 = _interopRequireDefault(_mergeSort);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('beforeColumnSort');
_pluginHooks2.default.getSingleton().register('afterColumnSort');
// TODO: Implement mixin arrayMapper to ColumnSorting plugin.
/**
* @plugin ColumnSorting
*
* @description
* This plugin sorts the view by a column (but does not sort the data source!).
* To enable the plugin, set the `columnSorting` property to either:
* * a boolean value (`true`/`false`),
* * an object defining the initial sorting order (see the example below).
*
* @example
* ```js
* ...
* // as boolean
* columnSorting: true
* ...
* // as a object with initial order (sort ascending column at index 2)
* columnSorting: {
* column: 2,
* sortOrder: true, // true = ascending, false = descending, undefined = original order
* sortEmptyCells: true // true = the table sorts empty cells, false = the table moves all empty cells to the end of the table
* }
* ...
* ```
* @dependencies ObserveChanges
*/
var ColumnSorting = function (_BasePlugin) {
_inherits(ColumnSorting, _BasePlugin);
function ColumnSorting(hotInstance) {
_classCallCheck(this, ColumnSorting);
var _this2 = _possibleConstructorReturn(this, (ColumnSorting.__proto__ || Object.getPrototypeOf(ColumnSorting)).call(this, hotInstance));
_this2.sortIndicators = [];
_this2.lastSortedColumn = null;
_this2.sortEmptyCells = false;
return _this2;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ColumnSorting, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().columnSorting;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this3 = this;
if (this.enabled) {
return;
}
this.setPluginOptions();
var _this = this;
this.hot.sortIndex = [];
this.hot.sort = function () {
var args = Array.prototype.slice.call(arguments);
return _this.sortByColumn.apply(_this, _toConsumableArray(args));
};
if (typeof this.hot.getSettings().observeChanges === 'undefined') {
this.enableObserveChangesPlugin();
}
this.addHook('afterTrimRow', function (row) {
return _this3.sort();
});
this.addHook('afterUntrimRow', function (row) {
return _this3.sort();
});
this.addHook('modifyRow', function (row) {
return _this3.translateRow(row);
});
this.addHook('unmodifyRow', function (row) {
return _this3.untranslateRow(row);
});
this.addHook('afterUpdateSettings', function () {
return _this3.onAfterUpdateSettings();
});
this.addHook('afterGetColHeader', function (col, TH) {
return _this3.getColHeader(col, TH);
});
this.addHook('afterOnCellMouseDown', function (event, target) {
return _this3.onAfterOnCellMouseDown(event, target);
});
this.addHook('afterCreateRow', function () {
_this.afterCreateRow.apply(_this, arguments);
});
this.addHook('afterRemoveRow', function () {
_this.afterRemoveRow.apply(_this, arguments);
});
this.addHook('afterInit', function () {
return _this3.sortBySettings();
});
this.addHook('afterLoadData', function () {
_this3.hot.sortIndex = [];
if (_this3.hot.view) {
_this3.sortBySettings();
}
});
if (this.hot.view) {
this.sortBySettings();
}
_get(ColumnSorting.prototype.__proto__ || Object.getPrototypeOf(ColumnSorting.prototype), 'enablePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
this.hot.sort = void 0;
_get(ColumnSorting.prototype.__proto__ || Object.getPrototypeOf(ColumnSorting.prototype), 'disablePlugin', this).call(this);
}
/**
* afterUpdateSettings callback.
*
* @private
*/
}, {
key: 'onAfterUpdateSettings',
value: function onAfterUpdateSettings() {
this.sortBySettings();
}
}, {
key: 'sortBySettings',
value: function sortBySettings() {
var sortingSettings = this.hot.getSettings().columnSorting;
var loadedSortingState = this.loadSortingState();
var sortingColumn = void 0;
var sortingOrder = void 0;
if (typeof loadedSortingState === 'undefined') {
sortingColumn = sortingSettings.column;
sortingOrder = sortingSettings.sortOrder;
} else {
sortingColumn = loadedSortingState.sortColumn;
sortingOrder = loadedSortingState.sortOrder;
}
if (typeof sortingColumn === 'number') {
this.lastSortedColumn = sortingColumn;
this.sortByColumn(sortingColumn, sortingOrder);
}
}
/**
* Set sorted column and order info
*
* @param {number} col Sorted visual column index.
* @param {boolean|undefined} order Sorting order (`true` for ascending, `false` for descending).
*/
}, {
key: 'setSortingColumn',
value: function setSortingColumn(col, order) {
if (typeof col == 'undefined') {
this.hot.sortColumn = void 0;
this.hot.sortOrder = void 0;
return;
} else if (this.hot.sortColumn === col && typeof order == 'undefined') {
if (this.hot.sortOrder === false) {
this.hot.sortOrder = void 0;
} else {
this.hot.sortOrder = !this.hot.sortOrder;
}
} else {
this.hot.sortOrder = typeof order === 'undefined' ? true : order;
}
this.hot.sortColumn = col;
}
}, {
key: 'sortByColumn',
value: function sortByColumn(col, order) {
this.setSortingColumn(col, order);
if (typeof this.hot.sortColumn == 'undefined') {
return;
}
var allowSorting = this.hot.runHooks('beforeColumnSort', this.hot.sortColumn, this.hot.sortOrder);
if (allowSorting !== false) {
this.sort();
}
this.updateOrderClass();
this.updateSortIndicator();
this.hot.runHooks('afterColumnSort', this.hot.sortColumn, this.hot.sortOrder);
this.hot.render();
this.saveSortingState();
}
/**
* Save the sorting state
*/
}, {
key: 'saveSortingState',
value: function saveSortingState() {
var sortingState = {};
if (typeof this.hot.sortColumn != 'undefined') {
sortingState.sortColumn = this.hot.sortColumn;
}
if (typeof this.hot.sortOrder != 'undefined') {
sortingState.sortOrder = this.hot.sortOrder;
}
if ((0, _object.hasOwnProperty)(sortingState, 'sortColumn') || (0, _object.hasOwnProperty)(sortingState, 'sortOrder')) {
this.hot.runHooks('persistentStateSave', 'columnSorting', sortingState);
}
}
/**
* Load the sorting state.
*
* @returns {*} Previously saved sorting state.
*/
}, {
key: 'loadSortingState',
value: function loadSortingState() {
var storedState = {};
this.hot.runHooks('persistentStateLoad', 'columnSorting', storedState);
return storedState.value;
}
/**
* Update sorting class name state.
*/
}, {
key: 'updateOrderClass',
value: function updateOrderClass() {
var orderClass = void 0;
if (this.hot.sortOrder === true) {
orderClass = 'ascending';
} else if (this.hot.sortOrder === false) {
orderClass = 'descending';
}
this.sortOrderClass = orderClass;
}
}, {
key: 'enableObserveChangesPlugin',
value: function enableObserveChangesPlugin() {
var _this = this;
this.hot._registerTimeout(setTimeout(function () {
_this.hot.updateSettings({
observeChanges: true
});
}, 0));
}
/**
* Default sorting algorithm.
*
* @param {Boolean} sortOrder Sorting order - `true` for ascending, `false` for descending.
* @param {Object} columnMeta Column meta object.
* @returns {Function} The comparing function.
*/
}, {
key: 'defaultSort',
value: function defaultSort(sortOrder, columnMeta) {
return function (a, b) {
if (typeof a[1] == 'string') {
a[1] = a[1].toLowerCase();
}
if (typeof b[1] == 'string') {
b[1] = b[1].toLowerCase();
}
if (a[1] === b[1]) {
return 0;
}
if ((0, _mixed.isEmpty)(a[1])) {
if ((0, _mixed.isEmpty)(b[1])) {
return 0;
}
if (columnMeta.columnSorting.sortEmptyCells) {
return sortOrder ? -1 : 1;
}
return 1;
}
if ((0, _mixed.isEmpty)(b[1])) {
if ((0, _mixed.isEmpty)(a[1])) {
return 0;
}
if (columnMeta.columnSorting.sortEmptyCells) {
return sortOrder ? 1 : -1;
}
return -1;
}
if (isNaN(a[1]) && !isNaN(b[1])) {
return sortOrder ? 1 : -1;
} else if (!isNaN(a[1]) && isNaN(b[1])) {
return sortOrder ? -1 : 1;
} else if (!(isNaN(a[1]) || isNaN(b[1]))) {
a[1] = parseFloat(a[1]);
b[1] = parseFloat(b[1]);
}
if (a[1] < b[1]) {
return sortOrder ? -1 : 1;
}
if (a[1] > b[1]) {
return sortOrder ? 1 : -1;
}
return 0;
};
}
/**
* Date sorting algorithm
* @param {Boolean} sortOrder Sorting order (`true` for ascending, `false` for descending).
* @param {Object} columnMeta Column meta object.
* @returns {Function} The compare function.
*/
}, {
key: 'dateSort',
value: function dateSort(sortOrder, columnMeta) {
return function (a, b) {
if (a[1] === b[1]) {
return 0;
}
if ((0, _mixed.isEmpty)(a[1])) {
if ((0, _mixed.isEmpty)(b[1])) {
return 0;
}
if (columnMeta.columnSorting.sortEmptyCells) {
return sortOrder ? -1 : 1;
}
return 1;
}
if ((0, _mixed.isEmpty)(b[1])) {
if ((0, _mixed.isEmpty)(a[1])) {
return 0;
}
if (columnMeta.columnSorting.sortEmptyCells) {
return sortOrder ? 1 : -1;
}
return -1;
}
var aDate = (0, _moment2.default)(a[1], columnMeta.dateFormat);
var bDate = (0, _moment2.default)(b[1], columnMeta.dateFormat);
if (!aDate.isValid()) {
return 1;
}
if (!bDate.isValid()) {
return -1;
}
if (bDate.isAfter(aDate)) {
return sortOrder ? -1 : 1;
}
if (bDate.isBefore(aDate)) {
return sortOrder ? 1 : -1;
}
return 0;
};
}
/**
* Numeric sorting algorithm.
*
* @param {Boolean} sortOrder Sorting order (`true` for ascending, `false` for descending).
* @param {Object} columnMeta Column meta object.
* @returns {Function} The compare function.
*/
}, {
key: 'numericSort',
value: function numericSort(sortOrder, columnMeta) {
return function (a, b) {
var parsedA = parseFloat(a[1]);
var parsedB = parseFloat(b[1]);
// Watch out when changing this part of code!
// Check below returns 0 (as expected) when comparing empty string, null, undefined
if (parsedA === parsedB || isNaN(parsedA) && isNaN(parsedB)) {
return 0;
}
if (columnMeta.columnSorting.sortEmptyCells) {
if ((0, _mixed.isEmpty)(a[1])) {
return sortOrder ? -1 : 1;
}
if ((0, _mixed.isEmpty)(b[1])) {
return sortOrder ? 1 : -1;
}
}
if (isNaN(parsedA)) {
return 1;
}
if (isNaN(parsedB)) {
return -1;
}
if (parsedA < parsedB) {
return sortOrder ? -1 : 1;
} else if (parsedA > parsedB) {
return sortOrder ? 1 : -1;
}
return 0;
};
}
/**
* Perform the sorting.
*/
}, {
key: 'sort',
value: function sort() {
if (typeof this.hot.sortOrder == 'undefined') {
this.hot.sortIndex.length = 0;
return;
}
var colMeta = this.hot.getCellMeta(0, this.hot.sortColumn);
var emptyRows = this.hot.countEmptyRows();
var sortFunction = void 0;
var nrOfRows = void 0;
this.hot.sortingEnabled = false; // this is required by translateRow plugin hook
this.hot.sortIndex.length = 0;
if (typeof colMeta.columnSorting.sortEmptyCells === 'undefined') {
colMeta.columnSorting = { sortEmptyCells: this.sortEmptyCells };
}
if (this.hot.getSettings().maxRows === Number.POSITIVE_INFINITY) {
nrOfRows = this.hot.countRows() - this.hot.getSettings().minSpareRows;
} else {
nrOfRows = this.hot.countRows() - emptyRows;
}
for (var i = 0, ilen = nrOfRows; i < ilen; i++) {
this.hot.sortIndex.push([i, this.hot.getDataAtCell(i, this.hot.sortColumn)]);
}
if (colMeta.sortFunction) {
sortFunction = colMeta.sortFunction;
} else {
switch (colMeta.type) {
case 'date':
sortFunction = this.dateSort;
break;
case 'numeric':
sortFunction = this.numericSort;
break;
default:
sortFunction = this.defaultSort;
}
}
(0, _mergeSort2.default)(this.hot.sortIndex, sortFunction(this.hot.sortOrder, colMeta));
// Append spareRows
for (var _i = this.hot.sortIndex.length; _i < this.hot.countRows(); _i++) {
this.hot.sortIndex.push([_i, this.hot.getDataAtCell(_i, this.hot.sortColumn)]);
}
this.hot.sortingEnabled = true; // this is required by translateRow plugin hook
}
/**
* Update indicator states.
*/
}, {
key: 'updateSortIndicator',
value: function updateSortIndicator() {
if (typeof this.hot.sortOrder == 'undefined') {
return;
}
var colMeta = this.hot.getCellMeta(0, this.hot.sortColumn);
this.sortIndicators[this.hot.sortColumn] = colMeta.sortIndicator;
}
/**
* `modifyRow` hook callback. Translates physical row index to the sorted row index.
*
* @param {Number} row Row index.
* @returns {Number} Sorted row index.
*/
}, {
key: 'translateRow',
value: function translateRow(row) {
if (this.hot.sortingEnabled && typeof this.hot.sortOrder !== 'undefined' && this.hot.sortIndex && this.hot.sortIndex.length && this.hot.sortIndex[row]) {
return this.hot.sortIndex[row][0];
}
return row;
}
/**
* Translates sorted row index to physical row index.
*
* @param {Number} row Sorted (visual) row index.
* @returns {number} Physical row index.
*/
}, {
key: 'untranslateRow',
value: function untranslateRow(row) {
if (this.hot.sortingEnabled && this.hot.sortIndex && this.hot.sortIndex.length) {
for (var i = 0; i < this.hot.sortIndex.length; i++) {
if (this.hot.sortIndex[i][0] == row) {
return i;
}
}
}
}
/**
* `afterGetColHeader` callback. Adds column sorting css classes to clickable headers.
*
* @private
* @param {Number} col Visual column index.
* @param {Element} TH TH HTML element.
*/
}, {
key: 'getColHeader',
value: function getColHeader(col, TH) {
if (col < 0 || !TH.parentNode) {
return false;
}
var headerLink = TH.querySelector('.colHeader');
var colspan = TH.getAttribute('colspan');
var TRs = TH.parentNode.parentNode.childNodes;
var headerLevel = Array.prototype.indexOf.call(TRs, TH.parentNode);
headerLevel -= TRs.length;
if (!headerLink) {
return;
}
if (this.hot.getSettings().columnSorting && col >= 0 && headerLevel === -1) {
(0, _element.addClass)(headerLink, 'columnSorting');
}
(0, _element.removeClass)(headerLink, 'descending');
(0, _element.removeClass)(headerLink, 'ascending');
if (this.sortIndicators[col]) {
if (col === this.hot.sortColumn) {
if (this.sortOrderClass === 'ascending') {
(0, _element.addClass)(headerLink, 'ascending');
} else if (this.sortOrderClass === 'descending') {
(0, _element.addClass)(headerLink, 'descending');
}
}
}
}
/**
* Check if any column is in a sorted state.
*
* @returns {Boolean}
*/
}, {
key: 'isSorted',
value: function isSorted() {
return typeof this.hot.sortColumn != 'undefined';
}
/**
* `afterCreateRow` callback. Updates the sorting state after a row have been created.
*
* @private
* @param {Number} index Visual row index.
* @param {Number} amount
*/
}, {
key: 'afterCreateRow',
value: function afterCreateRow(index, amount) {
if (!this.isSorted()) {
return;
}
for (var i = 0; i < this.hot.sortIndex.length; i++) {
if (this.hot.sortIndex[i][0] >= index) {
this.hot.sortIndex[i][0] += amount;
}
}
for (var _i2 = 0; _i2 < amount; _i2++) {
this.hot.sortIndex.splice(index + _i2, 0, [index + _i2, this.hot.getSourceData()[index + _i2][this.hot.sortColumn + this.hot.colOffset()]]);
}
this.saveSortingState();
}
/**
* `afterRemoveRow` hook callback.
*
* @private
* @param {Number} index Visual row index.
* @param {Number} amount
*/
}, {
key: 'afterRemoveRow',
value: function afterRemoveRow(index, amount) {
if (!this.isSorted()) {
return;
}
var removedRows = this.hot.sortIndex.splice(index, amount);
removedRows = (0, _array.arrayMap)(removedRows, function (row) {
return row[0];
});
function countRowShift(logicalRow) {
// Todo: compare perf between reduce vs sort->each->brake
return (0, _array.arrayReduce)(removedRows, function (count, removedLogicalRow) {
if (logicalRow > removedLogicalRow) {
count++;
}
return count;
}, 0);
}
this.hot.sortIndex = (0, _array.arrayMap)(this.hot.sortIndex, function (logicalRow, physicalRow) {
var rowShift = countRowShift(logicalRow[0]);
if (rowShift) {
logicalRow[0] -= rowShift;
}
return logicalRow;
});
this.saveSortingState();
}
/**
* Set options by passed settings
*
* @private
*/
}, {
key: 'setPluginOptions',
value: function setPluginOptions() {
var columnSorting = this.hot.getSettings().columnSorting;
if ((typeof columnSorting === 'undefined' ? 'undefined' : _typeof(columnSorting)) === 'object') {
this.sortEmptyCells = columnSorting.sortEmptyCells || false;
} else {
this.sortEmptyCells = false;
}
}
/**
* `onAfterOnCellMouseDown` hook callback.
*
* @private
* @param {Event} event Event which are provided by hook.
* @param {CellCoords} coords Visual coords of the selected cell.
*/
}, {
key: 'onAfterOnCellMouseDown',
value: function onAfterOnCellMouseDown(event, coords) {
if (coords.row > -1) {
return;
}
if ((0, _element.hasClass)(event.realTarget, 'columnSorting')) {
// reset order state on every new column header click
if (coords.col !== this.lastSortedColumn) {
this.hot.sortOrder = true;
}
this.lastSortedColumn = coords.col;
this.sortByColumn(coords.col);
}
}
}]);
return ColumnSorting;
}(_base2.default);
(0, _plugins.registerPlugin)('columnSorting', ColumnSorting);
exports.default = ColumnSorting;
/***/ }),
/* 394 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = mergeSort;
exports.merge = merge;
var _linkedList = __webpack_require__(395);
var _linkedList2 = _interopRequireDefault(_linkedList);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Refactored implementation of mergeSort (part of javascript-algorithms project) by Github users:
* mgechev, AndriiHeonia and lekkas (part of javascript-algorithms project - all project contributors
* at repository website)
*
* Link to repository: https://github.com/mgechev/javascript-algorithms
*/
/**
* Specifies a function that defines the sort order. The array is sorted according to each
* character's Unicode code point value, according to the string conversion of each element.
*
* @param a {*} first compared element.
* @param b {*} second compared element.
* @returns {Number}
*/
var defaultCompareFunction = function defaultCompareFunction(a, b) {
// sort lexically
var firstValue = a.toString();
var secondValue = b.toString();
if (firstValue === secondValue) {
return 0;
} else if (firstValue < secondValue) {
return -1;
}
return 1;
};
/**
* Mergesort method which is recursively called for sorting the input array.
*
* @param {Array} array The array which should be sorted.
* @param {Function} compareFunction Compares two items in an array. If compareFunction is not supplied,
* elements are sorted by converting them to strings and comparing strings in Unicode code point order.
* @param {Number} startIndex Left side of the subarray.
* @param {Number} endIndex Right side of the subarray.
* @returns {Array} Array with sorted subarray.
*/
function mergeSort(array) {
var compareFunction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCompareFunction;
var startIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
var endIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : array.length;
if (Math.abs(endIndex - startIndex) <= 1) {
return [];
}
var middleIndex = Math.ceil((startIndex + endIndex) / 2);
mergeSort(array, compareFunction, startIndex, middleIndex);
mergeSort(array, compareFunction, middleIndex, endIndex);
return merge(array, compareFunction, startIndex, middleIndex, endIndex);
}
/**
* Devides and sort merges two subarrays of given array
*
* @param {Array} array The array which subarrays should be sorted.
* @param {Number} startIndex The start of the first subarray.
* This subarray is with end middle - 1.
* @param {Number} middleIndex The start of the second array.
* @param {Number} endIndex end - 1 is the end of the second array.
* @returns {Array} The array with sorted subarray.
*/
function merge(array, compareFunction, startIndex, middleIndex, endIndex) {
var leftElements = new _linkedList2.default();
var rightElements = new _linkedList2.default();
var leftSize = middleIndex - startIndex;
var rightSize = endIndex - middleIndex;
var maxSize = Math.max(leftSize, rightSize);
var size = endIndex - startIndex;
for (var _i = 0; _i < maxSize; _i += 1) {
if (_i < leftSize) {
leftElements.push(array[startIndex + _i]);
}
if (_i < rightSize) {
rightElements.push(array[middleIndex + _i]);
}
}
var i = 0;
while (i < size) {
if (leftElements.first && rightElements.first) {
if (compareFunction(leftElements.first.data, rightElements.first.data) > 0) {
array[startIndex + i] = rightElements.shift().data;
} else {
array[startIndex + i] = leftElements.shift().data;
}
} else if (leftElements.first) {
array[startIndex + i] = leftElements.shift().data;
} else {
array[startIndex + i] = rightElements.shift().data;
}
i += 1;
}
return array;
};
/***/ }),
/* 395 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Refactored implementation of LinkedList (part of javascript-algorithms project) by Github users:
* mgechev, AndriiHeonia, Microfed and Jakeh (part of javascript-algorithms project - all project contributors
* at repository website)
*
* Link to repository: https://github.com/mgechev/javascript-algorithms
*/
/**
* Linked list node.
*
* @class NodeStructure
* @util
*/
var NodeStructure = function NodeStructure(data) {
_classCallCheck(this, NodeStructure);
/**
* Data of the node.
* @member {Object}
*/
this.data = data;
/**
* Next node.
* @member {NodeStructure}
*/
this.next = null;
/**
* Previous node.
* @member {NodeStructure}
*/
this.prev = null;
};
/**
* Linked list.
*
* @class LinkedList
* @util
*/
var LinkedList = function () {
function LinkedList() {
_classCallCheck(this, LinkedList);
this.first = null;
this.last = null;
}
/**
* Add data to the end of linked list.
*
* @param {Object} data Data which should be added.
*/
_createClass(LinkedList, [{
key: "push",
value: function push(data) {
var node = new NodeStructure(data);
if (this.first === null) {
this.first = node;
this.last = node;
} else {
var temp = this.last;
this.last = node;
node.prev = temp;
temp.next = node;
}
}
/**
* Add data to the beginning of linked list.
*
* @param {Object} data Data which should be added.
*/
}, {
key: "unshift",
value: function unshift(data) {
var node = new NodeStructure(data);
if (this.first === null) {
this.first = node;
this.last = node;
} else {
var temp = this.first;
this.first = node;
node.next = temp;
temp.prev = node;
}
}
/**
* In order traversal of the linked list.
*
* @param {Function} callback Callback which should be executed on each node.
*/
}, {
key: "inorder",
value: function inorder(callback) {
var temp = this.first;
while (temp) {
callback(temp);
temp = temp.next;
}
}
/**
* Remove data from the linked list.
*
* @param {Object} data Data which should be removed.
* @returns {Boolean} Returns true if data has been removed.
*/
}, {
key: "remove",
value: function remove(data) {
if (this.first === null) {
return false;
}
var temp = this.first;
var next = void 0;
var prev = void 0;
while (temp) {
if (temp.data === data) {
next = temp.next;
prev = temp.prev;
if (next) {
next.prev = prev;
}
if (prev) {
prev.next = next;
}
if (temp === this.first) {
this.first = next;
}
if (temp === this.last) {
this.last = prev;
}
return true;
}
temp = temp.next;
}
return false;
}
/**
* Check if linked list contains cycle.
*
* @returns {Boolean} Returns true if linked list contains cycle.
*/
}, {
key: "hasCycle",
value: function hasCycle() {
var fast = this.first;
var slow = this.first;
while (true) {
if (fast === null) {
return false;
}
fast = fast.next;
if (fast === null) {
return false;
}
fast = fast.next;
slow = slow.next;
if (fast === slow) {
return true;
}
}
}
}, {
key: "pop",
/**
* Return last node from the linked list.
*
* @returns {NodeStructure} Last node.
*/
value: function pop() {
if (this.last === null) {
return null;
}
var temp = this.last;
this.last = this.last.prev;
return temp;
}
}, {
key: "shift",
/**
* Return first node from the linked list.
*
* @returns {NodeStructure} First node.
*/
value: function shift() {
if (this.first === null) {
return null;
}
var temp = this.first;
this.first = this.first.next;
return temp;
}
}, {
key: "recursiveReverse",
/**
* Reverses the linked list recursively
*/
value: function recursiveReverse() {
function inverse(current, next) {
if (!next) {
return;
}
inverse(next, next.next);
next.next = current;
}
if (!this.first) {
return;
}
inverse(this.first, this.first.next);
this.first.next = null;
var temp = this.first;
this.first = this.last;
this.last = temp;
}
}, {
key: "reverse",
/**
* Reverses the linked list iteratively
*/
value: function reverse() {
if (!this.first || !this.first.next) {
return;
}
var current = this.first.next;
var prev = this.first;
var temp = void 0;
while (current) {
temp = current.next;
current.next = prev;
prev.prev = current;
prev = current;
current = temp;
}
this.first.next = null;
this.last.prev = null;
temp = this.first;
this.first = prev;
this.last = temp;
}
}]);
return LinkedList;
}();
;
exports.NodeStructure = NodeStructure;
exports.default = LinkedList;
/***/ }),
/* 396 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _element = __webpack_require__(0);
var _object = __webpack_require__(1);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _src = __webpack_require__(15);
var _plugins = __webpack_require__(7);
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _commentEditor = __webpack_require__(397);
var _commentEditor2 = _interopRequireDefault(_commentEditor);
var _utils = __webpack_require__(21);
var _displaySwitch = __webpack_require__(398);
var _displaySwitch2 = _interopRequireDefault(_displaySwitch);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
__webpack_require__(399);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var privatePool = new WeakMap();
var META_COMMENT = 'comment';
var META_COMMENT_VALUE = 'value';
var META_STYLE = 'style';
var META_READONLY = 'readOnly';
/**
* @plugin Comments
*
* @description
* This plugin allows setting and managing cell comments by either an option in the context menu or with the use of the API.
*
* To enable the plugin, you'll need to set the comments property of the config object to `true`:
* ```js
* ...
* comments: true
* ...
* ```
*
* or object with extra predefined plugin config:
*
* ```js
* ...
* comments: {
* displayDelay: 1000
* }
* ...
* ```
*
* To add comments at the table initialization, define the `comment` property in the `cell` config array as in an example below.
*
* @example
*
* ```js
* ...
* var hot = new Handsontable(document.getElementById('example'), {
* date: getData(),
* comments: true,
* cell: [
* {row: 1, col: 1, comment: {value: 'Foo'}},
* {row: 2, col: 2, comment: {value: 'Bar'}}
* ]
* });
*
* // Access to the Comments plugin instance:
* var commentsPlugin = hot.getPlugin('comments');
*
* // Manage comments programmatically:
* commentsPlugin.setCommentAtCell(1, 6, 'Comment contents');
* commentsPlugin.showAtCell(1, 6);
* commentsPlugin.removeCommentAtCell(1, 6);
*
* // You can also set range once and use proper methods:
* commentsPlugin.setRange({row: 1, col: 6});
* commentsPlugin.setComment('Comment contents');
* commentsPlugin.show();
* commentsPlugin.removeComment();
* ...
* ```
*/
var Comments = function (_BasePlugin) {
_inherits(Comments, _BasePlugin);
function Comments(hotInstance) {
_classCallCheck(this, Comments);
/**
* Instance of {@link CommentEditor}.
*
* @type {CommentEditor}
*/
var _this = _possibleConstructorReturn(this, (Comments.__proto__ || Object.getPrototypeOf(Comments)).call(this, hotInstance));
_this.editor = null;
/**
* Instance of {@link DisplaySwitch}.
*
* @type {DisplaySwitch}
*/
_this.displaySwitch = null;
/**
* Instance of {@link EventManager}.
*
* @private
* @type {EventManager}
*/
_this.eventManager = null;
/**
* Current cell range.
*
* @type {Object}
*/
_this.range = {};
/**
* @private
* @type {Boolean}
*/
_this.mouseDown = false;
/**
* @private
* @type {Boolean}
*/
_this.contextMenuEvent = false;
/**
* @private
* @type {*}
*/
_this.timer = null;
privatePool.set(_this, {
tempEditorDimensions: {},
cellBelowCursor: null
});
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(Comments, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().comments;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
if (!this.editor) {
this.editor = new _commentEditor2.default();
}
if (!this.eventManager) {
this.eventManager = new _eventManager2.default(this);
}
if (!this.displaySwitch) {
this.displaySwitch = new _displaySwitch2.default(this.getDisplayDelaySetting());
}
this.addHook('afterContextMenuDefaultOptions', function (options) {
return _this2.addToContextMenu(options);
});
this.addHook('afterRenderer', function (TD, row, col, prop, value, cellProperties) {
return _this2.onAfterRenderer(TD, cellProperties);
});
this.addHook('afterScrollHorizontally', function () {
return _this2.hide();
});
this.addHook('afterScrollVertically', function () {
return _this2.hide();
});
this.addHook('afterBeginEditing', function (args) {
return _this2.onAfterBeginEditing(args);
});
this.displaySwitch.addLocalHook('hide', function () {
return _this2.hide();
});
this.displaySwitch.addLocalHook('show', function (row, col) {
return _this2.showAtCell(row, col);
});
this.registerListeners();
_get(Comments.prototype.__proto__ || Object.getPrototypeOf(Comments.prototype), 'enablePlugin', this).call(this);
}
/**
* Update plugin for this Handsontable instance.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(Comments.prototype.__proto__ || Object.getPrototypeOf(Comments.prototype), 'updatePlugin', this).call(this);
this.displaySwitch.updateDelay(this.getDisplayDelaySetting());
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(Comments.prototype.__proto__ || Object.getPrototypeOf(Comments.prototype), 'disablePlugin', this).call(this);
}
/**
* Register all necessary DOM listeners.
*
* @private
*/
}, {
key: 'registerListeners',
value: function registerListeners() {
var _this3 = this;
this.eventManager.addEventListener(document, 'mouseover', function (event) {
return _this3.onMouseOver(event);
});
this.eventManager.addEventListener(document, 'mousedown', function (event) {
return _this3.onMouseDown(event);
});
this.eventManager.addEventListener(document, 'mouseup', function (event) {
return _this3.onMouseUp(event);
});
this.eventManager.addEventListener(this.editor.getInputElement(), 'blur', function (event) {
return _this3.onEditorBlur(event);
});
this.eventManager.addEventListener(this.editor.getInputElement(), 'mousedown', function (event) {
return _this3.onEditorMouseDown(event);
});
this.eventManager.addEventListener(this.editor.getInputElement(), 'mouseup', function (event) {
return _this3.onEditorMouseUp(event);
});
}
/**
* Set current cell range to be able to use general methods like {@link Comments#setComment},
* {@link Comments#removeComment}, {@link Comments#show}.
*
* @param {Object} range Object with `from` and `to` properties, each with `row` and `col` properties.
*/
}, {
key: 'setRange',
value: function setRange(range) {
this.range = range;
}
/**
* Clear the currently selected cell.
*/
}, {
key: 'clearRange',
value: function clearRange() {
this.range = {};
}
/**
* Check if the event target is a cell containing a comment.
*
* @param {Event} event DOM event
* @returns {Boolean}
*/
}, {
key: 'targetIsCellWithComment',
value: function targetIsCellWithComment(event) {
var closestCell = (0, _element.closest)(event.target, 'TD', 'TBODY');
return !!(closestCell && (0, _element.hasClass)(closestCell, 'htCommentCell') && (0, _element.closest)(closestCell, [this.hot.rootElement]));
}
/**
* Check if the event target is a comment textarea.
*
* @param {Event} event DOM event.
* @returns {Boolean}
*/
}, {
key: 'targetIsCommentTextArea',
value: function targetIsCommentTextArea(event) {
return this.editor.getInputElement() === event.target;
}
/**
* Set a comment for a cell according to the previously set range (see {@link Comments#setRange}).
*
* @param {String} value Comment contents.
*/
}, {
key: 'setComment',
value: function setComment(value) {
if (!this.range.from) {
throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');
}
var editorValue = this.editor.getValue();
var comment = '';
if (value != null) {
comment = value;
} else if (editorValue != null) {
comment = editorValue;
}
var row = this.range.from.row;
var col = this.range.from.col;
this.updateCommentMeta(row, col, _defineProperty({}, META_COMMENT_VALUE, comment));
this.hot.render();
}
/**
* Set a comment for a cell.
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {String} value Comment contents.
*/
}, {
key: 'setCommentAtCell',
value: function setCommentAtCell(row, col, value) {
this.setRange({
from: new _src.CellCoords(row, col)
});
this.setComment(value);
}
/**
* Remove a comment from a cell according to previously set range (see {@link Comments#setRange}).
*
* @param {Boolean} [forceRender = true] If set to `true`, the table will be re-rendered at the end of the operation.
*/
}, {
key: 'removeComment',
value: function removeComment() {
var forceRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
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, META_COMMENT, void 0);
if (forceRender) {
this.hot.render();
}
this.hide();
}
/**
* Remove comment from a cell.
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param {Boolean} [forceRender = true] If `true`, the table will be re-rendered at the end of the operation.
*/
}, {
key: 'removeCommentAtCell',
value: function removeCommentAtCell(row, col) {
var forceRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
this.setRange({
from: new _src.CellCoords(row, col)
});
this.removeComment(forceRender);
}
/**
* Get comment from a cell at the predefined range.
*/
}, {
key: 'getComment',
value: function getComment() {
var row = this.range.from.row;
var column = this.range.from.col;
return this.getCommentMeta(row, column, META_COMMENT_VALUE);
}
/**
* Get comment from a cell at the provided coordinates.
*
* @param {Number} row Visual row index.
* @param {Number} column Visual column index.
*/
}, {
key: 'getCommentAtCell',
value: function getCommentAtCell(row, column) {
return this.getCommentMeta(row, column, META_COMMENT_VALUE);
}
/**
* Show the comment editor accordingly to the previously set range (see {@link Comments#setRange}).
*
* @returns {Boolean} Returns `true` if comment editor was shown.
*/
}, {
key: 'show',
value: function show() {
if (!this.range.from) {
throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');
}
var meta = this.hot.getCellMeta(this.range.from.row, this.range.from.col);
this.refreshEditor(true);
this.editor.setValue(meta[META_COMMENT] ? meta[META_COMMENT][META_COMMENT_VALUE] : null || '');
if (this.editor.hidden) {
this.editor.show();
}
return true;
}
/**
* Show comment editor according to cell coordinates.
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {Boolean} Returns `true` if comment editor was shown.
*/
}, {
key: 'showAtCell',
value: function showAtCell(row, col) {
this.setRange({
from: new _src.CellCoords(row, col)
});
return this.show();
}
/**
* Hide the comment editor.
*/
}, {
key: 'hide',
value: function hide() {
if (!this.editor.hidden) {
this.editor.hide();
}
}
/**
* Refresh comment editor position and styling.
*
* @param {Boolean} [force=false] If `true` then recalculation will be forced.
*/
}, {
key: 'refreshEditor',
value: function refreshEditor() {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!force && (!this.range.from || !this.editor.isVisible())) {
return;
}
var scrollableElement = (0, _element.getScrollableElement)(this.hot.view.wt.wtTable.TABLE);
var TD = this.hot.view.wt.wtTable.getCell(this.range.from);
var row = this.range.from.row;
var column = this.range.from.col;
var cellOffset = (0, _element.offset)(TD);
var lastColWidth = this.hot.view.wt.wtTable.getStretchedColumnWidth(column);
var cellTopOffset = cellOffset.top < 0 ? 0 : cellOffset.top;
var cellLeftOffset = cellOffset.left;
if (this.hot.view.wt.wtViewport.hasVerticalScroll() && scrollableElement !== window) {
cellTopOffset -= this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition();
}
if (this.hot.view.wt.wtViewport.hasHorizontalScroll() && scrollableElement !== window) {
cellLeftOffset -= this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition();
}
var x = cellLeftOffset + lastColWidth;
var y = cellTopOffset;
var commentStyle = this.getCommentMeta(row, column, META_STYLE);
var readOnly = this.getCommentMeta(row, column, META_READONLY);
if (commentStyle) {
this.editor.setSize(commentStyle.width, commentStyle.height);
} else {
this.editor.resetSize();
}
this.editor.setReadOnlyState(readOnly);
this.editor.setPosition(x, y);
}
/**
* Check if there is a comment for selected range.
*
* @private
* @returns {Boolean}
*/
}, {
key: 'checkSelectionCommentsConsistency',
value: function checkSelectionCommentsConsistency() {
var selected = this.hot.getSelectedRange();
if (!selected) {
return false;
}
var hasComment = false;
var cell = selected.from; // IN EXCEL THERE IS COMMENT ONLY FOR TOP LEFT CELL IN SELECTION
if (this.getCommentMeta(cell.row, cell.col, META_COMMENT_VALUE)) {
hasComment = true;
}
return hasComment;
}
/**
* Set or update the comment-related cell meta.
*
* @param {Number} row Visual row index.
* @param {Number} column Visual column index.
* @param {Object} metaObject Object defining all the comment-related meta information.
*/
}, {
key: 'updateCommentMeta',
value: function updateCommentMeta(row, column, metaObject) {
var oldComment = this.hot.getCellMeta(row, column)[META_COMMENT];
var newComment = void 0;
if (oldComment) {
newComment = (0, _object.deepClone)(oldComment);
(0, _object.deepExtend)(newComment, metaObject);
} else {
newComment = metaObject;
}
this.hot.setCellMeta(row, column, META_COMMENT, newComment);
}
/**
* Get the comment related meta information.
*
* @param {Number} row Visual row index.
* @param {Number} column Visual column index.
* @param {String} property Cell meta property.
* @returns {Mixed}
*/
}, {
key: 'getCommentMeta',
value: function getCommentMeta(row, column, property) {
var cellMeta = this.hot.getCellMeta(row, column);
if (!cellMeta[META_COMMENT]) {
return void 0;
}
return cellMeta[META_COMMENT][property];
}
/**
* `mousedown` event callback.
*
* @private
* @param {MouseEvent} event The `mousedown` event.
*/
}, {
key: 'onMouseDown',
value: function onMouseDown(event) {
this.mouseDown = true;
if (!this.hot.view || !this.hot.view.wt) {
return;
}
if (!this.contextMenuEvent && !this.targetIsCommentTextArea(event)) {
var eventCell = (0, _element.closest)(event.target, 'TD', 'TBODY');
var coordinates = null;
if (eventCell) {
coordinates = this.hot.view.wt.wtTable.getCoords(eventCell);
}
if (!eventCell || this.range.from && coordinates && (this.range.from.row !== coordinates.row || this.range.from.col !== coordinates.col)) {
this.hide();
}
}
this.contextMenuEvent = false;
}
/**
* `mouseover` event callback.
*
* @private
* @param {MouseEvent} event The `mouseover` event.
*/
}, {
key: 'onMouseOver',
value: function onMouseOver(event) {
var priv = privatePool.get(this);
priv.cellBelowCursor = document.elementFromPoint(event.clientX, event.clientY);
if (this.mouseDown || this.editor.isFocused() || (0, _element.hasClass)(event.target, 'wtBorder') || priv.cellBelowCursor !== event.target || !this.editor) {
return;
}
if (this.targetIsCellWithComment(event)) {
var coordinates = this.hot.view.wt.wtTable.getCoords(event.target);
var range = {
from: new _src.CellCoords(coordinates.row, coordinates.col)
};
this.displaySwitch.show(range);
} else if ((0, _element.isChildOf)(event.target, document) && !this.targetIsCommentTextArea(event)) {
this.displaySwitch.hide();
}
}
/**
* `mouseup` event callback.
*
* @private
* @param {MouseEvent} event The `mouseup` event.
*/
}, {
key: 'onMouseUp',
value: function onMouseUp(event) {
this.mouseDown = false;
}
/** *
* The `afterRenderer` hook callback..
*
* @private
* @param {HTMLTableCellElement} TD The rendered `TD` element.
* @param {Object} cellProperties The rendered cell's property object.
*/
}, {
key: 'onAfterRenderer',
value: function onAfterRenderer(TD, cellProperties) {
if (cellProperties[META_COMMENT] && cellProperties[META_COMMENT][META_COMMENT_VALUE]) {
(0, _element.addClass)(TD, cellProperties.commentedCellClassName);
}
}
/**
* `blur` event callback for the comment editor.
*
* @private
* @param {Event} event The `blur` event.
*/
}, {
key: 'onEditorBlur',
value: function onEditorBlur(event) {
this.setComment();
}
/**
* `mousedown` hook. Along with `onEditorMouseUp` used to simulate the textarea resizing event.
*
* @private
* @param {MouseEvent} event The `mousedown` event.
*/
}, {
key: 'onEditorMouseDown',
value: function onEditorMouseDown(event) {
var priv = privatePool.get(this);
priv.tempEditorDimensions = {
width: (0, _element.outerWidth)(event.target),
height: (0, _element.outerHeight)(event.target)
};
}
/**
* `mouseup` hook. Along with `onEditorMouseDown` used to simulate the textarea resizing event.
*
* @private
* @param {MouseEvent} event The `mouseup` event.
*/
}, {
key: 'onEditorMouseUp',
value: function onEditorMouseUp(event) {
var priv = privatePool.get(this);
var currentWidth = (0, _element.outerWidth)(event.target);
var currentHeight = (0, _element.outerHeight)(event.target);
if (currentWidth !== priv.tempEditorDimensions.width + 1 || currentHeight !== priv.tempEditorDimensions.height + 2) {
this.updateCommentMeta(this.range.from.row, this.range.from.col, _defineProperty({}, META_STYLE, {
width: currentWidth,
height: currentHeight
}));
}
}
/**
* Context Menu's "Add comment" callback. Results in showing the comment editor.
*
* @private
*/
}, {
key: 'onContextMenuAddComment',
value: function onContextMenuAddComment() {
var _this4 = this;
this.displaySwitch.cancelHiding();
var coords = this.hot.getSelectedRange();
this.contextMenuEvent = true;
this.setRange({
from: coords.from
});
this.show();
setTimeout(function () {
if (_this4.hot) {
_this4.hot.deselectCell();
_this4.editor.focus();
}
}, 10);
}
/**
* Context Menu's "remove comment" callback.
*
* @private
* @param {Object} selection The current selection.
*/
}, {
key: 'onContextMenuRemoveComment',
value: function onContextMenuRemoveComment(selection) {
this.contextMenuEvent = true;
for (var i = selection.start.row; i <= selection.end.row; i++) {
for (var j = selection.start.col; j <= selection.end.col; j++) {
this.removeCommentAtCell(i, j, false);
}
}
this.hot.render();
}
/**
* Context Menu's "make comment read-only" callback.
*
* @private
* @param {Object} selection The current selection.
*/
}, {
key: 'onContextMenuMakeReadOnly',
value: function onContextMenuMakeReadOnly(selection) {
this.contextMenuEvent = true;
for (var i = selection.start.row; i <= selection.end.row; i++) {
for (var j = selection.start.col; j <= selection.end.col; j++) {
var currentState = !!this.getCommentMeta(i, j, META_READONLY);
this.updateCommentMeta(i, j, _defineProperty({}, META_READONLY, !currentState));
}
}
}
/**
* Add Comments plugin options to the Context Menu.
*
* @private
* @param {Object} defaultOptions
*/
}, {
key: 'addToContextMenu',
value: function addToContextMenu(defaultOptions) {
var _this5 = this;
defaultOptions.items.push({
name: '---------'
}, {
key: 'commentsAddEdit',
name: function name() {
if (_this5.checkSelectionCommentsConsistency()) {
return _this5.hot.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_EDIT_COMMENT);
}
return _this5.hot.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ADD_COMMENT);
},
callback: function callback() {
return _this5.onContextMenuAddComment();
},
disabled: function disabled() {
return !(this.getSelected() && !this.selection.selectedHeader.corner);
}
}, {
key: 'commentsRemove',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COMMENT);
},
callback: function callback(key, selection) {
return _this5.onContextMenuRemoveComment(selection);
},
disabled: function disabled() {
return _this5.hot.selection.selectedHeader.corner;
}
}, {
key: 'commentsReadOnly',
name: function name() {
var _this6 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);
var hasProperty = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var readOnlyProperty = _this6.getCellMeta(row, col)[META_COMMENT];
if (readOnlyProperty) {
readOnlyProperty = readOnlyProperty[META_READONLY];
}
if (readOnlyProperty) {
return true;
}
});
if (hasProperty) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback(key, selection) {
return _this5.onContextMenuMakeReadOnly(selection);
},
disabled: function disabled() {
return _this5.hot.selection.selectedHeader.corner || !_this5.checkSelectionCommentsConsistency();
}
});
}
/**
* Get `displayDelay` setting of comment plugin.
*
* @returns {Number|undefined}
*/
}, {
key: 'getDisplayDelaySetting',
value: function getDisplayDelaySetting() {
var commentSetting = this.hot.getSettings().comments;
if ((0, _object.isObject)(commentSetting)) {
return commentSetting.displayDelay;
}
return void 0;
}
/**
* `afterBeginEditing` hook callback.
*
* @private
* @param {Number} row Visual row index of the currently edited cell.
* @param {Number} column Visual column index of the currently edited cell.
*/
}, {
key: 'onAfterBeginEditing',
value: function onAfterBeginEditing(row, column) {
this.hide();
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
if (this.editor) {
this.editor.destroy();
}
if (this.displaySwitch) {
this.displaySwitch.destroy();
}
_get(Comments.prototype.__proto__ || Object.getPrototypeOf(Comments.prototype), 'destroy', this).call(this);
}
}]);
return Comments;
}(_base2.default);
(0, _plugins.registerPlugin)('comments', Comments);
exports.default = Comments;
/***/ }),
/* 397 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Comment editor for the Comments plugin.
*
* @class CommentEditor
* @plugin Comments
*/
var CommentEditor = function () {
_createClass(CommentEditor, null, [{
key: 'CLASS_EDITOR_CONTAINER',
get: function get() {
return 'htCommentsContainer';
}
}, {
key: 'CLASS_EDITOR',
get: function get() {
return 'htComments';
}
}, {
key: 'CLASS_INPUT',
get: function get() {
return 'htCommentTextArea';
}
}, {
key: 'CLASS_CELL',
get: function get() {
return 'htCommentCell';
}
}]);
function CommentEditor() {
_classCallCheck(this, CommentEditor);
this.editor = this.createEditor();
this.editorStyle = this.editor.style;
this.hidden = true;
this.hide();
}
/**
* Set position of the comments editor according to the provided x and y coordinates.
*
* @param {Number} x X position (in pixels).
* @param {Number} y Y position (in pixels).
*/
_createClass(CommentEditor, [{
key: 'setPosition',
value: function setPosition(x, y) {
this.editorStyle.left = x + 'px';
this.editorStyle.top = y + 'px';
}
/**
* Set the editor size according to the provided arguments.
*
* @param {Number} width Width in pixels.
* @param {Number} height Height in pixels.
*/
}, {
key: 'setSize',
value: function setSize(width, height) {
if (width && height) {
var input = this.getInputElement();
input.style.width = width + 'px';
input.style.height = height + 'px';
}
}
/**
* Reset the editor size to its initial state.
*/
}, {
key: 'resetSize',
value: function resetSize() {
var input = this.getInputElement();
input.style.width = '';
input.style.height = '';
}
/**
* Set the read-only state for the comments editor.
*
* @param {Boolean} state The new read only state.
*/
}, {
key: 'setReadOnlyState',
value: function setReadOnlyState(state) {
var input = this.getInputElement();
input.readOnly = state;
}
/**
* Show the comments editor.
*/
}, {
key: 'show',
value: function show() {
this.editorStyle.display = 'block';
this.hidden = false;
}
/**
* Hide the comments editor.
*/
}, {
key: 'hide',
value: function hide() {
this.editorStyle.display = 'none';
this.hidden = true;
}
/**
* Checks if the editor is visible.
*
* @returns {Boolean}
*/
}, {
key: 'isVisible',
value: function isVisible() {
return this.editorStyle.display === 'block';
}
/**
* Set the comment value.
*
* @param {String} [value] The value to use.
*/
}, {
key: 'setValue',
value: function setValue() {
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
value = value || '';
this.getInputElement().value = value;
}
/**
* Get the comment value.
*
* @returns {String}
*/
}, {
key: 'getValue',
value: function getValue() {
return this.getInputElement().value;
}
/**
* Checks if the comment input element is focused.
*
* @returns {Boolean}
*/
}, {
key: 'isFocused',
value: function isFocused() {
return document.activeElement === this.getInputElement();
}
/**
* Focus the comments input element.
*/
}, {
key: 'focus',
value: function focus() {
this.getInputElement().focus();
}
/**
* Create the `textarea` to be used as a comments editor.
*
* @returns {HTMLElement}
*/
}, {
key: 'createEditor',
value: function createEditor() {
var container = document.querySelector('.' + CommentEditor.CLASS_EDITOR_CONTAINER);
var editor = void 0;
var textArea = void 0;
if (!container) {
container = document.createElement('div');
(0, _element.addClass)(container, CommentEditor.CLASS_EDITOR_CONTAINER);
document.body.appendChild(container);
}
editor = document.createElement('div');
(0, _element.addClass)(editor, CommentEditor.CLASS_EDITOR);
textArea = document.createElement('textarea');
(0, _element.addClass)(textArea, CommentEditor.CLASS_INPUT);
editor.appendChild(textArea);
container.appendChild(editor);
return editor;
}
/**
* Get the input element.
*
* @returns {HTMLElement}
*/
}, {
key: 'getInputElement',
value: function getInputElement() {
return this.editor.querySelector('.' + CommentEditor.CLASS_INPUT);
}
/**
* Destroy the comments editor.
*/
}, {
key: 'destroy',
value: function destroy() {
this.editor.parentNode.removeChild(this.editor);
this.editor = null;
this.editorStyle = null;
}
}]);
return CommentEditor;
}();
exports.default = CommentEditor;
/***/ }),
/* 398 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _function = __webpack_require__(41);
var _object = __webpack_require__(1);
var _localHooks = __webpack_require__(89);
var _localHooks2 = _interopRequireDefault(_localHooks);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var DEFAULT_DISPLAY_DELAY = 250;
var DEFAULT_HIDE_DELAY = 250;
/**
* Display switch for the Comments plugin. Manages the time of delayed displaying / hiding comments.
*
* @class DisplaySwitch
* @plugin Comments
*/
var DisplaySwitch = function () {
function DisplaySwitch(displayDelay) {
_classCallCheck(this, DisplaySwitch);
/**
* Flag to determine if comment can be showed or hidden. State `true` mean that last performed action
* was an attempt to show comment element. State `false` mean that it was attempt to hide comment element.
*
* @type {Boolean}
*/
this.wasLastActionShow = true;
/**
* Show comment after predefined delay. It keeps reference to immutable `debounce` function.
*
* @type {Function}
*/
this.showDebounced = null;
/**
* Reference to timer, run by `setTimeout`, which is hiding comment
*
* @type {Number}
*/
this.hidingTimer = null;
this.updateDelay(displayDelay);
}
/**
* Responsible for hiding comment after proper delay.
*/
_createClass(DisplaySwitch, [{
key: 'hide',
value: function hide() {
var _this = this;
this.wasLastActionShow = false;
this.hidingTimer = setTimeout(function () {
if (_this.wasLastActionShow === false) {
_this.runLocalHooks('hide');
}
}, DEFAULT_HIDE_DELAY);
}
/**
* Responsible for showing comment after proper delay.
*
* @param {Object} range Coordinates of selected cell.
*/
}, {
key: 'show',
value: function show(range) {
this.wasLastActionShow = true;
this.showDebounced(range);
}
}, {
key: 'cancelHiding',
/**
* Cancel hiding comment.
*/
value: function cancelHiding() {
this.wasLastActionShow = true;
clearTimeout(this.hidingTimer);
this.hidingTimer = null;
}
/**
* Update the switch settings.
*
* @param {Number} displayDelay Delay of showing the comments (in milliseconds).
*/
}, {
key: 'updateDelay',
value: function updateDelay() {
var _this2 = this;
var displayDelay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_DISPLAY_DELAY;
this.showDebounced = (0, _function.debounce)(function (range) {
if (_this2.wasLastActionShow) {
_this2.runLocalHooks('show', range.from.row, range.from.col);
}
}, displayDelay);
}
/**
* Destroy the switcher.
*/
}, {
key: 'destroy',
value: function destroy() {
this.clearLocalHooks();
}
}]);
return DisplaySwitch;
}();
(0, _object.mixin)(DisplaySwitch, _localHooks2.default);
exports.default = DisplaySwitch;
/***/ }),
/* 399 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 400 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _array = __webpack_require__(2);
var _commandExecutor = __webpack_require__(401);
var _commandExecutor2 = _interopRequireDefault(_commandExecutor);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _itemsFactory = __webpack_require__(402);
var _itemsFactory2 = _interopRequireDefault(_itemsFactory);
var _menu = __webpack_require__(414);
var _menu2 = _interopRequireDefault(_menu);
var _plugins = __webpack_require__(7);
var _event = __webpack_require__(12);
var _element = __webpack_require__(0);
var _predefinedItems = __webpack_require__(90);
__webpack_require__(416);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('afterContextMenuDefaultOptions');
_pluginHooks2.default.getSingleton().register('afterContextMenuShow');
_pluginHooks2.default.getSingleton().register('afterContextMenuHide');
_pluginHooks2.default.getSingleton().register('afterContextMenuExecute');
/**
* @description
* This plugin creates the Handsontable Context Menu. It allows to create a new row or
* column at any place in the grid among [other features](http://docs.handsontable.com/demo-context-menu.html).
* Possible values:
* * `true` (to enable default options),
* * `false` (to disable completely)
*
* or array of any available strings:
* * `["row_above", "row_below", "col_left", "col_right",
* "remove_row", "remove_col", "---------", "undo", "redo"]`.
*
* See [the context menu demo](http://docs.handsontable.com/demo-context-menu.html) for examples.
*
* @example
* ```js
* ...
* // as a boolean
* contextMenu: true
* ...
* // as a array
* contextMenu: ['row_above', 'row_below', '---------', 'undo', 'redo']
* ...
* ```
*
* @plugin ContextMenu
*/
var ContextMenu = function (_BasePlugin) {
_inherits(ContextMenu, _BasePlugin);
_createClass(ContextMenu, null, [{
key: 'DEFAULT_ITEMS',
/**
* Default menu items order when `contextMenu` is enabled by `true`.
*
* @returns {Array}
*/
get: function get() {
return [_predefinedItems.ROW_ABOVE, _predefinedItems.ROW_BELOW, _predefinedItems.SEPARATOR, _predefinedItems.COLUMN_LEFT, _predefinedItems.COLUMN_RIGHT, _predefinedItems.SEPARATOR, _predefinedItems.REMOVE_ROW, _predefinedItems.REMOVE_COLUMN, _predefinedItems.SEPARATOR, _predefinedItems.UNDO, _predefinedItems.REDO, _predefinedItems.SEPARATOR, _predefinedItems.READ_ONLY, _predefinedItems.SEPARATOR, _predefinedItems.ALIGNMENT];
}
}]);
function ContextMenu(hotInstance) {
_classCallCheck(this, ContextMenu);
/**
* Instance of {@link EventManager}.
*
* @type {EventManager}
*/
var _this = _possibleConstructorReturn(this, (ContextMenu.__proto__ || Object.getPrototypeOf(ContextMenu)).call(this, hotInstance));
_this.eventManager = new _eventManager2.default(_this);
/**
* Instance of {@link CommandExecutor}.
*
* @type {CommandExecutor}
*/
_this.commandExecutor = new _commandExecutor2.default(_this.hot);
/**
* Instance of {@link ItemsFactory}.
*
* @type {ItemsFactory}
*/
_this.itemsFactory = null;
/**
* Instance of {@link Menu}.
*
* @type {Menu}
*/
_this.menu = null;
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ContextMenu, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().contextMenu;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.itemsFactory = new _itemsFactory2.default(this.hot, ContextMenu.DEFAULT_ITEMS);
var settings = this.hot.getSettings().contextMenu;
var predefinedItems = {
items: this.itemsFactory.getItems(settings)
};
this.registerEvents();
if (typeof settings.callback === 'function') {
this.commandExecutor.setCommonCallback(settings.callback);
}
_get(ContextMenu.prototype.__proto__ || Object.getPrototypeOf(ContextMenu.prototype), 'enablePlugin', this).call(this);
var delayedInitialization = function delayedInitialization() {
if (!_this2.hot) {
return;
}
_this2.hot.runHooks('afterContextMenuDefaultOptions', predefinedItems);
_this2.itemsFactory.setPredefinedItems(predefinedItems.items);
var menuItems = _this2.itemsFactory.getItems(settings);
_this2.menu = new _menu2.default(_this2.hot, {
className: 'htContextMenu',
keepInViewport: true
});
_this2.hot.runHooks('beforeContextMenuSetItems', menuItems);
_this2.menu.setMenuItems(menuItems);
_this2.menu.addLocalHook('afterOpen', function () {
return _this2.onMenuAfterOpen();
});
_this2.menu.addLocalHook('afterClose', function () {
return _this2.onMenuAfterClose();
});
_this2.menu.addLocalHook('executeCommand', function () {
for (var _len = arguments.length, params = Array(_len), _key = 0; _key < _len; _key++) {
params[_key] = arguments[_key];
}
return _this2.executeCommand.apply(_this2, params);
});
// Register all commands. Predefined and added by user or by plugins
(0, _array.arrayEach)(menuItems, function (command) {
return _this2.commandExecutor.registerCommand(command.key, command);
});
};
this.callOnPluginsReady(function () {
if (_this2.isPluginsReady) {
setTimeout(delayedInitialization, 0);
} else {
delayedInitialization();
}
});
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(ContextMenu.prototype.__proto__ || Object.getPrototypeOf(ContextMenu.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
this.close();
if (this.menu) {
this.menu.destroy();
this.menu = null;
}
_get(ContextMenu.prototype.__proto__ || Object.getPrototypeOf(ContextMenu.prototype), 'disablePlugin', this).call(this);
}
/**
* Register dom listeners.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this3 = this;
this.eventManager.addEventListener(this.hot.rootElement, 'contextmenu', function (event) {
return _this3.onContextMenu(event);
});
}
/**
* Open menu and re-position it based on dom event object.
*
* @param {Event} event The event object.
*/
}, {
key: 'open',
value: function open(event) {
if (!this.menu) {
return;
}
this.menu.open();
this.menu.setPosition({
top: parseInt((0, _event.pageY)(event), 10) - (0, _element.getWindowScrollTop)(),
left: parseInt((0, _event.pageX)(event), 10) - (0, _element.getWindowScrollLeft)()
});
// ContextMenu is not detected HotTableEnv correctly because is injected outside hot-table
this.menu.hotMenu.isHotTableEnv = this.hot.isHotTableEnv;
// Handsontable.eventManager.isHotTableEnv = this.hot.isHotTableEnv;
}
/**
* Close menu.
*/
}, {
key: 'close',
value: function close() {
if (!this.menu) {
return;
}
this.menu.close();
}
/**
* Execute context menu command.
*
* You can execute all predefined commands:
* * `'row_above'` - Insert row above
* * `'row_below'` - Insert row below
* * `'col_left'` - Insert column left
* * `'col_right'` - Insert column right
* * `'clear_column'` - Clear selected column
* * `'remove_row'` - Remove row
* * `'remove_col'` - Remove column
* * `'undo'` - Undo last action
* * `'redo'` - Redo last action
* * `'make_read_only'` - Make cell read only
* * `'alignment:left'` - Alignment to the left
* * `'alignment:top'` - Alignment to the top
* * `'alignment:right'` - Alignment to the right
* * `'alignment:bottom'` - Alignment to the bottom
* * `'alignment:middle'` - Alignment to the middle
* * `'alignment:center'` - Alignment to the center (justify)
*
* Or you can execute command registered in settings where `key` is your command name.
*
* @param {String} commandName
* @param {*} params
*/
}, {
key: 'executeCommand',
value: function executeCommand() {
for (var _len2 = arguments.length, params = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
params[_key2] = arguments[_key2];
}
this.commandExecutor.execute.apply(this.commandExecutor, params);
}
/**
* On context menu listener.
*
* @private
* @param {Event} event
*/
}, {
key: 'onContextMenu',
value: function onContextMenu(event) {
var settings = this.hot.getSettings();
var showRowHeaders = settings.rowHeaders;
var showColHeaders = settings.colHeaders;
function isValidElement(element) {
return element.nodeName === 'TD' || element.parentNode.nodeName === 'TD';
}
// if event is from hot-table we must get web component element not element inside him
var element = event.realTarget;
this.close();
if ((0, _element.hasClass)(element, 'handsontableInput')) {
return;
}
event.preventDefault();
(0, _event.stopPropagation)(event);
if (!(showRowHeaders || showColHeaders)) {
if (!isValidElement(element) && !((0, _element.hasClass)(element, 'current') && (0, _element.hasClass)(element, 'wtBorder'))) {
return;
}
}
this.open(event);
}
/**
* On menu after open listener.
*
* @private
*/
}, {
key: 'onMenuAfterOpen',
value: function onMenuAfterOpen() {
this.hot.runHooks('afterContextMenuShow', this);
}
/**
* On menu after close listener.
*
* @private
*/
}, {
key: 'onMenuAfterClose',
value: function onMenuAfterClose() {
this.hot.listen();
this.hot.runHooks('afterContextMenuHide', this);
}
/**
* Destroy instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.close();
if (this.menu) {
this.menu.destroy();
}
_get(ContextMenu.prototype.__proto__ || Object.getPrototypeOf(ContextMenu.prototype), 'destroy', this).call(this);
}
}]);
return ContextMenu;
}(_base2.default);
ContextMenu.SEPARATOR = {
name: _predefinedItems.SEPARATOR
};
(0, _plugins.registerPlugin)('contextMenu', ContextMenu);
exports.default = ContextMenu;
/***/ }),
/* 401 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Command executor for ContextMenu.
*
* @class CommandExecutor
* @plugin ContextMenu
*/
var CommandExecutor = function () {
function CommandExecutor(hotInstance) {
_classCallCheck(this, CommandExecutor);
this.hot = hotInstance;
this.commands = {};
this.commonCallback = null;
}
/**
* Register command.
*
* @param {String} name Command name.
* @param {Object} commandDescriptor Command descriptor object with properties like `key` (command id),
* `callback` (task to execute), `name` (command name), `disabled` (command availability).
*/
_createClass(CommandExecutor, [{
key: 'registerCommand',
value: function registerCommand(name, commandDescriptor) {
this.commands[name] = commandDescriptor;
}
/**
* Set common callback which will be trigger on every executed command.
*
* @param {Function} callback Function which will be fired on every command execute.
*/
}, {
key: 'setCommonCallback',
value: function setCommonCallback(callback) {
this.commonCallback = callback;
}
/**
* Execute command by its name.
*
* @param {String} commandName Command id.
* @param {*} params Arguments passed to command task.
*/
}, {
key: 'execute',
value: function execute(commandName) {
var _this = this;
for (var _len = arguments.length, params = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
params[_key - 1] = arguments[_key];
}
var commandSplit = commandName.split(':');
commandName = commandSplit[0];
var subCommandName = commandSplit.length === 2 ? commandSplit[1] : null;
var command = this.commands[commandName];
if (!command) {
throw new Error('Menu command \'' + commandName + '\' not exists.');
}
if (subCommandName && command.submenu) {
command = findSubCommand(subCommandName, command.submenu.items);
}
if (command.disabled === true) {
return;
}
if (typeof command.disabled == 'function' && command.disabled.call(this.hot) === true) {
return;
}
if ((0, _object.hasOwnProperty)(command, 'submenu')) {
return;
}
var callbacks = [];
if (typeof command.callback === 'function') {
callbacks.push(command.callback);
}
if (typeof this.commonCallback === 'function') {
callbacks.push(this.commonCallback);
}
params.unshift(commandSplit.join(':'));
(0, _array.arrayEach)(callbacks, function (callback) {
return callback.apply(_this.hot, params);
});
}
}]);
return CommandExecutor;
}();
function findSubCommand(subCommandName, subCommands) {
var command = void 0;
(0, _array.arrayEach)(subCommands, function (cmd) {
var cmds = cmd.key ? cmd.key.split(':') : null;
if (Array.isArray(cmds) && cmds[1] === subCommandName) {
command = cmd;
return false;
}
});
return command;
}
exports.default = CommandExecutor;
/***/ }),
/* 402 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _object = __webpack_require__(1);
var _array = __webpack_require__(2);
var _predefinedItems = __webpack_require__(90);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Predefined items class factory for menu items.
*
* @class ItemsFactory
* @plugin ContextMenu
*/
var ItemsFactory = function () {
function ItemsFactory(hotInstance) {
var orderPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
_classCallCheck(this, ItemsFactory);
this.hot = hotInstance;
this.predefinedItems = (0, _predefinedItems.predefinedItems)();
this.defaultOrderPattern = orderPattern;
}
/**
* Set predefined items.
*
* @param {Array} predefinedItems Array of predefined items.
*/
_createClass(ItemsFactory, [{
key: 'setPredefinedItems',
value: function setPredefinedItems(predefinedItems) {
var _this = this;
var items = {};
this.defaultOrderPattern.length = 0;
(0, _object.objectEach)(predefinedItems, function (value, key) {
var menuItemKey = '';
if (value.name === _predefinedItems.SEPARATOR) {
items[_predefinedItems.SEPARATOR] = value;
menuItemKey = _predefinedItems.SEPARATOR;
// Menu item added as a property to array
} else if (isNaN(parseInt(key, 10))) {
value.key = value.key === void 0 ? key : value.key;
items[key] = value;
menuItemKey = value.key;
} else {
items[value.key] = value;
menuItemKey = value.key;
}
_this.defaultOrderPattern.push(menuItemKey);
});
this.predefinedItems = items;
}
/**
* Get all menu items based on pattern.
*
* @param {Array|Object|Boolean} pattern Pattern which you can define by displaying menu items order. If `true` default
* pattern will be used.
* @returns {Array}
*/
}, {
key: 'getItems',
value: function getItems() {
var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
return _getItems(pattern, this.defaultOrderPattern, this.predefinedItems);
}
}]);
return ItemsFactory;
}();
function _getItems() {
var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var defaultPattern = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var items = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var result = [];
if (pattern && pattern.items) {
pattern = pattern.items;
} else if (!Array.isArray(pattern)) {
pattern = defaultPattern;
}
if ((0, _object.isObject)(pattern)) {
(0, _object.objectEach)(pattern, function (value, key) {
var item = items[typeof value === 'string' ? value : key];
if (!item) {
item = value;
}
if ((0, _object.isObject)(value)) {
(0, _object.extend)(item, value);
} else if (typeof item === 'string') {
item = { name: item };
}
if (item.key === void 0) {
item.key = key;
}
result.push(item);
});
} else {
(0, _array.arrayEach)(pattern, function (name, key) {
var item = items[name];
// Item deleted from settings `allowInsertRow: false` etc.
if (!item && _predefinedItems.ITEMS.indexOf(name) >= 0) {
return;
}
if (!item) {
item = { name: name, key: '' + key };
}
if ((0, _object.isObject)(name)) {
(0, _object.extend)(item, name);
}
if (item.key === void 0) {
item.key = key;
}
result.push(item);
});
}
return result;
}
exports.default = ItemsFactory;
/***/ }),
/* 403 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = alignmentItem;
var _utils = __webpack_require__(21);
var _separator = __webpack_require__(88);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'alignment';
function alignmentItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT);
},
disabled: function disabled() {
return !(this.getSelectedRange() && !this.selection.selectedHeader.corner);
},
submenu: {
items: [{
key: KEY + ':left',
name: function name() {
var _this = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this.getCellMeta(row, col).className;
if (className && className.indexOf('htLeft') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this2 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this2.getCellMeta(row, col).className;
});
var type = 'horizontal';
var alignment = 'htLeft';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this2.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this2.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
key: KEY + ':center',
name: function name() {
var _this3 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this3.getCellMeta(row, col).className;
if (className && className.indexOf('htCenter') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this4 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this4.getCellMeta(row, col).className;
});
var type = 'horizontal';
var alignment = 'htCenter';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this4.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this4.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
key: KEY + ':right',
name: function name() {
var _this5 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this5.getCellMeta(row, col).className;
if (className && className.indexOf('htRight') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this6 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this6.getCellMeta(row, col).className;
});
var type = 'horizontal';
var alignment = 'htRight';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this6.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this6.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
key: KEY + ':justify',
name: function name() {
var _this7 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this7.getCellMeta(row, col).className;
if (className && className.indexOf('htJustify') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this8 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this8.getCellMeta(row, col).className;
});
var type = 'horizontal';
var alignment = 'htJustify';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this8.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this8.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
name: _separator.KEY
}, {
key: KEY + ':top',
name: function name() {
var _this9 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this9.getCellMeta(row, col).className;
if (className && className.indexOf('htTop') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this10 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this10.getCellMeta(row, col).className;
});
var type = 'vertical';
var alignment = 'htTop';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this10.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this10.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
key: KEY + ':middle',
name: function name() {
var _this11 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this11.getCellMeta(row, col).className;
if (className && className.indexOf('htMiddle') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this12 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this12.getCellMeta(row, col).className;
});
var type = 'vertical';
var alignment = 'htMiddle';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this12.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this12.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}, {
key: KEY + ':bottom',
name: function name() {
var _this13 = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);
var hasClass = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
var className = _this13.getCellMeta(row, col).className;
if (className && className.indexOf('htBottom') !== -1) {
return true;
}
});
if (hasClass) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this14 = this;
var range = this.getSelectedRange();
var stateBefore = (0, _utils.getAlignmentClasses)(range, function (row, col) {
return _this14.getCellMeta(row, col).className;
});
var type = 'vertical';
var alignment = 'htBottom';
this.runHooks('beforeCellAlignment', stateBefore, range, type, alignment);
(0, _utils.align)(range, type, alignment, function (row, col) {
return _this14.getCellMeta(row, col);
}, function (row, col, key, value) {
return _this14.setCellMeta(row, col, key, value);
});
this.render();
},
disabled: false
}]
}
};
}
/***/ }),
/* 404 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = clearColumnItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'clear_column';
function clearColumnItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_CLEAR_COLUMN);
},
callback: function callback(key, selection) {
var column = selection.start.col;
if (this.countRows()) {
this.populateFromArray(0, column, [[null]], Math.max(selection.start.row, selection.end.row), column, 'ContextMenu.clearColumn');
}
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
if (!selected) {
return true;
}
var entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];
var rowSelected = entireRowSelection.join(',') === selected.join(',');
return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || rowSelected;
}
};
}
/***/ }),
/* 405 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = columnLeftItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'col_left';
function columnLeftItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_LEFT);
},
callback: function callback(key, selection) {
this.alter('insert_col', selection.start.col, 1, 'ContextMenu.columnLeft');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
if (!selected) {
return true;
}
if (!this.isColumnModificationAllowed()) {
return true;
}
var entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];
var rowSelected = entireRowSelection.join(',') === selected.join(',');
var onlyOneColumn = this.countCols() === 1;
return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || !onlyOneColumn && rowSelected;
},
hidden: function hidden() {
return !this.getSettings().allowInsertColumn;
}
};
}
/***/ }),
/* 406 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = columnRightItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'col_right';
function columnRightItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_INSERT_RIGHT);
},
callback: function callback(key, selection) {
this.alter('insert_col', selection.end.col + 1, 1, 'ContextMenu.columnRight');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
if (!selected) {
return true;
}
if (!this.isColumnModificationAllowed()) {
return true;
}
var entireRowSelection = [selected[0], 0, selected[0], this.countCols() - 1];
var rowSelected = entireRowSelection.join(',') === selected.join(',');
var onlyOneColumn = this.countCols() === 1;
return selected[1] < 0 || this.countCols() >= this.getSettings().maxCols || !onlyOneColumn && rowSelected;
},
hidden: function hidden() {
return !this.getSettings().allowInsertColumn;
}
};
}
/***/ }),
/* 407 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = readOnlyItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'make_read_only';
function readOnlyItem() {
return {
key: KEY,
name: function name() {
var _this = this;
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_READ_ONLY);
var atLeastOneReadOnly = (0, _utils.checkSelectionConsistency)(this.getSelectedRange(), function (row, col) {
return _this.getCellMeta(row, col).readOnly;
});
if (atLeastOneReadOnly) {
label = (0, _utils.markLabelAsSelected)(label);
}
return label;
},
callback: function callback() {
var _this2 = this;
var range = this.getSelectedRange();
var atLeastOneReadOnly = (0, _utils.checkSelectionConsistency)(range, function (row, col) {
return _this2.getCellMeta(row, col).readOnly;
});
range.forAll(function (row, col) {
_this2.setCellMeta(row, col, 'readOnly', !atLeastOneReadOnly);
});
this.render();
},
disabled: function disabled() {
return !(this.getSelectedRange() && !this.selection.selectedHeader.corner);
}
};
}
/***/ }),
/* 408 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = redoItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'redo';
function redoItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REDO);
},
callback: function callback() {
this.redo();
},
disabled: function disabled() {
return this.undoRedo && !this.undoRedo.isRedoAvailable();
}
};
}
/***/ }),
/* 409 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
exports.default = removeColumnItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'remove_col';
function removeColumnItem() {
return {
key: KEY,
name: function name() {
var selection = this.getSelected();
var pluralForm = 0;
if (Array.isArray(selection)) {
var _selection = _slicedToArray(selection, 4),
fromColumn = _selection[1],
toColumn = _selection[3];
if (fromColumn - toColumn !== 0) {
pluralForm = 1;
}
}
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_COLUMN, pluralForm);
},
callback: function callback(key, selection) {
var amount = selection.end.col - selection.start.col + 1;
this.alter('remove_col', selection.start.col, amount, 'ContextMenu.removeColumn');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
var totalColumns = this.countCols();
return !selected || this.selection.selectedHeader.rows || this.selection.selectedHeader.corner || !this.isColumnModificationAllowed() || !totalColumns;
},
hidden: function hidden() {
return !this.getSettings().allowRemoveColumn;
}
};
}
/***/ }),
/* 410 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
exports.default = removeRowItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'remove_row';
function removeRowItem() {
return {
key: KEY,
name: function name() {
var selection = this.getSelected();
var pluralForm = 0;
if (Array.isArray(selection)) {
var _selection = _slicedToArray(selection, 3),
fromRow = _selection[0],
toRow = _selection[2];
if (fromRow - toRow !== 0) {
pluralForm = 1;
}
}
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_ROW, pluralForm);
},
callback: function callback(key, selection) {
var amount = selection.end.row - selection.start.row + 1;
this.alter('remove_row', selection.start.row, amount, 'ContextMenu.removeRow');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
var totalRows = this.countRows();
return !selected || this.selection.selectedHeader.cols || this.selection.selectedHeader.corner || !totalRows;
},
hidden: function hidden() {
return !this.getSettings().allowRemoveRow;
}
};
}
/***/ }),
/* 411 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = rowAboveItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'row_above';
function rowAboveItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_ABOVE);
},
callback: function callback(key, selection) {
this.alter('insert_row', selection.start.row, 1, 'ContextMenu.rowAbove');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
return !selected || this.selection.selectedHeader.cols || this.countRows() >= this.getSettings().maxRows;
},
hidden: function hidden() {
return !this.getSettings().allowInsertRow;
}
};
}
/***/ }),
/* 412 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = rowBelowItem;
var _utils = __webpack_require__(21);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'row_below';
function rowBelowItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_ROW_BELOW);
},
callback: function callback(key, selection) {
this.alter('insert_row', selection.end.row + 1, 1, 'ContextMenu.rowBelow');
},
disabled: function disabled() {
var selected = (0, _utils.getValidSelection)(this);
return !selected || this.selection.selectedHeader.cols || this.countRows() >= this.getSettings().maxRows;
},
hidden: function hidden() {
return !this.getSettings().allowInsertRow;
}
};
}
/***/ }),
/* 413 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.KEY = undefined;
exports.default = undoItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
var KEY = exports.KEY = 'undo';
function undoItem() {
return {
key: KEY,
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNDO);
},
callback: function callback() {
this.undo();
},
disabled: function disabled() {
return this.undoRedo && !this.undoRedo.isUndoAvailable();
}
};
}
/***/ }),
/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _core = __webpack_require__(84);
var _core2 = _interopRequireDefault(_core);
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
var _cursor = __webpack_require__(415);
var _cursor2 = _interopRequireDefault(_cursor);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _object = __webpack_require__(1);
var _mixed = __webpack_require__(17);
var _function = __webpack_require__(41);
var _utils = __webpack_require__(21);
var _unicode = __webpack_require__(20);
var _localHooks = __webpack_require__(89);
var _localHooks2 = _interopRequireDefault(_localHooks);
var _predefinedItems = __webpack_require__(90);
var _event = __webpack_require__(12);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Menu
* @plugin ContextMenu
*/
var Menu = function () {
function Menu(hotInstance, options) {
_classCallCheck(this, Menu);
this.hot = hotInstance;
this.options = options || {
parent: null,
name: null,
className: '',
keepInViewport: true,
standalone: false
};
this.eventManager = new _eventManager2.default(this);
this.container = this.createContainer(this.options.name);
this.hotMenu = null;
this.hotSubMenus = {};
this.parentMenu = this.options.parent || null;
this.menuItems = null;
this.origOutsideClickDeselects = null;
this.keyEvent = false;
this.offset = {
above: 0,
below: 0,
left: 0,
right: 0
};
this._afterScrollCallback = null;
this.registerEvents();
}
/**
* Register event listeners.
*
* @private
*/
_createClass(Menu, [{
key: 'registerEvents',
value: function registerEvents() {
var _this = this;
this.eventManager.addEventListener(document.documentElement, 'mousedown', function (event) {
return _this.onDocumentMouseDown(event);
});
}
/**
* Set array of objects which defines menu items.
*
* @param {Array} menuItems Menu items to display.
*/
}, {
key: 'setMenuItems',
value: function setMenuItems(menuItems) {
this.menuItems = menuItems;
}
/**
* Set offset menu position for specified area (`above`, `below`, `left` or `right`).
*
* @param {String} area Specified area name (`above`, `below`, `left` or `right`).
* @param {Number} offset Offset value.
*/
}, {
key: 'setOffset',
value: function setOffset(area) {
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
this.offset[area] = offset;
}
/**
* Check if menu is using as sub-menu.
*
* @returns {Boolean}
*/
}, {
key: 'isSubMenu',
value: function isSubMenu() {
return this.parentMenu !== null;
}
/**
* Open menu.
*/
}, {
key: 'open',
value: function open() {
var _this2 = this;
this.container.removeAttribute('style');
this.container.style.display = 'block';
var delayedOpenSubMenu = (0, _function.debounce)(function (row) {
return _this2.openSubMenu(row);
}, 300);
var filteredItems = (0, _array.arrayFilter)(this.menuItems, function (item) {
return (0, _utils.isItemHidden)(item, _this2.hot);
});
filteredItems = (0, _utils.filterSeparators)(filteredItems, _predefinedItems.SEPARATOR);
var settings = {
data: filteredItems,
colHeaders: false,
colWidths: [215],
autoRowSize: false,
readOnly: true,
copyPaste: false,
columns: [{
data: 'name',
renderer: function renderer(hot, TD, row, col, prop, value) {
return _this2.menuItemRenderer(hot, TD, row, col, prop, value);
}
}],
renderAllRows: true,
fragmentSelection: 'cell',
disableVisualSelection: 'area',
beforeKeyDown: function beforeKeyDown(event) {
return _this2.onBeforeKeyDown(event);
},
afterOnCellMouseOver: function afterOnCellMouseOver(event, coords, TD) {
if (_this2.isAllSubMenusClosed()) {
delayedOpenSubMenu(coords.row);
} else {
_this2.openSubMenu(coords.row);
}
},
rowHeights: function rowHeights(row) {
return filteredItems[row].name === _predefinedItems.SEPARATOR ? 1 : 23;
}
};
this.origOutsideClickDeselects = this.hot.getSettings().outsideClickDeselects;
this.hot.getSettings().outsideClickDeselects = false;
this.hotMenu = new _core2.default(this.container, settings);
this.hotMenu.addHook('afterInit', function () {
return _this2.onAfterInit();
});
this.hotMenu.addHook('afterSelection', function (r, c, r2, c2, preventScrolling) {
return _this2.onAfterSelection(r, c, r2, c2, preventScrolling);
});
this.hotMenu.init();
this.hotMenu.listen();
this.blockMainTableCallbacks();
this.runLocalHooks('afterOpen');
}
/**
* Close menu.
*
* @param {Boolean} [closeParent=false] if `true` try to close parent menu if exists.
*/
}, {
key: 'close',
value: function close() {
var closeParent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!this.isOpened()) {
return;
}
if (closeParent && this.parentMenu) {
this.parentMenu.close();
} else {
this.closeAllSubMenus();
this.container.style.display = 'none';
this.releaseMainTableCallbacks();
this.hotMenu.destroy();
this.hotMenu = null;
this.hot.getSettings().outsideClickDeselects = this.origOutsideClickDeselects;
this.runLocalHooks('afterClose');
if (this.parentMenu) {
this.parentMenu.hotMenu.listen();
}
}
}
/**
* Open sub menu at the provided row index.
*
* @param {Number} row Row index.
* @returns {Menu|Boolean} Returns created menu or `false` if no one menu was created.
*/
}, {
key: 'openSubMenu',
value: function openSubMenu(row) {
if (!this.hotMenu) {
return false;
}
var cell = this.hotMenu.getCell(row, 0);
this.closeAllSubMenus();
if (!cell || !(0, _utils.hasSubMenu)(cell)) {
return false;
}
var dataItem = this.hotMenu.getSourceDataAtRow(row);
var subMenu = new Menu(this.hot, {
parent: this,
name: dataItem.name,
className: this.options.className,
keepInViewport: true
});
subMenu.setMenuItems(dataItem.submenu.items);
subMenu.open();
subMenu.setPosition(cell.getBoundingClientRect());
this.hotSubMenus[dataItem.key] = subMenu;
return subMenu;
}
/**
* Close sub menu at row index.
*
* @param {Number} row Row index.
*/
}, {
key: 'closeSubMenu',
value: function closeSubMenu(row) {
var dataItem = this.hotMenu.getSourceDataAtRow(row);
var menus = this.hotSubMenus[dataItem.key];
if (menus) {
menus.destroy();
delete this.hotSubMenus[dataItem.key];
}
}
/**
* Close all opened sub menus.
*/
}, {
key: 'closeAllSubMenus',
value: function closeAllSubMenus() {
var _this3 = this;
(0, _array.arrayEach)(this.hotMenu.getData(), function (value, row) {
return _this3.closeSubMenu(row);
});
}
/**
* Checks if all created and opened sub menus are closed.
*
* @returns {Boolean}
*/
}, {
key: 'isAllSubMenusClosed',
value: function isAllSubMenusClosed() {
return Object.keys(this.hotSubMenus).length === 0;
}
/**
* Destroy instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.clearLocalHooks();
this.close();
this.parentMenu = null;
this.eventManager.destroy();
}
/**
* Checks if menu was opened.
*
* @returns {Boolean} Returns `true` if menu was opened.
*/
}, {
key: 'isOpened',
value: function isOpened() {
return this.hotMenu !== null;
}
/**
* Execute menu command.
*
* @param {Event} [event]
*/
}, {
key: 'executeCommand',
value: function executeCommand(event) {
if (!this.isOpened() || !this.hotMenu.getSelected()) {
return;
}
var selectedItem = this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelected()[0]);
this.runLocalHooks('select', selectedItem, event);
if (selectedItem.isCommand === false || selectedItem.name === _predefinedItems.SEPARATOR) {
return;
}
var selRange = this.hot.getSelectedRange();
var normalizedSelection = selRange ? (0, _utils.normalizeSelection)(selRange) : {};
var autoClose = true;
// Don't close context menu if item is disabled or it has submenu
if (selectedItem.disabled === true || typeof selectedItem.disabled === 'function' && selectedItem.disabled.call(this.hot) === true || selectedItem.submenu) {
autoClose = false;
}
this.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);
if (this.isSubMenu()) {
this.parentMenu.runLocalHooks('executeCommand', selectedItem.key, normalizedSelection, event);
}
if (autoClose) {
this.close(true);
}
}
/**
* Set menu position based on dom event or based on literal object.
*
* @param {Event|Object} coords Event or literal Object with coordinates.
*/
}, {
key: 'setPosition',
value: function setPosition(coords) {
var cursor = new _cursor2.default(coords);
if (this.options.keepInViewport) {
if (cursor.fitsBelow(this.container)) {
this.setPositionBelowCursor(cursor);
} else if (cursor.fitsAbove(this.container)) {
this.setPositionAboveCursor(cursor);
} else {
this.setPositionBelowCursor(cursor);
}
if (cursor.fitsOnRight(this.container)) {
this.setPositionOnRightOfCursor(cursor);
} else {
this.setPositionOnLeftOfCursor(cursor);
}
} else {
this.setPositionBelowCursor(cursor);
this.setPositionOnRightOfCursor(cursor);
}
}
/**
* Set menu position above cursor object.
*
* @param {Cursor} cursor `Cursor` object.
*/
}, {
key: 'setPositionAboveCursor',
value: function setPositionAboveCursor(cursor) {
var top = this.offset.above + cursor.top - this.container.offsetHeight;
if (this.isSubMenu()) {
top = cursor.top + cursor.cellHeight - this.container.offsetHeight + 3;
}
this.container.style.top = top + 'px';
}
/**
* Set menu position below cursor object.
*
* @param {Cursor} cursor `Cursor` object.
*/
}, {
key: 'setPositionBelowCursor',
value: function setPositionBelowCursor(cursor) {
var top = this.offset.below + cursor.top;
if (this.isSubMenu()) {
top = cursor.top - 1;
}
this.container.style.top = top + 'px';
}
/**
* Set menu position on the right of cursor object.
*
* @param {Cursor} cursor `Cursor` object.
*/
}, {
key: 'setPositionOnRightOfCursor',
value: function setPositionOnRightOfCursor(cursor) {
var left = void 0;
if (this.isSubMenu()) {
left = 1 + cursor.left + cursor.cellWidth;
} else {
left = this.offset.right + 1 + cursor.left;
}
this.container.style.left = left + 'px';
}
/**
* Set menu position on the left of cursor object.
*
* @param {Cursor} cursor `Cursor` object.
*/
}, {
key: 'setPositionOnLeftOfCursor',
value: function setPositionOnLeftOfCursor(cursor) {
var left = this.offset.left + cursor.left - this.container.offsetWidth + (0, _element.getScrollbarWidth)() + 4;
this.container.style.left = left + 'px';
}
/**
* Select first cell in opened menu.
*/
}, {
key: 'selectFirstCell',
value: function selectFirstCell() {
var cell = this.hotMenu.getCell(0, 0);
if ((0, _utils.isSeparator)(cell) || (0, _utils.isDisabled)(cell) || (0, _utils.isSelectionDisabled)(cell)) {
this.selectNextCell(0, 0);
} else {
this.hotMenu.selectCell(0, 0);
}
}
/**
* Select last cell in opened menu.
*/
}, {
key: 'selectLastCell',
value: function selectLastCell() {
var lastRow = this.hotMenu.countRows() - 1;
var cell = this.hotMenu.getCell(lastRow, 0);
if ((0, _utils.isSeparator)(cell) || (0, _utils.isDisabled)(cell) || (0, _utils.isSelectionDisabled)(cell)) {
this.selectPrevCell(lastRow, 0);
} else {
this.hotMenu.selectCell(lastRow, 0);
}
}
/**
* Select next cell in opened menu.
*
* @param {Number} row Row index.
* @param {Number} col Column index.
*/
}, {
key: 'selectNextCell',
value: function selectNextCell(row, col) {
var nextRow = row + 1;
var cell = nextRow < this.hotMenu.countRows() ? this.hotMenu.getCell(nextRow, col) : null;
if (!cell) {
return;
}
if ((0, _utils.isSeparator)(cell) || (0, _utils.isDisabled)(cell) || (0, _utils.isSelectionDisabled)(cell)) {
this.selectNextCell(nextRow, col);
} else {
this.hotMenu.selectCell(nextRow, col);
}
}
/**
* Select previous cell in opened menu.
*
* @param {Number} row Row index.
* @param {Number} col Column index.
*/
}, {
key: 'selectPrevCell',
value: function selectPrevCell(row, col) {
var prevRow = row - 1;
var cell = prevRow >= 0 ? this.hotMenu.getCell(prevRow, col) : null;
if (!cell) {
return;
}
if ((0, _utils.isSeparator)(cell) || (0, _utils.isDisabled)(cell) || (0, _utils.isSelectionDisabled)(cell)) {
this.selectPrevCell(prevRow, col);
} else {
this.hotMenu.selectCell(prevRow, col);
}
}
/**
* Menu item renderer.
*
* @private
*/
}, {
key: 'menuItemRenderer',
value: function menuItemRenderer(hot, TD, row, col, prop, value) {
var _this4 = this;
var item = hot.getSourceDataAtRow(row);
var wrapper = document.createElement('div');
var isSubMenu = function isSubMenu(item) {
return (0, _object.hasOwnProperty)(item, 'submenu');
};
var itemIsSeparator = function itemIsSeparator(item) {
return new RegExp(_predefinedItems.SEPARATOR, 'i').test(item.name);
};
var itemIsDisabled = function itemIsDisabled(item) {
return item.disabled === true || typeof item.disabled == 'function' && item.disabled.call(_this4.hot) === true;
};
var itemIsSelectionDisabled = function itemIsSelectionDisabled(item) {
return item.disableSelection;
};
if (typeof value === 'function') {
value = value.call(this.hot);
}
(0, _element.empty)(TD);
(0, _element.addClass)(wrapper, 'htItemWrapper');
TD.appendChild(wrapper);
if (itemIsSeparator(item)) {
(0, _element.addClass)(TD, 'htSeparator');
} else if (typeof item.renderer === 'function') {
(0, _element.addClass)(TD, 'htCustomMenuRenderer');
TD.appendChild(item.renderer(hot, wrapper, row, col, prop, value));
} else {
(0, _element.fastInnerHTML)(wrapper, value);
}
if (itemIsDisabled(item)) {
(0, _element.addClass)(TD, 'htDisabled');
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.deselectCell();
});
} else if (itemIsSelectionDisabled(item)) {
(0, _element.addClass)(TD, 'htSelectionDisabled');
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.deselectCell();
});
} else if (isSubMenu(item)) {
(0, _element.addClass)(TD, 'htSubmenu');
if (itemIsSelectionDisabled(item)) {
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.deselectCell();
});
} else {
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.selectCell(row, col, void 0, void 0, false, false);
});
}
} else {
(0, _element.removeClass)(TD, 'htSubmenu');
(0, _element.removeClass)(TD, 'htDisabled');
if (itemIsSelectionDisabled(item)) {
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.deselectCell();
});
} else {
this.eventManager.addEventListener(TD, 'mouseenter', function () {
return hot.selectCell(row, col, void 0, void 0, false, false);
});
}
}
}
/**
* Create container/wrapper for handsontable.
*
* @private
* @param {String} [name] Class name.
* @returns {HTMLElement}
*/
}, {
key: 'createContainer',
value: function createContainer() {
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var container = void 0;
if (name) {
if ((0, _function.isFunction)(name)) {
name = name.call(this.hot);
if (name === null || (0, _mixed.isUndefined)(name)) {
name = '';
} else {
name = name.toString();
}
}
name = name.replace(/[^A-z0-9]/g, '_');
name = this.options.className + 'Sub_' + name;
container = document.querySelector('.' + this.options.className + '.' + name);
} else {
container = document.querySelector('.' + this.options.className);
}
if (!container) {
container = document.createElement('div');
(0, _element.addClass)(container, 'htMenu ' + this.options.className);
if (name) {
(0, _element.addClass)(container, name);
}
document.getElementsByTagName('body')[0].appendChild(container);
}
return container;
}
/**
* @private
*/
}, {
key: 'blockMainTableCallbacks',
value: function blockMainTableCallbacks() {
this._afterScrollCallback = function () {};
this.hot.addHook('afterScrollVertically', this._afterScrollCallback);
this.hot.addHook('afterScrollHorizontally', this._afterScrollCallback);
}
/**
* @private
*/
}, {
key: 'releaseMainTableCallbacks',
value: function releaseMainTableCallbacks() {
if (this._afterScrollCallback) {
this.hot.removeHook('afterScrollVertically', this._afterScrollCallback);
this.hot.removeHook('afterScrollHorizontally', this._afterScrollCallback);
this._afterScrollCallback = null;
}
}
/**
* On before key down listener.
*
* @private
* @param {Event} event
*/
}, {
key: 'onBeforeKeyDown',
value: function onBeforeKeyDown(event) {
var selection = this.hotMenu.getSelected();
var stopEvent = false;
this.keyEvent = true;
switch (event.keyCode) {
case _unicode.KEY_CODES.ESCAPE:
this.close();
stopEvent = true;
break;
case _unicode.KEY_CODES.ENTER:
if (selection) {
if (this.hotMenu.getSourceDataAtRow(selection[0]).submenu) {
stopEvent = true;
} else {
this.executeCommand(event);
this.close(true);
}
}
break;
case _unicode.KEY_CODES.ARROW_DOWN:
if (selection) {
this.selectNextCell(selection[0], selection[1]);
} else {
this.selectFirstCell();
}
stopEvent = true;
break;
case _unicode.KEY_CODES.ARROW_UP:
if (selection) {
this.selectPrevCell(selection[0], selection[1]);
} else {
this.selectLastCell();
}
stopEvent = true;
break;
case _unicode.KEY_CODES.ARROW_RIGHT:
if (selection) {
var menu = this.openSubMenu(selection[0]);
if (menu) {
menu.selectFirstCell();
}
}
stopEvent = true;
break;
case _unicode.KEY_CODES.ARROW_LEFT:
if (selection && this.isSubMenu()) {
this.close();
if (this.parentMenu) {
this.parentMenu.hotMenu.listen();
}
stopEvent = true;
}
break;
default:
break;
}
if (stopEvent) {
event.preventDefault();
(0, _event.stopImmediatePropagation)(event);
}
this.keyEvent = false;
}
/**
* On after init listener.
*
* @private
*/
}, {
key: 'onAfterInit',
value: function onAfterInit() {
var data = this.hotMenu.getSettings().data;
var hiderStyle = this.hotMenu.view.wt.wtTable.hider.style;
var holderStyle = this.hotMenu.view.wt.wtTable.holder.style;
var currentHiderWidth = parseInt(hiderStyle.width, 10);
var realHeight = (0, _array.arrayReduce)(data, function (accumulator, value) {
return accumulator + (value.name === _predefinedItems.SEPARATOR ? 1 : 26);
}, 0);
holderStyle.width = currentHiderWidth + 22 + 'px';
holderStyle.height = realHeight + 4 + 'px';
hiderStyle.height = holderStyle.height;
}
/**
* On after selection listener.
*
* @param {Number} r Selection start row index.
* @param {Number} c Selection start column index.
* @param {Number} r2 Selection end row index.
* @param {Number} c2 Selection end column index.
* @param {Object} preventScrolling Object with `value` property where its value change will be observed.
*/
}, {
key: 'onAfterSelection',
value: function onAfterSelection(r, c, r2, c2, preventScrolling) {
if (this.keyEvent === false) {
preventScrolling.value = true;
}
}
/**
* Document mouse down listener.
*
* @private
* @param {Event} event
*/
}, {
key: 'onDocumentMouseDown',
value: function onDocumentMouseDown(event) {
if (!this.isOpened()) {
return;
}
if (this.container && (0, _element.isChildOf)(event.target, this.container)) {
this.executeCommand(event);
}
// Close menu when clicked element is not belongs to menu itself
if (this.options.standalone && this.hotMenu && !(0, _element.isChildOf)(event.target, this.hotMenu.rootElement)) {
this.close(true);
// Automatically close menu when clicked element is not belongs to menu or submenu (not necessarily to itself)
} else if ((this.isAllSubMenusClosed() || this.isSubMenu()) && !(0, _element.isChildOf)(event.target, '.htMenu') && (0, _element.isChildOf)(event.target, document)) {
this.close(true);
}
}
}]);
return Menu;
}();
(0, _object.mixin)(Menu, _localHooks2.default);
exports.default = Menu;
/***/ }),
/* 415 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _element = __webpack_require__(0);
var _event = __webpack_require__(12);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* Helper class for checking if element will fit at the desired side of cursor.
*
* @class Cursor
* @plugin ContextMenu
*/
var Cursor = function () {
function Cursor(object) {
_classCallCheck(this, Cursor);
var windowScrollTop = (0, _element.getWindowScrollTop)();
var windowScrollLeft = (0, _element.getWindowScrollLeft)();
var top = void 0,
topRelative = void 0;
var left = void 0,
leftRelative = void 0;
var cellHeight = void 0,
cellWidth = void 0;
this.type = this.getSourceType(object);
if (this.type === 'literal') {
top = parseInt(object.top, 10);
left = parseInt(object.left, 10);
cellHeight = object.height || 0;
cellWidth = object.width || 0;
topRelative = top;
leftRelative = left;
top += windowScrollTop;
left += windowScrollLeft;
} else if (this.type === 'event') {
top = parseInt((0, _event.pageY)(object), 10);
left = parseInt((0, _event.pageX)(object), 10);
cellHeight = object.target.clientHeight;
cellWidth = object.target.clientWidth;
topRelative = top - windowScrollTop;
leftRelative = left - windowScrollLeft;
}
this.top = top;
this.topRelative = topRelative;
this.left = left;
this.leftRelative = leftRelative;
this.scrollTop = windowScrollTop;
this.scrollLeft = windowScrollLeft;
this.cellHeight = cellHeight;
this.cellWidth = cellWidth;
}
/**
* Get source type name.
*
* @param {*} object Event or Object with coordinates.
* @returns {String} Returns one of this values: `'literal'`, `'event'`.
*/
_createClass(Cursor, [{
key: 'getSourceType',
value: function getSourceType(object) {
var type = 'literal';
if (object instanceof Event) {
type = 'event';
}
return type;
}
/**
* Checks if element can be placed above the cursor.
*
* @param {HTMLElement} element Element to check if it's size will fit above the cursor.
* @returns {Boolean}
*/
}, {
key: 'fitsAbove',
value: function fitsAbove(element) {
return this.topRelative >= element.offsetHeight;
}
/**
* Checks if element can be placed below the cursor.
*
* @param {HTMLElement} element Element to check if it's size will fit below the cursor.
* @param {Number} [viewportHeight] The viewport height.
* @returns {Boolean}
*/
}, {
key: 'fitsBelow',
value: function fitsBelow(element) {
var viewportHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.innerHeight;
return this.topRelative + element.offsetHeight <= viewportHeight;
}
/**
* Checks if element can be placed on the right of the cursor.
*
* @param {HTMLElement} element Element to check if it's size will fit on the right of the cursor.
* @param {Number} [viewportWidth] The viewport width.
* @returns {Boolean}
*/
}, {
key: 'fitsOnRight',
value: function fitsOnRight(element) {
var viewportWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.innerWidth;
return this.leftRelative + this.cellWidth + element.offsetWidth <= viewportWidth;
}
/**
* Checks if element can be placed on the left on the cursor.
*
* @param {HTMLElement} element Element to check if it's size will fit on the left of the cursor.
* @returns {Boolean}
*/
}, {
key: 'fitsOnLeft',
value: function fitsOnLeft(element) {
return this.leftRelative >= element.offsetWidth;
}
}]);
return Cursor;
}();
exports.default = Cursor;
/***/ }),
/* 416 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 417 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _SheetClip = __webpack_require__(307);
var _SheetClip2 = _interopRequireDefault(_SheetClip);
var _src = __webpack_require__(15);
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
var _number = __webpack_require__(6);
var _plugins = __webpack_require__(7);
var _textarea = __webpack_require__(418);
var _textarea2 = _interopRequireDefault(_textarea);
var _copy = __webpack_require__(419);
var _copy2 = _interopRequireDefault(_copy);
var _cut = __webpack_require__(420);
var _cut2 = _interopRequireDefault(_cut);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _pasteEvent = __webpack_require__(421);
var _pasteEvent2 = _interopRequireDefault(_pasteEvent);
__webpack_require__(423);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('afterCopyLimit');
_pluginHooks2.default.getSingleton().register('modifyCopyableRange');
_pluginHooks2.default.getSingleton().register('beforeCut');
_pluginHooks2.default.getSingleton().register('afterCut');
_pluginHooks2.default.getSingleton().register('beforePaste');
_pluginHooks2.default.getSingleton().register('afterPaste');
_pluginHooks2.default.getSingleton().register('beforeCopy');
_pluginHooks2.default.getSingleton().register('afterCopy');
var ROWS_LIMIT = 1000;
var COLUMNS_LIMIT = 1000;
var privatePool = new WeakMap();
/**
* @description
* This plugin enables the copy/paste functionality in the Handsontable.
*
* @example
* ```js
* ...
* copyPaste: true,
* ...
* ```
* @class CopyPaste
* @plugin CopyPaste
*/
var CopyPaste = function (_BasePlugin) {
_inherits(CopyPaste, _BasePlugin);
function CopyPaste(hotInstance) {
_classCallCheck(this, CopyPaste);
/**
* Event manager
*
* @type {EventManager}
*/
var _this = _possibleConstructorReturn(this, (CopyPaste.__proto__ || Object.getPrototypeOf(CopyPaste)).call(this, hotInstance));
_this.eventManager = new _eventManager2.default(_this);
/**
* Maximum number of columns than can be copied to clipboard using <kbd>CTRL</kbd> + <kbd>C</kbd>.
*
* @private
* @type {Number}
* @default 1000
*/
_this.columnsLimit = COLUMNS_LIMIT;
/**
* Ranges of the cells coordinates, which should be used to copy/cut/paste actions.
*
* @private
* @type {Array}
*/
_this.copyableRanges = [];
/**
* Defines paste (<kbd>CTRL</kbd> + <kbd>V</kbd>) behavior.
* * Default value `"overwrite"` will paste clipboard value over current selection.
* * When set to `"shift_down"`, clipboard data will be pasted in place of current selection, while all selected cells are moved down.
* * When set to `"shift_right"`, clipboard data will be pasted in place of current selection, while all selected cells are moved right.
*
* @private
* @type {String}
* @default 'overwrite'
*/
_this.pasteMode = 'overwrite';
/**
* Maximum number of rows than can be copied to clipboard using <kbd>CTRL</kbd> + <kbd>C</kbd>.
*
* @private
* @type {Number}
* @default 1000
*/
_this.rowsLimit = ROWS_LIMIT;
/**
* The `textarea` element which is necessary to process copying, cutting off and pasting.
*
* @private
* @type {HTMLElement}
* @default undefined
*/
_this.textarea = void 0;
privatePool.set(_this, {
isTriggeredByCopy: false,
isTriggeredByCut: false,
isBeginEditing: false,
isFragmentSelectionEnabled: false
});
return _this;
}
/**
* Check if plugin is enabled.
*
* @returns {Boolean}
*/
_createClass(CopyPaste, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().copyPaste;
}
/**
* Enable the plugin.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
var settings = this.hot.getSettings();
var priv = privatePool.get(this);
this.textarea = _textarea2.default.getSingleton();
priv.isFragmentSelectionEnabled = settings.fragmentSelection;
if (_typeof(settings.copyPaste) === 'object') {
this.pasteMode = settings.copyPaste.pasteMode || this.pasteMode;
this.rowsLimit = settings.copyPaste.rowsLimit || this.rowsLimit;
this.columnsLimit = settings.copyPaste.columnsLimit || this.columnsLimit;
}
this.addHook('afterContextMenuDefaultOptions', function (options) {
return _this2.onAfterContextMenuDefaultOptions(options);
});
this.addHook('afterSelectionEnd', function () {
return _this2.onAfterSelectionEnd();
});
this.registerEvents();
_get(CopyPaste.prototype.__proto__ || Object.getPrototypeOf(CopyPaste.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(CopyPaste.prototype.__proto__ || Object.getPrototypeOf(CopyPaste.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
if (this.textarea) {
this.textarea.destroy();
}
_get(CopyPaste.prototype.__proto__ || Object.getPrototypeOf(CopyPaste.prototype), 'disablePlugin', this).call(this);
}
/**
* Prepares copyable text from the cells selection in the invisible textarea.
*
* @function setCopyable
* @memberof CopyPaste#
*/
}, {
key: 'setCopyableText',
value: function setCopyableText() {
var selRange = this.hot.getSelectedRange();
if (!selRange) {
return;
}
var topLeft = selRange.getTopLeftCorner();
var bottomRight = selRange.getBottomRightCorner();
var startRow = topLeft.row;
var startCol = topLeft.col;
var endRow = bottomRight.row;
var endCol = bottomRight.col;
var finalEndRow = Math.min(endRow, startRow + this.rowsLimit - 1);
var finalEndCol = Math.min(endCol, startCol + this.columnsLimit - 1);
this.copyableRanges.length = 0;
this.copyableRanges.push({
startRow: startRow,
startCol: startCol,
endRow: finalEndRow,
endCol: finalEndCol
});
this.copyableRanges = this.hot.runHooks('modifyCopyableRange', this.copyableRanges);
if (endRow !== finalEndRow || endCol !== finalEndCol) {
this.hot.runHooks('afterCopyLimit', endRow - startRow + 1, endCol - startCol + 1, this.rowsLimit, this.columnsLimit);
}
}
/**
* Create copyable text releated to range objects.
*
* @since 0.19.0
* @param {Array} ranges Array of Objects with properties `startRow`, `endRow`, `startCol` and `endCol`.
* @returns {String} Returns string which will be copied into clipboard.
*/
}, {
key: 'getRangedCopyableData',
value: function getRangedCopyableData(ranges) {
var _this3 = this;
var dataSet = [];
var copyableRows = [];
var copyableColumns = [];
// Count all copyable rows and columns
(0, _array.arrayEach)(ranges, function (range) {
(0, _number.rangeEach)(range.startRow, range.endRow, function (row) {
if (copyableRows.indexOf(row) === -1) {
copyableRows.push(row);
}
});
(0, _number.rangeEach)(range.startCol, range.endCol, function (column) {
if (copyableColumns.indexOf(column) === -1) {
copyableColumns.push(column);
}
});
});
// Concat all rows and columns data defined in ranges into one copyable string
(0, _array.arrayEach)(copyableRows, function (row) {
var rowSet = [];
(0, _array.arrayEach)(copyableColumns, function (column) {
rowSet.push(_this3.hot.getCopyableData(row, column));
});
dataSet.push(rowSet);
});
return _SheetClip2.default.stringify(dataSet);
}
/**
* Create copyable text releated to range objects.
*
* @since 0.31.1
* @param {Array} ranges Array of Objects with properties `startRow`, `startCol`, `endRow` and `endCol`.
* @returns {Array} Returns array of arrays which will be copied into clipboard.
*/
}, {
key: 'getRangedData',
value: function getRangedData(ranges) {
var _this4 = this;
var dataSet = [];
var copyableRows = [];
var copyableColumns = [];
// Count all copyable rows and columns
(0, _array.arrayEach)(ranges, function (range) {
(0, _number.rangeEach)(range.startRow, range.endRow, function (row) {
if (copyableRows.indexOf(row) === -1) {
copyableRows.push(row);
}
});
(0, _number.rangeEach)(range.startCol, range.endCol, function (column) {
if (copyableColumns.indexOf(column) === -1) {
copyableColumns.push(column);
}
});
});
// Concat all rows and columns data defined in ranges into one copyable string
(0, _array.arrayEach)(copyableRows, function (row) {
var rowSet = [];
(0, _array.arrayEach)(copyableColumns, function (column) {
rowSet.push(_this4.hot.getCopyableData(row, column));
});
dataSet.push(rowSet);
});
return dataSet;
}
/**
* Copy action.
*/
}, {
key: 'copy',
value: function copy() {
var priv = privatePool.get(this);
priv.isTriggeredByCopy = true;
this.textarea.select();
document.execCommand('copy');
}
/**
* Cut action.
*/
}, {
key: 'cut',
value: function cut() {
var priv = privatePool.get(this);
priv.isTriggeredByCut = true;
this.textarea.select();
document.execCommand('cut');
}
/**
* Simulated paste action.
*
* @param {String} [value=''] New value, which should be `pasted`.
*/
}, {
key: 'paste',
value: function paste() {
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var pasteData = new _pasteEvent2.default();
pasteData.clipboardData.setData('text/plain', value);
this.onPaste(pasteData);
}
/**
* Register event listeners.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this5 = this;
this.eventManager.addEventListener(this.textarea.element, 'paste', function (event) {
return _this5.onPaste(event);
});
this.eventManager.addEventListener(this.textarea.element, 'cut', function (event) {
return _this5.onCut(event);
});
this.eventManager.addEventListener(this.textarea.element, 'copy', function (event) {
return _this5.onCopy(event);
});
}
/**
* `copy` event callback on textarea element.
*
* @param {Event} event ClipboardEvent.
* @private
*/
}, {
key: 'onCopy',
value: function onCopy(event) {
var priv = privatePool.get(this);
if (!this.hot.isListening() && !priv.isTriggeredByCopy) {
return;
}
this.setCopyableText();
priv.isTriggeredByCopy = false;
var rangedData = this.getRangedData(this.copyableRanges);
var allowCopying = !!this.hot.runHooks('beforeCopy', rangedData, this.copyableRanges);
var value = '';
if (allowCopying) {
value = _SheetClip2.default.stringify(rangedData);
if (event && event.clipboardData) {
event.clipboardData.setData('text/plain', value);
} else if (typeof ClipboardEvent === 'undefined') {
window.clipboardData.setData('Text', value);
}
this.hot.runHooks('afterCopy', rangedData, this.copyableRanges);
}
event.preventDefault();
}
/**
* `cut` event callback on textarea element.
*
* @param {Event} event ClipboardEvent.
* @private
*/
}, {
key: 'onCut',
value: function onCut(event) {
var priv = privatePool.get(this);
if (!this.hot.isListening() && !priv.isTriggeredByCut) {
return;
}
this.setCopyableText();
priv.isTriggeredByCut = false;
var rangedData = this.getRangedData(this.copyableRanges);
var allowCuttingOut = !!this.hot.runHooks('beforeCut', rangedData, this.copyableRanges);
var value = void 0;
if (allowCuttingOut) {
value = _SheetClip2.default.stringify(rangedData);
if (event && event.clipboardData) {
event.clipboardData.setData('text/plain', value);
} else if (typeof ClipboardEvent === 'undefined') {
window.clipboardData.setData('Text', value);
}
this.hot.selection.empty();
this.hot.runHooks('afterCut', rangedData, this.copyableRanges);
}
event.preventDefault();
}
/**
* `paste` event callback on textarea element.
*
* @param {Event} event ClipboardEvent or pseudo ClipboardEvent, if paste was called manually.
* @private
*/
}, {
key: 'onPaste',
value: function onPaste(event) {
var _this6 = this;
if (!this.hot.isListening()) {
return;
}
if (event && event.preventDefault) {
event.preventDefault();
}
var inputArray = void 0;
if (event && typeof event.clipboardData !== 'undefined') {
this.textarea.setValue(event.clipboardData.getData('text/plain'));
} else if (typeof ClipboardEvent === 'undefined' && typeof window.clipboardData !== 'undefined') {
this.textarea.setValue(window.clipboardData.getData('Text'));
}
inputArray = _SheetClip2.default.parse(this.textarea.getValue());
this.textarea.setValue(' ');
if (inputArray.length === 0) {
return;
}
var allowPasting = !!this.hot.runHooks('beforePaste', inputArray, this.copyableRanges);
if (!allowPasting) {
return;
}
var selected = this.hot.getSelected();
var coordsFrom = new _src.CellCoords(selected[0], selected[1]);
var coordsTo = new _src.CellCoords(selected[2], selected[3]);
var cellRange = new _src.CellRange(coordsFrom, coordsFrom, coordsTo);
var topLeftCorner = cellRange.getTopLeftCorner();
var bottomRightCorner = cellRange.getBottomRightCorner();
var areaStart = topLeftCorner;
var areaEnd = new _src.CellCoords(Math.max(bottomRightCorner.row, inputArray.length - 1 + topLeftCorner.row), Math.max(bottomRightCorner.col, inputArray[0].length - 1 + topLeftCorner.col));
var isSelRowAreaCoverInputValue = coordsTo.row - coordsFrom.row >= inputArray.length - 1;
var isSelColAreaCoverInputValue = coordsTo.col - coordsFrom.col >= inputArray[0].length - 1;
this.hot.addHookOnce('afterChange', function (changes) {
var changesLength = changes ? changes.length : 0;
if (changesLength) {
var offset = { row: 0, col: 0 };
var highestColumnIndex = -1;
(0, _array.arrayEach)(changes, function (change, index) {
var nextChange = changesLength > index + 1 ? changes[index + 1] : null;
if (nextChange) {
if (!isSelRowAreaCoverInputValue) {
offset.row += Math.max(nextChange[0] - change[0] - 1, 0);
}
if (!isSelColAreaCoverInputValue && change[1] > highestColumnIndex) {
highestColumnIndex = change[1];
offset.col += Math.max(nextChange[1] - change[1] - 1, 0);
}
}
});
_this6.hot.selectCell(areaStart.row, areaStart.col, areaEnd.row + offset.row, areaEnd.col + offset.col);
}
});
this.hot.populateFromArray(areaStart.row, areaStart.col, inputArray, areaEnd.row, areaEnd.col, 'CopyPaste.paste', this.pasteMode);
this.hot.runHooks('afterPaste', inputArray, this.copyableRanges);
}
/**
* Add copy, cut and paste options to the Context Menu.
*
* @private
* @param {Object} options Contains default added options of the Context Menu.
*/
}, {
key: 'onAfterContextMenuDefaultOptions',
value: function onAfterContextMenuDefaultOptions(options) {
options.items.push({
name: '---------'
}, (0, _copy2.default)(this), (0, _cut2.default)(this));
}
/**
* We have to keep focus on textarea element, to make possible use of the browser tools (copy, cut, paste).
*
* @private
*/
}, {
key: 'onAfterSelectionEnd',
value: function onAfterSelectionEnd() {
var priv = privatePool.get(this);
var editor = this.hot.getActiveEditor();
if (editor && typeof editor.isOpened !== 'undefined' && editor.isOpened()) {
return;
}
if (priv.isFragmentSelectionEnabled && !this.textarea.isActive() && (0, _element.getSelectionText)()) {
return;
}
this.setCopyableText();
this.textarea.select();
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
if (this.textarea) {
this.textarea.destroy();
}
_get(CopyPaste.prototype.__proto__ || Object.getPrototypeOf(CopyPaste.prototype), 'destroy', this).call(this);
}
}]);
return CopyPaste;
}(_base2.default);
(0, _plugins.registerPlugin)('CopyPaste', CopyPaste);
exports.default = CopyPaste;
/***/ }),
/* 418 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class Textarea
*
* @plugin CopyPaste
*/
var Textarea = function () {
_createClass(Textarea, null, [{
key: 'getSingleton',
value: function getSingleton() {
globalSingleton.append();
return globalSingleton;
}
}]);
function Textarea() {
_classCallCheck(this, Textarea);
/**
* Main textarea element.
*
* @type {HTMLElement}
*/
this.element = void 0;
/**
* Store information about append to the document.body.
*
* @type {Boolean}
*/
this.isAppended = false;
/**
* Reference counter.
*
* @type {Number}
*/
this.refCounter = 0;
}
/**
* Apends textarea element to the `body`
*/
_createClass(Textarea, [{
key: 'append',
value: function append() {
if (this.hasBeenDestroyed()) {
this.create();
}
this.refCounter++;
if (!this.isAppended && document.body) {
if (document.body) {
this.isAppended = true;
document.body.appendChild(this.element);
}
}
}
/**
* Prepares textarea element with proper attributes.
*/
}, {
key: 'create',
value: function create() {
this.element = document.createElement('textarea');
this.element.id = 'HandsontableCopyPaste';
this.element.className = 'copyPaste';
this.element.tabIndex = -1;
this.element.autocomplete = 'off';
this.element.wrap = 'hard';
this.element.value = ' ';
}
/**
* Deselects textarea element if is active.
*/
}, {
key: 'deselect',
value: function deselect() {
if (this.element === document.activeElement) {
document.activeElement.blur();
}
}
/**
* Destroy instance
*/
}, {
key: 'destroy',
value: function destroy() {
this.refCounter--;
this.refCounter = this.refCounter < 0 ? 0 : this.refCounter;
if (this.hasBeenDestroyed() && this.element && this.element.parentNode) {
this.element.parentNode.removeChild(this.element);
this.element = null;
this.isAppended = false;
}
}
/**
* Getter for the element.
*
* @returns {String}
*/
}, {
key: 'getValue',
value: function getValue() {
return this.element.value;
}
/**
* Check if instance has been destroyed
*
* @returns {Boolean}
*/
}, {
key: 'hasBeenDestroyed',
value: function hasBeenDestroyed() {
return this.refCounter < 1;
}
/**
* Check if the element is an active element in frame.
*
* @returns {Boolean}
*/
}, {
key: 'isActive',
value: function isActive() {
return this.element === document.activeElement;
}
/**
* Sets focus on the element and select content.
*/
}, {
key: 'select',
value: function select() {
this.element.focus();
this.element.select();
}
/**
* Setter for the element.
*
* @param {String} data Value which should be insert into the element.
*/
}, {
key: 'setValue',
value: function setValue(data) {
this.element.value = data;
}
}]);
return Textarea;
}();
var globalSingleton = new Textarea();
exports.default = Textarea;
/***/ }),
/* 419 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = copyItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function copyItem(copyPastePlugin) {
return {
key: 'copy',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_COPY);
},
callback: function callback() {
copyPastePlugin.copy();
},
disabled: function disabled() {
return !copyPastePlugin.hot.getSelected();
},
hidden: false
};
}
/***/ }),
/* 420 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = cutItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function cutItem(copyPastePlugin) {
return {
key: 'cut',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_CUT);
},
callback: function callback() {
copyPastePlugin.cut();
},
disabled: function disabled() {
return !copyPastePlugin.hot.getSelected();
},
hidden: false
};
}
/***/ }),
/* 421 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _clipboardData = __webpack_require__(422);
var _clipboardData2 = _interopRequireDefault(_clipboardData);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PasteEvent = function PasteEvent() {
_classCallCheck(this, PasteEvent);
this.clipboardData = new _clipboardData2.default();
};
exports.default = PasteEvent;
/***/ }),
/* 422 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var ClipboardData = function () {
function ClipboardData() {
_classCallCheck(this, ClipboardData);
this.data = {};
}
_createClass(ClipboardData, [{
key: "setData",
value: function setData(type, value) {
this.data[type] = value;
}
}, {
key: "getData",
value: function getData(type) {
return this.data[type] || void 0;
}
}]);
return ClipboardData;
}();
exports.default = ClipboardData;
/***/ }),
/* 423 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 424 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _object = __webpack_require__(1);
var _src = __webpack_require__(15);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function CustomBorders() {}
/** *
* Current instance (table where borders should be placed)
*/
var instance;
/**
* This plugin enables an option to apply custom borders through the context menu (configurable with context menu key `borders`).
*
* To initialize Handsontable with predefined custom borders, provide cell coordinates and border styles in a form of an array.
*
* See [Custom Borders](http://docs.handsontable.com/demo-custom-borders.html) demo for more examples.
*
* @example
* ```js
* ...
* customBorders: [
* {range: {
* from: {row: 1, col: 1},
* to: {row: 3, col: 4}},
* left: {},
* right: {},
* top: {},
* bottom: {}
* }
* ],
* ...
*
* // or
* ...
* customBorders: [
* {row: 2, col: 2, left: {width: 2, color: 'red'},
* right: {width: 1, color: 'green'}, top: '', bottom: ''}
* ],
* ...
* ```
* @private
* @class CustomBorders
* @plugin CustomBorders
*/
/** *
* Check if plugin should be enabled.
*/
var checkEnable = function checkEnable(customBorders) {
if (typeof customBorders === 'boolean') {
if (customBorders === true) {
return true;
}
}
if ((typeof customBorders === 'undefined' ? 'undefined' : _typeof(customBorders)) === 'object') {
if (customBorders.length > 0) {
return true;
}
}
return false;
};
/** *
* Initialize plugin.
*/
var init = function init() {
if (checkEnable(this.getSettings().customBorders)) {
if (!this.customBorders) {
instance = this;
this.customBorders = new CustomBorders();
}
}
};
/** *
* Get index of border from the settings.
*
* @param {String} className
* @returns {Number}
*/
var getSettingIndex = function getSettingIndex(className) {
for (var i = 0; i < instance.view.wt.selections.length; i++) {
if (instance.view.wt.selections[i].settings.className == className) {
return i;
}
}
return -1;
};
/** *
* Insert WalkontableSelection instance into Walkontable settings.
*
* @param border
*/
var insertBorderIntoSettings = function insertBorderIntoSettings(border) {
var coordinates = {
row: border.row,
col: border.col
};
var selection = new _src.Selection(border, new _src.CellRange(coordinates, coordinates, coordinates));
var index = getSettingIndex(border.className);
if (index >= 0) {
instance.view.wt.selections[index] = selection;
} else {
instance.view.wt.selections.push(selection);
}
};
/** *
* Prepare borders from setting (single cell).
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @param borderObj
*/
var prepareBorderFromCustomAdded = function prepareBorderFromCustomAdded(row, col, borderObj) {
var border = createEmptyBorders(row, col);
border = extendDefaultBorder(border, borderObj);
this.setCellMeta(row, col, 'borders', border);
insertBorderIntoSettings(border);
};
/** *
* Prepare borders from setting (object).
*
* @param {Object} rowObj
*/
var prepareBorderFromCustomAddedRange = function prepareBorderFromCustomAddedRange(rowObj) {
var range = rowObj.range;
for (var row = range.from.row; row <= range.to.row; row++) {
for (var col = range.from.col; col <= range.to.col; col++) {
var border = createEmptyBorders(row, col);
var add = 0;
if (row == range.from.row) {
add++;
if ((0, _object.hasOwnProperty)(rowObj, 'top')) {
border.top = rowObj.top;
}
}
if (row == range.to.row) {
add++;
if ((0, _object.hasOwnProperty)(rowObj, 'bottom')) {
border.bottom = rowObj.bottom;
}
}
if (col == range.from.col) {
add++;
if ((0, _object.hasOwnProperty)(rowObj, 'left')) {
border.left = rowObj.left;
}
}
if (col == range.to.col) {
add++;
if ((0, _object.hasOwnProperty)(rowObj, 'right')) {
border.right = rowObj.right;
}
}
if (add > 0) {
this.setCellMeta(row, col, 'borders', border);
insertBorderIntoSettings(border);
}
}
}
};
/** *
* Create separated class name for borders for each cell.
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {String}
*/
var createClassName = function createClassName(row, col) {
return 'border_row' + row + 'col' + col;
};
/** *
* Create default single border for each position (top/right/bottom/left).
*
* @returns {Object} `{{width: number, color: string}}`
*/
var createDefaultCustomBorder = function createDefaultCustomBorder() {
return {
width: 1,
color: '#000'
};
};
/** *
* Create default object for empty border.
*
* @returns {Object} `{{hide: boolean}}`
*/
var createSingleEmptyBorder = function createSingleEmptyBorder() {
return {
hide: true
};
};
/** *
* Create default Handsontable border object.
*
* @returns {Object} `{{width: number, color: string, cornerVisible: boolean}}`
*/
var createDefaultHtBorder = function createDefaultHtBorder() {
return {
width: 1,
color: '#000',
cornerVisible: false
};
};
/** *
* Prepare empty border for each cell with all custom borders hidden.
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
* @returns {Object} `{{className: *, border: *, row: *, col: *, top: {hide: boolean}, right: {hide: boolean}, bottom: {hide: boolean}, left: {hide: boolean}}}`
*/
var createEmptyBorders = function createEmptyBorders(row, col) {
return {
className: createClassName(row, col),
border: createDefaultHtBorder(),
row: row,
col: col,
top: createSingleEmptyBorder(),
right: createSingleEmptyBorder(),
bottom: createSingleEmptyBorder(),
left: createSingleEmptyBorder()
};
};
var extendDefaultBorder = function extendDefaultBorder(defaultBorder, customBorder) {
if ((0, _object.hasOwnProperty)(customBorder, 'border')) {
defaultBorder.border = customBorder.border;
}
if ((0, _object.hasOwnProperty)(customBorder, 'top')) {
defaultBorder.top = customBorder.top;
}
if ((0, _object.hasOwnProperty)(customBorder, 'right')) {
defaultBorder.right = customBorder.right;
}
if ((0, _object.hasOwnProperty)(customBorder, 'bottom')) {
defaultBorder.bottom = customBorder.bottom;
}
if ((0, _object.hasOwnProperty)(customBorder, 'left')) {
defaultBorder.left = customBorder.left;
}
return defaultBorder;
};
/**
* Remove borders divs from DOM.
*
* @param borderClassName
*/
var removeBordersFromDom = function removeBordersFromDom(borderClassName) {
var borders = document.querySelectorAll('.' + borderClassName);
for (var i = 0; i < borders.length; i++) {
if (borders[i]) {
if (borders[i].nodeName != 'TD') {
var parent = borders[i].parentNode;
if (parent.parentNode) {
parent.parentNode.removeChild(parent);
}
}
}
}
};
/** *
* Remove border (triggered from context menu).
*
* @param {Number} row Visual row index.
* @param {Number} col Visual column index.
*/
var removeAllBorders = function removeAllBorders(row, col) {
var borderClassName = createClassName(row, col);
removeBordersFromDom(borderClassName);
this.removeCellMeta(row, col, 'borders');
};
/** *
* Set borders for each cell re. to border position
*
* @param row Visual row index.
* @param col Visual column index.
* @param place
* @param remove
*/
var setBorder = function setBorder(row, col, place, remove) {
var bordersMeta = this.getCellMeta(row, col).borders;
if (!bordersMeta || bordersMeta.border == undefined) {
bordersMeta = createEmptyBorders(row, col);
}
if (remove) {
bordersMeta[place] = createSingleEmptyBorder();
} else {
bordersMeta[place] = createDefaultCustomBorder();
}
this.setCellMeta(row, col, 'borders', bordersMeta);
var borderClassName = createClassName(row, col);
removeBordersFromDom(borderClassName);
insertBorderIntoSettings(bordersMeta);
this.render();
};
/** *
* Prepare borders based on cell and border position
*
* @param range
* @param place
* @param remove
*/
var prepareBorder = function prepareBorder(range, place, remove) {
if (range.from.row == range.to.row && range.from.col == range.to.col) {
if (place == 'noBorders') {
removeAllBorders.call(this, range.from.row, range.from.col);
} else {
setBorder.call(this, range.from.row, range.from.col, place, remove);
}
} else {
switch (place) {
case 'noBorders':
for (var column = range.from.col; column <= range.to.col; column++) {
for (var row = range.from.row; row <= range.to.row; row++) {
removeAllBorders.call(this, row, column);
}
}
break;
case 'top':
for (var topCol = range.from.col; topCol <= range.to.col; topCol++) {
setBorder.call(this, range.from.row, topCol, place, remove);
}
break;
case 'right':
for (var rowRight = range.from.row; rowRight <= range.to.row; rowRight++) {
setBorder.call(this, rowRight, range.to.col, place);
}
break;
case 'bottom':
for (var bottomCol = range.from.col; bottomCol <= range.to.col; bottomCol++) {
setBorder.call(this, range.to.row, bottomCol, place);
}
break;
case 'left':
for (var rowLeft = range.from.row; rowLeft <= range.to.row; rowLeft++) {
setBorder.call(this, rowLeft, range.from.col, place);
}
break;
default:
break;
}
}
};
/** *
* Check if selection has border by className
*
* @param hot
* @param direction
*/
var checkSelectionBorders = function checkSelectionBorders(hot, direction) {
var atLeastOneHasBorder = false;
hot.getSelectedRange().forAll(function (r, c) {
var metaBorders = hot.getCellMeta(r, c).borders;
if (metaBorders) {
if (direction) {
if (!(0, _object.hasOwnProperty)(metaBorders[direction], 'hide')) {
atLeastOneHasBorder = true;
return false; // breaks forAll
}
} else {
atLeastOneHasBorder = true;
return false; // breaks forAll
}
}
});
return atLeastOneHasBorder;
};
/** *
* Mark label in contextMenu as selected
*
* @param label
* @returns {string}
*/
var markSelected = function markSelected(label) {
return '<span class="selected">' + String.fromCharCode(10003) + '</span>' + label; // workaround for https://github.com/handsontable/handsontable/issues/1946
};
/** *
* Add border options to context menu
*
* @param defaultOptions
*/
var addBordersOptionsToContextMenu = function addBordersOptionsToContextMenu(defaultOptions) {
if (!this.getSettings().customBorders) {
return;
}
defaultOptions.items.push({
name: '---------'
});
defaultOptions.items.push({
key: 'borders',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS);
},
disabled: function disabled() {
return this.selection.selectedHeader.corner;
},
submenu: {
items: [{
key: 'borders:top',
name: function name() {
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_TOP);
var hasBorder = checkSelectionBorders(this, 'top');
if (hasBorder) {
label = markSelected(label);
}
return label;
},
callback: function callback() {
var hasBorder = checkSelectionBorders(this, 'top');
prepareBorder.call(this, this.getSelectedRange(), 'top', hasBorder);
}
}, {
key: 'borders:right',
name: function name() {
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_RIGHT);
var hasBorder = checkSelectionBorders(this, 'right');
if (hasBorder) {
label = markSelected(label);
}
return label;
},
callback: function callback() {
var hasBorder = checkSelectionBorders(this, 'right');
prepareBorder.call(this, this.getSelectedRange(), 'right', hasBorder);
}
}, {
key: 'borders:bottom',
name: function name() {
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);
var hasBorder = checkSelectionBorders(this, 'bottom');
if (hasBorder) {
label = markSelected(label);
}
return label;
},
callback: function callback() {
var hasBorder = checkSelectionBorders(this, 'bottom');
prepareBorder.call(this, this.getSelectedRange(), 'bottom', hasBorder);
}
}, {
key: 'borders:left',
name: function name() {
var label = this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_BORDERS_LEFT);
var hasBorder = checkSelectionBorders(this, 'left');
if (hasBorder) {
label = markSelected(label);
}
return label;
},
callback: function callback() {
var hasBorder = checkSelectionBorders(this, 'left');
prepareBorder.call(this, this.getSelectedRange(), 'left', hasBorder);
}
}, {
key: 'borders:no_borders',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_REMOVE_BORDERS);
},
callback: function callback() {
prepareBorder.call(this, this.getSelectedRange(), 'noBorders');
},
disabled: function disabled() {
return !checkSelectionBorders(this);
}
}]
}
});
};
_pluginHooks2.default.getSingleton().add('beforeInit', init);
_pluginHooks2.default.getSingleton().add('afterContextMenuDefaultOptions', addBordersOptionsToContextMenu);
_pluginHooks2.default.getSingleton().add('afterInit', function () {
var customBorders = this.getSettings().customBorders;
if (customBorders) {
for (var i = 0; i < customBorders.length; i++) {
if (customBorders[i].range) {
prepareBorderFromCustomAddedRange.call(this, customBorders[i]);
} else {
prepareBorderFromCustomAdded.call(this, customBorders[i].row, customBorders[i].col, customBorders[i]);
}
}
this.render();
this.view.wt.draw(true);
}
});
exports.default = CustomBorders;
/***/ }),
/* 425 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _plugins = __webpack_require__(7);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @description
* Plugin used to scroll Handsontable by selecting a cell and dragging outside of the visible viewport.
*
*
* @class DragToScroll
* @plugin DragToScroll
*/
var DragToScroll = function (_BasePlugin) {
_inherits(DragToScroll, _BasePlugin);
function DragToScroll(hotInstance) {
_classCallCheck(this, DragToScroll);
/**
* Instance of {@link EventManager}.
*
* @type {EventManager}
*/
var _this = _possibleConstructorReturn(this, (DragToScroll.__proto__ || Object.getPrototypeOf(DragToScroll)).call(this, hotInstance));
_this.eventManager = new _eventManager2.default(_this);
/**
* DOMRect - size of an element and its position relative to the viewport,
* e.g. {bottom: 449, height: 441, left: 8, right: 814, top: 8, width: 806, x: 8, y:8}.
*
* @type {Object}
*/
_this.boundaries = null;
/**
* Callback function.
*
* @type {Function}
*/
_this.callback = null;
/**
* Flag indicates mouseDown/mouseUp.
*
* @type {Boolean}
*/
_this.listening = false;
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(DragToScroll, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().dragToScroll;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.addHook('afterOnCellMouseDown', function () {
return _this2.setupListening();
});
this.addHook('afterOnCellCornerMouseDown', function () {
return _this2.setupListening();
});
this.registerEvents();
_get(DragToScroll.prototype.__proto__ || Object.getPrototypeOf(DragToScroll.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(DragToScroll.prototype.__proto__ || Object.getPrototypeOf(DragToScroll.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
this.unregisterEvents();
_get(DragToScroll.prototype.__proto__ || Object.getPrototypeOf(DragToScroll.prototype), 'disablePlugin', this).call(this);
}
/**
* Sets the value of the visible element.
*
* @param boundaries {Object} compatible with getBoundingClientRect
*/
}, {
key: 'setBoundaries',
value: function setBoundaries(boundaries) {
this.boundaries = boundaries;
}
/**
* Change callback function.
*
* @param callback {Function}
*/
}, {
key: 'setCallback',
value: function setCallback(callback) {
this.callback = callback;
}
/**
* Check if mouse position (x, y) is outside of the viewport.
*
* @param {Number} x
* @param {Number} y
*/
}, {
key: 'check',
value: function check(x, y) {
var diffX = 0;
var diffY = 0;
if (y < this.boundaries.top) {
// y is less than top
diffY = y - this.boundaries.top;
} else if (y > this.boundaries.bottom) {
// y is more than bottom
diffY = y - this.boundaries.bottom;
}
if (x < this.boundaries.left) {
// x is less than left
diffX = x - this.boundaries.left;
} else if (x > this.boundaries.right) {
// x is more than right
diffX = x - this.boundaries.right;
}
this.callback(diffX, diffY);
}
/**
* Register dom listeners.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this3 = this;
this.eventManager.addEventListener(document, 'mouseup', function () {
return _this3.onMouseUp();
});
this.eventManager.addEventListener(document, 'mousemove', function (event) {
return _this3.onMouseMove(event);
});
}
/**
* Unbind the events used by the plugin.
*
* @private
*/
}, {
key: 'unregisterEvents',
value: function unregisterEvents() {
this.eventManager.clear();
}
/**
* On after on cell/cellCorner mouse down listener.
*
* @private
*/
}, {
key: 'setupListening',
value: function setupListening() {
var scrollHandler = this.hot.view.wt.wtTable.holder; // native scroll
if (scrollHandler === window) {
// not much we can do currently
return;
}
this.setBoundaries(scrollHandler.getBoundingClientRect());
this.setCallback(function (scrollX, scrollY) {
if (scrollX < 0) {
scrollHandler.scrollLeft -= 50;
} else if (scrollX > 0) {
scrollHandler.scrollLeft += 50;
}
if (scrollY < 0) {
scrollHandler.scrollTop -= 20;
} else if (scrollY > 0) {
scrollHandler.scrollTop += 20;
}
});
this.listening = true;
}
/**
* 'mouseMove' event callback.
*
* @private
* @param {MouseEvent} event `mousemove` event properties.
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
if (this.listening) {
this.check(event.clientX, event.clientY);
}
}
/**
* `onMouseUp` hook callback.
*
* @private
*/
}, {
key: 'onMouseUp',
value: function onMouseUp() {
this.listening = false;
}
/**
* Destroy instance.
*/
}, {
key: 'destroy',
value: function destroy() {
_get(DragToScroll.prototype.__proto__ || Object.getPrototypeOf(DragToScroll.prototype), 'destroy', this).call(this);
}
}]);
return DragToScroll;
}(_base2.default);
(0, _plugins.registerPlugin)('dragToScroll', DragToScroll);
exports.default = DragToScroll;
/***/ }),
/* 426 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _plugins = __webpack_require__(7);
var _array = __webpack_require__(2);
var _freezeColumn = __webpack_require__(427);
var _freezeColumn2 = _interopRequireDefault(_freezeColumn);
var _unfreezeColumn = __webpack_require__(428);
var _unfreezeColumn2 = _interopRequireDefault(_unfreezeColumn);
__webpack_require__(429);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var privatePool = new WeakMap();
/**
* This plugin allows to manually "freeze" and "unfreeze" a column using an entry in the Context Menu.
* You can turn it on by setting a `manualColumnFreeze` property to `true`.
*
* @plugin ManualColumnFreeze
* @dependencies ManualColumnMove
*/
var ManualColumnFreeze = function (_BasePlugin) {
_inherits(ManualColumnFreeze, _BasePlugin);
function ManualColumnFreeze(hotInstance) {
_classCallCheck(this, ManualColumnFreeze);
var _this = _possibleConstructorReturn(this, (ManualColumnFreeze.__proto__ || Object.getPrototypeOf(ManualColumnFreeze)).call(this, hotInstance));
privatePool.set(_this, {
moveByFreeze: false,
afterFirstUse: false
});
/**
* Original column positions
*
* @type {Array}
*/
_this.frozenColumnsBasePositions = [];
/**
* Reference to the `ManualColumnMove` plugin.
*/
_this.manualColumnMovePlugin = void 0;
return _this;
}
/**
* Check if the plugin is enabled in the Handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ManualColumnFreeze, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().manualColumnFreeze;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.addHook('afterContextMenuDefaultOptions', function (options) {
return _this2.addContextMenuEntry(options);
});
this.addHook('afterInit', function () {
return _this2.onAfterInit();
});
this.addHook('beforeColumnMove', function (rows, target) {
return _this2.onBeforeColumnMove(rows, target);
});
_get(ManualColumnFreeze.prototype.__proto__ || Object.getPrototypeOf(ManualColumnFreeze.prototype), 'enablePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
var priv = privatePool.get(this);
priv.afterFirstUse = false;
priv.moveByFreeze = false;
_get(ManualColumnFreeze.prototype.__proto__ || Object.getPrototypeOf(ManualColumnFreeze.prototype), 'disablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
_get(ManualColumnFreeze.prototype.__proto__ || Object.getPrototypeOf(ManualColumnFreeze.prototype), 'updatePlugin', this).call(this);
}
/**
* Freeze the given column (add it to fixed columns).
*
* @param {Number} column Visual column index.
*/
}, {
key: 'freezeColumn',
value: function freezeColumn(column) {
var priv = privatePool.get(this);
var settings = this.hot.getSettings();
if (!priv.afterFirstUse) {
priv.afterFirstUse = true;
}
if (settings.fixedColumnsLeft === this.hot.countCols() || column <= settings.fixedColumnsLeft - 1) {
return; // already fixed
}
priv.moveByFreeze = true;
if (column !== this.getMovePlugin().columnsMapper.getValueByIndex(column)) {
this.frozenColumnsBasePositions[settings.fixedColumnsLeft] = column;
}
this.getMovePlugin().moveColumn(column, settings.fixedColumnsLeft++);
}
/**
* Unfreeze the given column (remove it from fixed columns and bring to it's previous position).
*
* @param {Number} column Visual column index.
*/
}, {
key: 'unfreezeColumn',
value: function unfreezeColumn(column) {
var priv = privatePool.get(this);
var settings = this.hot.getSettings();
if (!priv.afterFirstUse) {
priv.afterFirstUse = true;
}
if (settings.fixedColumnsLeft <= 0 || column > settings.fixedColumnsLeft - 1) {
return; // not fixed
}
var returnCol = this.getBestColumnReturnPosition(column);
priv.moveByFreeze = true;
settings.fixedColumnsLeft--;
this.getMovePlugin().moveColumn(column, returnCol + 1);
}
/**
* Get the reference to the ManualColumnMove plugin.
*
* @private
* @returns {Object}
*/
}, {
key: 'getMovePlugin',
value: function getMovePlugin() {
if (!this.manualColumnMovePlugin) {
this.manualColumnMovePlugin = this.hot.getPlugin('manualColumnMove');
}
return this.manualColumnMovePlugin;
}
/**
* Estimates the most fitting return position for unfrozen column.
*
* @private
* @param {Number} column Visual column index.
*/
}, {
key: 'getBestColumnReturnPosition',
value: function getBestColumnReturnPosition(column) {
var movePlugin = this.getMovePlugin();
var settings = this.hot.getSettings();
var i = settings.fixedColumnsLeft;
var j = movePlugin.columnsMapper.getValueByIndex(i);
var initialCol = void 0;
if (this.frozenColumnsBasePositions[column] == null) {
initialCol = movePlugin.columnsMapper.getValueByIndex(column);
while (j < initialCol) {
i++;
j = movePlugin.columnsMapper.getValueByIndex(i);
}
} else {
initialCol = this.frozenColumnsBasePositions[column];
this.frozenColumnsBasePositions[column] = void 0;
while (j <= initialCol) {
i++;
j = movePlugin.columnsMapper.getValueByIndex(i);
}
i = j;
}
return i - 1;
}
/**
* Add the manualColumnFreeze context menu entries.
*
* @private
* @param {Object} options Context menu options.
*/
}, {
key: 'addContextMenuEntry',
value: function addContextMenuEntry(options) {
options.items.push({ name: '---------' }, (0, _freezeColumn2.default)(this), (0, _unfreezeColumn2.default)(this));
}
/**
* Enabling `manualColumnMove` plugin on `afterInit` hook.
*
* @private
*/
}, {
key: 'onAfterInit',
value: function onAfterInit() {
if (!this.getMovePlugin().isEnabled()) {
this.getMovePlugin().enablePlugin();
}
}
/**
* Prevent moving the rows from/to fixed area.
*
* @private
* @param {Array} rows
* @param {Number} target
*/
}, {
key: 'onBeforeColumnMove',
value: function onBeforeColumnMove(rows, target) {
var priv = privatePool.get(this);
if (priv.afterFirstUse && !priv.moveByFreeze) {
var frozenLen = this.hot.getSettings().fixedColumnsLeft;
var disallowMoving = target < frozenLen;
if (!disallowMoving) {
(0, _array.arrayEach)(rows, function (value, index, array) {
if (value < frozenLen) {
disallowMoving = true;
return false;
}
});
}
if (disallowMoving) {
return false;
}
}
if (priv.moveByFreeze) {
priv.moveByFreeze = false;
}
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
_get(ManualColumnFreeze.prototype.__proto__ || Object.getPrototypeOf(ManualColumnFreeze.prototype), 'destroy', this).call(this);
}
}]);
return ManualColumnFreeze;
}(_base2.default);
(0, _plugins.registerPlugin)('manualColumnFreeze', ManualColumnFreeze);
exports.default = ManualColumnFreeze;
/***/ }),
/* 427 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = freezeColumnItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function freezeColumnItem(manualColumnFreezePlugin) {
return {
key: 'freeze_column',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_FREEZE_COLUMN);
},
callback: function callback() {
var selectedColumn = this.getSelectedRange().from.col;
manualColumnFreezePlugin.freezeColumn(selectedColumn);
this.render();
this.view.wt.wtOverlays.adjustElementsSize(true);
},
hidden: function hidden() {
var selection = this.getSelectedRange();
var hide = false;
if (selection === void 0) {
hide = true;
} else if (selection.from.col !== selection.to.col || selection.from.col <= this.getSettings().fixedColumnsLeft - 1) {
hide = true;
}
return hide;
}
};
}
/***/ }),
/* 428 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = unfreezeColumnItem;
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function unfreezeColumnItem(manualColumnFreezePlugin) {
return {
key: 'unfreeze_column',
name: function name() {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN);
},
callback: function callback() {
var selectedColumn = this.getSelectedRange().from.col;
manualColumnFreezePlugin.unfreezeColumn(selectedColumn);
this.render();
this.view.wt.wtOverlays.adjustElementsSize(true);
},
hidden: function hidden() {
var selection = this.getSelectedRange();
var hide = false;
if (selection === void 0) {
hide = true;
} else if (selection.from.col !== selection.to.col || selection.from.col >= this.getSettings().fixedColumnsLeft) {
hide = true;
}
return hide;
}
};
}
/***/ }),
/* 429 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 430 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _array = __webpack_require__(2);
var _element = __webpack_require__(0);
var _number = __webpack_require__(6);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _plugins = __webpack_require__(7);
var _columnsMapper = __webpack_require__(431);
var _columnsMapper2 = _interopRequireDefault(_columnsMapper);
var _backlight = __webpack_require__(432);
var _backlight2 = _interopRequireDefault(_backlight);
var _guideline = __webpack_require__(433);
var _guideline2 = _interopRequireDefault(_guideline);
var _src = __webpack_require__(15);
__webpack_require__(434);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('beforeColumnMove');
_pluginHooks2.default.getSingleton().register('afterColumnMove');
_pluginHooks2.default.getSingleton().register('unmodifyCol');
var privatePool = new WeakMap();
var CSS_PLUGIN = 'ht__manualColumnMove';
var CSS_SHOW_UI = 'show-ui';
var CSS_ON_MOVING = 'on-moving--columns';
var CSS_AFTER_SELECTION = 'after-selection--columns';
/**
* @plugin ManualColumnMove
*
* @description
* This plugin allows to change columns order.
*
* API:
* - moveColumn - move single column to the new position.
* - moveColumns - move many columns (as an array of indexes) to the new position.
*
* If you want apply visual changes, you have to call manually the render() method on the instance of Handsontable.
*
* UI components:
* - backlight - highlight of selected columns.
* - guideline - line which shows where rows has been moved.
*
* @class ManualColumnMove
* @plugin ManualColumnMove
*/
var ManualColumnMove = function (_BasePlugin) {
_inherits(ManualColumnMove, _BasePlugin);
function ManualColumnMove(hotInstance) {
_classCallCheck(this, ManualColumnMove);
/**
* Set up WeakMap of plugin to sharing private parameters;
*/
var _this = _possibleConstructorReturn(this, (ManualColumnMove.__proto__ || Object.getPrototypeOf(ManualColumnMove)).call(this, hotInstance));
privatePool.set(_this, {
columnsToMove: [],
countCols: 0,
fixedColumns: 0,
pressed: void 0,
disallowMoving: void 0,
target: {
eventPageX: void 0,
coords: void 0,
TD: void 0,
col: void 0
}
});
/**
* List of last removed row indexes.
*
* @type {Array}
*/
_this.removedColumns = [];
/**
* Object containing visual row indexes mapped to data source indexes.
*
* @type {RowsMapper}
*/
_this.columnsMapper = new _columnsMapper2.default(_this);
/**
* Event Manager object.
*
* @type {Object}
*/
_this.eventManager = new _eventManager2.default(_this);
/**
* Backlight UI object.
*
* @type {Object}
*/
_this.backlight = new _backlight2.default(hotInstance);
/**
* Guideline UI object.
*
* @type {Object}
*/
_this.guideline = new _guideline2.default(hotInstance);
return _this;
}
/**
* Check if plugin is enabled.
*
* @returns {Boolean}
*/
_createClass(ManualColumnMove, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().manualColumnMove;
}
/**
* Enable the plugin.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.addHook('beforeOnCellMouseDown', function (event, coords, TD, blockCalculations) {
return _this2.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations);
});
this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) {
return _this2.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations);
});
this.addHook('afterScrollVertically', function () {
return _this2.onAfterScrollVertically();
});
this.addHook('modifyCol', function (row, source) {
return _this2.onModifyCol(row, source);
});
this.addHook('beforeRemoveCol', function (index, amount) {
return _this2.onBeforeRemoveCol(index, amount);
});
this.addHook('afterRemoveCol', function () {
return _this2.onAfterRemoveCol();
});
this.addHook('afterCreateCol', function (index, amount) {
return _this2.onAfterCreateCol(index, amount);
});
this.addHook('afterLoadData', function () {
return _this2.onAfterLoadData();
});
this.addHook('unmodifyCol', function (column) {
return _this2.onUnmodifyCol(column);
});
this.registerEvents();
// TODO: move adding plugin classname to BasePlugin.
(0, _element.addClass)(this.hot.rootElement, CSS_PLUGIN);
_get(ManualColumnMove.prototype.__proto__ || Object.getPrototypeOf(ManualColumnMove.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
this.onAfterPluginsInitialized();
_get(ManualColumnMove.prototype.__proto__ || Object.getPrototypeOf(ManualColumnMove.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
var pluginSettings = this.hot.getSettings().manualColumnMove;
if (Array.isArray(pluginSettings)) {
this.columnsMapper.clearMap();
}
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
this.unregisterEvents();
this.backlight.destroy();
this.guideline.destroy();
_get(ManualColumnMove.prototype.__proto__ || Object.getPrototypeOf(ManualColumnMove.prototype), 'disablePlugin', this).call(this);
}
/**
* Move a single column.
*
* @param {Number} column Visual column index to be moved.
* @param {Number} target Visual column index being a target for the moved column.
*/
}, {
key: 'moveColumn',
value: function moveColumn(column, target) {
this.moveColumns([column], target);
}
/**
* Move multiple columns.
*
* @param {Array} columns Array of visual column indexes to be moved.
* @param {Number} target Visual column index being a target for the moved columns.
*/
}, {
key: 'moveColumns',
value: function moveColumns(columns, target) {
var _this3 = this;
var priv = privatePool.get(this);
var beforeColumnHook = this.hot.runHooks('beforeColumnMove', columns, target);
priv.disallowMoving = !beforeColumnHook;
if (beforeColumnHook !== false) {
// first we need to rewrite an visual indexes to physical for save reference after move
(0, _array.arrayEach)(columns, function (column, index, array) {
array[index] = _this3.columnsMapper.getValueByIndex(column);
});
// next, when we have got an physical indexes, we can move columns
(0, _array.arrayEach)(columns, function (column, index) {
var actualPosition = _this3.columnsMapper.getIndexByValue(column);
if (actualPosition !== target) {
_this3.columnsMapper.moveColumn(actualPosition, target + index);
}
});
// after moving we have to clear columnsMapper from null entries
this.columnsMapper.clearNull();
}
this.hot.runHooks('afterColumnMove', columns, target);
}
/**
* Correct the cell selection after the move action. Fired only when action was made with a mouse.
* That means that changing the column order using the API won't correct the selection.
*
* @private
* @param {Number} startColumn Visual column index for the start of the selection.
* @param {Number} endColumn Visual column index for the end of the selection.
*/
}, {
key: 'changeSelection',
value: function changeSelection(startColumn, endColumn) {
var selection = this.hot.selection;
var lastRowIndex = this.hot.countRows() - 1;
selection.setRangeStartOnly(new _src.CellCoords(0, startColumn));
selection.setRangeEnd(new _src.CellCoords(lastRowIndex, endColumn), false);
}
/**
* Get the sum of the widths of columns in the provided range.
*
* @private
* @param {Number} from Visual column index.
* @param {Number} to Visual column index.
* @returns {Number}
*/
}, {
key: 'getColumnsWidth',
value: function getColumnsWidth(from, to) {
var width = 0;
for (var i = from; i < to; i++) {
var columnWidth = 0;
if (i < 0) {
columnWidth = this.hot.view.wt.wtViewport.getRowHeaderWidth() || 0;
} else {
columnWidth = this.hot.view.wt.wtTable.getStretchedColumnWidth(i) || 0;
}
width += columnWidth;
}
return width;
}
/**
* Load initial settings when persistent state is saved or when plugin was initialized as an array.
*
* @private
*/
}, {
key: 'initialSettings',
value: function initialSettings() {
var pluginSettings = this.hot.getSettings().manualColumnMove;
if (Array.isArray(pluginSettings)) {
this.moveColumns(pluginSettings, 0);
} else if (pluginSettings !== void 0) {
this.persistentStateLoad();
}
}
/**
* Check if the provided column is in the fixedColumnsLeft section.
*
* @private
* @param {Number} column Visual column index to check.
* @returns {Boolean}
*/
}, {
key: 'isFixedColumnsLeft',
value: function isFixedColumnsLeft(column) {
return column < this.hot.getSettings().fixedColumnsLeft;
}
/**
* Save the manual column positions to the persistent state.
*
* @private
*/
}, {
key: 'persistentStateSave',
value: function persistentStateSave() {
this.hot.runHooks('persistentStateSave', 'manualColumnMove', this.columnsMapper._arrayMap);
}
/**
* Load the manual column positions from the persistent state.
*
* @private
*/
}, {
key: 'persistentStateLoad',
value: function persistentStateLoad() {
var storedState = {};
this.hot.runHooks('persistentStateLoad', 'manualColumnMove', storedState);
if (storedState.value) {
this.columnsMapper._arrayMap = storedState.value;
}
}
/**
* Prepare array of indexes based on actual selection.
*
* @private
* @returns {Array}
*/
}, {
key: 'prepareColumnsToMoving',
value: function prepareColumnsToMoving(start, end) {
var selectedColumns = [];
(0, _number.rangeEach)(start, end, function (i) {
selectedColumns.push(i);
});
return selectedColumns;
}
/**
* Update the UI visual position.
*
* @private
*/
}, {
key: 'refreshPositions',
value: function refreshPositions() {
var priv = privatePool.get(this);
var firstVisible = this.hot.view.wt.wtTable.getFirstVisibleColumn();
var lastVisible = this.hot.view.wt.wtTable.getLastVisibleColumn();
var wtTable = this.hot.view.wt.wtTable;
var scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;
var scrollLeft = typeof scrollableElement.scrollX === 'number' ? scrollableElement.scrollX : scrollableElement.scrollLeft;
var tdOffsetLeft = this.hot.view.THEAD.offsetLeft + this.getColumnsWidth(0, priv.coordsColumn);
var mouseOffsetLeft = priv.target.eventPageX - (priv.rootElementOffset - (scrollableElement.scrollX === void 0 ? scrollLeft : 0));
var hiderWidth = wtTable.hider.offsetWidth;
var tbodyOffsetLeft = wtTable.TBODY.offsetLeft;
var backlightElemMarginLeft = this.backlight.getOffset().left;
var backlightElemWidth = this.backlight.getSize().width;
var rowHeaderWidth = 0;
if (priv.rootElementOffset + wtTable.holder.offsetWidth + scrollLeft < priv.target.eventPageX) {
if (priv.coordsColumn < priv.countCols) {
priv.coordsColumn++;
}
}
if (priv.hasRowHeaders) {
rowHeaderWidth = this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth;
}
if (this.isFixedColumnsLeft(priv.coordsColumn)) {
tdOffsetLeft += scrollLeft;
}
tdOffsetLeft += rowHeaderWidth;
if (priv.coordsColumn < 0) {
// if hover on rowHeader
if (priv.fixedColumns > 0) {
priv.target.col = 0;
} else {
priv.target.col = firstVisible > 0 ? firstVisible - 1 : firstVisible;
}
} else if (priv.target.TD.offsetWidth / 2 + tdOffsetLeft <= mouseOffsetLeft) {
var newCoordsCol = priv.coordsColumn >= priv.countCols ? priv.countCols - 1 : priv.coordsColumn;
// if hover on right part of TD
priv.target.col = newCoordsCol + 1;
// unfortunately first column is bigger than rest
tdOffsetLeft += priv.target.TD.offsetWidth;
if (priv.target.col > lastVisible) {
this.hot.scrollViewportTo(void 0, lastVisible + 1, void 0, true);
}
} else {
// elsewhere on table
priv.target.col = priv.coordsColumn;
if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns) {
this.hot.scrollViewportTo(void 0, firstVisible - 1);
}
}
if (priv.target.col <= firstVisible && priv.target.col >= priv.fixedColumns) {
this.hot.scrollViewportTo(void 0, firstVisible - 1);
}
var backlightLeft = mouseOffsetLeft;
var guidelineLeft = tdOffsetLeft;
if (mouseOffsetLeft + backlightElemWidth + backlightElemMarginLeft >= hiderWidth) {
// prevent display backlight on the right side of the table
backlightLeft = hiderWidth - backlightElemWidth - backlightElemMarginLeft;
} else if (mouseOffsetLeft + backlightElemMarginLeft < tbodyOffsetLeft + rowHeaderWidth) {
// prevent display backlight on the left side of the table
backlightLeft = tbodyOffsetLeft + rowHeaderWidth + Math.abs(backlightElemMarginLeft);
}
if (tdOffsetLeft >= hiderWidth - 1) {
// prevent display guideline outside the table
guidelineLeft = hiderWidth - 1;
} else if (guidelineLeft === 0) {
// guideline has got `margin-left: -1px` as default
guidelineLeft = 1;
} else if (scrollableElement.scrollX !== void 0 && priv.coordsColumn < priv.fixedColumns) {
guidelineLeft -= priv.rootElementOffset <= scrollableElement.scrollX ? priv.rootElementOffset : 0;
}
this.backlight.setPosition(null, backlightLeft);
this.guideline.setPosition(null, guidelineLeft);
}
/**
* This method checks arrayMap from columnsMapper and updates the columnsMapper if it's necessary.
*
* @private
*/
}, {
key: 'updateColumnsMapper',
value: function updateColumnsMapper() {
var countCols = this.hot.countSourceCols();
var columnsMapperLen = this.columnsMapper._arrayMap.length;
if (columnsMapperLen === 0) {
this.columnsMapper.createMap(countCols || this.hot.getSettings().startCols);
} else if (columnsMapperLen < countCols) {
var diff = countCols - columnsMapperLen;
this.columnsMapper.insertItems(columnsMapperLen, diff);
} else if (columnsMapperLen > countCols) {
var maxIndex = countCols - 1;
var columnsToRemove = [];
(0, _array.arrayEach)(this.columnsMapper._arrayMap, function (value, index) {
if (value > maxIndex) {
columnsToRemove.push(index);
}
});
this.columnsMapper.removeItems(columnsToRemove);
}
}
/**
* Bind the events used by the plugin.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this4 = this;
this.eventManager.addEventListener(document.documentElement, 'mousemove', function (event) {
return _this4.onMouseMove(event);
});
this.eventManager.addEventListener(document.documentElement, 'mouseup', function () {
return _this4.onMouseUp();
});
}
/**
* Unbind the events used by the plugin.
*
* @private
*/
}, {
key: 'unregisterEvents',
value: function unregisterEvents() {
this.eventManager.clear();
}
/**
* Change the behavior of selection / dragging.
*
* @private
* @param {MouseEvent} event `mousedown` event properties.
* @param {CellCoords} coords Visual cell coordinates where was fired event.
* @param {HTMLElement} TD Cell represented as HTMLElement.
* @param {Object} blockCalculations Object which contains information about blockCalculation for row, column or cells.
*/
}, {
key: 'onBeforeOnCellMouseDown',
value: function onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {
var wtTable = this.hot.view.wt.wtTable;
var isHeaderSelection = this.hot.selection.selectedHeader.cols;
var selection = this.hot.getSelectedRange();
var priv = privatePool.get(this);
var isSortingElement = event.realTarget.className.indexOf('columnSorting') > -1;
if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0 || isSortingElement) {
priv.pressed = false;
priv.columnsToMove.length = 0;
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
return;
}
var guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();
var backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();
if (guidelineIsNotReady && backlightIsNotReady) {
this.guideline.appendTo(wtTable.hider);
this.backlight.appendTo(wtTable.hider);
}
var from = selection.from,
to = selection.to;
var start = Math.min(from.col, to.col);
var end = Math.max(from.col, to.col);
if (coords.row < 0 && coords.col >= start && coords.col <= end) {
blockCalculations.column = true;
priv.pressed = true;
priv.target.eventPageX = event.pageX;
priv.coordsColumn = coords.col;
priv.target.TD = TD;
priv.target.col = coords.col;
priv.columnsToMove = this.prepareColumnsToMoving(start, end);
priv.hasRowHeaders = !!this.hot.getSettings().rowHeaders;
priv.countCols = this.hot.countCols();
priv.fixedColumns = this.hot.getSettings().fixedColumnsLeft;
priv.rootElementOffset = (0, _element.offset)(this.hot.rootElement).left;
var countColumnsFrom = priv.hasRowHeaders ? -1 : 0;
var topPos = wtTable.holder.scrollTop + wtTable.getColumnHeaderHeight(0) + 1;
var fixedColumns = coords.col < priv.fixedColumns;
var scrollableElement = this.hot.view.wt.wtOverlays.scrollableElement;
var wrapperIsWindow = scrollableElement.scrollX ? scrollableElement.scrollX - priv.rootElementOffset : 0;
var mouseOffset = event.layerX - (fixedColumns ? wrapperIsWindow : 0);
var leftOffset = Math.abs(this.getColumnsWidth(start, coords.col) + mouseOffset);
this.backlight.setPosition(topPos, this.getColumnsWidth(countColumnsFrom, start) + leftOffset);
this.backlight.setSize(this.getColumnsWidth(start, end + 1), wtTable.hider.offsetHeight - topPos);
this.backlight.setOffset(null, leftOffset * -1);
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
} else {
(0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
priv.pressed = false;
priv.columnsToMove.length = 0;
}
}
/**
* 'mouseMove' event callback. Fired when pointer move on document.documentElement.
*
* @private
* @param {MouseEvent} event `mousemove` event properties.
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
var priv = privatePool.get(this);
if (!priv.pressed) {
return;
}
// callback for browser which doesn't supports CSS pointer-event: none
if (event.realTarget === this.backlight.element) {
var width = this.backlight.getSize().width;
this.backlight.setSize(0);
setTimeout(function () {
this.backlight.setPosition(width);
});
}
priv.target.eventPageX = event.pageX;
this.refreshPositions();
}
/**
* 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.
*
* @private
* @param {MouseEvent} event `mouseover` event properties.
* @param {CellCoords} coords Visual cell coordinates where was fired event.
* @param {HTMLElement} TD Cell represented as HTMLElement.
* @param {Object} blockCalculations Object which contains information about blockCalculation for row, column or cells.
*/
}, {
key: 'onBeforeOnCellMouseOver',
value: function onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {
var selectedRange = this.hot.getSelectedRange();
var priv = privatePool.get(this);
if (!selectedRange || !priv.pressed) {
return;
}
if (priv.columnsToMove.indexOf(coords.col) > -1) {
(0, _element.removeClass)(this.hot.rootElement, CSS_SHOW_UI);
} else {
(0, _element.addClass)(this.hot.rootElement, CSS_SHOW_UI);
}
blockCalculations.row = true;
blockCalculations.column = true;
blockCalculations.cell = true;
priv.coordsColumn = coords.col;
priv.target.TD = TD;
}
/**
* `onMouseUp` hook callback.
*
* @private
*/
}, {
key: 'onMouseUp',
value: function onMouseUp() {
var priv = privatePool.get(this);
priv.coordsColumn = void 0;
priv.pressed = false;
priv.backlightWidth = 0;
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);
if (this.hot.selection.selectedHeader.cols) {
(0, _element.addClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
}
if (priv.columnsToMove.length < 1 || priv.target.col === void 0 || priv.columnsToMove.indexOf(priv.target.col) > -1) {
return;
}
this.moveColumns(priv.columnsToMove, priv.target.col);
this.persistentStateSave();
this.hot.render();
this.hot.view.wt.wtOverlays.adjustElementsSize(true);
if (!priv.disallowMoving) {
var selectionStart = this.columnsMapper.getIndexByValue(priv.columnsToMove[0]);
var selectionEnd = this.columnsMapper.getIndexByValue(priv.columnsToMove[priv.columnsToMove.length - 1]);
this.changeSelection(selectionStart, selectionEnd);
}
priv.columnsToMove.length = 0;
}
/**
* `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.
*
* @private
*/
}, {
key: 'onAfterScrollVertically',
value: function onAfterScrollVertically() {
var wtTable = this.hot.view.wt.wtTable;
var headerHeight = wtTable.getColumnHeaderHeight(0) + 1;
var scrollTop = wtTable.holder.scrollTop;
var posTop = headerHeight + scrollTop;
this.backlight.setPosition(posTop);
this.backlight.setSize(null, wtTable.hider.offsetHeight - posTop);
}
/**
* `afterCreateCol` hook callback.
*
* @private
* @param {Number} index Visual index of the created column.
* @param {Number} amount Amount of created columns.
*/
}, {
key: 'onAfterCreateCol',
value: function onAfterCreateCol(index, amount) {
this.columnsMapper.shiftItems(index, amount);
}
/**
* On before remove column listener.
*
* @private
* @param {Number} index Visual column index.
* @param {Number} amount Defines how many columns removed.
*/
}, {
key: 'onBeforeRemoveCol',
value: function onBeforeRemoveCol(index, amount) {
var _this5 = this;
this.removedColumns.length = 0;
if (index !== false) {
// Collect physical row index.
(0, _number.rangeEach)(index, index + amount - 1, function (removedIndex) {
_this5.removedColumns.push(_this5.hot.runHooks('modifyCol', removedIndex, _this5.pluginName));
});
}
}
/**
* `afterRemoveCol` hook callback.
*
* @private
*/
}, {
key: 'onAfterRemoveCol',
value: function onAfterRemoveCol() {
this.columnsMapper.unshiftItems(this.removedColumns);
}
/**
* `afterLoadData` hook callback.
*
* @private
*/
}, {
key: 'onAfterLoadData',
value: function onAfterLoadData() {
this.updateColumnsMapper();
}
/**
* 'modifyRow' hook callback.
*
* @private
* @param {Number} column Visual column index.
* @returns {Number} Physical column index.
*/
}, {
key: 'onModifyCol',
value: function onModifyCol(column, source) {
if (source !== this.pluginName) {
// ugly fix for try to insert new, needed columns after pasting data
var columnInMapper = this.columnsMapper.getValueByIndex(column);
column = columnInMapper === null ? column : columnInMapper;
}
return column;
}
/**
* 'unmodifyCol' hook callback.
*
* @private
* @param {Number} column Physical column index.
* @returns {Number} Visual column index.
*/
}, {
key: 'onUnmodifyCol',
value: function onUnmodifyCol(column) {
var indexInMapper = this.columnsMapper.getIndexByValue(column);
return indexInMapper === null ? column : indexInMapper;
}
/**
* `afterPluginsInitialized` hook callback.
*
* @private
*/
}, {
key: 'onAfterPluginsInitialized',
value: function onAfterPluginsInitialized() {
this.updateColumnsMapper();
this.initialSettings();
this.backlight.build();
this.guideline.build();
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.backlight.destroy();
this.guideline.destroy();
_get(ManualColumnMove.prototype.__proto__ || Object.getPrototypeOf(ManualColumnMove.prototype), 'destroy', this).call(this);
}
}]);
return ManualColumnMove;
}(_base2.default);
(0, _plugins.registerPlugin)('ManualColumnMove', ManualColumnMove);
exports.default = ManualColumnMove;
/***/ }),
/* 431 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _arrayMapper = __webpack_require__(314);
var _arrayMapper2 = _interopRequireDefault(_arrayMapper);
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class ColumnsMapper
* @plugin ManualColumnMove
*/
var ColumnsMapper = function () {
function ColumnsMapper(manualColumnMove) {
_classCallCheck(this, ColumnsMapper);
/**
* Instance of ManualColumnMove plugin.
*
* @type {ManualColumnMove}
*/
this.manualColumnMove = manualColumnMove;
}
/**
* Reset current map array and create new one.
*
* @param {Number} [length] Custom generated map length.
*/
_createClass(ColumnsMapper, [{
key: 'createMap',
value: function createMap(length) {
var _this = this;
var originLength = length === void 0 ? this._arrayMap.length : length;
this._arrayMap.length = 0;
(0, _number.rangeEach)(originLength - 1, function (itemIndex) {
_this._arrayMap[itemIndex] = itemIndex;
});
}
/**
* Destroy class.
*/
}, {
key: 'destroy',
value: function destroy() {
this._arrayMap = null;
}
/**
* Moving elements in columnsMapper.
*
* @param {Number} from Column index to move.
* @param {Number} to Target index.
*/
}, {
key: 'moveColumn',
value: function moveColumn(from, to) {
var indexToMove = this._arrayMap[from];
this._arrayMap[from] = null;
this._arrayMap.splice(to, 0, indexToMove);
}
/**
* Clearing arrayMap from `null` entries.
*/
}, {
key: 'clearNull',
value: function clearNull() {
this._arrayMap = (0, _array.arrayFilter)(this._arrayMap, function (i) {
return i !== null;
});
}
}]);
return ColumnsMapper;
}();
(0, _object.mixin)(ColumnsMapper, _arrayMapper2.default);
exports.default = ColumnsMapper;
/***/ }),
/* 432 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(315);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CSS_CLASSNAME = 'ht__manualColumnMove--backlight';
/**
* @class BacklightUI
* @util
*/
var BacklightUI = function (_BaseUI) {
_inherits(BacklightUI, _BaseUI);
function BacklightUI() {
_classCallCheck(this, BacklightUI);
return _possibleConstructorReturn(this, (BacklightUI.__proto__ || Object.getPrototypeOf(BacklightUI)).apply(this, arguments));
}
_createClass(BacklightUI, [{
key: 'build',
/**
* Custom className on build process.
*/
value: function build() {
_get(BacklightUI.prototype.__proto__ || Object.getPrototypeOf(BacklightUI.prototype), 'build', this).call(this);
(0, _element.addClass)(this._element, CSS_CLASSNAME);
}
}]);
return BacklightUI;
}(_base2.default);
exports.default = BacklightUI;
/***/ }),
/* 433 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(315);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CSS_CLASSNAME = 'ht__manualColumnMove--guideline';
/**
* @class GuidelineUI
* @util
*/
var GuidelineUI = function (_BaseUI) {
_inherits(GuidelineUI, _BaseUI);
function GuidelineUI() {
_classCallCheck(this, GuidelineUI);
return _possibleConstructorReturn(this, (GuidelineUI.__proto__ || Object.getPrototypeOf(GuidelineUI)).apply(this, arguments));
}
_createClass(GuidelineUI, [{
key: 'build',
/**
* Custom className on build process.
*/
value: function build() {
_get(GuidelineUI.prototype.__proto__ || Object.getPrototypeOf(GuidelineUI.prototype), 'build', this).call(this);
(0, _element.addClass)(this._element, CSS_CLASSNAME);
}
}]);
return GuidelineUI;
}(_base2.default);
exports.default = GuidelineUI;
/***/ }),
/* 434 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 435 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _event = __webpack_require__(12);
var _array = __webpack_require__(2);
var _number = __webpack_require__(6);
var _plugins = __webpack_require__(7);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// Developer note! Whenever you make a change in this file, make an analogous change in manualRowResize.js
/**
* @description
* ManualColumnResize Plugin.
*
* Has 2 UI components:
* - handle - the draggable element that sets the desired width of the column.
* - guide - the helper guide that shows the desired width as a vertical guide.
*
* @plugin ManualColumnResize
*/
var ManualColumnResize = function (_BasePlugin) {
_inherits(ManualColumnResize, _BasePlugin);
function ManualColumnResize(hotInstance) {
_classCallCheck(this, ManualColumnResize);
var _this = _possibleConstructorReturn(this, (ManualColumnResize.__proto__ || Object.getPrototypeOf(ManualColumnResize)).call(this, hotInstance));
_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 = new _eventManager2.default(_this);
_this.pressed = null;
_this.dblclick = 0;
_this.autoresizeTimeout = null;
_this.manualColumnWidths = [];
(0, _element.addClass)(_this.handle, 'manualColumnResizer');
(0, _element.addClass)(_this.guide, 'manualColumnResizerGuide');
return _this;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ManualColumnResize, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().manualColumnResize;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.manualColumnWidths = [];
var initialColumnWidth = this.hot.getSettings().manualColumnResize;
var loadedManualColumnWidths = this.loadManualColumnWidths();
this.addHook('modifyColWidth', function (width, col) {
return _this2.onModifyColWidth(width, col);
});
this.addHook('beforeStretchingColumnWidth', function (stretchedWidth, column) {
return _this2.onBeforeStretchingColumnWidth(stretchedWidth, column);
});
this.addHook('beforeColumnResize', function (currentColumn, newSize, isDoubleClick) {
return _this2.onBeforeColumnResize(currentColumn, newSize, isDoubleClick);
});
if (typeof loadedManualColumnWidths != 'undefined') {
this.manualColumnWidths = loadedManualColumnWidths;
} else if (Array.isArray(initialColumnWidth)) {
this.manualColumnWidths = initialColumnWidth;
} else {
this.manualColumnWidths = [];
}
// Handsontable.hooks.register('beforeColumnResize');
// Handsontable.hooks.register('afterColumnResize');
this.bindEvents();
_get(ManualColumnResize.prototype.__proto__ || Object.getPrototypeOf(ManualColumnResize.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
var initialColumnWidth = this.hot.getSettings().manualColumnResize;
if (Array.isArray(initialColumnWidth)) {
this.manualColumnWidths = initialColumnWidth;
} else if (!initialColumnWidth) {
this.manualColumnWidths = [];
}
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(ManualColumnResize.prototype.__proto__ || Object.getPrototypeOf(ManualColumnResize.prototype), 'disablePlugin', this).call(this);
}
/**
* Save the current sizes using the persistentState plugin.
*/
}, {
key: 'saveManualColumnWidths',
value: function saveManualColumnWidths() {
this.hot.runHooks('persistentStateSave', 'manualColumnWidths', this.manualColumnWidths);
}
/**
* Load the previously saved sizes using the persistentState plugin.
*
* @returns {Array}
*/
}, {
key: 'loadManualColumnWidths',
value: function loadManualColumnWidths() {
var storedState = {};
this.hot.runHooks('persistentStateLoad', 'manualColumnWidths', storedState);
return storedState.value;
}
/**
* Set the resize handle position.
*
* @param {HTMLCellElement} TH TH HTML element.
*/
}, {
key: 'setupHandlePosition',
value: function setupHandlePosition(TH) {
var _this3 = this;
if (!TH.parentNode) {
return false;
}
this.currentTH = TH;
var col = this.hot.view.wt.wtTable.getCoords(TH).col; // getCoords returns CellCoords
var headerHeight = (0, _element.outerHeight)(this.currentTH);
if (col >= 0) {
// if not col header
var box = this.currentTH.getBoundingClientRect();
this.currentCol = col;
this.selectedCols = [];
if (this.hot.selection.isSelected() && this.hot.selection.selectedHeader.cols) {
var _hot$getSelectedRange = this.hot.getSelectedRange(),
from = _hot$getSelectedRange.from,
to = _hot$getSelectedRange.to;
var start = from.col;
var end = to.col;
if (start >= end) {
start = to.col;
end = from.col;
}
if (this.currentCol >= start && this.currentCol <= end) {
(0, _number.rangeEach)(start, end, function (i) {
return _this3.selectedCols.push(i);
});
} else {
this.selectedCols.push(this.currentCol);
}
} else {
this.selectedCols.push(this.currentCol);
}
this.startOffset = box.left - 6;
this.startWidth = parseInt(box.width, 10);
this.handle.style.top = box.top + 'px';
this.handle.style.left = this.startOffset + this.startWidth + 'px';
this.handle.style.height = headerHeight + 'px';
this.hot.rootElement.appendChild(this.handle);
}
}
/**
* Refresh the resize handle position.
*/
}, {
key: 'refreshHandlePosition',
value: function refreshHandlePosition() {
this.handle.style.left = this.startOffset + this.currentWidth + 'px';
}
/**
* Set the resize guide position.
*/
}, {
key: 'setupGuidePosition',
value: function setupGuidePosition() {
var handleHeight = parseInt((0, _element.outerHeight)(this.handle), 10);
var handleBottomPosition = parseInt(this.handle.style.top, 10) + handleHeight;
var maximumVisibleElementHeight = parseInt(this.hot.view.maximumVisibleElementHeight(0), 10);
(0, _element.addClass)(this.handle, 'active');
(0, _element.addClass)(this.guide, 'active');
this.guide.style.top = handleBottomPosition + 'px';
this.guide.style.left = this.handle.style.left;
this.guide.style.height = maximumVisibleElementHeight - handleHeight + 'px';
this.hot.rootElement.appendChild(this.guide);
}
/**
* Refresh the resize guide position.
*/
}, {
key: 'refreshGuidePosition',
value: function refreshGuidePosition() {
this.guide.style.left = this.handle.style.left;
}
/**
* Hide both the resize handle and resize guide.
*/
}, {
key: 'hideHandleAndGuide',
value: function hideHandleAndGuide() {
(0, _element.removeClass)(this.handle, 'active');
(0, _element.removeClass)(this.guide, 'active');
}
/**
* Check if provided element is considered a column header.
*
* @param {HTMLElement} element HTML element.
* @returns {Boolean}
*/
}, {
key: 'checkIfColumnHeader',
value: function checkIfColumnHeader(element) {
if (element != this.hot.rootElement) {
var parent = element.parentNode;
if (parent.tagName === 'THEAD') {
return true;
}
return this.checkIfColumnHeader(parent);
}
return false;
}
/**
* Get the TH element from the provided element.
*
* @param {HTMLElement} element HTML element.
* @returns {HTMLElement}
*/
}, {
key: 'getTHFromTargetElement',
value: function getTHFromTargetElement(element) {
if (element.tagName != 'TABLE') {
if (element.tagName == 'TH') {
return element;
}
return this.getTHFromTargetElement(element.parentNode);
}
return null;
}
/**
* 'mouseover' event callback - set the handle position.
*
* @private
* @param {MouseEvent} event
*/
}, {
key: 'onMouseOver',
value: function onMouseOver(event) {
if (this.checkIfColumnHeader(event.target)) {
var th = this.getTHFromTargetElement(event.target);
if (!th) {
return;
}
var colspan = th.getAttribute('colspan');
if (th && (colspan === null || colspan === 1)) {
if (!this.pressed) {
this.setupHandlePosition(th);
}
}
}
}
/**
* Auto-size row after doubleclick - callback.
*
* @private
*/
}, {
key: 'afterMouseDownTimeout',
value: function afterMouseDownTimeout() {
var _this4 = this;
var render = function render() {
_this4.hot.forceFullRender = true;
_this4.hot.view.render(); // updates all
_this4.hot.view.wt.wtOverlays.adjustElementsSize(true);
};
var resize = function resize(selectedCol, forceRender) {
var hookNewSize = _this4.hot.runHooks('beforeColumnResize', selectedCol, _this4.newSize, true);
if (hookNewSize !== void 0) {
_this4.newSize = hookNewSize;
}
if (_this4.hot.getSettings().stretchH === 'all') {
_this4.clearManualSize(selectedCol);
} else {
_this4.setManualSize(selectedCol, _this4.newSize); // double click sets by auto row size plugin
}
if (forceRender) {
render();
}
_this4.saveManualColumnWidths();
_this4.hot.runHooks('afterColumnResize', selectedCol, _this4.newSize, true);
};
if (this.dblclick >= 2) {
var selectedColsLength = this.selectedCols.length;
if (selectedColsLength > 1) {
(0, _array.arrayEach)(this.selectedCols, function (selectedCol) {
resize(selectedCol);
});
render();
} else {
(0, _array.arrayEach)(this.selectedCols, function (selectedCol) {
resize(selectedCol, true);
});
}
}
this.dblclick = 0;
this.autoresizeTimeout = null;
}
/**
* 'mousedown' event callback.
*
* @private
* @param {MouseEvent} e
*/
}, {
key: 'onMouseDown',
value: function onMouseDown(event) {
var _this5 = this;
if ((0, _element.hasClass)(event.target, 'manualColumnResizer')) {
this.setupGuidePosition();
this.pressed = this.hot;
if (this.autoresizeTimeout === null) {
this.autoresizeTimeout = setTimeout(function () {
return _this5.afterMouseDownTimeout();
}, 500);
this.hot._registerTimeout(this.autoresizeTimeout);
}
this.dblclick++;
this.startX = (0, _event.pageX)(event);
this.newSize = this.startWidth;
}
}
/**
* 'mousemove' event callback - refresh the handle and guide positions, cache the new column width.
*
* @private
* @param {MouseEvent} e
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
var _this6 = this;
if (this.pressed) {
this.currentWidth = this.startWidth + ((0, _event.pageX)(event) - this.startX);
(0, _array.arrayEach)(this.selectedCols, function (selectedCol) {
_this6.newSize = _this6.setManualSize(selectedCol, _this6.currentWidth);
});
this.refreshHandlePosition();
this.refreshGuidePosition();
}
}
/**
* 'mouseup' event callback - apply the column resizing.
*
* @private
* @param {MouseEvent} e
*/
}, {
key: 'onMouseUp',
value: function onMouseUp(event) {
var _this7 = this;
var render = function render() {
_this7.hot.forceFullRender = true;
_this7.hot.view.render(); // updates all
_this7.hot.view.wt.wtOverlays.adjustElementsSize(true);
};
var resize = function resize(selectedCol, forceRender) {
_this7.hot.runHooks('beforeColumnResize', selectedCol, _this7.newSize);
if (forceRender) {
render();
}
_this7.saveManualColumnWidths();
_this7.hot.runHooks('afterColumnResize', selectedCol, _this7.newSize);
};
if (this.pressed) {
this.hideHandleAndGuide();
this.pressed = false;
if (this.newSize != this.startWidth) {
var selectedColsLength = this.selectedCols.length;
if (selectedColsLength > 1) {
(0, _array.arrayEach)(this.selectedCols, function (selectedCol) {
resize(selectedCol);
});
render();
} else {
(0, _array.arrayEach)(this.selectedCols, function (selectedCol) {
resize(selectedCol, true);
});
}
}
this.setupHandlePosition(this.currentTH);
}
}
/**
* Bind the mouse events.
*
* @private
*/
}, {
key: 'bindEvents',
value: function bindEvents() {
var _this8 = this;
this.eventManager.addEventListener(this.hot.rootElement, 'mouseover', function (e) {
return _this8.onMouseOver(e);
});
this.eventManager.addEventListener(this.hot.rootElement, 'mousedown', function (e) {
return _this8.onMouseDown(e);
});
this.eventManager.addEventListener(window, 'mousemove', function (e) {
return _this8.onMouseMove(e);
});
this.eventManager.addEventListener(window, 'mouseup', function (e) {
return _this8.onMouseUp(e);
});
}
/**
* Cache the current column width.
*
* @param {Number} column Visual column index.
* @param {Number} width Column width.
* @returns {Number}
*/
}, {
key: 'setManualSize',
value: function setManualSize(column, width) {
width = Math.max(width, 20);
/**
* We need to run col through modifyCol hook, in case the order of displayed columns is different than the order
* in data source. For instance, this order can be modified by manualColumnMove plugin.
*/
column = this.hot.runHooks('modifyCol', column);
this.manualColumnWidths[column] = width;
return width;
}
/**
* Clear cache for the current column index.
*
* @param {Number} column Visual column index.
*/
}, {
key: 'clearManualSize',
value: function clearManualSize(column) {
column = this.hot.runHooks('modifyCol', column);
this.manualColumnWidths[column] = void 0;
}
/**
* Modify the provided column width, based on the plugin settings
*
* @private
* @param {Number} width Column width.
* @param {Number} column Visual column index.
* @returns {Number}
*/
}, {
key: 'onModifyColWidth',
value: function onModifyColWidth(width, column) {
if (this.enabled) {
column = this.hot.runHooks('modifyCol', column);
if (this.hot.getSettings().manualColumnResize && this.manualColumnWidths[column]) {
return this.manualColumnWidths[column];
}
}
return width;
}
/**
* Modify the provided column stretched width. This hook decides if specified column should be stretched or not.
*
* @private
* @param {Number} stretchedWidth Stretched width.
* @param {Number} column Physical column index.
* @returns {Number}
*/
}, {
key: 'onBeforeStretchingColumnWidth',
value: function onBeforeStretchingColumnWidth(stretchedWidth, column) {
var width = this.manualColumnWidths[column];
if (width === void 0) {
width = stretchedWidth;
}
return width;
}
/**
* `beforeColumnResize` hook callback.
*
* @private
* @param {Number} currentColumn Index of the resized column.
* @param {Number} newSize Calculated new column width.
* @param {Boolean} isDoubleClick Flag that determines whether there was a double-click.
*/
}, {
key: 'onBeforeColumnResize',
value: function onBeforeColumnResize() {
// clear the header height cache information
this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked = {};
}
}]);
return ManualColumnResize;
}(_base2.default);
(0, _plugins.registerPlugin)('manualColumnResize', ManualColumnResize);
exports.default = ManualColumnResize;
/***/ }),
/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _array = __webpack_require__(2);
var _element = __webpack_require__(0);
var _number = __webpack_require__(6);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _plugins = __webpack_require__(7);
var _rowsMapper = __webpack_require__(437);
var _rowsMapper2 = _interopRequireDefault(_rowsMapper);
var _backlight = __webpack_require__(438);
var _backlight2 = _interopRequireDefault(_backlight);
var _guideline = __webpack_require__(439);
var _guideline2 = _interopRequireDefault(_guideline);
var _src = __webpack_require__(15);
__webpack_require__(440);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
_pluginHooks2.default.getSingleton().register('beforeRowMove');
_pluginHooks2.default.getSingleton().register('afterRowMove');
_pluginHooks2.default.getSingleton().register('unmodifyRow');
var privatePool = new WeakMap();
var CSS_PLUGIN = 'ht__manualRowMove';
var CSS_SHOW_UI = 'show-ui';
var CSS_ON_MOVING = 'on-moving--rows';
var CSS_AFTER_SELECTION = 'after-selection--rows';
/**
* @plugin ManualRowMove
*
* @description
* This plugin allows to change rows order.
*
* API:
* - moveRow - move single row to the new position.
* - moveRows - move many rows (as an array of indexes) to the new position.
*
* If you want apply visual changes, you have to call manually the render() method on the instance of handsontable.
*
* UI components:
* - backlight - highlight of selected rows.
* - guideline - line which shows where rows has been moved.
*
* @class ManualRowMove
* @plugin ManualRowMove
*/
var ManualRowMove = function (_BasePlugin) {
_inherits(ManualRowMove, _BasePlugin);
function ManualRowMove(hotInstance) {
_classCallCheck(this, ManualRowMove);
/**
* Set up WeakMap of plugin to sharing private parameters;
*/
var _this = _possibleConstructorReturn(this, (ManualRowMove.__proto__ || Object.getPrototypeOf(ManualRowMove)).call(this, hotInstance));
privatePool.set(_this, {
rowsToMove: [],
pressed: void 0,
disallowMoving: void 0,
target: {
eventPageY: void 0,
coords: void 0,
TD: void 0,
row: void 0
}
});
/**
* List of last removed row indexes.
*
* @type {Array}
*/
_this.removedRows = [];
/**
* Object containing visual row indexes mapped to data source indexes.
*
* @type {RowsMapper}
*/
_this.rowsMapper = new _rowsMapper2.default(_this);
/**
* Event Manager object.
*
* @type {Object}
*/
_this.eventManager = new _eventManager2.default(_this);
/**
* Backlight UI object.
*
* @type {Object}
*/
_this.backlight = new _backlight2.default(hotInstance);
/**
* Guideline UI object.
*
* @type {Object}
*/
_this.guideline = new _guideline2.default(hotInstance);
return _this;
}
/**
* Check if plugin is enabled.
*
* @returns {Boolean}
*/
_createClass(ManualRowMove, [{
key: 'isEnabled',
value: function isEnabled() {
return !!this.hot.getSettings().manualRowMove;
}
/**
* Enable the plugin.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.addHook('beforeOnCellMouseDown', function (event, coords, TD, blockCalculations) {
return _this2.onBeforeOnCellMouseDown(event, coords, TD, blockCalculations);
});
this.addHook('beforeOnCellMouseOver', function (event, coords, TD, blockCalculations) {
return _this2.onBeforeOnCellMouseOver(event, coords, TD, blockCalculations);
});
this.addHook('afterScrollHorizontally', function () {
return _this2.onAfterScrollHorizontally();
});
this.addHook('modifyRow', function (row, source) {
return _this2.onModifyRow(row, source);
});
this.addHook('beforeRemoveRow', function (index, amount) {
return _this2.onBeforeRemoveRow(index, amount);
});
this.addHook('afterRemoveRow', function () {
return _this2.onAfterRemoveRow();
});
this.addHook('afterCreateRow', function (index, amount) {
return _this2.onAfterCreateRow(index, amount);
});
this.addHook('afterLoadData', function () {
return _this2.onAfterLoadData();
});
this.addHook('beforeColumnSort', function (column, order) {
return _this2.onBeforeColumnSort(column, order);
});
this.addHook('unmodifyRow', function (row) {
return _this2.onUnmodifyRow(row);
});
this.registerEvents();
// TODO: move adding plugin classname to BasePlugin.
(0, _element.addClass)(this.hot.rootElement, CSS_PLUGIN);
_get(ManualRowMove.prototype.__proto__ || Object.getPrototypeOf(ManualRowMove.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.disablePlugin();
this.enablePlugin();
this.onAfterPluginsInitialized();
_get(ManualRowMove.prototype.__proto__ || Object.getPrototypeOf(ManualRowMove.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
var pluginSettings = this.hot.getSettings().manualRowMove;
if (Array.isArray(pluginSettings)) {
this.rowsMapper.clearMap();
}
(0, _element.removeClass)(this.hot.rootElement, CSS_PLUGIN);
this.unregisterEvents();
this.backlight.destroy();
this.guideline.destroy();
_get(ManualRowMove.prototype.__proto__ || Object.getPrototypeOf(ManualRowMove.prototype), 'disablePlugin', this).call(this);
}
/**
* Move a single row.
*
* @param {Number} row Visual row index to be moved.
* @param {Number} target Visual row index being a target for the moved row.
*/
}, {
key: 'moveRow',
value: function moveRow(row, target) {
this.moveRows([row], target);
}
/**
* Move multiple rows.
*
* @param {Array} rows Array of visual row indexes to be moved.
* @param {Number} target Visual row index being a target for the moved rows.
*/
}, {
key: 'moveRows',
value: function moveRows(rows, target) {
var _this3 = this;
var priv = privatePool.get(this);
var beforeMoveHook = this.hot.runHooks('beforeRowMove', rows, target);
priv.disallowMoving = beforeMoveHook === false;
if (!priv.disallowMoving) {
// first we need to rewrite an visual indexes to physical for save reference after move
(0, _array.arrayEach)(rows, function (row, index, array) {
array[index] = _this3.rowsMapper.getValueByIndex(row);
});
// next, when we have got an physical indexes, we can move rows
(0, _array.arrayEach)(rows, function (row, index) {
var actualPosition = _this3.rowsMapper.getIndexByValue(row);
if (actualPosition !== target) {
_this3.rowsMapper.moveRow(actualPosition, target + index);
}
});
// after moving we have to clear rowsMapper from null entries
this.rowsMapper.clearNull();
}
this.hot.runHooks('afterRowMove', rows, target);
}
/**
* Correct the cell selection after the move action. Fired only when action was made with a mouse.
* That means that changing the row order using the API won't correct the selection.
*
* @private
* @param {Number} startRow Visual row index for the start of the selection.
* @param {Number} endRow Visual row index for the end of the selection.
*/
}, {
key: 'changeSelection',
value: function changeSelection(startRow, endRow) {
var selection = this.hot.selection;
var lastColIndex = this.hot.countCols() - 1;
selection.setRangeStartOnly(new _src.CellCoords(startRow, 0));
selection.setRangeEnd(new _src.CellCoords(endRow, lastColIndex), false);
}
/**
* Get the sum of the heights of rows in the provided range.
*
* @private
* @param {Number} from Visual row index.
* @param {Number} to Visual row index.
* @returns {Number}
*/
}, {
key: 'getRowsHeight',
value: function getRowsHeight(from, to) {
var height = 0;
for (var i = from; i < to; i++) {
var rowHeight = this.hot.view.wt.wtTable.getRowHeight(i) || 23;
height += rowHeight;
}
return height;
}
/**
* Load initial settings when persistent state is saved or when plugin was initialized as an array.
*
* @private
*/
}, {
key: 'initialSettings',
value: function initialSettings() {
var pluginSettings = this.hot.getSettings().manualRowMove;
if (Array.isArray(pluginSettings)) {
this.moveRows(pluginSettings, 0);
} else if (pluginSettings !== void 0) {
var persistentState = this.persistentStateLoad();
if (persistentState.length) {
this.moveRows(persistentState, 0);
}
}
}
/**
* Check if the provided row is in the fixedRowsTop section.
*
* @private
* @param {Number} row Visual row index to check.
* @returns {Boolean}
*/
}, {
key: 'isFixedRowTop',
value: function isFixedRowTop(row) {
return row < this.hot.getSettings().fixedRowsTop;
}
/**
* Check if the provided row is in the fixedRowsBottom section.
*
* @private
* @param {Number} row Visual row index to check.
* @returns {Boolean}
*/
}, {
key: 'isFixedRowBottom',
value: function isFixedRowBottom(row) {
return row > this.hot.getSettings().fixedRowsBottom;
}
/**
* Save the manual row positions to the persistent state.
*
* @private
*/
}, {
key: 'persistentStateSave',
value: function persistentStateSave() {
this.hot.runHooks('persistentStateSave', 'manualRowMove', this.rowsMapper._arrayMap);
}
/**
* Load the manual row positions from the persistent state.
*
* @private
* @returns {Array} Stored state.
*/
}, {
key: 'persistentStateLoad',
value: function persistentStateLoad() {
var storedState = {};
this.hot.runHooks('persistentStateLoad', 'manualRowMove', storedState);
return storedState.value ? storedState.value : [];
}
/**
* Prepare array of indexes based on actual selection.
*
* @private
* @returns {Array}
*/
}, {
key: 'prepareRowsToMoving',
value: function prepareRowsToMoving() {
var selection = this.hot.getSelectedRange();
var selectedRows = [];
if (!selection) {
return selectedRows;
}
var from = selection.from,
to = selection.to;
var start = Math.min(from.row, to.row);
var end = Math.max(from.row, to.row);
(0, _number.rangeEach)(start, end, function (i) {
selectedRows.push(i);
});
return selectedRows;
}
/**
* Update the UI visual position.
*
* @private
*/
}, {
key: 'refreshPositions',
value: function refreshPositions() {
var priv = privatePool.get(this);
var coords = priv.target.coords;
var firstVisible = this.hot.view.wt.wtTable.getFirstVisibleRow();
var lastVisible = this.hot.view.wt.wtTable.getLastVisibleRow();
var fixedRows = this.hot.getSettings().fixedRowsTop;
var countRows = this.hot.countRows();
if (coords.row < fixedRows && firstVisible > 0) {
this.hot.scrollViewportTo(firstVisible - 1);
}
if (coords.row >= lastVisible && lastVisible < countRows) {
this.hot.scrollViewportTo(lastVisible + 1, undefined, true);
}
var wtTable = this.hot.view.wt.wtTable;
var TD = priv.target.TD;
var rootElementOffset = (0, _element.offset)(this.hot.rootElement);
var tdOffsetTop = this.hot.view.THEAD.offsetHeight + this.getRowsHeight(0, coords.row);
var mouseOffsetTop = priv.target.eventPageY - rootElementOffset.top + wtTable.holder.scrollTop;
var hiderHeight = wtTable.hider.offsetHeight;
var tbodyOffsetTop = wtTable.TBODY.offsetTop;
var backlightElemMarginTop = this.backlight.getOffset().top;
var backlightElemHeight = this.backlight.getSize().height;
if (this.isFixedRowTop(coords.row)) {
tdOffsetTop += wtTable.holder.scrollTop;
}
// todo: fixedRowsBottom
// if (this.isFixedRowBottom(coords.row)) {
//
// }
if (coords.row < 0) {
// if hover on colHeader
priv.target.row = firstVisible > 0 ? firstVisible - 1 : firstVisible;
} else if (TD.offsetHeight / 2 + tdOffsetTop <= mouseOffsetTop) {
// if hover on lower part of TD
priv.target.row = coords.row + 1;
// unfortunately first row is bigger than rest
tdOffsetTop += coords.row === 0 ? TD.offsetHeight - 1 : TD.offsetHeight;
} else {
// elsewhere on table
priv.target.row = coords.row;
}
var backlightTop = mouseOffsetTop;
var guidelineTop = tdOffsetTop;
if (mouseOffsetTop + backlightElemHeight + backlightElemMarginTop >= hiderHeight) {
// prevent display backlight below table
backlightTop = hiderHeight - backlightElemHeight - backlightElemMarginTop;
} else if (mouseOffsetTop + backlightElemMarginTop < tbodyOffsetTop) {
// prevent display above below table
backlightTop = tbodyOffsetTop + Math.abs(backlightElemMarginTop);
}
if (tdOffsetTop >= hiderHeight - 1) {
// prevent display guideline below table
guidelineTop = hiderHeight - 1;
}
var topOverlayHeight = 0;
if (this.hot.view.wt.wtOverlays.topOverlay) {
topOverlayHeight = this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight;
}
if (coords.row >= fixedRows && guidelineTop - wtTable.holder.scrollTop < topOverlayHeight) {
this.hot.scrollViewportTo(coords.row);
}
this.backlight.setPosition(backlightTop);
this.guideline.setPosition(guidelineTop);
}
/**
* This method checks arrayMap from rowsMapper and updates the rowsMapper if it's necessary.
*
* @private
*/
}, {
key: 'updateRowsMapper',
value: function updateRowsMapper() {
var countRows = this.hot.countSourceRows();
var rowsMapperLen = this.rowsMapper._arrayMap.length;
if (rowsMapperLen === 0) {
this.rowsMapper.createMap(countRows || this.hot.getSettings().startRows);
} else if (rowsMapperLen < countRows) {
var diff = countRows - rowsMapperLen;
this.rowsMapper.insertItems(rowsMapperLen, diff);
} else if (rowsMapperLen > countRows) {
var maxIndex = countRows - 1;
var rowsToRemove = [];
(0, _array.arrayEach)(this.rowsMapper._arrayMap, function (value, index) {
if (value > maxIndex) {
rowsToRemove.push(index);
}
});
this.rowsMapper.removeItems(rowsToRemove);
}
}
/**
* Bind the events used by the plugin.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this4 = this;
this.eventManager.addEventListener(document.documentElement, 'mousemove', function (event) {
return _this4.onMouseMove(event);
});
this.eventManager.addEventListener(document.documentElement, 'mouseup', function () {
return _this4.onMouseUp();
});
}
/**
* Unbind the events used by the plugin.
*
* @private
*/
}, {
key: 'unregisterEvents',
value: function unregisterEvents() {
this.eventManager.clear();
}
/**
* `beforeColumnSort` hook callback. If user uses the sorting, manual row moving is disabled.
*
* @private
* @param {Number} column Column index where soring is present
* @param {*} order State of sorting. ASC/DESC/None
*/
}, {
key: 'onBeforeColumnSort',
value: function onBeforeColumnSort(column, order) {
var priv = privatePool.get(this);
priv.disallowMoving = order !== void 0;
}
/**
* Change the behavior of selection / dragging.
*
* @private
* @param {MouseEvent} event
* @param {CellCoords} coords Visual coordinates.
* @param {HTMLElement} TD
* @param {Object} blockCalculations
*/
}, {
key: 'onBeforeOnCellMouseDown',
value: function onBeforeOnCellMouseDown(event, coords, TD, blockCalculations) {
var wtTable = this.hot.view.wt.wtTable;
var isHeaderSelection = this.hot.selection.selectedHeader.rows;
var selection = this.hot.getSelectedRange();
var priv = privatePool.get(this);
if (!selection || !isHeaderSelection || priv.pressed || event.button !== 0) {
priv.pressed = false;
priv.rowsToMove.length = 0;
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI]);
return;
}
var guidelineIsNotReady = this.guideline.isBuilt() && !this.guideline.isAppended();
var backlightIsNotReady = this.backlight.isBuilt() && !this.backlight.isAppended();
if (guidelineIsNotReady && backlightIsNotReady) {
this.guideline.appendTo(wtTable.hider);
this.backlight.appendTo(wtTable.hider);
}
var from = selection.from,
to = selection.to;
var start = Math.min(from.row, to.row);
var end = Math.max(from.row, to.row);
if (coords.col < 0 && coords.row >= start && coords.row <= end) {
blockCalculations.row = true;
priv.pressed = true;
priv.target.eventPageY = event.pageY;
priv.target.coords = coords;
priv.target.TD = TD;
priv.rowsToMove = this.prepareRowsToMoving();
var leftPos = wtTable.holder.scrollLeft + this.hot.view.wt.wtViewport.getRowHeaderWidth();
this.backlight.setPosition(null, leftPos);
this.backlight.setSize(wtTable.hider.offsetWidth - leftPos, this.getRowsHeight(start, end + 1));
this.backlight.setOffset((this.getRowsHeight(start, coords.row) + event.layerY) * -1, null);
(0, _element.addClass)(this.hot.rootElement, CSS_ON_MOVING);
this.refreshPositions();
} else {
(0, _element.removeClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
priv.pressed = false;
priv.rowsToMove.length = 0;
}
}
/**
* 'mouseMove' event callback. Fired when pointer move on document.documentElement.
*
* @private
* @param {MouseEvent} event `mousemove` event properties.
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
var priv = privatePool.get(this);
if (!priv.pressed) {
return;
}
// callback for browser which doesn't supports CSS pointer-event: none
if (event.realTarget === this.backlight.element) {
var height = this.backlight.getSize().height;
this.backlight.setSize(null, 0);
setTimeout(function () {
this.backlight.setPosition(null, height);
});
}
priv.target.eventPageY = event.pageY;
this.refreshPositions();
}
/**
* 'beforeOnCellMouseOver' hook callback. Fired when pointer was over cell.
*
* @private
* @param {MouseEvent} event `mouseover` event properties.
* @param {CellCoords} coords Visual cell coordinates where was fired event.
* @param {HTMLElement} TD Cell represented as HTMLElement.
* @param {Object} blockCalculations Object which contains information about blockCalculation for row, column or cells.
*/
}, {
key: 'onBeforeOnCellMouseOver',
value: function onBeforeOnCellMouseOver(event, coords, TD, blockCalculations) {
var selectedRange = this.hot.getSelectedRange();
var priv = privatePool.get(this);
if (!selectedRange || !priv.pressed) {
return;
}
if (priv.rowsToMove.indexOf(coords.row) > -1) {
(0, _element.removeClass)(this.hot.rootElement, CSS_SHOW_UI);
} else {
(0, _element.addClass)(this.hot.rootElement, CSS_SHOW_UI);
}
blockCalculations.row = true;
blockCalculations.column = true;
blockCalculations.cell = true;
priv.target.coords = coords;
priv.target.TD = TD;
}
/**
* `onMouseUp` hook callback.
*
* @private
*/
}, {
key: 'onMouseUp',
value: function onMouseUp() {
var priv = privatePool.get(this);
var target = priv.target.row;
var rowsLen = priv.rowsToMove.length;
priv.pressed = false;
priv.backlightHeight = 0;
(0, _element.removeClass)(this.hot.rootElement, [CSS_ON_MOVING, CSS_SHOW_UI, CSS_AFTER_SELECTION]);
if (this.hot.selection.selectedHeader.rows) {
(0, _element.addClass)(this.hot.rootElement, CSS_AFTER_SELECTION);
}
if (rowsLen < 1 || target === void 0 || priv.rowsToMove.indexOf(target) > -1 || priv.rowsToMove[rowsLen - 1] === target - 1) {
return;
}
this.moveRows(priv.rowsToMove, target);
this.persistentStateSave();
this.hot.render();
if (!priv.disallowMoving) {
var selectionStart = this.rowsMapper.getIndexByValue(priv.rowsToMove[0]);
var selectionEnd = this.rowsMapper.getIndexByValue(priv.rowsToMove[rowsLen - 1]);
this.changeSelection(selectionStart, selectionEnd);
}
priv.rowsToMove.length = 0;
}
/**
* `afterScrollHorizontally` hook callback. Fired the table was scrolled horizontally.
*
* @private
*/
}, {
key: 'onAfterScrollHorizontally',
value: function onAfterScrollHorizontally() {
var wtTable = this.hot.view.wt.wtTable;
var headerWidth = this.hot.view.wt.wtViewport.getRowHeaderWidth();
var scrollLeft = wtTable.holder.scrollLeft;
var posLeft = headerWidth + scrollLeft;
this.backlight.setPosition(null, posLeft);
this.backlight.setSize(wtTable.hider.offsetWidth - posLeft);
}
/**
* `afterCreateRow` hook callback.
*
* @private
* @param {Number} index Visual index of the created row.
* @param {Number} amount Amount of created rows.
*/
}, {
key: 'onAfterCreateRow',
value: function onAfterCreateRow(index, amount) {
this.rowsMapper.shiftItems(index, amount);
}
/**
* On before remove row listener.
*
* @private
* @param {Number} index Visual row index.
* @param {Number} amount Defines how many rows removed.
*/
}, {
key: 'onBeforeRemoveRow',
value: function onBeforeRemoveRow(index, amount) {
var _this5 = this;
this.removedRows.length = 0;
if (index !== false) {
// Collect physical row index.
(0, _number.rangeEach)(index, index + amount - 1, function (removedIndex) {
_this5.removedRows.push(_this5.hot.runHooks('modifyRow', removedIndex, _this5.pluginName));
});
}
}
/**
* `afterRemoveRow` hook callback.
*
* @private
*/
}, {
key: 'onAfterRemoveRow',
value: function onAfterRemoveRow() {
this.rowsMapper.unshiftItems(this.removedRows);
}
/**
* `afterLoadData` hook callback.
*
* @private
*/
}, {
key: 'onAfterLoadData',
value: function onAfterLoadData() {
this.updateRowsMapper();
}
/**
* 'modifyRow' hook callback.
*
* @private
* @param {Number} row Visual Row index.
* @returns {Number} Physical row index.
*/
}, {
key: 'onModifyRow',
value: function onModifyRow(row, source) {
if (source !== this.pluginName) {
var rowInMapper = this.rowsMapper.getValueByIndex(row);
row = rowInMapper === null ? row : rowInMapper;
}
return row;
}
/**
* 'unmodifyRow' hook callback.
*
* @private
* @param {Number} row Physical row index.
* @returns {Number} Visual row index.
*/
}, {
key: 'onUnmodifyRow',
value: function onUnmodifyRow(row) {
var indexInMapper = this.rowsMapper.getIndexByValue(row);
return indexInMapper === null ? row : indexInMapper;
}
/**
* `afterPluginsInitialized` hook callback.
*
* @private
*/
}, {
key: 'onAfterPluginsInitialized',
value: function onAfterPluginsInitialized() {
this.updateRowsMapper();
this.initialSettings();
this.backlight.build();
this.guideline.build();
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
this.backlight.destroy();
this.guideline.destroy();
_get(ManualRowMove.prototype.__proto__ || Object.getPrototypeOf(ManualRowMove.prototype), 'destroy', this).call(this);
}
}]);
return ManualRowMove;
}(_base2.default);
(0, _plugins.registerPlugin)('ManualRowMove', ManualRowMove);
exports.default = ManualRowMove;
/***/ }),
/* 437 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _arrayMapper = __webpack_require__(314);
var _arrayMapper2 = _interopRequireDefault(_arrayMapper);
var _array = __webpack_require__(2);
var _object = __webpack_require__(1);
var _number = __webpack_require__(6);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class RowsMapper
* @plugin ManualRowMove
*/
var RowsMapper = function () {
function RowsMapper(manualRowMove) {
_classCallCheck(this, RowsMapper);
/**
* Instance of ManualRowMove plugin.
*
* @type {ManualRowMove}
*/
this.manualRowMove = manualRowMove;
}
/**
* Reset current map array and create new one.
*
* @param {Number} [length] Custom generated map length.
*/
_createClass(RowsMapper, [{
key: 'createMap',
value: function createMap(length) {
var _this = this;
var originLength = length === void 0 ? this._arrayMap.length : length;
this._arrayMap.length = 0;
(0, _number.rangeEach)(originLength - 1, function (itemIndex) {
_this._arrayMap[itemIndex] = itemIndex;
});
}
/**
* Destroy class.
*/
}, {
key: 'destroy',
value: function destroy() {
this._arrayMap = null;
}
/**
* Moving elements in rowsMapper.
*
* @param {Number} from Row index to move.
* @param {Number} to Target index.
*/
}, {
key: 'moveRow',
value: function moveRow(from, to) {
var indexToMove = this._arrayMap[from];
this._arrayMap[from] = null;
this._arrayMap.splice(to, 0, indexToMove);
}
/**
* Clearing arrayMap from `null` entries.
*/
}, {
key: 'clearNull',
value: function clearNull() {
this._arrayMap = (0, _array.arrayFilter)(this._arrayMap, function (i) {
return i !== null;
});
}
}]);
return RowsMapper;
}();
(0, _object.mixin)(RowsMapper, _arrayMapper2.default);
exports.default = RowsMapper;
/***/ }),
/* 438 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(316);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CSS_CLASSNAME = 'ht__manualRowMove--backlight';
/**
* @class BacklightUI
* @util
*/
var BacklightUI = function (_BaseUI) {
_inherits(BacklightUI, _BaseUI);
function BacklightUI() {
_classCallCheck(this, BacklightUI);
return _possibleConstructorReturn(this, (BacklightUI.__proto__ || Object.getPrototypeOf(BacklightUI)).apply(this, arguments));
}
_createClass(BacklightUI, [{
key: 'build',
/**
* Custom className on build process.
*/
value: function build() {
_get(BacklightUI.prototype.__proto__ || Object.getPrototypeOf(BacklightUI.prototype), 'build', this).call(this);
(0, _element.addClass)(this._element, CSS_CLASSNAME);
}
}]);
return BacklightUI;
}(_base2.default);
exports.default = BacklightUI;
/***/ }),
/* 439 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(316);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CSS_CLASSNAME = 'ht__manualRowMove--guideline';
/**
* @class GuidelineUI
* @util
*/
var GuidelineUI = function (_BaseUI) {
_inherits(GuidelineUI, _BaseUI);
function GuidelineUI() {
_classCallCheck(this, GuidelineUI);
return _possibleConstructorReturn(this, (GuidelineUI.__proto__ || Object.getPrototypeOf(GuidelineUI)).apply(this, arguments));
}
_createClass(GuidelineUI, [{
key: 'build',
/**
* Custom className on build process.
*/
value: function build() {
_get(GuidelineUI.prototype.__proto__ || Object.getPrototypeOf(GuidelineUI.prototype), 'build', this).call(this);
(0, _element.addClass)(this._element, CSS_CLASSNAME);
}
}]);
return GuidelineUI;
}(_base2.default);
exports.default = GuidelineUI;
/***/ }),
/* 440 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/* 441 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _element = __webpack_require__(0);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _event = __webpack_require__(12);
var _array = __webpack_require__(2);
var _number = __webpack_require__(6);
var _plugins = __webpack_require__(7);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// Developer note! Whenever you make a change in this file, make an analogous change in manualRowResize.js
/**
* @description
* ManualRowResize Plugin.
*
* Has 2 UI components:
* - handle - the draggable element that sets the desired height of the row.
* - guide - the helper guide that shows the desired height as a horizontal guide.
*
* @plugin ManualRowResize
*/
var ManualRowResize = function (_BasePlugin) {
_inherits(ManualRowResize, _BasePlugin);
function ManualRowResize(hotInstance) {
_classCallCheck(this, ManualRowResize);
var _this = _possibleConstructorReturn(this, (ManualRowResize.__proto__ || Object.getPrototypeOf(ManualRowResize)).call(this, hotInstance));
_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 = new _eventManager2.default(_this);
_this.pressed = null;
_this.dblclick = 0;
_this.autoresizeTimeout = null;
_this.manualRowHeights = [];
(0, _element.addClass)(_this.handle, 'manualRowResizer');
(0, _element.addClass)(_this.guide, 'manualRowResizerGuide');
return _this;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ManualRowResize, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().manualRowResize;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.manualRowHeights = [];
var initialRowHeights = this.hot.getSettings().manualRowResize;
var loadedManualRowHeights = this.loadManualRowHeights();
if (typeof loadedManualRowHeights != 'undefined') {
this.manualRowHeights = loadedManualRowHeights;
} else if (Array.isArray(initialRowHeights)) {
this.manualRowHeights = initialRowHeights;
} else {
this.manualRowHeights = [];
}
this.addHook('modifyRowHeight', function (height, row) {
return _this2.onModifyRowHeight(height, row);
});
// Handsontable.hooks.register('beforeRowResize');
// Handsontable.hooks.register('afterRowResize');
this.bindEvents();
_get(ManualRowResize.prototype.__proto__ || Object.getPrototypeOf(ManualRowResize.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
var initialRowHeights = this.hot.getSettings().manualRowResize;
if (Array.isArray(initialRowHeights)) {
this.manualRowHeights = initialRowHeights;
} else if (!initialRowHeights) {
this.manualRowHeights = [];
}
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(ManualRowResize.prototype.__proto__ || Object.getPrototypeOf(ManualRowResize.prototype), 'disablePlugin', this).call(this);
}
/**
* Save the current sizes using the persistentState plugin.
*/
}, {
key: 'saveManualRowHeights',
value: function saveManualRowHeights() {
this.hot.runHooks('persistentStateSave', 'manualRowHeights', this.manualRowHeights);
}
/**
* Load the previously saved sizes using the persistentState plugin.
*
* @returns {Array}
*/
}, {
key: 'loadManualRowHeights',
value: function loadManualRowHeights() {
var storedState = {};
this.hot.runHooks('persistentStateLoad', 'manualRowHeights', storedState);
return storedState.value;
}
/**
* Set the resize handle position.
*
* @param {HTMLCellElement} TH TH HTML element.
*/
}, {
key: 'setupHandlePosition',
value: function setupHandlePosition(TH) {
var _this3 = this;
this.currentTH = TH;
var row = this.hot.view.wt.wtTable.getCoords(TH).row; // getCoords returns CellCoords
var headerWidth = (0, _element.outerWidth)(this.currentTH);
if (row >= 0) {
// if not col header
var box = this.currentTH.getBoundingClientRect();
this.currentRow = row;
this.selectedRows = [];
if (this.hot.selection.isSelected() && this.hot.selection.selectedHeader.rows) {
var _hot$getSelectedRange = this.hot.getSelectedRange(),
from = _hot$getSelectedRange.from,
to = _hot$getSelectedRange.to;
var start = from.row;
var end = to.row;
if (start >= end) {
start = to.row;
end = from.row;
}
if (this.currentRow >= start && this.currentRow <= end) {
(0, _number.rangeEach)(start, end, function (i) {
return _this3.selectedRows.push(i);
});
} else {
this.selectedRows.push(this.currentRow);
}
} else {
this.selectedRows.push(this.currentRow);
}
this.startOffset = box.top - 6;
this.startHeight = parseInt(box.height, 10);
this.handle.style.left = box.left + 'px';
this.handle.style.top = this.startOffset + this.startHeight + 'px';
this.handle.style.width = headerWidth + 'px';
this.hot.rootElement.appendChild(this.handle);
}
}
/**
* Refresh the resize handle position.
*/
}, {
key: 'refreshHandlePosition',
value: function refreshHandlePosition() {
this.handle.style.top = this.startOffset + this.currentHeight + 'px';
}
/**
* Set the resize guide position.
*/
}, {
key: 'setupGuidePosition',
value: function setupGuidePosition() {
var handleWidth = parseInt((0, _element.outerWidth)(this.handle), 10);
var handleRightPosition = parseInt(this.handle.style.left, 10) + handleWidth;
var maximumVisibleElementWidth = parseInt(this.hot.view.maximumVisibleElementWidth(0), 10);
(0, _element.addClass)(this.handle, 'active');
(0, _element.addClass)(this.guide, 'active');
this.guide.style.top = this.handle.style.top;
this.guide.style.left = handleRightPosition + 'px';
this.guide.style.width = maximumVisibleElementWidth - handleWidth + 'px';
this.hot.rootElement.appendChild(this.guide);
}
/**
* Refresh the resize guide position.
*/
}, {
key: 'refreshGuidePosition',
value: function refreshGuidePosition() {
this.guide.style.top = this.handle.style.top;
}
/**
* Hide both the resize handle and resize guide.
*/
}, {
key: 'hideHandleAndGuide',
value: function hideHandleAndGuide() {
(0, _element.removeClass)(this.handle, 'active');
(0, _element.removeClass)(this.guide, 'active');
}
/**
* Check if provided element is considered as a row header.
*
* @param {HTMLElement} element HTML element.
* @returns {Boolean}
*/
}, {
key: 'checkIfRowHeader',
value: function checkIfRowHeader(element) {
if (element != this.hot.rootElement) {
var parent = element.parentNode;
if (parent.tagName === 'TBODY') {
return true;
}
return this.checkIfRowHeader(parent);
}
return false;
}
/**
* Get the TH element from the provided element.
*
* @param {HTMLElement} element HTML element.
* @returns {HTMLElement}
*/
}, {
key: 'getTHFromTargetElement',
value: function getTHFromTargetElement(element) {
if (element.tagName != 'TABLE') {
if (element.tagName == 'TH') {
return element;
}
return this.getTHFromTargetElement(element.parentNode);
}
return null;
}
/**
* 'mouseover' event callback - set the handle position.
*
* @private
* @param {MouseEvent} event
*/
}, {
key: 'onMouseOver',
value: function onMouseOver(event) {
if (this.checkIfRowHeader(event.target)) {
var th = this.getTHFromTargetElement(event.target);
if (th) {
if (!this.pressed) {
this.setupHandlePosition(th);
}
}
}
}
/**
* Auto-size row after doubleclick - callback.
*
* @private
*/
}, {
key: 'afterMouseDownTimeout',
value: function afterMouseDownTimeout() {
var _this4 = this;
var render = function render() {
_this4.hot.forceFullRender = true;
_this4.hot.view.render(); // updates all
_this4.hot.view.wt.wtOverlays.adjustElementsSize(true);
};
var resize = function resize(selectedRow, forceRender) {
var hookNewSize = _this4.hot.runHooks('beforeRowResize', selectedRow, _this4.newSize, true);
if (hookNewSize !== void 0) {
_this4.newSize = hookNewSize;
}
_this4.setManualSize(selectedRow, _this4.newSize); // double click sets auto row size
if (forceRender) {
render();
}
_this4.hot.runHooks('afterRowResize', selectedRow, _this4.newSize, true);
};
if (this.dblclick >= 2) {
var selectedRowsLength = this.selectedRows.length;
if (selectedRowsLength > 1) {
(0, _array.arrayEach)(this.selectedRows, function (selectedRow) {
resize(selectedRow);
});
render();
} else {
(0, _array.arrayEach)(this.selectedRows, function (selectedRow) {
resize(selectedRow, true);
});
}
}
this.dblclick = 0;
this.autoresizeTimeout = null;
}
/**
* 'mousedown' event callback.
*
* @private
* @param {MouseEvent} event
*/
}, {
key: 'onMouseDown',
value: function onMouseDown(event) {
var _this5 = this;
if ((0, _element.hasClass)(event.target, 'manualRowResizer')) {
this.setupGuidePosition();
this.pressed = this.hot;
if (this.autoresizeTimeout == null) {
this.autoresizeTimeout = setTimeout(function () {
return _this5.afterMouseDownTimeout();
}, 500);
this.hot._registerTimeout(this.autoresizeTimeout);
}
this.dblclick++;
this.startY = (0, _event.pageY)(event);
this.newSize = this.startHeight;
}
}
/**
* 'mousemove' event callback - refresh the handle and guide positions, cache the new row height.
*
* @private
* @param {MouseEvent} event
*/
}, {
key: 'onMouseMove',
value: function onMouseMove(event) {
var _this6 = this;
if (this.pressed) {
this.currentHeight = this.startHeight + ((0, _event.pageY)(event) - this.startY);
(0, _array.arrayEach)(this.selectedRows, function (selectedRow) {
_this6.newSize = _this6.setManualSize(selectedRow, _this6.currentHeight);
});
this.refreshHandlePosition();
this.refreshGuidePosition();
}
}
/**
* 'mouseup' event callback - apply the row resizing.
*
* @private
* @param {MouseEvent} event
*/
}, {
key: 'onMouseUp',
value: function onMouseUp(event) {
var _this7 = this;
var render = function render() {
_this7.hot.forceFullRender = true;
_this7.hot.view.render(); // updates all
_this7.hot.view.wt.wtOverlays.adjustElementsSize(true);
};
var runHooks = function runHooks(selectedRow, forceRender) {
_this7.hot.runHooks('beforeRowResize', selectedRow, _this7.newSize);
if (forceRender) {
render();
}
_this7.saveManualRowHeights();
_this7.hot.runHooks('afterRowResize', selectedRow, _this7.newSize);
};
if (this.pressed) {
this.hideHandleAndGuide();
this.pressed = false;
if (this.newSize != this.startHeight) {
var selectedRowsLength = this.selectedRows.length;
if (selectedRowsLength > 1) {
(0, _array.arrayEach)(this.selectedRows, function (selectedRow) {
runHooks(selectedRow);
});
render();
} else {
(0, _array.arrayEach)(this.selectedRows, function (selectedRow) {
runHooks(selectedRow, true);
});
}
}
this.setupHandlePosition(this.currentTH);
}
}
/**
* Bind the mouse events.
*
* @private
*/
}, {
key: 'bindEvents',
value: function bindEvents() {
var _this8 = this;
this.eventManager.addEventListener(this.hot.rootElement, 'mouseover', function (e) {
return _this8.onMouseOver(e);
});
this.eventManager.addEventListener(this.hot.rootElement, 'mousedown', function (e) {
return _this8.onMouseDown(e);
});
this.eventManager.addEventListener(window, 'mousemove', function (e) {
return _this8.onMouseMove(e);
});
this.eventManager.addEventListener(window, 'mouseup', function (e) {
return _this8.onMouseUp(e);
});
}
/**
* Cache the current row height.
*
* @param {Number} row Visual row index.
* @param {Number} height Row height.
* @returns {Number}
*/
}, {
key: 'setManualSize',
value: function setManualSize(row, height) {
row = this.hot.runHooks('modifyRow', row);
this.manualRowHeights[row] = height;
return height;
}
/**
* Modify the provided row height, based on the plugin settings.
*
* @private
* @param {Number} height Row height.
* @param {Number} row Visual row index.
* @returns {Number}
*/
}, {
key: 'onModifyRowHeight',
value: function onModifyRowHeight(height, row) {
if (this.enabled) {
var autoRowSizePlugin = this.hot.getPlugin('autoRowSize');
var autoRowHeightResult = autoRowSizePlugin ? autoRowSizePlugin.heights[row] : null;
row = this.hot.runHooks('modifyRow', row);
var manualRowHeight = this.manualRowHeights[row];
if (manualRowHeight !== void 0 && (manualRowHeight === autoRowHeightResult || manualRowHeight > (height || 0))) {
return manualRowHeight;
}
}
return height;
}
}]);
return ManualRowResize;
}(_base2.default);
(0, _plugins.registerPlugin)('manualRowResize', ManualRowResize);
exports.default = ManualRowResize;
/***/ }),
/* 442 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _event = __webpack_require__(12);
var _src = __webpack_require__(15);
var _constants = __webpack_require__(8);
var C = _interopRequireWildcard(_constants);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function CellInfoCollection() {
var collection = [];
collection.getInfo = function (row, col) {
for (var i = 0, ilen = this.length; i < ilen; i++) {
if (this[i].row <= row && this[i].row + this[i].rowspan - 1 >= row && this[i].col <= col && this[i].col + this[i].colspan - 1 >= col) {
return this[i];
}
}
};
collection.setInfo = function (info) {
for (var i = 0, ilen = this.length; i < ilen; i++) {
if (this[i].row === info.row && this[i].col === info.col) {
this[i] = info;
return;
}
}
this.push(info);
};
collection.removeInfo = function (row, col) {
for (var i = 0, ilen = this.length; i < ilen; i++) {
if (this[i].row === row && this[i].col === col) {
this.splice(i, 1);
break;
}
}
};
return collection;
}
/**
* Plugin used to merge cells in Handsontable.
*
* @private
* @plugin MergeCells
* @class MergeCells
*/
function MergeCells(mergeCellsSetting) {
this.mergedCellInfoCollection = new CellInfoCollection();
if (Array.isArray(mergeCellsSetting)) {
for (var i = 0, ilen = mergeCellsSetting.length; i < ilen; i++) {
this.mergedCellInfoCollection.setInfo(mergeCellsSetting[i]);
}
}
}
/**
* @param cellRange (CellRange)
*/
MergeCells.prototype.canMergeRange = function (cellRange) {
// is more than one cell selected
return !cellRange.isSingle();
};
MergeCells.prototype.mergeRange = function (cellRange) {
if (!this.canMergeRange(cellRange)) {
return;
}
// normalize top left corner
var topLeft = cellRange.getTopLeftCorner();
var bottomRight = cellRange.getBottomRightCorner();
var mergeParent = {};
mergeParent.row = topLeft.row;
mergeParent.col = topLeft.col;
// TD has rowspan == 1 by default. rowspan == 2 means spread over 2 cells
mergeParent.rowspan = bottomRight.row - topLeft.row + 1;
mergeParent.colspan = bottomRight.col - topLeft.col + 1;
this.mergedCellInfoCollection.setInfo(mergeParent);
};
MergeCells.prototype.mergeOrUnmergeSelection = function (cellRange) {
var info = this.mergedCellInfoCollection.getInfo(cellRange.from.row, cellRange.from.col);
if (info) {
// unmerge
this.unmergeSelection(cellRange.from);
} else {
// merge
this.mergeSelection(cellRange);
}
};
MergeCells.prototype.mergeSelection = function (cellRange) {
this.mergeRange(cellRange);
};
MergeCells.prototype.unmergeSelection = function (cellRange) {
var info = this.mergedCellInfoCollection.getInfo(cellRange.row, cellRange.col);
this.mergedCellInfoCollection.removeInfo(info.row, info.col);
};
MergeCells.prototype.applySpanProperties = function (TD, row, col) {
var info = this.mergedCellInfoCollection.getInfo(row, col);
if (info) {
if (info.row === row && info.col === col) {
TD.setAttribute('rowspan', info.rowspan);
TD.setAttribute('colspan', info.colspan);
} else {
TD.removeAttribute('rowspan');
TD.removeAttribute('colspan');
TD.style.display = 'none';
}
} else {
TD.removeAttribute('rowspan');
TD.removeAttribute('colspan');
}
};
MergeCells.prototype.modifyTransform = function (hook, currentSelectedRange, delta) {
var sameRowspan = function sameRowspan(merged, coords) {
if (coords.row >= merged.row && coords.row <= merged.row + merged.rowspan - 1) {
return true;
}
return false;
},
sameColspan = function sameColspan(merged, coords) {
if (coords.col >= merged.col && coords.col <= merged.col + merged.colspan - 1) {
return true;
}
return false;
},
getNextPosition = function getNextPosition(newDelta) {
return new _src.CellCoords(currentSelectedRange.to.row + newDelta.row, currentSelectedRange.to.col + newDelta.col);
};
var newDelta = {
row: delta.row,
col: delta.col
};
if (hook == 'modifyTransformStart') {
/* eslint-disable block-scoped-var */
var nextPosition;
if (!this.lastDesiredCoords) {
this.lastDesiredCoords = new _src.CellCoords(null, null);
}
var currentPosition = new _src.CellCoords(currentSelectedRange.highlight.row, currentSelectedRange.highlight.col),
// if current position's parent is a merged range, returns it
mergedParent = this.mergedCellInfoCollection.getInfo(currentPosition.row, currentPosition.col),
currentRangeContainsMerge; // if current range contains a merged range
for (var i = 0, mergesLength = this.mergedCellInfoCollection.length; i < mergesLength; i++) {
var range = this.mergedCellInfoCollection[i];
range = new _src.CellCoords(range.row + range.rowspan - 1, range.col + range.colspan - 1);
if (currentSelectedRange.includes(range)) {
currentRangeContainsMerge = true;
break;
}
}
if (mergedParent) {
// only merge selected
var mergeTopLeft = new _src.CellCoords(mergedParent.row, mergedParent.col);
var mergeBottomRight = new _src.CellCoords(mergedParent.row + mergedParent.rowspan - 1, mergedParent.col + mergedParent.colspan - 1);
var mergeRange = new _src.CellRange(mergeTopLeft, mergeTopLeft, mergeBottomRight);
if (!mergeRange.includes(this.lastDesiredCoords)) {
this.lastDesiredCoords = new _src.CellCoords(null, null); // reset outdated version of lastDesiredCoords
}
newDelta.row = this.lastDesiredCoords.row ? this.lastDesiredCoords.row - currentPosition.row : newDelta.row;
newDelta.col = this.lastDesiredCoords.col ? this.lastDesiredCoords.col - currentPosition.col : newDelta.col;
if (delta.row > 0) {
// moving down
newDelta.row = mergedParent.row + mergedParent.rowspan - 1 - currentPosition.row + delta.row;
} else if (delta.row < 0) {
// moving up
newDelta.row = currentPosition.row - mergedParent.row + delta.row;
}
if (delta.col > 0) {
// moving right
newDelta.col = mergedParent.col + mergedParent.colspan - 1 - currentPosition.col + delta.col;
} else if (delta.col < 0) {
// moving left
newDelta.col = currentPosition.col - mergedParent.col + delta.col;
}
}
nextPosition = new _src.CellCoords(currentSelectedRange.highlight.row + newDelta.row, currentSelectedRange.highlight.col + newDelta.col);
var nextParentIsMerged = this.mergedCellInfoCollection.getInfo(nextPosition.row, nextPosition.col);
if (nextParentIsMerged) {
// skipping the invisible cells in the merge range
this.lastDesiredCoords = nextPosition;
newDelta = {
row: nextParentIsMerged.row - currentPosition.row,
col: nextParentIsMerged.col - currentPosition.col
};
}
} else if (hook == 'modifyTransformEnd') {
for (var _i = 0, _mergesLength = this.mergedCellInfoCollection.length; _i < _mergesLength; _i++) {
var currentMerge = this.mergedCellInfoCollection[_i];
var _mergeTopLeft = new _src.CellCoords(currentMerge.row, currentMerge.col);
var _mergeBottomRight = new _src.CellCoords(currentMerge.row + currentMerge.rowspan - 1, currentMerge.col + currentMerge.colspan - 1);
var mergedRange = new _src.CellRange(_mergeTopLeft, _mergeTopLeft, _mergeBottomRight);
var sharedBorders = currentSelectedRange.getBordersSharedWith(mergedRange);
if (mergedRange.isEqual(currentSelectedRange)) {
// only the merged range is selected
currentSelectedRange.setDirection('NW-SE');
} else if (sharedBorders.length > 0) {
var mergeHighlighted = currentSelectedRange.highlight.isEqual(mergedRange.from);
if (sharedBorders.indexOf('top') > -1) {
// if range shares a border with the merged section, change range direction accordingly
if (currentSelectedRange.to.isSouthEastOf(mergedRange.from) && mergeHighlighted) {
currentSelectedRange.setDirection('NW-SE');
} else if (currentSelectedRange.to.isSouthWestOf(mergedRange.from) && mergeHighlighted) {
currentSelectedRange.setDirection('NE-SW');
}
} else if (sharedBorders.indexOf('bottom') > -1) {
if (currentSelectedRange.to.isNorthEastOf(mergedRange.from) && mergeHighlighted) {
currentSelectedRange.setDirection('SW-NE');
} else if (currentSelectedRange.to.isNorthWestOf(mergedRange.from) && mergeHighlighted) {
currentSelectedRange.setDirection('SE-NW');
}
}
}
nextPosition = getNextPosition(newDelta);
var withinRowspan = sameRowspan(currentMerge, nextPosition),
withinColspan = sameColspan(currentMerge, nextPosition);
if (currentSelectedRange.includesRange(mergedRange) && (mergedRange.includes(nextPosition) || withinRowspan || withinColspan)) {
// if next step overlaps a merged range, jump past it
if (withinRowspan) {
if (newDelta.row < 0) {
newDelta.row -= currentMerge.rowspan - 1;
} else if (newDelta.row > 0) {
newDelta.row += currentMerge.rowspan - 1;
}
}
if (withinColspan) {
if (newDelta.col < 0) {
newDelta.col -= currentMerge.colspan - 1;
} else if (newDelta.col > 0) {
newDelta.col += currentMerge.colspan - 1;
}
}
}
}
}
if (newDelta.row !== 0) {
delta.row = newDelta.row;
}
if (newDelta.col !== 0) {
delta.col = newDelta.col;
}
};
MergeCells.prototype.shiftCollection = function (direction, index, count) {
var shiftVector = [0, 0];
switch (direction) {
case 'right':
shiftVector[0] += 1;
break;
case 'left':
shiftVector[0] -= 1;
break;
case 'down':
shiftVector[1] += 1;
break;
case 'up':
shiftVector[1] -= 1;
break;
default:
break;
}
for (var i = 0; i < this.mergedCellInfoCollection.length; i++) {
var currentMerge = this.mergedCellInfoCollection[i];
if (direction === 'right' || direction === 'left') {
if (index <= currentMerge.col) {
currentMerge.col += shiftVector[0];
}
} else if (index <= currentMerge.row) {
currentMerge.row += shiftVector[1];
}
}
};
var beforeInit = function beforeInit() {
var instance = this;
var mergeCellsSetting = instance.getSettings().mergeCells;
if (mergeCellsSetting) {
if (!instance.mergeCells) {
instance.mergeCells = new MergeCells(mergeCellsSetting);
}
}
};
var afterInit = function afterInit() {
var instance = this;
if (instance.mergeCells) {
/**
* Monkey patch Table.prototype.getCell to return TD for merged cell parent if asked for TD of a cell that is
* invisible due to the merge. This is not the cleanest solution but there is a test case for it (merged cells scroll) so feel free to refactor it!
*/
instance.view.wt.wtTable.getCell = function (coords) {
if (instance.getSettings().mergeCells) {
var mergeParent = instance.mergeCells.mergedCellInfoCollection.getInfo(coords.row, coords.col);
if (mergeParent) {
coords = mergeParent;
}
}
return _src.Table.prototype.getCell.call(this, coords);
};
}
};
var afterUpdateSettings = function afterUpdateSettings() {
var instance = this;
var mergeCellsSetting = instance.getSettings().mergeCells;
if (mergeCellsSetting) {
if (instance.mergeCells) {
instance.mergeCells.mergedCellInfoCollection = new CellInfoCollection();
if (Array.isArray(mergeCellsSetting)) {
for (var i = 0, ilen = mergeCellsSetting.length; i < ilen; i++) {
instance.mergeCells.mergedCellInfoCollection.setInfo(mergeCellsSetting[i]);
}
}
} else {
instance.mergeCells = new MergeCells(mergeCellsSetting);
}
} else if (instance.mergeCells) {
// it doesn't actually turn off the plugin, just resets the settings. Need to refactor.
instance.mergeCells.mergedCellInfoCollection = new CellInfoCollection();
}
};
var onBeforeKeyDown = function onBeforeKeyDown(event) {
if (!this.mergeCells) {
return;
}
var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;
if (ctrlDown) {
if (event.keyCode === 77) {
// CTRL + M
this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange());
this.render();
(0, _event.stopImmediatePropagation)(event);
}
}
};
var addMergeActionsToContextMenu = function addMergeActionsToContextMenu(defaultOptions) {
if (!this.getSettings().mergeCells) {
return;
}
defaultOptions.items.push({ name: '---------' });
defaultOptions.items.push({
key: 'mergeCells',
name: function name() {
var sel = this.getSelected();
var info = this.mergeCells.mergedCellInfoCollection.getInfo(sel[0], sel[1]);
if (info) {
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_UNMERGE_CELLS);
}
return this.getTranslatedPhrase(C.CONTEXTMENU_ITEMS_MERGE_CELLS);
},
callback: function callback() {
this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange());
this.render();
},
disabled: function disabled() {
return this.selection.selectedHeader.corner;
}
});
};
var afterRenderer = function afterRenderer(TD, row, col, prop, value, cellProperties) {
if (this.mergeCells) {
this.mergeCells.applySpanProperties(TD, row, col);
}
};
var modifyTransformFactory = function modifyTransformFactory(hook) {
return function (delta) {
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var currentSelectedRange = this.getSelectedRange();
this.mergeCells.modifyTransform(hook, currentSelectedRange, delta);
if (hook === 'modifyTransformEnd') {
// sanitize "from" (core.js will sanitize to)
var totalRows = this.countRows();
var totalCols = this.countCols();
if (currentSelectedRange.from.row < 0) {
currentSelectedRange.from.row = 0;
} else if (currentSelectedRange.from.row > 0 && currentSelectedRange.from.row >= totalRows) {
currentSelectedRange.from.row = currentSelectedRange.from - 1;
}
if (currentSelectedRange.from.col < 0) {
currentSelectedRange.from.col = 0;
} else if (currentSelectedRange.from.col > 0 && currentSelectedRange.from.col >= totalCols) {
currentSelectedRange.from.col = totalCols - 1;
}
}
}
};
};
/**
* While selecting cells with keyboard or mouse, make sure that rectangular area is expanded to the extent of the merged cell
* @param coords
*/
var beforeSetRangeEnd = function beforeSetRangeEnd(coords) {
this.lastDesiredCoords = null; // unset lastDesiredCoords when selection is changed with mouse
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var selRange = this.getSelectedRange();
selRange.highlight = new _src.CellCoords(selRange.highlight.row, selRange.highlight.col); // clone in case we will modify its reference
selRange.to = coords;
var rangeExpanded = false;
do {
rangeExpanded = false;
for (var i = 0, ilen = this.mergeCells.mergedCellInfoCollection.length; i < ilen; i++) {
var cellInfo = this.mergeCells.mergedCellInfoCollection[i];
var mergedCellTopLeft = new _src.CellCoords(cellInfo.row, cellInfo.col);
var mergedCellBottomRight = new _src.CellCoords(cellInfo.row + cellInfo.rowspan - 1, cellInfo.col + cellInfo.colspan - 1);
var mergedCellRange = new _src.CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight);
if (selRange.expandByRange(mergedCellRange)) {
coords.row = selRange.to.row;
coords.col = selRange.to.col;
rangeExpanded = true;
}
}
} while (rangeExpanded);
}
};
/**
* Returns correct coordinates for merged start / end cells in selection for area borders
* @param corners
* @param className
*/
var beforeDrawAreaBorders = function beforeDrawAreaBorders(corners, className) {
if (className && className == 'area') {
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var selRange = this.getSelectedRange();
var startRange = new _src.CellRange(selRange.from, selRange.from, selRange.from);
var stopRange = new _src.CellRange(selRange.to, selRange.to, selRange.to);
for (var i = 0, ilen = this.mergeCells.mergedCellInfoCollection.length; i < ilen; i++) {
var cellInfo = this.mergeCells.mergedCellInfoCollection[i];
var mergedCellTopLeft = new _src.CellCoords(cellInfo.row, cellInfo.col);
var mergedCellBottomRight = new _src.CellCoords(cellInfo.row + cellInfo.rowspan - 1, cellInfo.col + cellInfo.colspan - 1);
var mergedCellRange = new _src.CellRange(mergedCellTopLeft, mergedCellTopLeft, mergedCellBottomRight);
if (startRange.expandByRange(mergedCellRange)) {
corners[0] = startRange.from.row;
corners[1] = startRange.from.col;
}
if (stopRange.expandByRange(mergedCellRange)) {
corners[2] = stopRange.from.row;
corners[3] = stopRange.from.col;
}
}
}
}
};
var afterGetCellMeta = function afterGetCellMeta(row, col, cellProperties) {
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(row, col);
if (mergeParent && (mergeParent.row != row || mergeParent.col != col)) {
cellProperties.copyable = false;
}
}
};
var afterViewportRowCalculatorOverride = function afterViewportRowCalculatorOverride(calc) {
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var colCount = this.countCols();
var mergeParent;
for (var c = 0; c < colCount; c++) {
mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(calc.startRow, c);
if (mergeParent) {
if (mergeParent.row < calc.startRow) {
calc.startRow = mergeParent.row;
return afterViewportRowCalculatorOverride.call(this, calc); // recursively search upwards
}
}
mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(calc.endRow, c);
if (mergeParent) {
var mergeEnd = mergeParent.row + mergeParent.rowspan - 1;
if (mergeEnd > calc.endRow) {
calc.endRow = mergeEnd;
return afterViewportRowCalculatorOverride.call(this, calc); // recursively search upwards
}
}
}
}
};
var afterViewportColumnCalculatorOverride = function afterViewportColumnCalculatorOverride(calc) {
var mergeCellsSetting = this.getSettings().mergeCells;
if (mergeCellsSetting) {
var rowCount = this.countRows();
var mergeParent;
for (var r = 0; r < rowCount; r++) {
mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(r, calc.startColumn);
if (mergeParent) {
if (mergeParent.col < calc.startColumn) {
calc.startColumn = mergeParent.col;
return afterViewportColumnCalculatorOverride.call(this, calc); // recursively search upwards
}
}
mergeParent = this.mergeCells.mergedCellInfoCollection.getInfo(r, calc.endColumn);
if (mergeParent) {
var mergeEnd = mergeParent.col + mergeParent.colspan - 1;
if (mergeEnd > calc.endColumn) {
calc.endColumn = mergeEnd;
return afterViewportColumnCalculatorOverride.call(this, calc); // recursively search upwards
}
}
}
}
};
var isMultipleSelection = function isMultipleSelection(isMultiple) {
if (isMultiple && this.mergeCells) {
var mergedCells = this.mergeCells.mergedCellInfoCollection,
selectionRange = this.getSelectedRange();
for (var group in mergedCells) {
if (selectionRange.highlight.row == mergedCells[group].row && selectionRange.highlight.col == mergedCells[group].col && selectionRange.to.row == mergedCells[group].row + mergedCells[group].rowspan - 1 && selectionRange.to.col == mergedCells[group].col + mergedCells[group].colspan - 1) {
return false;
}
}
}
return isMultiple;
};
function modifyAutofillRange(select, drag) {
var mergeCellsSetting = this.getSettings().mergeCells;
if (!mergeCellsSetting || this.selection.isMultiple()) {
return;
}
var info = this.mergeCells.mergedCellInfoCollection.getInfo(select[0], select[1]);
if (info) {
select[0] = info.row;
select[1] = info.col;
select[2] = info.row + info.rowspan - 1;
select[3] = info.col + info.colspan - 1;
}
}
function onAfterCreateCol(col, count) {
if (this.mergeCells) {
this.mergeCells.shiftCollection('right', col, count);
}
}
function onAfterRemoveCol(col, count) {
if (this.mergeCells) {
this.mergeCells.shiftCollection('left', col, count);
}
}
function onAfterCreateRow(row, count) {
if (this.mergeCells) {
this.mergeCells.shiftCollection('down', row, count);
}
}
function onAfterRemoveRow(row, count) {
if (this.mergeCells) {
this.mergeCells.shiftCollection('up', row, count);
}
}
var hook = _pluginHooks2.default.getSingleton();
hook.add('beforeInit', beforeInit);
hook.add('afterInit', afterInit);
hook.add('afterUpdateSettings', afterUpdateSettings);
hook.add('beforeKeyDown', onBeforeKeyDown);
hook.add('modifyTransformStart', modifyTransformFactory('modifyTransformStart'));
hook.add('modifyTransformEnd', modifyTransformFactory('modifyTransformEnd'));
hook.add('beforeSetRangeEnd', beforeSetRangeEnd);
hook.add('beforeDrawBorders', beforeDrawAreaBorders);
hook.add('afterIsMultipleSelection', isMultipleSelection);
hook.add('afterRenderer', afterRenderer);
hook.add('afterContextMenuDefaultOptions', addMergeActionsToContextMenu);
hook.add('afterGetCellMeta', afterGetCellMeta);
hook.add('afterViewportRowCalculatorOverride', afterViewportRowCalculatorOverride);
hook.add('afterViewportColumnCalculatorOverride', afterViewportColumnCalculatorOverride);
hook.add('modifyAutofillRange', modifyAutofillRange);
hook.add('afterCreateCol', onAfterCreateCol);
hook.add('afterRemoveCol', onAfterRemoveCol);
hook.add('afterCreateRow', onAfterCreateRow);
hook.add('afterRemoveRow', onAfterRemoveRow);
exports.default = MergeCells;
/***/ }),
/* 443 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _element = __webpack_require__(0);
var _browser = __webpack_require__(28);
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _eventManager = __webpack_require__(4);
var _eventManager2 = _interopRequireDefault(_eventManager);
var _plugins = __webpack_require__(7);
var _src = __webpack_require__(15);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @plugin MultipleSelectionHandles
*/
var MultipleSelectionHandles = function (_BasePlugin) {
_inherits(MultipleSelectionHandles, _BasePlugin);
/**
* @param {Object} hotInstance
*/
function MultipleSelectionHandles(hotInstance) {
_classCallCheck(this, MultipleSelectionHandles);
/**
* @type {Array}
*/
var _this2 = _possibleConstructorReturn(this, (MultipleSelectionHandles.__proto__ || Object.getPrototypeOf(MultipleSelectionHandles)).call(this, hotInstance));
_this2.dragged = [];
/**
* Instance of EventManager.
*
* @type {EventManager}
*/
_this2.eventManager = null;
/**
* @type {null}
*/
_this2.lastSetCell = null;
return _this2;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(MultipleSelectionHandles, [{
key: 'isEnabled',
value: function isEnabled() {
return (0, _browser.isMobileBrowser)();
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
if (this.enabled) {
return;
}
if (!this.eventManager) {
this.eventManager = new _eventManager2.default(this);
}
this.registerListeners();
_get(MultipleSelectionHandles.prototype.__proto__ || Object.getPrototypeOf(MultipleSelectionHandles.prototype), 'enablePlugin', this).call(this);
}
/**
* Bind the touch events
* @private
*/
}, {
key: 'registerListeners',
value: function registerListeners() {
var _this = this;
function removeFromDragged(query) {
if (_this.dragged.length === 1) {
// clear array
_this.dragged.splice(0, _this.dragged.length);
return true;
}
var entryPosition = _this.dragged.indexOf(query);
if (entryPosition == -1) {
return false;
} else if (entryPosition === 0) {
_this.dragged = _this.dragged.slice(0, 1);
} else if (entryPosition == 1) {
_this.dragged = _this.dragged.slice(-1);
}
}
this.eventManager.addEventListener(this.hot.rootElement, 'touchstart', function (event) {
var selectedRange = void 0;
if ((0, _element.hasClass)(event.target, 'topLeftSelectionHandle-HitArea')) {
selectedRange = _this.hot.getSelectedRange();
_this.dragged.push('topLeft');
_this.touchStartRange = {
width: selectedRange.getWidth(),
height: selectedRange.getHeight(),
direction: selectedRange.getDirection()
};
event.preventDefault();
return false;
} else if ((0, _element.hasClass)(event.target, 'bottomRightSelectionHandle-HitArea')) {
selectedRange = _this.hot.getSelectedRange();
_this.dragged.push('bottomRight');
_this.touchStartRange = {
width: selectedRange.getWidth(),
height: selectedRange.getHeight(),
direction: selectedRange.getDirection()
};
event.preventDefault();
return false;
}
});
this.eventManager.addEventListener(this.hot.rootElement, 'touchend', function (event) {
if ((0, _element.hasClass)(event.target, 'topLeftSelectionHandle-HitArea')) {
removeFromDragged.call(_this, 'topLeft');
_this.touchStartRange = void 0;
event.preventDefault();
return false;
} else if ((0, _element.hasClass)(event.target, 'bottomRightSelectionHandle-HitArea')) {
removeFromDragged.call(_this, 'bottomRight');
_this.touchStartRange = void 0;
event.preventDefault();
return false;
}
});
this.eventManager.addEventListener(this.hot.rootElement, 'touchmove', function (event) {
var scrollTop = (0, _element.getWindowScrollTop)(),
scrollLeft = (0, _element.getWindowScrollLeft)(),
endTarget = void 0,
targetCoords = void 0,
selectedRange = void 0,
rangeWidth = void 0,
rangeHeight = void 0,
rangeDirection = void 0,
newRangeCoords = void 0;
if (_this.dragged.length === 0) {
return;
}
endTarget = document.elementFromPoint(event.touches[0].screenX - scrollLeft, event.touches[0].screenY - scrollTop);
if (!endTarget || endTarget === _this.lastSetCell) {
return;
}
if (endTarget.nodeName == 'TD' || endTarget.nodeName == 'TH') {
targetCoords = _this.hot.getCoords(endTarget);
if (targetCoords.col == -1) {
targetCoords.col = 0;
}
selectedRange = _this.hot.getSelectedRange();
rangeWidth = selectedRange.getWidth();
rangeHeight = selectedRange.getHeight();
rangeDirection = selectedRange.getDirection();
if (rangeWidth == 1 && rangeHeight == 1) {
_this.hot.selection.setRangeEnd(targetCoords);
}
newRangeCoords = _this.getCurrentRangeCoords(selectedRange, targetCoords, _this.touchStartRange.direction, rangeDirection, _this.dragged[0]);
if (newRangeCoords.start !== null) {
_this.hot.selection.setRangeStart(newRangeCoords.start);
}
_this.hot.selection.setRangeEnd(newRangeCoords.end);
_this.lastSetCell = endTarget;
}
event.preventDefault();
});
}
}, {
key: 'getCurrentRangeCoords',
value: function getCurrentRangeCoords(selectedRange, currentTouch, touchStartDirection, currentDirection, draggedHandle) {
var topLeftCorner = selectedRange.getTopLeftCorner(),
bottomRightCorner = selectedRange.getBottomRightCorner(),
bottomLeftCorner = selectedRange.getBottomLeftCorner(),
topRightCorner = selectedRange.getTopRightCorner();
var newCoords = {
start: null,
end: null
};
switch (touchStartDirection) {
case 'NE-SW':
switch (currentDirection) {
case 'NE-SW':
case 'NW-SE':
if (draggedHandle == 'topLeft') {
newCoords = {
start: new _src.CellCoords(currentTouch.row, selectedRange.highlight.col),
end: new _src.CellCoords(bottomLeftCorner.row, currentTouch.col)
};
} else {
newCoords = {
start: new _src.CellCoords(selectedRange.highlight.row, currentTouch.col),
end: new _src.CellCoords(currentTouch.row, topLeftCorner.col)
};
}
break;
case 'SE-NW':
if (draggedHandle == 'bottomRight') {
newCoords = {
start: new _src.CellCoords(bottomRightCorner.row, currentTouch.col),
end: new _src.CellCoords(currentTouch.row, topLeftCorner.col)
};
}
break;
default:
break;
}
break;
case 'NW-SE':
switch (currentDirection) {
case 'NE-SW':
if (draggedHandle == 'topLeft') {
newCoords = {
start: currentTouch,
end: bottomLeftCorner
};
} else {
newCoords.end = currentTouch;
}
break;
case 'NW-SE':
if (draggedHandle == 'topLeft') {
newCoords = {
start: currentTouch,
end: bottomRightCorner
};
} else {
newCoords.end = currentTouch;
}
break;
case 'SE-NW':
if (draggedHandle == 'topLeft') {
newCoords = {
start: currentTouch,
end: topLeftCorner
};
} else {
newCoords.end = currentTouch;
}
break;
case 'SW-NE':
if (draggedHandle == 'topLeft') {
newCoords = {
start: currentTouch,
end: topRightCorner
};
} else {
newCoords.end = currentTouch;
}
break;
default:
break;
}
break;
case 'SW-NE':
switch (currentDirection) {
case 'NW-SE':
if (draggedHandle == 'bottomRight') {
newCoords = {
start: new _src.CellCoords(currentTouch.row, topLeftCorner.col),
end: new _src.CellCoords(bottomLeftCorner.row, currentTouch.col)
};
} else {
newCoords = {
start: new _src.CellCoords(topLeftCorner.row, currentTouch.col),
end: new _src.CellCoords(currentTouch.row, bottomRightCorner.col)
};
}
break;
// case 'NE-SW':
//
// break;
case 'SW-NE':
if (draggedHandle == 'topLeft') {
newCoords = {
start: new _src.CellCoords(selectedRange.highlight.row, currentTouch.col),
end: new _src.CellCoords(currentTouch.row, bottomRightCorner.col)
};
} else {
newCoords = {
start: new _src.CellCoords(currentTouch.row, topLeftCorner.col),
end: new _src.CellCoords(topLeftCorner.row, currentTouch.col)
};
}
break;
case 'SE-NW':
if (draggedHandle == 'bottomRight') {
newCoords = {
start: new _src.CellCoords(currentTouch.row, topRightCorner.col),
end: new _src.CellCoords(topLeftCorner.row, currentTouch.col)
};
} else if (draggedHandle == 'topLeft') {
newCoords = {
start: bottomLeftCorner,
end: currentTouch
};
}
break;
default:
break;
}
break;
case 'SE-NW':
switch (currentDirection) {
case 'NW-SE':
case 'NE-SW':
case 'SW-NE':
if (draggedHandle == 'topLeft') {
newCoords.end = currentTouch;
}
break;
case 'SE-NW':
if (draggedHandle == 'topLeft') {
newCoords.end = currentTouch;
} else {
newCoords = {
start: currentTouch,
end: topLeftCorner
};
}
break;
default:
break;
}
break;
default:
break;
}
return newCoords;
}
/**
* Check if user is currently dragging the handle.
*
* @returns {boolean} Dragging state
*/
}, {
key: 'isDragged',
value: function isDragged() {
return this.dragged.length > 0;
}
}]);
return MultipleSelectionHandles;
}(_base2.default);
(0, _plugins.registerPlugin)('multipleSelectionHandles', MultipleSelectionHandles);
exports.default = MultipleSelectionHandles;
/***/ }),
/* 444 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _jsonPatchDuplex = __webpack_require__(317);
var _jsonPatchDuplex2 = _interopRequireDefault(_jsonPatchDuplex);
var _dataObserver = __webpack_require__(445);
var _dataObserver2 = _interopRequireDefault(_dataObserver);
var _array = __webpack_require__(2);
var _plugins = __webpack_require__(7);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// Handsontable.hooks.register('afterChangesObserved');
/**
* @plugin ObserveChanges
*
* @description
* This plugin allows to observe data source changes.
*
* By default, the plugin is declared as `undefined`, which makes it disabled.
* Enabling this plugin switches the table into one-way data binding where changes are applied into the data source (outside from the table)
* will be automatically reflected in the table.
*
* ```js
* ...
* // as a boolean
* observeChanges: true,
* ...
* ```
*
* To configure this plugin see {@link Options#observeChanges}.
*/
var ObserveChanges = function (_BasePlugin) {
_inherits(ObserveChanges, _BasePlugin);
function ObserveChanges(hotInstance) {
_classCallCheck(this, ObserveChanges);
/**
* Instance of {@link DataObserver}.
*
* @type {DataObserver}
*/
var _this = _possibleConstructorReturn(this, (ObserveChanges.__proto__ || Object.getPrototypeOf(ObserveChanges)).call(this, hotInstance));
_this.observer = null;
return _this;
}
/**
* Check if the plugin is enabled in the handsontable settings.
*
* @returns {Boolean}
*/
_createClass(ObserveChanges, [{
key: 'isEnabled',
value: function isEnabled() {
return this.hot.getSettings().observeChanges;
}
/**
* Enable plugin for this Handsontable instance.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
if (!this.observer) {
this.observer = new _dataObserver2.default(this.hot.getSourceData());
this._exposePublicApi();
}
this.observer.addLocalHook('change', function (patches) {
return _this2.onDataChange(patches);
});
this.addHook('afterCreateRow', function () {
return _this2.onAfterTableAlter();
});
this.addHook('afterRemoveRow', function () {
return _this2.onAfterTableAlter();
});
this.addHook('afterCreateCol', function () {
return _this2.onAfterTableAlter();
});
this.addHook('afterRemoveCol', function () {
return _this2.onAfterTableAlter();
});
this.addHook('afterChange', function (changes, source) {
return _this2.onAfterTableAlter(source);
});
this.addHook('afterLoadData', function (firstRun) {
return _this2.onAfterLoadData(firstRun);
});
_get(ObserveChanges.prototype.__proto__ || Object.getPrototypeOf(ObserveChanges.prototype), 'enablePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
if (this.observer) {
this.observer.destroy();
this.observer = null;
this._deletePublicApi();
}
_get(ObserveChanges.prototype.__proto__ || Object.getPrototypeOf(ObserveChanges.prototype), 'disablePlugin', this).call(this);
}
/**
* Data change observer.
*
* @private
* @param {Array} patches An array of objects which every item defines coordinates where data was changed.
*/
}, {
key: 'onDataChange',
value: function onDataChange(patches) {
var _this3 = this;
if (!this.observer.isPaused()) {
var sourceName = this.pluginName + '.change';
var actions = {
add: function add(patch) {
if (isNaN(patch.col)) {
_this3.hot.runHooks('afterCreateRow', patch.row, 1, sourceName);
} else {
_this3.hot.runHooks('afterCreateCol', patch.col, 1, sourceName);
}
},
remove: function remove(patch) {
if (isNaN(patch.col)) {
_this3.hot.runHooks('afterRemoveRow', patch.row, 1, sourceName);
} else {
_this3.hot.runHooks('afterRemoveCol', patch.col, 1, sourceName);
}
},
replace: function replace(patch) {
_this3.hot.runHooks('afterChange', [patch.row, patch.col, null, patch.value], sourceName);
}
};
(0, _array.arrayEach)(patches, function (patch) {
if (actions[patch.op]) {
actions[patch.op](patch);
}
});
this.hot.render();
}
this.hot.runHooks('afterChangesObserved');
}
/**
* On after table alter listener. Prevents infinity loop between internal and external data changing.
*
* @private
* @param source
*/
}, {
key: 'onAfterTableAlter',
value: function onAfterTableAlter(source) {
var _this4 = this;
if (source !== 'loadData') {
this.observer.pause();
this.hot.addHookOnce('afterChangesObserved', function () {
return _this4.observer.resume();
});
}
}
/**
* On after load data listener.
*
* @private
* @param {Boolean} firstRun `true` if event was fired first time.
*/
}, {
key: 'onAfterLoadData',
value: function onAfterLoadData(firstRun) {
if (!firstRun) {
this.observer.setObservedData(this.hot.getSourceData());
}
}
/**
* Destroy plugin instance.
*/
}, {
key: 'destroy',
value: function destroy() {
if (this.observer) {
this.observer.destroy();
this._deletePublicApi();
}
_get(ObserveChanges.prototype.__proto__ || Object.getPrototypeOf(ObserveChanges.prototype), 'destroy', this).call(this);
}
/**
* Expose plugins methods to the core.
*
* @private
*/
}, {
key: '_exposePublicApi',
value: function _exposePublicApi() {
var _this5 = this;
var hot = this.hot;
hot.pauseObservingChanges = function () {
return _this5.observer.pause();
};
hot.resumeObservingChanges = function () {
return _this5.observer.resume();
};
hot.isPausedObservingChanges = function () {
return _this5.observer.isPaused();
};
}
/**
* Delete all previously exposed methods.
*
* @private
*/
}, {
key: '_deletePublicApi',
value: function _deletePublicApi() {
var hot = this.hot;
delete hot.pauseObservingChanges;
delete hot.resumeObservingChanges;
delete hot.isPausedObservingChanges;
}
}]);
return ObserveChanges;
}(_base2.default);
exports.default = ObserveChanges;
(0, _plugins.registerPlugin)('observeChanges', ObserveChanges);
/***/ }),
/* 445 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _jsonPatchDuplex = __webpack_require__(317);
var _jsonPatchDuplex2 = _interopRequireDefault(_jsonPatchDuplex);
var _localHooks = __webpack_require__(89);
var _localHooks2 = _interopRequireDefault(_localHooks);
var _object = __webpack_require__(1);
var _utils = __webpack_require__(446);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
/**
* @class DataObserver
* @plugin ObserveChanges
*/
var DataObserver = function () {
function DataObserver(observedData) {
_classCallCheck(this, DataObserver);
/**
* Observed source data.
*
* @type {Array}
*/
this.observedData = null;
/**
* JsonPatch observer.
*
* @type {Object}
*/
this.observer = null;
/**
* Flag which determines if observer is paused or not. Paused observer doesn't emit `change` hooks.
*
* @type {Boolean}
* @default false
*/
this.paused = false;
this.setObservedData(observedData);
}
/**
* Set data to observe.
*
* @param {*} observedData
*/
_createClass(DataObserver, [{
key: 'setObservedData',
value: function setObservedData(observedData) {
var _this = this;
if (this.observer) {
_jsonPatchDuplex2.default.unobserve(this.observedData, this.observer);
}
this.observedData = observedData;
this.observer = _jsonPatchDuplex2.default.observe(this.observedData, function (patches) {
return _this.onChange(patches);
});
}
/**
* Check if observer was paused.
*
* @returns {Boolean}
*/
}, {
key: 'isPaused',
value: function isPaused() {
return this.paused;
}
/**
* Pause observer (stop emitting all detected changes).
*/
}, {
key: 'pause',
value: function pause() {
this.paused = true;
}
/**
* Resume observer (emit all detected changes).
*/
}, {
key: 'resume',
value: function resume() {
this.paused = false;
}
/**
* JsonPatch on change listener.
*
* @private
* @param {Array} patches An array of object passed from jsonpatch.
*/
}, {
key: 'onChange',
value: function onChange(patches) {
this.runLocalHooks('change', (0, _utils.cleanPatches)(patches));
}
/**
* Destroy observer instance.
*/
}, {
key: 'destroy',
value: function destroy() {
_jsonPatchDuplex2.default.unobserve(this.observedData, this.observer);
this.observedData = null;
this.observer = null;
}
}]);
return DataObserver;
}();
(0, _object.mixin)(DataObserver, _localHooks2.default);
exports.default = DataObserver;
/***/ }),
/* 446 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
exports.cleanPatches = cleanPatches;
exports.parsePath = parsePath;
var _array = __webpack_require__(2);
/**
* Clean and extend patches from jsonpatch observer.
*
* @param {Array} patches
* @returns {Array}
*/
function cleanPatches(patches) {
var newOrRemovedColumns = [];
/**
* If observeChanges uses native Object.observe method, then it produces patches for length property. Filter them.
* If path can't be parsed. Filter it.
*/
patches = (0, _array.arrayFilter)(patches, function (patch) {
if (/[/]length/ig.test(patch.path)) {
return false;
}
if (!parsePath(patch.path)) {
return false;
}
return true;
});
/**
* Extend patches with changed cells coords
*/
patches = (0, _array.arrayMap)(patches, function (patch) {
var coords = parsePath(patch.path);
patch.row = coords.row;
patch.col = coords.col;
return patch;
});
/**
* Removing or adding column will produce one patch for each table row.
* Leaves only one patch for each column add/remove operation.
*/
patches = (0, _array.arrayFilter)(patches, function (patch) {
if (['add', 'remove'].indexOf(patch.op) !== -1 && !isNaN(patch.col)) {
if (newOrRemovedColumns.indexOf(patch.col) !== -1) {
return false;
}
newOrRemovedColumns.push(patch.col);
}
return true;
});
newOrRemovedColumns.length = 0;
return patches;
}
/**
* Extract coordinates from path where data was changed.
*
* @param {String} path Path describing where data was changed.
* @returns {Object|null} Returns an object with `row` and `col` properties or `null` if path doesn't have necessary information.
*/
function parsePath(path) {
var match = path.match(/^\/(\d+)\/?(.*)?$/);
if (!match) {
return null;
}
var _match = _slicedToArray(match, 3),
row = _match[1],
column = _match[2];
return {
row: parseInt(row, 10),
col: /^\d*$/.test(column) ? parseInt(column, 10) : column
};
}
/***/ }),
/* 447 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _plugins = __webpack_require__(7);
var _object = __webpack_require__(1);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Storage(prefix) {
var savedKeys;
var saveSavedKeys = function saveSavedKeys() {
window.localStorage[prefix + '__persistentStateKeys'] = JSON.stringify(savedKeys);
};
var loadSavedKeys = function loadSavedKeys() {
var keysJSON = window.localStorage[prefix + '__persistentStateKeys'];
var keys = typeof keysJSON == 'string' ? JSON.parse(keysJSON) : void 0;
savedKeys = keys ? keys : [];
};
var clearSavedKeys = function clearSavedKeys() {
savedKeys = [];
saveSavedKeys();
};
loadSavedKeys();
this.saveValue = function (key, value) {
window.localStorage[prefix + '_' + key] = JSON.stringify(value);
if (savedKeys.indexOf(key) == -1) {
savedKeys.push(key);
saveSavedKeys();
}
};
this.loadValue = function (key, defaultValue) {
key = typeof key === 'undefined' ? defaultValue : key;
var value = window.localStorage[prefix + '_' + key];
return typeof value == 'undefined' ? void 0 : JSON.parse(value);
};
this.reset = function (key) {
window.localStorage.removeItem(prefix + '_' + key);
};
this.resetAll = function () {
for (var index = 0; index < savedKeys.length; index++) {
window.localStorage.removeItem(prefix + '_' + savedKeys[index]);
}
clearSavedKeys();
};
}
/**
* @private
* @class PersistentState
* @plugin PersistentState
*/
function HandsontablePersistentState() {
var plugin = this;
this.init = function () {
var instance = this,
pluginSettings = instance.getSettings().persistentState;
plugin.enabled = !!pluginSettings;
if (!plugin.enabled) {
removeHooks.call(instance);
return;
}
if (!instance.storage) {
instance.storage = new Storage(instance.rootElement.id);
}
instance.resetState = plugin.resetValue;
addHooks.call(instance);
};
this.saveValue = function (key, value) {
var instance = this;
instance.storage.saveValue(key, value);
};
this.loadValue = function (key, saveTo) {
var instance = this;
saveTo.value = instance.storage.loadValue(key);
};
this.resetValue = function (key) {
var instance = this;
if (typeof key === 'undefined') {
instance.storage.resetAll();
} else {
instance.storage.reset(key);
}
};
var hooks = {
persistentStateSave: plugin.saveValue,
persistentStateLoad: plugin.loadValue,
persistentStateReset: plugin.resetValue
};
for (var hookName in hooks) {
if ((0, _object.hasOwnProperty)(hooks, hookName)) {
_pluginHooks2.default.getSingleton().register(hookName);
}
}
function addHooks() {
var instance = this;
for (var hookName in hooks) {
if ((0, _object.hasOwnProperty)(hooks, hookName)) {
instance.addHook(hookName, hooks[hookName]);
}
}
}
function removeHooks() {
var instance = this;
for (var hookName in hooks) {
if ((0, _object.hasOwnProperty)(hooks, hookName)) {
instance.removeHook(hookName, hooks[hookName]);
}
}
}
}
var htPersistentState = new HandsontablePersistentState();
_pluginHooks2.default.getSingleton().add('beforeInit', htPersistentState.init);
_pluginHooks2.default.getSingleton().add('afterUpdateSettings', htPersistentState.init);
exports.default = HandsontablePersistentState;
/***/ }),
/* 448 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _element = __webpack_require__(0);
var _renderers = __webpack_require__(9);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @private
* @plugin Search
*/
function Search(instance) {
this.query = function (queryStr, callback, queryMethod) {
var rowCount = instance.countRows();
var colCount = instance.countCols();
var queryResult = [];
if (!callback) {
callback = Search.global.getDefaultCallback();
}
if (!queryMethod) {
queryMethod = Search.global.getDefaultQueryMethod();
}
for (var rowIndex = 0; rowIndex < rowCount; rowIndex++) {
for (var colIndex = 0; colIndex < colCount; colIndex++) {
var cellData = instance.getDataAtCell(rowIndex, colIndex);
var cellProperties = instance.getCellMeta(rowIndex, colIndex);
var cellCallback = cellProperties.search.callback || callback;
var cellQueryMethod = cellProperties.search.queryMethod || queryMethod;
var testResult = cellQueryMethod(queryStr, cellData);
if (testResult) {
var singleResult = {
row: rowIndex,
col: colIndex,
data: cellData
};
queryResult.push(singleResult);
}
if (cellCallback) {
cellCallback(instance, rowIndex, colIndex, cellData, testResult);
}
}
}
return queryResult;
};
};
Search.DEFAULT_CALLBACK = function (instance, row, col, data, testResult) {
instance.getCellMeta(row, col).isSearchResult = testResult;
};
Search.DEFAULT_QUERY_METHOD = function (query, value) {
if (typeof query == 'undefined' || query == null || !query.toLowerCase || query.length === 0) {
return false;
}
if (typeof value == 'undefined' || value == null) {
return false;
}
return value.toString().toLowerCase().indexOf(query.toLowerCase()) != -1;
};
Search.DEFAULT_SEARCH_RESULT_CLASS = 'htSearchResult';
Search.global = function () {
var defaultCallback = Search.DEFAULT_CALLBACK;
var defaultQueryMethod = Search.DEFAULT_QUERY_METHOD;
var defaultSearchResultClass = Search.DEFAULT_SEARCH_RESULT_CLASS;
return {
getDefaultCallback: function getDefaultCallback() {
return defaultCallback;
},
setDefaultCallback: function setDefaultCallback(newDefaultCallback) {
defaultCallback = newDefaultCallback;
},
getDefaultQueryMethod: function getDefaultQueryMethod() {
return defaultQueryMethod;
},
setDefaultQueryMethod: function setDefaultQueryMethod(newDefaultQueryMethod) {
defaultQueryMethod = newDefaultQueryMethod;
},
getDefaultSearchResultClass: function getDefaultSearchResultClass() {
return defaultSearchResultClass;
},
setDefaultSearchResultClass: function setDefaultSearchResultClass(newSearchResultClass) {
defaultSearchResultClass = newSearchResultClass;
}
};
}();
function SearchCellDecorator(instance, TD, row, col, prop, value, cellProperties) {
var searchResultClass = cellProperties.search !== null && _typeof(cellProperties.search) == 'object' && cellProperties.search.searchResultClass || Search.global.getDefaultSearchResultClass();
if (cellProperties.isSearchResult) {
(0, _element.addClass)(TD, searchResultClass);
} else {
(0, _element.removeClass)(TD, searchResultClass);
}
};
var originalBaseRenderer = (0, _renderers.getRenderer)('base');
(0, _renderers.registerRenderer)('base', function (instance, TD, row, col, prop, value, cellProperties) {
originalBaseRenderer.apply(this, arguments);
SearchCellDecorator.apply(this, arguments);
});
function init() {
var instance = this;
var pluginEnabled = !!instance.getSettings().search;
if (pluginEnabled) {
instance.search = new Search(instance);
} else {
delete instance.search;
}
}
_pluginHooks2.default.getSingleton().add('afterInit', init);
_pluginHooks2.default.getSingleton().add('afterUpdateSettings', init);
exports.default = Search;
/***/ }),
/* 449 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _element = __webpack_require__(0);
var _array = __webpack_require__(2);
var _base = __webpack_require__(14);
var _base2 = _interopRequireDefault(_base);
var _plugins = __webpack_require__(7);
var _feature = __webpack_require__(39);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/**
* @private
* @plugin TouchScroll
* @class TouchScroll
*/
var TouchScroll = function (_BasePlugin) {
_inherits(TouchScroll, _BasePlugin);
function TouchScroll(hotInstance) {
_classCallCheck(this, TouchScroll);
/**
* Collection of scrollbars to update.
*
* @type {Array}
*/
var _this = _possibleConstructorReturn(this, (TouchScroll.__proto__ || Object.getPrototypeOf(TouchScroll)).call(this, hotInstance));
_this.scrollbars = [];
/**
* Collection of overlays to update.
*
* @type {Array}
*/
_this.clones = [];
/**
* Flag which determines if collection of overlays should be refilled on every table render.
*
* @type {Boolean}
* @default false
*/
_this.lockedCollection = false;
/**
* Flag which determines if walkontable should freeze overlays while scrolling.
*
* @type {Boolean}
* @default false
*/
_this.freezeOverlays = false;
return _this;
}
/**
* Check if plugin is enabled.
*
* @returns {Boolean}
*/
_createClass(TouchScroll, [{
key: 'isEnabled',
value: function isEnabled() {
return (0, _feature.isTouchSupported)();
}
/**
* Enable the plugin.
*/
}, {
key: 'enablePlugin',
value: function enablePlugin() {
var _this2 = this;
if (this.enabled) {
return;
}
this.addHook('afterRender', function () {
return _this2.onAfterRender();
});
this.registerEvents();
_get(TouchScroll.prototype.__proto__ || Object.getPrototypeOf(TouchScroll.prototype), 'enablePlugin', this).call(this);
}
/**
* Updates the plugin to use the latest options you have specified.
*/
}, {
key: 'updatePlugin',
value: function updatePlugin() {
this.lockedCollection = false;
_get(TouchScroll.prototype.__proto__ || Object.getPrototypeOf(TouchScroll.prototype), 'updatePlugin', this).call(this);
}
/**
* Disable plugin for this Handsontable instance.
*/
}, {
key: 'disablePlugin',
value: function disablePlugin() {
_get(TouchScroll.prototype.__proto__ || Object.getPrototypeOf(TouchScroll.prototype), 'disablePlugin', this).call(this);
}
/**
* Register all necessary events.
*
* @private
*/
}, {
key: 'registerEvents',
value: function registerEvents() {
var _this3 = this;
this.addHook('beforeTouchScroll', function () {
return _this3.onBeforeTouchScroll();
});
this.addHook('afterMomentumScroll', function () {
return _this3.onAfterMomentumScroll();
});
}
/**
* After render listener.
*
* @private
*/
}, {
key: 'onAfterRender',
value: function onAfterRender() {
if (this.lockedCollection) {
return;
}
var _hot$view$wt$wtOverla = this.hot.view.wt.wtOverlays,
topOverlay = _hot$view$wt$wtOverla.topOverlay,
bottomOverlay = _hot$view$wt$wtOverla.bottomOverlay,
leftOverlay = _hot$view$wt$wtOverla.leftOverlay,
topLeftCornerOverlay = _hot$view$wt$wtOverla.topLeftCornerOverlay,
bottomLeftCornerOverlay = _hot$view$wt$wtOverla.bottomLeftCornerOverlay;
this.lockedCollection = true;
this.scrollbars.length = 0;
this.scrollbars.push(topOverlay);
if (bottomOverlay.clone) {
this.scrollbars.push(bottomOverlay);
}
this.scrollbars.push(leftOverlay);
if (topLeftCornerOverlay) {
this.scrollbars.push(topLeftCornerOverlay);
}
if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {
this.scrollbars.push(bottomLeftCornerOverlay);
}
this.clones.length = 0;
if (topOverlay.needFullRender) {
this.clones.push(topOverlay.clone.wtTable.holder.parentNode);
}
if (bottomOverlay.needFullRender) {
this.clones.push(bottomOverlay.clone.wtTable.holder.parentNode);
}
if (leftOverlay.needFullRender) {
this.clones.push(leftOverlay.clone.wtTable.holder.parentNode);
}
if (topLeftCornerOverlay) {
this.clones.push(topLeftCornerOverlay.clone.wtTable.holder.parentNode);
}
if (bottomLeftCornerOverlay && bottomLeftCornerOverlay.clone) {
this.clones.push(bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);
}
}
/**
* Touch scroll listener.
*
* @private
*/
}, {
key: 'onBeforeTouchScroll',
value: function onBeforeTouchScroll() {
this.freezeOverlays = true;
(0, _array.arrayEach)(this.clones, function (clone) {
(0, _element.addClass)(clone, 'hide-tween');
});
}
/**
* After momentum scroll listener.
*
* @private
*/
}, {
key: 'onAfterMomentumScroll',
value: function onAfterMomentumScroll() {
var _this4 = this;
this.freezeOverlays = false;
(0, _array.arrayEach)(this.clones, function (clone) {
(0, _element.removeClass)(clone, 'hide-tween');
(0, _element.addClass)(clone, 'show-tween');
});
setTimeout(function () {
(0, _array.arrayEach)(_this4.clones, function (clone) {
(0, _element.removeClass)(clone, 'show-tween');
});
}, 400);
(0, _array.arrayEach)(this.scrollbars, function (scrollbar) {
scrollbar.refresh();
scrollbar.resetFixedPosition();
});
this.hot.view.wt.wtOverlays.syncScrollWithMaster();
}
}]);
return TouchScroll;
}(_base2.default);
(0, _plugins.registerPlugin)('touchScroll', TouchScroll);
exports.default = TouchScroll;
/***/ }),
/* 450 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _pluginHooks = __webpack_require__(11);
var _pluginHooks2 = _interopRequireDefault(_pluginHooks);
var _array = __webpack_require__(2);
var _number = __webpack_require__(6);
var _object = __webpack_require__(1);
var _event = __webpack_require__(12);
var _src = __webpack_require__(15);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @description
* Handsontable UndoRedo plugin. It allows to undo and redo certain actions done in the table.
* Please note, that not all actions are currently undo-able.
*
* @example
* ```js
* ...
* undo: true
* ...
* ```
* @class UndoRedo
* @plugin UndoRedo
*/
/**
* Handsontable UndoRedo class
*/
function UndoRedo(instance) {
var plugin = this;
this.instance = instance;
this.doneActions = [];
this.undoneActions = [];
this.ignoreNewActions = false;
instance.addHook('afterChange', function (changes, source) {
if (changes && source !== 'UndoRedo.undo' && source !== 'UndoRedo.redo') {
plugin.done(new UndoRedo.ChangeAction(changes));
}
});
instance.addHook('afterCreateRow', function (index, amount, source) {
if (source === 'UndoRedo.undo' || source === 'UndoRedo.undo' || source === 'auto') {
return;
}
var action = new UndoRedo.CreateRowAction(index, amount);
plugin.done(action);
});
instance.addHook('beforeRemoveRow', function (index, amount, logicRows, source) {
if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {
return;
}
var originalData = plugin.instance.getSourceDataArray();
index = (originalData.length + index) % originalData.length;
var removedData = (0, _object.deepClone)(originalData.slice(index, index + amount));
plugin.done(new UndoRedo.RemoveRowAction(index, removedData));
});
instance.addHook('afterCreateCol', function (index, amount, source) {
if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {
return;
}
plugin.done(new UndoRedo.CreateColumnAction(index, amount));
});
instance.addHook('beforeRemoveCol', function (index, amount, logicColumns, source) {
if (source === 'UndoRedo.undo' || source === 'UndoRedo.redo' || source === 'auto') {
return;
}
var originalData = plugin.instance.getSourceDataArray();
index = (plugin.instance.countCols() + index) % plugin.instance.countCols();
var removedData = [];
var headers = [];
var indexes = [];
(0, _number.rangeEach)(originalData.length - 1, function (i) {
var column = [];
var origRow = originalData[i];
(0, _number.rangeEach)(index, index + (amount - 1), function (j) {
column.push(origRow[instance.runHooks('modifyCol', j)]);
});
removedData.push(column);
});
(0, _number.rangeEach)(amount - 1, function (i) {
indexes.push(instance.runHooks('modifyCol', index + i));
});
if (Array.isArray(instance.getSettings().colHeaders)) {
(0, _number.rangeEach)(amount - 1, function (i) {
headers.push(instance.getSettings().colHeaders[instance.runHooks('modifyCol', index + i)] || null);
});
}
var manualColumnMovePlugin = plugin.instance.getPlugin('manualColumnMove');
var columnsMap = manualColumnMovePlugin.isEnabled() ? manualColumnMovePlugin.columnsMapper.__arrayMap : [];
var action = new UndoRedo.RemoveColumnAction(index, indexes, removedData, headers, columnsMap);
plugin.done(action);
});
instance.addHook('beforeCellAlignment', function (stateBefore, range, type, alignment) {
var action = new UndoRedo.CellAlignmentAction(stateBefore, range, type, alignment);
plugin.done(action);
});
instance.addHook('beforeFilter', function (conditionsStack) {
plugin.done(new UndoRedo.FiltersAction(conditionsStack));
});
instance.addHook('beforeRowMove', function (movedRows, target) {
if (movedRows === false) {
return;
}
plugin.done(new UndoRedo.RowMoveAction(movedRows, target));
});
};
UndoRedo.prototype.done = function (action) {
if (!this.ignoreNewActions) {
this.doneActions.push(action);
this.undoneActions.length = 0;
}
};
/**
* Undo last edit.
*
* @function undo
* @memberof UndoRedo#
*/
UndoRedo.prototype.undo = function () {
if (this.isUndoAvailable()) {
var action = this.doneActions.pop();
var actionClone = (0, _object.deepClone)(action);
var instance = this.instance;
var continueAction = instance.runHooks('beforeUndo', actionClone);
if (continueAction === false) {
return;
}
this.ignoreNewActions = true;
var that = this;
action.undo(this.instance, function () {
that.ignoreNewActions = false;
that.undoneActions.push(action);
});
instance.runHooks('afterUndo', actionClone);
}
};
/**
* Redo edit (used to reverse an undo).
*
* @function redo
* @memberof UndoRedo#
*/
UndoRedo.prototype.redo = function () {
if (this.isRedoAvailable()) {
var action = this.undoneActions.pop();
var actionClone = (0, _object.deepClone)(action);
var instance = this.instance;
var continueAction = instance.runHooks('beforeRedo', actionClone);
if (continueAction === false) {
return;
}
this.ignoreNewActions = true;
var that = this;
action.redo(this.instance, function () {
that.ignoreNewActions = false;
that.doneActions.push(action);
});
instance.runHooks('afterRedo', actionClone);
}
};
/**
* Check if undo action is available.
*
* @function isUndoAvailable
* @memberof UndoRedo#
* @return {Boolean} Return `true` if undo can be performed, `false` otherwise
*/
UndoRedo.prototype.isUndoAvailable = function () {
return this.doneActions.length > 0;
};
/**
* Check if redo action is available.
*
* @function isRedoAvailable
* @memberof UndoRedo#
* @return {Boolean} Return `true` if redo can be performed, `false` otherwise.
*/
UndoRedo.prototype.isRedoAvailable = function () {
return this.undoneActions.length > 0;
};
/**
* Clears undo history.
*
* @function clear
* @memberof UndoRedo#
*/
UndoRedo.prototype.clear = function () {
this.doneActions.length = 0;
this.undoneActions.length = 0;
};
UndoRedo.Action = function () {};
UndoRedo.Action.prototype.undo = function () {};
UndoRedo.Action.prototype.redo = function () {};
/**
* Change action.
*/
UndoRedo.ChangeAction = function (changes) {
this.changes = changes;
this.actionType = 'change';
};
(0, _object.inherit)(UndoRedo.ChangeAction, UndoRedo.Action);
UndoRedo.ChangeAction.prototype.undo = function (instance, undoneCallback) {
var data = (0, _object.deepClone)(this.changes),
emptyRowsAtTheEnd = instance.countEmptyRows(true),
emptyColsAtTheEnd = instance.countEmptyCols(true);
for (var i = 0, len = data.length; i < len; i++) {
data[i].splice(3, 1);
}
instance.addHookOnce('afterChange', undoneCallback);
instance.setDataAtRowProp(data, null, null, 'UndoRedo.undo');
for (var _i = 0, _len = data.length; _i < _len; _i++) {
if (instance.getSettings().minSpareRows && data[_i][0] + 1 + instance.getSettings().minSpareRows === instance.countRows() && emptyRowsAtTheEnd == instance.getSettings().minSpareRows) {
instance.alter('remove_row', parseInt(data[_i][0] + 1, 10), instance.getSettings().minSpareRows);
instance.undoRedo.doneActions.pop();
}
if (instance.getSettings().minSpareCols && data[_i][1] + 1 + instance.getSettings().minSpareCols === instance.countCols() && emptyColsAtTheEnd == instance.getSettings().minSpareCols) {
instance.alter('remove_col', parseInt(data[_i][1] + 1, 10), instance.getSettings().minSpareCols);
instance.undoRedo.doneActions.pop();
}
}
};
UndoRedo.ChangeAction.prototype.redo = function (instance, onFinishCallback) {
var data = (0, _object.deepClone)(this.changes);
for (var i = 0, len = data.length; i < len; i++) {
data[i].splice(2, 1);
}
instance.addHookOnce('afterChange', onFinishCallback);
instance.setDataAtRowProp(data, null, null, 'UndoRedo.redo');
};
/**
* Create row action.
*/
UndoRedo.CreateRowAction = function (index, amount) {
this.index = index;
this.amount = amount;
this.actionType = 'insert_row';
};
(0, _object.inherit)(UndoRedo.CreateRowAction, UndoRedo.Action);
UndoRedo.CreateRowAction.prototype.undo = function (instance, undoneCallback) {
var rowCount = instance.countRows(),
minSpareRows = instance.getSettings().minSpareRows;
if (this.index >= rowCount && this.index - minSpareRows < rowCount) {
this.index -= minSpareRows; // work around the situation where the needed row was removed due to an 'undo' of a made change
}
instance.addHookOnce('afterRemoveRow', undoneCallback);
instance.alter('remove_row', this.index, this.amount, 'UndoRedo.undo');
};
UndoRedo.CreateRowAction.prototype.redo = function (instance, redoneCallback) {
instance.addHookOnce('afterCreateRow', redoneCallback);
instance.alter('insert_row', this.index, this.amount, 'UndoRedo.redo');
};
/**
* Remove row action.
*/
UndoRedo.RemoveRowAction = function (index, data) {
this.index = index;
this.data = data;
this.actionType = 'remove_row';
};
(0, _object.inherit)(UndoRedo.RemoveRowAction, UndoRedo.Action);
UndoRedo.RemoveRowAction.prototype.undo = function (instance, undoneCallback) {
instance.alter('insert_row', this.index, this.data.length, 'UndoRedo.undo');
instance.addHookOnce('afterRender', undoneCallback);
instance.populateFromArray(this.index, 0, this.data, void 0, void 0, 'UndoRedo.undo');
};
UndoRedo.RemoveRowAction.prototype.redo = function (instance, redoneCallback) {
instance.addHookOnce('afterRemoveRow', redoneCallback);
instance.alter('remove_row', this.index, this.data.length, 'UndoRedo.redo');
};
/**
* Create column action.
*/
UndoRedo.CreateColumnAction = function (index, amount) {
this.index = index;
this.amount = amount;
this.actionType = 'insert_col';
};
(0, _object.inherit)(UndoRedo.CreateColumnAction, UndoRedo.Action);
UndoRedo.CreateColumnAction.prototype.undo = function (instance, undoneCallback) {
instance.addHookOnce('afterRemoveCol', undoneCallback);
instance.alter('remove_col', this.index, this.amount, 'UndoRedo.undo');
};
UndoRedo.CreateColumnAction.prototype.redo = function (instance, redoneCallback) {
instance.addHookOnce('afterCreateCol', redoneCallback);
instance.alter('insert_col', this.index, this.amount, 'UndoRedo.redo');
};
/**
* Remove column action.
*/
UndoRedo.RemoveColumnAction = function (index, indexes, data, headers, columnPositions) {
this.index = index;
this.indexes = indexes;
this.data = data;
this.amount = this.data[0].length;
this.headers = headers;
this.columnPositions = columnPositions.slice(0);
this.actionType = 'remove_col';
};
(0, _object.inherit)(UndoRedo.RemoveColumnAction, UndoRedo.Action);
UndoRedo.RemoveColumnAction.prototype.undo = function (instance, undoneCallback) {
var _this = this;
var row = void 0;
var ascendingIndexes = this.indexes.slice(0).sort();
var sortByIndexes = function sortByIndexes(elem, j, arr) {
return arr[_this.indexes.indexOf(ascendingIndexes[j])];
};
var sortedData = [];
(0, _number.rangeEach)(this.data.length - 1, function (i) {
sortedData[i] = (0, _array.arrayMap)(_this.data[i], sortByIndexes);
});
var sortedHeaders = [];
sortedHeaders = (0, _array.arrayMap)(this.headers, sortByIndexes);
var changes = [];
// TODO: Temporary hook for undo/redo mess
instance.runHooks('beforeCreateCol', this.indexes[0], this.indexes[this.indexes.length - 1], 'UndoRedo.undo');
(0, _number.rangeEach)(this.data.length - 1, function (i) {
row = instance.getSourceDataAtRow(i);
(0, _number.rangeEach)(ascendingIndexes.length - 1, function (j) {
row.splice(ascendingIndexes[j], 0, sortedData[i][j]);
changes.push([i, ascendingIndexes[j], null, sortedData[i][j]]);
});
});
// TODO: Temporary hook for undo/redo mess
if (instance.getPlugin('formulas')) {
instance.getPlugin('formulas').onAfterSetDataAtCell(changes);
}
if (typeof this.headers !== 'undefined') {
(0, _number.rangeEach)(sortedHeaders.length - 1, function (j) {
instance.getSettings().colHeaders.splice(ascendingIndexes[j], 0, sortedHeaders[j]);
});
}
if (instance.getPlugin('manualColumnMove')) {
instance.getPlugin('manualColumnMove').columnsMapper.__arrayMap = this.columnPositions;
}
instance.addHookOnce('afterRender', undoneCallback);
// TODO: Temporary hook for undo/redo mess
instance.runHooks('afterCreateCol', this.indexes[0], this.indexes[this.indexes.length - 1], 'UndoRedo.undo');
if (instance.getPlugin('formulas')) {
instance.getPlugin('formulas').recalculateFull();
}
instance.render();
};
UndoRedo.RemoveColumnAction.prototype.redo = function (instance, redoneCallback) {
instance.addHookOnce('afterRemoveCol', redoneCallback);
instance.alter('remove_col', this.index, this.amount, 'UndoRedo.redo');
};
/**
* Cell alignment action.
*/
UndoRedo.CellAlignmentAction = function (stateBefore, range, type, alignment) {
this.stateBefore = stateBefore;
this.range = range;
this.type = type;
this.alignment = alignment;
};
UndoRedo.CellAlignmentAction.prototype.undo = function (instance, undoneCallback) {
if (!instance.getPlugin('contextMenu').isEnabled()) {
return;
}
for (var row = this.range.from.row; row <= this.range.to.row; row++) {
for (var col = this.range.from.col; col <= this.range.to.col; col++) {
instance.setCellMeta(row, col, 'className', this.stateBefore[row][col] || ' htLeft');
}
}
instance.addHookOnce('afterRender', undoneCallback);
instance.render();
};
UndoRedo.CellAlignmentAction.prototype.redo = function (instance, undoneCallback) {
if (!instance.getPlugin('contextMenu').isEnabled()) {
return;
}
instance.selectCell(this.range.from.row, this.range.from.col, this.range.to.row, this.range.to.col);
instance.getPlugin('contextMenu').executeCommand('alignment:' + this.alignment.replace('ht', '').toLowerCase());
instance.addHookOnce('afterRender', undoneCallback);
instance.render();
};
/**
* Filters action.
*/
UndoRedo.FiltersAction = function (conditionsStack) {
this.conditionsStack = conditionsStack;
this.actionType = 'filter';
};
(0, _object.inherit)(UndoRedo.FiltersAction, UndoRedo.Action);
UndoRedo.FiltersAction.prototype.undo = function (instance, undoneCallback) {
var filters = instance.getPlugin('filters');
instance.addHookOnce('afterRender', undoneCallback);
filters.conditionCollection.importAllConditions(this.conditionsStack.slice(0, this.conditionsStack.length - 1));
filters.filter();
};
UndoRedo.FiltersAction.prototype.redo = function (instance, redoneCallback) {
var filters = instance.getPlugin('filters');
instance.addHookOnce('afterRender', redoneCallback);
filters.conditionCollection.importAllConditions(this.conditionsStack);
filters.filter();
};
/**
* ManualRowMove action.
* @TODO: removeRow undo should works on logical index
*/
UndoRedo.RowMoveAction = function (movedRows, target) {
this.rows = movedRows.slice();
this.target = target;
};
(0, _object.inherit)(UndoRedo.RowMoveAction, UndoRedo.Action);
UndoRedo.RowMoveAction.prototype.undo = function (instance, undoneCallback) {
var manualRowMove = instance.getPlugin('manualRowMove');
instance.addHookOnce('afterRender', undoneCallback);
var mod = this.rows[0] < this.target ? -1 * this.rows.length : 0;
var newTarget = this.rows[0] > this.target ? this.rows[0] + this.rows.length : this.rows[0];
var newRows = [];
var rowsLen = this.rows.length + mod;
for (var i = mod; i < rowsLen; i++) {
newRows.push(this.target + i);
}
manualRowMove.moveRows(newRows.slice(), newTarget);
instance.render();
instance.selection.setRangeStartOnly(new _src.CellCoords(this.rows[0], 0));
instance.selection.setRangeEnd(new _src.CellCoords(this.rows[this.rows.length - 1], instance.countCols() - 1));
};
UndoRedo.RowMoveAction.prototype.redo = function (instance, redoneCallback) {
var manualRowMove = instance.getPlugin('manualRowMove');
instance.addHookOnce('afterRender', redoneCallback);
manualRowMove.moveRows(this.rows.slice(), this.target);
instance.render();
var startSelection = this.rows[0] < this.target ? this.target - this.rows.length : this.target;
instance.selection.setRangeStartOnly(new _src.CellCoords(startSelection, 0));
instance.selection.setRangeEnd(new _src.CellCoords(startSelection + this.rows.length - 1, instance.countCols() - 1));
};
function init() {
var instance = this;
var pluginEnabled = typeof instance.getSettings().undo == 'undefined' || instance.getSettings().undo;
if (pluginEnabled) {
if (!instance.undoRedo) {
/**
* Instance of Handsontable.UndoRedo Plugin {@link Handsontable.UndoRedo}
*
* @alias undoRedo
* @memberof! Handsontable.Core#
* @type {UndoRedo}
*/
instance.undoRedo = new UndoRedo(instance);
exposeUndoRedoMethods(instance);
instance.addHook('beforeKeyDown', onBeforeKeyDown);
instance.addHook('afterChange', onAfterChange);
}
} else if (instance.undoRedo) {
delete instance.undoRedo;
removeExposedUndoRedoMethods(instance);
instance.removeHook('beforeKeyDown', onBeforeKeyDown);
instance.removeHook('afterChange', onAfterChange);
}
}
function onBeforeKeyDown(event) {
var instance = this;
var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey;
if (ctrlDown) {
if (event.keyCode === 89 || event.shiftKey && event.keyCode === 90) {
// CTRL + Y or CTRL + SHIFT + Z
instance.undoRedo.redo();
(0, _event.stopImmediatePropagation)(event);
} else if (event.keyCode === 90) {
// CTRL + Z
instance.undoRedo.undo();
(0, _event.stopImmediatePropagation)(event);
}
}
}
function onAfterChange(changes, source) {
var instance = this;
if (source === 'loadData') {
return instance.undoRedo.clear();
}
}
function exposeUndoRedoMethods(instance) {
/**
* {@link UndoRedo#undo}
* @alias undo
* @memberof! Handsontable.Core#
*/
instance.undo = function () {
return instance.undoRedo.undo();
};
/**
* {@link UndoRedo#redo}
* @alias redo
* @memberof! Handsontable.Core#
*/
instance.redo = function () {
return instance.undoRedo.redo();
};
/**
* {@link UndoRedo#isUndoAvailable}
* @alias isUndoAvailable
* @memberof! Handsontable.Core#
*/
instance.isUndoAvailable = function () {
return instance.undoRedo.isUndoAvailable();
};
/**
* {@link UndoRedo#isRedoAvailable}
* @alias isRedoAvailable
* @memberof! Handsontable.Core#
*/
instance.isRedoAvailable = function () {
return instance.undoRedo.isRedoAvailable();
};
/**
* {@link UndoRedo#clear}
* @alias clearUndo
* @memberof! Handsontable.Core#
*/
instance.clearUndo = function () {
return instance.undoRedo.clear();
};
}
function removeExposedUndoRedoMethods(instance) {
delete instance.undo;
delete instance.redo;
delete instance.isUndoAvailable;
delete instance.isRedoAvailable;
delete instance.clearUndo;
}
var hook = _pluginHooks2.default.getSingleton();
hook.add('afterInit', init);
hook.add('afterUpdateSettings', init);
hook.register('beforeUndo');
hook.register('afterUndo');
hook.register('beforeRedo');
hook.register('afterRedo');
exports.default = UndoRedo;
/***/ })
/******/ ])["default"];
});
/*\
title: $:/plugins/BTC/hot/hot.js
type: application/javascript
module-type: widget
a handsontable spreadsheet
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Handsontable = require("$:/plugins/BTC/hot/hot.js");
}
var HotWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
HotWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
HotWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
/* console.log("message: " + actionMessage);
console.log("param: " + actionParam);*/
// Compute attributes and execute state
this.computeAttributes();
this.execute();
self.renderChildren(parent,nextSibling);
var elementClass = self.getAttribute('target');
var dataTiddler = self.getAttribute('tiddler');
if(elementClass === undefined || elementClass === null || elementClass === "" || dataTiddler === undefined || dataTiddler === null || dataTiddler === "") {
return false;
}
var dataObject = [];
var data = $tw.wiki.getTiddler(dataTiddler).getFieldString('text');
var dataParsed = JSON.parse(data);
dataObject = Object.keys(dataParsed).map(function(k) { return dataParsed[k] });
//console.log(dataObject);
if(dataObject === undefined || dataObject === null || dataObject === "") {
return false;
}
var currencyCodes = ['EUR', 'JPY', 'GBP', 'CHF', 'CAD', 'AUD', 'NZD', 'SEK', 'NOK', 'BRL', 'CNY', 'RUB', 'INR', 'TRY', 'THB', 'IDR', 'MYR', 'MXN', 'ARS', 'DKK', 'ILS', 'PHP'];
var flagRenderer = function (instance, td, row, col, prop, value, cellProperties) {
var currencyCode = value;
while (td.firstChild) {
td.removeChild(td.firstChild);
}
if (currencyCodes.indexOf(currencyCode) > -1) {
var flagElement = document.createElement('DIV');
flagElement.className = 'flag ' + currencyCode.toLowerCase();
td.appendChild(flagElement);
} else {
var textNode = document.createTextNode(value === null ? '' : value);
td.appendChild(textNode);
}
};
var hotElement = parentDomNode.getElementsByClassName(elementClass);
console.log(hotElement);
if(hotElement === undefined) {
return false;
}
var hotElementContainer = parentDomNode;
var hotSettings = {
data: dataObject,
columns: [
{
data: 'id',
type: 'numeric',
width: 15
},
{
data: 'flag',
renderer: flagRenderer
},
{
data: 'currencyCode',
type: 'text'
},
{
data: 'currency',
type: 'text'
},
{
data: 'level',
type: 'numeric',
numericFormat: {
pattern: '0.0000'
}
},
{
data: 'units',
type: 'text'
},
{
data: 'asOf',
type: 'date',
dateFormat: 'MM/DD/YYYY'
},
{
data: 'onedChng',
type: 'numeric',
numericFormat: {
pattern: '0.00%'
}
}
],
stretchH: 'all',
autoWrapRow: true,
maxRows: 22,
width: 80,
manualRowResize: true,
manualColumnResize: true,
rowHeaders: true,
colHeaders: [
'ID',
'Country',
'Code',
'Currency',
'Level',
'Units',
'Date',
'Change'
],
manualRowMove: true,
manualColumnMove: true,
columnSorting: true,
sortIndicator: true,
autoColumnSize: {
samplingRatio: 23
},
mergeCells: true
};
var hot = new Handsontable(hotElement[0], hotSettings);
};
/*
Compute the internal state of the widget
*/
HotWidget.prototype.execute = function() {
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
HotWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.spreadsheet = HotWidget;
})(this);
<$button class="tc-btn-invisible tc-onscreen-keyboard-button" popup="$:/state/onscreenkeyboard"><$action-deletetiddler $tiddler="$:/state/pan/osc"/>{{keyboard.svg}}</$button>
<$reveal class="tc-popup-keep tc-onscreen-keyboard-popup" state="$:/state/onscreenkeyboard" type="popup" position="left">
{{tiddly onscreen keyboard}}
</$reveal>
<$button class="tc-btn-invisible tc-onscreen-keyboard-button" popup="$:/state/simpleonscreenkeyboard">{{keyboard.svg}}</$button>
<$reveal class="tc-popup-keep tc-onscreen-keyboard-popup" state="$:/state/simpleonscreenkeyboard" type="popup" position="below">
<<osckbd>>
</$reveal>
\define createLayout()
<$reveal state="$:/state/osckbd-simple!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="firstRow" value={{!!numbers-$(smallbig)$}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]" variable="textToInsert">
<$tiddler tiddler="""$(keyboardTiddler)$!!$(fieldName)$""">
<$vars targetTiddler="""$(keyboardTiddler)$!!$(fieldName)$""" storyTiddler="""$(keyboardTiddler)$!!$(fieldName)$""" currentTiddler="""$(keyboardTiddler)$!!$(fieldName)$""">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<textToInsert>>/><$text text=<<currentTiddler>>/></$button>
</$vars>
</$tiddler>
</$list>
</$set>
</$list></$reveal><$reveal state="$:/state/osckbd-simple!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="firstRow" value={{$:/state/osckbd-simple!!numbers-$(smallbig)$-altgr}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$pan $targets="backspace-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard backspace-key"><$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>backspace</$button></$pan>
<$button class="tc-btn-invisible tc-onscreen-keyboard tab-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{specialkeys##tab}}/>tab</$button><$reveal state="$:/state/osckbd-simple!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="secondRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-1}}>
<$list filter="[enlist<secondRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set></$list></$reveal><$reveal state="$:/state/osckbd-simple!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="secondRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-altgr-1}}>
<$list filter="[enlist<secondRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal>
<$reveal state="$:/state/osckbd-simple!!big-state" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard caps-lock-key tc-selected" set="$:/state/osckbd-simple!!big-state" setTo="no">caps lock</$button></$reveal><$reveal state="$:/state/osckbd-simple!!big-state" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard caps-lock-key" set="$:/state/osckbd-simple!!big-state" setTo="yes">caps lock</$button></$reveal><$reveal state="$:/state/osckbd-simple!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="thirdRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-2}}>
<$list filter="[enlist<thirdRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$reveal state="$:/state/osckbd-simple!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="thirdRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-altgr-2}}>
<$list filter="[enlist<thirdRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$pan $targets="enter-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text="
"/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text="
"/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard enter-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{specialkeys##return}}/>return</$button></$pan>
<$button class="tc-btn-invisible tc-onscreen-keyboard cancel-key"><$action-sendmessage $message="tm-cancel-tiddler" $param=<<storyTiddler>>/>cancel</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard shift-key">shift</$button><$reveal state="$:/state/osckbd-simple!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10">
<$set name="fourthRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-3}}>
<$list filter="[enlist<fourthRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$reveal state="$:/state/osckbd-simple!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10">
<$set name="fourthRow" value={{$:/state/osckbd-simple!!characters-$(smallbig)$-altgr-3}}>
<$list filter="[enlist<fourthRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$button class="tc-btn-invisible tc-onscreen-keyboard save-key"><$action-sendmessage $message="tm-save-tiddler" $param=<<storyTiddler>>/>save</$button>
<$button class="tc-btn-invisible tc-onscreen-keyboard widget-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" widget-layout="yes"/>widgets</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard filter-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" filters-layout="yes"/>filters</$button> <$pan $targets="space-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard space-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>space</$button></$pan> <$reveal state="$:/state/osckbd-simple!!altgr-state" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard altgr-key tc-selected" set="$:/state/osckbd-simple!!altgr-state" setTo="no">Alt Gr</$button></$reveal> <$reveal state="$:/state/osckbd-simple!!altgr-state" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard altgr-key" set="$:/state/osckbd-simple!!altgr-state" setTo="yes">Alt Gr</$button></$reveal> <$button class="tc-btn-invisible tc-onscreen-keyboard macro-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" macro-layout="yes"/>macros</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard emoji-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" emoji-layout="yes"/>emojis</$button>
\end
\define widgetEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard" set="$:/state/osckbd-simple!!selected-widget" setTo="$(entryDescription)$"><$text text=$(entryDescription)$/></$button>
\end
\define createWidgetLayout()
{{insertwidget}}<br>
<$reveal state="$:/state/osckbd-simple!!widget-wrap" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key"><$action-setfield $tiddler="tiddly onscreen keyboard" widget-wrap="yes"/>wrap</$button></$reveal><$reveal state="$:/state/osckbd-simple!!widget-wrap" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key tc-selected"><$action-setfield $tiddler="tiddly onscreen keyboard" widget-wrap="no"/>wrap</$button></$reveal> <$list filter="[enlist{$:/state/osckbd-simple!!widgets-$(smallbig)$-description-1}count[]]" variable="widgetEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<widgetEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{$:/state/osckbd-simple!!widgets-$(smallbig)$-description-1}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<widgetEntryButton>>
</$list>
</$vars>
</$set>
</$list>
<br>
<$list filter="[enlist{$:/state/osckbd-simple!!widgets-$(smallbig)$-description-2}count[]]" variable="widgetEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<widgetEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{$:/state/osckbd-simple!!widgets-$(smallbig)$-description-2}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<widgetEntryButton>>
</$list>
</$vars>
</$set>
</$list> <$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" widget-layout="no"/>abc</$button>
</$list>
\end
\define filterEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{filters##$(entryDescription)$}}/><$text text=$(entryDescription)$/></$button>
\end
\define createFilterLayout()
<$list filter="[[filters]indexes[]count[]]" variable="filterEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<filterEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars firstRowDescription={{$:/state/osckbd-simple!!filters-$(smallbig)$-description-1}}>
<$list filter="[enlist<firstRowDescription>nth<entryCount>]" variable="entryDescription">
<<filterEntryButton>>
</$list>
</$vars>
</$set>
</$list><$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" filters-layout="no"/>abc</$button>
</$list>
\end
\define createEmojiLayout()
<$list filter="1 2 3 4 5">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars firstRow={{$:/state/osckbd-simple!!emojis-$(smallbig)$-1}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$vars>
</$set>
</$list><$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" emoji-layout="no"/>abc</$button>
\end
\define macroEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{macros##$(entryDescription)$}}/><$text text=$(entryDescription)$/></$button>
\end
\define createMacroLayout()
<$reveal state="$:/state/osckbd-simple!!macro-wrap" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key"><$action-setfield $tiddler="tiddly onscreen keyboard" macro-wrap="yes"/>wrap</$button></$reveal><$reveal state="$:/state/osckbd-simple!!macro-wrap" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key tc-selected"><$action-setfield $tiddler="tiddly onscreen keyboard" macro-wrap="no"/>wrap</$button></$reveal> <$list filter="[enlist{$:/state/osckbd-simple!!macros-$(smallbig)$-description-1}count[]]" variable="macroEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<macroEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{$:/state/osckbd-simple!!macros-$(smallbig)$-description-1}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<macroEntryButton>>
</$list>
</$vars>
</$set>
</$list>
<br>
<$list filter="[enlist{$:/state/osckbd-simple!!macros-$(smallbig)$-description-2}count[]]" variable="macroEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<macroEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{$:/state/osckbd-simple!!macros-$(smallbig)$-description-2}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<macroEntryButton>>
</$list>
</$vars>
</$set>
</$list> <$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" macro-layout="no"/>abc</$button>
</$list>
\end
\define osckbd(tiddler,field)
<$vars keyboardTiddler="$tiddler$" fieldName="$field$">
<$reveal state="$:/state/osckbd-simple!!normal-layout" type="match" text="yes">
<$list filter="[{$:/state/osckbd-simple!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{$:/state/osckbd-simple!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createLayout>>
</$list>
</$reveal>
<$reveal state="$:/state/osckbd-simple!!emoji-layout" type="match" text="yes">
<$list filter="[{$:/state/osckbd-simple!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{$:/state/osckbd-simple!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createEmojiLayout>>
</$list>
</$reveal>
<$reveal state="$:/state/osckbd-simple!!widget-layout" type="match" text="yes">
<$list filter="[{$:/state/osckbd-simple!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{$:/state/osckbd-simple!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createWidgetLayout>>
</$list>
</$reveal>
<$reveal state="$:/state/osckbd-simple!!filters-layout" type="match" text="yes">
<$list filter="[{$:/state/osckbd-simple!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{$:/state/osckbd-simple!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createFilterLayout>>
</$list>
</$reveal>
<$reveal state="$:/state/osckbd-simple!!macro-layout" type="match" text="yes">
<$list filter="[{$:/state/osckbd-simple!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{$:/state/osckbd-simple!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createMacroLayout>>
</$list>
</$reveal>
</$vars>
\end
{
"tiddlers": {
"$:/plugins/BTC/tiddly-touch/Buttons/change-view": {
"text": "<$reveal state=\"$:/view\" type=\"nomatch\" text=\"muuri\">\n<$button class=\"tc-btn-invisible\" tooltip=\"muuri storyview\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"tiddly-list\" $value={{$:/StoryList!!list}}/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/ViewToolbar\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps\">\n<$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]\"><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar\">\n<$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler></$list><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/core/ui/PageTemplate/story\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/EmptyStoryMessage\">\n<$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/BelowStory\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/CSS\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/Stylesheet\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/ViewToolbar\"/></$fieldmangler><$fieldmangler tiddler=\"$:/core/ui/Buttons/more-tiddler-actions\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/ViewToolbar\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/ViewTemplate\"/><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/EditTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"previous-storyview\" $value={{$:/view}}/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"previous-sidebarlayout\" $value={{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}}/><$action-setfield $tiddler=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\" $value=\"fluid-fixed\"/><$action-setfield $tiddler=\"$:/StoryList\" $field=\"list\" $value={{$:/plugins/BTC/tiddly-touch/config!!muuri-list}}/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"previous-sidebar\" $value={{$:/state/sidebar}}/><$action-setfield $tiddler=\"$:/state/sidebar\" $value=\"no\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"spreadsheet-view\" $value=\"no\"/>\n{{$:/plugins/BTC/tiddly-touch/icons!!view-dashboard}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/view\" type=\"match\" text=\"muuri\">\n<$button class=\"tc-btn-invisible\" tooltip=\"leave muuri storyview\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"muuri-list\" $value={{$:/StoryList!!list}}/>\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/ViewToolbar\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]\"><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler></$list><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageControls\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/EmptyStoryMessage\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/BelowStory\"/></$fieldmangler><$fieldmangler tiddler=\"$:/core/ui/PageTemplate/story\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/CSS\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/Stylesheet\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/ViewToolbar\"/></$fieldmangler><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width\"><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/ViewTemplate\"/><$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/EditTemplate\"/></$fieldmangler><$action-deletetiddler $tiddler=\"$:/core/ui/Buttons/more-tiddler-actions\"/><$action-setfield $tiddler=\"$:/StoryList\" $field=\"list\" $value={{$:/plugins/BTC/tiddly-touch/config!!tiddly-list}}/><$action-setfield $tiddler=\"$:/view\" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-storyview}}/><$action-setfield $tiddler=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-sidebarlayout}}/><$action-setfield $tiddler=\"$:/state/sidebar\" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-sidebar}}/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"spreadsheet-view\" $value=\"no\"/>{{$:/plugins/BTC/tiddly-touch/icons!!view-stream}}\n</$button>\n</$reveal>",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/change-view",
"tags": "$:/tags/PageControls $:/tags/BottomBar",
"revision": "0",
"modified": "20180120183331427",
"description": "switch from classic to muuri view an back",
"created": "20171223083802430",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!view-dashboard}} switch views",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps": {
"text": "<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!fill-gaps\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"fill gaps on\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"fill-gaps\" $value=\"yes\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-quilt}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!fill-gaps\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon tc-selected\" tooltip=\"fill gaps off\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"fill-gaps\" $value=\"no\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-quilt}}\n</$button>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps",
"tags": "$:/tags/LeftBar",
"modified": "20180121165555479",
"description": "toggle if muuri should fill gaps or not",
"created": "20171224154814593",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!view-quilt}} toggle gaps-filling"
},
"$:/plugins/BTC/tiddly-touch/Buttons/free-story-tiddlers": {
"text": "<$list filter=\"[list[$:/StoryList]has[muuri-tiddler-width]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)$]limit[1]]\">\n<div style=\"width: 100%;\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon\" style=\"width:50%;font-size: 0.4em; float:right;\" tooltip=\"free willy!\">\n<$list filter=\"[list[$:/StoryList]has[muuri-tiddler-width]]\">\n<$action-deletefield $field=\"muuri-tiddler-width\"/></$list>{{$:/plugins/BTC/tiddly-touch/icons!!dot}}</$button>\n</div>\n</$list>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/free-story-tiddlers",
"tags": "$:/tags/LeftBar",
"muuri-tiddler-width": "6",
"modified": "20180121151314642",
"description": "reset the width of all tiddlers in the storyriver",
"created": "20180121095536511",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!dot}} free willy button"
},
"$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions": {
"text": "\\whitespace trim\n\\define config-title()\n$:/config/ViewToolbarButtons/Visibility/$(listItem)$\n\\end\n<$button popup=<<morePopupState>> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass=\"tc-selected\">\n<$list filter=\"[<tv-config-toolbar-icons>prefix[yes]]\">\n{{$:/core/images/down-arrow}}\n</$list>\n<$list filter=\"[<tv-config-toolbar-text>prefix[yes]]\">\n<span class=\"tc-btn-text\">\n<$text text=\" \"/>\n<$text text={{$:/language/Buttons/More/Caption}}/>\n</span>\n</$list>\n</$button>\n<$reveal state=<<morePopupState>> type=\"popup\" position=\"below\" animate=\"yes\">\n\n<div class=\"tc-drop-down\">\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-class\" value=\"tc-btn-invisible\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]\" variable=\"listItem\">\n\n<$reveal type=\"match\" state=<<config-title>> text=\"hide\">\n\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n\n</$set>\n\n</$reveal>\n\n</$list>\n\n</$set>\n\n</$set>\n\n</$set>\n\n</div>\n\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions",
"modified": "20180121165555480",
"description": "{{$:/language/Buttons/More/Hint}} made with love for muuri",
"created": "20180119092120527",
"caption": "{{$:/core/images/down-arrow}} {{$:/language/Buttons/More/Caption}} //muuri custom//"
},
"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert": {
"text": "<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"align tiddlers horizontally\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-horizontal\" $value=\"yes\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-vertical}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"align tiddlers vertically\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-horizontal\" $value=\"no\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-horizontal}}\n</$button>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert",
"tags": "$:/tags/LeftBar",
"modified": "20180121165555479",
"description": "switch between vertical and horizontal view",
"created": "20180119121038549",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!view-horizontal}} switch between vertical / horizontal"
},
"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right": {
"text": "<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-right\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"tiddlers aligned left\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-right\" $value=\"yes\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!format-align-left}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-right\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"tiddlers aligned right\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/configPageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-right\" $value=\"no\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!format-align-right}}\n</$button>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right",
"tags": "$:/tags/LeftBar",
"modified": "20180121165555479",
"description": "align tiddlers to the left or the right",
"created": "20171224144532966",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!format-align-right}} align tiddlers to the left or the right"
},
"$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom": {
"text": "<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-bottom\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"tiddlers aligned to the top\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-bottom\" $value=\"yes\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!vertical-align-top}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-bottom\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible\" tooltip=\"tiddlers aligned to the bottom\">\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"align-bottom\" $value=\"no\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!vertical-align-bottom}}\n</$button>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom",
"tags": "$:/tags/LeftBar",
"modified": "20180121165555479",
"description": "align tiddlers to the top or the bottom",
"created": "20171224151228341",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!vertical-align-bottom}} align tiddlers to the top or the bottom"
},
"$:/plugins/BTC/tiddly-touch/Buttons/toggle-columns": {
"text": "\\define columnicons()\n{{$:/plugins/BTC/tiddly-touch/icons!!columns-$(columns)$}}\n\\end\n<$set name=\"columns\" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>\n<$set name=\"nextValue\" filter=\"[<columns>] +[next[$:/plugins/BTC/tiddly-touch/Buttons/toggle-columns]]\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon\" tooltip=\"toggle columns\">\n<$list filter=\"[<columns>!regexp[^6$]]\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"column-count\" $value=<<nextValue>>/></$list>\n<$list filter=\"[<columns>regexp[^6$]]\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"column-count\" $value=\"1\"/>\n</$list><<columnicons>></$button></$set></$set>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/toggle-columns",
"tags": "$:/tags/LeftBar",
"modified": "20180120183310896",
"list": "1 2 3 4 5 6",
"description": "cycle through 1 - 6 columns in the storyriver",
"created": "20171228133157578",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!columns-6}} cycle through 1 - 6 columns"
},
"$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag": {
"text": "\\define before-actions()\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/>\n\\end\n\\define after-actions()\n<$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>\n\\end\n\\define set-dragging-yes-no(yesno)\n<<before-actions>><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"drag-enabled\" $value=\"$yesno$\"/><<after-actions>>\n\\end\n\\define getStoryListIndex(yesno)\n<$set name=\"storyCount\" filter=\"[list[$:/StoryList]count[]]\">\n<$list filter=\"[list[$:/plugins/BTC/tiddly-touch/lists/numbers]limit<storyCount>]\">\n<$list filter=\"[list[$:/StoryList]nth<currentTiddler>title[$(scrollTiddler)$]]\" variable=\"scrollTiddlerIndex\">\n<<set-dragging-yes-no $yesno$>>\n</$list>\n</$list>\n</$set>\n\\end\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!drag-enabled\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-dragging-button\" tooltip=\"enable dragging\">\n<$set name=\"scrollTiddler\" value=<<storyTiddler>>>\n<$set name=\"storyList\" filter=\"[list[$:/StoryList]]\">\n<<set-dragging-yes-no yes>>\n</$set>\n</$set>\n{{$:/plugins/BTC/tiddly-touch/icons!!drag-button}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!drag-enabled\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-selected tc-dragging-button\" tooltip=\"disable dragging\">\n<$set name=\"scrollTiddler\" value=<<storyTiddler>>>\n<$set name=\"storyList\" filter=\"[list[$:/StoryList]]\">\n<<set-dragging-yes-no no>>\n</$set>\n</$set>\n{{$:/plugins/BTC/tiddly-touch/icons!!drag-button}}\n</$button>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag",
"tags": "$:/tags/LeftBar",
"modified": "20180121165555479",
"description": "toggle dragging on/off",
"created": "20171224145410886",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!drag-button}} toggle dragging"
},
"$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width": {
"text": "\\define columnicons()\n{{$:/plugins/BTC/tiddly-touch/icons!!columns-$(tiddlerWidth)$}}\n\\end\n\\define next-tiddler-action()\n<$list filter=\"[[$(nextValue)$]regexp[^(1|2|3|4|5|6|7|8|9|10|11|12)$]]\">\n<$action-setfield $tiddler=\"\"\"$(nextStoryTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=\"$(nextNextValue)$\" $timestamp=\"no\"/>\n</$list>\n<$list filter=\"[[$(nextValue)$]regexp[^0$]]\">\n<$set name=\"columnCount\" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>\n<$set name=\"remainingSpace\" filter=\"1 3 2 8 9 7 5 6 4 10 +[nth<columnCount>]\">\n<$action-setfield $tiddler=\"\"\"$(nextStoryTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=<<remainingSpace>> $timestamp=\"no\"/>\n</$set>\n</$set>\n</$list>\n<$list filter=\"[[$(nextValue)$]!regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)$]]\">\n<$action-setfield $tiddler=\"\"\"$(nextStoryTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=\"7\" $timestamp=\"no\"/>\n</$list>\n\\end\n\\define enslave-next-tiddler-button()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!adjacent-tiddler-width\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-2\" tooltip=\"enslave $(nextStoryTiddler)$\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"adjacent-tiddler-width\" $value=\"yes\"/>\n{{$:/plugins/BTC/tiddly-touch/icons!!dot}}\n</$button>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!adjacent-tiddler-width\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-2 tc-selected blue-icon\" tooltip=\"free $(nextStoryTiddler)$\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"adjacent-tiddler-width\" $value=\"no\"/>\n{{$:/plugins/BTC/tiddly-touch/icons!!dot}}\n</$button>\n</$reveal>\n\\end\n\\define toggle-tiddler-width()\n<span class=\"tc-topleft-span\">\n<$list filter=\"[[$(storyTiddler)$]next[$:/StoryList]]\" variable=\"nextStoryTiddler\">\n<$set name=\"tiddlerWidth\" filter=\"[[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6)$]] [[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]!regexp[^(0|1|2|3|4|5|6)$]addprefix[0]] [[$(storyTiddler)$]!has[muuri-tiddler-width]addprefix[0]removesuffix[$(storyTiddler)$]]\">\n<$set name=\"nextValue\" filter=\"[<tiddlerWidth>next[$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]]\">\n<$set name=\"nextNextValue\" filter=\"0 4 3 2 8 6 +[nth<nextValue>]\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft\" tooltip=\"toggle tiddler width\">\n<$list filter=\"[<tiddlerWidth>!regexp[^0$]]\">\n<$action-setfield $tiddler=\"\"\"$(storyTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=<<nextValue>> $timestamp=\"no\"/>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[adjacent-tiddler-width]regexp[^yes$]]\">\n<$list filter=\"[<nextStoryTiddler>!regexp[^$]]\">\n<<next-tiddler-action>>\n</$list>\n</$list>\n</$list>\n<$list filter=\"[<tiddlerWidth>regexp[^0$]]\">\n<$action-setfield $tiddler=\"\"\"$(storyTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=\"6\" $timestamp=\"no\"/>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[adjacent-tiddler-width]regexp[^yes$]]\">\n<$list filter=\"[<nextStoryTiddler>!regexp[^$]]\">\n<<next-tiddler-action>>\n</$list>\n</$list>\n</$list>\n<<columnicons>>\n</$button>\n</$set></$set></$set>\n<<enslave-next-tiddler-button>>\n</$list>\n<$set name=\"storyListCount\" filter=\"[list[$:/StoryList]count[]]\">\n<$list filter=\"[list[$:/StoryList]nth<storyListCount>regexp[$(storyTiddler)$]]\">\n<$set name=\"tiddlerWidth\" filter=\"[[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6)$]] [[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]!regexp[^(0|1|2|3|4|5|6)$]addprefix[0]] [[$(storyTiddler)$]!has[muuri-tiddler-width]addprefix[0]removesuffix[$(storyTiddler)$]]\">\n<$set name=\"nextValue\" filter=\"[<tiddlerWidth>next[$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]]\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft\" tooltip=\"toggle tiddler width\">\n<$list filter=\"[<tiddlerWidth>!regexp[^0$]]\">\n<$action-setfield $tiddler=\"\"\"$(storyTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=<<nextValue>> $timestamp=\"no\"/>\n</$list>\n<$list filter=\"[<tiddlerWidth>regexp[^0$]]\">\n<$action-setfield $tiddler=\"\"\"$(storyTiddler)$\"\"\" $field=\"muuri-tiddler-width\" $value=\"6\" $timestamp=\"no\"/>\n</$list>\n<<columnicons>>\n</$button>\n</$set></$set>\n</$list>\n</$set>\n</span>\n\\end\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!topleft-width-button\" type=\"nomatch\" text=\"no\">\n<<toggle-tiddler-width>>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width",
"modified": "20180121165555480",
"list": "6 5 4 3 2 1 0",
"description": "cycle through 6 different widths for the current tiddler",
"created": "20180120144951684",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!columns-6}} cycle through 6 tiddler widths"
},
"$:/plugins/BTC/tiddly-touch/config": {
"created": "20171223072521383",
"text": "",
"vertical-toolbar-user": "no",
"vertical-toolbar": "yes",
"topleft-width-button-user": "no",
"topleft-width-button": "yes",
"title": "$:/plugins/BTC/tiddly-touch/config",
"tiddly-view-pagetemplate": "$:/core/ui/PageTemplate/story",
"tiddly-view": "no",
"tiddly-story-view": "classic",
"tiddly-story-list": "",
"tiddly-sidebar-state": "yes",
"tiddly-sidebar-layout": "fluid-fixed",
"tiddly-previous-view": "",
"tiddly-previous-sidebar": "yes",
"tiddly-list": "",
"tiddler-opacity": "e6",
"slider-width-value": "58",
"sidebar-new-window": "no",
"show-duration": "200",
"seamless": "no",
"right-grid-width": "2",
"right-grid": "show",
"previous-storyview": "classic",
"previous-sidebarlayout": "fixed-fluid",
"previous-sidebar": "yes",
"muuri-view-pagetemplate": "$:/plugins/BTC/tiddly-touch/PageTemplate/muuri",
"muuri-view": "no",
"muuri-list": "",
"modified": "20180121165757540",
"hide-titles": "no",
"hide-tags": "no",
"hide-leftbar": "no",
"hide-duration": "200",
"hide-controls": "no",
"fill-gaps-user": "no",
"fill-gaps": "yes",
"drag-sort-threshold": "40",
"drag-sort-action-user": "yes",
"drag-sort-action": "move",
"drag-sort": "yes",
"drag-enabled": "yes",
"column-count": "3",
"child-class": "tc-tiddler-frame",
"animation-duration": "400",
"align-right-user": "yes",
"align-right": "no",
"align-horizontal": "no",
"align-bottom-user": "yes",
"align-bottom": "no",
"adjacent-tiddler-width-user": "no",
"adjacent-tiddler-width": "yes"
},
"$:/plugins/BTC/tiddly-touch/ControlPanel/settings": {
"text": "\\define before-actions()\n<$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\">\n<$action-sendmessage $message=\"tm-remove-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler><$action-setfield $tiddler=\"$:/view\" $value=\"\"/>\n\\end\n\\define after-actions()\n<$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><$fieldmangler tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri\"><$action-sendmessage $message=\"tm-add-tag\" $param=\"$:/tags/PageTemplate\"/></$fieldmangler>\n\\end\n\\define hide-show-leftbar-actions(setting)\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-leftbar\" $value=\"yes\"/>\n</$list>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]regexp[^yes$]]\">\n<$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-leftbar\" $value=\"no\"/>\n</$list>\n\\end\n\\define muuri-user-actions(setting)\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[$setting$]!regexp[^yes$]]\">\n<<before-actions>><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"$setting$-user\" $value=\"yes\"/><<after-actions>>\n</$list>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[$setting$]regexp[^yes$]]\">\n<<before-actions>><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"$setting$-user\" $value=\"no\"/><$action-setfield $tiddler=\"$:/view\" $value=\"muuri\"/><<after-actions>>\n</$list>\n\\end\n\\define muuri-user-checkbox(setting,checkedunchecked,reload-yesno)\n<$set name=\"description\" value={{$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!description-$setting$}}>\n<$list filter=\"[[$reload-yesno$]!regexp[^noreload$]]\">\n<$checkbox tiddler=\"$:/plugins/BTC/tiddly-touch/config\" field=\"$setting$\" $checkedunchecked$ actions=<<muuri-user-actions $setting$>>> <<description>></$checkbox>\n</$list>\n<$list filter=\"[[$reload-yesno$]regexp[^noreload$]]\">\n<$checkbox tiddler=\"$:/plugins/BTC/tiddly-touch/config\" field=\"$setting$\" $checkedunchecked$> <<description>></$checkbox>\n</$list>\n</$set>\n\\end\n\\define muuri-user-setting-field(setting)\n<$set name=\"description\" value={{$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!description-$setting$}}>\n<$edit-text tiddler=\"$:/plugins/BTC/tiddly-touch/config\" field=\"$setting$\"/> <<description>>\n</$set>\n\\end\n\\define get-muuri-user-action(reload-yesno)\n<<muuri-user-checkbox \"$(listItem)$\" 'checked=\"yes\" unchecked=\"no\" '>>\n\\end\n\\define get-muuri-user-action-reverted()\n<<muuri-user-checkbox \"$(listItem)$\" 'checked=\"no\" unchecked=\"yes\" ' $reload-yesno$>>\n\\end\n\nTweak TiddlyTouch to your likings\n\n<hr>\n\n<$checkbox tiddler=\"$:/plugins/BTC/tiddly-touch/config\" field=\"sidebar-new-window\" checked=\"yes\" unchecked=\"no\"> leftbar sidebar button (top right button will behave the standard way): open sidebar in new window on/off</$checkbox>\n\n<$list filter=\"[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes]]\" variable=\"listItem\">\n\n<<get-muuri-user-action>>\n\n</$list>\n\n<$list filter=\"[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes-noreload]]\" variable=\"listItem\">\n\n<<get-muuri-user-action noreload>>\n\n</$list>\n\n<$list filter=\"[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes-reverted]]\" variable=\"listItem\">\n\n<<get-muuri-user-action-reverted>>\n\n</$list>\n\n<$checkbox tiddler=\"$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar\" tag=\"$:/tags/PageTemplate\" invertTag=\"yes\" actions=<<hide-show-leftbar-actions>>> hide the left bar</$checkbox>\n\n<<muuri-user-checkbox \"drag-sort-action\" ' checked=\"swap\" unchecked=\"move\" '>>\n\n> For the following settings to take effect a muuri reload is needed. The simplest way to do that is switching to the normal view and back\n\n<br>\n\n<<muuri-user-setting-field \"show-duration\">>\n\n<<muuri-user-setting-field \"hide-duration\">>\n\n<<muuri-user-setting-field \"animation-duration\">>\n\n",
"user-checkboxes-reverted": "vertical-toolbar topleft-width-button",
"user-checkboxes-noreload": "",
"user-checkboxes": "fill-gaps align-right align-bottom",
"title": "$:/plugins/BTC/tiddly-touch/ControlPanel/settings",
"tags": "$:/tags/ControlPanel/Appearance",
"modified": "20180121130319910",
"description-vertical-toolbar": "disable the vertical toolbar",
"description-topleft-width-button": "hide the topleft tiddler-width buttons",
"description-show-duration": "the duration in milliseconds for the show-animation",
"description-hide-duration": "the duration in milliseconds for the hide-animation",
"description-fill-gaps": "fill gaps when sorting tiddlers on the storyriver",
"description-drag-sort-action": "dragging tiddlers behaviour: move tiddlers to new positions or swap the tiddler positions<br>//unselected: move, selected: swap//<br>//in horizontal view, `swap` appears to work better",
"description-animation-duration": "the duration in milliseconds for the layout-animation",
"description-align-right": "show tiddlers from right to left inside the storyriver",
"description-align-bottom": "show tiddlers from bottom to top inside the storyriver",
"description-adjacent-tiddler-width": "adjacent tiddler width",
"created": "20180102073125992",
"caption": "Muuri settings"
},
"$:/plugins/BTC/tiddly-touch/CSS": {
"text": ".grid, .tc-muuri-grid { position: relative; } .tc-tiddler-frame { display: block; position: absolute; width: 100%; margin: 8px;} .tc-tiddler-frame.tc-dragover { z-index: 2; } .tc-tiddler-frame.muuri-hidden { z-index: 0; display: none; } .tc-tiddler-frame:hover, .tc-tiddler-frame:focus { z-index: 3; } .tc-tiddler-frame-content { position: relative; width: 100%; height: 100%; }\n.tc-tiddler-frame.tc-dragging { z-index: 999; } .tc-alert, .tc-alerts { z-index: 999999 !important; }\n\n/* ** Tiddler view styles */\n\n\n.tc-btn-invisible.tc-toolbar-icon {\n color: <<colour muted-foreground>>;\n vertical-align: sub;\n}\n\n.tc-btn-invisible.tc-toolbar-icon:hover {\n color: <<colour foreground>>;\n}\n\n.tc-tagged-defined-width {\n width: calc(100vw / 3.5) !important;\n}\n\n.tc-tagged-defined-width-2 {\n width: calc(100vw / 2) !important;\n}\n\n.tc-tiddler-frame.tc-tagged-6 { width: calc(100% * 6 / 12 - 16px); min-width: calc(72px * 6); }\n\n }\n\n.tc-tiddler-frame {\n\tbackground-color: <<colour tiddler-background>>{{$:/config/muritest!!tiddler-opacity}} !important;\n}\n\n<<if-no-sidebar \"\n\n.tc-sidebar-scrollable {\n\tdisplay: none;\n}\n\n.tc-topbar-right {\n right: 10px !important;\n}\n\n\">>\n\n.tc-story-river {\n\tpadding-top: 0px !important;\n}\n\n.tc-muuri-empty-story {\n height: 60vh;\n display: flex;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n}\n\n\n.tc-tagged-Journal {\n background-color: #feff9c !important;\n border-color: #fff740 !important;\n}\n\n.tc-tiddler-frame.span-4 iframe {\n min-height: calc(100vh / 4);\n}\n\n.tc-tiddler-frame.span-6 iframe {\n min-height: calc(100vh / 3);\n}\n\n.tc-tiddler-frame.span-9 iframe, .tc-tiddler-frame.span-12 iframe {\n min-height: calc(100vh / 2);\n}\n\n/*.tc-tiddler-frame img, .tc-tiddler-frame image { position: relative; display: block; height: auto; } */\n\n@media (max-height: 500px) {\n\n.tc-image-full-screen-button {\n fill: <<colour primary>> !important;\n}\n\n.tc-story-river {\n padding: 0px 0px 0px 25px;\n}\n\n\n}\n\n\n@media (max-width: 500px) {\n\n.tc-tiddler-frame {\n padding: 14px 28px 14px 14px;\n}\n\n.tc-topbar-right {\n display: none !important;\n}\n\n.tc-story-river {\n padding: 0px 0px 0px 25px !important;\n}\n\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar\" type=\"nomatch\" text=\"no\">\n\n.tc-tiddler-frame {\n min-height: 130px;\n}\n\n</$reveal>\n\n.tc-image-full-screen-button {\n fill: <<colour primary>> !important;\n}\n}\n\n<<if-horizontal-grid \"\"\"\n\n\n\n.grid, .tc-muuri-grid {\n height: calc(100vh - 15px);\n max-height: calc(100vh - 15px);\n min-width: 100%;\n}\n\n.tc-story-river {\n height: calc(100vh - 15px);\n max-height: calc(100vh - 15px);\n min-width: calc(100vw - 84px);\n}\n\n.tc-sidebar-scrollable {\n\n}\n\n\"\"\">>\n\n.tc-muuri-grid .tc-drop-down {\n min-width: 220px;\n}\n\n.tc-tiddler-frame.tc-tagged-sampletag {\nmax-height: 10vh !important;\nmax-width: 10vh !important;\nmin-height: 10vh !important;\nmin-width: 10vh !important;\npadding: 5px 5px 5px 5px;\ntext-align: center !important;\nvertical-align: center;\n}\n\n.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar h2 {\n display: none;\n}\n.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar {\n display: none !important;\n}\n\n.tc-tiddler-frame.tc-tagged-sampletag .tc-subtitle, .tc-tiddler-frame.tc-tagged-sampletag .tc-tags-wrapper, .tc-tiddler-frame.tc-tagged-sampletag .tc-tiddler-controls {\n display: none !important;\n}\n\n<<if-dragging-enabled \"\"\"\n\n.tc-dragging-button {\n color: <$macrocall $name=\"colour\" name=\"very-muted-foreground\"/> !important;\n}\n\n\"\"\">>\n\n@media (min-width: 900px) {\n .tc-sidebar-scrollable {\n background-color: <<colour background>>{{$:/config/muritest!!tiddler-opacity}} !important;\n background: <<colour background>>{{$:/config/muritest!!tiddler-opacity}} ;\n z-index: 9999;\n box-shadow: -1px 0px 1px 1px <<colour muted-foreground>>;\n}\n}\n\n<<if-sidebar \"\"\"\n\n.tc-topbar-right {\n z-index: 10000 !important;\n}\n\n.tc-story-river {\n padding-right: 42px !important;\n margin-right: 0px !important;\n}\n\n\"\"\">>\n\n.tc-tiddler-frame.span-4 , .tc-tiddler-frame.span-5, .tc-tiddler-frame.span-6, .tc-tiddler-frame.span-7, .tc-tiddler-frame.span-8, .tc-tiddler-frame.span-9, .tc-tiddler-frame.span-10, .tc-tiddler-frame.span-11, .tc-tiddler-frame.span-12, .tc-tiddler-frame.span-13 {\n padding-left: 42px;\n padding-right: 42px;\n}\n\n<<vertical-toolbar-yes-no>>\n\n<<vertical-toolbar-macro>>\n\n<<toggle-muuri-columns>>\n\n.span-4 .tc-tiddler-controls, .span-5 .tc-tiddler-controls, .span-6 .tc-tiddler-controls, .span-7 .tc-tiddler-controls, .span-8 .tc-tiddler-controls, .span-9 .tc-tiddler-controls, .span-10 .tc-tiddler-controls, .span-11 .tc-tiddler-controls, .span-12 .tc-tiddler-controls, .span-13 .tc-tiddler-controls {\n right: -60px !important;\n}\n\n.span-4 .tc-tiddler-info, .span-5 .tc-tiddler-info, .span-13 .tc-tiddler-info, .span-6 .tc-tiddler-info, .span-7 .tc-tiddler-info, .span-8 .tc-tiddler-info, .span-9 .tc-tiddler-info, .span-10 .tc-tiddler-info, .span-11 .tc-tiddler-info, .span-12 .tc-tiddler-info {\n margin-left: -20px;\n margin-right: -20px;\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.span-4 .tc-unfold-banner, .span-5 .tc-unfold-banner, .span-6 .tc-unfold-banner, .span-7 .tc-unfold-banner, .span-8 .tc-unfold-banner, .span-9 .tc-unfold-banner, .span-10 .tc-unfold-banner, .span-11 .tc-unfold-banner, .span-12 .tc-unfold-banner, .span-13 .tc-unfold-banner {\n margin-left: -43px;\n width: 100%;\n}\n\n.span-4 .tc-fold-banner, .span-5 .tc-fold-banner, .span-6 .tc-fold-banner, .span-7 .tc-fold-banner, .span-8 .tc-fold-banner, .span-9 .tc-fold-banner, .span-10 .tc-fold-banner, .span-11 .tc-fold-banner, .span-12 .tc-fold-banner, .span-13 .tc-fold-banner {\n margin-left: -35px;\n width: 23px;\n}\n\n.tc-leftbar , div.tc-leftbar-open {\n\tposition: fixed;\n\tz-index: 1200;\n}\n\n.tc-leftbar button {\n\tpadding: 8px;\n}\n\n.tc-leftbar svg {\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-leftbar button:hover svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-leftbar {\n position: fixed;\n top: 5vh;\n left: 0px;\n width: 32px;\n font-size: 1.6em !important;\n padding-left:6px;\n}\n\ndiv.tc-leftbar-open {\n position: fixed;\n bottom: 10vh;\n right:0px;\n width: 42px;\n font-size: 1.6rem;\n}\n\nspan.tc-leftbar-open a {\n\tdisplay: none;\n}\n\n.tc-leftbar-open span:hover > .tc-leftbar-open span > a { \n\tdisplay: inline-block !important;\n}\n\n@media (max-height: 500px) {\n.tc-leftbar {\n position: fixed;\n top: -1vh;\n left: 0px;\n width: 25px;\n font-size: 1.2rem !important;\n padding-left:2px;\n}\n.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {\n width: 0.8em;\n right: -27px;\n position: fixed;\n top: -20px;\n}\n.tc-leftbar .tc-btn-invisible {\n padding: 1px 4px 1px 4px;\n}\n.tc-leftbar .material-icons {\n font-size: 1.2rem !important;\n}\n.tc-topbar-right {\n display: none !important;\n}\n.tc-tiddler-frame {\n padding: 14px 28px 14px 14px;\n}\n}\n\n\n@media (max-width: 500px) {\n.tc-leftbar {\n position: fixed;\n top: 0vh;\n left: 0px;\n width: 20px;\n font-size: 1.2em !important;\n padding-left:0px;\n}\n\n.tc-leftbar .material-icons {\n font-size: 1.2em !important;\n}\n}\n\n<<tiddly-touch-toolbar-left-right>>\n\n/*@media (max-width: 500px) {\n .tc-sidebar-scrollable {\n max-height: 45vh !important;\n padding-left: 20px !important;\n}\n}*/\n\n.tc-btn-invisible.tc-toolbar-icon {\n color: <<colour muted-foreground>>;\n vertical-align: sub;\n}\n\n.tc-btn-invisible.tc-toolbar-icon:hover {\n color: <<colour foreground>>;\n}\n\n.tc-sidebar-lists .tc-tiddler-edit-frame {\n width: calc(100% - 42px) !important;\n}\n\n@media (max-width: 500px) {\n .tc-story-river .tc-tiddler-edit-frame {\n\n}\n .tc-leftbar {\n display: none;\n}\n .tc-story-river {\n padding: 1% 1% 0% 1% !important;\n width: 100%;\n}\n\n<<mobile-portrait-tiles>>\n\n}\n\n.tc-single-tiddler-window .tc-sidebar-window {\n position: absolute;\n width: 100%;\n height: 100%;\n padding: 3% 3% 0% 3%;\n}\n\n.tc-single-tiddler-window {\n background-color: <<colour page-background>> !important;\n}\n\n/*@media (max-device-width: 500px) {\n .tc-single-tiddler-window .tc-sidebar-window {\n padding: 2% 2% 0% 2%;\n font-size: 2rem !important;\n line-height: 2em !important;\n}\n}*/\n\n.tc-single-tiddler-window .tc-sidebar-window:not(.tc-sidebar-lists) .tc-tiddler-edit-frame {\n border: 0px solid <<colour page-background>> !important;\n padding: 2% 2% 2% 2% !important;\n box-shadow: none !important;\n width: 90% !important;\n}\n\n<<sidebar-new-window-tiddler-edit-frame-hide>>\n\n.tc-leftbar button.tc-selected {\n -webkit-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));\n -moz-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));\n filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));\n}\n\n.tc-leftbar button.tc-selected svg {\n\tfill: <<colour tiddler-controls-foreground-selected>>;\n}\n\n.tc-leftbar .tc-btn-invisible.tc-toolbar-icon.tc-selected.tc-dragging-button {\n color: <<colour tiddler-controls-foreground-selected>> !important;\n}\n\nsvg.blue-icon, svg.blue-icon:hover, .tc-tiddler-controls button svg.blue-icon {\n fill: <<colour primary>>;\n}\n\nsvg.green-icon, svg.green-icon:hover {\n\tfill: <<colour download-background>>;\n}\n\nsvg.red-icon, svg.red-icon:hover {\n fill: <<colour code-foreground>>;\n}\n\n<<show-hide-tiddler-title-tags>>\n\n<<hide-controls-from-user>>\n\n.tc-tiddler-body.tc-muuri-spreadsheet {\n min-height: 0px !important;\n font-size: 8px !important;\n line-height: 12px !important;\n}\n\n.tc-tiddler-frame.tc-muuri-spreadsheet {\n width: calc((100% / 20) - 1px) !important;\n min-width: calc((100% / 30) - 1px) !important;\n min-height: calc((95vh / 20) - 1px) !important;\n height: calc((95vh / 10) - 1px) !important;\n max-width: calc((100% / 20) - 1px) !important;\n max-height: calc((95vh / 10) - 1px) !important;\n box-shadow: none !important;\n padding: 0px 0px 0px 0px !important;\n margin: 0 1px 1px 0 !important;\n border-radius: 0px !important;\n border: 1px solid rgba( 0, 0, 0, 0.1) !important;\n}\n\n<<if-spreadsheet-view \"\"\"\n\n.tc-story-river {\n padding-bottom: 0px;\n}\n\n.tc-muuri-grid {\n margin-left: 8px;\n}\n\n\"\"\">>\n\n.tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-4 {\n display: none;\n}\n\n.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-3,\n .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-4 {\n display: block !important;\n}\n\n.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-3 {\n display: none;\n}\n\n.tc-below-spreadsheet-view {\n position: fixed !important;\n bottom: 0px;\n background-color: <<colour page-background>>;\n z-index: 99999;\n}\n\nbutton.tc-btn-invisible.tc-spreadsheet-cell {\n display: inline-block;\n outline: none;\n width: calc(100% - 0px);\n height: calc(100% - 0px);\n}\n\n.tc-story-river.tc-spreadsheet-view .tc-muuri-grid {\n max-height: 45vh !important;\n}\n\n.tc-grid-1 {\n position: relative;\n}\n\n.tc-grid-2 {\n position: fixed;\n width: 13%;\n background-color: transparent;\n left: 42px;\n top: 0px;\n height: 100vh;\n border: none;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n\n.tc-grid-3 {\n position: fixed;\n background-color: transparent;\n width: 13%;\n right: 46px;\n top: 0px;\n height: 100vh;\n border: none;\n border-right: 0px solid #ffffff;\n overflow-y: scroll;\n overflow-x: hidden;\n}\n\n.tc-grid-3::-webkit-scrollbar, .tc-grid-2::-webkit-scrollbar {\n display: none;\n}\n\n.tc-grid-2 .tc-tiddler-frame, .tc-grid-3 .tc-tiddler-frame {\n width: 100%;\n}\n\n.tc-grid-2 .tc-tiddler-body, .tc-grid-3 .tc-tiddler-body, .tc-grid-2 .tc-tags-wrapper, .tc-grid-3 .tc-tags-wrapper, .tc-grid-2 .tc-tiddler-controls, .tc-grid-3 .tc-tiddler-controls {\n display: none;\n}\n\n.tc-grid-2 .tc-title, .tc-grid-2 .tc-title h2, .tc-grid-3 .tc-title, .tc-grid-3 .tc-title h2, .tc-grid-2 .tc-titlebar, .tc-grid-3 .tc-titlebar {\n font-size: 15px;\n line-height: 16px;\n display: inline-block;\n}\n\n.tc-grid-2 .tc-tiddler-frame, .tc-grid-3 .tc-tiddler-frame {\n padding: 0px 10px 10px 10px;\n max-height: calc(100vh / 6);\n min-height: calc(100vh / 10);\n width: 100%;\n}\n\n.grid-container-1 {\n position: relative;\n z-index: 1;\n min-height: 800px !important;\n}\n\n.grid-container-2 {\n position: relative;\n z-index: 1;\n min-height: 800px !important;\n}\n\n.grid-container-3 {\n position: relative;\n z-index: 1;\n min-height: 800px !important;\n}\n\n.grid-container-3 .tc-tiddler-frame {\n margin-top: 2px;\n margin-bottom: 2px;\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.grid-container-2 .tc-tiddler-frame, .tc-grid-2 .tc-tiddler-frame {\n min-width: 0px !important;\n margin-top: 2px;\n margin-bottom: 2px;\n margin-left: 4px;\n margin-right: 4px;\n}\n\n.tc-muuri-header {\n height: 100px;\n width: 100%;\n background-color: <<colour primary>>;\n}\n\nbutton.no-outline {\n outline: none !important;\n}\n\n<<hide-tiddler-borders-and-gaps>>\n\n\n.tc-dragging img, .tc-dragging image, .muuri-item-dragging img, .muuri-item-dragging image, .tc-dragging svg, .tc-dragging iframe {\n opacity: 0.3 !important;\n}\n\n.tc-btn-invisible {\n outline: none !important;\n}\n\n.fade-in {\n\n -webkit-animation: fadein 0.4s; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: fadein 0.4s; /* Firefox < 16 */\n -ms-animation: fadein 0.4s; /* Internet Explorer */\n -o-animation: fadein 0.4s; /* Opera < 12.1 */\n animation: fadein 0.4s;\n}\n\n@keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Internet Explorer */\n@-ms-keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes fadein {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.limit-image img, .limit-image image, .limit-image svg {\n max-width: 100%;\n position: relative;\n}\n\n<<show-hide-right-grid>>\n\n<<show-hide-left-grid>>\n\n<<rightgrid-width-macro>>\n\n.tc-btn-invisible.tc-text-button {\n color: <<colour muted-foreground>>;\n}\n\n.tc-btn-invisible.tc-text-button.tc-selected {\n color: <<colour foreground>>;\n font-weight: 500;\n}\n\n.tc-btn-invisible.tc-text-button:hover {\n color: <<colour foreground>>;\n}\n\n.tc-grid-1 .tc-dragging .tc-tiddler-body {\n mix-blend-mode: multiply;\n}\n\n.tc-grid-migrate-2 .tc-tiddler-frame {\n border: 10px solid #ff0000;\n}\n\n.tc-tiddler-frame.tc-tiddler-more-popup {\n z-index: 5;\n}\n\n.tc-toolbar-icon-topleft {\n position: fixed;\n top: 5px;\n font-size: 1.3em;\n left: 30px;\n}\n\n.tc-toolbar-icon-topleft-2 {\n position: fixed;\n top: 5px;\n font-size: 0.6em;\n left: 60px;\n}\n\n.tc-toolbar-icon-topleft-2 svg {\n fill: <<colour muted-foreground>>;\n vertical-align: bottom;\n}\n.tc-toolbar-icon-topleft svg {\n fill: <<colour muted-foreground>>;\n }\n .tc-topleft-span:hover .tc-toolbar-icon-topleft-2 svg {\n fill: <<colour muted-foreground>>;\n }\n.tc-topleft-span:hover .tc-toolbar-icon-topleft svg, .tc-topleft-span:hover .tc-toolbar-icon-topleft-2.tc-selected svg {\n fill: <<colour primary>>;\n }",
"title": "$:/plugins/BTC/tiddly-touch/CSS",
"modified": "20180121165555480",
"list-after": "$:/themes/tiddlywiki/vanilla/base",
"created": "20180118195938162"
},
"$:/plugins/BTC/tiddly-touch/icons": {
"text": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" />\n",
"visibility-off-red": "<svg class=\"tc-image-button red-icon\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"/></svg>",
"visibility-off-green": "<svg class=\"tc-image-button green-icon\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"/></svg>",
"visibility-off-blue": "<svg class=\"tc-image-button blue-icon\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"/></svg>",
"visibility": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"/></svg>",
"view-vertical": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z\"/></svg>",
"view-stream": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M4 18h17v-6H4v6zM4 5v6h17V5H4z\"/></svg>",
"view-quilt": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z\"/></svg>",
"view-horizontal": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z\"/></svg>",
"view-dashboard": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z\"/></svg>",
"vertical-align-top": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z\"/></svg>",
"vertical-align-bottom": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z\"/></svg>",
"title": "$:/plugins/BTC/tiddly-touch/icons",
"tiddly-view": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M4 18h17v-6H4v6zM4 5v6h17V5H4z\"/></svg>",
"tags": "",
"spreadsheet-view": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/></svg>",
"muuri-view": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z\"/></svg>",
"modified": "20180121101037431",
"format-align-right": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z\"/></svg>",
"format-align-left": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z\"/></svg>",
"drag-button": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74l-3.43-.72c-.08-.01-.15-.03-.24-.03-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z\"/></svg>",
"dot": "<svg class=\"tc-image-button\" width=\"10pt\" height=\"10pt\" viewBox=\"0 0 128 128\"> <g> <path d=\" M 45.84 6.76 C 60.79 2.05 77.60 3.35 91.49 10.69 C 105.76 17.88 116.73 31.15 121.37 46.42 C 125.81 60.68 124.63 76.64 118.03 90.05 C 112.26 102.19 102.23 112.24 90.09 118.01 C 73.74 126.11 53.60 126.00 37.34 117.73 C 25.47 111.93 15.66 102.02 9.99 90.09 C 2.11 74.13 1.98 54.56 9.69 38.52 C 16.59 23.47 30.10 11.80 45.84 6.76 Z\" /> </g> </svg>",
"created": "20180107175152399",
"columns-6": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2h-2c-1.1 0-2-.89-2-2V9c0-1.11.9-2 2-2h4v2z\"/></svg>",
"columns-5": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2H9v-2h4v-2H9V7h6v2z\"/></svg>",
"columns-4": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z\"/></svg>",
"columns-3": "<svg class=\"tc-image-button\" width=\"22pt\" height=\"22pt\" viewBox=\"0 0 24 24\"><path d=\"M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4c1.1 0 2 .89 2 2v1.5z\"/></svg>",
"columns-2": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z\"/></svg>",
"columns-1": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z\"/></svg>",
"columns-0": "<svg class=\"tc-image-button blue-icon\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z\"/></svg>",
"chart": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 24 24\"><path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/></svg>",
"calendar": "<svg class=\"tc-image-button\" width=\"24pt\" height=\"24pt\" viewBox=\"0 0 1792 1792\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M192 1664h288v-288h-288v288zm352 0h320v-288h-320v288zm-352-352h288v-320h-288v320zm352 0h320v-320h-320v320zm-352-384h288v-288h-288v288zm736 736h320v-288h-320v288zm-384-736h320v-288h-320v288zm768 736h288v-288h-288v288zm-384-352h320v-320h-320v320zm-352-864v-288q0-13-9.5-22.5t-22.5-9.5h-64q-13 0-22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5-9.5t9.5-22.5zm736 864h288v-320h-288v320zm-384-384h320v-288h-320v288zm384 0h288v-288h-288v288zm32-480v-288q0-13-9.5-22.5t-22.5-9.5h-64q-13 0-22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5-9.5t9.5-22.5zm384-64v1280q0 52-38 90t-90 38h-1408q-52 0-90-38t-38-90v-1280q0-52 38-90t90-38h128v-96q0-66 47-113t113-47h64q66 0 113 47t47 113v96h384v-96q0-66 47-113t113-47h64q66 0 113 47t47 113v96h128q52 0 90 38t38 90z\"/></svg>"
},
"$:/plugins/BTC/tiddly-touch/lib/muuri.js": {
"text": "/*!\n * Muuri v0.5.3\n * https://github.com/haltu/muuri\n * Copyright (c) 2015, Haltu Oy\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n(function (global, factory) {\n\n var namespace = 'Muuri';\n var Hammer;\n var ItemAnimate = require('$:/plugins/BTC/tiddly-touch/lib/web-animations.js');\n var popmotion = require('$:/plugins/BTC/tiddly-touch/lib/popmotion.js');\n\n if (typeof module === 'object' && module.exports) {\n /* eslint-disable */\n try { Hammer = require('$:/plugins/BTC/tiddly-touch/lib/hammer.js'); } catch (e) {}\n /* eslint-enable */\n module.exports = factory(namespace, Hammer);\n }\n else if (typeof define === 'function' && define.amd) {\n define(['hammerjs'], function (Hammer) {\n return factory(namespace, Hammer);\n });\n }\n else {\n global[namespace] = factory(namespace, global.Hammer);\n }\n\n}(typeof window !== 'undefined' ? window : this, function (namespace, Hammer, undefined) {\n\n 'use strict';\n\n // Get references to all the stuff we are using from the global scope.\n var global = window;\n var Object = global.Object;\n var Array = global.Array;\n var Math = global.Math;\n var Error = global.Error;\n var Element = global.Element;\n var doc = global.document;\n var docElem = doc.documentElement;\n var body = doc.body;\n\n // Types.\n var typeFunction = 'function';\n var typeString = 'string';\n var typeNumber = 'number';\n\n // Raf loop that can be used to organize DOM write and read operations\n // optimally in the next animation frame.\n var rafLoop = createRafLoop();\n\n // Raf loop queue names.\n var rafQueueLayout = 'layout';\n var rafQueueVisibility = 'visibility';\n var rafQueueMove = 'move';\n var rafQueueScroll = 'scroll';\n\n // Drag start predicate states.\n var startPredicateInactive = 0;\n var startPredicatePending = 1;\n var startPredicateResolved = 2;\n var startPredicateRejected = 3;\n\n // Keep track of Grid instances.\n var gridInstances = {};\n\n // Keep track of Item instances.\n var itemInstances = {};\n\n // No operation function.\n var noop = function () {};\n\n // Unique id which is used for Grid instances and Item instances.\n // Should be incremented every time when used.\n var uuid = 0;\n\n // Get the supported element.matches().\n var elementMatches = getSupportedElementMatches();\n\n // Get the supported transform style property.\n var transform = getSupportedStyle('transform');\n\n // Test if transformed elements leak fixed elements.\n var transformLeaksFixed = body ? doesTransformLeakFixed() : null;\n\n // Event names.\n var evSynchronize = 'synchronize';\n var evLayoutStart = 'layoutStart';\n var evLayoutEnd = 'layoutEnd';\n var evAdd = 'add';\n var evRemove = 'remove';\n var evShowStart = 'showStart';\n var evShowEnd = 'showEnd';\n var evHideStart = 'hideStart';\n var evHideEnd = 'hideEnd';\n var evFilter = 'filter';\n var evSort = 'sort';\n var evMove = 'move';\n var evSend = 'send';\n var evBeforeSend = 'beforeSend';\n var evReceive = 'receive';\n var evBeforeReceive = 'beforeReceive';\n var evDragInit = 'dragInit';\n var evDragStart = 'dragStart';\n var evDragMove = 'dragMove';\n var evDragScroll = 'dragScroll';\n var evDragEnd = 'dragEnd';\n var evDragReleaseStart = 'dragReleaseStart';\n var evDragReleaseEnd = 'dragReleaseEnd';\n var evDestroy = 'destroy';\n\n /**\n * Grid\n * ****\n */\n\n /**\n * Creates a new Grid instance.\n *\n * @public\n * @class\n * @param {(HTMLElement|String)} element\n * @param {Object} [options]\n * @param {(?HTMLElement[]|NodeList|String)} [options.items]\n * @param {Number} [options.showDuration=300]\n * @param {String} [options.showEasing=\"ease\"]\n * @param {Object} [options.visibleStyles]\n * @param {Number} [options.hideDuration=300]\n * @param {String} [options.hideEasing=\"ease\"]\n * @param {Object} [options.hiddenStyles]\n * @param {(Function|Object)} [options.layout]\n * @param {Boolean} [options.layout.fillGaps=false]\n * @param {Boolean} [options.layout.horizontal=false]\n * @param {Boolean} [options.layout.alignRight=false]\n * @param {Boolean} [options.layout.alignBottom=false]\n * @param {Boolean} [options.layout.rounding=true]\n * @param {(Boolean|Number)} [options.layoutOnResize=100]\n * @param {Boolean} [options.layoutOnInit=true]\n * @param {Number} [options.layoutDuration=300]\n * @param {String} [options.layoutEasing=\"ease\"]\n * @param {?Object} [options.sortData=null]\n * @param {Boolean} [options.dragEnabled=false]\n * @param {?HtmlElement} [options.dragContainer=null]\n * @param {?Function} [options.dragStartPredicate]\n * @param {Number} [options.dragStartPredicate.distance=0]\n * @param {Number} [options.dragStartPredicate.delay=0]\n * @param {(Boolean|String)} [options.dragStartPredicate.handle=false]\n * @param {?String} [options.dragAxis]\n * @param {(Boolean|Function)} [options.dragSort=true]\n * @param {Number} [options.dragSortInterval=100]\n * @param {(Function|Object)} [options.dragSortPredicate]\n * @param {Number} [options.dragSortPredicate.threshold=50]\n * @param {String} [options.dragSortPredicate.action=\"move\"]\n * @param {String} [options.dragSortPredicate.gaps=true]\n * @param {Number} [options.dragReleaseDuration=300]\n * @param {String} [options.dragReleaseEasing=\"ease\"]\n * @param {Object} [options.dragHammerSettings={touchAction: \"none\"}]\n * @param {String} [options.containerClass=\"muuri\"]\n * @param {String} [options.itemClass=\"muuri-item\"]\n * @param {String} [options.itemVisibleClass=\"muuri-item-visible\"]\n * @param {String} [options.itemHiddenClass=\"muuri-item-hidden\"]\n * @param {String} [options.itemPositioningClass=\"muuri-item-positioning\"]\n * @param {String} [options.itemDraggingClass=\"muuri-item-dragging\"]\n * @param {String} [options.itemReleasingClass=\"muuri-item-releasing\"]\n */\n function Grid(element, options) {\n\n var inst = this;\n var settings;\n var items;\n var layoutOnResize;\n // Muuri can be loaded inside the head tag also, but in that case Muuri can\n // not cache body element and run the initial DOM tests. So, if we detect\n // that body element could not be fetched on init we do it here once and\n // also run the DOM tests. If the Grid is instantiated before body is ready\n // you are doing it wrong ;)\n if (!body) {\n body = document.body;\n transformLeaksFixed = doesTransformLeakFixed();\n }\n\n // Allow passing element as selector string. Store element for instance.\n element = inst._element = typeof element === typeString ? doc.querySelector(element) : element;\n\n // Throw an error if the container element is not body element or does not\n // exist within the body element.\n if (!body.contains(element)) {\n throw new Error('Container element must be an existing DOM element');\n }\n\n // Create instance settings by merging the options with default options.\n settings = inst._settings = mergeSettings(Grid.defaultOptions, options);\n\n // Sanitize dragSort setting.\n if (typeof settings.dragSort !== typeFunction) {\n settings.dragSort = !!settings.dragSort;\n }\n\n // Create instance id and store it to the grid instances collection.\n gridInstances[inst._id = ++uuid] = inst;\n\n // Destroyed flag.\n inst._isDestroyed = false;\n\n // Reference to the currently used Layout instance.\n inst._layout = null;\n\n // Create private Emitter instance.\n inst._emitter = new Grid.Emitter();\n\n // Setup grid's show/hide animation handler for items.\n inst._itemShowHandler = getItemVisibilityHandler('show', settings);\n inst._itemHideHandler = getItemVisibilityHandler('hide', settings);\n\n // Add container element's class name.\n addClass(element, settings.containerClass);\n\n // Create initial items.\n inst._items = [];\n items = settings.items;\n if (typeof items === typeString) {\n nodeListToArray(inst._element.children).forEach(function (itemElement) {\n if (items === '*' || elementMatches(itemElement, items)) {\n inst._items.push(new Grid.Item(inst, itemElement));\n }\n });\n }\n else if (Array.isArray(items) || isNodeList(items)) {\n inst._items = nodeListToArray(items).map(function (itemElement) {\n return new Grid.Item(inst, itemElement);\n });\n }\n\n // Sanitize layoutOnResize option and bind debounced resize handler if the\n // layoutOnResize option a valid number.\n layoutOnResize = settings.layoutOnResize;\n layoutOnResize = layoutOnResize === true ? 0 : typeof layoutOnResize === typeNumber ? layoutOnResize : -1;\n if (layoutOnResize >= 0) {\n global.addEventListener('resize', inst._resizeHandler = debounce(function () {\n inst.refreshItems().layout();\n }, layoutOnResize));\n }\n\n // Layout on init if necessary.\n if (settings.layoutOnInit) {\n inst.layout(true);\n }\n\n }\n\n /**\n * Grid - Public properties\n * ************************\n */\n\n /**\n * @see Item\n */\n Grid.Item = Item;\n\n /**\n * @see ItemDrag\n */\n Grid.ItemDrag = ItemDrag;\n\n /**\n * @see ItemRelease\n */\n Grid.ItemRelease = ItemRelease;\n\n /**\n * @see ItemMigrate\n */\n Grid.ItemMigrate = ItemMigrate;\n\n /**\n * @see ItemAnimate\n */\n Grid.ItemAnimate = ItemAnimate;\n\n /**\n * @see Layout\n */\n Grid.Layout = Layout;\n\n /**\n * @see Emitter\n */\n Grid.Emitter = Emitter;\n\n /**\n * Default options for Grid instance.\n *\n * @public\n * @memberof Grid\n */\n Grid.defaultOptions = {\n\n // Item elements\n items: '*',\n\n // Default show animation\n showDuration: 300,\n showEasing: 'ease',\n\n // Default hide animation\n hideDuration: 300,\n hideEasing: 'ease',\n\n // Item's visible/hidden state styles\n visibleStyles: {\n opacity: '1',\n transform: 'scale(1)'\n },\n hiddenStyles: {\n opacity: '0',\n transform: 'scale(0.5)'\n },\n\n // Layout\n layout: {\n fillGaps: false,\n horizontal: false,\n alignRight: false,\n alignBottom: false,\n rounding: true\n },\n layoutOnResize: 100,\n layoutOnInit: true,\n layoutDuration: 300,\n layoutEasing: 'ease',\n\n // Sorting\n sortData: null,\n\n // Drag & Drop\n dragEnabled: false,\n dragContainer: null,\n dragStartPredicate: {\n distance: 0,\n delay: 0,\n handle: false\n },\n dragAxis: null,\n dragSort: true,\n dragSortInterval: 100,\n dragSortPredicate: {\n threshold: 50,\n action: 'move'\n },\n dragReleaseDuration: 300,\n dragReleaseEasing: 'ease',\n dragHammerSettings: {\n touchAction: 'none'\n },\n\n // Classnames\n containerClass: 'muuri',\n itemClass: 'muuri-item',\n itemVisibleClass: 'muuri-item-shown',\n itemHiddenClass: 'muuri-item-hidden',\n itemPositioningClass: 'muuri-item-positioning',\n itemDraggingClass: 'muuri-item-dragging',\n itemReleasingClass: 'muuri-item-releasing',\n targetsAreTiddlers: false\n\n };\n\n /**\n * Grid - Private properties\n * *************************\n */\n\n Grid._maxRafBatchSize = 100;\n\n /**\n * Grid - Public prototype methods\n * *******************************\n */\n\n /**\n * Bind an event listener.\n *\n * @public\n * @memberof Grid.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\n Grid.prototype.on = function (event, listener) {\n\n var inst = this;\n\n if (!inst._isDestroyed) {\n inst._emitter.on(event, listener);\n }\n\n return inst;\n\n };\n\n /**\n * Bind an event listener that is triggered only once.\n *\n * @public\n * @memberof Grid.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\n Grid.prototype.once = function (event, listener) {\n\n var inst = this;\n\n if (!inst._isDestroyed) {\n inst._emitter.once(event, listener);\n }\n\n return inst;\n\n };\n\n /**\n * Unbind an event listener.\n *\n * @public\n * @memberof Grid.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Grid}\n */\n Grid.prototype.off = function (event, listener) {\n\n var inst = this;\n\n if (!inst._isDestroyed) {\n inst._emitter.off(event, listener);\n }\n\n return inst;\n\n };\n\n /**\n * Get the container element.\n *\n * @public\n * @memberof Grid.prototype\n * @returns {HTMLElement}\n */\n Grid.prototype.getElement = function () {\n\n return this._element;\n\n };\n\n /**\n * Get all items. Optionally you can provide specific targets (elements and\n * indices) and filter the results based on the state of the items. Note that\n * the returned array is not the same object used by the instance so modifying\n * it will not affect instance's items. All items that are not found are\n * omitted from the returned array.\n *\n * @public\n * @memberof Grid.prototype\n * @param {GridMultiItemQuery} [targets]\n * @param {GridItemState} [state]\n * @returns {Item[]}\n */\n Grid.prototype.getItems = function (targets, state) {\n\n var inst = this;\n\n // Return an empty array immediately if the instance is destroyed.\n if (inst._isDestroyed) {\n return [];\n }\n\n var hasTargets = targets === 0 || (targets && typeof targets !== typeString);\n var targetItems = !hasTargets ? null : isNodeList(targets) ? nodeListToArray(targets) : [].concat(targets);\n var targetState = !hasTargets ? targets : state;\n var ret = [];\n var item;\n var i;\n\n // Sanitize target state.\n targetState = typeof targetState === typeString ? targetState : null;\n\n // If target state or target items are defined return filtered results.\n if (targetState || targetItems) {\n targetItems = targetItems || inst._items;\n for (i = 0; i < targetItems.length; i++) {\n item = hasTargets ? inst._getItem(targetItems[i]) : targetItems[i];\n if (item && (!targetState || isItemInState(item, targetState))) {\n ret.push(item);\n }\n }\n return ret;\n }\n\n // Otherwise return all items.\n else {\n return ret.concat(inst._items);\n }\n\n };\n\n /**\n * Update the cached dimensions of the instance's items.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(GridMultiItemQuery|GridItemState)} [items]\n * @returns {Grid}\n */\n Grid.prototype.refreshItems = function (items) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var targetItems = inst.getItems(items || 'active');\n var i;\n\n for (i = 0; i < targetItems.length; i++) {\n targetItems[i]._refreshDimensions();\n }\n\n return inst;\n\n };\n\n /**\n * Update the sort data of the instance's items.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(GridMultiItemQuery|GridItemState)} [items]\n * @returns {Grid}\n */\n Grid.prototype.refreshSortData = function (items) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var targetItems = inst.getItems(items);\n var i;\n\n for (i = 0; i < targetItems.length; i++) {\n targetItems[i]._refreshSortData();\n }\n\n return inst;\n\n };\n\n /**\n * Synchronize the item elements to match the order of the items in the DOM.\n * This comes handy if you need to keep the DOM structure matched with the\n * order of the items. Note that if an item's element is not currently a child\n * of the container element (if it is dragged for example) it is ignored and\n * left untouched.\n *\n * @public\n * @memberof Grid.prototype\n * @returns {Grid}\n */\n Grid.prototype.synchronize = function () {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var container = inst._element;\n var items = inst._items;\n var fragment;\n var element;\n var i;\n\n // Append all elements in order to the container element.\n if (items.length) {\n for (i = 0; i < items.length; i++) {\n element = items[i]._element;\n if (element.parentNode === container) {\n fragment = fragment || doc.createDocumentFragment();\n fragment.appendChild(element);\n }\n }\n if (fragment) {\n container.appendChild(fragment);\n }\n }\n\n // Emit synchronize event.\n inst._emit(evSynchronize);\n\n return inst;\n\n };\n\n /**\n * Calculate and apply item positions.\n *\n * @public\n * @memberof Grid.prototype\n * @param {Boolean} [instant=false]\n * @param {LayoutCallback} [onFinish]\n * @returns {Grid}\n */\n Grid.prototype.layout = function (instant, onFinish) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var callback = typeof instant === typeFunction ? instant : onFinish;\n var isInstant = instant === true;\n var items = inst.getItems('active');\n var layout = inst._layout = new Grid.Layout(inst, items);\n var counter = items.length;\n var isBorderBox;\n var containerStyles;\n var item;\n var position;\n var i;\n\n // The finish function, which will be used for checking if all the items\n // have laid out yet. After all items have finished their animations call\n // callback and emit layoutEnd event. Only emit layoutEnd event if there\n // hasn't been a new layout call during this layout.\n function tryFinish() {\n if (--counter <= 0) {\n if (typeof callback === typeFunction) {\n callback(inst._layout !== layout, items.concat());\n }\n if (inst._layout === layout) {\n inst._emit(evLayoutEnd, items.concat());\n }\n }\n }\n\n // If grid's width or height was modified, we need to update it's cached\n // dimensions. Also keep in mind that grid's cached width/height should\n // always equal to what elem.getBoundingClientRect() would return, so\n // therefore we need to add the grid element's borders to the dimensions if\n // it's box-sizing is border-box.\n if (layout.setWidth || layout.setHeight) {\n\n containerStyles = {};\n isBorderBox = getStyle(inst._element, 'box-sizing') === 'border-box';\n\n if (layout.setHeight) {\n if (typeof layout.height === typeNumber) {\n containerStyles.height = (isBorderBox ? layout.height + inst._border.top + inst._border.bottom : layout.height) + 'px';\n }\n else {\n containerStyles.height = layout.height;\n }\n }\n\n if (layout.setWidth) {\n if (typeof layout.width === typeNumber) {\n containerStyles.width = (isBorderBox ? layout.width + inst._border.left + inst._border.right : layout.width) + 'px';\n }\n else {\n containerStyles.width = layout.width;\n }\n }\n\n setStyles(inst._element, containerStyles);\n\n }\n\n // Emit layoutStart event. Note that this is intentionally emitted after the\n // container element's dimensions are set, because otherwise there would be\n // no hook for reacting to container dimension changes.\n inst._emit(evLayoutStart, items.concat());\n\n // If there are no items let's finish quickly.\n if (!items.length) {\n tryFinish();\n return inst;\n }\n\n // If there are items let's position them.\n for (i = 0; i < items.length; i++) {\n\n item = items[i];\n position = layout.slots[item._id];\n\n // Update item's position.\n item._left = position.left;\n item._top = position.top;\n\n // Layout non-dragged items.\n if (item.isDragging()) {\n tryFinish(true, item);\n }\n else {\n item._layout(isInstant, tryFinish);\n }\n\n }\n\n return inst;\n\n };\n\n /**\n * Add new items by providing the elements you wish to add to the instance and\n * optionally provide the index where you want the items to be inserted into.\n * All elements that are not already children of the container element will be\n * automatically appended to the container element. If an element has it's CSS\n * display property set to \"none\" it will be marked as inactive during the\n * initiation process. As long as the item is inactive it will not be part of\n * the layout, but it will retain it's index. You can activate items at any\n * point with grid.show() method. This method will automatically call\n * grid.layout() if one or more of the added elements are visible. If only\n * hidden items are added no layout will be called. All the new visible items\n * are positioned without animation during their first layout.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(HTMLElement|HTMLElement[])} elements\n * @param {Object} [options]\n * @param {Number} [options.index=-1]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Item[]}\n */\n Grid.prototype.add = function (elements, options) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return [];\n }\n\n var targetElements = isNodeList(elements) ? nodeListToArray(elements) : [].concat(elements);\n var newItems = [];\n\n // Return early if there are no items.\n if (!targetElements.length) {\n return newItems;\n }\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var items = inst._items;\n var needsLayout = false;\n var elementIndex;\n var item;\n var i;\n\n // Filter out all elements that exist already in current instance.\n // TODO: This filtering can be made a lot faster by storing item elements\n // in a Map or WeakMap. Other option would be to transfer the reponsibility\n // completely to the user and get rid of this sanity check.\n for (i = 0; i < items.length; i++) {\n elementIndex = targetElements.indexOf(items[i]._element);\n if (elementIndex > -1) {\n targetElements.splice(elementIndex, 1);\n\n if (!targetElements.length) {\n return newItems;\n }\n }\n }\n\n var lastElement;\n\n // Create new items.\n for (i = 0; i < targetElements.length; i++) {\n\n item = new Grid.Item(inst, targetElements[i]);\n newItems.push(item);\n\n\n // If the item to be added is active, we need to do a layout. Also, we\n // need to mark the item with the skipNextLayoutAnimation flag to make it\n // position instantly (without animation) during the next layout. Without\n // the hack the item would animate to it's new position from the northwest\n // corner of the grid, which feels a bit buggy (imho).\n if (item._isActive) {\n needsLayout = true;\n item._skipNextLayoutAnimation = true;\n }\n\n if ( i === (targetElements.length -1) ) {\n lastElement = targetElements[i];\n }\n\n }\n\n // Add the new items to the items collection to correct index.\n insertItemsToArray(items, newItems, opts.index);\n\n // Emit add event.\n inst._emit(evAdd, newItems.concat());\n\n // If layout is needed.\n if (needsLayout && layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n //lastElement.scrollIntoView(); //HACK\n\n // Return new items.\n return newItems;\n\n };\n\n /**\n * Remove items from the instance.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(GridMultiItemQuery|GridItemState)} items\n * @param {Object} [options]\n * @param {Boolean} [options.removeElements=false]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Item[]}\n */\n Grid.prototype.remove = function (items, options) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var needsLayout = false;\n var targetItems = inst.getItems(items);\n var item;\n var i;\n\n // Remove the individual items.\n for (i = 0; i < targetItems.length; i++) {\n item = targetItems[i];\n if (item._isActive) {\n needsLayout = true;\n }\n item._destroy(opts.removeElements);\n }\n\n // Emit remove event.\n inst._emit(evRemove, targetItems.concat());\n\n // If layout is needed.\n if (needsLayout && layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n return targetItems;\n\n };\n\n /**\n * Show instance items.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(GridMultiItemQuery|GridItemState)} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {ShowCallback} [options.onFinish]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n Grid.prototype.show = function (items, options) {\n\n return this._isDestroyed ? this : gridShowHideHandler(this, 'show', items, options);\n\n };\n\n /**\n * Hide instance items.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(GridMultiItemQuery|GridItemState)} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {HideCallback} [options.onFinish]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n Grid.prototype.hide = function (items, options) {\n\n return this._isDestroyed ? this : gridShowHideHandler(this, 'hide', items, options);\n\n };\n\n /**\n * Filter items. Expects at least one argument, a predicate, which should be\n * either a function or a string. The predicate callback is executed for every\n * item in the instance. If the return value of the predicate is truthy the\n * item in question will be shown and otherwise hidden. The predicate callback\n * receives the item instance as it's argument. If the predicate is a string\n * it is considered to be a selector and it is checked against every item\n * element in the instance with the native element.matches() method. All the\n * matching items will be shown and others hidden.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(Function|String)} predicate\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {FilterCallback} [options.onFinish]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n Grid.prototype.filter = function (predicate, options) {\n\n var inst = this;\n\n // Return immediately if there are no items or if the instance id destroyed.\n if (inst._isDestroyed || !inst._items.length) {\n return inst;\n }\n\n var items = inst._items;\n var predicateType = typeof predicate;\n var isPredicateString = predicateType === typeString;\n var isPredicateFn = predicateType === typeFunction;\n var opts = options || {};\n var isInstant = opts.instant === true;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var onFinish = typeof opts.onFinish === typeFunction ? opts.onFinish : null;\n var itemsToShow = [];\n var itemsToHide = [];\n var tryFinishCounter = -1;\n var tryFinish = !onFinish ? noop : function () {\n ++tryFinishCounter && onFinish(itemsToShow.concat(), itemsToHide.concat());\n };\n var item;\n var i;\n\n // Check which items need to be shown and which hidden.\n if (isPredicateFn || isPredicateString) {\n for (i = 0; i < items.length; i++) {\n item = items[i];\n if (isPredicateFn ? predicate(item) : elementMatches(item._element, predicate)) {\n itemsToShow.push(item);\n }\n else {\n itemsToHide.push(item);\n }\n }\n }\n\n // Show items that need to be shown.\n if (itemsToShow.length) {\n inst.show(itemsToShow, {\n instant: isInstant,\n onFinish: tryFinish,\n layout: false\n });\n }\n else {\n tryFinish();\n }\n\n // Hide items that need to be hidden.\n if (itemsToHide.length) {\n inst.hide(itemsToHide, {\n instant: isInstant,\n onFinish: tryFinish,\n layout: false\n });\n }\n else {\n tryFinish();\n }\n\n // If there are any items to filter.\n if (itemsToShow.length || itemsToHide.length) {\n\n // Emit filter event.\n inst._emit(evFilter, itemsToShow.concat(), itemsToHide.concat());\n\n // If layout is needed.\n if (layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n }\n\n return inst;\n\n };\n\n /**\n * Sort items. There are three ways to sort the items. The first is simply by\n * providing a function as the comparer which works identically to native\n * array sort. Alternatively you can sort by the sort data you have provided\n * in the instance's options. Just provide the sort data key(s) as a string\n * (separated by space) and the items will be sorted based on the provided\n * sort data keys. Lastly you have the opportunity to provide a presorted\n * array of items which will be used to sync the internal items array in the\n * same order.\n *\n * @public\n * @memberof Grid.prototype\n * @param {(Function|Item[]|String|String[])} comparer\n * @param {Object} [options]\n * @param {Boolean} [options.descending=false]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n Grid.prototype.sort = function (comparer, options) {\n\n var inst = this;\n\n // Let's not sort if it has no effect.\n if (inst._isDestroyed || inst._items.length < 2) {\n return inst;\n }\n\n var items = inst._items;\n var opts = options || {};\n var isDescending = !!opts.descending;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var origItems = items.concat();\n var indexMap;\n\n // If function is provided do a native array sort.\n if (typeof comparer === typeFunction) {\n items.sort(function (a, b) {\n var result = comparer(a, b);\n return (isDescending && result !== 0 ? -result : result) || compareItemIndices(a, b, isDescending, indexMap || (indexMap = getItemIndexMap(origItems)));\n });\n }\n\n // Otherwise if we got a string, let's sort by the sort data as provided in\n // the instance's options.\n else if (typeof comparer === typeString) {\n comparer = comparer.trim().split(' ').map(function (val) {\n return val.split(':');\n });\n items.sort(function (a, b) {\n return compareItems(a, b, isDescending, comparer) || compareItemIndices(a, b, isDescending, indexMap || (indexMap = getItemIndexMap(origItems)));\n });\n }\n\n // Otherwise if we got an array, let's assume it's a presorted array of the\n // items and order the items based on it.\n else if (Array.isArray(comparer)) {\n sortItemsByReference(items, comparer);\n if (isDescending) {\n items.reverse();\n }\n }\n\n // Otherwise, let's go home.\n else {\n return inst;\n }\n\n // Emit sort event.\n inst._emit(evSort, items.concat(), origItems);\n\n // If layout is needed.\n if (layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n return inst;\n\n };\n\n /**\n * Move item to another index or in place of another item.\n *\n * @public\n * @memberof Grid.prototype\n * @param {GridSingleItemQuery} item\n * @param {GridSingleItemQuery} position\n * @param {Object} [options]\n * @param {String} [options.action=\"move\"]\n * - Accepts either \"move\" or \"swap\".\n * - \"move\" moves the item in place of the other item.\n * - \"swap\" swaps the position of the items.\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n Grid.prototype.move = function (item, position, options) {\n\n var inst = this;\n\n // Return immediately, if moving an item is not possible.\n if (inst._isDestroyed || inst._items.length < 2) {\n return inst;\n }\n\n var items = inst._items;\n var opts = options || {};\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var isSwap = opts.action === 'swap';\n var action = isSwap ? 'swap' : 'move';\n var fromItem = inst._getItem(item);\n var toItem = inst._getItem(position);\n var fromIndex;\n var toIndex;\n\n // Make sure the items exist and are not the same.\n if (fromItem && toItem && (fromItem !== toItem)) {\n\n // Get the indices of the items.\n fromIndex = items.indexOf(fromItem);\n toIndex = items.indexOf(toItem);\n\n // Do the move/swap.\n (isSwap ? arraySwap : arrayMove)(items, fromIndex, toIndex);\n\n // Emit move event.\n inst._emit(evMove, {\n item: fromItem,\n fromIndex: fromIndex,\n toIndex: toIndex,\n action: action\n });\n\n // If layout is needed.\n if (layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n }\n\n return inst;\n\n };\n\n /**\n * Send item to another Grid instance.\n *\n * @public\n * @memberof Grid.prototype\n * @param {GridSingleItemQuery} item\n * @param {Grid} grid\n * @param {GridSingleItemQuery} position\n * @param {Object} [options]\n * @param {HTMLElement} [options.appendTo=document.body]\n * @param {(Boolean|LayoutCallback|String)} [options.layoutSender=true]\n * @param {(Boolean|LayoutCallback|String)} [options.layoutReceiver=true]\n * @returns {Grid}\n */\n Grid.prototype.send = function (item, grid, position, options) {\n\n var currentGrid = this;\n\n // Return immediately if either grid is destroyed or if the grids are the\n // same, or if target item was not found.\n if (currentGrid._isDestroyed || grid._isDestroyed || currentGrid === grid || !(item = currentGrid._getItem(item))) {\n return currentGrid;\n }\n\n var targetGrid = grid;\n var opts = options || {};\n var container = opts.appendTo || body;\n var layoutSender = opts.layoutSender ? opts.layoutSender : opts.layoutSender === undefined;\n var layoutReceiver = opts.layoutReceiver ? opts.layoutReceiver : opts.layoutReceiver === undefined;\n\n // Start the migration process.\n item._migrate.start(targetGrid, position, container);\n\n // If migration was started succesfully and the item is active, let's layout\n // the grids.\n if (item._migrate.isActive && item.isActive()) {\n if (layoutSender) {\n currentGrid.layout(layoutSender === 'instant', typeof layoutSender === typeFunction ? layoutSender : undefined);\n }\n if (layoutReceiver) {\n targetGrid.layout(layoutReceiver === 'instant', typeof layoutReceiver === typeFunction ? layoutReceiver : undefined);\n }\n }\n\n return currentGrid;\n\n };\n\n /**\n * Destroy the instance.\n *\n * @public\n * @memberof Grid.prototype\n * @param {Boolean} [removeElements=false]\n * @returns {Grid}\n */\n Grid.prototype.destroy = function (removeElements) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var container = inst._element;\n var items = inst._items.concat();\n var i;\n\n // Unbind window resize event listener.\n if (inst._resizeHandler) {\n global.removeEventListener('resize', inst._resizeHandler);\n }\n\n // Destroy items.\n for (i = 0; i < items.length; i++) {\n items[i]._destroy(removeElements);\n }\n\n // Restore container.\n removeClass(container, inst._settings.containerClass);\n setStyles(container, {height: ''});\n\n // Emit destroy event and unbind all events.\n inst._emit(evDestroy);\n inst._emitter.destroy();\n\n // Remove reference from the grid instances collection.\n gridInstances[inst._id] = undefined;\n\n // Flag instance as destroyed.\n inst._isDestroyed = true;\n\n return inst;\n\n };\n\n /**\n * Grid - Protected prototype methods\n * **********************************\n */\n\n /**\n * Get instance's item by element or by index. Target can also be an Item\n * instance in which case the function returns the item if it exists within\n * related Grid instance. If nothing is found with the provided target, null\n * is returned.\n *\n * @protected\n * @memberof Grid.prototype\n * @param {GridSingleItemQuery} [target=0]\n * @returns {?Item}\n */\n Grid.prototype._getItem = function (target) {\n\n var inst = this;\n var items = inst._items;\n var i;\n\n // If no target is specified or the instance is destroyed, return the first\n // item or null.\n if (inst._isDestroyed || !target) {\n return items[0] || null;\n }\n\n // If target is number return the item in that index. If the number is lower\n // than zero look for the item starting from the end of the items array. For\n // example -1 for the last item, -2 for the second last item, etc.\n else if (typeof target === typeNumber) {\n return items[target > -1 ? target : items.length + target] || null;\n }\n\n // If the target is an instance of Item return it if it is attached to this\n // Grid instance, otherwise return null.\n else if (target instanceof Item) {\n return target._gridId === inst._id ? target : null;\n }\n\n // In other cases let's assume that the target is an element, so let's try\n // to find an item that matches the element and return it. If item is not\n // found return null.\n else {\n // TODO: This could be made a lot faster by using WeakMap or Map.\n for (i = 0; i < items.length; i++) {\n if (items[i]._element === target) {\n return items[i];\n }\n }\n return null;\n }\n\n };\n\n /**\n * Bind an event listener.\n *\n * @protected\n * @memberof Grid.prototype\n * @param {String} event\n * @param {*} [arg1]\n * @param {*} [arg2]\n * @param {*} [arg3]\n * @returns {Grid}\n */\n Grid.prototype._emit = function () {\n\n var inst = this;\n\n if (!inst._isDestroyed) {\n inst._emitter.emit.apply(inst._emitter, arguments);\n }\n\n return inst;\n\n };\n\n /**\n * Refresh container's internal dimensions.\n *\n * @private\n * @memberof Grid.prototype\n * @returns {Grid}\n */\n Grid.prototype._refreshDimensions = function () {\n\n var inst = this;\n var element = inst._element;\n\n // refreshTiddlerClasses(element);\n\n var rect = element.getBoundingClientRect();\n var sides = ['left', 'right', 'top', 'bottom'];\n var i;\n\n inst._width = rect.width;\n inst._height = rect.height;\n inst._left = rect.left;\n inst._top = rect.top;\n inst._border = {};\n\n for (i = 0; i < sides.length; i++) {\n inst._border[sides[i]] = getStyleAsFloat(element, 'border-' + sides[i] + '-width');\n }\n\n return inst;\n\n };\n\n /**\n * Item\n * ****\n */\n\n /**\n * Creates a new Item instance for a Grid instance.\n *\n * @public\n * @class\n * @param {Grid} grid\n * @param {HTMLElement} element\n */\n function Item(grid, element) {\n\n var inst = this;\n var settings = grid._settings;\n var isHidden;\n\n // Create instance id and add item to the itemInstances collection.\n inst._id = ++uuid;\n itemInstances[inst._id] = inst;\n\n // Destroyed flag.\n inst._isDestroyed = false;\n\n // If the provided item element is not a direct child of the grid container\n // element, append it to the grid container.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n }\n\n // Set item class.\n addClass(element, settings.itemClass);\n\n // Check if the element is hidden.\n isHidden = getStyle(element, 'display') === 'none';\n\n // Set visible/hidden class.\n addClass(element, isHidden ? settings.itemHiddenClass : settings.itemVisibleClass);\n\n // Refrence to connected Grid instance's id.\n inst._gridId = grid._id;\n\n // The elements.\n inst._element = element;\n inst._child = element.children[0];\n\n // Initiate item's animation controllers.\n inst._animate = new Grid.ItemAnimate(inst, element);\n inst._animateChild = new Grid.ItemAnimate(inst, inst._child);\n\n // Set up active state (defines if the item is considered part of the layout\n // or not).\n inst._isActive = isHidden ? false : true;\n\n // Set up positioning state (defines if the item is currently animating\n // it's position).\n inst._isPositioning = false;\n\n // Set up visibility states.\n inst._isHidden = isHidden;\n inst._isHiding = false;\n inst._isShowing = false;\n\n // Visibility animation callback queue. Whenever a callback is provided for\n // show/hide methods and animation is enabled the callback is stored\n // temporarily to this array. The callbacks are called with the first\n // argument as false if the animation succeeded without interruptions and\n // with the first argument as true if the animation was interrupted.\n inst._visibilityQueue = [];\n\n // Layout animation callback queue. Whenever a callback is provided for\n // layout method and animation is enabled the callback is stored temporarily\n // to this array. The callbacks are called with the first argument as false\n // if the animation succeeded without interruptions and with the first\n // argument as true if the animation was interrupted.\n inst._layoutQueue = [];\n\n // Set up initial positions.\n inst._left = 0;\n inst._top = 0;\n\n // Set element's initial styles.\n setStyles(element, {\n left: '0',\n top: '0',\n transform: getTranslateString(0, 0),\n display: isHidden ? 'none' : 'block'\n });\n\n // Set up the initial dimensions and sort data.\n inst._refreshDimensions()._refreshSortData();\n\n // Set initial styles for the child element.\n if (isHidden) {\n grid._itemHideHandler.start(inst, true);\n }\n else {\n grid._itemShowHandler.start(inst, true);\n }\n\n // Set up migration handler data.\n inst._migrate = new Grid.ItemMigrate(inst);\n\n // Set up release handler\n inst._release = new Grid.ItemRelease(inst);\n\n // Set up drag handler.\n inst._drag = settings.dragEnabled ? new Grid.ItemDrag(inst) : null;\n\n //refreshTiddlerClasses(element);\n\n }\n\n /**\n * Item - Public prototype methods\n * *******************************\n */\n\n /**\n * Get the instance grid reference.\n *\n * @public\n * @memberof Item.prototype\n * @returns {Grid}\n */\n Item.prototype.getGrid = function () {\n\n return gridInstances[this._gridId];\n\n };\n\n /**\n * Get the instance element.\n *\n * @public\n * @memberof Item.prototype\n * @returns {HTMLElement}\n */\n Item.prototype.getElement = function () {\n\n return this._element;\n\n };\n\n /**\n * Get instance element's cached width.\n *\n * @public\n * @memberof Item.prototype\n * @returns {Number}\n */\n Item.prototype.getWidth = function () {\n\n return this._width;\n\n };\n\n /**\n * Get instance element's cached height.\n *\n * @public\n * @memberof Item.prototype\n * @returns {Number}\n */\n Item.prototype.getHeight = function () {\n\n return this._height;\n\n };\n\n /**\n * Get instance element's cached margins.\n *\n * @public\n * @memberof Item.prototype\n * @returns {Object}\n * - The returned object contains left, right, top and bottom properties\n * which indicate the item element's cached margins.\n */\n Item.prototype.getMargin = function () {\n\n return {\n left: this._margin.left,\n right: this._margin.right,\n top: this._margin.top,\n bottom: this._margin.bottom\n };\n\n };\n\n /**\n * Get instance element's cached position.\n *\n * @public\n * @memberof Item.prototype\n * @returns {Object}\n * - The returned object contains left and top properties which indicate the\n * item element's cached position in the grid.\n */\n Item.prototype.getPosition = function () {\n\n return {\n left: this._left,\n top: this._top\n };\n\n };\n\n /**\n * Is the item active?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isActive = function () {\n\n return this._isActive;\n\n };\n\n /**\n * Is the item visible?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isVisible = function () {\n\n return !this._isHidden;\n\n };\n\n /**\n * Is the item being animated to visible?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isShowing = function () {\n\n return this._isShowing;\n\n };\n\n /**\n * Is the item being animated to hidden?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isHiding = function () {\n\n return this._isHiding;\n\n };\n\n /**\n * Is the item positioning?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isPositioning = function () {\n\n return this._isPositioning;\n\n };\n\n /**\n * Is the item being dragged?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isDragging = function () {\n\n return !!this._drag && this._drag._data.isActive;\n\n };\n\n /**\n * Is the item being released?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isReleasing = function () {\n\n return this._release.isActive;\n\n };\n\n /**\n * Is the item destroyed?\n *\n * @public\n * @memberof Item.prototype\n * @returns {Boolean}\n */\n Item.prototype.isDestroyed = function () {\n\n return this._isDestroyed;\n\n };\n\n function refreshTiddlerClasses(element) {\n var viewPortHeightPX = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n var viewPortHeight = parseInt(viewPortHeightPX, 10);\n var viewPortWidthPX = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n var viewPortWidth = parseInt(viewPortWidthPX, 10);\n var viewPortProp = (viewPortWidth / viewPortHeight)\n\nfunction hasClass(element, tiddlerclass) {\n return (' ' + element.className + ' ').indexOf(' ' + tiddlerclass + ' ') > -1;\n}\n\n\n var itemHeight = getStyleAsFloat(element, \"height\"),//parseInt(document.getComputedStyle(element,null).getPropertyValue(\"height\"), 10),\n itemWidth = getStyleAsFloat(element, \"width\"),// parseInt(document.getComputedStyle(element,null).getPropertyValue(\"width\"), 10),\n widthHeightProp = (itemWidth / itemHeight),\n tiddlerClasses = [\"span-2\", \"span-3\", \"span-4\", \"span-6\", \"span-9\", \"span-12\"],\n tiddlerClassesHigh = [\"span-3\", \"span-4\", \"span-6\", \"span-6\", \"span-9\", \"span-12\"];\nif (viewPortProp > 1) {\n if (widthHeightProp < 0.5 && itemHeight >= (viewPortHeight * 2) && !hasClass(element,\"span-9\")) {\n addClass(element,\"span-9\");\n removeClass(element,\"span-2\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-4\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-12\");\n } else if (widthHeightProp < 0.5 && itemHeight > viewPortHeight && itemHeight <= (viewPortHeight * 2) && !hasClass(element,\"span-6\")) {\n addClass(element,\"span-6\");\n removeClass(element,\"span-2\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-4\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-12\");\n } else if (widthHeightProp < 0.5 && itemHeight > ((viewPortHeight / 3) * 2) && itemHeight < viewPortHeight && !hasClass(element,\"span-4\")) {\n addClass(element,\"span-4\");\n removeClass(element,\"span-2\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-12\");\n } else if (widthHeightProp < 0.5 && itemHeight >= (viewPortHeight / 3) && itemHeight < ((viewPortHeight / 3) * 2) && !hasClass(element,\"span-3\")) {\n addClass(element,\"span-3\");\n removeClass(element,\"span-2\");\n removeClass(element, \"span-4\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-12\");\n } else if (widthHeightProp > 1.9 && itemHeight < (viewPortHeight / 4) && !hasClass(element,\"span-2\")) {\n addClass(element,\"span-2\");\n removeClass(element,\"span-3\");\n removeClass(element, \"span-4\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-12\");\n }\n }\n\n\nreturn;\n}\n\n\n /**\n * Item - Protected prototype methods\n * **********************************\n */\n\n /**\n * Recalculate item's dimensions.\n *\n * @protected\n * @memberof Item.prototype\n * @returns {Item}\n */\n Item.prototype._refreshDimensions = function () {\n\n var inst = this;\n\n if (inst._isDestroyed || inst._isHidden) {\n return inst;\n }\n\n var element = inst._element;\n\n //refreshTiddlerClasses(element);\n\n var rect = element.getBoundingClientRect();\n var sides = ['left', 'right', 'top', 'bottom'];\n var margin = inst._margin = inst._margin || {};\n var side;\n var i;\n\n // Calculate width and height.\n inst._width = rect.width;\n inst._height = rect.height;\n\n // Calculate margins (ignore negative margins).\n for (i = 0; i < 4; i++) {\n side = getStyleAsFloat(element, 'margin-' + sides[i]);\n margin[sides[i]] = side > 0 ? side : 0;\n }\n\n return inst;\n\n };\n\n /**\n * Fetch and store item's sort data.\n *\n * @protected\n * @memberof Item.prototype\n * @returns {Item}\n */\n Item.prototype._refreshSortData = function () {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var sortData = {};\n var getters = inst.getGrid()._settings.sortData;\n\n // Fetch sort data.\n if (getters) {\n Object.keys(getters).forEach(function (key) {\n sortData[key] = getters[key](inst, inst._element);\n });\n }\n\n // Store sort data to the instance.\n inst._sortData = sortData;\n\n return inst;\n\n };\n\n /**\n * Position item based on it's current data.\n *\n * @protected\n * @memberof Item.prototype\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n * @returns {Item}\n */\n Item.prototype._layout = function (instant, onFinish) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var element = inst._element;\n var isPositioning = inst._isPositioning;\n var migrate = inst._migrate;\n var release = inst._release;\n var isJustReleased = release.isActive && release.isPositioningStarted === false;\n var grid = inst.getGrid();\n var settings = grid._settings;\n var animDuration = isJustReleased ? settings.dragReleaseDuration : settings.layoutDuration;\n var animEasing = isJustReleased ? settings.dragReleaseEasing : settings.layoutEasing;\n var animEnabled = !instant && !inst._skipNextLayoutAnimation && animDuration > 0;\n var isAnimating;\n var offsetLeft;\n var offsetTop;\n var currentLeft;\n var currentTop;\n var targetStyles;\n\n // If the item is currently positioning process current layout callback\n // queue with interrupted flag on if the item is currently positioning.\n if (isPositioning) {\n processQueue(inst._layoutQueue, true, inst);\n }\n\n // Mark release positioning as started.\n if (isJustReleased) {\n release.isPositioningStarted = true;\n }\n\n // Push the callback to the callback queue.\n if (typeof onFinish === typeFunction) {\n inst._layoutQueue.push(onFinish);\n }\n\n // Get item container offsets and target styles.\n offsetLeft = release.isActive ? release.containerDiffX : migrate.isActive ? migrate.containerDiffX : 0;\n offsetTop = release.isActive ? release.containerDiffY : migrate.isActive ? migrate.containerDiffY : 0;\n targetStyles = {transform: getTranslateString(inst._left + offsetLeft, inst._top + offsetTop)};\n\n // If no animations are needed, easy peasy!\n if (!animEnabled) {\n isPositioning && rafLoop.cancel(rafQueueLayout, inst._id);\n isAnimating = inst._animate.isAnimating();\n inst._stopLayout(false, targetStyles);\n !isAnimating && setStyles(element, targetStyles);\n inst._skipNextLayoutAnimation = false;\n return inst._finishLayout();\n }\n\n // Set item as positioning.\n inst._isPositioning = true;\n\n // Get the element's current left and top position in the read callback.\n // Then in the write callback do the animation if necessary.\n rafLoop.add(rafQueueLayout, inst._id, function () {\n currentLeft = getTranslateAsFloat(element, 'x') - offsetLeft;\n currentTop = getTranslateAsFloat(element, 'y') - offsetTop;\n }, function () {\n\n // If the item is already in correct position let's quit early.\n if (inst._left === currentLeft && inst._top === currentTop) {\n isPositioning && inst._stopLayout(false, targetStyles);\n inst._isPositioning = false;\n return inst._finishLayout();\n }\n\n // Set item's positioning class.\n !isPositioning && addClass(element, settings.itemPositioningClass);\n\n // Animate.\n inst._animate.start(\n {transform: getTranslateString(currentLeft + offsetLeft, currentTop + offsetTop)},\n targetStyles,\n {\n duration: animDuration,\n easing: animEasing,\n onFinish: function () {\n inst._finishLayout();\n }\n }\n );\n\n });\n\n return inst;\n\n };\n\n /**\n * Position item based on it's current data.\n *\n * @protected\n * @memberof Item.prototype\n * @returns {Item}\n */\n Item.prototype._finishLayout = function () {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n // Mark the item as not positioning and remove positioning classes.\n if (inst._isPositioning) {\n inst._isPositioning = false;\n removeClass(inst._element, inst.getGrid()._settings.itemPositioningClass);\n }\n\n // Finish up release.\n if (inst._release.isActive) {\n inst._release.stop();\n }\n\n // Finish up migration.\n if (inst._migrate.isActive) {\n inst._migrate.stop();\n }\n\n // Process the callback queue.\n processQueue(inst._layoutQueue, false, inst);\n\n return inst;\n\n };\n\n /**\n * Stop item's position animation if it is currently animating.\n *\n * @protected\n * @memberof Item.prototype\n * @param {Boolean} [processLayoutQueue=false]\n * @param {Object} [targetStyles]\n * @returns {Item}\n */\n Item.prototype._stopLayout = function (processLayoutQueue, targetStyles) {\n\n var inst = this;\n\n if (inst._isDestroyed || !inst._isPositioning) {\n return inst;\n }\n\n // Cancel animation init.\n rafLoop.cancel(rafQueueLayout, inst._id);\n\n // Stop animation.\n inst._animate.stop(targetStyles);\n\n // Remove positioning class.\n removeClass(inst._element, inst.getGrid()._settings.itemPositioningClass);\n\n // Reset state.\n inst._isPositioning = false;\n\n // Process callback queue.\n if (processLayoutQueue) {\n processQueue(inst._layoutQueue, true, inst);\n }\n\n return inst;\n\n };\n\n Item.prototype._show = function (instant, onFinish) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var element = inst._element;\n var queue = inst._visibilityQueue;\n var callback = typeof onFinish === typeFunction ? onFinish : null;\n var grid = inst.getGrid();\n var settings = grid._settings;\n\n // If item is visible call the callback and be done with it.\n if (!inst._isShowing && !inst._isHidden) {\n callback && callback(false, inst);\n return inst;\n }\n\n // If item is showing and does not need to be shown instantly, let's just\n // push callback to the callback queue and be done with it.\n if (inst._isShowing && !instant) {\n callback && queue.push(callback);\n return inst;\n }\n\n // If the item is hiding or hidden process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!inst._isShowing) {\n processQueue(queue, true, inst);\n removeClass(element, settings.itemHiddenClass);\n addClass(element, settings.itemVisibleClass);\n !inst._isHiding && setStyles(element, {display: 'block'});\n }\n\n // Push callback to the callback queue.\n callback && queue.push(callback);\n\n // Update item's internal states.\n inst._isActive = inst._isShowing = true;\n inst._isHiding = inst._isHidden = false;\n\n // If we need to show instantly.\n if (instant) {\n grid._itemShowHandler.stop(inst, settings.visibleStyles);\n inst._isShowing = false;\n processQueue(queue, false, inst);\n }\n\n // If we need to animate.\n else {\n grid._itemShowHandler.start(inst, instant, function () {\n if (!inst._isHidden) {\n inst._isShowing = false;\n processQueue(queue, false, inst);\n }\n });\n }\n\n return inst;\n\n };\n\n /**\n * Hide item.\n *\n * @protected\n * @memberof Item.prototype\n * @param {Boolean} instant\n * @param {Function} [onFinish]\n * @returns {Item}\n */\n Item.prototype._hide = function (instant, onFinish) {\n\n var inst = this;\n\n // Return immediately if the instance is destroyed.\n if (inst._isDestroyed) {\n return inst;\n }\n\n var element = inst._element;\n var queue = inst._visibilityQueue;\n var callback = typeof onFinish === typeFunction ? onFinish : null;\n var grid = inst.getGrid();\n var settings = grid._settings;\n\n // If item is already hidden call the callback and be done with it.\n if (!inst._isHiding && inst._isHidden) {\n callback && callback(false, inst);\n return inst;\n }\n\n // If item is hiding and does not need to be hidden instantly, let's just\n // push callback to the callback queue and be done with it.\n if (inst._isHiding && !instant) {\n callback && queue.push(callback);\n return inst;\n }\n\n // If the item is showing or visible process the current visibility callback\n // queue with the interrupted flag active, update classes and set display\n // to block if necessary.\n if (!inst._isHiding) {\n processQueue(queue, true, inst);\n addClass(element, settings.itemHiddenClass);\n removeClass(element, settings.itemVisibleClass);\n }\n\n // Push callback to the callback queue.\n callback && queue.push(callback);\n\n // Update item's internal states.\n inst._isHidden = inst._isHiding = true;\n inst._isActive = inst._isShowing = false;\n\n // If we need to hide instantly.\n if (instant) {\n grid._itemHideHandler.stop(inst, settings.hiddenStyles);\n inst._isHiding = false;\n inst._stopLayout(true, {transform: getTranslateString(0, 0)});\n setStyles(element, {display: 'none'});\n processQueue(queue, false, inst);\n }\n\n // If we need to animate.\n else {\n grid._itemHideHandler.start(inst, instant, function () {\n if (inst._isHidden) {\n inst._isHiding = false;\n inst._stopLayout(true, {transform: getTranslateString(0, 0)});\n setStyles(element, {display: 'none'});\n processQueue(queue, false, inst);\n }\n });\n }\n\n return inst;\n\n };\n\n /**\n * Destroy item instance.\n *\n * @protected\n * @memberof Item.prototype\n * @param {Boolean} [removeElement=false]\n * @returns {Item}\n */\n Item.prototype._destroy = function (removeElement) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var element = inst._element;\n var grid = inst.getGrid();\n var settings = grid._settings;\n var index = grid._items.indexOf(inst);\n\n // Destroy release and migration.\n inst._release.destroy();\n inst._migrate.destroy();\n\n // Stop animations.\n inst._stopLayout(true, {});\n grid._itemShowHandler.stop(inst, {});\n grid._itemHideHandler.stop(inst, {});\n\n // Destroy drag.\n inst._drag && inst._drag.destroy();\n\n // Destroy animation handlers.\n inst._animate.destroy();\n inst._animateChild.destroy();\n\n // Handle visibility callback queue, fire all uncompleted callbacks with\n // interrupted flag.\n processQueue(inst._visibilityQueue, true, inst);\n\n // Remove all inline styles.\n element.removeAttribute('style');\n inst._child.removeAttribute('style');\n\n // Remove classes.\n removeClass(element, settings.itemPositioningClass);\n removeClass(element, settings.itemDraggingClass);\n removeClass(element, settings.itemReleasingClass);\n removeClass(element, settings.itemClass);\n removeClass(element, settings.itemVisibleClass);\n removeClass(element, settings.itemHiddenClass);\n\n // Remove item from Grid instance if it still exists there.\n index > -1 && grid._items.splice(index, 1);\n\n // Remove element from DOM.\n removeElement && element.parentNode.removeChild(element);\n\n // Remove item instance from the item instances collection.\n itemInstances[inst._id] = undefined;\n\n // Update item states (mostly just for good measure).\n inst._isActive = inst._isPositioning = inst._isHiding = inst._isShowing = false;\n inst._isDestroyed = inst._isHidden = true;\n\n return inst;\n\n };\n\n /**\n * Layout\n * ******\n */\n\n /**\n * Creates a new Layout instance.\n *\n * @public\n * @class\n * @param {Grid} grid\n * @param {Item[]} items\n */\n function Layout(grid, items) {\n\n var inst = this;\n var layoutSettings = grid._settings.layout;\n\n // Clone items.\n items = items.concat();\n\n // Let's make sure we have the correct container dimensions before going\n // further.\n grid._refreshDimensions();\n\n var width = grid._width - grid._border.left - grid._border.right;\n var height = grid._height - grid._border.top - grid._border.bottom;\n var isCustomLayout = typeof layoutSettings === typeFunction;\n var layout = isCustomLayout ? layoutSettings(items, width, height) :\n muuriLayout(items, width, height, isPlainObject(layoutSettings) ? layoutSettings : {});\n\n // Set instance data based on layout data.\n inst.slots = layout.slots;\n inst.setWidth = layout.setWidth || false;\n inst.setHeight = layout.setHeight || false;\n inst.width = layout.width;\n inst.height = layout.height;\n\n }\n\n /**\n * Emitter\n * *******\n */\n\n /**\n * Event emitter constructor.\n *\n * @public\n * @class\n */\n function Emitter() {\n\n this._events = {};\n this._isDestroyed = false;\n\n }\n\n /**\n * Emitter - Public prototype methods\n * **********************************\n */\n\n /**\n * Bind an event listener.\n *\n * @public\n * @memberof Emitter.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\n Emitter.prototype.on = function (event, listener) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var listeners = inst._events[event] || [];\n listeners.push(listener);\n inst._events[event] = listeners;\n\n return inst;\n\n };\n\n /**\n * Bind an event listener that is triggered only once.\n *\n * @public\n * @memberof Emitter.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\n Emitter.prototype.once = function (event, listener) {\n\n var inst = this;\n return this.on(event, function callback() {\n inst.off(event, callback);\n listener.apply(null, arguments);\n });\n\n };\n\n /**\n * Unbind all event listeners that match the provided listener function.\n *\n * @public\n * @memberof Emitter.prototype\n * @param {String} event\n * @param {Function} listener\n * @returns {Emitter}\n */\n Emitter.prototype.off = function (event, listener) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var listeners = inst._events[event] || [];\n var i = listeners.length;\n\n while (i--) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n }\n }\n\n return inst;\n\n };\n\n /**\n * Emit all listeners in a specified event with the provided arguments.\n *\n * @public\n * @memberof Emitter.prototype\n * @param {String} event\n * @param {*} [arg1]\n * @param {*} [arg2]\n * @param {*} [arg3]\n * @returns {Emitter}\n */\n Emitter.prototype.emit = function (event, arg1, arg2, arg3) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var listeners = inst._events[event] || [];\n var listenersLength = listeners.length;\n var argsLength = arguments.length - 1;\n var i;\n\n if (listenersLength) {\n listeners = listeners.concat();\n for (i = 0; i < listenersLength; i++) {\n argsLength === 0 ? listeners[i]() :\n argsLength === 1 ? listeners[i](arg1) :\n argsLength === 2 ? listeners[i](arg1, arg2) :\n listeners[i](arg1, arg2, arg3);\n }\n }\n\n return inst;\n\n };\n\n /**\n * Destroy emitter instance. Basically just removes all bound listeners.\n *\n * @public\n * @memberof Emitter.prototype\n * @returns {Emitter}\n */\n Emitter.prototype.destroy = function () {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return inst;\n }\n\n var eventNames = Object.keys(inst._events);\n var i;\n\n for (i = 0; i < eventNames.length; i++) {\n inst._events[eventNames[i]] = null;\n }\n\n inst._isDestroyed = true;\n\n return inst;\n\n };\n\n /**\n * ItemAnimate\n * ***********\n */\n\n /**\n * Muuri's internal animation engine. Uses Web Animations API.\n *\n * @public\n * @class\n * @param {Item} item\n * @param {HTMLElement} element\n */\n function ItemAnimate(item, element) {\n\n var inst = this;\n inst._item = item;\n inst._element = element;\n inst._animation = null;\n inst._propsTo = null;\n inst._isDestroyed = false;\n\n }\n\n /**\n * ItemAnimate - Public prototype methods\n * **************************************\n */\n\n /**\n * Start instance's animation. Automatically stops current animation if it is\n * running.\n *\n * @public\n * @memberof ItemAnimate.prototype\n * @param {Object} propsFrom\n * @param {Object} propsTo\n * @param {Object} [options]\n * @param {Number} [options.duration=300]\n * @param {String} [options.easing='ease']\n * @param {Function} [options.onFinish]\n */\n ItemAnimate.prototype.start = function (propsFrom, propsTo, options) {\n\n var inst = this;\n\n if (inst._isDestroyed) {\n return;\n }\n\n var opts = options || {};\n var callback = typeof opts.onFinish === typeFunction ? opts.onFinish : null;\n var shouldStop;\n\n // If item is being animate check if the target animation properties equal\n // to the properties in the current animation. If they match we can just let\n // the animation continue and be done with it (and of course change the\n // cached callback). If the animation properties do not match we need to\n // stop the ongoing animation.\n if (inst._animation) {\n shouldStop = Object.keys(propsTo).some(function (propName) {\n return propsTo[propName] !== inst._propsTo[propName];\n });\n if (shouldStop) {\n inst._animation.cancel();\n }\n else {\n inst._animation.onfinish = function () {\n inst._animation = inst._propsTo = null;\n callback && callback();\n };\n return;\n }\n }\n\n // Cache target props.\n inst._propsTo = propsTo;\n\n // Start the animation.\n inst._animation = inst._element.animate([propsFrom, propsTo], {\n duration: opts.duration || 300,\n easing: opts.easing || 'ease'\n });\n\n // Bind animation finish callback.\n inst._animation.onfinish = function () {\n inst._animation = inst._propsTo = null;\n callback && callback();\n };\n\n // Set the end styles.\n setStyles(inst._element, propsTo);\n\n };\n\n /**\n * Stop instance's current animation if running.\n *\n * @private\n * @memberof ItemAnimate.prototype\n * @param {Object} [currentProps]\n */\n ItemAnimate.prototype.stop = function (currentProps) {\n\n var inst = this;\n\n if (!inst._isDestroyed && inst._animation) {\n setStyles(inst._element, currentProps || getCurrentStyles(inst._element, inst._propsTo));\n inst._animation.cancel();\n inst._animation = inst._propsTo = null;\n }\n\n };\n\n /**\n * Check if the item is being animated currently.\n *\n * @private\n * @memberof ItemAnimate.prototype\n * @return {Boolean}\n */\n ItemAnimate.prototype.isAnimating = function () {\n\n return !!this._animation;\n\n };\n\n /**\n * Destroy the instance and stop current animation if it is running.\n *\n * @public\n * @memberof ItemAnimate.prototype\n * @returns {Boolean}\n */\n ItemAnimate.prototype.destroy = function () {\n\n var inst = this;\n\n if (!inst._isDestroyed) {\n inst.stop();\n inst._item = inst._element = null;\n inst._isDestroyed = true;\n }\n\n };\n\n /**\n * ItemMigrate\n * ***********\n */\n\n /**\n * The migrate process handler constructor.\n *\n * @class\n * @private\n * @param {Item} item\n */\n function ItemMigrate(item) {\n\n var migrate = this;\n\n // Private props.\n migrate._itemId = item._id;\n migrate._isDestroyed = false;\n\n // Public props.\n migrate.isActive = false;\n migrate.container = false;\n migrate.containerDiffX = 0;\n migrate.containerDiffY = 0;\n\n }\n\n /**\n * ItemMigrate - Public prototype methods\n * **************************************\n */\n\n /**\n * Destroy instance.\n *\n * @public\n * @memberof ItemMigrate.prototype\n * @returns {ItemMigrate}\n */\n ItemMigrate.prototype.destroy = function () {\n\n var migrate = this;\n\n if (!migrate._isDestroyed) {\n migrate.stop(true);\n migrate._isDestroyed = true;\n }\n\n return migrate;\n\n };\n\n /**\n * Get Item instance.\n *\n * @public\n * @memberof ItemMigrate.prototype\n * @returns {?Item}\n */\n ItemMigrate.prototype.getItem = function () {\n\n return itemInstances[this._itemId] || null;\n\n };\n\n /**\n * Start the migrate process of an item.\n *\n * @public\n * @memberof ItemMigrate.prototype\n * @param {Grid} targetGrid\n * @param {GridSingleItemQuery} position\n * @param {HTMLElement} [container]\n * @returns {ItemMigrate}\n */\n ItemMigrate.prototype.start = function (targetGrid, position, container) {\n\n var migrate = this;\n\n if (migrate._isDestroyed) {\n return migrate;\n }\n\n var item = migrate.getItem();\n var itemElement = item._element;\n var isItemVisible = item.isVisible();\n var currentGrid = item.getGrid();\n var currentGridStn = currentGrid._settings;\n var targetGridStn = targetGrid._settings;\n var targetGridElement = targetGrid._element;\n var currentIndex = currentGrid._items.indexOf(item);\n var targetIndex = typeof position === typeNumber ? position : targetGrid._items.indexOf(targetGrid._getItem(position));\n var targetContainer = container || body;\n var currentContainer;\n var offsetDiff;\n var containerDiff;\n var translateX;\n var translateY;\n\n // If we have invalid new index, let's return immediately.\n if (targetIndex === null) {\n return migrate;\n }\n\n // Normalize target index (for event data).\n targetIndex = normalizeArrayIndex(targetGrid._items, targetIndex, true);\n\n // Get current translateX and translateY values if needed.\n if (item.isPositioning() || migrate.isActive || item.isReleasing()) {\n translateX = getTranslateAsFloat(itemElement, 'x');\n translateY = getTranslateAsFloat(itemElement, 'y');\n }\n\n // Abort current positioning.\n if (item.isPositioning()) {\n item._stopLayout(true, {transform: getTranslateString(translateX, translateY)});\n }\n\n // Abort current migration.\n if (migrate.isActive) {\n translateX -= migrate.containerDiffX;\n translateY -= migrate.containerDiffY;\n migrate.stop(true, {transform: getTranslateString(translateX, translateY)});\n }\n\n // Abort current release.\n if (item.isReleasing()) {\n translateX -= item._release.containerDiffX;\n translateY -= item._release.containerDiffY;\n item._release.stop(true, {transform: getTranslateString(translateX, translateY)});\n }\n\n // Stop current visibility animations.\n // TODO: This causes potentially layout thrashing, because we are not\n // feeding any styles to the stop handlers.\n currentGrid._itemShowHandler.stop(item);\n currentGrid._itemHideHandler.stop(item);\n\n // Destroy current drag.\n if (item._drag) {\n item._drag.destroy();\n }\n\n // Destroy current animation handlers.\n item._animate.destroy();\n item._animateChild.destroy();\n\n // Process current visibility animation queue.\n processQueue(item._visibilityQueue, true, item);\n\n // Emit beforeSend event.\n currentGrid._emit(evBeforeSend, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Emit beforeReceive event.\n targetGrid._emit(evBeforeReceive, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Remove current classnames.\n removeClass(itemElement, currentGridStn.itemClass);\n removeClass(itemElement, currentGridStn.itemVisibleClass);\n removeClass(itemElement, currentGridStn.itemHiddenClass);\n\n // Add new classnames.\n addClass(itemElement, targetGridStn.itemClass);\n addClass(itemElement, isItemVisible ? targetGridStn.itemVisibleClass : targetGridStn.itemHiddenClass);\n\n // Move item instance from current grid to target grid.\n currentGrid._items.splice(currentIndex, 1);\n insertItemsToArray(targetGrid._items, item, targetIndex);\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // Instantiate new animation controllers.\n item._animate = new Grid.ItemAnimate(item, itemElement);\n item._animateChild = new Grid.ItemAnimate(item, item._child);\n\n // Get current container\n currentContainer = itemElement.parentNode;\n\n // Move the item inside the target container if it's different than the\n // current container.\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(itemElement);\n offsetDiff = getOffsetDiff(targetContainer, currentContainer, true);\n if (translateX === undefined) {\n translateX = getTranslateAsFloat(itemElement, 'x');\n translateY = getTranslateAsFloat(itemElement, 'y');\n }\n setStyles(itemElement, {transform: getTranslateString(translateX + offsetDiff.left, translateY + offsetDiff.top)});\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._child.removeAttribute('style');\n if (isItemVisible) {\n targetGrid._itemShowHandler.start(item, true);\n }\n else {\n targetGrid._itemHideHandler.start(item, true);\n }\n\n // Update display styles.\n setStyles(itemElement, {\n display: isItemVisible ? 'block' : 'hidden'\n });\n\n // Get offset diff for the migration data.\n containerDiff = getOffsetDiff(targetContainer, targetGridElement, true);\n\n // Update item's cached dimensions and sort data.\n item._refreshDimensions()._refreshSortData();\n\n // Create new drag handler.\n item._drag = targetGridStn.dragEnabled ? new Grid.ItemDrag(item) : null;\n\n // Setup migration data.\n migrate.isActive = true;\n migrate.container = targetContainer;\n migrate.containerDiffX = containerDiff.left;\n migrate.containerDiffY = containerDiff.top;\n\n // Emit send event.\n currentGrid._emit(evSend, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Emit receive event.\n targetGrid._emit(evReceive, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n return migrate;\n\n };\n\n /**\n * End the migrate process of an item. This method can be used to abort an\n * ongoing migrate process (animation) or finish the migrate process.\n *\n * @public\n * @memberof ItemMigrate.prototype\n * @param {Boolean} [abort=false]\n * - Should the migration be aborted?\n * @param {Object} [currentStyles]\n * - Optional current translateX and translateY styles.\n * @returns {ItemMigrate}\n */\n ItemMigrate.prototype.stop = function (abort, currentStyles) {\n\n var migrate = this;\n\n if (migrate._isDestroyed || !migrate.isActive) {\n return migrate;\n }\n\n var item = migrate.getItem();\n var element = item._element;\n var grid = item.getGrid();\n var gridElement = grid._element;\n var translateX;\n var translateY;\n\n if (migrate.container !== gridElement) {\n if (!currentStyles) {\n translateX = abort ? getTranslateAsFloat(element, 'x') - migrate.containerDiffX : item._left;\n translateY = abort ? getTranslateAsFloat(element, 'y') - migrate.containerDiffY : item._top;\n currentStyles = {transform: getTranslateString(translateX, translateY)};\n }\n gridElement.appendChild(element);\n setStyles(element, currentStyles);\n }\n\n migrate.isActive = false;\n migrate.container = null;\n migrate.containerDiffX = 0;\n migrate.containerDiffY = 0;\n\n return migrate;\n\n };\n\n /**\n * ItemRelease\n * ***********\n */\n\n /**\n * The release process handler constructor. Although this might seem as proper\n * fit for the drag process this needs to be separated into it's own logic\n * because there might be a scenario where drag is disabled, but the release\n * process still needs to be implemented (dragging from a grid to another).\n *\n * @class\n * @private\n * @param {Item} item\n */\n function ItemRelease(item) {\n\n var release = this;\n\n // Private props.\n release._itemId = item._id;\n release._isDestroyed = false;\n\n // Public props.\n release.isActive = false;\n release.isPositioningStarted = false;\n release.containerDiffX = 0;\n release.containerDiffY = 0;\n\n }\n\n /**\n * ItemRelease - Public prototype methods\n * **************************************\n */\n\n /**\n * Destroy instance.\n *\n * @public\n * @memberof ItemRelease.prototype\n * @returns {ItemRelease}\n */\n ItemRelease.prototype.destroy = function () {\n\n var release = this;\n\n if (!release._isDestroyed) {\n release.stop(true);\n release._isDestroyed = true;\n }\n\n return release;\n\n };\n\n /**\n * Get Item instance.\n *\n * @public\n * @memberof ItemRelease.prototype\n * @returns {?Item}\n */\n ItemRelease.prototype.getItem = function () {\n\n return itemInstances[this._itemId] || null;\n\n };\n\n /**\n * Reset public data and remove releasing class.\n *\n * @public\n * @memberof ItemRelease.prototype\n * @returns {ItemRelease}\n */\n ItemRelease.prototype.reset = function () {\n\n var release = this;\n\n if (release._isDestroyed) {\n return release;\n }\n\n var item = release.getItem();\n release.isActive = false;\n release.isPositioningStarted = false;\n release.containerDiffX = 0;\n release.containerDiffY = 0;\n removeClass(item._element, item.getGrid()._settings.itemReleasingClass);\n\n return release;\n\n };\n\n /**\n * Start the release process of an item.\n *\n * @public\n * @memberof ItemRelease.prototype\n * @returns {ItemRelease}\n */\n ItemRelease.prototype.start = function () {\n\n var release = this;\n\n if (release._isDestroyed || release.isActive) {\n return release;\n }\n\n var item = release.getItem();\n var grid = item.getGrid();\n\n // Flag release as active.\n release.isActive = true;\n\n // Add release classname to the released element.\n addClass(item._element, grid._settings.itemReleasingClass);\n\n // Emit dragReleaseStart event.\n grid._emit(evDragReleaseStart, item);\n\n // Position the released item.\n item._layout(false);\n\n return release;\n\n };\n\n /**\n * End the release process of an item. This method can be used to abort an\n * ongoing release process (animation) or finish the release process.\n *\n * @public\n * @memberof ItemRelease.prototype\n * @param {Boolean} [abort=false]\n * - Should the release be aborted? When true, the release end event won't be\n * emitted. Set to true only when you need to abort the release process\n * while the item is animating to it's position.\n * @param {Object} [currentStyles]\n * - Optional current translateX and translateY styles.\n * @returns {ItemRelease}\n */\n ItemRelease.prototype.stop = function (abort, currentStyles) {\n\n var release = this;\n\n if (release._isDestroyed || !release.isActive) {\n return release;\n }\n\n var item = release.getItem();\n var element = item._element;\n var grid = item.getGrid();\n var container = grid._element;\n var containerDiffX = release.containerDiffX;\n var containerDiffY = release.containerDiffY;\n var translateX;\n var translateY;\n\n // Reset data and remove releasing classname from the element.\n release.reset();\n\n // If the released element is outside the grid's container element put it\n // back there and adjust position accordingly.\n if (element.parentNode !== container) {\n if (!currentStyles) {\n translateX = abort ? getTranslateAsFloat(element, 'x') - containerDiffX : item._left;\n translateY = abort ? getTranslateAsFloat(element, 'y') - containerDiffY : item._top;\n currentStyles = {transform: getTranslateString(translateX, translateY)};\n }\n container.appendChild(element);\n setStyles(element, currentStyles);\n }\n\n // Emit dragReleaseEnd event.\n if (!abort) {\n grid._emit(evDragReleaseEnd, item);\n }\n\n return release;\n\n };\n\n /**\n * ItemDrag\n * ********\n */\n\n /**\n * Bind Hammer touch interaction to an item.\n *\n * @class\n * @private\n * @param {Item} item\n */\n function ItemDrag(item) {\n\n if (!Hammer) {\n throw new Error('[' + namespace + '] required dependency Hammer is not defined.');\n }\n\n var drag = this;\n var element = item._element;\n var grid = item.getGrid();\n var settings = grid._settings;\n var hammer;\n\n // Start predicate.\n var startPredicate = typeof settings.dragStartPredicate === typeFunction ?\n settings.dragStartPredicate : ItemDrag.defaultStartPredicate;\n var startPredicateState = startPredicateInactive;\n var startPredicateResult;\n\n // Protected data.\n drag._itemId = item._id;\n drag._gridId = grid._id;\n drag._hammer = hammer = new Hammer.Manager(element);\n drag._isDestroyed = false;\n drag._isMigrating = false;\n drag._data = {};\n\n // Create a private drag start resolver that can be used to resolve the drag\n // start predicate asynchronously.\n drag._resolveStartPredicate = function (event) {\n if (!drag._isDestroyed && startPredicateState === startPredicatePending) {\n startPredicateState = startPredicateResolved;\n drag.onStart(event);\n }\n };\n\n // Create scroll listener.\n drag._scrollListener = function (e) {\n drag.onScroll(e);\n };\n\n // Create overlap checker function.\n drag._checkSortOverlap = debounce(function () {\n drag._data.isActive && drag.checkOverlap();\n }, settings.dragSortInterval);\n\n // Create sort predicate.\n drag._sortPredicate = typeof settings.dragSortPredicate === typeFunction ?\n settings.dragSortPredicate : ItemDrag.defaultSortPredicate;\n\n // Setup item's initial drag data.\n drag.reset();\n\n // Add drag recognizer to hammer.\n hammer.add(new Hammer.Pan({\n event: 'drag',\n pointers: 1,\n threshold: 30,\n direction: Hammer.DIRECTION_ALL\n }));\n\n // Add draginit recognizer to hammer.\n hammer.add(new Hammer.Press({\n event: 'draginit',\n pointers: 1,\n threshold: 1000,\n time: 0\n }));\n\n hammer.add(new Hammer.Pinch({\n event: 'pinch',\n pointers: 2,\n threshold: 0\n }));\n\n hammer.add(new Hammer.Tap({\n event: 'doubletap',\n taps: 2\n }));\n\n hammer.add(new Hammer.Tap({\n event: 'singletap'\n }));\n\n hammer.add(new Hammer.Tap ({\n event: 'tripletap',\n pointer: 1,\n taps: 3,\n threshold: 20,\n posThreshold: 30\n }));\n\n hammer.add(new Hammer.Tap ({\n event: 'quadrupletap',\n taps: 4\n }));\n\n // Configure the hammer instance.\n if (isPlainObject(settings.dragHammerSettings)) {\n hammer.set(settings.dragHammerSettings);\n }\n\n hammer.get('pinch').recognizeWith('draginit');\n hammer.get('draginit').requireFailure('singletap').requireFailure('doubletap').requireFailure('tripletap').requireFailure('quadrupletap').recognizeWith('tripletap'); //.requireFailure('pinch')\n hammer.get('tripletap').recognizeWith('singletap').requireFailure('singletap');\n\n\n // Bind drag events.\nhammer\n .on('pinch pinchstart pinchin pinchout', function (e) {\n e.preventDefault();\n\n // Let's activate drag start predicate state.\n if (startPredicateState === startPredicateInactive) {\n startPredicateState = startPredicatePending;\n }\n\n // If predicate is pending try to resolve it.\n if (startPredicateState === startPredicatePending) {\n startPredicateResult = startPredicate(drag.getItem(), e);\n if (startPredicateResult === true) {\n startPredicateState = startPredicateResolved;\n drag.onPinchStart(e);\n }\n else if (startPredicateResult === false) {\n startPredicateState = startPredicateRejected;\n }\n }\n\n // Otherwise if predicate is resolved and drag is active, move the item.\n else if (startPredicateState === startPredicateResolved && drag._data.isActive) {\n drag.onPinch(e);\n }\n\n })\n .on('dragmove', function (e) {\n \n // Let's activate drag start predicate state.\n if (startPredicateState === startPredicateInactive) {\n startPredicateState = startPredicatePending;\n }\n\n // If predicate is pending try to resolve it.\n if (startPredicateState === startPredicatePending) {\n startPredicateResult = startPredicate(drag.getItem(), e);\n if (startPredicateResult === true) {\n startPredicateState = startPredicateResolved;\n drag.onStart(e);\n }\n else if (startPredicateResult === false) {\n startPredicateState = startPredicateRejected;\n }\n }\n\n // Otherwise if predicate is resolved and drag is active, move the item.\n else if (startPredicateState === startPredicateResolved && drag._data.isActive) {\n drag.onMove(e);\n }\n\n })\n .on('touchend pinchend pinchcancel', function (e) {\n\n // Check if the start predicate was resolved during drag.\n var isResolved = startPredicateState === startPredicateResolved;\n\n // Do final predicate check to allow user to unbind stuff for the current\n // drag procedure within the predicate callback. The return value of this\n // check will have no effect to the state of the predicate.\n startPredicate(drag.getItem(), e);\n\n // Reset start predicate state.\n startPredicateState = startPredicateInactive;\n\n // If predicate is resolved and dragging is active, call the end handler.\n if (isResolved && drag._data.isActive) {\n drag.onPinchEnd(e);\n }\n\n })\n .on('dragend dragcancel draginitup mouseup', function (e) {\n\n // Check if the start predicate was resolved during drag.\n var isResolved = startPredicateState === startPredicateResolved;\n\n // Do final predicate check to allow user to unbind stuff for the current\n // drag procedure within the predicate callback. The return value of this\n // check will have no effect to the state of the predicate.\n startPredicate(drag.getItem(), e);\n\n // Reset start predicate state.\n startPredicateState = startPredicateInactive;\n\n // If predicate is resolved and dragging is active, call the end handler.\n if (isResolved && drag._data.isActive) {\n drag.onEnd(e);\n }\n\n });\n // Prevent native link/image dragging for the item and it's ancestors.\n element.addEventListener('dragstart', preventDefault, false);\n\n }\n\n /**\n * ItemDrag - Public methods\n * *************************\n */\n\n /**\n * Default drag start predicate handler that handles anchor elements\n * gracefully. The return value of this function defines if the drag is\n * started, rejected or pending. When true is returned the dragging is started\n * and when false is returned the dragging is rejected. If nothing is returned\n * the predicate will be called again on the next drag movement.\n *\n * @public\n * @memberof ItemDrag\n * @param {Item} item\n * @param {Object} event\n * @param {Object} [options]\n * - An optional options object which can be used to pass the predicate\n * it's options manually. By default the predicate retrieves the options\n * from the grid's settings.\n * @returns {Boolean}\n */\n ItemDrag.defaultStartPredicate = function (item, event, options) {\n\n var element = item._element;\n var predicate = item._drag._startPredicateData;\n var config;\n var isAnchor;\n var href;\n var target;\n\n // Setup data if it is not set up yet.\n if (!predicate) {\n config = options || item._drag.getGrid()._settings.dragStartPredicate;\n config = isPlainObject(config) ? config : {};\n predicate = item._drag._startPredicateData = {\n distance: Math.abs(config.distance) || 0,\n delay: Math.max(config.delay, 0) || 0,\n handle: typeof config.handle === 'string' ? config.handle : false\n };\n }\n\n // Final event logic. At this stage return value does not matter anymore,\n // the predicate is either resolved or it's not and there's nothing to do\n // about it. Here we just reset data and if the item element is a link\n // we follow it (if there has only been slight movement).\n if (event.isFinal) {\n isAnchor = element.tagName.toLowerCase() === 'a';\n href = element.getAttribute('href');\n target = element.getAttribute('target');\n dragStartPredicateReset(item);\n if (isAnchor && href && Math.abs(event.deltaX) < 2 && Math.abs(event.deltaY) < 2 && event.deltaTime < 200) {\n if (target && target !== '_self') {\n global.open(href, target);\n }\n else {\n global.location.href = href;\n }\n }\n return;\n }\n\n // Find and store the handle element so we can check later on if the\n // cursor is within the handle. If we have a handle selector let's find\n // the corresponding element. Otherwise let's use the item element as the\n // handle.\n if (!predicate.handleElement) {\n if (predicate.handle) {\n predicate.handleElement = (event.changedPointers[0] || {}).target;\n while (predicate.handleElement && !elementMatches(predicate.handleElement, predicate.handle)) {\n predicate.handleElement = predicate.handleElement !== element ? predicate.handleElement.parentElement : null;\n }\n if (!predicate.handleElement) {\n return false;\n }\n }\n else {\n predicate.handleElement = element;\n }\n }\n\n // If delay is defined let's keep track of the latest event and initiate\n // delay if it has not been done yet.\n if (predicate.delay) {\n predicate.event = event;\n if (!predicate.delayTimer) {\n predicate.delayTimer = global.setTimeout(function () {\n predicate.delay = 0;\n if (dragStartPredicateResolve(item, predicate.event)) {\n item._drag._resolveStartPredicate(predicate.event);\n dragStartPredicateReset(item);\n }\n }, predicate.delay);\n }\n }\n\n return dragStartPredicateResolve(item, event);\n\n };\n\n /**\n * Default drag sort predicate.\n *\n * @public\n * @memberof ItemDrag\n * @param {Item} item\n * @param {Object} event\n * @returns {(Boolean|DragSortCommand)}\n * - Returns false if no valid index was found. Otherwise returns drag sort\n * command.\n */\n ItemDrag.defaultSortPredicate = function (item) {\n\n var drag = item._drag;\n var dragData = drag._data;\n var rootGrid = drag.getGrid();\n var settings = rootGrid._settings;\n var config = settings.dragSortPredicate || {};\n var sortThreshold = config.threshold || 50;\n var sortAction = config.action || 'move';\n var itemRect = {\n width: item._width,\n height: item._height,\n left: dragData.elementClientX,\n top: dragData.elementClientY\n };\n var grid = getTargetGrid(item, rootGrid, itemRect, sortThreshold);\n var gridOffsetLeft = 0;\n var gridOffsetTop = 0;\n var matchScore = -1;\n var matchIndex;\n var hasValidTargets;\n var target;\n var score;\n var i;\n\n // Return early if we found no grid container element that overlaps the\n // dragged item enough.\n if (!grid) {\n return false;\n }\n\n // If item is moved within it's originating grid adjust item's left and top\n // props. Otherwise if item is moved to/within another grid get the\n // container element's offset (from the element's content edge).\n if (grid === rootGrid) {\n itemRect.left = dragData.gridX + item._margin.left;\n itemRect.top = dragData.gridY + item._margin.top;\n }\n else {\n gridOffsetLeft = grid._left + grid._border.left;\n gridOffsetTop = grid._top + grid._border.top;\n }\n\n // Loop through the target grid items and try to find the best match.\n for (i = 0; i < grid._items.length; i++) {\n\n target = grid._items[i];\n\n // If the target item is not active or the target item is the dragged item\n // let's skip to the next item.\n if (!target._isActive || target === item) {\n continue;\n }\n\n // Mark the grid as having valid target items.\n hasValidTargets = true;\n\n // Calculate the target's overlap score with the dragged item.\n score = getRectOverlapScore(itemRect, {\n width: target._width,\n height: target._height,\n left: target._left + target._margin.left + gridOffsetLeft,\n top: target._top + target._margin.top + gridOffsetTop\n });\n\n // Update best match index and score if the target's overlap score with\n // the dragged item is higher than the current best match score.\n if (score > matchScore) {\n matchIndex = i;\n matchScore = score;\n }\n\n }\n\n // If there is no valid match and the item is being moved into another grid.\n if (matchScore < sortThreshold && item.getGrid() !== grid) {\n matchIndex = hasValidTargets ? -1 : 0;\n matchScore = Infinity;\n }\n\n // Check if the best match overlaps enough to justify a placement switch.\n if (matchScore >= sortThreshold) {\n return {\n grid: grid,\n index: matchIndex,\n action: sortAction\n };\n }\n\n return false;\n\n };\n\n /**\n * ItemDrag - Public prototype methods\n * ***********************************\n */\n\n /**\n * Destroy instance.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.destroy = function () {\n\n var drag = this;\n\n if (!drag._isDestroyed) {\n drag.stop();\n drag._hammer.destroy();\n drag.getItem()._element.removeEventListener('dragstart', preventDefault, false);\n drag._isDestroyed = true;\n }\n\n return drag;\n\n };\n\n /**\n * Get Item instance.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {?Item}\n */\n ItemDrag.prototype.getItem = function () {\n\n return itemInstances[this._itemId] || null;\n\n };\n\n /**\n * Get Grid instance.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {?Grid}\n */\n ItemDrag.prototype.getGrid = function () {\n\n return gridInstances[this._gridId] || null;\n\n };\n\n /**\n * Setup/reset drag data.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.reset = function () {\n\n var drag = this;\n var dragData = drag._data;\n\n // Is item being dragged?\n dragData.isActive = false;\n\n // The dragged item's container element.\n dragData.container = null;\n\n // The dragged item's containing block.\n dragData.containingBlock = null;\n\n // Hammer event data.\n dragData.startEvent = null;\n dragData.currentEvent = null;\n\n // All the elements which need to be listened for scroll events during\n // dragging.\n dragData.scrollers = [];\n\n // The current translateX/translateY position.\n dragData.left = 0;\n dragData.top = 0;\n\n // Dragged element's current position within the grid.\n dragData.gridX = 0;\n dragData.gridY = 0;\n\n // Dragged element's current offset from window's northwest corner. Does\n // not account for element's margins.\n dragData.elementClientX = 0;\n dragData.elementClientY = 0;\n\n // Offset difference between the dragged element's temporary drag\n // container and it's original container.\n dragData.containerDiffX = 0;\n dragData.containerDiffY = 0;\n\n return drag;\n\n };\n\n /**\n * Bind drag scroll handlers to all scrollable ancestor elements of the\n * dragged element and the drag container element.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.bindScrollListeners = function () {\n\n var drag = this;\n var gridContainer = drag.getGrid()._element;\n var dragContainer = drag._data.container;\n var scrollers = getScrollParents(drag.getItem()._element);\n var i;\n\n // If drag container is defined and it's not the same element as grid\n // container then we need to add the grid container and it's scroll parents\n // to the elements which are going to be listener for scroll events.\n if (dragContainer !== gridContainer) {\n scrollers = arrayUnique(scrollers.concat(gridContainer).concat(getScrollParents(gridContainer)));\n }\n\n // Bind scroll listeners.\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].addEventListener('scroll', drag._scrollListener);\n }\n\n // Save scrollers to drag data.\n drag._data.scrollers = scrollers;\n\n return drag;\n\n };\n\n /**\n * Unbind currently bound drag scroll handlers from all scrollable ancestor\n * elements of the dragged element and the drag container element.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.unbindScrollListeners = function () {\n\n var drag = this;\n var dragData = drag._data;\n var scrollers = dragData.scrollers;\n var i;\n\n for (i = 0; i < scrollers.length; i++) {\n scrollers[i].removeEventListener('scroll', drag._scrollListener);\n }\n\n dragData.scrollers = [];\n\n return drag;\n\n };\n\n /**\n * Check (during drag) if an item is overlapping other items and based on\n * the configuration layout the items.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.checkOverlap = function () {\n\n var drag = this;\n var item = drag.getItem();\n var result = drag._sortPredicate(item, drag._data.currentEvent);\n var currentGrid;\n var currentIndex;\n var targetGrid;\n var targetIndex;\n var sortAction;\n var isMigration;\n\n // Let's make sure the result object has a valid index before going further.\n if (!isPlainObject(result) || typeof result.index !== typeNumber) {\n return drag;\n }\n\n currentGrid = item.getGrid();\n targetGrid = result.grid || currentGrid;\n isMigration = currentGrid !== targetGrid;\n currentIndex = currentGrid._items.indexOf(item);\n targetIndex = normalizeArrayIndex(targetGrid._items, result.index, isMigration);\n sortAction = result.action === 'swap' ? 'swap' : 'move';\n\n // If the item was moved within it's current grid.\n if (!isMigration) {\n\n // Make sure the target index is not the current index.\n if (currentIndex !== targetIndex) {\n\n // Do the sort.\n (sortAction === 'swap' ? arraySwap : arrayMove)(currentGrid._items, currentIndex, targetIndex);\n\n // Emit move event.\n currentGrid._emit(evMove, {\n item: item,\n fromIndex: currentIndex,\n toIndex: targetIndex,\n action: sortAction\n });\n\n // Layout the grid.\n currentGrid.layout();\n\n }\n\n }\n\n // If the item was moved to another grid.\n else {\n\n // Emit beforeSend event.\n currentGrid._emit(evBeforeSend, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Emit beforeReceive event.\n targetGrid._emit(evBeforeReceive, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Update item's grid id reference.\n item._gridId = targetGrid._id;\n\n // Update drag instances's migrating indicator.\n drag._isMigrating = item._gridId !== drag._gridId;\n\n // Move item instance from current grid to target grid.\n currentGrid._items.splice(currentIndex, 1);\n insertItemsToArray(targetGrid._items, item, targetIndex);\n\n // Set sort data as null, which is an indicator for the item comparison\n // function that the sort data of this specific item should be fetched\n // lazily.\n item._sortData = null;\n\n // Emit send event.\n currentGrid._emit(evSend, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Emit receive event.\n targetGrid._emit(evReceive, {\n item: item,\n fromGrid: currentGrid,\n fromIndex: currentIndex,\n toGrid: targetGrid,\n toIndex: targetIndex\n });\n\n // Layout both grids.\n currentGrid.layout();\n targetGrid.layout();\n\n }\n\n return drag;\n\n };\n\n /**\n * If item is dragged into another grid, finish the migration process\n * gracefully.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.finishMigration = function () {\n\n var drag = this;\n var item = drag.getItem();\n var release = item._release;\n var element = item._element;\n var targetGrid = item.getGrid();\n var targetGridElement = targetGrid._element;\n var targetSettings = targetGrid._settings;\n var targetContainer = targetSettings.dragContainer || targetGridElement;\n var currentSettings = drag.getGrid()._settings;\n var currentContainer = element.parentNode;\n var translateX;\n var translateY;\n var offsetDiff;\n\n // Destroy current drag. Note that we need to set the migrating flag to\n // false first, because otherwise we create an infinite loop between this\n // and the drag.stop() method.\n drag._isMigrating = false;\n drag.destroy();\n\n // Destroy current animation handlers.\n item._animate.destroy();\n item._animateChild.destroy();\n\n // Remove current classnames.\n removeClass(element, currentSettings.itemClass);\n removeClass(element, currentSettings.itemVisibleClass);\n removeClass(element, currentSettings.itemHiddenClass);\n\n // Add new classnames.\n addClass(element, targetSettings.itemClass);\n addClass(element, targetSettings.itemVisibleClass);\n\n // Instantiate new animation controllers.\n item._animate = new Grid.ItemAnimate(item, element);\n item._animateChild = new Grid.ItemAnimate(item, item._child);\n\n // Move the item inside the target container if it's different than the\n // current container.\n if (targetContainer !== currentContainer) {\n targetContainer.appendChild(element);\n offsetDiff = getOffsetDiff(currentContainer, targetContainer, true);\n translateX = getTranslateAsFloat(element, 'x') - offsetDiff.left;\n translateY = getTranslateAsFloat(element, 'y') - offsetDiff.top;\n }\n\n // Update item's cached dimensions and sort data.\n item._refreshDimensions()._refreshSortData();\n\n // Calculate the offset difference between target's drag container (if any)\n // and actual grid container element. We save it later for the release\n // process.\n offsetDiff = getOffsetDiff(targetContainer, targetGridElement, true);\n release.containerDiffX = offsetDiff.left;\n release.containerDiffY = offsetDiff.top;\n\n // Recreate item's drag handler.\n item._drag = targetSettings.dragEnabled ? new Grid.ItemDrag(item) : null;\n\n // Adjust the position of the item element if it was moved from a container\n // to another.\n if (targetContainer !== currentContainer) {\n setStyles(element, {transform: getTranslateString(translateX, translateY)});\n }\n\n // Update child element's styles to reflect the current visibility state.\n item._child.removeAttribute('style');\n targetGrid._itemShowHandler.start(item, true);\n\n // Start the release.\n release.start();\n\n //refreshTiddlerClasses(element);\n\n return drag;\n\n };\n\n /**\n * cancel move/scroll event raf loop action.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.cancelRafLoop = function () {\n\n var id = this.getItem()._id;\n\n rafLoop.cancel(rafQueueScroll, id);\n rafLoop.cancel(rafQueueMove, id);\n\n return this;\n\n };\n\n /**\n * Abort dragging and reset drag data.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.stop = function () {\n\n var drag = this;\n var dragData = drag._data;\n var item = drag.getItem();\n var element = item._element;\n var grid = drag.getGrid();\n\n if (!dragData.isActive) {\n return drag;\n }\n\n // If the item is being dropped into another grid, finish it up and return\n // immediately.\n if (drag._isMigrating) {\n return drag.finishMigration(dragData.currentEvent);\n }\n\n // Cancel raf loop actions.\n drag.cancelRafLoop();\n\n // Remove scroll listeners.\n drag.unbindScrollListeners();\n\n // Cancel overlap check.\n drag._checkSortOverlap('cancel');\n\n // Append item element to the container if it's not it's child. Also make\n // sure the translate values are adjusted to account for the DOM shift.\n if (element.parentNode !== grid._element) {\n grid._element.appendChild(element);\n setStyles(element, {transform: getTranslateString(dragData.gridX, dragData.gridY)});\n }\n\n // Remove dragging class.\n removeClass(element, grid._settings.itemDraggingClass);\n\n // Reset drag data.\n drag.reset();\n\n return drag;\n\n };\n\n\nfunction getTiddlerAsJson(title) {\n\tvar tiddler = $tw.wiki.getTiddler(title);\n\tif(tiddler) {\n\t\tvar fields = Object.create(null);\n\t\t$tw.utils.each(tiddler.fields,function(value,name) {\n\t\t\tfields[name] = tiddler.getFieldString(name);\n\t\t});\n\t\treturn JSON.stringify(fields);\n\t} else {\n\t\treturn JSON.stringify({title: title});\n\t}\n}\n\n\n var currentStoryList;\n var storyListIndex;\n\n /**\n * Drag start handler.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @param {Object} event\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.onStart = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n\n // If item is not active, don't start the drag.\n if (!item._isActive) {\n return drag;\n }\n\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var dragData = drag._data;\n var release = item._release;\n var migrate = item._migrate;\n var gridContainer = grid._element;\n var dragContainer = settings.dragContainer || gridContainer;\n var containingBlock = getContainingBlock(dragContainer, true);\n var offsetDiff = dragContainer !== gridContainer ? getOffsetDiff(containingBlock, gridContainer) : 0;\n var currentLeft = getTranslateAsFloat(element, 'x');\n var currentTop = getTranslateAsFloat(element, 'y');\n var elementRect = element.getBoundingClientRect();\n var items = grid.getItems();\n var currentIndex = items.indexOf(item);\n var targetIndex = normalizeArrayIndex(items, currentIndex);\n var targetsAreTiddlers = settings.targetsAreTiddlers;\n var muuriParentWidget = grid._settings.muuriParentWidget;\n var dragTiddler;\n\n//console.log(\"currentIndex: \" + currentIndex + \" targetIndex: \" + targetIndex);\n\n if (targetsAreTiddlers === true) {\n currentStoryList = $tw.wiki.getTiddlerList(\"$:/StoryList\");\n //if(targetIndex < currentStoryList.length) {\n dragTiddler = muuriParentWidget[0].children[targetIndex].variables.currentTiddler;\n//console.log(\"dragTiddler: \" + dragTiddler.value);\n storyListIndex = currentStoryList.indexOf(dragTiddler.value);\n//} else {\n /*currentStoryList = $tw.wiki.getTiddlerList(\"$:/StoryList\");\nfor (var i=0; i<items.length; i++) {\nvar checkItem = items[i]._element;\nfor (var t=0; t<items.length; t++) {\n if(items[t]._element.innerHTML == checkItem.innerHTML && t != i) {\n console.log(\"they are the same\");\n items[t] = items[i];\n console.log(items[i]._element.innerHTML);\n grid.remove(items[i], {removeElements: true});\n}\n}\n//console.log(items[i]._element.innerHTML);\n}\n grid.refreshItems();\n items = grid.getItems();\n item = drag.getItem();\n element = item._element;\n release = item._release;\n migrate = item._migrate;\n currentLeft = getTranslateAsFloat(element, 'x');\n currentTop = getTranslateAsFloat(element, 'y');\n elementRect = element.getBoundingClientRect();\n currentIndex = items.indexOf(item);\n targetIndex = normalizeArrayIndex(items, currentIndex);\nconsole.log(\"currentIndex: \" + currentIndex + \" targetIndex: \" + targetIndex);\n if(targetIndex < currentStoryList.length) {\n dragTiddler = muuriParentWidget[0].children[targetIndex].variables.currentTiddler;\nconsole.log(\"dragTiddler: \" + dragTiddler.value);\n storyListIndex = currentStoryList.indexOf(dragTiddler.value);\n console.log(\"HAPPENED\");\n}\n console.log(\"HAPPENED\");\n}*/\n }\n\n // Stop current positioning animation.\n if (item.isPositioning()) {\n item._stopLayout(true, {transform: getTranslateString(currentLeft, currentTop)});\n }\n\n // Stop current migration animation.\n if (migrate.isActive) {\n currentLeft -= migrate.containerDiffX;\n currentTop -= migrate.containerDiffY;\n migrate.stop(true, {transform: getTranslateString(currentLeft, currentTop)});\n }\n\n // If item is being released reset release data.\n if (item.isReleasing()) {\n release.reset();\n }\n\n // Setup drag data.\n dragData.isActive = true;\n dragData.startEvent = dragData.currentEvent = event;\n dragData.container = dragContainer;\n dragData.containingBlock = containingBlock;\n dragData.elementClientX = elementRect.left;\n dragData.elementClientY = elementRect.top;\n dragData.left = dragData.gridX = currentLeft;\n dragData.top = dragData.gridY = currentTop;\n\n // Emit dragInit event.\n grid._emit(evDragInit, item, event);\n\n // If a specific drag container is set and it is different from the\n // grid's container element we need to cast some extra spells.\n if (dragContainer !== gridContainer) {\n\n // Store the container offset diffs to drag data.\n dragData.containerDiffX = offsetDiff.left;\n dragData.containerDiffY = offsetDiff.top;\n\n // If the dragged element is a child of the drag container all we need to\n // do is setup the relative drag position data.\n if (element.parentNode === dragContainer) {\n dragData.gridX = currentLeft - dragData.containerDiffX;\n dragData.gridY = currentTop - dragData.containerDiffY;\n }\n\n // Otherwise we need to append the element inside the correct container,\n // setup the actual drag position data and adjust the element's translate\n // values to account for the DOM position shift.\n else {\n dragData.left = currentLeft + dragData.containerDiffX;\n dragData.top = currentTop + dragData.containerDiffY;\n dragContainer.appendChild(element);\n setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});\n }\n\n }\n\n // Set drag class and bind scrollers.\n addClass(element, settings.itemDraggingClass);\n drag.bindScrollListeners();\n\n // Emit dragStart event.\n grid._emit(evDragStart, item, event);\n\n return drag;\n\n };\n\n ItemDrag.prototype.onPinchStart = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n\n // If item is not active, don't start the drag.\n if (!item._isActive) {\n return drag;\n }\n\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var dragData = drag._data;\n var release = item._release;\n var migrate = item._migrate;\n var gridContainer = grid._element;\n var dragContainer = settings.dragContainer || gridContainer;\n var containingBlock = getContainingBlock(dragContainer, true);\n var offsetDiff = dragContainer !== gridContainer ? getOffsetDiff(containingBlock, gridContainer) : 0;\n var currentLeft = getTranslateAsFloat(element, 'x');\n var currentTop = getTranslateAsFloat(element, 'y');\n var elementRect = element.getBoundingClientRect();\n var elementRectCalc = window.getComputedStyle(element,null).getPropertyValue(\"left\");\n\n // Stop current positioning animation.\n if (item.isPositioning()) {\n item._stopLayout(true, {transform: getTranslateString(currentLeft, currentTop)});\n }\n\n // Stop current migration animation.\n if (migrate.isActive) {\n currentLeft -= migrate.containerDiffX;\n currentTop -= migrate.containerDiffY;\n migrate.stop(true, {transform: getTranslateString(currentLeft, currentTop)});\n }\n\n // If item is being released reset release data.\n if (item.isReleasing()) {\n release.reset();\n }\n\n // Setup drag data.\n dragData.isActive = true;\n dragData.startEvent = dragData.currentEvent = event;\n dragData.container = dragContainer;\n dragData.containingBlock = containingBlock;\n dragData.elementClientX = elementRect.left;\n dragData.elementClientY = elementRect.top;\n dragData.left = dragData.gridX = currentLeft;\n dragData.top = dragData.gridY = currentTop;\n\n // Emit dragInit event.\n grid._emit(evDragInit, item, event);\n\n // If a specific drag container is set and it is different from the\n // grid's container element we need to cast some extra spells.\n if (dragContainer !== gridContainer) {\n\n // Store the container offset diffs to drag data.\n dragData.containerDiffX = offsetDiff.left;\n dragData.containerDiffY = offsetDiff.top;\n\n // If the dragged element is a child of the drag container all we need to\n // do is setup the relative drag position data.\n if (element.parentNode === dragContainer) {\n dragData.gridX = currentLeft - dragData.containerDiffX;\n dragData.gridY = currentTop - dragData.containerDiffY;\n }\n\n // Otherwise we need to append the element inside the correct container,\n // setup the actual drag position data and adjust the element's translate\n // values to account for the DOM position shift.\n else {\n dragData.left = currentLeft + dragData.containerDiffX;\n dragData.top = currentTop + dragData.containerDiffY;\n dragContainer.appendChild(element);\n setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});\n }\n\n }\n\n // Set drag class and bind scrollers.\n addClass(element, settings.itemDraggingClass);\n drag.bindScrollListeners();\n\n // Emit dragStart event.\n grid._emit(evDragStart, item, event);\n\n return drag;\n\n };\n\n\n /**\n * Drag move handler.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @param {Object} event\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.onMove = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n return drag.stop();\n }\n\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var dragData = drag._data;\n var axis = settings.dragAxis;\n var xDiff = event.deltaX - dragData.currentEvent.deltaX;\n var yDiff = event.deltaY - dragData.currentEvent.deltaY;\n\n rafLoop.add(rafQueueMove, item._id, function () {\n\n // Update current event.\n dragData.currentEvent = event;\n\n // Update horizontal position data.\n if (axis !== 'y') {\n dragData.left += xDiff;\n dragData.gridX += xDiff;\n dragData.elementClientX += xDiff;\n }\n\n // Update vertical position data.\n if (axis !== 'x') {\n dragData.top += yDiff;\n dragData.gridY += yDiff;\n dragData.elementClientY += yDiff;\n }\n\n // Overlap handling.\n settings.dragSort && drag._checkSortOverlap();\n\n }, function () {\n\n // Update element's translateX/Y values.\n setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});\n\n // Emit dragMove event.\n grid._emit(evDragMove, item, event);\n\n });\n\n return drag;\n\n };\n\n\nfunction getComputedRotation(obj)\n{\n if(!window.getComputedStyle) return;\n var style = getComputedStyle(obj);\n\nvar tr = style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\") ||\n \"FAIL\";\nvar values = tr.split('(')[1].split(')')[0].split(',');\nvar a = values[0];\nvar b = values[1];\nvar angle = Math.round(Math.atan2(b, a) * (180/Math.PI));\n\n\n return angle;\n}\n\n\nfunction getComputedScale(obj)\n{\n if(!window.getComputedStyle) return;\n var style = getComputedStyle(obj);\n\nvar tr = style.getPropertyValue(\"-webkit-transform\") ||\n style.getPropertyValue(\"-moz-transform\") ||\n style.getPropertyValue(\"-ms-transform\") ||\n style.getPropertyValue(\"-o-transform\") ||\n style.getPropertyValue(\"transform\") ||\n \"FAIL\";\nvar values = tr.split('(')[1].split(')')[0].split(',');\nvar a = values[0];\nvar b = values[1];\nvar scale = Math.sqrt(a*a + b*b);\n return scale;\n}\n\nfunction getComputedTranslateX(obj)\n{\n if(!window.getComputedStyle) return;\n var style = obj.currentStyle || getComputedStyle(obj),\n transform = style.transform || style.webkitTransform || style.mozTransform;\n var mat = transform.match(/^matrix3d\\((.+)\\)$/);\n if(mat) return parseFloat(mat[1].split(', ')[13]);\n mat = transform.match(/^matrix\\((.+)\\)$/);\n return mat ? parseFloat(mat[1].split(', ')[4]) : 0;\n}\n\nfunction getComputedTranslateY(obj)\n{\n if(!window.getComputedStyle) return;\n var style = obj.currentStyle || getComputedStyle(obj),\n transform = style.transform || style.webkitTransform || style.mozTransform;\n var mat = transform.match(/^matrix3d\\((.+)\\)$/);\n if(mat) return parseFloat(mat[1].split(', ')[13]);\n mat = transform.match(/^matrix\\((.+)\\)$/);\n return mat ? parseFloat(mat[1].split(', ')[5]) : 0;\n}\n\n\n ItemDrag.prototype.onPinch = function (event) {\n\n var pinch = this;\n var item = pinch.getItem();\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n return pinch.stop();\n }\n\n var element = item._element;\n var pinchData = pinch._data;\n var grid = pinch.getGrid();\n var items = grid.getItems();\n\n var itemIndex;\n var tiddlerTitle;\n\n for (var i=0; i < items.length; i++) {\n if (items[i] === item) {\n itemIndex = i;\n }\n }\n\n var muuriParentWidget = grid._settings.muuriParentWidget;\n if (itemIndex !== undefined) {\n var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;\n tiddlerTitle = tiddlerName.value;\n }\n \n \nconst { styler, listen, multitouch, value } = window.popmotion;\nlet divStyler = styler(element);\n\nlet itemTranslateX = getComputedTranslateX(element);\nlet itemTranslateY = getComputedTranslateY(element);\nlet itemScale = getComputedScale(element);\n\nlet itemWidth = window.getComputedStyle(element,null).getPropertyValue(\"width\");\nlet itemHeight = window.getComputedStyle(element,null).getPropertyValue(\"height\");\n\nvar itemRealWidth = parseInt(itemWidth, 10);\nvar itemRealHeight = parseInt(itemHeight, 10);\nvar itemRotation = getComputedRotation(element); //Burning\n\nvar itemWidthComputed = (itemRealWidth * itemScale);\nvar itemHeightComputed = (itemRealHeight * itemScale);\n \nlet elementScaleRotation = value({ x: itemTranslateX, y: itemTranslateY }, divStyler.set);\n\n\nlisten(element, 'touchstart', { passive: true })\n .filter(({ touches }) => touches.length >= 2)\n .start((e) => {\n multitouch(elementScaleRotation.get())\n .start(elementScaleRotation);\n});\n\n\nvar storyWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n var storyWidth5 = ((storyWidth - 82) / 5);\n var storyWidth4 = ((storyWidth - 82) / 4);\n var storyWidth3 = ((storyWidth - 82) / 3);\n var storyWidth2 = ((storyWidth - 82) / 2);\n var storyWidth1 = (storyWidth - 82);\n var storyWidth6 = (storyWidth2 + storyWidth3);\nvar setTextOptions = { suppressTimestamp: true };\nvar field = \"span\";\nvar spanValue;\n\n var tiddlyTiddler = $tw.wiki.getTiddler(tiddlerTitle);\nvar fixedWidth = tiddlyTiddler.fields[\"muuri-tiddler-width\"];\n\nlisten(document, 'mouseup touchend')\n .start(() => {\n if (fixedWidth === undefined || fixedWidth === \"0\") {\n if ( itemWidthComputed >= (storyWidth6 + ((storyWidth1 - storyWidth6) / 2))) {\n addClass(element, \"span-12\");\n addClass(element, \"tc-dynaview-zoom-factor-4\");\n spanValue = 12;\n removeClass(element, \"span-6\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-2\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-1\");\n removeClass(element, \"tc-dynaview-zoom-factor-2\");\n removeClass(element, \"tc-dynaview-zoom-factor-3\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n } else if ((storyWidth6 + ((storyWidth1 - storyWidth6) / 2)) >= itemWidthComputed && itemWidthComputed >= (storyWidth2 + ((storyWidth6 - storyWidth2) / 3))) {\n addClass(element, \"span-9\");\n addClass(element, \"tc-dynaview-zoom-factor-4\");\n spanValue = 9;\n removeClass(element, \"span-6\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-2\");\n removeClass(element, \"span-12\");\n removeClass(element, \"span-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-1\");\n removeClass(element, \"tc-dynaview-zoom-factor-2\");\n removeClass(element, \"tc-dynaview-zoom-factor-3\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n } else if ((storyWidth2 + ((storyWidth6 - storyWidth2) / 2)) >= itemWidthComputed && itemWidthComputed >= (storyWidth3 + ((storyWidth2 - storyWidth3) / 3))) {\n addClass(element, \"span-6\");\n addClass(element, \"tc-dynaview-zoom-factor-3\");\n spanValue = 6;\n removeClass(element, \"span-12\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-2\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-1\");\n removeClass(element, \"tc-dynaview-zoom-factor-2\");\n removeClass(element, \"tc-dynaview-zoom-factor-4\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n } else if ((storyWidth3 + ((storyWidth2 - storyWidth3) / 3)) >= itemWidthComputed && itemWidthComputed >= (storyWidth4 + ((storyWidth3 - storyWidth4) / 3))) {\n addClass(element, \"span-4\");\n addClass(element, \"tc-dynaview-zoom-factor-2\");\n spanValue = 4;\n removeClass(element, \"span-12\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-2\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-3\");\n removeClass(element, \"tc-dynaview-zoom-factor-1\");\n removeClass(element, \"tc-dynaview-zoom-factor-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-3\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n } else if ((storyWidth4 + ((storyWidth3 - storyWidth4) / 3)) >= itemWidthComputed && itemWidthComputed >= (storyWidth5 + ((storyWidth4 - storyWidth5) / 3))) {\n addClass(element, \"span-3\");\n addClass(element, \"tc-dynaview-zoom-factor-1\");\n spanValue = 3;\n removeClass(element, \"span-12\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-2\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-2\");\n removeClass(element, \"tc-dynaview-zoom-factor-3\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n } else if ((storyWidth5 + (storyWidth4 - storyWidth5) / 3) >= itemWidthComputed) {\n addClass(element, \"span-2\");\n addClass(element, \"tc-dynaview-zoom-factor-1\");\n spanValue = 2;\n removeClass(element, \"span-12\");\n removeClass(element, \"span-6\");\n removeClass(element, \"span-3\");\n removeClass(element, \"span-9\");\n removeClass(element, \"span-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-4\");\n removeClass(element, \"tc-dynaview-zoom-factor-2\");\n removeClass(element, \"tc-dynaview-zoom-factor-3\");\n /*if (tiddlerTitle !== undefined) {\n $tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + \"\", setTextOptions);\n grid.remove(element);\n }*/\n }\n }\n elementScaleRotation.stop();\n });\n\n // Overlap handling.\n\n setStyles(element, { transform: getTranslateStringTransformed(itemTranslateX, itemTranslateY)});\n\n return pinch;\n };\n\n /**\n * Drag scroll handler.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @param {Object} event\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.onScroll = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var axis = settings.dragAxis;\n var dragData = drag._data;\n var gridContainer = grid._element;\n var elementRect;\n var xDiff;\n var yDiff;\n var offsetDiff;\n\n rafLoop.add(rafQueueScroll, item._id, function () {\n\n // Calculate element's rect and x/y diff.\n elementRect = element.getBoundingClientRect();\n xDiff = dragData.elementClientX - elementRect.left;\n yDiff = dragData.elementClientY - elementRect.top;\n\n // Update container diff.\n if (dragData.container !== gridContainer) {\n offsetDiff = getOffsetDiff(dragData.containingBlock, gridContainer);\n dragData.containerDiffX = offsetDiff.left;\n dragData.containerDiffY = offsetDiff.top;\n }\n\n // Update horizontal position data.\n if (axis !== 'y') {\n dragData.left += xDiff;\n dragData.gridX = dragData.left - dragData.containerDiffX;\n }\n\n // Update vertical position data.\n if (axis !== 'x') {\n dragData.top += yDiff;\n dragData.gridY = dragData.top - dragData.containerDiffY;\n }\n\n // Overlap handling.\n settings.dragSort && drag._checkSortOverlap();\n\n }, function () {\n\n // Update element's translateX/Y values.\n setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});\n\n // Emit dragScroll event.\n grid._emit(evDragScroll, item, event);\n\n });\n\n return drag;\n\n };\n\n ItemDrag.prototype.onMouseUp = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var dragData = drag._data;\n var release = item._release;\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n return drag.stop();\n }\n\n // Cancel raf loop actions.\n drag.cancelRafLoop();\n\n // Finish currently queued overlap check.\n settings.dragSort && drag._checkSortOverlap('finish');\n\n // Remove scroll listeners.\n drag.unbindScrollListeners();\n\n // Setup release data.\n release.containerDiffX = dragData.containerDiffX;\n release.containerDiffY = dragData.containerDiffY;\n\n // Reset drag data.\n drag.reset();\n\n // Remove drag classname from element.\n removeClass(element, settings.itemDraggingClass);\n\n // Emit dragEnd event.\n grid._emit(evDragEnd, item, event);\n\n // Finish up the migration process or start the release process.\n drag._isMigrating ? drag.finishMigration() : release.start();\n\n return drag;\n\n };\n\n /**\n * Drag end handler.\n *\n * @public\n * @memberof ItemDrag.prototype\n * @param {Object} event\n * @returns {ItemDrag}\n */\n ItemDrag.prototype.onEnd = function (event) {\n\n var drag = this;\n var item = drag.getItem();\n var element = item._element;\n var grid = drag.getGrid();\n var settings = grid._settings;\n var dragData = drag._data;\n var release = item._release;\n var result = drag._sortPredicate(item, drag._data.currentEvent);\n var targetsAreTiddlers = grid._settings.targetsAreTiddlers;\n var muuriListTiddler = grid._settings.muuriListTiddler;\n\n var itemCopy = item;\n\n\n var currentGrid;\n var currentIndex;\n var targetGrid;\n var targetIndex;\n var isMigration;\n\n // Let's make sure the result object has a valid index before going further.\n /* if (!isPlainObject(result) || typeof result.index !== typeNumber) {\n return drag;\n }*/\n\n currentGrid = item.getGrid();\n targetGrid = result.grid || currentGrid;\n isMigration = currentGrid !== targetGrid;\n currentIndex = currentGrid._items.indexOf(item);\n targetIndex = normalizeArrayIndex(targetGrid._items, result.index, isMigration);\n\n var gridItems = currentGrid.getItems();\n var dragElement = gridItems[currentIndex].getElement();\n var targetElement;\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n return drag.stop();\n }\n\n // Cancel raf loop actions.\n drag.cancelRafLoop();\n\n // Finish currently queued overlap check.\n settings.dragSort && drag._checkSortOverlap('finish');\n\n // Remove scroll listeners.\n drag.unbindScrollListeners();\n\n // Setup release data.\n release.containerDiffX = dragData.containerDiffX;\n release.containerDiffY = dragData.containerDiffY;\n\n // Reset drag data.\n drag.reset();\n\n // Remove drag classname from element.\n removeClass(element, settings.itemDraggingClass);\n\n // Emit dragEnd event.\n grid._emit(evDragEnd, item, event);\n\n // Finish up the migration process or start the release process.\n drag._isMigrating ? drag.finishMigration() : release.start();\n\n var items = grid.getItems();\n var gridIndex = items.indexOf(item);\n\nif(targetsAreTiddlers !== false && storyListIndex != gridIndex && gridIndex !== -1 && currentGrid === targetGrid) {\n var storyList = $tw.wiki.getTiddlerList(\"$:/StoryList\");\n var isSwap = settings.dragSortPredicate.action;\nif (isSwap === \"move\") {\nstoryList.splice(gridIndex, 0, storyList.splice(storyListIndex, 1)[0]);\n} else if (isSwap === \"swap\") {\n\n // Swap the items.\n var temp = storyList[storyListIndex];\n storyList[storyListIndex] = storyList[gridIndex];\n storyList[gridIndex] = temp;\n}\n var setTextOptions = { suppressTimestamp: true };\n$tw.wiki.setText(\"$:/StoryList\", \"list\", undefined, storyList, setTextOptions);\n\n} \n \n if (muuriListTiddler !== undefined) {\n var muuriItems = grid.getItems();\n var currentMuuriList = $tw.wiki.getTiddlerList(muuriListTiddler,\"muuri-list\", undefined);\n var newMuuriList = currentMuuriList;\n var listOptions = { suppressTimestamp: true };\n \n for (var m=0; m < muuriItems.length; m++) {\n var muuriElement = muuriItems[m].getElement();\n var id = muuriElement.getAttribute(\"id\");\n\n newMuuriList[m] = id.toString();\n }\n \n var field = \"muuri-list\";\n\n var newMuuriListTiddler = muuriListTiddler.replace(/\\r?\\n|\\r/g, \"\").replace(/\\s+$/g,'');\n\n var newMuuriListJoined = newMuuriList.join(' ');\n \n $tw.wiki.setText(newMuuriListTiddler, field, undefined, newMuuriListJoined, listOptions);\n }\n\n return drag;\n\n };\n\n ItemDrag.prototype.onPinchEnd = function (event) {\n\n var pinch = this;\n var item = pinch.getItem();\n var element = item._element;\n var grid = pinch.getGrid();\n var settings = grid._settings;\n var pinchData = pinch._data;\n var release = item._release;\n\n // If item is not active, reset drag.\n if (!item._isActive) {\n return pinch.stop();\n }\n\n // Cancel raf loop actions.\n pinch.cancelRafLoop();\n\n // Finish currently queued overlap check.\n settings.dragSort && pinch._checkSortOverlap('finish');\n\n // Remove scroll listeners.\n pinch.unbindScrollListeners();\n\n // Setup release data.\n release.containerDiffX = pinchData.containerDiffX;\n release.containerDiffY = pinchData.containerDiffY;\n\n // Reset drag data.\n pinch.reset();\n\n // Remove drag classname from element.\n removeClass(element, settings.itemDraggingClass);\n\n // Emit dragEnd event.\n grid._emit(evDragEnd, item, event);\n\n // Finish up the migration process or start the release process.\n pinch._isMigrating ? pinch.finishMigration() : release.start();\n\n return pinch;\n\n };\n\n\n /**\n * Helpers - Generic\n * *****************\n */\n\n /**\n * Normalize array index. Basically this function makes sure that the provided\n * array index is within the bounds of the provided array and also transforms\n * negative index to the matching positive index.\n *\n * @private\n * @param {Array} array\n * @param {Number} index\n * @param {Boolean} isMigration\n */\n function normalizeArrayIndex(array, index, isMigration) {\n\n var length = array.length;\n var maxIndex = Math.max(0, isMigration ? length : length - 1);\n\n return index > maxIndex ? maxIndex :\n index < 0 ? Math.max(maxIndex + index + 1, 0) :\n index;\n\n }\n\n /**\n * Swap array items.\n *\n * @private\n * @param {Array} array\n * @param {Number} index\n * - Index (positive or negative) of the item that will be swapped.\n * @param {Number} withIndex\n * - Index (positive or negative) of the other item that will be swapped.\n */\n function arraySwap(array, index, withIndex) {\n\n // Make sure the array has two or more items.\n if (array.length < 2) {\n return;\n }\n\n // Normalize the indices.\n var indexA = normalizeArrayIndex(array, index);\n var indexB = normalizeArrayIndex(array, withIndex);\n var temp;\n\n // Swap the items.\n if (indexA !== indexB) {\n temp = array[indexA];\n array[indexA] = array[indexB];\n array[indexB] = temp;\n }\n\n }\n\n /**\n * Move array item to another index.\n *\n * @private\n * @param {Array} array\n * @param {Number} fromIndex\n * - Index (positive or negative) of the item that will be moved.\n * @param {Number} toIndex\n * - Index (positive or negative) where the item should be moved to.\n */\n function arrayMove(array, fromIndex, toIndex) {\n\n // Make sure the array has two or more items.\n if (array.length < 2) {\n return;\n }\n\n // Normalize the indices.\n var from = normalizeArrayIndex(array, fromIndex);\n var to = normalizeArrayIndex(array, toIndex);\n\n // Add target item to the new position.\n if (from !== to) {\n array.splice(to, 0, array.splice(from, 1)[0]);\n }\n\n }\n\n /**\n * Returns a new duplicate free version of the provided array.\n *\n * @private\n * @param {Array} array\n * @returns {Array}\n */\n function arrayUnique(array) {\n\n var ret = [];\n var len = array.length;\n var i;\n\n if (len) {\n ret[0] = array[0];\n for (i = 1; i < len; i++) {\n if (ret.indexOf(array[i]) < 0) {\n ret.push(array[i]);\n }\n }\n }\n\n return ret;\n\n }\n\n /**\n * Check if a value is a plain object.\n *\n * @private\n * @param {*} val\n * @returns {Boolean}\n */\n function isPlainObject(val) {\n\n return typeof val === 'object' && Object.prototype.toString.call(val) === '[object Object]';\n\n }\n\n /**\n * Check if a value is a node list\n *\n * @private\n * @param {*} val\n * @returns {Boolean}\n */\n function isNodeList(val) {\n\n var type = Object.prototype.toString.call(val);\n return type === '[object HTMLCollection]' || type === '[object NodeList]';\n\n }\n\n /**\n * Merge two objects recursively (deep merge). The source object's properties\n * are merged to the target object.\n *\n * @private\n * @param {Object} target\n * - The target object.\n * @param {Object} source\n * - The source object.\n * @returns {Object} Returns the target object.\n */\n function mergeObjects(target, source) {\n\n // Loop through the surce object's props.\n Object.keys(source).forEach(function (propName) {\n\n var isObject = isPlainObject(source[propName]);\n\n // If target and source values are both objects, merge the objects and\n // assign the merged value to the target property.\n if (isPlainObject(target[propName]) && isObject) {\n target[propName] = mergeObjects({}, target[propName]);\n target[propName] = mergeObjects(target[propName], source[propName]);\n }\n\n // Otherwise set the source object's value to target object and make sure\n // that object and array values are cloned and directly assigned.\n else {\n target[propName] = isObject ? mergeObjects({}, source[propName]) :\n Array.isArray(source[propName]) ? source[propName].concat() :\n source[propName];\n }\n\n });\n\n return target;\n\n }\n\n /**\n * Insert an item or an array of items to array to a specified index. Mutates\n * the array. The index can be negative in which case the items will be added\n * to the end of the array.\n *\n * @private\n * @param {Array} array\n * @param {*} items\n * @param {Number} [index=-1]\n */\n function insertItemsToArray(array, items, index) {\n\n var targetIndex = typeof index === typeNumber ? index : -1;\n array.splice.apply(array, [targetIndex < 0 ? array.length - targetIndex + 1 : targetIndex, 0].concat(items));\n\n }\n\n /**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. The returned function accepts one argument which, when\n * being \"finish\", calls the debounced function immediately if it is currently\n * waiting to be called, and when being \"cancel\" cancels the currently queued\n * function call.\n *\n * @private\n * @param {Function} fn\n * @param {Number} wait\n * @returns {Function}\n */\n function debounce(fn, wait) {\n\n var timeout;\n var actionCancel = 'cancel';\n var actionFinish = 'finish';\n\n return wait > 0 ? function (action) {\n\n if (timeout !== undefined) {\n timeout = global.clearTimeout(timeout);\n if (action === actionFinish) {\n fn();\n }\n }\n\n if (action !== actionCancel && action !== actionFinish) {\n timeout = global.setTimeout(function () {\n timeout = undefined;\n fn();\n }, wait);\n }\n\n } : function (action) {\n\n if (action !== actionCancel) {\n fn();\n }\n\n };\n\n }\n\n /**\n * Returns a raf loop queue system that allows pushing callbacks to either\n * the read queue or the write queue.\n *\n * @private\n * @returns {Object}\n */\n function createRafLoop() {\n\n var nextTick = null;\n var queue = [];\n var map = {};\n var raf = (global.requestAnimationFrame\n || global.webkitRequestAnimationFrame\n || global.mozRequestAnimationFrame\n || global.msRequestAnimationFrame\n || function (cb) {\n return global.setTimeout(cb, 16);\n }\n ).bind(global);\n\n function add(type, id, readCallback, writeCallback) {\n\n // First, let's check if an item has been added to the queues with the\n // same id and remove it.\n var currentIndex = queue.indexOf(type + id);\n if (currentIndex > -1) {\n queue.splice(currentIndex, 1);\n }\n\n // Add all move/scroll event callbacks to the beginning of the queue\n // and other callbacks to the end of the queue.\n type === rafQueueMove || type === rafQueueScroll ? queue.unshift(type + id) : queue.push(type + id);\n map[type + id] = [readCallback, writeCallback];\n\n // Finally, let's kickstart the next tick if it is not running yet.\n !nextTick && (nextTick = raf(flush));\n\n }\n\n function cancel(type, id) {\n\n // Let's check if an item has been added to the queue with the id and\n // if so -> remove it.\n var currentIndex = queue.indexOf(type + id);\n if (currentIndex > -1) {\n queue.splice(currentIndex, 1);\n map[type + id] = undefined;\n }\n\n }\n\n function flush() {\n\n var maxBatchSize = +Grid._maxRafBatchSize || 100;\n var batch = queue.splice(0, Math.min(maxBatchSize, queue.length));\n var batchMap = {};\n var i;\n\n // Reset ticker.\n nextTick = null;\n\n // Create batch map and clear map items.\n for (i = 0; i < batch.length; i++) {\n batchMap[batch[i]] = map[batch[i]];\n map[batch[i]] = undefined;\n }\n\n // Process read callbacks.\n for (i = 0; i < batch.length; i++) {\n batchMap[batch[i]][0]();\n }\n\n // Process write callbacks.\n for (i = 0; i < batch.length; i++) {\n batchMap[batch[i]][1]();\n }\n\n // Restart the ticker if needed.\n if (!nextTick && queue.length) {\n nextTick = raf(flush);\n }\n\n }\n\n return {\n add: add,\n cancel: cancel\n };\n\n }\n\n /**\n * Helpers - DOM utils\n * *******************\n */\n\n /**\n * Transforms a camel case style property to kebab case style property.\n *\n * @private\n * @param {String} string\n * @returns {String}\n */\n function getStyleName(string) {\n\n return string.replace(/([A-Z])/g, '-$1').toLowerCase();\n\n }\n\n /**\n * Returns the computed value of an element's style property as a string.\n *\n * @private\n * @param {HTMLElement} element\n * @param {String} style\n * @returns {String}\n */\n function getStyle(element, style) {\n\n return global.getComputedStyle(element, null).getPropertyValue(style === 'transform' ? transform.styleName || style : style);\n\n }\n\n /**\n * Returns the computed value of an element's style property transformed into\n * a float value.\n *\n * @private\n * @param {HTMLElement} el\n * @param {String} style\n * @returns {Number}\n */\n function getStyleAsFloat(el, style) {\n\n return parseFloat(getStyle(el, style)) || 0;\n\n }\n\n /**\n * Returns the element's computed translateX/Y value as a float. Assumes that\n * the translate value is defined as pixels.\n *\n * @private\n * @param {HTMLElement} element\n * @param {String} axis\n * - \"x\" or \"y\".\n * @returns {Number}\n */\n function getTranslateAsFloat(element, axis) {\n\n return parseFloat((getStyle(element, 'transform') || '').replace('matrix(', '').split(',')[axis === 'x' ? 4 : 5]) || 0;\n\n }\n\n /**\n * Transform translateX and translateY value into CSS transform style\n * property's value.\n *\n * @private\n * @param {Number} translateX\n * @param {Number} translateY\n * @returns {String}\n */\n function getTranslateString(translateX, translateY) {\n\n return 'translateX(' + translateX + 'px) translateY(' + translateY + 'px)';\n\n }\n\n function getTranslateStringTransformed(translateX, translateY, scale, rotate) {\n\n return 'translateX(' + translateX + 'px) translateY(' + translateY + 'px) scale(' + scale + ') rotate(' + rotate + 'deg)';\n\n }\n\n /**\n * Get current values of the provided styles definition object.\n *\n * @private\n * @param {HTMLElement} element\n * @param {Object} styles\n * @return {Object}\n */\n function getCurrentStyles(element, styles) {\n\n var current = {};\n var keys = Object.keys(styles);\n var i;\n\n for (i = 0; i < keys.length; i++) {\n current[keys[i]] = getStyle(element, getStyleName(keys[i]));\n }\n\n return current;\n\n }\n\n /**\n * Set inline styles to an element.\n *\n * @private\n * @param {HTMLElement} element\n * @param {Object} styles\n */\n function setStyles(element, styles) {\n\n var props = Object.keys(styles);\n var i;\n\n for (i = 0; i < props.length; i++) {\n element.style[props[i] === 'transform' && transform ? transform.propName : props[i]] = styles[props[i]];\n }\n\n }\n\n /**\n * Add class to an element.\n *\n * @private\n * @param {HTMLElement} element\n * @param {String} className\n */\n function addClass(element, className) {\n\n if (element.classList) {\n element.classList.add(className);\n }\n else if (!elementMatches(element, '.' + className)) {\n element.className += ' ' + className;\n }\n\n }\n\n /**\n * Remove class name from an element.\n *\n * @private\n * @param {HTMLElement} element\n * @param {String} className\n */\n function removeClass(element, className) {\n\n if (element.classList) {\n element.classList.remove(className);\n }\n else if (elementMatches(element, '.' + className)) {\n element.className = (' ' + element.className + ' ').replace(' ' + className + ' ', ' ').trim();\n }\n\n }\n\n /**\n * Convert nodeList to array.\n *\n * @private\n * @param {NodeList} nodeList\n * @returns {HTMLElement[]}\n */\n function nodeListToArray(nodeList) {\n\n return [].slice.call(nodeList);\n\n }\n\n /**\n * Checks the supported element.matches() method and returns a function that\n * can be used to call the supported method.\n *\n * @private\n * @returns {Function}\n */\n function getSupportedElementMatches() {\n\n var p = Element.prototype;\n var fn = p.matches || p.matchesSelector || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector;\n\n return function (el, selector) {\n return fn.call(el, selector);\n };\n\n }\n\n /**\n * Returns the supported style property's prefix, property name and style name\n * or null if the style property is not supported. This is used for getting\n * the supported transform.\n *\n * @private\n * @param {String} style\n * @returns {?Object}\n */\n function getSupportedStyle(style) {\n\n var styleCap = style.charAt(0).toUpperCase() + style.slice(1);\n var prefixes = ['', 'Webkit', 'Moz', 'O', 'ms'];\n var prefix;\n var propName;\n var i;\n\n for (i = 0; i < prefixes.length; i++) {\n prefix = prefixes[i];\n propName = prefix ? prefix + styleCap : style;\n if (docElem.style[propName] !== undefined) {\n prefix = prefix.toLowerCase();\n return {\n prefix: prefix,\n propName: propName,\n styleName: prefix ? '-' + prefix + '-' + style : style\n };\n }\n }\n\n return null;\n\n }\n\n /**\n * Calculate the offset difference two elements.\n *\n * @private\n * @param {HTMLElement} elemA\n * @param {HTMLElement} elemB\n * @param {Boolean} [compareContainingBlocks=false]\n * - When this is set to true the containing blocks of the provided elements\n * will be used for calculating the difference. Otherwise the provided\n * elements will be compared directly.\n * @returns {Object}\n */\n function getOffsetDiff(elemA, elemB, compareContainingBlocks) {\n\n if (elemA === elemB) {\n return {\n left: 0,\n top: 0\n };\n }\n\n if (compareContainingBlocks) {\n elemA = getContainingBlock(elemA, true);\n elemB = getContainingBlock(elemB, true);\n }\n\n var aOffset = getOffset(elemA, true);\n var bOffset = getOffset(elemB, true);\n\n return {\n left: bOffset.left - aOffset.left,\n top: bOffset.top - aOffset.top\n };\n\n }\n\n /**\n * Returns the element's document offset, which in practice means the vertical\n * and horizontal distance between the element's northwest corner and the\n * document's northwest corner.\n *\n * @private\n * @param {(Document|Element|Window)} element\n * @param {Boolean} [excludeElementBorders=false]\n * @returns {Offset}\n */\n function getOffset(element, excludeElementBorders) {\n\n var rect;\n var ret = {\n left: 0,\n top: 0\n };\n\n // Document's offsets are always 0.\n if (element === doc) {\n return ret;\n }\n\n // Add viewport's scroll left/top to the respective offsets.\n ret.left = global.pageXOffset || 0;\n ret.top = global.pageYOffset || 0;\n\n // Window's offsets are the viewport's scroll left/top values.\n if (element.self === global.self) {\n return ret;\n }\n\n // Add element's client rects to the offsets.\n rect = element.getBoundingClientRect();\n ret.left += rect.left;\n ret.top += rect.top;\n\n // Exclude element's borders from the offset if needed.\n if (excludeElementBorders) {\n ret.left += getStyleAsFloat(element, 'border-left-width');\n ret.top += getStyleAsFloat(element, 'border-top-width');\n }\n\n return ret;\n\n }\n\n /**\n * Returns an aabsolute positioned element's containing block, which is\n * considered to be the closest ancestor element that the target element's\n * positioning is relative to. Disclaimer: this only works as intended for\n * abolute positioned elements.\n *\n * @private\n * @param {HTMLElement} element\n * @param {Boolean} [isParent=false]\n * - When this is set to true the containing block checking is started from\n * the provided element. Otherwise the checking is started from the\n * provided element's parent element.\n * @returns {(Document|Element)}\n */\n function getContainingBlock(element, isParent) {\n\n // As long as the containing block is an element, static and not\n // transformed, try to get the element's parent element and fallback to\n // document. https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L339\n var ret = (isParent ? element : element.parentElement) || doc;\n while (ret && ret !== doc && getStyle(ret, 'position') === 'static' && !isTransformed(ret)) {\n ret = ret.parentElement || doc;\n }\n\n return ret;\n\n }\n\n /**\n * Get element's scroll parents.\n *\n * Borrowed from jQuery UI library (and heavily modified):\n * https://github.com/jquery/jquery-ui/blob/63448148a217da7e64c04b21a04982f0d6\n * 4aabaa/ui/scroll-parent.js\n *\n * @private\n * @param {HTMLElement} element\n * @returns {HTMLElement[]}\n */\n function getScrollParents(element) {\n\n var ret = [];\n var overflowRegex = /(auto|scroll)/;\n var parent = element.parentNode;\n\n // If transformed elements leak fixed elements.\n if (transformLeaksFixed) {\n\n // If the element is fixed it can not have any scroll parents.\n if (getStyle(element, 'position') === 'fixed') {\n return ret;\n }\n\n // Find scroll parents.\n while (parent && parent !== doc && parent !== docElem) {\n if (overflowRegex.test(getStyle(parent, 'overflow') + getStyle(parent, 'overflow-y') + getStyle(parent, 'overflow-x'))) {\n ret.push(parent);\n }\n parent = getStyle(parent, 'position') === 'fixed' ? null : parent.parentNode;\n }\n\n // If parent is not fixed element, add window object as the last scroll\n // parent.\n parent !== null && ret.push(global);\n\n }\n // If fixed elements behave as defined in the W3C specification.\n else {\n\n // Find scroll parents.\n while (parent && parent !== doc) {\n\n // If the currently looped element is fixed ignore all parents that are\n // not transformed.\n if (getStyle(element, 'position') === 'fixed' && !isTransformed(parent)) {\n parent = parent.parentNode;\n continue;\n }\n\n // Add the parent element to return items if it is scrollable.\n if (overflowRegex.test(getStyle(parent, 'overflow') + getStyle(parent, 'overflow-y') + getStyle(parent, 'overflow-x'))) {\n ret.push(parent);\n }\n\n // Update element and parent references.\n element = parent;\n parent = parent.parentNode;\n\n }\n\n // If the last item is the root element, replace it with the global\n // object (window). The root element scroll is propagated to the window.\n if (ret[ret.length - 1] === docElem) {\n ret[ret.length - 1] = global;\n }\n\n // Otherwise add global object (window) as the last scroll parent.\n else {\n ret.push(global);\n }\n\n }\n\n return ret;\n\n }\n\n /**\n * Detects if transformed elements leak fixed elements. According W3C\n * transform rendering spec a transformed element should contain even fixed\n * elements. Meaning that fixed elements are positioned relative to the\n * closest transformed ancestor element instead of window. However, not every\n * browser follows the spec (IE and older Firefox). So we need to test it.\n * https://www.w3.org/TR/css3-2d-transforms/#transform-rendering\n *\n * Borrowed from Mezr (v0.6.1):\n * https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L607\n *\n * @private\n * @returns {Boolean}\n * - Returns true if transformed elements leak fixed elements, false\n * otherwise.\n */\n function doesTransformLeakFixed() {\n\n if (!transform) {\n return true;\n }\n\n var elems = [0, 1].map(function (elem, isInner) {\n elem = doc.createElement('div');\n setStyles(elem, {\n position: isInner ? 'fixed' : 'absolute',\n display: 'block',\n visibility: 'hidden',\n left: isInner ? '0px' : '1px',\n transform: 'none'\n });\n return elem;\n });\n var outer = body.appendChild(elems[0]);\n var inner = outer.appendChild(elems[1]);\n var left = inner.getBoundingClientRect().left;\n setStyles(outer, {transform: 'scale(1)'});\n var isLeaking = left === inner.getBoundingClientRect().left;\n body.removeChild(outer);\n\n return isLeaking;\n\n }\n\n /**\n * Returns true if element is transformed, false if not. In practice the\n * element's display value must be anything else than \"none\" or \"inline\" as\n * well as have a valid transform value applied in order to be counted as a\n * transformed element.\n *\n * Borrowed from Mezr (v0.6.1):\n * https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L661\n *\n * @private\n * @param {HTMLElement} element\n * @returns {Boolean}\n */\n function isTransformed(element) {\n\n var transform = getStyle(element, 'transform');\n var display = getStyle(element, 'display');\n\n return transform !== 'none' && display !== 'inline' && display !== 'none';\n\n }\n\n /**\n * Calculate how many percent the intersection area of two rectangles is from\n * the maximum potential intersection area between the rectangles.\n *\n * @private\n * @param {Rectangle} a\n * @param {Rectangle} b\n * @returns {Number}\n * - A number between 0-100.\n */\n function getRectOverlapScore(a, b) {\n\n // Return 0 immediately if the rectangles do not overlap.\n if (!muuriLayout.doRectsOverlap(a, b)) {\n return 0;\n }\n\n // Calculate intersection area's width, height, max height and max width.\n var width = Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left);\n var height = Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top);\n var maxWidth = Math.min(a.width, b.width);\n var maxHeight = Math.min(a.height, b.height);\n\n return (width * height) / (maxWidth * maxHeight) * 100;\n\n }\n\n /**\n * Helpers - Item sort utilities\n * *****************************\n */\n\n /**\n * Helper for the sort method to generate mapped version of the items array\n * than contains reference to the item indices.\n *\n * @private\n * @param {Item[]} items\n * @returns {Object}\n */\n function getItemIndexMap(items) {\n\n var ret = {};\n var i;\n\n for (i = 0; i < items.length; i++) {\n ret[items[i]._id] = i;\n }\n\n return ret;\n\n }\n\n /**\n * Helper for the sort method to compare the indices of the items to enforce\n * stable sort.\n *\n * @private\n * @param {Item} itemA\n * @param {Item} itemB\n * @param {Boolean} isDescending\n * @param {Object} indexMap\n * @returns {Number}\n */\n function compareItemIndices(itemA, itemB, isDescending, indexMap) {\n\n var indexA = indexMap[itemA._id];\n var indexB = indexMap[itemB._id];\n return isDescending ? indexB - indexA : indexA - indexB;\n\n }\n\n /**\n * Helper for the sort method to compare the items based on the provided\n * attributes.\n *\n * @private\n * @param {Item} itemA\n * @param {Item} itemB\n * @param {Boolean} isDescending\n * @param {Object} criterias\n * @returns {Number}\n */\n function compareItems(itemA, itemB, isDescending, criterias) {\n\n var ret = 0;\n var criteriaName;\n var criteriaOrder;\n var valA;\n var valB;\n var i;\n\n // Loop through the list of sort criterias.\n for (i = 0; i < criterias.length; i++) {\n\n // Get the criteria name, which should match an item's sort data key.\n criteriaName = criterias[i][0];\n criteriaOrder = criterias[i][1];\n\n // Get items' cached sort values for the criteria. If the item has no sort\n // data let's update the items sort data (this is a lazy load mechanism).\n valA = (itemA._sortData ? itemA : itemA._refreshSortData())._sortData[criteriaName];\n valB = (itemB._sortData ? itemB : itemB._refreshSortData())._sortData[criteriaName];\n\n // Sort the items in descending order if defined so explicitly.\n if (criteriaOrder === 'desc' || (!criteriaOrder && isDescending)) {\n ret = valB < valA ? -1 : valB > valA ? 1 : 0;\n }\n\n // Otherwise sort items in ascending order.\n else {\n ret = valA < valB ? -1 : valA > valB ? 1 : 0;\n }\n\n // If we have -1 or 1 as the return value, let's return it immediately.\n if (ret !== 0) {\n return ret;\n }\n\n }\n\n return ret;\n\n }\n\n /**\n * Reorder an array of items based on another array of items.\n *\n * @private\n * @param {Item[]} items\n * @param {Item[]} refItems\n * @returns {Item[]}\n */\n function sortItemsByReference(items, refItems) {\n\n var newItems = [];\n var currentItems = items.concat();\n var item;\n var currentIndex;\n var i;\n\n for (i = 0; i < refItems.length; i++) {\n item = refItems[i];\n currentIndex = currentItems.indexOf(item);\n if (currentIndex > -1) {\n newItems.push(item);\n currentItems.splice(currentIndex, 1);\n }\n }\n\n items.splice.apply(items, [0, items.length].concat(newItems).concat(currentItems));\n\n return items;\n\n }\n\n /**\n * Check if a point (coordinate) is within a rectangle.\n *\n * @private\n * @param {Number} x\n * @param {Number} y\n * @param {Rectangle} rect\n * @return {Boolean}\n */\n function isPointWithinRect(x, y, rect) {\n\n return rect.width\n && rect.height\n && x >= rect.left\n && x < (rect.left + rect.width)\n && y >= rect.top\n && y < (rect.top + rect.height);\n\n }\n\n /**\n * Helpers - Muuri\n * ***************\n */\n\n /**\n * Show or hide Grid instance's items.\n *\n * @private\n * @param {Grid} inst\n * @param {String} method\n * - \"show\" or \"hide\".\n * @param {(GridMultiItemQuery|GridItemState)} items\n * @param {Object} [options]\n * @param {Boolean} [options.instant=false]\n * @param {(ShowCallback|HideCallback)} [options.onFinish]\n * @param {(Boolean|LayoutCallback|String)} [options.layout=true]\n * @returns {Grid}\n */\n function gridShowHideHandler(inst, method, items, options) {\n\n var targetItems = inst.getItems(items);\n var opts = options || {};\n var isInstant = opts.instant === true;\n var callback = opts.onFinish;\n var layout = opts.layout ? opts.layout : opts.layout === undefined;\n var counter = targetItems.length;\n var isShow = method === 'show';\n var startEvent = isShow ? evShowStart : evHideStart;\n var endEvent = isShow ? evShowEnd : evHideEnd;\n var needsLayout = false;\n var completedItems = [];\n var hiddenItems = [];\n var item;\n var i;\n\n // If there are no items call the callback, but don't emit any events.\n if (!counter) {\n if (typeof callback === typeFunction) {\n callback(targetItems);\n }\n }\n\n // Otherwise if we have some items let's dig in.\n else {\n\n // Emit showStart/hideStart event.\n inst._emit(startEvent, targetItems.concat());\n\n // Show/hide items.\n for (i = 0; i < targetItems.length; i++) {\n\n item = targetItems[i];\n\n // If inactive item is shown or active item is hidden we need to do\n // layout.\n if ((isShow && !item._isActive) || (!isShow && item._isActive)) {\n needsLayout = true;\n }\n\n // If inactive item is shown we also need to do some special hackery to\n // make the item not animate it's next positioning (layout).\n if (isShow && !item._isActive) {\n item._skipNextLayoutAnimation = true;\n }\n\n // If the a hidden item is being shown we need to refresh the item's\n // dimensions.\n isShow && item._isHidden && hiddenItems.push(item);\n\n // Show/hide the item.\n item['_' + method](isInstant, function (interrupted, item) {\n\n // If the current item's animation was not interrupted add it to the\n // completedItems array.\n if (!interrupted) {\n completedItems.push(item);\n }\n\n // If all items have finished their animations call the callback\n // and emit showEnd/hideEnd event.\n if (--counter < 1) {\n if (typeof callback === typeFunction) {\n callback(completedItems.concat());\n }\n inst._emit(endEvent, completedItems.concat());\n }\n\n });\n\n }\n\n // Refresh hidden items.\n hiddenItems.length && inst.refreshItems(hiddenItems);\n\n // Layout if needed.\n if (needsLayout && layout) {\n inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);\n }\n\n }\n\n return inst;\n\n }\n\n /**\n * Returns an object which contains start and stop methods for item's\n * show/hide process.\n *\n * @param {String} type\n * @param {Object} settings\n * @returns {Object}\n */\n function getItemVisibilityHandler(type, settings) {\n\n var isShow = type === 'show';\n var duration = parseInt(isShow ? settings.showDuration : settings.hideDuration) || 0;\n var easing = (isShow ? settings.showEasing : settings.hideEasing) || 'ease';\n var styles = isShow ? settings.visibleStyles : settings.hiddenStyles;\n var isEnabled = duration > 0;\n var currentStyles;\n\n styles = isPlainObject(styles) ? styles : null;\n\n return {\n start: function (item, instant, onFinish) {\n if (!styles) {\n onFinish && onFinish();\n }\n else {\n rafLoop.cancel(rafQueueVisibility, item._id);\n if (!isEnabled || instant) {\n if (item._animateChild.isAnimating()) {\n item._animateChild.stop(styles);\n }\n else {\n setStyles(item._child, styles);\n }\n onFinish && onFinish();\n }\n else {\n rafLoop.add(rafQueueVisibility, item._id, function () {\n currentStyles = getCurrentStyles(item._child, styles);\n }, function () {\n item._animateChild.start(currentStyles, styles, {\n duration: duration,\n easing: easing,\n onFinish: onFinish\n });\n });\n }\n }\n },\n stop: function (item, targetStyles) {\n rafLoop.cancel(rafQueueVisibility, item._id);\n item._animateChild.stop(targetStyles);\n }\n };\n\n }\n\n /**\n * Get target grid for the default drag sort predicate.\n *\n * @private\n * @param {Item} item\n * @param {Grid} rootGrid\n * @param {Rectangle} itemRect\n * @param {Number} threshold\n * @returns {?Grid}\n */\n function getTargetGrid(item, rootGrid, itemRect, threshold) {\n\n var ret = null;\n var dragSort = rootGrid._settings.dragSort;\n var grids = dragSort === true ? [rootGrid] : dragSort.call(rootGrid, item);\n var bestScore = -1;\n var gridScore;\n var grid;\n var i;\n\n // Return immediately if there are no grids.\n if (!Array.isArray(grids)) {\n return ret;\n }\n\n // Loop through the grids and get the best match.\n for (i = 0; i < grids.length; i++) {\n\n grid = grids[i];\n\n // Filter out all destroyed grids.\n if (grid._isDestroyed) {\n continue;\n }\n\n // We need to update the grid's offset since it may have changed during\n // scrolling. This could be left as problem for the userland, but it's\n // much nicer this way. One less hack for the user to worry about =)\n grid._refreshDimensions();\n\n // Check how much dragged element overlaps the container element.\n gridScore = getRectOverlapScore(itemRect, {\n width: grid._width,\n height: grid._height,\n left: grid._left,\n top: grid._top\n });\n\n // Check if this grid is the best match so far.\n if (gridScore > threshold && gridScore > bestScore) {\n bestScore = gridScore;\n ret = grid;\n }\n\n }\n\n return ret;\n\n }\n\n /**\n * Process item's callback queue.\n *\n * @private\n * @param {Function[]} queue\n * @param {Boolean} interrupted\n * @param {Item} instance\n */\n function processQueue(queue, interrupted, instance) {\n\n var callbacks = queue.splice(0, queue.length);\n var i;\n\n for (i = 0; i < callbacks.length; i++) {\n callbacks[i](interrupted, instance);\n }\n\n }\n\n /**\n * Check if item is in specific state.\n *\n * @private\n * @param {Item} item\n * @param {GridItemState} state\n * - Accepted values are: \"active\", \"inactive\", \"visible\", \"hidden\",\n * \"showing\", \"hiding\", \"positioning\", \"dragging\", \"releasing\" and\n * \"migrating\".\n * @returns {Boolean}\n */\n function isItemInState(item, state) {\n\n var methodName;\n\n if (state === 'inactive') {\n return !item.isActive();\n }\n\n if (state === 'hidden') {\n return !item.isVisible();\n }\n\n methodName = 'is' + state.charAt(0).toUpperCase() + state.slice(1);\n\n return typeof item[methodName] === typeFunction ? item[methodName]() : false;\n\n }\n\n /**\n * Prevent default.\n *\n * @private\n * @param {Object} e\n */\n function preventDefault(e) {\n\n if (e.preventDefault) {\n e.preventDefault();\n }\n\n }\n\n /**\n * Merge default settings with user settings. The returned object is a new\n * object with merged values. The merging is a deep merge meaning that all\n * objects and arrays within the provided settings objects will be also merged\n * so that modifying the values of the settings object will have no effect on\n * the returned object.\n *\n * @private\n * @param {Object} defaultSettings\n * @param {Object} [userSettings]\n * @returns {Object} Returns a new object.\n */\n function mergeSettings(defaultSettings, userSettings) {\n\n // Create a fresh copy of default settings.\n var ret = mergeObjects({}, defaultSettings);\n\n // Merge user settings to default settings.\n ret = userSettings ? mergeObjects(ret, userSettings) : ret;\n\n // Handle visible/hidden styles manually so that the whole object is\n // overriden instead of the props.\n ret.visibleStyles = (userSettings || {}).visibleStyles || (defaultSettings || {}).visibleStyles;\n ret.hiddenStyles = (userSettings || {}).hiddenStyles || (defaultSettings || {}).hiddenStyles;\n\n return ret;\n\n }\n\n /**\n * Resolver for default drag start predicate function.\n *\n * @private\n * @param {Item} item\n * @param {Object} event\n * @returns {Boolean}\n */\n function dragStartPredicateResolve(item, event) {\n\n var predicate = item._drag._startPredicateData;\n var pointer = event.changedPointers[0];\n var pageX = pointer && pointer.pageX || 0;\n var pageY = pointer && pointer.pageY || 0;\n var handleRect;\n\n // If the moved distance is smaller than the threshold distance or there is\n // some delay left, ignore this predicate cycle.\n if (event.distance < predicate.distance || predicate.delay) {\n return;\n }\n\n // Get handle rect.\n handleRect = predicate.handleElement.getBoundingClientRect();\n\n // Reset predicate data.\n dragStartPredicateReset(item);\n\n // If the cursor is still within the handle let's start the drag.\n return isPointWithinRect(pageX, pageY, {\n width: handleRect.width,\n height: handleRect.height,\n left: handleRect.left + (global.pageXOffset || 0),\n top: handleRect.top + (global.pageYOffset || 0)\n });\n\n }\n\n /**\n * Reset for default drag start predicate function.\n *\n * @private\n * @param {Item} item\n */\n function dragStartPredicateReset(item) {\n\n var predicate = item._drag._startPredicateData;\n\n if (predicate) {\n if (predicate.delayTimer) {\n predicate.delayTimer = global.clearTimeout(predicate.delayTimer);\n }\n item._drag._startPredicateData = null;\n }\n\n }\n\n /**\n * Default layout algorithm\n * ************************\n */\n\n /*!\n * muuriLayout v0.5.3\n * Copyright (c) 2016 Niklas Rämö <inramo@gmail.com>\n * Released under the MIT license\n */\n\n /**\n * The default Muuri layout algorithm. Based on MAXRECTS approach as described\n * by Jukka Jylänki in his survey: \"A Thousand Ways to Pack the Bin - A\n * Practical Approach to Two-Dimensional Rectangle Bin Packing.\".\n *\n * This algorithm is intentionally separated from the rest of the codebase,\n * because it is it's own library with a different copyright than the rest of\n * the software. It's also MIT licensed so no worries there. This is intended\n * to be used as Muuri's default layout algorithm and goes hand in hand with\n * Muuri's core development.\n *\n * @private\n * @param {Item[]} items\n * @param {Number} width\n * @param {Number} height\n * @param {Object} options\n * @param {Boolean} [options.fillGaps=false]\n * @param {Boolean} [options.horizontal=false]\n * @param {Boolean} [options.alignRight=false]\n * @param {Boolean} [options.alignBottom=false]\n * @returns {LayoutData}\n */\n function muuriLayout(items, width, height, options) {\n\n var fillGaps = !!options.fillGaps;\n var isHorizontal = !!options.horizontal;\n var alignRight = !!options.alignRight;\n var alignBottom = !!options.alignBottom;\n var rounding = !!options.rounding;\n var layout = {\n slots: {},\n width: isHorizontal ? 0 : (rounding ? Math.round(width) : width),\n height: !isHorizontal ? 0 : (rounding ? Math.round(height) : height),\n setWidth: isHorizontal,\n setHeight: !isHorizontal\n };\n var freeSlots = [];\n var slotIds;\n var slotData;\n var slot;\n var item;\n var itemWidth;\n var itemHeight;\n var i;\n\n // No need to go further if items do not exist.\n if (!items.length) {\n return layout;\n }\n\n // Find slots for items.\n for (i = 0; i < items.length; i++) {\n item = items[i];\n itemWidth = item._width + item._margin.left + item._margin.right;\n itemHeight = item._height + item._margin.top + item._margin.bottom;\n if (rounding) {\n itemWidth = Math.round(itemWidth);\n itemHeight = Math.round(itemHeight);\n }\n slotData = muuriLayout.getSlot(layout, freeSlots, itemWidth, itemHeight, !isHorizontal, fillGaps);\n slot = slotData[0];\n freeSlots = slotData[1];\n if (isHorizontal) {\n layout.width = Math.max(layout.width, slot.left + slot.width);\n }\n else {\n layout.height = Math.max(layout.height, slot.top + slot.height);\n }\n layout.slots[item._id] = slot;\n }\n\n // If the alignment is set to right or bottom, we need to adjust the\n // results.\n if (alignRight || alignBottom) {\n slotIds = Object.keys(layout.slots);\n for (i = 0; i < slotIds.length; i++) {\n slot = layout.slots[slotIds[i]];\n if (alignRight) {\n slot.left = layout.width - (slot.left + slot.width);\n }\n if (alignBottom) {\n slot.top = layout.height - (slot.top + slot.height);\n }\n }\n }\n\n return layout;\n\n }\n\n /**\n * Calculate position for the layout item. Returns the left and top position\n * of the item in pixels.\n *\n * @private\n * @memberof muuriLayout\n * @param {Layout} layout\n * @param {Array} slots\n * @param {Number} itemWidth\n * @param {Number} itemHeight\n * @param {Boolean} vertical\n * @param {Boolean} fillGaps\n * @returns {Array}\n */\n muuriLayout.getSlot = function (layout, slots, itemWidth, itemHeight, vertical, fillGaps) {\n\n var leeway = 0.001;\n var newSlots = [];\n var item = {\n left: null,\n top: null,\n width: itemWidth,\n height: itemHeight\n };\n var slot;\n var potentialSlots;\n var ignoreCurrentSlots;\n var i;\n var ii;\n\n // Try to find a slot for the item.\n for (i = 0; i < slots.length; i++) {\n slot = slots[i];\n if (item.width <= (slot.width + leeway) && item.height <= (slot.height + leeway)) {\n item.left = slot.left;\n item.top = slot.top;\n break;\n }\n }\n\n // If no slot was found for the item.\n if (item.left === null) {\n\n // Position the item in to the bottom left (vertical mode) or top right\n // (horizontal mode) of the grid.\n item.left = vertical ? 0 : layout.width;\n item.top = vertical ? layout.height : 0;\n\n // If gaps don't needs filling do not add any current slots to the new\n // slots array.\n if (!fillGaps) {\n ignoreCurrentSlots = true;\n }\n\n }\n\n // In vertical mode, if the item's bottom overlaps the grid's bottom.\n if (vertical && (item.top + item.height) > layout.height) {\n\n // If item is not aligned to the left edge, create a new slot.\n if (item.left > 0) {\n newSlots.push({\n left: 0,\n top: layout.height,\n width: item.left,\n height: Infinity\n });\n }\n\n // If item is not aligned to the right edge, create a new slot.\n if ((item.left + item.width) < layout.width) {\n newSlots.push({\n left: item.left + item.width,\n top: layout.height,\n width: layout.width - item.left - item.width,\n height: Infinity\n });\n }\n\n // Update grid height.\n layout.height = item.top + item.height;\n\n }\n\n // In horizontal mode, if the item's right overlaps the grid's right edge.\n if (!vertical && (item.left + item.width) > layout.width) {\n\n // If item is not aligned to the top, create a new slot.\n if (item.top > 0) {\n newSlots.push({\n left: layout.width,\n top: 0,\n width: Infinity,\n height: item.top\n });\n }\n\n // If item is not aligned to the bottom, create a new slot.\n if ((item.top + item.height) < layout.height) {\n newSlots.push({\n left: layout.width,\n top: item.top + item.height,\n width: Infinity,\n height: layout.height - item.top - item.height\n });\n }\n\n // Update grid width.\n layout.width = item.left + item.width;\n\n }\n\n // Clean up the current slots making sure there are no old slots that\n // overlap with the item. If an old slot overlaps with the item, split it\n // into smaller slots if necessary.\n for (i = fillGaps ? 0 : ignoreCurrentSlots ? slots.length : i; i < slots.length; i++) {\n potentialSlots = muuriLayout.splitRect(slots[i], item);\n for (ii = 0; ii < potentialSlots.length; ii++) {\n slot = potentialSlots[ii];\n // Let's make sure here that we have a big enough slot\n // (width/height > 0.49px) and also let's make sure that the slot is\n // within the boundaries of the grid.\n if (slot.width > 0.49 && slot.height > 0.49 && ((vertical && slot.top < layout.height) || (!vertical && slot.left < layout.width))) {\n newSlots.push(slot);\n }\n }\n }\n\n // Sanitize new slots.\n if (newSlots.length) {\n newSlots = muuriLayout.purgeRects(newSlots).sort(vertical ? muuriLayout.sortRectsTopLeft : muuriLayout.sortRectsLeftTop);\n }\n\n // Return the item and updated slots data.\n return [item, newSlots];\n\n };\n\n /**\n * Punch a hole into a rectangle and split the remaining area into smaller\n * rectangles (4 at max).\n *\n * @private\n * @param {Rectangle} rect\n * @param {Rectangle} hole\n * returns {Rectangle[]}\n */\n muuriLayout.splitRect = function (rect, hole) {\n\n var ret = [];\n\n // If the rect does not overlap with the hole add rect to the return data as\n // is.\n if (!muuriLayout.doRectsOverlap(rect, hole)) {\n return [{\n left: rect.left,\n top: rect.top,\n width: rect.width,\n height: rect.height\n }];\n }\n\n // Left split.\n if (rect.left < hole.left) {\n ret.push({\n left: rect.left,\n top: rect.top,\n width: hole.left - rect.left,\n height: rect.height\n });\n }\n\n // Right split.\n if ((rect.left + rect.width) > (hole.left + hole.width)) {\n ret.push({\n left: hole.left + hole.width,\n top: rect.top,\n width: (rect.left + rect.width) - (hole.left + hole.width),\n height: rect.height\n });\n }\n\n // Top split.\n if (rect.top < hole.top) {\n ret.push({\n left: rect.left,\n top: rect.top,\n width: rect.width,\n height: hole.top - rect.top\n });\n }\n\n // Bottom split.\n if ((rect.top + rect.height) > (hole.top + hole.height)) {\n ret.push({\n left: rect.left,\n top: hole.top + hole.height,\n width: rect.width,\n height: (rect.top + rect.height) - (hole.top + hole.height)\n });\n }\n\n return ret;\n\n };\n\n /**\n * Check if two rectangles overlap.\n *\n * @private\n * @memberof muuriLayout\n * @param {Rectangle} a\n * @param {Rectangle} b\n * @returns {Boolean}\n */\n muuriLayout.doRectsOverlap = function (a, b) {\n\n return !((a.left + a.width) <= b.left || (b.left + b.width) <= a.left || (a.top + a.height) <= b.top || (b.top + b.height) <= a.top);\n\n };\n\n /**\n * Check if a rectangle is fully within another rectangle.\n *\n * @private\n * @memberof muuriLayout\n * @param {Rectangle} a\n * @param {Rectangle} b\n * @returns {Boolean}\n */\n muuriLayout.isRectWithinRect = function (a, b) {\n\n return a.left >= b.left && a.top >= b.top && (a.left + a.width) <= (b.left + b.width) && (a.top + a.height) <= (b.top + b.height);\n\n };\n\n /**\n * Loops through an array of rectangles and removes all that are fully within\n * another rectangle in the array.\n *\n * @private\n * @memberof muuriLayout\n * @param {Rectangle[]} rects\n * @returns {Rectangle[]}\n */\n muuriLayout.purgeRects = function (rects) {\n\n var i = rects.length;\n var ii;\n var rectA;\n var rectB;\n\n while (i--) {\n rectA = rects[i];\n ii = rects.length;\n while (ii--) {\n rectB = rects[ii];\n if (i !== ii && muuriLayout.isRectWithinRect(rectA, rectB)) {\n rects.splice(i, 1);\n break;\n }\n }\n }\n\n return rects;\n\n };\n\n /**\n * Sort rectangles with top-left gravity.\n *\n * @private\n * @memberof muuriLayout\n * @param {Rectangle} a\n * @param {Rectangle} b\n * @returns {Number}\n */\n muuriLayout.sortRectsTopLeft = function (a, b) {\n\n return a.top - b.top || a.left - b.left;\n\n };\n\n /**\n * Sort rectangles with left-top gravity.\n *\n * @private\n * @memberof muuriLayout\n * @param {Rectangle} a\n * @param {Rectangle} b\n * @returns {Number}\n */\n muuriLayout.sortRectsLeftTop = function (a, b) {\n\n return a.left - b.left || a.top - b.top;\n\n };\n\n /**\n * Type definitions\n * ****************\n */\n\n /* eslint-disable */\n /**\n * The values by which multiple grid items can be queried. An html element or\n * an array of HTML elements. Item or an array of items. Node list, live or\n * static. Number (index) or a list of numbers (indices).\n *\n * @typedef {(HTMLElement|HTMLElement[]|Item|Item[]|NodeList|Number|Number[])} GridMultiItemQuery\n */\n /* eslint-enable */\n\n /**\n * The values by which a single grid item can be queried. An html element, an\n * item instance or a number (index).\n *\n * @typedef {(HTMLElement|Item|Number)} GridSingleItemQuery\n */\n\n /**\n * The grid item's state, a string. Accepted values are: \"active\", \"inactive\",\n * \"visible\", \"hidden\", \"showing\", \"hiding\", \"positioning\", \"dragging\",\n * \"releasing\" and \"migrating\".\n *\n * @typedef {String} GridItemState\n */\n\n /**\n * The data that is required to orchestrate a sort action during drag.\n *\n * @typedef {Object} DragSortCommand\n * @param {String} action\n * - \"move\" or \"swap\".\n * @param {Number} index\n * - target index.\n * @param {?Grid} [grid=null]\n * - target grid.\n */\n\n /**\n * A rectangle is an object with width, height and offset (left and top) data.\n *\n * @typedef {Object} Rectangle\n * @property {Number} width\n * @property {Number} height\n * @property {Number} left\n * @property {Number} top\n */\n\n /**\n * Layout data for the layout instance.\n *\n * @typedef {Object} LayoutData\n * @property {Object} slots\n * @property {Number} width\n * @property {Number} height\n * @property {Boolean} setWidth\n * @property {Boolean} setHeight\n */\n\n /**\n * @callback LayoutCallback\n * @param {Boolean} isAborted\n * - Was the layout procedure aborted?\n * @param {Item[]} items\n * - The items that were attempted to be positioned.\n */\n\n /**\n * @callback ShowCallback\n * @param {Item[]} items\n * - The items that were successfully shown without interruptions.\n */\n\n /**\n * @callback HideCallback\n * @param {Item[]} items\n * - The items that were successfully hidden without interruptions.\n */\n\n /**\n * @callback FilterCallback\n * @param {Item[]} shownItems\n * - The items that were shown.\n * @param {Item[]} hiddenItems\n * - The items that were hidden.\n */\n\n /**\n * Init\n */\n\n return Grid;\n\n}));",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/lib/muuri.js",
"tags": "",
"module-type": "library",
"modified": "20180121164318543",
"created": "20180118195028747"
},
"$:/plugins/BTC/tiddly-touch/macros": {
"text": "\\define hide-tiddler-borders-and-gaps()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!seamless\" type=\"match\" text=\"yes\">\n\n.tc-grid-1 {\n background-color: <<colour tiddler-background>> !important;\n}\n.tc-tiddler-frame {\n box-shadow: none !important;\n border: none !important;\n margin: 0px 0px 0px 0px !important;\n border-radius: 0px !important;\n}\n<$list filter=\"1 2 3 4 5 6 7 8 9 10 11 12\" variable=\"spanValue\">\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc((100% / 12 * <<spanValue>>)) !important;\n min-width: calc((100% / 12 * <<spanValue>>)) !important;\n}\n\n</$list>\n\n.tc-tiddler-frame.span-13 {\n width: calc((100% / 5 * 4)) !important;\n min-width: calc((100% / 5 * 4)) !important;\n}\n\n</$reveal>\n\\end\n\\define you-better-disable-dragging()\n<$reveal state=\"$:/view\" type=\"match\" text=\"muuri\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!drag-enabled\" type=\"nomatch\" text=\"no\">\n\n<$macrocall $name=\"attention\" text=\"\"\"\n\n!!!//you better ''disable global dragging'' for this: {{$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag}}//\n\n\"\"\"/>\n</$reveal>\n</$reveal>\n\\end\n\\define mobile-portrait-tiles()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"nomatch\" text=\"yes\">\n<$set name=\"columnCount\" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>\n.tc-tiddler-frame, .tc-tiddler-edit-frame {\n width: calc(100% - 16px);\n min-width: calc(100% - 16px) ;\n}\n<$list filter=\"1 2 3 4 5 6 7 8 9 10 11 12\" variable=\"spanValue\">\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc(100% - 16px);\n min-width: calc(100% - 16px);\n}\n</$list>\n</$set>\n</$reveal>\n\\end\n\\define sidebar-new-window-tiddler-edit-frame-hide()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window\" type=\"match\" text=\"yes\">\n.tc-story-river .tc-tiddler-edit-frame {\n\n}\n</$reveal>\n\\end\n\\define tiddly-touch-toolbar-left-right()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!toolbar-right\" type=\"match\" text=\"yes\">\n\n</$reveal>\n\\end\n\\define vertical-toolbar-yes-no()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar\" type=\"nomatch\" text=\"no\">\n.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {\n width: 1.8em;\n right: -60px;\n position: fixed;\n top: -20px;\n}\n@media (max-width: 500px) {\n.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {\n width: 1em;\n right: -30px;\n position: fixed;\n top: -10px;\n}\n}\n</$reveal>\n\\end\n\\define if-horizontal-grid(text)\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"match\" text=\"yes\">\n$text$\n</$reveal>\n\\end\n\\define toggle-muuri-columns()\n<$set name=\"offSetPx\" filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[seamless]regexp[^yes$]addprefix[0]removesuffix[yes]] [[$:/plugins/BTC/tiddly-touch/config]get[seamless]regexp[^no$]addprefix[16]removesuffix[no]]\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!column-count\" type=\"nomatch\" text=\"\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"nomatch\" text=\"yes\">\n<$set name=\"columnCount\" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>\n.tc-tiddler-frame, .tc-tiddler-edit-frame {\n width: calc((100% / <<columnCount>>) - <<offSetPx>>px);\n min-width: calc((100% / <<columnCount>>) - <<offSetPx>>px) ;\n}\n@media (min-width: 500px) {\n.tc-tiddler-frame, .tc-tiddler-edit-frame {\n width: calc((100% / <<columnCount>>) - <<offSetPx>>px);\n min-width: calc((100% / <<columnCount>>) - <<offSetPx>>px);\n}\n}\n\n<$list filter=\"[<columnCount>regexp[^(4|5|6)$]]\">\n\n.tc-tiddler-frame {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.tc-tiddler-controls {\n right: -40px !important;\n}\n\n.tc-tiddler-info {\n margin-left: -20px;\n margin-right: -20px;\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.tc-unfold-banner {\n margin-left: -21px;\n}\n\n.tc-fold-banner {\n margin-left: -17px;\n width: 15px;\n}\n\n</$list>\n\n.tc-tiddler-frame.span-4, .tc-tiddler-frame.span-5, .tc-tiddler-frame.span-6 , .tc-tiddler-frame.span-7, .tc-tiddler-frame.span-8, .tc-tiddler-frame.span-9 , .tc-tiddler-frame.span-10, .tc-tiddler-frame.span-11, .tc-tiddler-frame.span-12, , .tc-tiddler-frame.span-13 {\n padding-left: 42px !important;\n padding-right: 42px !important;\n}\n\n.tc-tiddler-frame.span-1, .tc-tiddler-frame.span-2, .tc-tiddler-frame.span-3 {\n padding-left: 20px;\n padding-right: 20px;\n}\n\n.span-1 .tc-tiddler-controls, .span-2 .tc-tiddler-controls, .span-3 .tc-tiddler-controls {\n right: -40px !important;\n}\n\n.span-1 .tc-tiddler-info, .span-2 .tc-tiddler-info, .span-3 .tc-tiddler-info {\n margin-left: -20px;\n margin-right: -20px;\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.span-1 .tc-unfold-banner, .span-2 .tc-unfold-banner, .span-3 .tc-unfold-banner {\n margin-left: -21px;\n}\n\n.span-1 .tc-fold-banner, .span-2 .tc-fold-banner, .span-3 .tc-fold-banner {\n margin-left: -17px;\n width: 15px;\n}\n\n\n<$list filter=\"1 2 3 4 5 6 7 8 9 10 11 12\" variable=\"spanValue\">\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);\n min-width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);\n}\n@media (min-width: 500px) {\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px) !important;\n min-width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px) !important;\n}\n}\n</$list>\n.tc-tiddler-frame.span-13 {\n width: calc((100% / 5 * 4) - <<offSetPx>>px) !important;\n min-width: calc((100% / 5 * 4) - <<offSetPx>>px) !important;\n}\n</$set>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!column-count\" type=\"nomatch\" text=\"\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!align-horizontal\" type=\"match\" text=\"yes\">\n<$set name=\"columnCount\" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>\n.tc-tiddler-frame, .tc-tiddler-edit-frame {\n width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px) !important;\n min-width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px) !important;\n}\n@media (min-width: 500px) {\n.tc-tiddler-frame, .tc-tiddler-edit-frame {\n width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px) !important;\n min-width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px) !important;\n}\n}\n<$list filter=\"1 2 3 4 5 6 7 8 9 10 11 12\" variable=\"spanValue\">\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);\n min-width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);\n}\n@media (min-width: 500px) {\n.tc-tiddler-frame.span-<<spanValue>> {\n width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px) !important;\n min-width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px)!important;\n}\n}\n</$list>\n.tc-tiddler-frame.span-13 {\n width: calc((100% / 5 * 4) - <<offSetPx>>px) !important;\n min-width: calc((100% / 5 * 4) - <<offSetPx>>px) !important;\n}\n</$set>\n</$reveal>\n</$reveal>\n\\end\n\\define vertical-toolbar-macro()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar\" type=\"nomatch\" text=\"no\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]![$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]![$:/core/ui/Buttons/more-tiddler-actions]![$:/core/ui/Buttons/fold-bar]lookup[$:/config/ViewToolbarButtons/Visibility/]!regexp[^hide$]count[]]\" variable=\"toolbarCount\">\n.tc-tiddler-frame:not(.tc-tiddler-folded) {\n min-height: calc(<<toolbarCount>> * 175px / 4);\n}\n</$list>\n</$reveal>\n</$reveal>\n\\end\n\\define if-dragging-enabled(text)\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!drag-enabled\" type=\"match\" text=\"yes\">\n$text$\n</$reveal>\n\\end\n\\define if-spreadsheet-view(text)\n<$list filter=\"[[$:/core/ui/PageTemplate/spreadsheet]tag[$:/tags/PageTemplate]]\">\n$text$\n</$list>\n\\end\n\\define show-hide-right-grid()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!right-grid\" type=\"match\" text=\"hide\">\n\n.tc-grid-3 {\n display: none !important;\n visibility: hidden;\n}\n\n</$reveal>\n\\end\n\\define show-hide-left-grid()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!left-grid\" type=\"match\" text=\"hide\">\n\nsection.tc-grid-2, .grid-container-2, .tc-grid-2 .tc-tiddler-frame {\n display: none !important;\n visibility: hidden;\n}\n\n</$reveal>\n\\end\n\\define leftgrid-width-macro()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!left-grid-width\" type=\"nomatch\" text=\"\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!left-grid\" type=\"nomatch\" text=\"hide\">\n<$set name=\"leftGridWidth\" value={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>\n.tc-grid-2 {\n width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;\n}\n.tc-grid-1 {\n width: calc(74% - ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;\n}\n</$set>\n</$reveal>\n</$reveal>\n\\end\n\\define rightgrid-width-macro()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!right-grid-width\" type=\"nomatch\" text=\"\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!right-grid\" type=\"nomatch\" text=\"hide\">\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]regexp[^hide$]]\">\n<$set name=\"rightGridWidth\" value={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}}>\n\n.tc-grid-2 {\n display: none !important;\n}\n\n.tc-grid-3 {\n width: calc(13% + ((<<rightGridWidth>> - 1) * (100vw / 20)));\n}\n\n.tc-grid-1 {\n width: calc(87% - ((<<rightGridWidth>> - 1) * (100vw / 20)) - 21px);\n}\n\n</$set>\n</$list>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]!regexp[^hide$]]\">\n<$vars rightGridWidth={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}} leftGridWidth={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>\n\n.tc-grid-3 {\n width: calc(13% + ((<<rightGridWidth>> - 1) * (100vw / 20))) !important;\n}\n.tc-grid-2 {\n width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;\n}\n.tc-grid-1 {\n width: calc(74% - ((<<rightGridWidth>> - 1) * (100vw / 20)) - ((<<leftGridWidth>> - 1) * (100vw / 20)) - 42px);\n left: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 21px);\n}\n\n</$vars>\n</$list>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!right-grid\" type=\"match\" text=\"hide\">\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]regexp[^hide$]]\">\n<$set name=\"rightGridWidth\" value={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}}>\n\n.tc-grid-1 {\n width: 100%;\n}\n\n.tc-grid-2 {\n display: none;\n}\n\n</$set>\n</$list>\n<$list filter=\"[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]!regexp[^hide$]]\">\n<$vars rightGridWidth={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}} leftGridWidth={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>\n\n.tc-grid-2 {\n width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 8px);\n}\n\n.tc-grid-1 {\n width: calc(87% -\n ((<<leftGridWidth>> - 1) * (100vw / 20)) - 21px) ;\n left: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 21px);\n right: 0px;\n}\n\n</$vars>\n</$list>\n</$reveal>\n</$reveal>\n\\end",
"title": "$:/plugins/BTC/tiddly-touch/macros",
"tags": "$:/tags/Macro",
"modified": "20180121152925882",
"created": "20180118200039067"
},
"$:/plugins/BTC/tiddly-touch/macros/grid-item-class.js": {
"text": "/*\\\ntitle: $:/plugins/BTC/tiddly-touch/macros/grid-item-class.js\ntype: application/javascript\nmodule-type: macro\ntags: $:/tags/Macro\n\nMacro to generate a list of CSS classes for the curren tiddler view\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"grid-item-class\";\n\nexports.params = [\n { name: \"default\", default: \"grid-item-content\" }\n];\n\n/*\nRun the macro\n*/\nexports.run = function(defaultClass) {\n var tiddler = this.wiki.getTiddler(this.getVariable(\"currentTiddler\"));\n var output = defaultClass;\n\n if (!tiddler) {\n return output;\n }\n\n var viewClass = tiddler.fields['view-class'];\n if (viewClass) {\n output += \" \" + viewClass;\n }\n\n var tiddlerWidth = tiddler.fields['muuri-tiddler-width'];\n if (tiddlerWidth) {\n switch(tiddlerWidth) {\n case \"0\":\n\t\toutput += \" \";\n break;\n case \"1\":\n\t\toutput += \" span-12\";\n break;\n case \"2\":\n\t\toutput += \" span-8\";\n break;\n case \"3\":\n\t\toutput += \" span-6\";\n break;\n case \"4\":\n\t\toutput += \" span-4\";\n break;\n case \"5\":\n\t\toutput += \" span-3\";\n break;\n case \"6\":\n\t\toutput += \" span-2\";\n break;\n case \"7\":\n output += \" span-10\";\n break;\n case \"8\":\n output += \" span-9\";\n break;\n case \"9\":\n output += \" span-13\";\n break;\n default:\n\t\toutput += \" \";\n\t}\n }\n return output;\n};\n})();\n",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/macros/grid-item-class.js",
"tags": "$:/tags/Macro",
"revision": "0",
"module-type": "macro",
"modified": "20180121105655908",
"created": "20180103110940949",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar": {
"text": "\\define config-title()\n$:/config/PageControlButtons/Visibility/$(listItem)$\n\\end\n\\define leftbar-config-title()\n$:/config/LeftBarButtons/Visibility/$(listItem)$\n\\end\n\n<div class=\"tc-leftbar\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]!title[$:/core/ui/Buttons/save-wiki]]\" variable=\"listItem\">\n<$reveal type=\"nomatch\" state=<<config-title>> text=\"hide\">\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n</$set>\n</$reveal>\n</$list>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/LeftBar]!has[draft.of]]\" variable=\"listItem\">\n<$reveal type=\"nomatch\" state=<<leftbar-config-title>> text=\"hide\">\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n<$transclude tiddler=<<listItem>> mode=\"inline\"/>\n</$set>\n</$reveal>\n</$list>\n{{$:/plugins/BTC/tiddly-touch/Buttons/sidebar}}\n\n</div>\n",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar",
"revision": "0",
"modified": "20180121165555479",
"list-after": "$:/plugins/BTC/tiddly-touch/PageTemplate/muuri",
"created": "20171113175754780",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/PageTemplate/muuri": {
"text": "<section class=\"tc-story-river\">\n\n<$muuri target={{$:/plugins/BTC/tiddly-touch/config!!child-class}} target-is-tiddler=\"yes\" fill-gaps={{$:/plugins/BTC/tiddly-touch/config!!fill-gaps}} horizontal={{$:/plugins/BTC/tiddly-touch/config!!align-horizontal}} align-right={{$:/plugins/BTC/tiddly-touch/config!!align-right}} align-bottom={{$:/plugins/BTC/tiddly-touch/config!!align-bottom}} dragging={{$:/plugins/BTC/tiddly-touch/config!!drag-enabled}}>\n\n<$list filter=\"[list[$:/StoryList]]\" history=\"$:/HistoryList\" template=\"$:/plugins/BTC/tiddly-touch/ui/ViewTemplate\" editTemplate=\"$:/plugins/BTC/tiddly-touch/ui/EditTemplate\" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>\n\n</$muuri>\n\n<section class=\"story-frontdrop\">\n\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]\">\n\n<$transclude/>\n\n</$list>\n\n</section>\n\n</section>",
"title": "$:/plugins/BTC/tiddly-touch/PageTemplate/muuri",
"modified": "20180121165555480",
"created": "20180118195806654"
},
"$:/plugins/BTC/tiddly-touch/ui/EditTemplate": {
"text": "\\define actions()\n<$action-sendmessage $message=\"tm-add-tag\" $param={{$:/temp/NewTagName}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/NewTagName\"/>\n<$action-sendmessage $message=\"tm-add-field\" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldname\"/>\n<$action-deletetiddler $tiddler=\"$:/temp/newfieldvalue\"/>\n<$action-sendmessage $message=\"tm-save-tiddler\"/>\n\\end\n\\define frame-classes()\ntc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(muuriViewClasses)$\n\\end\n<$set name=\"muuriViewClasses\" value=<<grid-item-class>>><div class=<<frame-classes>>>\n<$fieldmangler>\n<$set name=\"storyTiddler\" value=<<currentTiddler>>>\n<$keyboard key=\"((cancel-edit-tiddler))\" message=\"tm-cancel-tiddler\">\n<$keyboard key=\"((save-tiddler))\" actions=<<actions>>>\n<$list filter=\"[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]\" variable=\"listItem\">\n<$set name=\"tv-config-toolbar-class\" filter=\"[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]\">\n<$transclude tiddler=<<listItem>>/>\n</$set>\n</$list>\n</$keyboard>\n</$keyboard>\n</$set>\n</$fieldmangler>\n</div></$set>\n",
"title": "$:/plugins/BTC/tiddly-touch/ui/EditTemplate",
"tags": "",
"modified": "20180120165137852",
"created": "20180120163952016"
},
"$:/plugins/BTC/tiddly-touch/ui/ViewTemplate": {
"text": "\\define frame-classes()\ntc-tiddler-frame tc-tiddler-view-frame $(muuriViewClasses)$ $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$ $(foldedState)$ $(morePopupStateClass)$\n\\end\n\\define folded-state()\n$:/state/folded/$(currentTiddler)$\n\\end\n\\define more-popup-state()\n$:/state/popup/more/$(currentTiddler)$\n\\end\n<$set name=\"storyTiddler\" value=<<currentTiddler>>><$set name=\"tiddlerInfoState\" value=<<qualify \"$:/state/popup/tiddler-info\">>><$set name=\"morePopupState\" value=<<more-popup-state>>><$tiddler tiddler=<<currentTiddler>>><$set name=\"foldedState\"\n value={{{ [all[tiddlers]prefix[$:/state/folded]suffix<currentTiddler>is[tiddler]get[text]regexp[^hide$]addprefix[tc-tiddler-folded]removesuffix[hide]] }}}><$set name=\"morePopupStateClass\" value={{{ [<morePopupState>!is[missing]suffix<currentTiddler>addprefix[tc-tiddler-more-popup]removesuffix<morePopupState>] }}}><$set name=\"muuriViewClasses\" value=<<grid-item-class>>><div class=<<frame-classes>>><$list filter=\"[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]\" variable=\"listItem\"><$transclude tiddler=<<listItem>>/></$list>\n</div>\n</$set></$set></$set>\n</$tiddler></$set></$set></$set>\n",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/BTC/tiddly-touch/ui/ViewTemplate",
"tiddler-width": "5",
"tags": "",
"revision": "0",
"modified": "20180120154325848",
"created": "20180103134840871",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/Buttons/show-hide-titles-tags-controls": {
"text": "\\define show-hide-tiddler-title-tags()\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"nomatch\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle {\n display: none;\n}\n.tc-tiddler-frame {\n padding-top: 10px;\n}\n.tc-tiddler-controls {\n padding-top: 18px;\n}\n</$reveal>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle, .tc-tiddler-frame .tc-tags-wrapper {\n display: none;\n}\n.tc-tiddler-frame {\n padding-top: 10px;\n}\n.tc-tiddler-controls {\n padding-top: 18px;\n}\n</$reveal>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"match\" text=\"yes\">\n.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle, .tc-tiddler-frame .tc-tags-wrapper, .tc-tiddler-frame .tc-tiddler-controls {\n display: none;\n}\n.tc-tiddler-frame {\n padding-top: 10px;\n}\n.tc-tiddler-controls {\n padding-top: 18px;\n}\n</$reveal>\n</$reveal>\n</$reveal>\n\\end\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"nomatch\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"nomatch\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\"><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-titles\" $value=\"yes\"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility}}\n</$button>\n</$reveal>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"nomatch\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible\"><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-tags\" $value=\"yes\"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-blue}}\n</$button>\n</$reveal>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"nomatch\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon\"><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-controls\" $value=\"yes\"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-green}}\n</$button>\n</$reveal>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-titles\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-tags\" type=\"match\" text=\"yes\">\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!hide-controls\" type=\"match\" text=\"yes\">\n<$button class=\"tc-btn-invisible tc-toolbar-icon\"><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-titles\" $value=\"no\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-tags\" $value=\"no\"/><$action-setfield $tiddler=\"$:/plugins/BTC/tiddly-touch/config\" $field=\"hide-controls\" $value=\"no\"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-red}}\n</$button>\n</$reveal>\n</$reveal>\n</$reveal>",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/show-hide-titles-tags-controls",
"tags": "$:/tags/LeftBar $:/tags/Macro",
"modified": "20180119113438872",
"description": "hide titles, tags and controls of tiddlers with a state-cycling button",
"created": "20180106100247999",
"caption": "{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-blue}} hide titles, tags and controls"
},
"$:/plugins/BTC/tiddly-touch/Buttons/sidebar": {
"text": "<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window\" type=\"nomatch\" text=\"yes\">\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"no\" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-right}}</$button>\n</$reveal>\n<$reveal state=\"$:/state/sidebar\" type=\"match\" text=\"no\">\n<$button set=\"$:/state/sidebar\" setTo=\"yes\" tooltip={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-left}}</$button>\n</$reveal>\n</$reveal>\n<$reveal state=\"$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window\" type=\"match\" text=\"yes\">\n<$button tooltip=\"open sidebar in new window\" aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class=\"tc-btn-invisible\">{{$:/core/images/chevron-left}}\n<$action-sendmessage $message=\"tm-open-window\" $param=\"$:/core/ui/PageTemplate/sidebar-new-window\"/></$button>\n</$reveal>\n",
"title": "$:/plugins/BTC/tiddly-touch/Buttons/sidebar",
"modified": "20180102093936338",
"created": "20180102082231778"
},
"$:/plugins/BTC/tiddly-touch/ControlPanel/Toolbars/LeftBar": {
"text": "\\define lingo-base() $:/language/TiddlerInfo/\n\n\\define config-base() $:/config/LeftBarButtons/Visibility/\n\nChoose which buttons are displayed inside the [[LeftBar|$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar]]. Drag and drop to change the ordering\n\n<$set name=\"tv-config-toolbar-icons\" value=\"yes\">\n\n<$set name=\"tv-config-toolbar-text\" value=\"yes\">\n\n<$macrocall $name=\"list-tagged-draggable\" tag=\"$:/tags/LeftBar\" itemTemplate=\"$:/core/ui/ControlPanel/Toolbars/ItemTemplate\"/>\n\n</$set>\n\n</$set>\n",
"title": "$:/plugins/BTC/tiddly-touch/ControlPanel/Toolbars/LeftBar",
"tags": "$:/tags/ControlPanel/Toolbars",
"modified": "20180102122211423",
"created": "20180102121627295",
"caption": "LeftBar"
},
"$:/plugins/BTC/tiddly-touch/lib/hammer.js": {
"text": "/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: true,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n",
"type": "application/javascript",
"tmap.id": "b6435e49-39b8-4edc-b6d6-c0e706313d6c",
"title": "$:/plugins/BTC/tiddly-touch/lib/hammer.js",
"tags": "",
"span": "12",
"revision": "0",
"module-type": "library",
"modified": "20171228183919251",
"created": "20171206112823722",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/lib/popmotion.js": {
"text": "!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,\"a\",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=48)}([function(t,e,r){\"use strict\";var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},u=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]]);return r};Object.defineProperty(e,\"__esModule\",{value:!0});var a=r(14),i=r(15),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,r={stop:function(){}},n=this.props,a=n.init,s=u(n,[\"init\"]),c=i.default(t,s,function(){e=!0,r.stop()}),f=a(c);return r=f?o({},r,f):r,t.registerParent&&t.registerParent(r),e&&r.stop(),r},e}(a.default);e.Action=s,e.default=function(t){return new s({init:t})}},function(t,e,r){\"use strict\";function n(){s||(s=!0,u.default(o))}function o(t){s=!1,l=Math.max(Math.min(t-f,c),1)*p,f=t,d.process(),v.process(),h.process(),m.process()}Object.defineProperty(e,\"__esModule\",{value:!0});var u=r(31),a=r(32),i=\"undefined\"!=typeof performance&&performance.now;e.currentTime=i?function(){return performance.now()}:function(){return(new Date).getTime()};var s=!1,c=20,f=e.currentTime(),l=0,p=1,d=a.default(n),v=a.default(n),h=a.default(n),m=a.default(n);e.onFrameStart=d.schedule,e.onFrameUpdate=v.schedule,e.onFrameRender=h.schedule,e.onFrameEnd=m.schedule,e.cancelOnFrameStart=d.cancel,e.cancelOnFrameUpdate=v.cancel,e.cancelOnFrameRender=h.cancel,e.cancelOnFrameEnd=m.cancel,e.timeSinceLastFrame=function(){return l},e.currentFrameTime=function(){return f}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=function(t){return\"number\"==typeof t};e.isPoint=function(t){return void 0!==t.x&&void 0!==t.y},e.isPoint3D=function(t){return void 0!==t.z};var o=function(t,e){return void 0===e&&(e=2),e=Math.pow(10,e),Math.round(t*e)/e},u={x:0,y:0,z:0},a=function(t,e){return Math.abs(t-e)};e.angle=function(t,r){return void 0===r&&(r=u),e.radiansToDegrees(Math.atan2(r.y-t.y,r.x-t.x))},e.degreesToRadians=function(t){return t*Math.PI/180},e.dilate=function(t,e,r){return t+(e-t)*r},e.distance=function(t,r){if(void 0===r&&(r=u),n(t)&&n(r))return a(t,r);if(e.isPoint(t)&&e.isPoint(r)){var o=a(t.x,r.x),i=a(t.y,r.y),s=e.isPoint3D(t)&&e.isPoint3D(r)?a(t.z,r.z):0;return Math.sqrt(Math.pow(o,2)+Math.pow(i,2)+Math.pow(s,2))}return 0},e.getProgressFromValue=function(t,e,r){return(r-t)/(e-t)},e.getValueFromProgress=function(t,e,r){return-r*t+r*e+t},e.pointFromAngleAndDistance=function(t,r,n){return r=e.degreesToRadians(r),{x:n*Math.cos(r)+t.x,y:n*Math.sin(r)+t.y}},e.radiansToDegrees=function(t){return 180*t/Math.PI},e.smooth=function(t,e,r,n){return void 0===n&&(n=0),o(e+r*(t-e)/Math.max(n,r))},e.speedPerFrame=function(t,e){return n(t)?t/(1e3/e):0},e.speedPerSecond=function(t,e){return e?t*(1e3/e):0},e.stepProgress=function(t,e){var r=1/(t-1),n=1-1/t,o=Math.min(e/n,1);return Math.floor(o/r)*r}},function(t,e,r){\"use strict\";function n(t){var r=t.length;return function(n){for(var o={},u=e.splitCommaDelimited(e.getValueFromFunctionString(n)),a=0;a<r;a++)o[t[a]]=void 0!==u[a]?parseFloat(u[a]):1;return o}}var o=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var u=function(t,e){return function(r){return Math.max(Math.min(r,e),t)}},a=function(t){return function(e){return\"string\"==typeof t&&-1!==e.indexOf(t)}},i=function(t){return{test:a(t),parse:parseFloat,transform:function(e){return\"\"+e+t}}},s=function(t){return function(e){return\"string\"==typeof t&&0===e.indexOf(t)}};e.getValueFromFunctionString=function(t){return t.substring(t.indexOf(\"(\")+1,t.lastIndexOf(\")\"))},e.splitCommaDelimited=function(t){return\"string\"==typeof t?t.split(/,\\s*/):[t]},e.splitColorValues=n,e.number={test:function(t){return\"number\"==typeof t},parse:parseFloat,transform:function(t){return t}},e.alpha=o({},e.number,{transform:u(0,1)}),e.degrees=i(\"deg\"),e.percent=i(\"%\"),e.px=i(\"px\"),e.scale=o({},e.number,{default:1});var c=/(-)?(\\d[\\d\\.]*)/g,f=function(t){return\"${\"+t+\"}\"};e.complex={test:function(t){var e=t.match&&t.match(c);return void 0!==e&&e.constructor===Array&&e.length>1},parse:function(t){var e={};return t.match(c).forEach(function(t,r){return e[r]=parseFloat(t)}),e},createTransformer:function(t){var e=0,r=t.replace(c,function(){return f(\"\"+e++)});return function(t){var e=r;for(var n in t)t.hasOwnProperty(n)&&(e=e.replace(f(n),t[n].toString()));return e}}};var l=u(0,255);e.rgbUnit=o({},e.number,{transform:function(t){return Math.round(l(t))}});var p=function(t){var e=t.red,r=t.green,n=t.blue,o=t.alpha;return\"rgba(\"+e+\", \"+r+\", \"+n+\", \"+(void 0===o?1:o)+\")\"};e.rgba={test:s(\"rgb\"),parse:n([\"red\",\"green\",\"blue\",\"alpha\"]),transform:function(t){var r=t.red,n=t.green,o=t.blue,u=t.alpha;return p({red:e.rgbUnit.transform(r),green:e.rgbUnit.transform(n),blue:e.rgbUnit.transform(o),alpha:u})}};var d=function(t){var e=t.hue,r=t.saturation,n=t.lightness,o=t.alpha;return\"hsla(\"+e+\", \"+r+\", \"+n+\", \"+(void 0===o?1:o)+\")\"};e.hsla={test:s(\"hsl\"),parse:n([\"hue\",\"saturation\",\"lightness\",\"alpha\"]),transform:function(t){var r=t.hue,n=t.saturation,o=t.lightness,u=t.alpha;return d({hue:Math.round(r),saturation:e.percent.transform(n),lightness:e.percent.transform(o),alpha:u})}},e.hex=o({},e.rgba,{test:s(\"#\"),parse:function(t){var e,r,n;return t.length>4?(e=t.substr(1,2),r=t.substr(3,2),n=t.substr(5,2)):(e=t.substr(1,1),r=t.substr(2,1),n=t.substr(3,1),e+=e,r+=r,n+=n),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:1}}});var v=function(t){return void 0!==t.red},h=function(t){return void 0!==t.hue};e.color={test:function(t){return e.rgba.test(t)||e.hsla.test(t)||e.hex.test(t)},parse:function(t){return e.rgba.test(t)?e.rgba.parse(t):e.hsla.test(t)?e.hsla.parse(t):e.hex.test(t)?e.hex.parse(t):t},transform:function(t){return v(t)?e.rgba.transform(t):h(t)?e.hsla.transform(t):t}}},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(1),u=r(3),a=r(2),i=function(t){return t};e.appendUnit=function(t){return function(e){return\"\"+e+t}},e.applyOffset=function(t,e){var r=!0;void 0===e&&(e=t,r=!1);var n=function(e){return e-t},o=function(t){return t+e};return function(u){return r?o(n(u)):(t=u,r=!0,e)}};var s=function(t,e,r){var n=t*t,o=e*e;return Math.sqrt(r*(o-n)+n)};e.blendColor=function(t,e){var r=\"string\"==typeof t?u.color.parse(t):t,o=\"string\"==typeof e?u.color.parse(e):e,i=n({},r),c=void 0!==t.hue||\"string\"==typeof t&&u.hsla.test(t)?a.getValueFromProgress:s;return function(t){i=n({},i);for(var e in i)\"alpha\"!==e&&i.hasOwnProperty(e)&&(i[e]=c(r[e],o[e],t));return i.alpha=a.getValueFromProgress(r.alpha,o.alpha,t),i}},e.clamp=function(t,e){return function(r){return Math.min(Math.max(r,t),e)}};var c=function(t,e){return function(r){return e(t(r))}};e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(c)},e.interpolate=function(t,e,r){var n=t.length,o=n-1;return t[0]>t[o]&&(t.reverse(),e.reverse()),function(u){if(u<=t[0])return e[0];if(u>=t[o])return e[o];for(var i=1;i<n&&!(t[i]>u||i===o);i++);var s=a.getProgressFromValue(t[i-1],t[i],u),c=r?r[i-1](s):s;return a.getValueFromProgress(e[i-1],e[i],c)}},e.generateNonIntegratedSpring=function(t){return void 0===t&&(t=i),function(e,r){return function(n){var o=r-n,u=-e*(0-t(Math.abs(o)));return o<=0?r+u:r-u}}},e.linearSpring=e.generateNonIntegratedSpring(),e.nonlinearSpring=e.generateNonIntegratedSpring(Math.sqrt),e.wrap=function(t,e){return function(r){var n=e-t;return((r-t)%n+n)%n+t}},e.smooth=function(t){void 0===t&&(t=50);var e=0,r=0;return function(n){var u=o.currentFrameTime(),i=u!==r?u-r:0,s=i?a.smooth(n,e,i,t):e;return r=u,e=s,s}},e.snap=function(t){if(\"number\"==typeof t)return function(e){return Math.round(e/t)*t};var e=0,r=t.length;return function(n){var o=Math.abs(t[0]-n);for(e=1;e<r;e++){var u=t[e],a=Math.abs(u-n);if(0===a)return u;if(a>o)return t[e-1];if(e===r-1)return u;o=a}}},e.steps=function(t,e,r){return void 0===e&&(e=0),void 0===r&&(r=1),function(n){var o=a.getProgressFromValue(e,r,n);return a.getValueFromProgress(e,r,a.stepProgress(t,o))}},e.transformMap=function(t){return function(e){var r=n({},e);for(var o in t)if(t.hasOwnProperty(o)){var u=t[o];r[o]=u(e[o])}return r}}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(0),u=function(){return o.default(function(t){var e=t.update,r=!0,o=n.currentTime(),u=function(){r&&(e(n.currentFrameTime()-o),n.onFrameUpdate(u))};return n.onFrameUpdate(u),{stop:function(){return r=!1}}})};e.default=u},function(t,e,r){\"use strict\";function n(t,e,r,n){var l=f?new Float32Array(s):new Array(s),p=!1,d=function(e,n,o){var u,s,c=0;do{s=n+(o-n)/2,u=h(s,t,r)-e,u>0?o=s:n=s}while(Math.abs(u)>a&&++c<i);return s},m=function(e,n){for(var u,a=0,i=0;a<o;++a){if(0===(i=v(n,t,r)))return n;u=h(n,t,r)-e,n-=u/i}return n},y=function(){for(var e=0;e<s;++e)l[e]=h(e*c,t,r)},g=function(e){for(var n=0,o=1,a=s-1,i=0,f=0,p=0;o!=a&&l[o]<=e;++o)n+=c;return--o,i=(e-l[o])/(l[o+1]-l[o]),f=n+i*c,p=v(f,t,r),p>=u?m(e,f):0===p?f:d(e,n,n+c)},b=function(){p=!0,t==e&&r==n||y()};return function(o){return p||b(),t===e&&r===n?o:0===o?0:1===o?1:h(g(o),e,n)}}Object.defineProperty(e,\"__esModule\",{value:!0});e.createReversedEasing=function(t){return function(e){return 1-t(1-e)}},e.createMirroredEasing=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},e.linear=function(t){return t},e.createExpoIn=function(t){return function(e){return Math.pow(e,t)}},e.easeIn=e.createExpoIn(2),e.easeOut=e.createReversedEasing(e.easeIn),e.easeInOut=e.createMirroredEasing(e.easeIn),e.circIn=function(t){return 1-Math.sin(Math.acos(t))},e.circOut=e.createReversedEasing(e.circIn),e.circInOut=e.createMirroredEasing(e.circOut),e.createBackIn=function(t){return function(e){return e*e*((t+1)*e-t)}},e.backIn=e.createBackIn(1.525),e.backOut=e.createReversedEasing(e.backIn),e.backInOut=e.createMirroredEasing(e.backIn),e.createAnticipateEasing=function(t){var r=e.createBackIn(t);return function(t){return(t*=2)<1?.5*r(t):.5*(2-Math.pow(2,-10*(t-1)))}},e.anticipate=e.createAnticipateEasing(1.525);var o=8,u=.001,a=1e-7,i=10,s=11,c=1/(s-1),f=\"undefined\"!=typeof Float32Array,l=function(t,e){return 1-3*e+3*t},p=function(t,e){return 3*e-6*t},d=function(t){return 3*t},v=function(t,e,r){return 3*l(e,r)*t*t+2*p(e,r)*t+d(e)},h=function(t,e,r){return((l(e,r)*t+p(e,r))*t+d(e))*t};e.cubicBezier=n},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(3),u=r(10),a=r(8),i=r(4),s=o.color.test,c=function(t,e){return\"string\"==typeof e.from&&s(e.from)&&\"string\"==typeof e.to&&s(e.to)?t(n({},e,{from:0,to:1})).pipe(i.blendColor(e.from,e.to),o.color.transform):t(e)},f=function(t){var e=Object.keys(t);return{getVectorKeys:function(r){return e.reduce(function(e,n){return void 0===r[n]||t[n](r[n])||e.push(n),e},[])},test:function(r){return r&&e.reduce(function(e,n){return e||void 0!==r[n]&&!t[n](r[n])},!1)}}},l=function(t){return function(e,r){return e[r]=e[r][t],e}},p=function(t,e,r){var o=r[0],u=e[o].map(function(o,u){return c(t,r.reduce(l(u),n({},e)))});return a.default.apply(void 0,u)},d=function(t){return function(e,r){return e[r]=e[r][t],e}},v=function(t,e,r){var o=r[0],a=Object.keys(e[o]).reduce(function(o,u){return o[u]=c(t,r.reduce(d(u),n({},e))),o},{});return u.default(a)},h=function(t,e){return c(t,e)},m=function(t,e){var r=f(e),n=r.test,o=r.getVectorKeys;return function(e){if(!n(e))return t(e);var r=o(e),u=r[0],a=e[u];return Array.isArray(a)?p(t,e,r):\"string\"==typeof a&&s(a)?h(t,e):v(t,e,r)}};e.default=m},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(17),o=n.default({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.map(function(t,n){if(t[e])return Array.isArray(r[0])?t[e](r[0][n]):t[e].apply(t,r)})}},setProp:function(t,e,r){return t[e]=r},startActions:function(t,e){return t.map(function(t,r){return e(t,r)})}});e.default=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=[\"\",\"X\",\"Y\",\"Z\"],o=[\"translate\",\"scale\",\"rotate\",\"skew\",\"transformPerspective\"],u=o.reduce(function(t,e){return n.reduce(function(t,r){return t.push(e+r),t},t)},[\"x\",\"y\",\"z\"]),a=u.reduce(function(t,e){return t[e]=!0,t},{});e.isTransformProp=function(t){return!0===a[t]},e.sortTransformProps=function(t,e){return u.indexOf(t)-u.indexOf(e)}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(17),o=n.default({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return Object.keys(t).reduce(function(n,o){return t[o][e]&&(r[0]&&void 0!==r[0][o]?n[o]=t[o][e](r[0][o]):n[o]=(u=t[o])[e].apply(u,r)),n;var u},{})}},setProp:function(t,e,r){return t[e]=r},startActions:function(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}});e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0),o=function(t,e,r){return n.default(function(n){var o=n.update,u=e.split(\" \").map(function(e){return t.addEventListener(e,o,r),e});return{stop:function(){return u.forEach(function(e){return t.removeEventListener(e,o)})}}})};e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=function(t){var e=t.onRead,r=t.onRender,o=t.aliasMap,u=void 0===o?{}:o,a=t.useCache,i=void 0===a||a;return function(t){var o={},a=[],s=!1,c=function(t,e){var r=u[t]||t,i=o[r];o[r]=e,o[r]!==i&&(s=!0,-1===a.indexOf(r)&&a.push(r)),s&&n.onFrameRender(f)},f=function(){r(o,t,a),s=!1,a.length=0};return{get:function(r){var n=u[r]||r;return n?i&&void 0!==o[n]?o[n]:e(n,t):o},set:function(t,e){if(\"string\"==typeof t){if(void 0===e)return function(e){return c(t,e)};c(t,e)}else for(var r in t)t.hasOwnProperty(r)&&c(r,t[r]);return this},render:function(t){return void 0===t&&(t=!1),(t||s)&&f(),this}}}};e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=/([a-z])([A-Z])/g;e.camelToDash=function(t){return t.replace(n,\"$1-$2\").toLowerCase()},e.setDomAttrs=function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(4),u=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(n({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=1===t.length?t[0]:o.pipe.apply(void 0,t);return this.applyMiddleware(function(t){return function(e){return t(r(e))}})},t.prototype.while=function(t){return this.applyMiddleware(function(e,r){return function(n){return t(n)?e(n):r()}})},t.prototype.filter=function(t){return this.applyMiddleware(function(e,r){return function(r){return t(r)&&e(r)}})},t}();e.default=u},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=function(){function t(t,e){var r=t.middleware,n=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=n,e.update&&r&&r.length&&r.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}return t}();e.Observer=n,e.default=function(t,e,r){var o=e.middleware;return\"function\"==typeof t?new n({middleware:o,onComplete:r},{update:t}):new n({middleware:o,onComplete:r},t)}},function(t,e,r){\"use strict\";var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(14),u=r(15),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.subscribers=[],e}return n(e,t),e.prototype.complete=function(){this.subscribers.forEach(function(t){return t.complete()})},e.prototype.error=function(t){this.subscribers.forEach(function(e){return e.error(t)})},e.prototype.update=function(t){for(var e=0;e<this.subscribers.length;e++)this.subscribers[e].update(t)},e.prototype.subscribe=function(t){var e=this,r=u.default(t,this.props);return this.subscribers.push(r),{unsubscribe:function(){var t=e.subscribers.indexOf(r);-1!==t&&e.subscribers.splice(t,1)}}},e.prototype.stop=function(){this.parent&&this.parent.stop()},e.prototype.registerParent=function(t){this.stop(),this.parent=t},e}(o.default);e.BaseMulticast=a},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(0),u=function(t){var e=t.getCount,r=t.getFirst,u=t.getOutput,a=t.mapApi,i=t.setProp,s=t.startActions;return function(t){return o.default(function(o){var c=o.update,f=o.complete,l=o.error,p=e(t),d=u(),v=function(){return c(d)},h=0,m=s(t,function(t,e){return t.start({complete:function(){++h===p&&n.onFrameUpdate(f)},error:l,update:function(t){i(d,e,t),n.onFrameUpdate(v,!0)}})});return Object.keys(r(m)).reduce(function(t,e){return t[e]=a(m,e),t},{})})}};e.default=u},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},o=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]]);return r};Object.defineProperty(e,\"__esModule\",{value:!0});var u=r(2),a=r(6),i=r(4),s=r(19),c=r(20),f=i.clamp(0,1),l=function(t,e){return t.map(function(){return e||a.easeOut}).splice(0,t.length-1)},p=function(t){var e=t.length;return t.map(function(t,r){return 0!==r?r/(e-1):0})},d=function(t,e,r){var n=t.length,o=n-1,a=o-1,i=e.map(function(t){return t.start(r)});return function(e){e<=t[0]&&i[0].seek(0),e>=t[o]&&i[a].seek(1);for(var r=1;r<n&&!(t[r]>e||r===o);r++);var s=u.getProgressFromValue(t[r-1],t[r],e);i[r-1].seek(f(s))}},v=function(t){var e=t.easings,r=t.ease,u=void 0===r?a.linear:r,i=t.times,f=t.values,v=o(t,[\"easings\",\"ease\",\"times\",\"values\"]);e=Array.isArray(e)?e:l(f,e),i=i||p(f);var h=e.map(function(t,e){return c.default({from:f[e],to:f[e+1],ease:t})});return s.default(n({},v,{ease:u})).applyMiddleware(function(t){return d(i,h,t)})};e.default=v},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(0),u=r(2),a=r(6),i=r(4),s=r(5),c=r(20),f=i.clamp(0,1),l=function(t){return void 0===t&&(t={}),o.default(function(e){var r,o=e.update,l=e.complete,p=t.duration,d=void 0===p?300:p,v=t.ease,h=void 0===v?a.easeOut:v,m=t.flip,y=void 0===m?0:m,g=t.loop,b=void 0===g?0:g,O=t.yoyo,_=void 0===O?0:O,P=t.from,M=void 0===P?0:P,w=t.to,j=void 0===w?1:w,x=t.elapsed,F=void 0===x?0:x,A=t.playDirection,S=void 0===A?1:A,k=t.flipCount,T=void 0===k?0:k,C=t.yoyoCount,V=void 0===C?0:C,E=t.loopCount,I=void 0===E?0:E,D=c.default({from:M,to:j,ease:h}).start(o),Y=0,X=!1,U=function(){return S*=-1},L=function(){var t=1===S?X&&F>=d:X&&F<=0;if(!t)return!1;if(t&&!b&&!y&&!_)return!0;var e=!1;return b&&I<b?(F=0,I++,e=!0):y&&T<y?(F=d-F,r=[j,M],M=r[0],j=r[1],D=c.default({from:M,to:j,ease:h}).start(o),T++,e=!0):_&&V<_&&(U(),V++,e=!0),!e;var r},R=function(){Y=f(u.getProgressFromValue(0,d,F)),D.seek(Y)},B=function(){X=!0,r=s.default().start(function(){F+=n.timeSinceLastFrame()*S,R(),L()&&l&&(r.stop(),n.onFrameUpdate(l,!0))})},q=function(){X=!1,r&&r.stop()};return B(),{isActive:function(){return X},getElapsed:function(){return i.clamp(0,d)(F)},getProgress:function(){return Y},stop:function(){q()},pause:function(){return q(),this},resume:function(){return B(),this},seek:function(t){return F=u.getValueFromProgress(0,d,t),n.onFrameUpdate(R,!0),this},reverse:function(){return U(),this}}})};e.default=l},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(3),o=r(0),u=r(7),a=r(2),i=r(6),s=function(t){var e=t.from,r=void 0===e?0:e,n=t.to,u=void 0===n?1:n,s=t.ease,c=void 0===s?i.linear:s;return o.default(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(c,function(t){return a.getValueFromProgress(r,u,t)})};e.default=u.default(s,{ease:function(t){return\"function\"==typeof t},from:n.number.test,to:n.number.test})},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(0),u=r(2),a=r(11),i=r(22),s=[i.defaultPointerPos()],c=!1;if(\"undefined\"!=typeof document){var f=function(t){var e=t.touches;c=!0;var r=e.length;s.length=0;for(var n=0;n<r;n++){var o=e[n];s.push(i.eventToPoint(o))}};a.default(document,\"touchstart touchmove\",!0).start(f)}var l=function(t){var e=void 0===t?{}:t,r=e.preventDefault,i=void 0===r||r,f=e.scale,l=void 0===f?1:f,p=e.rotate,d=void 0===p?0:p;return o.default(function(t){var e=t.update,r={touches:s,scale:l,rotate:d},o=0,f=0,p=s.length>1;if(p){var v=s[0],h=s[1];o=u.distance(v,h),f=u.angle(v,h)}var m=function(){if(p){var t=s[0],n=s[1],a=u.distance(t,n),i=u.angle(t,n);r.scale=l*(a/o),r.rotate=d+(i-f)}e(r)},y=function(t){(i||t.touches.length>1)&&t.preventDefault(),n.onFrameUpdate(m)},g=a.default(document,\"touchmove\",{passive:!i}).start(y);return c&&n.onFrameUpdate(m),{stop:function(){n.cancelOnFrameUpdate(m),g.stop()}}})};e.default=l,e.getIsTouchDevice=function(){return c}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0}),e.defaultPointerPos=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},e.eventToPoint=function(t,r){return void 0===r&&(r=e.defaultPointerPos()),r.clientX=r.x=t.clientX,r.clientY=r.y=t.clientY,r.pageX=t.pageX,r.pageY=t.pageY,r}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(0),u=r(11),a=r(22),i=a.defaultPointerPos(),s=!1;if(\"undefined\"!=typeof document){var c=function(t){s=!0,a.eventToPoint(t,i)};u.default(document,\"mousedown mousemove\",!0).start(c)}var f=function(t){var e=(void 0===t?{}:t).preventDefault,r=void 0===e||e;return o.default(function(t){var e=t.update,o=function(){return e(i)},a=function(t){r&&t.preventDefault(),n.onFrameUpdate(o)},c=u.default(document,\"mousemove\").start(a);return s&&n.onFrameUpdate(o),{stop:function(){n.cancelOnFrameUpdate(o),c.stop()}}})};e.default=f},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0),o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.default(function(e){var r,n=e.update,o=e.complete,u=0,a=function(){r=t[u].start({complete:function(){u++,u>=t.length?o():a()},update:n})};return a(),{stop:function(){return r&&r.stop()}}})};e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0),o=function(t){return n.default(function(e){var r=e.complete,n=setTimeout(r,t);return{stop:function(){return clearTimeout(n)}}})};e.default=o},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(12),u=r(27),a=r(45),i=r(9),s=r(28),c=o.default({onRead:function(t,e){var r=e.element,n=s.default(t);if(i.isTransformProp(t))return n?n.default||0:0;var o=window.getComputedStyle(r,null).getPropertyValue(u.default(t))||0;return n&&n.parse?n.parse(o):o},onRender:function(t,e,r){var n=e.element,o=e.enableHardwareAcceleration;a.default(n,t,r,o)},aliasMap:{x:\"translateX\",y:\"translateY\",z:\"translateZ\",originX:\"transform-origin-x\",originY:\"transform-origin-y\"}});e.default=function(t,e){return c(n({element:t,enableHardwareAcceleration:!0},e))}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n,o=r(13),u={},a={},i=[\"Webkit\",\"Moz\",\"O\",\"ms\",\"\"],s=i.length,c=function(t){n=n||document.createElement(\"div\");for(var e=0;e<s;e++){var r=i[e],c=\"\"===r,f=c?t:r+t.charAt(0).toUpperCase()+t.slice(1);f in n.style&&(u[t]=f,a[t]=(c?\"\":\"-\")+o.camelToDash(f))}};e.default=function(t,e){void 0===e&&(e=!1);var r=e?a:u;return r[t]||c(t),r[t]}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(3),o={color:n.color,backgroundColor:n.color,outlineColor:n.color,fill:n.color,stroke:n.color,borderColor:n.color,borderTopColor:n.color,borderRightColor:n.color,borderBottomColor:n.color,borderLeftColor:n.color,borderRadius:n.px,width:n.px,height:n.px,top:n.px,left:n.px,bottom:n.px,right:n.px,rotate:n.degrees,rotateX:n.degrees,rotateY:n.degrees,rotateZ:n.degrees,scale:n.scale,scaleX:n.scale,scaleY:n.scale,scaleZ:n.scale,skewX:n.degrees,skewY:n.degrees,distance:n.px,translateX:n.px,translateY:n.px,translateZ:n.px,perspective:n.px,opacity:n.alpha};e.default=function(t){return o[t]}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(9),o=r(12),u=r(13),a=r(46),i=r(47),s=o.default({onRead:function(t,e){var r=e.element;if(n.isTransformProp(t)){var o=i.default(t);return o?o.default:0}return r.getAttribute(t)},onRender:function(t,e,r){var n=e.dimensions,o=e.element,i=e.isPath,s=e.pathLength;u.setDomAttrs(o,a.default(t,n,i,s))},aliasMap:{x:\"translateX\",y:\"translateY\",background:\"fill\"}});e.default=function(t){var e=t.getBBox(),r=e.x,n=e.y,o=e.width,u=e.height,a={element:t,dimensions:{x:r,y:n,width:o,height:u},isPath:!1};return\"path\"===t.tagName&&(a.isPath=!0,a.pathLength=t.getTotalLength()),s(a)}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0);e.action=n.default;var o=r(33);e.multicast=o.default;var u=r(34);e.value=u.default;var a=r(35);e.decay=a.default;var i=r(5);e.everyFrame=i.default;var s=r(18);e.keyframes=s.default;var c=r(36);e.physics=c.default;var f=r(37);e.spring=f.default;var l=r(38);e.timeline=l.default;var p=r(19);e.tween=p.default;var d=r(11);e.listen=d.default;var v=r(21);e.multitouch=v.default;var h=r(39);e.pointer=h.default;var m=r(23);e.mouse=m.default;var y=r(24);e.chain=y.default;var g=r(10);e.composite=g.default;var b=r(40);e.crossfade=b.default;var O=r(25);e.delay=O.default;var _=r(41);e.merge=_.default;var P=r(8);e.parallel=P.default;var M=r(42);e.schedule=M.default;var w=r(43);e.stagger=w.default;var j=r(2);e.calc=j;var x=r(6);e.easing=x;var F=r(4);e.transform=F;var A=r(44);e.styler=A.default;var S=r(26);e.css=S.default;var k=r(29);e.svg=k.default;var T=r(3);e.valueTypes=T},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n,o=!(\"undefined\"==typeof window||!window.requestAnimationFrame);if(o)n=function(t){return window.requestAnimationFrame(t)};else{var u=0;n=function(t){var e=(new Date).getTime(),r=Math.max(0,16.7-(e-u));u=e+r,setTimeout(function(){return t(u)},r)}}e.default=n},function(t,e,r){\"use strict\";function n(t){var e=[],r=[],n=0,o=!1,u=0;return{cancel:function(t){var e=r.indexOf(t);-1!==e&&r.splice(e,1)},process:function(){for(o=!0,t=[r,e],e=t[0],r=t[1],r.length=0,n=e.length,u=0;u<n;u++)e[u]();o=!1;var t},schedule:function(u,a){void 0===a&&(a=!1),t();var i=a&&o,s=i?e:r;-1===s.indexOf(u)&&(s.push(u),i&&(n=e.length))}}}Object.defineProperty(e,\"__esModule\",{value:!0}),e.default=n},function(t,e,r){\"use strict\";var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(16),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.create=function(t){return new e(t)},e}(o.BaseMulticast);e.Multicast=u,e.default=function(){return new u}},function(t,e,r){\"use strict\";var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(1),u=r(2),a=r(16),i=function(t){return Array.isArray(t)},s=function(t){var e=typeof t;return\"string\"===e||\"number\"===e},c=function(t){function e(e){var r=t.call(this,e)||this;return r.prev=r.current=e.value||0,s(r.current)?(r.updateCurrent=function(t){return r.current=t},r.getVelocityOfCurrent=function(){return r.getSingleVelocity(r.current,r.prev)}):i(r.current)?(r.updateCurrent=function(t){return r.current=t.slice()},r.getVelocityOfCurrent=function(){return r.getListVelocity()}):(r.updateCurrent=function(t){r.current={};for(var e in t)t.hasOwnProperty(e)&&(r.current[e]=t[e])},r.getVelocityOfCurrent=function(){return r.getMapVelocity()}),e.initialSubscription&&r.subscribe(e.initialSubscription),r}return n(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.getVelocityOfCurrent()},e.prototype.update=function(e){t.prototype.update.call(this,e),this.prev=this.current,this.updateCurrent(e),this.timeDelta=o.timeSinceLastFrame()},e.prototype.subscribe=function(e){var r=t.prototype.subscribe.call(this,e);return this.update(this.current),r},e.prototype.getSingleVelocity=function(t,e){return\"number\"==typeof t&&\"number\"==typeof e?u.speedPerSecond(t-e,this.timeDelta):0},e.prototype.getListVelocity=function(){var t=this;return this.current.map(function(e,r){return t.getSingleVelocity(e,t.prev[r])})},e.prototype.getMapVelocity=function(){var t={};for(var e in this.current)this.current.hasOwnProperty(e)&&(t[e]=this.getSingleVelocity(this.current[e],this.prev[e]));return t},e}(a.BaseMulticast);e.ValueReaction=c,e.default=function(t,e){return new c({value:t,initialSubscription:e})}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(3),u=r(0),a=r(7),i=r(5),s=function(t){return void 0===t&&(t={}),u.default(function(e){var r=e.complete,o=e.update,u=t.velocity,a=void 0===u?0:u,s=t.from,c=void 0===s?0:s,f=t.power,l=void 0===f?.8:f,p=t.timeConstant,d=void 0===p?350:p,v=t.restDelta,h=void 0===v?.5:v,m=t.modifyTarget,y=0,g=l*a,b=Math.round(c+g),O=void 0===m?b:m(b),_=i.default().start(function(){y+=n.timeSinceLastFrame();var t=-g*Math.exp(-y/d),e=t>h||t<-h;o(e?O+t:O),e||(_.stop(),r())});return{stop:function(){return _.stop()}}})};e.default=a.default(s,{from:o.number.test,modifyTarget:function(t){return\"function\"==typeof t},velocity:o.number.test})},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(3),u=r(0),a=r(7),i=r(2),s=r(5),c=function(t){return void 0===t&&(t={}),u.default(function(e){var r=e.complete,o=e.update,u=t.acceleration,a=void 0===u?0:u,c=t.friction,f=void 0===c?0:c,l=t.velocity,p=void 0===l?0:l,d=t.springStrength,v=t.to,h=t.restSpeed,m=void 0===h?.001:h,y=t.from,g=void 0===y?0:y,b=g,O=s.default().start(function(){var t=n.timeSinceLastFrame();if(a&&(p+=i.speedPerFrame(a,t)),f&&(p*=Math.pow(1-f,t/100)),void 0!==d&&void 0!==v){p+=(v-b)*i.speedPerFrame(d,t)}b+=i.speedPerFrame(p,t),o(b),!1!==m&&(!p||Math.abs(p)<=m)&&(O.stop(),r())});return{set:function(t){return b=t,this},setAcceleration:function(t){return a=t,this},setFriction:function(t){return f=t,this},setSpringStrength:function(t){return d=t,this},setSpringTarget:function(t){return v=t,this},setVelocity:function(t){return p=t,this},stop:function(){return O.stop()}}})};e.default=a.default(c,{acceleration:o.number.test,friction:o.number.test,velocity:o.number.test,from:o.number.test,to:o.number.test,springStrength:o.number.test})},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(1),o=r(3),u=r(0),a=r(7),i=r(2),s=r(5),c=function(t){return void 0===t&&(t={}),u.default(function(e){var r=e.update,o=e.complete,u=t.velocity,a=void 0===u?0:u,c=t.from,f=void 0===c?0:c,l=t.to,p=void 0===l?0:l,d=t.stiffness,v=void 0===d?100:d,h=t.damping,m=void 0===h?10:h,y=t.mass,g=void 0===y?1:y,b=t.restSpeed,O=void 0===b?.01:b,_=t.restDelta,P=void 0===_?.01:_,M=a?-a/1e3:0,w=0,j=p-f,x=f,F=x,A=s.default().start(function(){var t=n.timeSinceLastFrame();w+=t;var e=m/(2*Math.sqrt(v*g)),u=Math.sqrt(v/g)/1e3;if(F=x,e<1){var s=Math.exp(-e*u*w),c=u*Math.sqrt(1-e*e);x=p-s*((M+e*u*j)/c*Math.sin(c*w)+j*Math.cos(c*w))}else{var s=Math.exp(-u*w);x=p-s*(j+(M+u*j)*w)}a=i.speedPerSecond(x-F,t);var f=Math.abs(a)<=O,l=Math.abs(p-x)<=P;f&&l?(x=p,r(x),A.stop(),o()):r(x)});return{stop:function(){return A.stop()}}})};e.default=a.default(c,{from:o.number.test,to:o.number.test,stiffness:o.number.test,damping:o.number.test,mass:o.number.test,velocity:o.number.test})},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(18),u=r(6),a=r(10),i=function(t){var e=[],r=t[t.length-1],n=\"number\"==typeof r,o=n?r:0,u=n?t.slice(0,-1):t,a=u.length,i=0;return u.forEach(function(t,r){if(e.push(t),r!==a-1){var n=t.duration||300;i+=o,e.push(\"-\"+(n-i))}}),e},s=function(t,e){return Array.isArray(e)?t.push.apply(t,i(e)):t.push(e),t},c=function(t,e,r){var n=t.duration,o=t.easings,a=t.times,i=t.values,s=i.length,c=a[s-1],f=0===e.at?0:e.at/n,l=(e.at+e.duration)/n;if(0===r)i.push(e.from),a.push(f);else if(c!==f){void 0!==e.from&&(i.push(i[s-1]),a.push(f),o.push(u.linear));var p=void 0!==e.from?e.from:i[s-1];i.push(p),a.push(f),o.push(u.linear)}else void 0!==e.from&&(i.push(e.from),a.push(f),o.push(u.linear));return i.push(e.to),a.push(l),o.push(e.ease||u.easeInOut),t},f=function(t,e){var r=void 0===e?{}:e,u=r.duration,i=r.elapsed,f=r.ease,l=r.loop,p=r.flip,d=r.yoyo,v=0,h=0,m=t.reduce(s,[]),y=[];m.forEach(function(t){if(\"string\"==typeof t)v+=parseFloat(t);else if(\"number\"==typeof t)v=t;else{var e=n({},t,{at:v});e.duration=void 0===e.duration?300:e.duration,y.push(e),v+=e.duration,h=Math.max(h,e.at+e.duration)}});for(var g={},b=y.length,O=0;O<b;O++){var _=y[O],P=_.track;if(void 0===P)throw new Error(\"No track defined\");g.hasOwnProperty(P)||(g[P]=[]),g[P].push(_)}var M={};for(var w in g)if(g.hasOwnProperty(w)){var j=g[w].reduce(c,{duration:h,easings:[],times:[],values:[]});M[w]=o.default(n({},j,{duration:u||h,ease:f,elapsed:i,loop:l,yoyo:d,flip:p}))}return a.default(M)};e.default=f},function(t,e,r){\"use strict\";var n=this&&this.__rest||function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&(r[n[o]]=t[n[o]]);return r};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(4),u=r(21),a=r(23),i=function(t){return t[0]},s=function(t){return void 0===t&&(t={}),u.getIsTouchDevice()?u.default(t).pipe(function(t){return t.touches},i):a.default(t)};e.default=function(t){void 0===t&&(t={});var e=t.x,r=t.y,u=n(t,[\"x\",\"y\"]);if(void 0!==e||void 0!==r){var a=o.applyOffset(e||0),i=o.applyOffset(r||0),c={x:0,y:0};return s(u).pipe(function(t){return c.x=a(t.x),c.y=i(t.y),c})}return s(u)}},function(t,e,r){\"use strict\";var n=this&&this.__assign||Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(0),u=r(2),a=r(8),i=function(t,e){return o.default(function(r){var o=0,i=a.default(t,e).start(n({},r,{update:function(t){var e=t[0],n=t[1];r.update(u.getValueFromProgress(e,n,o))}}));return{setBalance:function(t){return o=t},stop:function(){return i.stop()}}})};e.default=i},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0),o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.default(function(e){var r=t.map(function(t){return t.start(e)});return{stop:function(){return r.forEach(function(t){return t.stop()})}}})};e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(0),o=function(t,e){return n.default(function(r){var n,o=r.update,u=r.complete,a=t.start({update:function(){return void 0!==n&&o(n)},complete:u}),i=e.start({update:function(t){return n=t},complete:u});return{stop:function(){a.stop(),i.stop()}}})};e.default=o},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(24),o=r(25),u=r(8),a=function(t,e){var r=\"number\"==typeof e,a=t.map(function(t,u){var a=r?e*u:e(u);return n.default(o.default(a),t)});return u.default.apply(void 0,a)};e.default=a},function(t,e,r){\"use strict\";function n(t){var e=\"string\"==typeof t?document.querySelector(t):t;return e instanceof SVGGraphicsElement?a.default(e):o.default(e)}Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(26),u=r(12);e.createStyler=u.default;var a=r(29);e.default=n},function(t,e,r){\"use strict\";function n(t,e,r,n){for(var i=\"\",s=\"\",c=!1,f=!1,l=r.length,p=0;p<l;p++){var d=r[p];if(o.isTransformProp(d)){c=!0;for(var v in e)o.isTransformProp(v)&&-1===r.indexOf(v)&&r.push(v);break}}r.sort(o.sortTransformProps);for(var h=r.length,p=0;p<h;p++){var d=r[p],m=e[d],y=a.default(d);y&&(\"number\"==typeof m||\"object\"==typeof m)&&y.transform&&(m=y.transform(m)),o.isTransformProp(d)?(s+=d+\"(\"+m+\") \",f=\"translateZ\"===d||f):i+=\";\"+u.default(d,!0)+\":\"+m}c&&(!f&&n&&(s+=\"translateZ(0)\"),i+=\";\"+u.default(\"transform\",!0)+\":\"+s),t.style.cssText+=i}Object.defineProperty(e,\"__esModule\",{value:!0});var o=r(9),u=r(27),a=r(28);e.default=n},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(13),o=r(9),u=function(t,e){return t/100*e+\"px\"},a=function(t,e,r,a){var i=!1,s=!1,c={},f=r?{pathLength:\"0\",pathSpacing:\"\"+a}:void 0,l=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,p=void 0!==t.scaleY?t.scaleY||1e-7:l||1,d=e.width*((t.originX||50)/100)+e.x,v=e.height*((t.originY||50)/100)+e.y,h=1*l*-d,m=1*p*-v,y=d/l,g=v/p,b={translate:\"translate(\"+t.translateX+\", \"+t.translateY+\") \",scale:\"translate(\"+h+\", \"+m+\") scale(\"+l+\", \"+p+\") translate(\"+y+\", \"+g+\") \",rotate:\"rotate(\"+t.rotate+\", \"+d+\", \"+v+\") \",skewX:\"skewX(\"+t.skewX+\") \",skewY:\"skewY(\"+t.skewY+\") \"};for(var O in t)if(t.hasOwnProperty(O)){var _=t[O];o.isTransformProp(O)?i=!0:!r||\"pathLength\"!==O&&\"pathSpacing\"!==O||\"number\"!=typeof _?r&&\"pathOffset\"===O?c[\"stroke-dashoffset\"]=u(-_,a):c[n.camelToDash(O)]=_:(s=!0,f[O]=u(_,a))}if(s&&(c[\"stroke-dasharray\"]=f.pathLength+\" \"+f.pathSpacing),i){c.transform=\"\";for(var O in b)if(b.hasOwnProperty(O)){var P=\"scale\"===O?\"1\":\"0\";c.transform+=b[O].replace(/undefined/g,P)}}return c};e.default=a},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(3),o={fill:n.color,stroke:n.color,scale:n.scale,scaleX:n.scale,scaleY:n.scale,opacity:n.alpha,fillOpacity:n.alpha,strokeOpacity:n.alpha};e.default=function(t){return o[t]}},function(t,e,r){\"use strict\";Object.defineProperty(e,\"__esModule\",{value:!0});var n=r(30);window.popmotion=n}]);",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/lib/popmotion.js",
"tags": "",
"module-type": "library",
"modified": "20171228183829535",
"created": "20171215091357983"
},
"$:/plugins/BTC/tiddly-touch/lib/web-animations.js": {
"text": "// Copyright 2014 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n!function(a,b){var c={},d={};!function(a,b){function c(a){if(\"number\"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill=\"none\",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction=\"normal\",this._easing=\"linear\",this._easingFunction=x}function e(){return a.isDeprecated(\"Invalid timing inputs\",\"2016-03-02\",\"TypeError exceptions will be thrown instead.\",!0)}function f(b,c,e){var f=new d;return c&&(f.fill=\"both\",f.duration=\"auto\"),\"number\"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if(\"auto\"!=b[c]){if((\"number\"==typeof f[c]||\"duration\"==c)&&(\"number\"!=typeof b[c]||isNaN(b[c])))return;if(\"fill\"==c&&-1==v.indexOf(b[c]))return;if(\"direction\"==c&&-1==w.indexOf(b[c]))return;if(\"playbackRate\"==c&&1!==b[c]&&a.isDeprecated(\"AnimationEffectTiming.playbackRate\",\"2014-11-28\",\"Use Animation.playbackRate instead.\"))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return\"number\"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i<j;){var k=(i+j)/2,l=f(a,c,k);if(Math.abs(e-l)<1e-5)return f(b,d,k);l<e?i=k:j=k}return f(b,d,k)}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return(c+=b*d)-c%d}}function k(a){C||(C=document.createElement(\"div\").style),C.animationTimingFunction=\"\",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(\"\"==b&&e())throw new TypeError(a+\" is not a valid value for easing\");return b}function l(a){if(\"linear\"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);return c?j(Number(c[1]),{start:y,middle:z,end:A}[c[2]]):B[a]||x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return G;var d=c.delay+a+c.endDelay;return b<Math.min(c.delay,d)?H:b>=Math.min(c.delay+a,d)?I:J}function p(a,b,c,d,e){switch(d){case H:return\"backwards\"==b||\"both\"==b?0:null;case J:return c-e;case I:return\"forwards\"==b||\"both\"==b?a:null;case G:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==H&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==I||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===I&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if(\"normal\"!==a&&\"reverse\"!==a){var e=b;\"alternate-reverse\"===a&&(e+=1),d=\"normal\",e!==1/0&&e%2!=0&&(d=\"reverse\")}return\"normal\"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v=\"backwards|forwards|both|none\".split(\"|\"),w=\"reverse|alternate|alternate-reverse\".split(\"|\"),x=function(a){return a};d.prototype={_setMember:function(b,c){this[\"_\"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember(\"delay\",a)},get delay(){return this._delay},set endDelay(a){this._setMember(\"endDelay\",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember(\"fill\",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError(\"iterationStart must be a non-negative number, received: \"+timing.iterationStart);this._setMember(\"iterationStart\",a)},get iterationStart(){return this._iterationStart},set duration(a){if(\"auto\"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError(\"duration must be non-negative or auto, received: \"+a);this._setMember(\"duration\",a)},get duration(){return this._duration},set direction(a){this._setMember(\"direction\",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember(\"easing\",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError(\"iterations must be non-negative, received: \"+a);this._setMember(\"iterations\",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),\"ease-in\":i(.42,0,1,1),\"ease-out\":i(0,0,.58,1),\"ease-in-out\":i(.42,0,.58,1),\"step-start\":j(1,y),\"step-middle\":j(1,z),\"step-end\":j(1,A)},C=null,D=\"\\\\s*(-?\\\\d+\\\\.?\\\\d*|-?\\\\.\\\\d+)\\\\s*\",E=new RegExp(\"cubic-bezier\\\\(\"+D+\",\"+D+\",\"+D+\",\"+D+\"\\\\)\"),F=/steps\\(\\s*(\\d+)\\s*,\\s*(start|middle|end)\\s*\\)/,G=0,H=1,I=2,J=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(c),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return\"display\"===a||0===a.lastIndexOf(\"animation\",0)||0===a.lastIndexOf(\"transition\",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in[\"easing\",\"offset\",\"composite\"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g<f;g++)e={},e.offset=\"offset\"in a?a.offset:1==f?1:g/(f-1),\"easing\"in a&&(e.easing=a.easing),\"composite\"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function g(b){function c(){var a=d.length;null==d[a-1].offset&&(d[a-1].offset=1),a>1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e<a;e++){var f=d[e].offset;if(null!=f){for(var g=1;g<e-b;g++)d[b+g].offset=c+(f-c)*g/(e-b);b=e,c=f}}}if(null==b)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||(b=f(b));for(var d=b.map(function(b){var c={};for(var d in b){var f=b[d];if(\"offset\"==d){if(null!=f){if(f=Number(f),!isFinite(f))throw new TypeError(\"Keyframe offsets must be numbers.\");if(f<0||f>1)throw new TypeError(\"Keyframe offsets must be between 0 and 1.\")}}else if(\"composite\"==d){if(\"add\"==f||\"accumulate\"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:\"NotSupportedError\",message:\"add compositing is not supported\"};if(\"replace\"!=f)throw new TypeError(\"Invalid composite mode \"+f+\".\")}else f=\"easing\"==d?a.normalizeEasing(f):\"\"+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing=\"linear\"),c}),g=!0,h=-1/0,i=0;i<d.length;i++){var j=d[i].offset;if(null!=j){if(j<h)throw new TypeError(\"Keyframes are not loosely sorted by offset. Sort or specify offsets.\");h=j}else g=!1}return d=d.filter(function(a){return a.offset>=0&&a.offset<=1}),g||c(),d}var h={background:[\"backgroundImage\",\"backgroundPosition\",\"backgroundSize\",\"backgroundRepeat\",\"backgroundAttachment\",\"backgroundOrigin\",\"backgroundClip\",\"backgroundColor\"],border:[\"borderTopColor\",\"borderTopStyle\",\"borderTopWidth\",\"borderRightColor\",\"borderRightStyle\",\"borderRightWidth\",\"borderBottomColor\",\"borderBottomStyle\",\"borderBottomWidth\",\"borderLeftColor\",\"borderLeftStyle\",\"borderLeftWidth\"],borderBottom:[\"borderBottomWidth\",\"borderBottomStyle\",\"borderBottomColor\"],borderColor:[\"borderTopColor\",\"borderRightColor\",\"borderBottomColor\",\"borderLeftColor\"],borderLeft:[\"borderLeftWidth\",\"borderLeftStyle\",\"borderLeftColor\"],borderRadius:[\"borderTopLeftRadius\",\"borderTopRightRadius\",\"borderBottomRightRadius\",\"borderBottomLeftRadius\"],borderRight:[\"borderRightWidth\",\"borderRightStyle\",\"borderRightColor\"],borderTop:[\"borderTopWidth\",\"borderTopStyle\",\"borderTopColor\"],borderWidth:[\"borderTopWidth\",\"borderRightWidth\",\"borderBottomWidth\",\"borderLeftWidth\"],flex:[\"flexGrow\",\"flexShrink\",\"flexBasis\"],font:[\"fontFamily\",\"fontSize\",\"fontStyle\",\"fontVariant\",\"fontWeight\",\"lineHeight\"],margin:[\"marginTop\",\"marginRight\",\"marginBottom\",\"marginLeft\"],outline:[\"outlineColor\",\"outlineStyle\",\"outlineWidth\"],padding:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"]},i=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\"),j={thin:\"1px\",medium:\"3px\",thick:\"5px\"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{\"xx-small\":\"60%\",\"x-small\":\"75%\",small:\"89%\",medium:\"100%\",large:\"120%\",\"x-large\":\"150%\",\"xx-large\":\"200%\"},fontWeight:{normal:\"400\",bold:\"700\"},outlineWidth:j,textShadow:{none:\"0px 0px 0px transparent\"},boxShadow:{none:\"0px 0px 0px 0px transparent\"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(c),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?\"are\":\"is\",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g<h&&(a in b||console.warn(\"Web Animations: \"+a+\" \"+f+\" deprecated and will stop working on \"+h.toDateString()+\". \"+d),b[a]=!0,1))},a.deprecated=function(b,c,d,e){var f=e?\"are\":\"is\";if(a.isDeprecated(b,c,d,e))throw new Error(b+\" \"+f+\" no longer supported. \"+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,\"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState\".split(\"|\").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if(\"offset\"!=d&&\"easing\"!=d&&\"composite\"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:\"NotSupportedError\",message:\"Partial keyframes are not supported\"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=g,i=g+1,j=f[h].offset,k=f[i].offset,l=j,m=k;0==g&&(l=-1/0,0==k&&(i=h)),g==f.length-2&&(m=1/0,1==j&&(h=i)),d.push({applyFrom:l,applyTo:m,startOffset:f[h].offset,endOffset:f[i].offset,easingFunction:a.parseEasingFunction(f[h].easing),property:e,interpolation:b.propertyInterpolation(e,f[h].value,f[i].value)})}return d.sort(function(a,b){return a.startOffset-b.startOffset}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return c>=a.applyFrom&&c<a.applyTo}).forEach(function(d){var e=c-d.startOffset,f=d.endOffset-d.startOffset,g=0==f?0:d.easingFunction(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)\"offset\"!=d&&\"easing\"!=d&&\"composite\"!=d&&b.clear(a,d)}}}(c,d),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){e(a,b,d(c[f]))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated(\"Hyphenated property names\",\"2016-03-22\",\"Use camelCase instead.\",!0)&&(g=d(c)),\"initial\"!=e&&\"initial\"!=f||(\"initial\"==e&&(e=i[g]),\"initial\"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:\"transparent\",backgroundPosition:\"0% 0%\",borderBottomColor:\"currentColor\",borderBottomLeftRadius:\"0px\",borderBottomRightRadius:\"0px\",borderBottomWidth:\"3px\",borderLeftColor:\"currentColor\",borderLeftWidth:\"3px\",borderRightColor:\"currentColor\",borderRightWidth:\"3px\",borderSpacing:\"2px\",borderTopColor:\"currentColor\",borderTopLeftRadius:\"0px\",borderTopRightRadius:\"0px\",borderTopWidth:\"3px\",bottom:\"auto\",clip:\"rect(0px, 0px, 0px, 0px)\",color:\"black\",fontSize:\"100%\",fontWeight:\"400\",height:\"auto\",left:\"auto\",letterSpacing:\"normal\",lineHeight:\"120%\",marginBottom:\"0px\",marginLeft:\"0px\",marginRight:\"0px\",marginTop:\"0px\",maxHeight:\"none\",maxWidth:\"none\",minHeight:\"0px\",minWidth:\"0px\",opacity:\"1.0\",outlineColor:\"invert\",outlineOffset:\"0px\",outlineWidth:\"3px\",paddingBottom:\"0px\",paddingLeft:\"0px\",paddingRight:\"0px\",paddingTop:\"0px\",right:\"auto\",strokeDasharray:\"none\",strokeDashoffset:\"0px\",textIndent:\"0px\",textShadow:\"0px 0px 0px transparent\",top:\"auto\",transform:\"\",verticalAlign:\"0px\",visibility:\"visible\",width:\"auto\",wordSpacing:\"normal\",zIndex:\"auto\"};b.propertyInterpolation=g}(c,d),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateIterationProgress(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return null!==(h=i(a))},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._target=c,k._totalDuration=i._totalDuration,k._id=g,k}}(c,d),function(a,b){function c(a,b){return!(!b.namespaceURI||-1==b.namespaceURI.indexOf(\"/svg\"))&&(g in a||(a[g]=/Trident|MSIE|IEMobile|Edge|Android 4/i.test(a.navigator.userAgent)),a[g])}function d(a,b,c){c.enumerable=!0,c.configurable=!0,Object.defineProperty(a,b,c)}function e(a){this._element=a,this._surrogateStyle=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"div\").style,this._style=a.style,this._length=0,this._isAnimatedProperty={},this._updateSvgTransformAttr=c(window,a),this._savedTransformAttr=null;for(var b=0;b<this._style.length;b++){var d=this._style[b];this._surrogateStyle[d]=this._style[d]}this._updateIndices()}function f(a){if(!a._webAnimationsPatchedStyle){var b=new e(a);try{d(a,\"style\",{get:function(){return b}})}catch(b){a.style._set=function(b,c){a.style[b]=c},a.style._clear=function(b){a.style[b]=\"\"}}a._webAnimationsPatchedStyle=a.style}}var g=\"_webAnimationsUpdateSvgTransformAttr\",h={cssText:1,length:1,parentRule:1},i={getPropertyCSSValue:1,getPropertyPriority:1,getPropertyValue:1,item:1,removeProperty:1,setProperty:1},j={removeProperty:1,setProperty:1};e.prototype={get cssText(){return this._surrogateStyle.cssText},set cssText(a){for(var b={},c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;this._surrogateStyle.cssText=a,this._updateIndices();for(var c=0;c<this._surrogateStyle.length;c++)b[this._surrogateStyle[c]]=!0;for(var d in b)this._isAnimatedProperty[d]||this._style.setProperty(d,this._surrogateStyle.getPropertyValue(d))},get length(){return this._surrogateStyle.length},get parentRule(){return this._style.parentRule},_updateIndices:function(){for(;this._length<this._surrogateStyle.length;)Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,get:function(a){return function(){return this._surrogateStyle[a]}}(this._length)}),this._length++;for(;this._length>this._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(b,c){this._style[b]=c,this._isAnimatedProperty[b]=!0,this._updateSvgTransformAttr&&\"transform\"==a.unprefixedPropertyName(b)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute(\"transform\")),this._element.setAttribute(\"transform\",a.transformToSvgMatrix(c)))},_clear:function(b){this._style[b]=this._surrogateStyle[b],this._updateSvgTransformAttr&&\"transform\"==a.unprefixedPropertyName(b)&&(this._savedTransformAttr?this._element.setAttribute(\"transform\",this._savedTransformAttr):this._element.removeAttribute(\"transform\"),this._savedTransformAttr=null),delete this._isAnimatedProperty[b]}};for(var k in i)e.prototype[k]=function(a,b){return function(){var c=this._surrogateStyle[a].apply(this._surrogateStyle,arguments);return b&&(this._isAnimatedProperty[arguments[0]]||this._style[a].apply(this._style,arguments),this._updateIndices()),c}}(k,k in j);for(var l in document.documentElement.style)l in h||l in i||function(a){d(e.prototype,a,{get:function(){return this._surrogateStyle[a]},set:function(b){this._surrogateStyle[a]=b,this._updateIndices(),this._isAnimatedProperty[a]||(this._style[a]=b)}})}(l);a.apply=function(b,c,d){f(b),b.style._set(a.propertyName(c),d)},a.clear=function(b,c){b._webAnimationsPatchedStyle&&b.style._clear(a.propertyName(c))}}(d),function(a){window.Element.prototype.animate=function(b,c){var d=\"\";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(d),function(a,b){function c(a,b,d){if(\"number\"==typeof a&&\"number\"==typeof b)return a*(1-d)+b*d;if(\"boolean\"==typeof a&&\"boolean\"==typeof b)return d<.5?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw\"Mismatched interpolation arguments \"+a+\":\"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(d),function(a,b){function c(a,b,c){return Math.max(Math.min(a,c),b)}function d(b,d,e){var f=a.dot(b,d);f=c(f,-1,1);var g=[];if(1===f)g=b;else for(var h=Math.acos(f),i=1*Math.sin(e*h)/Math.sqrt(1-f*f),j=0;j<4;j++)g.push(b[j]*(Math.cos(e*h)-f*i)+d[j]*i);return g}var e=function(){function a(a,b){for(var c=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],d=0;d<4;d++)for(var e=0;e<4;e++)for(var f=0;f<4;f++)c[d][e]+=b[d][f]*a[f][e];return c}function b(a){return 0==a[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]}function c(c,d,e,f,g){for(var h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],i=0;i<4;i++)h[i][3]=g[i];for(var i=0;i<3;i++)for(var j=0;j<3;j++)h[3][i]+=c[j]*h[j][i];var k=f[0],l=f[1],m=f[2],n=f[3],o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];o[0][0]=1-2*(l*l+m*m),o[0][1]=2*(k*l-m*n),o[0][2]=2*(k*m+l*n),o[1][0]=2*(k*l+m*n),o[1][1]=1-2*(k*k+m*m),o[1][2]=2*(l*m-k*n),o[2][0]=2*(k*m-l*n),o[2][1]=2*(l*m+k*n),o[2][2]=1-2*(k*k+l*l),h=a(h,o);var p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];e[2]&&(p[2][1]=e[2],h=a(h,p)),e[1]&&(p[2][1]=0,p[2][0]=e[0],h=a(h,p)),e[0]&&(p[2][0]=0,p[1][0]=e[0],h=a(h,p));for(var i=0;i<3;i++)for(var j=0;j<3;j++)h[i][j]*=d[i];return b(h)?[h[0][0],h[0][1],h[1][0],h[1][1],h[3][0],h[3][1]]:h[0].concat(h[1],h[2],h[3])}return c}();a.composeMatrix=e,a.quat=d}(d),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type=\"finish\",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id=\"\",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,\"paused\"!=this.playState&&\"idle\"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?\"idle\":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?\"pending\":this._paused?\"paused\":this._isFinished?\"finished\":\"running\"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException(\"Unable to rewind negative playback rate animation with infinite duration\",\"InvalidStateError\");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){\"function\"==typeof b&&\"finish\"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if(\"finish\"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();-1===a.indexOf(this)&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);-1!==b&&a.splice(b,1)}}}(c,d),function(a,b,c){function d(a){var b=j;j=[],a<q.currentTime&&(a=q.currentTime),q._animations.sort(e),q._animations=h(a,!0,q._animations)[0],b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c,d){p=!0,n=!1,b.timeline.currentTime=a,m=!1;var e=[],f=[],g=[],h=[];return d.forEach(function(b){b._tick(a,c),b._inEffect?(f.push(b._effect),b._markTarget()):(e.push(b._effect),b._unmarkTarget()),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;b._inTimeline=d,d?g.push(b):h.push(b)}),o.push.apply(o,e),o.push.apply(o,f),m&&requestAnimationFrame(function(){}),p=!1,[g,h]}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.applyDirtiedAnimation(d),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.applyDirtiedAnimation=function(a){if(!p){a._markTarget();var c=a._targetAnimations();c.sort(e),h(b.timeline.currentTime,!1,c.slice())[1].forEach(function(a){var b=q._animations.indexOf(a);-1!==b&&q._animations.splice(b,1)}),g()}};var o=[],p=!1,q=new f;b.timeline=q}(c,d),function(a,b){function c(a,b){for(var c=0,d=0;d<a.length;d++)c+=a[d]*b[d];return c}function d(a,b){return[a[0]*b[0]+a[4]*b[1]+a[8]*b[2]+a[12]*b[3],a[1]*b[0]+a[5]*b[1]+a[9]*b[2]+a[13]*b[3],a[2]*b[0]+a[6]*b[1]+a[10]*b[2]+a[14]*b[3],a[3]*b[0]+a[7]*b[1]+a[11]*b[2]+a[15]*b[3],a[0]*b[4]+a[4]*b[5]+a[8]*b[6]+a[12]*b[7],a[1]*b[4]+a[5]*b[5]+a[9]*b[6]+a[13]*b[7],a[2]*b[4]+a[6]*b[5]+a[10]*b[6]+a[14]*b[7],a[3]*b[4]+a[7]*b[5]+a[11]*b[6]+a[15]*b[7],a[0]*b[8]+a[4]*b[9]+a[8]*b[10]+a[12]*b[11],a[1]*b[8]+a[5]*b[9]+a[9]*b[10]+a[13]*b[11],a[2]*b[8]+a[6]*b[9]+a[10]*b[10]+a[14]*b[11],a[3]*b[8]+a[7]*b[9]+a[11]*b[10]+a[15]*b[11],a[0]*b[12]+a[4]*b[13]+a[8]*b[14]+a[12]*b[15],a[1]*b[12]+a[5]*b[13]+a[9]*b[14]+a[13]*b[15],a[2]*b[12]+a[6]*b[13]+a[10]*b[14]+a[14]*b[15],a[3]*b[12]+a[7]*b[13]+a[11]*b[14]+a[15]*b[15]]}function e(a){var b=a.rad||0;return((a.deg||0)/360+(a.grad||0)/400+(a.turn||0))*(2*Math.PI)+b}function f(a){switch(a.t){case\"rotatex\":var b=e(a.d[0]);return[1,0,0,0,0,Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1];case\"rotatey\":var b=e(a.d[0]);return[Math.cos(b),0,-Math.sin(b),0,0,1,0,0,Math.sin(b),0,Math.cos(b),0,0,0,0,1];case\"rotate\":case\"rotatez\":var b=e(a.d[0]);return[Math.cos(b),Math.sin(b),0,0,-Math.sin(b),Math.cos(b),0,0,0,0,1,0,0,0,0,1];case\"rotate3d\":var c=a.d[0],d=a.d[1],f=a.d[2],b=e(a.d[3]),g=c*c+d*d+f*f;if(0===g)c=1,d=0,f=0;else if(1!==g){var h=Math.sqrt(g);c/=h,d/=h,f/=h}var i=Math.sin(b/2),j=i*Math.cos(b/2),k=i*i;return[1-2*(d*d+f*f)*k,2*(c*d*k+f*j),2*(c*f*k-d*j),0,2*(c*d*k-f*j),1-2*(c*c+f*f)*k,2*(d*f*k+c*j),0,2*(c*f*k+d*j),2*(d*f*k-c*j),1-2*(c*c+d*d)*k,0,0,0,0,1];case\"scale\":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,1,0,0,0,0,1];case\"scalex\":return[a.d[0],0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case\"scaley\":return[1,0,0,0,0,a.d[0],0,0,0,0,1,0,0,0,0,1];case\"scalez\":return[1,0,0,0,0,1,0,0,0,0,a.d[0],0,0,0,0,1];case\"scale3d\":return[a.d[0],0,0,0,0,a.d[1],0,0,0,0,a.d[2],0,0,0,0,1];case\"skew\":var l=e(a.d[0]),m=e(a.d[1]);return[1,Math.tan(m),0,0,Math.tan(l),1,0,0,0,0,1,0,0,0,0,1];case\"skewx\":var b=e(a.d[0]);return[1,0,0,0,Math.tan(b),1,0,0,0,0,1,0,0,0,0,1];case\"skewy\":var b=e(a.d[0]);return[1,Math.tan(b),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case\"translate\":var c=a.d[0].px||0,d=a.d[1].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,0,1];case\"translatex\":var c=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,0,0,1];case\"translatey\":var d=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,d,0,1];case\"translatez\":var f=a.d[0].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,f,1];case\"translate3d\":var c=a.d[0].px||0,d=a.d[1].px||0,f=a.d[2].px||0;return[1,0,0,0,0,1,0,0,0,0,1,0,c,d,f,1];case\"perspective\":return[1,0,0,0,0,1,0,0,0,0,1,a.d[0].px?-1/a.d[0].px:0,0,0,0,1];case\"matrix\":return[a.d[0],a.d[1],0,0,a.d[2],a.d[3],0,0,0,0,1,0,a.d[4],a.d[5],0,1];case\"matrix3d\":return a.d}}function g(a){return 0===a.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:a.map(f).reduce(d)}function h(a){return[i(g(a))]}var i=function(){function a(a){return a[0][0]*a[1][1]*a[2][2]+a[1][0]*a[2][1]*a[0][2]+a[2][0]*a[0][1]*a[1][2]-a[0][2]*a[1][1]*a[2][0]-a[1][2]*a[2][1]*a[0][0]-a[2][2]*a[0][1]*a[1][0]}function b(b){for(var c=1/a(b),d=b[0][0],e=b[0][1],f=b[0][2],g=b[1][0],h=b[1][1],i=b[1][2],j=b[2][0],k=b[2][1],l=b[2][2],m=[[(h*l-i*k)*c,(f*k-e*l)*c,(e*i-f*h)*c,0],[(i*j-g*l)*c,(d*l-f*j)*c,(f*g-d*i)*c,0],[(g*k-h*j)*c,(j*e-d*k)*c,(d*h-e*g)*c,0]],n=[],o=0;o<3;o++){for(var p=0,q=0;q<3;q++)p+=b[3][q]*m[q][o];n.push(p)}return n.push(1),m.push(n),m}function d(a){return[[a[0][0],a[1][0],a[2][0],a[3][0]],[a[0][1],a[1][1],a[2][1],a[3][1]],[a[0][2],a[1][2],a[2][2],a[3][2]],[a[0][3],a[1][3],a[2][3],a[3][3]]]}function e(a,b){for(var c=[],d=0;d<4;d++){for(var e=0,f=0;f<4;f++)e+=a[f]*b[f][d];c.push(e)}return c}function f(a){var b=g(a);return[a[0]/b,a[1]/b,a[2]/b]}function g(a){return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2])}function h(a,b,c,d){return[c*a[0]+d*b[0],c*a[1]+d*b[1],c*a[2]+d*b[2]]}function i(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function j(j){var k=[j.slice(0,4),j.slice(4,8),j.slice(8,12),j.slice(12,16)];if(1!==k[3][3])return null;for(var l=[],m=0;m<4;m++)l.push(k[m].slice());for(var m=0;m<3;m++)l[m][3]=0;if(0===a(l))return null;var n,o=[];k[0][3]||k[1][3]||k[2][3]?(o.push(k[0][3]),o.push(k[1][3]),o.push(k[2][3]),o.push(k[3][3]),n=e(o,d(b(l)))):n=[0,0,0,1];var p=k[3].slice(0,3),q=[];q.push(k[0].slice(0,3));var r=[];r.push(g(q[0])),q[0]=f(q[0]);var s=[];q.push(k[1].slice(0,3)),s.push(c(q[0],q[1])),q[1]=h(q[1],q[0],1,-s[0]),r.push(g(q[1])),q[1]=f(q[1]),s[0]/=r[1],q.push(k[2].slice(0,3)),s.push(c(q[0],q[2])),q[2]=h(q[2],q[0],1,-s[1]),s.push(c(q[1],q[2])),q[2]=h(q[2],q[1],1,-s[2]),r.push(g(q[2])),q[2]=f(q[2]),s[1]/=r[2],s[2]/=r[2];var t=i(q[1],q[2]);if(c(q[0],t)<0)for(var m=0;m<3;m++)r[m]*=-1,q[m][0]*=-1,q[m][1]*=-1,q[m][2]*=-1;var u,v,w=q[0][0]+q[1][1]+q[2][2]+1;return w>1e-4?(u=.5/Math.sqrt(w),v=[(q[2][1]-q[1][2])*u,(q[0][2]-q[2][0])*u,(q[1][0]-q[0][1])*u,.25/u]):q[0][0]>q[1][1]&&q[0][0]>q[2][2]?(u=2*Math.sqrt(1+q[0][0]-q[1][1]-q[2][2]),v=[.25*u,(q[0][1]+q[1][0])/u,(q[0][2]+q[2][0])/u,(q[2][1]-q[1][2])/u]):q[1][1]>q[2][2]?(u=2*Math.sqrt(1+q[1][1]-q[0][0]-q[2][2]),v=[(q[0][1]+q[1][0])/u,.25*u,(q[1][2]+q[2][1])/u,(q[0][2]-q[2][0])/u]):(u=2*Math.sqrt(1+q[2][2]-q[0][0]-q[1][1]),v=[(q[0][2]+q[2][0])/u,(q[1][2]+q[2][1])/u,.25*u,(q[1][0]-q[0][1])/u]),[p,r,s,v,n]}return j}();a.dot=c,a.makeMatrixDecomposition=h,a.transformListToMatrix=g}(d),function(a){function b(a,b){var c=a.exec(b);if(c)return c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]}function c(a,b){b=b.replace(/^\\s*/,\"\");var c=a(b);if(c)return[c[0],c[1].replace(/^\\s*/,\"\")]}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],!(g=b(d,e))||\"\"==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\\s|,/.test(b[d])||0!=c);d++)if(\"(\"==b[d])c++;else if(\")\"==b[d]&&(c--,0==c&&d++,c<=0))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){return a(c)||[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||\"\"==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}if(\"\"==c)return d}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;k<j;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if(\"function\"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b=\"\",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(d),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);if(c)return d.inset=!0,c;var c=a.consumeLengthOrPercent(b);if(c)return d.lengths.push(c[0]),c;var c=a.consumeColor(b);return c?(d.color=c[0],c):void 0}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);if(e&&e[0].length)return[d,e[1]]}function c(c){var d=a.consumeRepeated(b,/^,/,c);if(d&&\"\"==d[1])return d[0]}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?\"inset \":\" \",f=0;f<e.length;f++)c+=e[f](a[0][f])+\" \";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,\", \");a.addPropertiesHandler(c,f,[\"box-shadow\",\"text-shadow\"])}(d),function(a,b){function c(a){return a.toFixed(3).replace(/0+$/,\"\").replace(/\\.$/,\"\")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){if(/^\\s*[-+]?(\\d*\\.)?\\d+\\s*$/.test(a))return Number(a)}function f(a,b){return[a,b,c]}function g(a,b){if(0!=a)return i(0,1/0)(a,b)}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a){var b=a.trim().split(/\\s*[\\s,]\\s*/);if(0!==b.length){for(var c=[],d=0;d<b.length;d++){var f=e(b[d]);if(void 0===f)return;c.push(f)}return c}}function k(a,b){if(a.length==b.length)return[a,b,function(a){return a.map(c).join(\" \")}]}function l(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(j,k,[\"stroke-dasharray\"]),a.addPropertiesHandler(e,i(0,1/0),[\"border-image-width\",\"line-height\"]),a.addPropertiesHandler(e,i(0,1),[\"opacity\",\"shape-image-threshold\"]),a.addPropertiesHandler(e,g,[\"flex-grow\",\"flex-shrink\"]),a.addPropertiesHandler(e,h,[\"orphans\",\"widows\"]),a.addPropertiesHandler(e,l,[\"z-index\"]),a.parseNumber=e,a.parseNumberList=j,a.mergeNumbers=f,a.numberToString=c}(d),function(a,b){function c(a,b){if(\"visible\"==a||\"visible\"==b)return[0,1,function(c){return c<=0?a:c>=1?b:\"visible\"}]}a.addPropertiesHandler(String,c,[\"visibility\"])}(d),function(a,b){function c(a){a=a.trim(),f.fillStyle=\"#000\",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle=\"#fff\",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),\"rgba(\"+b.join(\",\")+\")\"}]}var e=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\");e.width=e.height=1;var f=e.getContext(\"2d\");a.addPropertiesHandler(c,d,[\"background-color\",\"border-bottom-color\",\"border-left-color\",\"border-right-color\",\"border-top-color\",\"color\",\"fill\",\"flood-color\",\"lighting-color\",\"outline-color\",\"stop-color\",\"stroke\",\"text-decoration-color\"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(d),function(a,b){function c(a){function b(){var b=h.exec(a);g=b?b[0]:void 0}function c(){var a=Number(g);return b(),a}function d(){if(\"(\"!==g)return c();b();var a=f();return\")\"!==g?NaN:(b(),a)}function e(){for(var a=d();\"*\"===g||\"/\"===g;){var c=g;b();var e=d();\"*\"===c?a*=e:a/=e}return a}function f(){for(var a=e();\"+\"===g||\"-\"===g;){var c=g;b();var d=e();\"+\"===c?a+=d:a-=d}return a}var g,h=/([\\+\\-\\w\\.]+|[\\(\\)\\*\\/])/g;return b(),f()}function d(a,b){if(\"0\"==(b=b.trim().toLowerCase())&&\"px\".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\\(/g,\"(\");var d={};b=b.replace(a,function(a){return d[a]=null,\"U\"+a});for(var e=\"U(\"+a.source+\")\",f=b.replace(/[-+]?(\\d*\\.)?\\d+([Ee][-+]?\\d+)?/g,\"N\").replace(new RegExp(\"N\"+e,\"g\"),\"D\").replace(/\\s[+-]\\s/g,\"O\").replace(/\\s/g,\"\"),g=[/N\\*(D)/g,/(N|D)[*\\/]N/g,/(N|D)O\\1/g,/\\((N|D)\\)/g],h=0;h<g.length;)g[h].test(f)?(f=f.replace(g[h],\"$1\"),h=0):h++;if(\"D\"==f){for(var i in d){var j=c(b.replace(new RegExp(\"U\"+i,\"g\"),\"\").replace(new RegExp(e,\"g\"),\"*0\"));if(!isFinite(j))return;d[i]=j}return d}}}function e(a,b){return f(a,b,!0)}function f(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(\" + \");return b.length>1?\"calc(\"+c+\")\":c}]}var g=\"px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc\",h=d.bind(null,new RegExp(g,\"g\")),i=d.bind(null,new RegExp(g+\"|%\",\"g\")),j=d.bind(null,/deg|rad|grad|turn/g);a.parseLength=h,a.parseLengthOrPercent=i,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,i),a.parseAngle=j,a.mergeDimensions=f;var k=a.consumeParenthesised.bind(null,h),l=a.consumeRepeated.bind(void 0,k,/^/),m=a.consumeRepeated.bind(void 0,l,/^,/);a.consumeSizePairList=m;var n=function(a){var b=m(a);if(b&&\"\"==b[1])return b[0]},o=a.mergeNestedRepeated.bind(void 0,e,\" \"),p=a.mergeNestedRepeated.bind(void 0,o,\",\");a.mergeNonNegativeSizePair=o,a.addPropertiesHandler(n,p,[\"background-size\"]),a.addPropertiesHandler(i,e,[\"border-bottom-width\",\"border-image-width\",\"border-left-width\",\"border-right-width\",\"border-top-width\",\"flex-basis\",\"font-size\",\"height\",\"line-height\",\"max-height\",\"max-width\",\"outline-width\",\"width\"]),a.addPropertiesHandler(i,f,[\"border-bottom-left-radius\",\"border-bottom-right-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"bottom\",\"left\",\"letter-spacing\",\"margin-bottom\",\"margin-left\",\"margin-right\",\"margin-top\",\"min-height\",\"min-width\",\"outline-offset\",\"padding-bottom\",\"padding-left\",\"padding-right\",\"padding-top\",\"perspective\",\"right\",\"shape-margin\",\"stroke-dashoffset\",\"text-indent\",\"top\",\"vertical-align\",\"word-spacing\"])}(d),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return\"auto\"==b||\"auto\"==c?[!0,!1,function(d){var e=d?b:c;if(\"auto\"==e)return\"auto\";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return\"rect(\"+a+\")\"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,\", \");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,[\"clip\"])}(d),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if(\"none\"==(b=b.toLowerCase().trim()))return[];for(var c,d=/\\s*(\\w+)\\(([^)]*)\\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(\",\"),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(void 0===(p=q?{A:function(b){return\"0\"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r]))return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(\".000000\",\"\")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]);return a.composeMatrix(b[0],b[1],b[2],c,b[4]).map(f).join(\",\")}])}function h(a){return a.replace(/[xy]/,\"\")}function i(a){return a.replace(/(x|y|z|3d)?$/,\"3d\")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l=\"scale\"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if(\"number\"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return\"perspective\"==a&&\"perspective\"==b||(\"matrix\"==a||\"matrix3d\"==a)&&(\"matrix\"==b||\"matrix3d\"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[[\"matrix\",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push([\"matrix\",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[[\"matrix\",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C=\"number\"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(\",\");return\"matrix\"==q[b][0]&&16==c.split(\",\").length&&(q[b][0]=\"matrix3d\"),q[b][0]+\"(\"+c+\")\"}).join(\" \")}]}var k=null,l={px:0},m={deg:0},n={matrix:[\"NNNNNN\",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:[\"NNNNNNNNNNNNNNNN\",d],rotate:[\"A\"],rotatex:[\"A\"],rotatey:[\"A\"],rotatez:[\"A\"],rotate3d:[\"NNNA\"],perspective:[\"L\"],scale:[\"Nn\",c([k,k,1]),d],scalex:[\"N\",c([k,1,1]),c([k,1])],scaley:[\"N\",c([1,k,1]),c([1,k])],scalez:[\"N\",c([1,1,k])],scale3d:[\"NNN\",d],skew:[\"Aa\",null,d],skewx:[\"A\",null,c([k,m])],skewy:[\"A\",null,c([m,k])],translate:[\"Tt\",c([k,k,l]),d],translatex:[\"T\",c([k,l,l]),c([k,l])],translatey:[\"T\",c([l,k,l]),c([l,k])],translatez:[\"L\",c([l,l,k])],translate3d:[\"TTL\",d]};a.addPropertiesHandler(e,j,[\"transform\"]),a.transformToSvgMatrix=function(b){var c=a.transformListToMatrix(e(b));return\"matrix(\"+f(c[0])+\" \"+f(c[1])+\" \"+f(c[4])+\" \"+f(c[5])+\" \"+f(c[12])+\" \"+f(c[13])+\")\"}}(d),function(a){function b(a){var b=Number(a);if(!(isNaN(b)||b<100||b>900||b%100!=0))return b}function c(b){return b=100*Math.round(b/100),b=a.clamp(100,900,b),400===b?\"normal\":700===b?\"bold\":String(b)}function d(a,b){return[a,b,c]}a.addPropertiesHandler(b,d,[\"font-weight\"])}(d),function(a){function b(a){var b={};for(var c in a)b[c]=-a[c];return b}function c(b){return a.consumeToken(/^(left|center|right|top|bottom)\\b/i,b)||a.consumeLengthOrPercent(b)}function d(b,d){var e=a.consumeRepeated(c,/^/,d);if(e&&\"\"==e[1]){var f=e[0];if(f[0]=f[0]||\"center\",f[1]=f[1]||\"center\",3==b&&(f[2]=f[2]||{px:0}),f.length==b){if(/top|bottom/.test(f[0])||/left|right/.test(f[1])){var h=f[0];f[0]=f[1],f[1]=h}if(/left|right|center|Object/.test(f[0])&&/top|bottom|center|Object/.test(f[1]))return f.map(function(a){return\"object\"==typeof a?a:g[a]})}}}function e(d){var e=a.consumeRepeated(c,/^/,d);if(e){for(var f=e[0],h=[{\"%\":50},{\"%\":50}],i=0,j=!1,k=0;k<f.length;k++){var l=f[k];\"string\"==typeof l?(j=/bottom|right/.test(l),i={left:0,right:0,center:i,top:1,bottom:1}[l],h[i]=g[l],\"center\"==l&&i++):(j&&(l=b(l),l[\"%\"]=(l[\"%\"]||0)+100),h[i]=l,i++,j=!1)}return[h,e[1]]}}function f(b){var c=a.consumeRepeated(e,/^,/,b);if(c&&\"\"==c[1])return c[0]}var g={left:{\"%\":0},center:{\"%\":50},right:{\"%\":100},top:{\"%\":0},bottom:{\"%\":100}},h=a.mergeNestedRepeated.bind(null,a.mergeDimensions,\" \");a.addPropertiesHandler(d.bind(null,3),h,[\"transform-origin\"]),a.addPropertiesHandler(d.bind(null,2),h,[\"perspective-origin\"]),a.consumePosition=e,a.mergeOffsetList=h;var i=a.mergeNestedRepeated.bind(null,h,\", \");a.addPropertiesHandler(f,i,[\"background-position\",\"object-position\"])}(d),function(a){function b(b){var c=a.consumeToken(/^circle/,b);if(c&&c[0])return[\"circle\"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\\(/)),d,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\\)/))],c[1]));var f=a.consumeToken(/^ellipse/,b);if(f&&f[0])return[\"ellipse\"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\\(/)),e,a.ignore(a.consumeToken.bind(void 0,/^at/)),a.consumePosition,a.ignore(a.consumeToken.bind(void 0,/^\\)/))],f[1]));var g=a.consumeToken(/^polygon/,b);return g&&g[0]?[\"polygon\"].concat(a.consumeList([a.ignore(a.consumeToken.bind(void 0,/^\\(/)),a.optional(a.consumeToken.bind(void 0,/^nonzero\\s*,|^evenodd\\s*,/),\"nonzero,\"),a.consumeSizePairList,a.ignore(a.consumeToken.bind(void 0,/^\\)/))],g[1])):void 0}function c(b,c){if(b[0]===c[0])return\"circle\"==b[0]?a.mergeList(b.slice(1),c.slice(1),[\"circle(\",a.mergeDimensions,\" at \",a.mergeOffsetList,\")\"]):\"ellipse\"==b[0]?a.mergeList(b.slice(1),c.slice(1),[\"ellipse(\",a.mergeNonNegativeSizePair,\" at \",a.mergeOffsetList,\")\"]):\"polygon\"==b[0]&&b[1]==c[1]?a.mergeList(b.slice(2),c.slice(2),[\"polygon(\",b[1],g,\")\"]):void 0}var d=a.consumeParenthesised.bind(null,a.parseLengthOrPercent),e=a.consumeRepeated.bind(void 0,d,/^/),f=a.mergeNestedRepeated.bind(void 0,a.mergeDimensions,\" \"),g=a.mergeNestedRepeated.bind(void 0,f,\",\");a.addPropertiesHandler(b,c,[\"shape-outside\"])}(d),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b),e[b]=a})}var d={},e={};c(\"transform\",[\"webkitTransform\",\"msTransform\"]),c(\"transformOrigin\",[\"webkitTransformOrigin\"]),c(\"perspective\",[\"webkitPerspective\"]),c(\"perspectiveOrigin\",[\"webkitPerspectiveOrigin\"]),a.propertyName=function(a){return d[a]||a},a.unprefixedPropertyName=function(a){return e[a]||a}}(d)}(),function(){if(void 0===document.createElement(\"div\").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type=\"cancel\",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){\"function\"==typeof b&&\"cancel\"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if(\"cancel\"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue(\"opacity\"),f=\"0\"==e?\"1\":\"0\";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue(\"opacity\")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(c),b.true=a}({},function(){return this}());\n//# sourceMappingURL=web-animations.min.js.map",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/lib/web-animations.js",
"tags": "",
"module-type": "library",
"modified": "20171228183812615",
"created": "20171216100528126"
},
"$:/plugins/BTC/tiddly-touch/license": {
"text": "MIT License\n\nCopyright (c) 2018 Huber Simon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
"title": "$:/plugins/BTC/tiddly-touch/license",
"tags": "",
"modified": "20180119084208663",
"created": "20180119073430854",
"caption": "license"
},
"$:/plugins/BTC/tiddly-touch/lists/numbers": {
"text": "the list field holds all integer numbers from 1 to 9999",
"title": "$:/plugins/BTC/tiddly-touch/lists/numbers",
"tags": "",
"modified": "20180109082245868",
"list": "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 9750 9751 9752 9753 9754 9755 9756 9757 9758 9759 9760 9761 9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 9776 9777 9778 9779 9780 9781 9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825 9826 9827 9828 9829 9830 9831 9832 9833 9834 9835 9836 9837 9838 9839 9840 9841 9842 9843 9844 9845 9846 9847 9848 9849 9850 9851 9852 9853 9854 9855 9856 9857 9858 9859 9860 9861 9862 9863 9864 9865 9866 9867 9868 9869 9870 9871 9872 9873 9874 9875 9876 9877 9878 9879 9880 9881 9882 9883 9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910 9911 9912 9913 9914 9915 9916 9917 9918 9919 9920 9921 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000",
"created": "20180109081722674"
},
"$:/plugins/BTC/tiddly-touch/readme": {
"text": "",
"title": "$:/plugins/BTC/tiddly-touch/readme",
"tags": "",
"modified": "20180119084217667",
"created": "20180119083856838",
"caption": "readme"
},
"$:/plugins/BTC/tiddly-touch/storyviews/muuri.js": {
"text": "/*\\\ntitle: $:/plugins/BTC/tiddly-touch/storyviews/muuri.js\ntype: application/javascript\nmodule-type: storyview\n\nStory view that cooperates with the Muuri grid layout engine\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar easing = \"cubic-bezier(0.645, 0.045, 0.355, 1)\"; // From http://easings.net/#easeInOutCubic\n\nvar MuuriStoryView = function(listWidget) {\n\tthis.listWidget = listWidget;\n};\n\nMuuriStoryView.prototype.navigateTo = function(historyInfo) {\n\tvar listElementIndex = this.listWidget.findListItem(0,historyInfo.title);\n\n\tif(listElementIndex === undefined) {\n\t\treturn;\n\t}\n\tvar listItemWidget = this.listWidget.children[listElementIndex],\n\t\ttargetElement = listItemWidget.findFirstDomNode();\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\treturn;\n\t}\n\t// Scroll the node into view\n\tthis.listWidget.dispatchEvent({type: \"tm-scroll\", target: targetElement});\n};\n\nMuuriStoryView.prototype.insert = function(widget) {\n\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration();\n\n var targetElementIndex = this.listWidget.findListItem(0,widget.parseTreeNode.itemTitle);\n\n /*\n\t// Get the current height of the tiddler\n\tvar computedStyle = window.getComputedStyle(targetElement),\n\t\tcurrMarginBottom = parseInt(computedStyle.marginBottom,10),\n\t\tcurrMarginTop = parseInt(computedStyle.marginTop,10),\n\t\tcurrHeight = targetElement.offsetHeight + currMarginTop;\n\t// Reset the margin once the transition is over\n\tsetTimeout(function() {\n\t\t$tw.utils.setStyle(targetElement,[\n\t\t\t{transition: \"none\"},\n\t\t\t{marginBottom: \"\"}\n\t\t]);\n\t},duration);\n\t// Set up the initial position of the element\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"none\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n\t$tw.utils.forceLayout(targetElement);\n\t// Transition to the final position\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: \"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{marginBottom: currMarginBottom + \"px\"},\n\t\t{opacity: \"1.0\"}\n\t]);\n */\n\n this.addGridItem(targetElement, { instant: true, index: targetElementIndex });\n};\n\nMuuriStoryView.prototype.remove = function(widget) {\n\tvar targetElement = widget.findFirstDomNode(),\n\t\tduration = $tw.utils.getAnimationDuration(),\n\t\tremoveElement = function() {\n\t\t\twidget.removeChildDomNodes();\n\t\t};\n\n\t// Abandon if the list entry isn't a DOM element (it might be a text node)\n\tif(!(targetElement instanceof Element)) {\n\t\tremoveElement();\n\t\treturn;\n\t}\n\n this.removeGridItem(targetElement, { instant: false, removeElements: true });\n\n /*\n\t$tw.utils.forceLayout(targetElement);\n\t$tw.utils.setStyle(targetElement,[\n\t\t{transition: $tw.utils.roundTripPropertyName(\"transform\") + \" \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"opacity \" + duration + \"ms \" + easing + \", \" +\n\t\t\t\t\t\"margin-bottom \" + duration + \"ms \" + easing},\n\t\t{transform: \"translateX(-\" + currWidth + \"px)\"},\n\t\t{marginBottom: (-currHeight) + \"px\"},\n\t\t{opacity: \"0.0\"}\n\t]);\n */\n};\n\nMuuriStoryView.prototype.grid = function(targetElement) {\n var grid = targetElement.parentNode;\n\n if (!(grid instanceof Element)) {\n $tw.utils.error(\"MuuriStoryView couldn't find grid for \" + targetElement.getAttribute('class'));\n }\n\n return grid;\n};\n\nMuuriStoryView.prototype.addGridItem = function(targetElement, options) {\n var grid = this.grid(targetElement);\n\n grid.add(targetElement, options);\n};\n\nMuuriStoryView.prototype.removeGridItem = function(targetElement, options) {\n var grid = this.grid(targetElement);\n\n grid.remove(targetElement, options);\n};\n\nexports.muuri = MuuriStoryView;\n\n})();\n",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/storyviews/muuri.js",
"revision": "0",
"module-type": "storyview",
"modified": "20180119161045861",
"created": "20171221070643923",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/utils/resize-listener.js": {
"text": "/*\\\ntitle: $:/plugins/ustuehler/muuri/utils/resize-listener.js\ntype: application/javascript\nmodule-type: utils\n\nStory view that cooperates with the Muuri grid layout engine\n\n\\*/\n(function(){ if (typeof window !== 'undefined') {\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar attachEvent = document.attachEvent;\nvar isIE = navigator.userAgent.match(/Trident/);\n\nvar requestFrame = (function(){\n\tvar raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||\n\t\t\tfunction(fn){ return window.setTimeout(fn, 20); };\n\treturn function(fn){ return raf(fn); };\n})();\n\nvar cancelFrame = (function(){\n\tvar cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame ||\n\t\t\t\t window.clearTimeout;\n\treturn function(id){ return cancel(id); };\n})();\n\nfunction resizeListener(e){\n\tvar win = e.target || e.srcElement;\n\tif (win.__resizeRAF__) cancelFrame(win.__resizeRAF__);\n\twin.__resizeRAF__ = requestFrame(function(){\n\t\tvar trigger = win.__resizeTrigger__;\n if (trigger !== undefined && trigger.__resizeListeners__ !== undefined) {\n\t\ttrigger.__resizeListeners__.forEach(function(fn){\n\t\t\tfn.call(trigger, e);\n\t\t});\n }\n\t});\n}\n\nfunction objectLoad(e){\n\tthis.contentDocument.defaultView.__resizeTrigger__ = this.__resizeElement__;\n\tthis.contentDocument.defaultView.addEventListener('resize', resizeListener);\n}\n\nexports.addResizeListener = function(element, fn){\n\tif (!element.__resizeListeners__) {\n\t\telement.__resizeListeners__ = [];\n\t\tif (attachEvent) {\n\t\t\telement.__resizeTrigger__ = element;\n\t\t\telement.attachEvent('onresize', resizeListener);\n\t\t}\n\t\telse {\n\t\t\tif (getComputedStyle(element).position == 'static') element.style.position = 'relative';\n\t\t\tvar obj = element.__resizeTrigger__ = document.createElement('object'); \n\t\t\tobj.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n\t\t\tobj.__resizeElement__ = element;\n\t\t\tobj.onload = objectLoad;\n\t\t\tobj.type = 'text/html';\n\t\t\tif (isIE) element.appendChild(obj);\n\t\t\tobj.data = 'about:blank';\n\t\t\tif (!isIE) element.appendChild(obj);\n\t\t}\n\t}\n\telement.__resizeListeners__.push(fn);\n};\n\nexports.removeResizeListener = function(element, fn){\n\telement.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n\tif (!element.__resizeListeners__.length) {\n\t\tif (attachEvent) element.detachEvent('onresize', resizeListener);\n\t\telse {\n\t\t\telement.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', resizeListener);\n\t\t\telement.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);\n\t\t}\n\t}\n};\n\n}})();\n",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/utils/resize-listener.js",
"revision": "0",
"module-type": "utils",
"modified": "20180119132731111",
"created": "20171221070721367",
"bag": "default"
},
"$:/plugins/BTC/tiddly-touch/widgets/muuri.js": {
"text": "/*\\\ntitle: $:/plugins/BTC/tiddly-touch/widgets/muuri.js\ntype: application/javascript\nmodule-type: widget\n\nPackery cascading grid layout widget\n\n\\*/\n(function (global) {\n\n\"use strict\";\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nif (typeof window !== 'undefined') {\n var Muuri = require(\"$:/plugins/BTC/tiddly-touch/lib/muuri.js\");\n}\n\nvar MuuriWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nMuuriWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nMuuriWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\n\t// Compute attributes and execute state\n\tthis.computeAttributes();\n\tthis.execute();\n\n // Insert DOM node\n var domNode = this.document.createElement(\"section\");\n \tdomNode.setAttribute(\"class\",\"tc-muuri-grid\");\n\t parent.insertBefore(domNode,nextSibling);\n \tthis.domNodes.push(domNode);\n\nthis.renderChildren(domNode,null);\n\n var targetElements = this.getAttribute(\"target\");\n var muuriListTiddler = this.getAttribute(\"list\");\n var targetIsTiddler = this.getAttribute(\"target-is-tiddler\") === \"yes\" ;\n var muuriFillGaps = this.getAttribute(\"fill-gaps\") === \"yes\" ;\n var muuriHorizontal = this.getAttribute(\"horizontal\") === \"yes\" ;\n var muuriAlignRight = this.getAttribute(\"align-right\") === \"yes\" ;\n var muuriAlignBottom = this.getAttribute(\"align-bottom\") === \"yes\" ;\n var muuriEnableDrag = this.getAttribute(\"dragging\") === \"yes\" ;\nvar muuriAnimationDuration = parseInt($tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"animation-duration\"));\n var muuriShowDuration = parseInt($tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"show-duration\"));\n var muuriHideDuration = parseInt($tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"hide-duration\"));\n var muuriDragSortAction = $tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"drag-sort-action\");\n var muuriDragSortThreshold = $tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"drag-sort-threshold\");\n var muuriDragSort = $tw.wiki.getTiddler(\"$:/plugins/BTC/tiddly-touch/config\").getFieldString(\"drag-sort\") === \"yes\";\n var muuriParentWidget = this.children;\n\n var animationDuration = $tw.utils.getAnimationDuration();\n\n var muuri = new Muuri(domNode, {\n items: '.' + targetElements,\n muuriListTiddler: muuriListTiddler,\n muuriParentWidget: muuriParentWidget,\n targetsAreTiddlers: targetIsTiddler,\n showDuration: muuriShowDuration,\n hideDuration: muuriHideDuration,\n layoutDuration: muuriAnimationDuration,\n layoutEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n showEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n hideEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n layoutOnResize: animationDuration,\n rounding: false,\n\t\tlayout: {\n\t\t\tfillGaps: muuriFillGaps,\n\t\t\thorizontal: muuriHorizontal,\n\t\t\talignRight: muuriAlignRight,\n\t\t\talignBottom: muuriAlignBottom,\n\t\t\trounding: false\n\t\t},\n dragEnabled: muuriEnableDrag,\n dragSortPredicate: {\n threshold: muuriDragSortThreshold,\n action: muuriDragSortAction\n },\n containerClass: 'tc-muuri-grid',\n itemClass: targetElements,\n gridMigratingClass: 'tc-grid-migrate-1',\n\t\titemVisibleClass: 'muuri-shown',\n\t\titemHiddenClass: 'muuri-hidden',\n\t\titemPositioningClass: 'muuri-positioning',\n\t\titemDraggingClass: 'tc-dragging',\n\t\titemReleasingClass: 'tc-dragover'\n });\n\n // add() and remove() should be invoked on the grid container by the\n // storyview when tiddlers get inserted or removed\n domNode.add = function(elements, options) {\n muuri.add(elements, options);\n muuri.hide(elements, {onFinish: function () {\n muuri.refreshItems();\n muuri._refreshDimensions();\n muuri.layout();\n muuri.show(elements);\n muuri._settings.muuriParentWidget = self.children;\n}});\n };\n\n domNode.remove = function(elements, options) {\n muuri.remove(elements, options);\n muuri._settings.muuriParentWidget = self.children;\n };\n\n // Register resize event handlers for all children\n self.registerMissingResizeListeners(domNode, muuri);\n muuri._settings.muuriParentWidget = self.children;\n\n // Register a handler to fire when child DOM elements are added or removed.\n var observer = new MutationObserver(function(mutations) {\n\n mutations.forEach(function(mutation) {\n if (!mutation.addedNodes) return;\n\n if (mutation.type == 'childList') {\n //console.debug(\"MuuriWidget observed a change in childList\");\n // Register resize event handlers for new children\n self.registerMissingResizeListeners(domNode, muuri);\n muuri._settings.muuriParentWidget = self.children;\n }\n });\n\n });\n \n observer.observe(domNode, { childList: true, subtree: true, attributes: true, characterData: false});\n\n};\n\n/*\nEnsure that resize listeners are registered for all child widgets\n*/\nMuuriWidget.prototype.registerMissingResizeListeners = function(domNode, grid) {\n var items = grid.getItems();\n var domNodeChildren = domNode.children;\n //grid.synchronize();\n for (var i = 0; i < domNode.children.length; i++) {\n var item = domNode.children[i]; \n //console.debug(item);\n\n if (typeof item.resizeHandler === 'undefined') {\n item.resizeHandler = (function(item) {\n return function() {\n //console.debug(\"MuuriWidget got a resize event from \" + item.getAttribute('class'));\n grid.hide(item, {\n instant: true,\n onFinish: function() {\n grid.show(item, {instant: true});\n }\n });\n };\n })(item);\n\n //console.debug(\"MuuriWidget registering for resize events from \" + item.getAttribute('class'));\n $tw.utils.addResizeListener(item, item.resizeHandler);\n \n grid.add(item, { instant: true, index: i });\n grid.hide(item, {\n instant: true,\n onFinish: function() {\n grid.show(item, {instant: true, index: i });\n items = grid.getItems();\n if (domNodeChildren.length < items.length) {\n grid.remove(items[i+1], { instant: true, removeElements: false });\n grid.refreshItems();\n grid._refreshDimensions();\n grid.refreshSortData();\n grid.layout(true);\n }\n }\n });\n }\n }\n};\n\n/*\nCompute the internal state of the widget\n*/\nMuuriWidget.prototype.execute = function() {\n this.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nMuuriWidget.prototype.refresh = function(changedTiddlers) {\n return this.refreshChildren(changedTiddlers);\n};\n\nexports.muuri = MuuriWidget;\n\n})(this);",
"type": "application/javascript",
"title": "$:/plugins/BTC/tiddly-touch/widgets/muuri.js",
"tags": "",
"module-type": "widget",
"modified": "20180120102026655",
"created": "20180118194154339"
},
"$:/plugins/BTC/tiddly-touch/usage": {
"created": "20180120120601278",
"text": "",
"title": "$:/plugins/BTC/tiddly-touch/usage",
"tags": "",
"modified": "20180120120620985",
"caption": "usage"
}
}
}
\define hide-controls-from-user()
<$reveal state="$:/state/hide-all-controls" type="match" text="yes">
.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle , .tc-tiddler-frame .tc-tags-wrapper, .tc-topbar.tc-topbar-left, .tc-topbar.tc-topbar-right, .tc-leftbar , .tc-bottombar, .tc-sidebar-scrollable , .tc-tiddler-frame .tc-tiddler-controls {
display: none !important;
}
body::-webkit-scrollbar {
display: none !important;
}
.tc-story-river {
padding-left: 0px !important;
padding-right: 0px !important;
}
</$reveal>
\end
<$reveal state="$:/state/hide-all-controls" type="nomatch" text="yes">
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/state/hide-all-controls" $value="yes"/>
<$action-setfield $tiddler="$:/state/hide-titles" $value="yes"/><$action-setfield $tiddler="$:/state/hide-titles" $field="hide-tags" $value="yes"/>
<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>
{{$:/plugins/BTC/tiddly-touch/icons!!visibility}}
</$button>
</$reveal>
<$reveal state="$:/state/hide-all-controls" type="match" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon"><$action-setfield $tiddler="$:/state/hide-all-controls" $value="no"/>
<$action-setfield $tiddler="$:/state/hide-titles" $value="no"/><$action-setfield $tiddler="$:/state/hide-titles" $field="hide-tags" $value="no"/>
<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>
{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-green}}
</$button>
</$reveal>
<<hide-tiddler-title-tags>>
<<hide-controls-from-user>>
\define save-wiki-button-indicator()
<$reveal state="$:/UploadName" type="match" text="">
body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator, body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator svg , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator svg {
display:inline-block !important;
font-size: 1rem !important;
fill: <<colour dirty-indicator>>;
color: <<colour dirty-indicator>>;
}
</$reveal>
<$reveal state="$:/UploadName" type="nomatch" text="">
body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator, body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator svg , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator svg {
display:inline-block !important;
font-size: 1rem !important;
fill: <<colour primary>> !important;
color: <<colour primary>> !important;
}
</$reveal>
\end
<span class="tc-bottombar tc-bottombar-right">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/BottomLeftBar]!has[draft.of]]" variable="listItem">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$list>
<span class="tc-hidden-button">
{{$:/core/ui/Buttons/save-wiki}}
</span>
{{$:/plugins/BTC/tiddly-touch/Buttons/change-view}}
</span>
.tc-bottombar {
position: fixed;
z-index: 1200;
}
.tc-bottombar p {
margin-top: 0px;
margin-bottom: 0px;
}
.tc-bottombar .material-icons {
font-size: 20px;
}
.tc-bottombar button {
padding-left: 8px;
padding-right: 8px;
padding-top: 6px;
padding-bottom: 6px;
}
.tc-bottombar svg {
fill: <<colour muted-foreground>>;
}
body .tc-bottombar .tc-dirty-indicator svg {
fill: <<colour page-background>>;
}
.tc-bottombar button:hover svg {
fill: <<colour foreground>>;
}
.tc-bottombar .tc-hidden-button button {
display:none !important;
}
body.tc-dirty .tc-bottombar .tc-hidden-button button {
display:inline-block !important;
}
.tc-bottombar-right {
bottom: 0px;
margin-right: 8px;
width: 36px;
font-size: 1.3em;
}
<<save-wiki-button-indicator>>
\define lingo-base() $:/language/Tiddlers/Opacity/
\define tiddler-opacity-inner()
<$button tag="a" tooltip="""$(opacity)$""" style="font-size: 1rem">
<$action-setfield
$tiddler="$:/plugins/BTC/tiddly-touch/config" $field="tiddler-opacity"
$value="$(new-opacity)$"
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<div style="display: inline-block; vertical-align: middle; background-color: #2A2B30; opacity: $(opacity)$; width: 1em; height: 1em; border-radius: 50%;"/>
<span style="margin-left: 8px;">
<$text text="""$(opacity)$"""/>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity" type="match" text="""$(new-opacity)$""" tag="span">
<$entity entity=" "/>
<$entity entity="✓"/>
</$reveal>
</span>
</$button>
\end
\define tiddler-opacity()
''<<lingo Hint>>''
<$list filter="[list[$:/plugins/BTC/tiddly-touch/AddOns/Buttons/tiddler-opacity!!tiddler-opacities]]" variable="opacity">
<$list filter="[<opacity>regexp[0.0]]">
<$set name="new-opacity" value="00">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.1]]">
<$set name="new-opacity" value="19">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.2]]">
<$set name="new-opacity" value="33">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.3]]">
<$set name="new-opacity" value="4c">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.4]]">
<$set name="new-opacity" value="66">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.5]]">
<$set name="new-opacity" value="80">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.6]]">
<$set name="new-opacity" value="99">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.7]]">
<$set name="new-opacity" value="b3">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.8]]">
<$set name="new-opacity" value="cc">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.9]!regexp[0.95]]">
<$set name="new-opacity" value="e6">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.95]]">
<$set name="new-opacity" value="f3">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[1.0]]">
<$set name="new-opacity" value="ff">
<<tiddler-opacity-inner>>
</$set>
</$list>
</$list>
\end
<$set name="dropdown-state" value=<<qualify "$:/state/drop-down">>>
<span class="tc-popup-keep">
<$button popup=<<dropdown-state>> tooltip="Tiddler opacity" aria-label="Tiddler opacity" class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/opacity}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text="tiddler opacity"/></span>
</$list>
</$button>
</span>
<$reveal state=<<dropdown-state>> type="popup" position="right" animate="yes">
<div class="tc-drop-down" style="font-size:1.2em;">
<$set name="current-background-color" value=<<colour background>>>
<$set name="current-hex-tiddler-opacity" value={{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}}>
<$list filter="[<current-hex-tiddler-opacity>regexp[^00$]]">
<$set name="current-tiddler-opacity" value="0.0">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^19$]]">
<$set name="current-tiddler-opacity" value="0.1">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^33$]]">
<$set name="current-tiddler-opacity" value="0.2">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^4c$]]">
<$set name="current-tiddler-opacity" value="0.3">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^66$]]">
<$set name="current-tiddler-opacity" value="0.4">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^80$]]">
<$set name="current-tiddler-opacity" value="0.5">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^99$]]">
<$set name="current-tiddler-opacity" value="0.6">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^b3$]]">
<$set name="current-tiddler-opacity" value="0.7">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^cc$]]">
<$set name="current-tiddler-opacity" value="0.8">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^e6$]]">
<$set name="current-tiddler-opacity" value="0.9">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^f3$]]">
<$set name="current-tiddler-opacity" value="0.95">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^ff$]]">
<$set name="current-tiddler-opacity" value="1.0">
<<tiddler-opacity>>
</$set>
</$list>
</$set>
</$set>
</div>
</$reveal>
</$set>
\define sidebar-opacity-inner()
<$button tag="a" tooltip="""$(opacity)$""" style="font-size: 1rem">
<$action-setfield
$tiddler="$:/plugins/BTC/tiddly-touch/config" $field="sidebar-opacity"
$value="$(new-opacity)$"
/>
<div style="display: inline-block; vertical-align: middle; background-color: #2A2B30; opacity: $(opacity)$; width: 1em; height: 1em; border-radius: 50%;"/>
<span style="margin-left: 8px;">
<$text text="""$(opacity)$"""/>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity" type="match" text="""$(new-opacity)$""" tag="span">
<$entity entity=" "/>
<$entity entity="✓"/>
</$reveal>
</span>
</$button>
\end
\define sidebar-opacity()
''<<lingo Hint>>''
<$list filter="[list[$:/plugins/BTC/tiddly-touch/AddOns/Buttons/tiddler-opacity!!tiddler-opacities]]" variable="opacity">
<$list filter="[<opacity>regexp[0.0]]">
<$set name="new-opacity" value="00">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.1]]">
<$set name="new-opacity" value="19">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.2]]">
<$set name="new-opacity" value="33">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.3]]">
<$set name="new-opacity" value="4c">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.4]]">
<$set name="new-opacity" value="66">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.5]]">
<$set name="new-opacity" value="80">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.6]]">
<$set name="new-opacity" value="99">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.7]]">
<$set name="new-opacity" value="b3">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.8]]">
<$set name="new-opacity" value="cc">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.9]!regexp[0.95]]">
<$set name="new-opacity" value="e6">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.95]]">
<$set name="new-opacity" value="f3">
<<sidebar-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[1.0]]">
<$set name="new-opacity" value="ff">
<<sidebar-opacity-inner>>
</$set>
</$list>
</$list>
\end
<br>//set the sidebar background opacity://<br>
<$set name="current-background-color" value=<<colour background>>>
<$set name="current-hex-sidebar-opacity" value={{$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity}}>
<$list filter="[<current-hex-sidebar-opacity>regexp[^00$]]">
<$set name="current-sidebar-opacity" value="0.0">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^19$]]">
<$set name="current-sidebar-opacity" value="0.1">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^33$]]">
<$set name="current-sidebar-opacity" value="0.2">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^4c$]]">
<$set name="current-sidebar-opacity" value="0.3">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^66$]]">
<$set name="current-sidebar-opacity" value="0.4">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^80$]]">
<$set name="current-sidebar-opacity" value="0.5">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^99$]]">
<$set name="current-sidebar-opacity" value="0.6">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^b3$]]">
<$set name="current-sidebar-opacity" value="0.7">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^cc$]]">
<$set name="current-sidebar-opacity" value="0.8">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^e6$]]">
<$set name="current-sidebar-opacity" value="0.9">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^f3$]]">
<$set name="current-sidebar-opacity" value="0.95">
<<sidebar-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-sidebar-opacity>regexp[^ff$]]">
<$set name="current-sidebar-opacity" value="1.0">
<<current-sidebar-opacity>>
<<sidebar-opacity>>
</$set>
</$list>
</$set>
</$set>
<$reveal state="$:/view" type="nomatch" text="muuri">
<$button class="tc-btn-invisible" tooltip="muuri storyview">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="tiddly-list" $value={{$:/StoryList!!list}}/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/ViewToolbar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps">
<$action-sendmessage $message="tm-add-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]"><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar">
<$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler></$list><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/core/ui/PageTemplate/story">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/EmptyStoryMessage">
<$action-sendmessage $message="tm-add-tag" $param="$:/tags/BelowStory"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/CSS"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/Stylesheet"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/ViewToolbar"/></$fieldmangler><$fieldmangler tiddler="$:/core/ui/Buttons/more-tiddler-actions"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/ViewToolbar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/ViewTemplate"/><$action-sendmessage $message="tm-add-tag" $param="$:/tags/EditTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="previous-storyview" $value={{$:/view}}/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="previous-sidebarlayout" $value={{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}}/><$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" $value="fluid-fixed"/><$action-setfield $tiddler="$:/StoryList" $field="list" $value={{$:/plugins/BTC/tiddly-touch/config!!muuri-list}}/><$action-setfield $tiddler="$:/view" $value="muuri"/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="previous-sidebar" $value={{$:/state/sidebar}}/><$action-setfield $tiddler="$:/state/sidebar" $value="no"/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="spreadsheet-view" $value="no"/><$list filter="[all[tiddlers]prefix[$:/state/tab/sidebar]]" variable="deleteTiddler"><$set name="currentTab" filter="[<deleteTiddler>get[text]]"><$vars backupTitle={{$:/backup/sidebartab!!tiddler-title}} backupTab={{$:/backup/sidebartab}}><$action-setfield $tiddler="$:/backup/sidebartab" $field="tiddler-title" $value=<<deleteTiddler>>/><$action-setfield $tiddler="$:/backup/sidebartab" text=<<currentTab>>/><$action-deletetiddler $tiddler=<<deleteTiddler>>/><$action-setfield $tiddler=<<backupTitle>> $value=<<backupTab>>/></$vars></$set></$list>
{{$:/plugins/BTC/tiddly-touch/icons!!view-dashboard}}
</$button>
</$reveal>
<$reveal state="$:/view" type="match" text="muuri">
<$button class="tc-btn-invisible" tooltip="leave muuri storyview">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="muuri-list" $value={{$:/StoryList!!list}}/>
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/ViewToolbar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/fill-gaps">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]"><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler></$list><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-horiz-vert"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-left-right"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/swap-tiddler-alignment-top-bottom"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/LeftBar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/EmptyStoryMessage">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/BelowStory"/></$fieldmangler><$fieldmangler tiddler="$:/core/ui/PageTemplate/story"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/CSS"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/Stylesheet"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/more-tiddler-actions"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/ViewToolbar"/></$fieldmangler><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/ViewTemplate"/><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/EditTemplate"/></$fieldmangler><$action-deletetiddler $tiddler="$:/core/ui/Buttons/more-tiddler-actions"/><$action-setfield $tiddler="$:/StoryList" $field="list" $value={{$:/plugins/BTC/tiddly-touch/config!!tiddly-list}}/><$action-setfield $tiddler="$:/view" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-storyview}}/><$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-sidebarlayout}}/><$action-setfield $tiddler="$:/state/sidebar" $value={{$:/plugins/BTC/tiddly-touch/config!!previous-sidebar}}/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="spreadsheet-view" $value="no"/><$list filter="[all[tiddlers]prefix[$:/state/tab/sidebar]]" variable="deleteTiddler"><$set name="currentTab" filter="[<deleteTiddler>get[text]]"><$vars backupTitle={{$:/backup/sidebartab!!tiddler-title}} backupTab={{$:/backup/sidebartab}}><$action-setfield $tiddler="$:/backup/sidebartab" $field="tiddler-title" $value=<<deleteTiddler>>/><$action-setfield $tiddler="$:/backup/sidebartab" text=<<currentTab>>/><$action-deletetiddler $tiddler=<<deleteTiddler>>/><$action-setfield $tiddler=<<backupTitle>> $value=<<backupTab>>/></$vars></$set></$list>{{$:/plugins/BTC/tiddly-touch/icons!!view-stream}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!fill-gaps" type="nomatch" text="yes">
<$button class="tc-btn-invisible" tooltip="fill gaps on">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="fill-gaps" $value="yes"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-quilt}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!fill-gaps" type="match" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon tc-selected" tooltip="fill gaps off">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="fill-gaps" $value="no"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-quilt}}
</$button>
</$reveal>
\define filter-grid-actions(yesno)
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="grid-filter" $value="$yesno$"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>
\end
<$reveal state="$:/temp/search" type="nomatch" text="">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!grid-filter" type="nomatch" text="yes"><$button class="tc-btn-invisible" tooltip="filter grid"><<filter-grid-actions "yes">><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="grid-filter-search" $value={{$:/temp/search}}/>{{$:/plugins/BTC/tiddly-touch/icons!!filter-list}}</$button></$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!grid-filter" type="match" text="yes"><$button class="tc-btn-invisible tc-selected" tooltip="reset filter"><<filter-grid-actions "no">><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="grid-filter-search" $value=""/>{{$:/plugins/BTC/tiddly-touch/icons!!filter-list}}</$button></$reveal>
<$list filter="[list[$:/StoryList]has[muuri-tiddler-width]!has[muuri-tiddler-width-px]!has[muuri-tiddler-height-px]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)$]limit[1]] [list[$:/StoryList]has[muuri-tiddler-width-px]!has[muuri-tiddler-height-px]!has[muuri-tiddler-width]get[muuri-tiddler-width-px]regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)]limit[1]] [list[$:/StoryList]has[muuri-tiddler-height-px]get[muuri-tiddler-height-px]regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)]limit[1]]">
<$button class="tc-btn-invisible tc-toolbar-icon" tooltip="free willy!">
<$list filter="[list[$:/StoryList]has[muuri-tiddler-width]]">
<$fieldmangler tiddler=<<currentTiddler>>><$action-sendmessage $message="tm-remove-field" $param="muuri-tiddler-width"/></$fieldmangler></$list><$list filter="[list[$:/StoryList]has[muuri-tiddler-width-px]]">
<$fieldmangler tiddler=<<currentTiddler>>><$action-sendmessage $message="tm-remove-field" $param="muuri-tiddler-width-px"/></$fieldmangler></$list><$list filter="[list[$:/StoryList]has[muuri-tiddler-height-px]]">
<$fieldmangler tiddler=<<currentTiddler>>><$action-sendmessage $message="tm-remove-field" $param="muuri-tiddler-height-px"/></$fieldmangler></$list>{{$:/plugins/BTC/tiddly-touch/icons!!adjust-icon}}</$button>
</$list>
\whitespace trim
\define config-title()
$:/config/ViewToolbarButtons/Visibility/$(listItem)$
\end
<$button popup=<<morePopupState>> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/down-arrow}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text">
<$text text=" "/>
<$text text={{$:/language/Buttons/More/Caption}}/>
</span>
</$list>
</$button>
<$reveal state=<<morePopupState>> type="popup" position="left" animate="yes">
<div class="tc-drop-down">
<$set name="tv-config-toolbar-icons" value="yes">
<$set name="tv-config-toolbar-text" value="yes">
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem">
<$reveal type="match" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
</$set>
</$set>
</$set>
</div>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="nomatch" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="nomatch" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-titles" $value="yes"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility}}
</$button>
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="nomatch" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-tags" $value="yes"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-blue}}
</$button>
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-controls" $value="yes"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-green}}
</$button>
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="match" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-titles" $value="no"/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-tags" $value="no"/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-controls" $value="no"/>{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-red}}
</$button>
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window" type="nomatch" text="yes">
<$reveal state="$:/state/sidebar" type="nomatch" text="no">
<$button set="$:/state/sidebar" setTo="no" tooltip={{$:/language/Buttons/HideSideBar/Hint}} aria-label={{$:/language/Buttons/HideSideBar/Caption}} class="tc-btn-invisible tc-muuri-search-trigger">{{$:/core/images/chevron-right}}</$button>
</$reveal>
<$reveal state="$:/state/sidebar" type="match" text="no">
<$button set="$:/state/sidebar" setTo="yes" tooltip={{$:/language/Buttons/ShowSideBar/Hint}} aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class="tc-btn-invisible tc-muuri-search-trigger">{{$:/core/images/chevron-left}}</$button>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window" type="match" text="yes">
<$button tooltip="open sidebar in new window" aria-label={{$:/language/Buttons/ShowSideBar/Caption}} class="tc-btn-invisible tc-muuri-search-trigger">{{$:/core/images/chevron-left}}
<$action-sendmessage $message="tm-open-window" $param="$:/core/ui/PageTemplate/sidebar-new-window"/></$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="nomatch" text="yes">
<$button class="tc-btn-invisible" tooltip="align tiddlers horizontally">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-horizontal" $value="yes"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-vertical}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="match" text="yes">
<$button class="tc-btn-invisible" tooltip="align tiddlers vertically">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-horizontal" $value="no"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!view-horizontal}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-right" type="nomatch" text="yes">
<$button class="tc-btn-invisible" tooltip="tiddlers aligned left">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-right" $value="yes"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!format-align-left}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-right" type="match" text="yes">
<$button class="tc-btn-invisible" tooltip="tiddlers aligned right">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/configPageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-right" $value="no"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!format-align-right}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-bottom" type="nomatch" text="yes">
<$button class="tc-btn-invisible" tooltip="tiddlers aligned to the top">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-bottom" $value="yes"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!vertical-align-top}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-bottom" type="match" text="yes">
<$button class="tc-btn-invisible" tooltip="tiddlers aligned to the bottom">
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="align-bottom" $value="no"/><$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>{{$:/plugins/BTC/tiddly-touch/icons!!vertical-align-bottom}}
</$button>
</$reveal>
\define before-actions()
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/>
\end
\define after-actions()
<$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>
\end
\define set-dragging-yes-no(yesno)
<<before-actions>><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="drag-enabled" $value="$yesno$"/><<after-actions>>
\end
\define getStoryListIndex(yesno)
<$set name="storyCount" filter="[list[$:/StoryList]count[]]">
<$list filter="[list[$:/plugins/BTC/tiddly-touch/lists/numbers]limit<storyCount>]">
<$list filter="[list[$:/StoryList]nth<currentTiddler>title[$(scrollTiddler)$]]" variable="scrollTiddlerIndex">
<<set-dragging-yes-no $yesno$>>
</$list>
</$list>
</$set>
\end
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!drag-enabled" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-dragging-button" tooltip="enable dragging">
<$set name="scrollTiddler" value=<<storyTiddler>>>
<$set name="storyList" filter="[list[$:/StoryList]]">
<<set-dragging-yes-no yes>>
</$set>
</$set>
{{$:/plugins/BTC/tiddly-touch/icons!!drag-button}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!drag-enabled" type="match" text="yes">
<$button class="tc-btn-invisible tc-selected tc-dragging-button" tooltip="disable dragging">
<$set name="scrollTiddler" value=<<storyTiddler>>>
<$set name="storyList" filter="[list[$:/StoryList]]">
<<set-dragging-yes-no no>>
</$set>
</$set>
{{$:/plugins/BTC/tiddly-touch/icons!!drag-button}}
</$button>
</$reveal>
\define columnicons()
{{$:/plugins/BTC/tiddly-touch/icons!!adjust-icon}}
\end
\define next-tiddler-action()
<$list filter="[[$(nextValue)$]regexp[^(1|2|3|4|5|6|7|8|9|10|11|12)$]]">
<$action-setfield $tiddler="""$(nextStoryTiddler)$""" $field="muuri-tiddler-width" $value="$(nextNextValue)$" $timestamp="no"/>
</$list>
<$list filter="[[$(nextValue)$]regexp[^0$]]">
<$set name="columnCount" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>
<$set name="remainingSpace" filter="1 3 2 8 9 7 5 6 4 10 +[nth<columnCount>]">
<$action-setfield $tiddler="""$(nextStoryTiddler)$""" $field="muuri-tiddler-width" $value=<<remainingSpace>> $timestamp="no"/>
</$set>
</$set>
</$list>
<$list filter="[[$(nextValue)$]!regexp[^(0|1|2|3|4|5|6|7|8|9|10|11|12)$]]">
<$action-setfield $tiddler="""$(nextStoryTiddler)$""" $field="muuri-tiddler-width" $value="7" $timestamp="no"/>
</$list>
\end
\define enslave-next-tiddler-button()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!adjacent-tiddler-width" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-2" tooltip="link with $(nextStoryTiddler)$">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="adjacent-tiddler-width" $value="yes"/>
{{$:/plugins/BTC/tiddly-touch/icons!!link-icon}}
</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!adjacent-tiddler-width" type="match" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-2 tc-selected blue-icon" tooltip="don't link with $(nextStoryTiddler)$">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="adjacent-tiddler-width" $value="no"/>
{{$:/plugins/BTC/tiddly-touch/icons!!link-icon}}
</$button>
</$reveal>
\end
\define toggle-tiddler-width()
<span class="tc-topleft-span">
<$list filter="[[$(storyTiddler)$]next[$:/StoryList]]" variable="nextStoryTiddler">
<$set name="tiddlerWidth" filter="[[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6)$]] [[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]!regexp[^(0|1|2|3|4|5|6)$]addprefix[0]] [[$(storyTiddler)$]!has[muuri-tiddler-width]addprefix[0]removesuffix[$(storyTiddler)$]]">
<$set name="nextValue" filter="[<tiddlerWidth>next[$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]]">
<$set name="nextNextValue" filter="0 4 3 2 8 6 +[nth<nextValue>]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft" tooltip="toggle tiddler width">
<$list filter="[<tiddlerWidth>!regexp[^0$]]">
<$action-setfield $tiddler="""$(storyTiddler)$""" $field="muuri-tiddler-width" $value=<<nextValue>> $timestamp="no"/>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[adjacent-tiddler-width]regexp[^yes$]]">
<$list filter="[<nextStoryTiddler>!regexp[^$]]">
<<next-tiddler-action>>
</$list>
</$list>
</$list>
<$list filter="[<tiddlerWidth>regexp[^0$]]">
<$action-setfield $tiddler="""$(storyTiddler)$""" $field="muuri-tiddler-width" $value="6" $timestamp="no"/>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[adjacent-tiddler-width]regexp[^yes$]]">
<$list filter="[<nextStoryTiddler>!regexp[^$]]">
<<next-tiddler-action>>
</$list>
</$list>
</$list>
<<columnicons>>
</$button>
</$set></$set></$set>
<<enslave-next-tiddler-button>>
</$list>
<$set name="storyListCount" filter="[list[$:/StoryList]count[]]">
<$list filter="[list[$:/StoryList]nth<storyListCount>regexp[$(storyTiddler)$]]">
<$set name="tiddlerWidth" filter="[[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]regexp[^(0|1|2|3|4|5|6)$]] [[$(storyTiddler)$]has[muuri-tiddler-width]get[muuri-tiddler-width]!regexp[^(0|1|2|3|4|5|6)$]addprefix[0]] [[$(storyTiddler)$]!has[muuri-tiddler-width]addprefix[0]removesuffix[$(storyTiddler)$]]">
<$set name="nextValue" filter="[<tiddlerWidth>next[$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft" tooltip="toggle tiddler width">
<$list filter="[<tiddlerWidth>!regexp[^0$]]">
<$action-setfield $tiddler="""$(storyTiddler)$""" $field="muuri-tiddler-width" $value=<<nextValue>> $timestamp="no"/>
</$list>
<$list filter="[<tiddlerWidth>regexp[^0$]]">
<$action-setfield $tiddler="""$(storyTiddler)$""" $field="muuri-tiddler-width" $value="6" $timestamp="no"/>
</$list>
<<columnicons>>
</$button>
</$set></$set>
</$list>
</$set>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!plus-minus-one-px" type="match" text="yes">
<$list filter="[[$(thisTiddler)$]has[muuri-tiddler-width-px]get[muuri-tiddler-width-px]regexp[^(0|1|2|3|4|5|6|7|8|9)]]">
<$set name="nextWidthPx" filter="[[$(thisTiddler)$]get[muuri-tiddler-width-px]next[$:/plugins/BTC/tiddly-touch/lists/numbers]]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-3" tooltip="width: +1 pixel"><$action-setfield $tiddler="$(thisTiddler)$" $field="muuri-tiddler-width-px" $value=<<nextWidthPx>>/>{{$:/plugins/BTC/tiddly-touch/icons!!plus-one}}</$button></$set></$list>
<$list filter="[[$(thisTiddler)$]has[muuri-tiddler-height-px]get[muuri-tiddler-height-px]regexp[^(0|1|2|3|4|5|6|7|8|9)]]">
<$set name="nextHeightPx" filter="[[$(thisTiddler)$]get[muuri-tiddler-height-px]next[$:/plugins/BTC/tiddly-touch/lists/numbers]]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-4" tooltip="height: +1 pixel"><$action-setfield $tiddler="$(thisTiddler)$" $field="muuri-tiddler-height-px" $value=<<nextHeightPx>>/>{{$:/plugins/BTC/tiddly-touch/icons!!plus-one}}</$button></$set></$list>
<$list filter="[[$(thisTiddler)$]has[muuri-tiddler-width-px]get[muuri-tiddler-width-px]regexp[^(0|1|2|3|4|5|6|7|8|9)]]">
<$set name="previousWidthPx" filter="[[$(thisTiddler)$]get[muuri-tiddler-width-px]previous[$:/plugins/BTC/tiddly-touch/lists/numbers]]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-5" tooltip="width: -1 pixel"><$action-setfield $tiddler="$(thisTiddler)$" $field="muuri-tiddler-width-px" $value=<<previousWidthPx>>/>{{$:/plugins/BTC/tiddly-touch/icons!!minus-one}}</$button></$set></$list>
<$list filter="[[$(thisTiddler)$]has[muuri-tiddler-height-px]get[muuri-tiddler-height-px]regexp[^(0|1|2|3|4|5|6|7|8|9)]]">
<$set name="previousHeightPx" filter="[[$(thisTiddler)$]get[muuri-tiddler-height-px]previous[$:/plugins/BTC/tiddly-touch/lists/numbers]]">
<$button class="tc-btn-invisible tc-toolbar-icon tc-toolbar-icon-topleft-6" tooltip="height: -1 pixel"><$action-setfield $tiddler="$(thisTiddler)$" $field="muuri-tiddler-height-px" $value=<<previousHeightPx>>/>{{$:/plugins/BTC/tiddly-touch/icons!!minus-one}}</$button></$set></$list>
</$reveal>
</span>
\end
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!topleft-width-button" type="nomatch" text="no">
<$set name="thisTiddler" value=<<currentTiddler>>>
<<toggle-tiddler-width>>
</$set>
</$reveal>
\define class-entries()
<$reveal state="$:/plugins/BTC/tiddly-touch/CSS/user-styles##$(newCSSIndex)$" type="nomatch" text="">
#enter a name in the first field an a value in the second
#* ''Name:'' <$edit-text tiddler="$:/temp/tiddly-touch/css-manager" field="user-style-entry-name"/> ''Value:'' <$edit-text tiddler="$:/temp/tiddly-touch/css-manager" field="user-style-entry-value"/>
</$reveal>
\end
#enter a css class like `.tc-tiddler-frame .tc-title`, `span.tc-tiddler-controls svg` ...
#* ''Class:'' <$edit-text tiddler="$:/temp/tiddly-touch/css-manager" field="user-class-entry"/><$reveal state="$:/temp/tiddly-touch/css-manager!!user-class-entry" type="nomatch" text="">
<$set name="newCSSIndex" filter="[[$:/plugins/BTC/tiddly-touch/CSS/user-styles]indexes[]count[]]">
<<newCSSIndex>>
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/CSS/user-styles" $index={{$:/temp/tiddly-touch/css-manager!!user-class-entry}} $value=""/>save</$button></$set></$reveal><<class-entries>>
\define before-actions()
<$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri">
<$action-sendmessage $message="tm-remove-tag" $param="$:/tags/PageTemplate"/></$fieldmangler><$action-setfield $tiddler="$:/view" $value=""/>
\end
\define after-actions()
<$action-setfield $tiddler="$:/view" $value="muuri"/><$fieldmangler tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/muuri"><$action-sendmessage $message="tm-add-tag" $param="$:/tags/PageTemplate"/></$fieldmangler>
\end
\define hide-show-leftbar-actions(setting)
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]!regexp[^yes$]]">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-leftbar" $value="yes"/>
</$list>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[hide-leftbar]regexp[^yes$]]">
<$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="hide-leftbar" $value="no"/>
</$list>
\end
\define muuri-user-actions(setting)
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[$setting$]!regexp[^yes$]]">
<<before-actions>><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="$setting$-user" $value="yes"/><<after-actions>>
</$list>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[$setting$]regexp[^yes$]]">
<<before-actions>><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="$setting$-user" $value="no"/><$action-setfield $tiddler="$:/view" $value="muuri"/><<after-actions>>
</$list>
\end
\define muuri-user-checkbox(setting,checkedunchecked,reload-yesno)
<$set name="description" value={{$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!description-$setting$}}>
<$list filter="[[$reload-yesno$]!regexp[^noreload$]]">
<$checkbox tiddler="$:/plugins/BTC/tiddly-touch/config" field="$setting$" $checkedunchecked$ actions=<<muuri-user-actions $setting$>>> <<description>></$checkbox>
</$list>
<$list filter="[[$reload-yesno$]regexp[^noreload$]]">
<$checkbox tiddler="$:/plugins/BTC/tiddly-touch/config" field="$setting$" $checkedunchecked$> <<description>></$checkbox>
</$list>
</$set>
\end
\define muuri-user-setting-field(setting)
<$set name="description" value={{$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!description-$setting$}}>
<$edit-text tiddler="$:/plugins/BTC/tiddly-touch/config" field="$setting$"/> <<description>>
</$set>
\end
\define get-muuri-user-action(reload-yesno)
<<muuri-user-checkbox "$(listItem)$" 'checked="yes" unchecked="no" '>>
\end
\define get-muuri-user-action-reverted()
<<muuri-user-checkbox "$(listItem)$" 'checked="no" unchecked="yes" ' $reload-yesno$>>
\end
Tweak TiddlyTouch to your likings
<hr>
<$checkbox tiddler="$:/plugins/BTC/tiddly-touch/config" field="sidebar-new-window" checked="yes" unchecked="no"> leftbar sidebar button (top right button will behave the standard way): open sidebar in new window on/off</$checkbox>
<$list filter="[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes]]" variable="listItem">
<<get-muuri-user-action>>
</$list>
<$list filter="[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes-noreload]]" variable="listItem">
<<get-muuri-user-action noreload>>
</$list>
<$list filter="[list[$:/plugins/BTC/tiddly-touch/ControlPanel/settings!!user-checkboxes-reverted]]" variable="listItem">
<<get-muuri-user-action-reverted>>
</$list>
<$checkbox tiddler="$:/plugins/BTC/tiddly-touch/PageTemplate/LeftBar" tag="$:/tags/PageTemplate" invertTag="yes" actions=<<hide-show-leftbar-actions>>> hide the left bar</$checkbox>
<<muuri-user-checkbox "drag-sort-action" ' checked="swap" unchecked="move" '>>
<<muuri-user-setting-field "horizontal-view-height">>
<<muuri-user-setting-field "zoom-sensitivity">>
<<muuri-user-setting-field "pinch-zoom-sensitivity">>
{{$:/plugins/BTC/tiddly-touch/AddOns/snippets/sidebar-opacity}}
> For the following settings to take effect a muuri reload is needed. The simplest way to do that is switching to the normal view and back
<br>
<<muuri-user-setting-field "show-duration">>
<<muuri-user-setting-field "hide-duration">>
<<muuri-user-setting-field "animation-duration">>
\rules only filteredtranscludeinline transcludeinline macrocallinline macrocallblock
/* this will be included in 5.1.16 */
<<if-background-attachment """
body.tc-body {
background-color: transparent;
}
""">>
/* ******************************* */
/* set up basic CSS for muuri */
.tc-muuri-grid {
position: relative;
}
.tc-tiddler-frame {
display: block;
position: absolute;
width: 100%;
margin: 8px;
max-width: 100%;
}
.tc-tiddler-frame.tc-dragover {
z-index: 2;
}
.tc-tiddler-frame.muuri-hidden {
z-index: 0;
display: none;
}
.tc-tiddler-frame:hover, .tc-tiddler-frame:focus {
z-index: 3;
}
.tc-tiddler-frame-content {
position: relative;
width: 100%;
height: 100%;
}
/* a high z-index for tiddlers being
dragged, so that they stay on top of
others */
.tc-tiddler-frame.tc-dragging {
z-index: 100;
}
/* basic muuri setup done */
/* ******************************* */
/* story-river top-padding */
.tc-story-river {
padding-top: 0px !important;
}
/* this is needed for transparency in sidebar */
<<if-no-sidebar "
.tc-sidebar-scrollable {
display: none;
}
.tc-topbar-right {
right: 10px;
}
">>
/* sidebar shouldn't cover alerts
.tc-alert, .tc-alerts {
z-index: 300;
} */
.tc-btn-invisible.tc-toolbar-icon {
color: <<colour muted-foreground>>;
vertical-align: sub;
}
.tc-btn-invisible.tc-toolbar-icon:hover {
color: <<colour foreground>>;
}
.tc-tiddler-frame {
background-color: <<colour tiddler-background>>{{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}} !important;
}
.tc-tiddler-frame.span-4 iframe {
min-height: calc(100vh / 4);
}
.tc-tiddler-frame.span-6 iframe {
min-height: calc(100vh / 3);
}
.tc-tiddler-frame.span-9 iframe, .tc-tiddler-frame.span-12 iframe {
min-height: calc(100vh / 2);
}
.tc-tiddler-frame img, .tc-tiddler-frame image { position: relative; display: block; z-index: -1 }
@media (max-height: 500px) {
.tc-image-full-screen-button {
fill: <<colour primary>> !important;
}
.tc-story-river {
padding: 0px 0px 0px 25px;
}
}
@media (max-width: 500px) {
.tc-tiddler-frame {
padding: 14px 28px 14px 14px;
}
.tc-topbar-right {
display: none !important;
}
.tc-story-river {
padding: 0px 0px 0px 25px !important;
}
/* FIXME: include this in macro */
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar" type="nomatch" text="no">
.tc-tiddler-frame {
min-height: 130px;
}
</$reveal>
.tc-image-full-screen-button {
fill: <<colour primary>> !important;
}
}
<<if-horizontal-grid """
.tc-muuri-grid {
height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
max-height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
min-width: 100%;
}
.tc-story-river {
height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
max-height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
min-width: calc(100vw - 84px);
}
.tc-sidebar-scrollable {
}
.tc-tiddler-frame {
max-width: 100vw;
}
""">>
.tc-muuri-grid .tc-drop-down {
min-width: 240px;
}
<<if-dragging-enabled """
.tc-dragging-button {
color: <$macrocall $name="colour" name="very-muted-foreground"/>;
}
""">>
@media (min-width: 900px) {
.tc-sidebar-scrollable {
background-color: <<colour background>>{{$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity}} !important;
background: <<colour background>>{{$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity}} ;
z-index: 200;
box-shadow: -1px 0px 1px 1px <<colour muted-foreground>>;
}
}
<<if-sidebar """
.tc-topbar-right {
z-index: 1000 !important;
}
.tc-story-river {
padding-right: 42px !important;
margin-right: 0px !important;
}
""">>
.tc-tiddler-frame.span-4 , .tc-tiddler-frame.span-5, .tc-tiddler-frame.span-6, .tc-tiddler-frame.span-7, .tc-tiddler-frame.span-8, .tc-tiddler-frame.span-9, .tc-tiddler-frame.span-10, .tc-tiddler-frame.span-11, .tc-tiddler-frame.span-12, .tc-tiddler-frame.span-13 {
padding-left: 42px;
padding-right: 42px;
}
<<vertical-toolbar-yes-no>>
<<vertical-toolbar-macro>>
<<toggle-muuri-columns>>
.span-4 .tc-tiddler-controls, .span-5 .tc-tiddler-controls, .span-6 .tc-tiddler-controls, .span-7 .tc-tiddler-controls, .span-8 .tc-tiddler-controls, .span-9 .tc-tiddler-controls, .span-10 .tc-tiddler-controls, .span-11 .tc-tiddler-controls, .span-12 .tc-tiddler-controls, .span-13 .tc-tiddler-controls {
right: -60px !important;
}
.span-4 .tc-tiddler-info, .span-5 .tc-tiddler-info, .span-13 .tc-tiddler-info, .span-6 .tc-tiddler-info, .span-7 .tc-tiddler-info, .span-8 .tc-tiddler-info, .span-9 .tc-tiddler-info, .span-10 .tc-tiddler-info, .span-11 .tc-tiddler-info, .span-12 .tc-tiddler-info {
margin-left: -20px;
margin-right: -20px;
padding-left: 10px;
padding-right: 10px;
}
.span-4 .tc-unfold-banner, .span-5 .tc-unfold-banner, .span-6 .tc-unfold-banner, .span-7 .tc-unfold-banner, .span-8 .tc-unfold-banner, .span-9 .tc-unfold-banner, .span-10 .tc-unfold-banner, .span-11 .tc-unfold-banner, .span-12 .tc-unfold-banner, .span-13 .tc-unfold-banner {
margin-left: -43px;
width: 100%;
}
.span-4 .tc-fold-banner, .span-5 .tc-fold-banner, .span-6 .tc-fold-banner, .span-7 .tc-fold-banner, .span-8 .tc-fold-banner, .span-9 .tc-fold-banner, .span-10 .tc-fold-banner, .span-11 .tc-fold-banner, .span-12 .tc-fold-banner, .span-13 .tc-fold-banner {
margin-left: -35px;
width: 23px;
}
.tc-leftbar , div.tc-leftbar-open {
position: fixed;
z-index: 1200;
}
.tc-leftbar button {
padding: 8px;
}
.tc-leftbar svg {
fill: <<colour muted-foreground>>;
}
.tc-leftbar button:hover svg {
fill: <<colour foreground>>;
}
.tc-leftbar {
position: fixed;
top: 5vh;
left: 0px;
width: 32px;
font-size: 1.6em !important;
padding-left:6px;
}
div.tc-leftbar-open {
position: fixed;
bottom: 10vh;
right:0px;
width: 42px;
font-size: 1.6rem;
}
span.tc-leftbar-open a {
display: none;
}
.tc-leftbar-open span:hover > .tc-leftbar-open span > a {
display: inline-block !important;
}
@media (max-height: 500px) {
.tc-leftbar {
position: fixed;
top: -1vh;
left: 0px;
width: 25px;
font-size: 1.2rem !important;
padding-left:2px;
}
.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {
width: 0.8em;
right: -27px;
position: fixed;
top: -20px;
}
.tc-leftbar .tc-btn-invisible {
padding: 1px 4px 1px 4px;
}
.tc-leftbar .material-icons {
font-size: 1.2rem !important;
}
.tc-topbar-right {
display: none !important;
}
.tc-tiddler-frame {
padding: 14px 28px 14px 14px;
}
}
@media (max-width: 500px) {
.tc-leftbar {
position: fixed;
top: 0vh;
left: 0px;
width: 20px;
font-size: 1.2em !important;
padding-left:0px;
}
.tc-leftbar .material-icons {
font-size: 1.2em !important;
}
}
<<tiddly-touch-toolbar-left-right>>
.tc-btn-invisible.tc-toolbar-icon {
color: <<colour muted-foreground>>;
vertical-align: sub;
}
.tc-btn-invisible.tc-toolbar-icon:hover {
color: <<colour foreground>>;
}
.tc-sidebar-lists .tc-tiddler-edit-frame {
width: calc(100% - 42px) !important;
}
@media (max-width: 500px) {
.tc-story-river .tc-tiddler-edit-frame {
}
.tc-leftbar {
display: none;
}
.tc-story-river {
padding: 1% 1% 0% 1% !important;
width: 100%;
}
<<mobile-portrait-tiles>>
}
.tc-single-tiddler-window .tc-sidebar-window {
position: absolute;
width: 100%;
height: 100%;
padding: 3% 3% 0% 3%;
}
.tc-single-tiddler-window {
background-color: <<colour page-background>> !important;
}
.tc-single-tiddler-window .tc-sidebar-window:not(.tc-sidebar-lists) .tc-tiddler-edit-frame {
border: 0px solid <<colour page-background>> !important;
padding: 2% 2% 2% 2% !important;
box-shadow: none !important;
width: 90% !important;
}
<<sidebar-new-window-tiddler-edit-frame-hide>>
.tc-leftbar button.tc-selected {
-webkit-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
-moz-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
}
.tc-leftbar button.tc-selected svg {
fill: <<colour tiddler-controls-foreground-selected>>;
}
.tc-leftbar .tc-btn-invisible.tc-toolbar-icon.tc-selected.tc-dragging-button {
color: <<colour tiddler-controls-foreground-selected>> !important;
}
svg.blue-icon, svg.blue-icon:hover, .tc-tiddler-controls button svg.blue-icon {
fill: <<colour primary>>;
}
svg.green-icon, svg.green-icon:hover {
fill: <<colour download-background>>;
}
svg.red-icon, svg.red-icon:hover {
fill: <<colour code-foreground>>;
}
<<hide-controls-from-user>>
button.no-outline {
outline: none !important;
}
<<hide-tiddler-borders-and-gaps>>
.tc-dragging img, .tc-dragging image, .muuri-item-dragging img, .muuri-item-dragging image, .tc-dragging svg, .tc-dragging iframe {
opacity: 0.3 !important;
}
.tc-btn-invisible {
outline: none !important;
}
.limit-image img, .limit-image image, .limit-image svg {
max-width: 100%;
position: relative;
}
.tc-btn-invisible.tc-text-button {
color: <<colour muted-foreground>>;
}
.tc-btn-invisible.tc-text-button.tc-selected {
color: <<colour foreground>>;
font-weight: 500;
}
.tc-btn-invisible.tc-text-button:hover {
color: <<colour foreground>>;
}
/* this is good */
.tc-tiddler-frame.tc-tiddler-more-popup {
z-index: 5;
}
.tc-toolbar-icon-topleft {
position: fixed;
top: 5px;
font-size: 1.3em;
left: 30px;
}
.tc-toolbar-icon-topleft-2 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 60px;
}
.tc-toolbar-icon-topleft-3 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 80px;
}
.tc-toolbar-icon-topleft-4 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 120px;
}
.tc-toolbar-icon-topleft-5 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 100px;
}
.tc-toolbar-icon-topleft-6 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 140px;
}
.tc-toolbar-icon-topleft-2 svg, .tc-toolbar-icon-topleft-3 svg, .tc-toolbar-icon-topleft-4 svg, .tc-toolbar-icon-topleft-5 svg, .tc-toolbar-icon-topleft-6 svg {
fill: <<colour muted-foreground>>;
vertical-align: bottom;
}
.tc-toolbar-icon-topleft svg {
fill: <<colour muted-foreground>>;
}
.tc-topleft-span:hover .tc-toolbar-icon-topleft-2 svg {
fill: <<colour muted-foreground>>;
}
.tc-topleft-span:hover .tc-toolbar-icon-topleft svg, .tc-topleft-span:hover .tc-toolbar-icon-topleft-2.tc-selected svg, .tc-toolbar-icon-topleft-2.tc-selected svg {
fill: <<colour primary>>;
}
<<show-hide-tiddler-title-tags>>
.tc-tiddler-frame {
background-color: <<colour tiddler-background>>{{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}} !important;
}
.tc-tiddler-frame.tc-sidebar-muuri-grid-frame {
padding: 0px 5px 5px 5px !important;
min-height: 3vh !important;
}
.tc-sidebar-muuri-grid-frame .tc-tiddler-body {
font-size: 0.2em !important;
line-height: 3px !important;
}
.tc-muuri-sidebar-grid {
width: calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}} - 100px);
}
/*.tc-tiddler-frame {
overflow-y: scroll;
}*/
/*.tc-tiddler-frame:not(.tc-tiddler-edit-frame) {
max-height: calc(100% - 0px);
overflow-y: -webkit-paged-x;
}
.tc-tiddler-frame::-webkit-scrollbar {
display: none;
}*/
<<exact-tiddler-width>>
/*<<exact-tiddler-height>>*/
svg.placeholder {
max-width: 100%;
background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMiAzMiIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIiBmaWxsPSJ3aGl0ZSI+CiAgPHBhdGggZD0iTTAgNCBMMCAyOCBMMzIgMjggTDMyIDQgeiBNNCAyNCBMMTAgMTAgTDE1IDE4IEwxOCAxNCBMMjQgMjR6IE0yNSA3IEE0IDQgMCAwIDEgMjUgMTUgQTQgNCAwIDAgMSAyNSA3Ij48L3BhdGg+Cjwvc3ZnPg==") no-repeat center hsl(0, 0%, 80%);
background-size: calc(100%/3);
}
.ph-circle {
border-radius: 100%;
}
span.placeholder,
span.placeholder a {
background: hsl(0, 0%, 80%);
color: hsl(0, 0%, 80%);
}
button span.placeholder,
button span.placeholder a {
background: hsl(0, 0%, 100%);
color: hsl(0, 0%, 100%);
}
button.placeholder {
background: hsl(0, 0%, 60%);
padding: 1em;
border: 0;
border-radius: 2px;
color: white;
text-transform: uppercase;
font-weight: bold;
letter-spacing: .1em;
font-size: .8rem;
}
hr.placeholder {
border: 0;
height: .25em;
background: hsla(0, 0%, 80%, .25);
margin: 2rem 0;
}
/* Testing broken image style */
img.placeholder {
font-family: inherit;
text-align: center;
width: 100%;
height: auto;
display: block;
position: relative;
}
img.placeholder.broken-3 {
position: relative;
min-height: 50px;
}
img.placeholder.broken-3:before {
content: " ";
display: block;
position: absolute;
top: -10px;
left: 0;
height: calc(100% + 10px);
width: 100%;
background-color: silver;
}
img.placeholder.broken-3:after {
content: "\f127" " Broken Image (" attr(alt) ")";
display: block;
font-family: FontAwesome;
color: white;
position: absolute;
top: 5px;
left: 0;
width: 100%;
text-align: center;
}
<svg class="tc-image-button" width="24pt" height="24pt" />
/*! Hammer.JS - v2.0.8 - 2016-04-23
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
(function(window, document, exportName, undefined) {
'use strict';
var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
var TEST_ELEMENT = document.createElement('div');
var TYPE_FUNCTION = 'function';
var round = Math.round;
var abs = Math.abs;
var now = Date.now;
/**
* set a timeout with a given scope
* @param {Function} fn
* @param {Number} timeout
* @param {Object} context
* @returns {number}
*/
function setTimeoutContext(fn, timeout, context) {
return setTimeout(bindFn(fn, context), timeout);
}
/**
* if the argument is an array, we want to execute the fn on each entry
* if it aint an array we don't want to do a thing.
* this is used by all the methods that accept a single and array argument.
* @param {*|Array} arg
* @param {String} fn
* @param {Object} [context]
* @returns {Boolean}
*/
function invokeArrayArg(arg, fn, context) {
if (Array.isArray(arg)) {
each(arg, context[fn], context);
return true;
}
return false;
}
/**
* walk objects and arrays
* @param {Object} obj
* @param {Function} iterator
* @param {Object} context
*/
function each(obj, iterator, context) {
var i;
if (!obj) {
return;
}
if (obj.forEach) {
obj.forEach(iterator, context);
} else if (obj.length !== undefined) {
i = 0;
while (i < obj.length) {
iterator.call(context, obj[i], i, obj);
i++;
}
} else {
for (i in obj) {
obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
}
}
}
/**
* wrap a method with a deprecation warning and stack trace
* @param {Function} method
* @param {String} name
* @param {String} message
* @returns {Function} A new function wrapping the supplied method.
*/
function deprecate(method, name, message) {
var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
return function() {
var e = new Error('get-stack-trace');
var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
.replace(/^\s+at\s+/gm, '')
.replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';
var log = window.console && (window.console.warn || window.console.log);
if (log) {
log.call(window.console, deprecationMessage, stack);
}
return method.apply(this, arguments);
};
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} target
* @param {...Object} objects_to_assign
* @returns {Object} target
*/
var assign;
if (typeof Object.assign !== 'function') {
assign = function assign(target) {
if (target === undefined || target === null) {
throw new TypeError('Cannot convert undefined or null to object');
}
var output = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source !== undefined && source !== null) {
for (var nextKey in source) {
if (source.hasOwnProperty(nextKey)) {
output[nextKey] = source[nextKey];
}
}
}
}
return output;
};
} else {
assign = Object.assign;
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} dest
* @param {Object} src
* @param {Boolean} [merge=false]
* @returns {Object} dest
*/
var extend = deprecate(function extend(dest, src, merge) {
var keys = Object.keys(src);
var i = 0;
while (i < keys.length) {
if (!merge || (merge && dest[keys[i]] === undefined)) {
dest[keys[i]] = src[keys[i]];
}
i++;
}
return dest;
}, 'extend', 'Use `assign`.');
/**
* merge the values from src in the dest.
* means that properties that exist in dest will not be overwritten by src
* @param {Object} dest
* @param {Object} src
* @returns {Object} dest
*/
var merge = deprecate(function merge(dest, src) {
return extend(dest, src, true);
}, 'merge', 'Use `assign`.');
/**
* simple class inheritance
* @param {Function} child
* @param {Function} base
* @param {Object} [properties]
*/
function inherit(child, base, properties) {
var baseP = base.prototype,
childP;
childP = child.prototype = Object.create(baseP);
childP.constructor = child;
childP._super = baseP;
if (properties) {
assign(childP, properties);
}
}
/**
* simple function bind
* @param {Function} fn
* @param {Object} context
* @returns {Function}
*/
function bindFn(fn, context) {
return function boundFn() {
return fn.apply(context, arguments);
};
}
/**
* let a boolean value also be a function that must return a boolean
* this first item in args will be used as the context
* @param {Boolean|Function} val
* @param {Array} [args]
* @returns {Boolean}
*/
function boolOrFn(val, args) {
if (typeof val == TYPE_FUNCTION) {
return val.apply(args ? args[0] || undefined : undefined, args);
}
return val;
}
/**
* use the val2 when val1 is undefined
* @param {*} val1
* @param {*} val2
* @returns {*}
*/
function ifUndefined(val1, val2) {
return (val1 === undefined) ? val2 : val1;
}
/**
* addEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function addEventListeners(target, types, handler) {
each(splitStr(types), function(type) {
target.addEventListener(type, handler, false);
});
}
/**
* removeEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function removeEventListeners(target, types, handler) {
each(splitStr(types), function(type) {
target.removeEventListener(type, handler, false);
});
}
/**
* find if a node is in the given parent
* @method hasParent
* @param {HTMLElement} node
* @param {HTMLElement} parent
* @return {Boolean} found
*/
function hasParent(node, parent) {
while (node) {
if (node == parent) {
return true;
}
node = node.parentNode;
}
return false;
}
/**
* small indexOf wrapper
* @param {String} str
* @param {String} find
* @returns {Boolean} found
*/
function inStr(str, find) {
return str.indexOf(find) > -1;
}
/**
* split string on whitespace
* @param {String} str
* @returns {Array} words
*/
function splitStr(str) {
return str.trim().split(/\s+/g);
}
/**
* find if a array contains the object using indexOf or a simple polyFill
* @param {Array} src
* @param {String} find
* @param {String} [findByKey]
* @return {Boolean|Number} false when not found, or the index
*/
function inArray(src, find, findByKey) {
if (src.indexOf && !findByKey) {
return src.indexOf(find);
} else {
var i = 0;
while (i < src.length) {
if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
return i;
}
i++;
}
return -1;
}
}
/**
* convert array-like objects to real arrays
* @param {Object} obj
* @returns {Array}
*/
function toArray(obj) {
return Array.prototype.slice.call(obj, 0);
}
/**
* unique array with objects based on a key (like 'id') or just by the array's value
* @param {Array} src [{id:1},{id:2},{id:1}]
* @param {String} [key]
* @param {Boolean} [sort=False]
* @returns {Array} [{id:1},{id:2}]
*/
function uniqueArray(src, key, sort) {
var results = [];
var values = [];
var i = 0;
while (i < src.length) {
var val = key ? src[i][key] : src[i];
if (inArray(values, val) < 0) {
results.push(src[i]);
}
values[i] = val;
i++;
}
if (sort) {
if (!key) {
results = results.sort();
} else {
results = results.sort(function sortUniqueArray(a, b) {
return a[key] > b[key];
});
}
}
return results;
}
/**
* get the prefixed property
* @param {Object} obj
* @param {String} property
* @returns {String|Undefined} prefixed
*/
function prefixed(obj, property) {
var prefix, prop;
var camelProp = property[0].toUpperCase() + property.slice(1);
var i = 0;
while (i < VENDOR_PREFIXES.length) {
prefix = VENDOR_PREFIXES[i];
prop = (prefix) ? prefix + camelProp : property;
if (prop in obj) {
return prop;
}
i++;
}
return undefined;
}
/**
* get a unique id
* @returns {number} uniqueId
*/
var _uniqueId = 1;
function uniqueId() {
return _uniqueId++;
}
/**
* get the window object of an element
* @param {HTMLElement} element
* @returns {DocumentView|Window}
*/
function getWindowForElement(element) {
var doc = element.ownerDocument || element;
return (doc.defaultView || doc.parentWindow || window);
}
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
var SUPPORT_TOUCH = ('ontouchstart' in window);
var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
var INPUT_TYPE_TOUCH = 'touch';
var INPUT_TYPE_PEN = 'pen';
var INPUT_TYPE_MOUSE = 'mouse';
var INPUT_TYPE_KINECT = 'kinect';
var COMPUTE_INTERVAL = 25;
var INPUT_START = 1;
var INPUT_MOVE = 2;
var INPUT_END = 4;
var INPUT_CANCEL = 8;
var DIRECTION_NONE = 1;
var DIRECTION_LEFT = 2;
var DIRECTION_RIGHT = 4;
var DIRECTION_UP = 8;
var DIRECTION_DOWN = 16;
var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
var PROPS_XY = ['x', 'y'];
var PROPS_CLIENT_XY = ['clientX', 'clientY'];
/**
* create new input type manager
* @param {Manager} manager
* @param {Function} callback
* @returns {Input}
* @constructor
*/
function Input(manager, callback) {
var self = this;
this.manager = manager;
this.callback = callback;
this.element = manager.element;
this.target = manager.options.inputTarget;
// smaller wrapper around the handler, for the scope and the enabled state of the manager,
// so when disabled the input events are completely bypassed.
this.domHandler = function(ev) {
if (boolOrFn(manager.options.enable, [manager])) {
self.handler(ev);
}
};
this.init();
}
Input.prototype = {
/**
* should handle the inputEvent data and trigger the callback
* @virtual
*/
handler: function() { },
/**
* bind the events
*/
init: function() {
this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);
this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);
this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
},
/**
* unbind the events
*/
destroy: function() {
this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);
this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);
this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
}
};
/**
* create new input type manager
* called by the Manager constructor
* @param {Hammer} manager
* @returns {Input}
*/
function createInputInstance(manager) {
var Type;
var inputClass = manager.options.inputClass;
if (inputClass) {
Type = inputClass;
} else if (SUPPORT_POINTER_EVENTS) {
Type = PointerEventInput;
} else if (SUPPORT_ONLY_TOUCH) {
Type = TouchInput;
} else if (!SUPPORT_TOUCH) {
Type = MouseInput;
} else {
Type = TouchMouseInput;
}
return new (Type)(manager, inputHandler);
}
/**
* handle input events
* @param {Manager} manager
* @param {String} eventType
* @param {Object} input
*/
function inputHandler(manager, eventType, input) {
var pointersLen = input.pointers.length;
var changedPointersLen = input.changedPointers.length;
var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
input.isFirst = !!isFirst;
input.isFinal = !!isFinal;
if (isFirst) {
manager.session = {};
}
// source event is the normalized value of the domEvents
// like 'touchstart, mouseup, pointerdown'
input.eventType = eventType;
// compute scale, rotation etc
computeInputData(manager, input);
// emit secret event
manager.emit('hammer.input', input);
manager.recognize(input);
manager.session.prevInput = input;
}
/**
* extend the data with some usable properties like scale, rotate, velocity etc
* @param {Object} manager
* @param {Object} input
*/
function computeInputData(manager, input) {
var session = manager.session;
var pointers = input.pointers;
var pointersLength = pointers.length;
// store the first input to calculate the distance and direction
if (!session.firstInput) {
session.firstInput = simpleCloneInputData(input);
}
// to compute scale and rotation we need to store the multiple touches
if (pointersLength > 1 && !session.firstMultiple) {
session.firstMultiple = simpleCloneInputData(input);
} else if (pointersLength === 1) {
session.firstMultiple = false;
}
var firstInput = session.firstInput;
var firstMultiple = session.firstMultiple;
var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;
var center = input.center = getCenter(pointers);
input.timeStamp = now();
input.deltaTime = input.timeStamp - firstInput.timeStamp;
input.angle = getAngle(offsetCenter, center);
input.distance = getDistance(offsetCenter, center);
computeDeltaXY(session, input);
input.offsetDirection = getDirection(input.deltaX, input.deltaY);
var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
input.overallVelocityX = overallVelocity.x;
input.overallVelocityY = overallVelocity.y;
input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;
input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
computeIntervalInputData(session, input);
// find the correct target
var target = manager.element;
if (hasParent(input.srcEvent.target, target)) {
target = input.srcEvent.target;
}
input.target = target;
}
function computeDeltaXY(session, input) {
var center = input.center;
var offset = session.offsetDelta || {};
var prevDelta = session.prevDelta || {};
var prevInput = session.prevInput || {};
if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
prevDelta = session.prevDelta = {
x: prevInput.deltaX || 0,
y: prevInput.deltaY || 0
};
offset = session.offsetDelta = {
x: center.x,
y: center.y
};
}
input.deltaX = prevDelta.x + (center.x - offset.x);
input.deltaY = prevDelta.y + (center.y - offset.y);
}
/**
* velocity is calculated every x ms
* @param {Object} session
* @param {Object} input
*/
function computeIntervalInputData(session, input) {
var last = session.lastInterval || input,
deltaTime = input.timeStamp - last.timeStamp,
velocity, velocityX, velocityY, direction;
if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {
var deltaX = input.deltaX - last.deltaX;
var deltaY = input.deltaY - last.deltaY;
var v = getVelocity(deltaTime, deltaX, deltaY);
velocityX = v.x;
velocityY = v.y;
velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;
direction = getDirection(deltaX, deltaY);
session.lastInterval = input;
} else {
// use latest velocity info if it doesn't overtake a minimum period
velocity = last.velocity;
velocityX = last.velocityX;
velocityY = last.velocityY;
direction = last.direction;
}
input.velocity = velocity;
input.velocityX = velocityX;
input.velocityY = velocityY;
input.direction = direction;
}
/**
* create a simple clone from the input used for storage of firstInput and firstMultiple
* @param {Object} input
* @returns {Object} clonedInputData
*/
function simpleCloneInputData(input) {
// make a simple copy of the pointers because we will get a reference if we don't
// we only need clientXY for the calculations
var pointers = [];
var i = 0;
while (i < input.pointers.length) {
pointers[i] = {
clientX: round(input.pointers[i].clientX),
clientY: round(input.pointers[i].clientY)
};
i++;
}
return {
timeStamp: now(),
pointers: pointers,
center: getCenter(pointers),
deltaX: input.deltaX,
deltaY: input.deltaY
};
}
/**
* get the center of all the pointers
* @param {Array} pointers
* @return {Object} center contains `x` and `y` properties
*/
function getCenter(pointers) {
var pointersLength = pointers.length;
// no need to loop when only one touch
if (pointersLength === 1) {
return {
x: round(pointers[0].clientX),
y: round(pointers[0].clientY)
};
}
var x = 0, y = 0, i = 0;
while (i < pointersLength) {
x += pointers[i].clientX;
y += pointers[i].clientY;
i++;
}
return {
x: round(x / pointersLength),
y: round(y / pointersLength)
};
}
/**
* calculate the velocity between two points. unit is in px per ms.
* @param {Number} deltaTime
* @param {Number} x
* @param {Number} y
* @return {Object} velocity `x` and `y`
*/
function getVelocity(deltaTime, x, y) {
return {
x: x / deltaTime || 0,
y: y / deltaTime || 0
};
}
/**
* get the direction between two points
* @param {Number} x
* @param {Number} y
* @return {Number} direction
*/
function getDirection(x, y) {
if (x === y) {
return DIRECTION_NONE;
}
if (abs(x) >= abs(y)) {
return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
}
return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
}
/**
* calculate the absolute distance between two points
* @param {Object} p1 {x, y}
* @param {Object} p2 {x, y}
* @param {Array} [props] containing x and y keys
* @return {Number} distance
*/
function getDistance(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
}
/**
* calculate the angle between two coordinates
* @param {Object} p1
* @param {Object} p2
* @param {Array} [props] containing x and y keys
* @return {Number} angle
*/
function getAngle(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return Math.atan2(y, x) * 180 / Math.PI;
}
/**
* calculate the rotation degrees between two pointersets
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} rotation
*/
function getRotation(start, end) {
return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);
}
/**
* calculate the scale factor between two pointersets
* no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} scale
*/
function getScale(start, end) {
return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);
}
var MOUSE_INPUT_MAP = {
mousedown: INPUT_START,
mousemove: INPUT_MOVE,
mouseup: INPUT_END
};
var MOUSE_ELEMENT_EVENTS = 'mousedown';
var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';
/**
* Mouse events input
* @constructor
* @extends Input
*/
function MouseInput() {
this.evEl = MOUSE_ELEMENT_EVENTS;
this.evWin = MOUSE_WINDOW_EVENTS;
this.pressed = false; // mousedown state
Input.apply(this, arguments);
}
inherit(MouseInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function MEhandler(ev) {
var eventType = MOUSE_INPUT_MAP[ev.type];
// on start we want to have the left mouse button down
if (eventType & INPUT_START && ev.button === 0) {
this.pressed = true;
}
if (eventType & INPUT_MOVE && ev.which !== 1) {
eventType = INPUT_END;
}
// mouse must be down
if (!this.pressed) {
return;
}
if (eventType & INPUT_END) {
this.pressed = false;
}
this.callback(this.manager, eventType, {
pointers: [ev],
changedPointers: [ev],
pointerType: INPUT_TYPE_MOUSE,
srcEvent: ev
});
}
});
var POINTER_INPUT_MAP = {
pointerdown: INPUT_START,
pointermove: INPUT_MOVE,
pointerup: INPUT_END,
pointercancel: INPUT_CANCEL,
pointerout: INPUT_CANCEL
};
// in IE10 the pointer types is defined as an enum
var IE10_POINTER_TYPE_ENUM = {
2: INPUT_TYPE_TOUCH,
3: INPUT_TYPE_PEN,
4: INPUT_TYPE_MOUSE,
5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816
};
var POINTER_ELEMENT_EVENTS = 'pointerdown';
var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';
// IE10 has prefixed support, and case-sensitive
if (window.MSPointerEvent && !window.PointerEvent) {
POINTER_ELEMENT_EVENTS = 'MSPointerDown';
POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';
}
/**
* Pointer events input
* @constructor
* @extends Input
*/
function PointerEventInput() {
this.evEl = POINTER_ELEMENT_EVENTS;
this.evWin = POINTER_WINDOW_EVENTS;
Input.apply(this, arguments);
this.store = (this.manager.session.pointerEvents = []);
}
inherit(PointerEventInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function PEhandler(ev) {
var store = this.store;
var removePointer = false;
var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;
var isTouch = (pointerType == INPUT_TYPE_TOUCH);
// get index of the event in the store
var storeIndex = inArray(store, ev.pointerId, 'pointerId');
// start and mouse must be down
if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {
if (storeIndex < 0) {
store.push(ev);
storeIndex = store.length - 1;
}
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
removePointer = true;
}
// it not found, so the pointer hasn't been down (so it's probably a hover)
if (storeIndex < 0) {
return;
}
// update the event in the store
store[storeIndex] = ev;
this.callback(this.manager, eventType, {
pointers: store,
changedPointers: [ev],
pointerType: pointerType,
srcEvent: ev
});
if (removePointer) {
// remove from the store
store.splice(storeIndex, 1);
}
}
});
var SINGLE_TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL
};
var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';
var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';
/**
* Touch events input
* @constructor
* @extends Input
*/
function SingleTouchInput() {
this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
this.started = false;
Input.apply(this, arguments);
}
inherit(SingleTouchInput, Input, {
handler: function TEhandler(ev) {
var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
// should we handle the touch events?
if (type === INPUT_START) {
this.started = true;
}
if (!this.started) {
return;
}
var touches = normalizeSingleTouches.call(this, ev, type);
// when done, reset the started state
if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
this.started = false;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev
});
}
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function normalizeSingleTouches(ev, type) {
var all = toArray(ev.touches);
var changed = toArray(ev.changedTouches);
if (type & (INPUT_END | INPUT_CANCEL)) {
all = uniqueArray(all.concat(changed), 'identifier', true);
}
return [all, changed];
}
var TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL
};
var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';
/**
* Multi-user touch events input
* @constructor
* @extends Input
*/
function TouchInput() {
this.evTarget = TOUCH_TARGET_EVENTS;
this.targetIds = {};
Input.apply(this, arguments);
}
inherit(TouchInput, Input, {
handler: function MTEhandler(ev) {
var type = TOUCH_INPUT_MAP[ev.type];
var touches = getTouches.call(this, ev, type);
if (!touches) {
return;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev
});
}
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function getTouches(ev, type) {
var allTouches = toArray(ev.touches);
var targetIds = this.targetIds;
// when there is only one touch, the process can be simplified
if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {
targetIds[allTouches[0].identifier] = true;
return [allTouches, allTouches];
}
var i,
targetTouches,
changedTouches = toArray(ev.changedTouches),
changedTargetTouches = [],
target = this.target;
// get target touches from touches
targetTouches = allTouches.filter(function(touch) {
return hasParent(touch.target, target);
});
// collect touches
if (type === INPUT_START) {
i = 0;
while (i < targetTouches.length) {
targetIds[targetTouches[i].identifier] = true;
i++;
}
}
// filter changed touches to only contain touches that exist in the collected target ids
i = 0;
while (i < changedTouches.length) {
if (targetIds[changedTouches[i].identifier]) {
changedTargetTouches.push(changedTouches[i]);
}
// cleanup removed touches
if (type & (INPUT_END | INPUT_CANCEL)) {
delete targetIds[changedTouches[i].identifier];
}
i++;
}
if (!changedTargetTouches.length) {
return;
}
return [
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),
changedTargetTouches
];
}
/**
* Combined touch and mouse input
*
* Touch has a higher priority then mouse, and while touching no mouse events are allowed.
* This because touch devices also emit mouse events while doing a touch.
*
* @constructor
* @extends Input
*/
var DEDUP_TIMEOUT = 2500;
var DEDUP_DISTANCE = 25;
function TouchMouseInput() {
Input.apply(this, arguments);
var handler = bindFn(this.handler, this);
this.touch = new TouchInput(this.manager, handler);
this.mouse = new MouseInput(this.manager, handler);
this.primaryTouch = null;
this.lastTouches = [];
}
inherit(TouchMouseInput, Input, {
/**
* handle mouse and touch events
* @param {Hammer} manager
* @param {String} inputEvent
* @param {Object} inputData
*/
handler: function TMEhandler(manager, inputEvent, inputData) {
var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),
isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);
if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {
return;
}
// when we're in a touch event, record touches to de-dupe synthetic mouse event
if (isTouch) {
recordTouches.call(this, inputEvent, inputData);
} else if (isMouse && isSyntheticEvent.call(this, inputData)) {
return;
}
this.callback(manager, inputEvent, inputData);
},
/**
* remove the event listeners
*/
destroy: function destroy() {
this.touch.destroy();
this.mouse.destroy();
}
});
function recordTouches(eventType, eventData) {
if (eventType & INPUT_START) {
this.primaryTouch = eventData.changedPointers[0].identifier;
setLastTouch.call(this, eventData);
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
setLastTouch.call(this, eventData);
}
}
function setLastTouch(eventData) {
var touch = eventData.changedPointers[0];
if (touch.identifier === this.primaryTouch) {
var lastTouch = {x: touch.clientX, y: touch.clientY};
this.lastTouches.push(lastTouch);
var lts = this.lastTouches;
var removeLastTouch = function() {
var i = lts.indexOf(lastTouch);
if (i > -1) {
lts.splice(i, 1);
}
};
setTimeout(removeLastTouch, DEDUP_TIMEOUT);
}
}
function isSyntheticEvent(eventData) {
var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;
for (var i = 0; i < this.lastTouches.length; i++) {
var t = this.lastTouches[i];
var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
return true;
}
}
return false;
}
var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');
var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;
// magical touchAction value
var TOUCH_ACTION_COMPUTE = 'compute';
var TOUCH_ACTION_AUTO = 'auto';
var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented
var TOUCH_ACTION_NONE = 'none';
var TOUCH_ACTION_PAN_X = 'pan-x';
var TOUCH_ACTION_PAN_Y = 'pan-y';
var TOUCH_ACTION_MAP = getTouchActionProps();
/**
* Touch Action
* sets the touchAction property or uses the js alternative
* @param {Manager} manager
* @param {String} value
* @constructor
*/
function TouchAction(manager, value) {
this.manager = manager;
this.set(value);
}
TouchAction.prototype = {
/**
* set the touchAction value on the element or enable the polyfill
* @param {String} value
*/
set: function(value) {
// find out the touch-action by the event handlers
if (value == TOUCH_ACTION_COMPUTE) {
value = this.compute();
}
if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {
this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
}
this.actions = value.toLowerCase().trim();
},
/**
* just re-set the touchAction value
*/
update: function() {
this.set(this.manager.options.touchAction);
},
/**
* compute the value for the touchAction property based on the recognizer's settings
* @returns {String} value
*/
compute: function() {
var actions = [];
each(this.manager.recognizers, function(recognizer) {
if (boolOrFn(recognizer.options.enable, [recognizer])) {
actions = actions.concat(recognizer.getTouchAction());
}
});
return cleanTouchActions(actions.join(' '));
},
/**
* this method is called on each input cycle and provides the preventing of the browser behavior
* @param {Object} input
*/
preventDefaults: function(input) {
var srcEvent = input.srcEvent;
var direction = input.offsetDirection;
// if the touch action did prevented once this session
if (this.manager.session.prevented) {
srcEvent.preventDefault();
return;
}
var actions = this.actions;
var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
if (hasNone) {
//do not prevent defaults if this is a tap gesture
var isTapPointer = input.pointers.length === 1;
var isTapMovement = input.distance < 2;
var isTapTouchTime = input.deltaTime < 250;
if (isTapPointer && isTapMovement && isTapTouchTime) {
return;
}
}
if (hasPanX && hasPanY) {
// `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
return;
}
if (hasNone ||
(hasPanY && direction & DIRECTION_HORIZONTAL) ||
(hasPanX && direction & DIRECTION_VERTICAL)) {
return this.preventSrc(srcEvent);
}
},
/**
* call preventDefault to prevent the browser's default behavior (scrolling in most cases)
* @param {Object} srcEvent
*/
preventSrc: function(srcEvent) {
this.manager.session.prevented = true;
srcEvent.preventDefault();
}
};
/**
* when the touchActions are collected they are not a valid value, so we need to clean things up. *
* @param {String} actions
* @returns {*}
*/
function cleanTouchActions(actions) {
// none
if (inStr(actions, TOUCH_ACTION_NONE)) {
return TOUCH_ACTION_NONE;
}
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
// if both pan-x and pan-y are set (different recognizers
// for different directions, e.g. horizontal pan but vertical swipe?)
// we need none (as otherwise with pan-x pan-y combined none of these
// recognizers will work, since the browser would handle all panning
if (hasPanX && hasPanY) {
return TOUCH_ACTION_NONE;
}
// pan-x OR pan-y
if (hasPanX || hasPanY) {
return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;
}
// manipulation
if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
return TOUCH_ACTION_MANIPULATION;
}
return TOUCH_ACTION_AUTO;
}
function getTouchActionProps() {
if (!NATIVE_TOUCH_ACTION) {
return false;
}
var touchMap = {};
var cssSupports = window.CSS && window.CSS.supports;
['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
// If css.supports is not supported but there is native touch-action assume it supports
// all values. This is the case for IE 10 and 11.
touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
});
return touchMap;
}
/**
* Recognizer flow explained; *
* All recognizers have the initial state of POSSIBLE when a input session starts.
* The definition of a input session is from the first input until the last input, with all it's movement in it. *
* Example session for mouse-input: mousedown -> mousemove -> mouseup
*
* On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
* which determines with state it should be.
*
* If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
* POSSIBLE to give it another change on the next cycle.
*
* Possible
* |
* +-----+---------------+
* | |
* +-----+-----+ |
* | | |
* Failed Cancelled |
* +-------+------+
* | |
* Recognized Began
* |
* Changed
* |
* Ended/Recognized
*/
var STATE_POSSIBLE = 1;
var STATE_BEGAN = 2;
var STATE_CHANGED = 4;
var STATE_ENDED = 8;
var STATE_RECOGNIZED = STATE_ENDED;
var STATE_CANCELLED = 16;
var STATE_FAILED = 32;
/**
* Recognizer
* Every recognizer needs to extend from this class.
* @constructor
* @param {Object} options
*/
function Recognizer(options) {
this.options = assign({}, this.defaults, options || {});
this.id = uniqueId();
this.manager = null;
// default is enable true
this.options.enable = ifUndefined(this.options.enable, true);
this.state = STATE_POSSIBLE;
this.simultaneous = {};
this.requireFail = [];
}
Recognizer.prototype = {
/**
* @virtual
* @type {Object}
*/
defaults: {},
/**
* set options
* @param {Object} options
* @return {Recognizer}
*/
set: function(options) {
assign(this.options, options);
// also update the touchAction, in case something changed about the directions/enabled state
this.manager && this.manager.touchAction.update();
return this;
},
/**
* recognize simultaneous with an other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
recognizeWith: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {
return this;
}
var simultaneous = this.simultaneous;
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
if (!simultaneous[otherRecognizer.id]) {
simultaneous[otherRecognizer.id] = otherRecognizer;
otherRecognizer.recognizeWith(this);
}
return this;
},
/**
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRecognizeWith: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
delete this.simultaneous[otherRecognizer.id];
return this;
},
/**
* recognizer can only run when an other is failing
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
requireFailure: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {
return this;
}
var requireFail = this.requireFail;
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
if (inArray(requireFail, otherRecognizer) === -1) {
requireFail.push(otherRecognizer);
otherRecognizer.requireFailure(this);
}
return this;
},
/**
* drop the requireFailure link. it does not remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRequireFailure: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
var index = inArray(this.requireFail, otherRecognizer);
if (index > -1) {
this.requireFail.splice(index, 1);
}
return this;
},
/**
* has require failures boolean
* @returns {boolean}
*/
hasRequireFailures: function() {
return this.requireFail.length > 0;
},
/**
* if the recognizer can recognize simultaneous with an other recognizer
* @param {Recognizer} otherRecognizer
* @returns {Boolean}
*/
canRecognizeWith: function(otherRecognizer) {
return !!this.simultaneous[otherRecognizer.id];
},
/**
* You should use `tryEmit` instead of `emit` directly to check
* that all the needed recognizers has failed before emitting.
* @param {Object} input
*/
emit: function(input) {
var self = this;
var state = this.state;
function emit(event) {
self.manager.emit(event, input);
}
// 'panstart' and 'panmove'
if (state < STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
emit(self.options.event); // simple 'eventName' events
if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
emit(input.additionalEvent);
}
// panend and pancancel
if (state >= STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
},
/**
* Check that all the require failure recognizers has failed,
* if true, it emits a gesture event,
* otherwise, setup the state to FAILED.
* @param {Object} input
*/
tryEmit: function(input) {
if (this.canEmit()) {
return this.emit(input);
}
// it's failing anyway
this.state = STATE_FAILED;
},
/**
* can we emit?
* @returns {boolean}
*/
canEmit: function() {
var i = 0;
while (i < this.requireFail.length) {
if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {
return false;
}
i++;
}
return true;
},
/**
* update the recognizer
* @param {Object} inputData
*/
recognize: function(inputData) {
// make a new copy of the inputData
// so we can change the inputData without messing up the other recognizers
var inputDataClone = assign({}, inputData);
// is is enabled and allow recognizing?
if (!boolOrFn(this.options.enable, [this, inputDataClone])) {
this.reset();
this.state = STATE_FAILED;
return;
}
// reset when we've reached the end
if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {
this.state = STATE_POSSIBLE;
}
this.state = this.process(inputDataClone);
// the recognizer has recognized a gesture
// so trigger an event
if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {
this.tryEmit(inputDataClone);
}
},
/**
* return the state of the recognizer
* the actual recognizing happens in this method
* @virtual
* @param {Object} inputData
* @returns {Const} STATE
*/
process: function(inputData) { }, // jshint ignore:line
/**
* return the preferred touch-action
* @virtual
* @returns {Array}
*/
getTouchAction: function() { },
/**
* called when the gesture isn't allowed to recognize
* like when another is being recognized or it is disabled
* @virtual
*/
reset: function() { }
};
/**
* get a usable string, used as event postfix
* @param {Const} state
* @returns {String} state
*/
function stateStr(state) {
if (state & STATE_CANCELLED) {
return 'cancel';
} else if (state & STATE_ENDED) {
return 'end';
} else if (state & STATE_CHANGED) {
return 'move';
} else if (state & STATE_BEGAN) {
return 'start';
}
return '';
}
/**
* direction cons to string
* @param {Const} direction
* @returns {String}
*/
function directionStr(direction) {
if (direction == DIRECTION_DOWN) {
return 'down';
} else if (direction == DIRECTION_UP) {
return 'up';
} else if (direction == DIRECTION_LEFT) {
return 'left';
} else if (direction == DIRECTION_RIGHT) {
return 'right';
}
return '';
}
/**
* get a recognizer by name if it is bound to a manager
* @param {Recognizer|String} otherRecognizer
* @param {Recognizer} recognizer
* @returns {Recognizer}
*/
function getRecognizerByNameIfManager(otherRecognizer, recognizer) {
var manager = recognizer.manager;
if (manager) {
return manager.get(otherRecognizer);
}
return otherRecognizer;
}
/**
* This recognizer is just used as a base for the simple attribute recognizers.
* @constructor
* @extends Recognizer
*/
function AttrRecognizer() {
Recognizer.apply(this, arguments);
}
inherit(AttrRecognizer, Recognizer, {
/**
* @namespace
* @memberof AttrRecognizer
*/
defaults: {
/**
* @type {Number}
* @default 1
*/
pointers: 1
},
/**
* Used to check if it the recognizer receives valid input, like input.distance > 10.
* @memberof AttrRecognizer
* @param {Object} input
* @returns {Boolean} recognized
*/
attrTest: function(input) {
var optionPointers = this.options.pointers;
return optionPointers === 0 || input.pointers.length === optionPointers;
},
/**
* Process the input and return the state for the recognizer
* @memberof AttrRecognizer
* @param {Object} input
* @returns {*} State
*/
process: function(input) {
var state = this.state;
var eventType = input.eventType;
var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
var isValid = this.attrTest(input);
// on cancel input and we've recognized before, return STATE_CANCELLED
if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
return state | STATE_CANCELLED;
} else if (isRecognized || isValid) {
if (eventType & INPUT_END) {
return state | STATE_ENDED;
} else if (!(state & STATE_BEGAN)) {
return STATE_BEGAN;
}
return state | STATE_CHANGED;
}
return STATE_FAILED;
}
});
/**
* Pan
* Recognized when the pointer is down and moved in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function PanRecognizer() {
AttrRecognizer.apply(this, arguments);
this.pX = null;
this.pY = null;
}
inherit(PanRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PanRecognizer
*/
defaults: {
event: 'pan',
threshold: 10,
pointers: 1,
direction: DIRECTION_ALL
},
getTouchAction: function() {
var direction = this.options.direction;
var actions = [];
if (direction & DIRECTION_HORIZONTAL) {
actions.push(TOUCH_ACTION_PAN_Y);
}
if (direction & DIRECTION_VERTICAL) {
actions.push(TOUCH_ACTION_PAN_X);
}
return actions;
},
directionTest: function(input) {
var options = this.options;
var hasMoved = true;
var distance = input.distance;
var direction = input.direction;
var x = input.deltaX;
var y = input.deltaY;
// lock to axis?
if (!(direction & options.direction)) {
if (options.direction & DIRECTION_HORIZONTAL) {
direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;
hasMoved = x != this.pX;
distance = Math.abs(input.deltaX);
} else {
direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;
hasMoved = y != this.pY;
distance = Math.abs(input.deltaY);
}
}
input.direction = direction;
return hasMoved && distance > options.threshold && direction & options.direction;
},
attrTest: function(input) {
return AttrRecognizer.prototype.attrTest.call(this, input) &&
(this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
},
emit: function(input) {
this.pX = input.deltaX;
this.pY = input.deltaY;
var direction = directionStr(input.direction);
if (direction) {
input.additionalEvent = this.options.event + direction;
}
this._super.emit.call(this, input);
}
});
/**
* Pinch
* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
* @constructor
* @extends AttrRecognizer
*/
function PinchRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(PinchRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: 'pinch',
threshold: 0,
pointers: 2
},
getTouchAction: function() {
return [TOUCH_ACTION_NONE];
},
attrTest: function(input) {
return this._super.attrTest.call(this, input) &&
(Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
},
emit: function(input) {
if (input.scale !== 1) {
var inOut = input.scale < 1 ? 'in' : 'out';
input.additionalEvent = this.options.event + inOut;
}
this._super.emit.call(this, input);
}
});
/**
* Press
* Recognized when the pointer is down for x ms without any movement.
* @constructor
* @extends Recognizer
*/
function PressRecognizer() {
Recognizer.apply(this, arguments);
this._timer = null;
this._input = null;
}
inherit(PressRecognizer, Recognizer, {
/**
* @namespace
* @memberof PressRecognizer
*/
defaults: {
event: 'press',
pointers: 1,
time: 251, // minimal time of the pointer to be pressed
threshold: 9 // a minimal movement is ok, but keep it low
},
getTouchAction: function() {
return [TOUCH_ACTION_AUTO];
},
process: function(input) {
var options = this.options;
var validPointers = input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTime = input.deltaTime > options.time;
this._input = input;
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {
this.reset();
} else if (input.eventType & INPUT_START) {
this.reset();
this._timer = setTimeoutContext(function() {
this.state = STATE_RECOGNIZED;
this.tryEmit();
}, options.time, this);
} else if (input.eventType & INPUT_END) {
return STATE_RECOGNIZED;
}
return STATE_FAILED;
},
reset: function() {
clearTimeout(this._timer);
},
emit: function(input) {
if (this.state !== STATE_RECOGNIZED) {
return;
}
if (input && (input.eventType & INPUT_END)) {
this.manager.emit(this.options.event + 'up', input);
} else {
this._input.timeStamp = now();
this.manager.emit(this.options.event, this._input);
}
}
});
/**
* Rotate
* Recognized when two or more pointer are moving in a circular motion.
* @constructor
* @extends AttrRecognizer
*/
function RotateRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(RotateRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof RotateRecognizer
*/
defaults: {
event: 'rotate',
threshold: 0,
pointers: 2
},
getTouchAction: function() {
return [TOUCH_ACTION_NONE];
},
attrTest: function(input) {
return this._super.attrTest.call(this, input) &&
(Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
}
});
/**
* Swipe
* Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function SwipeRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(SwipeRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof SwipeRecognizer
*/
defaults: {
event: 'swipe',
threshold: 10,
velocity: 0.3,
direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
pointers: 1
},
getTouchAction: function() {
return PanRecognizer.prototype.getTouchAction.call(this);
},
attrTest: function(input) {
var direction = this.options.direction;
var velocity;
if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
velocity = input.overallVelocity;
} else if (direction & DIRECTION_HORIZONTAL) {
velocity = input.overallVelocityX;
} else if (direction & DIRECTION_VERTICAL) {
velocity = input.overallVelocityY;
}
return this._super.attrTest.call(this, input) &&
direction & input.offsetDirection &&
input.distance > this.options.threshold &&
input.maxPointers == this.options.pointers &&
abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
},
emit: function(input) {
var direction = directionStr(input.offsetDirection);
if (direction) {
this.manager.emit(this.options.event + direction, input);
}
this.manager.emit(this.options.event, input);
}
});
/**
* A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
* between the given interval and position. The delay option can be used to recognize multi-taps without firing
* a single tap.
*
* The eventData from the emitted event contains the property `tapCount`, which contains the amount of
* multi-taps being recognized.
* @constructor
* @extends Recognizer
*/
function TapRecognizer() {
Recognizer.apply(this, arguments);
// previous time and center,
// used for tap counting
this.pTime = false;
this.pCenter = false;
this._timer = null;
this._input = null;
this.count = 0;
}
inherit(TapRecognizer, Recognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: 'tap',
pointers: 1,
taps: 1,
interval: 300, // max time between the multi-tap taps
time: 250, // max time of the pointer to be down (like finger on the screen)
threshold: 9, // a minimal movement is ok, but keep it low
posThreshold: 10 // a multi-tap can be a bit off the initial position
},
getTouchAction: function() {
return [TOUCH_ACTION_MANIPULATION];
},
process: function(input) {
var options = this.options;
var validPointers = input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTouchTime = input.deltaTime < options.time;
this.reset();
if ((input.eventType & INPUT_START) && (this.count === 0)) {
return this.failTimeout();
}
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (validMovement && validTouchTime && validPointers) {
if (input.eventType != INPUT_END) {
return this.failTimeout();
}
var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;
this.pTime = input.timeStamp;
this.pCenter = input.center;
if (!validMultiTap || !validInterval) {
this.count = 1;
} else {
this.count += 1;
}
this._input = input;
// if tap count matches we have recognized it,
// else it has began recognizing...
var tapCount = this.count % options.taps;
if (tapCount === 0) {
// no failing requirements, immediately trigger the tap event
// or wait as long as the multitap interval to trigger
if (!this.hasRequireFailures()) {
return STATE_RECOGNIZED;
} else {
this._timer = setTimeoutContext(function() {
this.state = STATE_RECOGNIZED;
this.tryEmit();
}, options.interval, this);
return STATE_BEGAN;
}
}
}
return STATE_FAILED;
},
failTimeout: function() {
this._timer = setTimeoutContext(function() {
this.state = STATE_FAILED;
}, this.options.interval, this);
return STATE_FAILED;
},
reset: function() {
clearTimeout(this._timer);
},
emit: function() {
if (this.state == STATE_RECOGNIZED) {
this._input.tapCount = this.count;
this.manager.emit(this.options.event, this._input);
}
}
});
/**
* Simple way to create a manager with a default set of recognizers.
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Hammer(element, options) {
options = options || {};
options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);
return new Manager(element, options);
}
/**
* @const {string}
*/
Hammer.VERSION = '2.0.8';
/**
* default settings
* @namespace
*/
Hammer.defaults = {
/**
* set if DOM events are being triggered.
* But this is slower and unused by simple implementations, so disabled by default.
* @type {Boolean}
* @default false
*/
domEvents: false,
/**
* The value for the touchAction property/fallback.
* When set to `compute` it will magically set the correct value based on the added recognizers.
* @type {String}
* @default compute
*/
touchAction: TOUCH_ACTION_COMPUTE,
/**
* @type {Boolean}
* @default true
*/
enable: true,
/**
* EXPERIMENTAL FEATURE -- can be removed/changed
* Change the parent input target element.
* If Null, then it is being set the to main element.
* @type {Null|EventTarget}
* @default null
*/
inputTarget: null,
/**
* force an input class
* @type {Null|Function}
* @default null
*/
inputClass: null,
/**
* Default recognizer setup when calling `Hammer()`
* When creating a new Manager these will be skipped.
* @type {Array}
*/
preset: [
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
[RotateRecognizer, {enable: false}],
[PinchRecognizer, {enable: false}, ['rotate']],
[SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],
[PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],
[TapRecognizer],
[TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],
[PressRecognizer]
],
/**
* Some CSS properties can be used to improve the working of Hammer.
* Add them to this method and they will be set when creating a new Manager.
* @namespace
*/
cssProps: {
/**
* Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userSelect: 'none',
/**
* Disable the Windows Phone grippers when pressing an element.
* @type {String}
* @default 'none'
*/
touchSelect: 'none',
/**
* Disables the default callout shown when you touch and hold a touch target.
* On iOS, when you touch and hold a touch target such as a link, Safari displays
* a callout containing information about the link. This property allows you to disable that callout.
* @type {String}
* @default 'none'
*/
touchCallout: 'none',
/**
* Specifies whether zooming is enabled. Used by IE10>
* @type {String}
* @default 'none'
*/
contentZooming: 'none',
/**
* Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userDrag: 'none',
/**
* Overrides the highlight color shown when the user taps a link or a JavaScript
* clickable element in iOS. This property obeys the alpha value, if specified.
* @type {String}
* @default 'rgba(0,0,0,0)'
*/
tapHighlightColor: 'rgba(0,0,0,0)'
}
};
var STOP = 1;
var FORCED_STOP = 2;
/**
* Manager
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Manager(element, options) {
this.options = assign({}, Hammer.defaults, options || {});
this.options.inputTarget = this.options.inputTarget || element;
this.handlers = {};
this.session = {};
this.recognizers = [];
this.oldCssProps = {};
this.element = element;
this.input = createInputInstance(this);
this.touchAction = new TouchAction(this, this.options.touchAction);
toggleCssProps(this, true);
each(this.options.recognizers, function(item) {
var recognizer = this.add(new (item[0])(item[1]));
item[2] && recognizer.recognizeWith(item[2]);
item[3] && recognizer.requireFailure(item[3]);
}, this);
}
Manager.prototype = {
/**
* set options
* @param {Object} options
* @returns {Manager}
*/
set: function(options) {
assign(this.options, options);
// Options that need a little more setup
if (options.touchAction) {
this.touchAction.update();
}
if (options.inputTarget) {
// Clean up existing event listeners and reinitialize
this.input.destroy();
this.input.target = options.inputTarget;
this.input.init();
}
return this;
},
/**
* stop recognizing for this session.
* This session will be discarded, when a new [input]start event is fired.
* When forced, the recognizer cycle is stopped immediately.
* @param {Boolean} [force]
*/
stop: function(force) {
this.session.stopped = force ? FORCED_STOP : STOP;
},
/**
* run the recognizers!
* called by the inputHandler function on every movement of the pointers (touches)
* it walks through all the recognizers and tries to detect the gesture that is being made
* @param {Object} inputData
*/
recognize: function(inputData) {
var session = this.session;
if (session.stopped) {
return;
}
// run the touch-action polyfill
this.touchAction.preventDefaults(inputData);
var recognizer;
var recognizers = this.recognizers;
// this holds the recognizer that is being recognized.
// so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
// if no recognizer is detecting a thing, it is set to `null`
var curRecognizer = session.curRecognizer;
// reset when the last recognizer is recognized
// or when we're in a new session
if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {
curRecognizer = session.curRecognizer = null;
}
var i = 0;
while (i < recognizers.length) {
recognizer = recognizers[i];
// find out if we are allowed try to recognize the input for this one.
// 1. allow if the session is NOT forced stopped (see the .stop() method)
// 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
// that is being recognized.
// 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
// this can be setup with the `recognizeWith()` method on the recognizer.
if (session.stopped !== FORCED_STOP && ( // 1
!curRecognizer || recognizer == curRecognizer || // 2
recognizer.canRecognizeWith(curRecognizer))) { // 3
recognizer.recognize(inputData);
} else {
recognizer.reset();
}
// if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
// current active recognizer. but only if we don't already have an active recognizer
if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {
curRecognizer = session.curRecognizer = recognizer;
}
i++;
}
},
/**
* get a recognizer by its event name.
* @param {Recognizer|String} recognizer
* @returns {Recognizer|Null}
*/
get: function(recognizer) {
if (recognizer instanceof Recognizer) {
return recognizer;
}
var recognizers = this.recognizers;
for (var i = 0; i < recognizers.length; i++) {
if (recognizers[i].options.event == recognizer) {
return recognizers[i];
}
}
return null;
},
/**
* add a recognizer to the manager
* existing recognizers with the same event name will be removed
* @param {Recognizer} recognizer
* @returns {Recognizer|Manager}
*/
add: function(recognizer) {
if (invokeArrayArg(recognizer, 'add', this)) {
return this;
}
// remove existing
var existing = this.get(recognizer.options.event);
if (existing) {
this.remove(existing);
}
this.recognizers.push(recognizer);
recognizer.manager = this;
this.touchAction.update();
return recognizer;
},
/**
* remove a recognizer by name or instance
* @param {Recognizer|String} recognizer
* @returns {Manager}
*/
remove: function(recognizer) {
if (invokeArrayArg(recognizer, 'remove', this)) {
return this;
}
recognizer = this.get(recognizer);
// let's make sure this recognizer exists
if (recognizer) {
var recognizers = this.recognizers;
var index = inArray(recognizers, recognizer);
if (index !== -1) {
recognizers.splice(index, 1);
this.touchAction.update();
}
}
return this;
},
/**
* bind event
* @param {String} events
* @param {Function} handler
* @returns {EventEmitter} this
*/
on: function(events, handler) {
if (events === undefined) {
return;
}
if (handler === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function(event) {
handlers[event] = handlers[event] || [];
handlers[event].push(handler);
});
return this;
},
/**
* unbind event, leave emit blank to remove all handlers
* @param {String} events
* @param {Function} [handler]
* @returns {EventEmitter} this
*/
off: function(events, handler) {
if (events === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function(event) {
if (!handler) {
delete handlers[event];
} else {
handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
}
});
return this;
},
/**
* emit event to the listeners
* @param {String} event
* @param {Object} data
*/
emit: function(event, data) {
// we also want to trigger dom events
if (this.options.domEvents) {
triggerDomEvent(event, data);
}
// no handlers, so skip it all
var handlers = this.handlers[event] && this.handlers[event].slice();
if (!handlers || !handlers.length) {
return;
}
data.type = event;
data.preventDefault = function() {
data.srcEvent.preventDefault();
};
var i = 0;
while (i < handlers.length) {
handlers[i](data);
i++;
}
},
/**
* destroy the manager and unbinds all events
* it doesn't unbind dom events, that is the user own responsibility
*/
destroy: function() {
this.element && toggleCssProps(this, false);
this.handlers = {};
this.session = {};
this.input.destroy();
this.element = null;
}
};
/**
* add/remove the css properties as defined in manager.options.cssProps
* @param {Manager} manager
* @param {Boolean} add
*/
function toggleCssProps(manager, add) {
var element = manager.element;
if (!element.style) {
return;
}
var prop;
each(manager.options.cssProps, function(value, name) {
prop = prefixed(element.style, name);
if (add) {
manager.oldCssProps[prop] = element.style[prop];
element.style[prop] = value;
} else {
element.style[prop] = manager.oldCssProps[prop] || '';
}
});
if (!add) {
manager.oldCssProps = {};
}
}
/**
* trigger dom event
* @param {String} event
* @param {Object} data
*/
function triggerDomEvent(event, data) {
var gestureEvent = document.createEvent('Event');
gestureEvent.initEvent(event, true, true);
gestureEvent.gesture = data;
data.target.dispatchEvent(gestureEvent);
}
assign(Hammer, {
INPUT_START: INPUT_START,
INPUT_MOVE: INPUT_MOVE,
INPUT_END: INPUT_END,
INPUT_CANCEL: INPUT_CANCEL,
STATE_POSSIBLE: STATE_POSSIBLE,
STATE_BEGAN: STATE_BEGAN,
STATE_CHANGED: STATE_CHANGED,
STATE_ENDED: STATE_ENDED,
STATE_RECOGNIZED: STATE_RECOGNIZED,
STATE_CANCELLED: STATE_CANCELLED,
STATE_FAILED: STATE_FAILED,
DIRECTION_NONE: DIRECTION_NONE,
DIRECTION_LEFT: DIRECTION_LEFT,
DIRECTION_RIGHT: DIRECTION_RIGHT,
DIRECTION_UP: DIRECTION_UP,
DIRECTION_DOWN: DIRECTION_DOWN,
DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
DIRECTION_VERTICAL: DIRECTION_VERTICAL,
DIRECTION_ALL: DIRECTION_ALL,
Manager: Manager,
Input: Input,
TouchAction: TouchAction,
TouchInput: TouchInput,
MouseInput: MouseInput,
PointerEventInput: PointerEventInput,
TouchMouseInput: TouchMouseInput,
SingleTouchInput: SingleTouchInput,
Recognizer: Recognizer,
AttrRecognizer: AttrRecognizer,
Tap: TapRecognizer,
Pan: PanRecognizer,
Swipe: SwipeRecognizer,
Pinch: PinchRecognizer,
Rotate: RotateRecognizer,
Press: PressRecognizer,
on: addEventListeners,
off: removeEventListeners,
each: each,
merge: merge,
extend: extend,
assign: assign,
inherit: inherit,
bindFn: bindFn,
prefixed: prefixed
});
// this prevents errors when Hammer is loaded in the presence of an AMD
// style loader but by script tag, not by the loader.
var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
freeGlobal.Hammer = Hammer;
if (typeof define === 'function' && define.amd) {
define(function() {
return Hammer;
});
} else if (typeof module != 'undefined' && module.exports) {
module.exports = Hammer;
} else {
window[exportName] = Hammer;
}
})(window, document, 'Hammer');
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
(function(window, document, exportName, undefined) {
'use strict';
var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
var TEST_ELEMENT = document.createElement('div');
var TYPE_FUNCTION = 'function';
var round = Math.round;
var abs = Math.abs;
var now = Date.now;
/**
* set a timeout with a given scope
* @param {Function} fn
* @param {Number} timeout
* @param {Object} context
* @returns {number}
*/
function setTimeoutContext(fn, timeout, context) {
return setTimeout(bindFn(fn, context), timeout);
}
/**
* if the argument is an array, we want to execute the fn on each entry
* if it aint an array we don't want to do a thing.
* this is used by all the methods that accept a single and array argument.
* @param {*|Array} arg
* @param {String} fn
* @param {Object} [context]
* @returns {Boolean}
*/
function invokeArrayArg(arg, fn, context) {
if (Array.isArray(arg)) {
each(arg, context[fn], context);
return true;
}
return false;
}
/**
* walk objects and arrays
* @param {Object} obj
* @param {Function} iterator
* @param {Object} context
*/
function each(obj, iterator, context) {
var i;
if (!obj) {
return;
}
if (obj.forEach) {
obj.forEach(iterator, context);
} else if (obj.length !== undefined) {
i = 0;
while (i < obj.length) {
iterator.call(context, obj[i], i, obj);
i++;
}
} else {
for (i in obj) {
obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
}
}
}
/**
* wrap a method with a deprecation warning and stack trace
* @param {Function} method
* @param {String} name
* @param {String} message
* @returns {Function} A new function wrapping the supplied method.
*/
function deprecate(method, name, message) {
var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
return function() {
var e = new Error('get-stack-trace');
var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
.replace(/^\s+at\s+/gm, '')
.replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';
var log = window.console && (window.console.warn || window.console.log);
if (log) {
log.call(window.console, deprecationMessage, stack);
}
return method.apply(this, arguments);
};
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} target
* @param {...Object} objects_to_assign
* @returns {Object} target
*/
var assign;
if (typeof Object.assign !== 'function') {
assign = function assign(target) {
if (target === undefined || target === null) {
throw new TypeError('Cannot convert undefined or null to object');
}
var output = Object(target);
for (var index = 1; index < arguments.length; index++) {
var source = arguments[index];
if (source !== undefined && source !== null) {
for (var nextKey in source) {
if (source.hasOwnProperty(nextKey)) {
output[nextKey] = source[nextKey];
}
}
}
}
return output;
};
} else {
assign = Object.assign;
}
/**
* extend object.
* means that properties in dest will be overwritten by the ones in src.
* @param {Object} dest
* @param {Object} src
* @param {Boolean} [merge=false]
* @returns {Object} dest
*/
var extend = deprecate(function extend(dest, src, merge) {
var keys = Object.keys(src);
var i = 0;
while (i < keys.length) {
if (!merge || (merge && dest[keys[i]] === undefined)) {
dest[keys[i]] = src[keys[i]];
}
i++;
}
return dest;
}, 'extend', 'Use `assign`.');
/**
* merge the values from src in the dest.
* means that properties that exist in dest will not be overwritten by src
* @param {Object} dest
* @param {Object} src
* @returns {Object} dest
*/
var merge = deprecate(function merge(dest, src) {
return extend(dest, src, true);
}, 'merge', 'Use `assign`.');
/**
* simple class inheritance
* @param {Function} child
* @param {Function} base
* @param {Object} [properties]
*/
function inherit(child, base, properties) {
var baseP = base.prototype,
childP;
childP = child.prototype = Object.create(baseP);
childP.constructor = child;
childP._super = baseP;
if (properties) {
assign(childP, properties);
}
}
/**
* simple function bind
* @param {Function} fn
* @param {Object} context
* @returns {Function}
*/
function bindFn(fn, context) {
return function boundFn() {
return fn.apply(context, arguments);
};
}
/**
* let a boolean value also be a function that must return a boolean
* this first item in args will be used as the context
* @param {Boolean|Function} val
* @param {Array} [args]
* @returns {Boolean}
*/
function boolOrFn(val, args) {
if (typeof val == TYPE_FUNCTION) {
return val.apply(args ? args[0] || undefined : undefined, args);
}
return val;
}
/**
* use the val2 when val1 is undefined
* @param {*} val1
* @param {*} val2
* @returns {*}
*/
function ifUndefined(val1, val2) {
return (val1 === undefined) ? val2 : val1;
}
/**
* addEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function addEventListeners(target, types, handler) {
each(splitStr(types), function(type) {
target.addEventListener(type, handler, false);
});
}
/**
* removeEventListener with multiple events at once
* @param {EventTarget} target
* @param {String} types
* @param {Function} handler
*/
function removeEventListeners(target, types, handler) {
each(splitStr(types), function(type) {
target.removeEventListener(type, handler, false);
});
}
/**
* find if a node is in the given parent
* @method hasParent
* @param {HTMLElement} node
* @param {HTMLElement} parent
* @return {Boolean} found
*/
function hasParent(node, parent) {
while (node) {
if (node == parent) {
return true;
}
node = node.parentNode;
}
return false;
}
/**
* small indexOf wrapper
* @param {String} str
* @param {String} find
* @returns {Boolean} found
*/
function inStr(str, find) {
return str.indexOf(find) > -1;
}
/**
* split string on whitespace
* @param {String} str
* @returns {Array} words
*/
function splitStr(str) {
return str.trim().split(/\s+/g);
}
/**
* find if a array contains the object using indexOf or a simple polyFill
* @param {Array} src
* @param {String} find
* @param {String} [findByKey]
* @return {Boolean|Number} false when not found, or the index
*/
function inArray(src, find, findByKey) {
if (src.indexOf && !findByKey) {
return src.indexOf(find);
} else {
var i = 0;
while (i < src.length) {
if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
return i;
}
i++;
}
return -1;
}
}
/**
* convert array-like objects to real arrays
* @param {Object} obj
* @returns {Array}
*/
function toArray(obj) {
return Array.prototype.slice.call(obj, 0);
}
/**
* unique array with objects based on a key (like 'id') or just by the array's value
* @param {Array} src [{id:1},{id:2},{id:1}]
* @param {String} [key]
* @param {Boolean} [sort=False]
* @returns {Array} [{id:1},{id:2}]
*/
function uniqueArray(src, key, sort) {
var results = [];
var values = [];
var i = 0;
while (i < src.length) {
var val = key ? src[i][key] : src[i];
if (inArray(values, val) < 0) {
results.push(src[i]);
}
values[i] = val;
i++;
}
if (sort) {
if (!key) {
results = results.sort();
} else {
results = results.sort(function sortUniqueArray(a, b) {
return a[key] > b[key];
});
}
}
return results;
}
/**
* get the prefixed property
* @param {Object} obj
* @param {String} property
* @returns {String|Undefined} prefixed
*/
function prefixed(obj, property) {
var prefix, prop;
var camelProp = property[0].toUpperCase() + property.slice(1);
var i = 0;
while (i < VENDOR_PREFIXES.length) {
prefix = VENDOR_PREFIXES[i];
prop = (prefix) ? prefix + camelProp : property;
if (prop in obj) {
return prop;
}
i++;
}
return undefined;
}
/**
* get a unique id
* @returns {number} uniqueId
*/
var _uniqueId = 1;
function uniqueId() {
return _uniqueId++;
}
/**
* get the window object of an element
* @param {HTMLElement} element
* @returns {DocumentView|Window}
*/
function getWindowForElement(element) {
var doc = element.ownerDocument || element;
return (doc.defaultView || doc.parentWindow || window);
}
var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
var SUPPORT_TOUCH = ('ontouchstart' in window);
var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;
var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
var INPUT_TYPE_TOUCH = 'touch';
var INPUT_TYPE_PEN = 'pen';
var INPUT_TYPE_MOUSE = 'mouse';
var INPUT_TYPE_KINECT = 'kinect';
var COMPUTE_INTERVAL = 25;
var INPUT_START = 1;
var INPUT_MOVE = 2;
var INPUT_END = 4;
var INPUT_CANCEL = 8;
var DIRECTION_NONE = 1;
var DIRECTION_LEFT = 2;
var DIRECTION_RIGHT = 4;
var DIRECTION_UP = 8;
var DIRECTION_DOWN = 16;
var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
var PROPS_XY = ['x', 'y'];
var PROPS_CLIENT_XY = ['clientX', 'clientY'];
/**
* create new input type manager
* @param {Manager} manager
* @param {Function} callback
* @returns {Input}
* @constructor
*/
function Input(manager, callback) {
var self = this;
this.manager = manager;
this.callback = callback;
this.element = manager.element;
this.target = manager.options.inputTarget;
// smaller wrapper around the handler, for the scope and the enabled state of the manager,
// so when disabled the input events are completely bypassed.
this.domHandler = function(ev) {
if (boolOrFn(manager.options.enable, [manager])) {
self.handler(ev);
}
};
this.init();
}
Input.prototype = {
/**
* should handle the inputEvent data and trigger the callback
* @virtual
*/
handler: function() { },
/**
* bind the events
*/
init: function() {
this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);
this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);
this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
},
/**
* unbind the events
*/
destroy: function() {
this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);
this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);
this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
}
};
/**
* create new input type manager
* called by the Manager constructor
* @param {Hammer} manager
* @returns {Input}
*/
function createInputInstance(manager) {
var Type;
var inputClass = manager.options.inputClass;
if (inputClass) {
Type = inputClass;
} else if (SUPPORT_POINTER_EVENTS) {
Type = PointerEventInput;
} else if (SUPPORT_ONLY_TOUCH) {
Type = TouchInput;
} else if (!SUPPORT_TOUCH) {
Type = MouseInput;
} else {
Type = TouchMouseInput;
}
return new (Type)(manager, inputHandler);
}
/**
* handle input events
* @param {Manager} manager
* @param {String} eventType
* @param {Object} input
*/
function inputHandler(manager, eventType, input) {
var pointersLen = input.pointers.length;
var changedPointersLen = input.changedPointers.length;
var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
input.isFirst = !!isFirst;
input.isFinal = !!isFinal;
if (isFirst) {
manager.session = {};
}
// source event is the normalized value of the domEvents
// like 'touchstart, mouseup, pointerdown'
input.eventType = eventType;
// compute scale, rotation etc
computeInputData(manager, input);
// emit secret event
manager.emit('hammer.input', input);
manager.recognize(input);
manager.session.prevInput = input;
}
/**
* extend the data with some usable properties like scale, rotate, velocity etc
* @param {Object} manager
* @param {Object} input
*/
function computeInputData(manager, input) {
var session = manager.session;
var pointers = input.pointers;
var pointersLength = pointers.length;
// store the first input to calculate the distance and direction
if (!session.firstInput) {
session.firstInput = simpleCloneInputData(input);
}
// to compute scale and rotation we need to store the multiple touches
if (pointersLength > 1 && !session.firstMultiple) {
session.firstMultiple = simpleCloneInputData(input);
} else if (pointersLength === 1) {
session.firstMultiple = false;
}
var firstInput = session.firstInput;
var firstMultiple = session.firstMultiple;
var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;
var center = input.center = getCenter(pointers);
input.timeStamp = now();
input.deltaTime = input.timeStamp - firstInput.timeStamp;
input.angle = getAngle(offsetCenter, center);
input.distance = getDistance(offsetCenter, center);
computeDeltaXY(session, input);
input.offsetDirection = getDirection(input.deltaX, input.deltaY);
var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
input.overallVelocityX = overallVelocity.x;
input.overallVelocityY = overallVelocity.y;
input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;
input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
computeIntervalInputData(session, input);
// find the correct target
var target = manager.element;
if (hasParent(input.srcEvent.target, target)) {
target = input.srcEvent.target;
}
input.target = target;
}
function computeDeltaXY(session, input) {
var center = input.center;
var offset = session.offsetDelta || {};
var prevDelta = session.prevDelta || {};
var prevInput = session.prevInput || {};
if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
prevDelta = session.prevDelta = {
x: prevInput.deltaX || 0,
y: prevInput.deltaY || 0
};
offset = session.offsetDelta = {
x: center.x,
y: center.y
};
}
input.deltaX = prevDelta.x + (center.x - offset.x);
input.deltaY = prevDelta.y + (center.y - offset.y);
}
/**
* velocity is calculated every x ms
* @param {Object} session
* @param {Object} input
*/
function computeIntervalInputData(session, input) {
var last = session.lastInterval || input,
deltaTime = input.timeStamp - last.timeStamp,
velocity, velocityX, velocityY, direction;
if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {
var deltaX = input.deltaX - last.deltaX;
var deltaY = input.deltaY - last.deltaY;
var v = getVelocity(deltaTime, deltaX, deltaY);
velocityX = v.x;
velocityY = v.y;
velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;
direction = getDirection(deltaX, deltaY);
session.lastInterval = input;
} else {
// use latest velocity info if it doesn't overtake a minimum period
velocity = last.velocity;
velocityX = last.velocityX;
velocityY = last.velocityY;
direction = last.direction;
}
input.velocity = velocity;
input.velocityX = velocityX;
input.velocityY = velocityY;
input.direction = direction;
}
/**
* create a simple clone from the input used for storage of firstInput and firstMultiple
* @param {Object} input
* @returns {Object} clonedInputData
*/
function simpleCloneInputData(input) {
// make a simple copy of the pointers because we will get a reference if we don't
// we only need clientXY for the calculations
var pointers = [];
var i = 0;
while (i < input.pointers.length) {
pointers[i] = {
clientX: round(input.pointers[i].clientX),
clientY: round(input.pointers[i].clientY)
};
i++;
}
return {
timeStamp: now(),
pointers: pointers,
center: getCenter(pointers),
deltaX: input.deltaX,
deltaY: input.deltaY
};
}
/**
* get the center of all the pointers
* @param {Array} pointers
* @return {Object} center contains `x` and `y` properties
*/
function getCenter(pointers) {
var pointersLength = pointers.length;
// no need to loop when only one touch
if (pointersLength === 1) {
return {
x: round(pointers[0].clientX),
y: round(pointers[0].clientY)
};
}
var x = 0, y = 0, i = 0;
while (i < pointersLength) {
x += pointers[i].clientX;
y += pointers[i].clientY;
i++;
}
return {
x: round(x / pointersLength),
y: round(y / pointersLength)
};
}
/**
* calculate the velocity between two points. unit is in px per ms.
* @param {Number} deltaTime
* @param {Number} x
* @param {Number} y
* @return {Object} velocity `x` and `y`
*/
function getVelocity(deltaTime, x, y) {
return {
x: x / deltaTime || 0,
y: y / deltaTime || 0
};
}
/**
* get the direction between two points
* @param {Number} x
* @param {Number} y
* @return {Number} direction
*/
function getDirection(x, y) {
if (x === y) {
return DIRECTION_NONE;
}
if (abs(x) >= abs(y)) {
return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
}
return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
}
/**
* calculate the absolute distance between two points
* @param {Object} p1 {x, y}
* @param {Object} p2 {x, y}
* @param {Array} [props] containing x and y keys
* @return {Number} distance
*/
function getDistance(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
}
/**
* calculate the angle between two coordinates
* @param {Object} p1
* @param {Object} p2
* @param {Array} [props] containing x and y keys
* @return {Number} angle
*/
function getAngle(p1, p2, props) {
if (!props) {
props = PROPS_XY;
}
var x = p2[props[0]] - p1[props[0]],
y = p2[props[1]] - p1[props[1]];
return Math.atan2(y, x) * 180 / Math.PI;
}
/**
* calculate the rotation degrees between two pointersets
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} rotation
*/
function getRotation(start, end) {
return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);
}
/**
* calculate the scale factor between two pointersets
* no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
* @param {Array} start array of pointers
* @param {Array} end array of pointers
* @return {Number} scale
*/
function getScale(start, end) {
return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);
}
var MOUSE_INPUT_MAP = {
mousedown: INPUT_START,
mousemove: INPUT_MOVE,
mouseup: INPUT_END
};
var MOUSE_ELEMENT_EVENTS = 'mousedown';
var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';
/**
* Mouse events input
* @constructor
* @extends Input
*/
function MouseInput() {
this.evEl = MOUSE_ELEMENT_EVENTS;
this.evWin = MOUSE_WINDOW_EVENTS;
this.pressed = false; // mousedown state
Input.apply(this, arguments);
}
inherit(MouseInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function MEhandler(ev) {
var eventType = MOUSE_INPUT_MAP[ev.type];
// on start we want to have the left mouse button down
if (eventType & INPUT_START && ev.button === 0) {
this.pressed = true;
}
if (eventType & INPUT_MOVE && ev.which !== 1) {
eventType = INPUT_END;
}
// mouse must be down
if (!this.pressed) {
return;
}
if (eventType & INPUT_END) {
this.pressed = false;
}
this.callback(this.manager, eventType, {
pointers: [ev],
changedPointers: [ev],
pointerType: INPUT_TYPE_MOUSE,
srcEvent: ev
});
}
});
var POINTER_INPUT_MAP = {
pointerdown: INPUT_START,
pointermove: INPUT_MOVE,
pointerup: INPUT_END,
pointercancel: INPUT_CANCEL,
pointerout: INPUT_CANCEL
};
// in IE10 the pointer types is defined as an enum
var IE10_POINTER_TYPE_ENUM = {
2: INPUT_TYPE_TOUCH,
3: INPUT_TYPE_PEN,
4: INPUT_TYPE_MOUSE,
5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816
};
var POINTER_ELEMENT_EVENTS = 'pointerdown';
var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';
// IE10 has prefixed support, and case-sensitive
if (window.MSPointerEvent && !window.PointerEvent) {
POINTER_ELEMENT_EVENTS = 'MSPointerDown';
POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';
}
/**
* Pointer events input
* @constructor
* @extends Input
*/
function PointerEventInput() {
this.evEl = POINTER_ELEMENT_EVENTS;
this.evWin = POINTER_WINDOW_EVENTS;
Input.apply(this, arguments);
this.store = (this.manager.session.pointerEvents = []);
}
inherit(PointerEventInput, Input, {
/**
* handle mouse events
* @param {Object} ev
*/
handler: function PEhandler(ev) {
var store = this.store;
var removePointer = false;
var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;
var isTouch = (pointerType == INPUT_TYPE_TOUCH);
// get index of the event in the store
var storeIndex = inArray(store, ev.pointerId, 'pointerId');
// start and mouse must be down
if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {
if (storeIndex < 0) {
store.push(ev);
storeIndex = store.length - 1;
}
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
removePointer = true;
}
// it not found, so the pointer hasn't been down (so it's probably a hover)
if (storeIndex < 0) {
return;
}
// update the event in the store
store[storeIndex] = ev;
this.callback(this.manager, eventType, {
pointers: store,
changedPointers: [ev],
pointerType: pointerType,
srcEvent: ev
});
if (removePointer) {
// remove from the store
store.splice(storeIndex, 1);
}
}
});
var SINGLE_TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL
};
var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';
var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';
/**
* Touch events input
* @constructor
* @extends Input
*/
function SingleTouchInput() {
this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
this.started = false;
Input.apply(this, arguments);
}
inherit(SingleTouchInput, Input, {
handler: function TEhandler(ev) {
var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
// should we handle the touch events?
if (type === INPUT_START) {
this.started = true;
}
if (!this.started) {
return;
}
var touches = normalizeSingleTouches.call(this, ev, type);
// when done, reset the started state
if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
this.started = false;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev
});
}
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function normalizeSingleTouches(ev, type) {
var all = toArray(ev.touches);
var changed = toArray(ev.changedTouches);
if (type & (INPUT_END | INPUT_CANCEL)) {
all = uniqueArray(all.concat(changed), 'identifier', true);
}
return [all, changed];
}
var TOUCH_INPUT_MAP = {
touchstart: INPUT_START,
touchmove: INPUT_MOVE,
touchend: INPUT_END,
touchcancel: INPUT_CANCEL
};
var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';
/**
* Multi-user touch events input
* @constructor
* @extends Input
*/
function TouchInput() {
this.evTarget = TOUCH_TARGET_EVENTS;
this.targetIds = {};
Input.apply(this, arguments);
}
inherit(TouchInput, Input, {
handler: function MTEhandler(ev) {
var type = TOUCH_INPUT_MAP[ev.type];
var touches = getTouches.call(this, ev, type);
if (!touches) {
return;
}
this.callback(this.manager, type, {
pointers: touches[0],
changedPointers: touches[1],
pointerType: INPUT_TYPE_TOUCH,
srcEvent: ev
});
}
});
/**
* @this {TouchInput}
* @param {Object} ev
* @param {Number} type flag
* @returns {undefined|Array} [all, changed]
*/
function getTouches(ev, type) {
var allTouches = toArray(ev.touches);
var targetIds = this.targetIds;
// when there is only one touch, the process can be simplified
if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {
targetIds[allTouches[0].identifier] = true;
return [allTouches, allTouches];
}
var i,
targetTouches,
changedTouches = toArray(ev.changedTouches),
changedTargetTouches = [],
target = this.target;
// get target touches from touches
targetTouches = allTouches.filter(function(touch) {
return hasParent(touch.target, target);
});
// collect touches
if (type === INPUT_START) {
i = 0;
while (i < targetTouches.length) {
targetIds[targetTouches[i].identifier] = true;
i++;
}
}
// filter changed touches to only contain touches that exist in the collected target ids
i = 0;
while (i < changedTouches.length) {
if (targetIds[changedTouches[i].identifier]) {
changedTargetTouches.push(changedTouches[i]);
}
// cleanup removed touches
if (type & (INPUT_END | INPUT_CANCEL)) {
delete targetIds[changedTouches[i].identifier];
}
i++;
}
if (!changedTargetTouches.length) {
return;
}
return [
// merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),
changedTargetTouches
];
}
/**
* Combined touch and mouse input
*
* Touch has a higher priority then mouse, and while touching no mouse events are allowed.
* This because touch devices also emit mouse events while doing a touch.
*
* @constructor
* @extends Input
*/
var DEDUP_TIMEOUT = 2500;
var DEDUP_DISTANCE = 25;
function TouchMouseInput() {
Input.apply(this, arguments);
var handler = bindFn(this.handler, this);
this.touch = new TouchInput(this.manager, handler);
this.mouse = new MouseInput(this.manager, handler);
this.primaryTouch = null;
this.lastTouches = [];
}
inherit(TouchMouseInput, Input, {
/**
* handle mouse and touch events
* @param {Hammer} manager
* @param {String} inputEvent
* @param {Object} inputData
*/
handler: function TMEhandler(manager, inputEvent, inputData) {
var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),
isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);
if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {
return;
}
// when we're in a touch event, record touches to de-dupe synthetic mouse event
if (isTouch) {
recordTouches.call(this, inputEvent, inputData);
} else if (isMouse && isSyntheticEvent.call(this, inputData)) {
return;
}
this.callback(manager, inputEvent, inputData);
},
/**
* remove the event listeners
*/
destroy: function destroy() {
this.touch.destroy();
this.mouse.destroy();
}
});
function recordTouches(eventType, eventData) {
if (eventType & INPUT_START) {
this.primaryTouch = eventData.changedPointers[0].identifier;
setLastTouch.call(this, eventData);
} else if (eventType & (INPUT_END | INPUT_CANCEL)) {
setLastTouch.call(this, eventData);
}
}
function setLastTouch(eventData) {
var touch = eventData.changedPointers[0];
if (touch.identifier === this.primaryTouch) {
var lastTouch = {x: touch.clientX, y: touch.clientY};
this.lastTouches.push(lastTouch);
var lts = this.lastTouches;
var removeLastTouch = function() {
var i = lts.indexOf(lastTouch);
if (i > -1) {
lts.splice(i, 1);
}
};
setTimeout(removeLastTouch, DEDUP_TIMEOUT);
}
}
function isSyntheticEvent(eventData) {
var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;
for (var i = 0; i < this.lastTouches.length; i++) {
var t = this.lastTouches[i];
var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
return true;
}
}
return false;
}
var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');
var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;
// magical touchAction value
var TOUCH_ACTION_COMPUTE = 'compute';
var TOUCH_ACTION_AUTO = 'auto';
var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented
var TOUCH_ACTION_NONE = 'none';
var TOUCH_ACTION_PAN_X = 'pan-x';
var TOUCH_ACTION_PAN_Y = 'pan-y';
var TOUCH_ACTION_MAP = getTouchActionProps();
/**
* Touch Action
* sets the touchAction property or uses the js alternative
* @param {Manager} manager
* @param {String} value
* @constructor
*/
function TouchAction(manager, value) {
this.manager = manager;
this.set(value);
}
TouchAction.prototype = {
/**
* set the touchAction value on the element or enable the polyfill
* @param {String} value
*/
set: function(value) {
// find out the touch-action by the event handlers
if (value == TOUCH_ACTION_COMPUTE) {
value = this.compute();
}
if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {
this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
}
this.actions = value.toLowerCase().trim();
},
/**
* just re-set the touchAction value
*/
update: function() {
this.set(this.manager.options.touchAction);
},
/**
* compute the value for the touchAction property based on the recognizer's settings
* @returns {String} value
*/
compute: function() {
var actions = [];
each(this.manager.recognizers, function(recognizer) {
if (boolOrFn(recognizer.options.enable, [recognizer])) {
actions = actions.concat(recognizer.getTouchAction());
}
});
return cleanTouchActions(actions.join(' '));
},
/**
* this method is called on each input cycle and provides the preventing of the browser behavior
* @param {Object} input
*/
preventDefaults: function(input) {
var srcEvent = input.srcEvent;
var direction = input.offsetDirection;
// if the touch action did prevented once this session
if (this.manager.session.prevented) {
srcEvent.preventDefault();
return;
}
var actions = this.actions;
var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
if (hasNone) {
//do not prevent defaults if this is a tap gesture
var isTapPointer = input.pointers.length === 1;
var isTapMovement = input.distance < 2;
var isTapTouchTime = input.deltaTime < 250;
if (isTapPointer && isTapMovement && isTapTouchTime) {
return;
}
}
if (hasPanX && hasPanY) {
// `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
return;
}
if (hasNone ||
(hasPanY && direction & DIRECTION_HORIZONTAL) ||
(hasPanX && direction & DIRECTION_VERTICAL)) {
return this.preventSrc(srcEvent);
}
},
/**
* call preventDefault to prevent the browser's default behavior (scrolling in most cases)
* @param {Object} srcEvent
*/
preventSrc: function(srcEvent) {
this.manager.session.prevented = true;
srcEvent.preventDefault();
}
};
/**
* when the touchActions are collected they are not a valid value, so we need to clean things up. *
* @param {String} actions
* @returns {*}
*/
function cleanTouchActions(actions) {
// none
if (inStr(actions, TOUCH_ACTION_NONE)) {
return TOUCH_ACTION_NONE;
}
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
// if both pan-x and pan-y are set (different recognizers
// for different directions, e.g. horizontal pan but vertical swipe?)
// we need none (as otherwise with pan-x pan-y combined none of these
// recognizers will work, since the browser would handle all panning
if (hasPanX && hasPanY) {
return TOUCH_ACTION_NONE;
}
// pan-x OR pan-y
if (hasPanX || hasPanY) {
return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;
}
// manipulation
if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
return TOUCH_ACTION_MANIPULATION;
}
return TOUCH_ACTION_AUTO;
}
function getTouchActionProps() {
if (!NATIVE_TOUCH_ACTION) {
return false;
}
var touchMap = {};
var cssSupports = window.CSS && window.CSS.supports;
['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
// If css.supports is not supported but there is native touch-action assume it supports
// all values. This is the case for IE 10 and 11.
touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
});
return touchMap;
}
/**
* Recognizer flow explained; *
* All recognizers have the initial state of POSSIBLE when a input session starts.
* The definition of a input session is from the first input until the last input, with all it's movement in it. *
* Example session for mouse-input: mousedown -> mousemove -> mouseup
*
* On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
* which determines with state it should be.
*
* If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
* POSSIBLE to give it another change on the next cycle.
*
* Possible
* |
* +-----+---------------+
* | |
* +-----+-----+ |
* | | |
* Failed Cancelled |
* +-------+------+
* | |
* Recognized Began
* |
* Changed
* |
* Ended/Recognized
*/
var STATE_POSSIBLE = 1;
var STATE_BEGAN = 2;
var STATE_CHANGED = 4;
var STATE_ENDED = 8;
var STATE_RECOGNIZED = STATE_ENDED;
var STATE_CANCELLED = 16;
var STATE_FAILED = 32;
/**
* Recognizer
* Every recognizer needs to extend from this class.
* @constructor
* @param {Object} options
*/
function Recognizer(options) {
this.options = assign({}, this.defaults, options || {});
this.id = uniqueId();
this.manager = null;
// default is enable true
this.options.enable = ifUndefined(this.options.enable, true);
this.state = STATE_POSSIBLE;
this.simultaneous = {};
this.requireFail = [];
}
Recognizer.prototype = {
/**
* @virtual
* @type {Object}
*/
defaults: {},
/**
* set options
* @param {Object} options
* @return {Recognizer}
*/
set: function(options) {
assign(this.options, options);
// also update the touchAction, in case something changed about the directions/enabled state
this.manager && this.manager.touchAction.update();
return this;
},
/**
* recognize simultaneous with an other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
recognizeWith: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {
return this;
}
var simultaneous = this.simultaneous;
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
if (!simultaneous[otherRecognizer.id]) {
simultaneous[otherRecognizer.id] = otherRecognizer;
otherRecognizer.recognizeWith(this);
}
return this;
},
/**
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRecognizeWith: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
delete this.simultaneous[otherRecognizer.id];
return this;
},
/**
* recognizer can only run when an other is failing
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
requireFailure: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {
return this;
}
var requireFail = this.requireFail;
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
if (inArray(requireFail, otherRecognizer) === -1) {
requireFail.push(otherRecognizer);
otherRecognizer.requireFailure(this);
}
return this;
},
/**
* drop the requireFailure link. it does not remove the link on the other recognizer.
* @param {Recognizer} otherRecognizer
* @returns {Recognizer} this
*/
dropRequireFailure: function(otherRecognizer) {
if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {
return this;
}
otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
var index = inArray(this.requireFail, otherRecognizer);
if (index > -1) {
this.requireFail.splice(index, 1);
}
return this;
},
/**
* has require failures boolean
* @returns {boolean}
*/
hasRequireFailures: function() {
return this.requireFail.length > 0;
},
/**
* if the recognizer can recognize simultaneous with an other recognizer
* @param {Recognizer} otherRecognizer
* @returns {Boolean}
*/
canRecognizeWith: function(otherRecognizer) {
return !!this.simultaneous[otherRecognizer.id];
},
/**
* You should use `tryEmit` instead of `emit` directly to check
* that all the needed recognizers has failed before emitting.
* @param {Object} input
*/
emit: function(input) {
var self = this;
var state = this.state;
function emit(event) {
self.manager.emit(event, input);
}
// 'panstart' and 'panmove'
if (state < STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
emit(self.options.event); // simple 'eventName' events
if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
emit(input.additionalEvent);
}
// panend and pancancel
if (state >= STATE_ENDED) {
emit(self.options.event + stateStr(state));
}
},
/**
* Check that all the require failure recognizers has failed,
* if true, it emits a gesture event,
* otherwise, setup the state to FAILED.
* @param {Object} input
*/
tryEmit: function(input) {
if (this.canEmit()) {
return this.emit(input);
}
// it's failing anyway
this.state = STATE_FAILED;
},
/**
* can we emit?
* @returns {boolean}
*/
canEmit: function() {
var i = 0;
while (i < this.requireFail.length) {
if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {
return false;
}
i++;
}
return true;
},
/**
* update the recognizer
* @param {Object} inputData
*/
recognize: function(inputData) {
// make a new copy of the inputData
// so we can change the inputData without messing up the other recognizers
var inputDataClone = assign({}, inputData);
// is is enabled and allow recognizing?
if (!boolOrFn(this.options.enable, [this, inputDataClone])) {
this.reset();
this.state = STATE_FAILED;
return;
}
// reset when we've reached the end
if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {
this.state = STATE_POSSIBLE;
}
this.state = this.process(inputDataClone);
// the recognizer has recognized a gesture
// so trigger an event
if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {
this.tryEmit(inputDataClone);
}
},
/**
* return the state of the recognizer
* the actual recognizing happens in this method
* @virtual
* @param {Object} inputData
* @returns {Const} STATE
*/
process: function(inputData) { }, // jshint ignore:line
/**
* return the preferred touch-action
* @virtual
* @returns {Array}
*/
getTouchAction: function() { },
/**
* called when the gesture isn't allowed to recognize
* like when another is being recognized or it is disabled
* @virtual
*/
reset: function() { }
};
/**
* get a usable string, used as event postfix
* @param {Const} state
* @returns {String} state
*/
function stateStr(state) {
if (state & STATE_CANCELLED) {
return 'cancel';
} else if (state & STATE_ENDED) {
return 'end';
} else if (state & STATE_CHANGED) {
return 'move';
} else if (state & STATE_BEGAN) {
return 'start';
}
return '';
}
/**
* direction cons to string
* @param {Const} direction
* @returns {String}
*/
function directionStr(direction) {
if (direction == DIRECTION_DOWN) {
return 'down';
} else if (direction == DIRECTION_UP) {
return 'up';
} else if (direction == DIRECTION_LEFT) {
return 'left';
} else if (direction == DIRECTION_RIGHT) {
return 'right';
}
return '';
}
/**
* get a recognizer by name if it is bound to a manager
* @param {Recognizer|String} otherRecognizer
* @param {Recognizer} recognizer
* @returns {Recognizer}
*/
function getRecognizerByNameIfManager(otherRecognizer, recognizer) {
var manager = recognizer.manager;
if (manager) {
return manager.get(otherRecognizer);
}
return otherRecognizer;
}
/**
* This recognizer is just used as a base for the simple attribute recognizers.
* @constructor
* @extends Recognizer
*/
function AttrRecognizer() {
Recognizer.apply(this, arguments);
}
inherit(AttrRecognizer, Recognizer, {
/**
* @namespace
* @memberof AttrRecognizer
*/
defaults: {
/**
* @type {Number}
* @default 1
*/
pointers: 1
},
/**
* Used to check if it the recognizer receives valid input, like input.distance > 10.
* @memberof AttrRecognizer
* @param {Object} input
* @returns {Boolean} recognized
*/
attrTest: function(input) {
var optionPointers = this.options.pointers;
return optionPointers === 0 || input.pointers.length === optionPointers;
},
/**
* Process the input and return the state for the recognizer
* @memberof AttrRecognizer
* @param {Object} input
* @returns {*} State
*/
process: function(input) {
var state = this.state;
var eventType = input.eventType;
var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
var isValid = this.attrTest(input);
// on cancel input and we've recognized before, return STATE_CANCELLED
if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
return state | STATE_CANCELLED;
} else if (isRecognized || isValid) {
if (eventType & INPUT_END) {
return state | STATE_ENDED;
} else if (!(state & STATE_BEGAN)) {
return STATE_BEGAN;
}
return state | STATE_CHANGED;
}
return STATE_FAILED;
}
});
/**
* Pan
* Recognized when the pointer is down and moved in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function PanRecognizer() {
AttrRecognizer.apply(this, arguments);
this.pX = null;
this.pY = null;
}
inherit(PanRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PanRecognizer
*/
defaults: {
event: 'pan',
threshold: 10,
pointers: 1,
direction: DIRECTION_ALL
},
getTouchAction: function() {
var direction = this.options.direction;
var actions = [];
if (direction & DIRECTION_HORIZONTAL) {
actions.push(TOUCH_ACTION_PAN_Y);
}
if (direction & DIRECTION_VERTICAL) {
actions.push(TOUCH_ACTION_PAN_X);
}
return actions;
},
directionTest: function(input) {
var options = this.options;
var hasMoved = true;
var distance = input.distance;
var direction = input.direction;
var x = input.deltaX;
var y = input.deltaY;
// lock to axis?
if (!(direction & options.direction)) {
if (options.direction & DIRECTION_HORIZONTAL) {
direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;
hasMoved = x != this.pX;
distance = Math.abs(input.deltaX);
} else {
direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;
hasMoved = y != this.pY;
distance = Math.abs(input.deltaY);
}
}
input.direction = direction;
return hasMoved && distance > options.threshold && direction & options.direction;
},
attrTest: function(input) {
return AttrRecognizer.prototype.attrTest.call(this, input) &&
(this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
},
emit: function(input) {
this.pX = input.deltaX;
this.pY = input.deltaY;
var direction = directionStr(input.direction);
if (direction) {
input.additionalEvent = this.options.event + direction;
}
this._super.emit.call(this, input);
}
});
/**
* Pinch
* Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
* @constructor
* @extends AttrRecognizer
*/
function PinchRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(PinchRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: 'pinch',
threshold: 0,
pointers: 2
},
getTouchAction: function() {
return [TOUCH_ACTION_NONE];
},
attrTest: function(input) {
return this._super.attrTest.call(this, input) &&
(Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
},
emit: function(input) {
if (input.scale !== 1) {
var inOut = input.scale < 1 ? 'in' : 'out';
input.additionalEvent = this.options.event + inOut;
}
this._super.emit.call(this, input);
}
});
/**
* Press
* Recognized when the pointer is down for x ms without any movement.
* @constructor
* @extends Recognizer
*/
function PressRecognizer() {
Recognizer.apply(this, arguments);
this._timer = null;
this._input = null;
}
inherit(PressRecognizer, Recognizer, {
/**
* @namespace
* @memberof PressRecognizer
*/
defaults: {
event: 'press',
pointers: 1,
time: 251, // minimal time of the pointer to be pressed
threshold: 9 // a minimal movement is ok, but keep it low
},
getTouchAction: function() {
return [TOUCH_ACTION_AUTO];
},
process: function(input) {
var options = this.options;
var validPointers = input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTime = input.deltaTime > options.time;
this._input = input;
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {
this.reset();
} else if (input.eventType & INPUT_START) {
this.reset();
this._timer = setTimeoutContext(function() {
this.state = STATE_RECOGNIZED;
this.tryEmit();
}, options.time, this);
} else if (input.eventType & INPUT_END) {
return STATE_RECOGNIZED;
}
return STATE_FAILED;
},
reset: function() {
clearTimeout(this._timer);
},
emit: function(input) {
if (this.state !== STATE_RECOGNIZED) {
return;
}
if (input && (input.eventType & INPUT_END)) {
this.manager.emit(this.options.event + 'up', input);
} else {
this._input.timeStamp = now();
this.manager.emit(this.options.event, this._input);
}
}
});
/**
* Rotate
* Recognized when two or more pointer are moving in a circular motion.
* @constructor
* @extends AttrRecognizer
*/
function RotateRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(RotateRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof RotateRecognizer
*/
defaults: {
event: 'rotate',
threshold: 0,
pointers: 2
},
getTouchAction: function() {
return [TOUCH_ACTION_NONE];
},
attrTest: function(input) {
return this._super.attrTest.call(this, input) &&
(Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
}
});
/**
* Swipe
* Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
* @constructor
* @extends AttrRecognizer
*/
function SwipeRecognizer() {
AttrRecognizer.apply(this, arguments);
}
inherit(SwipeRecognizer, AttrRecognizer, {
/**
* @namespace
* @memberof SwipeRecognizer
*/
defaults: {
event: 'swipe',
threshold: 10,
velocity: 0.3,
direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
pointers: 1
},
getTouchAction: function() {
return PanRecognizer.prototype.getTouchAction.call(this);
},
attrTest: function(input) {
var direction = this.options.direction;
var velocity;
if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
velocity = input.overallVelocity;
} else if (direction & DIRECTION_HORIZONTAL) {
velocity = input.overallVelocityX;
} else if (direction & DIRECTION_VERTICAL) {
velocity = input.overallVelocityY;
}
return this._super.attrTest.call(this, input) &&
direction & input.offsetDirection &&
input.distance > this.options.threshold &&
input.maxPointers == this.options.pointers &&
abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
},
emit: function(input) {
var direction = directionStr(input.offsetDirection);
if (direction) {
this.manager.emit(this.options.event + direction, input);
}
this.manager.emit(this.options.event, input);
}
});
/**
* A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
* between the given interval and position. The delay option can be used to recognize multi-taps without firing
* a single tap.
*
* The eventData from the emitted event contains the property `tapCount`, which contains the amount of
* multi-taps being recognized.
* @constructor
* @extends Recognizer
*/
function TapRecognizer() {
Recognizer.apply(this, arguments);
// previous time and center,
// used for tap counting
this.pTime = false;
this.pCenter = false;
this._timer = null;
this._input = null;
this.count = 0;
}
inherit(TapRecognizer, Recognizer, {
/**
* @namespace
* @memberof PinchRecognizer
*/
defaults: {
event: 'tap',
pointers: 1,
taps: 1,
interval: 300, // max time between the multi-tap taps
time: 250, // max time of the pointer to be down (like finger on the screen)
threshold: 9, // a minimal movement is ok, but keep it low
posThreshold: 10 // a multi-tap can be a bit off the initial position
},
getTouchAction: function() {
return [TOUCH_ACTION_MANIPULATION];
},
process: function(input) {
var options = this.options;
var validPointers = input.pointers.length === options.pointers;
var validMovement = input.distance < options.threshold;
var validTouchTime = input.deltaTime < options.time;
this.reset();
if ((input.eventType & INPUT_START) && (this.count === 0)) {
return this.failTimeout();
}
// we only allow little movement
// and we've reached an end event, so a tap is possible
if (validMovement && validTouchTime && validPointers) {
if (input.eventType != INPUT_END) {
return this.failTimeout();
}
var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;
this.pTime = input.timeStamp;
this.pCenter = input.center;
if (!validMultiTap || !validInterval) {
this.count = 1;
} else {
this.count += 1;
}
this._input = input;
// if tap count matches we have recognized it,
// else it has began recognizing...
var tapCount = this.count % options.taps;
if (tapCount === 0) {
// no failing requirements, immediately trigger the tap event
// or wait as long as the multitap interval to trigger
if (!this.hasRequireFailures()) {
return STATE_RECOGNIZED;
} else {
this._timer = setTimeoutContext(function() {
this.state = STATE_RECOGNIZED;
this.tryEmit();
}, options.interval, this);
return STATE_BEGAN;
}
}
}
return STATE_FAILED;
},
failTimeout: function() {
this._timer = setTimeoutContext(function() {
this.state = STATE_FAILED;
}, this.options.interval, this);
return STATE_FAILED;
},
reset: function() {
clearTimeout(this._timer);
},
emit: function() {
if (this.state == STATE_RECOGNIZED) {
this._input.tapCount = this.count;
this.manager.emit(this.options.event, this._input);
}
}
});
/**
* Simple way to create a manager with a default set of recognizers.
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Hammer(element, options) {
options = options || {};
options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);
return new Manager(element, options);
}
/**
* @const {string}
*/
Hammer.VERSION = '2.0.7';
/**
* default settings
* @namespace
*/
Hammer.defaults = {
/**
* set if DOM events are being triggered.
* But this is slower and unused by simple implementations, so disabled by default.
* @type {Boolean}
* @default false
*/
domEvents: false,
/**
* The value for the touchAction property/fallback.
* When set to `compute` it will magically set the correct value based on the added recognizers.
* @type {String}
* @default compute
*/
touchAction: TOUCH_ACTION_COMPUTE,
/**
* @type {Boolean}
* @default true
*/
enable: true,
/**
* EXPERIMENTAL FEATURE -- can be removed/changed
* Change the parent input target element.
* If Null, then it is being set the to main element.
* @type {Null|EventTarget}
* @default null
*/
inputTarget: null,
/**
* force an input class
* @type {Null|Function}
* @default null
*/
inputClass: null,
/**
* Default recognizer setup when calling `Hammer()`
* When creating a new Manager these will be skipped.
* @type {Array}
*/
preset: [
// RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
[RotateRecognizer, {enable: false}],
[PinchRecognizer, {enable: false}, ['rotate']],
[SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],
[PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],
[TapRecognizer],
[TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],
[PressRecognizer]
],
/**
* Some CSS properties can be used to improve the working of Hammer.
* Add them to this method and they will be set when creating a new Manager.
* @namespace
*/
cssProps: {
/**
* Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userSelect: 'none',
/**
* Disable the Windows Phone grippers when pressing an element.
* @type {String}
* @default 'none'
*/
touchSelect: 'none',
/**
* Disables the default callout shown when you touch and hold a touch target.
* On iOS, when you touch and hold a touch target such as a link, Safari displays
* a callout containing information about the link. This property allows you to disable that callout.
* @type {String}
* @default 'none'
*/
touchCallout: 'none',
/**
* Specifies whether zooming is enabled. Used by IE10>
* @type {String}
* @default 'none'
*/
contentZooming: 'none',
/**
* Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
* @type {String}
* @default 'none'
*/
userDrag: 'none',
/**
* Overrides the highlight color shown when the user taps a link or a JavaScript
* clickable element in iOS. This property obeys the alpha value, if specified.
* @type {String}
* @default 'rgba(0,0,0,0)'
*/
tapHighlightColor: 'rgba(0,0,0,0)'
}
};
var STOP = 1;
var FORCED_STOP = 2;
/**
* Manager
* @param {HTMLElement} element
* @param {Object} [options]
* @constructor
*/
function Manager(element, options) {
this.options = assign({}, Hammer.defaults, options || {});
this.options.inputTarget = this.options.inputTarget || element;
this.handlers = {};
this.session = {};
this.recognizers = [];
this.oldCssProps = {};
this.element = element;
this.input = createInputInstance(this);
this.touchAction = new TouchAction(this, this.options.touchAction);
toggleCssProps(this, true);
each(this.options.recognizers, function(item) {
var recognizer = this.add(new (item[0])(item[1]));
item[2] && recognizer.recognizeWith(item[2]);
item[3] && recognizer.requireFailure(item[3]);
}, this);
}
Manager.prototype = {
/**
* set options
* @param {Object} options
* @returns {Manager}
*/
set: function(options) {
assign(this.options, options);
// Options that need a little more setup
if (options.touchAction) {
this.touchAction.update();
}
if (options.inputTarget) {
// Clean up existing event listeners and reinitialize
this.input.destroy();
this.input.target = options.inputTarget;
this.input.init();
}
return this;
},
/**
* stop recognizing for this session.
* This session will be discarded, when a new [input]start event is fired.
* When forced, the recognizer cycle is stopped immediately.
* @param {Boolean} [force]
*/
stop: function(force) {
this.session.stopped = force ? FORCED_STOP : STOP;
},
/**
* run the recognizers!
* called by the inputHandler function on every movement of the pointers (touches)
* it walks through all the recognizers and tries to detect the gesture that is being made
* @param {Object} inputData
*/
recognize: function(inputData) {
var session = this.session;
if (session.stopped) {
return;
}
// run the touch-action polyfill
this.touchAction.preventDefaults(inputData);
var recognizer;
var recognizers = this.recognizers;
// this holds the recognizer that is being recognized.
// so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
// if no recognizer is detecting a thing, it is set to `null`
var curRecognizer = session.curRecognizer;
// reset when the last recognizer is recognized
// or when we're in a new session
if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {
curRecognizer = session.curRecognizer = null;
}
var i = 0;
while (i < recognizers.length) {
recognizer = recognizers[i];
// find out if we are allowed try to recognize the input for this one.
// 1. allow if the session is NOT forced stopped (see the .stop() method)
// 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
// that is being recognized.
// 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
// this can be setup with the `recognizeWith()` method on the recognizer.
if (session.stopped !== FORCED_STOP && ( // 1
!curRecognizer || recognizer == curRecognizer || // 2
recognizer.canRecognizeWith(curRecognizer))) { // 3
recognizer.recognize(inputData);
} else {
recognizer.reset();
}
// if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
// current active recognizer. but only if we don't already have an active recognizer
if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {
curRecognizer = session.curRecognizer = recognizer;
}
i++;
}
},
/**
* get a recognizer by its event name.
* @param {Recognizer|String} recognizer
* @returns {Recognizer|Null}
*/
get: function(recognizer) {
if (recognizer instanceof Recognizer) {
return recognizer;
}
var recognizers = this.recognizers;
for (var i = 0; i < recognizers.length; i++) {
if (recognizers[i].options.event == recognizer) {
return recognizers[i];
}
}
return null;
},
/**
* add a recognizer to the manager
* existing recognizers with the same event name will be removed
* @param {Recognizer} recognizer
* @returns {Recognizer|Manager}
*/
add: function(recognizer) {
if (invokeArrayArg(recognizer, 'add', this)) {
return this;
}
// remove existing
var existing = this.get(recognizer.options.event);
if (existing) {
this.remove(existing);
}
this.recognizers.push(recognizer);
recognizer.manager = this;
this.touchAction.update();
return recognizer;
},
/**
* remove a recognizer by name or instance
* @param {Recognizer|String} recognizer
* @returns {Manager}
*/
remove: function(recognizer) {
if (invokeArrayArg(recognizer, 'remove', this)) {
return this;
}
recognizer = this.get(recognizer);
// let's make sure this recognizer exists
if (recognizer) {
var recognizers = this.recognizers;
var index = inArray(recognizers, recognizer);
if (index !== -1) {
recognizers.splice(index, 1);
this.touchAction.update();
}
}
return this;
},
/**
* bind event
* @param {String} events
* @param {Function} handler
* @returns {EventEmitter} this
*/
on: function(events, handler) {
if (events === undefined) {
return;
}
if (handler === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function(event) {
handlers[event] = handlers[event] || [];
handlers[event].push(handler);
});
return this;
},
/**
* unbind event, leave emit blank to remove all handlers
* @param {String} events
* @param {Function} [handler]
* @returns {EventEmitter} this
*/
off: function(events, handler) {
if (events === undefined) {
return;
}
var handlers = this.handlers;
each(splitStr(events), function(event) {
if (!handler) {
delete handlers[event];
} else {
handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
}
});
return this;
},
/**
* emit event to the listeners
* @param {String} event
* @param {Object} data
*/
emit: function(event, data) {
// we also want to trigger dom events
if (this.options.domEvents) {
triggerDomEvent(event, data);
}
// no handlers, so skip it all
var handlers = this.handlers[event] && this.handlers[event].slice();
if (!handlers || !handlers.length) {
return;
}
data.type = event;
data.preventDefault = function() {
data.srcEvent.preventDefault();
};
var i = 0;
while (i < handlers.length) {
handlers[i](data);
i++;
}
},
/**
* destroy the manager and unbinds all events
* it doesn't unbind dom events, that is the user own responsibility
*/
destroy: function() {
this.element && toggleCssProps(this, false);
this.handlers = {};
this.session = {};
this.input.destroy();
this.element = null;
}
};
/**
* add/remove the css properties as defined in manager.options.cssProps
* @param {Manager} manager
* @param {Boolean} add
*/
function toggleCssProps(manager, add) {
var element = manager.element;
if (!element.style) {
return;
}
var prop;
each(manager.options.cssProps, function(value, name) {
prop = prefixed(element.style, name);
if (add) {
manager.oldCssProps[prop] = element.style[prop];
element.style[prop] = value;
} else {
element.style[prop] = manager.oldCssProps[prop] || '';
}
});
if (!add) {
manager.oldCssProps = {};
}
}
/**
* trigger dom event
* @param {String} event
* @param {Object} data
*/
function triggerDomEvent(event, data) {
var gestureEvent = document.createEvent('Event');
gestureEvent.initEvent(event, true, true);
gestureEvent.gesture = data;
data.target.dispatchEvent(gestureEvent);
}
assign(Hammer, {
INPUT_START: INPUT_START,
INPUT_MOVE: INPUT_MOVE,
INPUT_END: INPUT_END,
INPUT_CANCEL: INPUT_CANCEL,
STATE_POSSIBLE: STATE_POSSIBLE,
STATE_BEGAN: STATE_BEGAN,
STATE_CHANGED: STATE_CHANGED,
STATE_ENDED: STATE_ENDED,
STATE_RECOGNIZED: STATE_RECOGNIZED,
STATE_CANCELLED: STATE_CANCELLED,
STATE_FAILED: STATE_FAILED,
DIRECTION_NONE: DIRECTION_NONE,
DIRECTION_LEFT: DIRECTION_LEFT,
DIRECTION_RIGHT: DIRECTION_RIGHT,
DIRECTION_UP: DIRECTION_UP,
DIRECTION_DOWN: DIRECTION_DOWN,
DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
DIRECTION_VERTICAL: DIRECTION_VERTICAL,
DIRECTION_ALL: DIRECTION_ALL,
Manager: Manager,
Input: Input,
TouchAction: TouchAction,
TouchInput: TouchInput,
MouseInput: MouseInput,
PointerEventInput: PointerEventInput,
TouchMouseInput: TouchMouseInput,
SingleTouchInput: SingleTouchInput,
Recognizer: Recognizer,
AttrRecognizer: AttrRecognizer,
Tap: TapRecognizer,
Pan: PanRecognizer,
Swipe: SwipeRecognizer,
Pinch: PinchRecognizer,
Rotate: RotateRecognizer,
Press: PressRecognizer,
on: addEventListeners,
off: removeEventListeners,
each: each,
merge: merge,
extend: extend,
assign: assign,
inherit: inherit,
bindFn: bindFn,
prefixed: prefixed
});
// this prevents errors when Hammer is loaded in the presence of an AMD
// style loader but by script tag, not by the loader.
var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
freeGlobal.Hammer = Hammer;
if (typeof define === 'function' && define.amd) {
define(function() {
return Hammer;
});
} else if (typeof module != 'undefined' && module.exports) {
module.exports = Hammer;
} else {
window[exportName] = Hammer;
}
})(window, document, 'Hammer');
/*!
* Muuri v0.5.3
* https://github.com/haltu/muuri
* Copyright (c) 2015, Haltu Oy
*
* 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 (global, factory) {
var namespace = 'Muuri';
var Hammer = require('$:/plugins/BTC/tiddly-touch/lib/hammer.js');
var ItemAnimate;
var isEdge = navigator.userAgent.indexOf('Edge');
var isiOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || (typeof safari !== 'undefined' && safari.pushNotification));
if(isSafari === true || isEdge > -1 || isiOS === true) {
ItemAnimate = require('$:/plugins/BTC/tiddly-touch/lib/web-animations.js');
}
//var popmotion = require('$:/plugins/BTC/tiddly-touch/lib/popmotion.js');
// if (typeof module === 'object' && module.exports) {
/* eslint-disable */
//try { Hammer = require('$:/plugins/BTC/tiddly-touch/lib/hammer.js'); } catch (e) {}
/* eslint-enable */
/*module.exports = factory(namespace, Hammer);
}
else if (typeof define === 'function' && define.amd) {
define(['hammerjs'], function (Hammer) {
return factory(namespace, Hammer);
});
}
else {
global[namespace] = factory(namespace, global.Hammer);
}*/
module.exports = factory(namespace, Hammer);
}(typeof window !== 'undefined' ? window : this, function (namespace, Hammer, undefined) {
'use strict';
// Get references to all the stuff we are using from the global scope.
var global = window;
var Object = global.Object;
var Array = global.Array;
var Math = global.Math;
var Error = global.Error;
var Element = global.Element;
var doc = global.document;
var docElem = doc.documentElement;
var body = doc.body;
// Types.
var typeFunction = 'function';
var typeString = 'string';
var typeNumber = 'number';
// Raf loop that can be used to organize DOM write and read operations
// optimally in the next animation frame.
var rafLoop = createRafLoop();
// Raf loop queue names.
var rafQueueLayout = 'layout';
var rafQueueVisibility = 'visibility';
var rafQueueMove = 'move';
var rafQueueScroll = 'scroll';
// Drag start predicate states.
var startPredicateInactive = 0;
var startPredicatePending = 1;
var startPredicateResolved = 2;
var startPredicateRejected = 3;
// Keep track of Grid instances.
var gridInstances = {};
// Keep track of Item instances.
var itemInstances = {};
// No operation function.
var noop = function () {};
// Unique id which is used for Grid instances and Item instances.
// Should be incremented every time when used.
var uuid = 0;
// Get the supported element.matches().
var elementMatches = getSupportedElementMatches();
// Get the supported transform style property.
var transform = getSupportedStyle('transform');
// Test if transformed elements leak fixed elements.
var transformLeaksFixed = body ? doesTransformLeakFixed() : null;
// Event names.
var evSynchronize = 'synchronize';
var evLayoutStart = 'layoutStart';
var evLayoutEnd = 'layoutEnd';
var evAdd = 'add';
var evRemove = 'remove';
var evShowStart = 'showStart';
var evShowEnd = 'showEnd';
var evHideStart = 'hideStart';
var evHideEnd = 'hideEnd';
var evFilter = 'filter';
var evSort = 'sort';
var evMove = 'move';
var evSend = 'send';
var evBeforeSend = 'beforeSend';
var evReceive = 'receive';
var evBeforeReceive = 'beforeReceive';
var evDragInit = 'dragInit';
var evDragStart = 'dragStart';
var evDragMove = 'dragMove';
var evDragScroll = 'dragScroll';
var evDragEnd = 'dragEnd';
var evDragReleaseStart = 'dragReleaseStart';
var evDragReleaseEnd = 'dragReleaseEnd';
var evDestroy = 'destroy';
/**
* Grid
* ****
*/
/**
* Creates a new Grid instance.
*
* @public
* @class
* @param {(HTMLElement|String)} element
* @param {Object} [options]
* @param {(?HTMLElement[]|NodeList|String)} [options.items]
* @param {Number} [options.showDuration=300]
* @param {String} [options.showEasing="ease"]
* @param {Object} [options.visibleStyles]
* @param {Number} [options.hideDuration=300]
* @param {String} [options.hideEasing="ease"]
* @param {Object} [options.hiddenStyles]
* @param {(Function|Object)} [options.layout]
* @param {Boolean} [options.layout.fillGaps=false]
* @param {Boolean} [options.layout.horizontal=false]
* @param {Boolean} [options.layout.alignRight=false]
* @param {Boolean} [options.layout.alignBottom=false]
* @param {Boolean} [options.layout.rounding=true]
* @param {(Boolean|Number)} [options.layoutOnResize=100]
* @param {Boolean} [options.layoutOnInit=true]
* @param {Number} [options.layoutDuration=300]
* @param {String} [options.layoutEasing="ease"]
* @param {?Object} [options.sortData=null]
* @param {Boolean} [options.dragEnabled=false]
* @param {?HtmlElement} [options.dragContainer=null]
* @param {?Function} [options.dragStartPredicate]
* @param {Number} [options.dragStartPredicate.distance=0]
* @param {Number} [options.dragStartPredicate.delay=0]
* @param {(Boolean|String)} [options.dragStartPredicate.handle=false]
* @param {?String} [options.dragAxis]
* @param {(Boolean|Function)} [options.dragSort=true]
* @param {Number} [options.dragSortInterval=100]
* @param {(Function|Object)} [options.dragSortPredicate]
* @param {Number} [options.dragSortPredicate.threshold=50]
* @param {String} [options.dragSortPredicate.action="move"]
* @param {String} [options.dragSortPredicate.gaps=true]
* @param {Number} [options.dragReleaseDuration=300]
* @param {String} [options.dragReleaseEasing="ease"]
* @param {Object} [options.dragHammerSettings={touchAction: "none"}]
* @param {String} [options.containerClass="muuri"]
* @param {String} [options.itemClass="muuri-item"]
* @param {String} [options.itemVisibleClass="muuri-item-visible"]
* @param {String} [options.itemHiddenClass="muuri-item-hidden"]
* @param {String} [options.itemPositioningClass="muuri-item-positioning"]
* @param {String} [options.itemDraggingClass="muuri-item-dragging"]
* @param {String} [options.itemReleasingClass="muuri-item-releasing"]
*/
function Grid(element, options) {
var inst = this;
var settings;
var items;
var layoutOnResize;
// Muuri can be loaded inside the head tag also, but in that case Muuri can
// not cache body element and run the initial DOM tests. So, if we detect
// that body element could not be fetched on init we do it here once and
// also run the DOM tests. If the Grid is instantiated before body is ready
// you are doing it wrong ;)
if (!body) {
body = document.body;
transformLeaksFixed = doesTransformLeakFixed();
}
// Allow passing element as selector string. Store element for instance.
element = inst._element = typeof element === typeString ? doc.querySelector(element) : element;
// Throw an error if the container element is not body element or does not
// exist within the body element.
if (!body.contains(element)) {
throw new Error('Container element must be an existing DOM element');
}
// Create instance settings by merging the options with default options.
settings = inst._settings = mergeSettings(Grid.defaultOptions, options);
// Sanitize dragSort setting.
if (typeof settings.dragSort !== typeFunction) {
settings.dragSort = !!settings.dragSort;
}
// Create instance id and store it to the grid instances collection.
gridInstances[inst._id = ++uuid] = inst;
// Destroyed flag.
inst._isDestroyed = false;
// Reference to the currently used Layout instance.
inst._layout = null;
// Create private Emitter instance.
inst._emitter = new Grid.Emitter();
// Setup grid's show/hide animation handler for items.
inst._itemShowHandler = getItemVisibilityHandler('show', settings);
inst._itemHideHandler = getItemVisibilityHandler('hide', settings);
// Add container element's class name.
addClass(element, settings.containerClass);
// Create initial items.
inst._items = [];
items = settings.items;
if (typeof items === typeString) {
nodeListToArray(inst._element.children).forEach(function (itemElement) {
if (items === '*' || elementMatches(itemElement, items)) {
inst._items.push(new Grid.Item(inst, itemElement));
}
});
}
else if (Array.isArray(items) || isNodeList(items)) {
inst._items = nodeListToArray(items).map(function (itemElement) {
return new Grid.Item(inst, itemElement);
});
}
// Sanitize layoutOnResize option and bind debounced resize handler if the
// layoutOnResize option a valid number.
layoutOnResize = settings.layoutOnResize;
layoutOnResize = layoutOnResize === true ? 0 : typeof layoutOnResize === typeNumber ? layoutOnResize : -1;
if (layoutOnResize >= 0) {
global.addEventListener('resize', inst._resizeHandler = debounce(function () {
inst.refreshItems().layout();
}, layoutOnResize));
}
// Layout on init if necessary.
if (settings.layoutOnInit) {
inst.layout(true);
}
}
/**
* Grid - Public properties
* ************************
*/
/**
* @see Item
*/
Grid.Item = Item;
/**
* @see ItemDrag
*/
Grid.ItemDrag = ItemDrag;
/**
* @see ItemRelease
*/
Grid.ItemRelease = ItemRelease;
/**
* @see ItemMigrate
*/
Grid.ItemMigrate = ItemMigrate;
/**
* @see ItemAnimate
*/
Grid.ItemAnimate = ItemAnimate;
/**
* @see Layout
*/
Grid.Layout = Layout;
/**
* @see Emitter
*/
Grid.Emitter = Emitter;
/**
* Default options for Grid instance.
*
* @public
* @memberof Grid
*/
Grid.defaultOptions = {
// Item elements
items: '*',
// Default show animation
showDuration: 300,
showEasing: 'ease',
// Default hide animation
hideDuration: 300,
hideEasing: 'ease',
// Item's visible/hidden state styles
visibleStyles: {
opacity: '1',
transform: 'scale(1)'
},
hiddenStyles: {
opacity: '0',
transform: 'scale(0.5)'
},
// Layout
layout: {
fillGaps: false,
horizontal: false,
alignRight: false,
alignBottom: false,
rounding: true
},
layoutOnResize: 100,
layoutOnInit: true,
layoutDuration: 300,
layoutEasing: 'ease',
// Sorting
sortData: null,
// Drag & Drop
dragEnabled: false,
dragContainer: null,
dragStartPredicate: {
distance: 0,
delay: 0,
handle: false
},
dragAxis: null,
dragSort: true,
dragSortInterval: 100,
dragSortPredicate: {
threshold: 50,
action: 'move'
},
dragReleaseDuration: 300,
dragReleaseEasing: 'ease',
dragHammerSettings: {
touchAction: 'none'
},
// Classnames
containerClass: 'muuri',
itemClass: 'muuri-item',
itemVisibleClass: 'muuri-item-shown',
itemHiddenClass: 'muuri-item-hidden',
itemPositioningClass: 'muuri-item-positioning',
itemDraggingClass: 'muuri-item-dragging',
itemReleasingClass: 'muuri-item-releasing',
targetsAreTiddlers: false
};
/**
* Grid - Private properties
* *************************
*/
Grid._maxRafBatchSize = 100;
/**
* Grid - Public prototype methods
* *******************************
*/
/**
* Bind an event listener.
*
* @public
* @memberof Grid.prototype
* @param {String} event
* @param {Function} listener
* @returns {Grid}
*/
Grid.prototype.on = function (event, listener) {
var inst = this;
if (!inst._isDestroyed) {
inst._emitter.on(event, listener);
}
return inst;
};
/**
* Bind an event listener that is triggered only once.
*
* @public
* @memberof Grid.prototype
* @param {String} event
* @param {Function} listener
* @returns {Grid}
*/
Grid.prototype.once = function (event, listener) {
var inst = this;
if (!inst._isDestroyed) {
inst._emitter.once(event, listener);
}
return inst;
};
/**
* Unbind an event listener.
*
* @public
* @memberof Grid.prototype
* @param {String} event
* @param {Function} listener
* @returns {Grid}
*/
Grid.prototype.off = function (event, listener) {
var inst = this;
if (!inst._isDestroyed) {
inst._emitter.off(event, listener);
}
return inst;
};
/**
* Get the container element.
*
* @public
* @memberof Grid.prototype
* @returns {HTMLElement}
*/
Grid.prototype.getElement = function () {
return this._element;
};
/**
* Get all items. Optionally you can provide specific targets (elements and
* indices) and filter the results based on the state of the items. Note that
* the returned array is not the same object used by the instance so modifying
* it will not affect instance's items. All items that are not found are
* omitted from the returned array.
*
* @public
* @memberof Grid.prototype
* @param {GridMultiItemQuery} [targets]
* @param {GridItemState} [state]
* @returns {Item[]}
*/
Grid.prototype.getItems = function (targets, state) {
var inst = this;
// Return an empty array immediately if the instance is destroyed.
if (inst._isDestroyed) {
return [];
}
var hasTargets = targets === 0 || (targets && typeof targets !== typeString);
var targetItems = !hasTargets ? null : isNodeList(targets) ? nodeListToArray(targets) : [].concat(targets);
var targetState = !hasTargets ? targets : state;
var ret = [];
var item;
var i;
// Sanitize target state.
targetState = typeof targetState === typeString ? targetState : null;
// If target state or target items are defined return filtered results.
if (targetState || targetItems) {
targetItems = targetItems || inst._items;
for (i = 0; i < targetItems.length; i++) {
item = hasTargets ? inst._getItem(targetItems[i]) : targetItems[i];
if (item && (!targetState || isItemInState(item, targetState))) {
ret.push(item);
}
}
return ret;
}
// Otherwise return all items.
else {
return ret.concat(inst._items);
}
};
/**
* Update the cached dimensions of the instance's items.
*
* @public
* @memberof Grid.prototype
* @param {(GridMultiItemQuery|GridItemState)} [items]
* @returns {Grid}
*/
Grid.prototype.refreshItems = function (items) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var targetItems = inst.getItems(items || 'active');
var i;
for (i = 0; i < targetItems.length; i++) {
targetItems[i]._refreshDimensions();
}
return inst;
};
/**
* Update the sort data of the instance's items.
*
* @public
* @memberof Grid.prototype
* @param {(GridMultiItemQuery|GridItemState)} [items]
* @returns {Grid}
*/
Grid.prototype.refreshSortData = function (items) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var targetItems = inst.getItems(items);
var i;
for (i = 0; i < targetItems.length; i++) {
targetItems[i]._refreshSortData();
}
return inst;
};
/**
* Synchronize the item elements to match the order of the items in the DOM.
* This comes handy if you need to keep the DOM structure matched with the
* order of the items. Note that if an item's element is not currently a child
* of the container element (if it is dragged for example) it is ignored and
* left untouched.
*
* @public
* @memberof Grid.prototype
* @returns {Grid}
*/
Grid.prototype.synchronize = function () {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var container = inst._element;
var items = inst._items;
var fragment;
var element;
var i;
// Append all elements in order to the container element.
if (items.length) {
for (i = 0; i < items.length; i++) {
element = items[i]._element;
if (element.parentNode === container) {
fragment = fragment || doc.createDocumentFragment();
fragment.appendChild(element);
}
}
if (fragment) {
container.appendChild(fragment);
}
}
// Emit synchronize event.
inst._emit(evSynchronize);
return inst;
};
/**
* Calculate and apply item positions.
*
* @public
* @memberof Grid.prototype
* @param {Boolean} [instant=false]
* @param {LayoutCallback} [onFinish]
* @returns {Grid}
*/
Grid.prototype.layout = function (instant, onFinish) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var callback = typeof instant === typeFunction ? instant : onFinish;
var isInstant = instant === true;
var items = inst.getItems('active');
var layout = inst._layout = new Grid.Layout(inst, items);
var counter = items.length;
var isBorderBox;
var containerStyles;
var item;
var position;
var i;
// The finish function, which will be used for checking if all the items
// have laid out yet. After all items have finished their animations call
// callback and emit layoutEnd event. Only emit layoutEnd event if there
// hasn't been a new layout call during this layout.
function tryFinish() {
if (--counter <= 0) {
if (typeof callback === typeFunction) {
callback(inst._layout !== layout, items.concat());
}
if (inst._layout === layout) {
inst._emit(evLayoutEnd, items.concat());
}
}
}
// If grid's width or height was modified, we need to update it's cached
// dimensions. Also keep in mind that grid's cached width/height should
// always equal to what elem.getBoundingClientRect() would return, so
// therefore we need to add the grid element's borders to the dimensions if
// it's box-sizing is border-box.
if (layout.setWidth || layout.setHeight) {
containerStyles = {};
isBorderBox = getStyle(inst._element, 'box-sizing') === 'border-box';
if (layout.setHeight) {
if (typeof layout.height === typeNumber) {
containerStyles.height = (isBorderBox ? layout.height + inst._border.top + inst._border.bottom : layout.height) + 'px';
}
else {
containerStyles.height = layout.height;
}
}
if (layout.setWidth) {
if (typeof layout.width === typeNumber) {
containerStyles.width = (isBorderBox ? layout.width + inst._border.left + inst._border.right : layout.width) + 'px';
}
else {
containerStyles.width = layout.width;
}
}
setStyles(inst._element, containerStyles);
}
// Emit layoutStart event. Note that this is intentionally emitted after the
// container element's dimensions are set, because otherwise there would be
// no hook for reacting to container dimension changes.
inst._emit(evLayoutStart, items.concat());
// If there are no items let's finish quickly.
if (!items.length) {
tryFinish();
return inst;
}
// If there are items let's position them.
for (i = 0; i < items.length; i++) {
item = items[i];
position = layout.slots[item._id];
// Update item's position.
item._left = position.left;
item._top = position.top;
// Layout non-dragged items.
if (item.isDragging()) {
tryFinish(true, item);
}
else {
item._layout(isInstant, tryFinish);
}
}
return inst;
};
/**
* Add new items by providing the elements you wish to add to the instance and
* optionally provide the index where you want the items to be inserted into.
* All elements that are not already children of the container element will be
* automatically appended to the container element. If an element has it's CSS
* display property set to "none" it will be marked as inactive during the
* initiation process. As long as the item is inactive it will not be part of
* the layout, but it will retain it's index. You can activate items at any
* point with grid.show() method. This method will automatically call
* grid.layout() if one or more of the added elements are visible. If only
* hidden items are added no layout will be called. All the new visible items
* are positioned without animation during their first layout.
*
* @public
* @memberof Grid.prototype
* @param {(HTMLElement|HTMLElement[])} elements
* @param {Object} [options]
* @param {Number} [options.index=-1]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Item[]}
*/
Grid.prototype.add = function (elements, options) {
var inst = this;
if (inst._isDestroyed) {
return [];
}
var targetElements = isNodeList(elements) ? nodeListToArray(elements) : [].concat(elements);
var newItems = [];
// Return early if there are no items.
if (!targetElements.length) {
return newItems;
}
var opts = options || {};
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var items = inst._items;
var needsLayout = false;
var elementIndex;
var item;
var i;
// Filter out all elements that exist already in current instance.
// TODO: This filtering can be made a lot faster by storing item elements
// in a Map or WeakMap. Other option would be to transfer the reponsibility
// completely to the user and get rid of this sanity check.
for (i = 0; i < items.length; i++) {
elementIndex = targetElements.indexOf(items[i]._element);
if (elementIndex > -1) {
targetElements.splice(elementIndex, 1);
if (!targetElements.length) {
return newItems;
}
}
}
var lastElement;
// Create new items.
for (i = 0; i < targetElements.length; i++) {
item = new Grid.Item(inst, targetElements[i]);
newItems.push(item);
// If the item to be added is active, we need to do a layout. Also, we
// need to mark the item with the skipNextLayoutAnimation flag to make it
// position instantly (without animation) during the next layout. Without
// the hack the item would animate to it's new position from the northwest
// corner of the grid, which feels a bit buggy (imho).
if (item._isActive) {
needsLayout = true;
item._skipNextLayoutAnimation = true;
}
if ( i === (targetElements.length -1) ) {
lastElement = targetElements[i];
}
}
// Add the new items to the items collection to correct index.
insertItemsToArray(items, newItems, opts.index);
// Emit add event.
inst._emit(evAdd, newItems.concat());
// If layout is needed.
if (needsLayout && layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
//lastElement.scrollIntoView(); //HACK
// Return new items.
return newItems;
};
/**
* Remove items from the instance.
*
* @public
* @memberof Grid.prototype
* @param {(GridMultiItemQuery|GridItemState)} items
* @param {Object} [options]
* @param {Boolean} [options.removeElements=false]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Item[]}
*/
Grid.prototype.remove = function (items, options) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var opts = options || {};
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var needsLayout = false;
var targetItems = inst.getItems(items);
var item;
var i;
// Remove the individual items.
for (i = 0; i < targetItems.length; i++) {
item = targetItems[i];
if (item._isActive) {
needsLayout = true;
}
if(item._element !== null && item._element !== undefined) {
//item._destroy(opts.removeElements);
item._destroy(opts.removeElements);
} else if (item._element === null || item._element === undefined) {
item._destroy(false);
}
}
// Emit remove event.
inst._emit(evRemove, targetItems.concat());
// If layout is needed.
if (needsLayout && layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
return targetItems;
};
/**
* Show instance items.
*
* @public
* @memberof Grid.prototype
* @param {(GridMultiItemQuery|GridItemState)} items
* @param {Object} [options]
* @param {Boolean} [options.instant=false]
* @param {ShowCallback} [options.onFinish]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
Grid.prototype.show = function (items, options) {
return this._isDestroyed ? this : gridShowHideHandler(this, 'show', items, options);
};
/**
* Hide instance items.
*
* @public
* @memberof Grid.prototype
* @param {(GridMultiItemQuery|GridItemState)} items
* @param {Object} [options]
* @param {Boolean} [options.instant=false]
* @param {HideCallback} [options.onFinish]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
Grid.prototype.hide = function (items, options) {
return this._isDestroyed ? this : gridShowHideHandler(this, 'hide', items, options);
};
/**
* Filter items. Expects at least one argument, a predicate, which should be
* either a function or a string. The predicate callback is executed for every
* item in the instance. If the return value of the predicate is truthy the
* item in question will be shown and otherwise hidden. The predicate callback
* receives the item instance as it's argument. If the predicate is a string
* it is considered to be a selector and it is checked against every item
* element in the instance with the native element.matches() method. All the
* matching items will be shown and others hidden.
*
* @public
* @memberof Grid.prototype
* @param {(Function|String)} predicate
* @param {Object} [options]
* @param {Boolean} [options.instant=false]
* @param {FilterCallback} [options.onFinish]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
Grid.prototype.filter = function (predicate, options) {
var inst = this;
// Return immediately if there are no items or if the instance id destroyed.
if (inst._isDestroyed || !inst._items.length) {
return inst;
}
var items = inst._items;
var predicateType = typeof predicate;
var isPredicateString = predicateType === typeString;
var isPredicateFn = predicateType === typeFunction;
var opts = options || {};
var isInstant = opts.instant === true;
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var onFinish = typeof opts.onFinish === typeFunction ? opts.onFinish : null;
var itemsToShow = [];
var itemsToHide = [];
var tryFinishCounter = -1;
var tryFinish = !onFinish ? noop : function () {
++tryFinishCounter && onFinish(itemsToShow.concat(), itemsToHide.concat());
};
var item;
var i;
// Check which items need to be shown and which hidden.
if (isPredicateFn || isPredicateString) {
for (i = 0; i < items.length; i++) {
item = items[i];
if (isPredicateFn ? predicate(item) : elementMatches(item._element, predicate)) {
itemsToShow.push(item);
}
else {
itemsToHide.push(item);
}
}
}
// Show items that need to be shown.
if (itemsToShow.length) {
inst.show(itemsToShow, {
instant: isInstant,
onFinish: tryFinish,
layout: false
});
}
else {
tryFinish();
}
// Hide items that need to be hidden.
if (itemsToHide.length) {
inst.hide(itemsToHide, {
instant: isInstant,
onFinish: tryFinish,
layout: false
});
}
else {
tryFinish();
}
// If there are any items to filter.
if (itemsToShow.length || itemsToHide.length) {
// Emit filter event.
inst._emit(evFilter, itemsToShow.concat(), itemsToHide.concat());
// If layout is needed.
if (layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
}
return inst;
};
/**
* Sort items. There are three ways to sort the items. The first is simply by
* providing a function as the comparer which works identically to native
* array sort. Alternatively you can sort by the sort data you have provided
* in the instance's options. Just provide the sort data key(s) as a string
* (separated by space) and the items will be sorted based on the provided
* sort data keys. Lastly you have the opportunity to provide a presorted
* array of items which will be used to sync the internal items array in the
* same order.
*
* @public
* @memberof Grid.prototype
* @param {(Function|Item[]|String|String[])} comparer
* @param {Object} [options]
* @param {Boolean} [options.descending=false]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
Grid.prototype.sort = function (comparer, options) {
var inst = this;
// Let's not sort if it has no effect.
if (inst._isDestroyed || inst._items.length < 2) {
return inst;
}
var items = inst._items;
var opts = options || {};
var isDescending = !!opts.descending;
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var origItems = items.concat();
var indexMap;
// If function is provided do a native array sort.
if (typeof comparer === typeFunction) {
items.sort(function (a, b) {
var result = comparer(a, b);
return (isDescending && result !== 0 ? -result : result) || compareItemIndices(a, b, isDescending, indexMap || (indexMap = getItemIndexMap(origItems)));
});
}
// Otherwise if we got a string, let's sort by the sort data as provided in
// the instance's options.
else if (typeof comparer === typeString) {
comparer = comparer.trim().split(' ').map(function (val) {
return val.split(':');
});
items.sort(function (a, b) {
return compareItems(a, b, isDescending, comparer) || compareItemIndices(a, b, isDescending, indexMap || (indexMap = getItemIndexMap(origItems)));
});
}
// Otherwise if we got an array, let's assume it's a presorted array of the
// items and order the items based on it.
else if (Array.isArray(comparer)) {
sortItemsByReference(items, comparer);
if (isDescending) {
items.reverse();
}
}
// Otherwise, let's go home.
else {
return inst;
}
// Emit sort event.
inst._emit(evSort, items.concat(), origItems);
// If layout is needed.
if (layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
return inst;
};
/**
* Move item to another index or in place of another item.
*
* @public
* @memberof Grid.prototype
* @param {GridSingleItemQuery} item
* @param {GridSingleItemQuery} position
* @param {Object} [options]
* @param {String} [options.action="move"]
* - Accepts either "move" or "swap".
* - "move" moves the item in place of the other item.
* - "swap" swaps the position of the items.
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
Grid.prototype.move = function (item, position, options) {
var inst = this;
// Return immediately, if moving an item is not possible.
if (inst._isDestroyed || inst._items.length < 2) {
return inst;
}
var items = inst._items;
var opts = options || {};
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var isSwap = opts.action === 'swap';
var action = isSwap ? 'swap' : 'move';
var fromItem = inst._getItem(item);
var toItem = inst._getItem(position);
var fromIndex;
var toIndex;
// Make sure the items exist and are not the same.
if (fromItem && toItem && (fromItem !== toItem)) {
// Get the indices of the items.
fromIndex = items.indexOf(fromItem);
toIndex = items.indexOf(toItem);
// Do the move/swap.
(isSwap ? arraySwap : arrayMove)(items, fromIndex, toIndex);
// Emit move event.
inst._emit(evMove, {
item: fromItem,
fromIndex: fromIndex,
toIndex: toIndex,
action: action
});
// If layout is needed.
if (layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
}
return inst;
};
/**
* Send item to another Grid instance.
*
* @public
* @memberof Grid.prototype
* @param {GridSingleItemQuery} item
* @param {Grid} grid
* @param {GridSingleItemQuery} position
* @param {Object} [options]
* @param {HTMLElement} [options.appendTo=document.body]
* @param {(Boolean|LayoutCallback|String)} [options.layoutSender=true]
* @param {(Boolean|LayoutCallback|String)} [options.layoutReceiver=true]
* @returns {Grid}
*/
Grid.prototype.send = function (item, grid, position, options) {
var currentGrid = this;
// Return immediately if either grid is destroyed or if the grids are the
// same, or if target item was not found.
if (currentGrid._isDestroyed || grid._isDestroyed || currentGrid === grid || !(item = currentGrid._getItem(item))) {
return currentGrid;
}
var targetGrid = grid;
var opts = options || {};
var container = opts.appendTo || body;
var layoutSender = opts.layoutSender ? opts.layoutSender : opts.layoutSender === undefined;
var layoutReceiver = opts.layoutReceiver ? opts.layoutReceiver : opts.layoutReceiver === undefined;
// Start the migration process.
item._migrate.start(targetGrid, position, container);
// If migration was started succesfully and the item is active, let's layout
// the grids.
if (item._migrate.isActive && item.isActive()) {
if (layoutSender) {
currentGrid.layout(layoutSender === 'instant', typeof layoutSender === typeFunction ? layoutSender : undefined);
}
if (layoutReceiver) {
targetGrid.layout(layoutReceiver === 'instant', typeof layoutReceiver === typeFunction ? layoutReceiver : undefined);
}
}
return currentGrid;
};
/**
* Destroy the instance.
*
* @public
* @memberof Grid.prototype
* @param {Boolean} [removeElements=false]
* @returns {Grid}
*/
Grid.prototype.destroy = function (removeElements) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var container = inst._element;
var items = inst._items.concat();
var i;
// Unbind window resize event listener.
if (inst._resizeHandler) {
global.removeEventListener('resize', inst._resizeHandler);
}
// Destroy items.
for (i = 0; i < items.length; i++) {
items[i]._destroy(removeElements);
}
// Restore container.
removeClass(container, inst._settings.containerClass);
setStyles(container, {height: ''});
// Emit destroy event and unbind all events.
inst._emit(evDestroy);
inst._emitter.destroy();
// Remove reference from the grid instances collection.
gridInstances[inst._id] = undefined;
// Flag instance as destroyed.
inst._isDestroyed = true;
return inst;
};
/**
* Grid - Protected prototype methods
* **********************************
*/
/**
* Get instance's item by element or by index. Target can also be an Item
* instance in which case the function returns the item if it exists within
* related Grid instance. If nothing is found with the provided target, null
* is returned.
*
* @protected
* @memberof Grid.prototype
* @param {GridSingleItemQuery} [target=0]
* @returns {?Item}
*/
Grid.prototype._getItem = function (target) {
var inst = this;
var items = inst._items;
var i;
// If no target is specified or the instance is destroyed, return the first
// item or null.
if (inst._isDestroyed || !target) {
return items[0] || null;
}
// If target is number return the item in that index. If the number is lower
// than zero look for the item starting from the end of the items array. For
// example -1 for the last item, -2 for the second last item, etc.
else if (typeof target === typeNumber) {
return items[target > -1 ? target : items.length + target] || null;
}
// If the target is an instance of Item return it if it is attached to this
// Grid instance, otherwise return null.
else if (target instanceof Item) {
return target._gridId === inst._id ? target : null;
}
// In other cases let's assume that the target is an element, so let's try
// to find an item that matches the element and return it. If item is not
// found return null.
else {
// TODO: This could be made a lot faster by using WeakMap or Map.
for (i = 0; i < items.length; i++) {
if (items[i]._element === target) {
return items[i];
}
}
return null;
}
};
/**
* Bind an event listener.
*
* @protected
* @memberof Grid.prototype
* @param {String} event
* @param {*} [arg1]
* @param {*} [arg2]
* @param {*} [arg3]
* @returns {Grid}
*/
Grid.prototype._emit = function () {
var inst = this;
if (!inst._isDestroyed) {
inst._emitter.emit.apply(inst._emitter, arguments);
}
return inst;
};
/**
* Refresh container's internal dimensions.
*
* @private
* @memberof Grid.prototype
* @returns {Grid}
*/
Grid.prototype._refreshDimensions = function () {
var inst = this;
var element = inst._element;
// refreshTiddlerClasses(element);
var rect = element.getBoundingClientRect();
var sides = ['left', 'right', 'top', 'bottom'];
var i;
inst._width = rect.width;
inst._height = rect.height;
inst._left = rect.left;
inst._top = rect.top;
inst._border = {};
for (i = 0; i < sides.length; i++) {
inst._border[sides[i]] = getStyleAsFloat(element, 'border-' + sides[i] + '-width');
}
return inst;
};
/**
* Item
* ****
*/
/**
* Creates a new Item instance for a Grid instance.
*
* @public
* @class
* @param {Grid} grid
* @param {HTMLElement} element
*/
function Item(grid, element) {
var inst = this;
var settings = grid._settings;
var isHidden;
// Create instance id and add item to the itemInstances collection.
inst._id = ++uuid;
itemInstances[inst._id] = inst;
// Destroyed flag.
inst._isDestroyed = false;
// If the provided item element is not a direct child of the grid container
// element, append it to the grid container.
if (element.parentNode !== grid._element) {
grid._element.appendChild(element);
}
// Set item class.
addClass(element, settings.itemClass);
// Check if the element is hidden.
isHidden = getStyle(element, 'display') === 'none';
// Set visible/hidden class.
addClass(element, isHidden ? settings.itemHiddenClass : settings.itemVisibleClass);
// Refrence to connected Grid instance's id.
inst._gridId = grid._id;
// The elements.
inst._element = element;
inst._child = element.children[0];
// Initiate item's animation controllers.
inst._animate = new Grid.ItemAnimate(inst, element);
inst._animateChild = new Grid.ItemAnimate(inst, inst._child);
// Set up active state (defines if the item is considered part of the layout
// or not).
inst._isActive = isHidden ? false : true;
// Set up positioning state (defines if the item is currently animating
// it's position).
inst._isPositioning = false;
// Set up visibility states.
inst._isHidden = isHidden;
inst._isHiding = false;
inst._isShowing = false;
// Visibility animation callback queue. Whenever a callback is provided for
// show/hide methods and animation is enabled the callback is stored
// temporarily to this array. The callbacks are called with the first
// argument as false if the animation succeeded without interruptions and
// with the first argument as true if the animation was interrupted.
inst._visibilityQueue = [];
// Layout animation callback queue. Whenever a callback is provided for
// layout method and animation is enabled the callback is stored temporarily
// to this array. The callbacks are called with the first argument as false
// if the animation succeeded without interruptions and with the first
// argument as true if the animation was interrupted.
inst._layoutQueue = [];
// Set up initial positions.
inst._left = 0;
inst._top = 0;
// Set element's initial styles.
setStyles(element, {
left: '0',
top: '0',
transform: getTranslateString(0, 0),
display: isHidden ? 'none' : 'block'
});
// Set up the initial dimensions and sort data.
inst._refreshDimensions()._refreshSortData();
// Set initial styles for the child element.
if (isHidden) {
grid._itemHideHandler.start(inst, true);
}
else {
grid._itemShowHandler.start(inst, true);
}
// Set up migration handler data.
inst._migrate = new Grid.ItemMigrate(inst);
// Set up release handler
inst._release = new Grid.ItemRelease(inst);
// Set up drag handler.
inst._drag = settings.dragEnabled ? new Grid.ItemDrag(inst) : null;
//refreshTiddlerClasses(element);
}
/**
* Item - Public prototype methods
* *******************************
*/
/**
* Get the instance grid reference.
*
* @public
* @memberof Item.prototype
* @returns {Grid}
*/
Item.prototype.getGrid = function () {
return gridInstances[this._gridId];
};
/**
* Get the instance element.
*
* @public
* @memberof Item.prototype
* @returns {HTMLElement}
*/
Item.prototype.getElement = function () {
return this._element;
};
/**
* Get instance element's cached width.
*
* @public
* @memberof Item.prototype
* @returns {Number}
*/
Item.prototype.getWidth = function () {
return this._width;
};
/**
* Get instance element's cached height.
*
* @public
* @memberof Item.prototype
* @returns {Number}
*/
Item.prototype.getHeight = function () {
return this._height;
};
/**
* Get instance element's cached margins.
*
* @public
* @memberof Item.prototype
* @returns {Object}
* - The returned object contains left, right, top and bottom properties
* which indicate the item element's cached margins.
*/
Item.prototype.getMargin = function () {
return {
left: this._margin.left,
right: this._margin.right,
top: this._margin.top,
bottom: this._margin.bottom
};
};
/**
* Get instance element's cached position.
*
* @public
* @memberof Item.prototype
* @returns {Object}
* - The returned object contains left and top properties which indicate the
* item element's cached position in the grid.
*/
Item.prototype.getPosition = function () {
return {
left: this._left,
top: this._top
};
};
/**
* Is the item active?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isActive = function () {
return this._isActive;
};
/**
* Is the item visible?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isVisible = function () {
return !this._isHidden;
};
/**
* Is the item being animated to visible?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isShowing = function () {
return this._isShowing;
};
/**
* Is the item being animated to hidden?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isHiding = function () {
return this._isHiding;
};
/**
* Is the item positioning?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isPositioning = function () {
return this._isPositioning;
};
/**
* Is the item being dragged?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isDragging = function () {
return !!this._drag && this._drag._data.isActive;
};
/**
* Is the item being released?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isReleasing = function () {
return this._release.isActive;
};
/**
* Is the item destroyed?
*
* @public
* @memberof Item.prototype
* @returns {Boolean}
*/
Item.prototype.isDestroyed = function () {
return this._isDestroyed;
};
function refreshTiddlerClasses(element) {
var viewPortHeightPX = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var viewPortHeight = parseInt(viewPortHeightPX, 10);
var viewPortWidthPX = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var viewPortWidth = parseInt(viewPortWidthPX, 10);
var viewPortProp = (viewPortWidth / viewPortHeight)
function hasClass(element, tiddlerclass) {
return (' ' + element.className + ' ').indexOf(' ' + tiddlerclass + ' ') > -1;
}
var itemHeight = getStyleAsFloat(element, "height"),//parseInt(document.getComputedStyle(element,null).getPropertyValue("height"), 10),
itemWidth = getStyleAsFloat(element, "width"),// parseInt(document.getComputedStyle(element,null).getPropertyValue("width"), 10),
widthHeightProp = (itemWidth / itemHeight),
tiddlerClasses = ["span-2", "span-3", "span-4", "span-6", "span-9", "span-12"],
tiddlerClassesHigh = ["span-3", "span-4", "span-6", "span-6", "span-9", "span-12"];
if (viewPortProp > 1) {
if (widthHeightProp < 0.5 && itemHeight >= (viewPortHeight * 2) && !hasClass(element,"span-9")) {
addClass(element,"span-9");
removeClass(element,"span-2");
removeClass(element, "span-3");
removeClass(element, "span-4");
removeClass(element, "span-6");
removeClass(element, "span-12");
} else if (widthHeightProp < 0.5 && itemHeight > viewPortHeight && itemHeight <= (viewPortHeight * 2) && !hasClass(element,"span-6")) {
addClass(element,"span-6");
removeClass(element,"span-2");
removeClass(element, "span-3");
removeClass(element, "span-4");
removeClass(element, "span-9");
removeClass(element, "span-12");
} else if (widthHeightProp < 0.5 && itemHeight > ((viewPortHeight / 3) * 2) && itemHeight < viewPortHeight && !hasClass(element,"span-4")) {
addClass(element,"span-4");
removeClass(element,"span-2");
removeClass(element, "span-3");
removeClass(element, "span-9");
removeClass(element, "span-6");
removeClass(element, "span-12");
} else if (widthHeightProp < 0.5 && itemHeight >= (viewPortHeight / 3) && itemHeight < ((viewPortHeight / 3) * 2) && !hasClass(element,"span-3")) {
addClass(element,"span-3");
removeClass(element,"span-2");
removeClass(element, "span-4");
removeClass(element, "span-9");
removeClass(element, "span-6");
removeClass(element, "span-12");
} else if (widthHeightProp > 1.9 && itemHeight < (viewPortHeight / 4) && !hasClass(element,"span-2")) {
addClass(element,"span-2");
removeClass(element,"span-3");
removeClass(element, "span-4");
removeClass(element, "span-9");
removeClass(element, "span-6");
removeClass(element, "span-12");
}
}
return;
}
/**
* Item - Protected prototype methods
* **********************************
*/
/**
* Recalculate item's dimensions.
*
* @protected
* @memberof Item.prototype
* @returns {Item}
*/
Item.prototype._refreshDimensions = function () {
var inst = this;
if (inst._isDestroyed || inst._isHidden) {
return inst;
}
var element = inst._element;
//refreshTiddlerClasses(element);
var rect = element.getBoundingClientRect();
var sides = ['left', 'right', 'top', 'bottom'];
var margin = inst._margin = inst._margin || {};
var side;
var i;
// Calculate width and height.
inst._width = rect.width;
inst._height = rect.height;
// Calculate margins (ignore negative margins).
for (i = 0; i < 4; i++) {
side = getStyleAsFloat(element, 'margin-' + sides[i]);
margin[sides[i]] = side > 0 ? side : 0;
}
return inst;
};
/**
* Fetch and store item's sort data.
*
* @protected
* @memberof Item.prototype
* @returns {Item}
*/
Item.prototype._refreshSortData = function () {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var sortData = {};
var getters = inst.getGrid()._settings.sortData;
// Fetch sort data.
if (getters) {
Object.keys(getters).forEach(function (key) {
sortData[key] = getters[key](inst, inst._element);
});
}
// Store sort data to the instance.
inst._sortData = sortData;
return inst;
};
/**
* Position item based on it's current data.
*
* @protected
* @memberof Item.prototype
* @param {Boolean} instant
* @param {Function} [onFinish]
* @returns {Item}
*/
Item.prototype._layout = function (instant, onFinish) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var element = inst._element;
var isPositioning = inst._isPositioning;
var migrate = inst._migrate;
var release = inst._release;
var isJustReleased = release.isActive && release.isPositioningStarted === false;
var grid = inst.getGrid();
var settings = grid._settings;
var animDuration = isJustReleased ? settings.dragReleaseDuration : settings.layoutDuration;
var animEasing = isJustReleased ? settings.dragReleaseEasing : settings.layoutEasing;
var animEnabled = !instant && !inst._skipNextLayoutAnimation && animDuration > 0;
var isAnimating;
var offsetLeft;
var offsetTop;
var currentLeft;
var currentTop;
var targetStyles;
// If the item is currently positioning process current layout callback
// queue with interrupted flag on if the item is currently positioning.
if (isPositioning) {
processQueue(inst._layoutQueue, true, inst);
}
// Mark release positioning as started.
if (isJustReleased) {
release.isPositioningStarted = true;
}
// Push the callback to the callback queue.
if (typeof onFinish === typeFunction) {
inst._layoutQueue.push(onFinish);
}
// Get item container offsets and target styles.
offsetLeft = release.isActive ? release.containerDiffX : migrate.isActive ? migrate.containerDiffX : 0;
offsetTop = release.isActive ? release.containerDiffY : migrate.isActive ? migrate.containerDiffY : 0;
targetStyles = {transform: getTranslateString(inst._left + offsetLeft, inst._top + offsetTop)};
// If no animations are needed, easy peasy!
if (!animEnabled) {
isPositioning && rafLoop.cancel(rafQueueLayout, inst._id);
isAnimating = inst._animate.isAnimating();
inst._stopLayout(false, targetStyles);
!isAnimating && setStyles(element, targetStyles);
inst._skipNextLayoutAnimation = false;
return inst._finishLayout();
}
// Set item as positioning.
inst._isPositioning = true;
// Get the element's current left and top position in the read callback.
// Then in the write callback do the animation if necessary.
rafLoop.add(rafQueueLayout, inst._id, function () {
currentLeft = getTranslateAsFloat(element, 'x') - offsetLeft;
currentTop = getTranslateAsFloat(element, 'y') - offsetTop;
}, function () {
// If the item is already in correct position let's quit early.
if (inst._left === currentLeft && inst._top === currentTop) {
isPositioning && inst._stopLayout(false, targetStyles);
inst._isPositioning = false;
return inst._finishLayout();
}
// Set item's positioning class.
!isPositioning && addClass(element, settings.itemPositioningClass);
// Animate.
inst._animate.start(
{transform: getTranslateString(currentLeft + offsetLeft, currentTop + offsetTop)},
targetStyles,
{
duration: animDuration,
easing: animEasing,
onFinish: function () {
inst._finishLayout();
}
}
);
});
return inst;
};
/**
* Position item based on it's current data.
*
* @protected
* @memberof Item.prototype
* @returns {Item}
*/
Item.prototype._finishLayout = function () {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
// Mark the item as not positioning and remove positioning classes.
if (inst._isPositioning) {
inst._isPositioning = false;
removeClass(inst._element, inst.getGrid()._settings.itemPositioningClass);
}
// Finish up release.
if (inst._release.isActive) {
inst._release.stop();
}
// Finish up migration.
if (inst._migrate.isActive) {
inst._migrate.stop();
}
// Process the callback queue.
processQueue(inst._layoutQueue, false, inst);
return inst;
};
/**
* Stop item's position animation if it is currently animating.
*
* @protected
* @memberof Item.prototype
* @param {Boolean} [processLayoutQueue=false]
* @param {Object} [targetStyles]
* @returns {Item}
*/
Item.prototype._stopLayout = function (processLayoutQueue, targetStyles) {
var inst = this;
if (inst._isDestroyed || !inst._isPositioning) {
return inst;
}
// Cancel animation init.
rafLoop.cancel(rafQueueLayout, inst._id);
// Stop animation.
inst._animate.stop(targetStyles);
// Remove positioning class.
removeClass(inst._element, inst.getGrid()._settings.itemPositioningClass);
// Reset state.
inst._isPositioning = false;
// Process callback queue.
if (processLayoutQueue) {
processQueue(inst._layoutQueue, true, inst);
}
return inst;
};
Item.prototype._show = function (instant, onFinish) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var element = inst._element;
var queue = inst._visibilityQueue;
var callback = typeof onFinish === typeFunction ? onFinish : null;
var grid = inst.getGrid();
var settings = grid._settings;
// If item is visible call the callback and be done with it.
if (!inst._isShowing && !inst._isHidden) {
callback && callback(false, inst);
return inst;
}
// If item is showing and does not need to be shown instantly, let's just
// push callback to the callback queue and be done with it.
if (inst._isShowing && !instant) {
callback && queue.push(callback);
return inst;
}
// If the item is hiding or hidden process the current visibility callback
// queue with the interrupted flag active, update classes and set display
// to block if necessary.
if (!inst._isShowing) {
processQueue(queue, true, inst);
removeClass(element, settings.itemHiddenClass);
addClass(element, settings.itemVisibleClass);
!inst._isHiding && setStyles(element, {display: 'block'});
}
// Push callback to the callback queue.
callback && queue.push(callback);
// Update item's internal states.
inst._isActive = inst._isShowing = true;
inst._isHiding = inst._isHidden = false;
// If we need to show instantly.
if (instant) {
grid._itemShowHandler.stop(inst, settings.visibleStyles);
inst._isShowing = false;
processQueue(queue, false, inst);
}
// If we need to animate.
else {
grid._itemShowHandler.start(inst, instant, function () {
if (!inst._isHidden) {
inst._isShowing = false;
processQueue(queue, false, inst);
}
});
}
return inst;
};
/**
* Hide item.
*
* @protected
* @memberof Item.prototype
* @param {Boolean} instant
* @param {Function} [onFinish]
* @returns {Item}
*/
Item.prototype._hide = function (instant, onFinish) {
var inst = this;
// Return immediately if the instance is destroyed.
if (inst._isDestroyed) {
return inst;
}
var element = inst._element;
var queue = inst._visibilityQueue;
var callback = typeof onFinish === typeFunction ? onFinish : null;
var grid = inst.getGrid();
var settings = grid._settings;
// If item is already hidden call the callback and be done with it.
if (!inst._isHiding && inst._isHidden) {
callback && callback(false, inst);
return inst;
}
// If item is hiding and does not need to be hidden instantly, let's just
// push callback to the callback queue and be done with it.
if (inst._isHiding && !instant) {
callback && queue.push(callback);
return inst;
}
// If the item is showing or visible process the current visibility callback
// queue with the interrupted flag active, update classes and set display
// to block if necessary.
if (!inst._isHiding) {
processQueue(queue, true, inst);
addClass(element, settings.itemHiddenClass);
removeClass(element, settings.itemVisibleClass);
}
// Push callback to the callback queue.
callback && queue.push(callback);
// Update item's internal states.
inst._isHidden = inst._isHiding = true;
inst._isActive = inst._isShowing = false;
// If we need to hide instantly.
if (instant) {
grid._itemHideHandler.stop(inst, settings.hiddenStyles);
inst._isHiding = false;
inst._stopLayout(true, {transform: getTranslateString(0, 0)});
setStyles(element, {display: 'none'});
processQueue(queue, false, inst);
}
// If we need to animate.
else {
grid._itemHideHandler.start(inst, instant, function () {
if (inst._isHidden) {
inst._isHiding = false;
inst._stopLayout(true, {transform: getTranslateString(0, 0)});
setStyles(element, {display: 'none'});
processQueue(queue, false, inst);
}
});
}
return inst;
};
/**
* Destroy item instance.
*
* @protected
* @memberof Item.prototype
* @param {Boolean} [removeElement=false]
* @returns {Item}
*/
Item.prototype._destroy = function (removeElement) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var element = inst._element;
var grid = inst.getGrid();
var settings = grid._settings;
var index = grid._items.indexOf(inst);
// Destroy release and migration.
inst._release.destroy();
inst._migrate.destroy();
// Stop animations.
inst._stopLayout(true, {});
grid._itemShowHandler.stop(inst, {});
grid._itemHideHandler.stop(inst, {});
// Destroy drag.
inst._drag && inst._drag.destroy();
// Destroy animation handlers.
inst._animate.destroy();
inst._animateChild.destroy();
// Handle visibility callback queue, fire all uncompleted callbacks with
// interrupted flag.
processQueue(inst._visibilityQueue, true, inst);
// Remove all inline styles.
if(element !== undefined) {
element.removeAttribute('style');
}
if(inst._child !== undefined) {
inst._child.removeAttribute('style');
}
// Remove classes.
removeClass(element, settings.itemPositioningClass);
removeClass(element, settings.itemDraggingClass);
removeClass(element, settings.itemReleasingClass);
removeClass(element, settings.itemClass);
removeClass(element, settings.itemVisibleClass);
removeClass(element, settings.itemHiddenClass);
// Remove item from Grid instance if it still exists there.
index > -1 && grid._items.splice(index, 1);
// Remove element from DOM.
if(element.parentNode !== null && element.parentNode !== undefined) {
if (element !== null && element !== undefined) {
removeElement;
if(element !== undefined) {
element.parentNode.removeChild(element);
}
}
}
// Remove item instance from the item instances collection.
itemInstances[inst._id] = undefined;
// Update item states (mostly just for good measure).
inst._isActive = inst._isPositioning = inst._isHiding = inst._isShowing = false;
inst._isDestroyed = inst._isHidden = true;
return inst;
};
/**
* Layout
* ******
*/
/**
* Creates a new Layout instance.
*
* @public
* @class
* @param {Grid} grid
* @param {Item[]} items
*/
function Layout(grid, items) {
var inst = this;
var layoutSettings = grid._settings.layout;
// Clone items.
items = items.concat();
// Let's make sure we have the correct container dimensions before going
// further.
grid._refreshDimensions();
var width = grid._width - grid._border.left - grid._border.right;
var height = grid._height - grid._border.top - grid._border.bottom;
var isCustomLayout = typeof layoutSettings === typeFunction;
var layout = isCustomLayout ? layoutSettings(items, width, height) :
muuriLayout(items, width, height, isPlainObject(layoutSettings) ? layoutSettings : {});
// Set instance data based on layout data.
inst.slots = layout.slots;
inst.setWidth = layout.setWidth || false;
inst.setHeight = layout.setHeight || false;
inst.width = layout.width;
inst.height = layout.height;
}
/**
* Emitter
* *******
*/
/**
* Event emitter constructor.
*
* @public
* @class
*/
function Emitter() {
this._events = {};
this._isDestroyed = false;
}
/**
* Emitter - Public prototype methods
* **********************************
*/
/**
* Bind an event listener.
*
* @public
* @memberof Emitter.prototype
* @param {String} event
* @param {Function} listener
* @returns {Emitter}
*/
Emitter.prototype.on = function (event, listener) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var listeners = inst._events[event] || [];
listeners.push(listener);
inst._events[event] = listeners;
return inst;
};
/**
* Bind an event listener that is triggered only once.
*
* @public
* @memberof Emitter.prototype
* @param {String} event
* @param {Function} listener
* @returns {Emitter}
*/
Emitter.prototype.once = function (event, listener) {
var inst = this;
return this.on(event, function callback() {
inst.off(event, callback);
listener.apply(null, arguments);
});
};
/**
* Unbind all event listeners that match the provided listener function.
*
* @public
* @memberof Emitter.prototype
* @param {String} event
* @param {Function} listener
* @returns {Emitter}
*/
Emitter.prototype.off = function (event, listener) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var listeners = inst._events[event] || [];
var i = listeners.length;
while (i--) {
if (listener === listeners[i]) {
listeners.splice(i, 1);
}
}
return inst;
};
/**
* Emit all listeners in a specified event with the provided arguments.
*
* @public
* @memberof Emitter.prototype
* @param {String} event
* @param {*} [arg1]
* @param {*} [arg2]
* @param {*} [arg3]
* @returns {Emitter}
*/
Emitter.prototype.emit = function (event, arg1, arg2, arg3) {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var listeners = inst._events[event] || [];
var listenersLength = listeners.length;
var argsLength = arguments.length - 1;
var i;
if (listenersLength) {
listeners = listeners.concat();
for (i = 0; i < listenersLength; i++) {
argsLength === 0 ? listeners[i]() :
argsLength === 1 ? listeners[i](arg1) :
argsLength === 2 ? listeners[i](arg1, arg2) :
listeners[i](arg1, arg2, arg3);
}
}
return inst;
};
/**
* Destroy emitter instance. Basically just removes all bound listeners.
*
* @public
* @memberof Emitter.prototype
* @returns {Emitter}
*/
Emitter.prototype.destroy = function () {
var inst = this;
if (inst._isDestroyed) {
return inst;
}
var eventNames = Object.keys(inst._events);
var i;
for (i = 0; i < eventNames.length; i++) {
inst._events[eventNames[i]] = null;
}
inst._isDestroyed = true;
return inst;
};
/**
* ItemAnimate
* ***********
*/
/**
* Muuri's internal animation engine. Uses Web Animations API.
*
* @public
* @class
* @param {Item} item
* @param {HTMLElement} element
*/
function ItemAnimate(item, element) {
var inst = this;
inst._item = item;
inst._element = element;
inst._animation = null;
inst._propsTo = null;
inst._isDestroyed = false;
}
/**
* ItemAnimate - Public prototype methods
* **************************************
*/
/**
* Start instance's animation. Automatically stops current animation if it is
* running.
*
* @public
* @memberof ItemAnimate.prototype
* @param {Object} propsFrom
* @param {Object} propsTo
* @param {Object} [options]
* @param {Number} [options.duration=300]
* @param {String} [options.easing='ease']
* @param {Function} [options.onFinish]
*/
ItemAnimate.prototype.start = function (propsFrom, propsTo, options) {
var inst = this;
if (inst._isDestroyed) {
return;
}
var opts = options || {};
var callback = typeof opts.onFinish === typeFunction ? opts.onFinish : null;
var shouldStop;
// If item is being animate check if the target animation properties equal
// to the properties in the current animation. If they match we can just let
// the animation continue and be done with it (and of course change the
// cached callback). If the animation properties do not match we need to
// stop the ongoing animation.
if (inst._animation) {
shouldStop = Object.keys(propsTo).some(function (propName) {
return propsTo[propName] !== inst._propsTo[propName];
});
if (shouldStop) {
inst._animation.cancel();
}
else {
inst._animation.onfinish = function () {
inst._animation = inst._propsTo = null;
callback && callback();
};
return;
}
}
// Cache target props.
inst._propsTo = propsTo;
// Start the animation.
inst._animation = inst._element.animate([propsFrom, propsTo], {
duration: opts.duration || 300,
easing: opts.easing || 'ease'
});
// Bind animation finish callback.
inst._animation.onfinish = function () {
inst._animation = inst._propsTo = null;
callback && callback();
};
// Set the end styles.
setStyles(inst._element, propsTo);
};
/**
* Stop instance's current animation if running.
*
* @private
* @memberof ItemAnimate.prototype
* @param {Object} [currentProps]
*/
ItemAnimate.prototype.stop = function (currentProps) {
var inst = this;
if (!inst._isDestroyed && inst._animation) {
setStyles(inst._element, currentProps || getCurrentStyles(inst._element, inst._propsTo));
inst._animation.cancel();
inst._animation = inst._propsTo = null;
}
};
/**
* Check if the item is being animated currently.
*
* @private
* @memberof ItemAnimate.prototype
* @return {Boolean}
*/
ItemAnimate.prototype.isAnimating = function () {
return !!this._animation;
};
/**
* Destroy the instance and stop current animation if it is running.
*
* @public
* @memberof ItemAnimate.prototype
* @returns {Boolean}
*/
ItemAnimate.prototype.destroy = function () {
var inst = this;
if (!inst._isDestroyed) {
inst.stop();
inst._item = inst._element = null;
inst._isDestroyed = true;
}
};
/**
* ItemMigrate
* ***********
*/
/**
* The migrate process handler constructor.
*
* @class
* @private
* @param {Item} item
*/
function ItemMigrate(item) {
var migrate = this;
// Private props.
migrate._itemId = item._id;
migrate._isDestroyed = false;
// Public props.
migrate.isActive = false;
migrate.container = false;
migrate.containerDiffX = 0;
migrate.containerDiffY = 0;
}
/**
* ItemMigrate - Public prototype methods
* **************************************
*/
/**
* Destroy instance.
*
* @public
* @memberof ItemMigrate.prototype
* @returns {ItemMigrate}
*/
ItemMigrate.prototype.destroy = function () {
var migrate = this;
if (!migrate._isDestroyed) {
migrate.stop(true);
migrate._isDestroyed = true;
}
return migrate;
};
/**
* Get Item instance.
*
* @public
* @memberof ItemMigrate.prototype
* @returns {?Item}
*/
ItemMigrate.prototype.getItem = function () {
return itemInstances[this._itemId] || null;
};
/**
* Start the migrate process of an item.
*
* @public
* @memberof ItemMigrate.prototype
* @param {Grid} targetGrid
* @param {GridSingleItemQuery} position
* @param {HTMLElement} [container]
* @returns {ItemMigrate}
*/
ItemMigrate.prototype.start = function (targetGrid, position, container) {
var migrate = this;
if (migrate._isDestroyed) {
return migrate;
}
var item = migrate.getItem();
var itemElement = item._element;
var isItemVisible = item.isVisible();
var currentGrid = item.getGrid();
var currentGridStn = currentGrid._settings;
var targetGridStn = targetGrid._settings;
var targetGridElement = targetGrid._element;
var currentIndex = currentGrid._items.indexOf(item);
var targetIndex = typeof position === typeNumber ? position : targetGrid._items.indexOf(targetGrid._getItem(position));
var targetContainer = container || body;
var currentContainer;
var offsetDiff;
var containerDiff;
var translateX;
var translateY;
// If we have invalid new index, let's return immediately.
if (targetIndex === null) {
return migrate;
}
// Normalize target index (for event data).
targetIndex = normalizeArrayIndex(targetGrid._items, targetIndex, true);
// Get current translateX and translateY values if needed.
if (item.isPositioning() || migrate.isActive || item.isReleasing()) {
translateX = getTranslateAsFloat(itemElement, 'x');
translateY = getTranslateAsFloat(itemElement, 'y');
}
// Abort current positioning.
if (item.isPositioning()) {
item._stopLayout(true, {transform: getTranslateString(translateX, translateY)});
}
// Abort current migration.
if (migrate.isActive) {
translateX -= migrate.containerDiffX;
translateY -= migrate.containerDiffY;
migrate.stop(true, {transform: getTranslateString(translateX, translateY)});
}
// Abort current release.
if (item.isReleasing()) {
translateX -= item._release.containerDiffX;
translateY -= item._release.containerDiffY;
item._release.stop(true, {transform: getTranslateString(translateX, translateY)});
}
// Stop current visibility animations.
// TODO: This causes potentially layout thrashing, because we are not
// feeding any styles to the stop handlers.
currentGrid._itemShowHandler.stop(item);
currentGrid._itemHideHandler.stop(item);
// Destroy current drag.
if (item._drag) {
item._drag.destroy();
}
// Destroy current animation handlers.
item._animate.destroy();
item._animateChild.destroy();
// Process current visibility animation queue.
processQueue(item._visibilityQueue, true, item);
// Emit beforeSend event.
currentGrid._emit(evBeforeSend, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Emit beforeReceive event.
targetGrid._emit(evBeforeReceive, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Remove current classnames.
removeClass(itemElement, currentGridStn.itemClass);
removeClass(itemElement, currentGridStn.itemVisibleClass);
removeClass(itemElement, currentGridStn.itemHiddenClass);
// Add new classnames.
addClass(itemElement, targetGridStn.itemClass);
addClass(itemElement, isItemVisible ? targetGridStn.itemVisibleClass : targetGridStn.itemHiddenClass);
// Move item instance from current grid to target grid.
currentGrid._items.splice(currentIndex, 1);
insertItemsToArray(targetGrid._items, item, targetIndex);
// Update item's grid id reference.
item._gridId = targetGrid._id;
// Instantiate new animation controllers.
item._animate = new Grid.ItemAnimate(item, itemElement);
item._animateChild = new Grid.ItemAnimate(item, item._child);
// Get current container
currentContainer = itemElement.parentNode;
// Move the item inside the target container if it's different than the
// current container.
if (targetContainer !== currentContainer) {
targetContainer.appendChild(itemElement);
offsetDiff = getOffsetDiff(targetContainer, currentContainer, true);
if (translateX === undefined) {
translateX = getTranslateAsFloat(itemElement, 'x');
translateY = getTranslateAsFloat(itemElement, 'y');
}
setStyles(itemElement, {transform: getTranslateString(translateX + offsetDiff.left, translateY + offsetDiff.top)});
}
// Update child element's styles to reflect the current visibility state.
item._child.removeAttribute('style');
if (isItemVisible) {
targetGrid._itemShowHandler.start(item, true);
}
else {
targetGrid._itemHideHandler.start(item, true);
}
// Update display styles.
setStyles(itemElement, {
display: isItemVisible ? 'block' : 'hidden'
});
// Get offset diff for the migration data.
containerDiff = getOffsetDiff(targetContainer, targetGridElement, true);
// Update item's cached dimensions and sort data.
item._refreshDimensions()._refreshSortData();
// Create new drag handler.
item._drag = targetGridStn.dragEnabled ? new Grid.ItemDrag(item) : null;
// Setup migration data.
migrate.isActive = true;
migrate.container = targetContainer;
migrate.containerDiffX = containerDiff.left;
migrate.containerDiffY = containerDiff.top;
// Emit send event.
currentGrid._emit(evSend, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Emit receive event.
targetGrid._emit(evReceive, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
return migrate;
};
/**
* End the migrate process of an item. This method can be used to abort an
* ongoing migrate process (animation) or finish the migrate process.
*
* @public
* @memberof ItemMigrate.prototype
* @param {Boolean} [abort=false]
* - Should the migration be aborted?
* @param {Object} [currentStyles]
* - Optional current translateX and translateY styles.
* @returns {ItemMigrate}
*/
ItemMigrate.prototype.stop = function (abort, currentStyles) {
var migrate = this;
if (migrate._isDestroyed || !migrate.isActive) {
return migrate;
}
var item = migrate.getItem();
var element = item._element;
var grid = item.getGrid();
var gridElement = grid._element;
var translateX;
var translateY;
if (migrate.container !== gridElement) {
if (!currentStyles) {
translateX = abort ? getTranslateAsFloat(element, 'x') - migrate.containerDiffX : item._left;
translateY = abort ? getTranslateAsFloat(element, 'y') - migrate.containerDiffY : item._top;
currentStyles = {transform: getTranslateString(translateX, translateY)};
}
gridElement.appendChild(element);
setStyles(element, currentStyles);
}
migrate.isActive = false;
migrate.container = null;
migrate.containerDiffX = 0;
migrate.containerDiffY = 0;
return migrate;
};
/**
* ItemRelease
* ***********
*/
/**
* The release process handler constructor. Although this might seem as proper
* fit for the drag process this needs to be separated into it's own logic
* because there might be a scenario where drag is disabled, but the release
* process still needs to be implemented (dragging from a grid to another).
*
* @class
* @private
* @param {Item} item
*/
function ItemRelease(item) {
var release = this;
// Private props.
release._itemId = item._id;
release._isDestroyed = false;
// Public props.
release.isActive = false;
release.isPositioningStarted = false;
release.containerDiffX = 0;
release.containerDiffY = 0;
}
/**
* ItemRelease - Public prototype methods
* **************************************
*/
/**
* Destroy instance.
*
* @public
* @memberof ItemRelease.prototype
* @returns {ItemRelease}
*/
ItemRelease.prototype.destroy = function () {
var release = this;
if (!release._isDestroyed) {
release.stop(true);
release._isDestroyed = true;
}
return release;
};
/**
* Get Item instance.
*
* @public
* @memberof ItemRelease.prototype
* @returns {?Item}
*/
ItemRelease.prototype.getItem = function () {
return itemInstances[this._itemId] || null;
};
/**
* Reset public data and remove releasing class.
*
* @public
* @memberof ItemRelease.prototype
* @returns {ItemRelease}
*/
ItemRelease.prototype.reset = function () {
var release = this;
if (release._isDestroyed) {
return release;
}
var item = release.getItem();
release.isActive = false;
release.isPositioningStarted = false;
release.containerDiffX = 0;
release.containerDiffY = 0;
removeClass(item._element, item.getGrid()._settings.itemReleasingClass);
return release;
};
/**
* Start the release process of an item.
*
* @public
* @memberof ItemRelease.prototype
* @returns {ItemRelease}
*/
ItemRelease.prototype.start = function () {
var release = this;
if (release._isDestroyed || release.isActive) {
return release;
}
var item = release.getItem();
var grid = item.getGrid();
// Flag release as active.
release.isActive = true;
// Add release classname to the released element.
addClass(item._element, grid._settings.itemReleasingClass);
// Emit dragReleaseStart event.
grid._emit(evDragReleaseStart, item);
// Position the released item.
item._layout(false);
return release;
};
/**
* End the release process of an item. This method can be used to abort an
* ongoing release process (animation) or finish the release process.
*
* @public
* @memberof ItemRelease.prototype
* @param {Boolean} [abort=false]
* - Should the release be aborted? When true, the release end event won't be
* emitted. Set to true only when you need to abort the release process
* while the item is animating to it's position.
* @param {Object} [currentStyles]
* - Optional current translateX and translateY styles.
* @returns {ItemRelease}
*/
ItemRelease.prototype.stop = function (abort, currentStyles) {
var release = this;
if (release._isDestroyed || !release.isActive) {
return release;
}
var item = release.getItem();
var element = item._element;
var grid = item.getGrid();
var container = grid._element;
var containerDiffX = release.containerDiffX;
var containerDiffY = release.containerDiffY;
var translateX;
var translateY;
// Reset data and remove releasing classname from the element.
release.reset();
// If the released element is outside the grid's container element put it
// back there and adjust position accordingly.
if (element.parentNode !== container) {
if (!currentStyles) {
translateX = abort ? getTranslateAsFloat(element, 'x') - containerDiffX : item._left;
translateY = abort ? getTranslateAsFloat(element, 'y') - containerDiffY : item._top;
currentStyles = {transform: getTranslateString(translateX, translateY)};
}
container.appendChild(element);
setStyles(element, currentStyles);
}
// Emit dragReleaseEnd event.
if (!abort) {
grid._emit(evDragReleaseEnd, item);
}
return release;
};
var isWheeling;
var curWidth = null;
var curHeight = null;
var tiddlerPseudoHeight = null;
var scrollPlusMinus = null;
/**
* ItemDrag
* ********
*/
/**
* Bind Hammer touch interaction to an item.
*
* @class
* @private
* @param {Item} item
*/
function ItemDrag(item) {
if (!Hammer) {
throw new Error('[' + namespace + '] required dependency Hammer is not defined.');
}
var drag = this;
var element = item._element;
var grid = item.getGrid();
var settings = grid._settings;
var hammer;
//var swipeelement = document.querySelector("tc-body");
//var secondHammer = new Hammer.Manager(element);
// Start predicate.
var startPredicate = typeof settings.dragStartPredicate === typeFunction ?
settings.dragStartPredicate : ItemDrag.defaultStartPredicate;
var startPredicateState = startPredicateInactive;
var startPredicateResult;
// Protected data.
drag._itemId = item._id;
drag._gridId = grid._id;
drag._hammer = hammer = new Hammer.Manager(element);
drag._isDestroyed = false;
drag._isMigrating = false;
drag._data = {};
// Create a private drag start resolver that can be used to resolve the drag
// start predicate asynchronously.
drag._resolveStartPredicate = function (event) {
if (!drag._isDestroyed && startPredicateState === startPredicatePending) {
startPredicateState = startPredicateResolved;
drag.onStart(event);
}
};
// Create scroll listener.
drag._scrollListener = function (e) {
drag.onScroll(e);
};
// Create overlap checker function.
drag._checkSortOverlap = debounce(function () {
drag._data.isActive && drag.checkOverlap();
}, settings.dragSortInterval);
// Create sort predicate.
drag._sortPredicate = typeof settings.dragSortPredicate === typeFunction ?
settings.dragSortPredicate : ItemDrag.defaultSortPredicate;
// Setup item's initial drag data.
drag.reset();
/* hammer.add(new Hammer.Tap({
event: 'tripletap',
taps: 3,
threshold: 500,
posThreshold: 1000,
interval: 400,
time: 200
}));*/
/*hammer.add(new Hammer.Swipe({
event: 'drag',
pointers: 1,
threshold: 30,
velocity: 0.1,
direction: Hammer.DIRECTION_ALL
}));*/
hammer.add(new Hammer.Tap({
event: 'quadrupletap',
taps: 4,
threshold: 500,
posThreshold: 1200,
interval: 400,
time: 200
}));
hammer.add(new Hammer.Press({
event: 'press',
pointers: 1,
threshold: 10,
time: 550
}));
// Add drag recognizer to hammer.
hammer.add(new Hammer.Pan({
event: 'drag',
pointers: 1,
threshold: 30,
direction: Hammer.DIRECTION_ALL
}));
// Add draginit recognizer to hammer.
hammer.add(new Hammer.Press({
event: 'draginit',
pointers: 1,
threshold: 1000,
time: 0
}));
hammer.add(new Hammer.Pinch({
event: 'pinch',
pointers: 2,
threshold: 0
}));
// Configure the hammer instance.
if (isPlainObject(settings.dragHammerSettings)) {
hammer.set(settings.dragHammerSettings);
}
/* var wheelZoomHandler;
var ctrlKeyDown;
window.addEventListener('keydown', function(e) {
console.log("keydown");
if(e.keyCode == 17) {// && e.target == element) {
//e.preventDefault();
ctrlKeyDown = "down";
//window.addEventListener('wheel', wheelZoomHandler(e), false);*/
/*wheelZoomHandler = function(e) {
e.preventDefault();
console.log(e.type);
}*/
// }
// });
if(grid._settings.keyboardControls === true && grid._settings.muuriParentWidget !== undefined && grid._settings.targetsAreTiddlers === true) {
element.addEventListener('wheel', function(e) {
if(e.shiftKey || e.altKey) {
e.preventDefault && e.preventDefault();
window.clearTimeout(isWheeling);
//console.log("wheel, deltaY: " + e.deltaY);
drag.onWheelZoom(e);
isWheeling = setTimeout(function() {
grid.hide(item, {
instant: true,
onFinish: function() {
var items = grid.getItems();
var itemIndex = items.indexOf(item);
var tiddlerTitle;
var muuriParentWidget = grid._settings.muuriParentWidget;
if (itemIndex !== undefined) {
var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;
tiddlerTitle = tiddlerName.value;
}
var setTextOptions = { suppressTimestamp: true };
if(curWidth !== null) {
$tw.wiki.setText(tiddlerTitle, "muuri-tiddler-width-px", undefined, Math.ceil(curWidth), setTextOptions);
}
if(scrollPlusMinus !== null) {
var rangeValue = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("wheel-reveal-range");
if(scrollPlusMinus === "plus") {
curHeight = parseInt(tiddlerPseudoHeight) + parseInt(rangeValue);
if (curHeight < 0) {
curHeight = 0;
}
}
if(scrollPlusMinus === "minus") {
curHeight = parseInt(tiddlerPseudoHeight) - parseInt(rangeValue);
if (curHeight < 0) {
curHeight = 0;
}
}
$tw.wiki.setText(tiddlerTitle, "muuri-tiddler-height-px", undefined, Math.ceil(curHeight), setTextOptions);
var pseudoHeightNaN = isNaN(tiddlerPseudoHeight);
if(tiddlerPseudoHeight !== null && pseudoHeightNaN !== true) {
$tw.wiki.setText("$:/plugins/BTC/tiddly-touch/ui/notification", undefined, undefined, '' + Math.ceil(curHeight), setTextOptions);
$tw.notifier.display("$:/plugins/BTC/tiddly-touch/ui/notification");
} else if(tiddlerPseudoHeight !== null && pseudoHeightNaN === true) {
$tw.wiki.setText("$:/plugins/BTC/tiddly-touch/ui/notification", undefined, undefined, '' + Math.ceil(curHeight), setTextOptions);
$tw.notifier.display("$:/plugins/BTC/tiddly-touch/ui/notification");
}
}
grid.show(item, {instant: true});
grid.refreshItems();
grid._refreshDimensions();
grid.layout(true);
}
});
}, 66);
}
},false);
}
/* window.addEventListener('keyup', function(e) {
console.log("keyup");
if(e.keyCode == 17) {// && e.target == element) {
//e.preventDefault();
ctrlKeyDown = "up";
//window.removeEventListener('keydown', wheelEventZoom(event));
//window.removeEventListener('wheel', wheelZoomHandler(e), false);
}
});*/
//hammer.get('swipe').recognizeWith('draginit');
hammer.get('press').recognizeWith('quadrupletap');//.recognizeWith('pinch').recognizeWith('quadrupletap');
hammer.get('quadrupletap').recognizeWith('press').requireFailure('press');//.requireFailure('press');.recognizeWith('tripletap');
//hammer.get('tripletap').requireFailure('quadrupletap');
hammer.get('pinch').set({ enable: true }).recognizeWith('draginit');//.requireFailure('swipe');//.requireFailure('press');
//secondHammer.get('swipe').set({ enable: true });//.recognizeWith('draginit');//.recognizeWith('pinch');
hammer.get('draginit').recognizeWith('press');//.recognizeWith('swipe').requireFailure('swipe');//.requireFailure('pinch');
// Bind drag events.
hammer
/*.on('swipe', function(e) {
e.preventDefault && e.preventDefault();
e.stopPropagation && e.stopPropagation();
console.log("swipe");
return;
})*/
.on('press', function(e) {
e.preventDefault();
e.stopPropagation && e.stopProgagation();
/* e.preventDefault && e.preventDefault();
e.stopPropagation && e.stopPropagation();*/
//e.preventDefault && e.preventDefault();
//e.stopPropagation && e.stopProgagation();
/*if(e.type === "pressup"){
return false;
}*/
var sideBarState = $tw.wiki.getTiddlerText("$:/state/sidebar");
if (sideBarState === "yes") {
$tw.wiki.setText("$:/state/sidebar", "text", undefined, "no", {suppressTimeStamp: true});
//e.stopPropagation && e.stopProgagation();
return true;
} else if (sideBarState === "no") {
$tw.wiki.setText("$:/state/sidebar", "text", undefined, "yes", {suppressTimeStamp: true});
var viewPortWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var sideBarBreakPointPX = $tw.wiki.getTiddlerText("$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint");
if(sideBarBreakPointPX.indexOf('px') > -1) {
var sideBarBreakPoint = parseInt(sideBarBreakPointPX, 10);
if(viewPortWidth <= sideBarBreakPoint) {
window.scrollTo(0, 0);
}
}
//e.stopPropagation && e.stopProgagation();
//grid._emit(evDragEnd, item, event);
return true;
}
//e.stopPropagation && e.stopProgagation();
return false;
})
/* .on('tripletap', function(e) {
e.preventDefault();
e.stopPropagation && e.stopProgagation();
//console.log("tripletap");
var item = drag.getItem();
//item._element.classList.toggle("tc-open-success");
var items = grid.getItems();
var itemIndex = items.indexOf(item);
//var storyList = $tw.wiki.getTiddlerList("$:/StoryList");
//var storyTiddler = storyList[itemIndex];
var muuriParentWidget = grid._settings.muuriParentWidget[0];
var storyTiddlerObj = muuriParentWidget.children[itemIndex].variables.currentTiddler;
var storyTiddler = storyTiddlerObj.value;
//console.log("tiddler: " + storyTiddler);
var hasDraftOf = $tw.wiki.getTiddler(storyTiddler).fields['draft.of'];
var draftTitle = "Draft of" + " " + "'" + storyTiddler + "'";
if (hasDraftOf === undefined && storyTiddler !== "Draft of '*'") {
addClass(item._element,"tc-open-success");
muuriParentWidget.dispatchEvent({type: "tm-edit-tiddler", param: storyTiddler});
setTimeout(function(){ removeClass(item._element,"tc-open-success"); }, 1000);
return true;
} else if (hasDraftOf !== undefined && /Draft of '/.test(storyTiddler)) {
addClass(item._element,"tc-save-success");
muuriParentWidget.dispatchEvent({type: "tm-save-tiddler", param: storyTiddler});
setTimeout(function(){ removeClass(item._element,"tc-save-success"); }, 1000);
}
return false;
})*/
.on('quadrupletap', function(e) {
e.preventDefault();
e.stopPropagation && e.stopProgagation();
//console.log("quadrupletap");
// e.target.classList.toggle('expand');
//console.log(e);
var item = drag.getItem();
var items = grid.getItems();
var itemIndex = items.indexOf(item);
//var storyList = $tw.wiki.getTiddlerList("$:/StoryList");
//var storyTiddler = storyList[itemIndex];
var muuriParentWidget = grid._settings.muuriParentWidget[0];
var storyTiddlerObj = muuriParentWidget.children[itemIndex].variables.currentTiddler;
var storyTiddler = storyTiddlerObj.value;
//console.log("tiddler: " + storyTiddler);
var hasDraftOf = $tw.wiki.getTiddler(storyTiddler).fields['draft.of'];
var draftTitle = "Draft of" + " " + "'" + storyTiddler + "'";
if (hasDraftOf === undefined && storyTiddler !== "Draft of '*'") {
//addClass(item._element,"tc-close-success");
muuriParentWidget.dispatchEvent({type: "tm-modal", param: "$:/plugins/BTC/tiddly-touch/modals/tiddler-actions", paramObject: {currentTiddler: storyTiddler, actionTiddler: storyTiddler}});
//setTimeout(function(){ removeClass(item._element,"tc-close-success"); }, 1000);
return true;
} else if (hasDraftOf !== undefined && /Draft of '/.test(storyTiddler)) {
//addClass(item._element,"tc-cancel-success");
muuriParentWidget.dispatchEvent({type: "tm-modal", param: "$:/plugins/BTC/tiddly-touch/modals/tiddler-actions", paramObject: {currentTiddler: storyTiddler, actionTiddler: storyTiddler}});
//setTimeout(function(){ removeClass(item._element,"tc-cancel-success"); }, 1000);
}
return false;
})
.on('pinch pinchstart pinchin pinchout', function (e) {
e.preventDefault && e.preventDefault();
e.stopPropagation && e.stopProgagation();
// Let's activate drag start predicate state.
if (startPredicateState === startPredicateInactive) {
startPredicateState = startPredicatePending;
}
// If predicate is pending try to resolve it.
if (startPredicateState === startPredicatePending) {
startPredicateResult = startPredicate(drag.getItem(), e);
if (startPredicateResult === true) {
startPredicateState = startPredicateResolved;
drag.onPinchStart(e);
}
else if (startPredicateResult === false) {
startPredicateState = startPredicateRejected;
}
}
// Otherwise if predicate is resolved and drag is active, move the item.
else if (startPredicateState === startPredicateResolved && drag._data.isActive) {
drag.onPinch(e);
}
})
.on('drag dragmove', function (e) {
if (e.velocity >= 3) {
console.log("velocity bigger: " + e.velocity);
}
// Let's activate drag start predicate state.
if (startPredicateState === startPredicateInactive) {
startPredicateState = startPredicatePending;
}
// If predicate is pending try to resolve it.
if (startPredicateState === startPredicatePending) {
startPredicateResult = startPredicate(drag.getItem(), e);
if (startPredicateResult === true) {
startPredicateState = startPredicateResolved;
drag.onStart(e);
}
else if (startPredicateResult === false) {
startPredicateState = startPredicateRejected;
}
}
// Otherwise if predicate is resolved and drag is active, move the item.
else if (startPredicateState === startPredicateResolved && drag._data.isActive) {
drag.onMove(e);
}
})
.on('touchend pinchend pinchcancel', function (e) {
// Check if the start predicate was resolved during drag.
var isResolved = startPredicateState === startPredicateResolved;
// Do final predicate check to allow user to unbind stuff for the current
// drag procedure within the predicate callback. The return value of this
// check will have no effect to the state of the predicate.
startPredicate(drag.getItem(), e);
// Reset start predicate state.
startPredicateState = startPredicateInactive;
// If predicate is resolved and dragging is active, call the end handler.
if (isResolved && drag._data.isActive) {
drag.onPinchEnd(e);
}
})
.on('dragend dragcancel draginitup mouseup', function (e) {
// Check if the start predicate was resolved during drag.
var isResolved = startPredicateState === startPredicateResolved;
// Do final predicate check to allow user to unbind stuff for the current
// drag procedure within the predicate callback. The return value of this
// check will have no effect to the state of the predicate.
startPredicate(drag.getItem(), e);
// Reset start predicate state.
startPredicateState = startPredicateInactive;
// If predicate is resolved and dragging is active, call the end handler.
if (isResolved && drag._data.isActive) {
drag.onEnd(e);
}
});
// Prevent native link/image dragging for the item and it's ancestors.
element.addEventListener('dragstart', preventDefault, false);
}
/**
* ItemDrag - Public methods
* *************************
*/
/**
* Default drag start predicate handler that handles anchor elements
* gracefully. The return value of this function defines if the drag is
* started, rejected or pending. When true is returned the dragging is started
* and when false is returned the dragging is rejected. If nothing is returned
* the predicate will be called again on the next drag movement.
*
* @public
* @memberof ItemDrag
* @param {Item} item
* @param {Object} event
* @param {Object} [options]
* - An optional options object which can be used to pass the predicate
* it's options manually. By default the predicate retrieves the options
* from the grid's settings.
* @returns {Boolean}
*/
ItemDrag.defaultStartPredicate = function (item, event, options) {
var element = item._element;
var predicate = item._drag._startPredicateData;
var config;
var isAnchor;
var href;
var target;
// Setup data if it is not set up yet.
if (!predicate) {
config = options || item._drag.getGrid()._settings.dragStartPredicate;
config = isPlainObject(config) ? config : {};
predicate = item._drag._startPredicateData = {
distance: Math.abs(config.distance) || 0,
delay: Math.max(config.delay, 0) || 0,
handle: typeof config.handle === 'string' ? config.handle : false
};
}
// Final event logic. At this stage return value does not matter anymore,
// the predicate is either resolved or it's not and there's nothing to do
// about it. Here we just reset data and if the item element is a link
// we follow it (if there has only been slight movement).
if (event.isFinal) {
isAnchor = element.tagName.toLowerCase() === 'a';
href = element.getAttribute('href');
target = element.getAttribute('target');
dragStartPredicateReset(item);
if (isAnchor && href && Math.abs(event.deltaX) < 2 && Math.abs(event.deltaY) < 2 && event.deltaTime < 200) {
if (target && target !== '_self') {
global.open(href, target);
}
else {
global.location.href = href;
}
}
return;
}
// Find and store the handle element so we can check later on if the
// cursor is within the handle. If we have a handle selector let's find
// the corresponding element. Otherwise let's use the item element as the
// handle.
if (!predicate.handleElement) {
if (predicate.handle) {
predicate.handleElement = (event.changedPointers[0] || {}).target;
while (predicate.handleElement && !elementMatches(predicate.handleElement, predicate.handle)) {
predicate.handleElement = predicate.handleElement !== element ? predicate.handleElement.parentElement : null;
}
if (!predicate.handleElement) {
return false;
}
}
else {
predicate.handleElement = element;
}
}
// If delay is defined let's keep track of the latest event and initiate
// delay if it has not been done yet.
if (predicate.delay) {
predicate.event = event;
if (!predicate.delayTimer) {
predicate.delayTimer = global.setTimeout(function () {
predicate.delay = 0;
if (dragStartPredicateResolve(item, predicate.event)) {
item._drag._resolveStartPredicate(predicate.event);
dragStartPredicateReset(item);
}
}, predicate.delay);
}
}
return dragStartPredicateResolve(item, event);
};
/**
* Default drag sort predicate.
*
* @public
* @memberof ItemDrag
* @param {Item} item
* @param {Object} event
* @returns {(Boolean|DragSortCommand)}
* - Returns false if no valid index was found. Otherwise returns drag sort
* command.
*/
ItemDrag.defaultSortPredicate = function (item) {
var drag = item._drag;
var dragData = drag._data;
var rootGrid = drag.getGrid();
var settings = rootGrid._settings;
var config = settings.dragSortPredicate || {};
var sortThreshold = config.threshold || 50;
var sortAction = config.action || 'move';
var itemRect = {
width: item._width,
height: item._height,
left: dragData.elementClientX,
top: dragData.elementClientY
};
var grid = getTargetGrid(item, rootGrid, itemRect, sortThreshold);
var gridOffsetLeft = 0;
var gridOffsetTop = 0;
var matchScore = -1;
var matchIndex;
var hasValidTargets;
var target;
var score;
var i;
// Return early if we found no grid container element that overlaps the
// dragged item enough.
if (!grid) {
return false;
}
// If item is moved within it's originating grid adjust item's left and top
// props. Otherwise if item is moved to/within another grid get the
// container element's offset (from the element's content edge).
if (grid === rootGrid) {
itemRect.left = dragData.gridX + item._margin.left;
itemRect.top = dragData.gridY + item._margin.top;
}
else {
gridOffsetLeft = grid._left + grid._border.left;
gridOffsetTop = grid._top + grid._border.top;
}
// Loop through the target grid items and try to find the best match.
for (i = 0; i < grid._items.length; i++) {
target = grid._items[i];
// If the target item is not active or the target item is the dragged item
// let's skip to the next item.
if (!target._isActive || target === item) {
continue;
}
// Mark the grid as having valid target items.
hasValidTargets = true;
// Calculate the target's overlap score with the dragged item.
score = getRectOverlapScore(itemRect, {
width: target._width,
height: target._height,
left: target._left + target._margin.left + gridOffsetLeft,
top: target._top + target._margin.top + gridOffsetTop
});
// Update best match index and score if the target's overlap score with
// the dragged item is higher than the current best match score.
if (score > matchScore) {
matchIndex = i;
matchScore = score;
}
}
// If there is no valid match and the item is being moved into another grid.
if (matchScore < sortThreshold && item.getGrid() !== grid) {
matchIndex = hasValidTargets ? -1 : 0;
matchScore = Infinity;
}
// Check if the best match overlaps enough to justify a placement switch.
if (matchScore >= sortThreshold) {
return {
grid: grid,
index: matchIndex,
action: sortAction
};
}
return false;
};
/**
* ItemDrag - Public prototype methods
* ***********************************
*/
/**
* Destroy instance.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.destroy = function () {
var drag = this;
if (!drag._isDestroyed) {
drag.stop();
drag._hammer.destroy();
drag.getItem()._element.removeEventListener('dragstart', preventDefault, false);
drag._isDestroyed = true;
}
return drag;
};
/**
* Get Item instance.
*
* @public
* @memberof ItemDrag.prototype
* @returns {?Item}
*/
ItemDrag.prototype.getItem = function () {
return itemInstances[this._itemId] || null;
};
/**
* Get Grid instance.
*
* @public
* @memberof ItemDrag.prototype
* @returns {?Grid}
*/
ItemDrag.prototype.getGrid = function () {
return gridInstances[this._gridId] || null;
};
/**
* Setup/reset drag data.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.reset = function () {
var drag = this;
var dragData = drag._data;
// Is item being dragged?
dragData.isActive = false;
// The dragged item's container element.
dragData.container = null;
// The dragged item's containing block.
dragData.containingBlock = null;
// Hammer event data.
dragData.startEvent = null;
dragData.currentEvent = null;
// All the elements which need to be listened for scroll events during
// dragging.
dragData.scrollers = [];
// The current translateX/translateY position.
dragData.left = 0;
dragData.top = 0;
// Dragged element's current position within the grid.
dragData.gridX = 0;
dragData.gridY = 0;
// Dragged element's current offset from window's northwest corner. Does
// not account for element's margins.
dragData.elementClientX = 0;
dragData.elementClientY = 0;
// Offset difference between the dragged element's temporary drag
// container and it's original container.
dragData.containerDiffX = 0;
dragData.containerDiffY = 0;
return drag;
};
/**
* Bind drag scroll handlers to all scrollable ancestor elements of the
* dragged element and the drag container element.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.bindScrollListeners = function () {
var drag = this;
var gridContainer = drag.getGrid()._element;
var dragContainer = drag._data.container;
var scrollers = getScrollParents(drag.getItem()._element);
var i;
// If drag container is defined and it's not the same element as grid
// container then we need to add the grid container and it's scroll parents
// to the elements which are going to be listener for scroll events.
if (dragContainer !== gridContainer) {
scrollers = arrayUnique(scrollers.concat(gridContainer).concat(getScrollParents(gridContainer)));
}
// Bind scroll listeners.
for (i = 0; i < scrollers.length; i++) {
scrollers[i].addEventListener('scroll', drag._scrollListener);
}
// Save scrollers to drag data.
drag._data.scrollers = scrollers;
return drag;
};
/**
* Unbind currently bound drag scroll handlers from all scrollable ancestor
* elements of the dragged element and the drag container element.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.unbindScrollListeners = function () {
var drag = this;
var dragData = drag._data;
var scrollers = dragData.scrollers;
var i;
for (i = 0; i < scrollers.length; i++) {
scrollers[i].removeEventListener('scroll', drag._scrollListener);
}
dragData.scrollers = [];
return drag;
};
/**
* Check (during drag) if an item is overlapping other items and based on
* the configuration layout the items.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.checkOverlap = function () {
var drag = this;
var item = drag.getItem();
var result = drag._sortPredicate(item, drag._data.currentEvent);
var currentGrid;
var currentIndex;
var targetGrid;
var targetIndex;
var sortAction;
var isMigration;
// Let's make sure the result object has a valid index before going further.
if (!isPlainObject(result) || typeof result.index !== typeNumber) {
return drag;
}
currentGrid = item.getGrid();
targetGrid = result.grid || currentGrid;
isMigration = currentGrid !== targetGrid;
currentIndex = currentGrid._items.indexOf(item);
targetIndex = normalizeArrayIndex(targetGrid._items, result.index, isMigration);
sortAction = result.action === 'swap' ? 'swap' : 'move';
// If the item was moved within it's current grid.
if (!isMigration) {
// Make sure the target index is not the current index.
if (currentIndex !== targetIndex) {
// Do the sort.
(sortAction === 'swap' ? arraySwap : arrayMove)(currentGrid._items, currentIndex, targetIndex);
// Emit move event.
currentGrid._emit(evMove, {
item: item,
fromIndex: currentIndex,
toIndex: targetIndex,
action: sortAction
});
// Layout the grid.
currentGrid.layout();
}
}
// If the item was moved to another grid.
else {
// Emit beforeSend event.
currentGrid._emit(evBeforeSend, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Emit beforeReceive event.
targetGrid._emit(evBeforeReceive, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Update item's grid id reference.
item._gridId = targetGrid._id;
// Update drag instances's migrating indicator.
drag._isMigrating = item._gridId !== drag._gridId;
// Move item instance from current grid to target grid.
currentGrid._items.splice(currentIndex, 1);
insertItemsToArray(targetGrid._items, item, targetIndex);
// Set sort data as null, which is an indicator for the item comparison
// function that the sort data of this specific item should be fetched
// lazily.
item._sortData = null;
// Emit send event.
currentGrid._emit(evSend, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Emit receive event.
targetGrid._emit(evReceive, {
item: item,
fromGrid: currentGrid,
fromIndex: currentIndex,
toGrid: targetGrid,
toIndex: targetIndex
});
// Layout both grids.
currentGrid.layout();
targetGrid.layout();
}
return drag;
};
/**
* If item is dragged into another grid, finish the migration process
* gracefully.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.finishMigration = function () {
var drag = this;
var item = drag.getItem();
var release = item._release;
var element = item._element;
var targetGrid = item.getGrid();
var targetGridElement = targetGrid._element;
var targetSettings = targetGrid._settings;
var targetContainer = targetSettings.dragContainer || targetGridElement;
var currentSettings = drag.getGrid()._settings;
var currentContainer = element.parentNode;
var translateX;
var translateY;
var offsetDiff;
// Destroy current drag. Note that we need to set the migrating flag to
// false first, because otherwise we create an infinite loop between this
// and the drag.stop() method.
drag._isMigrating = false;
drag.destroy();
// Destroy current animation handlers.
item._animate.destroy();
item._animateChild.destroy();
// Remove current classnames.
removeClass(element, currentSettings.itemClass);
removeClass(element, currentSettings.itemVisibleClass);
removeClass(element, currentSettings.itemHiddenClass);
// Add new classnames.
addClass(element, targetSettings.itemClass);
addClass(element, targetSettings.itemVisibleClass);
// Instantiate new animation controllers.
item._animate = new Grid.ItemAnimate(item, element);
item._animateChild = new Grid.ItemAnimate(item, item._child);
// Move the item inside the target container if it's different than the
// current container.
if (targetContainer !== currentContainer) {
targetContainer.appendChild(element);
offsetDiff = getOffsetDiff(currentContainer, targetContainer, true);
translateX = getTranslateAsFloat(element, 'x') - offsetDiff.left;
translateY = getTranslateAsFloat(element, 'y') - offsetDiff.top;
}
// Update item's cached dimensions and sort data.
item._refreshDimensions()._refreshSortData();
// Calculate the offset difference between target's drag container (if any)
// and actual grid container element. We save it later for the release
// process.
offsetDiff = getOffsetDiff(targetContainer, targetGridElement, true);
release.containerDiffX = offsetDiff.left;
release.containerDiffY = offsetDiff.top;
// Recreate item's drag handler.
item._drag = targetSettings.dragEnabled ? new Grid.ItemDrag(item) : null;
// Adjust the position of the item element if it was moved from a container
// to another.
if (targetContainer !== currentContainer) {
setStyles(element, {transform: getTranslateString(translateX, translateY)});
}
// Update child element's styles to reflect the current visibility state.
item._child.removeAttribute('style');
targetGrid._itemShowHandler.start(item, true);
// Start the release.
release.start();
//refreshTiddlerClasses(element);
return drag;
};
/**
* cancel move/scroll event raf loop action.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.cancelRafLoop = function () {
var id = this.getItem()._id;
rafLoop.cancel(rafQueueScroll, id);
rafLoop.cancel(rafQueueMove, id);
return this;
};
/**
* Abort dragging and reset drag data.
*
* @public
* @memberof ItemDrag.prototype
* @returns {ItemDrag}
*/
ItemDrag.prototype.stop = function () {
var drag = this;
var dragData = drag._data;
var item = drag.getItem();
var element = item._element;
var grid = drag.getGrid();
if (!dragData.isActive) {
return drag;
}
// If the item is being dropped into another grid, finish it up and return
// immediately.
if (drag._isMigrating) {
return drag.finishMigration(dragData.currentEvent);
}
// Cancel raf loop actions.
drag.cancelRafLoop();
// Remove scroll listeners.
drag.unbindScrollListeners();
// Cancel overlap check.
drag._checkSortOverlap('cancel');
// Append item element to the container if it's not it's child. Also make
// sure the translate values are adjusted to account for the DOM shift.
if (element.parentNode !== grid._element) {
grid._element.appendChild(element);
setStyles(element, {transform: getTranslateString(dragData.gridX, dragData.gridY)});
}
// Remove dragging class.
removeClass(element, grid._settings.itemDraggingClass);
// Reset drag data.
drag.reset();
return drag;
};
function getTiddlerAsJson(title) {
var tiddler = $tw.wiki.getTiddler(title);
if(tiddler) {
var fields = Object.create(null);
$tw.utils.each(tiddler.fields,function(value,name) {
fields[name] = tiddler.getFieldString(name);
});
return JSON.stringify(fields);
} else {
return JSON.stringify({title: title});
}
}
var currentStoryList;
var storyListIndex;
/**
* Drag start handler.
*
* @public
* @memberof ItemDrag.prototype
* @param {Object} event
* @returns {ItemDrag}
*/
ItemDrag.prototype.onStart = function (event) {
var drag = this;
var item = drag.getItem();
// If item is not active, don't start the drag.
if (!item._isActive) {
return drag;
}
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var dragData = drag._data;
var release = item._release;
var migrate = item._migrate;
var gridContainer = grid._element;
var dragContainer = settings.dragContainer || gridContainer;
var containingBlock = getContainingBlock(dragContainer, true);
var offsetDiff = dragContainer !== gridContainer ? getOffsetDiff(containingBlock, gridContainer) : 0;
var currentLeft = getTranslateAsFloat(element, 'x');
var currentTop = getTranslateAsFloat(element, 'y');
var elementRect = element.getBoundingClientRect();
var items = grid.getItems();
var currentIndex = items.indexOf(item);
var targetIndex = normalizeArrayIndex(items, currentIndex);
var targetsAreTiddlers = settings.targetsAreTiddlers;
var muuriParentWidget = grid._settings.muuriParentWidget;
var dragTiddler;
//console.log("currentIndex: " + currentIndex + " targetIndex: " + targetIndex);
if (targetsAreTiddlers === true && muuriParentWidget !== undefined) {
currentStoryList = $tw.wiki.getTiddlerList("$:/StoryList");
//if(targetIndex < currentStoryList.length) {
dragTiddler = muuriParentWidget[0].children[targetIndex].variables.currentTiddler;
//console.log("dragTiddler: " + dragTiddler.value);
storyListIndex = currentStoryList.indexOf(dragTiddler.value);
//} else {
/*currentStoryList = $tw.wiki.getTiddlerList("$:/StoryList");
for (var i=0; i<items.length; i++) {
var checkItem = items[i]._element;
for (var t=0; t<items.length; t++) {
if(items[t]._element.innerHTML == checkItem.innerHTML && t != i) {
console.log("they are the same");
items[t] = items[i];
console.log(items[i]._element.innerHTML);
grid.remove(items[i], {removeElements: true});
}
}
//console.log(items[i]._element.innerHTML);
}
grid.refreshItems();
items = grid.getItems();
item = drag.getItem();
element = item._element;
release = item._release;
migrate = item._migrate;
currentLeft = getTranslateAsFloat(element, 'x');
currentTop = getTranslateAsFloat(element, 'y');
elementRect = element.getBoundingClientRect();
currentIndex = items.indexOf(item);
targetIndex = normalizeArrayIndex(items, currentIndex);
console.log("currentIndex: " + currentIndex + " targetIndex: " + targetIndex);
if(targetIndex < currentStoryList.length) {
dragTiddler = muuriParentWidget[0].children[targetIndex].variables.currentTiddler;
console.log("dragTiddler: " + dragTiddler.value);
storyListIndex = currentStoryList.indexOf(dragTiddler.value);
console.log("HAPPENED");
}
console.log("HAPPENED");
}*/
}
// Stop current positioning animation.
if (item.isPositioning()) {
item._stopLayout(true, {transform: getTranslateString(currentLeft, currentTop)});
}
// Stop current migration animation.
if (migrate.isActive) {
currentLeft -= migrate.containerDiffX;
currentTop -= migrate.containerDiffY;
migrate.stop(true, {transform: getTranslateString(currentLeft, currentTop)});
}
// If item is being released reset release data.
if (item.isReleasing()) {
release.reset();
}
// Setup drag data.
dragData.isActive = true;
dragData.startEvent = dragData.currentEvent = event;
dragData.container = dragContainer;
dragData.containingBlock = containingBlock;
dragData.elementClientX = elementRect.left;
dragData.elementClientY = elementRect.top;
dragData.left = dragData.gridX = currentLeft;
dragData.top = dragData.gridY = currentTop;
// Emit dragInit event.
grid._emit(evDragInit, item, event);
// If a specific drag container is set and it is different from the
// grid's container element we need to cast some extra spells.
if (dragContainer !== gridContainer) {
// Store the container offset diffs to drag data.
dragData.containerDiffX = offsetDiff.left;
dragData.containerDiffY = offsetDiff.top;
// If the dragged element is a child of the drag container all we need to
// do is setup the relative drag position data.
if (element.parentNode === dragContainer) {
dragData.gridX = currentLeft - dragData.containerDiffX;
dragData.gridY = currentTop - dragData.containerDiffY;
}
// Otherwise we need to append the element inside the correct container,
// setup the actual drag position data and adjust the element's translate
// values to account for the DOM position shift.
else {
dragData.left = currentLeft + dragData.containerDiffX;
dragData.top = currentTop + dragData.containerDiffY;
dragContainer.appendChild(element);
setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});
}
}
// Set drag class and bind scrollers.
addClass(element, settings.itemDraggingClass);
drag.bindScrollListeners();
// Emit dragStart event.
grid._emit(evDragStart, item, event);
return drag;
};
ItemDrag.prototype.onPinchStart = function (event) {
var drag = this;
var item = drag.getItem();
// If item is not active, don't start the drag.
if (!item._isActive) {
return drag;
}
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var dragData = drag._data;
var release = item._release;
var migrate = item._migrate;
var gridContainer = grid._element;
var dragContainer = settings.dragContainer || gridContainer;
var containingBlock = getContainingBlock(dragContainer, true);
var offsetDiff = dragContainer !== gridContainer ? getOffsetDiff(containingBlock, gridContainer) : 0;
var currentLeft = getTranslateAsFloat(element, 'x');
var currentTop = getTranslateAsFloat(element, 'y');
var elementRect = element.getBoundingClientRect();
var elementRectCalc = window.getComputedStyle(element,null).getPropertyValue("left");
// Stop current positioning animation.
if (item.isPositioning()) {
item._stopLayout(true, {transform: getTranslateString(currentLeft, currentTop)});
}
// Stop current migration animation.
if (migrate.isActive) {
currentLeft -= migrate.containerDiffX;
currentTop -= migrate.containerDiffY;
migrate.stop(true, {transform: getTranslateString(currentLeft, currentTop)});
}
// If item is being released reset release data.
if (item.isReleasing()) {
release.reset();
}
// Setup drag data.
dragData.isActive = true;
dragData.startEvent = dragData.currentEvent = event;
dragData.container = dragContainer;
dragData.containingBlock = containingBlock;
dragData.elementClientX = elementRect.left;
dragData.elementClientY = elementRect.top;
dragData.left = dragData.gridX = currentLeft;
dragData.top = dragData.gridY = currentTop;
// Emit dragInit event.
grid._emit(evDragInit, item, event);
// If a specific drag container is set and it is different from the
// grid's container element we need to cast some extra spells.
if (dragContainer !== gridContainer) {
// Store the container offset diffs to drag data.
dragData.containerDiffX = offsetDiff.left;
dragData.containerDiffY = offsetDiff.top;
// If the dragged element is a child of the drag container all we need to
// do is setup the relative drag position data.
if (element.parentNode === dragContainer) {
dragData.gridX = currentLeft - dragData.containerDiffX;
dragData.gridY = currentTop - dragData.containerDiffY;
}
// Otherwise we need to append the element inside the correct container,
// setup the actual drag position data and adjust the element's translate
// values to account for the DOM position shift.
else {
dragData.left = currentLeft + dragData.containerDiffX;
dragData.top = currentTop + dragData.containerDiffY;
dragContainer.appendChild(element);
setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});
}
}
// Set drag class and bind scrollers.
addClass(element, settings.itemDraggingClass);
drag.bindScrollListeners();
// Emit dragStart event.
grid._emit(evDragStart, item, event);
return drag;
};
/**
* Drag move handler.
*
* @public
* @memberof ItemDrag.prototype
* @param {Object} event
* @returns {ItemDrag}
*/
ItemDrag.prototype.onMove = function (event) {
var drag = this;
var item = drag.getItem();
// If item is not active, reset drag.
if (!item._isActive) {
return drag.stop();
}
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var dragData = drag._data;
var axis = settings.dragAxis;
var xDiff = event.deltaX - dragData.currentEvent.deltaX;
var yDiff = event.deltaY - dragData.currentEvent.deltaY;
rafLoop.add(rafQueueMove, item._id, function () {
// Update current event.
dragData.currentEvent = event;
// Update horizontal position data.
if (axis !== 'y') {
dragData.left += xDiff;
dragData.gridX += xDiff;
dragData.elementClientX += xDiff;
}
// Update vertical position data.
if (axis !== 'x') {
dragData.top += yDiff;
dragData.gridY += yDiff;
dragData.elementClientY += yDiff;
}
// Overlap handling.
settings.dragSort && drag._checkSortOverlap();
}, function () {
// Update element's translateX/Y values.
setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});
// Emit dragMove event.
grid._emit(evDragMove, item, event);
});
return drag;
};
function getComputedRotation(obj)
{
if(!window.getComputedStyle) return;
var style = getComputedStyle(obj);
var tr = style.getPropertyValue("-webkit-transform") ||
style.getPropertyValue("-moz-transform") ||
style.getPropertyValue("-ms-transform") ||
style.getPropertyValue("-o-transform") ||
style.getPropertyValue("transform") ||
"FAIL";
var values = tr.split('(')[1].split(')')[0].split(',');
var a = values[0];
var b = values[1];
var angle = Math.round(Math.atan2(b, a) * (180/Math.PI));
return angle;
}
function getComputedScale(obj)
{
if(!window.getComputedStyle) return;
var style = getComputedStyle(obj);
var tr = style.getPropertyValue("-webkit-transform") ||
style.getPropertyValue("-moz-transform") ||
style.getPropertyValue("-ms-transform") ||
style.getPropertyValue("-o-transform") ||
style.getPropertyValue("transform") ||
"FAIL";
var values = tr.split('(')[1].split(')')[0].split(',');
var a = values[0];
var b = values[1];
var scale = Math.sqrt(a*a + b*b);
return scale;
}
function getComputedTranslateX(obj)
{
if(!window.getComputedStyle) return;
var style = obj.currentStyle || getComputedStyle(obj),
transform = style.transform || style.webkitTransform || style.mozTransform;
var mat = transform.match(/^matrix3d\((.+)\)$/);
if(mat) return parseFloat(mat[1].split(', ')[13]);
mat = transform.match(/^matrix\((.+)\)$/);
return mat ? parseFloat(mat[1].split(', ')[4]) : 0;
}
function getComputedTranslateY(obj)
{
if(!window.getComputedStyle) return;
var style = obj.currentStyle || getComputedStyle(obj),
transform = style.transform || style.webkitTransform || style.mozTransform;
var mat = transform.match(/^matrix3d\((.+)\)$/);
if(mat) return parseFloat(mat[1].split(', ')[13]);
mat = transform.match(/^matrix\((.+)\)$/);
return mat ? parseFloat(mat[1].split(', ')[5]) : 0;
}
var pinchCenterOffset;
var img;
var MIN_SCALE = 0.98; // 1=scaling when first loaded
var MAX_SCALE = 1.005;
// HammerJS fires "pinch" and "pan" events that are cumulative in nature and not
// deltas. Therefore, we need to store the "last" values of scale, x and y so that we can
// adjust the UI accordingly. It isn't until the "pinchend" and "panend" events are received
// that we can set the "last" values.
// Our "raw" coordinates are not scaled. This allows us to only have to modify our stored
// coordinates when the UI is updated. It also simplifies our calculations as these
// coordinates are without respect to the current scale.
var imgWidth = null;
var imgHeight = null;
var viewportWidth = null;
var viewportHeight = null;
var scale = null;
var lastScale = null;
var container = null;
var img = null;
var x = 0;
var lastX = 0;
var y = 0;
var lastY = 0;
var pinchCenter = null;
// We need to disable the following event handlers so that the browser doesn't try to
// automatically handle our image drag gestures.
var disableImgEventHandlers = function () {
var events = ['onclick', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover',
'onmouseup', 'ondblclick', 'onfocus', 'onblur'];
events.forEach(function (event) {
img[event] = function () {
return false;
};
});
};
// Traverse the DOM to calculate the absolute position of an element
var absolutePosition = function (el) {
var x = 0,
y = 0;
while (el !== null) {
x += el.offsetLeft;
y += el.offsetTop;
el = el.offsetParent;
}
return { x: x, y: y };
};
var restrictScale = function (scale) {
if (scale < MIN_SCALE) {
scale = MIN_SCALE;
} else if (scale > MAX_SCALE) {
scale = MAX_SCALE;
}
return scale;
};
var restrictRawPos = function (pos, viewportDim, imgDim) {
if (pos < viewportDim/scale - imgDim) { // too far left/up?
pos = viewportDim/scale - imgDim;
} else if (pos > 0) { // too far right/down?
pos = 0;
}
return pos;
};
var updateLastPos = function (deltaX, deltaY) {
lastX = x;
lastY = y;
};
var translate = function (deltaX, deltaY) {
// We restrict to the min of the viewport width/height or current width/height as the
// current width/height may be smaller than the viewport width/height
var newX = restrictRawPos(lastX + deltaX/scale,
Math.min(viewportWidth, curWidth), imgWidth);
x = newX;
//img._element.style.marginLeft = Math.ceil(newX*scale) + 'px';
var newY = restrictRawPos(lastY + deltaY/scale,
Math.min(viewportHeight, curHeight), imgHeight);
y = newY;
//img._element.style.marginTop = Math.ceil(newY*scale) + 'px';
};
var zoom = function (scaleBy) {
scale = restrictScale(lastScale*scaleBy);
curWidth = imgWidth*scale;
var newHeight = imgHeight*scale;
var newSaveHeight = newHeight - imgHeight;
curHeight = imgHeight + (newSaveHeight/5);
//console.log("curwidth: " + curWidth);
//img._element.style.width = Math.ceil(curWidth) + 'px';
img._element.style.height = Math.ceil(curHeight) + 'px';
//setPinchStyles(img._element, { width: elemSetWidth, height: elemSetHeight});
// Adjust margins to make sure that we aren't out of bounds
translate(0, 0);
};
var rawCenter = function (e) {
var pos = absolutePosition(container);
// We need to account for the scroll position
var scrollLeft = window.pageXOffset ? window.pageXOffset : document.body.scrollLeft;
var scrollTop = window.pageYOffset ? window.pageYOffset : document.body.scrollTop;
var zoomX = -x + (e.center.x - pos.x + scrollLeft)/scale;
var zoomY = -y + (e.center.y - pos.y + scrollTop)/scale;
return { x: zoomX, y: zoomY };
};
var updateLastScale = function () {
lastScale = scale;
};
var zoomAround = function (scaleBy, rawZoomX, rawZoomY, doNotUpdateLast) {
// Zoom
zoom(scaleBy);
// New raw center of viewport
var rawCenterX = Math.min(viewportWidth, curWidth)/2/scale;//-x + Math.min(viewportWidth, curWidth)/2/scale;
var rawCenterY = Math.min(viewportHeight, curHeight)/2/scale;//-y + Math.min(viewportHeight, curHeight)/2/scale;
// Delta
var deltaX = (rawCenterX - rawZoomX)*scale;
var deltaY = (rawCenterY - rawZoomY)*scale;
// Translate back to zoom center
translate(deltaX, deltaY);
if (!doNotUpdateLast) {
updateLastScale();
updateLastPos();
}
};
var zoomCenter = function (scaleBy) {
// Center of viewport
var zoomX = -x + Math.min(viewportWidth, curWidth)/2/scale;
var zoomY = -y + Math.min(viewportHeight, curHeight)/2/scale;
zoomAround(scaleBy, zoomX, zoomY);
};
var zoomIn = function () {
zoomCenter(2);
};
var zoomOut = function () {
zoomCenter(1/2);
};
var curScale;
ItemDrag.prototype.onPinch = function (event) {
var pinch = this;
var item = pinch.getItem();
// If item is not active, reset drag.
if (!item._isActive) {
return pinch.stop();
}
var element = item._element;
var pinchData = pinch._data;
var grid = pinch.getGrid();
var settings = grid._settings;
var axis = settings.dragAxis;
var xDiff = event.deltaX - pinchData.currentEvent.deltaX;
var yDiff = event.deltaY - pinchData.currentEvent.deltaY;
//rafLoop.add(rafQueueMove, item._id, function () {
// Update current event.
pinchData.currentEvent = event;
// Update horizontal position data.
if (axis !== 'y') {
pinchData.left += xDiff;
pinchData.gridX += xDiff;
pinchData.elementClientX += xDiff;
}
// Update vertical position data.
if (axis !== 'x') {
pinchData.top += yDiff;
pinchData.gridY += yDiff;
pinchData.elementClientY += yDiff;
}
// Overlap handling.
//settings.dragSort && pinch._checkSortOverlap();
//}, function () {
curScale = event.scale;
var items = grid.getItems();
var sensitivity = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("pinch-zoom-sensitivity");
var itemIndex = items.indexOf(item);
var tiddlerTitle;
var currentLeft = getTranslateAsFloat(element, 'x');
var currentTop = getTranslateAsFloat(element, 'y');
var rect = element.getBoundingClientRect();
var setTextOptions = { suppressTimestamp: true };
/* if (targetsAreTiddlers === true && muuriParentWidget !== undefined) {
var muuriParentWidget = grid._settings.muuriParentWidget;
if (itemIndex !== undefined) {
var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;
tiddlerTitle = tiddlerName.value;
}
}*/
img = item;
imgWidth = getStyleAsFloat(element,"width");//"width"));
imgHeight = rect.height;//getComputedStyle(element, null).getPropertyValue("height"), 10);
//console.log("imgWidth: " + imgWidth);
viewportWidth = imgWidth;// Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
scale = 1;//viewportWidth/imgWidth;
viewportHeight = imgHeight;// Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
curWidth = imgWidth*scale;
curHeight = imgHeight*scale;
/*console.log(event.deltaX);
console.log(event.deltaY);
console.log(event.scale + " " + lastScale);*/
if(event.scale < 1) {
console.log(event.scale);
//curHeight = imgHeight + parseFloat(sensitivity);
//element.style.height = Math.ceil(curHeight) + 'px';
//element.style.transform = {translateX: currentLeft, translateY: currentTop, scale: event.scale};
setStyles(element,{transform: getTranslateStringTransformed(pinchData.left,pinchData.top,event.scale,0), width: curWidth*event.scale, height: curHeight*event.scale});
grid.refreshItems(item);
} else if (event.scale > 1) {
console.log(event.scale);
//curHeight = imgHeight - parseFloat(sensitivity);
//element.style.height = Math.ceil(curHeight) + 'px';
//element.style.transform = {translateX: currentLeft, translateY: currentTop, scale: event.scale};
setStyles(element,{transform: getTranslateStringTransformed(pinchData.left,pinchData.top,event.scale,0), width: curWidth*event.scale, height: curHeight*event.scale});
grid.refreshItems(item);
//$tw.wiki.setText(tiddlerTitle, "muuri-tiddler-width-px", undefined, Math.ceil(curWidth*event.scale), setTextOptions);
}
lastScale = event.scale;
//console.log("curwidth: " + curWidth + " curh: " + curHeight);
for (var i=0; i < items.length; i++) {
if (items[i] === item) {
itemIndex = i;
}
}
/* var muuriParentWidget = grid._settings.muuriParentWidget;
if (itemIndex !== undefined) {
var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;
tiddlerTitle = tiddlerName.value;
}*/
//console.log("pinching now");
/* if (pinchCenter === null) {
pinchCenter = rawCenter(event);
var offsetX = pinchCenter.x*scale - (-x*scale + Math.min(viewportWidth, curWidth)/2);
var offsetY = pinchCenter.y*scale - (-y*scale + Math.min(viewportHeight, curHeight)/2);
pinchCenterOffset = { x: offsetX, y: offsetY };
}*/
// When the user pinch zooms, she/he expects the pinch center to remain in the same
// relative location of the screen. To achieve this, the raw zoom center is calculated by
// first storing the pinch center and the scaled offset to the current center of the
// image. The new scale is then used to calculate the zoom center. This has the effect of
// actually translating the zoom center on each pinch zoom event.
/* var newScale = restrictScale(scale*event.scale);
var zoomX = pinchCenter.x*newScale - pinchCenterOffset.x;
var zoomY = pinchCenter.y*newScale - pinchCenterOffset.y;
var zoomCenter = { x: zoomX/newScale, y: zoomY/newScale };
zoomAround(event.scale, zoomCenter.x, zoomCenter.y, true); */
/*const { styler, listen, multitouch, value } = window.popmotion;
let divStyler = styler(element);
let itemTranslateX = getComputedTranslateX(element);
let itemTranslateY = getComputedTranslateY(element);
let itemScale = getComputedScale(element);
let itemWidth = window.getComputedStyle(element,null).getPropertyValue("width");
let itemHeight = window.getComputedStyle(element,null).getPropertyValue("height");
var itemRealWidth = parseInt(itemWidth, 10);
var itemRealHeight = parseInt(itemHeight, 10);
var itemRotation = getComputedRotation(element); //Burning
var itemWidthComputed = (itemRealWidth * itemScale);
var itemHeightComputed = (itemRealHeight * itemScale);
let elementScaleRotation = value({ x: itemTranslateX, y: itemTranslateY }, divStyler.set);
listen(element, 'touchstart', { passive: true })
.filter(({ touches }) => touches.length >= 2)
.start((e) => {
multitouch(elementScaleRotation.get())
.start(elementScaleRotation);
});
var storyWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var storyWidth5 = ((storyWidth - 82) / 5);
var storyWidth4 = ((storyWidth - 82) / 4);
var storyWidth3 = ((storyWidth - 82) / 3);
var storyWidth2 = ((storyWidth - 82) / 2);
var storyWidth1 = (storyWidth - 82);
var storyWidth6 = (storyWidth2 + storyWidth3);
var setTextOptions = { suppressTimestamp: true };
var field = "span";
var spanValue;
var tiddlyTiddler = $tw.wiki.getTiddler(tiddlerTitle);
var fixedWidth = tiddlyTiddler.fields["muuri-tiddler-width"];
listen(document, 'mouseup touchend')
.start(() => {
if (fixedWidth === undefined || fixedWidth === "0") {
if ( itemWidthComputed >= (storyWidth6 + ((storyWidth1 - storyWidth6) / 2))) {
addClass(element, "span-12");
addClass(element, "tc-dynaview-zoom-factor-4");
spanValue = 12;
removeClass(element, "span-6");
removeClass(element, "span-3");
removeClass(element, "span-2");
removeClass(element, "span-9");
removeClass(element, "span-4");
removeClass(element, "tc-dynaview-zoom-factor-1");
removeClass(element, "tc-dynaview-zoom-factor-2");
removeClass(element, "tc-dynaview-zoom-factor-3");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// } else if ((storyWidth6 + ((storyWidth1 - storyWidth6) / 2)) >= itemWidthComputed && itemWidthComputed >= (storyWidth2 + ((storyWidth6 - storyWidth2) / 3))) {
addClass(element, "span-9");
addClass(element, "tc-dynaview-zoom-factor-4");
spanValue = 9;
removeClass(element, "span-6");
removeClass(element, "span-3");
removeClass(element, "span-2");
removeClass(element, "span-12");
removeClass(element, "span-4");
removeClass(element, "tc-dynaview-zoom-factor-1");
removeClass(element, "tc-dynaview-zoom-factor-2");
removeClass(element, "tc-dynaview-zoom-factor-3");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// } else if ((storyWidth2 + ((storyWidth6 - storyWidth2) / 2)) >= itemWidthComputed && itemWidthComputed >= (storyWidth3 + ((storyWidth2 - storyWidth3) / 3))) {
addClass(element, "span-6");
addClass(element, "tc-dynaview-zoom-factor-3");
spanValue = 6;
removeClass(element, "span-12");
removeClass(element, "span-3");
removeClass(element, "span-2");
removeClass(element, "span-9");
removeClass(element, "span-4");
removeClass(element, "tc-dynaview-zoom-factor-1");
removeClass(element, "tc-dynaview-zoom-factor-2");
removeClass(element, "tc-dynaview-zoom-factor-4");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// } else if ((storyWidth3 + ((storyWidth2 - storyWidth3) / 3)) >= itemWidthComputed && itemWidthComputed >= (storyWidth4 + ((storyWidth3 - storyWidth4) / 3))) {
addClass(element, "span-4");
addClass(element, "tc-dynaview-zoom-factor-2");
spanValue = 4;
removeClass(element, "span-12");
removeClass(element, "span-6");
removeClass(element, "span-2");
removeClass(element, "span-9");
removeClass(element, "span-3");
removeClass(element, "tc-dynaview-zoom-factor-1");
removeClass(element, "tc-dynaview-zoom-factor-4");
removeClass(element, "tc-dynaview-zoom-factor-3");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// } else if ((storyWidth4 + ((storyWidth3 - storyWidth4) / 3)) >= itemWidthComputed && itemWidthComputed >= (storyWidth5 + ((storyWidth4 - storyWidth5) / 3))) {
addClass(element, "span-3");
addClass(element, "tc-dynaview-zoom-factor-1");
spanValue = 3;
removeClass(element, "span-12");
removeClass(element, "span-6");
removeClass(element, "span-2");
removeClass(element, "span-9");
removeClass(element, "span-4");
removeClass(element, "tc-dynaview-zoom-factor-4");
removeClass(element, "tc-dynaview-zoom-factor-2");
removeClass(element, "tc-dynaview-zoom-factor-3");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// } else if ((storyWidth5 + (storyWidth4 - storyWidth5) / 3) >= itemWidthComputed) {
addClass(element, "span-2");
addClass(element, "tc-dynaview-zoom-factor-1");
spanValue = 2;
removeClass(element, "span-12");
removeClass(element, "span-6");
removeClass(element, "span-3");
removeClass(element, "span-9");
removeClass(element, "span-4");
removeClass(element, "tc-dynaview-zoom-factor-4");
removeClass(element, "tc-dynaview-zoom-factor-2");
removeClass(element, "tc-dynaview-zoom-factor-3");*/
/*if (tiddlerTitle !== undefined) {
$tw.wiki.setText(tiddlerTitle, field, undefined, spanValue + "", setTextOptions);
grid.remove(element);
}*/
/*// }
}
elementScaleRotation.stop();
});
// Overlap handling.
setStyles(element, { transform: getTranslateStringTransformed(itemTranslateX, itemTranslateY)});*/
// Overlap handling.
//settings.dragSort && pinch._checkSortOverlap();
// Emit dragMove event.
//grid._emit(evDragMove, item, event);
return pinch;
};
function addZoomClasses(element,height,width,title,curHeight,curWidth) {
var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var viewPortWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var setTextOptions = { suppressTimestamp: true };
var viewPortFrac = viewPortHeight / 10;
var viewPortFrac2 = viewPortWidth / 12;
var currentClass = $tw.wiki.getTiddler(title).getFieldString("muuri-height-classes");
if(height === true) {
if(currentClass !== "tc-muuri-dynaheight-1" && curHeight < viewPortFrac) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-1", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-2" && curHeight >= viewPortFrac && curHeight < (2*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-2", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-3" && curHeight >= (2*viewPortFrac) && curHeight < (3*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-3", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-4" && curHeight >= (3*viewPortFrac) && curHeight < (4*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-4", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-5" && curHeight >= (4*viewPortFrac) && curHeight < (5*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-5", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-6" && curHeight >= (5*viewPortFrac) && curHeight < (6*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-6", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-7" && curHeight >= (6*viewPortFrac) && curHeight < (7*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-7", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-8" && curHeight >= (7*viewPortFrac) && curHeight < (8*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-8", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-9" && curHeight >= (8*viewPortFrac) && curHeight < (9*viewPortFrac)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-9", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-10" && curHeight >= (9*viewPortFrac) && curHeight <= (viewPortHeight)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-10", setTextOptions);
} else if (currentClass !== "tc-muuri-dynaheight-11" && curHeight > viewPortHeight) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-11", setTextOptions);
}
}
var currentClass2 = $tw.wiki.getTiddler(title).getFieldString("muuri-width-classes");
if(width === true) {
if(currentClass2 !== "tc-muuri-dynawidth-1" && curWidth < viewPortFrac2) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-1", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-2" && curWidth >= viewPortFrac2 && curWidth < (2*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-2", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-3" && curWidth >= (2*viewPortFrac2) && curWidth < (3*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-3", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-4" && curWidth >= (3*viewPortFrac2) && curWidth < (4*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-4", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-5" && curWidth >= (4*viewPortFrac2) && curWidth < (5*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-5", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-6" && curWidth >= (5*viewPortFrac2) && curWidth < (6*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-6", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-7" && curWidth >= (6*viewPortFrac2) && curWidth < (7*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-height-classes", undefined, "tc-muuri-dynaheight-7", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-8" && curWidth >= (7*viewPortFrac2) && curWidth < (8*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-8", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-9" && curWidth >= (8*viewPortFrac2) && curWidth < (9*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-9", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-10" && curWidth >= (9*viewPortFrac2) && curWidth < (10*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-10", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-11" && curWidth >= (10*viewPortFrac2) && curWidth < (11*viewPortFrac2)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-11", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-12" && curWidth >= (1*viewPortFrac2) && curWidth <= (viewPortWidth)) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-12", setTextOptions);
} else if (currentClass2 !== "tc-muuri-dynawidth-13" && curHeight > viewPortWidth) {
$tw.wiki.setText(title, "muuri-width-classes", undefined, "tc-muuri-dynawidth-13", setTextOptions);
}
}
}
ItemDrag.prototype.onWheelZoom = function (event) {
var pinch = this;
var item = pinch.getItem();
// If item is not active, reset drag.
/*if (!item._isActive) {
return pinch.stop();
}*/
var element = item._element;
//console.log(item._id);
var pinchData = pinch._data;
var grid = pinch.getGrid();
var items = grid.getItems();
var sensitivity = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("zoom-sensitivity");
var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var viewPortWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var heightPlus = parseFloat(sensitivity) * viewPortHeight / 1000;
var widthPlus = parseFloat(sensitivity) * viewPortWidth / 1000;
var heightPlusPlus = parseFloat(sensitivity) * viewPortHeight / 100;
var widthPlusPlus = parseFloat(sensitivity) * viewPortWidth / 100;
var itemIndex = items.indexOf(item);
var tiddlerTitle;
var rect = element.getBoundingClientRect();
var muuriParentWidget = grid._settings.muuriParentWidget;
if (muuriParentWidget !== undefined && itemIndex !== undefined) {
var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;
tiddlerTitle = tiddlerName.value;
}
img = item;
imgWidth = rect.width;//getStyleAsFloat(element,"width");//"width"));
imgHeight = rect.height;//getComputedStyle(element, null).getPropertyValue("height"), 10);
//console.log("imgWidth: " + imgWidth);
viewportWidth = imgWidth;// Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
scale = 1;//viewportWidth/imgWidth;
lastScale = scale;
viewportHeight = imgHeight;// Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
var eventScale;
if(!event.altKey && !event.ctrlKey && event.shiftKey) {
tiddlerPseudoHeight = parseInt( $tw.wiki.getTiddler(tiddlerTitle).getFieldString("muuri-tiddler-height-px"));
//console.log(tiddlerPseudoHeight);
var pseudoHeightNaN = isNaN(tiddlerPseudoHeight);
if(event.deltaY < 0) {
scrollPlusMinus = "plus";
//eventScale = (Math.abs(event.deltaY) / 10);
if(tiddlerPseudoHeight === undefined || tiddlerPseudoHeight === null || tiddlerPseudoHeight === "" || pseudoHeightNaN === true) {
curHeight = 0;
tiddlerPseudoHeight = 0;
//curHeight = imgHeight + Math.abs(event.deltaY);
//element.style.pseudoheight = Math.ceil(curHeight) + 'px';
} else {
//curHeight = tiddlerPseudoHeight + Math.abs(event.deltaY);
if(curHeight < 0){
curHeight = 0;
}
}
curWidth = null;
//addZoomClasses(element,true,false,tiddlerTitle,curHeight,curWidth);
} else if (event.deltaY > 0) {
scrollPlusMinus = "minus";
//eventScale = (1 / event.deltaY) * 10 ;
if(tiddlerPseudoHeight === undefined || tiddlerPseudoHeight === null || tiddlerPseudoHeight === "" || pseudoHeightNaN === true) {
//curHeight = imgHeight - Math.abs(event.deltaY);
curHeight = 0;
tiddlerPseudoHeight = 0;
//element.style.pseudoheight = Math.ceil(curHeight) + 'px';
} else {
//curHeight = tiddlerPseudoHeight - Math.abs(event.deltaY);
//curHeight = tiddlerPseudoHeight - rangeValue
if(curHeight < 0){
curHeight = 0;
}
}
curWidth = null;
//addZoomClasses(element,true,false,tiddlerTitle,curHeight,curWidth);
}
}
var maxWidth = viewPortWidth - 100;
if(event.altKey && !event.ctrlKey && event.shiftKey) {
scrollPlusMinus = null;
if(event.deltaY < 0) {
//eventScale = (Math.abs(event.deltaY) / 10);
curWidth = imgWidth + Math.abs(event.deltaY)*widthPlus;
if(curWidth < maxWidth) {
element.style.width = Math.ceil(curWidth) + 'px';
curHeight = imgHeight + Math.abs(event.deltaY)*heightPlus;
element.style.height = Math.ceil(curHeight) + 'px';
}
//addZoomClasses(element,true, true,tiddlerTitle,curHeight,curWidth);
} else if (event.deltaY > 0) {
//eventScale = (1 / event.deltaY) * 10 ;
curWidth = imgWidth - Math.abs(event.deltaY)*widthPlus;
if(curWidth < maxWidth) {
element.style.width = Math.ceil(curWidth) + 'px';
curHeight = imgHeight - Math.abs(event.deltaY)*heightPlus;
element.style.height = Math.ceil(curHeight) + 'px';
}
//addZoomClasses(element,true, true,tiddlerTitle,curHeight,curWidth);
}
}
if(!event.ctrlKey && event.altKey && !event.shiftKey) {
scrollPlusMinus = null;
if(event.deltaY < 0) {
//eventScale = (Math.abs(event.deltaY) / 10);
curWidth = imgWidth + Math.abs(event.deltaY)*widthPlus;
if(curWidth < maxWidth) {
element.style.width = Math.ceil(curWidth) + 'px';
curHeight = null;
//addZoomClasses(element,false,true,tiddlerTitle,curHeight,curWidth);
}
} else if (event.deltaY > 0) {
//eventScale = (1 / event.deltaY) * 10 ;
curWidth = imgWidth - Math.abs(event.deltaY)*widthPlus;
if(curWidth < maxWidth) {
element.style.width = Math.ceil(curWidth) + 'px';
curHeight = null;
//addZoomClasses(element,false,true,tiddlerTitle,curHeight,curWidth);
}
}
}
//curHeight = imgHeight*scale;
//console.log("curwidth: " + curWidth + " curh: " + curHeight);
/* var wheelScale;
var newScale;
if(event.deltaY < 0) {
eventScale = Math.abs(event.deltaY);
newScale = restrictScale(scale*eventScale);
} else {
eventScale = 1 / event.deltaY;
newScale = restrictScale(scale*eventScale);
}
var zoomX = 0;//= pinchCenter*newScale - pinchCenterOffset.x;
var zoomY = event.deltaY;
var zoomCenter = { x: zoomX/newScale, y: zoomY/newScale };
zoomAround(event.scale, zoomCenter.x, zoomCenter.y, true); */
//
return pinch;
};
/**
* Drag scroll handler.
*
* @public
* @memberof ItemDrag.prototype
* @param {Object} event
* @returns {ItemDrag}
*/
ItemDrag.prototype.onScroll = function (event) {
var drag = this;
var item = drag.getItem();
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var axis = settings.dragAxis;
var dragData = drag._data;
var gridContainer = grid._element;
var elementRect;
var xDiff;
var yDiff;
var offsetDiff;
rafLoop.add(rafQueueScroll, item._id, function () {
// Calculate element's rect and x/y diff.
elementRect = element.getBoundingClientRect();
xDiff = dragData.elementClientX - elementRect.left;
yDiff = dragData.elementClientY - elementRect.top;
// Update container diff.
if (dragData.container !== gridContainer) {
offsetDiff = getOffsetDiff(dragData.containingBlock, gridContainer);
dragData.containerDiffX = offsetDiff.left;
dragData.containerDiffY = offsetDiff.top;
}
// Update horizontal position data.
if (axis !== 'y') {
dragData.left += xDiff;
dragData.gridX = dragData.left - dragData.containerDiffX;
}
// Update vertical position data.
if (axis !== 'x') {
dragData.top += yDiff;
dragData.gridY = dragData.top - dragData.containerDiffY;
}
// Overlap handling.
settings.dragSort && drag._checkSortOverlap();
}, function () {
// Update element's translateX/Y values.
setStyles(element, {transform: getTranslateString(dragData.left, dragData.top)});
// Emit dragScroll event.
grid._emit(evDragScroll, item, event);
});
return drag;
};
ItemDrag.prototype.onMouseUp = function (event) {
var drag = this;
var item = drag.getItem();
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var dragData = drag._data;
var release = item._release;
// If item is not active, reset drag.
if (!item._isActive) {
return drag.stop();
}
// Cancel raf loop actions.
drag.cancelRafLoop();
// Finish currently queued overlap check.
settings.dragSort && drag._checkSortOverlap('finish');
// Remove scroll listeners.
drag.unbindScrollListeners();
// Setup release data.
release.containerDiffX = dragData.containerDiffX;
release.containerDiffY = dragData.containerDiffY;
// Reset drag data.
drag.reset();
// Remove drag classname from element.
removeClass(element, settings.itemDraggingClass);
// Emit dragEnd event.
grid._emit(evDragEnd, item, event);
// Finish up the migration process or start the release process.
drag._isMigrating ? drag.finishMigration() : release.start();
return drag;
};
/**
* Drag end handler.
*
* @public
* @memberof ItemDrag.prototype
* @param {Object} event
* @returns {ItemDrag}
*/
ItemDrag.prototype.onEnd = function (event) {
var drag = this;
var item = drag.getItem();
var element = item._element;
var grid = drag.getGrid();
var settings = grid._settings;
var dragData = drag._data;
var release = item._release;
var result = drag._sortPredicate(item, drag._data.currentEvent);
var targetsAreTiddlers = grid._settings.targetsAreTiddlers;
var muuriListTiddler = grid._settings.muuriListTiddler;
var itemCopy = item;
var currentGrid;
var currentIndex;
var targetGrid;
var targetIndex;
var isMigration;
// Let's make sure the result object has a valid index before going further.
/* if (!isPlainObject(result) || typeof result.index !== typeNumber) {
return drag;
}*/
currentGrid = item.getGrid();
targetGrid = result.grid || currentGrid;
isMigration = currentGrid !== targetGrid;
currentIndex = currentGrid._items.indexOf(item);
targetIndex = normalizeArrayIndex(targetGrid._items, result.index, isMigration);
var gridItems = currentGrid.getItems();
var dragElement = gridItems[currentIndex].getElement();
var targetElement;
// If item is not active, reset drag.
if (!item._isActive) {
return drag.stop();
}
// Cancel raf loop actions.
drag.cancelRafLoop();
// Finish currently queued overlap check.
settings.dragSort && drag._checkSortOverlap('finish');
// Remove scroll listeners.
drag.unbindScrollListeners();
// Setup release data.
release.containerDiffX = dragData.containerDiffX;
release.containerDiffY = dragData.containerDiffY;
// Reset drag data.
drag.reset();
// Remove drag classname from element.
removeClass(element, settings.itemDraggingClass);
// Emit dragEnd event.
grid._emit(evDragEnd, item, event);
// Finish up the migration process or start the release process.
drag._isMigrating ? drag.finishMigration() : release.start();
var items = grid.getItems();
var gridIndex = items.indexOf(item);
var muuriListField = grid._settings.muuriListField;
if(grid._settings.muuriParentWidget !== undefined && targetsAreTiddlers !== false && storyListIndex != gridIndex && gridIndex !== -1 && currentGrid === targetGrid) {
var storyList = $tw.wiki.getTiddlerList("$:/StoryList");
var isSwap = settings.dragSortPredicate.action;
if (isSwap === "move") {
storyList.splice(gridIndex, 0, storyList.splice(storyListIndex, 1)[0]);
} else if (isSwap === "swap") {
// Swap the items.
var temp = storyList[storyListIndex];
storyList[storyListIndex] = storyList[gridIndex];
storyList[gridIndex] = temp;
}
var setTextOptions = { suppressTimestamp: true };
$tw.wiki.setText("$:/StoryList", muuriListField, undefined, storyList, setTextOptions);
}
if (muuriListTiddler !== undefined && targetsAreTiddlers !== true) {
var idDefined = null;
var muuriItems = grid.getItems();
var currentMuuriList = $tw.wiki.getTiddlerList(muuriListTiddler,"list", undefined);
var newMuuriList = currentMuuriList;
var listOptions = { suppressTimestamp: true };
for (var m=0; m < muuriItems.length; m++) {
var muuriElement = muuriItems[m].getElement();
var id = muuriElement.getAttribute("id");
if (id !== undefined && id !== null) {
idDefined = true;
var hasWhiteSpace = /\s/g.test(id);
if(hasWhiteSpace) {
newMuuriList[m] = '[[' + id.toString() + ']]';
} else {
newMuuriList[m] = id.toString();
}
}
}
if(idDefined === true) {
var newMuuriListTiddler = muuriListTiddler.replace(/\r?\n|\r/g, "").replace(/\s+$/g,'');
var newMuuriListJoined = newMuuriList.join(' ');
$tw.wiki.setText(newMuuriListTiddler, muuriListField, undefined, newMuuriListJoined, listOptions);
}
}
return drag;
};
ItemDrag.prototype.onPinchEnd = function (event) {
var pinch = this;
var item = pinch.getItem();
var element = item._element;
var grid = pinch.getGrid();
var settings = grid._settings;
var pinchData = pinch._data;
var release = item._release;
var result = pinch._sortPredicate(item, pinch._data.currentEvent);
var items = grid.getItems();
var itemIndex = items.indexOf(item)
var tiddlerTitle;
var setTextOptions = { suppressTimestamp: true };
var muuriParentWidget = grid._settings.muuriParentWidget;
if (muuriParentWidget !== undefined && itemIndex !== undefined) {
var tiddlerName = muuriParentWidget[0].children[itemIndex].variables.currentTiddler;
tiddlerTitle = tiddlerName.value;
}
// If item is not active, reset drag.
if (!item._isActive) {
return pinch.stop();
}
// Cancel raf loop actions.
//pinch.cancelRafLoop();
// Finish currently queued overlap check.
//settings.dragSort && pinch._checkSortOverlap('finish');
// Remove scroll listeners.
pinch.unbindScrollListeners();
// Setup release data.
release.containerDiffX = pinchData.containerDiffX;
release.containerDiffY = pinchData.containerDiffY;
// Reset drag data.
//pinch.reset();
// Remove drag classname from element.
//removeClass(element, settings.itemDraggingClass);
// Emit dragEnd event.
grid._emit(evDragEnd, item, event);
// Finish up the migration process or start the release process.
pinch._isMigrating ? pinch.finishMigration() : release.start();
var targetsAreTiddlers = grid._settings.targetsAreTiddlers;
var muuriListTiddler = grid._settings.muuriListTiddler;
var itemCopy = item;
var currentGrid;
var currentIndex;
var targetGrid;
var targetIndex;
var isMigration;
// Let's make sure the result object has a valid index before going further.
/* if (!isPlainObject(result) || typeof result.index !== typeNumber) {
return drag;
}*/
currentGrid = item.getGrid();
targetGrid = result.grid || currentGrid;
isMigration = currentGrid !== targetGrid;
currentIndex = currentGrid._items.indexOf(item);
targetIndex = normalizeArrayIndex(targetGrid._items, result.index, isMigration);
var gridItems = currentGrid.getItems();
var dragElement = gridItems[currentIndex].getElement();
var targetElement;
var items = grid.getItems();
var gridIndex = items.indexOf(item);
/*if(targetsAreTiddlers !== false && storyListIndex != targetIndex && targetIndex !== -1 && currentGrid === targetGrid) {
var storyList = $tw.wiki.getTiddlerList("$:/StoryList");
var isSwap = settings.dragSortPredicate.action;
if (isSwap === "move") {
storyList.splice(gridIndex, 0, storyList.splice(storyListIndex, 1)[0]);
} else if (isSwap === "swap") {
// Swap the items.
var temp = storyList[storyListIndex];
storyList[storyListIndex] = storyList[targetIndex];
storyList[targetIndex] = temp;
}
var setTextOptions = { suppressTimestamp: true };
$tw.wiki.setText("$:/StoryList", "list", undefined, storyList, setTextOptions);
}*/
if (targetsAreTiddlers === true && muuriParentWidget !== undefined) {
grid.hide(item, {
instant: true,
onFinish: function() {
$tw.wiki.setText(tiddlerTitle, "muuri-tiddler-width-px", undefined, Math.ceil(curWidth*curScale), setTextOptions);
grid.show(item, {instant: true});
grid.refreshItems();
grid._refreshDimensions();
grid.layout(true);
}
});
}
return pinch;
};
/**
* Helpers - Generic
* *****************
*/
/**
* Normalize array index. Basically this function makes sure that the provided
* array index is within the bounds of the provided array and also transforms
* negative index to the matching positive index.
*
* @private
* @param {Array} array
* @param {Number} index
* @param {Boolean} isMigration
*/
function normalizeArrayIndex(array, index, isMigration) {
var length = array.length;
var maxIndex = Math.max(0, isMigration ? length : length - 1);
return index > maxIndex ? maxIndex :
index < 0 ? Math.max(maxIndex + index + 1, 0) :
index;
}
/**
* Swap array items.
*
* @private
* @param {Array} array
* @param {Number} index
* - Index (positive or negative) of the item that will be swapped.
* @param {Number} withIndex
* - Index (positive or negative) of the other item that will be swapped.
*/
function arraySwap(array, index, withIndex) {
// Make sure the array has two or more items.
if (array.length < 2) {
return;
}
// Normalize the indices.
var indexA = normalizeArrayIndex(array, index);
var indexB = normalizeArrayIndex(array, withIndex);
var temp;
// Swap the items.
if (indexA !== indexB) {
temp = array[indexA];
array[indexA] = array[indexB];
array[indexB] = temp;
}
}
/**
* Move array item to another index.
*
* @private
* @param {Array} array
* @param {Number} fromIndex
* - Index (positive or negative) of the item that will be moved.
* @param {Number} toIndex
* - Index (positive or negative) where the item should be moved to.
*/
function arrayMove(array, fromIndex, toIndex) {
// Make sure the array has two or more items.
if (array.length < 2) {
return;
}
// Normalize the indices.
var from = normalizeArrayIndex(array, fromIndex);
var to = normalizeArrayIndex(array, toIndex);
// Add target item to the new position.
if (from !== to) {
array.splice(to, 0, array.splice(from, 1)[0]);
}
}
/**
* Returns a new duplicate free version of the provided array.
*
* @private
* @param {Array} array
* @returns {Array}
*/
function arrayUnique(array) {
var ret = [];
var len = array.length;
var i;
if (len) {
ret[0] = array[0];
for (i = 1; i < len; i++) {
if (ret.indexOf(array[i]) < 0) {
ret.push(array[i]);
}
}
}
return ret;
}
/**
* Check if a value is a plain object.
*
* @private
* @param {*} val
* @returns {Boolean}
*/
function isPlainObject(val) {
return typeof val === 'object' && Object.prototype.toString.call(val) === '[object Object]';
}
/**
* Check if a value is a node list
*
* @private
* @param {*} val
* @returns {Boolean}
*/
function isNodeList(val) {
var type = Object.prototype.toString.call(val);
return type === '[object HTMLCollection]' || type === '[object NodeList]';
}
/**
* Merge two objects recursively (deep merge). The source object's properties
* are merged to the target object.
*
* @private
* @param {Object} target
* - The target object.
* @param {Object} source
* - The source object.
* @returns {Object} Returns the target object.
*/
function mergeObjects(target, source) {
// Loop through the surce object's props.
Object.keys(source).forEach(function (propName) {
var isObject = isPlainObject(source[propName]);
// If target and source values are both objects, merge the objects and
// assign the merged value to the target property.
if (isPlainObject(target[propName]) && isObject) {
target[propName] = mergeObjects({}, target[propName]);
target[propName] = mergeObjects(target[propName], source[propName]);
}
// Otherwise set the source object's value to target object and make sure
// that object and array values are cloned and directly assigned.
else {
target[propName] = isObject ? mergeObjects({}, source[propName]) :
Array.isArray(source[propName]) ? source[propName].concat() :
source[propName];
}
});
return target;
}
/**
* Insert an item or an array of items to array to a specified index. Mutates
* the array. The index can be negative in which case the items will be added
* to the end of the array.
*
* @private
* @param {Array} array
* @param {*} items
* @param {Number} [index=-1]
*/
function insertItemsToArray(array, items, index) {
var targetIndex = typeof index === typeNumber ? index : -1;
array.splice.apply(array, [targetIndex < 0 ? array.length - targetIndex + 1 : targetIndex, 0].concat(items));
}
/**
* Returns a function, that, as long as it continues to be invoked, will not
* be triggered. The function will be called after it stops being called for
* N milliseconds. The returned function accepts one argument which, when
* being "finish", calls the debounced function immediately if it is currently
* waiting to be called, and when being "cancel" cancels the currently queued
* function call.
*
* @private
* @param {Function} fn
* @param {Number} wait
* @returns {Function}
*/
function debounce(fn, wait) {
var timeout;
var actionCancel = 'cancel';
var actionFinish = 'finish';
return wait > 0 ? function (action) {
if (timeout !== undefined) {
timeout = global.clearTimeout(timeout);
if (action === actionFinish) {
fn();
}
}
if (action !== actionCancel && action !== actionFinish) {
timeout = global.setTimeout(function () {
timeout = undefined;
fn();
}, wait);
}
} : function (action) {
if (action !== actionCancel) {
fn();
}
};
}
/**
* Returns a raf loop queue system that allows pushing callbacks to either
* the read queue or the write queue.
*
* @private
* @returns {Object}
*/
function createRafLoop() {
var nextTick = null;
var queue = [];
var map = {};
var raf = (global.requestAnimationFrame
|| global.webkitRequestAnimationFrame
|| global.mozRequestAnimationFrame
|| global.msRequestAnimationFrame
|| function (cb) {
return global.setTimeout(cb, 16);
}
).bind(global);
function add(type, id, readCallback, writeCallback) {
// First, let's check if an item has been added to the queues with the
// same id and remove it.
var currentIndex = queue.indexOf(type + id);
if (currentIndex > -1) {
queue.splice(currentIndex, 1);
}
// Add all move/scroll event callbacks to the beginning of the queue
// and other callbacks to the end of the queue.
type === rafQueueMove || type === rafQueueScroll ? queue.unshift(type + id) : queue.push(type + id);
map[type + id] = [readCallback, writeCallback];
// Finally, let's kickstart the next tick if it is not running yet.
!nextTick && (nextTick = raf(flush));
}
function cancel(type, id) {
// Let's check if an item has been added to the queue with the id and
// if so -> remove it.
var currentIndex = queue.indexOf(type + id);
if (currentIndex > -1) {
queue.splice(currentIndex, 1);
map[type + id] = undefined;
}
}
function flush() {
var maxBatchSize = +Grid._maxRafBatchSize || 100;
var batch = queue.splice(0, Math.min(maxBatchSize, queue.length));
var batchMap = {};
var i;
// Reset ticker.
nextTick = null;
// Create batch map and clear map items.
for (i = 0; i < batch.length; i++) {
batchMap[batch[i]] = map[batch[i]];
map[batch[i]] = undefined;
}
// Process read callbacks.
for (i = 0; i < batch.length; i++) {
batchMap[batch[i]][0]();
}
// Process write callbacks.
for (i = 0; i < batch.length; i++) {
batchMap[batch[i]][1]();
}
// Restart the ticker if needed.
if (!nextTick && queue.length) {
nextTick = raf(flush);
}
}
return {
add: add,
cancel: cancel
};
}
/**
* Helpers - DOM utils
* *******************
*/
/**
* Transforms a camel case style property to kebab case style property.
*
* @private
* @param {String} string
* @returns {String}
*/
function getStyleName(string) {
return string.replace(/([A-Z])/g, '-$1').toLowerCase();
}
/**
* Returns the computed value of an element's style property as a string.
*
* @private
* @param {HTMLElement} element
* @param {String} style
* @returns {String}
*/
function getStyle(element, style) {
return global.getComputedStyle(element, null).getPropertyValue(style === 'transform' ? transform.styleName || style : style);
}
/**
* Returns the computed value of an element's style property transformed into
* a float value.
*
* @private
* @param {HTMLElement} el
* @param {String} style
* @returns {Number}
*/
function getStyleAsFloat(el, style) {
return parseFloat(getStyle(el, style)) || 0;
}
/**
* Returns the element's computed translateX/Y value as a float. Assumes that
* the translate value is defined as pixels.
*
* @private
* @param {HTMLElement} element
* @param {String} axis
* - "x" or "y".
* @returns {Number}
*/
function getTranslateAsFloat(element, axis) {
return parseFloat((getStyle(element, 'transform') || '').replace('matrix(', '').split(',')[axis === 'x' ? 4 : 5]) || 0;
}
/**
* Transform translateX and translateY value into CSS transform style
* property's value.
*
* @private
* @param {Number} translateX
* @param {Number} translateY
* @returns {String}
*/
function getTranslateString(translateX, translateY) {
return 'translateX(' + translateX + 'px) translateY(' + translateY + 'px)';
}
function getTranslateStringTransformed(translateX, translateY, scale, rotate) {
return 'translateX(' + translateX + 'px) translateY(' + translateY + 'px) scale(' + scale + ') rotate(' + rotate + 'deg)';
}
/**
* Get current values of the provided styles definition object.
*
* @private
* @param {HTMLElement} element
* @param {Object} styles
* @return {Object}
*/
function getCurrentStyles(element, styles) {
var current = {};
var keys = Object.keys(styles);
var i;
for (i = 0; i < keys.length; i++) {
current[keys[i]] = getStyle(element, getStyleName(keys[i]));
}
return current;
}
/**
* Set inline styles to an element.
*
* @private
* @param {HTMLElement} element
* @param {Object} styles
*/
function setStyles(element, styles) {
if (element === undefined) {
return;
}
var props = Object.keys(styles);
var i;
for (i = 0; i < props.length; i++) {
element.style[props[i] === 'transform' && transform ? transform.propName : props[i]] = styles[props[i]];
}
}
/**
* Add class to an element.
*
* @private
* @param {HTMLElement} element
* @param {String} className
*/
function addClass(element, className) {
if (element.classList) {
element.classList.add(className);
}
else if (!elementMatches(element, '.' + className)) {
element.className += ' ' + className;
}
}
/**
* Remove class name from an element.
*
* @private
* @param {HTMLElement} element
* @param {String} className
*/
function removeClass(element, className) {
if (element.classList) {
element.classList.remove(className);
}
else if (elementMatches(element, '.' + className)) {
element.className = (' ' + element.className + ' ').replace(' ' + className + ' ', ' ').trim();
}
}
/**
* Convert nodeList to array.
*
* @private
* @param {NodeList} nodeList
* @returns {HTMLElement[]}
*/
function nodeListToArray(nodeList) {
return [].slice.call(nodeList);
}
/**
* Checks the supported element.matches() method and returns a function that
* can be used to call the supported method.
*
* @private
* @returns {Function}
*/
function getSupportedElementMatches() {
var p = Element.prototype;
var fn = p.matches || p.matchesSelector || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || p.oMatchesSelector;
return function (el, selector) {
return fn.call(el, selector);
};
}
/**
* Returns the supported style property's prefix, property name and style name
* or null if the style property is not supported. This is used for getting
* the supported transform.
*
* @private
* @param {String} style
* @returns {?Object}
*/
function getSupportedStyle(style) {
var styleCap = style.charAt(0).toUpperCase() + style.slice(1);
var prefixes = ['', 'Webkit', 'Moz', 'O', 'ms'];
var prefix;
var propName;
var i;
for (i = 0; i < prefixes.length; i++) {
prefix = prefixes[i];
propName = prefix ? prefix + styleCap : style;
if (docElem.style[propName] !== undefined) {
prefix = prefix.toLowerCase();
return {
prefix: prefix,
propName: propName,
styleName: prefix ? '-' + prefix + '-' + style : style
};
}
}
return null;
}
/**
* Calculate the offset difference two elements.
*
* @private
* @param {HTMLElement} elemA
* @param {HTMLElement} elemB
* @param {Boolean} [compareContainingBlocks=false]
* - When this is set to true the containing blocks of the provided elements
* will be used for calculating the difference. Otherwise the provided
* elements will be compared directly.
* @returns {Object}
*/
function getOffsetDiff(elemA, elemB, compareContainingBlocks) {
if (elemA === elemB) {
return {
left: 0,
top: 0
};
}
if (compareContainingBlocks) {
elemA = getContainingBlock(elemA, true);
elemB = getContainingBlock(elemB, true);
}
var aOffset = getOffset(elemA, true);
var bOffset = getOffset(elemB, true);
return {
left: bOffset.left - aOffset.left,
top: bOffset.top - aOffset.top
};
}
/**
* Returns the element's document offset, which in practice means the vertical
* and horizontal distance between the element's northwest corner and the
* document's northwest corner.
*
* @private
* @param {(Document|Element|Window)} element
* @param {Boolean} [excludeElementBorders=false]
* @returns {Offset}
*/
function getOffset(element, excludeElementBorders) {
var rect;
var ret = {
left: 0,
top: 0
};
// Document's offsets are always 0.
if (element === doc) {
return ret;
}
// Add viewport's scroll left/top to the respective offsets.
ret.left = global.pageXOffset || 0;
ret.top = global.pageYOffset || 0;
// Window's offsets are the viewport's scroll left/top values.
if (element.self === global.self) {
return ret;
}
// Add element's client rects to the offsets.
rect = element.getBoundingClientRect();
ret.left += rect.left;
ret.top += rect.top;
// Exclude element's borders from the offset if needed.
if (excludeElementBorders) {
ret.left += getStyleAsFloat(element, 'border-left-width');
ret.top += getStyleAsFloat(element, 'border-top-width');
}
return ret;
}
/**
* Returns an aabsolute positioned element's containing block, which is
* considered to be the closest ancestor element that the target element's
* positioning is relative to. Disclaimer: this only works as intended for
* abolute positioned elements.
*
* @private
* @param {HTMLElement} element
* @param {Boolean} [isParent=false]
* - When this is set to true the containing block checking is started from
* the provided element. Otherwise the checking is started from the
* provided element's parent element.
* @returns {(Document|Element)}
*/
function getContainingBlock(element, isParent) {
// As long as the containing block is an element, static and not
// transformed, try to get the element's parent element and fallback to
// document. https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L339
var ret = (isParent ? element : element.parentElement) || doc;
while (ret && ret !== doc && getStyle(ret, 'position') === 'static' && !isTransformed(ret)) {
ret = ret.parentElement || doc;
}
return ret;
}
/**
* Get element's scroll parents.
*
* Borrowed from jQuery UI library (and heavily modified):
* https://github.com/jquery/jquery-ui/blob/63448148a217da7e64c04b21a04982f0d6
* 4aabaa/ui/scroll-parent.js
*
* @private
* @param {HTMLElement} element
* @returns {HTMLElement[]}
*/
function getScrollParents(element) {
var ret = [];
var overflowRegex = /(auto|scroll)/;
var parent = element.parentNode;
// If transformed elements leak fixed elements.
if (transformLeaksFixed) {
// If the element is fixed it can not have any scroll parents.
if (getStyle(element, 'position') === 'fixed') {
return ret;
}
// Find scroll parents.
while (parent && parent !== doc && parent !== docElem) {
if (overflowRegex.test(getStyle(parent, 'overflow') + getStyle(parent, 'overflow-y') + getStyle(parent, 'overflow-x'))) {
ret.push(parent);
}
parent = getStyle(parent, 'position') === 'fixed' ? null : parent.parentNode;
}
// If parent is not fixed element, add window object as the last scroll
// parent.
parent !== null && ret.push(global);
}
// If fixed elements behave as defined in the W3C specification.
else {
// Find scroll parents.
while (parent && parent !== doc) {
// If the currently looped element is fixed ignore all parents that are
// not transformed.
if (getStyle(element, 'position') === 'fixed' && !isTransformed(parent)) {
parent = parent.parentNode;
continue;
}
// Add the parent element to return items if it is scrollable.
if (overflowRegex.test(getStyle(parent, 'overflow') + getStyle(parent, 'overflow-y') + getStyle(parent, 'overflow-x'))) {
ret.push(parent);
}
// Update element and parent references.
element = parent;
parent = parent.parentNode;
}
// If the last item is the root element, replace it with the global
// object (window). The root element scroll is propagated to the window.
if (ret[ret.length - 1] === docElem) {
ret[ret.length - 1] = global;
}
// Otherwise add global object (window) as the last scroll parent.
else {
ret.push(global);
}
}
return ret;
}
/**
* Detects if transformed elements leak fixed elements. According W3C
* transform rendering spec a transformed element should contain even fixed
* elements. Meaning that fixed elements are positioned relative to the
* closest transformed ancestor element instead of window. However, not every
* browser follows the spec (IE and older Firefox). So we need to test it.
* https://www.w3.org/TR/css3-2d-transforms/#transform-rendering
*
* Borrowed from Mezr (v0.6.1):
* https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L607
*
* @private
* @returns {Boolean}
* - Returns true if transformed elements leak fixed elements, false
* otherwise.
*/
function doesTransformLeakFixed() {
if (!transform) {
return true;
}
var elems = [0, 1].map(function (elem, isInner) {
elem = doc.createElement('div');
setStyles(elem, {
position: isInner ? 'fixed' : 'absolute',
display: 'block',
visibility: 'hidden',
left: isInner ? '0px' : '1px',
transform: 'none'
});
return elem;
});
var outer = body.appendChild(elems[0]);
var inner = outer.appendChild(elems[1]);
var left = inner.getBoundingClientRect().left;
setStyles(outer, {transform: 'scale(1)'});
var isLeaking = left === inner.getBoundingClientRect().left;
body.removeChild(outer);
return isLeaking;
}
/**
* Returns true if element is transformed, false if not. In practice the
* element's display value must be anything else than "none" or "inline" as
* well as have a valid transform value applied in order to be counted as a
* transformed element.
*
* Borrowed from Mezr (v0.6.1):
* https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L661
*
* @private
* @param {HTMLElement} element
* @returns {Boolean}
*/
function isTransformed(element) {
var transform = getStyle(element, 'transform');
var display = getStyle(element, 'display');
return transform !== 'none' && display !== 'inline' && display !== 'none';
}
/**
* Calculate how many percent the intersection area of two rectangles is from
* the maximum potential intersection area between the rectangles.
*
* @private
* @param {Rectangle} a
* @param {Rectangle} b
* @returns {Number}
* - A number between 0-100.
*/
function getRectOverlapScore(a, b) {
// Return 0 immediately if the rectangles do not overlap.
if (!muuriLayout.doRectsOverlap(a, b)) {
return 0;
}
// Calculate intersection area's width, height, max height and max width.
var width = Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left);
var height = Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top);
var maxWidth = Math.min(a.width, b.width);
var maxHeight = Math.min(a.height, b.height);
return (width * height) / (maxWidth * maxHeight) * 100;
}
/**
* Helpers - Item sort utilities
* *****************************
*/
/**
* Helper for the sort method to generate mapped version of the items array
* than contains reference to the item indices.
*
* @private
* @param {Item[]} items
* @returns {Object}
*/
function getItemIndexMap(items) {
var ret = {};
var i;
for (i = 0; i < items.length; i++) {
ret[items[i]._id] = i;
}
return ret;
}
/**
* Helper for the sort method to compare the indices of the items to enforce
* stable sort.
*
* @private
* @param {Item} itemA
* @param {Item} itemB
* @param {Boolean} isDescending
* @param {Object} indexMap
* @returns {Number}
*/
function compareItemIndices(itemA, itemB, isDescending, indexMap) {
var indexA = indexMap[itemA._id];
var indexB = indexMap[itemB._id];
return isDescending ? indexB - indexA : indexA - indexB;
}
/**
* Helper for the sort method to compare the items based on the provided
* attributes.
*
* @private
* @param {Item} itemA
* @param {Item} itemB
* @param {Boolean} isDescending
* @param {Object} criterias
* @returns {Number}
*/
function compareItems(itemA, itemB, isDescending, criterias) {
var ret = 0;
var criteriaName;
var criteriaOrder;
var valA;
var valB;
var i;
// Loop through the list of sort criterias.
for (i = 0; i < criterias.length; i++) {
// Get the criteria name, which should match an item's sort data key.
criteriaName = criterias[i][0];
criteriaOrder = criterias[i][1];
// Get items' cached sort values for the criteria. If the item has no sort
// data let's update the items sort data (this is a lazy load mechanism).
valA = (itemA._sortData ? itemA : itemA._refreshSortData())._sortData[criteriaName];
valB = (itemB._sortData ? itemB : itemB._refreshSortData())._sortData[criteriaName];
// Sort the items in descending order if defined so explicitly.
if (criteriaOrder === 'desc' || (!criteriaOrder && isDescending)) {
ret = valB < valA ? -1 : valB > valA ? 1 : 0;
}
// Otherwise sort items in ascending order.
else {
ret = valA < valB ? -1 : valA > valB ? 1 : 0;
}
// If we have -1 or 1 as the return value, let's return it immediately.
if (ret !== 0) {
return ret;
}
}
return ret;
}
/**
* Reorder an array of items based on another array of items.
*
* @private
* @param {Item[]} items
* @param {Item[]} refItems
* @returns {Item[]}
*/
function sortItemsByReference(items, refItems) {
var newItems = [];
var currentItems = items.concat();
var item;
var currentIndex;
var i;
for (i = 0; i < refItems.length; i++) {
item = refItems[i];
currentIndex = currentItems.indexOf(item);
if (currentIndex > -1) {
newItems.push(item);
currentItems.splice(currentIndex, 1);
}
}
items.splice.apply(items, [0, items.length].concat(newItems).concat(currentItems));
return items;
}
/**
* Check if a point (coordinate) is within a rectangle.
*
* @private
* @param {Number} x
* @param {Number} y
* @param {Rectangle} rect
* @return {Boolean}
*/
function isPointWithinRect(x, y, rect) {
return rect.width
&& rect.height
&& x >= rect.left
&& x < (rect.left + rect.width)
&& y >= rect.top
&& y < (rect.top + rect.height);
}
/**
* Helpers - Muuri
* ***************
*/
/**
* Show or hide Grid instance's items.
*
* @private
* @param {Grid} inst
* @param {String} method
* - "show" or "hide".
* @param {(GridMultiItemQuery|GridItemState)} items
* @param {Object} [options]
* @param {Boolean} [options.instant=false]
* @param {(ShowCallback|HideCallback)} [options.onFinish]
* @param {(Boolean|LayoutCallback|String)} [options.layout=true]
* @returns {Grid}
*/
function gridShowHideHandler(inst, method, items, options) {
var targetItems = inst.getItems(items);
var opts = options || {};
var isInstant = opts.instant === true;
var callback = opts.onFinish;
var layout = opts.layout ? opts.layout : opts.layout === undefined;
var counter = targetItems.length;
var isShow = method === 'show';
var startEvent = isShow ? evShowStart : evHideStart;
var endEvent = isShow ? evShowEnd : evHideEnd;
var needsLayout = false;
var completedItems = [];
var hiddenItems = [];
var item;
var i;
// If there are no items call the callback, but don't emit any events.
if (!counter) {
if (typeof callback === typeFunction) {
callback(targetItems);
}
}
// Otherwise if we have some items let's dig in.
else {
// Emit showStart/hideStart event.
inst._emit(startEvent, targetItems.concat());
// Show/hide items.
for (i = 0; i < targetItems.length; i++) {
item = targetItems[i];
// If inactive item is shown or active item is hidden we need to do
// layout.
if ((isShow && !item._isActive) || (!isShow && item._isActive)) {
needsLayout = true;
}
// If inactive item is shown we also need to do some special hackery to
// make the item not animate it's next positioning (layout).
if (isShow && !item._isActive) {
item._skipNextLayoutAnimation = true;
}
// If the a hidden item is being shown we need to refresh the item's
// dimensions.
isShow && item._isHidden && hiddenItems.push(item);
// Show/hide the item.
item['_' + method](isInstant, function (interrupted, item) {
// If the current item's animation was not interrupted add it to the
// completedItems array.
if (!interrupted) {
completedItems.push(item);
}
// If all items have finished their animations call the callback
// and emit showEnd/hideEnd event.
if (--counter < 1) {
if (typeof callback === typeFunction) {
callback(completedItems.concat());
}
inst._emit(endEvent, completedItems.concat());
}
});
}
// Refresh hidden items.
hiddenItems.length && inst.refreshItems(hiddenItems);
// Layout if needed.
if (needsLayout && layout) {
inst.layout(layout === 'instant', typeof layout === typeFunction ? layout : undefined);
}
}
return inst;
}
/**
* Returns an object which contains start and stop methods for item's
* show/hide process.
*
* @param {String} type
* @param {Object} settings
* @returns {Object}
*/
function getItemVisibilityHandler(type, settings) {
var isShow = type === 'show';
var duration = parseInt(isShow ? settings.showDuration : settings.hideDuration) || 0;
var easing = (isShow ? settings.showEasing : settings.hideEasing) || 'ease';
var styles = isShow ? settings.visibleStyles : settings.hiddenStyles;
var isEnabled = duration > 0;
var currentStyles;
styles = isPlainObject(styles) ? styles : null;
return {
start: function (item, instant, onFinish) {
if (!styles) {
onFinish && onFinish();
}
else {
rafLoop.cancel(rafQueueVisibility, item._id);
if (!isEnabled || instant) {
if (item._animateChild.isAnimating()) {
item._animateChild.stop(styles);
}
else {
setStyles(item._child, styles);
}
onFinish && onFinish();
}
else {
rafLoop.add(rafQueueVisibility, item._id, function () {
currentStyles = getCurrentStyles(item._child, styles);
}, function () {
item._animateChild.start(currentStyles, styles, {
duration: duration,
easing: easing,
onFinish: onFinish
});
});
}
}
},
stop: function (item, targetStyles) {
rafLoop.cancel(rafQueueVisibility, item._id);
item._animateChild.stop(targetStyles);
}
};
}
/**
* Get target grid for the default drag sort predicate.
*
* @private
* @param {Item} item
* @param {Grid} rootGrid
* @param {Rectangle} itemRect
* @param {Number} threshold
* @returns {?Grid}
*/
function getTargetGrid(item, rootGrid, itemRect, threshold) {
var ret = null;
var dragSort = rootGrid._settings.dragSort;
var grids = dragSort === true ? [rootGrid] : dragSort.call(rootGrid, item);
var bestScore = -1;
var gridScore;
var grid;
var i;
// Return immediately if there are no grids.
if (!Array.isArray(grids)) {
return ret;
}
// Loop through the grids and get the best match.
for (i = 0; i < grids.length; i++) {
grid = grids[i];
// Filter out all destroyed grids.
if (grid._isDestroyed) {
continue;
}
// We need to update the grid's offset since it may have changed during
// scrolling. This could be left as problem for the userland, but it's
// much nicer this way. One less hack for the user to worry about =)
grid._refreshDimensions();
// Check how much dragged element overlaps the container element.
gridScore = getRectOverlapScore(itemRect, {
width: grid._width,
height: grid._height,
left: grid._left,
top: grid._top
});
// Check if this grid is the best match so far.
if (gridScore > threshold && gridScore > bestScore) {
bestScore = gridScore;
ret = grid;
}
}
return ret;
}
/**
* Process item's callback queue.
*
* @private
* @param {Function[]} queue
* @param {Boolean} interrupted
* @param {Item} instance
*/
function processQueue(queue, interrupted, instance) {
var callbacks = queue.splice(0, queue.length);
var i;
for (i = 0; i < callbacks.length; i++) {
callbacks[i](interrupted, instance);
}
}
/**
* Check if item is in specific state.
*
* @private
* @param {Item} item
* @param {GridItemState} state
* - Accepted values are: "active", "inactive", "visible", "hidden",
* "showing", "hiding", "positioning", "dragging", "releasing" and
* "migrating".
* @returns {Boolean}
*/
function isItemInState(item, state) {
var methodName;
if (state === 'inactive') {
return !item.isActive();
}
if (state === 'hidden') {
return !item.isVisible();
}
methodName = 'is' + state.charAt(0).toUpperCase() + state.slice(1);
return typeof item[methodName] === typeFunction ? item[methodName]() : false;
}
/**
* Prevent default.
*
* @private
* @param {Object} e
*/
function preventDefault(e) {
if (e.preventDefault) {
e.preventDefault();
}
}
/**
* Merge default settings with user settings. The returned object is a new
* object with merged values. The merging is a deep merge meaning that all
* objects and arrays within the provided settings objects will be also merged
* so that modifying the values of the settings object will have no effect on
* the returned object.
*
* @private
* @param {Object} defaultSettings
* @param {Object} [userSettings]
* @returns {Object} Returns a new object.
*/
function mergeSettings(defaultSettings, userSettings) {
// Create a fresh copy of default settings.
var ret = mergeObjects({}, defaultSettings);
// Merge user settings to default settings.
ret = userSettings ? mergeObjects(ret, userSettings) : ret;
// Handle visible/hidden styles manually so that the whole object is
// overriden instead of the props.
ret.visibleStyles = (userSettings || {}).visibleStyles || (defaultSettings || {}).visibleStyles;
ret.hiddenStyles = (userSettings || {}).hiddenStyles || (defaultSettings || {}).hiddenStyles;
return ret;
}
/**
* Resolver for default drag start predicate function.
*
* @private
* @param {Item} item
* @param {Object} event
* @returns {Boolean}
*/
function dragStartPredicateResolve(item, event) {
var predicate = item._drag._startPredicateData;
var pointer = event.changedPointers[0];
var pageX = pointer && pointer.pageX || 0;
var pageY = pointer && pointer.pageY || 0;
var handleRect;
// If the moved distance is smaller than the threshold distance or there is
// some delay left, ignore this predicate cycle.
if (event.distance < predicate.distance || predicate.delay) {
return;
}
// Get handle rect.
handleRect = predicate.handleElement.getBoundingClientRect();
// Reset predicate data.
dragStartPredicateReset(item);
// If the cursor is still within the handle let's start the drag.
return isPointWithinRect(pageX, pageY, {
width: handleRect.width,
height: handleRect.height,
left: handleRect.left + (global.pageXOffset || 0),
top: handleRect.top + (global.pageYOffset || 0)
});
}
/**
* Reset for default drag start predicate function.
*
* @private
* @param {Item} item
*/
function dragStartPredicateReset(item) {
var predicate = item._drag._startPredicateData;
if (predicate) {
if (predicate.delayTimer) {
predicate.delayTimer = global.clearTimeout(predicate.delayTimer);
}
item._drag._startPredicateData = null;
}
}
/**
* Default layout algorithm
* ************************
*/
/*!
* muuriLayout v0.5.3
* Copyright (c) 2016 Niklas Rämö <inramo@gmail.com>
* Released under the MIT license
*/
/**
* The default Muuri layout algorithm. Based on MAXRECTS approach as described
* by Jukka Jylänki in his survey: "A Thousand Ways to Pack the Bin - A
* Practical Approach to Two-Dimensional Rectangle Bin Packing.".
*
* This algorithm is intentionally separated from the rest of the codebase,
* because it is it's own library with a different copyright than the rest of
* the software. It's also MIT licensed so no worries there. This is intended
* to be used as Muuri's default layout algorithm and goes hand in hand with
* Muuri's core development.
*
* @private
* @param {Item[]} items
* @param {Number} width
* @param {Number} height
* @param {Object} options
* @param {Boolean} [options.fillGaps=false]
* @param {Boolean} [options.horizontal=false]
* @param {Boolean} [options.alignRight=false]
* @param {Boolean} [options.alignBottom=false]
* @returns {LayoutData}
*/
function muuriLayout(items, width, height, options) {
var fillGaps = !!options.fillGaps;
var isHorizontal = !!options.horizontal;
var alignRight = !!options.alignRight;
var alignBottom = !!options.alignBottom;
var rounding = !!options.rounding;
var layout = {
slots: {},
width: isHorizontal ? 0 : (rounding ? Math.round(width) : width),
height: !isHorizontal ? 0 : (rounding ? Math.round(height) : height),
setWidth: isHorizontal,
setHeight: !isHorizontal
};
var freeSlots = [];
var slotIds;
var slotData;
var slot;
var item;
var itemWidth;
var itemHeight;
var i;
// No need to go further if items do not exist.
if (!items.length) {
return layout;
}
// Find slots for items.
for (i = 0; i < items.length; i++) {
item = items[i];
itemWidth = item._width + item._margin.left + item._margin.right;
itemHeight = item._height + item._margin.top + item._margin.bottom;
if (rounding) {
itemWidth = Math.round(itemWidth);
itemHeight = Math.round(itemHeight);
}
slotData = muuriLayout.getSlot(layout, freeSlots, itemWidth, itemHeight, !isHorizontal, fillGaps);
slot = slotData[0];
freeSlots = slotData[1];
if (isHorizontal) {
layout.width = Math.max(layout.width, slot.left + slot.width);
}
else {
layout.height = Math.max(layout.height, slot.top + slot.height);
}
layout.slots[item._id] = slot;
}
// If the alignment is set to right or bottom, we need to adjust the
// results.
if (alignRight || alignBottom) {
slotIds = Object.keys(layout.slots);
for (i = 0; i < slotIds.length; i++) {
slot = layout.slots[slotIds[i]];
if (alignRight) {
slot.left = layout.width - (slot.left + slot.width);
}
if (alignBottom) {
slot.top = layout.height - (slot.top + slot.height);
}
}
}
return layout;
}
/**
* Calculate position for the layout item. Returns the left and top position
* of the item in pixels.
*
* @private
* @memberof muuriLayout
* @param {Layout} layout
* @param {Array} slots
* @param {Number} itemWidth
* @param {Number} itemHeight
* @param {Boolean} vertical
* @param {Boolean} fillGaps
* @returns {Array}
*/
muuriLayout.getSlot = function (layout, slots, itemWidth, itemHeight, vertical, fillGaps) {
var leeway = 0.001;
var newSlots = [];
var item = {
left: null,
top: null,
width: itemWidth,
height: itemHeight
};
var slot;
var potentialSlots;
var ignoreCurrentSlots;
var i;
var ii;
// Try to find a slot for the item.
for (i = 0; i < slots.length; i++) {
slot = slots[i];
if (item.width <= (slot.width + leeway) && item.height <= (slot.height + leeway)) {
item.left = slot.left;
item.top = slot.top;
break;
}
}
// If no slot was found for the item.
if (item.left === null) {
// Position the item in to the bottom left (vertical mode) or top right
// (horizontal mode) of the grid.
item.left = vertical ? 0 : layout.width;
item.top = vertical ? layout.height : 0;
// If gaps don't needs filling do not add any current slots to the new
// slots array.
if (!fillGaps) {
ignoreCurrentSlots = true;
}
}
// In vertical mode, if the item's bottom overlaps the grid's bottom.
if (vertical && (item.top + item.height) > layout.height) {
// If item is not aligned to the left edge, create a new slot.
if (item.left > 0) {
newSlots.push({
left: 0,
top: layout.height,
width: item.left,
height: Infinity
});
}
// If item is not aligned to the right edge, create a new slot.
if ((item.left + item.width) < layout.width) {
newSlots.push({
left: item.left + item.width,
top: layout.height,
width: layout.width - item.left - item.width,
height: Infinity
});
}
// Update grid height.
layout.height = item.top + item.height;
}
// In horizontal mode, if the item's right overlaps the grid's right edge.
if (!vertical && (item.left + item.width) > layout.width) {
// If item is not aligned to the top, create a new slot.
if (item.top > 0) {
newSlots.push({
left: layout.width,
top: 0,
width: Infinity,
height: item.top
});
}
// If item is not aligned to the bottom, create a new slot.
if ((item.top + item.height) < layout.height) {
newSlots.push({
left: layout.width,
top: item.top + item.height,
width: Infinity,
height: layout.height - item.top - item.height
});
}
// Update grid width.
layout.width = item.left + item.width;
}
// Clean up the current slots making sure there are no old slots that
// overlap with the item. If an old slot overlaps with the item, split it
// into smaller slots if necessary.
for (i = fillGaps ? 0 : ignoreCurrentSlots ? slots.length : i; i < slots.length; i++) {
potentialSlots = muuriLayout.splitRect(slots[i], item);
for (ii = 0; ii < potentialSlots.length; ii++) {
slot = potentialSlots[ii];
// Let's make sure here that we have a big enough slot
// (width/height > 0.49px) and also let's make sure that the slot is
// within the boundaries of the grid.
if (slot.width > 0.49 && slot.height > 0.49 && ((vertical && slot.top < layout.height) || (!vertical && slot.left < layout.width))) {
newSlots.push(slot);
}
}
}
// Sanitize new slots.
if (newSlots.length) {
newSlots = muuriLayout.purgeRects(newSlots).sort(vertical ? muuriLayout.sortRectsTopLeft : muuriLayout.sortRectsLeftTop);
}
// Return the item and updated slots data.
return [item, newSlots];
};
/**
* Punch a hole into a rectangle and split the remaining area into smaller
* rectangles (4 at max).
*
* @private
* @param {Rectangle} rect
* @param {Rectangle} hole
* returns {Rectangle[]}
*/
muuriLayout.splitRect = function (rect, hole) {
var ret = [];
// If the rect does not overlap with the hole add rect to the return data as
// is.
if (!muuriLayout.doRectsOverlap(rect, hole)) {
return [{
left: rect.left,
top: rect.top,
width: rect.width,
height: rect.height
}];
}
// Left split.
if (rect.left < hole.left) {
ret.push({
left: rect.left,
top: rect.top,
width: hole.left - rect.left,
height: rect.height
});
}
// Right split.
if ((rect.left + rect.width) > (hole.left + hole.width)) {
ret.push({
left: hole.left + hole.width,
top: rect.top,
width: (rect.left + rect.width) - (hole.left + hole.width),
height: rect.height
});
}
// Top split.
if (rect.top < hole.top) {
ret.push({
left: rect.left,
top: rect.top,
width: rect.width,
height: hole.top - rect.top
});
}
// Bottom split.
if ((rect.top + rect.height) > (hole.top + hole.height)) {
ret.push({
left: rect.left,
top: hole.top + hole.height,
width: rect.width,
height: (rect.top + rect.height) - (hole.top + hole.height)
});
}
return ret;
};
/**
* Check if two rectangles overlap.
*
* @private
* @memberof muuriLayout
* @param {Rectangle} a
* @param {Rectangle} b
* @returns {Boolean}
*/
muuriLayout.doRectsOverlap = function (a, b) {
return !((a.left + a.width) <= b.left || (b.left + b.width) <= a.left || (a.top + a.height) <= b.top || (b.top + b.height) <= a.top);
};
/**
* Check if a rectangle is fully within another rectangle.
*
* @private
* @memberof muuriLayout
* @param {Rectangle} a
* @param {Rectangle} b
* @returns {Boolean}
*/
muuriLayout.isRectWithinRect = function (a, b) {
return a.left >= b.left && a.top >= b.top && (a.left + a.width) <= (b.left + b.width) && (a.top + a.height) <= (b.top + b.height);
};
/**
* Loops through an array of rectangles and removes all that are fully within
* another rectangle in the array.
*
* @private
* @memberof muuriLayout
* @param {Rectangle[]} rects
* @returns {Rectangle[]}
*/
muuriLayout.purgeRects = function (rects) {
var i = rects.length;
var ii;
var rectA;
var rectB;
while (i--) {
rectA = rects[i];
ii = rects.length;
while (ii--) {
rectB = rects[ii];
if (i !== ii && muuriLayout.isRectWithinRect(rectA, rectB)) {
rects.splice(i, 1);
break;
}
}
}
return rects;
};
/**
* Sort rectangles with top-left gravity.
*
* @private
* @memberof muuriLayout
* @param {Rectangle} a
* @param {Rectangle} b
* @returns {Number}
*/
muuriLayout.sortRectsTopLeft = function (a, b) {
return a.top - b.top || a.left - b.left;
};
/**
* Sort rectangles with left-top gravity.
*
* @private
* @memberof muuriLayout
* @param {Rectangle} a
* @param {Rectangle} b
* @returns {Number}
*/
muuriLayout.sortRectsLeftTop = function (a, b) {
return a.left - b.left || a.top - b.top;
};
/**
* Type definitions
* ****************
*/
/* eslint-disable */
/**
* The values by which multiple grid items can be queried. An html element or
* an array of HTML elements. Item or an array of items. Node list, live or
* static. Number (index) or a list of numbers (indices).
*
* @typedef {(HTMLElement|HTMLElement[]|Item|Item[]|NodeList|Number|Number[])} GridMultiItemQuery
*/
/* eslint-enable */
/**
* The values by which a single grid item can be queried. An html element, an
* item instance or a number (index).
*
* @typedef {(HTMLElement|Item|Number)} GridSingleItemQuery
*/
/**
* The grid item's state, a string. Accepted values are: "active", "inactive",
* "visible", "hidden", "showing", "hiding", "positioning", "dragging",
* "releasing" and "migrating".
*
* @typedef {String} GridItemState
*/
/**
* The data that is required to orchestrate a sort action during drag.
*
* @typedef {Object} DragSortCommand
* @param {String} action
* - "move" or "swap".
* @param {Number} index
* - target index.
* @param {?Grid} [grid=null]
* - target grid.
*/
/**
* A rectangle is an object with width, height and offset (left and top) data.
*
* @typedef {Object} Rectangle
* @property {Number} width
* @property {Number} height
* @property {Number} left
* @property {Number} top
*/
/**
* Layout data for the layout instance.
*
* @typedef {Object} LayoutData
* @property {Object} slots
* @property {Number} width
* @property {Number} height
* @property {Boolean} setWidth
* @property {Boolean} setHeight
*/
/**
* @callback LayoutCallback
* @param {Boolean} isAborted
* - Was the layout procedure aborted?
* @param {Item[]} items
* - The items that were attempted to be positioned.
*/
/**
* @callback ShowCallback
* @param {Item[]} items
* - The items that were successfully shown without interruptions.
*/
/**
* @callback HideCallback
* @param {Item[]} items
* - The items that were successfully hidden without interruptions.
*/
/**
* @callback FilterCallback
* @param {Item[]} shownItems
* - The items that were shown.
* @param {Item[]} hiddenItems
* - The items that were hidden.
*/
/**
* Init
*/
return Grid;
}));
The MIT License (MIT)
Copyright (C) 2011-2017 by Jorik Tangelder (Eight Media)
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.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright (c) 2015, Haltu Oy
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.
The MIT License (MIT) Copyright (c) 2017 Popmotion
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.
W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE
Status: This license takes effect 13 May, 2015.
This work is being provided by the copyright holders under the following license.
License
By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions.
Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications:
The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included.
Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright © [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)."
Disclaimers
THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT.
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders.
\define if-background-attachment(text)
<$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">
$text$
</$reveal>
\end
\define hide-tiddler-borders-and-gaps()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!seamless" type="match" text="yes">
.tc-grid-1 {
background-color: <<colour tiddler-background>> !important;
}
.tc-tiddler-frame {
box-shadow: none !important;
border: none !important;
margin: 0px 0px 0px 0px !important;
border-radius: 0px !important;
}
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="spanValue">
.tc-tiddler-frame.span-<<spanValue>> {
width: calc((100% / 12 * <<spanValue>>));
min-width: calc((100% / 12 * <<spanValue>>));
}
</$list>
.tc-tiddler-frame.span-13 {
width: calc((100% / 5 * 4));
min-width: calc((100% / 5 * 4));
}
</$reveal>
\end
\define you-better-disable-dragging()
<$reveal state="$:/view" type="match" text="muuri">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!drag-enabled" type="nomatch" text="no">
<$macrocall $name="attention" text="""
!!!//you better ''disable global dragging'' for this: {{$:/plugins/BTC/tiddly-touch/Buttons/toggle-drag}}//
"""/>
</$reveal>
</$reveal>
\end
\define mobile-portrait-tiles()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="nomatch" text="yes">
<$set name="columnCount" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>
.tc-tiddler-frame, .tc-tiddler-edit-frame {
width: calc(100% - 16px);
min-width: calc(100% - 16px) ;
}
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="spanValue">
.tc-tiddler-frame.span-<<spanValue>> {
width: calc(100% - 16px);
min-width: calc(100% - 16px);
}
</$list>
</$set>
</$reveal>
\end
\define sidebar-new-window-tiddler-edit-frame-hide()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!sidebar-new-window" type="match" text="yes">
.tc-story-river .tc-tiddler-edit-frame {
}
</$reveal>
\end
\define tiddly-touch-toolbar-left-right()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!toolbar-right" type="match" text="yes">
</$reveal>
\end
\define vertical-toolbar-yes-no()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar" type="nomatch" text="no">
.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {
width: 1.8em;
right: -60px;
position: fixed;
top: -20px;
}
@media (max-width: 500px) {
.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {
width: 1em;
right: -30px;
position: fixed;
top: -10px;
}
}
</$reveal>
\end
\define if-horizontal-grid(text)
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="match" text="yes">
$text$
</$reveal>
\end
\define toggle-muuri-columns()
<$set name="offSetPx" filter="[[$:/plugins/BTC/tiddly-touch/config]get[seamless]regexp[^yes$]addprefix[0]removesuffix[yes]] [[$:/plugins/BTC/tiddly-touch/config]get[seamless]regexp[^no$]addprefix[16]removesuffix[no]]">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!column-count" type="nomatch" text="">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="nomatch" text="yes">
<$set name="columnCount" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>
.tc-tiddler-frame, .tc-tiddler-edit-frame {
width: calc((100% / <<columnCount>>) - <<offSetPx>>px);
min-width: calc((100% / <<columnCount>>) - <<offSetPx>>px) ;
}
@media (min-width: 500px) {
.tc-tiddler-frame, .tc-tiddler-edit-frame {
width: calc((100% / <<columnCount>>) - <<offSetPx>>px);
min-width: calc((100% / <<columnCount>>) - <<offSetPx>>px);
}
}
<$list filter="[<columnCount>regexp[^(4|5|6)$]]">
.tc-tiddler-frame {
padding-left: 20px;
padding-right: 20px;
}
.tc-tiddler-controls {
right: -33px !important;
}
.tc-tiddler-info {
margin-left: -20px;
margin-right: -20px;
padding-left: 10px;
padding-right: 10px;
}
.tc-unfold-banner {
margin-left: -21px;
}
.tc-fold-banner {
margin-left: -17px;
width: 15px;
}
</$list>
.tc-tiddler-frame.span-4, .tc-tiddler-frame.span-5, .tc-tiddler-frame.span-6 , .tc-tiddler-frame.span-7, .tc-tiddler-frame.span-8, .tc-tiddler-frame.span-9 , .tc-tiddler-frame.span-10, .tc-tiddler-frame.span-11, .tc-tiddler-frame.span-12, , .tc-tiddler-frame.span-13 {
padding-left: 42px !important;
padding-right: 42px !important;
}
.tc-tiddler-frame.span-1, .tc-tiddler-frame.span-2, .tc-tiddler-frame.span-3 {
padding-left: 20px;
padding-right: 20px;
}
.span-1 .tc-tiddler-controls, .span-2 .tc-tiddler-controls, .span-3 .tc-tiddler-controls {
right: -33px !important;
}
.span-1 .tc-tiddler-info, .span-2 .tc-tiddler-info, .span-3 .tc-tiddler-info {
margin-left: -20px;
margin-right: -20px;
padding-left: 10px;
padding-right: 10px;
}
.span-1 .tc-unfold-banner, .span-2 .tc-unfold-banner, .span-3 .tc-unfold-banner {
margin-left: -21px;
}
.span-1 .tc-fold-banner, .span-2 .tc-fold-banner, .span-3 .tc-fold-banner {
margin-left: -17px;
width: 15px;
}
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="spanValue">
.tc-tiddler-frame.span-<<spanValue>> {
width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);
min-width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);
}
@media (min-width: 500px) {
.tc-tiddler-frame.span-<<spanValue>> {
width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);
min-width: calc((100% / 12 * <<spanValue>>) - <<offSetPx>>px);
}
}
</$list>
.tc-tiddler-frame.span-13 {
width: calc((100% / 5 * 4) - <<offSetPx>>px);
min-width: calc((100% / 5 * 4) - <<offSetPx>>px);
}
</$set>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!column-count" type="nomatch" text="">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!align-horizontal" type="match" text="yes">
<$set name="columnCount" value={{$:/plugins/BTC/tiddly-touch/config!!column-count}}>
.tc-tiddler-frame, .tc-tiddler-edit-frame {
width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px);
min-width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px);
}
@media (min-width: 500px) {
.tc-tiddler-frame, .tc-tiddler-edit-frame {
width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px);
min-width: calc((100vw - 84px) / <<columnCount>> - <<offSetPx>>px);
}
}
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12" variable="spanValue">
.tc-tiddler-frame.span-<<spanValue>> {
width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);
min-width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);
}
@media (min-width: 500px) {
.tc-tiddler-frame.span-<<spanValue>> {
width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);
min-width: calc(((100vw - 84px) * <<spanValue>> / 12) - <<offSetPx>>px);
}
}
</$list>
.tc-tiddler-frame.span-13 {
width: calc((100% / 5 * 4) - <<offSetPx>>px);
min-width: calc((100% / 5 * 4) - <<offSetPx>>px);
}
</$set>
</$reveal>
</$reveal>
\end
\define vertical-toolbar-macro()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar" type="nomatch" text="no">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]![$:/plugins/BTC/tiddly-touch/Buttons/toggle-tiddler-width]![$:/core/ui/Buttons/more-tiddler-actions]![$:/core/ui/Buttons/fold-bar]lookup[$:/config/ViewToolbarButtons/Visibility/]!regexp[^hide$]count[]]" variable="toolbarCount">
.tc-tiddler-frame:not(.tc-tiddler-folded) {
min-height: calc(<<toolbarCount>> * 175px / 4);
}
</$list>
</$reveal>
</$reveal>
\end
\define if-dragging-enabled(text)
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!drag-enabled" type="match" text="yes">
$text$
</$reveal>
\end
\define if-spreadsheet-view(text)
<$list filter="[[$:/core/ui/PageTemplate/spreadsheet]tag[$:/tags/PageTemplate]]">
$text$
</$list>
\end
\define show-hide-right-grid()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!right-grid" type="match" text="hide">
.tc-grid-3 {
display: none !important;
visibility: hidden;
}
</$reveal>
\end
\define show-hide-left-grid()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!left-grid" type="match" text="hide">
section.tc-grid-2, .grid-container-2, .tc-grid-2 .tc-tiddler-frame {
display: none !important;
visibility: hidden;
}
</$reveal>
\end
\define leftgrid-width-macro()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!left-grid-width" type="nomatch" text="">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!left-grid" type="nomatch" text="hide">
<$set name="leftGridWidth" value={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>
.tc-grid-2 {
width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;
}
.tc-grid-1 {
width: calc(74% - ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;
}
</$set>
</$reveal>
</$reveal>
\end
\define rightgrid-width-macro()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!right-grid-width" type="nomatch" text="">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!right-grid" type="nomatch" text="hide">
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]regexp[^hide$]]">
<$set name="rightGridWidth" value={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}}>
.tc-grid-2 {
display: none !important;
}
.tc-grid-3 {
width: calc(13% + ((<<rightGridWidth>> - 1) * (100vw / 20)));
}
.tc-grid-1 {
width: calc(87% - ((<<rightGridWidth>> - 1) * (100vw / 20)) - 21px);
}
</$set>
</$list>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]!regexp[^hide$]]">
<$vars rightGridWidth={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}} leftGridWidth={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>
.tc-grid-3 {
width: calc(13% + ((<<rightGridWidth>> - 1) * (100vw / 20))) !important;
}
.tc-grid-2 {
width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20))) !important;
}
.tc-grid-1 {
width: calc(74% - ((<<rightGridWidth>> - 1) * (100vw / 20)) - ((<<leftGridWidth>> - 1) * (100vw / 20)) - 42px);
left: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 21px);
}
</$vars>
</$list>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!right-grid" type="match" text="hide">
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]regexp[^hide$]]">
<$set name="rightGridWidth" value={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}}>
.tc-grid-1 {
width: 100%;
}
.tc-grid-2 {
display: none;
}
</$set>
</$list>
<$list filter="[[$:/plugins/BTC/tiddly-touch/config]get[left-grid]!regexp[^hide$]]">
<$vars rightGridWidth={{$:/plugins/BTC/tiddly-touch/config!!right-grid-width}} leftGridWidth={{$:/plugins/BTC/tiddly-touch/config!!left-grid-width}}>
.tc-grid-2 {
width: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 8px);
}
.tc-grid-1 {
width: calc(87% -
((<<leftGridWidth>> - 1) * (100vw / 20)) - 21px) ;
left: calc(13% + ((<<leftGridWidth>> - 1) * (100vw / 20)) + 21px);
right: 0px;
}
</$vars>
</$list>
</$reveal>
</$reveal>
\end
\define show-hide-tiddler-title-tags()
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="nomatch" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle {
display: none !important;
}
.tc-tiddler-frame {
padding-top: 10px !important;
}
.tc-tiddler-controls {
padding-top: 18px !important;
}
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="nomatch" text="yes">
.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle, .tc-tiddler-frame .tc-tags-wrapper {
display: none !important;
}
.tc-tiddler-frame {
padding-top: 10px !important;
}
.tc-tiddler-controls {
padding-top: 18px !important;
}
</$reveal>
</$reveal>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-titles" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-tags" type="match" text="yes">
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!hide-controls" type="match" text="yes">
.tc-tiddler-frame .tc-title, .tc-tiddler-frame .tc-subtitle, .tc-tiddler-frame .tc-tags-wrapper, .tc-tiddler-frame .tc-tiddler-controls, .tc-topleft-span {
display: none !important;
}
.tc-tiddler-frame {
padding-top: 10px !important;
}
.tc-tiddler-controls {
padding-top: 18px !important;
}
</$reveal>
</$reveal>
</$reveal>
\end
\define exact-tiddler-width()
<$list filter="[list[$:/StoryList]has[muuri-tiddler-width-px]get[muuri-tiddler-width-px]]">
.tc-tiddler-frame.tc-muuri-width-<<currentTiddler>> {
width: <<currentTiddler>>px;
min-width: 25px;
}
</$list>
\end
\define exact-tiddler-height()
<$list filter="[list[$:/StoryList]has[muuri-tiddler-height-px]get[muuri-tiddler-height-px]]">
.tc-tiddler-frame.tc-muuri-height-<<currentTiddler>> {
height: <<currentTiddler>>px;
min-height: 25px;
}
</$list>
\end
\define widthreveal(widthlist,tiddlerlist)
<$set name="tiddlerWidth" value={{!!muuri-tiddler-width-px}}>
<$set name="itemsCount" filter="$widthlist$ +[count[]]">
<$list filter="[list[$:/plugins/BTC/tiddly-touch/lists/numbers]limit<itemsCount>]" variable="cycleCount">
<$set name="previousCycleCount" filter="[<cycleCount>!regexp[^1$]previous[$:/plugins/BTC/tiddly-touch/lists/numbers]] [<cycleCount>regexp[^1$]]">
<$list filter="$widthlist$ +[nth<cycleCount>]" variable="matchingWidth">
<$list filter="$tiddlerlist$ +[nth<cycleCount>]" variable="matchingTiddler">
<$list filter="$widthlist$ +[nth<previousCycleCount>]" variable="prevWidth">
<$list filter="[<cycleCount>!regexp[^1$]addprefix<prevWidth>removesuffix<cycleCount>] [<cycleCount>regexp[^1$]addprefix[0]removesuffix[1]]" variable="previousWidth">
<$set name="widthDiff" value=<<formula "<<matchingWidth>> - <<previousWidth>>">>>
<$set name="lowWidth" value=<<formula "<<matchingWidth>> - <<widthDiff>>">>>
<$set name="greaterThan" value=<<formula "gte(<<tiddlerWidth>>, <<lowWidth>>)">>>
<$set name="lessThan" value=<<formula "lte(<<tiddlerWidth>>, <<matchingWidth>>) ">>>
<$list filter="[<greaterThan>regexp[^TRUE$]]">
<$list filter="[<lessThan>regexp[^TRUE$]]">
<$transclude tiddler=<<matchingTiddler>> mode="block"/>
</$list>
</$list>
</$set>
</$set>
</$set>
</$set>
</$list>
</$list>
</$list>
</$list>
</$set>
</$list>
</$set>
</$set>
\end
\define wheelreveal(numberlist,tiddlerlist)
<$set name="tiddlerHeight" value={{!!muuri-tiddler-height-px}}>
<$set name="itemsCount" filter="$numberlist$ +[count[]]">
<$list filter="[list[$:/plugins/BTC/tiddly-touch/lists/numbers]limit<itemsCount>]" variable="cycleCount">
<$set name="previousCycleCount" filter="[<cycleCount>!regexp[^1$]previous[$:/plugins/BTC/tiddly-touch/lists/numbers]] [<cycleCount>regexp[^1$]]">
<$list filter="$numberlist$ +[nth<cycleCount>]" variable="matchingHeight">
<$list filter="$tiddlerlist$ +[nth<cycleCount>]" variable="matchingTiddler">
<$list filter="$numberlist$ +[nth<previousCycleCount>]" variable="prevHeight">
<$list filter="[<cycleCount>!regexp[^1$]addprefix<prevHeight>removesuffix<cycleCount>] [<cycleCount>regexp[^1$]addprefix[0]removesuffix[1]]" variable="previousHeight">
<$set name="heightDiff" value=<<formula "<<matchingHeight>> - <<previousHeight>>">>>
<$set name="lowHeight" value=<<formula "<<matchingHeight>> - <<heightDiff>>">>>
<$set name="greaterThan" value=<<formula "gte(<<tiddlerHeight>>, <<lowHeight>>)">>>
<$set name="lessThan" value=<<formula "lt(<<tiddlerHeight>>, <<matchingHeight>>) ">>>
<$list filter="[<greaterThan>regexp[^TRUE$]]">
<$list filter="[<lessThan>regexp[^TRUE$]]">
<$transclude tiddler=<<matchingTiddler>> mode="block"/>
</$list>
</$list>
</$set>
</$set>
</$set>
</$set>
</$list>
</$list>
</$list>
</$list>
</$set>
</$list>
</$set>
</$set>
\end
/*\
title: $:/core/modules/macros/viewport.js
type: application/javascript
module-type: macro
tags: $:/tags/Macro
Macro to get the viewport dimensions
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "viewport";
exports.params = [
{ name: "property" }
];
/*
Run the macro
*/
exports.run = function(property) {
var viewPortWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
if (property === "height") {
return viewPortHeight.toString();
} else if (property === "width") {
return viewPortWidth.toString();
} else {
return false;
}
};
})();
\define modal-edit-tiddler-title(field)
<$edit-text field="$field$" class="tc-titlebar tc-edit-texteditor" focus="false"/>
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
<$list filter="[is[current]regexp:$field$<pattern>]" variable="listItem">
<div class="tc-message-box">
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
</div>
</$list>
</$vars>
<$reveal state="!!$field$" type="nomatch" text={{!!modaldraft.of}} tag="div">
<$list filter="[{!!modaldraft.title}!is[missing]]" variable="listItem">
<div class="tc-message-box">
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}
</div>
</$list>
<$list filter="[{!!modaldraft.of}!is[missing]]" variable="listItem">
<$vars fromTitle={{!!modaldraft.of}} toTitle={{!!field}}>
<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>
</$vars>
</$list>
</$reveal>
\end
<$list filter="[<currentTiddler>!has[draft.of]]">
<<modal-edit-tiddler-title "title">>
</$list>
<$list filter="[<currentTiddler>has[draft.of]]">
<<modal-edit-tiddler-title "draft.title">>
</$list>
\define closeModal()
<$action-sendmessage $message="tm-close-tiddler"/>
\end
\define modalTiddlerActions(message,close)
<$list filter="[[$close$]!regexp[^keep$]]"><<closeModal>></$list><$navigator story="$:/StoryList" history=""><$action-sendmessage $message="$message$" $param="""$(currentTiddler)$"""/></$navigator>
\end
\define modal-edit-tiddler-parts(tiddlersection,buttontext)
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" type="nomatch" text="yes">
<$button class="tc-btn-invisible" set="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" setTo="yes">$buttontext$</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" type="match" text="yes"><br>
<$list filter="[[$(actionTiddler)$]]" template="$:/core/ui/EditTemplate/$tiddlersection$"/><br><$button set="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" setTo="no"><<modalTiddlerActions "tm-save-tiddler">>Save & Close Modal</$button> <$button set="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" setTo="no"><<closeModal>>Cancel & Close Modal</$button> <$button set="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" setTo="no">Cancel</$button> <$button set="$:/plugins/BTC/tiddly-touch/config!!modal-reveal-$tiddlersection$" setTo="no"><<modalTiddlerActions "tm-save-tiddler" "keep">>Save</$button></$reveal><br>
\end
\define modal-tiddler-action-button(message,buttontext)
<$button class="tc-btn-invisible"><<modalTiddlerActions "tm-$message$-tiddler">>$buttontext$</$button><br>
\end
<$importvariables filter="[[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]">
@@text-align:center;
<$list filter="[<actionTiddler>!has[draft.of]]">
<<modal-tiddler-action-button "edit" "Edit Tiddler">>
<<modal-tiddler-action-button "close" "Remove Tiddler from Story">>
<<modal-tiddler-action-button "delete" "Delete Tiddler">>
<br>
<<modal-edit-tiddler-parts "title" "Edit Tiddler Title">>
<<modal-edit-tiddler-parts "fields" "Edit Tiddler Fields">>
<br><br>
<$button message="tm-close-tiddler" class="tc-btn-invisible">Close Modal</$button>
</$list>
<$list filter="[<actionTiddler>has[draft.of]]">
<<modal-tiddler-action-button "cancel" "Cancel editing">>
<<modal-tiddler-action-button "save" "Save editing">>
<br>
<<modal-edit-tiddler-parts "title" "Edit Tiddler Title">>
<<modal-edit-tiddler-parts "fields" "Edit Tiddler Fields">>
<br><br>
<$button message="tm-close-tiddler" class="tc-btn-invisible">Close Modal</$button>
</$list>
@@
</$importvariables>
\rules only filteredtranscludeinline transcludeinline macrocallinline macrocallblock
<<if-background-attachment """
body.tc-body {
background-color: transparent;
}
""">>
.grid, .tc-muuri-grid { position: relative; } .tc-tiddler-frame { display: block; position: absolute; width: 100%; margin: 8px;} .tc-tiddler-frame.tc-dragover { z-index: 2; } .tc-tiddler-frame.muuri-hidden { z-index: 0; display: none; } .tc-tiddler-frame:hover, .tc-tiddler-frame:focus { z-index: 3; } .tc-tiddler-frame-content { position: relative; width: 100%; height: 100%; }
.tc-tiddler-frame.tc-dragging { z-index: 100; } .tc-alert, .tc-alerts { z-index: 300 !important; }
/* ** Tiddler view styles */
.tc-btn-invisible.tc-toolbar-icon {
color: <<colour muted-foreground>>;
vertical-align: sub;
}
.tc-btn-invisible.tc-toolbar-icon:hover {
color: <<colour foreground>>;
}
.tc-tagged-defined-width {
width: calc(100vw / 3.5) !important;
}
.tc-tagged-defined-width-2 {
width: calc(100vw / 2) !important;
}
.tc-tiddler-frame.tc-tagged-6 { width: calc(100% * 6 / 12 - 16px); min-width: calc(72px * 6); }
}
.tc-tiddler-frame {
background-color: <<colour tiddler-background>>{{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}} !important;
}
<<if-no-sidebar "
.tc-sidebar-scrollable {
display: none;
}
.tc-topbar-right {
right: 10px !important;
}
">>
.tc-story-river {
padding-top: 0px !important;
}
.tc-muuri-empty-story {
height: 60vh;
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
}
.tc-tagged-Journal {
background-color: #feff9c !important;
border-color: #fff740 !important;
}
.tc-tiddler-frame.span-4 iframe {
min-height: calc(100vh / 4);
}
.tc-tiddler-frame.span-6 iframe {
min-height: calc(100vh / 3);
}
.tc-tiddler-frame.span-9 iframe, .tc-tiddler-frame.span-12 iframe {
min-height: calc(100vh / 2);
}
.tc-tiddler-frame img, .tc-tiddler-frame image { position: relative; display: block; }
@media (max-height: 500px) {
.tc-image-full-screen-button {
fill: <<colour primary>> !important;
}
.tc-story-river {
padding: 0px 0px 0px 25px;
}
}
@media (max-width: 500px) {
.tc-tiddler-frame {
padding: 14px 28px 14px 14px;
}
.tc-topbar-right {
display: none !important;
}
.tc-story-river {
padding: 0px 0px 0px 25px !important;
}
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!vertical-toolbar" type="nomatch" text="no">
.tc-tiddler-frame {
min-height: 130px;
}
</$reveal>
.tc-image-full-screen-button {
fill: <<colour primary>> !important;
}
}
<<if-horizontal-grid """
.grid, .tc-muuri-grid {
height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
max-height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
min-width: 100%;
}
.tc-story-river {
height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
max-height: calc({{$:/plugins/BTC/tiddly-touch/config!!horizontal-view-height}} - 15px);
min-width: calc(100vw - 84px);
}
.tc-sidebar-scrollable {
}
""">>
.tc-muuri-grid .tc-drop-down {
min-width: 220px;
}
.tc-tiddler-frame.tc-tagged-sampletag {
max-height: 10vh !important;
max-width: 10vh !important;
min-height: 10vh !important;
min-width: 10vh !important;
padding: 5px 5px 5px 5px;
text-align: center !important;
vertical-align: center;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar h2 {
display: none;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar {
display: none !important;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-subtitle, .tc-tiddler-frame.tc-tagged-sampletag .tc-tags-wrapper, .tc-tiddler-frame.tc-tagged-sampletag .tc-tiddler-controls {
display: none !important;
}
<<if-dragging-enabled """
.tc-dragging-button {
color: <$macrocall $name="colour" name="very-muted-foreground"/> !important;
}
""">>
@media (min-width: 900px) {
.tc-sidebar-scrollable {
background-color: <<colour background>>{{$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity}} !important;
background: <<colour background>>{{$:/plugins/BTC/tiddly-touch/config!!sidebar-opacity}} ;
z-index: 200;
box-shadow: -1px 0px 1px 1px <<colour muted-foreground>>;
}
}
<<if-sidebar """
.tc-topbar-right {
z-index: 10000 !important;
}
.tc-story-river {
padding-right: 42px !important;
margin-right: 0px !important;
}
""">>
.tc-tiddler-frame.span-4 , .tc-tiddler-frame.span-5, .tc-tiddler-frame.span-6, .tc-tiddler-frame.span-7, .tc-tiddler-frame.span-8, .tc-tiddler-frame.span-9, .tc-tiddler-frame.span-10, .tc-tiddler-frame.span-11, .tc-tiddler-frame.span-12, .tc-tiddler-frame.span-13 {
padding-left: 42px;
padding-right: 42px;
}
<<vertical-toolbar-yes-no>>
<<vertical-toolbar-macro>>
<<toggle-muuri-columns>>
.span-4 .tc-tiddler-controls, .span-5 .tc-tiddler-controls, .span-6 .tc-tiddler-controls, .span-7 .tc-tiddler-controls, .span-8 .tc-tiddler-controls, .span-9 .tc-tiddler-controls, .span-10 .tc-tiddler-controls, .span-11 .tc-tiddler-controls, .span-12 .tc-tiddler-controls, .span-13 .tc-tiddler-controls {
right: -60px !important;
}
.span-4 .tc-tiddler-info, .span-5 .tc-tiddler-info, .span-13 .tc-tiddler-info, .span-6 .tc-tiddler-info, .span-7 .tc-tiddler-info, .span-8 .tc-tiddler-info, .span-9 .tc-tiddler-info, .span-10 .tc-tiddler-info, .span-11 .tc-tiddler-info, .span-12 .tc-tiddler-info {
margin-left: -20px;
margin-right: -20px;
padding-left: 10px;
padding-right: 10px;
}
.span-4 .tc-unfold-banner, .span-5 .tc-unfold-banner, .span-6 .tc-unfold-banner, .span-7 .tc-unfold-banner, .span-8 .tc-unfold-banner, .span-9 .tc-unfold-banner, .span-10 .tc-unfold-banner, .span-11 .tc-unfold-banner, .span-12 .tc-unfold-banner, .span-13 .tc-unfold-banner {
margin-left: -43px;
width: 100%;
}
.span-4 .tc-fold-banner, .span-5 .tc-fold-banner, .span-6 .tc-fold-banner, .span-7 .tc-fold-banner, .span-8 .tc-fold-banner, .span-9 .tc-fold-banner, .span-10 .tc-fold-banner, .span-11 .tc-fold-banner, .span-12 .tc-fold-banner, .span-13 .tc-fold-banner {
margin-left: -35px;
width: 23px;
}
.tc-leftbar , div.tc-leftbar-open {
position: fixed;
z-index: 1200;
}
.tc-leftbar button {
padding: 8px;
}
.tc-leftbar svg {
fill: <<colour muted-foreground>>;
}
.tc-leftbar button:hover svg {
fill: <<colour foreground>>;
}
.tc-leftbar {
position: fixed;
top: 5vh;
left: 0px;
width: 32px;
font-size: 1.6em !important;
padding-left:6px;
}
div.tc-leftbar-open {
position: fixed;
bottom: 10vh;
right:0px;
width: 42px;
font-size: 1.6rem;
}
span.tc-leftbar-open a {
display: none;
}
.tc-leftbar-open span:hover > .tc-leftbar-open span > a {
display: inline-block !important;
}
@media (max-height: 500px) {
.tc-leftbar {
position: fixed;
top: -1vh;
left: 0px;
width: 25px;
font-size: 1.2rem !important;
padding-left:2px;
}
.tc-tiddler-view-frame:not(.tc-tiddler-folded) .tc-tiddler-controls {
width: 0.8em;
right: -27px;
position: fixed;
top: -20px;
}
.tc-leftbar .tc-btn-invisible {
padding: 1px 4px 1px 4px;
}
.tc-leftbar .material-icons {
font-size: 1.2rem !important;
}
.tc-topbar-right {
display: none !important;
}
.tc-tiddler-frame {
padding: 14px 28px 14px 14px;
}
}
@media (max-width: 500px) {
.tc-leftbar {
position: fixed;
top: 0vh;
left: 0px;
width: 20px;
font-size: 1.2em !important;
padding-left:0px;
}
.tc-leftbar .material-icons {
font-size: 1.2em !important;
}
}
<<tiddly-touch-toolbar-left-right>>
/*@media (max-width: 500px) {
.tc-sidebar-scrollable {
max-height: 45vh !important;
padding-left: 20px !important;
}
}*/
.tc-btn-invisible.tc-toolbar-icon {
color: <<colour muted-foreground>>;
vertical-align: sub;
}
.tc-btn-invisible.tc-toolbar-icon:hover {
color: <<colour foreground>>;
}
.tc-sidebar-lists .tc-tiddler-edit-frame {
width: calc(100% - 42px) !important;
}
@media (max-width: 500px) {
.tc-story-river .tc-tiddler-edit-frame {
}
.tc-leftbar {
display: none;
}
.tc-story-river {
padding: 1% 1% 0% 1% !important;
width: 100%;
}
<<mobile-portrait-tiles>>
}
.tc-single-tiddler-window .tc-sidebar-window {
position: absolute;
width: 100%;
height: 100%;
padding: 3% 3% 0% 3%;
}
.tc-single-tiddler-window {
background-color: <<colour page-background>> !important;
}
/*@media (max-device-width: 500px) {
.tc-single-tiddler-window .tc-sidebar-window {
padding: 2% 2% 0% 2%;
font-size: 2rem !important;
line-height: 2em !important;
}
}*/
.tc-single-tiddler-window .tc-sidebar-window:not(.tc-sidebar-lists) .tc-tiddler-edit-frame {
border: 0px solid <<colour page-background>> !important;
padding: 2% 2% 2% 2% !important;
box-shadow: none !important;
width: 90% !important;
}
<<sidebar-new-window-tiddler-edit-frame-hide>>
.tc-leftbar button.tc-selected {
-webkit-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
-moz-filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
filter: drop-shadow(0px -1px 2px rgba(0,0,0,0.25));
}
.tc-leftbar button.tc-selected svg {
fill: <<colour tiddler-controls-foreground-selected>>;
}
.tc-leftbar .tc-btn-invisible.tc-toolbar-icon.tc-selected.tc-dragging-button {
color: <<colour tiddler-controls-foreground-selected>> !important;
}
svg.blue-icon, svg.blue-icon:hover, .tc-tiddler-controls button svg.blue-icon {
fill: <<colour primary>>;
}
svg.green-icon, svg.green-icon:hover {
fill: <<colour download-background>>;
}
svg.red-icon, svg.red-icon:hover {
fill: <<colour code-foreground>>;
}
<<hide-controls-from-user>>
.tc-tiddler-body.tc-muuri-spreadsheet {
min-height: 0px !important;
font-size: 8px !important;
line-height: 12px !important;
}
.tc-tiddler-frame.tc-muuri-spreadsheet {
width: calc((100% / 20) - 1px) !important;
min-width: calc((100% / 30) - 1px) !important;
min-height: calc((95vh / 20) - 1px) !important;
height: calc((95vh / 10) - 1px) !important;
max-width: calc((100% / 20) - 1px) !important;
max-height: calc((95vh / 10) - 1px) !important;
box-shadow: none !important;
padding: 0px 0px 0px 0px !important;
margin: 0 1px 1px 0 !important;
border-radius: 0px !important;
border: 1px solid rgba( 0, 0, 0, 0.1) !important;
}
<<if-spreadsheet-view """
.tc-story-river {
padding-bottom: 0px;
}
.tc-muuri-grid {
margin-left: 8px;
}
""">>
.tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-4 {
display: none;
}
.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-3,
.tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-4 {
display: block !important;
}
.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-3 {
display: none;
}
.tc-below-spreadsheet-view {
position: fixed !important;
bottom: 0px;
background-color: <<colour page-background>>;
z-index: 99999;
}
button.tc-btn-invisible.tc-spreadsheet-cell {
display: inline-block;
outline: none;
width: calc(100% - 0px);
height: calc(100% - 0px);
}
.tc-story-river.tc-spreadsheet-view .tc-muuri-grid {
max-height: 45vh !important;
}
.tc-grid-1 {
position: relative;
}
.tc-grid-2 {
position: fixed;
width: 13%;
background-color: transparent;
left: 42px;
top: 0px;
height: 100vh;
border: none;
overflow-y: scroll;
overflow-x: hidden;
}
.tc-grid-3 {
position: fixed;
background-color: transparent;
width: 13%;
right: 46px;
top: 0px;
height: 100vh;
border: none;
border-right: 0px solid #ffffff;
overflow-y: scroll;
overflow-x: hidden;
}
.tc-grid-3::-webkit-scrollbar, .tc-grid-2::-webkit-scrollbar {
display: none;
}
.tc-grid-2 .tc-tiddler-frame, .tc-grid-3 .tc-tiddler-frame {
width: 100%;
}
.tc-grid-2 .tc-tiddler-body, .tc-grid-3 .tc-tiddler-body, .tc-grid-2 .tc-tags-wrapper, .tc-grid-3 .tc-tags-wrapper, .tc-grid-2 .tc-tiddler-controls, .tc-grid-3 .tc-tiddler-controls {
display: none;
}
.tc-grid-2 .tc-title, .tc-grid-2 .tc-title h2, .tc-grid-3 .tc-title, .tc-grid-3 .tc-title h2, .tc-grid-2 .tc-titlebar, .tc-grid-3 .tc-titlebar {
font-size: 15px;
line-height: 16px;
display: inline-block;
}
.tc-grid-2 .tc-tiddler-frame, .tc-grid-3 .tc-tiddler-frame {
padding: 0px 10px 10px 10px;
max-height: calc(100vh / 6);
min-height: calc(100vh / 10);
width: 100%;
}
.grid-container-1 {
position: relative;
z-index: 1;
min-height: 800px !important;
}
.grid-container-2 {
position: relative;
z-index: 1;
min-height: 800px !important;
}
.grid-container-3 {
position: relative;
z-index: 1;
min-height: 800px !important;
}
.grid-container-3 .tc-tiddler-frame {
margin-top: 2px;
margin-bottom: 2px;
margin-left: 4px;
margin-right: 4px;
}
.grid-container-2 .tc-tiddler-frame, .tc-grid-2 .tc-tiddler-frame {
min-width: 0px !important;
margin-top: 2px;
margin-bottom: 2px;
margin-left: 4px;
margin-right: 4px;
}
.tc-muuri-header {
height: 100px;
width: 100%;
background-color: <<colour primary>>;
}
button.no-outline {
outline: none !important;
}
<<hide-tiddler-borders-and-gaps>>
.tc-dragging img, .tc-dragging image, .muuri-item-dragging img, .muuri-item-dragging image, .tc-dragging svg, .tc-dragging iframe {
opacity: 0.3 !important;
}
.tc-btn-invisible {
outline: none !important;
}
.fade-in {
-webkit-animation: fadein 0.4s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 0.4s; /* Firefox < 16 */
-ms-animation: fadein 0.4s; /* Internet Explorer */
-o-animation: fadein 0.4s; /* Opera < 12.1 */
animation: fadein 0.4s;
}
@keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Firefox < 16 */
@-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Internet Explorer */
@-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
.limit-image img, .limit-image image, .limit-image svg {
max-width: 100%;
position: relative;
}
<<show-hide-right-grid>>
<<show-hide-left-grid>>
<<rightgrid-width-macro>>
.tc-btn-invisible.tc-text-button {
color: <<colour muted-foreground>>;
}
.tc-btn-invisible.tc-text-button.tc-selected {
color: <<colour foreground>>;
font-weight: 500;
}
.tc-btn-invisible.tc-text-button:hover {
color: <<colour foreground>>;
}
.tc-grid-1 .tc-dragging .tc-tiddler-body {
mix-blend-mode: multiply;
}
.tc-grid-migrate-2 .tc-tiddler-frame {
border: 10px solid #ff0000;
}
.tc-tiddler-frame.tc-tiddler-more-popup {
z-index: 5;
}
.tc-toolbar-icon-topleft {
position: fixed;
top: 5px;
font-size: 1.3em;
left: 30px;
}
.tc-toolbar-icon-topleft-2 {
position: fixed;
top: 5px;
font-size: 1.1em;
left: 60px;
}
.tc-toolbar-icon-topleft-2 svg {
fill: <<colour muted-foreground>>;
vertical-align: bottom;
}
.tc-toolbar-icon-topleft svg {
fill: <<colour muted-foreground>>;
}
.tc-topleft-span:hover .tc-toolbar-icon-topleft-2 svg {
fill: <<colour muted-foreground>>;
}
.tc-topleft-span:hover .tc-toolbar-icon-topleft svg, .tc-topleft-span:hover .tc-toolbar-icon-topleft-2.tc-selected svg, .tc-toolbar-icon-topleft-2.tc-selected svg {
fill: <<colour primary>>;
}
<<show-hide-tiddler-title-tags>>
.tc-tiddler-frame {
background-color: <<colour tiddler-background>>{{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}} !important;
}
.tc-tiddler-frame.tc-open-success {
border: 1px solid #0000ff;
background: #0000ff !important;
color: #ffffff !important;
}
.tc-tiddler-frame.tc-close-success {
border: 1px solid #ee9a00;
background: #ee9a00 !important;
color: #ffffff !important;
}
.tc-tiddler-frame.tc-save-success {
border: 1px solid #00ff00;
background: #00ff00 !important;
color: #ffffff !important;
}
.tc-tiddler-frame.tc-cancel-success {
border: 1px solid #ff0000;
background: #ff0000 !important;
color: #ffffff !important;
}
.tc-tiddler-frame.tc-sidebar-muuri-grid-frame {
padding: 0px 5px 5px 5px !important;
min-height: 3vh !important;
}
.tc-sidebar-muuri-grid-frame .tc-tiddler-body {
font-size: 0.2em !important;
line-height: 3px !important;
}
.tc-muuri-sidebar-grid {
width: calc({{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}} - 100px);
}
\define config-title()
$:/config/PageControlButtons/Visibility/$(listItem)$
\end
\define leftbar-config-title()
$:/config/LeftBarButtons/Visibility/$(listItem)$
\end
<div class="tc-leftbar">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageControls]!has[draft.of]!title[$:/core/ui/Buttons/save-wiki]]" variable="listItem">
<$reveal type="nomatch" state=<<config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/LeftBar]!has[draft.of]]" variable="listItem">
<$reveal type="nomatch" state=<<leftbar-config-title>> text="hide">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>> mode="inline"/>
</$set>
</$reveal>
</$list>
{{$:/plugins/BTC/tiddly-touch/Buttons/sidebar}}
</div>
<section class="tc-story-river">
<$muuri class="tc-muuri-grid" target={{$:/plugins/BTC/tiddly-touch/config!!child-class}} target-is-tiddler="yes" fill-gaps={{$:/plugins/BTC/tiddly-touch/config!!fill-gaps}} horizontal={{$:/plugins/BTC/tiddly-touch/config!!align-horizontal}} align-right={{$:/plugins/BTC/tiddly-touch/config!!align-right}} align-bottom={{$:/plugins/BTC/tiddly-touch/config!!align-bottom}} dragging={{$:/plugins/BTC/tiddly-touch/config!!drag-enabled}}>
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/plugins/BTC/tiddly-touch/ui/ViewTemplate" editTemplate="$:/plugins/BTC/tiddly-touch/ui/EditTemplate" storyview={{$:/view}} emptyMessage={{$:/config/EmptyStoryMessage}}/>
</$muuri>
<section class="story-frontdrop">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/BelowStory]!has[draft.of]]">
<$transclude/>
</$list>
</section>
</section>
/*\
title: $:/plugins/BTC/tiddly-touch/storyviews/muuri.js
type: application/javascript
module-type: storyview
Story view that cooperates with the Muuri grid layout engine
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var easing = "cubic-bezier(0.645, 0.045, 0.355, 1)"; // From http://easings.net/#easeInOutCubic
var MuuriStoryView = function(listWidget) {
this.listWidget = listWidget;
};
MuuriStoryView.prototype.navigateTo = function(historyInfo) {
var listElementIndex = this.listWidget.findListItem(0,historyInfo.title);
if(listElementIndex === undefined) {
return;
}
var listItemWidget = this.listWidget.children[listElementIndex],
targetElement = listItemWidget.findFirstDomNode();
// Abandon if the list entry isn't a DOM element (it might be a text node)
if(!(targetElement instanceof Element)) {
return;
}
// Scroll the node into view
this.listWidget.dispatchEvent({type: "tm-scroll", target: targetElement});
};
MuuriStoryView.prototype.insert = function(widget) {
var targetElement = widget.findFirstDomNode(),
duration = $tw.utils.getAnimationDuration();
var targetElementIndex = this.listWidget.findListItem(0,widget.parseTreeNode.itemTitle);
/*
// Get the current height of the tiddler
var computedStyle = window.getComputedStyle(targetElement),
currMarginBottom = parseInt(computedStyle.marginBottom,10),
currMarginTop = parseInt(computedStyle.marginTop,10),
currHeight = targetElement.offsetHeight + currMarginTop;
// Reset the margin once the transition is over
setTimeout(function() {
$tw.utils.setStyle(targetElement,[
{transition: "none"},
{marginBottom: ""}
]);
},duration);
// Set up the initial position of the element
$tw.utils.setStyle(targetElement,[
{transition: "none"},
{marginBottom: (-currHeight) + "px"},
{opacity: "0.0"}
]);
$tw.utils.forceLayout(targetElement);
// Transition to the final position
$tw.utils.setStyle(targetElement,[
{transition: "opacity " + duration + "ms " + easing + ", " +
"margin-bottom " + duration + "ms " + easing},
{marginBottom: currMarginBottom + "px"},
{opacity: "1.0"}
]);
*/
this.addGridItem(targetElement, { instant: true, index: targetElementIndex });
};
MuuriStoryView.prototype.remove = function(widget) {
var targetElement = widget.findFirstDomNode(),
duration = $tw.utils.getAnimationDuration(),
removeElement = function() {
widget.removeChildDomNodes();
};
// Abandon if the list entry isn't a DOM element (it might be a text node)
if(!(targetElement instanceof Element) && targetElement !== null && targetElement !== undefined) {
if(targetElement._element === null || targetElement._element === undefined) {
removeElement();
}
return;
}
this.removeGridItem(targetElement, { instant: false, removeElements: true });
/*
$tw.utils.forceLayout(targetElement);
$tw.utils.setStyle(targetElement,[
{transition: $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms " + easing + ", " +
"opacity " + duration + "ms " + easing + ", " +
"margin-bottom " + duration + "ms " + easing},
{transform: "translateX(-" + currWidth + "px)"},
{marginBottom: (-currHeight) + "px"},
{opacity: "0.0"}
]);
*/
};
MuuriStoryView.prototype.grid = function(targetElement) {
var grid = targetElement.parentNode;
if (!(grid instanceof Element)) {
$tw.utils.error("MuuriStoryView couldn't find grid for " + targetElement.getAttribute('class'));
}
return grid;
};
MuuriStoryView.prototype.addGridItem = function(targetElement, options) {
var grid = this.grid(targetElement);
grid.add(targetElement, options);
};
MuuriStoryView.prototype.removeGridItem = function(targetElement, options) {
var grid = this.grid(targetElement);
grid.remove(targetElement, options);
};
exports.muuri = MuuriStoryView;
})();
\define actions()
<$action-sendmessage $message="tm-add-tag" $param={{$:/temp/NewTagName}}/>
<$action-deletetiddler $tiddler="$:/temp/NewTagName"/>
<$action-sendmessage $message="tm-add-field" $name={{$:/temp/newfieldname}} $value={{$:/temp/newfieldvalue}}/>
<$action-deletetiddler $tiddler="$:/temp/newfieldname"/>
<$action-deletetiddler $tiddler="$:/temp/newfieldvalue"/>
<$action-sendmessage $message="tm-save-tiddler"/>
\end
\define frame-classes()
tc-tiddler-frame tc-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(muuriViewClasses)$ $(muuriExactWidthClasses)$
\end
<$set name="muuriViewClasses" value=<<grid-item-class>>><$set name="muuriExactWidthClasses" filter=[{!!muuri-tiddler-width-px}addprefix[tc-muuri-width-]]><div class=<<frame-classes>>>
<$fieldmangler>
<$set name="storyTiddler" value=<<currentTiddler>>>
<$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
<$keyboard key="((save-tiddler))" actions=<<actions>>>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" variable="listItem">
<$set name="tv-config-toolbar-class" filter="[<tv-config-toolbar-class>] [<listItem>encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<<listItem>>/>
</$set>
</$list>
</$keyboard>
</$keyboard>
</$set>
</$fieldmangler>
</div></$set></$set>
//if not layed out correctly, switch to another tab and come back//
<$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}>
<div class="tc-muuri-sidebar-grid">
<$muuri class="tc-muuri-grid" target="tc-tag-list-item" target-is-tiddler="yes" fill-gaps="yes" horizontal="no" align-right="no" align-bottom="no" dragging="yes">
<$list filter="[list[$:/StoryList]]" history="$:/HistoryList" template="$:/plugins/BTC/tiddly-touch/ui/SideBar/Open/ViewTemplate" editTemplate="$:/plugins/BTC/tiddly-touch/ui/SideBar/Open/ViewTemplate" storyview="muuri"/>
</$muuri>
</div>
</$navigator>
\define frame-classes()
tc-tiddler-frame tc-tiddler-view-frame tc-sidebar-muuri-grid-frame $(muuriViewClasses)$ $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$ $(foldedState)$ $(morePopupStateClass)$
\end
\define navigate-actions()
<$action-navigate $to="""$(currentTiddler)$""" $scroll="yes"/>
\end
<$set name="storyTiddler" value=<<currentTiddler>>><$tiddler tiddler=<<currentTiddler>>><$set name="muuriViewClasses" value=<<grid-item-class>>><div class=<<frame-classes>>>
{{||$:/core/ui/ViewTemplate/body}}
</div>
</$set>
</$tiddler></$set>
\define frame-classes()
tc-tiddler-frame tc-tiddler-view-frame $(muuriViewClasses)$ $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$ $(tiddlerTagClasses)$ $(foldedState)$ $(morePopupStateClass)$ $(muuriWidthClasses)$ $(muuriHeightClasses)$ $(muuriExactWidthClasses)$ $(muuriExactHeightClasses)$
\end
\define folded-state()
$:/state/folded/$(currentTiddler)$
\end
\define more-popup-state()
$:/state/popup/more/$(currentTiddler)$
\end
<$set name="storyTiddler" value=<<currentTiddler>>><$set name="tiddlerInfoState" value=<<qualify "$:/state/popup/tiddler-info">>><$set name="morePopupState" value=<<more-popup-state>>><$tiddler tiddler=<<currentTiddler>>><$set name="foldedState" value={{{ [all[tiddlers]prefix[$:/state/folded]suffix<currentTiddler>is[tiddler]get[text]regexp[^hide$]addprefix[tc-tiddler-folded]removesuffix[hide]] }}}><$set name="morePopupStateClass" value={{{ [<morePopupState>is[tiddler]suffix<currentTiddler>addprefix[tc-tiddler-more-popup]removesuffix<morePopupState>] }}}><$set name="muuriViewClasses" value=<<grid-item-class>>><$set name="muuriWidthClasses" value={{!!muuri-width-classes}}><$set name="muuriExactWidthClasses" filter=[{!!muuri-tiddler-width-px}addprefix[tc-muuri-width-]]><$set name="muuriExactHeightClasses" filter=[{!!muuri-tiddler-height-px}addprefix[tc-muuri-height-]]><$set name="muuriHeightClasses" value={{!!muuri-height-classes}}><$tap $taps="3" $targets="tc-tiddler-frame" $threshold="1000" $posthreshold="1000" $actions="""<$action-sendmessage $message="tm-notify" $param="ouch"/>"""><div class=<<frame-classes>>><$list filter="[<currentTiddler>is[missing]]"><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></$list><$list filter="[<currentTiddler>!tag[$:/tags/minimalView]!is[missing]]"><$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></$list><$list filter="[<currentTiddler>tag[$:/tags/minimalView]]"><$list filter="[[$:/core/ui/ViewTemplate/body]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></$list>
</div></$tap></$set></$set></$set></$set></$set></$set></$set>
</$tiddler></$set></$set></$set>
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/muuri.js
type: application/javascript
module-type: widget
Packery cascading grid layout widget
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Muuri = require("$:/plugins/BTC/tiddly-touch/lib/muuri.js");
}
var MuuriWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
MuuriWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
MuuriWidget.prototype.render = function(parent,nextSibling) {
var self = this;
// Compute attributes and execute state
this.computeAttributes();
var gridClass;
if(this.getAttribute("class") === undefined) {
return false;
} else {
gridClass = this.getAttribute("class");
}
var targetElements = this.getAttribute("target");
var muuriListTiddler = this.getAttribute("list");
var muuriListField = this.getAttribute("field","list");
var targetIsTiddler = this.getAttribute("target-is-tiddler") === "yes" ;
if(targetIsTiddler !== true && muuriListTiddler === undefined) {
return false;
}
this.execute();
// Insert DOM node
var domNode = this.document.createElement("section");
domNode.setAttribute("class", gridClass);
parent.insertBefore(domNode,nextSibling);
this.domNodes.push(domNode);
this.renderChildren(domNode,null);
var muuriFillGaps = this.getAttribute("fill-gaps") === "yes" ;
var muuriHorizontal = this.getAttribute("horizontal") === "yes" ;
var muuriAlignRight = this.getAttribute("align-right") === "yes" ;
var muuriAlignBottom = this.getAttribute("align-bottom") === "yes" ;
var muuriEnableDrag = this.getAttribute("dragging") === "yes" ;
var muuriAnimationDuration = parseInt($tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("animation-duration"));
var muuriShowDuration = parseInt($tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("show-duration"));
var muuriHideDuration = parseInt($tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("hide-duration"));
var muuriDragSortAction = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("drag-sort-action");
var muuriDragSortThreshold = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("drag-sort-threshold");
var muuriDragSort = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("drag-sort") === "yes";
var muuriParentWidget = this.children;
var keyboardControls = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("keyboard-controls","no") === "yes";
//var animationDuration = $tw.utils.getAnimationDuration();
var muuri = new Muuri(domNode, {
items: '.' + targetElements,
muuriListTiddler: muuriListTiddler,
muuriListField: muuriListField,
muuriParentWidget: muuriParentWidget,
targetsAreTiddlers: targetIsTiddler,
keyboardControls: keyboardControls,
showDuration: muuriShowDuration,
hideDuration: muuriHideDuration,
layoutDuration: muuriAnimationDuration,
layoutEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
showEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
hideEasing: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
layoutOnResize: muuriAnimationDuration,
rounding: false,
layout: {
fillGaps: muuriFillGaps,
horizontal: muuriHorizontal,
alignRight: muuriAlignRight,
alignBottom: muuriAlignBottom,
rounding: false
},
dragEnabled: muuriEnableDrag,
dragSortPredicate: {
threshold: muuriDragSortThreshold,
action: muuriDragSortAction
},
containerClass: gridClass,
itemClass: targetElements,
gridMigratingClass: 'tc-grid-migrate',
itemVisibleClass: 'muuri-shown',
itemHiddenClass: 'muuri-hidden',
itemPositioningClass: 'muuri-positioning',
itemDraggingClass: 'tc-dragging',
itemReleasingClass: 'tc-dragover'
});
// add() and remove() should be invoked on the grid container by the
// storyview when tiddlers get inserted or removed
domNode.add = function(elements, options) {
muuri.add(elements, options);
muuri.hide(elements, {onFinish: function () {
muuri.refreshItems();
muuri._refreshDimensions();
muuri.layout();
muuri.show(elements);
muuri._settings.muuriParentWidget = self.children;
//self.filterItems(muuri);
}});
};
domNode.remove = function(elements, options) {
if(elements !== undefined) {
muuri.remove(elements, options);
}
muuri._settings.muuriParentWidget = self.children;
//self.filterItems(muuri);
};
// Register resize event handlers for all children
self.registerMissingResizeListeners(domNode, muuri);
muuri._settings.muuriParentWidget = self.children;
//self.filterItems(muuri);
// Register a handler to fire when child DOM elements are added or removed.
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if (!mutation.addedNodes) return;
if (mutation.type == 'childList') {
//console.debug("MuuriWidget observed a change in childList");
// Register resize event handlers for new children
self.registerMissingResizeListeners(domNode, muuri);
muuri._settings.muuriParentWidget = self.children;
}
});
});
observer.observe(domNode, { childList: true, subtree: true, attributes: true, characterData: false});
if(targetIsTiddler) {
var searchField = document.querySelector('.tc-search');
if(searchField !== undefined && searchField !== null) {
var searchFilter = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("grid-filter-search");
if(searchFilter !== null && searchFilter !== undefined) {
//searchField.addEventListener('input', function () {
self.filterItems(muuri);
muuri.refreshItems();
muuri._refreshDimensions();
muuri.layout(true);
}
}
}
window.addEventListener('keydown', function(e) {
//console.log(e.keyCode);
if(e.keyCode == 32 && e.target == document.body) {
e.preventDefault();
if(muuriHorizontal !== true) {
var pageOffSetY = parseInt(window.pageYOffset);
var pageOffSetX = parseInt(window.pageXOffset);
//console.log("pageOffSet: " + pageOffSet);
var viewPortHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
//console.log("vieP: " + viewPortHeight);
var scrollToPos = pageOffSetY + viewPortHeight - 50;
//console.log("scroll: " + scrollToPos);
window.scrollTo(pageOffSetX, scrollToPos);
}
}
});
};
/*
Ensure that resize listeners are registered for all child widgets
*/
MuuriWidget.prototype.registerMissingResizeListeners = function(domNode, grid) {
var items = grid.getItems();
var domNodeChildren = domNode.children;
//grid.synchronize();
for (var i = 0; i < domNode.children.length; i++) {
var item = domNode.children[i];
//console.debug(item);
if (typeof item.resizeHandler === 'undefined') {
item.resizeHandler = (function(item) {
return function() {
//console.debug("MuuriWidget got a resize event from " + item.getAttribute('class'));
grid.hide(item, {
instant: true,
onFinish: function() {
/*grid.refreshItems();
grid._refreshDimensions();
grid.layout();*/
grid.show(item, {instant: true});
}
});
};
})(item);
//console.debug("MuuriWidget registering for resize events from " + item.getAttribute('class'));
$tw.utils.addResizeListener(item, item.resizeHandler);
grid.add(item, { instant: true, index: i });
grid.hide(item, {
instant: true,
onFinish: function() {
/*grid.refreshItems();
grid._refreshDimensions();
grid.layout();*/
grid.show(item, {instant: true, index: i });
items = grid.getItems();
if (domNodeChildren.length < items.length) {
if(items[i+1]._element !== null && items[i+1]._element !== undefined) {
grid.remove(items[i+1], { instant: true, removeElements: true });
} else if (items[i+1]._element === null || items[i+1]._element === undefined) {
grid.remove(items[i+1], { instant: true, removeElements: false });
}
grid.refreshItems();
grid._refreshDimensions();
grid.refreshSortData();
grid.layout();
}
}
});
}
}
};
MuuriWidget.prototype.filterItems = function(grid) {
var items = grid.getItems();
var storyList = $tw.wiki.getTiddlerList("$:/StoryList");
var searchFilter = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("grid-filter-search");
var tiddlerMatches = $tw.wiki.filterTiddlers("[list[$:/StoryList]search[" + searchFilter + "]]");
if(searchFilter !== null && searchFilter !== undefined) {
for (var i=0; i<items.length; i++) {
//console.log("tiddlerMatches: " + tiddlerMatches[i]);
var item = items[i];
grid.filter(function (item) {
var itemIndex = items.indexOf(item);
var tiddlerTitle = storyList[itemIndex];
if(tiddlerTitle === undefined || tiddlerTitle === null) {
return false;
} else {
//var tiddlerText = $tw.wiki.getTiddlerText(tiddlerTitle).toLowerCase();
//var searchString = tiddlerTitle.toLowerCase();
var isSearchMatch = false;
for (var t=0; t<tiddlerMatches.length; t++) {
if(tiddlerMatches[t] === tiddlerTitle) {
isSearchMatch = true;
}
}
//console.log("isSearchMatch: " + isSearchMatch);
return isSearchMatch;
}
});
}
}
}
/*
Compute the internal state of the widget
*/
MuuriWidget.prototype.execute = function() {
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
MuuriWidget.prototype.refresh = function(changedTiddlers) {
return this.refreshChildren(changedTiddlers);
};
exports.muuri = MuuriWidget;
})(this);
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/pan.js
type: application/javascript
module-type: widget
enable actions triggered on panning
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Hammer = require("$:/plugins/BTC/tiddly-touch/lib/hammer.js");
}
var PanWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
PanWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
PanWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
this.panState = self.trim(self.getAttribute('$state'));
if(this.panState !== "on") {
return false;
}
this.elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(this.elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = self.elementClasses.split(' ');
} else {
elementClass = self.elementClasses;
}
this.direction = self.trim(self.getAttribute('$direction',''));
//var panDirection = 'pan' + direction;
this.stateTiddler = $tw.utils.trim(self.getAttribute('$statetiddler','$:/state/pan'));
this.pointerCount = parseInt(self.getAttribute('$pointers','1'));
this.panThreshold = parseInt(self.getAttribute('$threshold','0'));
// var panUserValuesString = self.trim(self.getAttribute('$values'));
this.userToFixed = parseInt(self.getAttribute('$decimals','2'));
this.panSteps = Math.floor(100 / parseInt(self.getAttribute('$steps','24')));
// console.log(panSteps);
// var panUserValues;
/*if(panUserValuesString !== undefined) {
panUserValues = panUserValuesString.split(' ');
}*/
//console.log(panUserValues);
var allowedDirection = Hammer.DIRECTION_ALL;
if(this.direction === 'vertical') {
allowedDirection = Hammer.DIRECTION_VERTICAL;
} else if(this.direction === 'horizontal') {
allowedDirection = Hammer.DIRECTION_HORIZONTAL;
}
if(elementClass === undefined || elementClass === null || elementClass === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
var panStartValues = [];
var panValues = [];
for(var i=0;i < domNodeList.length;i++) {
elementIndex = i;
var currentElement = domNodeList[i];
var hammer = new Hammer.Manager(domNodeList[i]);
hammer.add(new Hammer.Pan({
event: 'pan',
pointers: self.pointerCount,
threshold: self.panThreshold,
direction: allowedDirection
}));
hammer.get('pan');
var startX = null;
var startY = null;
var elementTop = null;
var elementLeft = null;
var elementBottom = null;
var elementRight = null;
var elementWidth = null;
var elementHeight = null;
var startActions = null;
var singleElement = null;
var pointerType = null;
var domNodeRect = null;
var fieldStartNames = [ 'starting-x', 'starting-y', 'element-top', 'element-left', 'element-bottom', 'element-right', 'element-width', 'element-height', 'pointer-type' ];
var fieldNames = [ 'delta-x', 'delta-y' ];
hammer.on('touchmove panstart panmove', function(e) {
if (domNodeRect === null) {
domNodeRect = currentElement.getBoundingClientRect();
}
if (startActions === null && self.panStartActions) {
if(self.panStartActions) {
self.invokeActionString(self.panStartActions,self,e);
}
startActions = 'done';
}
if (panStartValues.length === 0) {
panStartValues[0] = e.center.x.toFixed(self.userToFixed);
panStartValues[1] = e.center.y.toFixed(self.userToFixed);
panStartValues[2] = domNodeRect.top.toFixed(self.userToFixed);
panStartValues[3] = domNodeRect.left.toFixed(self.userToFixed);
panStartValues[4] = domNodeRect.bottom.toFixed(self.userToFixed);
panStartValues[5] = domNodeRect.right.toFixed(self.userToFixed);
panStartValues[6] = domNodeRect.width.toFixed(self.userToFixed);
panStartValues[7] = domNodeRect.height.toFixed(self.userToFixed);
panStartValues[8] = e.pointerType;
for(var t = 0; t<panStartValues.length; t++){
if(domNodeList.length === 1) {
singleElement = true;
self.setField(self.stateTiddler,fieldStartNames[t],panStartValues[t]);
} else {
var fieldName = fieldStartNames[t] + "-" + elementIndex;
self.setField(self.stateTiddler,fieldName,panStartValues[t]);
}
}
if(singleElement === true) {
self.setField(self.stateTiddler,'delta-x',e.deltaX.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'delta-y',e.deltaY.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-x',e.center.x.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-y',e.center.y.toFixed(self.userToFixed));
} else {
self.setField(self.stateTiddler,'delta-x' + elementIndex,e.deltaX.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'delta-y' + elementIndex,e.deltaY.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-x' + elementIndex,e.center.x.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-y' + elementIndex,e.center.y.toFixed(self.userToFixed));
}
}
var panWidgetTimeoutFunction = function panWidgetTimeoutFunction() {
if(self.panRepeatActions) { self.invokeActionString(self.panRepeatActions,self,e);
}
if(singleElement === true) {
self.setField(self.stateTiddler,'delta-x',e.deltaX.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'delta-y',e.deltaY.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-x',e.center.x.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-y',e.center.y.toFixed(self.userToFixed));
} else {
self.setField(self.stateTiddler,'delta-x' + elementIndex,e.deltaX.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'delta-y' + elementIndex,e.deltaY.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-x' + elementIndex,e.center.x.toFixed(self.userToFixed));
self.setField(self.stateTiddler,'center-y' + elementIndex,e.center.y.toFixed(self.userToFixed));
}
};
// Unregister the old timer event
if (self.timeoutID) { window.clearTimeout (self.timeoutID); }
self.timeoutID = window.setTimeout(panWidgetTimeoutFunction, self.panSteps);
})
.on('panend pancancel touchend mouseup', function(e) {
e.stopPropagation && e.stopPropagation();
//var domNodeRectEnd = currentElement.getBoundingClientRect();
if (self.timeoutID) { window.clearTimeout (self.timeoutID); }
startActions = null;
if(self.panEndActions) {
self.invokeActionString(self.panEndActions,self,e);
return true;
}
});
}
};
/*
Set the computed values in the state-tiddler fields
*/
PanWidget.prototype.setField = function(tiddler,field,value) {
$tw.wiki.setText(tiddler,field,undefined,value,{ suppressTimestamp: true });
};
PanWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
PanWidget.prototype.execute = function() {
this.panStartActions = this.getAttribute("$startactions","");
this.panRepeatActions = this.getAttribute("$repeatactions","");
this.panEndActions = this.getAttribute("$endactions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
PanWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.pan = PanWidget;
})();
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/rotate.js
type: application/javascript
module-type: widget
enable rotations on elements
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Hammer = require("$:/plugins/BTC/tiddly-touch/lib/hammer.js");
}
var RotateWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
RotateWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
RotateWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
this.rotation = null;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
var rotationSteps = Math.floor(100 / parseInt(self.getAttribute('$steps','24')));
var userToFixed = parseInt(self.getAttribute('$decimals','2'));
var rotateState = self.getAttribute('$state');
if(rotateState !== "on") {
return false;
}
var elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = elementClasses.split(' ');
} else {
elementClass = elementClasses;
}
var rotateThreshold = parseInt(self.getAttribute('$threshold','0'));
var stateTiddler = $tw.utils.trim(self.getAttribute('$statetiddler','$:/state/rotate'));
if(elementClass === undefined || elementClass === null || elementClass === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
for(var i=0;i < domNodeList.length;i++) {
elementIndex = i;
var hammer = new Hammer.Manager(domNodeList[i]);
hammer.add(new Hammer.Rotate({
event: 'rotate',
pointers: 2,
threshold: rotateThreshold
}));
hammer.get('rotate').set({ enable: true });
var singleElement = null;
var firstSet = null;
var startActions = null;
hammer.on('rotate rotatestart rotatemove', function(e) {
if(startActions === null) {
self.invokeActionString(self.rotateStartActions,self,e);
startActions = 'done';
}
if(singleElement === null && domNodeList.length === 1) {
singleElement = true;
}
if(firstSet === null) {
var rotationValue = e.rotation.toFixed(userToFixed);
if(singleElement === true) {
self.setField(stateTiddler,'rotation',rotationValue);
} else {
var fieldName = 'rotation' + "-" + elementIndex;
self.setField(stateTiddler,fieldName,rotationValue);
}
firstSet = 'done';
}
var rotateWidgetTimeoutFunction = function rotateWidgetTimeoutFunction() {
var rotationValue = e.rotation.toFixed(userToFixed);
if(singleElement === true) {
self.setField(stateTiddler,'rotation',rotationValue);
} else {
var fieldName = 'rotation' + "-" + elementIndex;
self.setField(stateTiddler,fieldName,rotationValue);
}
};
if (self.timeoutID) { window.clearTimeout (self.timeoutID); }
self.timeoutID = window.setTimeout(rotateWidgetTimeoutFunction, rotationSteps);
})
.on('rotateend rotatecancel touchend', function(e) {
if (self.timeoutID) { window.clearTimeout (self.timeoutID); }
e.stopPropagation && e.stopPropagation();
if(self.rotateEndActions) {
self.invokeActionString(self.rotateEndActions,self,e);
}
firstSet = null;
startActions = null;
self.rotation = 'done';
return true; // Action was invoked
});
}
};
/*
Set the computed values in the state-tiddler fields
*/
RotateWidget.prototype.setField = function(tiddler,field,value) {
$tw.wiki.setText(tiddler,field,undefined,value,{ suppressTimestamp: true });
};
RotateWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');;
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
RotateWidget.prototype.execute = function() {
this.rotateStartActions = this.getAttribute("$startactions","");
this.rotateEndActions = this.getAttribute("$endactions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
RotateWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.rotate = RotateWidget;
})();
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/swipe.js
type: application/javascript
module-type: widget
enable actions triggered on swipe
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Hammer = require("$:/plugins/BTC/tiddly-touch/lib/hammer.js");
}
var SwipeWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
SwipeWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
SwipeWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
var swipeState = self.getAttribute('$state');
if(swipeState !== "on") {
return false;
}
var elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = elementClasses.split(' ');
} else {
elementClass = elementClasses;
}
var velocityValue = parseFloat(self.getAttribute('$velocity'),'1.0');
var direction = self.getAttribute('$direction','');
var pointerCount = parseInt(self.getAttribute('$pointers','1'));
var swipeThreshold = parseInt(self.getAttribute('$threshold','30'));
var swipeDirection = 'swipe' + direction;
var allowedDirection = Hammer.DIRECTION_HORIZONTAL;
if(swipeDirection === 'swipeup' || swipeDirection === 'swipedown') {
allowedDirection = Hammer.DIRECTION_VERTICAL;
}
if(elementClass === undefined || elementClass === null || elementClass === "" || velocityValue === undefined || velocityValue === null || velocityValue === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
for(var i=0;i < domNodeList.length;i++) {
var currentElement = domNodeList[i];
if(currentElement === undefined) {
return false;
}
elementIndex = i;
var hammer = new Hammer.Manager(domNodeList[i]);
hammer.add(new Hammer.Swipe({
event: 'swipe',
pointers: pointerCount,
threshold: swipeThreshold,
velocity: velocityValue,
direction: allowedDirection
}));
//hammer.set({ touchAction: 'auto' });
hammer.get('swipe');
hammer.on(swipeDirection, function(e) {
var props = Object.getOwnPropertyNames(e);
console.log(e.center.x + " " + e.center.y + " " + e.deltaX + " " + e.deltaY + " " + e.pointerType);
if(self.swipeActions) {
self.invokeActionString(self.swipeActions,self,e);
}
return true; // Action was invoked
});
}
};
SwipeWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');;
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
SwipeWidget.prototype.execute = function() {
this.swipeActions = this.getAttribute("$actions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
SwipeWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.swipe = SwipeWidget;
})(this);
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/tap.js
type: application/javascript
module-type: widget
enable actions triggered on taps&clicks
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Hammer = require("$:/plugins/BTC/tiddly-touch/lib/hammer.js");
}
var TapWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
TapWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
TapWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
var tapState = self.getAttribute('$state');
if(tapState !== "on") {
return false;
}
var elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = elementClasses.split(' ');
} else {
elementClass = elementClasses;
}
var taps = parseInt(self.getAttribute('$taps','1'));
var pointerCount = parseInt(self.getAttribute('$pointers','1'));
var tapThreshold = parseInt(self.getAttribute('$threshold','2'));
var tapPosThreshold = parseInt(self.getAttribute('$posthreshold','10'));
var tapTime = parseInt(self.getAttribute('$time','250'));
var tapInterval = parseInt(self.getAttribute('$interval','300'));
if(elementClass === undefined || elementClass === null || elementClass === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
for(var i=0;i < domNodeList.length;i++) {
elementIndex = i;
var hammer = new Hammer.Manager(domNodeList[i]);
hammer.add(new Hammer.Tap({
event: 'usertap',
pointers: pointerCount,
taps: taps,
interval: tapInterval,
time: tapTime,
threshold: tapThreshold,
posThreshold: tapPosThreshold
}));
hammer.get('usertap');
hammer.on('usertap', function(e) {
if(self.tapActions) {
self.invokeActionString(self.tapActions,self,e);
}
return true; // Action was invoked
});
}
};
TapWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');;
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
TapWidget.prototype.execute = function() {
this.tapActions = this.getAttribute("$actions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
TapWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.tap = TapWidget;
})(this);
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/wheel.js
type: application/javascript
module-type: widget
enable actions triggered on wheeling
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var WheelWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
WheelWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
WheelWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
var wheelState = self.getAttribute('$state');
if(wheelState !== "on") {
return false;
}
self.actionTiddler = self.getAttribute("$tiddler",self.getVariable("currentTiddler"));
self.actionField = self.getAttribute("$field","wheel-state");
var elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = elementClasses.split(' ');
} else {
elementClass = elementClasses;
}
var direction = self.getAttribute('$direction','');
if(elementClass === undefined || elementClass === null || elementClass === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
var isWheeling;
var currentState;
var scrollPlusMinus;
var tiddlerPseudoHeight;
for(var i=0;i < domNodeList.length;i++) {
var currentElement = domNodeList[i];
elementIndex = i;
currentElement.addEventListener('wheel', function(e) {
if(e.shiftKey || e.altKey) {
e.preventDefault && e.preventDefault();
window.clearTimeout(isWheeling);
//self.onWheelZoom(e);
isWheeling = setTimeout(function() {
var tiddlerTitle;
//get the tiddler title
var setTextOptions = { suppressTimestamp: true };
if(currentState !== null) {
$tw.wiki.setText(self.actionTiddler, self.actionField, undefined, Math.ceil(currentState), setTextOptions);
}
if(scrollPlusMinus !== null) {
var rangeValue = $tw.wiki.getTiddler("$:/plugins/BTC/tiddly-touch/config").getFieldString("wheel-reveal-range");
if(scrollPlusMinus === "plus") {
currentState = parseInt(tiddlerPseudoHeight) + parseInt(rangeValue);
if (currentState < 0) {
currentState = 0;
}
}
if(scrollPlusMinus === "minus") {
currentState = parseInt(tiddlerPseudoHeight) - parseInt(rangeValue);
if (currentState < 0) {
currentState = 0;
}
}
$tw.wiki.setText(self.actionTiddler, self.actionField, undefined, Math.ceil(currentState), setTextOptions);
var pseudoHeightNaN = isNaN(tiddlerPseudoHeight);
if(tiddlerPseudoHeight !== null && pseudoHeightNaN !== true) {
$tw.wiki.setText("$:/plugins/BTC/tiddly-touch/ui/notification", undefined, undefined, '' + Math.ceil(currentState), setTextOptions);
$tw.notifier.display("$:/plugins/BTC/tiddly-touch/ui/notification");
} else if(tiddlerPseudoHeight !== null && pseudoHeightNaN === true) {
$tw.wiki.setText("$:/plugins/BTC/tiddly-touch/ui/notification", undefined, undefined, '' + Math.ceil(currentState), setTextOptions);
$tw.notifier.display("$:/plugins/BTC/tiddly-touch/ui/notification");
}
}
}, 66);
}
},false);
}
};
WheelWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');;
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
WheelWidget.prototype.execute = function() {
this.wheelActions = this.getAttribute("$actions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
WheelWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.wheel = WheelWidget;
})();
{
"tiddlers": {
"$:/plugins/ebalster/condition/license": {
"text": "!!The MIT License (MIT)\n\nCopyright (c) 2017 Evan Balster\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/condition/license",
"tags": "",
"modified": "20171230044506791",
"created": "20171230044445712",
"caption": "license"
},
"$:/plugins/ebalster/condition/readme": {
"text": "The ''Condition'' plugin for TiddlyWiki, version {{$:/plugins/ebalster/condition!!version}}, by Evan Balster.\n\nThis plugin defines widgets that will either show or hide their contents depending on a condition.\n\nUnlike the closely-related reveal widget, condition widgets do //not// retain their content, and do not support animation or popups. Conditions may be based on variables, macros or filtered attributes. It can also be used with the [[Formula Plugin]].\n\n\n!!Truthiness\n\nTruthiness is a simple rule for whether a value triggers an \"if\" widget or not. Values are \"truthy\" if they do not match any of the \"falsy\" values below:\n\n* The number `0`, including any decimal point.\n* `false`\n* `undefined`\n* `null`\n* Blank (no text)\n\nThis matching is case-insensitive, and any whitespace before or after the value will be ignored.\n\n\n!!If Widget\n\nThe `$if` widget will show its content based on whether a value is \"truthy\", or matches another value.\n\n|Attribute|Meaning|h\n|value|''Required.'' Content is shown if `value` is truthy.|\n|match|Optional. If present, `value` and `match` must equal //exactly// for content to be shown. (Truthiness doesn't matter.)|\n|not|Inverts the condition, so the value will be shown if it would be hidden and vice versa.|\n\nFor example,\n\n```\n<$if not value={{$:/StoryList}}>\nNo tiddlers are open right now!\n</$if>\n```\n\n\n!!Else Widget\n\nThe `$else` widget has no attributes. It must be placed after one of the conditional widgets listed below, and will only show its contents if the preceding widget is //not// showing its content.\n\n|After...|Show contents when...|h\n|`$if`<br/>`$else-if`|None of the previous if-conditions was true.|\n|`$list`|The list is empty. `$else` can be used instead of emptyMessage.|\n|`$reveal`|The contents of the reveal widget are hidden.|\n|`$else`|An else after an else will //never// be shown.|\n\nFor example:\n\n```\n<$if value={{{[tag[Note]]}}}>\n!!My notes:\n <$list filter=\"[tag[Note]]\">\n - {{!!title}}\n </$list>\n</$if>\n<$else>\n!!I don't have any notes...\n</$else>\n```\n\nNote that the else widget can't have any blank lines between it and the preceding widget.\n\n\n!!Else-If Widget\n\nThe `$else-if` widget is a combination of the `$else` and `$if` widgets, and has the same attributes as the `$if` widget. Its content will only be displayed if the previous widget is //not// showing its content //and// the `$if`-condition is true.\n\n`$else-if` widgets can be used to perform a \"chain\" of tests, showing some text based on the first condition that passes (or fails). For example:\n\n```\nSomething approaches...\n\n<$if value={{!!animal}} match=cat> Meow! </$if>\n<$else-if value={{!!animal}} match=dog> Bark! </$else-if>\n<$else-if value={{!!animal}} match=bird> Tweet! </$else-if>\n<$else> This isn't like any animal you've seen before. </$else>\n```\n\n\n!!Help & Support\n\nThis plugin is a work in progress; seek help with it on the TiddlyWiki Google Group: https://groups.google.com/forum/#!forum/tiddlywiki\n\nOr E-mail me directly: [[evan@imitone.com|mailto://evan@imitone.com]]",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/condition/readme",
"tags": "",
"modified": "20171230052355854",
"created": "20171230044517252",
"caption": "readme"
},
"$:/plugins/ebalster/condition/widgets/condition.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/condition/widgets/condition.js\ntype: application/javascript\nmodule-type: widget\n\nBase class for condition widgets.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar ConditionWidget = function(parseTreeNode,options) {\n\tif(arguments.length > 0) {\n\t\tthis.initialise(parseTreeNode,options);\n\t}\n};\n\n/*\nInherit from the base widget class\n*/\nConditionWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nConditionWidget.prototype.render = function(parent,nextSibling) {\n this.parentDomNode = parent;\n this.computeAttributes();\n this.execute();\n this.rerender(parent,nextSibling);\n};\n\nConditionWidget.prototype.rerender = function(parent,nextSibling) {\n\tthis.removeChildDomNodes();\n\tif (this.conditionError) {\n\t\t// Show an error.\n\t\tvar parseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\n\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\n\t\t}, children: [\n\t\t\t{type: \"text\", text: this.conditionError}\n\t\t]}];\n\t\tthis.makeChildWidgets(parseTreeNodes);\n\t}\n\telse if (this.isOpen) {\n\t\t// Construct and render the child widgets.\n\t\tthis.makeChildWidgets(this.parseTreeNode.children);\n\t}\n\telse {\n\t\t// Destroy the child widgets.\n\t\tthis.children = [];\n\t}\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget (default behavior)\n*/\nConditionWidget.prototype.execute = function() {\n\tthis.executeIf(\"$condition\");\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nConditionWidget.prototype.refresh = function(changedTiddlers) {\n\tvar currentlyOpen = this.isOpen;\n\tvar changedAttributes = this.computeAttributes();\n\tthis.execute();\n\tif(this.isOpen !== currentlyOpen) {\n\t\tvar nextSibling = this.findNextSiblingDomNode();\n\t\tthis.rerender(this.parentDomNode,nextSibling);\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\n/*\nUtility: Is a value \"truthy\"?\n*/\nConditionWidget.prototype.valueIsTruthy = function(value) {\n\t// It's truthy if it's not falsy, ie, undefined, false, blank or zero.\n\treturn !(/^\\s*(undefined|false|null|0+|0*\\.0+|0+\\.0*|)\\s*$/i.test(value));\n};\n\n/*\nUtility: Find a preceding non-text widget for an \"else\" widget.\n*/\nConditionWidget.prototype.findPrecedingConditionWidget = function() {\n\tvar siblings = (this.parentWidget ? this.parentWidget.children : null);\n\tvar sibling;\n\tif (siblings) {\n\t\tfor (var i = siblings.indexOf(this)-1; i >= 0; --i) {\n\t\t\tsibling = siblings[i];\n\t\t\tif (sibling.parseTreeNode.type == \"text\") continue;\n\t\t\tif (sibling.isOpen != null || sibling.list != null) return sibling;\n\t\t\treturn null;\n\t\t}\n\t}\n\treturn null;\n};\n\n/*\nUtility: Test if another widget triggers an \"else\"; ie, false conditions, closed reveals, empty lists.\n*/\nConditionWidget.prototype.widgetTriggersElse = function(widget) {\n\t// Condition widgets\n\tif (widget.triggerElse != null) return widget.triggerElse;\n\t// Reveal widget\n\tif (widget.isOpen != null) return !widget.isOpen;\n\t// List widget\n\tif (widget.list != null) return (widget.list instanceof Array) && widget.list.length == 0;\n};\n\n/*\nUtility: Execute as an \"else\" condition, computing isOpen and conditionError accordingly.\n*/\nConditionWidget.prototype.executeElse = function(widgetName) {\n\tthis.isOpen = false;\n\tthis.conditionError = null;\n\tthis.triggerElse = false;\n\tvar predicate = this.findPrecedingConditionWidget();\n\tif (!predicate) {\n\t\tthis.conditionError = (widgetName||\"$else\") + \" widget must follow $if, $else-if, $reveal or $list.\";\n\t\treturn;\n\t}\n\tthis.isOpen = this.widgetTriggersElse(predicate);\n};\n\n/*\nUtility: Execute as an \"if\" condition, computing isOpen and conditionError accordingly.\n*/\nConditionWidget.prototype.executeIf = function(widgetName) {\n\tthis.isOpen = false;\n\tthis.conditionError = null;\n\tthis.triggerElse = false;\n // Re-check our \"if\" condition.\n\tvar value = this.getAttribute(\"value\");\n\tvar match = this.getAttribute(\"match\");\n\tif (value == null) {\n\t\tthis.conditionError = (widgetName||\"$condition\") + \" widget requires a 'value' attribute.\";\n\t\treturn;\n\t}\n\telse if (match == null) {\n\t\t// Open if the value is truthy.\n\t\tthis.isOpen = this.valueIsTruthy(value);\n\t}\n\telse {\n\t\tthis.isOpen = (value == match);\n\t}\n\tif (this.getAttribute(\"not\")) {\n\t\tthis.isOpen = !this.isOpen;\n\t}\n\tthis.triggerElse = !this.isOpen;\n};\n\nexports.condition = ConditionWidget;\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/condition/widgets/condition.js",
"tags": "",
"module-type": "widget",
"modified": "20171230024403999",
"description": "As the $vars widget, but each attribute is interpreted as a formula.",
"created": "20171230024342810"
},
"$:/plugins/ebalster/condition/widgets/elif.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/condition/widgets/if.js\ntype: application/javascript\nmodule-type: widget\n\nIf-condition widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ConditionWidget = require(\"$:/plugins/ebalster/condition/widgets/condition.js\").condition;\n\nvar ElifWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nElifWidget.prototype = new ConditionWidget();\n\n/*\nCompute the internal state of the widget\n*/\nElifWidget.prototype.execute = function() {\n\tthis.executeElse(\"$else-if\");\n\tif (this.isOpen) this.executeIf(\"$if\");\n};\n\nexports[\"else-if\"] = ElifWidget;\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/condition/widgets/elif.js",
"tags": "",
"module-type": "widget",
"modified": "20171230040911552",
"description": "As the $vars widget, but each attribute is interpreted as a formula.",
"created": "20171230040903429"
},
"$:/plugins/ebalster/condition/widgets/else.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/condition/widgets/if.js\ntype: application/javascript\nmodule-type: widget\n\nIf-condition widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ConditionWidget = require(\"$:/plugins/ebalster/condition/widgets/condition.js\").condition;\n\nvar ElseWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nElseWidget.prototype = new ConditionWidget();\n\n/*\nCompute the internal state of the widget\n*/\nElseWidget.prototype.execute = function() {\n\t// Execute as an else condition.\n\tthis.executeElse(\"$else\");\n};\n\nexports.else = ElseWidget;\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/condition/widgets/else.js",
"tags": "",
"module-type": "widget",
"modified": "20171230025331858",
"description": "As the $vars widget, but each attribute is interpreted as a formula.",
"created": "20171230025320439"
},
"$:/plugins/ebalster/condition/widgets/if.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/condition/widgets/if.js\ntype: application/javascript\nmodule-type: widget\n\nIf-condition widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar ConditionWidget = require(\"$:/plugins/ebalster/condition/widgets/condition.js\").condition;\n\nvar IfWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nIfWidget.prototype = new ConditionWidget();\n\n/*\nCompute the internal state of the widget\n*/\nIfWidget.prototype.execute = function() {\n\tthis.executeIf(\"$if\");\n};\n\nexports.if = IfWidget;\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/condition/widgets/if.js",
"tags": "",
"module-type": "widget",
"modified": "20171230004310622",
"description": "As the $vars widget, but each attribute is interpreted as a formula.",
"created": "20171230002741585"
},
"$:/plugins/ebalster/condition/changelog": {
"created": "20171230164920491",
"text": "!!Version 0.1.1 — December 30, 2017\n\n* Fix an error when refreshing the condition widget.\n* Fix \"match\" attribute not working as expected.\n\n\n!!Version 0.1.0 — December 29, 2017\n\n* Initial implementation.\n* Includes $if, $else, $else-if\n* Common code in condition.js",
"title": "$:/plugins/ebalster/condition/changelog",
"tags": "",
"modified": "20171230165117169"
},
"$:/plugins/ebalster/condition/repack": {
"created": "20171230044112191",
"text": "Repacking command (use this in the browser console to repack the plugin)\n\n<pre><code>$tw.utils.repackPlugin(\"$:/plugins/ebalster/condition\", (= \"[\" & textjoin(\",\",\n TRUE,\n [prefix[$:/plugins/ebalster/condition/]addprefix[\"]addsuffix[\"]]) & \"]\" =));\n</code></pre>\n\nVersion: <$edit-text tiddler=\"$:/plugins/ebalster/condition\" field=\"version\" />",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/condition/repack",
"tags": "",
"modified": "20171230165309317"
}
}
}
{
"tiddlers": {
"$:/plugins/ebalster/formula/coerce.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/formula/coerce.js\ntype: application/javascript\nmodule-type: macro\n\nType coercion logic for formulas.\nSupported types for coercion:\n\n* text\n* number\n* boolean\n* array\n* date\n\nAdditional types that may be coerced:\n\n* undefined\n* regular expression\n\n\\*/\n(function(){\n\n\"use strict\";\n\n\n// Value-to-text coercion.\nvar _ToText = {\n\t\"undefined\" : function(v,ctx) {return \"undefined\";},\n\t\"string\" : function(v,ctx) {return v;},\n\t\"number\" : function(v,ctx) {return ctx.formats.number(v);},\n\t\"symbol\" : function(v,ctx) {return String(v);},\n\t\"function\" : function(v,ctx) {return \"function\" + (v.formulaSrc || \" [built-in]\");},\n\t\"boolean\" : function(v,ctx) {return (v ? \"TRUE\" : \"FALSE\");},\n\t\"object\" : function(v,ctx) {\n\t\tif (v instanceof Date) return ctx.formats.date(v);\n\t\tif (v instanceof Array) return ctx.formats.array(v,ctx);\n\t\tif (v instanceof RegExp) return String(v);\n\t\tif (v instanceof Error) throw v;\n\t\treturn JSON.stringify(v); // Last resort\n\t},\n};\n\n// Value-to-number coercion.\nvar _ToNum = {\n\t\"undefined\" : function(v,ctx) {throw \"Cannot convert undefined value to number!\";},\n\t\"string\" : function(v,ctx) {\n\t\tvar n = Number(v);\n\t\tif (isNaN(n)) throw \"Cannot convert \\\"\"+v+\"\\\" to number!\";\n\t\treturn n;\n\t},\n\t\"number\" : function(v,ctx) {return v;},\n\t\"symbol\" : function(v,ctx) {throw \"Cannot convert symbol to number!\";},\n\t\"function\" : function(v,ctx) {throw \"Cannot convert function to number!\";},\n\t\"boolean\" : function(v,ctx) {return (v ? 1 : 0);},\n\t\"object\" : function(v,ctx) {throw \"Cannot convert \\\"\" + _ToText.object(v,ctx) + \"\\\" to number!\";},\n};\n\n// Value-to-boolean coercion.\nvar _ToBool = {\n\t\"undefined\" : function(v,ctx) {return false;},\n\t\"string\" : function(v,ctx) {return !(/^\\s*(undefined|false|null|0+|0*\\.0+|0+\\.0*|)\\s*$/i.test(v));},\n\t\"number\" : function(v,ctx) {return Boolean(v);},\n\t\"symbol\" : function(v,ctx) {return Boolean(v);},\n\t\"function\" : function(v,ctx) {return true;},\n\t\"boolean\" : function(v,ctx) {return v;},\n\t\"object\" : function(v,ctx) {return Boolean(v);},\n};\n\nexports.ToSelf = function ToSelf(v,ctx) {return v;};\nexports.ToText = function ToText(v,ctx) {return _ToText[typeof v](v,ctx);};\nexports.ToNum = function ToNum (v,ctx) {return _ToNum [typeof v](v,ctx);};\nexports.ToBool = function ToBool(v,ctx) {return _ToBool[typeof v](v,ctx);};\n\nexports.ToDate = function ToDate(v,ctx) {\n\tif (v instanceof Date) return v;\n\tthrow \"Cannot auto-convert \\\"\" + exports.ToText(v,ctx) + \"\\\" to a date!\";\n};\n\nvar rxJsRegex = /^\\/((?:[^\\\\\\/\\[]|\\[(?:[^\\]]|\\\\\\])*\\]|\\\\.)+)\\/([a-z]*)$/;\nvar rxTwRegexFlags = /^\\(\\?[a-z]*\\)|\\(\\?[a-z]*\\)$/i;\n\nexports.ToRegex = function ToRegex(v,ctx) {\n\tif (v instanceof RegExp) return v;\n\tif (typeof v === \"string\") {\n\t\tv = v.trim();\n\t\t// Try JavaScript style regex\n\t\tvar match = rxJsRegex.exec(v);\n\t\tif (match) {\n\t\t\treturn new RegExp(term[1].replace(\"\\\\/\", \"/\"), term[2]);\n\t\t}\n\t\t// Try TiddlyWiki style regex\n\t\tmatch = rxTwRegexFlags.exec(v);\n\t\tif (match) {\n\t\t\tvar flagLen = match[0].length;\n\t\t\tvar flags = match[0].substr(2, match[0].length-3);\n\t\t\tif (match.index == 0) return new RegExp(v.substr(flagLen), flags);\n\t\t\telse return new RegExp(v.substr(0, v.length-flagLen), flags);\n\t\t}\n\t\treturn new RegExp(v, \"g\");\n\t\t\n\t}\n\tthrow \"Cannot auto-convert \\\"\" + exports.ToText(v,ctx) + \"\\\" to a regular expression!\";\n};\nexports.ToArray = function ToArray(v,ctx) {\n\tif (v instanceof Array) return v;\n\tthrow \"Cannot auto-convert \\\"\" + exports.ToText(v,ctx) + \"\\\" to an array!\";\n};\nexports.ToFunc = function ToFunc(v,ctx) {\n\tif (v instanceof Function) return v;\n\tthrow \"Cannot convert \\\"\" + exports.ToText(v,ctx) + \"\\\" to a function!\";\n};\n// Maybe add ToRegex\n\n\n// Build a coerce rule from a source string.\nvar CoerceFuncs = {\n\tT: exports.ToText,\n\tN: exports.ToNum,\n\tB: exports.ToBool,\n\tA: exports.ToArray,\n\tD: exports.ToDate,\n\tR: exports.ToRegex,\n\tF: exports.ToFunc,\n\t_: exports.ToSelf,\n};\n\nfunction BuildCoerceRule(src) {\n\tvar rule = {\n\t\tmain: [],\n\t\textra: [],\n\t};\n\tvar i = 0, func;\n\t// Main part\n\twhile (i < src.length) {\n\t\tfunc = CoerceFuncs[src[i]]; ++i;\n\t\tif (func) {rule.main.push(func); continue;}\n\t\tif (src[i-1] == '+') break;\n\t\tthrow \"Unknown coerce rule: '\"+src[i-1]+\"'\";\n\t}\n\t// Extra arguments (loops)\n\twhile (i < src.length) {\n\t\tfunc = CoerceFuncs[src[i]]; ++i;\n\t\tif (func) {rule.extra.push(func); continue;}\n\t\tthrow \"Unknown coerce rule: '\"+src[i-1]+\"'\";\n\t}\n\treturn rule;\n}\n\nvar NoCoerce = {rule: {main:[], extra:[]}, gen: []};\nvar CoerceCache = {'': NoCoerce};\n\nfunction GetCoerceCache(src) {\n\tif (!CoerceCache[src]) {\n\t\ttry {\n\t\t\tCoerceCache[src] = {rule: BuildCoerceRule(src), gen: []};\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow err + \" in rule string '\" + src + \"'\";\n\t\t}\n\t}\n\treturn CoerceCache[src];\n}\n\n// Generate the coercing function array.\nfunction GenCoerceFuncs(rule,len) {\n\tvar result = [], i = 0, x = 0;\n\tresult = rule.main;\n\tif (rule.extra.length) {\n\t\twhile (result.length < len) result = result.concat(rule.extra);\n\t}\n\treturn result;\n}\n\n// Get an array of coercing (ToXXX) functions based on the function.\nexports.GetCoerceFuncs = function GetCoerceFuncs(func,args) {\n\t// Possibly set up coercion for this function.\n\tif (!func._coerce) {\n\t\tif (func.inCast) {\n\t\t\ttry {\n\t\t\t\tfunc._coerce = GetCoerceCache(func.inCast);\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t\tthrow err + \" for function \" + func.toString();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfunc._coerce = NoCoerce;\n\t\t}\n\t}\n\tvar gen = func._coerce.gen[args.length];\n\tif (gen) return gen;\n\tgen = GenCoerceFuncs(func._coerce.rule, args.length);\n\tfunc._coerce.gen[args.length] = gen;\n\treturn gen;\n};\n\n\n// Coerce\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/coerce.js",
"tags": "",
"module-type": "library",
"modified": "20180112071139424",
"description": "",
"created": "20180113183000431"
},
"$:/plugins/ebalster/formula/compile.js": {
"text": "(function(){\n\n\"use strict\";\n\nvar Nodes = require(\"$:/plugins/ebalster/formula/nodes.js\");\n\nvar rxDatumIsFormula = /^\\s*\\(=.*=\\)\\s*$/;\nvar rxDatumIsTrue = /^s*TRUE\\s*$/i;\nvar rxDatumIsFalse = /^s*FALSE\\s*$/i;\n\nvar rxLet = /let/gi;\n\nvar rxSkipInert = /(\\s*|\\/\\/.*?([\\r\\n]|$)|\\/\\*[\\s\\S]*?\\*\\/)*/g;\nvar rxNotWhitespace = /[^\\s]+/g;\nvar rxOperandFilter = /\\[(([^\\[\\]]|\\[[^\\[\\]]*\\])+(\\](\\s*[+-])?\\s*\\[)?)+\\]/g;\nvar rxOperandTransclusion = /\\{\\{([^\\{\\}]+)\\}\\}/g;\nvar rxDatumIsTransclusion = /^\\s*\\{\\{([^\\{\\}]+)\\}\\}\\s*$/;\nvar rxOperandVariable = /<<([^<>]+)>>/g;\nvar rxDatumIsVariable = /^\\s*<<[^<>]+>>\\s*$/;\nvar rxCellName = /\\$?([A-Z]{1,2})\\$?([0-9]+)/g;\nvar rxCellRange = /\\$?([A-Z]{1,2})\\$?([0-9]+):\\$?([A-Z]{1,2})\\$?([0-9]+)/g;\nvar rxIdentifier = /[_a-zA-Z][_a-zA-Z0-9]*/g;\nvar rxKeyword = /(function|let|for|foreach|if|then|else|while|do|this|self|currentTiddler)/gi;\n\nvar rxUnsignedDecimal = /((\\d+(\\.\\d*)?)|(\\.\\d+))/g;\nvar rxDecimal = /[+-]?((\\d+(\\.\\d*)?)|(\\.\\d+))/g;\nvar rxDatumIsDecimal = /^\\s*[+-]?((\\d+(\\.\\d*)?)|(\\.\\d+))\\s*$/;\n\nvar rxDate = /\\d{2,4}-\\d{2}-\\d{2}(\\s*\\d{1,2}:\\d{2}(:\\d{2}(.\\d+)?)?)?/g;\nvar rxDatumIsDate = /^\\s*\\d{2,4}-\\d{2}-\\d{2}(\\s*\\d{1,2}:\\d{2}(:\\d{2}(.\\d{3})?)?)?\\s*$/;\nvar rxRegex = /\\/((?:[^\\\\\\/\\[]|\\[(?:[^\\]]|\\\\\\])*\\]|\\\\.)+)\\/([a-z]*)/g;\nvar rxDatumIsRegex = /^\\s*\\/((?:[^\\\\\\/\\[]|\\[(?:[^\\]]|\\\\\\])*\\]|\\\\.)+)\\/([a-z]*)\\s*$/;\nvar rxDatumIsTwDate = /^([0-9]{4})(1[0-2]|0[1-9])(3[01]|[12][0-9]|0[1-9])(2[0-3]|[01][0-9])([0-5][0-9])([0-5][0-9])([0-9]{3})?$/;\nvar rxDateFragment = /\\d+/g;\n\nvar rxString = /(\"(\\\\.|[^\"\\\\])*\"|'(\\\\.|[^'\\\\])*')/g;\nvar rxEscapeSequence = /\\\\([a-tv-z0\"'\\\\]|u[a-fA-F0-9]{0,4}|$)/g;\n\nvar formulaFunctions = null;\nvar operatorsUnaryPre = null;\nvar operatorsUnaryPost = null;\nvar operatorsBinary = null;\nvar operatorsTernary = null;\n\nfunction Parser(src)\n{\n\tthis.src = src;\n\tthis.pos = 0;\n\tthis.end = src.length;\n\tthis.locals = {};\n\tthis.localStack = [];\n\tthis.assignStack = [];\n}\nParser.prototype.getChar = function()\n{\n\treturn this.src.charAt(this.pos);\n};\nParser.prototype.nextGlyph = function()\n{\n\tthis.skipInert();\n\tif (this.pos >= this.end) return '';\n\t++this.pos;\n\treturn this.src.charAt(this.pos-1);\n};\nParser.prototype.remaining = function()\n{\n\treturn this.src.substring(this.pos, this.end);\n};\nParser.prototype.nextToken = function()\n{\n\tthis.skipInert();\n\trxNotWhitespace.lastIndex = this.pos;\n\trxNotWhitespace.test(this.src);\n\treturn this.src.substring(this.pos, rxNotWhitespace.lastIndex);\n};\nParser.prototype.match_here = function(regex)\n{\n\t// TODO this is doing much more work than is necessary\n\tregex.lastIndex = this.pos;\n\tvar result = regex.exec(this.src);\n\tif (!result || result.index != this.pos || result.index+result[0].length > this.end) return null;\n\tthis.pos = regex.lastIndex;\n\treturn result;\n};\nParser.prototype.skipInert = function()\n{\n\trxSkipInert.lastIndex = this.pos;\n\trxSkipInert.test(this.src);\n\tthis.pos = Math.min(rxSkipInert.lastIndex, this.end);\n};\n\n// Push a new set of local variables onto the parser's stack.\nParser.prototype.pushLocals = function(assigns) {\n\tvar id;\n\tvar newLocals = {};\n\tthis.localStack.push(this.locals); for (id in this.locals) newLocals[id] = 0;\n\tthis.assignStack.push(assigns); for (id in assigns) newLocals[id] = 0;\n\tthis.locals = newLocals;\n};\n\n// Pop the last set of local variables off the parser's stack and return usage-counts.\nParser.prototype.popLocals = function() {\n\tvar id, count, usage = {captures: {}, assigns: {}},\n\t\tassigns = this.assignStack.pop(),\n\t\toldLocals = this.localStack.pop();\n\tfor (id in this.locals) {\n\t\tcount = this.locals[id];\n\t\tif (count > 0) {\n\t\t\tif (assigns[id]) {\n\t\t\t\tusage.assigns[id] = count;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tusage.captures[id] = count;\n\t\t\t\toldLocals[id] += count;\n\t\t\t}\n\t\t}\n\t}\n\tthis.locals = oldLocals;\n\treturn usage;\n};\n\nvar initialize = function() {\n\tformulaFunctions = {};\n\tvar operators = {};\n\t$tw.modules.applyMethods(\"formula-function\", formulaFunctions);\n\t$tw.modules.applyMethods(\"formula-operator\", operators);\n\n\toperatorsUnaryPre = {};\n\toperatorsUnaryPost = {};\n\toperatorsBinary = {}; //{}; //{plus: {arity: 2, precedence: 10, operator: \"+\", function: \"add\"}};\n\toperatorsTernary = {};\n\tfor (var opName in operators)\n\t{\n\t\tvar op = operators[opName];\n\n\t\t// Bind the associated function. \n\t\tvar func = formulaFunctions[op.function];\n\t\tif (!func) continue;\n\t\top.func_bind = func;\n\n\t\t// Sort the op by arity and position.\n\t\tswitch (op.arity)\n\t\t{\n\t\tcase 2: operatorsBinary [opName] = op; break;\n\t\tcase 3: operatorsTernary [opName] = op; break;\n\t\tcase 1:\n\t\t\tswitch (op.position)\n\t\t\t{\n\t\t\t\tcase \"pre\": operatorsUnaryPre [opName] = op; break;\n\t\t\t\tcase \"post\": operatorsUnaryPost[opName] = op; break;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n};\n\n\nexports.compileExpression = function(expression) {\n\n\t// Create a parser and process the formula as an expression.\n\tvar parser = new Parser(expression);\n\n\tvar operand = buildExpression(parser);\n\n\treturn operand;\n};\n\nexports.compileDatum = function(datum) {\n\t\n\tvar parser, term;\n\n\t// Short-hand formula\n\tif (datum.charAt(0) == \"=\") {\n\t\tparser = new Parser(datum);\n\t\tparser.pos = 1;\n\t\treturn buildExpression(parser);\n\t}\n\n\t// Could be a TiddlyWiki date?\n\tif (rxDatumIsTwDate.test(datum)) {\n\t\treturn new Nodes.Date($tw.utils.parseDate(datum));\n\t}\n\n\t// Could be a number?\n\tif (rxDatumIsDecimal.test(datum)) {\n\t\t// Treat as a number constant\n\t\treturn new Nodes.Number(Number(datum));\n\t}\n\n\t// Could be a formula?\n\tif (rxDatumIsFormula.test(datum)) {\n\t\t// Parse contents as a formula\n\t\tparser = new Parser(datum);\n\t\tparser.pos = datum.indexOf(\"=\")+1;\n\t\tparser.end = datum.lastIndexOf(\"=\");\n\t\treturn buildExpression(parser);\n\t}\n\n\t// Could be a transclusion or variable?\n\tif (rxDatumIsTransclusion.test(datum) ||\n\t\t\trxDatumIsVariable.test(datum)) {\n\t\t// Defer to the operand parser...\n\t\tparser = new Parser(datum);\n\t\treturn buildOperand(parser);\n\t}\n\n\t// Booleans?\n\tif (rxDatumIsFalse.test(datum)) return new Nodes.Bool(false);\n\tif (rxDatumIsTrue .test(datum)) return new Nodes.Bool(true);\n\n\t// Date?\n\tif (rxDatumIsDate.test(datum))\n\t{\n\t\trxDateFragment.lastIndex = 0;\n\t\tvar parts = [];\n\t\twhile (true)\n\t\t{\n\t\t\tvar res = rxDateFragment.exec(datum);\n\t\t\tif (!res) break;\n\t\t\tparts.push(parseInt(res[0]));\n\t\t}\n\t\tif (parts.length)\n\t\t{\n\t\t\treturn new Nodes.Date(new Date(\n\t\t\t\tparts[0], (parts[1] || 1)-1, parts[2] || 1,\n\t\t\t\tparts[3] || 0, parts[4] || 0, parts[5] || 0, parts[6] || 0));\n\t\t}\n\t}\n\n\t// Regex?\n\tif ((term = rxDatumIsRegex.exec(datum))) {\n\t\treturn new Nodes.Regex(new RegExp(term[1].replace(\"\\\\/\", \"/\"), term[2]));\n\t}\n\n\t// Otherwise, treat as a string constant\n\treturn new Nodes.Text(datum);\n};\n\nexports.compileFormula = function(formulaString)\n{\n\t// Process the formula string into a root operand\n\ttry {\n\t\treturn exports.compileExpression(formulaString);\n\t}\n\tcatch (err) {\n\t\tthrow \"CompileError: \" + err;\n\t}\n};\n\n\n// Compile an operator\nfunction parseOperator(parser, operatorGroup) {\n\n\t// Skip more whitespace\n\tparser.skipInert();\n\n\tvar result = null;\n\n\t// Find the longest operator matching the current text.\n\tfor (var opName in operatorGroup)\n\t{\n\t\tvar op = operatorGroup[opName];\n\t\tif (parser.src.substr(parser.pos, op.operator.length) == op.operator\n\t\t\t&& parser.pos+op.operator.length <= parser.end)\n\t\t{\n\t\t\tif (!result || result.operator.length < op.operator.length) result = op;\n\t\t}\n\t}\n\n\tif (result) parser.pos += result.operator.length;\n\n\treturn result;\n}\n\n// Parse a text reference. This function is pased on $tw.utils.getTextReference.\nfunction buildTextReference(textReference) {\n\tvar tr = $tw.utils.parseTextReference(textReference);\n\tvar title;\n\tif (tr.title) title = new Nodes.Text(tr.title);\n\telse title = new Nodes.Variable(new Nodes.Text(\"currentTiddler\"));\n\tif (tr.field) {\n\t\tif (tr.field == \"title\") {\n\t\t\treturn title;\n\t\t}\n\t\telse {\n\t\t\treturn new Nodes.TranscludeField(title, new Nodes.Text(tr.field));\n\t\t}\n\t}\n\telse if (tr.index) {\n\t\treturn new Nodes.TranscludeIndex(title, new Nodes.Text(tr.index));\n\t}\n\telse {\n\t\treturn new Nodes.TranscludeText(title);\n\t}\n}\n\n// Parse a formula.\nfunction buildExpression(parser, nested) {\n\t\n\t// Make sure math functions are initialized\n\tif (!formulaFunctions) initialize();\n\n\tparser.skipInert();\n\n\t// Expression compiler state\n\tvar operands = [];\n\tvar operators = [];\n\tvar precedences = [];\n\tvar operand = null, callArgs;\n\t\n\t// Unary stacking function\n\tvar applyUnary = function(unary) {\n\t\toperand = new Nodes.CallJS(unary.func_bind, [operand]);\n\t};\n\n\twhile (true)\n\t{\n\t\tvar unaries = [];\n\n\t\t// Prefix operators\n\t\twhile (true)\n\t\t{\n\t\t\tvar prefix = parseOperator(parser, operatorsUnaryPre);\n\t\t\tif (prefix) unaries.unshift(prefix);\n\t\t\telse break;\n\t\t}\n\n\t\t// Grab the operand\n\t\toperand = buildOperand(parser);\n\n\t\t// Missing operand is an error\n\t\tif (operand === null)\n\t\t{\n\t\t\tvar token = parser.nextToken();\n\t\t\tif (token && token[0] != \")\" && token[0] != \",\")\n\t\t\t\tthrow \"invalid operand \\\"\" + token + \"\\\"\";\n\t\t\telse if (operators.length)\n\t\t\t\tthrow \"missing operand after \\\"\" + operators[operators.length-1].operator + \"\\\"\";\n\t\t\telse throw \"empty expression\";\n\t\t}\n\n\t\t// Check for a function call (precedes all operators).\n\t\tcallArgs = buildArguments(parser);\n\t\tif (callArgs) operand = new Nodes.CallFunc(operand, callArgs);\n\n\t\t// Postfix operators\n\t\twhile (true)\n\t\t{\n\t\t\tvar postfix = parseOperator(parser, operatorsUnaryPost);\n\t\t\tif (postfix) unaries.push(postfix);\n\t\t\telse break;\n\t\t}\n\n\t\tunaries.forEach(applyUnary);\n\n\t\t// Operand is complete.\n\t\toperands.push(operand);\n\n\t\t// Infix operators\n\t\tvar operator = parseOperator(parser, operatorsBinary);\n\n\t\t// Missing operator ends the expression\n\t\tif (operator === null) break;\n\n\t\t// Add the operator and its precedence level.\n\t\toperators.push(operator);\n\t\tvar precedence = operator.precedence;\n\t\tif (precedences.indexOf(precedence || 0) == -1) precedences.push(precedence);\n\t}\n\n\t// Sanity check\n\tif (operands.length != operators.length+1)\n\t\tthrow \"internal error: operator/operand parsing inconsistency\";\n\n\t// Resolve operators by precedence\n\tprecedences.sort(function(a,b) {return (a>b)?-1:1;});\n\n\tfor (var j = 0; j < precedences.length; ++j)\n\t{\n\t\tvar prec = precedences[j];\n\t\tfor (var i = 0; i < operators.length; )\n\t\t{\n\t\t\t// Process only operators at the current precedence level.\n\t\t\tvar op = operators[i];\n\t\t\tif (op.precedence != prec) {++i; continue;}\n\n\t\t\t// Collapse the previous and next operands with this operator.\n\t\t\toperands[i] = new Nodes.CallJS(op.func_bind, [operands[i], operands[i+1]]);\n\t\t\toperators.splice(i, 1);\n\t\t\toperands.splice(i+1, 1);\n\t\t}\n\t}\n\n\t// Sanity check\n\tif (operators.length !== 0 || operands.length != 1)\n\t\tthrow \"internal error: resoving failed; \" + operands.length + \" operands and \" + operators.length + \" operators remain\";\n\n\t// For non-nested expressions, throw if any tokens remain.\n\tif (!nested)\n\t{\n\t\tparser.skipInert();\n\n\t\tif (parser.pos < parser.end)\n\t\t{\n\t\t\tthrow \"expected operator, got \\\"\" + parser.nextToken() + \"\\\"\";\n\t\t}\n\t}\n\t\n\t// Otherwise return the operand directly\n\treturn operands[0];\n}\n\n// Compile a list expression, which could be function arguments or an array...\nfunction buildCommaList(parser, braces, afterHint) {\n\n\t// Is an open-brace present?\n\tparser.skipInert();\n\tif (parser.getChar() !== braces[0]) return null;\n\t++parser.pos;\n\n\t// Zero arguments?\n\tparser.skipInert();\n\tif (parser.getChar() === braces[1]) {++parser.pos; return [];}\n\t\n\tvar nodeList = [];\n\n\twhile (true)\n\t{\n\t\t// Compile an expression.\n\t\tnodeList.push(buildExpression(parser, true));\n\n\t\t// Expect close-brace or , after argument.\n\t\tvar char = parser.nextGlyph();\n\t\tif (char === braces[1]) break;\n\t\tif (char !== \",\") throw \"Expect ',' or '\" + braces[1] + \"' after \" + afterHint;\n\t}\n\n\treturn nodeList;\n}\n\n// Build an argument list.\nfunction buildArguments(parser) {\n\treturn buildCommaList(parser, \"()\", \"function argument.\");\n}\n\n// Build an array literal.\nfunction buildArrayLiteral(parser) {\n\tvar array = buildCommaList(parser, \"{}\", \"array element (use {{double braces}} for transclusions).\");\n\tif (!array) throw \"Expect '{' to begin array literal.\";\n\treturn array;\n}\n\n// Build a let or foreach expression (parser starts after the keyword)\nfunction buildLetExpression(parser) {\n\n\tif (parser.nextGlyph() !== \"(\") throw \"Expect '(' after LET.\";\n\n\t// Gradually push locals.\n\tvar assigns = {}, id, c;\n\tparser.pushLocals(assigns);\n\twhile (true) {\n\t\t// Look for a name (identifier)\n\t\tparser.skipInert();\n\t\tid = parser.match_here(rxIdentifier);\n\t\tif (!id) throw \"Expected name in LET assignment, got '\" + parser.nextToken() + \"'.\";\n\t\tid = id[0];\n\t\tif (rxKeyword.test(id)) throw \"Illegal name for LET: \" + id;\n\t\t\n\t\t// Look for an equals, then an expression.\n\t\tif (parser.nextGlyph() !== '=') throw \"Expect '=' after LET value.\";\n\n\t\t// Build the expression... Each let can use the ones before it.\n\t\ttry {\n\t\t\tassigns[id] = buildExpression(parser, true);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow \"compiling LET '\" + id + \"': \" + err;\n\t\t}\n\t\tparser.locals[id] = 0;\n\n\t\t// Expect ) or , after argument.\n\t\tvar char = parser.nextGlyph();\n\t\tif (char == \")\") break;\n\t\tif (char != \",\") throw \"Expect ',' or ')' after LET assignment.\";\n\t}\n\n\tif (parser.nextGlyph() !== \":\") throw \"Expect ':' after LET assignment list.\";\n\tif (parser.nextGlyph() !== \"(\") throw \"Expect LET expression in parentheses after ':'.\";\n\n\t// Compile the body expression, with additional locals.\n\tvar body = buildExpression(parser, true);\n\tvar usage = parser.popLocals();\n\n\t// TODO could examine usage.assigns and letLocals to see if any values were unused.\n\n\tif (parser.nextGlyph() !== \")\") throw \"Expect ')' after LET expression.\";\n\n\treturn new Nodes.LetVars(assigns,body);\n}\n\n// Build a function (parser starts after the keyword \"function\")\nfunction buildFunction(parser) {\n\t\n\tvar srcBegin = parser.pos;\n\n\tif (parser.nextGlyph() !== \"(\") throw \"Expect '(' after 'function'.\";\n\n\tparser.skipInert();\n\n\t// Build the parameter list, if any.\n\tvar params = [], assigns = {};\n\tif (parser.getChar() === \")\") {++parser.pos;}\n\telse while (true)\n\t{\n\t\t// Get a parameter name (identifier).\n\t\tvar param = parser.match_here(rxIdentifier);\n\t\tif (!param) throw \"Expect list of parameter names after 'function'.\";\n\t\tparam = param[0];\n\t\tif (rxKeyword.test(param)) throw \"Illegal parameter name: \" + param;\n\t\tparams.push(param);\n\t\tif (assigns[param]) throw \"Parameter name used twice: \" + param;\n\t\tassigns[param] = true;\n\n\t\t// Expect ) or , after argument.\n\t\tvar char = parser.nextGlyph();\n\t\tif (char == \")\") break;\n\t\tif (char != \",\") throw \"Expect ',' or ')' after function parameter name.\";\n\n\t\t// Skip inert stuff\n\t\tparser.skipInert();\n\t}\n\n\tif (parser.nextGlyph() !== \":\") throw \"Expect ':' after function parameter list.\";\n\tif (parser.nextGlyph() !== \"(\") throw \"Expect function body beginning with '(' after ':'.\";\n\n\t// Compile the body expression, with parameters as locals. Closures are NOT currently supported.\n\tparser.pushLocals(assigns);\n\tvar body = buildExpression(parser, true);\n\tvar usage = parser.popLocals();\n\tvar captures = usage.captures;\n\n\tif (parser.nextGlyph() !== \")\") throw \"Expect ')' after function body.\";\n\n\t// Create the function object (must be called with this = context)\n\tvar func = function() {\n\t\tvar locals = Object.assign({}, func.captured || {});\n\t\tfor (var i = 0; i < arguments.length; ++i) locals[params[i]] = arguments[i];\n\t\treturn body.compute(this.let(locals));\n\t};\n\t//func.params = params;\n\tfunc.min_args = params.length;\n\tfunc.max_args = params.length;\n\tfunc.formulaSrc = parser.src.substring(srcBegin, parser.pos);\n\treturn new Nodes.Function(func, captures);\n}\n\n// Compile an operand into a function returning the operand value.\nfunction buildOperand(parser) {\n\n\tvar term;\n\t\n\t// Skip whitespace & comments\n\tparser.skipInert();\n\n\tif (parser.pos == parser.end) return null;\n\n\tvar char = parser.getChar();\n\n\tif (char.match(/[0-9\\.+]/i))\n\t{\n\t\t// Number constant\n\t\tterm = parser.match_here(rxDecimal);\n\t\tif (term) return new Nodes.Number(Number(term[0]));\n\t\tthrow \"Invalid number: \" + parser.nextToken();\n\t}\n\telse if (char.match(/[$a-z_]/i))\n\t{\n\t\t// Cell range?\n\t\tterm = parser.match_here(rxCellRange);\n\t\tif (term) throw \"Cell ranges are currently unsupported!\";\n\n\t\t// Cell name?\n\t\tterm = parser.match_here(rxCellName);\n\t\tif (term) return new Nodes.Datum(\n\t\t\tnew Nodes.TranscludeIndex(\n\t\t\t\tnew Nodes.Variable(new Nodes.Text(\"currentTiddler\")),\n\t\t\t\tnew Nodes.Text(term[1]+term[2])));\n\n\t\t// Identifier?\n\t\tterm = parser.match_here(rxIdentifier);\n\t\tif (!term) return null;\n\n\t\tif (parser.locals[term] != undefined)\n\t\t{\n\t\t\t// Scoped variable. We count up references to each.\n\t\t\t++parser.locals[term];\n\t\t\treturn new Nodes.ScopeVar(term[0]);\n\t\t}\n\n\t\tvar termLower = term[0].toLowerCase();\n\t\tswitch (termLower)\n\t\t{\n\t\tcase \"let\":\n\t\t\t// LET expression.\n\t\t\treturn buildLetExpression(parser);\n\n\t\tcase \"function\":\n\t\t\t// Function declaration.\n\t\t\treturn buildFunction(parser);\n\n\t\tdefault:\n\t\t\t// Function call.\n\t\t\tvar func = formulaFunctions[termLower];\n\n\t\t\tif (!func) throw \"unknown function: \" + term[0];\n\n\t\t\tvar args = buildArguments(parser);\n\n\t\t\t// Omitting arguments is only OK for constant functions\n\t\t\tif (args === null)\n\t\t\t{\n\t\t\t\tif (!func.isConstant) throw \"Expected '(' after \" + term[0];\n\t\t\t\targs = [];\n\t\t\t}\n\n\t\t\tif (func instanceof Function) {\n\t\t\t\t// Check parameter count\n\t\t\t\tif (args.length > func.length && !func.variadic)\n\t\t\t\t\tthrow \"too many arguments for \" + term[0] + \" (requires \" + func.length + \")\";\n\t\t\t\tif (args.length < func.length)\n\t\t\t\t\tthrow \"too few arguments for \" + term[0] + (func.variadic?\" (min \":\" (requires \") + func.length + \")\";\n\t\t\t}\n\t\t\telse if (func.select || func.construct) {\n\t\t\t\t// Check argument range\n\t\t\t\tif (func.max_args && args.length > func.max_args)\n\t\t\t\t\tthrow \"too many arguments for \" + term[0] + \" (max \" + func.max_args + \")\";\n\t\t\t\tif (func.min_args && args.length < func.min_args)\n\t\t\t\t\tthrow \"too few arguments for \" + term[0] + \" (min \" + func.min_args + \")\";\n\t\t\t\t\n\t\t\t\t// If a construct function is present, use it to generate an operand.\n\t\t\t\tif (func.construct) return func.construct(args);\n\n\t\t\t\t// If a select function is present, prepare to bind it with a CallJS.\n\t\t\t\tfunc = func.select(args);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow \"Function \" + term[0] + \" seems to be unusable.\";\n\t\t\t}\n\n\t\t\treturn new Nodes.CallJS(func, args);\n\t\t}\n\t}\n\telse switch (char)\n\t{\n\tcase \"(\": // Parenthesized expression\n\t\t++parser.pos;\n\t\tvar parentheses = buildExpression(parser, true);\n\t\tparser.skipInert();\n\t\tif (parser.getChar() !== \")\")\n\t\t{\n\t\t\tif (parser.pos == parser.end) throw \"missing ')' at end of formula\";\n\t\t\telse throw \"expected ')', got \\\"\" + parser.nextToken() + \"\\\"\";\n\t\t}\n\t\t++parser.pos;\n\t\treturn parentheses;\n\n\tcase \"'\":\n\tcase \"\\\"\": // String constant\n\t\tterm = parser.match_here(rxString);\n\t\tif (!term) throw \"Invalid string: \" + parser.nextToken();\n\t\tterm = term[0].substr(1, term[0].length-2);\n\t\tterm = term.replace(rxEscapeSequence, function(esc) {\n\t\t\tswitch (esc.charAt(1)) {\n\t\t\t\tcase '\"': return '\"';\n\t\t\t\tcase '\\'': return '\\'';\n\t\t\t\tcase '\\\\': return '\\\\';\n\t\t\t\tcase 'n': return '\\n';\n\t\t\t\tcase 'r': return '\\r';\n\t\t\t\tcase 'b': return '\\b';\n\t\t\t\tcase 'f': return '\\f';\n\t\t\t\tcase 't': return '\\t';\n\t\t\t\tcase 'v': return '\\v';\n\t\t\t\tcase '0': return '\\0';\n\t\t\t\tcase 'u':\n\t\t\t\t\tif (esc.length < 6) throw \"Invalid escape sequence: \" + esc;\n\t\t\t\t\treturn String.fromCharCode(parseInt(esc.substr(2), 16));\n\t\t\t\tdefault: throw \"Invalid escape sequence: \" + esc;\n\t\t\t}\n\t\t});\n\t\treturn new Nodes.Text(term);\n\n\tcase \"[\": // Filter operand\n\t\tterm = parser.match_here(rxOperandFilter);\n\t\tif (term) return new Nodes.Filter(term[0]);\n\t\tbreak;\n\n\tcase \"{\": // Transclusion or array\n\t\t++parser.pos;\n\t\tchar = parser.getChar();\n\t\t--parser.pos;\n\t\tif (char == '{') {\n\t\t\t// Possible transclusion operand\n\t\t\tterm = parser.match_here(rxOperandTransclusion);\n\t\t\tif (term) return new Nodes.Datum(buildTextReference(term[1]));\n\t\t}\n\t\t// Array operand\n\t\treturn new Nodes.ArrayDef(buildArrayLiteral(parser));\n\n\tcase \"<\": // Variable operand\n\t\tterm = parser.match_here(rxOperandVariable);\n\t\tif (term) return new Nodes.Datum(\n\t\t\tnew Nodes.Variable(new Nodes.Text(term[1])));\n\t\tbreak;\n\n\tcase \"/\": // Regular expression?\n\t\tterm = parser.match_here(rxRegex);\n\t\tif (term) return new Nodes.Regex(new RegExp(term[1].replace(\"\\\\/\", \"/\"), term[2]));\n\t\t\tbreak;\n\t}\n\n\t// Didn't recognize the operand\n\treturn null;\n}\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/compile.js",
"tags": "",
"module-type": "library",
"modified": "20171211181652443",
"description": "",
"created": "20171210195223539"
},
"$:/plugins/ebalster/formula/compute.js": {
"text": "(function(){\n\n\"use strict\";\n\nvar Nodes = require(\"$:/plugins/ebalster/formula/nodes.js\");\nvar Compiler = require(\"$:/plugins/ebalster/formula/compile.js\");\nvar Coerce = require(\"$:/plugins/ebalster/formula/coerce.js\");\n\nvar Numeral = require(\"$:/plugins/ebalster/formula/lib/numeral.js\");\n\n// TiddlyWiki array format\nfunction arrayFormatTW(arr,ctx) {\n\tvar result = \"\";\n\tfor (var i = 0; i < arr.length; ++i) {\n\t\tvar part = Coerce.ToText(arr[i],ctx);\n\t\tif (i && part.length) result += \" \";\n\t\tif (part.indexOf(/\\s/g) >= 0) result += \"[[\" + part + \"]]\";\n\t\telse result += part;\n\t}\n\treturn result;\n}\n\n// Number format functions...\n\n// SANE number formatting: if we find five consecutive 9s or 0s after the decimal point, round them off.\nfunction NumberStringSane(n) {\n\tvar s = String(n);\n\tvar parse = /^(0\\.0*[1-9]\\d*?|\\d*\\.\\d*?)(0{5}\\d*|9{5}\\d*)(|e[+-]\\d*)$/.exec(s);\n\tif (!parse) return s;\n\tvar kept = parse[1], exp = parse[3];\n\tvar end = kept.slice(-1);\n\tif (parse[2][0] === '0') return ((end === '.') ? kept.substr(0,kept.length-1) : kept) + exp;\n\tif (end === '.') return (Number(kept.substr(0,kept.length-1))+1) + exp;\n\treturn kept.substr(0,kept.length-1) + (Number(end)+1) + exp;\n}\nvar numeralFormat = function(fmt) {return function(num) {return Numeral(num).format(fmt);};};\nvar numeralFormatPrec = function(fmt,digs) {return function(num) {return Numeral(num.toPrecision(digs)).format(fmt);};};\nvar numberFormatFixed = function(prec) {return function(num) {return num.toFixed (prec);};};\nvar numberFormatPrec = function(digs) {return function(num) {return num.toPrecision(digs);};};\nvar numberFormatSelect = function(settings)\n{\n\tif (settings.precision == \"true\" || settings.precision > 100) return String;\n\tif (typeof settings.numberFormat == \"string\") {\n\t\t// Use numeral\n\t\treturn isNaN(settings.precision) ?\n\t\t\tnumeralFormat (settings.numberFormat) :\n\t\t\tnumeralFormatPrec(settings.numberFormat, settings.precision);\n\t}\n\tif (!isNaN(settings.fixed)) return numberFormatFixed(settings.fixed);\n\tif (!isNaN(settings.precision)) return numberFormatPrec (settings.precision);\n\treturn NumberStringSane;\n\t// return String;\n};\n\nexports.computeFormula = function(compiledFormula, widget, formatOptions, debug) {\n\t\n\tvar value, context;\n\t\n\tformatOptions = formatOptions || {};\n\n\tvar dateFormat = formatOptions.dateFormat || \"0hh:0mm, DDth MMM YYYY\";\n\n\t// Specify format. These are all required!\n\tvar formats = {\n\t\tnumber: numberFormatSelect(formatOptions),\n\t\tdate: function(date) {return $tw.utils.formatDateString(date, dateFormat);},\n\t\tarray: arrayFormatTW,\n\t};\n\n\tcontext = new Nodes.Context(widget, formats);\n\n\t// Compute a value from the root node of the compiled formula.\n\ttry {\n\t\tvalue = compiledFormula.computeText(context);\n\t}\n\tcatch (err) {\n\t\tthrow \"ComputeError: \" + String(err) + (err.fileName || \"\") + (err.lineNumber || \"\")\n\t\t\t+ (debug ? \"\\nNodes: \" + JSON.stringify(compiledFormula) : \"\");\n\t}\n\n\t// Format the root node as a string.\n\tif (debug) return value + \"\\n - Val:\" + String(value) + \", Op:\" + compiledFormula.name;\n\telse return value;\n};\n\nexports.evalFormula = function(formulaString, widget, formatOptions, debug) {\n\t\n\tvar compiledFormula;\n\n\t// Compile the formula\n\ttry {\n\t\tcompiledFormula = Compiler.compileExpression(formulaString);\n\t}\n\tcatch (err) {\n\t\tthrow \"CompileError: \" + String(err);\n\t}\n\n\t// Compute the formula\n\treturn exports.computeFormula(compiledFormula, widget, formatOptions, debug);\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/compute.js",
"tags": "",
"module-type": "library",
"modified": "20180114170348576",
"description": "",
"created": "20180114170308058"
},
"$:/plugins/ebalster/formula/filters/range.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/formula/filters/range.js\ntype: application/javascript\nmodule-type: filteroperator\n\nFilter operator for generating a numeric range.\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nExport our filter function\n*/\nexports.range = function(source,operator,options) {\n\tvar results = [];\n\n\t// Split the operand into numbers delimited by these symbols\n\tvar parts = operator.operand.split(/[,:;]/g), beg, end, inc, i, fixed = 0;\n\n\tfor (i = 0; i < parts.length; ++i) {\n\t\t// Validate real number\n\t\tif (!/^\\s*[+-]?((\\d+(\\.\\d*)?)|(\\.\\d+))\\s*$/.test(parts[i]))\n\t\t\treturn [\"range: bad number \\\"\"+parts[i]+\"\\\"\"];\n\n\t\t// Count digits; the most precise number determines decimal places in output.\n\t\tvar frac = /\\.\\d+/.exec(parts[i]);\n\t\tif (frac) fixed = Math.max(fixed, frac[0].length-1);\n\t\t\n\t\tparts[i] = parseFloat(parts[i]);\n\t}\n\n\tswitch (parts.length) {\n\t\tcase 1:\n\t\t\tbeg = 0;\n\t\t\tend = parts[0];\n\t\t\tinc = 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tbeg = parts[0];\n\t\t\tend = parts[1];\n\t\t\tinc = 1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tbeg = parts[0];\n\t\t\tend = parts[1];\n\t\t\tinc = Math.abs(parts[2]);\n\t\t\tbreak;\n\t}\n\n\tif (inc === 0) return [\"range: increment 0 causes infinite loop\"];\n\n\t// May need to count backwards\n\tvar direction = ((end<beg) ? -1 : 1);\n\tinc *= direction;\n\n\t// Estimate number of resulting elements\n\tif ((end-beg)/inc > 10000) return [\"range: too many steps (over 10K)\"];\n\n\t// Avoid rounding error on last step\n\tend += direction * 0.5 * Math.pow(0.1, fixed);\n\n\tvar safety = 10010;\n\n\t// Enumerate the range\n\tif (end<beg) {for (i = beg; i > end; i += inc) {results.push(i.toFixed(fixed)); if (--safety<0) break;}}\n\telse {for (i = beg; i < end; i += inc) {results.push(i.toFixed(fixed)); if (--safety<0) break;}}\n\n\tif (safety<0) return [\"range: unexpectedly large output\"];\n\n\t// Reverse?\n\tif (operator.prefix === \"!\") results.reverse();\n\n\treturn results;\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/filters/range.js",
"tags": "",
"module-type": "filteroperator",
"modified": "20171221181907646",
"created": "20171221181646560"
},
"$:/plugins/ebalster/formula/functions/arithmetic.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\n// Unary sign operators\nexports.uplus = function(a) {return a;};\nexports.uminus = function(a) {return -a;};\nexports.uminus.inCast = 'N';\n\n// Add\nexports.add = function(a, b) {return a + b;};\nexports.add.inCast = 'NN';\nexports.sub = function(a, b) {return a - b;};\nexports.sub.inCast = 'NN';\n\n// Multiply\nexports.mul = function(a, b) {return a * b;};\nexports.mul.inCast = 'NN';\nexports.div = function(a, b) {return a / b;};\nexports.div.inCast = 'NN';\n\n// Percent -- TODO make this a different value-type\nexports.percent = function(a) {return a / 100;};\nexports.percent.inCast = 'N';\n\n\n// Aliases\nexports.subtract = exports.sub;\nexports.minus = exports.sub;\nexports.multiply = exports.mul;\nexports.divide = exports.div;\nexports.quotient = exports.div;\nexports.power = exports.pow;\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/arithmetic.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171212223526867",
"created": "20171211192843088"
},
"$:/plugins/ebalster/formula/functions/arrays.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\n// Array constructor function\nexports.array = function() {\n\treturn Array.prototype.slice.call(arguments);\n};\nexports.array.variadic = true;\n\n\nexports.nth = function(a, i) {\n\ti = Math.floor(i);\n\tif (i < 1 || i > a.length) return undefined;\n\treturn a[i-1];\n};\nexports.nth.inCast = 'AN';\n\nexports.first = function(a) {\n\tif (a.length) return a[0];\n\treturn undefined;\n};\nexports.first.inCast = 'A';\n\nexports.last = function(a) {\n\tif (a.length) return a[a.length-1];\n\treturn undefined;\n};\nexports.last.inCast = 'A';\n\n// MAP function\nexports.map = function(f, a) {\n\tif (f.min_args > 1 || f.max_args < 1) throw \"MAP requires single-argument function.\";\n\tvar result = [];\n\tvar func = f.bind(this);\n\tfor (var i = 0; i < a.length; ++i) result.push(func(a[i]));\n\treturn result;\n};\nexports.map.inCast = 'FA';\n\n\n/*\n\tCounting subroutines...\n\t\tcountA counts every non-array value\n\t\tcountS counts every non-array value but null, undefined and empty strings.\n*/\nfunction countS(a) {\n\tif (!(a instanceof Array)) return (a == null || a.length === 0) ? 0 : 1;\n\tvar n = 0;\n\tfor (var i = 0; i < a.length; ++i) n += countS(a[i]);\n\treturn n;\n}\nfunction countA(a) {\n\tif (!(a instanceof Array)) return 1;\n\tvar n = 0;\n\tfor (var i = 0; i < a.length; ++i) n += countA(a[i]);\n\treturn n;\n}\nfunction countS_multi() {\n\tvar n = 0;\n\tfor (var i = 0; i < arguments.length; ++i) n += countS(arguments[i]);\n\treturn n;\n}\nfunction countA_multi() {\n\tvar n = 0;\n\tfor (var i = 0; i < arguments.length; ++i) n += countA(arguments[i]);\n\treturn n;\n}\nexports.count =\n{\n\tmin_args : 1,\n\tselect : function(operands)\n\t{\n\t\tswitch (operands)\n\t\t{\n\t\tcase 1: return countS;\n\t\tdefault: return countS_multi;\n\t\t}\n\t}\n};\nexports.counta =\n{\n\tmin_args : 1,\n\tselect : function(operands)\n\t{\n\t\tswitch (operands)\n\t\t{\n\t\tcase 1: return countA;\n\t\tdefault: return countA_multi;\n\t\t}\n\t}\n};\n\n// COUNTA function, currently counts everything\nexports.counta = exports.count;\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/arrays.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171219014910148",
"created": "20171219014903147"
},
"$:/plugins/ebalster/formula/functions/compare.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\n// Equality\nexports.eq = function(a, b) {return a == b;};\nexports.ne = function(a, b) {return a != b;};\n\n// Inequality\nexports.gt = function(a, b) {return a > b;};\nexports.gte = function(a, b) {return a >= b;};\nexports.lt = function(a, b) {return a < b;};\nexports.lte = function(a, b) {return a <= b;};\n\n\n// Aliases\nexports.equal = exports.eq;\nexports.not_equal = exports.ne;\nexports.greater = exports.gt;\nexports.greater_or_equal = exports.gte;\nexports.less = exports.lt;\nexports.less_or_equal = exports.lte;\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/compare.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171214050803365",
"created": "20171214050022626"
},
"$:/plugins/ebalster/formula/functions/datetime.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\nvar MS_PER_DAY = 86400000;\nvar MS_PER_HOUR = 3600000;\nvar MS_PER_MINUTE = 60000;\nvar MS_PER_SECOND = 1000;\n\nvar UNIX_EPOCH_JULIAN_DAY = 2440587;\n\n\n/*!\n * isoWeekNum from pikaday <https://github.com/actano/Pikaday>\n */\nfunction isoWeekOfYear(date, dayInFirstWeek) {\n\tdayInFirstWeek = dayInFirstWeek || 4;\n\tdate = date instanceof Date ? date : new Date();\n\tdate.setHours(0, 0, 0, 0);\n\tvar yearDay = date.getDate(),\n\t\tweekDay = date.getDay(),\n\t\tdayShift = dayInFirstWeek - 1, // counting starts at 0\n\t\tprevWeekDay = function(day) { return (day + 7 - 1) % 7; };\n\tdate.setDate(yearDay + dayShift - prevWeekDay(weekDay));\n\tvar jan4th = new Date(date.getFullYear(), 0, dayInFirstWeek),\n\t\tdaysBetween = (date.getTime() - jan4th.getTime()) / MS_PER_DAY,\n\t\tweekNum = 1 + Math.round((daysBetween - dayShift + prevWeekDay(jan4th.getDay())) / 7);\n\treturn weekNum;\n}\nfunction isLeapYear(year) {\n\treturn year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);\n}\nfunction daysInYear(year) {\n\treturn isLeapYear(year) ? 366 : 365;\n}\nfunction daysInMonth(year, monthIndex) {\n\tswitch (monthIndex) {\n\tcase 0: case 2: case 4: case 6: case 7: case 9: case 11:return 31;\n\tcase 3: case 5: case 8: case 10: return 30;\n\tcase 1: return (isLeapYear(year) ? 29 : 28);\n\tdefault: throw \"days_in_month: invalid monthIndex: \" + monthIndex;\n\t}\n}\n\n// Utility: Add some months or years to a date\nfunction dateAddMonths(date, monthDiff, yearDiff) {\n\tyearDiff = yearDiff || 0;\n\tvar newMonth = date.getMonth() + Math.round(monthDiff);\n\tvar newYear = date.getFullYear() + Math.round(yearDiff);\n\n\tvar yearShift = ((newMonth < 0) ? -Math.floor(-(newMonth-11)/12) : Math.floor(newMonth/12));\n\tnewYear += yearShift;\n\tnewMonth -= 12*yearShift;\n\n\treturn new Date(newYear, newMonth,\n\t\tMath.min(date.getDate(), daysInMonth(newYear, newMonth)),\n\t\tdate.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\n\n// Utility: Get date difference in whole years and months\nfunction dateDelta(date1, date2) {\n\tif (date2.getTime() < date1.getTime())\n\t{\n\t\tvar d = dateDelta(date2, date1);\n\t\treturn {years: -d.years, months: -d.months};\n\t}\n\tvar dMonths = 12*(date2.getYear()-date1.getYear()) + (date2.getMonth()-date1.getMonth());\n\tif (date2.getDate() < date1.getDate()) dMonths -= 1;\n\tvar dYears = Math.floor(dMonths/12);\n\t//dMonths -= dYears*12;\n\t/*var dDays = (new Date(\n\t\tdate1.getFullYear()+dYears, date1.getMonth()+dMonths, date2.getDate(),\n\t\tdate2.getHours(), date2.getMinutes(), date2.getSeconds(), date2.getMilliseconds()\n\t\t).getTime() - date1.getTime()) / MS_PER_DAY;*/\n\treturn {years: dYears, months: dMonths};\n}\n\n\n// Get the current time\nexports.now = function() {return new Date(Date.now());};\n\n// Decompose dates\nexports.year = function(d) {return (d.getFullYear());};\nexports.year.inCast = 'D';\nexports.month = function(d) {return (d.getMonth()+1);};\nexports.month.inCast = 'D';\nexports.day = function(d) {return (d.getDate());};\nexports.day.inCast = 'D';\nexports.hour = function(d) {return (d.getHours());};\nexports.hour.inCast = 'D';\nexports.minute = function(d) {return (d.getMinutes());};\nexports.minute.inCast = 'D';\nexports.second = function(d) {return (d.getSeconds());};\nexports.second.inCast = 'D';\nexports.millisecond = function(d) {return (d.getMilliseconds());};\nexports.millisecond.inCast = 'D';\n\n// Week functions\nexports.weekday = function(d) {return (d.getDay()+1);};\nexports.weekday.inCast = 'D';\nexports.weeknum = function(d) {return (isoWeekOfYear(d, 1));};\nexports.weeknum.inCast = 'D';\nexports.isoweekday = function(d) {return ((d.getDay()+6) % 7 + 1);};\nexports.isoweekday.inCast = 'D';\nexports.isoweeknum = function(d) {return (isoWeekOfYear(d));};\nexports.isoweeknum.inCast = 'D';\n\n\n/*\n\tDate math\n*/\nfunction makeTimeDiffFunction(milliseconds) {\n\tvar f = function(a, b) {return (b.getTime() - a.getTime()) / milliseconds;};\n\tf.inCast = 'DD';\n\treturn f;\n}\nfunction makeTimeAddFunction(milliseconds) {\n\tvar f = function(a, b) {return new Date(a.getTime() + b * milliseconds);};\n\tf.inCast = 'DN';\n\treturn f;\n}\n\nexports.years = function(a, b) {return dateDelta(a, b).years;};\nexports.years.inCast = 'DD';\nexports.months = function(a, b) {return dateDelta(a, b).months;};\nexports.months.inCast = 'DD';\nexports.days = makeTimeDiffFunction(MS_PER_DAY);\nexports.hours = makeTimeDiffFunction(MS_PER_HOUR);\nexports.minutes = makeTimeDiffFunction(MS_PER_MINUTE);\nexports.seconds = makeTimeDiffFunction(MS_PER_SECOND);\nexports.milliseconds = makeTimeDiffFunction(1);\n\nexports.add_years = function(a, b) {return dateAddMonths(a, 0, b);};\nexports.add_years.inCast = 'DN';\nexports.add_months = function(a, b) {return dateAddMonths(a, b);};\nexports.add_months.inCast = 'DN';\nexports.add_days = makeTimeAddFunction(MS_PER_DAY);\nexports.add_hours = makeTimeAddFunction(MS_PER_HOUR);\nexports.add_minutes = makeTimeAddFunction(MS_PER_MINUTE);\nexports.add_seconds = makeTimeAddFunction(MS_PER_SECOND);\nexports.add_milliseconds = makeTimeAddFunction(1);\n\nexports.is_leap_year = function(year) {return (isLeapYear(year));};\nexports.is_leap_year.inCast = 'N';\nexports.days_in_year = function(year) {return (daysInYear(year));};\nexports.days_in_year.inCast = 'N';\nexports.days_in_month = function(yr, mon) {return (daysInMonth(yr, mon-1));};\nexports.days_in_month.inCast = 'NN';\n\n/*exports.datedif = function(a, b, c) {\n\tswitch (c.toUpperCase())\n\t{\n\tcase \"D\": return ((b.getTime() - a.getTime()) / MS_PER_DAY);\n\tcase \"M\": {var d=dateDelta(a, b); return d.months+12*d.years;}\n\tcase \"Y\": return dateDelta(a, b).years;\n\tcase \"YM\": return dateDelta(a, b).months;\n\tcase \"MD\": return dateDelta(a, b).days;\n\t}\n};\nexports.datedif.inCast = 'DDT';*/\n\n\n// Parse TiddlyWiki date\nexports.tw_date = function(timestamp) {\n\tvar date = $tw.utils.parseDate(timestamp);\n\tif (!date) throw \"Bad timestamp: \\\"\" + date + \"\\\"\";\n\treturn (date);\n};\nexports.tw_date.inCast = 'T';\n\n// Stringify as TiddlyWiki date\nexports.to_tw_date = function(date) {\n\treturn $tw.utils.stringifyDate(date);\n};\nexports.to_tw_date.inCast = 'D';\n\n// Create ISO date\nexports.make_date = function(year, month, day) {\n\treturn (new Date(year, month-1, day));\n};\nexports.make_date.inCast = 'NNN';\n\n// Create ISO time\nexports.make_time = function(hour, minute, second) {\n\treturn (new Date(0, 0, 0, hour, minute, second));\n};\nexports.make_time.inCast = 'NNN';\n\n// Create from julian\nexports.julian = function(julian) {\n\treturn (new Date((julian - UNIX_EPOCH_JULIAN_DAY) * MS_PER_DAY));\n};\nexports.julian.inCast = 'N';\n\n// Convert to julian\nexports.to_julian = function(date) {\n\treturn (UNIX_EPOCH_JULIAN_DAY + (date.getTime() / MS_PER_DAY));\n};\nexports.to_julian.inCast = 'D';\n\nexports.time = exports.make_time;\n\n\n// Cast the incoming value into a date.\nfunction interpret_date(a) {\n\tif (a instanceof Date) return a;\n\treturn exports.tw_date(a);\n}\ninterpret_date.inCast = 'D';\n\n\n// Consruct a date from a TiddlyWiki timestamp or a set of parts\nexports.date = {\n\tmin_args: 1, max_args: 3,\n\tselect: function(operands) {\n\t\tswitch (operands.length) {\n\t\tcase 1: return interpret_date;\n\t\tcase 3: return exports.make_date;\n\t\tdefault: throw \"Bad arguments to DATE. Should be (timestamp) or (year, month, day).\";\n\t\t}\n\t}\n};\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/datetime.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171217192149101",
"created": "20171217192129179"
},
"$:/plugins/ebalster/formula/functions/logic.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Node = require(\"$:/plugins/ebalster/formula/nodes.js\").Node;\n\n\n// Constants\nexports.true = function() {return true;};\nexports.false = function() {return false;};\n\nexports.true.isConstant = true;\nexports.false.isConstant = true;\n\n// Logical operators\nexports.not = function(a) {return !a;};\nexports.not.inCast = 'B';\nexports.and = function(a, b) {return a && b;};\nexports.and.inCast = 'BB';\nexports.or = function(a, b) {return a || b;};\nexports.or .inCast = 'BB';\nexports.xor = function(a, b) {return a ? !b : b;};\nexports.xor.inCast = 'BB';\n\n// Ternary\nfunction IfNode(pred, tval, fval) {\n\tthis.pred = pred;\n\tthis.tval = tval;\n\tthis.fval = fval;\n}\nIfNode.prototype = new Node();\nIfNode.prototype.name = \"if\";\nIfNode.prototype.compute = (function(ctx) {\n\treturn (this.pred.computeBool(ctx) ? this.tval.compute(ctx) : this.fval.compute(ctx));\n});\nexports.if = {\n\tmin_args: 3, max_args: 3,\n\tconstruct: function(operands) {\n\t\treturn new IfNode(operands[0], operands[1], operands[2]);\n\t}\n};\n\n\n// IFERROR\n/*exports.iferror = {\n\tmin_args = 2, max_args = 2,\n\tfunc = function(a, b) {\n\tselect: function(operands) {\n\t\ttry {return a.compute();}\n\t\tcatch (err) {return b.compute();}\n\t}\n\t};*/\n\n\n// SWITCH (variadic)\nexports.switch =\n{\n\tmin_args: 3,\n\tselect: function(operands)\n\t{\n\t\tswitch (operands.length % 2)\n\t\t{\n\t\tdefault:\n\t\tcase 0: return function(a) // Switch with default\n\t\t\t{\n\t\t\t\tvar value = a;\n\t\t\t\tfor (var i = 1; i+1 < arguments.length; i += 2)\n\t\t\t\t\t{if (arguments[i] == value) return arguments[i+1];}\n\t\t\t\treturn arguments[arguments.length-1];\n\t\t\t};\n\t\tcase 1: return function(a) // Switch, no default\n\t\t\t{\n\t\t\t\tvar value = a;\n\t\t\t\tfor (var i = 1; i+1 < arguments.length; i += 2)\n\t\t\t\t\t{if (arguments[i] == value) return arguments[i+1];}\n\t\t\t\treturn undefined;\n\t\t\t};\n\t\t}\n\t}\n};\n\n// CHOOSE (variadic)\nexports.choose = function(a, b)\n{\n\tvar index = Math.floor(a);\n\tvar result = arguments[index];\n\tif (index < 1 || !result) return undefined;\n\treturn result;\n};\nexports.choose.inCast = 'N';\nexports.choose.variadic = true;\n\n// IFS function (variadic)\nfunction ifsFunc() {\n\tfor (var i = 0; i < arguments.length; i += 2)\n\t\t{if (arguments[i]) return arguments[i+1];}\n\treturn undefined;\n};\nifsFunc.inCast = '+B_';\n\nexports.ifs =\n{\n\tmin_args : 2,\n\tinput: '+B_',\n\tselect : function(operands) {\n\t\tif (operands.length % 2 !== 0) throw \"Odd number of arguments to IFS\";\n\t\treturn ifsFunc;\n\t}\n};\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/logic.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171214060456114",
"created": "20171214054240274"
},
"$:/plugins/ebalster/formula/functions/math.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Coerce = require(\"$:/plugins/ebalster/formula/coerce.js\");\n\n\n// Constants\nexports.pi = function() {return (Math.PI);};\nexports._e = function() {return (Math.E);};\n\nexports.pi.isConstant = true;\nexports._e.isConstant = true;\n\n\n// Random\nexports.rand = function() {return Math.random();};\nexports.randbetween = function(a, b) {return (a+(b-a)*Math.random());};\nexports.randbetween.inCast = 'NN';\nexports.random = exports.rand;\n\n\n// Sign and absolute value\nexports.abs = function(a) {return Math.abs(a);};\nexports.abs.inCast = 'N';\nexports.sign = function(x) {return (((x > 0) - (x < 0)) || +x);};\nexports.sign.inCast = 'N';\n\n// Min/max\nexports.min = function(a)\n{\n\tvar min = a;\n\tfor (var i = 1; i < arguments.length; ++i) min = Math.min(min, arguments[i]);\n\treturn min;\n};\nexports.min.variadic = true;\nexports.min.inCast = '+N';\n\nexports.max = function(a)\n{\n\tvar max = a;\n\tfor (var i = 1; i < arguments.length; ++i) max = Math.max(max, arguments[i]);\n\treturn max;\n};\nexports.max.variadic = true;\nexports.max.inCast = '+N';\n\nexports.clamp = function(a, min, max) {\n\treturn (Math.min(Math.max(a, min), max));\n};\nexports.clamp.inCast = 'NNN';\n\n\n/*\n\tSeries arithmetic\n*/\nfunction Count(a) {\n\tif (a instanceof Array) {\n\t\tvar n = 0;\n\t\tfor (var i = 0; i < a.length; ++i) n += Count(a[i]);\n\t\treturn n;\n\t}\n\treturn 1;\n}\nfunction Sum(a) {\n\tif (a instanceof Array) {\n\t\tvar n = 0;\n\t\tfor (var i = 0; i < a.length; ++i) n += Sum(a[i]);\n\t\treturn n;\n\t}\n\treturn Coerce.ToNum(a,this);\n}\nfunction Product(a) {\n\tif (a instanceof Array) {\n\t\tvar n = 1;\n\t\tfor (var i = 0; i < a.length; ++i) n *= Product(a[i]);\n\t\treturn n;\n\t}\n\treturn Coerce.ToNum(a,this);\n}\nfunction Average(a) {\n\treturn Sum(a) / Count(a);\n}\n\nfunction GenSeriesFunc(func) {\n\treturn {\n\t\tmin_args : 1,\n\t\tselect : function(operands) {\n\t\t\tswitch (operands.length) {\n\t\t\tcase 1: return func;\n\t\t\tdefault: return function() {return func(Array.prototype.slice.call(arguments));};\n\t\t\t}\n\t\t}\n\t};\n}\n\nexports.sum = GenSeriesFunc(Sum);\nexports.average = GenSeriesFunc(Average);\nexports.product = GenSeriesFunc(Product);\n\n\n/*\n\tExponential\n*/\n\n// Exponentiation and logarithm\nexports.pow = function(a, b) {return (Math.pow(a, b));};\nexports.pow.inCast = 'NN';\nexports.log = function(a, b) {return (Math.log(a) / Math.log(b));};\nexports.log.inCast = 'NN';\nexports.exp = function(a) {return (Math.exp(a));};\nexports.exp.inCast = 'N';\nexports.ln = function(a) {return (Math.log(a));};\nexports.ln.inCast = 'N';\nexports.log2 = function(a) {return (Math.log2(a));};\nexports.log2.inCast = 'N';\nexports.log10 = function(a) {return (Math.log10(a));};\nexports.log10.inCast = 'N';\n\nexports.power = exports.pow;\n\n// Precise exponentiation and logarithm\nexports.expm1 = function(a) {return (Math.expm1(a));};\nexports.expm1.inCast = 'N';\nexports.log1p = function(a) {return (Math.log1p(a));};\nexports.log1p.inCast = 'N';\n\n// Roots\nexports.sqrt = function(a) {return (Math.sqrt(a));};\nexports.sqrt.inCast = 'N';\nexports.cbrt = function(a) {return (Math.cbrt(a));};\nexports.cbrt.inCast = 'N';\n\n\n/*\n\tTrigonometry\n*/\n\n// Conversion\nexports.radians = function(a) {return (Math.PI*a/180);};\nexports.radians.inCast = 'N';\nexports.degrees = function(a) {return (180*a/Math.PI);};\nexports.degrees.inCast = 'N';\n\n// Trigonometry\nexports.sin = function(a) {return ( Math.sin(a));};\nexports.sin.inCast = 'N';\nexports.cos = function(a) {return ( Math.cos(a));};\nexports.cos.inCast = 'N';\nexports.tan = function(a) {return ( Math.tan(a));};\nexports.tan.inCast = 'N';\nexports.csc = function(a) {return (1/Math.sin(a));};\nexports.csc.inCast = 'N';\nexports.sec = function(a) {return (1/Math.cos(a));};\nexports.sec.inCast = 'N';\nexports.cot = function(a) {return (1/Math.tan(a));};\nexports.cot.inCast = 'N';\n\n// Inverse Trigonometry\nexports.asin = function(a) {return (Math.asin( a));};\nexports.asin.inCast = 'N';\nexports.acos = function(a) {return (Math.acos( a));};\nexports.acos.inCast = 'N';\nexports.atan = function(a) {return (Math.atan( a));};\nexports.atan.inCast = 'N';\nexports.acsc = function(a) {return (Math.asin(1/a));};\nexports.acsc.inCast = 'N';\nexports.asec = function(a) {return (Math.acos(1/a));};\nexports.asec.inCast = 'N';\nexports.acot = function(a) {return (Math.atan(1/a));};\nexports.acot.inCast = 'N';\nexports.atan2 = function(y,x) {return (Math.atan2(y, x));};\nexports.atan2.inCast = 'NN';\n\n// Hyperbolic Trigonometry\nexports.sinh = function(a) {return ( Math.sinh(a));};\nexports.sinh.inCast = 'N';\nexports.cosh = function(a) {return ( Math.cosh(a));};\nexports.cosh.inCast = 'N';\nexports.tanh = function(a) {return ( Math.tanh(a));};\nexports.tanh.inCast = 'N';\nexports.csch = function(a) {return (1/Math.sinh(a));};\nexports.csch.inCast = 'N';\nexports.sech = function(a) {return (1/Math.cosh(a));};\nexports.sech.inCast = 'N';\nexports.coth = function(a) {return (1/Math.tanh(a));};\nexports.coth.inCast = 'N';\n\n// Inverse Hyperbolic Trigonometry\nexports.asinh = function(a) {return (Math.asinh( a));};\nexports.asinh.inCast = 'N';\nexports.acosh = function(a) {return (Math.acosh( a));};\nexports.acosh.inCast = 'N';\nexports.atanh = function(a) {return (Math.atanh( a));};\nexports.atanh.inCast = 'N';\nexports.acsch = function(a) {return (Math.asinh(1/a));};\nexports.acsch.inCast = 'N';\nexports.asech = function(a) {return (Math.acosh(1/a));};\nexports.asech.inCast = 'N';\nexports.acoth = function(a) {return (Math.atanh(1/a));};\nexports.acoth.inCast = 'N';\n\n/*\n\tRounding, ceiling and floor functions.\n\t\tSpecial measures were taken to reproduce the conventions.\n*/\n\nvar signedFloor = Math.trunc || function(n) {return (n<0) ? Math.ceil (n) : Math.floor(n);};\nvar signedCeil = function(n) {return (n<0) ? Math.floor(n) : Math.ceil (n);};\n\nfunction genCeilFloor(func) {\n\tvar by1 = function(a) {return func(a);},\n\t\tbyN = function(a, b) {var prec = b; return (func(a/prec) * prec);};\n\tby1.inCast = 'NN';\n\tbyN.inCast = 'NN';\n\treturn {\n\t\tmin_args : 1, max_args : 2,\n\t\tinput: 'NN',\n\t\tselect: function(operands) {\n\t\t\tswitch (operands.length)\n\t\t\t{\n\t\t\tcase 1: return by1;\n\t\t\tcase 2: return byN;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction genRound(func) {\n\tvar lndigit = Math.log(0.1);\n\tvar by1 = function(a) {return func(a);},\n\t\tbyN = function(a, b) {var prec = Math.exp(lndigit*b); return (func(a/prec) * prec);};\n\tby1.inCast = 'NN';\n\tbyN.inCast = 'NN';\n\treturn {\n\t\tmin_args : 1, max_args : 2,\n\t\tinput: 'NN',\n\t\tselect: function(operands) {\n\t\t\tswitch (operands.length)\n\t\t\t{\n\t\t\tcase 1: return by1;\n\t\t\tcase 2: return byN;\n\t\t\t}\n\t\t}\n\t};\n}\n\nexports.floor = genCeilFloor(Math.floor);\nexports.ceil = genCeilFloor(Math.ceil);\n//exports.floor_precise = genCeilFloor(Math.floor);\n//exports.ceil_precise = genCeilFloor(Math.ceil);\nexports.round = genRound(Math.round);\nexports.roundup = genRound(signedCeil);\nexports.rounddown = genRound(signedFloor);\nexports.trunc = exports.rounddown;\n\n// Related functions\nexports.fract = function(a) {return (a-signedFloor(a));};\nexports.fract.inCast = 'NN';\nexports.modulo = function(a,b) {return (a-b*Math.floor(a/b));};\nexports.modulo.inCast = 'NN';\n\nexports.mod = exports.modulo;\n\n\n/*\n\tInterpolation\n*/\nexports.mix = function(a,b,m) {return (a + (b-a) * m);};\nexports.mix.inCast = 'NNN';\n\nexports.step = function(e,x) {return ((x<e) ? 0.0 : 1.0);};\nexports.step.inCast = 'NN';\n\nexports.smoothstep = function(e0,e1,x) {\n\tif (x < e0) return (0.0);\n\tif (x > e1) return (1.0);\n\tx = (x-e0) / (e1-e0);\n\treturn (3*x*x - 2*x*x*x);\n};\nexports.smoothstep.inCast = 'NNN';\n\n\n/*\n\tAlgorithms\n*/\nexports.gcd = function(a,b) {\n\ta = Math.abs(Math.round(a));\n\tb = Math.abs(Math.round(b));\n\tif (b > a) {var temp = a; a = b; b = temp;}\n\tvar limit = 1000;\n\twhile (true) {\n\t\tif (b == 0) return a;\n\t\ta %= b;\n\t\tif (a == 0) return b;\n\t\tb %= a;\n\t\tif (--limit < 0) throw \"GCD function is nonterminal!\";\n\t}\n};\nexports.gcd.inCast = 'NN';\n\nexports.lcm = function(a,b) {\n\ta = Math.abs(Math.round(a));\n\tb = Math.abs(Math.round(b));\n\treturn (!a || !b) ? 0 : Math.abs((a * b) / exports.gcd(a, b));\n};\nexports.lcm.inCast = 'NN';\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/math.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171214171708994",
"created": "20171214171454666"
},
"$:/plugins/ebalster/formula/functions/regexp.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\n// Compile regex. TODO: Precompile these where possible\n/*var TW_RX_FLAGS = /^\\(\\?[a-z]*\\)|\\(\\?[a-z]*\\)$/i;\n\nfunction tw_regex(rx_str, defaultFlags) {\n\tif (!rx_str) throw \"Empty regular expression\";\n\tvar flagPart = TW_RX_FLAGS.exec(rx_str);\n\tif (flagPart) {\n\t\tvar flagLen = flagPart[0].length;\n\t\tvar flags = flagPart[0].substr(2, flagPart[0].length-3);\n\t\tif (flagPart.index == 0) return new RegExp(rx_str.substr(flagLen), flags);\n\t\telse return new RegExp(rx_str.substr(0, rx_str.length-flagLen), flags);\n\t}\n\treturn new RegExp(rx_str, defaultFlags);\n}*/\n\n\n// Regex replace\nexports.regexreplace = function(s, rx, b) {\n\t//rx = tw_regex(rx, \"g\");\n\trx.lastIndex = 0;\n\treturn s.replace(rx, b);\n};\nexports.regexreplace.inCast = 'TRT';\n\n// Regex match\nexports.regexmatch = function(s, rx) {\n\t//rx = tw_regex(rx, \"\");\n\trx.lastIndex = 0;\n\treturn rx.test(s);\n};\nexports.regexmatch.inCast = 'TR';\n\n// Regex extract\nfunction regexextract(s, rx) {\n\t//rx = tw_regex(rx, \"g\");\n\trx.lastIndex = 0;\n\ts = s;\n\tvar captureIndex = arguments[2] || 0;\n\tvar matches = [];\n\tvar match;\n\twhile ((match = rx.exec(s)) != null) {\n\t\tif (match[0].length == 0) ++rx.lastIndex;\n\t\tmatches.push(match[captureIndex] || \"\");\n\t\tif (!rx.global) break;\n\t}\n\treturn matches;\n}\nregexextract.inCast = 'TRN';\n\nexports.regexextract = {\n\tmin_args: 2, max_args: 3,\n\tselect: function(operands) {return regexextract;}\n};\n\n// Regex extract, single argument\nfunction regexextract1(s, rx, dfl) {\n\t//rx = tw_regex(rx, \"\");\n\trx.lastIndex = 0;\n\ts = s;\n\tvar captureIndex = arguments[3] || 0;\n\tvar match = rx.exec(s);\n\treturn (match && match[captureIndex]) ? match[captureIndex] : dfl;\n}\nregexextract1.inCast = 'TRTN';\n\nexports.regexextract1 = {\n\tmin_args: 3, max_args: 4,\n\tselect: function(operands) {return regexextract1;}\n};\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/regexp.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171220230855457",
"created": "20171220230845098"
},
"$:/plugins/ebalster/formula/functions/strings.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Coerce = require(\"$:/plugins/ebalster/formula/coerce.js\");\n\n\n// Cast to text. Second argument not yet supported.\nexports.t = function(a) {return a;};\nexports.t.inCast = 'T';\n\nfunction t_format(a, format) {return a;}\nt_format.inCast = 'TT';\n\nexports.text = {\n\tmin_args: 1, max_args: 1,\n\tinput: 'TT',\n\tselect: function(operands) {\n\t\tif (operands.length == 1) return exports.t;\n\t\treturn t_format;\n\t}\n};\n\n// Cast string to number.\nexports.value = function(a) {return a;};\nexports.inCast = 'N';\n\n// Array to string\nvar JoinFunc = function(delimiter, ignore_empty, array, startIndex) {\n\tvar join = \"\", part;\n\tfor (var i = startIndex; i < array.length; ++i)\n\t{\n\t\tvar arg = array[i];\n\t\tif (arg instanceof Array) {\n\t\t\tpart = JoinFunc(delimiter, ignore_empty, arg, 0);\n\t\t}\n\t\telse {\n\t\t\tpart = Coerce.ToText(arg,this);\n\t\t}\n\t\tif (part.length || !ignore_empty) {\n\t\t\tif (join.length) join += delimiter;\n\t\t\tjoin += part;\n\t\t}\n\t}\n\treturn join;\n};\n\n// Join\nexports.join = function(delimiter) {\n\treturn JoinFunc.call(this, delimiter, false, arguments, 1);\n};\nexports.join.variadic = true;\nexports.join.inCast = 'T';\n\n// Textjoin\nexports.textjoin = function(delimiter, ignore_empty) {\n\treturn JoinFunc.call(this, delimiter, ignore_empty, arguments, 2);\n};\nexports.textjoin.variadic = true;\nexports.textjoin.inCast = 'T';\n\n// Split string to array\nexports.split = function(str, delimiter) {\n\treturn str.split(delimiter);\n};\nexports.split.inCast = 'T';\n\n// String length\nexports.len = function(str) {return str.length;};\nexports.len.inCast = 'T';\n\n// String exact match\nexports.exact = function(a, b) {return a === b;};\nexports.exact.inCast = 'TT';\n\n\n// Substrings\nexports.mid = function(str, i, n) {return str.substr(i-1, n);};\nexports.exact.inCast = 'TNN';\n\nexports.substr = exports.mid;\n\n\n// Substitute\nexports.substitute = function(s, f, r) {return s.split(f).join(r);};\nexports.substitute.inCast = 'TTT';\n\n// Replace (N/I)\n//exports.replace = function(s, p, l, r) {return (s.splice(a, b));};\n\n\n// Concatenate\nexports.cat = function(a, b) {return a + b;};\nexports.cat.inCast = 'TT';\n\n// Trim space\nexports.trim = function(a) {return a.split(/^\\s+|\\s+$/g).join(\"\");};\nexports.trim.inCast = 'T';\n\n\n// Aliases\nexports.concatenate = exports.cat;\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/strings.js",
"tags": "",
"module-type": "formula-function",
"modified": "20171213003237206",
"created": "20171213003135495"
},
"$:/plugins/ebalster/formula/functions/wiki.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Nodes = require(\"$:/plugins/ebalster/formula/nodes.js\");\n\n\n// Get variable string by name.\nexports.transclude = {\n\tmin_args: 1, max_args: 2,\n\tconstruct: function(operands) {\n\t\tswitch (operands.length) {\n\t\t\tcase 1: return new Nodes.TranscludeText(operands[0]);\n\t\t\tcase 2: return new Nodes.TranscludeField(operands[0], operands[1]);\n\t\t}\n\t}\n};\n\n// Transclude tiddler text string by name.\nexports.transclude_index = {\n\tmin_args: 2, max_args: 2,\n\tconstruct: function(operands) {return new Nodes.TranscludeIndex(operands[0], operands[1]);}\n};\n\n// Transclude field string by name.\nexports.variable = {\n\tmin_args: 1, max_args: 1,\n\tconstruct: function(operands) {return new Nodes.Variable(operands[0]);}\n};\n\n// Interpret value as a datum.\nexports.datum = {\n\tmin_args: 1, max_args: 1,\n\tconstruct: function(operands) {return new Nodes.Datum(operands[0]);}\n};\n\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/functions/wiki.js",
"tags": "",
"module-type": "formula-function",
"modified": "20180108012007186",
"created": "20180108011928370"
},
"$:/plugins/ebalster/formula/lib/numeral.js": {
"text": "/*! @preserve\n * numeral.js\n * version : 2.0.6\n * author : Adam Draper\n * license : MIT\n * http://adamwdraper.github.com/Numeral-js/\n */\n!function(a,b){\"function\"==typeof define&&define.amd?define(b):\"object\"==typeof module&&module.exports?module.exports=b():a.numeral=b()}(this,function(){function a(a,b){this._input=a,this._value=b}var b,c,d=\"2.0.6\",e={},f={},g={currentLocale:\"en\",zeroFormat:null,nullFormat:null,defaultFormat:\"0,0\",scalePercentBy100:!0},h={currentLocale:g.currentLocale,zeroFormat:g.zeroFormat,nullFormat:g.nullFormat,defaultFormat:g.defaultFormat,scalePercentBy100:g.scalePercentBy100};return b=function(d){var f,g,i,j;if(b.isNumeral(d))f=d.value();else if(0===d||\"undefined\"==typeof d)f=0;else if(null===d||c.isNaN(d))f=null;else if(\"string\"==typeof d)if(h.zeroFormat&&d===h.zeroFormat)f=0;else if(h.nullFormat&&d===h.nullFormat||!d.replace(/[^0-9]+/g,\"\").length)f=null;else{for(g in e)if(j=\"function\"==typeof e[g].regexps.unformat?e[g].regexps.unformat():e[g].regexps.unformat,j&&d.match(j)){i=e[g].unformat;break}i=i||b._.stringToNumber,f=i(d)}else f=Number(d)||null;return new a(d,f)},b.version=d,b.isNumeral=function(b){return b instanceof a},b._=c={numberToFormat:function(a,c,d){var e,g,h,i,j,k,l,m=f[b.options.currentLocale],n=!1,o=!1,p=0,q=\"\",r=1e12,s=1e9,t=1e6,u=1e3,v=\"\",w=!1;if(a=a||0,g=Math.abs(a),b._.includes(c,\"(\")?(n=!0,c=c.replace(/[\\(|\\)]/g,\"\")):(b._.includes(c,\"+\")||b._.includes(c,\"-\"))&&(j=b._.includes(c,\"+\")?c.indexOf(\"+\"):0>a?c.indexOf(\"-\"):-1,c=c.replace(/[\\+|\\-]/g,\"\")),b._.includes(c,\"a\")&&(e=c.match(/a(k|m|b|t)?/),e=e?e[1]:!1,b._.includes(c,\" a\")&&(q=\" \"),c=c.replace(new RegExp(q+\"a[kmbt]?\"),\"\"),g>=r&&!e||\"t\"===e?(q+=m.abbreviations.trillion,a/=r):r>g&&g>=s&&!e||\"b\"===e?(q+=m.abbreviations.billion,a/=s):s>g&&g>=t&&!e||\"m\"===e?(q+=m.abbreviations.million,a/=t):(t>g&&g>=u&&!e||\"k\"===e)&&(q+=m.abbreviations.thousand,a/=u)),b._.includes(c,\"[.]\")&&(o=!0,c=c.replace(\"[.]\",\".\")),h=a.toString().split(\".\")[0],i=c.split(\".\")[1],k=c.indexOf(\",\"),p=(c.split(\".\")[0].split(\",\")[0].match(/0/g)||[]).length,i?(b._.includes(i,\"[\")?(i=i.replace(\"]\",\"\"),i=i.split(\"[\"),v=b._.toFixed(a,i[0].length+i[1].length,d,i[1].length)):v=b._.toFixed(a,i.length,d),h=v.split(\".\")[0],v=b._.includes(v,\".\")?m.delimiters.decimal+v.split(\".\")[1]:\"\",o&&0===Number(v.slice(1))&&(v=\"\")):h=b._.toFixed(a,0,d),q&&!e&&Number(h)>=1e3&&q!==m.abbreviations.trillion)switch(h=String(Number(h)/1e3),q){case m.abbreviations.thousand:q=m.abbreviations.million;break;case m.abbreviations.million:q=m.abbreviations.billion;break;case m.abbreviations.billion:q=m.abbreviations.trillion}if(b._.includes(h,\"-\")&&(h=h.slice(1),w=!0),h.length<p)for(var x=p-h.length;x>0;x--)h=\"0\"+h;return k>-1&&(h=h.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+m.delimiters.thousands)),0===c.indexOf(\".\")&&(h=\"\"),l=h+v+(q?q:\"\"),n?l=(n&&w?\"(\":\"\")+l+(n&&w?\")\":\"\"):j>=0?l=0===j?(w?\"-\":\"+\")+l:l+(w?\"-\":\"+\"):w&&(l=\"-\"+l),l},stringToNumber:function(a){var b,c,d,e=f[h.currentLocale],g=a,i={thousand:3,million:6,billion:9,trillion:12};if(h.zeroFormat&&a===h.zeroFormat)c=0;else if(h.nullFormat&&a===h.nullFormat||!a.replace(/[^0-9]+/g,\"\").length)c=null;else{c=1,\".\"!==e.delimiters.decimal&&(a=a.replace(/\\./g,\"\").replace(e.delimiters.decimal,\".\"));for(b in i)if(d=new RegExp(\"[^a-zA-Z]\"+e.abbreviations[b]+\"(?:\\\\)|(\\\\\"+e.currency.symbol+\")?(?:\\\\))?)?$\"),g.match(d)){c*=Math.pow(10,i[b]);break}c*=(a.split(\"-\").length+Math.min(a.split(\"(\").length-1,a.split(\")\").length-1))%2?1:-1,a=a.replace(/[^0-9\\.]+/g,\"\"),c*=Number(a)}return c},isNaN:function(a){return\"number\"==typeof a&&isNaN(a)},includes:function(a,b){return-1!==a.indexOf(b)},insert:function(a,b,c){return a.slice(0,c)+b+a.slice(c)},reduce:function(a,b){if(null===this)throw new TypeError(\"Array.prototype.reduce called on null or undefined\");if(\"function\"!=typeof b)throw new TypeError(b+\" is not a function\");var c,d=Object(a),e=d.length>>>0,f=0;if(3===arguments.length)c=arguments[2];else{for(;e>f&&!(f in d);)f++;if(f>=e)throw new TypeError(\"Reduce of empty array with no initial value\");c=d[f++]}for(;e>f;f++)f in d&&(c=b(c,d[f],f,d));return c},multiplier:function(a){var b=a.toString().split(\".\");return b.length<2?1:Math.pow(10,b[1].length)},correctionFactor:function(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var d=c.multiplier(b);return a>d?a:d},1)},toFixed:function(a,b,c,d){var e,f,g,h,i=a.toString().split(\".\"),j=b-(d||0);return e=2===i.length?Math.min(Math.max(i[1].length,j),b):j,g=Math.pow(10,e),h=(c(a+\"e+\"+e)/g).toFixed(e),d>b-e&&(f=new RegExp(\"\\\\.?0{1,\"+(d-(b-e))+\"}$\"),h=h.replace(f,\"\")),h}},b.options=h,b.formats=e,b.locales=f,b.locale=function(a){return a&&(h.currentLocale=a.toLowerCase()),h.currentLocale},b.localeData=function(a){if(!a)return f[h.currentLocale];if(a=a.toLowerCase(),!f[a])throw new Error(\"Unknown locale : \"+a);return f[a]},b.reset=function(){for(var a in g)h[a]=g[a]},b.zeroFormat=function(a){h.zeroFormat=\"string\"==typeof a?a:null},b.nullFormat=function(a){h.nullFormat=\"string\"==typeof a?a:null},b.defaultFormat=function(a){h.defaultFormat=\"string\"==typeof a?a:\"0.0\"},b.register=function(a,b,c){if(b=b.toLowerCase(),this[a+\"s\"][b])throw new TypeError(b+\" \"+a+\" already registered.\");return this[a+\"s\"][b]=c,c},b.validate=function(a,c){var d,e,f,g,h,i,j,k;if(\"string\"!=typeof a&&(a+=\"\",console.warn&&console.warn(\"Numeral.js: Value is not string. It has been co-erced to: \",a)),a=a.trim(),a.match(/^\\d+$/))return!0;if(\"\"===a)return!1;try{j=b.localeData(c)}catch(l){j=b.localeData(b.locale())}return f=j.currency.symbol,h=j.abbreviations,d=j.delimiters.decimal,e=\".\"===j.delimiters.thousands?\"\\\\.\":j.delimiters.thousands,k=a.match(/^[^\\d]+/),null!==k&&(a=a.substr(1),k[0]!==f)?!1:(k=a.match(/[^\\d]+$/),null!==k&&(a=a.slice(0,-1),k[0]!==h.thousand&&k[0]!==h.million&&k[0]!==h.billion&&k[0]!==h.trillion)?!1:(i=new RegExp(e+\"{2}\"),a.match(/[^\\d.,]/g)?!1:(g=a.split(d),g.length>2?!1:g.length<2?!!g[0].match(/^\\d+.*\\d$/)&&!g[0].match(i):1===g[0].length?!!g[0].match(/^\\d+$/)&&!g[0].match(i)&&!!g[1].match(/^\\d+$/):!!g[0].match(/^\\d+.*\\d$/)&&!g[0].match(i)&&!!g[1].match(/^\\d+$/))))},b.fn=a.prototype={clone:function(){return b(this)},format:function(a,c){var d,f,g,i=this._value,j=a||h.defaultFormat;if(c=c||Math.round,0===i&&null!==h.zeroFormat)f=h.zeroFormat;else if(null===i&&null!==h.nullFormat)f=h.nullFormat;else{for(d in e)if(j.match(e[d].regexps.format)){g=e[d].format;break}g=g||b._.numberToFormat,f=g(i,j,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,c,e){return a+Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([this._value,a],b,0)/d,this},subtract:function(a){function b(a,b,c,e){return a-Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([a],b,Math.round(this._value*d))/d,this},multiply:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)*Math.round(b*f)/Math.round(f*f)}return this._value=c.reduce([this._value,a],b,1),this},divide:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)/Math.round(b*f)}return this._value=c.reduce([this._value,a],b),this},difference:function(a){return Math.abs(b(this._value).subtract(a).value())}},b.register(\"locale\",\"en\",{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?\"th\":1===b?\"st\":2===b?\"nd\":3===b?\"rd\":\"th\"},currency:{symbol:\"$\"}}),function(){b.register(\"format\",\"bps\",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,c,d){var e,f=b._.includes(c,\" BPS\")?\" \":\"\";return a=1e4*a,c=c.replace(/\\s?BPS/,\"\"),e=b._.numberToFormat(a,c,d),b._.includes(e,\")\")?(e=e.split(\"\"),e.splice(-1,0,f+\"BPS\"),e=e.join(\"\")):e=e+f+\"BPS\",e},unformat:function(a){return+(1e-4*b._.stringToNumber(a)).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"]},c={base:1024,suffixes:[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"]},d=a.suffixes.concat(c.suffixes.filter(function(b){return a.suffixes.indexOf(b)<0})),e=d.join(\"|\");e=\"(\"+e.replace(\"B\",\"B(?!PS)\")+\")\",b.register(\"format\",\"bytes\",{regexps:{format:/([0\\s]i?b)/,unformat:new RegExp(e)},format:function(d,e,f){var g,h,i,j,k=b._.includes(e,\"ib\")?c:a,l=b._.includes(e,\" b\")||b._.includes(e,\" ib\")?\" \":\"\";for(e=e.replace(/\\s?i?b/,\"\"),h=0;h<=k.suffixes.length;h++)if(i=Math.pow(k.base,h),j=Math.pow(k.base,h+1),null===d||0===d||d>=i&&j>d){l+=k.suffixes[h],i>0&&(d/=i);break}return g=b._.numberToFormat(d,e,f),g+l},unformat:function(d){var e,f,g=b._.stringToNumber(d);if(g){for(e=a.suffixes.length-1;e>=0;e--){if(b._.includes(d,a.suffixes[e])){f=Math.pow(a.base,e);break}if(b._.includes(d,c.suffixes[e])){f=Math.pow(c.base,e);break}}g*=f||1}return g}})}(),function(){b.register(\"format\",\"currency\",{regexps:{format:/(\\$)/},format:function(a,c,d){var e,f,g,h=b.locales[b.options.currentLocale],i={before:c.match(/^([\\+|\\-|\\(|\\s|\\$]*)/)[0],after:c.match(/([\\+|\\-|\\)|\\s|\\$]*)$/)[0]};for(c=c.replace(/\\s?\\$\\s?/,\"\"),e=b._.numberToFormat(a,c,d),a>=0?(i.before=i.before.replace(/[\\-\\(]/,\"\"),i.after=i.after.replace(/[\\-\\)]/,\"\")):0>a&&!b._.includes(i.before,\"-\")&&!b._.includes(i.before,\"(\")&&(i.before=\"-\"+i.before),g=0;g<i.before.length;g++)switch(f=i.before[g]){case\"$\":e=b._.insert(e,h.currency.symbol,g);break;case\" \":e=b._.insert(e,\" \",g+h.currency.symbol.length-1)}for(g=i.after.length-1;g>=0;g--)switch(f=i.after[g]){case\"$\":e=g===i.after.length-1?e+h.currency.symbol:b._.insert(e,h.currency.symbol,-(i.after.length-(1+g)));break;case\" \":e=g===i.after.length-1?e+\" \":b._.insert(e,\" \",-(i.after.length-(1+g)+h.currency.symbol.length-1))}return e}})}(),function(){b.register(\"format\",\"exponential\",{regexps:{format:/(e\\+|e-)/,unformat:/(e\\+|e-)/},format:function(a,c,d){var e,f=\"number\"!=typeof a||b._.isNaN(a)?\"0e+0\":a.toExponential(),g=f.split(\"e\");return c=c.replace(/e[\\+|\\-]{1}0/,\"\"),e=b._.numberToFormat(Number(g[0]),c,d),e+\"e\"+g[1]},unformat:function(a){function c(a,c,d,e){var f=b._.correctionFactor(a,c),g=a*f*(c*f)/(f*f);return g}var d=b._.includes(a,\"e+\")?a.split(\"e+\"):a.split(\"e-\"),e=Number(d[0]),f=Number(d[1]);return f=b._.includes(a,\"e-\")?f*=-1:f,b._.reduce([e,Math.pow(10,f)],c,1)}})}(),function(){b.register(\"format\",\"ordinal\",{regexps:{format:/(o)/},format:function(a,c,d){var e,f=b.locales[b.options.currentLocale],g=b._.includes(c,\" o\")?\" \":\"\";return c=c.replace(/\\s?o/,\"\"),g+=f.ordinal(a),e=b._.numberToFormat(a,c,d),e+g}})}(),function(){b.register(\"format\",\"percentage\",{regexps:{format:/(%)/,unformat:/(%)/},format:function(a,c,d){var e,f=b._.includes(c,\" %\")?\" \":\"\";return b.options.scalePercentBy100&&(a=100*a),c=c.replace(/\\s?\\%/,\"\"),e=b._.numberToFormat(a,c,d),b._.includes(e,\")\")?(e=e.split(\"\"),e.splice(-1,0,f+\"%\"),e=e.join(\"\")):e=e+f+\"%\",e},unformat:function(a){var c=b._.stringToNumber(a);return b.options.scalePercentBy100?.01*c:c}})}(),function(){b.register(\"format\",\"time\",{regexps:{format:/(:)/,unformat:/(:)/},format:function(a,b,c){var d=Math.floor(a/60/60),e=Math.floor((a-60*d*60)/60),f=Math.round(a-60*d*60-60*e);return d+\":\"+(10>e?\"0\"+e:e)+\":\"+(10>f?\"0\"+f:f)},unformat:function(a){var b=a.split(\":\"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}})}(),b});",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/lib/numeral.js",
"module-type": "library",
"modified": "20180114171115244",
"created": "20180114171007227"
},
"$:/plugins/ebalster/formula/license": {
"text": "!!The MIT License (MIT)\n\nCopyright (c) 2017 Evan Balster\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/formula/license",
"tags": "",
"modified": "20171220211838536",
"created": "20171220071005710",
"caption": "license"
},
"$:/plugins/ebalster/formula/macros/formula.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Compute = require(\"$:/plugins/ebalster/formula/compute.js\");\n\n/*\n\tInformation about this macro\n*/\n\nexports.name = \"formula\";\nexports.params = [{\"name\": \"formula\"}];\n\n/*\nRun the macro\n*/\nexports.run = function(formula) {\n\n\ttry {\n\t\treturn Compute.evalFormula(formula, this);\n\t}\n\tcatch (err) {\n\t\treturn \"`\" + String(err) + \"`\";\n\t}\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/macros/formula.js",
"tags": "",
"module-type": "macro",
"modified": "20171212194124031",
"created": "20171210215758530"
},
"$:/plugins/ebalster/formula/nodes.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/formula/nodes.js\ntype: application/javascript\nmodule-type: macro\n\nLibrary defining computation \"nodes\" used to build compiled formulas.\nOperands represent some value within the formula: an expression, datum, operator, constant or query...\nOperands may be constant, allowing the formula compiler to optimize them away.\n\n\\*/\n(function(){\n\n\"use strict\";\n\nvar Coerce = require(\"$:/plugins/ebalster/formula/coerce.js\");\n\n\n// A Context has all the information necessary for computations.\nexports.Context = function(widget, formats, locals, depth, maxDepth) {\n\tthis.widget = widget;\n\tthis.formats = formats || {};\n\tthis.locals = locals || {};\n\tthis.depth = depth || 1;\n\tthis.maxDepth = maxDepth || 256;\n\tif (this.maxDepth < this.depth) throw \"Formula recursion exceeds limit of \" + this.maxDepth + \". Infinite regress?\";\n};\nexports.Context.prototype.sub = function() {return new exports.Context(this.widget,this.formats,null,this.depth+1,this.maxDepth);};\nexports.Context.prototype.let = function(locals) {return new exports.Context(this.widget,this.formats,locals,this.depth,this.maxDepth);};\nexports.Context.prototype.wiki = function() {return this.widget.wiki;};\nexports.Context.prototype.wikiVariable = function(name) {return this.widget.getVariable(name);};\n\n\nexports.Node = function() {\n};\nexports.Node.prototype.is_constant = false;\nexports.Node.prototype.name = \"unknown-operand\";\nexports.Node.prototype.toString = function() {return \"[Node \" + this.name + \"]\";};\n\n// Compute the Node's value.\nexports.Node.prototype.compute = function(ctx) {return undefined;};\n\n// Compute a specific type of value, with coercion if necessary.\nexports.Node.prototype.computeNum = function(ctx) {return Coerce.ToNum (this.compute(ctx), ctx);};\nexports.Node.prototype.computeText = function(ctx) {return Coerce.ToText (this.compute(ctx), ctx);};\nexports.Node.prototype.computeBool = function(ctx) {return Coerce.ToBool (this.compute(ctx), ctx);};\nexports.Node.prototype.computeDate = function(ctx) {return Coerce.ToDate (this.compute(ctx), ctx);};\nexports.Node.prototype.computeArray = function(ctx) {return Coerce.ToArray(this.compute(ctx), ctx);};\nexports.Node.prototype.computeFunc = function(ctx) {return Coerce.ToFunc (this.compute(ctx), ctx);};\n\n\n// An operand that just throws an error.\nexports.ThrowError = function(exception) {\n\tthis.exception = exception;\n};\nexports.ThrowError.prototype = new exports.Node();\nexports.ThrowError.prototype.name = \"error\";\nexports.ThrowError.prototype.compute = function(ctx)\n{\n\t// Throw up\n\tthrow this.exception;\n};\n\n// Scoped variable node.\nexports.ScopeVar = function(name) {\n\tthis.name = name;\n};\nexports.ScopeVar.prototype = new exports.Node();\n//exports.ScopeVar.prototype.name = \"scope-var\";\nexports.ScopeVar.prototype.compute = function(ctx) {return ctx.locals[this.name];};\n\n// Scoped variable assignment node.\nexports.LetVars = function(assigns, expr) {\n\tthis.assigns = assigns;\n\tthis.expr = expr;\n};\nexports.LetVars.prototype = new exports.Node();\nexports.LetVars.prototype.name = \"let\";\nexports.LetVars.prototype.compute = function(ctx) {\n\t// Each let-expression can access the ones before it.\n\tvar locals = Object.assign({}, ctx.locals);\n\tctx = ctx.let(locals);\n\tfor (var id in this.assigns) {\n\t\ttry {\n\t\t\tlocals[id] = this.assigns[id].compute(ctx);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow \"computing LET '\" + id + \"': \" + err;\n\t\t}\n\t}\n\treturn this.expr.compute(ctx);\n};\n\n// Call a function by reference.\nexports.CallFunc = function CallFunc(func, args) {\n\tthis.func = func;\n\tthis.args = args;\n};\nexports.CallFunc.prototype = new exports.Node();\nexports.CallFunc.prototype.name = \"function-builtin\";\nexports.CallFunc.prototype.compute = (function(ctx) {\n\t// Check the function parameters.\n\tvar func = this.func.computeFunc(ctx);\n\tif (this.args.length < func.min_args) throw \"Too few parameters for function\";\n\tif (this.args.length > func.max_args) throw \"Too many parameters for function\";\n\t// Compute arguments.\n\tvar vals = [];\n\tfor (var i = 0; i < this.args.length; ++i) vals.push(this.args[i].compute(ctx));\n\t// Call the function!\n\treturn func.apply(ctx, vals);\n});\n\n// JavaScript function call with possible coercion.\nexports.CallJS = function CallJS(func, args) {\n\tthis.func = func;\n\tthis.args = args;\n\tthis.coerce = Coerce.GetCoerceFuncs(func, args);\n\tthis.n_coerce = Math.min(this.args.length, this.coerce.length);\n};\nexports.CallJS.prototype = new exports.Node();\nexports.CallJS.prototype.name = \"function-builtin\";\nexports.CallJS.prototype.compute = function(ctx) {\n\tvar vals = [];\n\tvar i = 0;\n\tfor (; i < this.n_coerce; ++i) vals.push(this.coerce[i](this.args[i].compute(ctx), ctx));\n\tfor (; i < this.args.length; ++i) vals.push(this.args[i].compute(ctx));\n\treturn this.func.apply(ctx, vals);\n};\n\n// Call a function by reference.\nexports.ArrayDef = function ArrayDef(elems) {\n\tthis.elems = elems;\n};\nexports.ArrayDef.prototype = new exports.Node();\nexports.ArrayDef.prototype.name = \"function-builtin\";\nexports.ArrayDef.prototype.compute = (function(ctx) {\n\t// Compute elements.\n\tvar elems = [];\n\tfor (var i = 0; i < this.elems.length; ++i) elems.push(this.elems[i].compute(ctx));\n\treturn elems;\n});\n\n\n// Function declaration operand.\nexports.Function = function(func, captures) {\n\tthis.func = func;\n\tthis.captures = captures;\n};\nexports.Function.prototype = new exports.Node();\nexports.Function.prototype.name = \"function\";\nexports.Function.prototype.is_constant = true;\nexports.Function.prototype.compute = function(ctx) {\n\tthis.func.captured = {};\n\tif (this.captures) {\n\t\tfor (var name in this.captures) {\n\t\t\tthis.func.captured[name] = ctx.locals[name];\n\t\t}\n\t}\n\treturn this.func;\n};\n\n// String constant operand.\nexports.Text = function(value) {this.value = value;};\nexports.Text.prototype = new exports.Node();\nexports.Text.prototype.name = \"string\";\nexports.Text.prototype.is_constant = true;\nexports.Text.prototype.compute = function(ctx) {return this.value;};\n\n// Date constant operand.\nexports.Date = function(value) {this.value = value;};\nexports.Date.prototype = new exports.Node();\nexports.Date.prototype.name = \"date\";\nexports.Date.prototype.is_constant = true;\nexports.Date.prototype.compute = function(ctx) {return this.value;};\n\n// Boolean constant operand.\nexports.Bool = function(value) {this.value = value;};\nexports.Bool.prototype = new exports.Node();\nexports.Bool.prototype.name = \"boolean\";\nexports.Bool.prototype.is_constant = true;\nexports.Bool.prototype.compute = function(ctx) {return this.value;};\n\n// Number constant operand.\nexports.Number = function(value) {this.value = value;};\nexports.Number.prototype = new exports.Node();\nexports.Number.prototype.name = \"number\";\nexports.Number.prototype.is_constant = true;\nexports.Number.prototype.compute = function(ctx) {return this.value;};\n\n// Regex constant operand.\nexports.Regex = function(value) {this.value = value;};\nexports.Regex.prototype = new exports.Node();\nexports.Regex.prototype.name = \"regex\";\nexports.Regex.prototype.is_constant = true;\nexports.Regex.prototype.compute = function(ctx) {return this.value;};\n\n\nvar Compile = require(\"$:/plugins/ebalster/formula/compile.js\");\n\n\n// \"Automatic\" operand; a compiled string value\nexports.Datum = function(origin) {\n\tthis.origin = origin;\n\tthis.text = null;\n\tthis.op = null;\n};\nexports.Datum.prototype = new exports.Node();\nexports.Datum.prototype.name = \"automatic\";\n\nexports.Datum.prototype.compute = function(ctx) {\n\n\tvar newText = this.origin.computeText(ctx);\n\n\tif (newText != this.text)\n\t{\n\t\tthis.text = newText;\n\t\ttry {\n\t\t\tthis.op = Compile.compileDatum(newText);\n\t\t}\n\t\tcatch (err) {\n\t\t\t// Save the error\n\t\t\tthis.op = new exports.ThrowError(\n\t\t\t\terr + \"\\n source: \\\"\" + this.datum + \"\\\"\\n from \" + origin.name);\n\t\t}\n\t}\n\n\treturn this.op.compute(ctx.sub());\n};\n\n\n// Transcluded text operand.\nexports.TranscludeText = function(title) {\n\tthis.title = title;\n};\nexports.TranscludeText.prototype = new exports.Node();\nexports.TranscludeText.prototype.name = \"transclude\";\n\nexports.TranscludeText.prototype.compute = function(ctx) {\n\treturn ctx.wiki().getTiddlerText(this.title.computeText(ctx),\"\");\n};\n\n// Transcluded field operand.\nexports.TranscludeField = function(title, field) {\n\tthis.title = title;\n\tthis.field = field;\n};\nexports.TranscludeField.prototype = new exports.Node();\nexports.TranscludeField.prototype.name = \"transclude-field\";\n\nexports.TranscludeField.prototype.compute = function(ctx) {\n\tvar tiddler = ctx.wiki().getTiddler(this.title.computeText(ctx)),\n\t\tfield = this.field.computeText(ctx);\n\treturn (tiddler && $tw.utils.hop(tiddler.fields,field)) ? tiddler.getFieldString(field) : \"\";\n};\n\n// Transcluded index operand.\nexports.TranscludeIndex = function(title, index) {\n\tthis.title = title;\n\tthis.index = index;\n};\nexports.TranscludeIndex.prototype = new exports.Node();\nexports.TranscludeIndex.prototype.name = \"transclude-index\";\n\nexports.TranscludeIndex.prototype.compute = function(ctx) {\n\treturn ctx.wiki().extractTiddlerDataItem(\n\t\tthis.title.computeText(ctx),\n\t\tthis.index.computeText(ctx),\"\");\n};\n\n\n// Variable operand.\nexports.Variable = function(variable) {\n\tthis.variable = variable;\n};\nexports.Variable.prototype = new exports.Node();\nexports.Variable.prototype.name = \"variable\";\n\nexports.Variable.prototype.compute = function(ctx) {\n\treturn ctx.wikiVariable(this.variable.computeText(ctx)) || \"\";\n};\n\n\n// Filter operand, with some lazy-compile optimizations.\nexports.Filter = function(filter) {\n\tthis.filter = filter;\n\tthis.elements = {}; // Each has count, op, value\n\t//this.array = [];\n\tthis.compileError = null;\n};\nexports.Filter.prototype = new exports.Node();\nexports.Filter.prototype.name = \"filter\";\n\nexports.Filter.prototype.compute = function(ctx) {\n\t// Apply the filter and compile each result\n\tvar i, expr, elem, exprs = ctx.wiki().filterTiddlers(this.filter, ctx.widget);\n\n\t// Clear the array and mark all existing elements for removal\n\tfor (expr in this.elements) this.elements[expr].count = 0;\n\t//this.array = [];\n\n\t// Selectively re-compile any filter results that have changed\n\tfor (i = 0; i < exprs.length; ++i)\n\t{\n\t\texpr = exprs[i];\n\t\telem = this.elements[expr];\n\t\t//this.array.push(expr);\n\t\t\n\t\tif (elem) ++elem.count;\n\t\telse try {\n\t\t\tthis.elements[expr] = {count: 1, op: Compile.compileDatum(expr), value: null};\n\t\t}\n\t\tcatch (err) {\n\t\t\t// Save the error\n\t\t\tthis.elements[expr] = new exports.ThrowError(\n\t\t\t\terr + \"\\n source: \\\"\" + expr + \"\\\"\\n from \\\"\" + this.filter + \"\\\"\");\n\t\t}\n\t}\n\n\t// Compute (unique) values. Delete any elements with no copies left.\n\tfor (expr in this.elements) {\n\t\telem = this.elements[expr];\n\t\tif (elem.count === 0) delete this.elements[expr];\n\t\telse elem.val = elem.op.compute(ctx.sub());\n\t}\n\n\t// Return value computes an array of datum values.\n\tvar results = [];\n\tfor (i = 0; i < exprs.length; ++i) {\n\t\texpr = exprs[i];\n\t\tresults.push(this.elements[expr].val);\n\t}\n\treturn results;\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/nodes.js",
"tags": "",
"module-type": "library",
"modified": "20180112071139424",
"description": "",
"created": "20171211183000431"
},
"$:/plugins/ebalster/formula/operators/arithmetic.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Unary sign operators\nexports.uplus = {arity: 1, position: \"pre\", operator: \"+\", function: \"uplus\"};\nexports.uminus = {arity: 1, position: \"pre\", operator: \"-\", function: \"uminus\"};\n\n// Add\nexports.plus = {arity: 2, precedence: 10, operator: \"+\", function: \"add\"};\nexports.minus = {arity: 2, precedence: 10, operator: \"-\", function: \"sub\"};\n\n// Multiply\nexports.multiply = {arity: 2, precedence: 20, operator: \"*\", function: \"mul\"};\nexports.divide = {arity: 2, precedence: 20, operator: \"/\", function: \"div\"};\n\n// Exponential\nexports.pow = {arity: 2, precedence: 30, operator: \"^\", function: \"pow\", associativity: \"right\"};\n\n// Percentage\nexports.percent = {arity: 1, position: \"post\", operator: \"%\", function: \"percent\"};\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/operators/arithmetic.js",
"tags": "",
"module-type": "formula-operator",
"modified": "20171212223539769",
"created": "20171212223503019"
},
"$:/plugins/ebalster/formula/operators/compare.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Equality\nexports.eq = {arity: 2, precedence: 0, operator: \"=\", function: \"eq\"};\nexports.ne = {arity: 2, precedence: 0, operator: \"<>\", function: \"ne\"};\n\n// Inequality\nexports.gt = {arity: 2, precedence: 0, operator: \">\", function: \"gt\"};\nexports.gte = {arity: 2, precedence: 0, operator: \">=\", function: \"gte\"};\nexports.lt = {arity: 2, precedence: 0, operator: \"<\", function: \"lt\"};\nexports.lte = {arity: 2, precedence: 0, operator: \"<=\", function: \"lte\"};\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/operators/compare.js",
"tags": "",
"module-type": "formula-operator",
"modified": "20171214050739104",
"created": "20171214050556123"
},
"$:/plugins/ebalster/formula/operators/strings.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\n// Concatenate\nexports.concatenate = {arity: 2, precedence: 4, operator: \"&\", function: \"cat\"};\n\n})();",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/operators/strings.js",
"tags": "",
"module-type": "formula-operator",
"modified": "20171213003346943",
"created": "20171213003246267"
},
"$:/plugins/ebalster/formula/readme": {
"text": "''Formula'' for TiddlyWiki, version {{$:/plugins/ebalster/formula!!version}}, by Evan Balster.\n\nFormulas are written between `(=` mushroom brackets `=)`. Where possible, their functions and syntax are designed to emulate popular spreadsheet software (Microsoft Excel and Google Sheets). They //also// support WikiText-like syntax for `{{`transclusion`}}`, `[`filters`]`, `<<`variables`>>`, and a large number of functions.\n\nFormulas can also be evaluated by the `$formula` widget, the `$formula-vars` widget and the `<<formula>>` macro.\n\nFurther documentation is available here: [[https://evanbalster.com/tiddlywiki/formulas.html]].\n\nThis plugin is a work in progress; please report any issues on GitHub: [[https://github.com/EvanBalster/TiddlyWikiFormula/issues]].",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/formula/readme",
"tags": "",
"modified": "20171220212520970",
"created": "20171220042006170",
"caption": "readme"
},
"$:/plugins/ebalster/formula/settings": {
"text": "Currently no global settings are implemented, but formulas can be controlled by setting some global macros. For example:\n\n|Macro|Meaning|h\n|`\\define formulaFixed() 2`|makes numbers display with 2 decimal points.|\n|`\\define formulaPrecision() 4`|makes numbers display with 4 significant digits (but `formulafixed` takes priority.|\n|`\\define formulaDateFormat() YYYY-MM-0DD`|Sets a date display format using the same rules as TiddlyWiki.|\n\nPlace these at the top of the tiddler where they should take effect, or create a tiddler tagged with <<tag $:/tags/Macro>> to make them apply to all tiddlers.\n\nIn the future, we'll probably add some global settings here...",
"bag": "default",
"revision": "0",
"type": "text/vnd.tiddlywiki",
"title": "$:/plugins/ebalster/formula/settings",
"tags": "",
"modified": "20171221002035357",
"created": "20171221001634811",
"caption": "readme"
},
"$:/plugins/ebalster/formula/value.js": {
"text": "(function(){\n\n\"use strict\";\n\n\nexports.NumberFormatFunc = null;\n\nexports.DateFormat = \"0hh:0mm, DDth MMM YYYY\";\n\n\n// Base type for formula values\nexports.Value = function() {\n this.name = \"unknown-value\";\n};\n\n// Get the value payload\nexports.Value.prototype.get = function() {return undefined;};\n\n// Describe the value\nexports.Value.prototype.describe = function() {return this.name + \" (\" + String(this.get()) + \")\";};\n\nexports.Value.prototype.toString = function() {return \"[Value \" + this.describe() + \"]\";};\n\n// Get the value as a number (generic implementation)\nexports.Value.prototype.asNum = function() {\n var v = this.get();\n var n = Number(v);\n if (isNaN(n)) throw \"Cannot convert \" + this.describe() + \" to a number!\";\n return n;\n};\n\n// Get the value as a number, summing arrays (generic implementation)\nexports.Value.prototype.asSum = function() {\n var v = this.get();\n var n;\n if (Array.isArray(v)) {n = 0; for (var i = 0; i < v.length; ++i) n += Number(v[i]);}\n else n = Number(v);\n if (isNaN(n)) throw \"Cannot sum \" + this.describe() + \" to a number!\";\n return n;\n};\n\n// More convertsions\nexports.Value.prototype.asString = function() {\n return String(this.get());\n};\nexports.Value.prototype.asArray = function() {\n var v = this.get();\n if (Array.isArray(v)) return v;\n else return [v];\n};\nexports.Value.prototype.asDate = function() {\n throw \"Cannot convert \" + this.describe() + \" to a date!\";\n};\n\n\n// Undefined value.\nexports.V_Undefined = function() {\n this.name = \"undefined\";\n};\nexports.V_Undefined.prototype = new exports.Value();\nexports.V_Undefined.prototype.get = function() {return undefined;};\n\n\n// Array value.\nexports.V_Array = function(value) {\n this.name = \"array\";\n\n this.value = value;\n};\nexports.V_Array.prototype = new exports.Value();\nexports.V_Array.prototype.get = function() {return this.value;};\nexports.V_Array.prototype.asNum = function() {throw \"Cannot convert \" + this.describe() + \" to number!\";};\nexports.V_Array.prototype.asSum = function() {\n var n = 0;\n for (var i = 0; i < this.value.length; ++i) n += this.value[i].asNum();\n if (isNaN(n)) throw \"Cannot sum \" + this.describe() + \" to a number!\";\n return n;\n};\nexports.V_Array.prototype.asString = function() {\n var result = \"\";\n for (var i = 0; i < this.value.length; ++i) {\n var part = this.value[i].asString();\n if (i && part.length) result += \" \";\n if (part.indexOf(/\\s/g) >= 0) result += \"[[\" + part + \"]]\";\n else result += part;\n }\n return result;\n};\n\n\n// String value.\nexports.V_Text = function(value) {\n this.name = \"string\";\n\n this.value = value;\n};\nexports.V_Text.prototype = new exports.Value();\nexports.V_Text.prototype.get = function() {return this.value;};\n//exports.V_Text.prototype.asDate = function() {return $tw.utils.parseDate();}\n\n\n// Date value.\nexports.V_Date = function(value) {\n this.name = \"date\";\n\n this.value = value;\n};\nexports.V_Date.prototype = new exports.Value();\nexports.V_Date.prototype.get = function() {return this.value;};\nexports.V_Date.prototype.asString = function() {return $tw.utils.formatDateString(this.value, exports.DateFormat);};\nexports.V_Date.prototype.asNum = function() {throw \"Date-to-Number conversion usupported\";};\nexports.V_Date.prototype.asSum = function() {throw \"Date-to-Number conversion usupported\";};\nexports.V_Date.prototype.asDate = function() {return this.value;};\n\n\n// Boolean value.\nexports.V_Bool = function(value) {\n this.name = \"boolean\";\n\n this.value = value;\n};\nexports.V_Bool.prototype = new exports.Value();\nexports.V_Bool.prototype.get = function() {return this.value;};\nexports.V_Bool.prototype.asString = function() {return this.value ? \"TRUE\" : \"FALSE\";};\nexports.V_Bool.prototype.asNum = function() {return this.value ? 1 : 0;};\nexports.V_Bool.prototype.asSum = function() {return this.value ? 1 : 0;};\n\n\n// Number value.\nexports.V_Num = function(value) {\n this.name = \"number\";\n\n this.value = value;\n};\nexports.V_Num.prototype = new exports.Value();\nexports.V_Num.prototype.get = function() {return this.value;};\nexports.V_Num.prototype.asString = function() {return (exports.NumberFormatFunc || String)(this.value);};\nexports.V_Num.prototype.asNum = function() {return this.value;};\nexports.V_Num.prototype.asSum = function() {return this.value;};\n\n\n// Percentage value.\nexports.V_Percent = function(value) {\n this.name = \"percentage\";\n\n this.value = value;\n};\nexports.V_Percent.prototype = new exports.V_Num();\nexports.V_Percent.prototype.asString = function()\n{\n return (exports.NumberFormatFunc || String)(100*this.value) + \"%\";\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/value.js",
"tags": "",
"module-type": "library",
"modified": "20171211195014088",
"description": "",
"created": "20171211195003728"
},
"$:/plugins/ebalster/formula/widgets/attributes/formula.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Compile = require(\"$:/plugins/ebalster/formula/compile.js\");\nvar Compute = require(\"$:/plugins/ebalster/formula/compute.js\");\nvar Nodes = require(\"$:/plugins/ebalster/formula/nodes.js\");\n\nvar FormulaAttribute = function(widget, node) {\n\tthis.widget = widget;\n\tthis.formula = node.formula;\n\ttry {\n\t\tthis.compiledFormula = Compile.compileFormula(this.formula);\n\t}\n\tcatch (err) {\n\t\tthis.compiledFormula = new Nodes.ThrowError(err);\n\t}\n\tthis.value = this.compute();\n};\n\n/*\nInherit from the base ??? class\n*/\n//FormulaAttribute.prototype = new Attribute();\n\nFormulaAttribute.prototype.compute = function() {\n\t// Compute options\n\tthis.formatOptions =\n\t{\n\t\tfixed: (this.widget.getVariable(\"formulaFixed\")),\n\t\tprecision: (this.widget.getVariable(\"formulaPrecision\")),\n\t\tnumberFormat: (this.widget.getVariable(\"formulaNumberFormat\")),\n\t\tdateFormat: (this.widget.getVariable(\"formulaDateFormat\")),\n\t};\n\t// Execute the formula.\n\ttry {\n\t\treturn Compute.computeFormula(this.compiledFormula, this.widget, this.formatOptions);\n\t}\n\tcatch (err) {\n\t\treturn \"\";\n\t}\n};\n\nFormulaAttribute.prototype.refresh = function(changedTiddlers) {\n\tthis.value = this.compute();\n\treturn this.value;\n};\n\n\nexports.formula = FormulaAttribute;\n\n})();\n\t",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/widgets/attributes/formula.js",
"tags": "",
"module-type": "attributevalue",
"modified": "20171225035808674",
"description": "Evaluates a formula as an attribute value string.",
"created": "20171225035721011"
},
"$:/plugins/ebalster/formula/widgets/formula-vars.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar Compile = require(\"$:/plugins/ebalster/formula/compile.js\");\nvar Compute = require(\"$:/plugins/ebalster/formula/compute.js\");\n\nvar FormulaVarsWidget = function(parseTreeNode,options) {\n\t// Call the constructor\n\tWidget.call(this);\n\t// Initialise\t\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nFormulaVarsWidget.prototype = Object.create(Widget.prototype);\n\n/*\nRender this widget into the DOM\n*/\nFormulaVarsWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\n\tif (this.formulaError) {\n\t\t// Show an error.\n\t\tvar parseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\n\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\n\t\t}, children: [\n\t\t\t{type: \"text\", text: this.formulaError}\n\t\t]}];\n\t\tthis.makeChildWidgets(parseTreeNodes);\n\t}\n\telse {\n\t\t// Construct and render the child widgets.\n\t\tthis.makeChildWidgets();\n\t}\n\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nRecompute formulas\n*/\nFormulaVarsWidget.prototype.formula_recompute = function() {\n\t// Parse variables\n\tvar self = this;\n\n\tthis.formatOptions =\n\t{\n\t\tfixed: (this.getAttribute(\"$fixed\") || this.parentWidget.getVariable(\"formulaFixed\")),\n\t\tprecision: (this.getAttribute(\"$precision\") || this.parentWidget.getVariable(\"formulaPrecision\")),\n\t\tnumberFormat: (this.getAttribute(\"$numberFormat\") || this.parentWidget.getVariable(\"formulaNumberFormat\")),\n\t\tdateFormat: (this.getAttribute(\"$dateFormat\") || this.parentWidget.getVariable(\"formulaDateFormat\")),\n\t};\n\n\t// Deprecation\n\tif (this.getAttribute(\"$toFixed\")) {this.formulaError = \"Change '$toFixed' to '$fixed'.\"; return;}\n\tif (this.getAttribute(\"$toPrecision\")) {this.formulaError = \"Change '$toPrecision' to '$precision'.\"; return;}\n\n\tif (!this.currentValues)\n\t{\n\t\t// Initial values\n\t\tthis.currentValues = {};\n\t\tthis.formulaSrc = {};\n\t\tthis.formulaComp = {};\n\t}\n\n\tthis.formulaError = null;\n\n\ttry {\n\t\tif (this.getAttribute(\"$noRefresh\")) throw \"Illegal $noRefresh attribute; use $noRebuild instead.\";\n\n\t\t$tw.utils.each(this.attributes,function(val,key) {\n\t\t\tif(key.charAt(0) !== \"$\") {\n\t\t\t\t// Recompile if necessary\n\t\t\t\tif (self.formulaSrc[key] != val) {\n\t\t\t\t\tself.formulaSrc[key] = val;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tself.formulaComp[key] = Compile.compileFormula(self.formulaSrc[key]);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\tself.formulaSrc[key] = null;\n\t\t\t\t\t\tthrow \"Variable \" + key + \": \" + String(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Recompute the formula\n\t\t\t\tif (self.formulaComp[key]) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tself.currentValues[key] = Compute.computeFormula(\n\t\t\t\t\t\t\tself.formulaComp[key], self, self.formatOptions);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (err) {\n\t\t\t\t\t\tthrow \"Variable \" + key + \": \" + String(err);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow \"Variable \" + key + \": Formula not assigned\";\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\tcatch (err) {\n\t\tthis.formulaError = String(err);\n\t}\n};\n\n/*\nCompute the internal state of the widget\n*/\nFormulaVarsWidget.prototype.execute = function() {\n\t// Recompute formulas\n\tthis.formula_recompute();\n\n\tif (!this.formulaError) {\n\t\tfor (var key in this.currentValues) {\n\t\t\tthis.setVariable(key, this.currentValues[key]);\n\t\t}\n\t}\n};\n\n/*\nRefresh the widget by ensuring our attributes are up to date\n*/\nFormulaVarsWidget.prototype.refresh = function formulaVarsRefresh(changedTiddlers) {\n\tthis.computeAttributes();\n\tvar oldValues = Object.assign({}, this.currentValues || {}), oldError = this.formulaError;\n\tthis.formula_recompute();\n\n\t// Did any computed values change?\n\tvar changedValues = false;\n\tfor (var key in this.currentValues) {\n\t\tif (this.currentValues[key] !== oldValues[key]) {\n\t\t\tthis.setVariable(key, this.currentValues[key]);\n\t\t\tchangedValues = true;\n\t\t}\n\t}\n\n\t// Option to suppress full refreshing\n\tif (this.getAttribute(\"$noRebuild\") === \"true\") changedValues = false;\n\tif (this.formulaError !== oldError) changedValues = true;\n\n\tif(changedValues) {\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t} else {\n\t\treturn this.refreshChildren(changedTiddlers);\n\t}\n};\n\nexports[\"formula-vars\"] = FormulaVarsWidget;\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/widgets/formula-vars.js",
"tags": "",
"module-type": "widget",
"modified": "20171222071557661",
"description": "As the $vars widget, but each attribute is interpreted as a formula.",
"created": "20171216003055342"
},
"$:/plugins/ebalster/formula/widgets/formula.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar Compile = require(\"$:/plugins/ebalster/formula/compile.js\");\nvar Compute = require(\"$:/plugins/ebalster/formula/compute.js\");\n\nvar FormulaWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nFormulaWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nFormulaWidget.prototype.render = function(parent,nextSibling) {\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.rerender(parent,nextSibling);\n};\n\nFormulaWidget.prototype.rerender = function(parent, nextSibling) {\n\n\tthis.removeChildDomNodes();\n\n\tvar parseTreeNodes;\n\n\tif (this.formulaError) {\n\t\t// Show an error as a tc-error span.\n\t\tparseTreeNodes = [{type: \"element\", tag: \"span\", attributes: {\n\t\t\t\"class\": {type: \"string\", value: \"tc-error\"}\n\t\t}, children: [\n\t\t\t{type: \"text\", text: this.formulaError}\n\t\t]}];\n\t}\n\telse {\n\t\t// Parse the value, or, failing this, produce a text node.\n\t\tvar parser = this.wiki.parseText(\n\t\t\tthis.wikifyType, this.currentValue,\n\t\t\t{parseAsInline: this.wikifyMode === \"inline\"});\n\t\tparseTreeNodes = (parser ? parser.tree : [{type: \"text\", text: this.currentValue}]);\n\t}\n\n\t// Construct and render the child widgets.\n\tthis.makeChildWidgets(parseTreeNodes);\n\tthis.renderChildren(parent,nextSibling);\n};\n\n/*\nCompute the internal state of the widget\n*/\nFormulaWidget.prototype.execute = function() {\n\n\tvar oldFormula = this.formula;\n\n\t// Get parameters from our attributes\n\tthis.formula = this.getAttribute(\"formula\");\n\tthis.debug = this.getAttribute(\"debug\");\n\n\tthis.wikifyType = this.getAttribute(\"outputType\");\n\tthis.wikifyMode = this.getAttribute(\"outputMode\",\"inline\");\n\n\tthis.formatOptions =\n\t{\n\t\tfixed: (this.getAttribute(\"fixed\") || this.getVariable(\"formulaFixed\")),\n\t\tprecision: (this.getAttribute(\"precision\") || this.getVariable(\"formulaPrecision\")),\n\t\tnumberFormat: (this.getAttribute(\"numberFormat\") || this.getVariable(\"formulaNumberFormat\")),\n\t\tdateFormat: (this.getAttribute(\"dateFormat\") || this.getVariable(\"formulaDateFormat\")),\n\t};\n\n\t// Deprecation\n\tif (this.getAttribute(\"toFixed\")) {this.formulaError = \"Change 'toFixed' to 'fixed'.\"; return;}\n\tif (this.getAttribute(\"toPrecision\")) {this.formulaError = \"Change 'toPrecision' to 'precision'.\"; return;}\n\n\t// Compile the formula, if it has changed, yielding compiledFormula\n\tif(this.formula !== oldFormula) {\n\t\t// Clear the error flag\n\t\tthis.formulaError = null;\n\t\tthis.compiledFormula = null;\n\t\tif (this.formula) {\n\t\t\ttry {\n\t\t\t\tthis.compiledFormula = Compile.compileFormula(this.formula);\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t\tthis.formulaError = String(err);\n\t\t\t\tthis.formula = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compute the formula, yielding currentValue\n\tif(this.compiledFormula) {\n\t\ttry {\n\t\t\tthis.currentValue = Compute.computeFormula(this.compiledFormula, this, this.formatOptions, Boolean(this.debug));\n\t\t}\n\t\tcatch (err) {\n\t\t\tthis.formulaError = String(err);\n\t\t}\n\t}\n\telse {\n\t\tthis.formulaError = \"Error: formula not assigned\";\n\t}\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nFormulaWidget.prototype.refresh = function(changedTiddlers) {\n\t// Re-execute the filter to get the count\n\tthis.computeAttributes();\n\tvar oldValue = this.currentValue, oldError = this.formulaError;\n\tthis.execute();\n\tif(this.oldError !== this.formulaError || this.currentValue !== oldValue) {\n\t\t// Regenerate and rerender the widget and replace the existing DOM node\n\t\t// We DON'T call refreshSelf() because it call execute() again\n\t\tvar nextSibling = this.findNextSiblingDomNode();\n\t\tthis.rerender(this.parentDomNode,nextSibling);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n\n};\n\nexports.formula = FormulaWidget;\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/widgets/formula.js",
"tags": "",
"module-type": "widget",
"modified": "20171212194059701",
"description": "Evaluates a formula.",
"created": "20171210232543292"
},
"$:/plugins/ebalster/formula/wikiparser/attributes/formula.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n\nexports.formula = function(source, pos, node) {\n\t// Is it a formula?\n\tvar reFormulaValue = /\\(=(([^=]+|=[^\\)])*)=\\)/g;\n\n\tvar value = $tw.utils.parseTokenRegExp(source,pos,reFormulaValue);\n\tif (!value) return null;\n\n\tnode.type = \"formula\";\n\tnode.formula = value.match[1];\n\tnode.end = value.end;\n\treturn node;\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/wikiparser/attributes/formula.js",
"tags": "",
"module-type": "attributerule",
"modified": "20171225042523039",
"description": "Tag attribute rule for formulas. Ex. `(= 2+2 =)`",
"created": "20171224060415431"
},
"$:/plugins/ebalster/formula/wikiparser/formula.js": {
"text": "(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nexports.name = \"formula\";\nexports.types = {inline: true};\n\nexports.init = function(parser) {\n\tthis.parser = parser;\n\t// Regexp to match\n\tthis.matchRegExp = /\\(=/mg;\n\tthis.endMatchRegExp = /=\\)/mg;\n};\n\nexports.parse = function() {\n\t// Move past the match\n\tthis.parser.pos = this.matchRegExp.lastIndex;\n\t// Look for the end marker\n\tthis.endMatchRegExp.lastIndex = this.parser.pos;\n\tvar match = this.endMatchRegExp.exec(this.parser.source),\n\t\ttext;\n\t// Process the text\n\tif(match) {\n\t\ttext = this.parser.source.substring(this.parser.pos,match.index);\n\t\tthis.parser.pos = match.index + match[0].length;\n\t} else {\n\t\ttext = this.parser.source.substr(this.parser.pos);\n\t\tthis.parser.pos = this.parser.sourceLength;\n\t}\n\treturn [{\n\t\ttype: \"formula\",\n\t\tattributes: {\n\t\t\tformula: {type: \"string\", value: text},\n\t\t}\n\t}];\n};\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/formula/wikiparser/formula.js",
"tags": "",
"module-type": "wikirule",
"modified": "20171211181716654",
"description": "Wiki text inline rule for formulas. Ex. `((=2+2))`",
"created": "20171211033327565"
}
}
}
{
"tiddlers": {
"$:/plugins/ebalster/timer/widgets/timer.js": {
"text": "/*\\\ntitle: $:/plugins/ebalster/timer/widgets/timer.js\ntype: application/javascript\nmodule-type: widget\n\nWidget for triggering ActionWidgets on a timed interval\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar Widget = require(\"$:/core/modules/widgets/widget.js\").widget;\n\nvar TimerWidget = function(parseTreeNode,options) {\n\tthis.initialise(parseTreeNode,options);\n};\n\n/*\nInherit from the base widget class\n*/\nTimerWidget.prototype = new Widget();\n\n/*\nRender this widget into the DOM\n*/\nTimerWidget.prototype.render = function(parent,nextSibling) {\n\tvar self = this;\n\tthis.parentDomNode = parent;\n\tthis.computeAttributes();\n\tthis.execute();\n\tthis.renderChildren(parent,nextSibling);\n\t// The timer callback...\n\tvar timerWidgetFunction = function timerWidgetFunction() {\n\t\t// Only perform actions if the TimerWidget is still in the widget tree.\n\t\tif (self.stillInWidgetTree()) {\n\t\t\tvar event = new CustomEvent(\"TimerWidget\");\n\t\t\tself.invokeActions(self,event);\n\t\t\tif(self.message) self.dispatchMessage(event);\n\t\t\t//if(self.set) self.setTiddler();\n\t\t\tif(self.actions) self.invokeActionString(self.actions,self,event);\n\t\t}\n\t};\n\t// How long should we wait?\n\tif (window) {\n\t\t// Unregister the old timer event\n\t\tif (this.timeoutID) window.clearTimeout (this.timeoutID);\n\t\tif (this.intervalID) window.clearInterval(this.intervalID);\n\t\tthis.timeoutID = this.intervalID = null;\n\t\tif (this.time && this.time.length) {\n\t\t\tvar currentTime = Date.now(), targetTime = null;\n\t\t\tif (this.time.length >= 14) {\n\t\t\t\t//TiddlyWiki date in native format\n\t\t\t\ttargetTime = $tw.utils.parseDate(this.time);\n\t\t\t\tif (targetTime) targetTime = targetTime.getTime();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//Unix epoch time in milliseconds\n\t\t\t\ttargetTime = parseFloat(this.time);\n\t\t\t}\n\t\t\tif (targetTime && targetTime > currentTime) {\n\t\t\t\t// Register a timeout event\n\t\t\t\tthis.timeoutID = window.setTimeout(timerWidgetFunction, targetTime-currentTime);\n\t\t\t}\n\t\t}\n\t\telse if (this.interval && this.interval.length) {\n\t\t\tvar interval = parseFloat(this.interval);\n\t\t\tif (interval && interval > 0) {\n\t\t\t\t// Register an interval event\n\t\t\t\tthis.intervalID = window.setInterval(timerWidgetFunction, interval*1000);\n\t\t\t}\n\t\t}\n\t\t\n\t}\n};\n\n/*\nDetect if the timer widget is still in the tree, by crawling up to the RootWidget.\n*/\nTimerWidget.prototype.stillInWidgetTree = function() {\n\tvar widget = this;\n\twhile (widget) {\n\t\tvar parent = widget.parentWidget;\n\t\tif (parent) {\n\t\t\t// Return false if some ancestor has disowned us.\n\t\t\tif (!parent.children || parent.children.indexOf(widget) < 0) return false;\n\t\t}\n\t\telse {\n\t\t\t// Return true if we get to the root widget.\n\t\t\treturn widget === $tw.rootWidget;\n\t\t}\n\t\twidget = parent;\n\t}\n};\n\n/*\nWe don't allow actions to propagate because we trigger actions ourselves\n*/\nTimerWidget.prototype.allowActionPropagation = function() {\n\treturn false;\n};\n\nTimerWidget.prototype.dispatchMessage = function(event) {\n\tthis.dispatchEvent({type: this.message, param: this.param, tiddlerTitle: this.getVariable(\"currentTiddler\"), event: event});\n};\n\n/*TimerWidget.prototype.setTiddler = function() {\n\tthis.wiki.setTextReference(this.set,this.setTo,this.getVariable(\"currentTiddler\"));\n};*/\n\n/*\nCompute the internal state of the widget\n*/\nTimerWidget.prototype.execute = function() {\n\t// Get attributes\n\tthis.actions = this.getAttribute(\"actions\");\n\tthis.message = this.getAttribute(\"message\");\n\tthis.param = this.getAttribute(\"param\");\n\tthis.interval = this.getAttribute(\"interval\");\n\tthis.time = this.getAttribute(\"time\");\n\t//this.set = this.getAttribute(\"set\");\n\t//this.setTo = this.getAttribute(\"setTo\");\n\t// Make child widgets\n\tthis.makeChildWidgets();\n};\n\n/*\nSelectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering\n*/\nTimerWidget.prototype.refresh = function(changedTiddlers) {\n\tvar changedAttributes = this.computeAttributes();\n\tif(changedAttributes.time || changedAttributes.interval || changedAttributes.message || changedAttributes.param || changedAttributes.actions) {\n\t\t// || changedAttributes.set || changedAttributes.setTo || (this.set && changedTiddlers[this.set])\n\t\tthis.refreshSelf();\n\t\treturn true;\n\t}\n\treturn this.refreshChildren(changedTiddlers);\n};\n\nexports.timer = TimerWidget;\n\n})();\n",
"bag": "default",
"revision": "0",
"type": "application/javascript",
"title": "$:/plugins/ebalster/timer/widgets/timer.js",
"tags": "",
"module-type": "widget",
"modified": "20180106042121293",
"created": "20180106041642233"
}
}
}
/*\
title: $:/plugins/telmiger/ColorAction/coloraction.js
type: application/javascript
module-type: macro
Based on TinyColor by Brian Grinstead: $:/plugins/telmiger/ColorAction/tinycolor.js
Extended, adapted and documented for TiddlyWiki 5 by Thomas Elmiger
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = "coloraction";
exports.params = [
{name: "color", default: "#000"},
{name: "mod", default: false},
{name: "value", default: false},
{name: "alpha", default: false},
{name: "action", default: "toRgbString"}
];
if (typeof window !== 'undefined') {
var tinycolor = require("$:/plugins/telmiger/ColorAction/tinycolor.js");
}
/*
Wikify
*/
function wikifyText(t) {
var Parser = $tw.wiki.parseText("text/vnd.tiddlywiki",t,{
parseAsInline: true
});
var WidgetNode = $tw.wiki.makeWidget(Parser,{
document: $tw.fakeDocument
});
var Container = $tw.fakeDocument.createElement("div");
WidgetNode.render(Container,null);
return Container.textContent;
}
/*
Precision for decimals
*/
function addPrecisionDecimals(value,decimals) {
const beforecomma = value.toString().split('.')[0].length;
const precision = beforecomma + parseInt(decimals);
return (precision > 0 && precision < 101) ? value.toPrecision(precision) : "invalid decimals";
}
/*
AlphaBlend – idea adapted from https://github.com/bgrins/TinyColor/issues/157
*/
function alphaBlend(color1,color2) {
let basecolor = tinycolor(color1);
let blendcolor = tinycolor(color2);
var base = [basecolor._r, basecolor._g, basecolor._b, basecolor._a];
var add = [blendcolor._r, blendcolor._g, blendcolor._b, blendcolor._a];
var mix = [];
mix[3] = 1 - (1 - add[3]) * (1 - base[3]); // alpha
mix[0] = Math.round((add[0] * add[3] / mix[3]) + (base[0] * base[3] * (1 - add[3]) / mix[3])); // red
mix[1] = Math.round((add[1] * add[3] / mix[3]) + (base[1] * base[3] * (1 - add[3]) / mix[3])); // green
mix[2] = Math.round((add[2] * add[3] / mix[3]) + (base[2] * base[3] * (1 - add[3]) / mix[3])); // blue
let finalcolor = tinycolor.fromRatio({r: mix[0], g: mix[1], b: mix[2], a: mix[3]});
return finalcolor.toRgbString();
}
/*
AlphaContrast – calculate alpha against a background first
*/
function alphaContrast(background,foreground) {
// maybe calculate a ± margin like Lea Verou does on https://leaverou.github.io/contrast-ratio/ ?
// color.overlayOn(Color.BLACK).luminance + ' - ' + color.overlayOn(Color.WHITE).luminance;
let color1 = background;
let alpha1 = tinycolor(background).getAlpha();
if(alpha1 < 1) {
// to do: if background is dark && foreground is light, do an alphaBlend on black istead of white (?)
color1 = alpha1 < 1 ? alphaBlend("#fff", background) : background;
}
// if foreground has transparency do an alphaBlend on background
let alpha2 = tinycolor(foreground).getAlpha();
let color2 = alpha2 < 1 ? alphaBlend(color1, foreground) : foreground;
return tinycolor.readability(color1, color2);
}
/*
PrecisionContrast – indicate precision for alphaContrast
*/
function precisionContrast(background,foreground,decimals,indicator) {
let contrast = alphaContrast(background, foreground);
let result = addPrecisionDecimals(contrast, decimals);
let alpha = tinycolor(background).getAlpha();
return alpha < 1 && indicator ? "~" + result : result;
}
/*
Run the macro
*/
exports.run = function(color,mod,value,alpha,action) {
var result = "";
var color1 = wikifyText(color);
var mycolor = color1 !== "random" ? tinycolor(color1) : tinycolor.random();
if(value === false) {
// set default
value = mod === "mix" ? 50 : 10;
}
// apply modification
if(mod) {
if(mod === "lighten" || mod === "brighten" || mod === "darken"
|| mod === "desaturate" || mod === "saturate" || mod === "spin") {
mycolor[mod](parseInt(value, 10));
}
else if(mod === "greyscale") {
mycolor[mod]();
}
else if(mod === "complement") {
mycolor.spin(180);
}
else if(action === "getContrast" || action === "getReadability"
|| action === "mix" || action === "alphablend" || action === "compare" || action === "equals") {
// set mod as color2, don’t use alpha param
let secondcolor = wikifyText(mod);
var color2 = tinycolor(secondcolor).toRgbString();
alpha = false;
}
}
// set alpha
if(alpha) {
mycolor.setAlpha(alpha);
}
// execute action
if(action !== "toRgbString") {
if(action === "getBrightness" || action === "getFormat" || action === "getLuminance"
|| action === "getAlpha" || action === "isLight" || action === "isDark"|| action === "isValid"
|| action === "toHexString" || action === "toHsvString" || action === "toHslString"
|| action === "toHex"|| action === "toName" || action === "toFilter") {
result = mycolor[action]();
}
else if(action === "toHsl" || action === "toHsv") {
let objResult = mycolor[action]();
result = JSON.stringify(objResult);
}
else if(action === "getContrast") {
result= precisionContrast(color1, color2, 1, true);
}
else if(action === "getReadability") {
let contrastratio = precisionContrast(color1, color2, 1);
result = contrastratio >= 3 ? "AA large" : "fail";
result = contrastratio >= 4.5 ? "AAA large/AA small" : result;
result = contrastratio >= 7 ? "AAA small" : result;
}
else if(action === "mix") {
result = tinycolor.mix(color1, color2, value);
}
else if(action === "alphablend") {
result = alphaBlend(color1, color2);
}
else if(action === "equals") {
result = tinycolor.equals(color1, color2);
}
else if(action === "getOriginalInput") {
result = mycolor.getOriginalInput();
}
}
else {
result = mycolor.toRgbString();
}
result = result === 0 ? "0" : result;
result = result === false ? "false" : result;
return result;
};
})();
// TinyColor v1.4.1
// https://github.com/bgrins/TinyColor
(function(Math) {
var trimLeft = /^\s+/,
trimRight = /\s+$/,
tinyCounter = 0,
mathRound = Math.round,
mathMin = Math.min,
mathMax = Math.max,
mathRandom = Math.random;
function tinycolor (color, opts) {
color = (color) ? color : '';
opts = opts || { };
// If input is already a tinycolor, return itself
if (color instanceof tinycolor) {
return color;
}
// If we are called as a function, call using new instead
if (!(this instanceof tinycolor)) {
return new tinycolor(color, opts);
}
var rgb = inputToRGB(color);
this._originalInput = color,
this._r = rgb.r,
this._g = rgb.g,
this._b = rgb.b,
this._a = rgb.a,
this._roundA = mathRound(100*this._a) / 100,
this._format = opts.format || rgb.format;
this._gradientType = opts.gradientType;
// Don't let the range of [0,255] come back in [0,1].
// Potentially lose a little bit of precision here, but will fix issues where
// .5 gets interpreted as half of the total, instead of half of 1
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
if (this._r < 1) { this._r = mathRound(this._r); }
if (this._g < 1) { this._g = mathRound(this._g); }
if (this._b < 1) { this._b = mathRound(this._b); }
this._ok = rgb.ok;
this._tc_id = tinyCounter++;
}
tinycolor.prototype = {
isDark: function() {
return this.getBrightness() < 128;
},
isLight: function() {
return !this.isDark();
},
isValid: function() {
return this._ok;
},
getOriginalInput: function() {
return this._originalInput;
},
getFormat: function() {
return this._format;
},
getAlpha: function() {
return this._a;
},
getBrightness: function() {
//http://www.w3.org/TR/AERT#color-contrast
var rgb = this.toRgb();
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
},
getLuminance: function() {
//http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
var rgb = this.toRgb();
var RsRGB, GsRGB, BsRGB, R, G, B;
RsRGB = rgb.r/255;
GsRGB = rgb.g/255;
BsRGB = rgb.b/255;
if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
},
setAlpha: function(value) {
this._a = boundAlpha(value);
this._roundA = mathRound(100*this._a) / 100;
return this;
},
toHsv: function() {
var hsv = rgbToHsv(this._r, this._g, this._b);
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
},
toHsvString: function() {
var hsv = rgbToHsv(this._r, this._g, this._b);
var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
return (this._a == 1) ?
"hsv(" + h + ", " + s + "%, " + v + "%)" :
"hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
},
toHsl: function() {
var hsl = rgbToHsl(this._r, this._g, this._b);
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
},
toHslString: function() {
var hsl = rgbToHsl(this._r, this._g, this._b);
var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
return (this._a == 1) ?
"hsl(" + h + ", " + s + "%, " + l + "%)" :
"hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
},
toHex: function(allow3Char) {
return rgbToHex(this._r, this._g, this._b, allow3Char);
},
toHexString: function(allow3Char) {
return '#' + this.toHex(allow3Char);
},
toHex8: function(allow4Char) {
return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
},
toHex8String: function(allow4Char) {
return '#' + this.toHex8(allow4Char);
},
toRgb: function() {
return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
},
toRgbString: function() {
return (this._a == 1) ?
"rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
"rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
},
toPercentageRgb: function() {
return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
},
toPercentageRgbString: function() {
return (this._a == 1) ?
"rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
"rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
},
toName: function() {
if (this._a === 0) {
return "transparent";
}
if (this._a < 1) {
return false;
}
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
},
toFilter: function(secondColor) {
var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
var secondHex8String = hex8String;
var gradientType = this._gradientType ? "GradientType = 1, " : "";
if (secondColor) {
var s = tinycolor(secondColor);
secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
}
return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
},
toString: function(format) {
var formatSet = !!format;
format = format || this._format;
var formattedString = false;
var hasAlpha = this._a < 1 && this._a >= 0;
var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
if (needsAlphaFormat) {
// Special case for "transparent", all other non-alpha formats
// will return rgba when there is transparency.
if (format === "name" && this._a === 0) {
return this.toName();
}
return this.toRgbString();
}
if (format === "rgb") {
formattedString = this.toRgbString();
}
if (format === "prgb") {
formattedString = this.toPercentageRgbString();
}
if (format === "hex" || format === "hex6") {
formattedString = this.toHexString();
}
if (format === "hex3") {
formattedString = this.toHexString(true);
}
if (format === "hex4") {
formattedString = this.toHex8String(true);
}
if (format === "hex8") {
formattedString = this.toHex8String();
}
if (format === "name") {
formattedString = this.toName();
}
if (format === "hsl") {
formattedString = this.toHslString();
}
if (format === "hsv") {
formattedString = this.toHsvString();
}
return formattedString || this.toHexString();
},
clone: function() {
return tinycolor(this.toString());
},
_applyModification: function(fn, args) {
var color = fn.apply(null, [this].concat([].slice.call(args)));
this._r = color._r;
this._g = color._g;
this._b = color._b;
this.setAlpha(color._a);
return this;
},
lighten: function() {
return this._applyModification(lighten, arguments);
},
brighten: function() {
return this._applyModification(brighten, arguments);
},
darken: function() {
return this._applyModification(darken, arguments);
},
desaturate: function() {
return this._applyModification(desaturate, arguments);
},
saturate: function() {
return this._applyModification(saturate, arguments);
},
greyscale: function() {
return this._applyModification(greyscale, arguments);
},
spin: function() {
return this._applyModification(spin, arguments);
},
_applyCombination: function(fn, args) {
return fn.apply(null, [this].concat([].slice.call(args)));
},
analogous: function() {
return this._applyCombination(analogous, arguments);
},
complement: function() {
return this._applyCombination(complement, arguments);
},
monochromatic: function() {
return this._applyCombination(monochromatic, arguments);
},
splitcomplement: function() {
return this._applyCombination(splitcomplement, arguments);
},
triad: function() {
return this._applyCombination(triad, arguments);
},
tetrad: function() {
return this._applyCombination(tetrad, arguments);
}
};
// If input is an object, force 1 into "1.0" to handle ratios properly
// String input requires "1.0" as input, so 1 will be treated as 1
tinycolor.fromRatio = function(color, opts) {
if (typeof color == "object") {
var newColor = {};
for (var i in color) {
if (color.hasOwnProperty(i)) {
if (i === "a") {
newColor[i] = color[i];
}
else {
newColor[i] = convertToPercentage(color[i]);
}
}
}
color = newColor;
}
return tinycolor(color, opts);
};
// Given a string or object, convert that input to RGB
// Possible string inputs:
//
// "red"
// "#f00" or "f00"
// "#ff0000" or "ff0000"
// "#ff000000" or "ff000000"
// "rgb 255 0 0" or "rgb (255, 0, 0)"
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
//
function inputToRGB(color) {
var rgb = { r: 0, g: 0, b: 0 };
var a = 1;
var s = null;
var v = null;
var l = null;
var ok = false;
var format = false;
if (typeof color == "string") {
color = stringInputToObject(color);
}
if (typeof color == "object") {
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
rgb = rgbToRgb(color.r, color.g, color.b);
ok = true;
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
}
else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
s = convertToPercentage(color.s);
v = convertToPercentage(color.v);
rgb = hsvToRgb(color.h, s, v);
ok = true;
format = "hsv";
}
else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
s = convertToPercentage(color.s);
l = convertToPercentage(color.l);
rgb = hslToRgb(color.h, s, l);
ok = true;
format = "hsl";
}
if (color.hasOwnProperty("a")) {
a = color.a;
}
}
a = boundAlpha(a);
return {
ok: ok,
format: color.format || format,
r: mathMin(255, mathMax(rgb.r, 0)),
g: mathMin(255, mathMax(rgb.g, 0)),
b: mathMin(255, mathMax(rgb.b, 0)),
a: a
};
}
// Conversion Functions
// --------------------
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
// `rgbToRgb`
// Handle bounds / percentage checking to conform to CSS color spec
// <http://www.w3.org/TR/css3-color/>
// *Assumes:* r, g, b in [0, 255] or [0, 1]
// *Returns:* { r, g, b } in [0, 255]
function rgbToRgb(r, g, b){
return {
r: bound01(r, 255) * 255,
g: bound01(g, 255) * 255,
b: bound01(b, 255) * 255
};
}
// `rgbToHsl`
// Converts an RGB color value to HSL.
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
// *Returns:* { h, s, l } in [0,1]
function rgbToHsl(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = mathMax(r, g, b), min = mathMin(r, g, b);
var h, s, l = (max + min) / 2;
if(max == min) {
h = s = 0; // achromatic
}
else {
var d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch(max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
return { h: h, s: s, l: l };
}
// `hslToRgb`
// Converts an HSL color value to RGB.
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
// *Returns:* { r, g, b } in the set [0, 255]
function hslToRgb(h, s, l) {
var r, g, b;
h = bound01(h, 360);
s = bound01(s, 100);
l = bound01(l, 100);
function hue2rgb(p, q, t) {
if(t < 0) t += 1;
if(t > 1) t -= 1;
if(t < 1/6) return p + (q - p) * 6 * t;
if(t < 1/2) return q;
if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
return p;
}
if(s === 0) {
r = g = b = l; // achromatic
}
else {
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
r = hue2rgb(p, q, h + 1/3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - 1/3);
}
return { r: r * 255, g: g * 255, b: b * 255 };
}
// `rgbToHsv`
// Converts an RGB color value to HSV
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
// *Returns:* { h, s, v } in [0,1]
function rgbToHsv(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = mathMax(r, g, b), min = mathMin(r, g, b);
var h, s, v = max;
var d = max - min;
s = max === 0 ? 0 : d / max;
if(max == min) {
h = 0; // achromatic
}
else {
switch(max) {
case r: h = (g - b) / d + (g < b ? 6 : 0); break;
case g: h = (b - r) / d + 2; break;
case b: h = (r - g) / d + 4; break;
}
h /= 6;
}
return { h: h, s: s, v: v };
}
// `hsvToRgb`
// Converts an HSV color value to RGB.
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
// *Returns:* { r, g, b } in the set [0, 255]
function hsvToRgb(h, s, v) {
h = bound01(h, 360) * 6;
s = bound01(s, 100);
v = bound01(v, 100);
var i = Math.floor(h),
f = h - i,
p = v * (1 - s),
q = v * (1 - f * s),
t = v * (1 - (1 - f) * s),
mod = i % 6,
r = [v, q, p, p, t, v][mod],
g = [t, v, v, q, p, p][mod],
b = [p, p, t, v, v, q][mod];
return { r: r * 255, g: g * 255, b: b * 255 };
}
// `rgbToHex`
// Converts an RGB color to hex
// Assumes r, g, and b are contained in the set [0, 255]
// Returns a 3 or 6 character hex
function rgbToHex(r, g, b, allow3Char) {
var hex = [
pad2(mathRound(r).toString(16)),
pad2(mathRound(g).toString(16)),
pad2(mathRound(b).toString(16))
];
// Return a 3 character hex if possible
if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
}
return hex.join("");
}
// `rgbaToHex`
// Converts an RGBA color plus alpha transparency to hex
// Assumes r, g, b are contained in the set [0, 255] and
// a in [0, 1]. Returns a 4 or 8 character rgba hex
function rgbaToHex(r, g, b, a, allow4Char) {
var hex = [
pad2(mathRound(r).toString(16)),
pad2(mathRound(g).toString(16)),
pad2(mathRound(b).toString(16)),
pad2(convertDecimalToHex(a))
];
// Return a 4 character hex if possible
if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
}
return hex.join("");
}
// `rgbaToArgbHex`
// Converts an RGBA color to an ARGB Hex8 string
// Rarely used, but required for "toFilter()"
function rgbaToArgbHex(r, g, b, a) {
var hex = [
pad2(convertDecimalToHex(a)),
pad2(mathRound(r).toString(16)),
pad2(mathRound(g).toString(16)),
pad2(mathRound(b).toString(16))
];
return hex.join("");
}
// `equals`
// Can be called with any tinycolor input
tinycolor.equals = function (color1, color2) {
if (!color1 || !color2) { return false; }
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
};
tinycolor.random = function() {
return tinycolor.fromRatio({
r: mathRandom(),
g: mathRandom(),
b: mathRandom()
});
};
// Modification Functions
// ----------------------
// Thanks to less.js for some of the basics here
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
function desaturate(color, amount) {
amount = (amount === 0) ? 0 : (amount || 10);
var hsl = tinycolor(color).toHsl();
hsl.s -= amount / 100;
hsl.s = clamp01(hsl.s);
return tinycolor(hsl);
}
function saturate(color, amount) {
amount = (amount === 0) ? 0 : (amount || 10);
var hsl = tinycolor(color).toHsl();
hsl.s += amount / 100;
hsl.s = clamp01(hsl.s);
return tinycolor(hsl);
}
function greyscale(color) {
return tinycolor(color).desaturate(100);
}
function lighten (color, amount) {
amount = (amount === 0) ? 0 : (amount || 10);
var hsl = tinycolor(color).toHsl();
hsl.l += amount / 100;
hsl.l = clamp01(hsl.l);
return tinycolor(hsl);
}
function brighten(color, amount) {
amount = (amount === 0) ? 0 : (amount || 10);
var rgb = tinycolor(color).toRgb();
rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
return tinycolor(rgb);
}
function darken (color, amount) {
amount = (amount === 0) ? 0 : (amount || 10);
var hsl = tinycolor(color).toHsl();
hsl.l -= amount / 100;
hsl.l = clamp01(hsl.l);
return tinycolor(hsl);
}
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
// Values outside of this range will be wrapped into this range.
function spin(color, amount) {
var hsl = tinycolor(color).toHsl();
var hue = (hsl.h + amount) % 360;
hsl.h = hue < 0 ? 360 + hue : hue;
return tinycolor(hsl);
}
// Combination Functions
// ---------------------
// Thanks to jQuery xColor for some of the ideas behind these
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
function complement(color) {
var hsl = tinycolor(color).toHsl();
hsl.h = (hsl.h + 180) % 360;
return tinycolor(hsl);
}
function triad(color) {
var hsl = tinycolor(color).toHsl();
var h = hsl.h;
return [
tinycolor(color),
tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
];
}
function tetrad(color) {
var hsl = tinycolor(color).toHsl();
var h = hsl.h;
return [
tinycolor(color),
tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
];
}
function splitcomplement(color) {
var hsl = tinycolor(color).toHsl();
var h = hsl.h;
return [
tinycolor(color),
tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
];
}
function analogous(color, results, slices) {
results = results || 6;
slices = slices || 30;
var hsl = tinycolor(color).toHsl();
var part = 360 / slices;
var ret = [tinycolor(color)];
for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
hsl.h = (hsl.h + part) % 360;
ret.push(tinycolor(hsl));
}
return ret;
}
function monochromatic(color, results) {
results = results || 6;
var hsv = tinycolor(color).toHsv();
var h = hsv.h, s = hsv.s, v = hsv.v;
var ret = [];
var modification = 1 / results;
while (results--) {
ret.push(tinycolor({ h: h, s: s, v: v}));
v = (v + modification) % 1;
}
return ret;
}
// Utility Functions
// ---------------------
tinycolor.mix = function(color1, color2, amount) {
amount = (amount === 0) ? 0 : (amount || 50);
var rgb1 = tinycolor(color1).toRgb();
var rgb2 = tinycolor(color2).toRgb();
var p = amount / 100;
var rgba = {
r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
a: ((rgb2.a - rgb1.a) * p) + rgb1.a
};
return tinycolor(rgba);
};
// Readability Functions
// ---------------------
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
// `contrast`
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
tinycolor.readability = function(color1, color2) {
var c1 = tinycolor(color1);
var c2 = tinycolor(color2);
return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
};
// `isReadable`
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
// The third argument is an optional Object.
// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
// *Example*
// tinycolor.isReadable("#000", "#111") => false
// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
tinycolor.isReadable = function(color1, color2, wcag2) {
var readability = tinycolor.readability(color1, color2);
var wcag2Parms, out;
out = false;
wcag2Parms = validateWCAG2Parms(wcag2);
switch (wcag2Parms.level + wcag2Parms.size) {
case "AAsmall":
case "AAAlarge":
out = readability >= 4.5;
break;
case "AAlarge":
out = readability >= 3;
break;
case "AAAsmall":
out = readability >= 7;
break;
}
return out;
};
// `mostReadable`
// Given a base color and a list of possible foreground or background
// colors for that base, returns the most readable color.
// Optionally returns Black or White if the most readable color is unreadable.
// *Example*
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
tinycolor.mostReadable = function(baseColor, colorList, args) {
var bestColor = null;
var bestScore = 0;
var readability;
var includeFallbackColors, level, size ;
args = args || {};
includeFallbackColors = args.includeFallbackColors ;
level = args.level;
size = args.size;
for (var i= 0; i < colorList.length ; i++) {
readability = tinycolor.readability(baseColor, colorList[i]);
if (readability > bestScore) {
bestScore = readability;
bestColor = tinycolor(colorList[i]);
}
}
if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
return bestColor;
}
else {
args.includeFallbackColors=false;
return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
}
};
// Big List of Colors
// ------------------
// <http://www.w3.org/TR/css3-color/#svg-color>
var names = tinycolor.names = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "0ff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "00f",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
burntsienna: "ea7e5d",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "0ff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "f0f",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "663399",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
};
// Make it easy to access colors via `hexNames[hex]`
var hexNames = tinycolor.hexNames = flip(names);
// Utilities
// ---------
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
function flip(o) {
var flipped = { };
for (var i in o) {
if (o.hasOwnProperty(i)) {
flipped[o[i]] = i;
}
}
return flipped;
}
// Return a valid alpha value [0,1] with all invalid values being set to 1
function boundAlpha(a) {
a = parseFloat(a);
if (isNaN(a) || a < 0 || a > 1) {
a = 1;
}
return a;
}
// Take input from [0, n] and return it as [0, 1]
function bound01(n, max) {
if (isOnePointZero(n)) { n = "100%"; }
var processPercent = isPercentage(n);
n = mathMin(max, mathMax(0, parseFloat(n)));
// Automatically convert percentage into number
if (processPercent) {
n = parseInt(n * max, 10) / 100;
}
// Handle floating point rounding errors
if ((Math.abs(n - max) < 0.000001)) {
return 1;
}
// Convert into [0, 1] range if it isn't already
return (n % max) / parseFloat(max);
}
// Force a number between 0 and 1
function clamp01(val) {
return mathMin(1, mathMax(0, val));
}
// Parse a base-16 hex value into a base-10 integer
function parseIntFromHex(val) {
return parseInt(val, 16);
}
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
function isOnePointZero(n) {
return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
}
// Check to see if string passed in is a percentage
function isPercentage(n) {
return typeof n === "string" && n.indexOf('%') != -1;
}
// Force a hex value to have 2 characters
function pad2(c) {
return c.length == 1 ? '0' + c : '' + c;
}
// Replace a decimal with it's percentage value
function convertToPercentage(n) {
if (n <= 1) {
n = (n * 100) + "%";
}
return n;
}
// Converts a decimal to a hex value
function convertDecimalToHex(d) {
return Math.round(parseFloat(d) * 255).toString(16);
}
// Converts a hex value to a decimal
function convertHexToDecimal(h) {
return (parseIntFromHex(h) / 255);
}
var matchers = (function() {
// <http://www.w3.org/TR/css3-values/#integers>
var CSS_INTEGER = "[-\\+]?\\d+%?";
// <http://www.w3.org/TR/css3-values/#number-value>
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
// Actual matching.
// Parentheses and commas are optional, but not required.
// Whitespace can take the place of commas or opening paren
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
return {
CSS_UNIT: new RegExp(CSS_UNIT),
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
})();
// `isValidCSSUnit`
// Take in a single string / number and check to see if it looks like a CSS unit
// (see `matchers` above for definition).
function isValidCSSUnit(color) {
return !!matchers.CSS_UNIT.exec(color);
}
// `stringInputToObject`
// Permissive string parsing. Take in a number of formats, and output an object
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
function stringInputToObject(color) {
color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
var named = false;
if (names[color]) {
color = names[color];
named = true;
}
else if (color == 'transparent') {
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
}
// Try to match string input using regular expressions.
// Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
// Just return an object and let the conversion functions handle that.
// This way the result will be the same whether the tinycolor is initialized with string or object.
var match;
if ((match = matchers.rgb.exec(color))) {
return { r: match[1], g: match[2], b: match[3] };
}
if ((match = matchers.rgba.exec(color))) {
return { r: match[1], g: match[2], b: match[3], a: match[4] };
}
if ((match = matchers.hsl.exec(color))) {
return { h: match[1], s: match[2], l: match[3] };
}
if ((match = matchers.hsla.exec(color))) {
return { h: match[1], s: match[2], l: match[3], a: match[4] };
}
if ((match = matchers.hsv.exec(color))) {
return { h: match[1], s: match[2], v: match[3] };
}
if ((match = matchers.hsva.exec(color))) {
return { h: match[1], s: match[2], v: match[3], a: match[4] };
}
if ((match = matchers.hex8.exec(color))) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
a: convertHexToDecimal(match[4]),
format: named ? "name" : "hex8"
};
}
if ((match = matchers.hex6.exec(color))) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
format: named ? "name" : "hex"
};
}
if ((match = matchers.hex4.exec(color))) {
return {
r: parseIntFromHex(match[1] + '' + match[1]),
g: parseIntFromHex(match[2] + '' + match[2]),
b: parseIntFromHex(match[3] + '' + match[3]),
a: convertHexToDecimal(match[4] + '' + match[4]),
format: named ? "name" : "hex8"
};
}
if ((match = matchers.hex3.exec(color))) {
return {
r: parseIntFromHex(match[1] + '' + match[1]),
g: parseIntFromHex(match[2] + '' + match[2]),
b: parseIntFromHex(match[3] + '' + match[3]),
format: named ? "name" : "hex"
};
}
return false;
}
function validateWCAG2Parms(parms) {
// return valid WCAG2 parms for isReadable.
// If input parms are invalid, return {"level":"AA", "size":"small"}
var level, size;
parms = parms || {"level":"AA", "size":"small"};
level = (parms.level || "AA").toUpperCase();
size = (parms.size || "small").toLowerCase();
if (level !== "AA" && level !== "AAA") {
level = "AA";
}
if (size !== "small" && size !== "large") {
size = "small";
}
return {"level":level, "size":size};
}
// Node: Export function
if (typeof module !== "undefined" && module.exports) {
module.exports = tinycolor;
}
// AMD/requirejs: Define the module
else if (typeof define === 'function' && define.amd) {
define(function () {return tinycolor;});
}
// Browser: Expose to window
else {
window.tinycolor = tinycolor;
}
})(Math);
{
"tiddlers": {
"$:/config/EditorTypeMappings/application/javascript": {
"title": "$:/config/EditorTypeMappings/application/javascript",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/application/json": {
"title": "$:/config/EditorTypeMappings/application/json",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/application/x-tiddler-dictionary": {
"title": "$:/config/EditorTypeMappings/application/x-tiddler-dictionary",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/css": {
"title": "$:/config/EditorTypeMappings/text/css",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/html": {
"title": "$:/config/EditorTypeMappings/text/html",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/plain": {
"title": "$:/config/EditorTypeMappings/text/plain",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/vnd.tiddlywiki": {
"title": "$:/config/EditorTypeMappings/text/vnd.tiddlywiki",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/x-markdown": {
"title": "$:/config/EditorTypeMappings/text/x-markdown",
"text": "codemirror"
},
"$:/config/EditorTypeMappings/text/x-tiddlywiki": {
"title": "$:/config/EditorTypeMappings/text/x-tiddlywiki",
"text": "codemirror"
},
"$:/config/CodeMirror": {
"title": "$:/config/CodeMirror",
"type": "application/json",
"text": "{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/mode/multiplex.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/css/css.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/htmlembedded/htmlembedded.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/markdown/markdown.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/meta.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\",\n \"$:/plugins/tiddlywiki/codemirror/keymap/vim.js\",\n \"$:/plugins/tiddlywiki/codemirror/keymap/emacs.js\"\n ],\n \"configuration\": {\n \"matchBrackets\": true,\n \"showCursorWhenSelecting\": true\n }\n}"
},
"$:/plugins/tiddlywiki/codemirror/edit-codemirror.js": {
"title": "$:/plugins/tiddlywiki/codemirror/edit-codemirror.js",
"text": "/*\\\ntitle: $:/plugins/tiddlywiki/codemirror/edit-codemirror.js\ntype: application/javascript\nmodule-type: widget\n\nEdit-codemirror widget\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar editTextWidgetFactory = require(\"$:/core/modules/editor/factory.js\").editTextWidgetFactory,\n\tCodeMirrorEngine = require(\"$:/plugins/tiddlywiki/codemirror/engine.js\").CodeMirrorEngine;\n\nexports[\"edit-codemirror\"] = editTextWidgetFactory(CodeMirrorEngine,CodeMirrorEngine);\n\n})();\n",
"type": "application/javascript",
"module-type": "widget"
},
"$:/plugins/tiddlywiki/codemirror/engine.js": {
"title": "$:/plugins/tiddlywiki/codemirror/engine.js",
"text": "/*\\\ntitle: $:/plugins/tiddlywiki/codemirror/engine.js\ntype: application/javascript\nmodule-type: library\n\nText editor engine based on a CodeMirror instance\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\nvar CODEMIRROR_OPTIONS = \"$:/config/CodeMirror\",\n\tHEIGHT_VALUE_TITLE = \"$:/config/TextEditor/EditorHeight/Height\"\n\n// Install CodeMirror\nif($tw.browser && !window.CodeMirror) {\n\twindow.CodeMirror = require(\"$:/plugins/tiddlywiki/codemirror/lib/codemirror.js\");\n\t// Install required CodeMirror plugins\n\tvar configOptions = $tw.wiki.getTiddlerData(CODEMIRROR_OPTIONS,{}),\n\t\treq = configOptions.require;\n\tif(req) {\n\t\tif($tw.utils.isArray(req)) {\n\t\t\tfor(var index=0; index<req.length; index++) {\n\t\t\t\trequire(req[index]);\n\t\t\t}\n\t\t} else {\n\t\t\trequire(req);\n\t\t}\n\t}\n}\n\nfunction CodeMirrorEngine(options) {\n\t// Save our options\n\tvar self = this;\n\toptions = options || {};\n\tthis.widget = options.widget;\n\tthis.value = options.value;\n\tthis.parentNode = options.parentNode;\n\tthis.nextSibling = options.nextSibling;\n\t// Create the wrapper DIV\n\tthis.domNode = this.widget.document.createElement(\"div\");\n\tif(this.widget.editClass) {\n\t\tthis.domNode.className = this.widget.editClass;\n\t}\n\tthis.domNode.style.display = \"inline-block\";\n\tthis.parentNode.insertBefore(this.domNode,this.nextSibling);\n\tthis.widget.domNodes.push(this.domNode);\n\t// Get the configuration options for the CodeMirror object\n\tvar config = $tw.wiki.getTiddlerData(CODEMIRROR_OPTIONS,{}).configuration || {};\n\tif(!(\"lineWrapping\" in config)) {\n\t\tconfig.lineWrapping = true;\n\t}\n\tif(!(\"lineNumbers\" in config)) {\n\t\tconfig.lineNumbers = true;\n\t}\n\tconfig.mode = options.type;\n\tconfig.value = options.value;\n\t// Create the CodeMirror instance\n\tthis.cm = window.CodeMirror(function(cmDomNode) {\n\t\t// Note that this is a synchronous callback that is called before the constructor returns\n\t\tself.domNode.appendChild(cmDomNode);\n\t},config);\n\t// Set up a change event handler\n\tthis.cm.on(\"change\",function() {\n\t\tself.widget.saveChanges(self.getText());\n\t});\n\tthis.cm.on(\"drop\",function(cm,event) {\n\t\tevent.stopPropagation(); // Otherwise TW's dropzone widget sees the drop event\n\t\treturn false;\n\t});\n\tthis.cm.on(\"keydown\",function(cm,event) {\n\t\treturn self.widget.handleKeydownEvent.call(self.widget,event);\n\t});\n}\n\n/*\nSet the text of the engine if it doesn't currently have focus\n*/\nCodeMirrorEngine.prototype.setText = function(text,type) {\n\tthis.cm.setOption(\"mode\",type);\n\tif(!this.cm.hasFocus()) {\n\t\tthis.cm.setValue(text);\n\t}\n};\n\n/*\nGet the text of the engine\n*/\nCodeMirrorEngine.prototype.getText = function() {\n\treturn this.cm.getValue();\n};\n\n/*\nFix the height of textarea to fit content\n*/\nCodeMirrorEngine.prototype.fixHeight = function() {\n\tif(this.widget.editAutoHeight) {\n\t\t// Resize to fit\n\t\tthis.cm.setSize(null,null);\n\t} else {\n\t\tvar fixedHeight = parseInt(this.widget.wiki.getTiddlerText(HEIGHT_VALUE_TITLE,\"400px\"),10);\n\t\tfixedHeight = Math.max(fixedHeight,20);\n\t\tthis.cm.setSize(null,fixedHeight);\n\t}\n};\n\n/*\nFocus the engine node\n*/\nCodeMirrorEngine.prototype.focus = function() {\n\tthis.cm.focus();\n}\n\n/*\nCreate a blank structure representing a text operation\n*/\nCodeMirrorEngine.prototype.createTextOperation = function() {\n\tvar selections = this.cm.listSelections();\n\tif(selections.length > 0) {\n\t\tvar anchorPos = this.cm.indexFromPos(selections[0].anchor),\n\t\t\theadPos = this.cm.indexFromPos(selections[0].head);\n\t}\n\tvar operation = {\n\t\ttext: this.cm.getValue(),\n\t\tselStart: Math.min(anchorPos,headPos),\n\t\tselEnd: Math.max(anchorPos,headPos),\n\t\tcutStart: null,\n\t\tcutEnd: null,\n\t\treplacement: null,\n\t\tnewSelStart: null,\n\t\tnewSelEnd: null\n\t};\n\toperation.selection = operation.text.substring(operation.selStart,operation.selEnd);\n\treturn operation;\n};\n\n/*\nExecute a text operation\n*/\nCodeMirrorEngine.prototype.executeTextOperation = function(operation) {\n\t// Perform the required changes to the text area and the underlying tiddler\n\tvar newText = operation.text;\n\tif(operation.replacement !== null) {\n\t\tthis.cm.replaceRange(operation.replacement,this.cm.posFromIndex(operation.cutStart),this.cm.posFromIndex(operation.cutEnd));\n\t\tthis.cm.setSelection(this.cm.posFromIndex(operation.newSelStart),this.cm.posFromIndex(operation.newSelEnd));\n\t\tnewText = operation.text.substring(0,operation.cutStart) + operation.replacement + operation.text.substring(operation.cutEnd);\n\t}\n\tthis.cm.focus();\n\treturn newText;\n};\n\nexports.CodeMirrorEngine = CodeMirrorEngine;\n\n})();\n",
"type": "application/javascript",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/lib/codemirror.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// This is CodeMirror (http://codemirror.net), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n module.exports = mod();\n else if (typeof define == \"function\" && define.amd) // AMD\n return define([], mod);\n else // Plain browser env\n (this || window).CodeMirror = mod();\n})(function() {\n \"use strict\";\n\n // BROWSER SNIFFING\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);\n var webkit = /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = /Chrome\\//.test(userAgent);\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = /AppleWebKit/.test(userAgent) && /Mobile\\/\\w+/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) presto_version = Number(presto_version[1]);\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n // EDITOR CONSTRUCTOR\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n setGuttersForLineNumbers(options);\n\n var doc = options.value;\n if (typeof doc == \"string\") doc = new Doc(doc, options.mode, null, options.lineSeparator);\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input);\n display.wrapper.CodeMirror = this;\n updateGutters(this);\n themeChanged(this);\n if (options.lineWrapping)\n this.display.wrapper.className += \" CodeMirror-wrap\";\n if (options.autofocus && !mobile) display.input.focus();\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n var cm = this;\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20);\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || cm.hasFocus())\n setTimeout(bind(onFocus, this), 20);\n else\n onBlur(this);\n\n for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))\n optionHandlers[opt](this, options[opt], Init);\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) options.finishInit(this);\n for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n display.lineDiv.style.textRendering = \"auto\";\n }\n\n // DISPLAY CONSTRUCTOR\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = elt(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = elt(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [elt(\"div\", [d.lineSpace], \"CodeMirror-lines\")], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) d.scroller.draggable = true;\n\n if (place) {\n if (place.appendChild) place.appendChild(d.wrapper);\n else place(d.wrapper);\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n input.init(d);\n }\n\n // STATE UPDATES\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function(line) {\n if (line.stateAfter) line.stateAfter = null;\n if (line.styles) line.styles = null;\n });\n cm.doc.frontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) regChange(cm);\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function(){updateScrollbars(cm);}, 100);\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function(line) {\n if (lineIsHidden(cm.doc, line)) return 0;\n\n var widgetsHeight = 0;\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;\n }\n\n if (wrapping)\n return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;\n else\n return widgetsHeight + th;\n };\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function(line) {\n var estHeight = est(line);\n if (estHeight != line.height) updateLineHeight(line, estHeight);\n });\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n }\n\n function guttersChanged(cm) {\n updateGutters(cm);\n regChange(cm);\n setTimeout(function(){alignHorizontally(cm);}, 20);\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function updateGutters(cm) {\n var gutters = cm.display.gutters, specs = cm.options.gutters;\n removeChildren(gutters);\n for (var i = 0; i < specs.length; ++i) {\n var gutterClass = specs[i];\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + gutterClass));\n if (gutterClass == \"CodeMirror-linenumbers\") {\n cm.display.lineGutter = gElt;\n gElt.style.width = (cm.display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = i ? \"\" : \"none\";\n updateGutterSpace(cm);\n }\n\n function updateGutterSpace(cm) {\n var width = cm.display.gutters.offsetWidth;\n cm.display.sizer.style.marginLeft = width + \"px\";\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) return 0;\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found = merged.find(0, true);\n len -= cur.text.length - found.from.ch;\n cur = found.to.line;\n len += cur.text.length - found.to.ch;\n }\n return len;\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function(line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // Make sure the gutters options contains the element\n // \"CodeMirror-linenumbers\" when the lineNumbers option is true.\n function setGuttersForLineNumbers(options) {\n var found = indexOf(options.gutters, \"CodeMirror-linenumbers\");\n if (found == -1 && options.lineNumbers) {\n options.gutters = options.gutters.concat([\"CodeMirror-linenumbers\"]);\n } else if (found > -1 && !options.lineNumbers) {\n options.gutters = options.gutters.slice(0);\n options.gutters.splice(found, 1);\n }\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n };\n }\n\n function NativeScrollbars(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function() {\n if (vert.clientHeight) scroll(vert.scrollTop, \"vertical\");\n });\n on(horiz, \"scroll\", function() {\n if (horiz.clientWidth) scroll(horiz.scrollLeft, \"horizontal\");\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\";\n }\n\n NativeScrollbars.prototype = copyObj({\n update: function(measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n (measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) this.zeroWidthHack();\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0};\n },\n setScrollLeft: function(pos) {\n if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos;\n if (this.disableHoriz) this.enableZeroWidthBar(this.horiz, this.disableHoriz);\n },\n setScrollTop: function(pos) {\n if (this.vert.scrollTop != pos) this.vert.scrollTop = pos;\n if (this.disableVert) this.enableZeroWidthBar(this.vert, this.disableVert);\n },\n zeroWidthHack: function() {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.pointerEvents = this.vert.style.pointerEvents = \"none\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n },\n enableZeroWidthBar: function(bar, delay) {\n bar.style.pointerEvents = \"auto\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // left corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt = document.elementFromPoint(box.left + 1, box.bottom - 1);\n if (elt != bar) bar.style.pointerEvents = \"none\";\n else delay.set(1000, maybeDisable);\n }\n delay.set(1000, maybeDisable);\n },\n clear: function() {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n }\n }, NativeScrollbars.prototype);\n\n function NullScrollbars() {}\n\n NullScrollbars.prototype = copyObj({\n update: function() { return {bottom: 0, right: 0}; },\n setScrollLeft: function() {},\n setScrollTop: function() {},\n clear: function() {}\n }, NullScrollbars.prototype);\n\n CodeMirror.scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n }\n\n cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function() {\n if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0);\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function(pos, axis) {\n if (axis == \"horizontal\") setScrollLeft(cm, pos);\n else setScrollTop(cm, pos);\n }, cm);\n if (cm.display.scrollbars.addClass)\n addClass(cm.display.wrapper, cm.display.scrollbars.addClass);\n }\n\n function updateScrollbars(cm, measure) {\n if (!measure) measure = measureForScrollbars(cm);\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n updateHeightsInViewport(cm);\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\"\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else d.scrollbarFiller.style.display = \"\";\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else d.gutterFiller.style.display = \"\";\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)};\n }\n\n // LINE NUMBERS\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) if (!view[i].hidden) {\n if (cm.options.fixedGutter && view[i].gutter)\n view[i].gutter.style.left = left;\n var align = view[i].alignable;\n if (align) for (var j = 0; j < align.length; j++)\n align[j].style.left = left;\n }\n if (cm.options.fixedGutter)\n display.gutters.style.left = (comp + gutterW) + \"px\";\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) return false;\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm);\n return true;\n }\n return false;\n }\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber));\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;\n }\n\n // DISPLAY DRAWING\n\n function DisplayUpdate(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n }\n\n DisplayUpdate.prototype.signal = function(emitter, type) {\n if (hasHandler(emitter, type))\n this.events.push(arguments);\n };\n DisplayUpdate.prototype.finish = function() {\n for (var i = 0; i < this.events.length; i++)\n signal.apply(null, this.events[i]);\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false;\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n return false;\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);\n if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n return false;\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var focused = activeElt();\n if (toUpdate > 4) display.lineDiv.style.display = \"none\";\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) display.lineDiv.style.display = \"\";\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true;\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)};\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n break;\n }\n if (!updateDisplayIfNeeded(cm, update)) break;\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], height;\n if (cur.hidden) continue;\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n }\n var diff = cur.line.height - height;\n if (height < 2) height = textHeight(display);\n if (diff > .001 || diff < -.001) {\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) for (var j = 0; j < cur.rest.length; j++)\n updateWidgetHeight(cur.rest[j]);\n }\n }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)\n line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don't interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[cm.options.gutters[i]] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth};\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n node.style.display = \"none\";\n else\n node.parentNode.removeChild(node);\n return next;\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) {\n } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) cur = rm(cur);\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) updateNumber = false;\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) cur = rm(cur);\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line's\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") updateLineText(cm, lineView);\n else if (type == \"gutter\") updateLineGutter(cm, lineView, lineN, dims);\n else if (type == \"class\") updateLineClasses(lineView);\n else if (type == \"widget\") updateLineWidgets(cm, lineView, dims);\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n lineView.text.parentNode.replaceChild(lineView.node, lineView.text);\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) lineView.node.style.zIndex = 2;\n }\n return lineView.node;\n }\n\n function updateLineBackground(lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) cls += \" CodeMirror-linebackground\";\n if (lineView.background) {\n if (cls) lineView.background.className = cls;\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built;\n }\n return buildLineContent(cm, lineView);\n }\n\n // Redraw the line's text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) lineView.node = built.pre;\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(lineView) {\n updateLineBackground(lineView);\n if (lineView.line.wrapClass)\n ensureLineWrapped(lineView).className = lineView.line.wrapClass;\n else if (lineView.node != lineView.text)\n lineView.node.className = \"\";\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n \"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +\n \"px; width: \" + dims.gutterTotalWidth + \"px\");\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", \"left: \" +\n (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\");\n cm.display.input.setUneditable(gutterWrap);\n wrap.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n gutterWrap.className += \" \" + lineView.line.gutterClass;\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n \"left: \" + dims.gutterLeft[\"CodeMirror-linenumbers\"] + \"px; width: \"\n + cm.display.lineNumInnerWidth + \"px\"));\n if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {\n var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\", \"left: \" +\n dims.gutterLeft[id] + \"px; width: \" + dims.gutterWidth[id] + \"px\"));\n }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) lineView.alignable = null;\n for (var node = lineView.node.firstChild, next; node; node = next) {\n var next = node.nextSibling;\n if (node.className == \"CodeMirror-linewidget\")\n lineView.node.removeChild(node);\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line's DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) lineView.bgClass = built.bgClass;\n if (built.textClass) lineView.textClass = built.textClass;\n\n updateLineClasses(lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node;\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false);\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) return;\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\");\n if (!widget.handleMouseEvents) node.setAttribute(\"cm-ignore-events\", \"true\");\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n wrap.insertBefore(node, lineView.gutter || lineView.text);\n else\n wrap.appendChild(node);\n signalLater(widget, \"redraw\");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + \"px\";\n }\n }\n\n // POSITION OBJECT\n\n // A Pos instance represents a position within the text.\n var Pos = CodeMirror.Pos = function(line, ch) {\n if (!(this instanceof Pos)) return new Pos(line, ch);\n this.line = line; this.ch = ch;\n };\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };\n\n function copyPos(x) {return Pos(x.line, x.ch);}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }\n\n // INPUT HANDLING\n\n function ensureFocus(cm) {\n if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }\n }\n\n // This will be set to an array of strings when copying, so that,\n // when pasting, we know what kind of selections the copied text\n // was made out of.\n var lastCopied = null;\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) sel = doc.sel;\n\n var paste = cm.state.pasteIncoming || origin == \"paste\";\n var textLines = doc.splitLines(inserted), multiPaste = null;\n // When pasing N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.length; i++)\n multiPaste.push(doc.splitLines(lastCopied[i]));\n }\n } else if (textLines.length == sel.ranges.length) {\n multiPaste = map(textLines, function(l) { return [l]; });\n }\n }\n\n // Normal behavior is to insert the new text into every selection\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range = sel.ranges[i];\n var from = range.from(), to = range.to();\n if (range.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n from = Pos(from.line, from.ch - deleted);\n else if (cm.state.overwrite && !paste) // Handle overwrite\n to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));\n }\n var updateInput = cm.curOp.updateInput;\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n triggerElectric(cm, inserted);\n\n ensureCursorVisible(cm);\n cm.curOp.updateInput = updateInput;\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = false;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"text/plain\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput)\n runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, \"paste\"); });\n return true;\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) return;\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range = sel.ranges[i];\n if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue;\n var mode = cm.getModeAt(range.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range.head.line, \"smart\");\n break;\n }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n indented = indentLine(cm, range.head.line, \"smart\");\n }\n if (indented) signalLater(cm, \"electricInput\", cm, range.head.line);\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges};\n }\n\n function disableBrowserMagic(field) {\n field.setAttribute(\"autocorrect\", \"off\");\n field.setAttribute(\"autocapitalize\", \"off\");\n field.setAttribute(\"spellcheck\", \"false\");\n }\n\n // TEXTAREA INPUT STYLE\n\n function TextareaInput(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Tracks when input.reset has punted to just putting a short\n // string into the textarea instead of the full selection.\n this.inaccurateSelection = false;\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n };\n\n function hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; padding: 0; width: 1px; height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) te.style.width = \"1000px\";\n else te.setAttribute(\"wrap\", \"off\");\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) te.style.border = \"1px solid black\";\n disableBrowserMagic(te);\n return div;\n }\n\n TextareaInput.prototype = copyObj({\n init: function(display) {\n var input = this, cm = this.cm;\n\n // Wraps and hides input textarea\n var div = this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n var te = this.textarea = div.firstChild;\n display.wrapper.insertBefore(div, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) te.style.width = \"0px\";\n\n on(te, \"input\", function() {\n if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null;\n input.poll();\n });\n\n on(te, \"paste\", function(e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) return\n\n cm.state.pasteIncoming = true;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) return\n if (cm.somethingSelected()) {\n lastCopied = cm.getSelections();\n if (input.inaccurateSelection) {\n input.prevInput = \"\";\n input.inaccurateSelection = false;\n te.value = lastCopied.join(\"\\n\");\n selectInput(te);\n }\n } else if (!cm.options.lineWiseCopyCut) {\n return;\n } else {\n var ranges = copyableRanges(cm);\n lastCopied = ranges.text;\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") cm.state.cutIncoming = true;\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function(e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) return;\n cm.state.pasteIncoming = true;\n input.focus();\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function(e) {\n if (!eventInWidget(display, e)) e_preventDefault(e);\n });\n\n on(te, \"compositionstart\", function() {\n var start = cm.getCursor(\"from\");\n if (input.composing) input.composing.range.clear()\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function() {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n },\n\n prepareSelection: function() {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result;\n },\n\n showSelection: function(drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n },\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n reset: function(typing) {\n if (this.contextMenuPending) return;\n var minimal, selected, cm = this.cm, doc = cm.doc;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var range = doc.sel.primary();\n minimal = hasCopyEvent &&\n (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);\n var content = minimal ? \"-\" : selected || cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) selectInput(this.textarea);\n if (ie && ie_version >= 9) this.hasSelection = content;\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) this.hasSelection = null;\n }\n this.inaccurateSelection = minimal;\n },\n\n getField: function() { return this.textarea; },\n\n supportsTouch: function() { return false; },\n\n focus: function() {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt() != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n },\n\n blur: function() { this.textarea.blur(); },\n\n resetPosition: function() {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n },\n\n receivedFocus: function() { this.slowPoll(); },\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n slowPoll: function() {\n var input = this;\n if (input.pollingFast) return;\n input.polling.set(this.cm.options.pollInterval, function() {\n input.poll();\n if (input.cm.state.focused) input.slowPoll();\n });\n },\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n fastPoll: function() {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n },\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n poll: function() {\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n return false;\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) return false;\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false;\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) prevInput = \"\\u200b\";\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\"); }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;\n\n var self = this;\n runInOp(cm, function() {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, self.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) input.value = self.prevInput = \"\";\n else self.prevInput = text;\n\n if (self.composing) {\n self.composing.range.clear();\n self.composing.range = cm.markText(self.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true;\n },\n\n ensurePolled: function() {\n if (this.pollingFast && this.poll()) this.pollingFast = false;\n },\n\n onKeyPress: function() {\n if (ie && ie_version >= 9) this.hasSelection = null;\n this.fastPoll();\n },\n\n onContextMenu: function(e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) return; // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n input.wrapper.style.cssText = \"position: absolute\"\n var wrapperBox = input.wrapper.getBoundingClientRect()\n te.style.cssText = \"position: absolute; width: 30px; height: 30px; top: \" + (e.clientY - wrapperBox.top - 5) +\n \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px; z-index: 1000; background: \" +\n (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") +\n \"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) window.scrollTo(null, oldScrollY);\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) te.value = input.prevInput = \" \";\n input.contextMenuPending = true;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();\n var i = 0, poll = function() {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\")\n operation(cm, commands.selectAll)(cm);\n else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);\n else display.input.reset();\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) prepareSelectAllHack();\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function() {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n },\n\n readOnlyChanged: function(val) {\n if (!val) this.reset();\n },\n\n setUneditable: nothing,\n\n needsContentAttribute: false\n }, TextareaInput.prototype);\n\n // CONTENTEDITABLE INPUT STYLE\n\n function ContentEditableInput(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.gracePeriod = false;\n }\n\n ContentEditableInput.prototype = copyObj({\n init: function(display) {\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n disableBrowserMagic(div);\n\n on(div, \"paste\", function(e) {\n if (!signalDOMEvent(cm, e)) handlePaste(e, cm);\n })\n\n on(div, \"compositionstart\", function(e) {\n var data = e.data;\n input.composing = {sel: cm.doc.sel, data: data, startData: data};\n if (!data) return;\n var prim = cm.doc.sel.primary();\n var line = cm.getLine(prim.head.line);\n var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length));\n if (found > -1 && found <= prim.head.ch)\n input.composing.sel = simpleSelection(Pos(prim.head.line, found),\n Pos(prim.head.line, found + data.length));\n });\n on(div, \"compositionupdate\", function(e) {\n input.composing.data = e.data;\n });\n on(div, \"compositionend\", function(e) {\n var ours = input.composing;\n if (!ours) return;\n if (e.data != ours.startData && !/\\u200b/.test(e.data))\n ours.data = e.data;\n // Need a small delay to prevent other code (input event,\n // selection polling) from doing damage when fired right after\n // compositionend.\n setTimeout(function() {\n if (!ours.handled)\n input.applyComposition(ours);\n if (input.composing == ours)\n input.composing = null;\n }, 50);\n });\n\n on(div, \"touchstart\", function() {\n input.forceCompositionEnd();\n });\n\n on(div, \"input\", function() {\n if (input.composing) return;\n if (cm.isReadOnly() || !input.pollContent())\n runInOp(input.cm, function() {regChange(cm);});\n });\n\n function onCopyCut(e) {\n if (signalDOMEvent(cm, e)) return\n if (cm.somethingSelected()) {\n lastCopied = cm.getSelections();\n if (e.type == \"cut\") cm.replaceSelection(\"\", null, \"cut\");\n } else if (!cm.options.lineWiseCopyCut) {\n return;\n } else {\n var ranges = copyableRanges(cm);\n lastCopied = ranges.text;\n if (e.type == \"cut\") {\n cm.operation(function() {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n if (e.clipboardData && !ios) {\n e.preventDefault();\n e.clipboardData.clearData();\n e.clipboardData.setData(\"text/plain\", lastCopied.join(\"\\n\"));\n } else {\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.join(\"\\n\");\n var hadFocus = document.activeElement;\n selectInput(te);\n setTimeout(function() {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n }, 50);\n }\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n },\n\n prepareSelection: function() {\n var result = prepareSelection(this.cm, false);\n result.focus = this.cm.state.focused;\n return result;\n },\n\n showSelection: function(info) {\n if (!info || !this.cm.display.view.length) return;\n if (info.focus) this.showPrimarySelection();\n this.showMultipleSelections(info);\n },\n\n showPrimarySelection: function() {\n var sel = window.getSelection(), prim = this.cm.doc.sel.primary();\n var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), prim.from()) == 0 &&\n cmp(maxPos(curAnchor, curFocus), prim.to()) == 0)\n return;\n\n var start = posToDOM(this.cm, prim.from());\n var end = posToDOM(this.cm, prim.to());\n if (!start && !end) return;\n\n var view = this.cm.display.view;\n var old = sel.rangeCount && sel.getRangeAt(0);\n if (!start) {\n start = {node: view[0].measure.map[2], offset: 0};\n } else if (!end) { // FIXME dangerously hacky\n var measure = view[view.length - 1].measure;\n var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n }\n\n try { var rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && this.cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) sel.addRange(rng);\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) sel.addRange(old);\n else if (gecko) this.startGracePeriod();\n }\n this.rememberSelection();\n },\n\n startGracePeriod: function() {\n var input = this;\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function() {\n input.gracePeriod = false;\n if (input.selectionChanged())\n input.cm.operation(function() { input.cm.curOp.selectionChanged = true; });\n }, 20);\n },\n\n showMultipleSelections: function(info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n },\n\n rememberSelection: function() {\n var sel = window.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n },\n\n selectionInEditor: function() {\n var sel = window.getSelection();\n if (!sel.rangeCount) return false;\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node);\n },\n\n focus: function() {\n if (this.cm.options.readOnly != \"nocursor\") this.div.focus();\n },\n blur: function() { this.div.blur(); },\n getField: function() { return this.div; },\n\n supportsTouch: function() { return true; },\n\n receivedFocus: function() {\n var input = this;\n if (this.selectionInEditor())\n this.pollSelection();\n else\n runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; });\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n },\n\n selectionChanged: function() {\n var sel = window.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset;\n },\n\n pollSelection: function() {\n if (!this.composing && !this.gracePeriod && this.selectionChanged()) {\n var sel = window.getSelection(), cm = this.cm;\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) runInOp(cm, function() {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) cm.curOp.selectionChanged = true;\n });\n }\n },\n\n pollContent: function() {\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false;\n\n var fromIndex;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n var fromLine = lineNo(display.view[0].line);\n var fromNode = display.view[0].node;\n } else {\n var fromLine = lineNo(display.view[fromIndex].line);\n var fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n if (toIndex == display.view.length - 1) {\n var toLine = display.viewTo - 1;\n var toNode = display.lineDiv.lastChild;\n } else {\n var toLine = lineNo(display.view[toIndex + 1].line) - 1;\n var toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else break;\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n ++cutFront;\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n ++cutEnd;\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd);\n newText[0] = newText[0].slice(cutFront);\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true;\n }\n },\n\n ensurePolled: function() {\n this.forceCompositionEnd();\n },\n reset: function() {\n this.forceCompositionEnd();\n },\n forceCompositionEnd: function() {\n if (!this.composing || this.composing.handled) return;\n this.applyComposition(this.composing);\n this.composing.handled = true;\n this.div.blur();\n this.div.focus();\n },\n applyComposition: function(composing) {\n if (this.cm.isReadOnly())\n operation(this.cm, regChange)(this.cm)\n else if (composing.data && composing.data != composing.startData)\n operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel);\n },\n\n setUneditable: function(node) {\n node.contentEditable = \"false\"\n },\n\n onKeyPress: function(e) {\n e.preventDefault();\n if (!this.cm.isReadOnly())\n operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0);\n },\n\n readOnlyChanged: function(val) {\n this.div.contentEditable = String(val != \"nocursor\")\n },\n\n onContextMenu: nothing,\n resetPosition: nothing,\n\n needsContentAttribute: true\n }, ContentEditableInput.prototype);\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) return null;\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result;\n }\n\n function badPos(pos, bad) { if (bad) pos.bad = true; return pos; }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true);\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) return null;\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break;\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n return locateNodeInLineView(lineView, node, offset);\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true);\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad);\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) offset = textNode.nodeValue.length;\n }\n while (topNode.parentNode != wrapper) topNode = topNode.parentNode;\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map.length; j += 3) {\n var curNode = map[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map[j] + offset;\n if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)];\n return Pos(line, ch);\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) return badPos(found, bad);\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n return badPos(Pos(found.line, found.ch - dist), bad);\n else\n dist += after.textContent.length;\n }\n for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n return badPos(Pos(found.line, found.ch + dist), bad);\n else\n dist += after.textContent.length;\n }\n }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator();\n function recognizeMarker(id) { return function(marker) { return marker.id == id; }; }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText != null) {\n if (cmText == \"\") cmText = node.textContent.replace(/\\u200b/g, \"\");\n text += cmText;\n return;\n }\n var markerID = node.getAttribute(\"cm-marker\"), range;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range = found[0].find()))\n text += getBetween(cm.doc, range.from, range.to).join(lineSep);\n return;\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") return;\n for (var i = 0; i < node.childNodes.length; i++)\n walk(node.childNodes[i]);\n if (/^(pre|div|p)$/i.test(node.nodeName))\n closing = true;\n } else if (node.nodeType == 3) {\n var val = node.nodeValue;\n if (!val) return;\n if (closing) {\n text += lineSep;\n closing = false;\n }\n text += val;\n }\n }\n for (;;) {\n walk(from);\n if (from == to) break;\n from = from.nextSibling;\n }\n return text;\n }\n\n CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n // SELECTION / CURSOR\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that's scrolled into\n // view, that getCursor returns, etc).\n function Selection(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n }\n\n Selection.prototype = {\n primary: function() { return this.ranges[this.primIndex]; },\n equals: function(other) {\n if (other == this) return true;\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this.ranges[i], there = other.ranges[i];\n if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;\n }\n return true;\n },\n deepCopy: function() {\n for (var out = [], i = 0; i < this.ranges.length; i++)\n out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));\n return new Selection(out, this.primIndex);\n },\n somethingSelected: function() {\n for (var i = 0; i < this.ranges.length; i++)\n if (!this.ranges[i].empty()) return true;\n return false;\n },\n contains: function(pos, end) {\n if (!end) end = pos;\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n return i;\n }\n return -1;\n }\n };\n\n function Range(anchor, head) {\n this.anchor = anchor; this.head = head;\n }\n\n Range.prototype = {\n from: function() { return minPos(this.anchor, this.head); },\n to: function() { return maxPos(this.anchor, this.head); },\n empty: function() {\n return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;\n }\n };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. 'Consumes' ranges array (modifying\n // it).\n function normalizeSelection(ranges, primIndex) {\n var prim = ranges[primIndex];\n ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n if (cmp(prev.to(), cur.from()) >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) --primIndex;\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex);\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0);\n }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) return Pos(doc.first, 0);\n var last = doc.first + doc.size - 1;\n if (pos.line > last) return Pos(last, getLine(doc, last).text.length);\n return clipToLen(pos, getLine(doc, pos.line).text.length);\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) return Pos(pos.line, linelen);\n else if (ch < 0) return Pos(pos.line, 0);\n else return pos;\n }\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}\n function clipPosArray(doc, array) {\n for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);\n return out;\n }\n\n // SELECTION UPDATES\n\n // The 'scroll' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(doc, range, head, other) {\n if (doc.cm && doc.cm.display.shift || doc.extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head);\n } else {\n return new Range(other || head, head);\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options) {\n setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n for (var out = [], i = 0; i < doc.sel.ranges.length; i++)\n out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);\n var newSel = normalizeSelection(out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head));\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj);\n if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);\n else return sel;\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n sel = filterSelectionChange(doc, sel, options);\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm)\n ensureCursorVisible(doc.cm);\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) return;\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) out = sel.ranges.slice(0, i);\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(out, sel.primIndex) : sel;\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) break;\n else {--i; continue;}\n }\n }\n if (!m.atomic) continue;\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff;\n if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)\n near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null);\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n return skipAtomicInner(doc, near, pos, dir, mayClear);\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)\n far = movePos(doc, far, dir, far.line == pos.line ? line : null);\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;\n }\n }\n return pos;\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0);\n }\n return found;\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) return clipPos(doc, Pos(pos.line - 1));\n else return null;\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) return Pos(pos.line + 1, 0);\n else return null;\n } else {\n return new Pos(pos.line, pos.ch + dir);\n }\n }\n\n // SELECTION DRAWING\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (primary === false && i == doc.sel.primIndex) continue;\n var range = doc.sel.ranges[i];\n if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue;\n var collapsed = range.empty();\n if (collapsed || cm.options.showCursorWhenSelecting)\n drawSelectionCursor(cm, range.head, curFragment);\n if (!collapsed)\n drawSelectionRange(cm, range, selFragment);\n }\n return result;\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n\n function add(left, top, width, bottom) {\n if (top < 0) top = 0;\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", \"position: absolute; left: \" + left +\n \"px; top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) +\n \"px; height: \" + (bottom - top) + \"px\"));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias);\n }\n\n iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {\n var leftPos = coords(from, \"left\"), rightPos, left, right;\n if (from == to) {\n rightPos = leftPos;\n left = right = leftPos.left;\n } else {\n rightPos = coords(to - 1, \"right\");\n if (dir == \"rtl\") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }\n left = leftPos.left;\n right = rightPos.right;\n }\n if (fromArg == null && from == 0) left = leftSide;\n if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part\n add(left, leftPos.top, null, leftPos.bottom);\n left = leftSide;\n if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);\n }\n if (toArg == null && to == lineLen) right = rightSide;\n if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)\n start = leftPos;\n if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)\n end = rightPos;\n if (left < leftSide + 1) left = leftSide;\n add(left, rightPos.top, right - left, rightPos.bottom);\n });\n return {start: start, end: end};\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n add(leftSide, leftEnd.bottom, null, rightStart.top);\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) return;\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n display.blinker = setInterval(function() {\n display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n }, cm.options.cursorBlinkRate);\n else if (cm.options.cursorBlinkRate < 0)\n display.cursorDiv.style.visibility = \"hidden\";\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)\n cm.state.highlight.set(time, bind(highlightWorker, cm));\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.frontier < doc.first) doc.frontier = doc.first;\n if (doc.frontier >= cm.display.viewTo) return;\n var end = +new Date + cm.options.workTime;\n var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));\n var changedLines = [];\n\n doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {\n if (doc.frontier >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles, tooLong = line.text.length > cm.options.maxHighlightLength;\n var highlighted = highlightLine(cm, line, tooLong ? copyState(doc.mode, state) : state, true);\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) line.styleClasses = newCls;\n else if (oldCls) line.styleClasses = null;\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];\n if (ischange) changedLines.push(doc.frontier);\n line.stateAfter = tooLong ? state : copyState(doc.mode, state);\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n processLine(cm, line.text, state);\n line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;\n }\n ++doc.frontier;\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true;\n }\n });\n if (changedLines.length) runInOp(cm, function() {\n for (var i = 0; i < changedLines.length; i++)\n regLineChange(cm, changedLines[i], \"text\");\n });\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) return doc.first;\n var line = getLine(doc, search - 1);\n if (line.stateAfter && (!precise || search <= doc.frontier)) return search;\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline;\n }\n\n function getStateBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) return true;\n var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;\n if (!state) state = startState(doc.mode);\n else state = copyState(doc.mode, state);\n doc.iter(pos, n, function(line) {\n processLine(cm, line.text, state);\n var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;\n line.stateAfter = save ? copyState(doc.mode, state) : null;\n ++pos;\n });\n if (precise) doc.frontier = pos;\n return state;\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop;}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}\n function paddingH(display) {\n if (display.cachedPaddingH) return display.cachedPaddingH;\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;\n return data;\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n heights.push((cur.bottom + next.top) / 2 - rect.top);\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n return {map: lineView.measure.map, cache: lineView.measure.cache};\n for (var i = 0; i < lineView.rest.length; i++)\n if (lineView.rest[i] == line)\n return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};\n for (var i = 0; i < lineView.rest.length; i++)\n if (lineNo(lineView.rest[i]) > lineN)\n return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that's not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view;\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n return cm.display.view[findViewIndex(cm, lineN)];\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n return ext;\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n view = updateExternalMeasurement(cm, line);\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n };\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) ch = -1;\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n prepared.rect = prepared.view.text.getBoundingClientRect();\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) prepared.cache[key] = found;\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom};\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map, ch, bias) {\n var node, start, end, collapse;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map.length; i += 3) {\n var mStart = map[i], mEnd = map[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) collapse = \"right\";\n }\n if (start != null) {\n node = map[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n collapse = bias;\n if (bias == \"left\" && start == 0)\n while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n node = map[(i -= 3) + 2];\n collapse = \"left\";\n }\n if (bias == \"right\" && start == mEnd - mStart)\n while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n node = map[(i += 3) + 2];\n collapse = \"right\";\n }\n break;\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd};\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start;\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end;\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) {\n rect = node.parentNode.getBoundingClientRect();\n } else if (ie && cm.options.lineWrapping) {\n var rects = range(node, start, end).getClientRects();\n if (rects.length)\n rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n else\n rect = nullRect;\n } else {\n rect = range(node, start, end).getBoundingClientRect() || nullRect;\n }\n if (rect.left || rect.right || start == 0) break;\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect);\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) collapse = bias = \"right\";\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n rect = rects[bias == \"right\" ? rects.length - 1 : 0];\n else\n rect = node.getBoundingClientRect();\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};\n else\n rect = nullRect;\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n for (var i = 0; i < heights.length - 1; i++)\n if (mid < heights[i]) break;\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) result.bogus = true;\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result;\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n return rect;\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY};\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)\n lineView.measure.caches[i] = {};\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n clearLineMeasurementCacheFor(cm.display.view[i]);\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }\n function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // \"line\", \"div\" (display.lineDiv), \"local\"/null (editor), \"window\",\n // or \"page\".\n function intoCoordSystem(cm, lineObj, rect, context) {\n if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {\n var size = widgetHeight(lineObj.widgets[i]);\n rect.top += size; rect.bottom += size;\n }\n if (context == \"line\") return rect;\n if (!context) context = \"local\";\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") yOff += paddingTop(cm.display);\n else yOff -= cm.display.viewOffset;\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY());\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX());\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect;\n }\n\n // Coverts a box from \"div\" coords to another coordinate system.\n // Context may be \"window\", \"page\", \"div\", or \"local\"/null.\n function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") return coords;\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX();\n top -= pageScrollY();\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) lineObj = getLine(cm.doc, pos.line);\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);\n }\n\n // Returns a box for a given cursor position, which may have an\n // 'other' property containing the position of the secondary cursor\n // on a bidi boundary.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) m.left = m.right; else m.right = m.left;\n return intoCoordSystem(cm, lineObj, m, context);\n }\n function getBidi(ch, partPos) {\n var part = order[partPos], right = part.level % 2;\n if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {\n part = order[--partPos];\n ch = bidiRight(part) - (part.level % 2 ? 0 : 1);\n right = true;\n } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {\n part = order[++partPos];\n ch = bidiLeft(part) - part.level % 2;\n right = false;\n }\n if (right && ch == part.to && ch > part.from) return get(ch - 1);\n return get(ch, right);\n }\n var order = getOrder(lineObj), ch = pos.ch;\n if (!order) return get(ch);\n var partPos = getBidiPartAt(order, ch);\n var val = getBidi(ch, partPos);\n if (bidiOther != null) val.other = getBidi(ch, bidiOther);\n return val;\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0, pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height};\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line's\n // vertical range.\n function PosWithInfo(line, ch, outside, xRel) {\n var pos = Pos(line, ch);\n pos.xRel = xRel;\n if (outside) pos.outside = true;\n return pos;\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local (\"div\" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) return PosWithInfo(doc.first, 0, true, -1);\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);\n if (x < 0) x = 0;\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var merged = collapsedSpanAtEnd(lineObj);\n var mergedPos = merged && merged.find(0, true);\n if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))\n lineN = lineNo(lineObj = mergedPos.to.line);\n else\n return found;\n }\n }\n\n function coordsCharInner(cm, lineObj, lineNo, x, y) {\n var innerOff = y - heightAtLine(lineObj);\n var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n\n function getX(ch) {\n var sp = cursorCoords(cm, Pos(lineNo, ch), \"line\", lineObj, preparedMeasure);\n wrongLine = true;\n if (innerOff > sp.bottom) return sp.left - adjust;\n else if (innerOff < sp.top) return sp.left + adjust;\n else wrongLine = false;\n return sp.left;\n }\n\n var bidi = getOrder(lineObj), dist = lineObj.text.length;\n var from = lineLeft(lineObj), to = lineRight(lineObj);\n var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;\n\n if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);\n // Do a binary search between these bounds.\n for (;;) {\n if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {\n var ch = x < fromX || x - fromX <= toX - x ? from : to;\n var xDiff = x - (ch == from ? fromX : toX);\n while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;\n var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,\n xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);\n return pos;\n }\n var step = Math.ceil(dist / 2), middle = from + step;\n if (bidi) {\n middle = from;\n for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);\n }\n var middleX = getX(middle);\n if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}\n else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}\n }\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) return display.cachedTextHeight;\n if (measureText == null) {\n measureText = elt(\"pre\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) display.cachedTextHeight = height;\n removeChildren(display.measure);\n return height || 1;\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) return display.cachedCharWidth;\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor]);\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) display.cachedCharWidth = width;\n return width || 10;\n }\n\n // OPERATIONS\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won't have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var operationGroup = null;\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: null, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId // Unique ID\n };\n if (operationGroup) {\n operationGroup.ops.push(cm.curOp);\n } else {\n cm.curOp.ownsGroup = operationGroup = {\n ops: [cm.curOp],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n callbacks[i].call(null);\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm);\n }\n } while (i < callbacks.length);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp, group = op.ownsGroup;\n if (!group) return;\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n for (var i = 0; i < group.ops.length; i++)\n group.ops[i].cm.curOp = null;\n endOperations(group);\n }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n endOperation_R1(ops[i]);\n for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n endOperation_W1(ops[i]);\n for (var i = 0; i < ops.length; i++) // Read DOM\n endOperation_R2(ops[i]);\n for (var i = 0; i < ops.length; i++) // Write DOM (maybe)\n endOperation_W2(ops[i]);\n for (var i = 0; i < ops.length; i++) // Read DOM\n endOperation_finish(ops[i]);\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) findMaxLine(cm);\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) updateHeightsInViewport(cm);\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n op.preparedSelection = display.input.prepareSelection();\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);\n cm.display.maxLineChanged = false;\n }\n\n if (op.preparedSelection)\n cm.display.input.showSelection(op.preparedSelection);\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n updateScrollbars(cm, op.barMeasure);\n if (op.updatedDisplay)\n setDocumentHeight(cm, op.barMeasure);\n\n if (op.selectionChanged) restartBlink(cm);\n\n if (cm.state.focused && op.updateInput)\n cm.display.input.reset(op.typing);\n if (op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()))\n ensureFocus(op.cm);\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) postUpdateDisplay(cm, op.update);\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n display.wheelStartX = display.wheelStartY = null;\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {\n doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));\n display.scrollbars.setScrollTop(doc.scrollTop);\n display.scroller.scrollTop = doc.scrollTop;\n }\n if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {\n doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft));\n display.scrollbars.setScrollLeft(doc.scrollLeft);\n display.scroller.scrollLeft = doc.scrollLeft;\n alignHorizontally(cm);\n }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) for (var i = 0; i < hidden.length; ++i)\n if (!hidden[i].lines.length) signal(hidden[i], \"hide\");\n if (unhidden) for (var i = 0; i < unhidden.length; ++i)\n if (unhidden[i].lines.length) signal(unhidden[i], \"unhide\");\n\n if (display.wrapper.offsetHeight)\n doc.scrollTop = cm.display.scroller.scrollTop;\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n signal(cm, \"changes\", cm, op.changeObjs);\n if (op.update)\n op.update.finish();\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) return f();\n startOperation(cm);\n try { return f(); }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) return f.apply(this, arguments);\n startOperation(this);\n try { return f.apply(this, arguments); }\n finally { endOperation(this); }\n };\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) return f.apply(this, arguments);\n startOperation(cm);\n try { return f.apply(this, arguments); }\n finally { endOperation(cm); }\n };\n }\n\n // VIEW TRACKING\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array;\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) from = cm.doc.first;\n if (to == null) to = cm.doc.first + cm.doc.size;\n if (!lendiff) lendiff = 0;\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n display.updateLineNumbers = from;\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n resetView(cm);\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut = viewCuttingPoint(cm, from, from, -1);\n if (cut) {\n display.view = display.view.slice(0, cut.index);\n display.viewTo = cut.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n ext.lineN += lendiff;\n else if (from < ext.lineN + ext.size)\n display.externalMeasured = null;\n }\n }\n\n // Register a change to a single line. Type must be one of \"text\",\n // \"gutter\", \"class\", \"widget\"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n display.externalMeasured = null;\n\n if (line < display.viewFrom || line >= display.viewTo) return;\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) return;\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) arr.push(type);\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn't visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) return null;\n n -= cm.display.viewFrom;\n if (n < 0) return null;\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) return i;\n }\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n return {index: index, lineN: newN};\n for (var i = 0, n = cm.display.viewFrom; i < index; i++)\n n += view[i].size;\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) return null;\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) return null;\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN};\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);\n else if (display.viewFrom < from)\n display.view = display.view.slice(findViewIndex(cm, from));\n display.viewFrom = from;\n if (display.viewTo < to)\n display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));\n else if (display.viewTo > to)\n display.view = display.view.slice(0, findViewIndex(cm, to));\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty;\n }\n return dirty;\n }\n\n // EVENT HANDLERS\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n on(d.scroller, \"dblclick\", operation(cm, function(e) {\n if (signalDOMEvent(cm, e)) return;\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n }));\n else\n on(d.scroller, \"dblclick\", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n if (!captureRightClick) on(d.scroller, \"contextmenu\", function(e) {onContextMenu(cm, e);});\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n };\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) return false;\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1;\n }\n function farAway(touch, other) {\n if (other.left == null) return true;\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20;\n }\n on(d.scroller, \"touchstart\", function(e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) {\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function() {\n if (d.activeTouch) d.activeTouch.moved = true;\n });\n on(d.scroller, \"touchend\", function(e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n range = new Range(pos, pos);\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n range = cm.findWordAt(pos);\n else // Triple tap\n range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0)));\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function() {\n if (d.scroller.clientHeight) {\n setScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function(e){onScrollWheel(cm, e);});\n on(d.scroller, \"DOMMouseScroll\", function(e){onScrollWheel(cm, e);});\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);},\n over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function(e){onDragStart(cm, e);},\n drop: operation(cm, onDrop),\n leave: function(e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function(e) { onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", bind(onFocus, cm));\n on(inp, \"blur\", bind(onBlur, cm));\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != CodeMirror.Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n }\n\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)\n return;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n // MOUSE EVENTS\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n return true;\n }\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") return null;\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e) { return null; }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords;\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) return;\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function(){display.scroller.draggable = true;}, 100);\n }\n return;\n }\n if (clickInGutter(cm, e)) return;\n var start = posFromMouse(cm, e);\n window.focus();\n\n switch (e_button(e)) {\n case 1:\n // #3261: make sure, that we're not starting a second selection\n if (cm.state.selectingText)\n cm.state.selectingText(e);\n else if (start)\n leftButtonDown(cm, e, start);\n else if (e_target(e) == display.scroller)\n e_preventDefault(e);\n break;\n case 2:\n if (webkit) cm.state.lastMiddleDown = +new Date;\n if (start) extendSelection(cm.doc, start);\n setTimeout(function() {display.input.focus();}, 20);\n e_preventDefault(e);\n break;\n case 3:\n if (captureRightClick) onContextMenu(cm, e);\n else delayBlurEvent(cm);\n break;\n }\n }\n\n var lastClick, lastDoubleClick;\n function leftButtonDown(cm, e, start) {\n if (ie) setTimeout(bind(ensureFocus, cm), 0);\n else cm.curOp.focus = activeElt();\n\n var now = +new Date, type;\n if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {\n type = \"triple\";\n } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {\n type = \"double\";\n lastDoubleClick = {time: now, pos: start};\n } else {\n type = \"single\";\n lastClick = {time: now, pos: start};\n }\n\n var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n type == \"single\" && (contained = sel.contains(start)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) &&\n (cmp(contained.to(), start) > 0 || start.xRel < 0))\n leftButtonStartDrag(cm, e, start, modifier);\n else\n leftButtonSelect(cm, e, start, type, modifier);\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn't.\n function leftButtonStartDrag(cm, e, start, modifier) {\n var display = cm.display, startTime = +new Date;\n var dragEnd = operation(cm, function(e2) {\n if (webkit) display.scroller.draggable = false;\n cm.state.draggingText = false;\n off(document, \"mouseup\", dragEnd);\n off(display.scroller, \"drop\", dragEnd);\n if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {\n e_preventDefault(e2);\n if (!modifier && +new Date - 200 < startTime)\n extendSelection(cm.doc, start);\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if (webkit || ie && ie_version == 9)\n setTimeout(function() {document.body.focus(); display.input.focus();}, 20);\n else\n display.input.focus();\n }\n });\n // Let the drag handler handle this.\n if (webkit) display.scroller.draggable = true;\n cm.state.draggingText = dragEnd;\n // IE's approach to draggable\n if (display.scroller.dragDrop) display.scroller.dragDrop();\n on(document, \"mouseup\", dragEnd);\n on(display.scroller, \"drop\", dragEnd);\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, e, start, type, addNew) {\n var display = cm.display, doc = cm.doc;\n e_preventDefault(e);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (addNew && !e.shiftKey) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n ourRange = ranges[ourIndex];\n else\n ourRange = new Range(start, start);\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (e.altKey) {\n type = \"rect\";\n if (!addNew) ourRange = new Range(start, start);\n start = posFromMouse(cm, e, true, true);\n ourIndex = -1;\n } else if (type == \"double\") {\n var word = cm.findWordAt(start);\n if (cm.display.shift || doc.extend)\n ourRange = extendRange(doc, ourRange, word.anchor, word.head);\n else\n ourRange = word;\n } else if (type == \"triple\") {\n var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));\n if (cm.display.shift || doc.extend)\n ourRange = extendRange(doc, ourRange, line.anchor, line.head);\n else\n ourRange = line;\n } else {\n ourRange = extendRange(doc, ourRange, start);\n }\n\n if (!addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == \"single\" && !e.shiftKey) {\n setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) return;\n lastPos = pos;\n\n if (type == \"rect\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));\n else if (text.length > leftPos)\n ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));\n }\n if (!ranges.length) ranges.push(new Range(start, start));\n setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var anchor = oldRange.anchor, head = pos;\n if (type != \"single\") {\n if (type == \"double\")\n var range = cm.findWordAt(pos);\n else\n var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head;\n anchor = minPos(oldRange.from(), range.anchor);\n } else {\n head = range.anchor;\n anchor = maxPos(oldRange.to(), range.head);\n }\n }\n var ranges = startSel.ranges.slice(0);\n ranges[ourIndex] = new Range(clipPos(doc, anchor), head);\n setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, type == \"rect\");\n if (!cur) return;\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt();\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) setTimeout(operation(cm, function() {\n if (counter != curCount) return;\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50);\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n e_preventDefault(e);\n display.input.focus();\n off(document, \"mousemove\", move);\n off(document, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function(e) {\n if (!e_button(e)) done(e);\n else extend(e);\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(document, \"mousemove\", move);\n on(document, \"mouseup\", up);\n }\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n try { var mX = e.clientX, mY = e.clientY; }\n catch(e) { return false; }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;\n if (prevent) e_preventDefault(e);\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e);\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.options.gutters.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.options.gutters[i];\n signal(cm, type, cm, line, gutter, e);\n return e_defaultPrevented(e);\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true);\n }\n\n // Kludge to work around strange IE behavior where it'll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n return;\n e_preventDefault(e);\n if (ie) lastDrop = +new Date;\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) return;\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var loadFile = function(file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1)\n return;\n\n var reader = new FileReader;\n reader.onload = operation(cm, function() {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) content = \"\";\n text[i] = content;\n if (++read == n) {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));\n }\n });\n reader.readAsText(file);\n };\n for (var i = 0; i < n; ++i) loadFile(files[i], i);\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function() {cm.display.input.focus();}, 20);\n return;\n }\n try {\n var text = e.dataTransfer.getData(\"Text\");\n if (text) {\n if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey))\n var selected = cm.listSelections();\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) for (var i = 0; i < selected.length; ++i)\n replaceRange(cm.doc, \"\", selected[i].anchor, selected[i].head, \"drag\");\n cm.replaceSelection(text, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) img.parentNode.removeChild(img);\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) return;\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // SCROLL EVENTS\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function setScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) return;\n cm.doc.scrollTop = val;\n if (!gecko) updateDisplaySimple(cm, {top: val});\n if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (gecko) updateDisplaySimple(cm);\n startWorker(cm, 100);\n }\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller) {\n if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;\n val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don't have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) wheelPixelsPerUnit = -.53;\n else if (gecko) wheelPixelsPerUnit = 15;\n else if (chrome) wheelPixelsPerUnit = -.7;\n else if (safari) wheelPixelsPerUnit = -1/3;\n\n var wheelEventDelta = function(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;\n else if (dy == null) dy = e.wheelDelta;\n return {x: dx, y: dy};\n };\n CodeMirror.wheelEventPixels = function(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta;\n };\n\n function onScrollWheel(cm, e) {\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) return;\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer;\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {\n if (dy && canScrollY)\n setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));\n setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n e_preventDefault(e);\n display.wheelStartX = null; // Abort measurement, if in progress\n return;\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && wheelPixelsPerUnit != null) {\n var pixels = dy * wheelPixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) top = Math.max(0, top + pixels - 50);\n else bot = Math.min(cm.doc.height, bot + pixels + 50);\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function() {\n if (display.wheelStartX == null) return;\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) return;\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // KEY EVENTS\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) return false;\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) cm.state.suppressEdits = true;\n if (dropShift) cm.display.shift = false;\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done;\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) return result;\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm);\n }\n\n var stopSeq = new Delayed;\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) return \"handled\";\n stopSeq.set(50, function() {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n });\n name = seq + \" \" + name;\n }\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n cm.state.keySeq = name;\n if (result == \"handled\")\n signalLater(cm, \"keyHandled\", cm, name, e);\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n if (seq && !result && /\\'$/.test(name)) {\n e_preventDefault(e);\n return true;\n }\n return !!result;\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) return false;\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function(b) {return doHandleBinding(cm, b, true);})\n || dispatchKey(cm, name, e, function(b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n return doHandleBinding(cm, b);\n });\n } else {\n return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); });\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e,\n function(b) { return doHandleBinding(cm, b, true); });\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n cm.curOp.focus = activeElt();\n if (signalDOMEvent(cm, e)) return;\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n cm.replaceSelection(\"\", null, \"cut\");\n }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n showCrossHair(cm);\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) this.doc.sel.shift = false;\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return;\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n if (handleCharBinding(cm, e, ch)) return;\n cm.display.input.onKeyPress(e);\n }\n\n // FOCUS/BLUR EVENTS\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function() {\n if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n onBlur(cm);\n }\n }, 100);\n }\n\n function onFocus(cm) {\n if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false;\n\n if (cm.options.readOnly == \"nocursor\") return;\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm) {\n if (cm.state.delayingBlurEvent) return;\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150);\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return;\n if (signalDOMEvent(cm, e, \"contextmenu\")) return;\n cm.display.input.onContextMenu(e);\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) return false;\n return gutterEvent(cm, e, \"gutterContextMenu\", false);\n }\n\n // UPDATING\n\n // Compute the position of the end of a change (its 'to' property\n // refers to the pre-change end).\n var changeEnd = CodeMirror.changeEnd = function(change) {\n if (!change.text) return change.to;\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));\n };\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) return pos;\n if (cmp(pos, change.to) <= 0) return changeEnd(change);\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch;\n return Pos(line, ch);\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(out, doc.sel.primIndex);\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n return Pos(nw.line, pos.ch - old.ch + nw.ch);\n else\n return Pos(nw.line + (pos.line - old.line), pos.ch);\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be \"start\" or \"around\".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex);\n }\n\n // Allow \"beforeChange\" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function() { this.canceled = true; }\n };\n if (update) obj.update = function(from, to, text, origin) {\n if (from) this.from = clipPos(doc, from);\n if (to) this.to = clipPos(doc, to);\n if (text) this.text = text;\n if (origin !== undefined) this.origin = origin;\n };\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) signal(doc.cm, \"beforeChange\", doc.cm, obj);\n\n if (obj.canceled) return null;\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};\n }\n\n // Apply a change to a document, and add it to the document's\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);\n if (doc.cm.state.suppressEdits) return;\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) return;\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text});\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) return;\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function(doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document's history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n if (doc.cm && doc.cm.state.suppressEdits) return;\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n for (var i = 0; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n break;\n }\n if (i == source.length) return;\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return;\n }\n selAfter = event;\n }\n else break;\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n for (var i = event.changes.length - 1; i >= 0; --i) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return;\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)});\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function(doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) return;\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function(range) {\n return new Range(Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch));\n }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n regLineChange(doc.cm, l, \"gutter\");\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return;\n }\n if (change.from.line > doc.lastLine()) return;\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) selAfter = computeSelAfterChange(doc, change);\n if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans);\n else updateDoc(doc, change, spans);\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function(line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true;\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n signalCursorActivity(cm);\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function(line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) cm.curOp.updateMaxLine = true;\n }\n\n // Adjust frontier, schedule worker\n doc.frontier = Math.min(doc.frontier, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n regChange(cm);\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n regLineChange(cm, from.line, \"text\");\n else\n regChange(cm, from.line, to.line + 1, lendiff);\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) signalLater(cm, \"change\", cm, obj);\n if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n if (!to) to = from;\n if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }\n if (typeof code == \"string\") code = doc.splitLines(code);\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, coords) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) return;\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n if (coords.top + box.top < 0) doScroll = true;\n else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, \"position: absolute; top: \" +\n (coords.top - display.viewOffset - paddingTop(cm.display)) + \"px; height: \" +\n (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + \"px; left: \" +\n coords.left + \"px; width: 2px;\");\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may 'drift' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) margin = 0;\n for (var limit = 0; limit < 5; limit++) {\n var changed = false, coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),\n Math.min(coords.top, endCoords.top) - margin,\n Math.max(coords.left, endCoords.left),\n Math.max(coords.bottom, endCoords.bottom) + margin);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n setScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;\n }\n if (!changed) break;\n }\n return coords;\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, x1, y1, x2, y2) {\n var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);\n if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);\n if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, x1, y1, x2, y2) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (y1 < 0) y1 = 0;\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (y2 - y1 > screen) y2 = y1 + screen;\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;\n if (y1 < screentop) {\n result.scrollTop = atTop ? 0 : y1;\n } else if (y2 > screentop + screen) {\n var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);\n if (newTop != screentop) result.scrollTop = newTop;\n }\n\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;\n var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);\n var tooWide = x2 - x1 > screenw;\n if (tooWide) x2 = x1 + screenw;\n if (x1 < 10)\n result.scrollLeft = 0;\n else if (x1 < screenleft)\n result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10));\n else if (x2 > screenw + screenleft - 3)\n result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw;\n return result;\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollPos(cm, left, top) {\n if (left != null || top != null) resolveScrollToPos(cm);\n if (left != null)\n cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;\n if (top != null)\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor(), from = cur, to = cur;\n if (!cm.options.lineWrapping) {\n from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;\n to = Pos(cur.line, cur.ch + 1);\n }\n cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // 'simulates' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),\n Math.min(from.top, to.top) - range.margin,\n Math.max(from.right, to.right),\n Math.max(from.bottom, to.bottom) + range.margin);\n cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n }\n }\n\n // API UTILITIES\n\n // Indent the given line. The how parameter can be \"smart\",\n // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) how = \"add\";\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) how = \"prev\";\n else state = getStateBefore(cm, n);\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) line.stateAfter = null;\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) return;\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);\n else indentation = 0;\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";}\n if (pos < indentation) indentString += spaceStr(indentation - pos);\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true;\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i, new Range(pos, pos));\n break;\n }\n }\n }\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") line = getLine(doc, clipLine(doc, handle));\n else no = lineNo(handle);\n if (no == null) return null;\n if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);\n return line;\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break;\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function() {\n for (var i = kill.length - 1; i >= 0; i--)\n replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\");\n ensureCursorVisible(cm);\n });\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be \"char\", \"column\" (like char, but doesn't\n // cross line boundaries), \"word\" (across next word), or \"group\" (to\n // the start of next group of word or non-word-non-whitespace\n // chars). The visually param controls whether, in right-to-left\n // text, direction 1 means to move towards the next index in the\n // string, or towards the character to the right of the current\n // position. The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var line = pos.line, ch = pos.ch, origDir = dir;\n var lineObj = getLine(doc, line);\n function findNextLine() {\n var l = line + dir;\n if (l < doc.first || l >= doc.first + doc.size) return false\n line = l;\n return lineObj = getLine(doc, l);\n }\n function moveOnce(boundToLine) {\n var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);\n if (next == null) {\n if (!boundToLine && findNextLine()) {\n if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);\n else ch = dir < 0 ? lineObj.text.length : 0;\n } else return false\n } else ch = next;\n return true;\n }\n\n if (unit == \"char\") {\n moveOnce()\n } else if (unit == \"column\") {\n moveOnce(true)\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) break;\n var cur = lineObj.text.charAt(ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) type = \"s\";\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce();}\n break;\n }\n\n if (type) sawType = type;\n if (dir > 0 && !moveOnce(!first)) break;\n }\n }\n var result = skipAtomic(doc, Pos(line, ch), pos, origDir, true);\n if (!cmp(pos, result)) result.hitSide = true;\n return result;\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // \"page\" or \"line\". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);\n y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n for (;;) {\n var target = coordsChar(cm, x, y);\n if (!target.outside) break;\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }\n y += dir * 5;\n }\n return target;\n }\n\n // EDITOR METHODS\n\n // The publicly visible API. Note that methodOp(f) means\n // 'wrap f in an operation, performed on its `this` parameter'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){window.focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") return;\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n operation(this, optionHandlers[option])(this, value, old);\n },\n\n getOption: function(option) {return this.options[option];},\n getDoc: function() {return this.doc;},\n\n addKeyMap: function(map, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n },\n removeKeyMap: function(map) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n if (maps[i] == map || maps[i].name == map) {\n maps.splice(i, 1);\n return true;\n }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) throw new Error(\"Overlays may not be stateful.\");\n this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this.state.modeGen++;\n regChange(this);\n return;\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) dir = this.options.smartIndent ? \"smart\" : \"prev\";\n else dir = dir ? \"add\" : \"subtract\";\n }\n if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);\n }),\n indentSelection: methodOp(function(how) {\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (!range.empty()) {\n var from = range.from(), to = range.to();\n var start = Math.max(end, from.line);\n end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n indentLine(this, j, how);\n var newRanges = this.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);\n } else if (range.head.line > end) {\n indentLine(this, range.head.line, how, true);\n end = range.head.line;\n if (i == this.doc.sel.primIndex) ensureCursorVisible(this);\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise);\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true);\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) type = styles[2];\n else for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;\n else if (styles[mid * 2 + 1] < ch) before = mid + 1;\n else { type = styles[mid * 2 + 2]; break; }\n }\n var cut = type ? type.indexOf(\"cm-overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) return mode;\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0];\n },\n\n getHelpers: function(pos, type) {\n var found = [];\n if (!helpers.hasOwnProperty(type)) return found;\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) found.push(help[mode[type]]);\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) found.push(val);\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i = 0; i < help._global.length; i++) {\n var cur = help._global[i];\n if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n found.push(cur.val);\n }\n return found;\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getStateBefore(this, line + 1, precise);\n },\n\n cursorCoords: function(start, mode) {\n var pos, range = this.doc.sel.primary();\n if (start == null) pos = range.head;\n else if (typeof start == \"object\") pos = clipPos(this.doc, start);\n else pos = start ? range.from() : range.to();\n return cursorCoords(this, pos, mode || \"page\");\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\");\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top);\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset);\n },\n heightAtLine: function(line, mode) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) line = this.doc.first;\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\").top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0);\n },\n\n defaultTextHeight: function() { return textHeight(this.display); },\n defaultCharWidth: function() { return charWidth(this.display); },\n\n setGutterMarker: methodOp(function(line, gutterID, value) {\n return changeLine(this.doc, line, \"gutter\", function(line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) line.gutterMarkers = null;\n return true;\n });\n }),\n\n clearGutter: methodOp(function(gutterID) {\n var cm = this, doc = cm.doc, i = doc.first;\n doc.iter(function(line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n line.gutterMarkers[gutterID] = null;\n regLineChange(cm, i, \"gutter\");\n if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;\n }\n ++i;\n });\n }),\n\n lineInfo: function(line) {\n if (typeof line == \"number\") {\n if (!isLine(this.doc, line)) return null;\n var n = line;\n line = getLine(this.doc, line);\n if (!line) return null;\n } else {\n var n = lineNo(line);\n if (n == null) return null;\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets};\n },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n top = pos.top - node.offsetHeight;\n else if (pos.bottom + node.offsetHeight <= vspace)\n top = pos.bottom;\n if (left + node.offsetWidth > hspace)\n left = hspace - node.offsetWidth;\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") left = 0;\n else if (horiz == \"middle\") left = (display.sizer.clientWidth - node.offsetWidth) / 2;\n node.style.left = left + \"px\";\n }\n if (scroll)\n scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n return commands[cmd].call(null, this);\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n cur = findPosH(this.doc, cur, dir, unit, visually);\n if (cur.hitSide) break;\n }\n return cur;\n },\n\n moveH: methodOp(function(dir, unit) {\n var cm = this;\n cm.extendSelectionsBy(function(range) {\n if (cm.display.shift || cm.doc.extend || range.empty())\n return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually);\n else\n return dir < 0 ? range.from() : range.to();\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n doc.replaceSelection(\"\", null, \"+delete\");\n else\n deleteNearSelection(this, function(range) {\n var other = findPosH(doc, range.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other};\n });\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {\n var coords = cursorCoords(this, cur, \"div\");\n if (x == null) x = coords.left;\n else coords.left = x;\n cur = findPosV(this, coords, dir, unit);\n if (cur.hitSide) break;\n }\n return cur;\n },\n\n moveV: methodOp(function(dir, unit) {\n var cm = this, doc = this.doc, goals = [];\n var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function(range) {\n if (collapse)\n return dir < 0 ? range.from() : range.to();\n var headPos = cursorCoords(cm, range.head, \"div\");\n if (range.goalColumn != null) headPos.left = range.goalColumn;\n goals.push(headPos.left);\n var pos = findPosV(cm, headPos, dir, unit);\n if (unit == \"page\" && range == doc.sel.primary())\n addToScrollPos(cm, null, charCoords(cm, pos, \"div\").top - headPos.top);\n return pos;\n }, sel_move);\n if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++)\n doc.sel.ranges[i].goalColumn = goals[i];\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function(ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function(ch) {return /\\s/.test(ch);}\n : function(ch) {return !/\\s/.test(ch) && !isWordChar(ch);};\n while (start > 0 && check(line.charAt(start - 1))) --start;\n while (end < line.length && check(line.charAt(end))) ++end;\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end));\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) return;\n if (this.state.overwrite = !this.state.overwrite)\n addClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n else\n rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\");\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt(); },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit); },\n\n scrollTo: methodOp(function(x, y) {\n if (x != null || y != null) resolveScrollToPos(this);\n if (x != null) this.curOp.scrollLeft = x;\n if (y != null) this.curOp.scrollTop = y;\n }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)};\n },\n\n scrollIntoView: methodOp(function(range, margin) {\n if (range == null) {\n range = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) margin = this.options.cursorScrollMargin;\n } else if (typeof range == \"number\") {\n range = {from: Pos(range, 0), to: null};\n } else if (range.from == null) {\n range = {from: range, to: null};\n }\n if (!range.to) range.to = range.from;\n range.margin = margin || 0;\n\n if (range.from.line != null) {\n resolveScrollToPos(this);\n this.curOp.scrollToPos = range;\n } else {\n var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),\n Math.min(range.from.top, range.to.top) - range.margin,\n Math.max(range.from.right, range.to.right),\n Math.max(range.from.bottom, range.to.bottom) + range.margin);\n this.scrollTo(sPos.scrollLeft, sPos.scrollTop);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var cm = this;\n function interpret(val) {\n return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val;\n }\n if (width != null) cm.display.wrapper.style.width = interpret(width);\n if (height != null) cm.display.wrapper.style.height = interpret(height);\n if (cm.options.lineWrapping) clearLineMeasurementCache(this);\n var lineNo = cm.display.viewFrom;\n cm.doc.iter(lineNo, cm.display.viewTo, function(line) {\n if (line.widgets) for (var i = 0; i < line.widgets.length; i++)\n if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, \"widget\"); break; }\n ++lineNo;\n });\n cm.curOp.forceUpdate = true;\n signal(cm, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f);},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)\n estimateLineHeights(this);\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n this.scrollTo(doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old;\n }),\n\n getInputField: function(){return this.display.input.getField();},\n getWrapperElement: function(){return this.display.wrapper;},\n getScrollerElement: function(){return this.display.scroller;},\n getGutterElement: function(){return this.display.gutters;}\n };\n eventMixin(CodeMirror);\n\n // OPTION DEFAULTS\n\n // The default configuration options.\n var defaults = CodeMirror.defaults = {};\n // Functions to run when options are changed.\n var optionHandlers = CodeMirror.optionHandlers = {};\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) optionHandlers[name] =\n notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;\n }\n\n // Passed to option handlers when there is no old value.\n var Init = CodeMirror.Init = {toString: function(){return \"CodeMirror.Init\";}};\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function(cm, val) {\n cm.setValue(val);\n }, true);\n option(\"mode\", null, function(cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function(cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n option(\"lineSeparator\", null, function(cm, val) {\n cm.doc.lineSep = val;\n if (!val) return;\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function(line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) break;\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length))\n });\n option(\"specialChars\", /[\\t\\u0000-\\u0019\\u00ad\\u200b-\\u200f\\u2028\\u2029\\ufeff]/g, function(cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != CodeMirror.Init) cm.refresh();\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function() {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\"); // FIXME\n }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function(cm) {\n themeChanged(cm);\n guttersChanged(cm);\n }, true);\n option(\"keyMap\", \"default\", function(cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != CodeMirror.Init && getKeyMap(old);\n if (prev && prev.detach) prev.detach(cm, next);\n if (next.attach) next.attach(cm, prev || null);\n });\n option(\"extraKeys\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function(cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"fixedGutter\", true, function(cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function(cm) {updateScrollbars(cm);}, true);\n option(\"scrollbarStyle\", \"native\", function(cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function(cm) {\n setGuttersForLineNumbers(cm.options);\n guttersChanged(cm);\n }, true);\n option(\"firstLineNumber\", 1, guttersChanged, true);\n option(\"lineNumberFormatter\", function(integer) {return integer;}, guttersChanged, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n\n option(\"readOnly\", false, function(cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n cm.display.disabled = true;\n } else {\n cm.display.disabled = false;\n }\n cm.display.input.readOnlyChanged(val)\n });\n option(\"disableInput\", false, function(cm, val) {if (!val) cm.display.input.reset();}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function(cm, val){cm.doc.history.undoDepth = val;});\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function(cm){cm.refresh();}, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function(cm, val) {\n if (!val) cm.display.input.resetPosition();\n });\n\n option(\"tabindex\", null, function(cm, val) {\n cm.display.input.getField().tabIndex = val || \"\";\n });\n option(\"autofocus\", null);\n\n // MODE DEFINITION AND QUERYING\n\n // Known modes, by name and by MIME\n var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name, mode) {\n if (!CodeMirror.defaults.mode && name != \"null\") CodeMirror.defaults.mode = name;\n if (arguments.length > 2)\n mode.dependencies = Array.prototype.slice.call(arguments, 2);\n modes[name] = mode;\n };\n\n CodeMirror.defineMIME = function(mime, spec) {\n mimeModes[mime] = spec;\n };\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n CodeMirror.resolveMode = function(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") found = {name: found};\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return CodeMirror.resolveMode(\"application/xml\");\n }\n if (typeof spec == \"string\") return {name: spec};\n else return spec || {name: \"null\"};\n };\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n CodeMirror.getMode = function(options, spec) {\n var spec = CodeMirror.resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) return CodeMirror.getMode(options, \"text/plain\");\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) continue;\n if (modeObj.hasOwnProperty(prop)) modeObj[\"_\" + prop] = modeObj[prop];\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) modeObj.helperType = spec.helperType;\n if (spec.modeProps) for (var prop in spec.modeProps)\n modeObj[prop] = spec.modeProps[prop];\n\n return modeObj;\n };\n\n // Minimal default mode.\n CodeMirror.defineMode(\"null\", function() {\n return {token: function(stream) {stream.skipToEnd();}};\n });\n CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = CodeMirror.modeExtensions = {};\n CodeMirror.extendMode = function(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n };\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function(name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function(name, func) {\n Doc.prototype[name] = func;\n };\n CodeMirror.defineOption = option;\n\n var initHooks = [];\n CodeMirror.defineInitHook = function(f) {initHooks.push(f);};\n\n var helpers = CodeMirror.helpers = {};\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []};\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n\n // MODE STATE HANDLING\n\n // Utility functions for working with state. Exported because nested\n // modes need to do this for their inner modes.\n\n var copyState = CodeMirror.copyState = function(mode, state) {\n if (state === true) return state;\n if (mode.copyState) return mode.copyState(state);\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) val = val.concat([]);\n nstate[n] = val;\n }\n return nstate;\n };\n\n var startState = CodeMirror.startState = function(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true;\n };\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n CodeMirror.innerMode = function(mode, state) {\n while (mode.innerMode) {\n var info = mode.innerMode(state);\n if (!info || info.mode == mode) break;\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state};\n };\n\n // STANDARD COMMANDS\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = CodeMirror.commands = {\n selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);},\n singleSelection: function(cm) {\n cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll);\n },\n killLine: function(cm) {\n deleteNearSelection(cm, function(range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n return {from: range.head, to: Pos(range.head.line + 1, 0)};\n else\n return {from: range.head, to: Pos(range.head.line, len)};\n } else {\n return {from: range.from(), to: range.to()};\n }\n });\n },\n deleteLine: function(cm) {\n deleteNearSelection(cm, function(range) {\n return {from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))};\n });\n },\n delLineLeft: function(cm) {\n deleteNearSelection(cm, function(range) {\n return {from: Pos(range.from().line, 0), to: range.from()};\n });\n },\n delWrappedLineLeft: function(cm) {\n deleteNearSelection(cm, function(range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()};\n });\n },\n delWrappedLineRight: function(cm) {\n deleteNearSelection(cm, function(range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos };\n });\n },\n undo: function(cm) {cm.undo();},\n redo: function(cm) {cm.redo();},\n undoSelection: function(cm) {cm.undoSelection();},\n redoSelection: function(cm) {cm.redoSelection();},\n goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},\n goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},\n goLineStart: function(cm) {\n cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1});\n },\n goLineStartSmart: function(cm) {\n cm.extendSelectionsBy(function(range) {\n return lineStartSmart(cm, range.head);\n }, {origin: \"+move\", bias: 1});\n },\n goLineEnd: function(cm) {\n cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1});\n },\n goLineRight: function(cm) {\n cm.extendSelectionsBy(function(range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n }, sel_move);\n },\n goLineLeft: function(cm) {\n cm.extendSelectionsBy(function(range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\");\n }, sel_move);\n },\n goLineLeftSmart: function(cm) {\n cm.extendSelectionsBy(function(range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) return lineStartSmart(cm, range.head);\n return pos;\n }, sel_move);\n },\n goLineUp: function(cm) {cm.moveV(-1, \"line\");},\n goLineDown: function(cm) {cm.moveV(1, \"line\");},\n goPageUp: function(cm) {cm.moveV(-1, \"page\");},\n goPageDown: function(cm) {cm.moveV(1, \"page\");},\n goCharLeft: function(cm) {cm.moveH(-1, \"char\");},\n goCharRight: function(cm) {cm.moveH(1, \"char\");},\n goColumnLeft: function(cm) {cm.moveH(-1, \"column\");},\n goColumnRight: function(cm) {cm.moveH(1, \"column\");},\n goWordLeft: function(cm) {cm.moveH(-1, \"word\");},\n goGroupRight: function(cm) {cm.moveH(1, \"group\");},\n goGroupLeft: function(cm) {cm.moveH(-1, \"group\");},\n goWordRight: function(cm) {cm.moveH(1, \"word\");},\n delCharBefore: function(cm) {cm.deleteH(-1, \"char\");},\n delCharAfter: function(cm) {cm.deleteH(1, \"char\");},\n delWordBefore: function(cm) {cm.deleteH(-1, \"word\");},\n delWordAfter: function(cm) {cm.deleteH(1, \"word\");},\n delGroupBefore: function(cm) {cm.deleteH(-1, \"group\");},\n delGroupAfter: function(cm) {cm.deleteH(1, \"group\");},\n indentAuto: function(cm) {cm.indentSelection(\"smart\");},\n indentMore: function(cm) {cm.indentSelection(\"add\");},\n indentLess: function(cm) {cm.indentSelection(\"subtract\");},\n insertTab: function(cm) {cm.replaceSelection(\"\\t\");},\n insertSoftTab: function(cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(new Array(tabSize - col % tabSize + 1).join(\" \"));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function(cm) {\n if (cm.somethingSelected()) cm.indentSelection(\"add\");\n else cm.execCommand(\"insertTab\");\n },\n transposeChars: function(cm) {\n runInOp(cm, function() {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev)\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), \"+transpose\");\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n });\n },\n newlineAndIndent: function(cm) {\n runInOp(cm, function() {\n var len = cm.listSelections().length;\n for (var i = 0; i < len; i++) {\n var range = cm.listSelections()[i];\n cm.replaceRange(cm.doc.lineSeparator(), range.anchor, range.head, \"+input\");\n cm.indentLine(range.from().line + 1, null, true);\n }\n ensureCursorVisible(cm);\n });\n },\n toggleOverwrite: function(cm) {cm.toggleOverwrite();}\n };\n\n\n // STANDARD KEYMAPS\n\n var keyMap = CodeMirror.keyMap = {};\n\n keyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n };\n // Note that the save and find-related commands aren't defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n fallthrough: \"basic\"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Alt-F\": \"goWordRight\", \"Alt-B\": \"goWordLeft\", \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\", \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\",\n \"Alt-D\": \"delWordAfter\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\", \"Ctrl-T\": \"transposeChars\"\n };\n keyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n fallthrough: [\"basic\", \"emacsy\"]\n };\n keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/), name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) cmd = true;\n else if (/^a(lt)?$/i.test(mod)) alt = true;\n else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;\n else if (/^s(hift)$/i.test(mod)) shift = true;\n else throw new Error(\"Unrecognized modifier name: \" + mod);\n }\n if (alt) name = \"Alt-\" + name;\n if (ctrl) name = \"Ctrl-\" + name;\n if (cmd) name = \"Cmd-\" + name;\n if (shift) name = \"Shift-\" + name;\n return name;\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n CodeMirror.normalizeKeyMap = function(keymap) {\n var copy = {};\n for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue;\n if (value == \"...\") { delete keymap[keyname]; continue; }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val, name;\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) copy[name] = val;\n else if (prev != val) throw new Error(\"Inconsistent bindings for \" + name);\n }\n delete keymap[keyname];\n }\n for (var prop in copy) keymap[prop] = copy[prop];\n return keymap;\n };\n\n var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) {\n map = getKeyMap(map);\n var found = map.call ? map.call(key, context) : map[key];\n if (found === false) return \"nothing\";\n if (found === \"...\") return \"multi\";\n if (found != null && handle(found)) return \"handled\";\n\n if (map.fallthrough) {\n if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n return lookupKey(key, map.fallthrough, handle, context);\n for (var i = 0; i < map.fallthrough.length; i++) {\n var result = lookupKey(key, map.fallthrough[i], handle, context);\n if (result) return result;\n }\n }\n };\n\n // Modifier key presses don't count as 'real' key presses for the\n // purpose of keymap fallthrough.\n var isModifierKey = CodeMirror.isModifierKey = function(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\";\n };\n\n // Look up the name of a key as indicated by an event object.\n var keyName = CodeMirror.keyName = function(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) return false;\n var base = keyNames[event.keyCode], name = base;\n if (name == null || event.altGraphKey) return false;\n if (event.altKey && base != \"Alt\") name = \"Alt-\" + name;\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") name = \"Ctrl-\" + name;\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Cmd\") name = \"Cmd-\" + name;\n if (!noShift && event.shiftKey && base != \"Shift\") name = \"Shift-\" + name;\n return name;\n };\n\n function getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val;\n }\n\n // FROMTEXTAREA\n\n CodeMirror.fromTextArea = function(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n options.tabindex = textarea.tabIndex;\n if (!options.placeholder && textarea.placeholder)\n options.placeholder = textarea.placeholder;\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt();\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form, realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function() {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function(cm) {\n cm.save = save;\n cm.getTextArea = function() { return textarea; };\n cm.toTextArea = function() {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (typeof textarea.form.submit == \"function\")\n textarea.form.submit = realSubmit;\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror(function(node) {\n textarea.parentNode.insertBefore(node, textarea.nextSibling);\n }, options);\n return cm;\n };\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = CodeMirror.StringStream = function(string, tabSize) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n };\n\n StringStream.prototype = {\n eol: function() {return this.pos >= this.string.length;},\n sol: function() {return this.pos == this.lineStart;},\n peek: function() {return this.string.charAt(this.pos) || undefined;},\n next: function() {\n if (this.pos < this.string.length)\n return this.string.charAt(this.pos++);\n },\n eat: function(match) {\n var ch = this.string.charAt(this.pos);\n if (typeof match == \"string\") var ok = ch == match;\n else var ok = ch && (match.test ? match.test(ch) : match(ch));\n if (ok) {++this.pos; return ch;}\n },\n eatWhile: function(match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start;\n },\n eatSpace: function() {\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;\n return this.pos > start;\n },\n skipToEnd: function() {this.pos = this.string.length;},\n skipTo: function(ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true;}\n },\n backUp: function(n) {this.pos -= n;},\n column: function() {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n },\n indentation: function() {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);\n },\n match: function(pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) this.pos += pattern.length;\n return true;\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) return null;\n if (match && consume !== false) this.pos += match[0].length;\n return match;\n }\n },\n current: function(){return this.string.slice(this.start, this.pos);},\n hideFirstChars: function(n, inner) {\n this.lineStart += n;\n try { return inner(); }\n finally { this.lineStart -= n; }\n }\n };\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n var nextMarkerId = 0;\n\n var TextMarker = CodeMirror.TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n eventMixin(TextMarker);\n\n // Clear the marker.\n TextMarker.prototype.clear = function() {\n if (this.explicitlyCleared) return;\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) startOperation(cm);\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) signalLater(this, \"clear\", found.from, found.to);\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (cm && !this.collapsed) regLineChange(cm, lineNo(line), \"text\");\n else if (cm) {\n if (span.to != null) max = lineNo(line);\n if (span.from != null) min = lineNo(line);\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n updateLineHeight(line, textHeight(cm.display));\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {\n var visual = visualLine(this.lines[i]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n }\n\n if (min != null && cm && this.collapsed) regChange(cm, min, max + 1);\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) reCheckSelection(cm.doc);\n }\n if (cm) signalLater(cm, \"markerCleared\", cm, this);\n if (withOp) endOperation(cm);\n if (this.parent) this.parent.clear();\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function(side, lineObj) {\n if (side == null && this.type == \"bookmark\") side = 1;\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) return from;\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) return to;\n }\n }\n return from && {from: from, to: to};\n };\n\n // Signals that the marker's widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function() {\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) return;\n runInOp(cm, function() {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n updateLineHeight(line, line.height + dHeight);\n }\n });\n };\n\n TextMarker.prototype.attachLine = function(line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);\n }\n this.lines.push(line);\n };\n TextMarker.prototype.detachLine = function(line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) return markTextShared(doc, from, to, options, type);\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) copyObj(options, marker, false);\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n return marker;\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = elt(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\");\n if (options.insertLeft) marker.widgetNode.insertLeft = true;\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n throw new Error(\"Inserting collapsed marker partially overlapping an existing one\");\n sawCollapsedSpans = true;\n }\n\n if (marker.addToHistory)\n addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN);\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function(line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n updateMaxLine = true;\n if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0);\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null));\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {\n if (lineIsHidden(doc, line)) updateLineHeight(line, 0);\n });\n\n if (marker.clearOnEnter) on(marker, \"beforeCursorEnter\", function() { marker.clear(); });\n\n if (marker.readOnly) {\n sawReadOnlySpans = true;\n if (doc.history.done.length || doc.history.undone.length)\n doc.clearHistory();\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) cm.curOp.updateMaxLine = true;\n if (marker.collapsed)\n regChange(cm, from.line, to.line + 1);\n else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)\n for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, \"text\");\n if (marker.atomic) reCheckSelection(cm.doc);\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker;\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) {\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n markers[i].parent = this;\n };\n eventMixin(SharedTextMarker);\n\n SharedTextMarker.prototype.clear = function() {\n if (this.explicitlyCleared) return;\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n this.markers[i].clear();\n signalLater(this, \"clear\");\n };\n SharedTextMarker.prototype.find = function(side, lineObj) {\n return this.primary.find(side, lineObj);\n };\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function(doc) {\n if (widget) options.widgetNode = widget.cloneNode(true);\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n if (doc.linked[i].isParent) return;\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary);\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())),\n function(m) { return m.parent; });\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], linked = [marker.primary.doc];;\n linkedDocs(marker.primary.doc, function(d) { linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n }\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) return span;\n }\n }\n // Remove a span from an array, returning undefined if no spans are\n // left (we don't store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n for (var r, i = 0; i < spans.length; ++i)\n if (spans[i] != span) (r || (r = [])).push(spans[i]);\n return r;\n }\n // Add a span to a line.\n function addMarkedSpan(line, span) {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n if (old) for (var i = 0, nw; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);\n (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n }\n return nw;\n }\n function markedSpansAfter(old, endCh, isInsert) {\n if (old) for (var i = 0, nw; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);\n (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n }\n return nw;\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) return null;\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) return null;\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) span.to = startCh;\n else if (sameLine) span.to = found.to == null ? null : found.to + offset;\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i = 0; i < last.length; ++i) {\n var span = last[i];\n if (span.to != null) span.to += offset;\n if (span.from == null) {\n var found = getMarkedSpanFor(first, span.marker);\n if (!found) {\n span.from = offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n } else {\n span.from += offset;\n if (sameLine) (first || (first = [])).push(span);\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) first = clearEmptySpans(first);\n if (last && last != first) last = clearEmptySpans(last);\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n for (var i = 0; i < first.length; ++i)\n if (first[i].to == null)\n (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));\n for (var i = 0; i < gap; ++i)\n newMarkers.push(gapMarkers);\n newMarkers.push(last);\n }\n return newMarkers;\n }\n\n // Remove spans that are empty and don't have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n spans.splice(i--, 1);\n }\n if (!spans.length) return null;\n return spans;\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) return stretched;\n if (!stretched) return old;\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n if (oldCur[k].marker == span.marker) continue spans;\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old;\n }\n\n // Used to 'clip' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function(line) {\n if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n (markers || (markers = [])).push(mark);\n }\n });\n if (!markers) return null;\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n newParts.push({from: p.from, to: m.from});\n if (dto > 0 || !mk.inclusiveRight && !dto)\n newParts.push({from: m.to, to: p.to});\n parts.splice.apply(parts, newParts);\n j += newParts.length - 1;\n }\n }\n return parts;\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) return;\n for (var i = 0; i < spans.length; ++i)\n spans[i].marker.detachLine(line);\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) return;\n for (var i = 0; i < spans.length; ++i)\n spans[i].marker.attachLine(line);\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) return lenDiff;\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) return -fromCmp;\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) return toCmp;\n return b.id - a.id;\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n found = sp.marker;\n }\n return found;\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) continue;\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;\n if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||\n fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))\n return true;\n }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n line = merged.find(-1, true).line;\n return line;\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n (lines || (lines = [])).push(line);\n }\n return lines;\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) return lineN;\n return lineNo(vis);\n }\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) return lineN;\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) return lineN;\n while (merged = collapsedSpanAtEnd(line))\n line = merged.find(1, true).line;\n return lineNo(line) + 1;\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) for (var sp, i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) continue;\n if (sp.from == null) return true;\n if (sp.marker.widgetNode) continue;\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n return true;\n }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n return true;\n for (var sp, i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) return true;\n }\n }\n\n // LINE WIDGETS\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = CodeMirror.LineWidget = function(doc, node, options) {\n if (options) for (var opt in options) if (options.hasOwnProperty(opt))\n this[opt] = options[opt];\n this.doc = doc;\n this.node = node;\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n addToScrollPos(cm, null, diff);\n }\n\n LineWidget.prototype.clear = function() {\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) return;\n for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);\n if (!ws.length) line.widgets = null;\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) runInOp(cm, function() {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n };\n LineWidget.prototype.changed = function() {\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) return;\n updateLineHeight(line, line.height + diff);\n if (cm) runInOp(cm, function() {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n });\n };\n\n function widgetHeight(widget) {\n if (widget.height != null) return widget.height;\n var cm = widget.doc.cm;\n if (!cm) return 0;\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\";\n if (widget.noHScroll)\n parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\";\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight;\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) cm.display.alignWidgets = true;\n changeLine(doc, handle, \"widget\", function(line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) widgets.push(widget);\n else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) addToScrollPos(cm, null, widget.height);\n cm.curOp.forceUpdate = true;\n }\n return true;\n });\n return widget;\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n eventMixin(Line);\n Line.prototype.lineNo = function() { return lineNo(this); };\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line's height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) line.stateAfter = null;\n if (line.styles) line.styles = null;\n if (line.order != null) line.order = null;\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) updateLineHeight(line, estHeight);\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n function extractLineClasses(type, output) {\n if (type) for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) break;\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n output[prop] = lineClass[2];\n else if (!(new RegExp(\"(?:^|\\s)\" + lineClass[2] + \"(?:$|\\s)\")).test(output[prop]))\n output[prop] += \" \" + lineClass[2];\n }\n return type;\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) return mode.blankLine(state);\n if (!mode.innerMode) return;\n var inner = CodeMirror.innerMode(mode, state);\n if (inner.mode.blankLine) return inner.mode.blankLine(inner.state);\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) return style;\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\");\n }\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n function getObj(copy) {\n return {start: stream.start, end: stream.pos,\n string: stream.current(),\n type: style || null,\n state: copy ? copyState(doc.mode, state) : state};\n }\n\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize), tokens;\n if (asArray) tokens = [];\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, state);\n if (asArray) tokens.push(getObj(true));\n }\n return asArray ? tokens : getObj();\n }\n\n // Run the given mode's parser over a line, calling f for each token.\n function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") extractLineClasses(callBlankLine(mode, state), lineClasses);\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) processLine(cm, text, state, stream.pos);\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) style = \"m-\" + (style ? mName + \" \" + style : mName);\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 50000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444 characters\n var pos = Math.min(stream.pos, curStart + 50000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, state, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, state, function(end, style) {\n st.push(end, style);\n }, lineClasses, forceToEnd);\n\n // Run overlays, adjust style array.\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n runMode(cm, line.text, overlay.mode, true, function(end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n st.splice(i, 1, end, st[i+1], i_end);\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) return;\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"cm-overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"cm-overlay \" + style;\n }\n }\n }, lineClasses);\n }\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var state = getStateBefore(cm, lineNo(line));\n var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state);\n line.stateAfter = state;\n line.styles = result.styles;\n if (result.classes) line.styleClasses = result.classes;\n else if (line.styleClasses) line.styleClasses = null;\n if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;\n }\n return line.styles;\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don't save a style array. Used for lines that\n // aren't currently visible.\n function processLine(cm, text, state, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") callBlankLine(mode, state);\n while (!stream.eol()) {\n readToken(mode, stream, state);\n stream.start = stream.pos;\n }\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) return null;\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"));\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a 'line map', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = elt(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: elt(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n splitSpaces: (ie || webkit) && cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order;\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))\n builder.addToken = buildTokenBadBidi(builder.addToken, order);\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\");\n if (line.styleClasses.textClass)\n builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\");\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);\n (lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit && /\\bcm-tab\\b/.test(builder.content.lastChild.className))\n builder.content.className = \"cm-tab-wrap-hack\";\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\");\n\n return builder;\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token;\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, title, css) {\n if (!text) return;\n var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n if (!special.test(text)) {\n builder.col += text.length;\n var content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) mustWrap = true;\n builder.pos += text.length;\n } else {\n var content = document.createDocumentFragment(), pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n else content.appendChild(txt);\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) break;\n pos += skipped + 1;\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n var txt = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt.setAttribute(\"role\", \"presentation\");\n txt.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n var txt = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n var txt = builder.cm.options.specialCharPlaceholder(m[0]);\n txt.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) content.appendChild(elt(\"span\", [txt]));\n else content.appendChild(txt);\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt);\n builder.pos++;\n }\n }\n if (style || startStyle || endStyle || mustWrap || css) {\n var fullStyle = style || \"\";\n if (startStyle) fullStyle += startStyle;\n if (endStyle) fullStyle += endStyle;\n var token = elt(\"span\", [content], fullStyle, css);\n if (title) token.title = title;\n return builder.content.appendChild(token);\n }\n builder.content.appendChild(content);\n }\n\n function splitSpaces(old) {\n var out = \" \";\n for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? \" \" : \"\\u00a0\";\n out += \" \";\n return out;\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function(builder, text, style, startStyle, endStyle, title, css) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n for (var i = 0; i < order.length; i++) {\n var part = order[i];\n if (part.to > start && part.from <= start) break;\n }\n if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css);\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n };\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) builder.map.push(builder.pos, builder.pos + size, widget);\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n widget = builder.content.appendChild(document.createElement(\"span\"));\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i = 1; i < styles.length; i+=2)\n builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));\n return;\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = title = css = \"\";\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) spanStyle += \" \" + m.className;\n if (m.css) css = (css ? css + \";\" : \"\") + m.css;\n if (m.startStyle && sp.from == pos) spanStartStyle += \" \" + m.startStyle;\n if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to)\n if (m.title && !title) title = m.title;\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n collapsed = sp;\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) for (var j = 0; j < endStyles.length; j += 2)\n if (endStyles[j + 1] == nextChange) spanEndStyle += \" \" + endStyles[j]\n\n if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j)\n buildCollapsedSpan(builder, 0, foundBookmarks[j]);\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) return;\n if (collapsed.to == pos) collapsed = false;\n }\n }\n if (pos >= len) break;\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", title, css);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore);\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null;}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n for (var i = start, result = []; i < end; ++i)\n result.push(new Line(text[i], spansFor(i), estimateHeight));\n return result;\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) doc.remove(from.line, nlines);\n if (added.length) doc.insert(from.line, added);\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added = linesFor(1, text.length - 1);\n added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added = linesFor(1, text.length - 1);\n if (nlines > 1) doc.remove(from.line + 1, nlines - 1);\n doc.insert(from.line + 1, added);\n }\n\n signalLater(doc, \"change\", doc, change);\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n this.lines = lines;\n this.parent = null;\n for (var i = 0, height = 0; i < lines.length; ++i) {\n lines[i].parent = this;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length; },\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this.lines[i];\n this.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) lines[i].parent = this;\n },\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n for (var e = at + n; at < e; ++at)\n if (op(this.lines[at])) return true;\n }\n };\n\n function BranchChunk(children) {\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size; },\n removeInner: function(at, n) {\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this.height -= oldHeight - child.height;\n if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) break;\n at = 0;\n } else at -= sz;\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n collapse: function(lines) {\n for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines);\n },\n insertInner: function(at, lines, height) {\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n while (child.lines.length > 50) {\n var spilled = child.lines.splice(child.lines.length - 25, 25);\n var newleaf = new LeafChunk(spilled);\n child.height -= newleaf.height;\n this.children.splice(i + 1, 0, newleaf);\n newleaf.parent = this;\n }\n this.maybeSpill();\n }\n break;\n }\n at -= sz;\n }\n },\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) return;\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10);\n me.parent.maybeSpill();\n },\n iterN: function(at, n, op) {\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) return true;\n if ((n -= used) == 0) break;\n at = 0;\n } else at -= sz;\n }\n }\n };\n\n var nextDocId = 0;\n var Doc = CodeMirror.Doc = function(text, mode, firstLine, lineSep) {\n if (!(this instanceof Doc)) return new Doc(text, mode, firstLine, lineSep);\n if (firstLine == null) firstLine = 0;\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.frontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.extend = false;\n\n if (typeof text == \"string\") text = this.splitLines(text);\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) this.iterN(from - this.first, to - from, op);\n else this.iterN(this.first, this.first + this.size, from);\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) height += lines[i].height;\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) return lines;\n return lines.join(lineSep || this.lineSeparator());\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n setSelection(this, simpleSelection(top));\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) return lines;\n return lines.join(lineSep || this.lineSeparator());\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},\n\n getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},\n getLineNumber: function(line) {return lineNo(line);},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") line = getLine(this, line);\n return visualLine(line);\n },\n\n lineCount: function() {return this.size;},\n firstLine: function() {return this.first;},\n lastLine: function() {return this.first + this.size - 1;},\n\n clipPos: function(pos) {return clipPos(this, pos);},\n\n getCursor: function(start) {\n var range = this.sel.primary(), pos;\n if (start == null || start == \"head\") pos = range.head;\n else if (start == \"anchor\") pos = range.anchor;\n else if (start == \"end\" || start == \"to\" || start === false) pos = range.to();\n else pos = range.from();\n return pos;\n },\n listSelections: function() { return this.sel.ranges; },\n somethingSelected: function() {return this.sel.somethingSelected();},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n if (!ranges.length) return;\n for (var i = 0, out = []; i < ranges.length; i++)\n out[i] = new Range(clipPos(this, ranges[i].anchor),\n clipPos(this, ranges[i].head));\n if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex);\n setSelection(this, normalizeSelection(out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) return lines;\n else return lines.join(lineSep || this.lineSeparator());\n },\n getSelections: function(lineSep) {\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) sel = sel.join(lineSep || this.lineSeparator());\n parts[i] = sel;\n }\n return parts;\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n dup[i] = code;\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i = changes.length - 1; i >= 0; i--)\n makeChange(this, changes[i]);\n if (newSel) setSelectionReplaceHistory(this, newSel);\n else if (this.cm) ensureCursorVisible(this.cm);\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend;},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done;\n for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone;\n return {undo: done, redo: undone};\n },\n clearHistory: function() {this.history = new History(this.history.maxGeneration);},\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;\n return this.history.generation;\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration);\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)};\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history.maxGeneration);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) line[prop] = cls;\n else if (classTest(cls).test(line[prop])) return false;\n else line[prop] += \" \" + cls;\n return true;\n });\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function(line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) return false;\n else if (cls == null) line[prop] = null;\n else {\n var found = cur.match(classTest(cls));\n if (!found) return false;\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true;\n });\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options);\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\");\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\");\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n markers.push(span.marker.parent || span.marker);\n }\n return markers;\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo = from.line;\n this.iter(from.line, to.line + 1, function(line) {\n var spans = line.markedSpans;\n if (spans) for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo == from.line && from.ch > span.to ||\n span.from == null && lineNo != from.line ||\n span.from != null && lineNo == to.line && span.from > to.ch) &&\n (!filter || filter(span.marker)))\n found.push(span.marker.parent || span.marker);\n }\n ++lineNo;\n });\n return found;\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function(line) {\n var sps = line.markedSpans;\n if (sps) for (var i = 0; i < sps.length; ++i)\n if (sps[i].from != null) markers.push(sps[i].marker);\n });\n return markers;\n },\n\n posFromIndex: function(off) {\n var ch, lineNo = this.first;\n this.iter(function(line) {\n var sz = line.text.length + 1;\n if (sz > off) { ch = off; return true; }\n off -= sz;\n ++lineNo;\n });\n return clipPos(this, Pos(lineNo, ch));\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) return 0;\n this.iter(this.first, coords.line, function (line) {\n index += line.text.length + 1;\n });\n return index;\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc;\n },\n\n linkedDoc: function(options) {\n if (!options) options = {};\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) from = options.from;\n if (options.to != null && options.to < to) to = options.to;\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep);\n if (options.sharedHist) copy.history = this.history;\n (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy;\n },\n unlinkDoc: function(other) {\n if (other instanceof CodeMirror) other = other.doc;\n if (this.linked) for (var i = 0; i < this.linked.length; ++i) {\n var link = this.linked[i];\n if (link.doc != other) continue;\n this.linked.splice(i, 1);\n other.unlinkDoc(this);\n detachSharedMarkers(findSharedMarkers(this));\n break;\n }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode;},\n getEditor: function() {return this.cm;},\n\n splitLines: function(str) {\n if (this.lineSep) return str.split(this.lineSep);\n return splitLinesAuto(str);\n },\n lineSeparator: function() { return this.lineSep || \"\\n\"; }\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments);};\n })(Doc.prototype[prop]);\n\n eventMixin(Doc);\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) continue;\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) continue;\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) throw new Error(\"This document is already in use.\");\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n if (!cm.options.lineWrapping) findMaxLine(cm);\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n // LINE UTILITIES\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\");\n for (var chunk = doc; !chunk.lines;) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break; }\n n -= sz;\n }\n }\n return chunk.lines[n];\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function(line) {\n var text = line.text;\n if (n == end.line) text = text.slice(0, end.ch);\n if (n == start.line) text = text.slice(start.ch);\n out.push(text);\n ++n;\n });\n return out;\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function(line) { out.push(line.text); });\n return out;\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) for (var n = line; n; n = n.parent) n.height += diff;\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) return null;\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) break;\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first;\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i = 0; i < chunk.children.length; ++i) {\n var child = chunk.children[i], ch = child.height;\n if (h < ch) { chunk = child; continue outer; }\n h -= ch;\n n += child.chunkSize();\n }\n return n;\n } while (!chunk.lines);\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) break;\n h -= lh;\n }\n return n + i;\n }\n\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) break;\n else h += line.height;\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i = 0; i < p.children.length; ++i) {\n var cur = p.children[i];\n if (cur == chunk) break;\n else h += cur.height;\n }\n }\n return h;\n }\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line) {\n var order = line.order;\n if (order == null) order = line.order = bidiOrdering(line.text);\n return order;\n }\n\n // HISTORY\n\n function History(startGen) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = startGen || 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);\n return histChange;\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) array.pop();\n else break;\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done);\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done);\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done);\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, ore are close together with an origin that\n // allows merging (starting with \"+\") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n var last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n pushSelectionToHistory(doc.sel, hist.done);\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) hist.done.shift();\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) signal(doc, \"historyAdded\");\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the 'done' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n hist.done[hist.done.length - 1] = sel;\n else\n pushSelectionToHistory(sel, hist.done);\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n clearSelectionEvents(hist.undone);\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n dest.push(sel);\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {\n if (line.markedSpans)\n (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans;\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) return null;\n for (var i = 0, out; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }\n else if (out) out.push(spans[i]);\n }\n return !out ? spans : out.length ? out : null;\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) return null;\n for (var i = 0, nw = []; i < change.text.length; ++i)\n nw.push(removeClearedSpans(found[i]));\n return nw;\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n for (var i = 0, copy = []; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue;\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m;\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n }\n }\n }\n return copy;\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything 'behind' it, is discarded. If the change is\n // before the event, the event's positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue;\n }\n for (var j = 0; j < sub.changes.length; ++j) {\n var cur = sub.changes[j];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break;\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // EVENT UTILITIES\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n var e_preventDefault = CodeMirror.e_preventDefault = function(e) {\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n };\n var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) {\n if (e.stopPropagation) e.stopPropagation();\n else e.cancelBubble = true;\n };\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;\n }\n var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);};\n\n function e_target(e) {return e.target || e.srcElement;}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) b = 1;\n else if (e.button & 2) b = 3;\n else if (e.button & 4) b = 2;\n }\n if (mac && e.ctrlKey && b == 1) b = 3;\n return b;\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var on = CodeMirror.on = function(emitter, type, f) {\n if (emitter.addEventListener)\n emitter.addEventListener(type, f, false);\n else if (emitter.attachEvent)\n emitter.attachEvent(\"on\" + type, f);\n else {\n var map = emitter._handlers || (emitter._handlers = {});\n var arr = map[type] || (map[type] = []);\n arr.push(f);\n }\n };\n\n var noHandlers = []\n function getHandlers(emitter, type, copy) {\n var arr = emitter._handlers && emitter._handlers[type]\n if (copy) return arr && arr.length > 0 ? arr.slice() : noHandlers\n else return arr || noHandlers\n }\n\n var off = CodeMirror.off = function(emitter, type, f) {\n if (emitter.removeEventListener)\n emitter.removeEventListener(type, f, false);\n else if (emitter.detachEvent)\n emitter.detachEvent(\"on\" + type, f);\n else {\n var handlers = getHandlers(emitter, type, false)\n for (var i = 0; i < handlers.length; ++i)\n if (handlers[i] == f) { handlers.splice(i, 1); break; }\n }\n };\n\n var signal = CodeMirror.signal = function(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type, true)\n if (!handlers.length) return;\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) handlers[i].apply(null, args);\n };\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don't want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type, false)\n if (!arr.length) return;\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n function bnd(f) {return function(){f.apply(null, args);};};\n for (var i = 0; i < arr.length; ++i)\n list.push(bnd(arr[i]));\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) delayed[i]();\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore;\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) return;\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1)\n set.push(arr[i]);\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor's prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // MISC UTILITIES\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 30;\n\n // Returned or thrown by various protocols to signal 'I'm not\n // handling this'.\n var Pass = CodeMirror.Pass = {toString: function(){return \"CodeMirror.Pass\";}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n function Delayed() {this.id = null;}\n Delayed.prototype.set = function(ms, f) {\n clearTimeout(this.id);\n this.id = setTimeout(f, ms);\n };\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) end = string.length;\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n return n + (end - i);\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n };\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n var findColumn = CodeMirror.findColumn = function(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) nextTab = string.length;\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n return pos + Math.min(skipped, goal - col);\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) return pos;\n }\n }\n\n var spaceStrs = [\"\"];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n spaceStrs.push(lst(spaceStrs) + \" \");\n return spaceStrs[n];\n }\n\n function lst(arr) { return arr[arr.length-1]; }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; };\n else if (ie) // Suppress mysterious IE10 errors\n selectInput = function(node) { try { node.select(); } catch(_e) {} };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n if (array[i] == elt) return i;\n return -1;\n }\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) out[i] = f(array[i], i);\n return out;\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) copyObj(props, inst);\n return inst;\n };\n\n function copyObj(obj, target, overwrite) {\n if (!target) target = {};\n for (var prop in obj)\n if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n target[prop] = obj[prop];\n return target;\n }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args);};\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n var isWordCharBasic = CodeMirror.isWordChar = function(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));\n };\n function isWordChar(ch, helper) {\n if (!helper) return isWordCharBasic(ch);\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) return true;\n return helper.test(ch);\n }\n\n function isEmpty(obj) {\n for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;\n return true;\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); }\n\n // DOM UTILITIES\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) e.className = className;\n if (style) e.style.cssText = style;\n if (typeof content == \"string\") e.appendChild(document.createTextNode(content));\n else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);\n return e;\n }\n\n var range;\n if (document.createRange) range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r;\n };\n else range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r; }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r;\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n e.removeChild(e.firstChild);\n return e;\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e);\n }\n\n var contains = CodeMirror.contains = function(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n child = child.parentNode;\n if (parent.contains)\n return parent.contains(child);\n do {\n if (child.nodeType == 11) child = child.host;\n if (child == parent) return true;\n } while (child = child.parentNode);\n };\n\n function activeElt() {\n var activeElement = document.activeElement;\n while (activeElement && activeElement.root && activeElement.root.activeElement)\n activeElement = activeElement.root.activeElement;\n return activeElement;\n }\n // Older versions of IE throws unspecified error when touching\n // document.activeElement in some cases (during loading, in iframe)\n if (ie && ie_version < 11) activeElt = function() {\n try { return document.activeElement; }\n catch(e) { return document.body; }\n };\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\"); }\n var rmClass = CodeMirror.rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n var addClass = CodeMirror.addClass = function(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) node.className += (current ? \" \" : \"\") + cls;\n };\n function joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n if (as[i] && !classTest(as[i]).test(b)) b += \" \" + as[i];\n return b;\n }\n\n // WINDOW-WIDE EVENTS\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.body.getElementsByClassName) return;\n var byClass = document.body.getElementsByClassName(\"CodeMirror\");\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) f(cm);\n }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) return;\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function() {\n if (resizeTimer == null) resizeTimer = setTimeout(function() {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100);\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function() {\n forEachCodeMirror(onBlur);\n });\n }\n\n // FEATURE DETECTION\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) return false;\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div;\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node;\n }\n\n // Feature-detect IE's crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) return badBidiRects;\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n return badBidiRects = (r1.right - r0.right < 3);\n }\n\n // See if \"\".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = CodeMirror.splitLines = \"\\n\\nb\".split(/\\n/).length != 3 ? function(string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) nl = string.length;\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result;\n } : function(string){return string.split(/\\r\\n?|\\n/);};\n\n var hasSelection = window.getSelection ? function(te) {\n try { return te.selectionStart != te.selectionEnd; }\n catch(e) { return false; }\n } : function(te) {\n try {var range = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range || range.parentElement() != te) return false;\n return range.compareEndPoints(\"StartToEnd\", range) != 0;\n };\n\n var hasCopyEvent = (function() {\n var e = elt(\"div\");\n if (\"oncopy\" in e) return true;\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\";\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) return badZoomedRects;\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;\n }\n\n // KEY NAMES\n\n var keyNames = CodeMirror.keyNames = {\n 3: \"Enter\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 127: \"Delete\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n };\n (function() {\n // Number keys\n for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i);\n // Alphabetic keys\n for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);\n // Function keys\n for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = \"F\" + i;\n })();\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) return f(from, to, \"ltr\");\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\");\n found = true;\n }\n }\n if (!found) f(from, to, \"ltr\");\n }\n\n function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }\n function bidiRight(part) { return part.level % 2 ? part.from : part.to; }\n\n function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }\n function lineRight(line) {\n var order = getOrder(line);\n if (!order) return line.text.length;\n return bidiRight(lst(order));\n }\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) lineN = lineNo(visual);\n var order = getOrder(visual);\n var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);\n return Pos(lineN, ch);\n }\n function lineEnd(cm, lineN) {\n var merged, line = getLine(cm.doc, lineN);\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line;\n lineN = null;\n }\n var order = getOrder(line);\n var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);\n return Pos(lineN == null ? lineNo(line) : lineN, ch);\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(0, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS);\n }\n return start;\n }\n\n function compareBidiLevel(order, a, b) {\n var linedir = order[0].level;\n if (a == linedir) return true;\n if (b == linedir) return false;\n return a < b;\n }\n var bidiOther;\n function getBidiPartAt(order, pos) {\n bidiOther = null;\n for (var i = 0, found; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < pos && cur.to > pos) return i;\n if ((cur.from == pos || cur.to == pos)) {\n if (found == null) {\n found = i;\n } else if (compareBidiLevel(order, cur.level, order[found].level)) {\n if (cur.from != cur.to) bidiOther = found;\n return i;\n } else {\n if (cur.from != cur.to) bidiOther = i;\n return found;\n }\n }\n }\n return found;\n }\n\n function moveInLine(line, pos, dir, byUnit) {\n if (!byUnit) return pos + dir;\n do pos += dir;\n while (pos > 0 && isExtendingChar(line.text.charAt(pos)));\n return pos;\n }\n\n // This is needed in order to move 'visually' through bi-directional\n // text -- i.e., pressing left should make the cursor go left, even\n // when in RTL text. The tricky part is the 'jumps', where RTL and\n // LTR text touch each other. This often requires the cursor offset\n // to move more than one unit, in order to visually move one unit.\n function moveVisually(line, start, dir, byUnit) {\n var bidi = getOrder(line);\n if (!bidi) return moveLogically(line, start, dir, byUnit);\n var pos = getBidiPartAt(bidi, start), part = bidi[pos];\n var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);\n\n for (;;) {\n if (target > part.from && target < part.to) return target;\n if (target == part.from || target == part.to) {\n if (getBidiPartAt(bidi, target) == pos) return target;\n part = bidi[pos += dir];\n return (dir > 0) == part.level % 2 ? part.to : part.from;\n } else {\n part = bidi[pos += dir];\n if (!part) return null;\n if ((dir > 0) == part.level % 2)\n target = moveInLine(line, part.to, -1, byUnit);\n else\n target = moveInLine(line, part.from, 1, byUnit);\n }\n }\n }\n\n function moveLogically(line, start, dir, byUnit) {\n var target = start + dir;\n if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;\n return target < 0 || target > line.text.length ? null : target;\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6ff\n var arabicTypes = \"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm\";\n function charType(code) {\n if (code <= 0xf7) return lowTypes.charAt(code);\n else if (0x590 <= code && code <= 0x5f4) return \"R\";\n else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);\n else if (0x6ee <= code && code <= 0x8ac) return \"r\";\n else if (0x2000 <= code && code <= 0x200b) return \"w\";\n else if (code == 0x200c) return \"b\";\n else return \"L\";\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n // Browsers seem to always treat the boundaries of block elements as being L.\n var outerType = \"L\";\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str) {\n if (!bidiRE.test(str)) return false;\n var len = str.length, types = [];\n for (var i = 0, type; i < len; ++i)\n types.push(type = charType(str.charCodeAt(i)));\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i = 0, prev = outerType; i < len; ++i) {\n var type = types[i];\n if (type == \"m\") types[i] = prev;\n else prev = type;\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i = 0, cur = outerType; i < len; ++i) {\n var type = types[i];\n if (type == \"1\" && cur == \"r\") types[i] = \"n\";\n else if (isStrong.test(type)) { cur = type; if (type == \"r\") types[i] = \"R\"; }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i = 1, prev = types[0]; i < len - 1; ++i) {\n var type = types[i];\n if (type == \"+\" && prev == \"1\" && types[i+1] == \"1\") types[i] = \"1\";\n else if (type == \",\" && prev == types[i+1] &&\n (prev == \"1\" || prev == \"n\")) types[i] = prev;\n prev = type;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i = 0; i < len; ++i) {\n var type = types[i];\n if (type == \",\") types[i] = \"N\";\n else if (type == \"%\") {\n for (var end = i + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i && types[i-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i; j < end; ++j) types[j] = replace;\n i = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i = 0, cur = outerType; i < len; ++i) {\n var type = types[i];\n if (cur == \"L\" && type == \"1\") types[i] = \"L\";\n else if (isStrong.test(type)) cur = type;\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i = 0; i < len; ++i) {\n if (isNeutral.test(types[i])) {\n for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}\n var before = (i ? types[i-1] : outerType) == \"L\";\n var after = (end < len ? types[end] : outerType) == \"L\";\n var replace = before || after ? \"L\" : \"R\";\n for (var j = i; j < end; ++j) types[j] = replace;\n i = end - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i = 0; i < len;) {\n if (countsAsLeft.test(types[i])) {\n var start = i;\n for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}\n order.push(new BidiSpan(0, start, i));\n } else {\n var pos = i, at = order.length;\n for (++i; i < len && types[i] != \"L\"; ++i) {}\n for (var j = pos; j < i;) {\n if (countsAsNum.test(types[j])) {\n if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j));\n var nstart = j;\n for (++j; j < i && countsAsNum.test(types[j]); ++j) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j));\n pos = j;\n } else ++j;\n }\n if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i));\n }\n }\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n if (order[0].level == 2)\n order.unshift(new BidiSpan(1, order[0].to, order[0].to));\n if (order[0].level != lst(order).level)\n order.push(new BidiSpan(order[0].level, len, len));\n\n return order;\n };\n })();\n\n // THE END\n\n CodeMirror.version = \"5.13.2\";\n\n return CodeMirror;\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/lib/codemirror.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/lib/codemirror.css": {
"text": "/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3 {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 30px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -30px; margin-right: -30px;\n padding-bottom: 30px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 30px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -30px;\n /* Hack to make IE7 behave */\n *zoom:1;\n *display:inline;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n}\n.CodeMirror-wrap pre {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n overflow: auto;\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor { position: absolute; }\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background: #ffa;\n background: rgba(255, 255, 0, .4);\n}\n\n/* IE7 hack to prevent it from returning funny offsetTops on the spans */\n.CodeMirror span { *vertical-align: text-bottom; }\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n",
"type": "text/css",
"title": "$:/plugins/tiddlywiki/codemirror/lib/codemirror.css",
"tags": "[[$:/tags/Stylesheet]]"
},
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.css": {
"text": ".CodeMirror-dialog {\n position: absolute;\n left: 0; right: 0;\n background: inherit;\n z-index: 15;\n padding: .1em .8em;\n overflow: hidden;\n color: inherit;\n}\n\n.CodeMirror-dialog-top {\n border-bottom: 1px solid #eee;\n top: 0;\n}\n\n.CodeMirror-dialog-bottom {\n border-top: 1px solid #eee;\n bottom: 0;\n}\n\n.CodeMirror-dialog input {\n border: none;\n outline: none;\n background: transparent;\n width: 20em;\n color: inherit;\n font-family: monospace;\n}\n\n.CodeMirror-dialog button {\n font-size: 70%;\n}\n",
"type": "text/css",
"title": "$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.css",
"tags": "[[$:/tags/Stylesheet]]"
},
"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// Open simple dialogs on top of an editor. Relies on dialog.css.\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n function dialogDiv(cm, template, bottom) {\n var wrap = cm.getWrapperElement();\n var dialog;\n dialog = wrap.appendChild(document.createElement(\"div\"));\n if (bottom)\n dialog.className = \"CodeMirror-dialog CodeMirror-dialog-bottom\";\n else\n dialog.className = \"CodeMirror-dialog CodeMirror-dialog-top\";\n\n if (typeof template == \"string\") {\n dialog.innerHTML = template;\n } else { // Assuming it's a detached DOM element.\n dialog.appendChild(template);\n }\n return dialog;\n }\n\n function closeNotification(cm, newVal) {\n if (cm.state.currentNotificationClose)\n cm.state.currentNotificationClose();\n cm.state.currentNotificationClose = newVal;\n }\n\n CodeMirror.defineExtension(\"openDialog\", function(template, callback, options) {\n if (!options) options = {};\n\n closeNotification(this, null);\n\n var dialog = dialogDiv(this, template, options.bottom);\n var closed = false, me = this;\n function close(newVal) {\n if (typeof newVal == 'string') {\n inp.value = newVal;\n } else {\n if (closed) return;\n closed = true;\n dialog.parentNode.removeChild(dialog);\n me.focus();\n\n if (options.onClose) options.onClose(dialog);\n }\n }\n\n var inp = dialog.getElementsByTagName(\"input\")[0], button;\n if (inp) {\n inp.focus();\n\n if (options.value) {\n inp.value = options.value;\n if (options.selectValueOnOpen !== false) {\n inp.select();\n }\n }\n\n if (options.onInput)\n CodeMirror.on(inp, \"input\", function(e) { options.onInput(e, inp.value, close);});\n if (options.onKeyUp)\n CodeMirror.on(inp, \"keyup\", function(e) {options.onKeyUp(e, inp.value, close);});\n\n CodeMirror.on(inp, \"keydown\", function(e) {\n if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {\n inp.blur();\n CodeMirror.e_stop(e);\n close();\n }\n if (e.keyCode == 13) callback(inp.value, e);\n });\n\n if (options.closeOnBlur !== false) CodeMirror.on(inp, \"blur\", close);\n } else if (button = dialog.getElementsByTagName(\"button\")[0]) {\n CodeMirror.on(button, \"click\", function() {\n close();\n me.focus();\n });\n\n if (options.closeOnBlur !== false) CodeMirror.on(button, \"blur\", close);\n\n button.focus();\n }\n return close;\n });\n\n CodeMirror.defineExtension(\"openConfirm\", function(template, callbacks, options) {\n closeNotification(this, null);\n var dialog = dialogDiv(this, template, options && options.bottom);\n var buttons = dialog.getElementsByTagName(\"button\");\n var closed = false, me = this, blurring = 1;\n function close() {\n if (closed) return;\n closed = true;\n dialog.parentNode.removeChild(dialog);\n me.focus();\n }\n buttons[0].focus();\n for (var i = 0; i < buttons.length; ++i) {\n var b = buttons[i];\n (function(callback) {\n CodeMirror.on(b, \"click\", function(e) {\n CodeMirror.e_preventDefault(e);\n close();\n if (callback) callback(me);\n });\n })(callbacks[i]);\n CodeMirror.on(b, \"blur\", function() {\n --blurring;\n setTimeout(function() { if (blurring <= 0) close(); }, 200);\n });\n CodeMirror.on(b, \"focus\", function() { ++blurring; });\n }\n });\n\n /*\n * openNotification\n * Opens a notification, that can be closed with an optional timer\n * (default 5000ms timer) and always closes on click.\n *\n * If a notification is opened while another is opened, it will close the\n * currently opened one and open the new one immediately.\n */\n CodeMirror.defineExtension(\"openNotification\", function(template, options) {\n closeNotification(this, close);\n var dialog = dialogDiv(this, template, options && options.bottom);\n var closed = false, doneTimer;\n var duration = options && typeof options.duration !== \"undefined\" ? options.duration : 5000;\n\n function close() {\n if (closed) return;\n closed = true;\n clearTimeout(doneTimer);\n dialog.parentNode.removeChild(dialog);\n }\n\n CodeMirror.on(dialog, 'click', function(e) {\n CodeMirror.e_preventDefault(e);\n close();\n });\n\n if (duration)\n doneTimer = setTimeout(close, duration);\n\n return close;\n });\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n (document.documentMode == null || document.documentMode < 8);\n\n var Pos = CodeMirror.Pos;\n\n var matching = {\"(\": \")>\", \")\": \"(<\", \"[\": \"]>\", \"]\": \"[<\", \"{\": \"}>\", \"}\": \"{<\"};\n\n function findMatchingBracket(cm, where, strict, config) {\n var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n if (!match) return null;\n var dir = match.charAt(1) == \">\" ? 1 : -1;\n if (strict && (dir > 0) != (pos == where.ch)) return null;\n var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n\n var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n if (found == null) return null;\n return {from: Pos(where.line, pos), to: found && found.pos,\n match: found && found.ch == match.charAt(0), forward: dir > 0};\n }\n\n // bracketRegex is used to specify which type of bracket to scan\n // should be a regexp, e.g. /[[\\]]/\n //\n // Note: If \"where\" is on an open bracket, then this bracket is ignored.\n //\n // Returns false when no bracket was found, null when it reached\n // maxScanLines and gave up\n function scanForBracket(cm, where, dir, style, config) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n var maxScanLines = (config && config.maxScanLines) || 1000;\n\n var stack = [];\n var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n : Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n var line = cm.getLine(lineNo);\n if (!line) continue;\n var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n if (line.length > maxScanLen) continue;\n if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n for (; pos != end; pos += dir) {\n var ch = line.charAt(pos);\n if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n var match = matching[ch];\n if ((match.charAt(1) == \">\") == (dir > 0)) stack.push(ch);\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n else stack.pop();\n }\n }\n }\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n }\n\n function matchBrackets(cm, autoclear, config) {\n // Disable brace matching in long lines, since it'll cause hugely slow updates\n var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n var marks = [], ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);\n if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n var style = match.match ? \"CodeMirror-matchingbracket\" : \"CodeMirror-nonmatchingbracket\";\n marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n }\n }\n\n if (marks.length) {\n // Kludge to work around the IE bug from issue #1193, where text\n // input stops going to the textare whever this fires.\n if (ie_lt8 && cm.state.focused) cm.focus();\n\n var clear = function() {\n cm.operation(function() {\n for (var i = 0; i < marks.length; i++) marks[i].clear();\n });\n };\n if (autoclear) setTimeout(clear, 800);\n else return clear;\n }\n }\n\n var currentlyHighlighted = null;\n function doMatchBrackets(cm) {\n cm.operation(function() {\n if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n });\n }\n\n CodeMirror.defineOption(\"matchBrackets\", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init)\n cm.off(\"cursorActivity\", doMatchBrackets);\n if (val) {\n cm.state.matchBrackets = typeof val == \"object\" ? val : {};\n cm.on(\"cursorActivity\", doMatchBrackets);\n }\n });\n\n CodeMirror.defineExtension(\"matchBrackets\", function() {matchBrackets(this, true);});\n CodeMirror.defineExtension(\"findMatchingBracket\", function(pos, strict, config){\n return findMatchingBracket(this, pos, strict, config);\n });\n CodeMirror.defineExtension(\"scanForBracket\", function(pos, dir, style, config){\n return scanForBracket(this, pos, dir, style, config);\n });\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/addon/mode/multiplex.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.multiplexingMode = function(outer /*, others */) {\n // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects\n var others = Array.prototype.slice.call(arguments, 1);\n\n function indexOf(string, pattern, from, returnEnd) {\n if (typeof pattern == \"string\") {\n var found = string.indexOf(pattern, from);\n return returnEnd && found > -1 ? found + pattern.length : found;\n }\n var m = pattern.exec(from ? string.slice(from) : string);\n return m ? m.index + from + (returnEnd ? m[0].length : 0) : -1;\n }\n\n return {\n startState: function() {\n return {\n outer: CodeMirror.startState(outer),\n innerActive: null,\n inner: null\n };\n },\n\n copyState: function(state) {\n return {\n outer: CodeMirror.copyState(outer, state.outer),\n innerActive: state.innerActive,\n inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)\n };\n },\n\n token: function(stream, state) {\n if (!state.innerActive) {\n var cutOff = Infinity, oldContent = stream.string;\n for (var i = 0; i < others.length; ++i) {\n var other = others[i];\n var found = indexOf(oldContent, other.open, stream.pos);\n if (found == stream.pos) {\n if (!other.parseDelimiters) stream.match(other.open);\n state.innerActive = other;\n state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, \"\") : 0);\n return other.delimStyle && (other.delimStyle + \" \" + other.delimStyle + \"-open\");\n } else if (found != -1 && found < cutOff) {\n cutOff = found;\n }\n }\n if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);\n var outerToken = outer.token(stream, state.outer);\n if (cutOff != Infinity) stream.string = oldContent;\n return outerToken;\n } else {\n var curInner = state.innerActive, oldContent = stream.string;\n if (!curInner.close && stream.sol()) {\n state.innerActive = state.inner = null;\n return this.token(stream, state);\n }\n var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos, curInner.parseDelimiters) : -1;\n if (found == stream.pos && !curInner.parseDelimiters) {\n stream.match(curInner.close);\n state.innerActive = state.inner = null;\n return curInner.delimStyle && (curInner.delimStyle + \" \" + curInner.delimStyle + \"-close\");\n }\n if (found > -1) stream.string = oldContent.slice(0, found);\n var innerToken = curInner.mode.token(stream, state.inner);\n if (found > -1) stream.string = oldContent;\n\n if (found == stream.pos && curInner.parseDelimiters)\n state.innerActive = state.inner = null;\n\n if (curInner.innerStyle) {\n if (innerToken) innerToken = innerToken + \" \" + curInner.innerStyle;\n else innerToken = curInner.innerStyle;\n }\n\n return innerToken;\n }\n },\n\n indent: function(state, textAfter) {\n var mode = state.innerActive ? state.innerActive.mode : outer;\n if (!mode.indent) return CodeMirror.Pass;\n return mode.indent(state.innerActive ? state.inner : state.outer, textAfter);\n },\n\n blankLine: function(state) {\n var mode = state.innerActive ? state.innerActive.mode : outer;\n if (mode.blankLine) {\n mode.blankLine(state.innerActive ? state.inner : state.outer);\n }\n if (!state.innerActive) {\n for (var i = 0; i < others.length; ++i) {\n var other = others[i];\n if (other.open === \"\\n\") {\n state.innerActive = other;\n state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, \"\") : 0);\n }\n }\n } else if (state.innerActive.close === \"\\n\") {\n state.innerActive = state.inner = null;\n }\n },\n\n electricChars: outer.electricChars,\n\n innerMode: function(state) {\n return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};\n }\n };\n};\n\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/addon/mode/multiplex.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n var Pos = CodeMirror.Pos;\n\n function SearchCursor(doc, query, pos, caseFold) {\n this.atOccurrence = false; this.doc = doc;\n if (caseFold == null && typeof query == \"string\") caseFold = false;\n\n pos = pos ? doc.clipPos(pos) : Pos(0, 0);\n this.pos = {from: pos, to: pos};\n\n // The matches method is filled in based on the type of query.\n // It takes a position and a direction, and returns an object\n // describing the next occurrence of the query, or null if no\n // more matches were found.\n if (typeof query != \"string\") { // Regexp match\n if (!query.global) query = new RegExp(query.source, query.ignoreCase ? \"ig\" : \"g\");\n this.matches = function(reverse, pos) {\n if (reverse) {\n query.lastIndex = 0;\n var line = doc.getLine(pos.line).slice(0, pos.ch), cutOff = 0, match, start;\n for (;;) {\n query.lastIndex = cutOff;\n var newMatch = query.exec(line);\n if (!newMatch) break;\n match = newMatch;\n start = match.index;\n cutOff = match.index + (match[0].length || 1);\n if (cutOff == line.length) break;\n }\n var matchLen = (match && match[0].length) || 0;\n if (!matchLen) {\n if (start == 0 && line.length == 0) {match = undefined;}\n else if (start != doc.getLine(pos.line).length) {\n matchLen++;\n }\n }\n } else {\n query.lastIndex = pos.ch;\n var line = doc.getLine(pos.line), match = query.exec(line);\n var matchLen = (match && match[0].length) || 0;\n var start = match && match.index;\n if (start + matchLen != line.length && !matchLen) matchLen = 1;\n }\n if (match && matchLen)\n return {from: Pos(pos.line, start),\n to: Pos(pos.line, start + matchLen),\n match: match};\n };\n } else { // String query\n var origQuery = query;\n if (caseFold) query = query.toLowerCase();\n var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};\n var target = query.split(\"\\n\");\n // Different methods for single-line and multi-line queries\n if (target.length == 1) {\n if (!query.length) {\n // Empty string would match anything and never progress, so\n // we define it to match nothing instead.\n this.matches = function() {};\n } else {\n this.matches = function(reverse, pos) {\n if (reverse) {\n var orig = doc.getLine(pos.line).slice(0, pos.ch), line = fold(orig);\n var match = line.lastIndexOf(query);\n if (match > -1) {\n match = adjustPos(orig, line, match);\n return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};\n }\n } else {\n var orig = doc.getLine(pos.line).slice(pos.ch), line = fold(orig);\n var match = line.indexOf(query);\n if (match > -1) {\n match = adjustPos(orig, line, match) + pos.ch;\n return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};\n }\n }\n };\n }\n } else {\n var origTarget = origQuery.split(\"\\n\");\n this.matches = function(reverse, pos) {\n var last = target.length - 1;\n if (reverse) {\n if (pos.line - (target.length - 1) < doc.firstLine()) return;\n if (fold(doc.getLine(pos.line).slice(0, origTarget[last].length)) != target[target.length - 1]) return;\n var to = Pos(pos.line, origTarget[last].length);\n for (var ln = pos.line - 1, i = last - 1; i >= 1; --i, --ln)\n if (target[i] != fold(doc.getLine(ln))) return;\n var line = doc.getLine(ln), cut = line.length - origTarget[0].length;\n if (fold(line.slice(cut)) != target[0]) return;\n return {from: Pos(ln, cut), to: to};\n } else {\n if (pos.line + (target.length - 1) > doc.lastLine()) return;\n var line = doc.getLine(pos.line), cut = line.length - origTarget[0].length;\n if (fold(line.slice(cut)) != target[0]) return;\n var from = Pos(pos.line, cut);\n for (var ln = pos.line + 1, i = 1; i < last; ++i, ++ln)\n if (target[i] != fold(doc.getLine(ln))) return;\n if (fold(doc.getLine(ln).slice(0, origTarget[last].length)) != target[last]) return;\n return {from: from, to: Pos(ln, origTarget[last].length)};\n }\n };\n }\n }\n }\n\n SearchCursor.prototype = {\n findNext: function() {return this.find(false);},\n findPrevious: function() {return this.find(true);},\n\n find: function(reverse) {\n var self = this, pos = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);\n function savePosAndFail(line) {\n var pos = Pos(line, 0);\n self.pos = {from: pos, to: pos};\n self.atOccurrence = false;\n return false;\n }\n\n for (;;) {\n if (this.pos = this.matches(reverse, pos)) {\n this.atOccurrence = true;\n return this.pos.match || true;\n }\n if (reverse) {\n if (!pos.line) return savePosAndFail(0);\n pos = Pos(pos.line-1, this.doc.getLine(pos.line-1).length);\n }\n else {\n var maxLine = this.doc.lineCount();\n if (pos.line == maxLine - 1) return savePosAndFail(maxLine);\n pos = Pos(pos.line + 1, 0);\n }\n }\n },\n\n from: function() {if (this.atOccurrence) return this.pos.from;},\n to: function() {if (this.atOccurrence) return this.pos.to;},\n\n replace: function(newText, origin) {\n if (!this.atOccurrence) return;\n var lines = CodeMirror.splitLines(newText);\n this.doc.replaceRange(lines, this.pos.from, this.pos.to, origin);\n this.pos.to = Pos(this.pos.from.line + lines.length - 1,\n lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));\n }\n };\n\n // Maps a position in a case-folded line back to a position in the original line\n // (compensating for codepoints increasing in number during folding)\n function adjustPos(orig, folded, pos) {\n if (orig.length == folded.length) return pos;\n for (var pos1 = Math.min(pos, orig.length);;) {\n var len1 = orig.slice(0, pos1).toLowerCase().length;\n if (len1 < pos) ++pos1;\n else if (len1 > pos) --pos1;\n else return pos1;\n }\n }\n\n CodeMirror.defineExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n return new SearchCursor(this.doc, query, pos, caseFold);\n });\n CodeMirror.defineDocExtension(\"getSearchCursor\", function(query, pos, caseFold) {\n return new SearchCursor(this, query, pos, caseFold);\n });\n\n CodeMirror.defineExtension(\"selectMatches\", function(query, caseFold) {\n var ranges = [];\n var cur = this.getSearchCursor(query, this.getCursor(\"from\"), caseFold);\n while (cur.findNext()) {\n if (CodeMirror.cmpPos(cur.to(), this.getCursor(\"to\")) > 0) break;\n ranges.push({anchor: cur.from(), head: cur.to()});\n }\n if (ranges.length)\n this.setSelections(ranges, 0);\n });\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/css/css.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n supportsAtComponent = parserConfig.supportsAtComponent === true;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \"@\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"def\", stream.current());\n } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n return ret(null, \"compare\");\n } else if (ch == \"\\\"\" || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \"#\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"atom\", \"hash\");\n } else if (ch == \"!\") {\n stream.match(/^\\s*\\w*/);\n return ret(\"keyword\", \"important\");\n } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (ch === \"-\") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (stream.match(/^-[\\w\\\\\\-]+/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret(\"variable-2\", \"variable-definition\");\n return ret(\"variable-2\", \"variable\");\n } else if (stream.match(/^\\w+-/)) {\n return ret(\"meta\", \"meta\");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, \"select-op\");\n } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret(\"qualifier\", \"qualifier\");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if ((ch == \"u\" && stream.match(/rl(-prefix)?\\(/)) ||\n (ch == \"d\" && stream.match(\"omain(\")) ||\n (ch == \"r\" && stream.match(\"egexp(\"))) {\n stream.backUp(1);\n state.tokenize = tokenParenthesized;\n return ret(\"property\", \"word\");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"property\", \"word\");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == \")\") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == \"\\\\\";\n }\n if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be '('\n if (!stream.match(/\\s*[\\\"\\')]/, false))\n state.tokenize = tokenString(\")\");\n else\n state.tokenize = null;\n return ret(null, \"(\");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"variable\";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == \"{\") {\n return pushContext(state, stream, \"block\");\n } else if (type == \"}\" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/.test(type)) {\n return pushContext(state, stream, \"atComponentBlock\");\n } else if (/^@(-moz-)?document$/.test(type)) {\n return pushContext(state, stream, \"documentTypes\");\n } else if (/^@(media|supports|(-moz-)?document|import)$/.test(type)) {\n return pushContext(state, stream, \"atBlock\");\n } else if (/^@(font-face|counter-style)/.test(type)) {\n state.stateArg = type;\n return \"restricted_atBlock_before\";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {\n return \"keyframes\";\n } else if (type && type.charAt(0) == \"@\") {\n return pushContext(state, stream, \"at\");\n } else if (type == \"hash\") {\n override = \"builtin\";\n } else if (type == \"word\") {\n override = \"tag\";\n } else if (type == \"variable-definition\") {\n return \"maybeprop\";\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n } else if (type == \":\") {\n return \"pseudo\";\n } else if (allowNested && type == \"(\") {\n return pushContext(state, stream, \"parens\");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = \"property\";\n return \"maybeprop\";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = \"string-2\";\n return \"maybeprop\";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n return \"block\";\n } else {\n override += \" error\";\n return \"maybeprop\";\n }\n } else if (type == \"meta\") {\n return \"block\";\n } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n override = \"error\";\n return \"block\";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == \":\") return pushContext(state, stream, \"prop\");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n if (type == \"hash\" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {\n override += \" error\";\n } else if (type == \"word\") {\n wordAsValue(stream);\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n }\n return \"prop\";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \")\") return popContext(state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n if (type == \"word\") wordAsValue(stream);\n return \"parens\";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == \"word\") {\n override = \"variable-3\";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == \"word\" && documentTypes.hasOwnProperty(stream.current())) {\n override = \"tag\";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n if (type == \"}\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n override = \"keyword\";\n else if (mediaTypes.hasOwnProperty(word))\n override = \"attribute\";\n else if (mediaFeatures.hasOwnProperty(word))\n override = \"property\";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else if (propertyKeywords.hasOwnProperty(word))\n override = \"property\";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = \"string-2\";\n else if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"error\";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == \"}\")\n return popAndPass(type, stream, state);\n if (type == \"{\")\n return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\", false);\n if (type == \"word\")\n override = \"error\";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == \")\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == \"{\")\n return pushContext(state, stream, \"restricted_atBlock\");\n if (type == \"word\" && state.stateArg == \"@counter-style\") {\n override = \"variable\";\n return \"restricted_atBlock_before\";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == \"}\") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == \"word\") {\n if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = \"error\";\n else\n override = \"property\";\n return \"maybeprop\";\n }\n return \"restricted_atBlock\";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n if (type == \"{\") return pushContext(state, stream, \"top\");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"tag\";\n else if (type == \"hash\") override = \"builtin\";\n return \"at\";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"variable\";\n else if (type != \"variable\" && type != \"(\" && type != \")\") override = \"error\";\n return \"interpolation\";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? \"block\" : \"top\",\n stateArg: null,\n context: new Context(inline ? \"block\" : \"top\", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == \"object\") {\n type = style[1];\n style = style[0];\n }\n override = style;\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n if (cx.prev) {\n if (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" ||\n cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n cx = cx.prev;\n }\n }\n return indent;\n },\n\n electricChars: \"}\",\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n fold: \"brace\"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i]] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n \"domain\", \"regexp\", \"url\", \"url-prefix\"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n \"tty\", \"tv\", \"embossed\"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n \"min-resolution\", \"max-resolution\", \"scan\", \"grid\", \"orientation\",\n \"device-pixel-ratio\", \"min-device-pixel-ratio\", \"max-device-pixel-ratio\",\n \"pointer\", \"any-pointer\", \"hover\", \"any-hover\"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n \"landscape\", \"portrait\", \"none\", \"coarse\", \"fine\", \"on-demand\", \"hover\",\n \"interlace\", \"progressive\"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n \"alignment-baseline\", \"anchor-point\", \"animation\", \"animation-delay\",\n \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n \"animation-timing-function\", \"appearance\", \"azimuth\", \"backface-visibility\",\n \"background\", \"background-attachment\", \"background-blend-mode\", \"background-clip\",\n \"background-color\", \"background-image\", \"background-origin\", \"background-position\",\n \"background-repeat\", \"background-size\", \"baseline-shift\", \"binding\",\n \"bleed\", \"bookmark-label\", \"bookmark-level\", \"bookmark-state\",\n \"bookmark-target\", \"border\", \"border-bottom\", \"border-bottom-color\",\n \"border-bottom-left-radius\", \"border-bottom-right-radius\",\n \"border-bottom-style\", \"border-bottom-width\", \"border-collapse\",\n \"border-color\", \"border-image\", \"border-image-outset\",\n \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n \"border-image-width\", \"border-left\", \"border-left-color\",\n \"border-left-style\", \"border-left-width\", \"border-radius\", \"border-right\",\n \"border-right-color\", \"border-right-style\", \"border-right-width\",\n \"border-spacing\", \"border-style\", \"border-top\", \"border-top-color\",\n \"border-top-left-radius\", \"border-top-right-radius\", \"border-top-style\",\n \"border-top-width\", \"border-width\", \"bottom\", \"box-decoration-break\",\n \"box-shadow\", \"box-sizing\", \"break-after\", \"break-before\", \"break-inside\",\n \"caption-side\", \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\",\n \"column-fill\", \"column-gap\", \"column-rule\", \"column-rule-color\",\n \"column-rule-style\", \"column-rule-width\", \"column-span\", \"column-width\",\n \"columns\", \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\",\n \"cue-after\", \"cue-before\", \"cursor\", \"direction\", \"display\",\n \"dominant-baseline\", \"drop-initial-after-adjust\",\n \"drop-initial-after-align\", \"drop-initial-before-adjust\",\n \"drop-initial-before-align\", \"drop-initial-size\", \"drop-initial-value\",\n \"elevation\", \"empty-cells\", \"fit\", \"fit-position\", \"flex\", \"flex-basis\",\n \"flex-direction\", \"flex-flow\", \"flex-grow\", \"flex-shrink\", \"flex-wrap\",\n \"float\", \"float-offset\", \"flow-from\", \"flow-into\", \"font\", \"font-feature-settings\",\n \"font-family\", \"font-kerning\", \"font-language-override\", \"font-size\", \"font-size-adjust\",\n \"font-stretch\", \"font-style\", \"font-synthesis\", \"font-variant\",\n \"font-variant-alternates\", \"font-variant-caps\", \"font-variant-east-asian\",\n \"font-variant-ligatures\", \"font-variant-numeric\", \"font-variant-position\",\n \"font-weight\", \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\",\n \"grid-auto-position\", \"grid-auto-rows\", \"grid-column\", \"grid-column-end\",\n \"grid-column-start\", \"grid-row\", \"grid-row-end\", \"grid-row-start\",\n \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\",\n \"icon\", \"image-orientation\", \"image-rendering\", \"image-resolution\",\n \"inline-box-align\", \"justify-content\", \"left\", \"letter-spacing\",\n \"line-break\", \"line-height\", \"line-stacking\", \"line-stacking-ruby\",\n \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\",\n \"marker-offset\", \"marks\", \"marquee-direction\", \"marquee-loop\",\n \"marquee-play-count\", \"marquee-speed\", \"marquee-style\", \"max-height\",\n \"max-width\", \"min-height\", \"min-width\", \"move-to\", \"nav-down\", \"nav-index\",\n \"nav-left\", \"nav-right\", \"nav-up\", \"object-fit\", \"object-position\",\n \"opacity\", \"order\", \"orphans\", \"outline\",\n \"outline-color\", \"outline-offset\", \"outline-style\", \"outline-width\",\n \"overflow\", \"overflow-style\", \"overflow-wrap\", \"overflow-x\", \"overflow-y\",\n \"padding\", \"padding-bottom\", \"padding-left\", \"padding-right\", \"padding-top\",\n \"page\", \"page-break-after\", \"page-break-before\", \"page-break-inside\",\n \"page-policy\", \"pause\", \"pause-after\", \"pause-before\", \"perspective\",\n \"perspective-origin\", \"pitch\", \"pitch-range\", \"play-during\", \"position\",\n \"presentation-level\", \"punctuation-trim\", \"quotes\", \"region-break-after\",\n \"region-break-before\", \"region-break-inside\", \"region-fragment\",\n \"rendering-intent\", \"resize\", \"rest\", \"rest-after\", \"rest-before\", \"richness\",\n \"right\", \"rotation\", \"rotation-point\", \"ruby-align\", \"ruby-overhang\",\n \"ruby-position\", \"ruby-span\", \"shape-image-threshold\", \"shape-inside\", \"shape-margin\",\n \"shape-outside\", \"size\", \"speak\", \"speak-as\", \"speak-header\",\n \"speak-numeral\", \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\",\n \"tab-size\", \"table-layout\", \"target\", \"target-name\", \"target-new\",\n \"target-position\", \"text-align\", \"text-align-last\", \"text-decoration\",\n \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n \"text-decoration-style\", \"text-emphasis\", \"text-emphasis-color\",\n \"text-emphasis-position\", \"text-emphasis-style\", \"text-height\",\n \"text-indent\", \"text-justify\", \"text-outline\", \"text-overflow\", \"text-shadow\",\n \"text-size-adjust\", \"text-space-collapse\", \"text-transform\", \"text-underline-position\",\n \"text-wrap\", \"top\", \"transform\", \"transform-origin\", \"transform-style\",\n \"transition\", \"transition-delay\", \"transition-duration\",\n \"transition-property\", \"transition-timing-function\", \"unicode-bidi\",\n \"vertical-align\", \"visibility\", \"voice-balance\", \"voice-duration\",\n \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\", \"voice-stress\",\n \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\", \"word-break\",\n \"word-spacing\", \"word-wrap\", \"z-index\",\n // SVG-specific\n \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n \"color-interpolation\", \"color-interpolation-filters\",\n \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"shape-rendering\", \"stroke\",\n \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\"\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n \"scrollbar-3d-light-color\", \"scrollbar-track-color\", \"shape-inside\",\n \"searchfield-cancel-button\", \"searchfield-decoration\", \"searchfield-results-button\",\n \"searchfield-results-decoration\", \"zoom\"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n \"font-family\", \"src\", \"unicode-range\", \"font-variant\", \"font-feature-settings\",\n \"font-stretch\", \"font-weight\", \"font-style\"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n \"speak-as\", \"suffix\", \"symbols\", \"system\"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n \"darkgray\", \"darkgreen\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n \"darkslateblue\", \"darkslategray\", \"darkturquoise\", \"darkviolet\",\n \"deeppink\", \"deepskyblue\", \"dimgray\", \"dodgerblue\", \"firebrick\",\n \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightpink\",\n \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\",\n \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n \"slateblue\", \"slategray\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n \"whitesmoke\", \"yellow\", \"yellowgreen\"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"avoid\", \"avoid-column\", \"avoid-page\",\n \"avoid-region\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n \"bengali\", \"blink\", \"block\", \"block-axis\", \"bold\", \"bolder\", \"border\", \"border-box\",\n \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"bullets\", \"button\", \"button-bevel\",\n \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n \"col-resize\", \"collapse\", \"color\", \"color-burn\", \"color-dodge\", \"column\", \"column-reverse\",\n \"compact\", \"condensed\", \"contain\", \"content\",\n \"content-box\", \"context-menu\", \"continuous\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n \"cross\", \"crosshair\", \"currentcolor\", \"cursive\", \"cyclic\", \"darken\", \"dashed\", \"decimal\",\n \"decimal-leading-zero\", \"default\", \"default-button\", \"destination-atop\",\n \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\", \"difference\",\n \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n \"dot-dash\", \"dot-dot-dash\",\n \"dotted\", \"double\", \"down\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n \"ethiopic-numeric\", \"ew-resize\", \"exclusion\", \"expanded\", \"extends\", \"extra-condensed\",\n \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fixed\", \"flat\", \"flex\", \"flex-end\", \"flex-start\", \"footnotes\",\n \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"graytext\", \"groove\",\n \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hard-light\", \"hebrew\",\n \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"hue\", \"icon\", \"ignore\",\n \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n \"inline-block\", \"inline-flex\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\", \"lighten\",\n \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n \"lower-roman\", \"lowercase\", \"ltr\", \"luminosity\", \"malayalam\", \"match\", \"matrix\", \"matrix3d\",\n \"media-controls-background\", \"media-current-time-display\",\n \"media-fullscreen-button\", \"media-mute-button\", \"media-play-button\",\n \"media-return-to-realtime-button\", \"media-rewind-button\",\n \"media-seek-back-button\", \"media-seek-forward-button\", \"media-slider\",\n \"media-sliderthumb\", \"media-time-remaining-display\", \"media-volume-slider\",\n \"media-volume-slider-container\", \"media-volume-sliderthumb\", \"medium\",\n \"menu\", \"menulist\", \"menulist-button\", \"menulist-text\",\n \"menulist-textfield\", \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"multiply\", \"myanmar\", \"n-resize\",\n \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"open-quote\",\n \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"plus-darker\", \"plus-lighter\",\n \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n \"relative\", \"repeat\", \"repeating-linear-gradient\",\n \"repeating-radial-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n \"rotateZ\", \"round\", \"row\", \"row-resize\", \"row-reverse\", \"rtl\", \"run-in\", \"running\",\n \"s-resize\", \"sans-serif\", \"saturation\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\", \"screen\",\n \"scroll\", \"scrollbar\", \"se-resize\", \"searchfield\",\n \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\",\n \"semi-condensed\", \"semi-expanded\", \"separate\", \"serif\", \"show\", \"sidama\",\n \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"soft-light\", \"solid\", \"somali\",\n \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"space-around\", \"space-between\", \"spell-out\", \"square\",\n \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"sub\",\n \"subpixel-antialiased\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"table\",\n \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n \"tamil\",\n \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n \"trad-chinese-formal\", \"trad-chinese-informal\",\n \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"up\",\n \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n \"var\", \"vertical\", \"vertical-text\", \"visible\", \"visibleFill\", \"visiblePainted\",\n \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n \"window\", \"windowframe\", \"windowtext\", \"words\", \"wrap\", \"wrap-reverse\", \"x-large\", \"x-small\", \"xor\",\n \"xx-large\", \"xx-small\"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == \"/\") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return [\"comment\", \"comment\"];\n }\n\n CodeMirror.defineMIME(\"text/css\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\"\n });\n\n CodeMirror.defineMIME(\"text/x-scss\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \":\": function(stream) {\n if (stream.match(/\\s*\\{/))\n return [null, \"{\"];\n return false;\n },\n \"$\": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"#\": function(stream) {\n if (!stream.eat(\"{\")) return false;\n return [null, \"interpolation\"];\n }\n },\n name: \"css\",\n helperType: \"scss\"\n });\n\n CodeMirror.defineMIME(\"text/x-less\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \"@\": function(stream) {\n if (stream.eat(\"{\")) return [null, \"interpolation\"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"&\": function() {\n return [\"atom\", \"atom\"];\n }\n },\n name: \"css\",\n helperType: \"less\"\n });\n\n CodeMirror.defineMIME(\"text/x-gss\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\",\n helperType: \"gss\"\n });\n\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/css/css.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/htmlembedded/htmlembedded.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../htmlmixed/htmlmixed\"),\n require(\"../../addon/mode/multiplex\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../htmlmixed/htmlmixed\",\n \"../../addon/mode/multiplex\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineMode(\"htmlembedded\", function(config, parserConfig) {\n return CodeMirror.multiplexingMode(CodeMirror.getMode(config, \"htmlmixed\"), {\n open: parserConfig.open || parserConfig.scriptStartRegex || \"<%\",\n close: parserConfig.close || parserConfig.scriptEndRegex || \"%>\",\n mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec)\n });\n }, \"htmlmixed\");\n\n CodeMirror.defineMIME(\"application/x-ejs\", {name: \"htmlembedded\", scriptingModeSpec:\"javascript\"});\n CodeMirror.defineMIME(\"application/x-aspx\", {name: \"htmlembedded\", scriptingModeSpec:\"text/x-csharp\"});\n CodeMirror.defineMIME(\"application/x-jsp\", {name: \"htmlembedded\", scriptingModeSpec:\"text/x-java\"});\n CodeMirror.defineMIME(\"application/x-erb\", {name: \"htmlembedded\", scriptingModeSpec:\"ruby\"});\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/htmlembedded/htmlembedded.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../javascript/javascript\"), require(\"../css/css\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../javascript/javascript\", \"../css/css\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var defaultTags = {\n script: [\n [\"lang\", /(javascript|babel)/i, \"javascript\"],\n [\"type\", /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^$/i, \"javascript\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"javascript\"]\n ],\n style: [\n [\"lang\", /^css$/i, \"css\"],\n [\"type\", /^(text\\/)?(x-)?(stylesheet|css)$/i, \"css\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"css\"]\n ]\n };\n\n function maybeBackup(stream, pat, style) {\n var cur = stream.current(), close = cur.search(pat);\n if (close > -1) {\n stream.backUp(cur.length - close);\n } else if (cur.match(/<\\/?$/)) {\n stream.backUp(cur.length);\n if (!stream.match(pat, false)) stream.match(cur);\n }\n return style;\n }\n\n var attrRegexpCache = {};\n function getAttrRegexp(attr) {\n var regexp = attrRegexpCache[attr];\n if (regexp) return regexp;\n return attrRegexpCache[attr] = new RegExp(\"\\\\s+\" + attr + \"\\\\s*=\\\\s*('|\\\")?([^'\\\"]+)('|\\\")?\\\\s*\");\n }\n\n function getAttrValue(text, attr) {\n var match = text.match(getAttrRegexp(attr))\n return match ? match[2] : \"\"\n }\n\n function getTagRegexp(tagName, anchored) {\n return new RegExp((anchored ? \"^\" : \"\") + \"<\\/\\s*\" + tagName + \"\\s*>\", \"i\");\n }\n\n function addTags(from, to) {\n for (var tag in from) {\n var dest = to[tag] || (to[tag] = []);\n var source = from[tag];\n for (var i = source.length - 1; i >= 0; i--)\n dest.unshift(source[i])\n }\n }\n\n function findMatchingMode(tagInfo, tagText) {\n for (var i = 0; i < tagInfo.length; i++) {\n var spec = tagInfo[i];\n if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];\n }\n }\n\n CodeMirror.defineMode(\"htmlmixed\", function (config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, {\n name: \"xml\",\n htmlMode: true,\n multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag\n });\n\n var tags = {};\n var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;\n addTags(defaultTags, tags);\n if (configTags) addTags(configTags, tags);\n if (configScript) for (var i = configScript.length - 1; i >= 0; i--)\n tags.script.unshift([\"type\", configScript[i].matches, configScript[i].mode])\n\n function html(stream, state) {\n var style = htmlMode.token(stream, state.htmlState), tag = /\\btag\\b/.test(style), tagName\n if (tag && !/[<>\\s\\/]/.test(stream.current()) &&\n (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&\n tags.hasOwnProperty(tagName)) {\n state.inTag = tagName + \" \"\n } else if (state.inTag && tag && />$/.test(stream.current())) {\n var inTag = /^([\\S]+) (.*)/.exec(state.inTag)\n state.inTag = null\n var modeSpec = stream.current() == \">\" && findMatchingMode(tags[inTag[1]], inTag[2])\n var mode = CodeMirror.getMode(config, modeSpec)\n var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);\n state.token = function (stream, state) {\n if (stream.match(endTagA, false)) {\n state.token = html;\n state.localState = state.localMode = null;\n return null;\n }\n return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));\n };\n state.localMode = mode;\n state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, \"\"));\n } else if (state.inTag) {\n state.inTag += stream.current()\n if (stream.eol()) state.inTag += \" \"\n }\n return style;\n };\n\n return {\n startState: function () {\n var state = htmlMode.startState();\n return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};\n },\n\n copyState: function (state) {\n var local;\n if (state.localState) {\n local = CodeMirror.copyState(state.localMode, state.localState);\n }\n return {token: state.token, inTag: state.inTag,\n localMode: state.localMode, localState: local,\n htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n },\n\n token: function (stream, state) {\n return state.token(stream, state);\n },\n\n indent: function (state, textAfter) {\n if (!state.localMode || /^\\s*<\\//.test(textAfter))\n return htmlMode.indent(state.htmlState, textAfter);\n else if (state.localMode.indent)\n return state.localMode.indent(state.localState, textAfter);\n else\n return CodeMirror.Pass;\n },\n\n innerMode: function (state) {\n return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n }\n };\n }, \"xml\", \"javascript\", \"css\");\n\n CodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// TODO actually recognize syntax of TypeScript constructs\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nfunction expressionAllowed(stream, state, backUp) {\n return /^(?:operator|sof|keyword c|case|new|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n (state.lastType == \"quasi\" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n}\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n var statementIndent = parserConfig.statementIndent;\n var jsonldMode = parserConfig.jsonld;\n var jsonMode = parserConfig.json || jsonldMode;\n var isTS = parserConfig.typescript;\n var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n // Tokenizer\n\n var keywords = function(){\n function kw(type) {return {type: type, style: \"keyword\"};}\n var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\");\n var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n var jsKeywords = {\n \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n \"return\": C, \"break\": C, \"continue\": C, \"new\": kw(\"new\"), \"delete\": C, \"throw\": C, \"debugger\": C,\n \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n \"this\": kw(\"this\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C\n };\n\n // Extend the 'normal' keywords with the TypeScript language extensions\n if (isTS) {\n var type = {type: \"variable\", style: \"variable-3\"};\n var tsKeywords = {\n // object-like things\n \"interface\": kw(\"class\"),\n \"implements\": C,\n \"namespace\": C,\n \"module\": kw(\"module\"),\n \"enum\": kw(\"module\"),\n\n // scope modifiers\n \"public\": kw(\"modifier\"),\n \"private\": kw(\"modifier\"),\n \"protected\": kw(\"modifier\"),\n \"abstract\": kw(\"modifier\"),\n\n // operators\n \"as\": operator,\n\n // types\n \"string\": type, \"number\": type, \"boolean\": type, \"any\": type\n };\n\n for (var attr in tsKeywords) {\n jsKeywords[attr] = tsKeywords[attr];\n }\n }\n\n return jsKeywords;\n }();\n\n var isOperatorChar = /[+\\-*&%=<>!?|~^]/;\n var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n function readRegexp(stream) {\n var escaped = false, next, inSet = false;\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if (next == \"/\" && !inSet) return;\n if (next == \"[\") inSet = true;\n else if (inSet && next == \"]\") inSet = false;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n }\n\n // Used as scratch variables to communicate multiple values without\n // consing up tons of objects.\n var type, content;\n function ret(tp, style, cont) {\n type = tp; content = cont;\n return style;\n }\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == '\"' || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \".\" && stream.match(/^\\d+(?:[eE][+\\-]?\\d+)?/)) {\n return ret(\"number\", \"number\");\n } else if (ch == \".\" && stream.match(\"..\")) {\n return ret(\"spread\", \"meta\");\n } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n return ret(ch);\n } else if (ch == \"=\" && stream.eat(\">\")) {\n return ret(\"=>\", \"operator\");\n } else if (ch == \"0\" && stream.eat(/x/i)) {\n stream.eatWhile(/[\\da-f]/i);\n return ret(\"number\", \"number\");\n } else if (ch == \"0\" && stream.eat(/o/i)) {\n stream.eatWhile(/[0-7]/i);\n return ret(\"number\", \"number\");\n } else if (ch == \"0\" && stream.eat(/b/i)) {\n stream.eatWhile(/[01]/i);\n return ret(\"number\", \"number\");\n } else if (/\\d/.test(ch)) {\n stream.match(/^\\d*(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/);\n return ret(\"number\", \"number\");\n } else if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n } else if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return ret(\"comment\", \"comment\");\n } else if (expressionAllowed(stream, state, 1)) {\n readRegexp(stream);\n stream.match(/^\\b(([gimyu])(?![gimyu]*\\2))+\\b/);\n return ret(\"regexp\", \"string-2\");\n } else {\n stream.eatWhile(isOperatorChar);\n return ret(\"operator\", \"operator\", stream.current());\n }\n } else if (ch == \"`\") {\n state.tokenize = tokenQuasi;\n return tokenQuasi(stream, state);\n } else if (ch == \"#\") {\n stream.skipToEnd();\n return ret(\"error\", \"error\");\n } else if (isOperatorChar.test(ch)) {\n stream.eatWhile(isOperatorChar);\n return ret(\"operator\", \"operator\", stream.current());\n } else if (wordRE.test(ch)) {\n stream.eatWhile(wordRE);\n var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];\n return (known && state.lastType != \".\") ? ret(known.type, known.style, word) :\n ret(\"variable\", \"variable\", word);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next;\n if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n state.tokenize = tokenBase;\n return ret(\"jsonld-keyword\", \"meta\");\n }\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) break;\n escaped = !escaped && next == \"\\\\\";\n }\n if (!escaped) state.tokenize = tokenBase;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return ret(\"comment\", \"comment\");\n }\n\n function tokenQuasi(stream, state) {\n var escaped = false, next;\n while ((next = stream.next()) != null) {\n if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n return ret(\"quasi\", \"string-2\", stream.current());\n }\n\n var brackets = \"([{}])\";\n // This is a crude lookahead trick to try and notice that we're\n // parsing the argument patterns for a fat-arrow function before we\n // actually hit the arrow token. It only works if the arrow is on\n // the same line as the arguments and there's no strange noise\n // (comments) in between. Fallback is to only notice when we hit the\n // arrow, and not declare the arguments as locals for the arrow\n // body.\n function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf(\"=>\", stream.start);\n if (arrow < 0) return;\n\n var depth = 0, sawSomething = false;\n for (var pos = arrow - 1; pos >= 0; --pos) {\n var ch = stream.string.charAt(pos);\n var bracket = brackets.indexOf(ch);\n if (bracket >= 0 && bracket < 3) {\n if (!depth) { ++pos; break; }\n if (--depth == 0) break;\n } else if (bracket >= 3 && bracket < 6) {\n ++depth;\n } else if (wordRE.test(ch)) {\n sawSomething = true;\n } else if (/[\"'\\/]/.test(ch)) {\n return;\n } else if (sawSomething && !depth) {\n ++pos;\n break;\n }\n }\n if (sawSomething && !depth) state.fatArrowAt = pos;\n }\n\n // Parser\n\n var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true, \"regexp\": true, \"this\": true, \"jsonld-keyword\": true};\n\n function JSLexical(indented, column, type, align, prev, info) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.prev = prev;\n this.info = info;\n if (align != null) this.align = align;\n }\n\n function inScope(state, varname) {\n for (var v = state.localVars; v; v = v.next)\n if (v.name == varname) return true;\n for (var cx = state.context; cx; cx = cx.prev) {\n for (var v = cx.vars; v; v = v.next)\n if (v.name == varname) return true;\n }\n }\n\n function parseJS(state, style, type, content, stream) {\n var cc = state.cc;\n // Communicate our context to the combinators.\n // (Less wasteful than consing up a hundred closures on every call.)\n cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = true;\n\n while(true) {\n var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n if (combinator(type, content)) {\n while(cc.length && cc[cc.length - 1].lex)\n cc.pop()();\n if (cx.marked) return cx.marked;\n if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n return style;\n }\n }\n }\n\n // Combinator utils\n\n var cx = {state: null, column: null, marked: null, cc: null};\n function pass() {\n for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n }\n function cont() {\n pass.apply(null, arguments);\n return true;\n }\n function register(varname) {\n function inList(list) {\n for (var v = list; v; v = v.next)\n if (v.name == varname) return true;\n return false;\n }\n var state = cx.state;\n cx.marked = \"def\";\n if (state.context) {\n if (inList(state.localVars)) return;\n state.localVars = {name: varname, next: state.localVars};\n } else {\n if (inList(state.globalVars)) return;\n if (parserConfig.globalVars)\n state.globalVars = {name: varname, next: state.globalVars};\n }\n }\n\n // Combinators\n\n var defaultVars = {name: \"this\", next: {name: \"arguments\"}};\n function pushcontext() {\n cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};\n cx.state.localVars = defaultVars;\n }\n function popcontext() {\n cx.state.localVars = cx.state.context.vars;\n cx.state.context = cx.state.context.prev;\n }\n function pushlex(type, info) {\n var result = function() {\n var state = cx.state, indent = state.indented;\n if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n indent = outer.indented;\n state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n };\n result.lex = true;\n return result;\n }\n function poplex() {\n var state = cx.state;\n if (state.lexical.prev) {\n if (state.lexical.type == \")\")\n state.indented = state.lexical.indented;\n state.lexical = state.lexical.prev;\n }\n }\n poplex.lex = true;\n\n function expect(wanted) {\n function exp(type) {\n if (type == wanted) return cont();\n else if (wanted == \";\") return pass();\n else return cont(exp);\n };\n return exp;\n }\n\n function statement(type, value) {\n if (type == \"var\") return cont(pushlex(\"vardef\", value.length), vardef, expect(\";\"), poplex);\n if (type == \"keyword a\") return cont(pushlex(\"form\"), expression, statement, poplex);\n if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n if (type == \"{\") return cont(pushlex(\"}\"), block, poplex);\n if (type == \";\") return cont();\n if (type == \"if\") {\n if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n cx.state.cc.pop()();\n return cont(pushlex(\"form\"), expression, statement, poplex, maybeelse);\n }\n if (type == \"function\") return cont(functiondef);\n if (type == \"for\") return cont(pushlex(\"form\"), forspec, statement, poplex);\n if (type == \"variable\") return cont(pushlex(\"stat\"), maybelabel);\n if (type == \"switch\") return cont(pushlex(\"form\"), expression, pushlex(\"}\", \"switch\"), expect(\"{\"),\n block, poplex, poplex);\n if (type == \"case\") return cont(expression, expect(\":\"));\n if (type == \"default\") return cont(expect(\":\"));\n if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, expect(\"(\"), funarg, expect(\")\"),\n statement, poplex, popcontext);\n if (type == \"class\") return cont(pushlex(\"form\"), className, poplex);\n if (type == \"export\") return cont(pushlex(\"stat\"), afterExport, poplex);\n if (type == \"import\") return cont(pushlex(\"stat\"), afterImport, poplex);\n if (type == \"module\") return cont(pushlex(\"form\"), pattern, pushlex(\"}\"), expect(\"{\"), block, poplex, poplex)\n return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n }\n function expression(type) {\n return expressionInner(type, false);\n }\n function expressionNoComma(type) {\n return expressionInner(type, true);\n }\n function expressionInner(type, noComma) {\n if (cx.state.fatArrowAt == cx.stream.start) {\n var body = noComma ? arrowBodyNoComma : arrowBody;\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(pattern, \")\"), poplex, expect(\"=>\"), body, popcontext);\n else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n }\n\n var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n if (type == \"function\") return cont(functiondef, maybeop);\n if (type == \"keyword c\") return cont(noComma ? maybeexpressionNoComma : maybeexpression);\n if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, comprehension, expect(\")\"), poplex, maybeop);\n if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n if (type == \"quasi\") return pass(quasi, maybeop);\n if (type == \"new\") return cont(maybeTarget(noComma));\n return cont();\n }\n function maybeexpression(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expression);\n }\n function maybeexpressionNoComma(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expressionNoComma);\n }\n\n function maybeoperatorComma(type, value) {\n if (type == \",\") return cont(expression);\n return maybeoperatorNoComma(type, value, false);\n }\n function maybeoperatorNoComma(type, value, noComma) {\n var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n var expr = noComma == false ? expression : expressionNoComma;\n if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n if (type == \"operator\") {\n if (/\\+\\+|--/.test(value)) return cont(me);\n if (value == \"?\") return cont(expression, expect(\":\"), expr);\n return cont(expr);\n }\n if (type == \"quasi\") { return pass(quasi, me); }\n if (type == \";\") return;\n if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n if (type == \".\") return cont(property, me);\n if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n }\n function quasi(type, value) {\n if (type != \"quasi\") return pass();\n if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n return cont(expression, continueQuasi);\n }\n function continueQuasi(type) {\n if (type == \"}\") {\n cx.marked = \"string-2\";\n cx.state.tokenize = tokenQuasi;\n return cont(quasi);\n }\n }\n function arrowBody(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expression);\n }\n function arrowBodyNoComma(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expressionNoComma);\n }\n function maybeTarget(noComma) {\n return function(type) {\n if (type == \".\") return cont(noComma ? targetNoComma : target);\n else return pass(noComma ? expressionNoComma : expression);\n };\n }\n function target(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorComma); }\n }\n function targetNoComma(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorNoComma); }\n }\n function maybelabel(type) {\n if (type == \":\") return cont(poplex, statement);\n return pass(maybeoperatorComma, expect(\";\"), poplex);\n }\n function property(type) {\n if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n }\n function objprop(type, value) {\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n if (value == \"get\" || value == \"set\") return cont(getterSetter);\n return cont(afterprop);\n } else if (type == \"number\" || type == \"string\") {\n cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n return cont(afterprop);\n } else if (type == \"jsonld-keyword\") {\n return cont(afterprop);\n } else if (type == \"modifier\") {\n return cont(objprop)\n } else if (type == \"[\") {\n return cont(expression, expect(\"]\"), afterprop);\n } else if (type == \"spread\") {\n return cont(expression);\n }\n }\n function getterSetter(type) {\n if (type != \"variable\") return pass(afterprop);\n cx.marked = \"property\";\n return cont(functiondef);\n }\n function afterprop(type) {\n if (type == \":\") return cont(expressionNoComma);\n if (type == \"(\") return pass(functiondef);\n }\n function commasep(what, end) {\n function proceed(type) {\n if (type == \",\") {\n var lex = cx.state.lexical;\n if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n return cont(what, proceed);\n }\n if (type == end) return cont();\n return cont(expect(end));\n }\n return function(type) {\n if (type == end) return cont();\n return pass(what, proceed);\n };\n }\n function contCommasep(what, end, info) {\n for (var i = 3; i < arguments.length; i++)\n cx.cc.push(arguments[i]);\n return cont(pushlex(end, info), commasep(what, end), poplex);\n }\n function block(type) {\n if (type == \"}\") return cont();\n return pass(statement, block);\n }\n function maybetype(type) {\n if (isTS && type == \":\") return cont(typedef);\n }\n function maybedefault(_, value) {\n if (value == \"=\") return cont(expressionNoComma);\n }\n function typedef(type) {\n if (type == \"variable\") {cx.marked = \"variable-3\"; return cont();}\n }\n function vardef() {\n return pass(pattern, maybetype, maybeAssign, vardefCont);\n }\n function pattern(type, value) {\n if (type == \"modifier\") return cont(pattern)\n if (type == \"variable\") { register(value); return cont(); }\n if (type == \"spread\") return cont(pattern);\n if (type == \"[\") return contCommasep(pattern, \"]\");\n if (type == \"{\") return contCommasep(proppattern, \"}\");\n }\n function proppattern(type, value) {\n if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n register(value);\n return cont(maybeAssign);\n }\n if (type == \"variable\") cx.marked = \"property\";\n if (type == \"spread\") return cont(pattern);\n if (type == \"}\") return pass();\n return cont(expect(\":\"), pattern, maybeAssign);\n }\n function maybeAssign(_type, value) {\n if (value == \"=\") return cont(expressionNoComma);\n }\n function vardefCont(type) {\n if (type == \",\") return cont(vardef);\n }\n function maybeelse(type, value) {\n if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n }\n function forspec(type) {\n if (type == \"(\") return cont(pushlex(\")\"), forspec1, expect(\")\"), poplex);\n }\n function forspec1(type) {\n if (type == \"var\") return cont(vardef, expect(\";\"), forspec2);\n if (type == \";\") return cont(forspec2);\n if (type == \"variable\") return cont(formaybeinof);\n return pass(expression, expect(\";\"), forspec2);\n }\n function formaybeinof(_type, value) {\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return cont(maybeoperatorComma, forspec2);\n }\n function forspec2(type, value) {\n if (type == \";\") return cont(forspec3);\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression); }\n return pass(expression, expect(\";\"), forspec3);\n }\n function forspec3(type) {\n if (type != \")\") cont(expression);\n }\n function functiondef(type, value) {\n if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n if (type == \"variable\") {register(value); return cont(functiondef);}\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, statement, popcontext);\n }\n function funarg(type) {\n if (type == \"spread\") return cont(funarg);\n return pass(pattern, maybetype, maybedefault);\n }\n function className(type, value) {\n if (type == \"variable\") {register(value); return cont(classNameAfter);}\n }\n function classNameAfter(type, value) {\n if (value == \"extends\") return cont(expression, classNameAfter);\n if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n }\n function classBody(type, value) {\n if (type == \"variable\" || cx.style == \"keyword\") {\n if (value == \"static\") {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n cx.marked = \"property\";\n if (value == \"get\" || value == \"set\") return cont(classGetterSetter, functiondef, classBody);\n return cont(functiondef, classBody);\n }\n if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \";\") return cont(classBody);\n if (type == \"}\") return cont();\n }\n function classGetterSetter(type) {\n if (type != \"variable\") return pass();\n cx.marked = \"property\";\n return cont();\n }\n function afterExport(_type, value) {\n if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n return pass(statement);\n }\n function afterImport(type) {\n if (type == \"string\") return cont();\n return pass(importSpec, maybeFrom);\n }\n function importSpec(type, value) {\n if (type == \"{\") return contCommasep(importSpec, \"}\");\n if (type == \"variable\") register(value);\n if (value == \"*\") cx.marked = \"keyword\";\n return cont(maybeAs);\n }\n function maybeAs(_type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(importSpec); }\n }\n function maybeFrom(_type, value) {\n if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n }\n function arrayLiteral(type) {\n if (type == \"]\") return cont();\n return pass(expressionNoComma, maybeArrayComprehension);\n }\n function maybeArrayComprehension(type) {\n if (type == \"for\") return pass(comprehension, expect(\"]\"));\n if (type == \",\") return cont(commasep(maybeexpressionNoComma, \"]\"));\n return pass(commasep(expressionNoComma, \"]\"));\n }\n function comprehension(type) {\n if (type == \"for\") return cont(forspec, comprehension);\n if (type == \"if\") return cont(expression, comprehension);\n }\n\n function isContinuedStatement(state, textAfter) {\n return state.lastType == \"operator\" || state.lastType == \",\" ||\n isOperatorChar.test(textAfter.charAt(0)) ||\n /[,.]/.test(textAfter.charAt(0));\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n var state = {\n tokenize: tokenBase,\n lastType: \"sof\",\n cc: [],\n lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n localVars: parserConfig.localVars,\n context: parserConfig.localVars && {vars: parserConfig.localVars},\n indented: basecolumn || 0\n };\n if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n state.globalVars = parserConfig.globalVars;\n return state;\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = false;\n state.indented = stream.indentation();\n findFatArrow(stream, state);\n }\n if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (type == \"comment\") return style;\n state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n return parseJS(state, style, type, content, stream);\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize == tokenComment) return CodeMirror.Pass;\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;\n // Kludge to prevent 'maybelse' from blocking lexical scope pops\n if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n var c = state.cc[i];\n if (c == poplex) lexical = lexical.prev;\n else if (c != maybeelse) break;\n }\n if (lexical.type == \"stat\" && firstChar == \"}\") lexical = lexical.prev;\n if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n lexical = lexical.prev;\n var type = lexical.type, closing = firstChar == type;\n\n if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info + 1 : 0);\n else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n else if (type == \"form\") return lexical.indented + indentUnit;\n else if (type == \"stat\")\n return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n else return lexical.indented + (closing ? 0 : indentUnit);\n },\n\n electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n blockCommentStart: jsonMode ? null : \"/*\",\n blockCommentEnd: jsonMode ? null : \"*/\",\n lineComment: jsonMode ? null : \"//\",\n fold: \"brace\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n\n helperType: jsonMode ? \"json\" : \"javascript\",\n jsonldMode: jsonldMode,\n jsonMode: jsonMode,\n\n expressionAllowed: expressionAllowed,\n skipExpression: function(state) {\n var top = state.cc[state.cc.length - 1]\n if (top == expression || top == expressionNoComma) state.cc.pop()\n }\n };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/x-json\", {name: \"javascript\", json: true});\nCodeMirror.defineMIME(\"application/ld+json\", {name: \"javascript\", jsonld: true});\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/markdown/markdown.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../meta\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../meta\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"markdown\", function(cmCfg, modeCfg) {\n\n var htmlMode = CodeMirror.getMode(cmCfg, \"text/html\");\n var htmlModeMissing = htmlMode.name == \"null\"\n\n function getMode(name) {\n if (CodeMirror.findModeByName) {\n var found = CodeMirror.findModeByName(name);\n if (found) name = found.mime || found.mimes[0];\n }\n var mode = CodeMirror.getMode(cmCfg, name);\n return mode.name == \"null\" ? null : mode;\n }\n\n // Should characters that affect highlighting be highlighted separate?\n // Does not include characters that will be output (such as `1.` and `-` for lists)\n if (modeCfg.highlightFormatting === undefined)\n modeCfg.highlightFormatting = false;\n\n // Maximum number of nested blockquotes. Set to 0 for infinite nesting.\n // Excess `>` will emit `error` token.\n if (modeCfg.maxBlockquoteDepth === undefined)\n modeCfg.maxBlockquoteDepth = 0;\n\n // Should underscores in words open/close em/strong?\n if (modeCfg.underscoresBreakWords === undefined)\n modeCfg.underscoresBreakWords = true;\n\n // Use `fencedCodeBlocks` to configure fenced code blocks. false to\n // disable, string to specify a precise regexp that the fence should\n // match, and true to allow three or more backticks or tildes (as\n // per CommonMark).\n\n // Turn on task lists? (\"- [ ] \" and \"- [x] \")\n if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;\n\n // Turn on strikethrough syntax\n if (modeCfg.strikethrough === undefined)\n modeCfg.strikethrough = false;\n\n // Allow token types to be overridden by user-provided token types.\n if (modeCfg.tokenTypeOverrides === undefined)\n modeCfg.tokenTypeOverrides = {};\n\n var tokenTypes = {\n header: \"header\",\n code: \"comment\",\n quote: \"quote\",\n list1: \"variable-2\",\n list2: \"variable-3\",\n list3: \"keyword\",\n hr: \"hr\",\n image: \"tag\",\n formatting: \"formatting\",\n linkInline: \"link\",\n linkEmail: \"link\",\n linkText: \"link\",\n linkHref: \"string\",\n em: \"em\",\n strong: \"strong\",\n strikethrough: \"strikethrough\"\n };\n\n for (var tokenType in tokenTypes) {\n if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {\n tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];\n }\n }\n\n var hrRE = /^([*\\-_])(?:\\s*\\1){2,}\\s*$/\n , ulRE = /^[*\\-+]\\s+/\n , olRE = /^[0-9]+([.)])\\s+/\n , taskListRE = /^\\[(x| )\\](?=\\s)/ // Must follow ulRE or olRE\n , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/\n , setextHeaderRE = /^ *(?:\\={1,}|-{1,})\\s*$/\n , textRE = /^[^#!\\[\\]*_\\\\<>` \"'(~]+/\n , fencedCodeRE = new RegExp(\"^(\" + (modeCfg.fencedCodeBlocks === true ? \"~~~+|```+\" : modeCfg.fencedCodeBlocks) +\n \")[ \\\\t]*([\\\\w+#]*)\");\n\n function switchInline(stream, state, f) {\n state.f = state.inline = f;\n return f(stream, state);\n }\n\n function switchBlock(stream, state, f) {\n state.f = state.block = f;\n return f(stream, state);\n }\n\n function lineIsEmpty(line) {\n return !line || !/\\S/.test(line.string)\n }\n\n // Blocks\n\n function blankLine(state) {\n // Reset linkTitle state\n state.linkTitle = false;\n // Reset EM state\n state.em = false;\n // Reset STRONG state\n state.strong = false;\n // Reset strikethrough state\n state.strikethrough = false;\n // Reset state.quote\n state.quote = 0;\n // Reset state.indentedCode\n state.indentedCode = false;\n if (htmlModeMissing && state.f == htmlBlock) {\n state.f = inlineNormal;\n state.block = blockNormal;\n }\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n // Mark this line as blank\n state.prevLine = state.thisLine\n state.thisLine = null\n return null;\n }\n\n function blockNormal(stream, state) {\n\n var sol = stream.sol();\n\n var prevLineIsList = state.list !== false,\n prevLineIsIndentedCode = state.indentedCode;\n\n state.indentedCode = false;\n\n if (prevLineIsList) {\n if (state.indentationDiff >= 0) { // Continued list\n if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block\n state.indentation -= state.indentationDiff;\n }\n state.list = null;\n } else if (state.indentation > 0) {\n state.list = null;\n } else { // No longer a list\n state.list = false;\n }\n }\n\n var match = null;\n if (state.indentationDiff >= 4) {\n stream.skipToEnd();\n if (prevLineIsIndentedCode || lineIsEmpty(state.prevLine)) {\n state.indentation -= 4;\n state.indentedCode = true;\n return tokenTypes.code;\n } else {\n return null;\n }\n } else if (stream.eatSpace()) {\n return null;\n } else if ((match = stream.match(atxHeaderRE)) && match[1].length <= 6) {\n state.header = match[1].length;\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n state.f = state.inline;\n return getType(state);\n } else if (!lineIsEmpty(state.prevLine) && !state.quote && !prevLineIsList &&\n !prevLineIsIndentedCode && (match = stream.match(setextHeaderRE))) {\n state.header = match[0].charAt(0) == '=' ? 1 : 2;\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n state.f = state.inline;\n return getType(state);\n } else if (stream.eat('>')) {\n state.quote = sol ? 1 : state.quote + 1;\n if (modeCfg.highlightFormatting) state.formatting = \"quote\";\n stream.eatSpace();\n return getType(state);\n } else if (stream.peek() === '[') {\n return switchInline(stream, state, footnoteLink);\n } else if (stream.match(hrRE, true)) {\n state.hr = true;\n return tokenTypes.hr;\n } else if ((lineIsEmpty(state.prevLine) || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {\n var listType = null;\n if (stream.match(ulRE, true)) {\n listType = 'ul';\n } else {\n stream.match(olRE, true);\n listType = 'ol';\n }\n state.indentation = stream.column() + stream.current().length;\n state.list = true;\n\n // While this list item's marker's indentation\n // is less than the deepest list item's content's indentation,\n // pop the deepest list item indentation off the stack.\n while (state.listStack && stream.column() < state.listStack[state.listStack.length - 1]) {\n state.listStack.pop();\n }\n\n // Add this list item's content's indentation to the stack\n state.listStack.push(state.indentation);\n\n if (modeCfg.taskLists && stream.match(taskListRE, false)) {\n state.taskList = true;\n }\n state.f = state.inline;\n if (modeCfg.highlightFormatting) state.formatting = [\"list\", \"list-\" + listType];\n return getType(state);\n } else if (modeCfg.fencedCodeBlocks && (match = stream.match(fencedCodeRE, true))) {\n state.fencedChars = match[1]\n // try switching mode\n state.localMode = getMode(match[2]);\n if (state.localMode) state.localState = state.localMode.startState();\n state.f = state.block = local;\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n state.code = -1\n return getType(state);\n }\n\n return switchInline(stream, state, state.inline);\n }\n\n function htmlBlock(stream, state) {\n var style = htmlMode.token(stream, state.htmlState);\n if (!htmlModeMissing) {\n var inner = CodeMirror.innerMode(htmlMode, state.htmlState)\n if ((inner.mode.name == \"xml\" && inner.state.tagStart === null &&\n (!inner.state.context && inner.state.tokenize.isInText)) ||\n (state.md_inside && stream.current().indexOf(\">\") > -1)) {\n state.f = inlineNormal;\n state.block = blockNormal;\n state.htmlState = null;\n }\n }\n return style;\n }\n\n function local(stream, state) {\n if (state.fencedChars && stream.match(state.fencedChars, false)) {\n state.localMode = state.localState = null;\n state.f = state.block = leavingLocal;\n return null;\n } else if (state.localMode) {\n return state.localMode.token(stream, state.localState);\n } else {\n stream.skipToEnd();\n return tokenTypes.code;\n }\n }\n\n function leavingLocal(stream, state) {\n stream.match(state.fencedChars);\n state.block = blockNormal;\n state.f = inlineNormal;\n state.fencedChars = null;\n if (modeCfg.highlightFormatting) state.formatting = \"code-block\";\n state.code = 1\n var returnType = getType(state);\n state.code = 0\n return returnType;\n }\n\n // Inline\n function getType(state) {\n var styles = [];\n\n if (state.formatting) {\n styles.push(tokenTypes.formatting);\n\n if (typeof state.formatting === \"string\") state.formatting = [state.formatting];\n\n for (var i = 0; i < state.formatting.length; i++) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i]);\n\n if (state.formatting[i] === \"header\") {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.header);\n }\n\n // Add `formatting-quote` and `formatting-quote-#` for blockquotes\n // Add `error` instead if the maximum blockquote nesting depth is passed\n if (state.formatting[i] === \"quote\") {\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.formatting + \"-\" + state.formatting[i] + \"-\" + state.quote);\n } else {\n styles.push(\"error\");\n }\n }\n }\n }\n\n if (state.taskOpen) {\n styles.push(\"meta\");\n return styles.length ? styles.join(' ') : null;\n }\n if (state.taskClosed) {\n styles.push(\"property\");\n return styles.length ? styles.join(' ') : null;\n }\n\n if (state.linkHref) {\n styles.push(tokenTypes.linkHref, \"url\");\n } else { // Only apply inline styles to non-url text\n if (state.strong) { styles.push(tokenTypes.strong); }\n if (state.em) { styles.push(tokenTypes.em); }\n if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }\n if (state.linkText) { styles.push(tokenTypes.linkText); }\n if (state.code) { styles.push(tokenTypes.code); }\n }\n\n if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + \"-\" + state.header); }\n\n if (state.quote) {\n styles.push(tokenTypes.quote);\n\n // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth\n if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {\n styles.push(tokenTypes.quote + \"-\" + state.quote);\n } else {\n styles.push(tokenTypes.quote + \"-\" + modeCfg.maxBlockquoteDepth);\n }\n }\n\n if (state.list !== false) {\n var listMod = (state.listStack.length - 1) % 3;\n if (!listMod) {\n styles.push(tokenTypes.list1);\n } else if (listMod === 1) {\n styles.push(tokenTypes.list2);\n } else {\n styles.push(tokenTypes.list3);\n }\n }\n\n if (state.trailingSpaceNewLine) {\n styles.push(\"trailing-space-new-line\");\n } else if (state.trailingSpace) {\n styles.push(\"trailing-space-\" + (state.trailingSpace % 2 ? \"a\" : \"b\"));\n }\n\n return styles.length ? styles.join(' ') : null;\n }\n\n function handleText(stream, state) {\n if (stream.match(textRE, true)) {\n return getType(state);\n }\n return undefined;\n }\n\n function inlineNormal(stream, state) {\n var style = state.text(stream, state);\n if (typeof style !== 'undefined')\n return style;\n\n if (state.list) { // List marker (*, +, -, 1., etc)\n state.list = null;\n return getType(state);\n }\n\n if (state.taskList) {\n var taskOpen = stream.match(taskListRE, true)[1] !== \"x\";\n if (taskOpen) state.taskOpen = true;\n else state.taskClosed = true;\n if (modeCfg.highlightFormatting) state.formatting = \"task\";\n state.taskList = false;\n return getType(state);\n }\n\n state.taskOpen = false;\n state.taskClosed = false;\n\n if (state.header && stream.match(/^#+$/, true)) {\n if (modeCfg.highlightFormatting) state.formatting = \"header\";\n return getType(state);\n }\n\n // Get sol() value now, before character is consumed\n var sol = stream.sol();\n\n var ch = stream.next();\n\n // Matches link titles present on next line\n if (state.linkTitle) {\n state.linkTitle = false;\n var matchCh = ch;\n if (ch === '(') {\n matchCh = ')';\n }\n matchCh = (matchCh+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n var regex = '^\\\\s*(?:[^' + matchCh + '\\\\\\\\]+|\\\\\\\\\\\\\\\\|\\\\\\\\.)' + matchCh;\n if (stream.match(new RegExp(regex), true)) {\n return tokenTypes.linkHref;\n }\n }\n\n // If this block is changed, it may need to be updated in GFM mode\n if (ch === '`') {\n var previousFormatting = state.formatting;\n if (modeCfg.highlightFormatting) state.formatting = \"code\";\n stream.eatWhile('`');\n var count = stream.current().length\n if (state.code == 0) {\n state.code = count\n return getType(state)\n } else if (count == state.code) { // Must be exact\n var t = getType(state)\n state.code = 0\n return t\n } else {\n state.formatting = previousFormatting\n return getType(state)\n }\n } else if (state.code) {\n return getType(state);\n }\n\n if (ch === '\\\\') {\n stream.next();\n if (modeCfg.highlightFormatting) {\n var type = getType(state);\n var formattingEscape = tokenTypes.formatting + \"-escape\";\n return type ? type + \" \" + formattingEscape : formattingEscape;\n }\n }\n\n if (ch === '!' && stream.match(/\\[[^\\]]*\\] ?(?:\\(|\\[)/, false)) {\n stream.match(/\\[[^\\]]*\\]/);\n state.inline = state.f = linkHref;\n return tokenTypes.image;\n }\n\n if (ch === '[' && stream.match(/.*\\](\\(.*\\)| ?\\[.*\\])/, false)) {\n state.linkText = true;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n return getType(state);\n }\n\n if (ch === ']' && state.linkText && stream.match(/\\(.*\\)| ?\\[.*\\]/, false)) {\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n state.linkText = false;\n state.inline = state.f = linkHref;\n return type;\n }\n\n if (ch === '<' && stream.match(/^(https?|ftps?):\\/\\/(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n if (ch === '<' && stream.match(/^[^> \\\\]+@(?:[^\\\\>]|\\\\.)+>/, false)) {\n state.f = state.inline = linkInline;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkEmail;\n }\n\n if (ch === '<' && stream.match(/^(!--|\\w)/, false)) {\n var end = stream.string.indexOf(\">\", stream.pos);\n if (end != -1) {\n var atts = stream.string.substring(stream.start, end);\n if (/markdown\\s*=\\s*('|\"){0,1}1('|\"){0,1}/.test(atts)) state.md_inside = true;\n }\n stream.backUp(1);\n state.htmlState = CodeMirror.startState(htmlMode);\n return switchBlock(stream, state, htmlBlock);\n }\n\n if (ch === '<' && stream.match(/^\\/\\w*?>/)) {\n state.md_inside = false;\n return \"tag\";\n }\n\n var ignoreUnderscore = false;\n if (!modeCfg.underscoresBreakWords) {\n if (ch === '_' && stream.peek() !== '_' && stream.match(/(\\w)/, false)) {\n var prevPos = stream.pos - 2;\n if (prevPos >= 0) {\n var prevCh = stream.string.charAt(prevPos);\n if (prevCh !== '_' && prevCh.match(/(\\w)/, false)) {\n ignoreUnderscore = true;\n }\n }\n }\n }\n if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {\n if (sol && stream.peek() === ' ') {\n // Do nothing, surrounded by newline and space\n } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG\n if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n var t = getType(state);\n state.strong = false;\n return t;\n } else if (!state.strong && stream.eat(ch)) { // Add STRONG\n state.strong = ch;\n if (modeCfg.highlightFormatting) state.formatting = \"strong\";\n return getType(state);\n } else if (state.em === ch) { // Remove EM\n if (modeCfg.highlightFormatting) state.formatting = \"em\";\n var t = getType(state);\n state.em = false;\n return t;\n } else if (!state.em) { // Add EM\n state.em = ch;\n if (modeCfg.highlightFormatting) state.formatting = \"em\";\n return getType(state);\n }\n } else if (ch === ' ') {\n if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(1);\n }\n }\n }\n\n if (modeCfg.strikethrough) {\n if (ch === '~' && stream.eatWhile(ch)) {\n if (state.strikethrough) {// Remove strikethrough\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n var t = getType(state);\n state.strikethrough = false;\n return t;\n } else if (stream.match(/^[^\\s]/, false)) {// Add strikethrough\n state.strikethrough = true;\n if (modeCfg.highlightFormatting) state.formatting = \"strikethrough\";\n return getType(state);\n }\n } else if (ch === ' ') {\n if (stream.match(/^~~/, true)) { // Probably surrounded by space\n if (stream.peek() === ' ') { // Surrounded by spaces, ignore\n return getType(state);\n } else { // Not surrounded by spaces, back up pointer\n stream.backUp(2);\n }\n }\n }\n }\n\n if (ch === ' ') {\n if (stream.match(/ +$/, false)) {\n state.trailingSpace++;\n } else if (state.trailingSpace) {\n state.trailingSpaceNewLine = true;\n }\n }\n\n return getType(state);\n }\n\n function linkInline(stream, state) {\n var ch = stream.next();\n\n if (ch === \">\") {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var type = getType(state);\n if (type){\n type += \" \";\n } else {\n type = \"\";\n }\n return type + tokenTypes.linkInline;\n }\n\n stream.match(/^[^>]+/, true);\n\n return tokenTypes.linkInline;\n }\n\n function linkHref(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n var ch = stream.next();\n if (ch === '(' || ch === '[') {\n state.f = state.inline = getLinkHrefInside(ch === \"(\" ? \")\" : \"]\");\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n state.linkHref = true;\n return getType(state);\n }\n return 'error';\n }\n\n function getLinkHrefInside(endChar) {\n return function(stream, state) {\n var ch = stream.next();\n\n if (ch === endChar) {\n state.f = state.inline = inlineNormal;\n if (modeCfg.highlightFormatting) state.formatting = \"link-string\";\n var returnState = getType(state);\n state.linkHref = false;\n return returnState;\n }\n\n if (stream.match(inlineRE(endChar), true)) {\n stream.backUp(1);\n }\n\n state.linkHref = true;\n return getType(state);\n };\n }\n\n function footnoteLink(stream, state) {\n if (stream.match(/^([^\\]\\\\]|\\\\.)*\\]:/, false)) {\n state.f = footnoteLinkInside;\n stream.next(); // Consume [\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n state.linkText = true;\n return getType(state);\n }\n return switchInline(stream, state, inlineNormal);\n }\n\n function footnoteLinkInside(stream, state) {\n if (stream.match(/^\\]:/, true)) {\n state.f = state.inline = footnoteUrl;\n if (modeCfg.highlightFormatting) state.formatting = \"link\";\n var returnType = getType(state);\n state.linkText = false;\n return returnType;\n }\n\n stream.match(/^([^\\]\\\\]|\\\\.)+/, true);\n\n return tokenTypes.linkText;\n }\n\n function footnoteUrl(stream, state) {\n // Check if space, and return NULL if so (to avoid marking the space)\n if(stream.eatSpace()){\n return null;\n }\n // Match URL\n stream.match(/^[^\\s]+/, true);\n // Check for link title\n if (stream.peek() === undefined) { // End of line, set flag to check next line\n state.linkTitle = true;\n } else { // More content on line, check if link title\n stream.match(/^(?:\\s+(?:\"(?:[^\"\\\\]|\\\\\\\\|\\\\.)+\"|'(?:[^'\\\\]|\\\\\\\\|\\\\.)+'|\\((?:[^)\\\\]|\\\\\\\\|\\\\.)+\\)))?/, true);\n }\n state.f = state.inline = inlineNormal;\n return tokenTypes.linkHref + \" url\";\n }\n\n var savedInlineRE = [];\n function inlineRE(endChar) {\n if (!savedInlineRE[endChar]) {\n // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)\n endChar = (endChar+'').replace(/([.?*+^$[\\]\\\\(){}|-])/g, \"\\\\$1\");\n // Match any non-endChar, escaped character, as well as the closing\n // endChar.\n savedInlineRE[endChar] = new RegExp('^(?:[^\\\\\\\\]|\\\\\\\\.)*?(' + endChar + ')');\n }\n return savedInlineRE[endChar];\n }\n\n var mode = {\n startState: function() {\n return {\n f: blockNormal,\n\n prevLine: null,\n thisLine: null,\n\n block: blockNormal,\n htmlState: null,\n indentation: 0,\n\n inline: inlineNormal,\n text: handleText,\n\n formatting: false,\n linkText: false,\n linkHref: false,\n linkTitle: false,\n code: 0,\n em: false,\n strong: false,\n header: 0,\n hr: false,\n taskList: false,\n list: false,\n listStack: [],\n quote: 0,\n trailingSpace: 0,\n trailingSpaceNewLine: false,\n strikethrough: false,\n fencedChars: null\n };\n },\n\n copyState: function(s) {\n return {\n f: s.f,\n\n prevLine: s.prevLine,\n thisLine: s.thisLine,\n\n block: s.block,\n htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),\n indentation: s.indentation,\n\n localMode: s.localMode,\n localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,\n\n inline: s.inline,\n text: s.text,\n formatting: false,\n linkTitle: s.linkTitle,\n code: s.code,\n em: s.em,\n strong: s.strong,\n strikethrough: s.strikethrough,\n header: s.header,\n hr: s.hr,\n taskList: s.taskList,\n list: s.list,\n listStack: s.listStack.slice(0),\n quote: s.quote,\n indentedCode: s.indentedCode,\n trailingSpace: s.trailingSpace,\n trailingSpaceNewLine: s.trailingSpaceNewLine,\n md_inside: s.md_inside,\n fencedChars: s.fencedChars\n };\n },\n\n token: function(stream, state) {\n\n // Reset state.formatting\n state.formatting = false;\n\n if (stream != state.thisLine) {\n var forceBlankLine = state.header || state.hr;\n\n // Reset state.header and state.hr\n state.header = 0;\n state.hr = false;\n\n if (stream.match(/^\\s*$/, true) || forceBlankLine) {\n blankLine(state);\n if (!forceBlankLine) return null\n state.prevLine = null\n }\n\n state.prevLine = state.thisLine\n state.thisLine = stream\n\n // Reset state.taskList\n state.taskList = false;\n\n // Reset state.trailingSpace\n state.trailingSpace = 0;\n state.trailingSpaceNewLine = false;\n\n state.f = state.block;\n var indentation = stream.match(/^\\s*/, true)[0].replace(/\\t/g, ' ').length;\n state.indentationDiff = Math.min(indentation - state.indentation, 4);\n state.indentation = state.indentation + state.indentationDiff;\n if (indentation > 0) return null;\n }\n return state.f(stream, state);\n },\n\n innerMode: function(state) {\n if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};\n if (state.localState) return {state: state.localState, mode: state.localMode};\n return {state: state, mode: mode};\n },\n\n blankLine: blankLine,\n\n getType: getType,\n\n fold: \"markdown\"\n };\n return mode;\n}, \"xml\");\n\nCodeMirror.defineMIME(\"text/x-markdown\", \"markdown\");\n\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/markdown/markdown.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/meta.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n CodeMirror.modeInfo = [\n {name: \"APL\", mime: \"text/apl\", mode: \"apl\", ext: [\"dyalog\", \"apl\"]},\n {name: \"PGP\", mimes: [\"application/pgp\", \"application/pgp-keys\", \"application/pgp-signature\"], mode: \"asciiarmor\", ext: [\"pgp\"]},\n {name: \"ASN.1\", mime: \"text/x-ttcn-asn\", mode: \"asn.1\", ext: [\"asn\", \"asn1\"]},\n {name: \"Asterisk\", mime: \"text/x-asterisk\", mode: \"asterisk\", file: /^extensions\\.conf$/i},\n {name: \"Brainfuck\", mime: \"text/x-brainfuck\", mode: \"brainfuck\", ext: [\"b\", \"bf\"]},\n {name: \"C\", mime: \"text/x-csrc\", mode: \"clike\", ext: [\"c\", \"h\"]},\n {name: \"C++\", mime: \"text/x-c++src\", mode: \"clike\", ext: [\"cpp\", \"c++\", \"cc\", \"cxx\", \"hpp\", \"h++\", \"hh\", \"hxx\"], alias: [\"cpp\"]},\n {name: \"Cobol\", mime: \"text/x-cobol\", mode: \"cobol\", ext: [\"cob\", \"cpy\"]},\n {name: \"C#\", mime: \"text/x-csharp\", mode: \"clike\", ext: [\"cs\"], alias: [\"csharp\"]},\n {name: \"Clojure\", mime: \"text/x-clojure\", mode: \"clojure\", ext: [\"clj\", \"cljc\", \"cljx\"]},\n {name: \"ClojureScript\", mime: \"text/x-clojurescript\", mode: \"clojure\", ext: [\"cljs\"]},\n {name: \"Closure Stylesheets (GSS)\", mime: \"text/x-gss\", mode: \"css\", ext: [\"gss\"]},\n {name: \"CMake\", mime: \"text/x-cmake\", mode: \"cmake\", ext: [\"cmake\", \"cmake.in\"], file: /^CMakeLists.txt$/},\n {name: \"CoffeeScript\", mime: \"text/x-coffeescript\", mode: \"coffeescript\", ext: [\"coffee\"], alias: [\"coffee\", \"coffee-script\"]},\n {name: \"Common Lisp\", mime: \"text/x-common-lisp\", mode: \"commonlisp\", ext: [\"cl\", \"lisp\", \"el\"], alias: [\"lisp\"]},\n {name: \"Cypher\", mime: \"application/x-cypher-query\", mode: \"cypher\", ext: [\"cyp\", \"cypher\"]},\n {name: \"Cython\", mime: \"text/x-cython\", mode: \"python\", ext: [\"pyx\", \"pxd\", \"pxi\"]},\n {name: \"Crystal\", mime: \"text/x-crystal\", mode: \"crystal\", ext: [\"cr\"]},\n {name: \"CSS\", mime: \"text/css\", mode: \"css\", ext: [\"css\"]},\n {name: \"CQL\", mime: \"text/x-cassandra\", mode: \"sql\", ext: [\"cql\"]},\n {name: \"D\", mime: \"text/x-d\", mode: \"d\", ext: [\"d\"]},\n {name: \"Dart\", mimes: [\"application/dart\", \"text/x-dart\"], mode: \"dart\", ext: [\"dart\"]},\n {name: \"diff\", mime: \"text/x-diff\", mode: \"diff\", ext: [\"diff\", \"patch\"]},\n {name: \"Django\", mime: \"text/x-django\", mode: \"django\"},\n {name: \"Dockerfile\", mime: \"text/x-dockerfile\", mode: \"dockerfile\", file: /^Dockerfile$/},\n {name: \"DTD\", mime: \"application/xml-dtd\", mode: \"dtd\", ext: [\"dtd\"]},\n {name: \"Dylan\", mime: \"text/x-dylan\", mode: \"dylan\", ext: [\"dylan\", \"dyl\", \"intr\"]},\n {name: \"EBNF\", mime: \"text/x-ebnf\", mode: \"ebnf\"},\n {name: \"ECL\", mime: \"text/x-ecl\", mode: \"ecl\", ext: [\"ecl\"]},\n {name: \"edn\", mime: \"application/edn\", mode: \"clojure\", ext: [\"edn\"]},\n {name: \"Eiffel\", mime: \"text/x-eiffel\", mode: \"eiffel\", ext: [\"e\"]},\n {name: \"Elm\", mime: \"text/x-elm\", mode: \"elm\", ext: [\"elm\"]},\n {name: \"Embedded Javascript\", mime: \"application/x-ejs\", mode: \"htmlembedded\", ext: [\"ejs\"]},\n {name: \"Embedded Ruby\", mime: \"application/x-erb\", mode: \"htmlembedded\", ext: [\"erb\"]},\n {name: \"Erlang\", mime: \"text/x-erlang\", mode: \"erlang\", ext: [\"erl\"]},\n {name: \"Factor\", mime: \"text/x-factor\", mode: \"factor\", ext: [\"factor\"]},\n {name: \"FCL\", mime: \"text/x-fcl\", mode: \"fcl\"},\n {name: \"Forth\", mime: \"text/x-forth\", mode: \"forth\", ext: [\"forth\", \"fth\", \"4th\"]},\n {name: \"Fortran\", mime: \"text/x-fortran\", mode: \"fortran\", ext: [\"f\", \"for\", \"f77\", \"f90\"]},\n {name: \"F#\", mime: \"text/x-fsharp\", mode: \"mllike\", ext: [\"fs\"], alias: [\"fsharp\"]},\n {name: \"Gas\", mime: \"text/x-gas\", mode: \"gas\", ext: [\"s\"]},\n {name: \"Gherkin\", mime: \"text/x-feature\", mode: \"gherkin\", ext: [\"feature\"]},\n {name: \"GitHub Flavored Markdown\", mime: \"text/x-gfm\", mode: \"gfm\", file: /^(readme|contributing|history).md$/i},\n {name: \"Go\", mime: \"text/x-go\", mode: \"go\", ext: [\"go\"]},\n {name: \"Groovy\", mime: \"text/x-groovy\", mode: \"groovy\", ext: [\"groovy\", \"gradle\"]},\n {name: \"HAML\", mime: \"text/x-haml\", mode: \"haml\", ext: [\"haml\"]},\n {name: \"Haskell\", mime: \"text/x-haskell\", mode: \"haskell\", ext: [\"hs\"]},\n {name: \"Haskell (Literate)\", mime: \"text/x-literate-haskell\", mode: \"haskell-literate\", ext: [\"lhs\"]},\n {name: \"Haxe\", mime: \"text/x-haxe\", mode: \"haxe\", ext: [\"hx\"]},\n {name: \"HXML\", mime: \"text/x-hxml\", mode: \"haxe\", ext: [\"hxml\"]},\n {name: \"ASP.NET\", mime: \"application/x-aspx\", mode: \"htmlembedded\", ext: [\"aspx\"], alias: [\"asp\", \"aspx\"]},\n {name: \"HTML\", mime: \"text/html\", mode: \"htmlmixed\", ext: [\"html\", \"htm\"], alias: [\"xhtml\"]},\n {name: \"HTTP\", mime: \"message/http\", mode: \"http\"},\n {name: \"IDL\", mime: \"text/x-idl\", mode: \"idl\", ext: [\"pro\"]},\n {name: \"Jade\", mime: \"text/x-jade\", mode: \"jade\", ext: [\"jade\"]},\n {name: \"Java\", mime: \"text/x-java\", mode: \"clike\", ext: [\"java\"]},\n {name: \"Java Server Pages\", mime: \"application/x-jsp\", mode: \"htmlembedded\", ext: [\"jsp\"], alias: [\"jsp\"]},\n {name: \"JavaScript\", mimes: [\"text/javascript\", \"text/ecmascript\", \"application/javascript\", \"application/x-javascript\", \"application/ecmascript\"],\n mode: \"javascript\", ext: [\"js\"], alias: [\"ecmascript\", \"js\", \"node\"]},\n {name: \"JSON\", mimes: [\"application/json\", \"application/x-json\"], mode: \"javascript\", ext: [\"json\", \"map\"], alias: [\"json5\"]},\n {name: \"JSON-LD\", mime: \"application/ld+json\", mode: \"javascript\", ext: [\"jsonld\"], alias: [\"jsonld\"]},\n {name: \"JSX\", mime: \"text/jsx\", mode: \"jsx\", ext: [\"jsx\"]},\n {name: \"Jinja2\", mime: \"null\", mode: \"jinja2\"},\n {name: \"Julia\", mime: \"text/x-julia\", mode: \"julia\", ext: [\"jl\"]},\n {name: \"Kotlin\", mime: \"text/x-kotlin\", mode: \"clike\", ext: [\"kt\"]},\n {name: \"LESS\", mime: \"text/x-less\", mode: \"css\", ext: [\"less\"]},\n {name: \"LiveScript\", mime: \"text/x-livescript\", mode: \"livescript\", ext: [\"ls\"], alias: [\"ls\"]},\n {name: \"Lua\", mime: \"text/x-lua\", mode: \"lua\", ext: [\"lua\"]},\n {name: \"Markdown\", mime: \"text/x-markdown\", mode: \"markdown\", ext: [\"markdown\", \"md\", \"mkd\"]},\n {name: \"mIRC\", mime: \"text/mirc\", mode: \"mirc\"},\n {name: \"MariaDB SQL\", mime: \"text/x-mariadb\", mode: \"sql\"},\n {name: \"Mathematica\", mime: \"text/x-mathematica\", mode: \"mathematica\", ext: [\"m\", \"nb\"]},\n {name: \"Modelica\", mime: \"text/x-modelica\", mode: \"modelica\", ext: [\"mo\"]},\n {name: \"MUMPS\", mime: \"text/x-mumps\", mode: \"mumps\", ext: [\"mps\"]},\n {name: \"MS SQL\", mime: \"text/x-mssql\", mode: \"sql\"},\n {name: \"MySQL\", mime: \"text/x-mysql\", mode: \"sql\"},\n {name: \"Nginx\", mime: \"text/x-nginx-conf\", mode: \"nginx\", file: /nginx.*\\.conf$/i},\n {name: \"NSIS\", mime: \"text/x-nsis\", mode: \"nsis\", ext: [\"nsh\", \"nsi\"]},\n {name: \"NTriples\", mime: \"text/n-triples\", mode: \"ntriples\", ext: [\"nt\"]},\n {name: \"Objective C\", mime: \"text/x-objectivec\", mode: \"clike\", ext: [\"m\", \"mm\"]},\n {name: \"OCaml\", mime: \"text/x-ocaml\", mode: \"mllike\", ext: [\"ml\", \"mli\", \"mll\", \"mly\"]},\n {name: \"Octave\", mime: \"text/x-octave\", mode: \"octave\", ext: [\"m\"]},\n {name: \"Oz\", mime: \"text/x-oz\", mode: \"oz\", ext: [\"oz\"]},\n {name: \"Pascal\", mime: \"text/x-pascal\", mode: \"pascal\", ext: [\"p\", \"pas\"]},\n {name: \"PEG.js\", mime: \"null\", mode: \"pegjs\", ext: [\"jsonld\"]},\n {name: \"Perl\", mime: \"text/x-perl\", mode: \"perl\", ext: [\"pl\", \"pm\"]},\n {name: \"PHP\", mime: \"application/x-httpd-php\", mode: \"php\", ext: [\"php\", \"php3\", \"php4\", \"php5\", \"phtml\"]},\n {name: \"Pig\", mime: \"text/x-pig\", mode: \"pig\", ext: [\"pig\"]},\n {name: \"Plain Text\", mime: \"text/plain\", mode: \"null\", ext: [\"txt\", \"text\", \"conf\", \"def\", \"list\", \"log\"]},\n {name: \"PLSQL\", mime: \"text/x-plsql\", mode: \"sql\", ext: [\"pls\"]},\n {name: \"Properties files\", mime: \"text/x-properties\", mode: \"properties\", ext: [\"properties\", \"ini\", \"in\"], alias: [\"ini\", \"properties\"]},\n {name: \"ProtoBuf\", mime: \"text/x-protobuf\", mode: \"protobuf\", ext: [\"proto\"]},\n {name: \"Python\", mime: \"text/x-python\", mode: \"python\", ext: [\"py\", \"pyw\"]},\n {name: \"Puppet\", mime: \"text/x-puppet\", mode: \"puppet\", ext: [\"pp\"]},\n {name: \"Q\", mime: \"text/x-q\", mode: \"q\", ext: [\"q\"]},\n {name: \"R\", mime: \"text/x-rsrc\", mode: \"r\", ext: [\"r\"], alias: [\"rscript\"]},\n {name: \"reStructuredText\", mime: \"text/x-rst\", mode: \"rst\", ext: [\"rst\"], alias: [\"rst\"]},\n {name: \"RPM Changes\", mime: \"text/x-rpm-changes\", mode: \"rpm\"},\n {name: \"RPM Spec\", mime: \"text/x-rpm-spec\", mode: \"rpm\", ext: [\"spec\"]},\n {name: \"Ruby\", mime: \"text/x-ruby\", mode: \"ruby\", ext: [\"rb\"], alias: [\"jruby\", \"macruby\", \"rake\", \"rb\", \"rbx\"]},\n {name: \"Rust\", mime: \"text/x-rustsrc\", mode: \"rust\", ext: [\"rs\"]},\n {name: \"Sass\", mime: \"text/x-sass\", mode: \"sass\", ext: [\"sass\"]},\n {name: \"Scala\", mime: \"text/x-scala\", mode: \"clike\", ext: [\"scala\"]},\n {name: \"Scheme\", mime: \"text/x-scheme\", mode: \"scheme\", ext: [\"scm\", \"ss\"]},\n {name: \"SCSS\", mime: \"text/x-scss\", mode: \"css\", ext: [\"scss\"]},\n {name: \"Shell\", mime: \"text/x-sh\", mode: \"shell\", ext: [\"sh\", \"ksh\", \"bash\"], alias: [\"bash\", \"sh\", \"zsh\"], file: /^PKGBUILD$/},\n {name: \"Sieve\", mime: \"application/sieve\", mode: \"sieve\", ext: [\"siv\", \"sieve\"]},\n {name: \"Slim\", mimes: [\"text/x-slim\", \"application/x-slim\"], mode: \"slim\", ext: [\"slim\"]},\n {name: \"Smalltalk\", mime: \"text/x-stsrc\", mode: \"smalltalk\", ext: [\"st\"]},\n {name: \"Smarty\", mime: \"text/x-smarty\", mode: \"smarty\", ext: [\"tpl\"]},\n {name: \"Solr\", mime: \"text/x-solr\", mode: \"solr\"},\n {name: \"Soy\", mime: \"text/x-soy\", mode: \"soy\", ext: [\"soy\"], alias: [\"closure template\"]},\n {name: \"SPARQL\", mime: \"application/sparql-query\", mode: \"sparql\", ext: [\"rq\", \"sparql\"], alias: [\"sparul\"]},\n {name: \"Spreadsheet\", mime: \"text/x-spreadsheet\", mode: \"spreadsheet\", alias: [\"excel\", \"formula\"]},\n {name: \"SQL\", mime: \"text/x-sql\", mode: \"sql\", ext: [\"sql\"]},\n {name: \"Squirrel\", mime: \"text/x-squirrel\", mode: \"clike\", ext: [\"nut\"]},\n {name: \"Swift\", mime: \"text/x-swift\", mode: \"swift\", ext: [\"swift\"]},\n {name: \"sTeX\", mime: \"text/x-stex\", mode: \"stex\"},\n {name: \"LaTeX\", mime: \"text/x-latex\", mode: \"stex\", ext: [\"text\", \"ltx\"], alias: [\"tex\"]},\n {name: \"SystemVerilog\", mime: \"text/x-systemverilog\", mode: \"verilog\", ext: [\"v\"]},\n {name: \"Tcl\", mime: \"text/x-tcl\", mode: \"tcl\", ext: [\"tcl\"]},\n {name: \"Textile\", mime: \"text/x-textile\", mode: \"textile\", ext: [\"textile\"]},\n {name: \"TiddlyWiki \", mime: \"text/x-tiddlywiki\", mode: \"tiddlywiki\"},\n {name: \"Tiki wiki\", mime: \"text/tiki\", mode: \"tiki\"},\n {name: \"TOML\", mime: \"text/x-toml\", mode: \"toml\", ext: [\"toml\"]},\n {name: \"Tornado\", mime: \"text/x-tornado\", mode: \"tornado\"},\n {name: \"troff\", mime: \"text/troff\", mode: \"troff\", ext: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]},\n {name: \"TTCN\", mime: \"text/x-ttcn\", mode: \"ttcn\", ext: [\"ttcn\", \"ttcn3\", \"ttcnpp\"]},\n {name: \"TTCN_CFG\", mime: \"text/x-ttcn-cfg\", mode: \"ttcn-cfg\", ext: [\"cfg\"]},\n {name: \"Turtle\", mime: \"text/turtle\", mode: \"turtle\", ext: [\"ttl\"]},\n {name: \"TypeScript\", mime: \"application/typescript\", mode: \"javascript\", ext: [\"ts\"], alias: [\"ts\"]},\n {name: \"Twig\", mime: \"text/x-twig\", mode: \"twig\"},\n {name: \"VB.NET\", mime: \"text/x-vb\", mode: \"vb\", ext: [\"vb\"]},\n {name: \"VBScript\", mime: \"text/vbscript\", mode: \"vbscript\", ext: [\"vbs\"]},\n {name: \"Velocity\", mime: \"text/velocity\", mode: \"velocity\", ext: [\"vtl\"]},\n {name: \"Verilog\", mime: \"text/x-verilog\", mode: \"verilog\", ext: [\"v\"]},\n {name: \"VHDL\", mime: \"text/x-vhdl\", mode: \"vhdl\", ext: [\"vhd\", \"vhdl\"]},\n {name: \"XML\", mimes: [\"application/xml\", \"text/xml\"], mode: \"xml\", ext: [\"xml\", \"xsl\", \"xsd\"], alias: [\"rss\", \"wsdl\", \"xsd\"]},\n {name: \"XQuery\", mime: \"application/xquery\", mode: \"xquery\", ext: [\"xy\", \"xquery\"]},\n {name: \"YAML\", mime: \"text/x-yaml\", mode: \"yaml\", ext: [\"yaml\", \"yml\"], alias: [\"yml\"]},\n {name: \"Z80\", mime: \"text/x-z80\", mode: \"z80\", ext: [\"z80\"]},\n {name: \"mscgen\", mime: \"text/x-mscgen\", mode: \"mscgen\", ext: [\"mscgen\", \"mscin\", \"msc\"]},\n {name: \"xu\", mime: \"text/x-xu\", mode: \"mscgen\", ext: [\"xu\"]},\n {name: \"msgenny\", mime: \"text/x-msgenny\", mode: \"mscgen\", ext: [\"msgenny\"]}\n ];\n // Ensure all modes have a mime property for backwards compatibility\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mimes) info.mime = info.mimes[0];\n }\n\n CodeMirror.findModeByMIME = function(mime) {\n mime = mime.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.mime == mime) return info;\n if (info.mimes) for (var j = 0; j < info.mimes.length; j++)\n if (info.mimes[j] == mime) return info;\n }\n };\n\n CodeMirror.findModeByExtension = function(ext) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.ext) for (var j = 0; j < info.ext.length; j++)\n if (info.ext[j] == ext) return info;\n }\n };\n\n CodeMirror.findModeByFileName = function(filename) {\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.file && info.file.test(filename)) return info;\n }\n var dot = filename.lastIndexOf(\".\");\n var ext = dot > -1 && filename.substring(dot + 1, filename.length);\n if (ext) return CodeMirror.findModeByExtension(ext);\n };\n\n CodeMirror.findModeByName = function(name) {\n name = name.toLowerCase();\n for (var i = 0; i < CodeMirror.modeInfo.length; i++) {\n var info = CodeMirror.modeInfo[i];\n if (info.name.toLowerCase() == name) return info;\n if (info.alias) for (var j = 0; j < info.alias.length; j++)\n if (info.alias[j].toLowerCase() == name) return info;\n }\n };\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/meta.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.css": {
"text": "span.cm-underlined {\n text-decoration: underline;\n}\nspan.cm-strikethrough {\n text-decoration: line-through;\n}\nspan.cm-brace {\n color: #170;\n font-weight: bold;\n}\nspan.cm-table {\n color: blue;\n font-weight: bold;\n}\n",
"type": "text/css",
"title": "$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.css",
"tags": "[[$:/tags/Stylesheet]]"
},
"$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/***\n |''Name''|tiddlywiki.js|\n |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n |''Author''|PMario|\n |''Version''|0.1.7|\n |''Status''|''stable''|\n |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]|\n |''Documentation''|http://codemirror.tiddlyspace.com/|\n |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n |''CoreVersion''|2.5.0|\n |''Requires''|codemirror.js|\n |''Keywords''|syntax highlighting color code mirror codemirror|\n ! Info\n CoreVersion parameter is needed for TiddlyWiki only!\n***/\n//{{{\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"tiddlywiki\", function () {\n // Tokenizer\n var textwords = {};\n\n var keywords = function () {\n function kw(type) {\n return { type: type, style: \"macro\"};\n }\n return {\n \"allTags\": kw('allTags'), \"closeAll\": kw('closeAll'), \"list\": kw('list'),\n \"newJournal\": kw('newJournal'), \"newTiddler\": kw('newTiddler'),\n \"permaview\": kw('permaview'), \"saveChanges\": kw('saveChanges'),\n \"search\": kw('search'), \"slider\": kw('slider'), \"tabs\": kw('tabs'),\n \"tag\": kw('tag'), \"tagging\": kw('tagging'), \"tags\": kw('tags'),\n \"tiddler\": kw('tiddler'), \"timeline\": kw('timeline'),\n \"today\": kw('today'), \"version\": kw('version'), \"option\": kw('option'),\n\n \"with\": kw('with'),\n \"filter\": kw('filter')\n };\n }();\n\n var isSpaceName = /[\\w_\\-]/i,\n reHR = /^\\-\\-\\-\\-+$/, // <hr>\n reWikiCommentStart = /^\\/\\*\\*\\*$/, // /***\n reWikiCommentStop = /^\\*\\*\\*\\/$/, // ***/\n reBlockQuote = /^<<<$/,\n\n reJsCodeStart = /^\\/\\/\\{\\{\\{$/, // //{{{ js block start\n reJsCodeStop = /^\\/\\/\\}\\}\\}$/, // //}}} js stop\n reXmlCodeStart = /^<!--\\{\\{\\{-->$/, // xml block start\n reXmlCodeStop = /^<!--\\}\\}\\}-->$/, // xml stop\n\n reCodeBlockStart = /^\\{\\{\\{$/, // {{{ TW text div block start\n reCodeBlockStop = /^\\}\\}\\}$/, // }}} TW text stop\n\n reUntilCodeStop = /.*?\\}\\}\\}/;\n\n function chain(stream, state, f) {\n state.tokenize = f;\n return f(stream, state);\n }\n\n function jsTokenBase(stream, state) {\n var sol = stream.sol(), ch;\n\n state.block = false; // indicates the start of a code block.\n\n ch = stream.peek(); // don't eat, to make matching simpler\n\n // check start of blocks\n if (sol && /[<\\/\\*{}\\-]/.test(ch)) {\n if (stream.match(reCodeBlockStart)) {\n state.block = true;\n return chain(stream, state, twTokenCode);\n }\n if (stream.match(reBlockQuote)) {\n return 'quote';\n }\n if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) {\n return 'comment';\n }\n if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) {\n return 'comment';\n }\n if (stream.match(reHR)) {\n return 'hr';\n }\n } // sol\n ch = stream.next();\n\n if (sol && /[\\/\\*!#;:>|]/.test(ch)) {\n if (ch == \"!\") { // tw header\n stream.skipToEnd();\n return \"header\";\n }\n if (ch == \"*\") { // tw list\n stream.eatWhile('*');\n return \"comment\";\n }\n if (ch == \"#\") { // tw numbered list\n stream.eatWhile('#');\n return \"comment\";\n }\n if (ch == \";\") { // definition list, term\n stream.eatWhile(';');\n return \"comment\";\n }\n if (ch == \":\") { // definition list, description\n stream.eatWhile(':');\n return \"comment\";\n }\n if (ch == \">\") { // single line quote\n stream.eatWhile(\">\");\n return \"quote\";\n }\n if (ch == '|') {\n return 'header';\n }\n }\n\n if (ch == '{' && stream.match(/\\{\\{/)) {\n return chain(stream, state, twTokenCode);\n }\n\n // rudimentary html:// file:// link matching. TW knows much more ...\n if (/[hf]/i.test(ch)) {\n if (/[ti]/i.test(stream.peek()) && stream.match(/\\b(ttps?|tp|ile):\\/\\/[\\-A-Z0-9+&@#\\/%?=~_|$!:,.;]*[A-Z0-9+&@#\\/%=~_|$]/i)) {\n return \"link\";\n }\n }\n // just a little string indicator, don't want to have the whole string covered\n if (ch == '\"') {\n return 'string';\n }\n if (ch == '~') { // _no_ CamelCase indicator should be bold\n return 'brace';\n }\n if (/[\\[\\]]/.test(ch)) { // check for [[..]]\n if (stream.peek() == ch) {\n stream.next();\n return 'brace';\n }\n }\n if (ch == \"@\") { // check for space link. TODO fix @@...@@ highlighting\n stream.eatWhile(isSpaceName);\n return \"link\";\n }\n if (/\\d/.test(ch)) { // numbers\n stream.eatWhile(/\\d/);\n return \"number\";\n }\n if (ch == \"/\") { // tw invisible comment\n if (stream.eat(\"%\")) {\n return chain(stream, state, twTokenComment);\n }\n else if (stream.eat(\"/\")) { //\n return chain(stream, state, twTokenEm);\n }\n }\n if (ch == \"_\") { // tw underline\n if (stream.eat(\"_\")) {\n return chain(stream, state, twTokenUnderline);\n }\n }\n // strikethrough and mdash handling\n if (ch == \"-\") {\n if (stream.eat(\"-\")) {\n // if strikethrough looks ugly, change CSS.\n if (stream.peek() != ' ')\n return chain(stream, state, twTokenStrike);\n // mdash\n if (stream.peek() == ' ')\n return 'brace';\n }\n }\n if (ch == \"'\") { // tw bold\n if (stream.eat(\"'\")) {\n return chain(stream, state, twTokenStrong);\n }\n }\n if (ch == \"<\") { // tw macro\n if (stream.eat(\"<\")) {\n return chain(stream, state, twTokenMacro);\n }\n }\n else {\n return null;\n }\n\n // core macro handling\n stream.eatWhile(/[\\w\\$_]/);\n var word = stream.current(),\n known = textwords.propertyIsEnumerable(word) && textwords[word];\n\n return known ? known.style : null;\n } // jsTokenBase()\n\n // tw invisible comment\n function twTokenComment(stream, state) {\n var maybeEnd = false,\n ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = jsTokenBase;\n break;\n }\n maybeEnd = (ch == \"%\");\n }\n return \"comment\";\n }\n\n // tw strong / bold\n function twTokenStrong(stream, state) {\n var maybeEnd = false,\n ch;\n while (ch = stream.next()) {\n if (ch == \"'\" && maybeEnd) {\n state.tokenize = jsTokenBase;\n break;\n }\n maybeEnd = (ch == \"'\");\n }\n return \"strong\";\n }\n\n // tw code\n function twTokenCode(stream, state) {\n var sb = state.block;\n\n if (sb && stream.current()) {\n return \"comment\";\n }\n\n if (!sb && stream.match(reUntilCodeStop)) {\n state.tokenize = jsTokenBase;\n return \"comment\";\n }\n\n if (sb && stream.sol() && stream.match(reCodeBlockStop)) {\n state.tokenize = jsTokenBase;\n return \"comment\";\n }\n\n stream.next();\n return \"comment\";\n }\n\n // tw em / italic\n function twTokenEm(stream, state) {\n var maybeEnd = false,\n ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = jsTokenBase;\n break;\n }\n maybeEnd = (ch == \"/\");\n }\n return \"em\";\n }\n\n // tw underlined text\n function twTokenUnderline(stream, state) {\n var maybeEnd = false,\n ch;\n while (ch = stream.next()) {\n if (ch == \"_\" && maybeEnd) {\n state.tokenize = jsTokenBase;\n break;\n }\n maybeEnd = (ch == \"_\");\n }\n return \"underlined\";\n }\n\n // tw strike through text looks ugly\n // change CSS if needed\n function twTokenStrike(stream, state) {\n var maybeEnd = false, ch;\n\n while (ch = stream.next()) {\n if (ch == \"-\" && maybeEnd) {\n state.tokenize = jsTokenBase;\n break;\n }\n maybeEnd = (ch == \"-\");\n }\n return \"strikethrough\";\n }\n\n // macro\n function twTokenMacro(stream, state) {\n var ch, word, known;\n\n if (stream.current() == '<<') {\n return 'macro';\n }\n\n ch = stream.next();\n if (!ch) {\n state.tokenize = jsTokenBase;\n return null;\n }\n if (ch == \">\") {\n if (stream.peek() == '>') {\n stream.next();\n state.tokenize = jsTokenBase;\n return \"macro\";\n }\n }\n\n stream.eatWhile(/[\\w\\$_]/);\n word = stream.current();\n known = keywords.propertyIsEnumerable(word) && keywords[word];\n\n if (known) {\n return known.style, word;\n }\n else {\n return null, word;\n }\n }\n\n // Interface\n return {\n startState: function () {\n return {\n tokenize: jsTokenBase,\n indented: 0,\n level: 0\n };\n },\n\n token: function (stream, state) {\n if (stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n return style;\n },\n\n electricChars: \"\"\n };\n});\n\nCodeMirror.defineMIME(\"text/x-tiddlywiki\", \"tiddlywiki\");\n});\n\n//}}}\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/tiddlywiki/tiddlywiki.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n };\n }\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName;\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(tagName)) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n if (tagAfter && tagAfter[1]) { // Closing tag spotted\n while (context) {\n if (context.tagName == tagAfter[2]) {\n context = context.prev;\n break;\n } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {\n context = context.prev;\n } else {\n break;\n }\n }\n } else if (tagAfter) { // Opening tag spotted\n while (context) {\n var grabbers = config.contextGrabbers[context.tagName];\n if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n context = context.prev;\n else\n break;\n }\n }\n while (context && context.prev && !context.startOfLine)\n context = context.prev;\n if (context) return context.indent + indentUnit;\n else return state.baseIndent || 0;\n },\n\n electricInput: /<\\/[\\s\\w:]+>$/,\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/keymap/vim.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n/**\n * Supported keybindings:\n * Too many to list. Refer to defaultKeyMap below.\n *\n * Supported Ex commands:\n * Refer to defaultExCommandMap below.\n *\n * Registers: unnamed, -, a-z, A-Z, 0-9\n * (Does not respect the special case for number registers when delete\n * operator is made with these commands: %, (, ), , /, ?, n, N, {, } )\n * TODO: Implement the remaining registers.\n *\n * Marks: a-z, A-Z, and 0-9\n * TODO: Implement the remaining special marks. They have more complex\n * behavior.\n *\n * Events:\n * 'vim-mode-change' - raised on the editor anytime the current mode changes,\n * Event object: {mode: \"visual\", subMode: \"linewise\"}\n *\n * Code structure:\n * 1. Default keymap\n * 2. Variable declarations and short basic helpers\n * 3. Instance (External API) implementation\n * 4. Internal state tracking objects (input state, counter) implementation\n * and instanstiation\n * 5. Key handler (the main command dispatcher) implementation\n * 6. Motion, operator, and action implementations\n * 7. Helper functions for the key handler, motions, operators, and actions\n * 8. Set up Vim to work as a keymap for CodeMirror.\n * 9. Ex command implementations.\n */\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"), require(\"../addon/search/searchcursor\"), require(\"../addon/dialog/dialog\"), require(\"../addon/edit/matchbrackets.js\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\", \"../addon/search/searchcursor\", \"../addon/dialog/dialog\", \"../addon/edit/matchbrackets\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n 'use strict';\n\n var defaultKeymap = [\n // Key to key mapping. This goes first to make it possible to override\n // existing mappings.\n { keys: '<Left>', type: 'keyToKey', toKeys: 'h' },\n { keys: '<Right>', type: 'keyToKey', toKeys: 'l' },\n { keys: '<Up>', type: 'keyToKey', toKeys: 'k' },\n { keys: '<Down>', type: 'keyToKey', toKeys: 'j' },\n { keys: '<Space>', type: 'keyToKey', toKeys: 'l' },\n { keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},\n { keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },\n { keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },\n { keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },\n { keys: '<S-BS>', type: 'keyToKey', toKeys: 'b', context: 'normal' },\n { keys: '<C-n>', type: 'keyToKey', toKeys: 'j' },\n { keys: '<C-p>', type: 'keyToKey', toKeys: 'k' },\n { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>' },\n { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>' },\n { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },\n { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },\n { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },\n { keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual'},\n { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },\n { keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' },\n { keys: '<Home>', type: 'keyToKey', toKeys: '0' },\n { keys: '<End>', type: 'keyToKey', toKeys: '$' },\n { keys: '<PageUp>', type: 'keyToKey', toKeys: '<C-b>' },\n { keys: '<PageDown>', type: 'keyToKey', toKeys: '<C-f>' },\n { keys: '<CR>', type: 'keyToKey', toKeys: 'j^', context: 'normal' },\n // Motions\n { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }},\n { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }},\n { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }},\n { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }},\n { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }},\n { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }},\n { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }},\n { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }},\n { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }},\n { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }},\n { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }},\n { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }},\n { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }},\n { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }},\n { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }},\n { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }},\n { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }},\n { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }},\n { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }},\n { keys: '<C-f>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }},\n { keys: '<C-b>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }},\n { keys: '<C-d>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }},\n { keys: '<C-u>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }},\n { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},\n { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }},\n { keys: '0', type: 'motion', motion: 'moveToStartOfLine' },\n { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' },\n { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }},\n { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }},\n { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }},\n { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }},\n { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }},\n { keys: 'f<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }},\n { keys: 'F<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }},\n { keys: 't<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }},\n { keys: 'T<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }},\n { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }},\n { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }},\n { keys: '\\'<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}},\n { keys: '`<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}},\n { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } },\n { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } },\n { keys: ']\\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } },\n { keys: '[\\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } },\n // the next two aren't motions but must come before more general motion declarations\n { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}},\n { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}},\n { keys: ']<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}},\n { keys: '[<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}},\n { keys: '|', type: 'motion', motion: 'moveToColumn'},\n { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'},\n { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'},\n // Operators\n { keys: 'd', type: 'operator', operator: 'delete' },\n { keys: 'y', type: 'operator', operator: 'yank' },\n { keys: 'c', type: 'operator', operator: 'change' },\n { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }},\n { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }},\n { keys: 'g~', type: 'operator', operator: 'changeCase' },\n { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true },\n { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true },\n { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }},\n { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }},\n // Operator-Motion dual commands\n { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }},\n { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }},\n { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},\n { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'},\n { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},\n { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'},\n { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},\n { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'},\n { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'},\n { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'},\n { keys: '<C-w>', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' },\n // Actions\n { keys: '<C-i>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }},\n { keys: '<C-o>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }},\n { keys: '<C-e>', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }},\n { keys: '<C-y>', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }},\n { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' },\n { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' },\n { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' },\n { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' },\n { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' },\n { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' },\n { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' },\n { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' },\n { keys: 'v', type: 'action', action: 'toggleVisualMode' },\n { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }},\n { keys: '<C-v>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},\n { keys: '<C-q>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},\n { keys: 'gv', type: 'action', action: 'reselectLastSelection' },\n { keys: 'J', type: 'action', action: 'joinLines', isEdit: true },\n { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},\n { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},\n { keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },\n { keys: '@<character>', type: 'action', action: 'replayMacro' },\n { keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' },\n // Handle Replace-mode as a special case of insert mode.\n { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }},\n { keys: 'u', type: 'action', action: 'undo', context: 'normal' },\n { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true },\n { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true },\n { keys: '<C-r>', type: 'action', action: 'redo' },\n { keys: 'm<character>', type: 'action', action: 'setMark' },\n { keys: '\"<character>', type: 'action', action: 'setRegister' },\n { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }},\n { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },\n { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }},\n { keys: 'z<CR>', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },\n { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }},\n { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },\n { keys: '.', type: 'action', action: 'repeatLastEdit' },\n { keys: '<C-a>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}},\n { keys: '<C-x>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}},\n // Text object motions\n { keys: 'a<character>', type: 'motion', motion: 'textObjectManipulation' },\n { keys: 'i<character>', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }},\n // Search\n { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }},\n { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }},\n { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},\n { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},\n { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }},\n { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }},\n // Ex command\n { keys: ':', type: 'ex' }\n ];\n\n /**\n * Ex commands\n * Care must be taken when adding to the default Ex command map. For any\n * pair of commands that have a shared prefix, at least one of their\n * shortNames must not match the prefix of the other command.\n */\n var defaultExCommandMap = [\n { name: 'colorscheme', shortName: 'colo' },\n { name: 'map' },\n { name: 'imap', shortName: 'im' },\n { name: 'nmap', shortName: 'nm' },\n { name: 'vmap', shortName: 'vm' },\n { name: 'unmap' },\n { name: 'write', shortName: 'w' },\n { name: 'undo', shortName: 'u' },\n { name: 'redo', shortName: 'red' },\n { name: 'set', shortName: 'se' },\n { name: 'set', shortName: 'se' },\n { name: 'setlocal', shortName: 'setl' },\n { name: 'setglobal', shortName: 'setg' },\n { name: 'sort', shortName: 'sor' },\n { name: 'substitute', shortName: 's', possiblyAsync: true },\n { name: 'nohlsearch', shortName: 'noh' },\n { name: 'delmarks', shortName: 'delm' },\n { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true },\n { name: 'global', shortName: 'g' }\n ];\n\n var Pos = CodeMirror.Pos;\n\n var Vim = function() {\n function enterVimMode(cm) {\n cm.setOption('disableInput', true);\n cm.setOption('showCursorWhenSelecting', false);\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"normal\"});\n cm.on('cursorActivity', onCursorActivity);\n maybeInitVimState(cm);\n CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));\n }\n\n function leaveVimMode(cm) {\n cm.setOption('disableInput', false);\n cm.off('cursorActivity', onCursorActivity);\n CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));\n cm.state.vim = null;\n }\n\n function detachVimMap(cm, next) {\n if (this == CodeMirror.keyMap.vim)\n CodeMirror.rmClass(cm.getWrapperElement(), \"cm-fat-cursor\");\n\n if (!next || next.attach != attachVimMap)\n leaveVimMode(cm, false);\n }\n function attachVimMap(cm, prev) {\n if (this == CodeMirror.keyMap.vim)\n CodeMirror.addClass(cm.getWrapperElement(), \"cm-fat-cursor\");\n\n if (!prev || prev.attach != attachVimMap)\n enterVimMode(cm);\n }\n\n // Deprecated, simply setting the keymap works again.\n CodeMirror.defineOption('vimMode', false, function(cm, val, prev) {\n if (val && cm.getOption(\"keyMap\") != \"vim\")\n cm.setOption(\"keyMap\", \"vim\");\n else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption(\"keyMap\")))\n cm.setOption(\"keyMap\", \"default\");\n });\n\n function cmKey(key, cm) {\n if (!cm) { return undefined; }\n var vimKey = cmKeyToVimKey(key);\n if (!vimKey) {\n return false;\n }\n var cmd = CodeMirror.Vim.findKey(cm, vimKey);\n if (typeof cmd == 'function') {\n CodeMirror.signal(cm, 'vim-keypress', vimKey);\n }\n return cmd;\n }\n\n var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'};\n var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'};\n function cmKeyToVimKey(key) {\n if (key.charAt(0) == '\\'') {\n // Keypress character binding of format \"'a'\"\n return key.charAt(1);\n }\n var pieces = key.split(/-(?!$)/);\n var lastPiece = pieces[pieces.length - 1];\n if (pieces.length == 1 && pieces[0].length == 1) {\n // No-modifier bindings use literal character bindings above. Skip.\n return false;\n } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) {\n // Ignore Shift+char bindings as they should be handled by literal character.\n return false;\n }\n var hasCharacter = false;\n for (var i = 0; i < pieces.length; i++) {\n var piece = pieces[i];\n if (piece in modifiers) { pieces[i] = modifiers[piece]; }\n else { hasCharacter = true; }\n if (piece in specialKeys) { pieces[i] = specialKeys[piece]; }\n }\n if (!hasCharacter) {\n // Vim does not support modifier only keys.\n return false;\n }\n // TODO: Current bindings expect the character to be lower case, but\n // it looks like vim key notation uses upper case.\n if (isUpperCase(lastPiece)) {\n pieces[pieces.length - 1] = lastPiece.toLowerCase();\n }\n return '<' + pieces.join('-') + '>';\n }\n\n function getOnPasteFn(cm) {\n var vim = cm.state.vim;\n if (!vim.onPasteFn) {\n vim.onPasteFn = function() {\n if (!vim.insertMode) {\n cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));\n actions.enterInsertMode(cm, {}, vim);\n }\n };\n }\n return vim.onPasteFn;\n }\n\n var numberRegex = /[\\d]/;\n var wordCharTest = [CodeMirror.isWordChar, function(ch) {\n return ch && !CodeMirror.isWordChar(ch) && !/\\s/.test(ch);\n }], bigWordCharTest = [function(ch) {\n return /\\S/.test(ch);\n }];\n function makeKeyRange(start, size) {\n var keys = [];\n for (var i = start; i < start + size; i++) {\n keys.push(String.fromCharCode(i));\n }\n return keys;\n }\n var upperCaseAlphabet = makeKeyRange(65, 26);\n var lowerCaseAlphabet = makeKeyRange(97, 26);\n var numbers = makeKeyRange(48, 10);\n var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);\n var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '\"', '.', ':', '/']);\n\n function isLine(cm, line) {\n return line >= cm.firstLine() && line <= cm.lastLine();\n }\n function isLowerCase(k) {\n return (/^[a-z]$/).test(k);\n }\n function isMatchableSymbol(k) {\n return '()[]{}'.indexOf(k) != -1;\n }\n function isNumber(k) {\n return numberRegex.test(k);\n }\n function isUpperCase(k) {\n return (/^[A-Z]$/).test(k);\n }\n function isWhiteSpaceString(k) {\n return (/^\\s*$/).test(k);\n }\n function inArray(val, arr) {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] == val) {\n return true;\n }\n }\n return false;\n }\n\n var options = {};\n function defineOption(name, defaultValue, type, aliases, callback) {\n if (defaultValue === undefined && !callback) {\n throw Error('defaultValue is required unless callback is provided');\n }\n if (!type) { type = 'string'; }\n options[name] = {\n type: type,\n defaultValue: defaultValue,\n callback: callback\n };\n if (aliases) {\n for (var i = 0; i < aliases.length; i++) {\n options[aliases[i]] = options[name];\n }\n }\n if (defaultValue) {\n setOption(name, defaultValue);\n }\n }\n\n function setOption(name, value, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n if (!option) {\n throw Error('Unknown option: ' + name);\n }\n if (option.type == 'boolean') {\n if (value && value !== true) {\n throw Error('Invalid argument: ' + name + '=' + value);\n } else if (value !== false) {\n // Boolean options are set to true if value is not defined.\n value = true;\n }\n }\n if (option.callback) {\n if (scope !== 'local') {\n option.callback(value, undefined);\n }\n if (scope !== 'global' && cm) {\n option.callback(value, cm);\n }\n } else {\n if (scope !== 'local') {\n option.value = option.type == 'boolean' ? !!value : value;\n }\n if (scope !== 'global' && cm) {\n cm.state.vim.options[name] = {value: value};\n }\n }\n }\n\n function getOption(name, cm, cfg) {\n var option = options[name];\n cfg = cfg || {};\n var scope = cfg.scope;\n if (!option) {\n throw Error('Unknown option: ' + name);\n }\n if (option.callback) {\n var local = cm && option.callback(undefined, cm);\n if (scope !== 'global' && local !== undefined) {\n return local;\n }\n if (scope !== 'local') {\n return option.callback();\n }\n return;\n } else {\n var local = (scope !== 'global') && (cm && cm.state.vim.options[name]);\n return (local || (scope !== 'local') && option || {}).value;\n }\n }\n\n defineOption('filetype', undefined, 'string', ['ft'], function(name, cm) {\n // Option is local. Do nothing for global.\n if (cm === undefined) {\n return;\n }\n // The 'filetype' option proxies to the CodeMirror 'mode' option.\n if (name === undefined) {\n var mode = cm.getOption('mode');\n return mode == 'null' ? '' : mode;\n } else {\n var mode = name == '' ? 'null' : name;\n cm.setOption('mode', mode);\n }\n });\n\n var createCircularJumpList = function() {\n var size = 100;\n var pointer = -1;\n var head = 0;\n var tail = 0;\n var buffer = new Array(size);\n function add(cm, oldCur, newCur) {\n var current = pointer % size;\n var curMark = buffer[current];\n function useNextSlot(cursor) {\n var next = ++pointer % size;\n var trashMark = buffer[next];\n if (trashMark) {\n trashMark.clear();\n }\n buffer[next] = cm.setBookmark(cursor);\n }\n if (curMark) {\n var markPos = curMark.find();\n // avoid recording redundant cursor position\n if (markPos && !cursorEqual(markPos, oldCur)) {\n useNextSlot(oldCur);\n }\n } else {\n useNextSlot(oldCur);\n }\n useNextSlot(newCur);\n head = pointer;\n tail = pointer - size + 1;\n if (tail < 0) {\n tail = 0;\n }\n }\n function move(cm, offset) {\n pointer += offset;\n if (pointer > head) {\n pointer = head;\n } else if (pointer < tail) {\n pointer = tail;\n }\n var mark = buffer[(size + pointer) % size];\n // skip marks that are temporarily removed from text buffer\n if (mark && !mark.find()) {\n var inc = offset > 0 ? 1 : -1;\n var newCur;\n var oldCur = cm.getCursor();\n do {\n pointer += inc;\n mark = buffer[(size + pointer) % size];\n // skip marks that are the same as current position\n if (mark &&\n (newCur = mark.find()) &&\n !cursorEqual(oldCur, newCur)) {\n break;\n }\n } while (pointer < head && pointer > tail);\n }\n return mark;\n }\n return {\n cachedCursor: undefined, //used for # and * jumps\n add: add,\n move: move\n };\n };\n\n // Returns an object to track the changes associated insert mode. It\n // clones the object that is passed in, or creates an empty object one if\n // none is provided.\n var createInsertModeChanges = function(c) {\n if (c) {\n // Copy construction\n return {\n changes: c.changes,\n expectCursorActivityForChange: c.expectCursorActivityForChange\n };\n }\n return {\n // Change list\n changes: [],\n // Set to true on change, false on cursorActivity.\n expectCursorActivityForChange: false\n };\n };\n\n function MacroModeState() {\n this.latestRegister = undefined;\n this.isPlaying = false;\n this.isRecording = false;\n this.replaySearchQueries = [];\n this.onRecordingDone = undefined;\n this.lastInsertModeChanges = createInsertModeChanges();\n }\n MacroModeState.prototype = {\n exitMacroRecordMode: function() {\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.onRecordingDone) {\n macroModeState.onRecordingDone(); // close dialog\n }\n macroModeState.onRecordingDone = undefined;\n macroModeState.isRecording = false;\n },\n enterMacroRecordMode: function(cm, registerName) {\n var register =\n vimGlobalState.registerController.getRegister(registerName);\n if (register) {\n register.clear();\n this.latestRegister = registerName;\n if (cm.openDialog) {\n this.onRecordingDone = cm.openDialog(\n '(recording)['+registerName+']', null, {bottom:true});\n }\n this.isRecording = true;\n }\n }\n };\n\n function maybeInitVimState(cm) {\n if (!cm.state.vim) {\n // Store instance state in the CodeMirror object.\n cm.state.vim = {\n inputState: new InputState(),\n // Vim's input state that triggered the last edit, used to repeat\n // motions and operators with '.'.\n lastEditInputState: undefined,\n // Vim's action command before the last edit, used to repeat actions\n // with '.' and insert mode repeat.\n lastEditActionCommand: undefined,\n // When using jk for navigation, if you move from a longer line to a\n // shorter line, the cursor may clip to the end of the shorter line.\n // If j is pressed again and cursor goes to the next line, the\n // cursor should go back to its horizontal position on the longer\n // line if it can. This is to keep track of the horizontal position.\n lastHPos: -1,\n // Doing the same with screen-position for gj/gk\n lastHSPos: -1,\n // The last motion command run. Cleared if a non-motion command gets\n // executed in between.\n lastMotion: null,\n marks: {},\n // Mark for rendering fake cursor for visual mode.\n fakeCursor: null,\n insertMode: false,\n // Repeat count for changes made in insert mode, triggered by key\n // sequences like 3,i. Only exists when insertMode is true.\n insertModeRepeat: undefined,\n visualMode: false,\n // If we are in visual line mode. No effect if visualMode is false.\n visualLine: false,\n visualBlock: false,\n lastSelection: null,\n lastPastedText: null,\n sel: {},\n // Buffer-local/window-local values of vim options.\n options: {}\n };\n }\n return cm.state.vim;\n }\n var vimGlobalState;\n function resetVimGlobalState() {\n vimGlobalState = {\n // The current search query.\n searchQuery: null,\n // Whether we are searching backwards.\n searchIsReversed: false,\n // Replace part of the last substituted pattern\n lastSubstituteReplacePart: undefined,\n jumpList: createCircularJumpList(),\n macroModeState: new MacroModeState,\n // Recording latest f, t, F or T motion command.\n lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''},\n registerController: new RegisterController({}),\n // search history buffer\n searchHistoryController: new HistoryController({}),\n // ex Command history buffer\n exCommandHistoryController : new HistoryController({})\n };\n for (var optionName in options) {\n var option = options[optionName];\n option.value = option.defaultValue;\n }\n }\n\n var lastInsertModeKeyTimer;\n var vimApi= {\n buildKeyMap: function() {\n // TODO: Convert keymap into dictionary format for fast lookup.\n },\n // Testing hook, though it might be useful to expose the register\n // controller anyways.\n getRegisterController: function() {\n return vimGlobalState.registerController;\n },\n // Testing hook.\n resetVimGlobalState_: resetVimGlobalState,\n\n // Testing hook.\n getVimGlobalState_: function() {\n return vimGlobalState;\n },\n\n // Testing hook.\n maybeInitVimState_: maybeInitVimState,\n\n suppressErrorLogging: false,\n\n InsertModeKey: InsertModeKey,\n map: function(lhs, rhs, ctx) {\n // Add user defined key bindings.\n exCommandDispatcher.map(lhs, rhs, ctx);\n },\n unmap: function(lhs, ctx) {\n exCommandDispatcher.unmap(lhs, ctx);\n },\n // TODO: Expose setOption and getOption as instance methods. Need to decide how to namespace\n // them, or somehow make them work with the existing CodeMirror setOption/getOption API.\n setOption: setOption,\n getOption: getOption,\n defineOption: defineOption,\n defineEx: function(name, prefix, func){\n if (!prefix) {\n prefix = name;\n } else if (name.indexOf(prefix) !== 0) {\n throw new Error('(Vim.defineEx) \"'+prefix+'\" is not a prefix of \"'+name+'\", command not registered');\n }\n exCommands[name]=func;\n exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'};\n },\n handleKey: function (cm, key, origin) {\n var command = this.findKey(cm, key, origin);\n if (typeof command === 'function') {\n return command();\n }\n },\n /**\n * This is the outermost function called by CodeMirror, after keys have\n * been mapped to their Vim equivalents.\n *\n * Finds a command based on the key (and cached keys if there is a\n * multi-key sequence). Returns `undefined` if no key is matched, a noop\n * function if a partial match is found (multi-key), and a function to\n * execute the bound command if a a key is matched. The function always\n * returns true.\n */\n findKey: function(cm, key, origin) {\n var vim = maybeInitVimState(cm);\n function handleMacroRecording() {\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.isRecording) {\n if (key == 'q') {\n macroModeState.exitMacroRecordMode();\n clearInputState(cm);\n return true;\n }\n if (origin != 'mapping') {\n logKey(macroModeState, key);\n }\n }\n }\n function handleEsc() {\n if (key == '<Esc>') {\n // Clear input state and get back to normal mode.\n clearInputState(cm);\n if (vim.visualMode) {\n exitVisualMode(cm);\n } else if (vim.insertMode) {\n exitInsertMode(cm);\n }\n return true;\n }\n }\n function doKeyToKey(keys) {\n // TODO: prevent infinite recursion.\n var match;\n while (keys) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. '<Space>'.\n match = (/<\\w+-.+?>|<\\w+>|./).exec(keys);\n key = match[0];\n keys = keys.substring(match.index + key.length);\n CodeMirror.Vim.handleKey(cm, key, 'mapping');\n }\n }\n\n function handleKeyInsertMode() {\n if (handleEsc()) { return true; }\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n var keysAreChars = key.length == 1;\n var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');\n // Need to check all key substrings in insert mode.\n while (keys.length > 1 && match.type != 'full') {\n var keys = vim.inputState.keyBuffer = keys.slice(1);\n var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');\n if (thisMatch.type != 'none') { match = thisMatch; }\n }\n if (match.type == 'none') { clearInputState(cm); return false; }\n else if (match.type == 'partial') {\n if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }\n lastInsertModeKeyTimer = window.setTimeout(\n function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } },\n getOption('insertModeEscKeysTimeout'));\n return !keysAreChars;\n }\n\n if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }\n if (keysAreChars) {\n var here = cm.getCursor();\n cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input');\n }\n clearInputState(cm);\n return match.command;\n }\n\n function handleKeyNonInsertMode() {\n if (handleMacroRecording() || handleEsc()) { return true; };\n\n var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;\n if (/^[1-9]\\d*$/.test(keys)) { return true; }\n\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n if (!keysMatcher) { clearInputState(cm); return false; }\n var context = vim.visualMode ? 'visual' :\n 'normal';\n var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);\n if (match.type == 'none') { clearInputState(cm); return false; }\n else if (match.type == 'partial') { return true; }\n\n vim.inputState.keyBuffer = '';\n var keysMatcher = /^(\\d*)(.*)$/.exec(keys);\n if (keysMatcher[1] && keysMatcher[1] != '0') {\n vim.inputState.pushRepeatDigit(keysMatcher[1]);\n }\n return match.command;\n }\n\n var command;\n if (vim.insertMode) { command = handleKeyInsertMode(); }\n else { command = handleKeyNonInsertMode(); }\n if (command === false) {\n return undefined;\n } else if (command === true) {\n // TODO: Look into using CodeMirror's multi-key handling.\n // Return no-op since we are caching the key. Counts as handled, but\n // don't want act on it just yet.\n return function() {};\n } else {\n return function() {\n return cm.operation(function() {\n cm.curOp.isVimOp = true;\n try {\n if (command.type == 'keyToKey') {\n doKeyToKey(command.toKeys);\n } else {\n commandDispatcher.processCommand(cm, vim, command);\n }\n } catch (e) {\n // clear VIM state in case it's in a bad state.\n cm.state.vim = undefined;\n maybeInitVimState(cm);\n if (!CodeMirror.Vim.suppressErrorLogging) {\n console['log'](e);\n }\n throw e;\n }\n return true;\n });\n };\n }\n },\n handleEx: function(cm, input) {\n exCommandDispatcher.processCommand(cm, input);\n },\n\n defineMotion: defineMotion,\n defineAction: defineAction,\n defineOperator: defineOperator,\n mapCommand: mapCommand,\n _mapCommand: _mapCommand,\n\n defineRegister: defineRegister,\n\n exitVisualMode: exitVisualMode,\n exitInsertMode: exitInsertMode\n };\n\n // Represents the current input state.\n function InputState() {\n this.prefixRepeat = [];\n this.motionRepeat = [];\n\n this.operator = null;\n this.operatorArgs = null;\n this.motion = null;\n this.motionArgs = null;\n this.keyBuffer = []; // For matching multi-key commands.\n this.registerName = null; // Defaults to the unnamed register.\n }\n InputState.prototype.pushRepeatDigit = function(n) {\n if (!this.operator) {\n this.prefixRepeat = this.prefixRepeat.concat(n);\n } else {\n this.motionRepeat = this.motionRepeat.concat(n);\n }\n };\n InputState.prototype.getRepeat = function() {\n var repeat = 0;\n if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {\n repeat = 1;\n if (this.prefixRepeat.length > 0) {\n repeat *= parseInt(this.prefixRepeat.join(''), 10);\n }\n if (this.motionRepeat.length > 0) {\n repeat *= parseInt(this.motionRepeat.join(''), 10);\n }\n }\n return repeat;\n };\n\n function clearInputState(cm, reason) {\n cm.state.vim.inputState = new InputState();\n CodeMirror.signal(cm, 'vim-command-done', reason);\n }\n\n /*\n * Register stores information about copy and paste registers. Besides\n * text, a register must store whether it is linewise (i.e., when it is\n * pasted, should it insert itself into a new line, or should the text be\n * inserted at the cursor position.)\n */\n function Register(text, linewise, blockwise) {\n this.clear();\n this.keyBuffer = [text || ''];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n }\n Register.prototype = {\n setText: function(text, linewise, blockwise) {\n this.keyBuffer = [text || ''];\n this.linewise = !!linewise;\n this.blockwise = !!blockwise;\n },\n pushText: function(text, linewise) {\n // if this register has ever been set to linewise, use linewise.\n if (linewise) {\n if (!this.linewise) {\n this.keyBuffer.push('\\n');\n }\n this.linewise = true;\n }\n this.keyBuffer.push(text);\n },\n pushInsertModeChanges: function(changes) {\n this.insertModeChanges.push(createInsertModeChanges(changes));\n },\n pushSearchQuery: function(query) {\n this.searchQueries.push(query);\n },\n clear: function() {\n this.keyBuffer = [];\n this.insertModeChanges = [];\n this.searchQueries = [];\n this.linewise = false;\n },\n toString: function() {\n return this.keyBuffer.join('');\n }\n };\n\n /**\n * Defines an external register.\n *\n * The name should be a single character that will be used to reference the register.\n * The register should support setText, pushText, clear, and toString(). See Register\n * for a reference implementation.\n */\n function defineRegister(name, register) {\n var registers = vimGlobalState.registerController.registers[name];\n if (!name || name.length != 1) {\n throw Error('Register name must be 1 character');\n }\n if (registers[name]) {\n throw Error('Register already defined ' + name);\n }\n registers[name] = register;\n validRegisters.push(name);\n }\n\n /*\n * vim registers allow you to keep many independent copy and paste buffers.\n * See http://usevim.com/2012/04/13/registers/ for an introduction.\n *\n * RegisterController keeps the state of all the registers. An initial\n * state may be passed in. The unnamed register '\"' will always be\n * overridden.\n */\n function RegisterController(registers) {\n this.registers = registers;\n this.unnamedRegister = registers['\"'] = new Register();\n registers['.'] = new Register();\n registers[':'] = new Register();\n registers['/'] = new Register();\n }\n RegisterController.prototype = {\n pushText: function(registerName, operator, text, linewise, blockwise) {\n if (linewise && text.charAt(0) == '\\n') {\n text = text.slice(1) + '\\n';\n }\n if (linewise && text.charAt(text.length - 1) !== '\\n'){\n text += '\\n';\n }\n // Lowercase and uppercase registers refer to the same register.\n // Uppercase just means append.\n var register = this.isValidRegister(registerName) ?\n this.getRegister(registerName) : null;\n // if no register/an invalid register was specified, things go to the\n // default registers\n if (!register) {\n switch (operator) {\n case 'yank':\n // The 0 register contains the text from the most recent yank.\n this.registers['0'] = new Register(text, linewise, blockwise);\n break;\n case 'delete':\n case 'change':\n if (text.indexOf('\\n') == -1) {\n // Delete less than 1 line. Update the small delete register.\n this.registers['-'] = new Register(text, linewise);\n } else {\n // Shift down the contents of the numbered registers and put the\n // deleted text into register 1.\n this.shiftNumericRegisters_();\n this.registers['1'] = new Register(text, linewise);\n }\n break;\n }\n // Make sure the unnamed register is set to what just happened\n this.unnamedRegister.setText(text, linewise, blockwise);\n return;\n }\n\n // If we've gotten to this point, we've actually specified a register\n var append = isUpperCase(registerName);\n if (append) {\n register.pushText(text, linewise);\n } else {\n register.setText(text, linewise, blockwise);\n }\n // The unnamed register always has the same value as the last used\n // register.\n this.unnamedRegister.setText(register.toString(), linewise);\n },\n // Gets the register named @name. If one of @name doesn't already exist,\n // create it. If @name is invalid, return the unnamedRegister.\n getRegister: function(name) {\n if (!this.isValidRegister(name)) {\n return this.unnamedRegister;\n }\n name = name.toLowerCase();\n if (!this.registers[name]) {\n this.registers[name] = new Register();\n }\n return this.registers[name];\n },\n isValidRegister: function(name) {\n return name && inArray(name, validRegisters);\n },\n shiftNumericRegisters_: function() {\n for (var i = 9; i >= 2; i--) {\n this.registers[i] = this.getRegister('' + (i - 1));\n }\n }\n };\n function HistoryController() {\n this.historyBuffer = [];\n this.iterator;\n this.initialPrefix = null;\n }\n HistoryController.prototype = {\n // the input argument here acts a user entered prefix for a small time\n // until we start autocompletion in which case it is the autocompleted.\n nextMatch: function (input, up) {\n var historyBuffer = this.historyBuffer;\n var dir = up ? -1 : 1;\n if (this.initialPrefix === null) this.initialPrefix = input;\n for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) {\n var element = historyBuffer[i];\n for (var j = 0; j <= element.length; j++) {\n if (this.initialPrefix == element.substring(0, j)) {\n this.iterator = i;\n return element;\n }\n }\n }\n // should return the user input in case we reach the end of buffer.\n if (i >= historyBuffer.length) {\n this.iterator = historyBuffer.length;\n return this.initialPrefix;\n }\n // return the last autocompleted query or exCommand as it is.\n if (i < 0 ) return input;\n },\n pushInput: function(input) {\n var index = this.historyBuffer.indexOf(input);\n if (index > -1) this.historyBuffer.splice(index, 1);\n if (input.length) this.historyBuffer.push(input);\n },\n reset: function() {\n this.initialPrefix = null;\n this.iterator = this.historyBuffer.length;\n }\n };\n var commandDispatcher = {\n matchCommand: function(keys, keyMap, inputState, context) {\n var matches = commandMatches(keys, keyMap, context, inputState);\n if (!matches.full && !matches.partial) {\n return {type: 'none'};\n } else if (!matches.full && matches.partial) {\n return {type: 'partial'};\n }\n\n var bestMatch;\n for (var i = 0; i < matches.full.length; i++) {\n var match = matches.full[i];\n if (!bestMatch) {\n bestMatch = match;\n }\n }\n if (bestMatch.keys.slice(-11) == '<character>') {\n inputState.selectedCharacter = lastChar(keys);\n }\n return {type: 'full', command: bestMatch};\n },\n processCommand: function(cm, vim, command) {\n vim.inputState.repeatOverride = command.repeatOverride;\n switch (command.type) {\n case 'motion':\n this.processMotion(cm, vim, command);\n break;\n case 'operator':\n this.processOperator(cm, vim, command);\n break;\n case 'operatorMotion':\n this.processOperatorMotion(cm, vim, command);\n break;\n case 'action':\n this.processAction(cm, vim, command);\n break;\n case 'search':\n this.processSearch(cm, vim, command);\n break;\n case 'ex':\n case 'keyToEx':\n this.processEx(cm, vim, command);\n break;\n default:\n break;\n }\n },\n processMotion: function(cm, vim, command) {\n vim.inputState.motion = command.motion;\n vim.inputState.motionArgs = copyArgs(command.motionArgs);\n this.evalInput(cm, vim);\n },\n processOperator: function(cm, vim, command) {\n var inputState = vim.inputState;\n if (inputState.operator) {\n if (inputState.operator == command.operator) {\n // Typing an operator twice like 'dd' makes the operator operate\n // linewise\n inputState.motion = 'expandToLine';\n inputState.motionArgs = { linewise: true };\n this.evalInput(cm, vim);\n return;\n } else {\n // 2 different operators in a row doesn't make sense.\n clearInputState(cm);\n }\n }\n inputState.operator = command.operator;\n inputState.operatorArgs = copyArgs(command.operatorArgs);\n if (vim.visualMode) {\n // Operating on a selection in visual mode. We don't need a motion.\n this.evalInput(cm, vim);\n }\n },\n processOperatorMotion: function(cm, vim, command) {\n var visualMode = vim.visualMode;\n var operatorMotionArgs = copyArgs(command.operatorMotionArgs);\n if (operatorMotionArgs) {\n // Operator motions may have special behavior in visual mode.\n if (visualMode && operatorMotionArgs.visualLine) {\n vim.visualLine = true;\n }\n }\n this.processOperator(cm, vim, command);\n if (!visualMode) {\n this.processMotion(cm, vim, command);\n }\n },\n processAction: function(cm, vim, command) {\n var inputState = vim.inputState;\n var repeat = inputState.getRepeat();\n var repeatIsExplicit = !!repeat;\n var actionArgs = copyArgs(command.actionArgs) || {};\n if (inputState.selectedCharacter) {\n actionArgs.selectedCharacter = inputState.selectedCharacter;\n }\n // Actions may or may not have motions and operators. Do these first.\n if (command.operator) {\n this.processOperator(cm, vim, command);\n }\n if (command.motion) {\n this.processMotion(cm, vim, command);\n }\n if (command.motion || command.operator) {\n this.evalInput(cm, vim);\n }\n actionArgs.repeat = repeat || 1;\n actionArgs.repeatIsExplicit = repeatIsExplicit;\n actionArgs.registerName = inputState.registerName;\n clearInputState(cm);\n vim.lastMotion = null;\n if (command.isEdit) {\n this.recordLastEdit(vim, inputState, command);\n }\n actions[command.action](cm, actionArgs, vim);\n },\n processSearch: function(cm, vim, command) {\n if (!cm.getSearchCursor) {\n // Search depends on SearchCursor.\n return;\n }\n var forward = command.searchArgs.forward;\n var wholeWordOnly = command.searchArgs.wholeWordOnly;\n getSearchState(cm).setReversed(!forward);\n var promptPrefix = (forward) ? '/' : '?';\n var originalQuery = getSearchState(cm).getQuery();\n var originalScrollPos = cm.getScrollInfo();\n function handleQuery(query, ignoreCase, smartCase) {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n try {\n updateSearchQuery(cm, query, ignoreCase, smartCase);\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + query);\n clearInputState(cm);\n return;\n }\n commandDispatcher.processMotion(cm, vim, {\n type: 'motion',\n motion: 'findNext',\n motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }\n });\n }\n function onPromptClose(query) {\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n handleQuery(query, true /** ignoreCase */, true /** smartCase */);\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.isRecording) {\n logSearchQuery(macroModeState, query);\n }\n }\n function onPromptKeyUp(e, query, close) {\n var keyName = CodeMirror.keyName(e), up;\n if (keyName == 'Up' || keyName == 'Down') {\n up = keyName == 'Up' ? true : false;\n query = vimGlobalState.searchHistoryController.nextMatch(query, up) || '';\n close(query);\n } else {\n if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')\n vimGlobalState.searchHistoryController.reset();\n }\n var parsedQuery;\n try {\n parsedQuery = updateSearchQuery(cm, query,\n true /** ignoreCase */, true /** smartCase */);\n } catch (e) {\n // Swallow bad regexes for incremental search.\n }\n if (parsedQuery) {\n cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30);\n } else {\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n }\n }\n function onPromptKeyDown(e, query, close) {\n var keyName = CodeMirror.keyName(e);\n if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||\n (keyName == 'Backspace' && query == '')) {\n vimGlobalState.searchHistoryController.pushInput(query);\n vimGlobalState.searchHistoryController.reset();\n updateSearchQuery(cm, originalQuery);\n clearSearchHighlight(cm);\n cm.scrollTo(originalScrollPos.left, originalScrollPos.top);\n CodeMirror.e_stop(e);\n clearInputState(cm);\n close();\n cm.focus();\n } else if (keyName == 'Ctrl-U') {\n // Ctrl-U clears input.\n CodeMirror.e_stop(e);\n close('');\n }\n }\n switch (command.searchArgs.querySrc) {\n case 'prompt':\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.isPlaying) {\n var query = macroModeState.replaySearchQueries.shift();\n handleQuery(query, true /** ignoreCase */, false /** smartCase */);\n } else {\n showPrompt(cm, {\n onClose: onPromptClose,\n prefix: promptPrefix,\n desc: searchPromptDesc,\n onKeyUp: onPromptKeyUp,\n onKeyDown: onPromptKeyDown\n });\n }\n break;\n case 'wordUnderCursor':\n var word = expandWordUnderCursor(cm, false /** inclusive */,\n true /** forward */, false /** bigWord */,\n true /** noSymbol */);\n var isKeyword = true;\n if (!word) {\n word = expandWordUnderCursor(cm, false /** inclusive */,\n true /** forward */, false /** bigWord */,\n false /** noSymbol */);\n isKeyword = false;\n }\n if (!word) {\n return;\n }\n var query = cm.getLine(word.start.line).substring(word.start.ch,\n word.end.ch);\n if (isKeyword && wholeWordOnly) {\n query = '\\\\b' + query + '\\\\b';\n } else {\n query = escapeRegex(query);\n }\n\n // cachedCursor is used to save the old position of the cursor\n // when * or # causes vim to seek for the nearest word and shift\n // the cursor before entering the motion.\n vimGlobalState.jumpList.cachedCursor = cm.getCursor();\n cm.setCursor(word.start);\n\n handleQuery(query, true /** ignoreCase */, false /** smartCase */);\n break;\n }\n },\n processEx: function(cm, vim, command) {\n function onPromptClose(input) {\n // Give the prompt some time to close so that if processCommand shows\n // an error, the elements don't overlap.\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n exCommandDispatcher.processCommand(cm, input);\n }\n function onPromptKeyDown(e, input, close) {\n var keyName = CodeMirror.keyName(e), up;\n if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||\n (keyName == 'Backspace' && input == '')) {\n vimGlobalState.exCommandHistoryController.pushInput(input);\n vimGlobalState.exCommandHistoryController.reset();\n CodeMirror.e_stop(e);\n clearInputState(cm);\n close();\n cm.focus();\n }\n if (keyName == 'Up' || keyName == 'Down') {\n up = keyName == 'Up' ? true : false;\n input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || '';\n close(input);\n } else if (keyName == 'Ctrl-U') {\n // Ctrl-U clears input.\n CodeMirror.e_stop(e);\n close('');\n } else {\n if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')\n vimGlobalState.exCommandHistoryController.reset();\n }\n }\n if (command.type == 'keyToEx') {\n // Handle user defined Ex to Ex mappings\n exCommandDispatcher.processCommand(cm, command.exArgs.input);\n } else {\n if (vim.visualMode) {\n showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\\'<,\\'>',\n onKeyDown: onPromptKeyDown});\n } else {\n showPrompt(cm, { onClose: onPromptClose, prefix: ':',\n onKeyDown: onPromptKeyDown});\n }\n }\n },\n evalInput: function(cm, vim) {\n // If the motion comand is set, execute both the operator and motion.\n // Otherwise return.\n var inputState = vim.inputState;\n var motion = inputState.motion;\n var motionArgs = inputState.motionArgs || {};\n var operator = inputState.operator;\n var operatorArgs = inputState.operatorArgs || {};\n var registerName = inputState.registerName;\n var sel = vim.sel;\n // TODO: Make sure cm and vim selections are identical outside visual mode.\n var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head): cm.getCursor('head'));\n var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor'));\n var oldHead = copyCursor(origHead);\n var oldAnchor = copyCursor(origAnchor);\n var newHead, newAnchor;\n var repeat;\n if (operator) {\n this.recordLastEdit(vim, inputState);\n }\n if (inputState.repeatOverride !== undefined) {\n // If repeatOverride is specified, that takes precedence over the\n // input state's repeat. Used by Ex mode and can be user defined.\n repeat = inputState.repeatOverride;\n } else {\n repeat = inputState.getRepeat();\n }\n if (repeat > 0 && motionArgs.explicitRepeat) {\n motionArgs.repeatIsExplicit = true;\n } else if (motionArgs.noRepeat ||\n (!motionArgs.explicitRepeat && repeat === 0)) {\n repeat = 1;\n motionArgs.repeatIsExplicit = false;\n }\n if (inputState.selectedCharacter) {\n // If there is a character input, stick it in all of the arg arrays.\n motionArgs.selectedCharacter = operatorArgs.selectedCharacter =\n inputState.selectedCharacter;\n }\n motionArgs.repeat = repeat;\n clearInputState(cm);\n if (motion) {\n var motionResult = motions[motion](cm, origHead, motionArgs, vim);\n vim.lastMotion = motions[motion];\n if (!motionResult) {\n return;\n }\n if (motionArgs.toJumplist) {\n var jumpList = vimGlobalState.jumpList;\n // if the current motion is # or *, use cachedCursor\n var cachedCursor = jumpList.cachedCursor;\n if (cachedCursor) {\n recordJumpPosition(cm, cachedCursor, motionResult);\n delete jumpList.cachedCursor;\n } else {\n recordJumpPosition(cm, origHead, motionResult);\n }\n }\n if (motionResult instanceof Array) {\n newAnchor = motionResult[0];\n newHead = motionResult[1];\n } else {\n newHead = motionResult;\n }\n // TODO: Handle null returns from motion commands better.\n if (!newHead) {\n newHead = copyCursor(origHead);\n }\n if (vim.visualMode) {\n if (!(vim.visualBlock && newHead.ch === Infinity)) {\n newHead = clipCursorToContent(cm, newHead, vim.visualBlock);\n }\n if (newAnchor) {\n newAnchor = clipCursorToContent(cm, newAnchor, true);\n }\n newAnchor = newAnchor || oldAnchor;\n sel.anchor = newAnchor;\n sel.head = newHead;\n updateCmSelection(cm);\n updateMark(cm, vim, '<',\n cursorIsBefore(newAnchor, newHead) ? newAnchor\n : newHead);\n updateMark(cm, vim, '>',\n cursorIsBefore(newAnchor, newHead) ? newHead\n : newAnchor);\n } else if (!operator) {\n newHead = clipCursorToContent(cm, newHead);\n cm.setCursor(newHead.line, newHead.ch);\n }\n }\n if (operator) {\n if (operatorArgs.lastSel) {\n // Replaying a visual mode operation\n newAnchor = oldAnchor;\n var lastSel = operatorArgs.lastSel;\n var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);\n var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);\n if (lastSel.visualLine) {\n // Linewise Visual mode: The same number of lines.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n } else if (lastSel.visualBlock) {\n // Blockwise Visual mode: The same number of lines and columns.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);\n } else if (lastSel.head.line == lastSel.anchor.line) {\n // Normal Visual mode within one line: The same number of characters.\n newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset);\n } else {\n // Normal Visual mode with several lines: The same number of lines, in the\n // last line the same number of characters as in the last line the last time.\n newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);\n }\n vim.visualMode = true;\n vim.visualLine = lastSel.visualLine;\n vim.visualBlock = lastSel.visualBlock;\n sel = vim.sel = {\n anchor: newAnchor,\n head: newHead\n };\n updateCmSelection(cm);\n } else if (vim.visualMode) {\n operatorArgs.lastSel = {\n anchor: copyCursor(sel.anchor),\n head: copyCursor(sel.head),\n visualBlock: vim.visualBlock,\n visualLine: vim.visualLine\n };\n }\n var curStart, curEnd, linewise, mode;\n var cmSel;\n if (vim.visualMode) {\n // Init visual op\n curStart = cursorMin(sel.head, sel.anchor);\n curEnd = cursorMax(sel.head, sel.anchor);\n linewise = vim.visualLine || operatorArgs.linewise;\n mode = vim.visualBlock ? 'block' :\n linewise ? 'line' :\n 'char';\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode);\n if (linewise) {\n var ranges = cmSel.ranges;\n if (mode == 'block') {\n // Linewise operators in visual block mode extend to end of line\n for (var i = 0; i < ranges.length; i++) {\n ranges[i].head.ch = lineLength(cm, ranges[i].head.line);\n }\n } else if (mode == 'line') {\n ranges[0].head = Pos(ranges[0].head.line + 1, 0);\n }\n }\n } else {\n // Init motion op\n curStart = copyCursor(newAnchor || oldAnchor);\n curEnd = copyCursor(newHead || oldHead);\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curStart;\n curStart = curEnd;\n curEnd = tmp;\n }\n linewise = motionArgs.linewise || operatorArgs.linewise;\n if (linewise) {\n // Expand selection to entire line.\n expandSelectionToLine(cm, curStart, curEnd);\n } else if (motionArgs.forward) {\n // Clip to trailing newlines only if the motion goes forward.\n clipToLine(cm, curStart, curEnd);\n }\n mode = 'char';\n var exclusive = !motionArgs.inclusive || linewise;\n cmSel = makeCmSelection(cm, {\n anchor: curStart,\n head: curEnd\n }, mode, exclusive);\n }\n cm.setSelections(cmSel.ranges, cmSel.primary);\n vim.lastMotion = null;\n operatorArgs.repeat = repeat; // For indent in visual mode.\n operatorArgs.registerName = registerName;\n // Keep track of linewise as it affects how paste and change behave.\n operatorArgs.linewise = linewise;\n var operatorMoveTo = operators[operator](\n cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);\n if (vim.visualMode) {\n exitVisualMode(cm, operatorMoveTo != null);\n }\n if (operatorMoveTo) {\n cm.setCursor(operatorMoveTo);\n }\n }\n },\n recordLastEdit: function(vim, inputState, actionCommand) {\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.isPlaying) { return; }\n vim.lastEditInputState = inputState;\n vim.lastEditActionCommand = actionCommand;\n macroModeState.lastInsertModeChanges.changes = [];\n macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;\n }\n };\n\n /**\n * typedef {Object{line:number,ch:number}} Cursor An object containing the\n * position of the cursor.\n */\n // All of the functions below return Cursor objects.\n var motions = {\n moveToTopLine: function(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).top + motionArgs.repeat -1;\n return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n moveToMiddleLine: function(cm) {\n var range = getUserVisibleLines(cm);\n var line = Math.floor((range.top + range.bottom) * 0.5);\n return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n moveToBottomLine: function(cm, _head, motionArgs) {\n var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1;\n return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));\n },\n expandToLine: function(_cm, head, motionArgs) {\n // Expands forward to end of line, and then to next line if repeat is\n // >1. Does not handle backward motion!\n var cur = head;\n return Pos(cur.line + motionArgs.repeat - 1, Infinity);\n },\n findNext: function(cm, _head, motionArgs) {\n var state = getSearchState(cm);\n var query = state.getQuery();\n if (!query) {\n return;\n }\n var prev = !motionArgs.forward;\n // If search is initiated with ? instead of /, negate direction.\n prev = (state.isReversed()) ? !prev : prev;\n highlightSearchMatches(cm, query);\n return findNext(cm, prev/** prev */, query, motionArgs.repeat);\n },\n goToMark: function(cm, _head, motionArgs, vim) {\n var mark = vim.marks[motionArgs.selectedCharacter];\n if (mark) {\n var pos = mark.find();\n return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos;\n }\n return null;\n },\n moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) {\n if (vim.visualBlock && motionArgs.sameLine) {\n var sel = vim.sel;\n return [\n clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)),\n clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch))\n ];\n } else {\n return ([vim.sel.head, vim.sel.anchor]);\n }\n },\n jumpToMark: function(cm, head, motionArgs, vim) {\n var best = head;\n for (var i = 0; i < motionArgs.repeat; i++) {\n var cursor = best;\n for (var key in vim.marks) {\n if (!isLowerCase(key)) {\n continue;\n }\n var mark = vim.marks[key].find();\n var isWrongDirection = (motionArgs.forward) ?\n cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);\n\n if (isWrongDirection) {\n continue;\n }\n if (motionArgs.linewise && (mark.line == cursor.line)) {\n continue;\n }\n\n var equal = cursorEqual(cursor, best);\n var between = (motionArgs.forward) ?\n cursorIsBetween(cursor, mark, best) :\n cursorIsBetween(best, mark, cursor);\n\n if (equal || between) {\n best = mark;\n }\n }\n }\n\n if (motionArgs.linewise) {\n // Vim places the cursor on the first non-whitespace character of\n // the line if there is one, else it places the cursor at the end\n // of the line, regardless of whether a mark was found.\n best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)));\n }\n return best;\n },\n moveByCharacters: function(_cm, head, motionArgs) {\n var cur = head;\n var repeat = motionArgs.repeat;\n var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;\n return Pos(cur.line, ch);\n },\n moveByLines: function(cm, head, motionArgs, vim) {\n var cur = head;\n var endCh = cur.ch;\n // Depending what our last motion was, we may want to do different\n // things. If our last motion was moving vertically, we want to\n // preserve the HPos from our last horizontal move. If our last motion\n // was going to the end of a line, moving vertically we should go to\n // the end of the line, etc.\n switch (vim.lastMotion) {\n case this.moveByLines:\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveToColumn:\n case this.moveToEol:\n endCh = vim.lastHPos;\n break;\n default:\n vim.lastHPos = endCh;\n }\n var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0);\n var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;\n var first = cm.firstLine();\n var last = cm.lastLine();\n // Vim go to line begin or line end when cursor at first/last line and\n // move to previous/next line is triggered.\n if (line < first && cur.line == first){\n return this.moveToStartOfLine(cm, head, motionArgs, vim);\n }else if (line > last && cur.line == last){\n return this.moveToEol(cm, head, motionArgs, vim);\n }\n if (motionArgs.toFirstChar){\n endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));\n vim.lastHPos = endCh;\n }\n vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left;\n return Pos(line, endCh);\n },\n moveByDisplayLines: function(cm, head, motionArgs, vim) {\n var cur = head;\n switch (vim.lastMotion) {\n case this.moveByDisplayLines:\n case this.moveByScroll:\n case this.moveByLines:\n case this.moveToColumn:\n case this.moveToEol:\n break;\n default:\n vim.lastHSPos = cm.charCoords(cur,'div').left;\n }\n var repeat = motionArgs.repeat;\n var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos);\n if (res.hitSide) {\n if (motionArgs.forward) {\n var lastCharCoords = cm.charCoords(res, 'div');\n var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos };\n var res = cm.coordsChar(goalCoords, 'div');\n } else {\n var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div');\n resCoords.left = vim.lastHSPos;\n res = cm.coordsChar(resCoords, 'div');\n }\n }\n vim.lastHPos = res.ch;\n return res;\n },\n moveByPage: function(cm, head, motionArgs) {\n // CodeMirror only exposes functions that move the cursor page down, so\n // doing this bad hack to move the cursor and move it back. evalInput\n // will move the cursor to where it should be in the end.\n var curStart = head;\n var repeat = motionArgs.repeat;\n return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page');\n },\n moveByParagraph: function(cm, head, motionArgs) {\n var dir = motionArgs.forward ? 1 : -1;\n return findParagraph(cm, head, motionArgs.repeat, dir);\n },\n moveByScroll: function(cm, head, motionArgs, vim) {\n var scrollbox = cm.getScrollInfo();\n var curEnd = null;\n var repeat = motionArgs.repeat;\n if (!repeat) {\n repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());\n }\n var orig = cm.charCoords(head, 'local');\n motionArgs.repeat = repeat;\n var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);\n if (!curEnd) {\n return null;\n }\n var dest = cm.charCoords(curEnd, 'local');\n cm.scrollTo(null, scrollbox.top + dest.top - orig.top);\n return curEnd;\n },\n moveByWords: function(cm, head, motionArgs) {\n return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward,\n !!motionArgs.wordEnd, !!motionArgs.bigWord);\n },\n moveTillCharacter: function(cm, _head, motionArgs) {\n var repeat = motionArgs.repeat;\n var curEnd = moveToCharacter(cm, repeat, motionArgs.forward,\n motionArgs.selectedCharacter);\n var increment = motionArgs.forward ? -1 : 1;\n recordLastCharacterSearch(increment, motionArgs);\n if (!curEnd) return null;\n curEnd.ch += increment;\n return curEnd;\n },\n moveToCharacter: function(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n recordLastCharacterSearch(0, motionArgs);\n return moveToCharacter(cm, repeat, motionArgs.forward,\n motionArgs.selectedCharacter) || head;\n },\n moveToSymbol: function(cm, head, motionArgs) {\n var repeat = motionArgs.repeat;\n return findSymbol(cm, repeat, motionArgs.forward,\n motionArgs.selectedCharacter) || head;\n },\n moveToColumn: function(cm, head, motionArgs, vim) {\n var repeat = motionArgs.repeat;\n // repeat is equivalent to which column we want to move to!\n vim.lastHPos = repeat - 1;\n vim.lastHSPos = cm.charCoords(head,'div').left;\n return moveToColumn(cm, repeat);\n },\n moveToEol: function(cm, head, motionArgs, vim) {\n var cur = head;\n vim.lastHPos = Infinity;\n var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity);\n var end=cm.clipPos(retval);\n end.ch--;\n vim.lastHSPos = cm.charCoords(end,'div').left;\n return retval;\n },\n moveToFirstNonWhiteSpaceCharacter: function(cm, head) {\n // Go to the start of the line where the text begins, or the end for\n // whitespace-only lines\n var cursor = head;\n return Pos(cursor.line,\n findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)));\n },\n moveToMatchedSymbol: function(cm, head) {\n var cursor = head;\n var line = cursor.line;\n var ch = cursor.ch;\n var lineText = cm.getLine(line);\n var symbol;\n do {\n symbol = lineText.charAt(ch++);\n if (symbol && isMatchableSymbol(symbol)) {\n var style = cm.getTokenTypeAt(Pos(line, ch));\n if (style !== \"string\" && style !== \"comment\") {\n break;\n }\n }\n } while (symbol);\n if (symbol) {\n var matched = cm.findMatchingBracket(Pos(line, ch));\n return matched.to;\n } else {\n return cursor;\n }\n },\n moveToStartOfLine: function(_cm, head) {\n return Pos(head.line, 0);\n },\n moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) {\n var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();\n if (motionArgs.repeatIsExplicit) {\n lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');\n }\n return Pos(lineNum,\n findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)));\n },\n textObjectManipulation: function(cm, head, motionArgs, vim) {\n // TODO: lots of possible exceptions that can be thrown here. Try da(\n // outside of a () block.\n\n // TODO: adding <> >< to this map doesn't work, presumably because\n // they're operators\n var mirroredPairs = {'(': ')', ')': '(',\n '{': '}', '}': '{',\n '[': ']', ']': '['};\n var selfPaired = {'\\'': true, '\"': true};\n\n var character = motionArgs.selectedCharacter;\n // 'b' refers to '()' block.\n // 'B' refers to '{}' block.\n if (character == 'b') {\n character = '(';\n } else if (character == 'B') {\n character = '{';\n }\n\n // Inclusive is the difference between a and i\n // TODO: Instead of using the additional text object map to perform text\n // object operations, merge the map into the defaultKeyMap and use\n // motionArgs to define behavior. Define separate entries for 'aw',\n // 'iw', 'a[', 'i[', etc.\n var inclusive = !motionArgs.textObjectInner;\n\n var tmp;\n if (mirroredPairs[character]) {\n tmp = selectCompanionObject(cm, head, character, inclusive);\n } else if (selfPaired[character]) {\n tmp = findBeginningAndEnd(cm, head, character, inclusive);\n } else if (character === 'W') {\n tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,\n true /** bigWord */);\n } else if (character === 'w') {\n tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,\n false /** bigWord */);\n } else if (character === 'p') {\n tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);\n motionArgs.linewise = true;\n if (vim.visualMode) {\n if (!vim.visualLine) { vim.visualLine = true; }\n } else {\n var operatorArgs = vim.inputState.operatorArgs;\n if (operatorArgs) { operatorArgs.linewise = true; }\n tmp.end.line--;\n }\n } else {\n // No text object defined for this, don't move.\n return null;\n }\n\n if (!cm.state.vim.visualMode) {\n return [tmp.start, tmp.end];\n } else {\n return expandSelection(cm, tmp.start, tmp.end);\n }\n },\n\n repeatLastCharacterSearch: function(cm, head, motionArgs) {\n var lastSearch = vimGlobalState.lastChararacterSearch;\n var repeat = motionArgs.repeat;\n var forward = motionArgs.forward === lastSearch.forward;\n var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);\n cm.moveH(-increment, 'char');\n motionArgs.inclusive = forward ? true : false;\n var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);\n if (!curEnd) {\n cm.moveH(increment, 'char');\n return head;\n }\n curEnd.ch += increment;\n return curEnd;\n }\n };\n\n function defineMotion(name, fn) {\n motions[name] = fn;\n }\n\n function fillArray(val, times) {\n var arr = [];\n for (var i = 0; i < times; i++) {\n arr.push(val);\n }\n return arr;\n }\n /**\n * An operator acts on a text selection. It receives the list of selections\n * as input. The corresponding CodeMirror selection is guaranteed to\n * match the input selection.\n */\n var operators = {\n change: function(cm, args, ranges) {\n var finalHead, text;\n var vim = cm.state.vim;\n vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock;\n if (!vim.visualMode) {\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n text = cm.getRange(anchor, head);\n var lastState = vim.lastEditInputState || {};\n if (lastState.motion == \"moveByWords\" && !isWhiteSpaceString(text)) {\n // Exclude trailing whitespace if the range is not all whitespace.\n var match = (/\\s+$/).exec(text);\n if (match && lastState.motionArgs && lastState.motionArgs.forward) {\n head = offsetCursor(head, 0, - match[0].length);\n text = text.slice(0, - match[0].length);\n }\n }\n var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE);\n var wasLastLine = cm.firstLine() == cm.lastLine();\n if (head.line > cm.lastLine() && args.linewise && !wasLastLine) {\n cm.replaceRange('', prevLineEnd, head);\n } else {\n cm.replaceRange('', anchor, head);\n }\n if (args.linewise) {\n // Push the next line back down, if there is a next line.\n if (!wasLastLine) {\n cm.setCursor(prevLineEnd);\n CodeMirror.commands.newlineAndIndent(cm);\n }\n // make sure cursor ends up at the end of the line.\n anchor.ch = Number.MAX_VALUE;\n }\n finalHead = anchor;\n } else {\n text = cm.getSelection();\n var replacement = fillArray('', ranges.length);\n cm.replaceSelections(replacement);\n finalHead = cursorMin(ranges[0].head, ranges[0].anchor);\n }\n vimGlobalState.registerController.pushText(\n args.registerName, 'change', text,\n args.linewise, ranges.length > 1);\n actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim);\n },\n // delete is a javascript keyword.\n 'delete': function(cm, args, ranges) {\n var finalHead, text;\n var vim = cm.state.vim;\n if (!vim.visualBlock) {\n var anchor = ranges[0].anchor,\n head = ranges[0].head;\n if (args.linewise &&\n head.line != cm.firstLine() &&\n anchor.line == cm.lastLine() &&\n anchor.line == head.line - 1) {\n // Special case for dd on last line (and first line).\n if (anchor.line == cm.firstLine()) {\n anchor.ch = 0;\n } else {\n anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));\n }\n }\n text = cm.getRange(anchor, head);\n cm.replaceRange('', anchor, head);\n finalHead = anchor;\n if (args.linewise) {\n finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);\n }\n } else {\n text = cm.getSelection();\n var replacement = fillArray('', ranges.length);\n cm.replaceSelections(replacement);\n finalHead = ranges[0].anchor;\n }\n vimGlobalState.registerController.pushText(\n args.registerName, 'delete', text,\n args.linewise, vim.visualBlock);\n return clipCursorToContent(cm, finalHead);\n },\n indent: function(cm, args, ranges) {\n var vim = cm.state.vim;\n var startLine = ranges[0].anchor.line;\n var endLine = vim.visualBlock ?\n ranges[ranges.length - 1].anchor.line :\n ranges[0].head.line;\n // In visual mode, n> shifts the selection right n times, instead of\n // shifting n lines right once.\n var repeat = (vim.visualMode) ? args.repeat : 1;\n if (args.linewise) {\n // The only way to delete a newline is to delete until the start of\n // the next line, so in linewise mode evalInput will include the next\n // line. We don't want this in indent, so we go back a line.\n endLine--;\n }\n for (var i = startLine; i <= endLine; i++) {\n for (var j = 0; j < repeat; j++) {\n cm.indentLine(i, args.indentRight);\n }\n }\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);\n },\n changeCase: function(cm, args, ranges, oldAnchor, newHead) {\n var selections = cm.getSelections();\n var swapped = [];\n var toLower = args.toLower;\n for (var j = 0; j < selections.length; j++) {\n var toSwap = selections[j];\n var text = '';\n if (toLower === true) {\n text = toSwap.toLowerCase();\n } else if (toLower === false) {\n text = toSwap.toUpperCase();\n } else {\n for (var i = 0; i < toSwap.length; i++) {\n var character = toSwap.charAt(i);\n text += isUpperCase(character) ? character.toLowerCase() :\n character.toUpperCase();\n }\n }\n swapped.push(text);\n }\n cm.replaceSelections(swapped);\n if (args.shouldMoveCursor){\n return newHead;\n } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {\n return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);\n } else if (args.linewise){\n return oldAnchor;\n } else {\n return cursorMin(ranges[0].anchor, ranges[0].head);\n }\n },\n yank: function(cm, args, ranges, oldAnchor) {\n var vim = cm.state.vim;\n var text = cm.getSelection();\n var endPos = vim.visualMode\n ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor)\n : oldAnchor;\n vimGlobalState.registerController.pushText(\n args.registerName, 'yank',\n text, args.linewise, vim.visualBlock);\n return endPos;\n }\n };\n\n function defineOperator(name, fn) {\n operators[name] = fn;\n }\n\n var actions = {\n jumpListWalk: function(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n var repeat = actionArgs.repeat;\n var forward = actionArgs.forward;\n var jumpList = vimGlobalState.jumpList;\n\n var mark = jumpList.move(cm, forward ? repeat : -repeat);\n var markPos = mark ? mark.find() : undefined;\n markPos = markPos ? markPos : cm.getCursor();\n cm.setCursor(markPos);\n },\n scroll: function(cm, actionArgs, vim) {\n if (vim.visualMode) {\n return;\n }\n var repeat = actionArgs.repeat || 1;\n var lineHeight = cm.defaultTextHeight();\n var top = cm.getScrollInfo().top;\n var delta = lineHeight * repeat;\n var newPos = actionArgs.forward ? top + delta : top - delta;\n var cursor = copyCursor(cm.getCursor());\n var cursorCoords = cm.charCoords(cursor, 'local');\n if (actionArgs.forward) {\n if (newPos > cursorCoords.top) {\n cursor.line += (newPos - cursorCoords.top) / lineHeight;\n cursor.line = Math.ceil(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, 'local');\n cm.scrollTo(null, cursorCoords.top);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n } else {\n var newBottom = newPos + cm.getScrollInfo().clientHeight;\n if (newBottom < cursorCoords.bottom) {\n cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;\n cursor.line = Math.floor(cursor.line);\n cm.setCursor(cursor);\n cursorCoords = cm.charCoords(cursor, 'local');\n cm.scrollTo(\n null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);\n } else {\n // Cursor stays within bounds. Just reposition the scroll window.\n cm.scrollTo(null, newPos);\n }\n }\n },\n scrollToCursor: function(cm, actionArgs) {\n var lineNum = cm.getCursor().line;\n var charCoords = cm.charCoords(Pos(lineNum, 0), 'local');\n var height = cm.getScrollInfo().clientHeight;\n var y = charCoords.top;\n var lineHeight = charCoords.bottom - y;\n switch (actionArgs.position) {\n case 'center': y = y - (height / 2) + lineHeight;\n break;\n case 'bottom': y = y - height + lineHeight;\n break;\n }\n cm.scrollTo(null, y);\n },\n replayMacro: function(cm, actionArgs, vim) {\n var registerName = actionArgs.selectedCharacter;\n var repeat = actionArgs.repeat;\n var macroModeState = vimGlobalState.macroModeState;\n if (registerName == '@') {\n registerName = macroModeState.latestRegister;\n }\n while(repeat--){\n executeMacroRegister(cm, vim, macroModeState, registerName);\n }\n },\n enterMacroRecordMode: function(cm, actionArgs) {\n var macroModeState = vimGlobalState.macroModeState;\n var registerName = actionArgs.selectedCharacter;\n macroModeState.enterMacroRecordMode(cm, registerName);\n },\n enterInsertMode: function(cm, actionArgs, vim) {\n if (cm.getOption('readOnly')) { return; }\n vim.insertMode = true;\n vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;\n var insertAt = (actionArgs) ? actionArgs.insertAt : null;\n var sel = vim.sel;\n var head = actionArgs.head || cm.getCursor('head');\n var height = cm.listSelections().length;\n if (insertAt == 'eol') {\n head = Pos(head.line, lineLength(cm, head.line));\n } else if (insertAt == 'charAfter') {\n head = offsetCursor(head, 0, 1);\n } else if (insertAt == 'firstNonBlank') {\n head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);\n } else if (insertAt == 'startOfSelectedArea') {\n if (!vim.visualBlock) {\n if (sel.head.line < sel.anchor.line) {\n head = sel.head;\n } else {\n head = Pos(sel.anchor.line, 0);\n }\n } else {\n head = Pos(\n Math.min(sel.head.line, sel.anchor.line),\n Math.min(sel.head.ch, sel.anchor.ch));\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == 'endOfSelectedArea') {\n if (!vim.visualBlock) {\n if (sel.head.line >= sel.anchor.line) {\n head = offsetCursor(sel.head, 0, 1);\n } else {\n head = Pos(sel.anchor.line, 0);\n }\n } else {\n head = Pos(\n Math.min(sel.head.line, sel.anchor.line),\n Math.max(sel.head.ch + 1, sel.anchor.ch));\n height = Math.abs(sel.head.line - sel.anchor.line) + 1;\n }\n } else if (insertAt == 'inplace') {\n if (vim.visualMode){\n return;\n }\n }\n cm.setOption('keyMap', 'vim-insert');\n cm.setOption('disableInput', false);\n if (actionArgs && actionArgs.replace) {\n // Handle Replace-mode as a special case of insert mode.\n cm.toggleOverwrite(true);\n cm.setOption('keyMap', 'vim-replace');\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"replace\"});\n } else {\n cm.setOption('keyMap', 'vim-insert');\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"insert\"});\n }\n if (!vimGlobalState.macroModeState.isPlaying) {\n // Only record if not replaying.\n cm.on('change', onChange);\n CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);\n }\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n selectForInsert(cm, head, height);\n },\n toggleVisualMode: function(cm, actionArgs, vim) {\n var repeat = actionArgs.repeat;\n var anchor = cm.getCursor();\n var head;\n // TODO: The repeat should actually select number of characters/lines\n // equal to the repeat times the size of the previous visual\n // operation.\n if (!vim.visualMode) {\n // Entering visual mode\n vim.visualMode = true;\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n head = clipCursorToContent(\n cm, Pos(anchor.line, anchor.ch + repeat - 1),\n true /** includeLineBreak */);\n vim.sel = {\n anchor: anchor,\n head: head\n };\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"visual\", subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"});\n updateCmSelection(cm);\n updateMark(cm, vim, '<', cursorMin(anchor, head));\n updateMark(cm, vim, '>', cursorMax(anchor, head));\n } else if (vim.visualLine ^ actionArgs.linewise ||\n vim.visualBlock ^ actionArgs.blockwise) {\n // Toggling between modes\n vim.visualLine = !!actionArgs.linewise;\n vim.visualBlock = !!actionArgs.blockwise;\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"visual\", subMode: vim.visualLine ? \"linewise\" : vim.visualBlock ? \"blockwise\" : \"\"});\n updateCmSelection(cm);\n } else {\n exitVisualMode(cm);\n }\n },\n reselectLastSelection: function(cm, _actionArgs, vim) {\n var lastSelection = vim.lastSelection;\n if (vim.visualMode) {\n updateLastSelection(cm, vim);\n }\n if (lastSelection) {\n var anchor = lastSelection.anchorMark.find();\n var head = lastSelection.headMark.find();\n if (!anchor || !head) {\n // If the marks have been destroyed due to edits, do nothing.\n return;\n }\n vim.sel = {\n anchor: anchor,\n head: head\n };\n vim.visualMode = true;\n vim.visualLine = lastSelection.visualLine;\n vim.visualBlock = lastSelection.visualBlock;\n updateCmSelection(cm);\n updateMark(cm, vim, '<', cursorMin(anchor, head));\n updateMark(cm, vim, '>', cursorMax(anchor, head));\n CodeMirror.signal(cm, 'vim-mode-change', {\n mode: 'visual',\n subMode: vim.visualLine ? 'linewise' :\n vim.visualBlock ? 'blockwise' : ''});\n }\n },\n joinLines: function(cm, actionArgs, vim) {\n var curStart, curEnd;\n if (vim.visualMode) {\n curStart = cm.getCursor('anchor');\n curEnd = cm.getCursor('head');\n if (cursorIsBefore(curEnd, curStart)) {\n var tmp = curEnd;\n curEnd = curStart;\n curStart = tmp;\n }\n curEnd.ch = lineLength(cm, curEnd.line) - 1;\n } else {\n // Repeat is the number of lines to join. Minimum 2 lines.\n var repeat = Math.max(actionArgs.repeat, 2);\n curStart = cm.getCursor();\n curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1,\n Infinity));\n }\n var finalCh = 0;\n for (var i = curStart.line; i < curEnd.line; i++) {\n finalCh = lineLength(cm, curStart.line);\n var tmp = Pos(curStart.line + 1,\n lineLength(cm, curStart.line + 1));\n var text = cm.getRange(curStart, tmp);\n text = text.replace(/\\n\\s*/g, ' ');\n cm.replaceRange(text, curStart, tmp);\n }\n var curFinalPos = Pos(curStart.line, finalCh);\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n cm.setCursor(curFinalPos);\n },\n newLineAndEnterInsertMode: function(cm, actionArgs, vim) {\n vim.insertMode = true;\n var insertAt = copyCursor(cm.getCursor());\n if (insertAt.line === cm.firstLine() && !actionArgs.after) {\n // Special case for inserting newline before start of document.\n cm.replaceRange('\\n', Pos(cm.firstLine(), 0));\n cm.setCursor(cm.firstLine(), 0);\n } else {\n insertAt.line = (actionArgs.after) ? insertAt.line :\n insertAt.line - 1;\n insertAt.ch = lineLength(cm, insertAt.line);\n cm.setCursor(insertAt);\n var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment ||\n CodeMirror.commands.newlineAndIndent;\n newlineFn(cm);\n }\n this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim);\n },\n paste: function(cm, actionArgs, vim) {\n var cur = copyCursor(cm.getCursor());\n var register = vimGlobalState.registerController.getRegister(\n actionArgs.registerName);\n var text = register.toString();\n if (!text) {\n return;\n }\n if (actionArgs.matchIndent) {\n var tabSize = cm.getOption(\"tabSize\");\n // length that considers tabs and tabSize\n var whitespaceLength = function(str) {\n var tabs = (str.split(\"\\t\").length - 1);\n var spaces = (str.split(\" \").length - 1);\n return tabs * tabSize + spaces * 1;\n };\n var currentLine = cm.getLine(cm.getCursor().line);\n var indent = whitespaceLength(currentLine.match(/^\\s*/)[0]);\n // chomp last newline b/c don't want it to match /^\\s*/gm\n var chompedText = text.replace(/\\n$/, '');\n var wasChomped = text !== chompedText;\n var firstIndent = whitespaceLength(text.match(/^\\s*/)[0]);\n var text = chompedText.replace(/^\\s*/gm, function(wspace) {\n var newIndent = indent + (whitespaceLength(wspace) - firstIndent);\n if (newIndent < 0) {\n return \"\";\n }\n else if (cm.getOption(\"indentWithTabs\")) {\n var quotient = Math.floor(newIndent / tabSize);\n return Array(quotient + 1).join('\\t');\n }\n else {\n return Array(newIndent + 1).join(' ');\n }\n });\n text += wasChomped ? \"\\n\" : \"\";\n }\n if (actionArgs.repeat > 1) {\n var text = Array(actionArgs.repeat + 1).join(text);\n }\n var linewise = register.linewise;\n var blockwise = register.blockwise;\n if (linewise) {\n if(vim.visualMode) {\n text = vim.visualLine ? text.slice(0, -1) : '\\n' + text.slice(0, text.length - 1) + '\\n';\n } else if (actionArgs.after) {\n // Move the newline at the end to the start instead, and paste just\n // before the newline character of the line we are on right now.\n text = '\\n' + text.slice(0, text.length - 1);\n cur.ch = lineLength(cm, cur.line);\n } else {\n cur.ch = 0;\n }\n } else {\n if (blockwise) {\n text = text.split('\\n');\n for (var i = 0; i < text.length; i++) {\n text[i] = (text[i] == '') ? ' ' : text[i];\n }\n }\n cur.ch += actionArgs.after ? 1 : 0;\n }\n var curPosFinal;\n var idx;\n if (vim.visualMode) {\n // save the pasted text for reselection if the need arises\n vim.lastPastedText = text;\n var lastSelectionCurEnd;\n var selectedArea = getSelectedAreaRange(cm, vim);\n var selectionStart = selectedArea[0];\n var selectionEnd = selectedArea[1];\n var selectedText = cm.getSelection();\n var selections = cm.listSelections();\n var emptyStrings = new Array(selections.length).join('1').split('1');\n // save the curEnd marker before it get cleared due to cm.replaceRange.\n if (vim.lastSelection) {\n lastSelectionCurEnd = vim.lastSelection.headMark.find();\n }\n // push the previously selected text to unnamed register\n vimGlobalState.registerController.unnamedRegister.setText(selectedText);\n if (blockwise) {\n // first delete the selected text\n cm.replaceSelections(emptyStrings);\n // Set new selections as per the block length of the yanked text\n selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch);\n cm.setCursor(selectionStart);\n selectBlock(cm, selectionEnd);\n cm.replaceSelections(text);\n curPosFinal = selectionStart;\n } else if (vim.visualBlock) {\n cm.replaceSelections(emptyStrings);\n cm.setCursor(selectionStart);\n cm.replaceRange(text, selectionStart, selectionStart);\n curPosFinal = selectionStart;\n } else {\n cm.replaceRange(text, selectionStart, selectionEnd);\n curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);\n }\n // restore the the curEnd marker\n if(lastSelectionCurEnd) {\n vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);\n }\n if (linewise) {\n curPosFinal.ch=0;\n }\n } else {\n if (blockwise) {\n cm.setCursor(cur);\n for (var i = 0; i < text.length; i++) {\n var line = cur.line+i;\n if (line > cm.lastLine()) {\n cm.replaceRange('\\n', Pos(line, 0));\n }\n var lastCh = lineLength(cm, line);\n if (lastCh < cur.ch) {\n extendLineToColumn(cm, line, cur.ch);\n }\n }\n cm.setCursor(cur);\n selectBlock(cm, Pos(cur.line + text.length-1, cur.ch));\n cm.replaceSelections(text);\n curPosFinal = cur;\n } else {\n cm.replaceRange(text, cur);\n // Now fine tune the cursor to where we want it.\n if (linewise && actionArgs.after) {\n curPosFinal = Pos(\n cur.line + 1,\n findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)));\n } else if (linewise && !actionArgs.after) {\n curPosFinal = Pos(\n cur.line,\n findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));\n } else if (!linewise && actionArgs.after) {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length - 1);\n } else {\n idx = cm.indexFromPos(cur);\n curPosFinal = cm.posFromIndex(idx + text.length);\n }\n }\n }\n if (vim.visualMode) {\n exitVisualMode(cm, false);\n }\n cm.setCursor(curPosFinal);\n },\n undo: function(cm, actionArgs) {\n cm.operation(function() {\n repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)();\n cm.setCursor(cm.getCursor('anchor'));\n });\n },\n redo: function(cm, actionArgs) {\n repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)();\n },\n setRegister: function(_cm, actionArgs, vim) {\n vim.inputState.registerName = actionArgs.selectedCharacter;\n },\n setMark: function(cm, actionArgs, vim) {\n var markName = actionArgs.selectedCharacter;\n updateMark(cm, vim, markName, cm.getCursor());\n },\n replace: function(cm, actionArgs, vim) {\n var replaceWith = actionArgs.selectedCharacter;\n var curStart = cm.getCursor();\n var replaceTo;\n var curEnd;\n var selections = cm.listSelections();\n if (vim.visualMode) {\n curStart = cm.getCursor('start');\n curEnd = cm.getCursor('end');\n } else {\n var line = cm.getLine(curStart.line);\n replaceTo = curStart.ch + actionArgs.repeat;\n if (replaceTo > line.length) {\n replaceTo=line.length;\n }\n curEnd = Pos(curStart.line, replaceTo);\n }\n if (replaceWith=='\\n') {\n if (!vim.visualMode) cm.replaceRange('', curStart, curEnd);\n // special case, where vim help says to replace by just one line-break\n (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm);\n } else {\n var replaceWithStr = cm.getRange(curStart, curEnd);\n //replace all characters in range by selected, but keep linebreaks\n replaceWithStr = replaceWithStr.replace(/[^\\n]/g, replaceWith);\n if (vim.visualBlock) {\n // Tabs are split in visua block before replacing\n var spaces = new Array(cm.getOption(\"tabSize\")+1).join(' ');\n replaceWithStr = cm.getSelection();\n replaceWithStr = replaceWithStr.replace(/\\t/g, spaces).replace(/[^\\n]/g, replaceWith).split('\\n');\n cm.replaceSelections(replaceWithStr);\n } else {\n cm.replaceRange(replaceWithStr, curStart, curEnd);\n }\n if (vim.visualMode) {\n curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ?\n selections[0].anchor : selections[0].head;\n cm.setCursor(curStart);\n exitVisualMode(cm, false);\n } else {\n cm.setCursor(offsetCursor(curEnd, 0, -1));\n }\n }\n },\n incrementNumberToken: function(cm, actionArgs) {\n var cur = cm.getCursor();\n var lineStr = cm.getLine(cur.line);\n var re = /-?\\d+/g;\n var match;\n var start;\n var end;\n var numberStr;\n var token;\n while ((match = re.exec(lineStr)) !== null) {\n token = match[0];\n start = match.index;\n end = start + token.length;\n if (cur.ch < end)break;\n }\n if (!actionArgs.backtrack && (end <= cur.ch))return;\n if (token) {\n var increment = actionArgs.increase ? 1 : -1;\n var number = parseInt(token) + (increment * actionArgs.repeat);\n var from = Pos(cur.line, start);\n var to = Pos(cur.line, end);\n numberStr = number.toString();\n cm.replaceRange(numberStr, from, to);\n } else {\n return;\n }\n cm.setCursor(Pos(cur.line, start + numberStr.length - 1));\n },\n repeatLastEdit: function(cm, actionArgs, vim) {\n var lastEditInputState = vim.lastEditInputState;\n if (!lastEditInputState) { return; }\n var repeat = actionArgs.repeat;\n if (repeat && actionArgs.repeatIsExplicit) {\n vim.lastEditInputState.repeatOverride = repeat;\n } else {\n repeat = vim.lastEditInputState.repeatOverride || repeat;\n }\n repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */);\n },\n exitInsertMode: exitInsertMode\n };\n\n function defineAction(name, fn) {\n actions[name] = fn;\n }\n\n /*\n * Below are miscellaneous utility functions used by vim.js\n */\n\n /**\n * Clips cursor to ensure that line is within the buffer's range\n * If includeLineBreak is true, then allow cur.ch == lineLength.\n */\n function clipCursorToContent(cm, cur, includeLineBreak) {\n var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() );\n var maxCh = lineLength(cm, line) - 1;\n maxCh = (includeLineBreak) ? maxCh + 1 : maxCh;\n var ch = Math.min(Math.max(0, cur.ch), maxCh);\n return Pos(line, ch);\n }\n function copyArgs(args) {\n var ret = {};\n for (var prop in args) {\n if (args.hasOwnProperty(prop)) {\n ret[prop] = args[prop];\n }\n }\n return ret;\n }\n function offsetCursor(cur, offsetLine, offsetCh) {\n if (typeof offsetLine === 'object') {\n offsetCh = offsetLine.ch;\n offsetLine = offsetLine.line;\n }\n return Pos(cur.line + offsetLine, cur.ch + offsetCh);\n }\n function getOffset(anchor, head) {\n return {\n line: head.line - anchor.line,\n ch: head.line - anchor.line\n };\n }\n function commandMatches(keys, keyMap, context, inputState) {\n // Partial matches are not applied. They inform the key handler\n // that the current key sequence is a subsequence of a valid key\n // sequence, so that the key buffer is not cleared.\n var match, partial = [], full = [];\n for (var i = 0; i < keyMap.length; i++) {\n var command = keyMap[i];\n if (context == 'insert' && command.context != 'insert' ||\n command.context && command.context != context ||\n inputState.operator && command.type == 'action' ||\n !(match = commandMatch(keys, command.keys))) { continue; }\n if (match == 'partial') { partial.push(command); }\n if (match == 'full') { full.push(command); }\n }\n return {\n partial: partial.length && partial,\n full: full.length && full\n };\n }\n function commandMatch(pressed, mapped) {\n if (mapped.slice(-11) == '<character>') {\n // Last character matches anything.\n var prefixLen = mapped.length - 11;\n var pressedPrefix = pressed.slice(0, prefixLen);\n var mappedPrefix = mapped.slice(0, prefixLen);\n return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' :\n mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false;\n } else {\n return pressed == mapped ? 'full' :\n mapped.indexOf(pressed) == 0 ? 'partial' : false;\n }\n }\n function lastChar(keys) {\n var match = /^.*(<[\\w\\-]+>)$/.exec(keys);\n var selectedCharacter = match ? match[1] : keys.slice(-1);\n if (selectedCharacter.length > 1){\n switch(selectedCharacter){\n case '<CR>':\n selectedCharacter='\\n';\n break;\n case '<Space>':\n selectedCharacter=' ';\n break;\n default:\n break;\n }\n }\n return selectedCharacter;\n }\n function repeatFn(cm, fn, repeat) {\n return function() {\n for (var i = 0; i < repeat; i++) {\n fn(cm);\n }\n };\n }\n function copyCursor(cur) {\n return Pos(cur.line, cur.ch);\n }\n function cursorEqual(cur1, cur2) {\n return cur1.ch == cur2.ch && cur1.line == cur2.line;\n }\n function cursorIsBefore(cur1, cur2) {\n if (cur1.line < cur2.line) {\n return true;\n }\n if (cur1.line == cur2.line && cur1.ch < cur2.ch) {\n return true;\n }\n return false;\n }\n function cursorMin(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n return cursorIsBefore(cur1, cur2) ? cur1 : cur2;\n }\n function cursorMax(cur1, cur2) {\n if (arguments.length > 2) {\n cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));\n }\n return cursorIsBefore(cur1, cur2) ? cur2 : cur1;\n }\n function cursorIsBetween(cur1, cur2, cur3) {\n // returns true if cur2 is between cur1 and cur3.\n var cur1before2 = cursorIsBefore(cur1, cur2);\n var cur2before3 = cursorIsBefore(cur2, cur3);\n return cur1before2 && cur2before3;\n }\n function lineLength(cm, lineNum) {\n return cm.getLine(lineNum).length;\n }\n function trim(s) {\n if (s.trim) {\n return s.trim();\n }\n return s.replace(/^\\s+|\\s+$/g, '');\n }\n function escapeRegex(s) {\n return s.replace(/([.?*+$\\[\\]\\/\\\\(){}|\\-])/g, '\\\\$1');\n }\n function extendLineToColumn(cm, lineNum, column) {\n var endCh = lineLength(cm, lineNum);\n var spaces = new Array(column-endCh+1).join(' ');\n cm.setCursor(Pos(lineNum, endCh));\n cm.replaceRange(spaces, cm.getCursor());\n }\n // This functions selects a rectangular block\n // of text with selectionEnd as any of its corner\n // Height of block:\n // Difference in selectionEnd.line and first/last selection.line\n // Width of the block:\n // Distance between selectionEnd.ch and any(first considered here) selection.ch\n function selectBlock(cm, selectionEnd) {\n var selections = [], ranges = cm.listSelections();\n var head = copyCursor(cm.clipPos(selectionEnd));\n var isClipped = !cursorEqual(selectionEnd, head);\n var curHead = cm.getCursor('head');\n var primIndex = getIndex(ranges, curHead);\n var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);\n var max = ranges.length - 1;\n var index = max - primIndex > primIndex ? max : 0;\n var base = ranges[index].anchor;\n\n var firstLine = Math.min(base.line, head.line);\n var lastLine = Math.max(base.line, head.line);\n var baseCh = base.ch, headCh = head.ch;\n\n var dir = ranges[index].head.ch - baseCh;\n var newDir = headCh - baseCh;\n if (dir > 0 && newDir <= 0) {\n baseCh++;\n if (!isClipped) { headCh--; }\n } else if (dir < 0 && newDir >= 0) {\n baseCh--;\n if (!wasClipped) { headCh++; }\n } else if (dir < 0 && newDir == -1) {\n baseCh--;\n headCh++;\n }\n for (var line = firstLine; line <= lastLine; line++) {\n var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};\n selections.push(range);\n }\n primIndex = head.line == lastLine ? selections.length - 1 : 0;\n cm.setSelections(selections);\n selectionEnd.ch = headCh;\n base.ch = baseCh;\n return base;\n }\n function selectForInsert(cm, head, height) {\n var sel = [];\n for (var i = 0; i < height; i++) {\n var lineHead = offsetCursor(head, i, 0);\n sel.push({anchor: lineHead, head: lineHead});\n }\n cm.setSelections(sel, 0);\n }\n // getIndex returns the index of the cursor in the selections.\n function getIndex(ranges, cursor, end) {\n for (var i = 0; i < ranges.length; i++) {\n var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);\n var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);\n if (atAnchor || atHead) {\n return i;\n }\n }\n return -1;\n }\n function getSelectedAreaRange(cm, vim) {\n var lastSelection = vim.lastSelection;\n var getCurrentSelectedAreaRange = function() {\n var selections = cm.listSelections();\n var start = selections[0];\n var end = selections[selections.length-1];\n var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;\n var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;\n return [selectionStart, selectionEnd];\n };\n var getLastSelectedAreaRange = function() {\n var selectionStart = cm.getCursor();\n var selectionEnd = cm.getCursor();\n var block = lastSelection.visualBlock;\n if (block) {\n var width = block.width;\n var height = block.height;\n selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width);\n var selections = [];\n // selectBlock creates a 'proper' rectangular block.\n // We do not want that in all cases, so we manually set selections.\n for (var i = selectionStart.line; i < selectionEnd.line; i++) {\n var anchor = Pos(i, selectionStart.ch);\n var head = Pos(i, selectionEnd.ch);\n var range = {anchor: anchor, head: head};\n selections.push(range);\n }\n cm.setSelections(selections);\n } else {\n var start = lastSelection.anchorMark.find();\n var end = lastSelection.headMark.find();\n var line = end.line - start.line;\n var ch = end.ch - start.ch;\n selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch};\n if (lastSelection.visualLine) {\n selectionStart = Pos(selectionStart.line, 0);\n selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));\n }\n cm.setSelection(selectionStart, selectionEnd);\n }\n return [selectionStart, selectionEnd];\n };\n if (!vim.visualMode) {\n // In case of replaying the action.\n return getLastSelectedAreaRange();\n } else {\n return getCurrentSelectedAreaRange();\n }\n }\n // Updates the previous selection with the current selection's values. This\n // should only be called in visual mode.\n function updateLastSelection(cm, vim) {\n var anchor = vim.sel.anchor;\n var head = vim.sel.head;\n // To accommodate the effect of lastPastedText in the last selection\n if (vim.lastPastedText) {\n head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);\n vim.lastPastedText = null;\n }\n vim.lastSelection = {'anchorMark': cm.setBookmark(anchor),\n 'headMark': cm.setBookmark(head),\n 'anchor': copyCursor(anchor),\n 'head': copyCursor(head),\n 'visualMode': vim.visualMode,\n 'visualLine': vim.visualLine,\n 'visualBlock': vim.visualBlock};\n }\n function expandSelection(cm, start, end) {\n var sel = cm.state.vim.sel;\n var head = sel.head;\n var anchor = sel.anchor;\n var tmp;\n if (cursorIsBefore(end, start)) {\n tmp = end;\n end = start;\n start = tmp;\n }\n if (cursorIsBefore(head, anchor)) {\n head = cursorMin(start, head);\n anchor = cursorMax(anchor, end);\n } else {\n anchor = cursorMin(start, anchor);\n head = cursorMax(head, end);\n head = offsetCursor(head, 0, -1);\n if (head.ch == -1 && head.line != cm.firstLine()) {\n head = Pos(head.line - 1, lineLength(cm, head.line - 1));\n }\n }\n return [anchor, head];\n }\n /**\n * Updates the CodeMirror selection to match the provided vim selection.\n * If no arguments are given, it uses the current vim selection state.\n */\n function updateCmSelection(cm, sel, mode) {\n var vim = cm.state.vim;\n sel = sel || vim.sel;\n var mode = mode ||\n vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char';\n var cmSel = makeCmSelection(cm, sel, mode);\n cm.setSelections(cmSel.ranges, cmSel.primary);\n updateFakeCursor(cm);\n }\n function makeCmSelection(cm, sel, mode, exclusive) {\n var head = copyCursor(sel.head);\n var anchor = copyCursor(sel.anchor);\n if (mode == 'char') {\n var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;\n head = offsetCursor(sel.head, 0, headOffset);\n anchor = offsetCursor(sel.anchor, 0, anchorOffset);\n return {\n ranges: [{anchor: anchor, head: head}],\n primary: 0\n };\n } else if (mode == 'line') {\n if (!cursorIsBefore(sel.head, sel.anchor)) {\n anchor.ch = 0;\n\n var lastLine = cm.lastLine();\n if (head.line > lastLine) {\n head.line = lastLine;\n }\n head.ch = lineLength(cm, head.line);\n } else {\n head.ch = 0;\n anchor.ch = lineLength(cm, anchor.line);\n }\n return {\n ranges: [{anchor: anchor, head: head}],\n primary: 0\n };\n } else if (mode == 'block') {\n var top = Math.min(anchor.line, head.line),\n left = Math.min(anchor.ch, head.ch),\n bottom = Math.max(anchor.line, head.line),\n right = Math.max(anchor.ch, head.ch) + 1;\n var height = bottom - top + 1;\n var primary = head.line == top ? 0 : height - 1;\n var ranges = [];\n for (var i = 0; i < height; i++) {\n ranges.push({\n anchor: Pos(top + i, left),\n head: Pos(top + i, right)\n });\n }\n return {\n ranges: ranges,\n primary: primary\n };\n }\n }\n function getHead(cm) {\n var cur = cm.getCursor('head');\n if (cm.getSelection().length == 1) {\n // Small corner case when only 1 character is selected. The \"real\"\n // head is the left of head and anchor.\n cur = cursorMin(cur, cm.getCursor('anchor'));\n }\n return cur;\n }\n\n /**\n * If moveHead is set to false, the CodeMirror selection will not be\n * touched. The caller assumes the responsibility of putting the cursor\n * in the right place.\n */\n function exitVisualMode(cm, moveHead) {\n var vim = cm.state.vim;\n if (moveHead !== false) {\n cm.setCursor(clipCursorToContent(cm, vim.sel.head));\n }\n updateLastSelection(cm, vim);\n vim.visualMode = false;\n vim.visualLine = false;\n vim.visualBlock = false;\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"normal\"});\n if (vim.fakeCursor) {\n vim.fakeCursor.clear();\n }\n }\n\n // Remove any trailing newlines from the selection. For\n // example, with the caret at the start of the last word on the line,\n // 'dw' should word, but not the newline, while 'w' should advance the\n // caret to the first character of the next line.\n function clipToLine(cm, curStart, curEnd) {\n var selection = cm.getRange(curStart, curEnd);\n // Only clip if the selection ends with trailing newline + whitespace\n if (/\\n\\s*$/.test(selection)) {\n var lines = selection.split('\\n');\n // We know this is all whitepsace.\n lines.pop();\n\n // Cases:\n // 1. Last word is an empty line - do not clip the trailing '\\n'\n // 2. Last word is not an empty line - clip the trailing '\\n'\n var line;\n // Find the line containing the last word, and clip all whitespace up\n // to it.\n for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {\n curEnd.line--;\n curEnd.ch = 0;\n }\n // If the last word is not an empty line, clip an additional newline\n if (line) {\n curEnd.line--;\n curEnd.ch = lineLength(cm, curEnd.line);\n } else {\n curEnd.ch = 0;\n }\n }\n }\n\n // Expand the selection to line ends.\n function expandSelectionToLine(_cm, curStart, curEnd) {\n curStart.ch = 0;\n curEnd.ch = 0;\n curEnd.line++;\n }\n\n function findFirstNonWhiteSpaceCharacter(text) {\n if (!text) {\n return 0;\n }\n var firstNonWS = text.search(/\\S/);\n return firstNonWS == -1 ? text.length : firstNonWS;\n }\n\n function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {\n var cur = getHead(cm);\n var line = cm.getLine(cur.line);\n var idx = cur.ch;\n\n // Seek to first word or non-whitespace character, depending on if\n // noSymbol is true.\n var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0];\n while (!test(line.charAt(idx))) {\n idx++;\n if (idx >= line.length) { return null; }\n }\n\n if (bigWord) {\n test = bigWordCharTest[0];\n } else {\n test = wordCharTest[0];\n if (!test(line.charAt(idx))) {\n test = wordCharTest[1];\n }\n }\n\n var end = idx, start = idx;\n while (test(line.charAt(end)) && end < line.length) { end++; }\n while (test(line.charAt(start)) && start >= 0) { start--; }\n start++;\n\n if (inclusive) {\n // If present, include all whitespace after word.\n // Otherwise, include all whitespace before word, except indentation.\n var wordEnd = end;\n while (/\\s/.test(line.charAt(end)) && end < line.length) { end++; }\n if (wordEnd == end) {\n var wordStart = start;\n while (/\\s/.test(line.charAt(start - 1)) && start > 0) { start--; }\n if (!start) { start = wordStart; }\n }\n }\n return { start: Pos(cur.line, start), end: Pos(cur.line, end) };\n }\n\n function recordJumpPosition(cm, oldCur, newCur) {\n if (!cursorEqual(oldCur, newCur)) {\n vimGlobalState.jumpList.add(cm, oldCur, newCur);\n }\n }\n\n function recordLastCharacterSearch(increment, args) {\n vimGlobalState.lastChararacterSearch.increment = increment;\n vimGlobalState.lastChararacterSearch.forward = args.forward;\n vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter;\n }\n\n var symbolToMode = {\n '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket',\n '[': 'section', ']': 'section',\n '*': 'comment', '/': 'comment',\n 'm': 'method', 'M': 'method',\n '#': 'preprocess'\n };\n var findSymbolModes = {\n bracket: {\n isComplete: function(state) {\n if (state.nextCh === state.symb) {\n state.depth++;\n if (state.depth >= 1)return true;\n } else if (state.nextCh === state.reverseSymb) {\n state.depth--;\n }\n return false;\n }\n },\n section: {\n init: function(state) {\n state.curMoveThrough = true;\n state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';\n },\n isComplete: function(state) {\n return state.index === 0 && state.nextCh === state.symb;\n }\n },\n comment: {\n isComplete: function(state) {\n var found = state.lastCh === '*' && state.nextCh === '/';\n state.lastCh = state.nextCh;\n return found;\n }\n },\n // TODO: The original Vim implementation only operates on level 1 and 2.\n // The current implementation doesn't check for code block level and\n // therefore it operates on any levels.\n method: {\n init: function(state) {\n state.symb = (state.symb === 'm' ? '{' : '}');\n state.reverseSymb = state.symb === '{' ? '}' : '{';\n },\n isComplete: function(state) {\n if (state.nextCh === state.symb)return true;\n return false;\n }\n },\n preprocess: {\n init: function(state) {\n state.index = 0;\n },\n isComplete: function(state) {\n if (state.nextCh === '#') {\n var token = state.lineText.match(/#(\\w+)/)[1];\n if (token === 'endif') {\n if (state.forward && state.depth === 0) {\n return true;\n }\n state.depth++;\n } else if (token === 'if') {\n if (!state.forward && state.depth === 0) {\n return true;\n }\n state.depth--;\n }\n if (token === 'else' && state.depth === 0)return true;\n }\n return false;\n }\n }\n };\n function findSymbol(cm, repeat, forward, symb) {\n var cur = copyCursor(cm.getCursor());\n var increment = forward ? 1 : -1;\n var endLine = forward ? cm.lineCount() : -1;\n var curCh = cur.ch;\n var line = cur.line;\n var lineText = cm.getLine(line);\n var state = {\n lineText: lineText,\n nextCh: lineText.charAt(curCh),\n lastCh: null,\n index: curCh,\n symb: symb,\n reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb],\n forward: forward,\n depth: 0,\n curMoveThrough: false\n };\n var mode = symbolToMode[symb];\n if (!mode)return cur;\n var init = findSymbolModes[mode].init;\n var isComplete = findSymbolModes[mode].isComplete;\n if (init) { init(state); }\n while (line !== endLine && repeat) {\n state.index += increment;\n state.nextCh = state.lineText.charAt(state.index);\n if (!state.nextCh) {\n line += increment;\n state.lineText = cm.getLine(line) || '';\n if (increment > 0) {\n state.index = 0;\n } else {\n var lineLen = state.lineText.length;\n state.index = (lineLen > 0) ? (lineLen-1) : 0;\n }\n state.nextCh = state.lineText.charAt(state.index);\n }\n if (isComplete(state)) {\n cur.line = line;\n cur.ch = state.index;\n repeat--;\n }\n }\n if (state.nextCh || state.curMoveThrough) {\n return Pos(line, state.index);\n }\n return cur;\n }\n\n /**\n * Returns the boundaries of the next word. If the cursor in the middle of\n * the word, then returns the boundaries of the current word, starting at\n * the cursor. If the cursor is at the start/end of a word, and we are going\n * forward/backward, respectively, find the boundaries of the next word.\n *\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Cursor} cur The cursor position.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only [a-zA-Z0-9] characters count as part of the word.\n * @param {boolean} emptyLineIsWord True if empty lines should be treated\n * as words.\n * @return {Object{from:number, to:number, line: number}} The boundaries of\n * the word, or null if there are no more words.\n */\n function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {\n var lineNum = cur.line;\n var pos = cur.ch;\n var line = cm.getLine(lineNum);\n var dir = forward ? 1 : -1;\n var charTests = bigWord ? bigWordCharTest: wordCharTest;\n\n if (emptyLineIsWord && line == '') {\n lineNum += dir;\n line = cm.getLine(lineNum);\n if (!isLine(cm, lineNum)) {\n return null;\n }\n pos = (forward) ? 0 : line.length;\n }\n\n while (true) {\n if (emptyLineIsWord && line == '') {\n return { from: 0, to: 0, line: lineNum };\n }\n var stop = (dir > 0) ? line.length : -1;\n var wordStart = stop, wordEnd = stop;\n // Find bounds of next word.\n while (pos != stop) {\n var foundWord = false;\n for (var i = 0; i < charTests.length && !foundWord; ++i) {\n if (charTests[i](line.charAt(pos))) {\n wordStart = pos;\n // Advance to end of word.\n while (pos != stop && charTests[i](line.charAt(pos))) {\n pos += dir;\n }\n wordEnd = pos;\n foundWord = wordStart != wordEnd;\n if (wordStart == cur.ch && lineNum == cur.line &&\n wordEnd == wordStart + dir) {\n // We started at the end of a word. Find the next one.\n continue;\n } else {\n return {\n from: Math.min(wordStart, wordEnd + 1),\n to: Math.max(wordStart, wordEnd),\n line: lineNum };\n }\n }\n }\n if (!foundWord) {\n pos += dir;\n }\n }\n // Advance to next/prev line.\n lineNum += dir;\n if (!isLine(cm, lineNum)) {\n return null;\n }\n line = cm.getLine(lineNum);\n pos = (dir > 0) ? 0 : line.length;\n }\n // Should never get here.\n throw new Error('The impossible happened.');\n }\n\n /**\n * @param {CodeMirror} cm CodeMirror object.\n * @param {Pos} cur The position to start from.\n * @param {int} repeat Number of words to move past.\n * @param {boolean} forward True to search forward. False to search\n * backward.\n * @param {boolean} wordEnd True to move to end of word. False to move to\n * beginning of word.\n * @param {boolean} bigWord True if punctuation count as part of the word.\n * False if only alphabet characters count as part of the word.\n * @return {Cursor} The position the cursor should move to.\n */\n function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {\n var curStart = copyCursor(cur);\n var words = [];\n if (forward && !wordEnd || !forward && wordEnd) {\n repeat++;\n }\n // For 'e', empty lines are not considered words, go figure.\n var emptyLineIsWord = !(forward && wordEnd);\n for (var i = 0; i < repeat; i++) {\n var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);\n if (!word) {\n var eodCh = lineLength(cm, cm.lastLine());\n words.push(forward\n ? {line: cm.lastLine(), from: eodCh, to: eodCh}\n : {line: 0, from: 0, to: 0});\n break;\n }\n words.push(word);\n cur = Pos(word.line, forward ? (word.to - 1) : word.from);\n }\n var shortCircuit = words.length != repeat;\n var firstWord = words[0];\n var lastWord = words.pop();\n if (forward && !wordEnd) {\n // w\n if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n return Pos(lastWord.line, lastWord.from);\n } else if (forward && wordEnd) {\n return Pos(lastWord.line, lastWord.to - 1);\n } else if (!forward && wordEnd) {\n // ge\n if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {\n // We did not start in the middle of a word. Discard the extra word at the end.\n lastWord = words.pop();\n }\n return Pos(lastWord.line, lastWord.to);\n } else {\n // b\n return Pos(lastWord.line, lastWord.from);\n }\n }\n\n function moveToCharacter(cm, repeat, forward, character) {\n var cur = cm.getCursor();\n var start = cur.ch;\n var idx;\n for (var i = 0; i < repeat; i ++) {\n var line = cm.getLine(cur.line);\n idx = charIdxInLine(start, line, character, forward, true);\n if (idx == -1) {\n return null;\n }\n start = idx;\n }\n return Pos(cm.getCursor().line, idx);\n }\n\n function moveToColumn(cm, repeat) {\n // repeat is always >= 1, so repeat - 1 always corresponds\n // to the column we want to go to.\n var line = cm.getCursor().line;\n return clipCursorToContent(cm, Pos(line, repeat - 1));\n }\n\n function updateMark(cm, vim, markName, pos) {\n if (!inArray(markName, validMarks)) {\n return;\n }\n if (vim.marks[markName]) {\n vim.marks[markName].clear();\n }\n vim.marks[markName] = cm.setBookmark(pos);\n }\n\n function charIdxInLine(start, line, character, forward, includeChar) {\n // Search for char in line.\n // motion_options: {forward, includeChar}\n // If includeChar = true, include it too.\n // If forward = true, search forward, else search backwards.\n // If char is not found on this line, do nothing\n var idx;\n if (forward) {\n idx = line.indexOf(character, start + 1);\n if (idx != -1 && !includeChar) {\n idx -= 1;\n }\n } else {\n idx = line.lastIndexOf(character, start - 1);\n if (idx != -1 && !includeChar) {\n idx += 1;\n }\n }\n return idx;\n }\n\n function findParagraph(cm, head, repeat, dir, inclusive) {\n var line = head.line;\n var min = cm.firstLine();\n var max = cm.lastLine();\n var start, end, i = line;\n function isEmpty(i) { return !cm.getLine(i); }\n function isBoundary(i, dir, any) {\n if (any) { return isEmpty(i) != isEmpty(i + dir); }\n return !isEmpty(i) && isEmpty(i + dir);\n }\n if (dir) {\n while (min <= i && i <= max && repeat > 0) {\n if (isBoundary(i, dir)) { repeat--; }\n i += dir;\n }\n return new Pos(i, 0);\n }\n\n var vim = cm.state.vim;\n if (vim.visualLine && isBoundary(line, 1, true)) {\n var anchor = vim.sel.anchor;\n if (isBoundary(anchor.line, -1, true)) {\n if (!inclusive || anchor.line != line) {\n line += 1;\n }\n }\n }\n var startState = isEmpty(line);\n for (i = line; i <= max && repeat; i++) {\n if (isBoundary(i, 1, true)) {\n if (!inclusive || isEmpty(i) != startState) {\n repeat--;\n }\n }\n }\n end = new Pos(i, 0);\n // select boundary before paragraph for the last one\n if (i > max && !startState) { startState = true; }\n else { inclusive = false; }\n for (i = line; i > min; i--) {\n if (!inclusive || isEmpty(i) == startState || i == line) {\n if (isBoundary(i, -1, true)) { break; }\n }\n }\n start = new Pos(i, 0);\n return { start: start, end: end };\n }\n\n // TODO: perhaps this finagling of start and end positions belonds\n // in codmirror/replaceRange?\n function selectCompanionObject(cm, head, symb, inclusive) {\n var cur = head, start, end;\n\n var bracketRegexp = ({\n '(': /[()]/, ')': /[()]/,\n '[': /[[\\]]/, ']': /[[\\]]/,\n '{': /[{}]/, '}': /[{}]/})[symb];\n var openSym = ({\n '(': '(', ')': '(',\n '[': '[', ']': '[',\n '{': '{', '}': '{'})[symb];\n var curChar = cm.getLine(cur.line).charAt(cur.ch);\n // Due to the behavior of scanForBracket, we need to add an offset if the\n // cursor is on a matching open bracket.\n var offset = curChar === openSym ? 1 : 0;\n\n start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp});\n end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp});\n\n if (!start || !end) {\n return { start: cur, end: cur };\n }\n\n start = start.pos;\n end = end.pos;\n\n if ((start.line == end.line && start.ch > end.ch)\n || (start.line > end.line)) {\n var tmp = start;\n start = end;\n end = tmp;\n }\n\n if (inclusive) {\n end.ch += 1;\n } else {\n start.ch += 1;\n }\n\n return { start: start, end: end };\n }\n\n // Takes in a symbol and a cursor and tries to simulate text objects that\n // have identical opening and closing symbols\n // TODO support across multiple lines\n function findBeginningAndEnd(cm, head, symb, inclusive) {\n var cur = copyCursor(head);\n var line = cm.getLine(cur.line);\n var chars = line.split('');\n var start, end, i, len;\n var firstIndex = chars.indexOf(symb);\n\n // the decision tree is to always look backwards for the beginning first,\n // but if the cursor is in front of the first instance of the symb,\n // then move the cursor forward\n if (cur.ch < firstIndex) {\n cur.ch = firstIndex;\n // Why is this line even here???\n // cm.setCursor(cur.line, firstIndex+1);\n }\n // otherwise if the cursor is currently on the closing symbol\n else if (firstIndex < cur.ch && chars[cur.ch] == symb) {\n end = cur.ch; // assign end to the current cursor\n --cur.ch; // make sure to look backwards\n }\n\n // if we're currently on the symbol, we've got a start\n if (chars[cur.ch] == symb && !end) {\n start = cur.ch + 1; // assign start to ahead of the cursor\n } else {\n // go backwards to find the start\n for (i = cur.ch; i > -1 && !start; i--) {\n if (chars[i] == symb) {\n start = i + 1;\n }\n }\n }\n\n // look forwards for the end symbol\n if (start && !end) {\n for (i = start, len = chars.length; i < len && !end; i++) {\n if (chars[i] == symb) {\n end = i;\n }\n }\n }\n\n // nothing found\n if (!start || !end) {\n return { start: cur, end: cur };\n }\n\n // include the symbols\n if (inclusive) {\n --start; ++end;\n }\n\n return {\n start: Pos(cur.line, start),\n end: Pos(cur.line, end)\n };\n }\n\n // Search functions\n defineOption('pcre', true, 'boolean');\n function SearchState() {}\n SearchState.prototype = {\n getQuery: function() {\n return vimGlobalState.query;\n },\n setQuery: function(query) {\n vimGlobalState.query = query;\n },\n getOverlay: function() {\n return this.searchOverlay;\n },\n setOverlay: function(overlay) {\n this.searchOverlay = overlay;\n },\n isReversed: function() {\n return vimGlobalState.isReversed;\n },\n setReversed: function(reversed) {\n vimGlobalState.isReversed = reversed;\n },\n getScrollbarAnnotate: function() {\n return this.annotate;\n },\n setScrollbarAnnotate: function(annotate) {\n this.annotate = annotate;\n }\n };\n function getSearchState(cm) {\n var vim = cm.state.vim;\n return vim.searchState_ || (vim.searchState_ = new SearchState());\n }\n function dialog(cm, template, shortText, onClose, options) {\n if (cm.openDialog) {\n cm.openDialog(template, onClose, { bottom: true, value: options.value,\n onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp,\n selectValueOnOpen: false});\n }\n else {\n onClose(prompt(shortText, ''));\n }\n }\n function splitBySlash(argString) {\n var slashes = findUnescapedSlashes(argString) || [];\n if (!slashes.length) return [];\n var tokens = [];\n // in case of strings like foo/bar\n if (slashes[0] !== 0) return;\n for (var i = 0; i < slashes.length; i++) {\n if (typeof slashes[i] == 'number')\n tokens.push(argString.substring(slashes[i] + 1, slashes[i+1]));\n }\n return tokens;\n }\n\n function findUnescapedSlashes(str) {\n var escapeNextChar = false;\n var slashes = [];\n for (var i = 0; i < str.length; i++) {\n var c = str.charAt(i);\n if (!escapeNextChar && c == '/') {\n slashes.push(i);\n }\n escapeNextChar = !escapeNextChar && (c == '\\\\');\n }\n return slashes;\n }\n\n // Translates a search string from ex (vim) syntax into javascript form.\n function translateRegex(str) {\n // When these match, add a '\\' if unescaped or remove one if escaped.\n var specials = '|(){';\n // Remove, but never add, a '\\' for these.\n var unescape = '}';\n var escapeNextChar = false;\n var out = [];\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || '';\n var n = str.charAt(i+1) || '';\n var specialComesNext = (n && specials.indexOf(n) != -1);\n if (escapeNextChar) {\n if (c !== '\\\\' || !specialComesNext) {\n out.push(c);\n }\n escapeNextChar = false;\n } else {\n if (c === '\\\\') {\n escapeNextChar = true;\n // Treat the unescape list as special for removing, but not adding '\\'.\n if (n && unescape.indexOf(n) != -1) {\n specialComesNext = true;\n }\n // Not passing this test means removing a '\\'.\n if (!specialComesNext || n === '\\\\') {\n out.push(c);\n }\n } else {\n out.push(c);\n if (specialComesNext && n !== '\\\\') {\n out.push('\\\\');\n }\n }\n }\n }\n return out.join('');\n }\n\n // Translates the replace part of a search and replace from ex (vim) syntax into\n // javascript form. Similar to translateRegex, but additionally fixes back references\n // (translates '\\[0..9]' to '$[0..9]') and follows different rules for escaping '$'.\n var charUnescapes = {'\\\\n': '\\n', '\\\\r': '\\r', '\\\\t': '\\t'};\n function translateRegexReplace(str) {\n var escapeNextChar = false;\n var out = [];\n for (var i = -1; i < str.length; i++) {\n var c = str.charAt(i) || '';\n var n = str.charAt(i+1) || '';\n if (charUnescapes[c + n]) {\n out.push(charUnescapes[c+n]);\n i++;\n } else if (escapeNextChar) {\n // At any point in the loop, escapeNextChar is true if the previous\n // character was a '\\' and was not escaped.\n out.push(c);\n escapeNextChar = false;\n } else {\n if (c === '\\\\') {\n escapeNextChar = true;\n if ((isNumber(n) || n === '$')) {\n out.push('$');\n } else if (n !== '/' && n !== '\\\\') {\n out.push('\\\\');\n }\n } else {\n if (c === '$') {\n out.push('$');\n }\n out.push(c);\n if (n === '/') {\n out.push('\\\\');\n }\n }\n }\n }\n return out.join('');\n }\n\n // Unescape \\ and / in the replace part, for PCRE mode.\n var unescapes = {'\\\\/': '/', '\\\\\\\\': '\\\\', '\\\\n': '\\n', '\\\\r': '\\r', '\\\\t': '\\t'};\n function unescapeRegexReplace(str) {\n var stream = new CodeMirror.StringStream(str);\n var output = [];\n while (!stream.eol()) {\n // Search for \\.\n while (stream.peek() && stream.peek() != '\\\\') {\n output.push(stream.next());\n }\n var matched = false;\n for (var matcher in unescapes) {\n if (stream.match(matcher, true)) {\n matched = true;\n output.push(unescapes[matcher]);\n break;\n }\n }\n if (!matched) {\n // Don't change anything\n output.push(stream.next());\n }\n }\n return output.join('');\n }\n\n /**\n * Extract the regular expression from the query and return a Regexp object.\n * Returns null if the query is blank.\n * If ignoreCase is passed in, the Regexp object will have the 'i' flag set.\n * If smartCase is passed in, and the query contains upper case letters,\n * then ignoreCase is overridden, and the 'i' flag will not be set.\n * If the query contains the /i in the flag part of the regular expression,\n * then both ignoreCase and smartCase are ignored, and 'i' will be passed\n * through to the Regex object.\n */\n function parseQuery(query, ignoreCase, smartCase) {\n // First update the last search register\n var lastSearchRegister = vimGlobalState.registerController.getRegister('/');\n lastSearchRegister.setText(query);\n // Check if the query is already a regex.\n if (query instanceof RegExp) { return query; }\n // First try to extract regex + flags from the input. If no flags found,\n // extract just the regex. IE does not accept flags directly defined in\n // the regex string in the form /regex/flags\n var slashes = findUnescapedSlashes(query);\n var regexPart;\n var forceIgnoreCase;\n if (!slashes.length) {\n // Query looks like 'regexp'\n regexPart = query;\n } else {\n // Query looks like 'regexp/...'\n regexPart = query.substring(0, slashes[0]);\n var flagsPart = query.substring(slashes[0]);\n forceIgnoreCase = (flagsPart.indexOf('i') != -1);\n }\n if (!regexPart) {\n return null;\n }\n if (!getOption('pcre')) {\n regexPart = translateRegex(regexPart);\n }\n if (smartCase) {\n ignoreCase = (/^[^A-Z]*$/).test(regexPart);\n }\n var regexp = new RegExp(regexPart,\n (ignoreCase || forceIgnoreCase) ? 'i' : undefined);\n return regexp;\n }\n function showConfirm(cm, text) {\n if (cm.openNotification) {\n cm.openNotification('<span style=\"color: red\">' + text + '</span>',\n {bottom: true, duration: 5000});\n } else {\n alert(text);\n }\n }\n function makePrompt(prefix, desc) {\n var raw = '';\n if (prefix) {\n raw += '<span style=\"font-family: monospace\">' + prefix + '</span>';\n }\n raw += '<input type=\"text\"/> ' +\n '<span style=\"color: #888\">';\n if (desc) {\n raw += '<span style=\"color: #888\">';\n raw += desc;\n raw += '</span>';\n }\n return raw;\n }\n var searchPromptDesc = '(Javascript regexp)';\n function showPrompt(cm, options) {\n var shortText = (options.prefix || '') + ' ' + (options.desc || '');\n var prompt = makePrompt(options.prefix, options.desc);\n dialog(cm, prompt, shortText, options.onClose, options);\n }\n function regexEqual(r1, r2) {\n if (r1 instanceof RegExp && r2 instanceof RegExp) {\n var props = ['global', 'multiline', 'ignoreCase', 'source'];\n for (var i = 0; i < props.length; i++) {\n var prop = props[i];\n if (r1[prop] !== r2[prop]) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n // Returns true if the query is valid.\n function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {\n if (!rawQuery) {\n return;\n }\n var state = getSearchState(cm);\n var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);\n if (!query) {\n return;\n }\n highlightSearchMatches(cm, query);\n if (regexEqual(query, state.getQuery())) {\n return query;\n }\n state.setQuery(query);\n return query;\n }\n function searchOverlay(query) {\n if (query.source.charAt(0) == '^') {\n var matchSol = true;\n }\n return {\n token: function(stream) {\n if (matchSol && !stream.sol()) {\n stream.skipToEnd();\n return;\n }\n var match = stream.match(query, false);\n if (match) {\n if (match[0].length == 0) {\n // Matched empty string, skip to next.\n stream.next();\n return 'searching';\n }\n if (!stream.sol()) {\n // Backtrack 1 to match \\b\n stream.backUp(1);\n if (!query.exec(stream.next() + match[0])) {\n stream.next();\n return null;\n }\n }\n stream.match(query);\n return 'searching';\n }\n while (!stream.eol()) {\n stream.next();\n if (stream.match(query, false)) break;\n }\n },\n query: query\n };\n }\n function highlightSearchMatches(cm, query) {\n var searchState = getSearchState(cm);\n var overlay = searchState.getOverlay();\n if (!overlay || query != overlay.query) {\n if (overlay) {\n cm.removeOverlay(overlay);\n }\n overlay = searchOverlay(query);\n cm.addOverlay(overlay);\n if (cm.showMatchesOnScrollbar) {\n if (searchState.getScrollbarAnnotate()) {\n searchState.getScrollbarAnnotate().clear();\n }\n searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query));\n }\n searchState.setOverlay(overlay);\n }\n }\n function findNext(cm, prev, query, repeat) {\n if (repeat === undefined) { repeat = 1; }\n return cm.operation(function() {\n var pos = cm.getCursor();\n var cursor = cm.getSearchCursor(query, pos);\n for (var i = 0; i < repeat; i++) {\n var found = cursor.find(prev);\n if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }\n if (!found) {\n // SearchCursor may have returned null because it hit EOF, wrap\n // around and try again.\n cursor = cm.getSearchCursor(query,\n (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) );\n if (!cursor.find(prev)) {\n return;\n }\n }\n }\n return cursor.from();\n });\n }\n function clearSearchHighlight(cm) {\n var state = getSearchState(cm);\n cm.removeOverlay(getSearchState(cm).getOverlay());\n state.setOverlay(null);\n if (state.getScrollbarAnnotate()) {\n state.getScrollbarAnnotate().clear();\n state.setScrollbarAnnotate(null);\n }\n }\n /**\n * Check if pos is in the specified range, INCLUSIVE.\n * Range can be specified with 1 or 2 arguments.\n * If the first range argument is an array, treat it as an array of line\n * numbers. Match pos against any of the lines.\n * If the first range argument is a number,\n * if there is only 1 range argument, check if pos has the same line\n * number\n * if there are 2 range arguments, then check if pos is in between the two\n * range arguments.\n */\n function isInRange(pos, start, end) {\n if (typeof pos != 'number') {\n // Assume it is a cursor position. Get the line number.\n pos = pos.line;\n }\n if (start instanceof Array) {\n return inArray(pos, start);\n } else {\n if (end) {\n return (pos >= start && pos <= end);\n } else {\n return pos == start;\n }\n }\n }\n function getUserVisibleLines(cm) {\n var scrollInfo = cm.getScrollInfo();\n var occludeToleranceTop = 6;\n var occludeToleranceBottom = 10;\n var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local');\n var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top;\n var to = cm.coordsChar({left:0, top: bottomY}, 'local');\n return {top: from.line, bottom: to.line};\n }\n\n var ExCommandDispatcher = function() {\n this.buildCommandMap_();\n };\n ExCommandDispatcher.prototype = {\n processCommand: function(cm, input, opt_params) {\n var that = this;\n cm.operation(function () {\n cm.curOp.isVimOp = true;\n that._processCommand(cm, input, opt_params);\n });\n },\n _processCommand: function(cm, input, opt_params) {\n var vim = cm.state.vim;\n var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');\n var previousCommand = commandHistoryRegister.toString();\n if (vim.visualMode) {\n exitVisualMode(cm);\n }\n var inputStream = new CodeMirror.StringStream(input);\n // update \": with the latest command whether valid or invalid\n commandHistoryRegister.setText(input);\n var params = opt_params || {};\n params.input = input;\n try {\n this.parseInput_(cm, inputStream, params);\n } catch(e) {\n showConfirm(cm, e);\n throw e;\n }\n var command;\n var commandName;\n if (!params.commandName) {\n // If only a line range is defined, move to the line.\n if (params.line !== undefined) {\n commandName = 'move';\n }\n } else {\n command = this.matchCommand_(params.commandName);\n if (command) {\n commandName = command.name;\n if (command.excludeFromCommandHistory) {\n commandHistoryRegister.setText(previousCommand);\n }\n this.parseCommandArgs_(inputStream, params, command);\n if (command.type == 'exToKey') {\n // Handle Ex to Key mapping.\n for (var i = 0; i < command.toKeys.length; i++) {\n CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping');\n }\n return;\n } else if (command.type == 'exToEx') {\n // Handle Ex to Ex mapping.\n this.processCommand(cm, command.toInput);\n return;\n }\n }\n }\n if (!commandName) {\n showConfirm(cm, 'Not an editor command \":' + input + '\"');\n return;\n }\n try {\n exCommands[commandName](cm, params);\n // Possibly asynchronous commands (e.g. substitute, which might have a\n // user confirmation), are responsible for calling the callback when\n // done. All others have it taken care of for them here.\n if ((!command || !command.possiblyAsync) && params.callback) {\n params.callback();\n }\n } catch(e) {\n showConfirm(cm, e);\n throw e;\n }\n },\n parseInput_: function(cm, inputStream, result) {\n inputStream.eatWhile(':');\n // Parse range.\n if (inputStream.eat('%')) {\n result.line = cm.firstLine();\n result.lineEnd = cm.lastLine();\n } else {\n result.line = this.parseLineSpec_(cm, inputStream);\n if (result.line !== undefined && inputStream.eat(',')) {\n result.lineEnd = this.parseLineSpec_(cm, inputStream);\n }\n }\n\n // Parse command name.\n var commandMatch = inputStream.match(/^(\\w+)/);\n if (commandMatch) {\n result.commandName = commandMatch[1];\n } else {\n result.commandName = inputStream.match(/.*/)[0];\n }\n\n return result;\n },\n parseLineSpec_: function(cm, inputStream) {\n var numberMatch = inputStream.match(/^(\\d+)/);\n if (numberMatch) {\n return parseInt(numberMatch[1], 10) - 1;\n }\n switch (inputStream.next()) {\n case '.':\n return cm.getCursor().line;\n case '$':\n return cm.lastLine();\n case '\\'':\n var mark = cm.state.vim.marks[inputStream.next()];\n if (mark && mark.find()) {\n return mark.find().line;\n }\n throw new Error('Mark not set');\n default:\n inputStream.backUp(1);\n return undefined;\n }\n },\n parseCommandArgs_: function(inputStream, params, command) {\n if (inputStream.eol()) {\n return;\n }\n params.argString = inputStream.match(/.*/)[0];\n // Parse command-line arguments\n var delim = command.argDelimiter || /\\s+/;\n var args = trim(params.argString).split(delim);\n if (args.length && args[0]) {\n params.args = args;\n }\n },\n matchCommand_: function(commandName) {\n // Return the command in the command map that matches the shortest\n // prefix of the passed in command name. The match is guaranteed to be\n // unambiguous if the defaultExCommandMap's shortNames are set up\n // correctly. (see @code{defaultExCommandMap}).\n for (var i = commandName.length; i > 0; i--) {\n var prefix = commandName.substring(0, i);\n if (this.commandMap_[prefix]) {\n var command = this.commandMap_[prefix];\n if (command.name.indexOf(commandName) === 0) {\n return command;\n }\n }\n }\n return null;\n },\n buildCommandMap_: function() {\n this.commandMap_ = {};\n for (var i = 0; i < defaultExCommandMap.length; i++) {\n var command = defaultExCommandMap[i];\n var key = command.shortName || command.name;\n this.commandMap_[key] = command;\n }\n },\n map: function(lhs, rhs, ctx) {\n if (lhs != ':' && lhs.charAt(0) == ':') {\n if (ctx) { throw Error('Mode not supported for ex mappings'); }\n var commandName = lhs.substring(1);\n if (rhs != ':' && rhs.charAt(0) == ':') {\n // Ex to Ex mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: 'exToEx',\n toInput: rhs.substring(1),\n user: true\n };\n } else {\n // Ex to key mapping\n this.commandMap_[commandName] = {\n name: commandName,\n type: 'exToKey',\n toKeys: rhs,\n user: true\n };\n }\n } else {\n if (rhs != ':' && rhs.charAt(0) == ':') {\n // Key to Ex mapping.\n var mapping = {\n keys: lhs,\n type: 'keyToEx',\n exArgs: { input: rhs.substring(1) },\n user: true};\n if (ctx) { mapping.context = ctx; }\n defaultKeymap.unshift(mapping);\n } else {\n // Key to key mapping\n var mapping = {\n keys: lhs,\n type: 'keyToKey',\n toKeys: rhs,\n user: true\n };\n if (ctx) { mapping.context = ctx; }\n defaultKeymap.unshift(mapping);\n }\n }\n },\n unmap: function(lhs, ctx) {\n if (lhs != ':' && lhs.charAt(0) == ':') {\n // Ex to Ex or Ex to key mapping\n if (ctx) { throw Error('Mode not supported for ex mappings'); }\n var commandName = lhs.substring(1);\n if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {\n delete this.commandMap_[commandName];\n return;\n }\n } else {\n // Key to Ex or key to key mapping\n var keys = lhs;\n for (var i = 0; i < defaultKeymap.length; i++) {\n if (keys == defaultKeymap[i].keys\n && defaultKeymap[i].context === ctx\n && defaultKeymap[i].user) {\n defaultKeymap.splice(i, 1);\n return;\n }\n }\n }\n throw Error('No such mapping.');\n }\n };\n\n var exCommands = {\n colorscheme: function(cm, params) {\n if (!params.args || params.args.length < 1) {\n showConfirm(cm, cm.getOption('theme'));\n return;\n }\n cm.setOption('theme', params.args[0]);\n },\n map: function(cm, params, ctx) {\n var mapArgs = params.args;\n if (!mapArgs || mapArgs.length < 2) {\n if (cm) {\n showConfirm(cm, 'Invalid mapping: ' + params.input);\n }\n return;\n }\n exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);\n },\n imap: function(cm, params) { this.map(cm, params, 'insert'); },\n nmap: function(cm, params) { this.map(cm, params, 'normal'); },\n vmap: function(cm, params) { this.map(cm, params, 'visual'); },\n unmap: function(cm, params, ctx) {\n var mapArgs = params.args;\n if (!mapArgs || mapArgs.length < 1) {\n if (cm) {\n showConfirm(cm, 'No such mapping: ' + params.input);\n }\n return;\n }\n exCommandDispatcher.unmap(mapArgs[0], ctx);\n },\n move: function(cm, params) {\n commandDispatcher.processCommand(cm, cm.state.vim, {\n type: 'motion',\n motion: 'moveToLineOrEdgeOfDocument',\n motionArgs: { forward: false, explicitRepeat: true,\n linewise: true },\n repeatOverride: params.line+1});\n },\n set: function(cm, params) {\n var setArgs = params.args;\n // Options passed through to the setOption/getOption calls. May be passed in by the\n // local/global versions of the set command\n var setCfg = params.setCfg || {};\n if (!setArgs || setArgs.length < 1) {\n if (cm) {\n showConfirm(cm, 'Invalid mapping: ' + params.input);\n }\n return;\n }\n var expr = setArgs[0].split('=');\n var optionName = expr[0];\n var value = expr[1];\n var forceGet = false;\n\n if (optionName.charAt(optionName.length - 1) == '?') {\n // If post-fixed with ?, then the set is actually a get.\n if (value) { throw Error('Trailing characters: ' + params.argString); }\n optionName = optionName.substring(0, optionName.length - 1);\n forceGet = true;\n }\n if (value === undefined && optionName.substring(0, 2) == 'no') {\n // To set boolean options to false, the option name is prefixed with\n // 'no'.\n optionName = optionName.substring(2);\n value = false;\n }\n\n var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';\n if (optionIsBoolean && value == undefined) {\n // Calling set with a boolean option sets it to true.\n value = true;\n }\n // If no value is provided, then we assume this is a get.\n if (!optionIsBoolean && value === undefined || forceGet) {\n var oldValue = getOption(optionName, cm, setCfg);\n if (oldValue === true || oldValue === false) {\n showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);\n } else {\n showConfirm(cm, ' ' + optionName + '=' + oldValue);\n }\n } else {\n setOption(optionName, value, cm, setCfg);\n }\n },\n setlocal: function (cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {scope: 'local'};\n this.set(cm, params);\n },\n setglobal: function (cm, params) {\n // setCfg is passed through to setOption\n params.setCfg = {scope: 'global'};\n this.set(cm, params);\n },\n registers: function(cm, params) {\n var regArgs = params.args;\n var registers = vimGlobalState.registerController.registers;\n var regInfo = '----------Registers----------<br><br>';\n if (!regArgs) {\n for (var registerName in registers) {\n var text = registers[registerName].toString();\n if (text.length) {\n regInfo += '\"' + registerName + ' ' + text + '<br>';\n }\n }\n } else {\n var registerName;\n regArgs = regArgs.join('');\n for (var i = 0; i < regArgs.length; i++) {\n registerName = regArgs.charAt(i);\n if (!vimGlobalState.registerController.isValidRegister(registerName)) {\n continue;\n }\n var register = registers[registerName] || new Register();\n regInfo += '\"' + registerName + ' ' + register.toString() + '<br>';\n }\n }\n showConfirm(cm, regInfo);\n },\n sort: function(cm, params) {\n var reverse, ignoreCase, unique, number;\n function parseArgs() {\n if (params.argString) {\n var args = new CodeMirror.StringStream(params.argString);\n if (args.eat('!')) { reverse = true; }\n if (args.eol()) { return; }\n if (!args.eatSpace()) { return 'Invalid arguments'; }\n var opts = args.match(/[a-z]+/);\n if (opts) {\n opts = opts[0];\n ignoreCase = opts.indexOf('i') != -1;\n unique = opts.indexOf('u') != -1;\n var decimal = opts.indexOf('d') != -1 && 1;\n var hex = opts.indexOf('x') != -1 && 1;\n var octal = opts.indexOf('o') != -1 && 1;\n if (decimal + hex + octal > 1) { return 'Invalid arguments'; }\n number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';\n }\n if (args.match(/\\/.*\\//)) { return 'patterns not supported'; }\n }\n }\n var err = parseArgs();\n if (err) {\n showConfirm(cm, err + ': ' + params.argString);\n return;\n }\n var lineStart = params.line || cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine();\n if (lineStart == lineEnd) { return; }\n var curStart = Pos(lineStart, 0);\n var curEnd = Pos(lineEnd, lineLength(cm, lineEnd));\n var text = cm.getRange(curStart, curEnd).split('\\n');\n var numberRegex = (number == 'decimal') ? /(-?)([\\d]+)/ :\n (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i :\n (number == 'octal') ? /([0-7]+)/ : null;\n var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null;\n var numPart = [], textPart = [];\n if (number) {\n for (var i = 0; i < text.length; i++) {\n if (numberRegex.exec(text[i])) {\n numPart.push(text[i]);\n } else {\n textPart.push(text[i]);\n }\n }\n } else {\n textPart = text;\n }\n function compareFn(a, b) {\n if (reverse) { var tmp; tmp = a; a = b; b = tmp; }\n if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); }\n var anum = number && numberRegex.exec(a);\n var bnum = number && numberRegex.exec(b);\n if (!anum) { return a < b ? -1 : 1; }\n anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);\n bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);\n return anum - bnum;\n }\n numPart.sort(compareFn);\n textPart.sort(compareFn);\n text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart);\n if (unique) { // Remove duplicate lines\n var textOld = text;\n var lastLine;\n text = [];\n for (var i = 0; i < textOld.length; i++) {\n if (textOld[i] != lastLine) {\n text.push(textOld[i]);\n }\n lastLine = textOld[i];\n }\n }\n cm.replaceRange(text.join('\\n'), curStart, curEnd);\n },\n global: function(cm, params) {\n // a global command is of the form\n // :[range]g/pattern/[cmd]\n // argString holds the string /pattern/[cmd]\n var argString = params.argString;\n if (!argString) {\n showConfirm(cm, 'Regular Expression missing from global');\n return;\n }\n // range is specified here\n var lineStart = (params.line !== undefined) ? params.line : cm.firstLine();\n var lineEnd = params.lineEnd || params.line || cm.lastLine();\n // get the tokens from argString\n var tokens = splitBySlash(argString);\n var regexPart = argString, cmd;\n if (tokens.length) {\n regexPart = tokens[0];\n cmd = tokens.slice(1, tokens.length).join('/');\n }\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise\n // use the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true /** ignoreCase */,\n true /** smartCase */);\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + regexPart);\n return;\n }\n }\n // now that we have the regexPart, search for regex matches in the\n // specified range of lines\n var query = getSearchState(cm).getQuery();\n var matchedLines = [], content = '';\n for (var i = lineStart; i <= lineEnd; i++) {\n var matched = query.test(cm.getLine(i));\n if (matched) {\n matchedLines.push(i+1);\n content+= cm.getLine(i) + '<br>';\n }\n }\n // if there is no [cmd], just display the list of matched lines\n if (!cmd) {\n showConfirm(cm, content);\n return;\n }\n var index = 0;\n var nextCommand = function() {\n if (index < matchedLines.length) {\n var command = matchedLines[index] + cmd;\n exCommandDispatcher.processCommand(cm, command, {\n callback: nextCommand\n });\n }\n index++;\n };\n nextCommand();\n },\n substitute: function(cm, params) {\n if (!cm.getSearchCursor) {\n throw new Error('Search feature not available. Requires searchcursor.js or ' +\n 'any other getSearchCursor implementation.');\n }\n var argString = params.argString;\n var tokens = argString ? splitBySlash(argString) : [];\n var regexPart, replacePart = '', trailing, flagsPart, count;\n var confirm = false; // Whether to confirm each replace.\n var global = false; // True to replace all instances on a line, false to replace only 1.\n if (tokens.length) {\n regexPart = tokens[0];\n replacePart = tokens[1];\n if (replacePart !== undefined) {\n if (getOption('pcre')) {\n replacePart = unescapeRegexReplace(replacePart);\n } else {\n replacePart = translateRegexReplace(replacePart);\n }\n vimGlobalState.lastSubstituteReplacePart = replacePart;\n }\n trailing = tokens[2] ? tokens[2].split(' ') : [];\n } else {\n // either the argString is empty or its of the form ' hello/world'\n // actually splitBySlash returns a list of tokens\n // only if the string starts with a '/'\n if (argString && argString.length) {\n showConfirm(cm, 'Substitutions should be of the form ' +\n ':s/pattern/replace/');\n return;\n }\n }\n // After the 3rd slash, we can have flags followed by a space followed\n // by count.\n if (trailing) {\n flagsPart = trailing[0];\n count = parseInt(trailing[1]);\n if (flagsPart) {\n if (flagsPart.indexOf('c') != -1) {\n confirm = true;\n flagsPart.replace('c', '');\n }\n if (flagsPart.indexOf('g') != -1) {\n global = true;\n flagsPart.replace('g', '');\n }\n regexPart = regexPart + '/' + flagsPart;\n }\n }\n if (regexPart) {\n // If regex part is empty, then use the previous query. Otherwise use\n // the regex part as the new query.\n try {\n updateSearchQuery(cm, regexPart, true /** ignoreCase */,\n true /** smartCase */);\n } catch (e) {\n showConfirm(cm, 'Invalid regex: ' + regexPart);\n return;\n }\n }\n replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;\n if (replacePart === undefined) {\n showConfirm(cm, 'No previous substitute regular expression');\n return;\n }\n var state = getSearchState(cm);\n var query = state.getQuery();\n var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line;\n var lineEnd = params.lineEnd || lineStart;\n if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) {\n lineEnd = Infinity;\n }\n if (count) {\n lineStart = lineEnd;\n lineEnd = lineStart + count - 1;\n }\n var startPos = clipCursorToContent(cm, Pos(lineStart, 0));\n var cursor = cm.getSearchCursor(query, startPos);\n doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);\n },\n redo: CodeMirror.commands.redo,\n undo: CodeMirror.commands.undo,\n write: function(cm) {\n if (CodeMirror.commands.save) {\n // If a save command is defined, call it.\n CodeMirror.commands.save(cm);\n } else {\n // Saves to text area if no save command is defined.\n cm.save();\n }\n },\n nohlsearch: function(cm) {\n clearSearchHighlight(cm);\n },\n delmarks: function(cm, params) {\n if (!params.argString || !trim(params.argString)) {\n showConfirm(cm, 'Argument required');\n return;\n }\n\n var state = cm.state.vim;\n var stream = new CodeMirror.StringStream(trim(params.argString));\n while (!stream.eol()) {\n stream.eatSpace();\n\n // Record the streams position at the beginning of the loop for use\n // in error messages.\n var count = stream.pos;\n\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n }\n\n var sym = stream.next();\n // Check if this symbol is part of a range\n if (stream.match('-', true)) {\n // This symbol is part of a range.\n\n // The range must terminate at an alphabetic character.\n if (!stream.match(/[a-zA-Z]/, false)) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n }\n\n var startMark = sym;\n var finishMark = stream.next();\n // The range must terminate at an alphabetic character which\n // shares the same case as the start of the range.\n if (isLowerCase(startMark) && isLowerCase(finishMark) ||\n isUpperCase(startMark) && isUpperCase(finishMark)) {\n var start = startMark.charCodeAt(0);\n var finish = finishMark.charCodeAt(0);\n if (start >= finish) {\n showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));\n return;\n }\n\n // Because marks are always ASCII values, and we have\n // determined that they are the same case, we can use\n // their char codes to iterate through the defined range.\n for (var j = 0; j <= finish - start; j++) {\n var mark = String.fromCharCode(start + j);\n delete state.marks[mark];\n }\n } else {\n showConfirm(cm, 'Invalid argument: ' + startMark + '-');\n return;\n }\n } else {\n // This symbol is a valid mark, and is not part of a range.\n delete state.marks[sym];\n }\n }\n }\n };\n\n var exCommandDispatcher = new ExCommandDispatcher();\n\n /**\n * @param {CodeMirror} cm CodeMirror instance we are in.\n * @param {boolean} confirm Whether to confirm each replace.\n * @param {Cursor} lineStart Line to start replacing from.\n * @param {Cursor} lineEnd Line to stop replacing at.\n * @param {RegExp} query Query for performing matches with.\n * @param {string} replaceWith Text to replace matches with. May contain $1,\n * $2, etc for replacing captured groups using Javascript replace.\n * @param {function()} callback A callback for when the replace is done.\n */\n function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,\n replaceWith, callback) {\n // Set up all the functions.\n cm.state.vim.exMode = true;\n var done = false;\n var lastPos = searchCursor.from();\n function replaceAll() {\n cm.operation(function() {\n while (!done) {\n replace();\n next();\n }\n stop();\n });\n }\n function replace() {\n var text = cm.getRange(searchCursor.from(), searchCursor.to());\n var newText = text.replace(query, replaceWith);\n searchCursor.replace(newText);\n }\n function next() {\n // The below only loops to skip over multiple occurrences on the same\n // line when 'global' is not true.\n while(searchCursor.findNext() &&\n isInRange(searchCursor.from(), lineStart, lineEnd)) {\n if (!global && lastPos && searchCursor.from().line == lastPos.line) {\n continue;\n }\n cm.scrollIntoView(searchCursor.from(), 30);\n cm.setSelection(searchCursor.from(), searchCursor.to());\n lastPos = searchCursor.from();\n done = false;\n return;\n }\n done = true;\n }\n function stop(close) {\n if (close) { close(); }\n cm.focus();\n if (lastPos) {\n cm.setCursor(lastPos);\n var vim = cm.state.vim;\n vim.exMode = false;\n vim.lastHPos = vim.lastHSPos = lastPos.ch;\n }\n if (callback) { callback(); }\n }\n function onPromptKeyDown(e, _value, close) {\n // Swallow all keys.\n CodeMirror.e_stop(e);\n var keyName = CodeMirror.keyName(e);\n switch (keyName) {\n case 'Y':\n replace(); next(); break;\n case 'N':\n next(); break;\n case 'A':\n // replaceAll contains a call to close of its own. We don't want it\n // to fire too early or multiple times.\n var savedCallback = callback;\n callback = undefined;\n cm.operation(replaceAll);\n callback = savedCallback;\n break;\n case 'L':\n replace();\n // fall through and exit.\n case 'Q':\n case 'Esc':\n case 'Ctrl-C':\n case 'Ctrl-[':\n stop(close);\n break;\n }\n if (done) { stop(close); }\n return true;\n }\n\n // Actually do replace.\n next();\n if (done) {\n showConfirm(cm, 'No matches for ' + query.source);\n return;\n }\n if (!confirm) {\n replaceAll();\n if (callback) { callback(); };\n return;\n }\n showPrompt(cm, {\n prefix: 'replace with <strong>' + replaceWith + '</strong> (y/n/a/q/l)',\n onKeyDown: onPromptKeyDown\n });\n }\n\n CodeMirror.keyMap.vim = {\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function exitInsertMode(cm) {\n var vim = cm.state.vim;\n var macroModeState = vimGlobalState.macroModeState;\n var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.');\n var isPlaying = macroModeState.isPlaying;\n var lastChange = macroModeState.lastInsertModeChanges;\n // In case of visual block, the insertModeChanges are not saved as a\n // single word, so we convert them to a single word\n // so as to update the \". register as expected in real vim.\n var text = [];\n if (!isPlaying) {\n var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1;\n var changes = lastChange.changes;\n var text = [];\n var i = 0;\n // In case of multiple selections in blockwise visual,\n // the inserted text, for example: 'f<Backspace>oo', is stored as\n // 'f', 'f', InsertModeKey 'o', 'o', 'o', 'o'. (if you have a block with 2 lines).\n // We push the contents of the changes array as per the following:\n // 1. In case of InsertModeKey, just increment by 1.\n // 2. In case of a character, jump by selLength (2 in the example).\n while (i < changes.length) {\n // This loop will convert 'ff<bs>oooo' to 'f<bs>oo'.\n text.push(changes[i]);\n if (changes[i] instanceof InsertModeKey) {\n i++;\n } else {\n i+= selLength;\n }\n }\n lastChange.changes = text;\n cm.off('change', onChange);\n CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);\n }\n if (!isPlaying && vim.insertModeRepeat > 1) {\n // Perform insert mode repeat for commands like 3,a and 3,o.\n repeatLastEdit(cm, vim, vim.insertModeRepeat - 1,\n true /** repeatForInsert */);\n vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;\n }\n delete vim.insertModeRepeat;\n vim.insertMode = false;\n cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1);\n cm.setOption('keyMap', 'vim');\n cm.setOption('disableInput', true);\n cm.toggleOverwrite(false); // exit replace mode if we were in it.\n // update the \". register before exiting insert mode\n insertModeChangeRegister.setText(lastChange.changes.join(''));\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"normal\"});\n if (macroModeState.isRecording) {\n logInsertModeChange(macroModeState);\n }\n }\n\n function _mapCommand(command) {\n defaultKeymap.unshift(command);\n }\n\n function mapCommand(keys, type, name, args, extra) {\n var command = {keys: keys, type: type};\n command[type] = name;\n command[type + \"Args\"] = args;\n for (var key in extra)\n command[key] = extra[key];\n _mapCommand(command);\n }\n\n // The timeout in milliseconds for the two-character ESC keymap should be\n // adjusted according to your typing speed to prevent false positives.\n defineOption('insertModeEscKeysTimeout', 200, 'number');\n\n CodeMirror.keyMap['vim-insert'] = {\n // TODO: override navigation keys so that Esc will cancel automatic\n // indentation from o, O, i_<CR>\n 'Ctrl-N': 'autocomplete',\n 'Ctrl-P': 'autocomplete',\n 'Enter': function(cm) {\n var fn = CodeMirror.commands.newlineAndIndentContinueComment ||\n CodeMirror.commands.newlineAndIndent;\n fn(cm);\n },\n fallthrough: ['default'],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n CodeMirror.keyMap['vim-replace'] = {\n 'Backspace': 'goCharLeft',\n fallthrough: ['vim-insert'],\n attach: attachVimMap,\n detach: detachVimMap,\n call: cmKey\n };\n\n function executeMacroRegister(cm, vim, macroModeState, registerName) {\n var register = vimGlobalState.registerController.getRegister(registerName);\n if (registerName == ':') {\n // Read-only register containing last Ex command.\n if (register.keyBuffer[0]) {\n exCommandDispatcher.processCommand(cm, register.keyBuffer[0]);\n }\n macroModeState.isPlaying = false;\n return;\n }\n var keyBuffer = register.keyBuffer;\n var imc = 0;\n macroModeState.isPlaying = true;\n macroModeState.replaySearchQueries = register.searchQueries.slice(0);\n for (var i = 0; i < keyBuffer.length; i++) {\n var text = keyBuffer[i];\n var match, key;\n while (text) {\n // Pull off one command key, which is either a single character\n // or a special sequence wrapped in '<' and '>', e.g. '<Space>'.\n match = (/<\\w+-.+?>|<\\w+>|./).exec(text);\n key = match[0];\n text = text.substring(match.index + key.length);\n CodeMirror.Vim.handleKey(cm, key, 'macro');\n if (vim.insertMode) {\n var changes = register.insertModeChanges[imc++].changes;\n vimGlobalState.macroModeState.lastInsertModeChanges.changes =\n changes;\n repeatInsertModeChanges(cm, changes, 1);\n exitInsertMode(cm);\n }\n }\n };\n macroModeState.isPlaying = false;\n }\n\n function logKey(macroModeState, key) {\n if (macroModeState.isPlaying) { return; }\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n if (register) {\n register.pushText(key);\n }\n }\n\n function logInsertModeChange(macroModeState) {\n if (macroModeState.isPlaying) { return; }\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n if (register && register.pushInsertModeChanges) {\n register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);\n }\n }\n\n function logSearchQuery(macroModeState, query) {\n if (macroModeState.isPlaying) { return; }\n var registerName = macroModeState.latestRegister;\n var register = vimGlobalState.registerController.getRegister(registerName);\n if (register && register.pushSearchQuery) {\n register.pushSearchQuery(query);\n }\n }\n\n /**\n * Listens for changes made in insert mode.\n * Should only be active in insert mode.\n */\n function onChange(_cm, changeObj) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n if (!macroModeState.isPlaying) {\n while(changeObj) {\n lastChange.expectCursorActivityForChange = true;\n if (changeObj.origin == '+input' || changeObj.origin == 'paste'\n || changeObj.origin === undefined /* only in testing */) {\n var text = changeObj.text.join('\\n');\n lastChange.changes.push(text);\n }\n // Change objects may be chained with next.\n changeObj = changeObj.next;\n }\n }\n }\n\n /**\n * Listens for any kind of cursor activity on CodeMirror.\n */\n function onCursorActivity(cm) {\n var vim = cm.state.vim;\n if (vim.insertMode) {\n // Tracking cursor activity in insert mode (for macro support).\n var macroModeState = vimGlobalState.macroModeState;\n if (macroModeState.isPlaying) { return; }\n var lastChange = macroModeState.lastInsertModeChanges;\n if (lastChange.expectCursorActivityForChange) {\n lastChange.expectCursorActivityForChange = false;\n } else {\n // Cursor moved outside the context of an edit. Reset the change.\n lastChange.changes = [];\n }\n } else if (!cm.curOp.isVimOp) {\n handleExternalSelection(cm, vim);\n }\n if (vim.visualMode) {\n updateFakeCursor(cm);\n }\n }\n function updateFakeCursor(cm) {\n var vim = cm.state.vim;\n var from = clipCursorToContent(cm, copyCursor(vim.sel.head));\n var to = offsetCursor(from, 0, 1);\n if (vim.fakeCursor) {\n vim.fakeCursor.clear();\n }\n vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'});\n }\n function handleExternalSelection(cm, vim) {\n var anchor = cm.getCursor('anchor');\n var head = cm.getCursor('head');\n // Enter or exit visual mode to match mouse selection.\n if (vim.visualMode && !cm.somethingSelected()) {\n exitVisualMode(cm, false);\n } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {\n vim.visualMode = true;\n vim.visualLine = false;\n CodeMirror.signal(cm, \"vim-mode-change\", {mode: \"visual\"});\n }\n if (vim.visualMode) {\n // Bind CodeMirror selection model to vim selection model.\n // Mouse selections are considered visual characterwise.\n var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;\n var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;\n head = offsetCursor(head, 0, headOffset);\n anchor = offsetCursor(anchor, 0, anchorOffset);\n vim.sel = {\n anchor: anchor,\n head: head\n };\n updateMark(cm, vim, '<', cursorMin(head, anchor));\n updateMark(cm, vim, '>', cursorMax(head, anchor));\n } else if (!vim.insertMode) {\n // Reset lastHPos if selection was modified by something outside of vim mode e.g. by mouse.\n vim.lastHPos = cm.getCursor().ch;\n }\n }\n\n /** Wrapper for special keys pressed in insert mode */\n function InsertModeKey(keyName) {\n this.keyName = keyName;\n }\n\n /**\n * Handles raw key down events from the text area.\n * - Should only be active in insert mode.\n * - For recording deletes in insert mode.\n */\n function onKeyEventTargetKeyDown(e) {\n var macroModeState = vimGlobalState.macroModeState;\n var lastChange = macroModeState.lastInsertModeChanges;\n var keyName = CodeMirror.keyName(e);\n if (!keyName) { return; }\n function onKeyFound() {\n lastChange.changes.push(new InsertModeKey(keyName));\n return true;\n }\n if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {\n CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound);\n }\n }\n\n /**\n * Repeats the last edit, which includes exactly 1 command and at most 1\n * insert. Operator and motion commands are read from lastEditInputState,\n * while action commands are read from lastEditActionCommand.\n *\n * If repeatForInsert is true, then the function was called by\n * exitInsertMode to repeat the insert mode changes the user just made. The\n * corresponding enterInsertMode call was made with a count.\n */\n function repeatLastEdit(cm, vim, repeat, repeatForInsert) {\n var macroModeState = vimGlobalState.macroModeState;\n macroModeState.isPlaying = true;\n var isAction = !!vim.lastEditActionCommand;\n var cachedInputState = vim.inputState;\n function repeatCommand() {\n if (isAction) {\n commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);\n } else {\n commandDispatcher.evalInput(cm, vim);\n }\n }\n function repeatInsert(repeat) {\n if (macroModeState.lastInsertModeChanges.changes.length > 0) {\n // For some reason, repeat cw in desktop VIM does not repeat\n // insert mode changes. Will conform to that behavior.\n repeat = !vim.lastEditActionCommand ? 1 : repeat;\n var changeObject = macroModeState.lastInsertModeChanges;\n repeatInsertModeChanges(cm, changeObject.changes, repeat);\n }\n }\n vim.inputState = vim.lastEditInputState;\n if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {\n // o and O repeat have to be interlaced with insert repeats so that the\n // insertions appear on separate lines instead of the last line.\n for (var i = 0; i < repeat; i++) {\n repeatCommand();\n repeatInsert(1);\n }\n } else {\n if (!repeatForInsert) {\n // Hack to get the cursor to end up at the right place. If I is\n // repeated in insert mode repeat, cursor will be 1 insert\n // change set left of where it should be.\n repeatCommand();\n }\n repeatInsert(repeat);\n }\n vim.inputState = cachedInputState;\n if (vim.insertMode && !repeatForInsert) {\n // Don't exit insert mode twice. If repeatForInsert is set, then we\n // were called by an exitInsertMode call lower on the stack.\n exitInsertMode(cm);\n }\n macroModeState.isPlaying = false;\n };\n\n function repeatInsertModeChanges(cm, changes, repeat) {\n function keyHandler(binding) {\n if (typeof binding == 'string') {\n CodeMirror.commands[binding](cm);\n } else {\n binding(cm);\n }\n return true;\n }\n var head = cm.getCursor('head');\n var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;\n if (inVisualBlock) {\n // Set up block selection again for repeating the changes.\n var vim = cm.state.vim;\n var lastSel = vim.lastSelection;\n var offset = getOffset(lastSel.anchor, lastSel.head);\n selectForInsert(cm, head, offset.line + 1);\n repeat = cm.listSelections().length;\n cm.setCursor(head);\n }\n for (var i = 0; i < repeat; i++) {\n if (inVisualBlock) {\n cm.setCursor(offsetCursor(head, i, 0));\n }\n for (var j = 0; j < changes.length; j++) {\n var change = changes[j];\n if (change instanceof InsertModeKey) {\n CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler);\n } else {\n var cur = cm.getCursor();\n cm.replaceRange(change, cur, cur);\n }\n }\n }\n if (inVisualBlock) {\n cm.setCursor(offsetCursor(head, 0, 1));\n }\n }\n\n resetVimGlobalState();\n return vimApi;\n };\n // Initialize Vim and make it available as an API.\n CodeMirror.Vim = Vim();\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/keymap/vim.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/keymap/sublime.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n// A rough approximation of Sublime Text's keybindings\n// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"), require(\"../addon/search/searchcursor\"), require(\"../addon/edit/matchbrackets\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\", \"../addon/search/searchcursor\", \"../addon/edit/matchbrackets\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var map = CodeMirror.keyMap.sublime = {fallthrough: \"default\"};\n var cmds = CodeMirror.commands;\n var Pos = CodeMirror.Pos;\n var mac = CodeMirror.keyMap[\"default\"] == CodeMirror.keyMap.macDefault;\n var ctrl = mac ? \"Cmd-\" : \"Ctrl-\";\n\n // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that.\n function findPosSubword(doc, start, dir) {\n if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));\n var line = doc.getLine(start.line);\n if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));\n var state = \"start\", type;\n for (var pos = start.ch, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {\n var next = line.charAt(dir < 0 ? pos - 1 : pos);\n var cat = next != \"_\" && CodeMirror.isWordChar(next) ? \"w\" : \"o\";\n if (cat == \"w\" && next.toUpperCase() == next) cat = \"W\";\n if (state == \"start\") {\n if (cat != \"o\") { state = \"in\"; type = cat; }\n } else if (state == \"in\") {\n if (type != cat) {\n if (type == \"w\" && cat == \"W\" && dir < 0) pos--;\n if (type == \"W\" && cat == \"w\" && dir > 0) { type = \"w\"; continue; }\n break;\n }\n }\n }\n return Pos(start.line, pos);\n }\n\n function moveSubword(cm, dir) {\n cm.extendSelectionsBy(function(range) {\n if (cm.display.shift || cm.doc.extend || range.empty())\n return findPosSubword(cm.doc, range.head, dir);\n else\n return dir < 0 ? range.from() : range.to();\n });\n }\n\n cmds[map[\"Alt-Left\"] = \"goSubwordLeft\"] = function(cm) { moveSubword(cm, -1); };\n cmds[map[\"Alt-Right\"] = \"goSubwordRight\"] = function(cm) { moveSubword(cm, 1); };\n\n var scrollLineCombo = mac ? \"Ctrl-Alt-\" : \"Ctrl-\";\n\n cmds[map[scrollLineCombo + \"Up\"] = \"scrollLineUp\"] = function(cm) {\n var info = cm.getScrollInfo();\n if (!cm.somethingSelected()) {\n var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, \"local\");\n if (cm.getCursor().line >= visibleBottomLine)\n cm.execCommand(\"goLineUp\");\n }\n cm.scrollTo(null, info.top - cm.defaultTextHeight());\n };\n cmds[map[scrollLineCombo + \"Down\"] = \"scrollLineDown\"] = function(cm) {\n var info = cm.getScrollInfo();\n if (!cm.somethingSelected()) {\n var visibleTopLine = cm.lineAtHeight(info.top, \"local\")+1;\n if (cm.getCursor().line <= visibleTopLine)\n cm.execCommand(\"goLineDown\");\n }\n cm.scrollTo(null, info.top + cm.defaultTextHeight());\n };\n\n cmds[map[\"Shift-\" + ctrl + \"L\"] = \"splitSelectionByLine\"] = function(cm) {\n var ranges = cm.listSelections(), lineRanges = [];\n for (var i = 0; i < ranges.length; i++) {\n var from = ranges[i].from(), to = ranges[i].to();\n for (var line = from.line; line <= to.line; ++line)\n if (!(to.line > from.line && line == to.line && to.ch == 0))\n lineRanges.push({anchor: line == from.line ? from : Pos(line, 0),\n head: line == to.line ? to : Pos(line)});\n }\n cm.setSelections(lineRanges, 0);\n };\n\n map[\"Shift-Tab\"] = \"indentLess\";\n\n cmds[map[\"Esc\"] = \"singleSelectionTop\"] = function(cm) {\n var range = cm.listSelections()[0];\n cm.setSelection(range.anchor, range.head, {scroll: false});\n };\n\n cmds[map[ctrl + \"L\"] = \"selectLine\"] = function(cm) {\n var ranges = cm.listSelections(), extended = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n extended.push({anchor: Pos(range.from().line, 0),\n head: Pos(range.to().line + 1, 0)});\n }\n cm.setSelections(extended);\n };\n\n map[\"Shift-Ctrl-K\"] = \"deleteLine\";\n\n function insertLine(cm, above) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n cm.operation(function() {\n var len = cm.listSelections().length, newSelection = [], last = -1;\n for (var i = 0; i < len; i++) {\n var head = cm.listSelections()[i].head;\n if (head.line <= last) continue;\n var at = Pos(head.line + (above ? 0 : 1), 0);\n cm.replaceRange(\"\\n\", at, null, \"+insertLine\");\n cm.indentLine(at.line, null, true);\n newSelection.push({head: at, anchor: at});\n last = head.line + 1;\n }\n cm.setSelections(newSelection);\n });\n }\n\n cmds[map[ctrl + \"Enter\"] = \"insertLineAfter\"] = function(cm) { return insertLine(cm, false); };\n\n cmds[map[\"Shift-\" + ctrl + \"Enter\"] = \"insertLineBefore\"] = function(cm) { return insertLine(cm, true); };\n\n function wordAt(cm, pos) {\n var start = pos.ch, end = start, line = cm.getLine(pos.line);\n while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start;\n while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end;\n return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)};\n }\n\n cmds[map[ctrl + \"D\"] = \"selectNextOccurrence\"] = function(cm) {\n var from = cm.getCursor(\"from\"), to = cm.getCursor(\"to\");\n var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel;\n if (CodeMirror.cmpPos(from, to) == 0) {\n var word = wordAt(cm, from);\n if (!word.word) return;\n cm.setSelection(word.from, word.to);\n fullWord = true;\n } else {\n var text = cm.getRange(from, to);\n var query = fullWord ? new RegExp(\"\\\\b\" + text + \"\\\\b\") : text;\n var cur = cm.getSearchCursor(query, to);\n if (cur.findNext()) {\n cm.addSelection(cur.from(), cur.to());\n } else {\n cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));\n if (cur.findNext())\n cm.addSelection(cur.from(), cur.to());\n }\n }\n if (fullWord)\n cm.state.sublimeFindFullWord = cm.doc.sel;\n };\n\n var mirror = \"(){}[]\";\n function selectBetweenBrackets(cm) {\n var pos = cm.getCursor(), opening = cm.scanForBracket(pos, -1);\n if (!opening) return;\n for (;;) {\n var closing = cm.scanForBracket(pos, 1);\n if (!closing) return;\n if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) {\n cm.setSelection(Pos(opening.pos.line, opening.pos.ch + 1), closing.pos, false);\n return true;\n }\n pos = Pos(closing.pos.line, closing.pos.ch + 1);\n }\n }\n\n cmds[map[\"Shift-\" + ctrl + \"Space\"] = \"selectScope\"] = function(cm) {\n selectBetweenBrackets(cm) || cm.execCommand(\"selectAll\");\n };\n cmds[map[\"Shift-\" + ctrl + \"M\"] = \"selectBetweenBrackets\"] = function(cm) {\n if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;\n };\n\n cmds[map[ctrl + \"M\"] = \"goToBracket\"] = function(cm) {\n cm.extendSelectionsBy(function(range) {\n var next = cm.scanForBracket(range.head, 1);\n if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;\n var prev = cm.scanForBracket(range.head, -1);\n return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;\n });\n };\n\n var swapLineCombo = mac ? \"Cmd-Ctrl-\" : \"Shift-Ctrl-\";\n\n cmds[map[swapLineCombo + \"Up\"] = \"swapLineUp\"] = function(cm) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), linesToMove = [], at = cm.firstLine() - 1, newSels = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], from = range.from().line - 1, to = range.to().line;\n newSels.push({anchor: Pos(range.anchor.line - 1, range.anchor.ch),\n head: Pos(range.head.line - 1, range.head.ch)});\n if (range.to().ch == 0 && !range.empty()) --to;\n if (from > at) linesToMove.push(from, to);\n else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n at = to;\n }\n cm.operation(function() {\n for (var i = 0; i < linesToMove.length; i += 2) {\n var from = linesToMove[i], to = linesToMove[i + 1];\n var line = cm.getLine(from);\n cm.replaceRange(\"\", Pos(from, 0), Pos(from + 1, 0), \"+swapLine\");\n if (to > cm.lastLine())\n cm.replaceRange(\"\\n\" + line, Pos(cm.lastLine()), null, \"+swapLine\");\n else\n cm.replaceRange(line + \"\\n\", Pos(to, 0), null, \"+swapLine\");\n }\n cm.setSelections(newSels);\n cm.scrollIntoView();\n });\n };\n\n cmds[map[swapLineCombo + \"Down\"] = \"swapLineDown\"] = function(cm) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), linesToMove = [], at = cm.lastLine() + 1;\n for (var i = ranges.length - 1; i >= 0; i--) {\n var range = ranges[i], from = range.to().line + 1, to = range.from().line;\n if (range.to().ch == 0 && !range.empty()) from--;\n if (from < at) linesToMove.push(from, to);\n else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;\n at = to;\n }\n cm.operation(function() {\n for (var i = linesToMove.length - 2; i >= 0; i -= 2) {\n var from = linesToMove[i], to = linesToMove[i + 1];\n var line = cm.getLine(from);\n if (from == cm.lastLine())\n cm.replaceRange(\"\", Pos(from - 1), Pos(from), \"+swapLine\");\n else\n cm.replaceRange(\"\", Pos(from, 0), Pos(from + 1, 0), \"+swapLine\");\n cm.replaceRange(line + \"\\n\", Pos(to, 0), null, \"+swapLine\");\n }\n cm.scrollIntoView();\n });\n };\n\n cmds[map[ctrl + \"/\"] = \"toggleCommentIndented\"] = function(cm) {\n cm.toggleComment({ indent: true });\n }\n\n cmds[map[ctrl + \"J\"] = \"joinLines\"] = function(cm) {\n var ranges = cm.listSelections(), joined = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], from = range.from();\n var start = from.line, end = range.to().line;\n while (i < ranges.length - 1 && ranges[i + 1].from().line == end)\n end = ranges[++i].to().line;\n joined.push({start: start, end: end, anchor: !range.empty() && from});\n }\n cm.operation(function() {\n var offset = 0, ranges = [];\n for (var i = 0; i < joined.length; i++) {\n var obj = joined[i];\n var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), head;\n for (var line = obj.start; line <= obj.end; line++) {\n var actual = line - offset;\n if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1);\n if (actual < cm.lastLine()) {\n cm.replaceRange(\" \", Pos(actual), Pos(actual + 1, /^\\s*/.exec(cm.getLine(actual + 1))[0].length));\n ++offset;\n }\n }\n ranges.push({anchor: anchor || head, head: head});\n }\n cm.setSelections(ranges, 0);\n });\n };\n\n cmds[map[\"Shift-\" + ctrl + \"D\"] = \"duplicateLine\"] = function(cm) {\n cm.operation(function() {\n var rangeCount = cm.listSelections().length;\n for (var i = 0; i < rangeCount; i++) {\n var range = cm.listSelections()[i];\n if (range.empty())\n cm.replaceRange(cm.getLine(range.head.line) + \"\\n\", Pos(range.head.line, 0));\n else\n cm.replaceRange(cm.getRange(range.from(), range.to()), range.from());\n }\n cm.scrollIntoView();\n });\n };\n\n map[ctrl + \"T\"] = \"transposeChars\";\n\n function sortLines(cm, caseSensitive) {\n if (cm.isReadOnly()) return CodeMirror.Pass\n var ranges = cm.listSelections(), toSort = [], selected;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.empty()) continue;\n var from = range.from().line, to = range.to().line;\n while (i < ranges.length - 1 && ranges[i + 1].from().line == to)\n to = range[++i].to().line;\n toSort.push(from, to);\n }\n if (toSort.length) selected = true;\n else toSort.push(cm.firstLine(), cm.lastLine());\n\n cm.operation(function() {\n var ranges = [];\n for (var i = 0; i < toSort.length; i += 2) {\n var from = toSort[i], to = toSort[i + 1];\n var start = Pos(from, 0), end = Pos(to);\n var lines = cm.getRange(start, end, false);\n if (caseSensitive)\n lines.sort();\n else\n lines.sort(function(a, b) {\n var au = a.toUpperCase(), bu = b.toUpperCase();\n if (au != bu) { a = au; b = bu; }\n return a < b ? -1 : a == b ? 0 : 1;\n });\n cm.replaceRange(lines, start, end);\n if (selected) ranges.push({anchor: start, head: end});\n }\n if (selected) cm.setSelections(ranges, 0);\n });\n }\n\n cmds[map[\"F9\"] = \"sortLines\"] = function(cm) { sortLines(cm, true); };\n cmds[map[ctrl + \"F9\"] = \"sortLinesInsensitive\"] = function(cm) { sortLines(cm, false); };\n\n cmds[map[\"F2\"] = \"nextBookmark\"] = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) while (marks.length) {\n var current = marks.shift();\n var found = current.find();\n if (found) {\n marks.push(current);\n return cm.setSelection(found.from, found.to);\n }\n }\n };\n\n cmds[map[\"Shift-F2\"] = \"prevBookmark\"] = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) while (marks.length) {\n marks.unshift(marks.pop());\n var found = marks[marks.length - 1].find();\n if (!found)\n marks.pop();\n else\n return cm.setSelection(found.from, found.to);\n }\n };\n\n cmds[map[ctrl + \"F2\"] = \"toggleBookmark\"] = function(cm) {\n var ranges = cm.listSelections();\n var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []);\n for (var i = 0; i < ranges.length; i++) {\n var from = ranges[i].from(), to = ranges[i].to();\n var found = cm.findMarks(from, to);\n for (var j = 0; j < found.length; j++) {\n if (found[j].sublimeBookmark) {\n found[j].clear();\n for (var k = 0; k < marks.length; k++)\n if (marks[k] == found[j])\n marks.splice(k--, 1);\n break;\n }\n }\n if (j == found.length)\n marks.push(cm.markText(from, to, {sublimeBookmark: true, clearWhenEmpty: false}));\n }\n };\n\n cmds[map[\"Shift-\" + ctrl + \"F2\"] = \"clearBookmarks\"] = function(cm) {\n var marks = cm.state.sublimeBookmarks;\n if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear();\n marks.length = 0;\n };\n\n cmds[map[\"Alt-F2\"] = \"selectBookmarks\"] = function(cm) {\n var marks = cm.state.sublimeBookmarks, ranges = [];\n if (marks) for (var i = 0; i < marks.length; i++) {\n var found = marks[i].find();\n if (!found)\n marks.splice(i--, 0);\n else\n ranges.push({anchor: found.from, head: found.to});\n }\n if (ranges.length)\n cm.setSelections(ranges, 0);\n };\n\n map[\"Alt-Q\"] = \"wrapLines\";\n\n var cK = ctrl + \"K \";\n\n function modifyWordOrSelection(cm, mod) {\n cm.operation(function() {\n var ranges = cm.listSelections(), indices = [], replacements = [];\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.empty()) { indices.push(i); replacements.push(\"\"); }\n else replacements.push(mod(cm.getRange(range.from(), range.to())));\n }\n cm.replaceSelections(replacements, \"around\", \"case\");\n for (var i = indices.length - 1, at; i >= 0; i--) {\n var range = ranges[indices[i]];\n if (at && CodeMirror.cmpPos(range.head, at) > 0) continue;\n var word = wordAt(cm, range.head);\n at = word.from;\n cm.replaceRange(mod(word.word), word.from, word.to);\n }\n });\n }\n\n map[cK + ctrl + \"Backspace\"] = \"delLineLeft\";\n\n cmds[map[\"Backspace\"] = \"smartBackspace\"] = function(cm) {\n if (cm.somethingSelected()) return CodeMirror.Pass;\n\n var cursor = cm.getCursor();\n var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor);\n var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption(\"tabSize\"));\n var indentUnit = cm.getOption(\"indentUnit\");\n\n if (toStartOfLine && !/\\S/.test(toStartOfLine) && column % indentUnit == 0) {\n var prevIndent = new Pos(cursor.line,\n CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit));\n\n // If no smart delete is happening (due to tab sizing) just do a regular delete\n if (prevIndent.ch == cursor.ch) return CodeMirror.Pass;\n\n return cm.replaceRange(\"\", prevIndent, cursor, \"+delete\");\n } else {\n return CodeMirror.Pass;\n }\n };\n\n cmds[map[cK + ctrl + \"K\"] = \"delLineRight\"] = function(cm) {\n cm.operation(function() {\n var ranges = cm.listSelections();\n for (var i = ranges.length - 1; i >= 0; i--)\n cm.replaceRange(\"\", ranges[i].anchor, Pos(ranges[i].to().line), \"+delete\");\n cm.scrollIntoView();\n });\n };\n\n cmds[map[cK + ctrl + \"U\"] = \"upcaseAtCursor\"] = function(cm) {\n modifyWordOrSelection(cm, function(str) { return str.toUpperCase(); });\n };\n cmds[map[cK + ctrl + \"L\"] = \"downcaseAtCursor\"] = function(cm) {\n modifyWordOrSelection(cm, function(str) { return str.toLowerCase(); });\n };\n\n cmds[map[cK + ctrl + \"Space\"] = \"setSublimeMark\"] = function(cm) {\n if (cm.state.sublimeMark) cm.state.sublimeMark.clear();\n cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n };\n cmds[map[cK + ctrl + \"A\"] = \"selectToSublimeMark\"] = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) cm.setSelection(cm.getCursor(), found);\n };\n cmds[map[cK + ctrl + \"W\"] = \"deleteToSublimeMark\"] = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) {\n var from = cm.getCursor(), to = found;\n if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; }\n cm.state.sublimeKilled = cm.getRange(from, to);\n cm.replaceRange(\"\", from, to);\n }\n };\n cmds[map[cK + ctrl + \"X\"] = \"swapWithSublimeMark\"] = function(cm) {\n var found = cm.state.sublimeMark && cm.state.sublimeMark.find();\n if (found) {\n cm.state.sublimeMark.clear();\n cm.state.sublimeMark = cm.setBookmark(cm.getCursor());\n cm.setCursor(found);\n }\n };\n cmds[map[cK + ctrl + \"Y\"] = \"sublimeYank\"] = function(cm) {\n if (cm.state.sublimeKilled != null)\n cm.replaceSelection(cm.state.sublimeKilled, null, \"paste\");\n };\n\n map[cK + ctrl + \"G\"] = \"clearBookmarks\";\n cmds[map[cK + ctrl + \"C\"] = \"showInCenter\"] = function(cm) {\n var pos = cm.cursorCoords(null, \"local\");\n cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);\n };\n\n cmds[map[\"Shift-Alt-Up\"] = \"selectLinesUpward\"] = function(cm) {\n cm.operation(function() {\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.head.line > cm.firstLine())\n cm.addSelection(Pos(range.head.line - 1, range.head.ch));\n }\n });\n };\n cmds[map[\"Shift-Alt-Down\"] = \"selectLinesDownward\"] = function(cm) {\n cm.operation(function() {\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (range.head.line < cm.lastLine())\n cm.addSelection(Pos(range.head.line + 1, range.head.ch));\n }\n });\n };\n\n function getTarget(cm) {\n var from = cm.getCursor(\"from\"), to = cm.getCursor(\"to\");\n if (CodeMirror.cmpPos(from, to) == 0) {\n var word = wordAt(cm, from);\n if (!word.word) return;\n from = word.from;\n to = word.to;\n }\n return {from: from, to: to, query: cm.getRange(from, to), word: word};\n }\n\n function findAndGoTo(cm, forward) {\n var target = getTarget(cm);\n if (!target) return;\n var query = target.query;\n var cur = cm.getSearchCursor(query, forward ? target.to : target.from);\n\n if (forward ? cur.findNext() : cur.findPrevious()) {\n cm.setSelection(cur.from(), cur.to());\n } else {\n cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0)\n : cm.clipPos(Pos(cm.lastLine())));\n if (forward ? cur.findNext() : cur.findPrevious())\n cm.setSelection(cur.from(), cur.to());\n else if (target.word)\n cm.setSelection(target.from, target.to);\n }\n };\n cmds[map[ctrl + \"F3\"] = \"findUnder\"] = function(cm) { findAndGoTo(cm, true); };\n cmds[map[\"Shift-\" + ctrl + \"F3\"] = \"findUnderPrevious\"] = function(cm) { findAndGoTo(cm,false); };\n cmds[map[\"Alt-F3\"] = \"findAllUnder\"] = function(cm) {\n var target = getTarget(cm);\n if (!target) return;\n var cur = cm.getSearchCursor(target.query);\n var matches = [];\n var primaryIndex = -1;\n while (cur.findNext()) {\n matches.push({anchor: cur.from(), head: cur.to()});\n if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch)\n primaryIndex++;\n }\n cm.setSelections(matches, primaryIndex);\n };\n\n map[\"Shift-\" + ctrl + \"[\"] = \"fold\";\n map[\"Shift-\" + ctrl + \"]\"] = \"unfold\";\n map[cK + ctrl + \"0\"] = map[cK + ctrl + \"j\"] = \"unfoldAll\";\n\n map[ctrl + \"I\"] = \"findIncremental\";\n map[\"Shift-\" + ctrl + \"I\"] = \"findIncrementalReverse\";\n map[ctrl + \"H\"] = \"replace\";\n map[\"F3\"] = \"findNext\";\n map[\"Shift-F3\"] = \"findPrev\";\n\n CodeMirror.normalizeKeyMap(map);\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/keymap/sublime.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/keymap/emacs.js": {
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var Pos = CodeMirror.Pos;\n function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }\n\n // Kill 'ring'\n\n var killRing = [];\n function addToRing(str) {\n killRing.push(str);\n if (killRing.length > 50) killRing.shift();\n }\n function growRingTop(str) {\n if (!killRing.length) return addToRing(str);\n killRing[killRing.length - 1] += str;\n }\n function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || \"\"; }\n function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); }\n\n var lastKill = null;\n\n function kill(cm, from, to, mayGrow, text) {\n if (text == null) text = cm.getRange(from, to);\n\n if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen))\n growRingTop(text);\n else\n addToRing(text);\n cm.replaceRange(\"\", from, to, \"+delete\");\n\n if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()};\n else lastKill = null;\n }\n\n // Boundaries of various units\n\n function byChar(cm, pos, dir) {\n return cm.findPosH(pos, dir, \"char\", true);\n }\n\n function byWord(cm, pos, dir) {\n return cm.findPosH(pos, dir, \"word\", true);\n }\n\n function byLine(cm, pos, dir) {\n return cm.findPosV(pos, dir, \"line\", cm.doc.sel.goalColumn);\n }\n\n function byPage(cm, pos, dir) {\n return cm.findPosV(pos, dir, \"page\", cm.doc.sel.goalColumn);\n }\n\n function byParagraph(cm, pos, dir) {\n var no = pos.line, line = cm.getLine(no);\n var sawText = /\\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch));\n var fst = cm.firstLine(), lst = cm.lastLine();\n for (;;) {\n no += dir;\n if (no < fst || no > lst)\n return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null));\n line = cm.getLine(no);\n var hasText = /\\S/.test(line);\n if (hasText) sawText = true;\n else if (sawText) return Pos(no, 0);\n }\n }\n\n function bySentence(cm, pos, dir) {\n var line = pos.line, ch = pos.ch;\n var text = cm.getLine(pos.line), sawWord = false;\n for (;;) {\n var next = text.charAt(ch + (dir < 0 ? -1 : 0));\n if (!next) { // End/beginning of line reached\n if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch);\n text = cm.getLine(line + dir);\n if (!/\\S/.test(text)) return Pos(line, ch);\n line += dir;\n ch = dir < 0 ? text.length : 0;\n continue;\n }\n if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0));\n if (!sawWord) sawWord = /\\w/.test(next);\n ch += dir;\n }\n }\n\n function byExpr(cm, pos, dir) {\n var wrap;\n if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, true))\n && wrap.match && (wrap.forward ? 1 : -1) == dir)\n return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to;\n\n for (var first = true;; first = false) {\n var token = cm.getTokenAt(pos);\n var after = Pos(pos.line, dir < 0 ? token.start : token.end);\n if (first && dir > 0 && token.end == pos.ch || !/\\w/.test(token.string)) {\n var newPos = cm.findPosH(after, dir, \"char\");\n if (posEq(after, newPos)) return pos;\n else pos = newPos;\n } else {\n return after;\n }\n }\n }\n\n // Prefixes (only crudely supported)\n\n function getPrefix(cm, precise) {\n var digits = cm.state.emacsPrefix;\n if (!digits) return precise ? null : 1;\n clearPrefix(cm);\n return digits == \"-\" ? -1 : Number(digits);\n }\n\n function repeated(cmd) {\n var f = typeof cmd == \"string\" ? function(cm) { cm.execCommand(cmd); } : cmd;\n return function(cm) {\n var prefix = getPrefix(cm);\n f(cm);\n for (var i = 1; i < prefix; ++i) f(cm);\n };\n }\n\n function findEnd(cm, pos, by, dir) {\n var prefix = getPrefix(cm);\n if (prefix < 0) { dir = -dir; prefix = -prefix; }\n for (var i = 0; i < prefix; ++i) {\n var newPos = by(cm, pos, dir);\n if (posEq(newPos, pos)) break;\n pos = newPos;\n }\n return pos;\n }\n\n function move(by, dir) {\n var f = function(cm) {\n cm.extendSelection(findEnd(cm, cm.getCursor(), by, dir));\n };\n f.motion = true;\n return f;\n }\n\n function killTo(cm, by, dir) {\n var selections = cm.listSelections(), cursor;\n var i = selections.length;\n while (i--) {\n cursor = selections[i].head;\n kill(cm, cursor, findEnd(cm, cursor, by, dir), true);\n }\n }\n\n function killRegion(cm) {\n if (cm.somethingSelected()) {\n var selections = cm.listSelections(), selection;\n var i = selections.length;\n while (i--) {\n selection = selections[i];\n kill(cm, selection.anchor, selection.head);\n }\n return true;\n }\n }\n\n function addPrefix(cm, digit) {\n if (cm.state.emacsPrefix) {\n if (digit != \"-\") cm.state.emacsPrefix += digit;\n return;\n }\n // Not active yet\n cm.state.emacsPrefix = digit;\n cm.on(\"keyHandled\", maybeClearPrefix);\n cm.on(\"inputRead\", maybeDuplicateInput);\n }\n\n var prefixPreservingKeys = {\"Alt-G\": true, \"Ctrl-X\": true, \"Ctrl-Q\": true, \"Ctrl-U\": true};\n\n function maybeClearPrefix(cm, arg) {\n if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg))\n clearPrefix(cm);\n }\n\n function clearPrefix(cm) {\n cm.state.emacsPrefix = null;\n cm.off(\"keyHandled\", maybeClearPrefix);\n cm.off(\"inputRead\", maybeDuplicateInput);\n }\n\n function maybeDuplicateInput(cm, event) {\n var dup = getPrefix(cm);\n if (dup > 1 && event.origin == \"+input\") {\n var one = event.text.join(\"\\n\"), txt = \"\";\n for (var i = 1; i < dup; ++i) txt += one;\n cm.replaceSelection(txt);\n }\n }\n\n function addPrefixMap(cm) {\n cm.state.emacsPrefixMap = true;\n cm.addKeyMap(prefixMap);\n cm.on(\"keyHandled\", maybeRemovePrefixMap);\n cm.on(\"inputRead\", maybeRemovePrefixMap);\n }\n\n function maybeRemovePrefixMap(cm, arg) {\n if (typeof arg == \"string\" && (/^\\d$/.test(arg) || arg == \"Ctrl-U\")) return;\n cm.removeKeyMap(prefixMap);\n cm.state.emacsPrefixMap = false;\n cm.off(\"keyHandled\", maybeRemovePrefixMap);\n cm.off(\"inputRead\", maybeRemovePrefixMap);\n }\n\n // Utilities\n\n function setMark(cm) {\n cm.setCursor(cm.getCursor());\n cm.setExtending(!cm.getExtending());\n cm.on(\"change\", function() { cm.setExtending(false); });\n }\n\n function clearMark(cm) {\n cm.setExtending(false);\n cm.setCursor(cm.getCursor());\n }\n\n function getInput(cm, msg, f) {\n if (cm.openDialog)\n cm.openDialog(msg + \": <input type=\\\"text\\\" style=\\\"width: 10em\\\"/>\", f, {bottom: true});\n else\n f(prompt(msg, \"\"));\n }\n\n function operateOnWord(cm, op) {\n var start = cm.getCursor(), end = cm.findPosH(start, 1, \"word\");\n cm.replaceRange(op(cm.getRange(start, end)), start, end);\n cm.setCursor(end);\n }\n\n function toEnclosingExpr(cm) {\n var pos = cm.getCursor(), line = pos.line, ch = pos.ch;\n var stack = [];\n while (line >= cm.firstLine()) {\n var text = cm.getLine(line);\n for (var i = ch == null ? text.length : ch; i > 0;) {\n var ch = text.charAt(--i);\n if (ch == \")\")\n stack.push(\"(\");\n else if (ch == \"]\")\n stack.push(\"[\");\n else if (ch == \"}\")\n stack.push(\"{\");\n else if (/[\\(\\{\\[]/.test(ch) && (!stack.length || stack.pop() != ch))\n return cm.extendSelection(Pos(line, i));\n }\n --line; ch = null;\n }\n }\n\n function quit(cm) {\n cm.execCommand(\"clearSearch\");\n clearMark(cm);\n }\n\n // Actual keymap\n\n var keyMap = CodeMirror.keyMap.emacs = CodeMirror.normalizeKeyMap({\n \"Ctrl-W\": function(cm) {kill(cm, cm.getCursor(\"start\"), cm.getCursor(\"end\"));},\n \"Ctrl-K\": repeated(function(cm) {\n var start = cm.getCursor(), end = cm.clipPos(Pos(start.line));\n var text = cm.getRange(start, end);\n if (!/\\S/.test(text)) {\n text += \"\\n\";\n end = Pos(start.line + 1, 0);\n }\n kill(cm, start, end, true, text);\n }),\n \"Alt-W\": function(cm) {\n addToRing(cm.getSelection());\n clearMark(cm);\n },\n \"Ctrl-Y\": function(cm) {\n var start = cm.getCursor();\n cm.replaceRange(getFromRing(getPrefix(cm)), start, start, \"paste\");\n cm.setSelection(start, cm.getCursor());\n },\n \"Alt-Y\": function(cm) {cm.replaceSelection(popFromRing(), \"around\", \"paste\");},\n\n \"Ctrl-Space\": setMark, \"Ctrl-Shift-2\": setMark,\n\n \"Ctrl-F\": move(byChar, 1), \"Ctrl-B\": move(byChar, -1),\n \"Right\": move(byChar, 1), \"Left\": move(byChar, -1),\n \"Ctrl-D\": function(cm) { killTo(cm, byChar, 1); },\n \"Delete\": function(cm) { killRegion(cm) || killTo(cm, byChar, 1); },\n \"Ctrl-H\": function(cm) { killTo(cm, byChar, -1); },\n \"Backspace\": function(cm) { killRegion(cm) || killTo(cm, byChar, -1); },\n\n \"Alt-F\": move(byWord, 1), \"Alt-B\": move(byWord, -1),\n \"Alt-D\": function(cm) { killTo(cm, byWord, 1); },\n \"Alt-Backspace\": function(cm) { killTo(cm, byWord, -1); },\n\n \"Ctrl-N\": move(byLine, 1), \"Ctrl-P\": move(byLine, -1),\n \"Down\": move(byLine, 1), \"Up\": move(byLine, -1),\n \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStart\",\n\n \"Alt-V\": move(byPage, -1), \"Ctrl-V\": move(byPage, 1),\n \"PageUp\": move(byPage, -1), \"PageDown\": move(byPage, 1),\n\n \"Ctrl-Up\": move(byParagraph, -1), \"Ctrl-Down\": move(byParagraph, 1),\n\n \"Alt-A\": move(bySentence, -1), \"Alt-E\": move(bySentence, 1),\n \"Alt-K\": function(cm) { killTo(cm, bySentence, 1); },\n\n \"Ctrl-Alt-K\": function(cm) { killTo(cm, byExpr, 1); },\n \"Ctrl-Alt-Backspace\": function(cm) { killTo(cm, byExpr, -1); },\n \"Ctrl-Alt-F\": move(byExpr, 1), \"Ctrl-Alt-B\": move(byExpr, -1),\n\n \"Shift-Ctrl-Alt-2\": function(cm) {\n var cursor = cm.getCursor();\n cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor);\n },\n \"Ctrl-Alt-T\": function(cm) {\n var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1);\n var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1);\n cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) +\n cm.getRange(leftStart, leftEnd), leftStart, rightEnd);\n },\n \"Ctrl-Alt-U\": repeated(toEnclosingExpr),\n\n \"Alt-Space\": function(cm) {\n var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line);\n while (from && /\\s/.test(text.charAt(from - 1))) --from;\n while (to < text.length && /\\s/.test(text.charAt(to))) ++to;\n cm.replaceRange(\" \", Pos(pos.line, from), Pos(pos.line, to));\n },\n \"Ctrl-O\": repeated(function(cm) { cm.replaceSelection(\"\\n\", \"start\"); }),\n \"Ctrl-T\": repeated(function(cm) {\n cm.execCommand(\"transposeChars\");\n }),\n\n \"Alt-C\": repeated(function(cm) {\n operateOnWord(cm, function(w) {\n var letter = w.search(/\\w/);\n if (letter == -1) return w;\n return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase();\n });\n }),\n \"Alt-U\": repeated(function(cm) {\n operateOnWord(cm, function(w) { return w.toUpperCase(); });\n }),\n \"Alt-L\": repeated(function(cm) {\n operateOnWord(cm, function(w) { return w.toLowerCase(); });\n }),\n\n \"Alt-;\": \"toggleComment\",\n\n \"Ctrl-/\": repeated(\"undo\"), \"Shift-Ctrl--\": repeated(\"undo\"),\n \"Ctrl-Z\": repeated(\"undo\"), \"Cmd-Z\": repeated(\"undo\"),\n \"Shift-Alt-,\": \"goDocStart\", \"Shift-Alt-.\": \"goDocEnd\",\n \"Ctrl-S\": \"findNext\", \"Ctrl-R\": \"findPrev\", \"Ctrl-G\": quit, \"Shift-Alt-5\": \"replace\",\n \"Alt-/\": \"autocomplete\",\n \"Ctrl-J\": \"newlineAndIndent\", \"Enter\": false, \"Tab\": \"indentAuto\",\n\n \"Alt-G G\": function(cm) {\n var prefix = getPrefix(cm, true);\n if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1);\n\n getInput(cm, \"Goto line\", function(str) {\n var num;\n if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0)\n cm.setCursor(num - 1);\n });\n },\n\n \"Ctrl-X Tab\": function(cm) {\n cm.indentSelection(getPrefix(cm, true) || cm.getOption(\"indentUnit\"));\n },\n \"Ctrl-X Ctrl-X\": function(cm) {\n cm.setSelection(cm.getCursor(\"head\"), cm.getCursor(\"anchor\"));\n },\n \"Ctrl-X Ctrl-S\": \"save\",\n \"Ctrl-X Ctrl-W\": \"save\",\n \"Ctrl-X S\": \"saveAll\",\n \"Ctrl-X F\": \"open\",\n \"Ctrl-X U\": repeated(\"undo\"),\n \"Ctrl-X K\": \"close\",\n \"Ctrl-X Delete\": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), true); },\n \"Ctrl-X H\": \"selectAll\",\n\n \"Ctrl-Q Tab\": repeated(\"insertTab\"),\n \"Ctrl-U\": addPrefixMap\n });\n\n var prefixMap = {\"Ctrl-G\": clearPrefix};\n function regPrefix(d) {\n prefixMap[d] = function(cm) { addPrefix(cm, d); };\n keyMap[\"Ctrl-\" + d] = function(cm) { addPrefix(cm, d); };\n prefixPreservingKeys[\"Ctrl-\" + d] = true;\n }\n for (var i = 0; i < 10; ++i) regPrefix(String(i));\n regPrefix(\"-\");\n});\n",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/codemirror/keymap/emacs.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/codemirror/readme": {
"title": "$:/plugins/tiddlywiki/codemirror/readme",
"text": "This plugin provides an enhanced text editor component based on [[CodeMirror|http://codemirror.net]]. It provides several advantages over the default browser text editor:\n\n* Code colouring for many languages (see [[the official documentation here|http://codemirror.net/mode/index.html]])\n* Auto closing brackets and tags\n* Folding brackets, comments, and tags\n* Auto-completion\n\n[[Source code|https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/codemirror]]\n\nBased on ~CodeMirror version 5.13.2\n"
},
"$:/plugins/tiddlywiki/codemirror/styles": {
"title": "$:/plugins/tiddlywiki/codemirror/styles",
"tags": "[[$:/tags/Stylesheet]]",
"text": "/* Make the editor resize to fit its content */\n\n.CodeMirror {\n\theight: auto;\n\tborder: 1px solid #ddd;\n\tline-height: 1.5;\n\tfont-family: \"Monaco\", monospace;\n}\n\n.CodeMirror-scroll {\n\toverflow-x: auto;\n\toverflow-y: hidden;\t\n}\n"
},
"$:/plugins/tiddlywiki/codemirror/usage": {
"title": "$:/plugins/tiddlywiki/codemirror/usage",
"text": "! Setting ~CodeMirror Content Types\n\nYou can determine which tiddler content types are edited by the ~CodeMirror widget by creating or modifying special tiddlers whose prefix is comprised of the string `$:/config/EditorTypeMappings/` concatenated with the content type. The text of that tiddler gives the editor type to be used (eg, ''text'', ''bitmap'', ''codemirror'').\n\nThe current editor type mappings are shown in [[$:/ControlPanel]] under the \"Advanced\" tab.\n\n! ~CodeMirror Configuration\n\nYou can configure the ~CodeMirror plugin by creating a tiddler called [[$:/config/CodeMirror]] containing a JSON configuration object. The configuration tiddler must have its type field set to `application/json` to take effect.\n\nSee http://codemirror.net/ for details of available configuration options.\n\nFor example:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/dialog/dialog.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/search/searchcursor.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js\",\n \"$:/plugins/tiddlywiki/codemirror/keymap/vim.js\",\n \"$:/plugins/tiddlywiki/codemirror/keymap/emacs.js\"\n ],\n \"configuration\": {\n \"keyMap\": \"vim\",\n \"matchBrackets\":true,\n \"showCursorWhenSelecting\": true\n }\n}\n```\n\n!! Basic working configuration\n\n# Create a tiddler called `$:/config/CodeMirror`\n\n# The type of the tiddler has to be set to `application/json`\n\n# The text of the tiddler is the following: \n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js\"\n ],\n \"configuration\": {\n \"matchBrackets\":true,\n \"showCursorWhenSelecting\": true\n }\n}\n\n```\n\n# You should see line numbers when editing a tiddler\n# When editing a tiddler, no matter what the type of the tiddler is set to, you should see matching brackets being highlighted whenever the cursor is next to one of them\n# If you edit a tiddler with the type `application/javascript` or `application/json` you should see the code being syntax highlighted\n\n!! Add HTML syntax highlighting\n\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/xml/xml.js]]\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js\"\n ],\n \"configuration\": {\n \"showCursorWhenSelecting\": true,\n \"matchBrackets\":true\n }\n}\n```\n# Edit a tiddler with the type `text/html` and write some html code. You should see your code being coloured\n\n!! Add a non-existing language mode\n\nHere's an example of adding a new language mode - in this case, the language C.\n\n\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/mode/clike/clike.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/clike/clike.js]]\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/clike/clike.js\"\n ],\n \"configuration\": {\n \"showCursorWhenSelecting\": true\n }\n}\n```\n\n# Add the correct ~EditorTypeMappings tiddler\n## Find the matching MIME type. If you go on the [[CodeMirror documentation for language modes|http://codemirror.net/mode/index.html]] you can see the [[documentation for the c-like mode|http://codemirror.net/mode/clike/index.html]]. In this documentation, at the end you will be told the MIME types defined. Here it's ''text/x-csrc''\n## Add the tiddler: `$:/config/EditorTypeMappings/text/x-csrc` and fill the text field with : ''codemirror''\n\nIf you edit a tiddler with the type `text/x-csrc` and write some code in C, you should see your text being coloured.\n\n!! Add matching tags\n\n# Add XML and HTML colouring\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/edit/matchtags.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[http://codemirror.net/addon/edit/matchtags.js]]\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchtags.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\"\n ],\n \"configuration\": {\n \"showCursorWhenSelecting\": true,\n \"matchTags\": {\"bothTags\": true},\n \"extraKeys\": {\"Ctrl-J\": \"toMatchingTag\"}\n }\n}\n```\n\nEdit a tiddler that has the type :`text/htm` and write this code:\n\n```\n<html>\n <div id=\"click here and press CTRL+J\">\n <ul>\n <li>\n </li>\n </ul>\n </div>\n</html>\n```\n\nIf you click on a tag and press CTRL+J, your cursor will select the matching tag. Supposedly, it should highlight the pair when clicking a tag. However, that part doesn't work.\n\n!! Adding closing tags\n\n# Add the xml mode (see \"Add XML and HTML colouring\")\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/edit/closetags.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[http://codemirror.net/addon/edit/closetag.js]]\n\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/closetags.js\"\n ],\n \"configuration\": {\n \"showCursorWhenSelecting\": true,\n \"autoCloseTags\":true\n }\n}\n```\n\nIf you edit a tiddler with the type`text/html` and write:\n\n```\n<html>\n```\n\nThen the closing tag ''</html>'' should automatically appear.\n\n!! Add closing brackets\n\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/edit/closebrackets.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[http://codemirror.net/addon/edit/closebrackets.js]]\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/matchbrackets.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/edit/closebrackets.js\"\n ],\n\n \"configuration\": {\n\n \"showCursorWhenSelecting\": true,\n \"matchBrackets\":true,\n \"autoCloseBrackets\":true\n }\n}\n```\n\n# If you try to edit any tiddler and write `if(` you should see the bracket closing itself automatically (you will get \"if()\"). It works with (), [], and {}\n# If you try and edit a tiddler with the type `application/javascript`, it will auto-close `()`,`[]`,`{}`,`''` and `\"\"`\n\n!! Adding folding tags\n\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/fold/foldcode.js`\n## Add a field `module-type` and set it to ''library''\n## Set the field `type` to ''application/javascript''\n## Set the text field of the tiddler with the javascript code from this link : [[http://codemirror.net/addon/fold/foldcode.js]]\n# Repeat the above process for the following tiddlers, but replace the code with the one from the given link:\n## Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/fold/xml-fold.js`, the code can be found here [[https://raw.githubusercontent.com/codemirror/CodeMirror/master/addon/fold/xml-fold.js]]\n## Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/fold/foldgutter.js`, the code can be found here [[http://codemirror.net/addon/fold/foldgutter.js]]\n# Create a tiddler `$:/plugins/tiddlywiki/codemirror/addon/fold/foldgutter.css`\n## Add the tag `$:/tags/Stylesheet`\n## Set the text field of the tiddler with the css code from this link : [[http://codemirror.net/addon/fold/foldgutter.css]]\n# Set the text field of the tiddler `$:/config/CodeMirror` to:\n\n```\n{\n \"require\": [\n \"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\",\n \"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/fold/foldcode.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/fold/xml-fold.js\",\n \"$:/plugins/tiddlywiki/codemirror/addon/fold/foldgutter.js\"\n ],\n \"configuration\": {\n \"showCursorWhenSelecting\": true,\n \"matchTags\": {\"bothTags\": true},\n \"foldGutter\": true,\n \"gutters\": [\"CodeMirror-linenumbers\", \"CodeMirror-foldgutter\"]\n }\n}\n```\n\nNow if you type the below code in a tiddler with the type `text/html`:\n\n```\n<html>\n <div>\n <ul>\n\n </ul>\n </div>\n</html>\n```\n\nYou should see little arrows just next to the line numbers. Clicking on it will have the effect to fold the code (or unfold it).\n"
}
}
}
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Defines jumpToLine command. Uses dialog.js if present.
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../dialog/dialog"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../dialog/dialog"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
function dialog(cm, text, shortText, deflt, f) {
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
else f(prompt(shortText, deflt));
}
var jumpDialog =
'Jump to line: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use line:column or scroll% syntax)</span>';
function interpretLine(cm, string) {
var num = Number(string)
if (/^[-+]/.test(string)) return cm.getCursor().line + num
else return num - 1
}
CodeMirror.commands.jumpToLine = function(cm) {
var cur = cm.getCursor();
dialog(cm, jumpDialog, "Jump to line:", (cur.line + 1) + ":" + cur.ch, function(posStr) {
if (!posStr) return;
var match;
if (match = /^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(posStr)) {
cm.setCursor(interpretLine(cm, match[1]), Number(match[2]))
} else if (match = /^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(posStr)) {
var line = Math.round(cm.lineCount() * Number(match[1]) / 100);
if (/^[-+]/.test(match[1])) line = cur.line + line + 1;
cm.setCursor(line - 1, cur.ch);
} else if (match = /^\s*\:?\s*([\+\-]?\d+)\s*/.exec(posStr)) {
cm.setCursor(interpretLine(cm, match[1]), cur.ch);
}
});
};
CodeMirror.keyMap["default"]["Alt-G"] = "jumpToLine";
});
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Define search commands. Depends on dialog.js or another
// implementation of the openDialog method.
// Replace works a little oddly -- it will do the replace on the next
// Ctrl-G (or whatever is bound to findNext) press. You prevent a
// replace by making sure the match is no longer selected when hitting
// Ctrl-G.
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("./searchcursor"), require("../dialog/dialog"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "./searchcursor", "../dialog/dialog"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
function searchOverlay(query, caseInsensitive) {
if (typeof query == "string")
query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
else if (!query.global)
query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");
return {token: function(stream) {
query.lastIndex = stream.pos;
var match = query.exec(stream.string);
if (match && match.index == stream.pos) {
stream.pos += match[0].length || 1;
return "searching";
} else if (match) {
stream.pos = match.index;
} else {
stream.skipToEnd();
}
}};
}
function SearchState() {
this.posFrom = this.posTo = this.lastQuery = this.query = null;
this.overlay = null;
}
function getSearchState(cm) {
return cm.state.search || (cm.state.search = new SearchState());
}
function queryCaseInsensitive(query) {
return typeof query == "string" && query == query.toLowerCase();
}
function getSearchCursor(cm, query, pos) {
// Heuristic: if the query string is all lowercase, do a case insensitive search.
return cm.getSearchCursor(query, pos, {caseFold: queryCaseInsensitive(query), multiline: true});
}
function persistentDialog(cm, text, deflt, onEnter, onKeyDown) {
cm.openDialog(text, onEnter, {
value: deflt,
selectValueOnOpen: true,
closeOnEnter: false,
onClose: function() { clearSearch(cm); },
onKeyDown: onKeyDown
});
}
function dialog(cm, text, shortText, deflt, f) {
if (cm.openDialog) cm.openDialog(text, f, {value: deflt, selectValueOnOpen: true});
else f(prompt(shortText, deflt));
}
function confirmDialog(cm, text, shortText, fs) {
if (cm.openConfirm) cm.openConfirm(text, fs);
else if (confirm(shortText)) fs[0]();
}
function parseString(string) {
return string.replace(/\\(.)/g, function(_, ch) {
if (ch == "n") return "\n"
if (ch == "r") return "\r"
return ch
})
}
function parseQuery(query) {
var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
if (isRE) {
try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }
catch(e) {} // Not a regular expression after all, do a string search
} else {
query = parseString(query)
}
if (typeof query == "string" ? query == "" : query.test(""))
query = /x^/;
return query;
}
var queryDialog =
'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
function startSearch(cm, state, query) {
state.queryText = query;
state.query = parseQuery(query);
cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
cm.addOverlay(state.overlay);
if (cm.showMatchesOnScrollbar) {
if (state.annotate) { state.annotate.clear(); state.annotate = null; }
state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
}
}
function doSearch(cm, rev, persistent, immediate) {
var state = getSearchState(cm);
if (state.query) return findNext(cm, rev);
var q = cm.getSelection() || state.lastQuery;
if (q instanceof RegExp && q.source == "x^") q = null
if (persistent && cm.openDialog) {
var hiding = null
var searchNext = function(query, event) {
CodeMirror.e_stop(event);
if (!query) return;
if (query != state.queryText) {
startSearch(cm, state, query);
state.posFrom = state.posTo = cm.getCursor();
}
if (hiding) hiding.style.opacity = 1
findNext(cm, event.shiftKey, function(_, to) {
var dialog
if (to.line < 3 && document.querySelector &&
(dialog = cm.display.wrapper.querySelector(".CodeMirror-dialog")) &&
dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top)
(hiding = dialog).style.opacity = .4
})
};
persistentDialog(cm, queryDialog, q, searchNext, function(event, query) {
var keyName = CodeMirror.keyName(event)
var extra = cm.getOption('extraKeys'), cmd = (extra && extra[keyName]) || CodeMirror.keyMap[cm.getOption("keyMap")][keyName]
if (cmd == "findNext" || cmd == "findPrev" ||
cmd == "findPersistentNext" || cmd == "findPersistentPrev") {
CodeMirror.e_stop(event);
startSearch(cm, getSearchState(cm), query);
cm.execCommand(cmd);
} else if (cmd == "find" || cmd == "findPersistent") {
CodeMirror.e_stop(event);
searchNext(query, event);
}
});
if (immediate && q) {
startSearch(cm, state, q);
findNext(cm, rev);
}
} else {
dialog(cm, queryDialog, "Search for:", q, function(query) {
if (query && !state.query) cm.operation(function() {
startSearch(cm, state, query);
state.posFrom = state.posTo = cm.getCursor();
findNext(cm, rev);
});
});
}
}
function findNext(cm, rev, callback) {cm.operation(function() {
var state = getSearchState(cm);
var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
if (!cursor.find(rev)) {
cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
if (!cursor.find(rev)) return;
}
cm.setSelection(cursor.from(), cursor.to());
cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);
state.posFrom = cursor.from(); state.posTo = cursor.to();
if (callback) callback(cursor.from(), cursor.to())
});}
function clearSearch(cm) {cm.operation(function() {
var state = getSearchState(cm);
state.lastQuery = state.query;
if (!state.query) return;
state.query = state.queryText = null;
cm.removeOverlay(state.overlay);
if (state.annotate) { state.annotate.clear(); state.annotate = null; }
});}
var replaceQueryDialog =
' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
var replacementQueryDialog = '<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
var doReplaceConfirm = '<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>';
function replaceAll(cm, query, text) {
cm.operation(function() {
for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
if (typeof query != "string") {
var match = cm.getRange(cursor.from(), cursor.to()).match(query);
cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
} else cursor.replace(text);
}
});
}
function replace(cm, all) {
if (cm.getOption("readOnly")) return;
var query = cm.getSelection() || getSearchState(cm).lastQuery;
var dialogText = '<span class="CodeMirror-search-label">' + (all ? 'Replace all:' : 'Replace:') + '</span>';
dialog(cm, dialogText + replaceQueryDialog, dialogText, query, function(query) {
if (!query) return;
query = parseQuery(query);
dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
text = parseString(text)
if (all) {
replaceAll(cm, query, text)
} else {
clearSearch(cm);
var cursor = getSearchCursor(cm, query, cm.getCursor("from"));
var advance = function() {
var start = cursor.from(), match;
if (!(match = cursor.findNext())) {
cursor = getSearchCursor(cm, query);
if (!(match = cursor.findNext()) ||
(start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
}
cm.setSelection(cursor.from(), cursor.to());
cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
confirmDialog(cm, doReplaceConfirm, "Replace?",
[function() {doReplace(match);}, advance,
function() {replaceAll(cm, query, text)}]);
};
var doReplace = function(match) {
cursor.replace(typeof query == "string" ? text :
text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
advance();
};
advance();
}
});
});
}
CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);};
CodeMirror.commands.findPersistentNext = function(cm) {doSearch(cm, false, true, true);};
CodeMirror.commands.findPersistentPrev = function(cm) {doSearch(cm, true, true, true);};
CodeMirror.commands.findNext = doSearch;
CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
CodeMirror.commands.clearSearch = clearSearch;
CodeMirror.commands.replace = replace;
CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
});
{
"tiddlers": {
"$:/plugins/tiddlywiki/jszip/jszip.js": {
"text": "/*!\n\nJSZip - A Javascript class for generating and reading zip files\n<http://stuartk.com/jszip>\n\n(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>\nDual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.\n\nJSZip uses the library pako released under the MIT license :\nhttps://github.com/nodeca/pako/blob/master/LICENSE\n*/\n!function(a){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=a();else if(\"function\"==typeof define&&define.amd)define([],a);else{var b;\"undefined\"!=typeof window?b=window:\"undefined\"!=typeof global?b=global:\"undefined\"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i=\"function\"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error(\"Cannot find module '\"+g+\"'\")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f=\"function\"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){\"use strict\";var d=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";c.encode=function(a){for(var b,c,e,f,g,h,i,j=\"\",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j=\"\",k=0;for(a=a.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){\"use strict\";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){\"use strict\";c.STORE={magic:\"\\x00\\x00\",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a(\"./flate\")},{\"./flate\":8}],4:[function(a,b){\"use strict\";var c=a(\"./utils\"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if(\"undefined\"==typeof a||!a.length)return 0;var e=\"string\"!==c.getTypeOf(a);\"undefined\"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{\"./utils\":21}],5:[function(a,b){\"use strict\";function c(){this.data=null,this.length=0,this.index=0}var d=a(\"./utils\");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error(\"End of data reached (data length = \"+this.length+\", asked index = \"+a+\"). Corrupted zip ?\")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo(\"string\",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{\"./utils\":21}],6:[function(a,b,c){\"use strict\";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],7:[function(a,b,c){\"use strict\";var d=a(\"./utils\");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo(\"uint8array\",a)},c.uint8Array2String=function(a){return d.transformTo(\"string\",a)},c.string2Blob=function(a){var b=d.transformTo(\"arraybuffer\",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{\"./utils\":21}],8:[function(a,b,c){\"use strict\";var d=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Uint32Array,e=a(\"pako\");c.uncompressInputType=d?\"uint8array\":\"array\",c.compressInputType=d?\"uint8array\":\"array\",c.magic=\"\\b\\x00\",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){\"use strict\";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root=\"\",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)\"function\"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a(\"./base64\");c.prototype=a(\"./object\"),c.prototype.load=a(\"./load\"),c.support=a(\"./support\"),c.defaults=a(\"./defaults\"),c.utils=a(\"./deprecatedPublicUtils\"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a(\"./compressions\"),b.exports=c},{\"./base64\":1,\"./compressions\":3,\"./defaults\":6,\"./deprecatedPublicUtils\":7,\"./load\":10,\"./object\":13,\"./support\":17}],10:[function(a,b){\"use strict\";var c=a(\"./base64\"),d=a(\"./zipEntries\");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{\"./base64\":1,\"./zipEntries\":22}],11:[function(a,b){(function(a){\"use strict\";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,\"undefined\"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){\"use strict\";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a(\"./uint8ArrayReader\");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{\"./uint8ArrayReader\":18}],13:[function(a,b){\"use strict\";var c=a(\"./support\"),d=a(\"./utils\"),e=a(\"./crc32\"),f=a(\"./signature\"),g=a(\"./defaults\"),h=a(\"./base64\"),i=a(\"./compressions\"),j=a(\"./compressedObject\"),k=a(\"./nodeBuffer\"),l=a(\"./utf8\"),m=a(\"./stringWriter\"),n=a(\"./uint8ArrayWriter\"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,\"uint8array\"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return\"string\"===e?!a.options.binary&&c.nodebuffer?k(b,\"utf-8\"):a.asBinary():b},q=function(a){var b=o(this);return null===b||\"undefined\"==typeof b?\"\":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?D.utf8decode(b):d.transformTo(\"string\",b),a||this.options.binary||(b=d.transformTo(\"string\",D.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo(\"nodebuffer\",a)},asUint8Array:function(){var a=p(this);return d.transformTo(\"uint8array\",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d=\"\";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&\"undefined\"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),\"string\"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(a=x(a)),c.createFolders&&(e=w(a))&&y.call(this,e,!0),c.dir||null===b||\"undefined\"==typeof b)c.base64=!1,c.binary=!1,b=null,f=null;else if(\"string\"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error(\"The data of '\"+a+\"' is in an unsupported format !\");\"arraybuffer\"===f&&(b=d.transformTo(\"uint8array\",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){\"/\"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf(\"/\");return b>0?a.substring(0,b):\"\"},x=function(a){return\"/\"!=a.slice(-1)&&(a+=\"/\"),a},y=function(a,b){return b=\"undefined\"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var f,g=new j;return a._data instanceof j?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=i.STORE,g.compressedContent=\"\",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(f=a._data.getContent(),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c))):(f=p(a),(!f||0===f.length||a.dir)&&(b=i.STORE,f=\"\"),g.uncompressedSize=f.length,g.crc32=e(f),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a){return 63&(a||0)},C=function(a,b,c,g,h){var i,j,k,m,n=(c.compressedContent,d.transformTo(\"string\",l.utf8encode(b.name))),o=b.comment||\"\",p=d.transformTo(\"string\",l.utf8encode(o)),q=n.length!==b.name.length,r=p.length!==o.length,t=b.options,u=\"\",v=\"\",w=\"\";k=b._initialMetadata.dir!==b.dir?b.dir:t.dir,m=b._initialMetadata.date!==b.date?b.date:t.date;var x=0,y=0;k&&(x|=16),\"UNIX\"===h?(y=798,x|=A(b.unixPermissions,k)):(y=20,x|=B(b.dosPermissions,k)),i=m.getHours(),i<<=6,i|=m.getMinutes(),i<<=5,i|=m.getSeconds()/2,j=m.getFullYear()-1980,j<<=4,j|=m.getMonth()+1,j<<=5,j|=m.getDate(),q&&(v=s(1,1)+s(e(n),4)+n,u+=\"up\"+s(v.length,2)+v),r&&(w=s(1,1)+s(this.crc32(p),4)+p,u+=\"uc\"+s(w.length,2)+w);var z=\"\";z+=\"\\n\\x00\",z+=q||r?\"\\x00\\b\":\"\\x00\\x00\",z+=c.compressionMethod,z+=s(i,2),z+=s(j,2),z+=s(c.crc32,4),z+=s(c.compressedSize,4),z+=s(c.uncompressedSize,4),z+=s(n.length,2),z+=s(u.length,2);var C=f.LOCAL_FILE_HEADER+z+n+u,D=f.CENTRAL_FILE_HEADER+s(y,2)+z+s(p.length,2)+\"\\x00\\x00\\x00\\x00\"+s(x,4)+s(g,4)+n+u+p;return{fileRecord:C,dirRecord:D,compressedObject:c}},D={load:function(){throw new Error(\"Load method is not defined. Is the file jszip-load.js included ?\")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||(\"/\"!=a.slice(-1)&&(a+=\"/\"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:\"STORE\",compressionOptions:null,type:\"base64\",platform:\"DOS\",comment:null,mimeType:\"application/zip\"}),d.checkSupport(a.type),(\"darwin\"===a.platform||\"freebsd\"===a.platform||\"linux\"===a.platform||\"sunos\"===a.platform)&&(a.platform=\"UNIX\"),\"win32\"===a.platform&&(a.platform=\"DOS\");var b,c,e=[],g=0,j=0,k=d.transformTo(\"string\",this.utf8encode(a.comment||this.comment||\"\"));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+\" is not a valid compression method !\");var r=o.options.compressionOptions||a.compressionOptions||{},u=z.call(this,o,q,r),v=C.call(this,l,o,u,g,a.platform);g+=v.fileRecord.length+u.compressedSize,j+=v.dirRecord.length,e.push(v)}var w=\"\";w=f.CENTRAL_DIRECTORY_END+\"\\x00\\x00\\x00\\x00\"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var x=a.type.toLowerCase();for(b=\"uint8array\"===x||\"arraybuffer\"===x||\"blob\"===x||\"nodebuffer\"===x?new n(g+j+w.length):new m(g+j+w.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(w);var y=b.finalize();switch(a.type.toLowerCase()){case\"uint8array\":case\"arraybuffer\":case\"nodebuffer\":return d.transformTo(a.type.toLowerCase(),y);case\"blob\":return d.arrayBuffer2Blob(d.transformTo(\"arraybuffer\",y),a.mimeType);case\"base64\":return a.base64?h.encode(y):y;default:return y}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo(\"string\",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=D},{\"./base64\":1,\"./compressedObject\":2,\"./compressions\":3,\"./crc32\":4,\"./defaults\":6,\"./nodeBuffer\":11,\"./signature\":14,\"./stringWriter\":16,\"./support\":17,\"./uint8ArrayWriter\":19,\"./utf8\":20,\"./utils\":21}],14:[function(a,b,c){\"use strict\";c.LOCAL_FILE_HEADER=\"PK\u0003\u0004\",c.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\",c.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\",c.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\",c.DATA_DESCRIPTOR=\"PK\u0007\\b\"},{}],15:[function(a,b){\"use strict\";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a(\"./dataReader\"),e=a(\"./utils\");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{\"./dataReader\":5,\"./utils\":21}],16:[function(a,b){\"use strict\";var c=a(\"./utils\"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo(\"string\",a),this.data.push(a)},finalize:function(){return this.data.join(\"\")}},b.exports=d},{\"./utils\":21}],17:[function(a,b,c){(function(a){\"use strict\";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof Uint8Array,c.nodebuffer=\"undefined\"!=typeof a,c.uint8array=\"undefined\"!=typeof Uint8Array,\"undefined\"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:\"application/zip\"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob(\"application/zip\").size}catch(d){c.blob=!1}}}}).call(this,\"undefined\"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){\"use strict\";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a(\"./dataReader\");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{\"./dataReader\":5}],19:[function(a,b){\"use strict\";var c=a(\"./utils\"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo(\"uint8array\",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{\"./utils\":21}],20:[function(a,b,c){\"use strict\";for(var d=a(\"./utils\"),e=a(\"./support\"),f=a(\"./nodeBuffer\"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,\"utf-8\"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo(\"nodebuffer\",a).toString(\"utf-8\");a=d.transformTo(e.uint8array?\"uint8array\":\"array\",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join(\"\")}},{\"./nodeBuffer\":11,\"./support\":17,\"./utils\":21}],21:[function(a,b,c){\"use strict\";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case\"uint8array\":String.fromCharCode.apply(null,new Uint8Array(0));break;case\"nodebuffer\":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k=\"\",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push(\"array\"===f||\"nodebuffer\"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join(\"\")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a(\"./support\"),i=a(\"./compressions\"),j=a(\"./nodeBuffer\");c.string2binary=function(a){for(var b=\"\",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a,b){c.checkSupport(\"blob\"),b=b||\"application/zip\";try{return new Blob([a],{type:b})}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;return f.append(a),f.getBlob(b)}catch(d){throw new Error(\"Bug : can't construct the Blob.\")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=\"\"),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return\"string\"==typeof a?\"string\":\"[object Array]\"===Object.prototype.toString.call(a)?\"array\":h.nodebuffer&&j.test(a)?\"nodebuffer\":h.uint8array&&a instanceof Uint8Array?\"uint8array\":h.arraybuffer&&a instanceof ArrayBuffer?\"arraybuffer\":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+\" is not supported by this browser\")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d=\"\";for(c=0;c<(a||\"\").length;c++)b=a.charCodeAt(c),d+=\"\\\\x\"+(16>b?\"0\":\"\")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return\"[object RegExp]\"===Object.prototype.toString.call(a)}},{\"./compressions\":3,\"./nodeBuffer\":11,\"./support\":17}],22:[function(a,b){\"use strict\";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a(\"./stringReader\"),e=a(\"./nodeBufferReader\"),f=a(\"./uint8ArrayReader\"),g=a(\"./utils\"),h=a(\"./signature\"),i=a(\"./zipEntry\"),j=a(\"./support\"),k=a(\"./object\");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error(\"Corrupted zip or bug : unexpected signature (\"+g.pretty(b)+\", expected \"+g.pretty(a)+\")\")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error(\"Multi-volumes zip are not supported\")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a){var b=!0;try{this.reader.setIndex(0),this.checkSignature(h.LOCAL_FILE_HEADER),b=!1}catch(c){}throw new Error(b?\"Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html\":\"Corrupted zip : can't find end of central directory\")}if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error(\"Corrupted zip : can't find the ZIP64 end of central directory locator\");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader=\"string\"!==b||j.uint8array?\"nodebuffer\"===b?new e(a):new f(g.transformTo(\"uint8array\",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{\"./nodeBufferReader\":12,\"./object\":13,\"./signature\":14,\"./stringReader\":15,\"./support\":17,\"./uint8ArrayReader\":18,\"./utils\":21,\"./zipEntry\":23}],23:[function(a,b){\"use strict\";function c(a,b){this.options=a,this.loadOptions=b}var d=a(\"./stringReader\"),e=a(\"./utils\"),f=a(\"./compressedObject\"),g=a(\"./object\"),h=0,i=3;c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error(\"Bug : uncompressed data size mismatch\");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)\");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error(\"Corrupted zip : compression \"+e.pretty(this.compressionMethod)+\" unknown (inner file : \"+this.fileName+\")\");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo(\"string\",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error(\"Corrupted zip : CRC32 mismatch\")},readCentralPart:function(a){if(this.versionMadeBy=a.readInt(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error(\"Encrypted zip are not supported\");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=16&this.externalFileAttributes?!0:!1,a===h&&(this.dosPermissions=63&this.externalFileAttributes),a===i&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||\"/\"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))\n}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{\"./compressedObject\":2,\"./object\":13,\"./stringReader\":15,\"./utils\":21}],24:[function(a,b){\"use strict\";var c=a(\"./lib/utils/common\").assign,d=a(\"./lib/deflate\"),e=a(\"./lib/inflate\"),f=a(\"./lib/zlib/constants\"),g={};c(g,d,e,f),b.exports=g},{\"./lib/deflate\":25,\"./lib/inflate\":26,\"./lib/utils/common\":27,\"./lib/zlib/constants\":30}],25:[function(a,b,c){\"use strict\";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a(\"./zlib/deflate.js\"),h=a(\"./utils/common\"),i=a(\"./utils/strings\"),j=a(\"./zlib/messages\"),k=a(\"./zlib/zstream\"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:\"\"},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input=\"string\"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData(\"string\"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result=\"string\"===this.options.to?this.chunks.join(\"\"):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/deflate.js\":32,\"./zlib/messages\":37,\"./zlib/zstream\":39}],26:[function(a,b,c){\"use strict\";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a(\"./zlib/inflate.js\"),g=a(\"./utils/common\"),h=a(\"./utils/strings\"),i=a(\"./zlib/constants\"),j=a(\"./zlib/messages\"),k=a(\"./zlib/zstream\"),l=a(\"./zlib/gzheader\"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:\"\"},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input=\"string\"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&(\"string\"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result=\"string\"===this.options.to?this.chunks.join(\"\"):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/constants\":30,\"./zlib/gzheader\":33,\"./zlib/inflate.js\":35,\"./zlib/messages\":37,\"./zlib/zstream\":39}],27:[function(a,b,c){\"use strict\";var d=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if(\"object\"!=typeof c)throw new TypeError(c+\"must be non-object\");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){\"use strict\";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c=\"\",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a(\"./common\"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{\"./common\":27}],29:[function(a,b){\"use strict\";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){\"use strict\";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){\"use strict\";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a(\"../utils/common\"),D=a(\"./trees\"),E=a(\"./adler32\"),F=a(\"./crc32\"),G=a(\"./messages\"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./messages\":37,\"./trees\":38}],33:[function(a,b){\"use strict\";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){\"use strict\";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg=\"invalid literal/length code\",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg=\"invalid distance code\",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg=\"invalid distance too far back\",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg=\"invalid distance too far back\",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){\"use strict\";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg=\"\",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg=\"incorrect header check\",c.mode=lb;break}if((15&m)!==J){a.msg=\"unknown compression method\",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg=\"invalid window size\",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg=\"unknown compression method\",c.mode=lb;break}if(57344&c.flags){a.msg=\"unknown header flags set\",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg=\"header crc mismatch\",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg=\"invalid block type\",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg=\"invalid stored block lengths\",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg=\"too many length or distance symbols\",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg=\"invalid code lengths set\",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg=\"invalid bit length repeat\",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg=\"invalid bit length repeat\",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg=\"invalid code -- missing end-of-block\",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg=\"invalid literal/lengths set\",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg=\"invalid distances set\",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);\nbreak}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg=\"invalid literal/length code\",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg=\"invalid distance code\",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg=\"invalid distance too far back\",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg=\"invalid distance too far back\",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg=\"incorrect data check\",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg=\"incorrect length check\",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a(\"../utils/common\"),s=a(\"./adler32\"),t=a(\"./crc32\"),u=a(\"./inffast\"),v=a(\"./inftrees\"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./inffast\":34,\"./inftrees\":36}],36:[function(a,b){\"use strict\";var c=a(\"../utils/common\"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{\"../utils/common\":27}],37:[function(a,b){\"use strict\";b.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],38:[function(a,b,c){\"use strict\";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a(\"../utils/common\"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{\"../utils/common\":27}],39:[function(a,b){\"use strict\";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)});",
"type": "application/javascript",
"title": "$:/plugins/tiddlywiki/jszip/jszip.js",
"module-type": "library"
},
"$:/plugins/tiddlywiki/jszip/license": {
"text": "JSZip is dual licensed. You may use it under the MIT license *or* the GPLv3\nlicense.\n\nThe MIT License\n===============\n\nCopyright (c) 2009-2014 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\nGPL version 3\n=============\n\n GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n",
"type": "text/plain",
"title": "$:/plugins/tiddlywiki/jszip/license"
},
"$:/plugins/tiddlywiki/jszip/readme": {
"title": "$:/plugins/tiddlywiki/jszip/readme",
"text": "This plugin packages [[JSZip|https://stuk.github.io/jszip/]] for use by other plugins. It does not provide any end-user visible features.\n"
}
}
}
//powered by// [[TiddlyWiki|https://tiddlywiki.com]]
~TiddlyTouch v{{$:/plugins/BTC/tiddly-touch!!version}}
$:/core/ui/AdvancedSearch/Shadows
$:/core/ui/ControlPanel/Saving/TiddlySpot
$:/core/ui/AdvancedSearch/Filter
$:/core/ui/ControlPanel/Theme
$:/themes/tiddlywiki/vanilla/themetweaks
$:/core/ui/ControlPanel/Basics
$:/core/ui/ControlPanel/Toolbars
$:/core/ui/ControlPanel/Basics
$:/core/ui/ControlPanel/Saving
$:/core/ui/TiddlerInfo/Tools
$:/core/ui/ControlPanel/Appearance
$:/core/ui/ControlPanel/Plugins
$:/core/ui/ControlPanel/EditorTypes
$:/core/ui/ControlPanel/Saving/TiddlySpot
$:/core/ui/ControlPanel/Plugins/Installed/Plugins
$:/core/ui/MoreSideBar/System
$:/core/ui/ControlPanel/Toolbars/ViewToolbar
.tc-doc-note {
background-color: #ffffcc !important;
border-left: 6px solid #ffeb3b !important;
}
.tc-doc-info {
background-color: #ddffdd;
border-left: 6px solid #4CAF50;
}
.tc-doc-attention {
background-color: #ffdddd;
border-left: 6px solid #f44336;
}
.tc-doc-note, .tc-doc-attention, .tc-doc-info {
padding-top: 0.01em;
padding-right: 16px;
padding-bottom: 0.01em;
padding-left: 16px;
}
.tc-doc-note:before, .tc-doc-info:before, .tc-doc-attention:before, .tc-doc-note:after, .tc-doc-info:after, .tc-doc-attention:after {
box-sizing: inherit;
}
.tc-doc-example-link {
color: #FFFFFF;
background-color: #4CAF50;
margin-bottom: 16px!important;
border: none;
display: inline-block;
text-decoration: none !important;
outline: 0 !important;
padding: 6px 10px;
vertical-align: middle;
overflow: hidden;
text-align: center;
font-size: 0.9rem;
cursor: pointer;
white-space: nowrap;
}
.tc-doc-example-link:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}
.tc-doc-example-link svg {
font-size: 1.3rem;
}
.tc-tabbed-table-of-contents, .tc-table-of-contents, .tc-tabbed-table-of-contents-content {
border: 0px solid #cccccc !important;
}
.tc-tabbed-table-of-contents-content {
width: 65% !important;
padding-left: 0.5rem !important;
}
.tc-table-of-contents, .tc-tabbed-table-of-contents {
background: transparent !important;
border: 0px solid #cccccc !important;
padding-left: 0px !important;
}
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {
border-left: 0px solid #cccccc !important;
border-top: 0px solid #cccccc !important;
border-bottom: 0px solid #cccccc !important;
background: <<colour muted-foreground>> !important;
}
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a {
border-left: 0px solid #cccccc !important;
border-top: 0px solid #cccccc !important;
border-bottom: 0px solid #cccccc !important;
}
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a.tc-tiddlylink, .tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a.tc-tiddlylink {
color: <<colour foreground>> !important;
padding-right: 0.5rem !important;
}
.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a:hover {
background: transparent !important;
}
.javascript .xml, .xml .javascript {
opacity: 1.0 !important;
}
.full-slider {
width: 100%;
}
.tc-doc-note {
background-color: #ffffcc !important;
border-left: 6px solid #ffeb3b !important;
}
{
"tiddlers": {
"$:/info/browser": {
"title": "$:/info/browser",
"text": "yes"
},
"$:/info/node": {
"title": "$:/info/node",
"text": "no"
},
"$:/info/url/full": {
"title": "$:/info/url/full",
"text": "file:///home/shb/TiddlyWiki/tiddlytouch_0-1-0_pinch_testing_demo.html"
},
"$:/info/url/host": {
"title": "$:/info/url/host",
"text": ""
},
"$:/info/url/hostname": {
"title": "$:/info/url/hostname",
"text": ""
},
"$:/info/url/protocol": {
"title": "$:/info/url/protocol",
"text": "file:"
},
"$:/info/url/port": {
"title": "$:/info/url/port",
"text": ""
},
"$:/info/url/pathname": {
"title": "$:/info/url/pathname",
"text": "/home/shb/TiddlyWiki/tiddlytouch_0-1-0_pinch_testing_demo.html"
},
"$:/info/url/search": {
"title": "$:/info/url/search",
"text": ""
},
"$:/info/url/origin": {
"title": "$:/info/url/origin",
"text": "file://"
}
}
}
$:/plugins/ahahn/tinka/createDialog
$:/plugins/ahahn/tinka/createDialog
[all[tiddlers+shadows]prefix[$:/plugins/BTC]]
$:/plugins/ahahn/tinka/search-filter
$:/plugins/ahahn/tinka/search-filter
$:/themes/tiddlywiki/vanilla
{
"tiddlers": {
"$:/themes/tiddlywiki/snowwhite/base": {
"title": "$:/themes/tiddlywiki/snowwhite/base",
"tags": "[[$:/tags/Stylesheet]]",
"text": "\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\n\n.tc-sidebar-header {\n\ttext-shadow: 0 1px 0 <<colour sidebar-foreground-shadow>>;\n}\n\n.tc-tiddler-info {\n\t<<box-shadow \"inset 1px 2px 3px rgba(0,0,0,0.1)\">>\n}\n\n@media screen {\n\t.tc-tiddler-frame {\n\t\t<<box-shadow \"1px 1px 5px rgba(0, 0, 0, 0.3)\">>\n\t}\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\t<<box-shadow none>>\n\t}\n}\n\n.tc-page-controls button svg, .tc-tiddler-controls button svg, .tc-topbar button svg {\n\t<<transition \"fill 150ms ease-in-out\">>\n}\n\n.tc-tiddler-controls button.tc-selected,\n.tc-page-controls button.tc-selected {\n\t<<filter \"drop-shadow(0px -1px 2px rgba(0,0,0,0.25))\">>\n}\n\n.tc-tiddler-frame input.tc-edit-texteditor {\n\t<<box-shadow \"inset 0 1px 8px rgba(0, 0, 0, 0.15)\">>\n}\n\n.tc-edit-tags {\n\t<<box-shadow \"inset 0 1px 8px rgba(0, 0, 0, 0.15)\">>\n}\n\n.tc-tiddler-frame .tc-edit-tags input.tc-edit-texteditor {\n\t<<box-shadow \"none\">>\n\tborder: none;\n\toutline: none;\n}\n\ntextarea.tc-edit-texteditor {\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};\n}\n\ncanvas.tc-edit-bitmapeditor {\n\t<<box-shadow \"2px 2px 5px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-drop-down {\n\tborder-radius: 4px;\n\t<<box-shadow \"2px 2px 10px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-block-dropdown {\n\tborder-radius: 4px;\n\t<<box-shadow \"2px 2px 10px rgba(0, 0, 0, 0.5)\">>\n}\n\n.tc-modal {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.3)\">>\n}\n\n.tc-modal-footer {\n\tborder-radius: 0 0 6px 6px;\n\t<<box-shadow \"inset 0 1px 0 #fff\">>;\n}\n\n\n.tc-alert {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.6)\">>\n}\n\n.tc-notification {\n\tborder-radius: 6px;\n\t<<box-shadow \"0 3px 7px rgba(0,0,0,0.3)\">>\n\ttext-shadow: 0 1px 0 rgba(255,255,255, 0.8);\n}\n\n.tc-sidebar-lists .tc-tab-set .tc-tab-divider {\n\tborder-top: none;\n\theight: 1px;\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 100%\">>\n}\n\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button {\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.1) 100%\">>\n}\n\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button.tc-tab-selected {\n\t<<background-linear-gradient \"left, rgba(0,0,0,0.05) 0%, rgba(255,255,255,0.05) 100%\">>\n}\n\n.tc-message-box img {\n\t<<box-shadow \"1px 1px 3px rgba(0,0,0,0.5)\">>\n}\n\n.tc-plugin-info {\n\t<<box-shadow \"1px 1px 3px rgba(0,0,0,0.5)\">>\n}\n"
}
}
}
{
"tiddlers": {
"$:/themes/tiddlywiki/vanilla/themetweaks": {
"title": "$:/themes/tiddlywiki/vanilla/themetweaks",
"tags": "$:/tags/ControlPanel/Appearance",
"caption": "{{$:/language/ThemeTweaks/ThemeTweaks}}",
"text": "\\define lingo-base() $:/language/ThemeTweaks/\n\n\\define replacement-text()\n[img[$(imageTitle)$]]\n\\end\n\n\\define backgroundimage-dropdown()\n<div class=\"tc-drop-down-wrapper\">\n<$button popup=<<qualify \"$:/state/popup/themetweaks/backgroundimage\">> class=\"tc-btn-invisible tc-btn-dropdown\">{{$:/core/images/down-arrow}}</$button>\n<$reveal state=<<qualify \"$:/state/popup/themetweaks/backgroundimage\">> type=\"popup\" position=\"belowleft\" text=\"\" default=\"\">\n<div class=\"tc-drop-down\">\n<$macrocall $name=\"image-picker\" actions=\"\"\"\n\n<$action-setfield\n\t$tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\"\n\t$value=<<imageTitle>>\n/>\n\n\"\"\"/>\n</div>\n</$reveal>\n</div>\n\\end\n\n\\define backgroundimageattachment-dropdown()\n<$select tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment\" default=\"scroll\">\n<option value=\"scroll\"><<lingo Settings/BackgroundImageAttachment/Scroll>></option>\n<option value=\"fixed\"><<lingo Settings/BackgroundImageAttachment/Fixed>></option>\n</$select>\n\\end\n\n\\define backgroundimagesize-dropdown()\n<$select tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize\" default=\"scroll\">\n<option value=\"auto\"><<lingo Settings/BackgroundImageSize/Auto>></option>\n<option value=\"cover\"><<lingo Settings/BackgroundImageSize/Cover>></option>\n<option value=\"contain\"><<lingo Settings/BackgroundImageSize/Contain>></option>\n</$select>\n\\end\n\n<<lingo ThemeTweaks/Hint>>\n\n! <<lingo Options>>\n\n|<$link to=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\"><<lingo Options/SidebarLayout>></$link> |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\"><option value=\"fixed-fluid\"><<lingo Options/SidebarLayout/Fixed-Fluid>></option><option value=\"fluid-fixed\"><<lingo Options/SidebarLayout/Fluid-Fixed>></option></$select> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\"><<lingo Options/StickyTitles>></$link><br>//<<lingo Options/StickyTitles/Hint>>// |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\"><option value=\"no\">{{$:/language/No}}</option><option value=\"yes\">{{$:/language/Yes}}</option></$select> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/options/codewrapping\"><<lingo Options/CodeWrapping>></$link> |<$select tiddler=\"$:/themes/tiddlywiki/vanilla/options/codewrapping\"><option value=\"pre\">{{$:/language/No}}</option><option value=\"pre-wrap\">{{$:/language/Yes}}</option></$select> |\n\n! <<lingo Settings>>\n\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\"><<lingo Settings/FontFamily>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\" default=\"\" tag=\"input\"/> | |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/codefontfamily\"><<lingo Settings/CodeFontFamily>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/codefontfamily\" default=\"\" tag=\"input\"/> | |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/editorfontfamily\"><<lingo Settings/EditorFontFamily>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/editorfontfamily\" default=\"\" tag=\"input\"/> | |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\"><<lingo Settings/BackgroundImage>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\" default=\"\" tag=\"input\"/> |<<backgroundimage-dropdown>> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment\"><<lingo Settings/BackgroundImageAttachment>></$link> |<<backgroundimageattachment-dropdown>> | |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize\"><<lingo Settings/BackgroundImageSize>></$link> |<<backgroundimagesize-dropdown>> | |\n\n! <<lingo Metrics>>\n\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\"><<lingo Metrics/FontSize>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/fontsize\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\"><<lingo Metrics/LineHeight>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/lineheight\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize\"><<lingo Metrics/BodyFontSize>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight\"><<lingo Metrics/BodyLineHeight>></$link> |<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/storyleft\"><<lingo Metrics/StoryLeft>></$link><br>//<<lingo Metrics/StoryLeft/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyleft\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/storytop\"><<lingo Metrics/StoryTop>></$link><br>//<<lingo Metrics/StoryTop/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storytop\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/storyright\"><<lingo Metrics/StoryRight>></$link><br>//<<lingo Metrics/StoryRight/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storyright\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/storywidth\"><<lingo Metrics/StoryWidth>></$link><br>//<<lingo Metrics/StoryWidth/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/storywidth\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\"><<lingo Metrics/TiddlerWidth>></$link><br>//<<lingo Metrics/TiddlerWidth/Hint>>//<br> |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\"><<lingo Metrics/SidebarBreakpoint>></$link><br>//<<lingo Metrics/SidebarBreakpoint/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint\" default=\"\" tag=\"input\"/> |\n|<$link to=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth\"><<lingo Metrics/SidebarWidth>></$link><br>//<<lingo Metrics/SidebarWidth/Hint>>// |^<$edit-text tiddler=\"$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth\" default=\"\" tag=\"input\"/> |\n"
},
"$:/themes/tiddlywiki/vanilla/base": {
"title": "$:/themes/tiddlywiki/vanilla/base",
"tags": "[[$:/tags/Stylesheet]]",
"text": "\\define custom-background-datauri()\n<$set name=\"background\" value={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}>\n<$list filter=\"[<background>is[image]]\">\n`background: url(`\n<$list filter=\"[<background>!has[_canonical_uri]]\">\n`\"`<$macrocall $name=\"datauri\" title={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}}/>`\"`\n</$list>\n<$list filter=\"[<background>has[_canonical_uri]]\">\n`\"`<$view tiddler={{$:/themes/tiddlywiki/vanilla/settings/backgroundimage}} field=\"_canonical_uri\"/>`\"`\n</$list>\n`) center center;`\n`background-attachment: `{{$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment}}`;\n-webkit-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\n-moz-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\n-o-background-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;\nbackground-size:` {{$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize}}`;`\n</$list>\n</$set>\n\\end\n\n\\define if-fluid-fixed(text,hiddenSidebarText)\n<$reveal state=\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\" type=\"match\" text=\"fluid-fixed\">\n$text$\n<$reveal state=\"$:/state/sidebar\" type=\"nomatch\" text=\"yes\" default=\"yes\">\n$hiddenSidebarText$\n</$reveal>\n</$reveal>\n\\end\n\n\\define if-editor-height-fixed(then,else)\n<$reveal state=\"$:/config/TextEditor/EditorHeight/Mode\" type=\"match\" text=\"fixed\">\n$then$\n</$reveal>\n<$reveal state=\"$:/config/TextEditor/EditorHeight/Mode\" type=\"match\" text=\"auto\">\n$else$\n</$reveal>\n\\end\n\n\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline macrocallblock\n\n/*\n** Start with the normalize CSS reset, and then belay some of its effects\n*/\n\n{{$:/themes/tiddlywiki/vanilla/reset}}\n\n*, input[type=\"search\"] {\n\tbox-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n}\n\nhtml button {\n\tline-height: 1.2;\n\tcolor: <<colour button-foreground>>;\n\tbackground: <<colour button-background>>;\n\tborder-color: <<colour button-border>>;\n}\n\n/*\n** Basic element styles\n*/\n\nhtml {\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/fontfamily}};\n\ttext-rendering: optimizeLegibility; /* Enables kerning and ligatures etc. */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\nhtml:-webkit-full-screen {\n\tbackground-color: <<colour page-background>>;\n}\n\nbody.tc-body {\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics/fontsize}};\n\tline-height: {{$:/themes/tiddlywiki/vanilla/metrics/lineheight}};\n\tword-wrap: break-word;\n\t<<custom-background-datauri>>\n\tcolor: <<colour foreground>>;\n\tbackground-color: <<colour page-background>>;\n\tfill: <<colour foreground>>;\n}\n\nh1, h2, h3, h4, h5, h6 {\n\tline-height: 1.2;\n\tfont-weight: 300;\n}\n\npre {\n\tdisplay: block;\n\tpadding: 14px;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n\tword-break: normal;\n\tword-wrap: break-word;\n\twhite-space: {{$:/themes/tiddlywiki/vanilla/options/codewrapping}};\n\tbackground-color: <<colour pre-background>>;\n\tborder: 1px solid <<colour pre-border>>;\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\ncode {\n\tcolor: <<colour code-foreground>>;\n\tbackground-color: <<colour code-background>>;\n\tborder: 1px solid <<colour code-border>>;\n\twhite-space: {{$:/themes/tiddlywiki/vanilla/options/codewrapping}};\n\tpadding: 0 3px 2px;\n\tborder-radius: 3px;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\nblockquote {\n\tborder-left: 5px solid <<colour blockquote-bar>>;\n\tmargin-left: 25px;\n\tpadding-left: 10px;\n\tquotes: \"\\201C\"\"\\201D\"\"\\2018\"\"\\2019\";\n}\n\nblockquote.tc-big-quote {\n\tfont-family: Georgia, serif;\n\tposition: relative;\n\tbackground: <<colour pre-background>>;\n\tborder-left: none;\n\tmargin-left: 50px;\n\tmargin-right: 50px;\n\tpadding: 10px;\n border-radius: 8px;\n}\n\nblockquote.tc-big-quote cite:before {\n\tcontent: \"\\2014 \\2009\";\n}\n\nblockquote.tc-big-quote:before {\n\tfont-family: Georgia, serif;\n\tcolor: <<colour blockquote-bar>>;\n\tcontent: open-quote;\n\tfont-size: 8em;\n\tline-height: 0.1em;\n\tmargin-right: 0.25em;\n\tvertical-align: -0.4em;\n\tposition: absolute;\n left: -50px;\n top: 42px;\n}\n\nblockquote.tc-big-quote:after {\n\tfont-family: Georgia, serif;\n\tcolor: <<colour blockquote-bar>>;\n\tcontent: close-quote;\n\tfont-size: 8em;\n\tline-height: 0.1em;\n\tmargin-right: 0.25em;\n\tvertical-align: -0.4em;\n\tposition: absolute;\n right: -80px;\n bottom: -20px;\n}\n\ndl dt {\n\tfont-weight: bold;\n\tmargin-top: 6px;\n}\n\ntextarea,\ninput[type=text],\ninput[type=search],\ninput[type=\"\"],\ninput:not([type]) {\n\tcolor: <<colour foreground>>;\n\tbackground: <<colour background>>;\n}\n\n.tc-muted {\n\tcolor: <<colour muted-foreground>>;\n}\n\nsvg.tc-image-button {\n\tpadding: 0px 1px 1px 0px;\n}\n\n.tc-icon-wrapper > svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\nkbd {\n\tdisplay: inline-block;\n\tpadding: 3px 5px;\n\tfont-size: 0.8em;\n\tline-height: 1.2;\n\tcolor: <<colour foreground>>;\n\tvertical-align: middle;\n\tbackground-color: <<colour background>>;\n\tborder: solid 1px <<colour muted-foreground>>;\n\tborder-bottom-color: <<colour muted-foreground>>;\n\tborder-radius: 3px;\n\tbox-shadow: inset 0 -1px 0 <<colour muted-foreground>>;\n}\n\n/*\nMarkdown likes putting code elements inside pre elements\n*/\npre > code {\n\tpadding: 0;\n\tborder: none;\n\tbackground-color: inherit;\n\tcolor: inherit;\n}\n\ntable {\n\tborder: 1px solid <<colour table-border>>;\n\twidth: auto;\n\tmax-width: 100%;\n\tcaption-side: bottom;\n\tmargin-top: 1em;\n\tmargin-bottom: 1em;\n}\n\ntable th, table td {\n\tpadding: 0 7px 0 7px;\n\tborder-top: 1px solid <<colour table-border>>;\n\tborder-left: 1px solid <<colour table-border>>;\n}\n\ntable thead tr td, table th {\n\tbackground-color: <<colour table-header-background>>;\n\tfont-weight: bold;\n}\n\ntable tfoot tr td {\n\tbackground-color: <<colour table-footer-background>>;\n}\n\n.tc-csv-table {\n\twhite-space: nowrap;\n}\n\n.tc-tiddler-frame img,\n.tc-tiddler-frame svg,\n.tc-tiddler-frame canvas,\n.tc-tiddler-frame embed,\n.tc-tiddler-frame iframe {\n\tmax-width: 100%;\n}\n\n.tc-tiddler-body > embed,\n.tc-tiddler-body > iframe {\n\twidth: 100%;\n\theight: 600px;\n}\n\n/*\n** Links\n*/\n\nbutton.tc-tiddlylink,\na.tc-tiddlylink {\n\ttext-decoration: none;\n\tfont-weight: normal;\n\tcolor: <<colour tiddler-link-foreground>>;\n\t-webkit-user-select: inherit; /* Otherwise the draggable attribute makes links impossible to select */\n}\n\n.tc-sidebar-lists a.tc-tiddlylink {\n\tcolor: <<colour sidebar-tiddler-link-foreground>>;\n}\n\n.tc-sidebar-lists a.tc-tiddlylink:hover {\n\tcolor: <<colour sidebar-tiddler-link-foreground-hover>>;\n}\n\nbutton.tc-tiddlylink:hover,\na.tc-tiddlylink:hover {\n\ttext-decoration: underline;\n}\n\na.tc-tiddlylink-resolves {\n}\n\na.tc-tiddlylink-shadow {\n\tfont-weight: bold;\n}\n\na.tc-tiddlylink-shadow.tc-tiddlylink-resolves {\n\tfont-weight: normal;\n}\n\na.tc-tiddlylink-missing {\n\tfont-style: italic;\n}\n\na.tc-tiddlylink-external {\n\ttext-decoration: underline;\n\tcolor: <<colour external-link-foreground>>;\n\tbackground-color: <<colour external-link-background>>;\n}\n\na.tc-tiddlylink-external:visited {\n\tcolor: <<colour external-link-foreground-visited>>;\n\tbackground-color: <<colour external-link-background-visited>>;\n}\n\na.tc-tiddlylink-external:hover {\n\tcolor: <<colour external-link-foreground-hover>>;\n\tbackground-color: <<colour external-link-background-hover>>;\n}\n\n/*\n** Drag and drop styles\n*/\n\n.tc-tiddler-dragger {\n\tposition: relative;\n\tz-index: -10000;\n}\n\n.tc-tiddler-dragger-inner {\n\tposition: absolute;\n\ttop: -1000px;\n\tleft: -1000px;\n\tdisplay: inline-block;\n\tpadding: 8px 20px;\n\tfont-size: 16.9px;\n\tfont-weight: bold;\n\tline-height: 20px;\n\tcolor: <<colour dragger-foreground>>;\n\ttext-shadow: 0 1px 0 rgba(0, 0, 0, 1);\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: <<colour dragger-background>>;\n\tborder-radius: 20px;\n}\n\n.tc-tiddler-dragger-cover {\n\tposition: absolute;\n\tbackground-color: <<colour page-background>>;\n}\n\n.tc-dropzone {\n\tposition: relative;\n}\n\n.tc-dropzone.tc-dragover:before {\n\tz-index: 10000;\n\tdisplay: block;\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground: <<colour dropzone-background>>;\n\ttext-align: center;\n\tcontent: \"<<lingo DropMessage>>\";\n}\n\n.tc-droppable > .tc-droppable-placeholder {\n\tdisplay: none;\n}\n\n.tc-droppable.tc-dragover > .tc-droppable-placeholder {\n\tdisplay: block;\n\tborder: 2px dashed <<colour dropzone-background>>;\n}\n\n.tc-draggable {\n\tcursor: move;\n}\n\n/*\n** Plugin reload warning\n*/\n\n.tc-plugin-reload-warning {\n\tz-index: 1000;\n\tdisplay: block;\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbackground: <<colour alert-background>>;\n\ttext-align: center;\n}\n\n/*\n** Buttons\n*/\n\nbutton svg, button img, label svg, label img {\n\tvertical-align: middle;\n}\n\n.tc-btn-invisible {\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n cursor: pointer;\n}\n\n.tc-btn-boxed {\n\tfont-size: 0.6em;\n\tpadding: 0.2em;\n\tmargin: 1px;\n\tbackground: none;\n\tborder: 1px solid <<colour tiddler-controls-foreground>>;\n\tborder-radius: 0.25em;\n}\n\nhtml body.tc-body .tc-btn-boxed svg {\n\tfont-size: 1.6666em;\n}\n\n.tc-btn-boxed:hover {\n\tbackground: <<colour muted-foreground>>;\n\tcolor: <<colour background>>;\n}\n\nhtml body.tc-body .tc-btn-boxed:hover svg {\n\tfill: <<colour background>>;\n}\n\n.tc-btn-rounded {\n\tfont-size: 0.5em;\n\tline-height: 2;\n\tpadding: 0em 0.3em 0.2em 0.4em;\n\tmargin: 1px;\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground: <<colour muted-foreground>>;\n\tcolor: <<colour background>>;\n\tborder-radius: 2em;\n}\n\nhtml body.tc-body .tc-btn-rounded svg {\n\tfont-size: 1.6666em;\n\tfill: <<colour background>>;\n}\n\n.tc-btn-rounded:hover {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground: <<colour background>>;\n\tcolor: <<colour muted-foreground>>;\n}\n\nhtml body.tc-body .tc-btn-rounded:hover svg {\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-btn-icon svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-btn-text {\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.tc-btn-big-green {\n\tdisplay: inline-block;\n\tpadding: 8px;\n\tmargin: 4px 8px 4px 8px;\n\tbackground: <<colour download-background>>;\n\tcolor: <<colour download-foreground>>;\n\tfill: <<colour download-foreground>>;\n\tborder: none;\n\tfont-size: 1.2em;\n\tline-height: 1.4em;\n\ttext-decoration: none;\n}\n\n.tc-btn-big-green svg,\n.tc-btn-big-green img {\n\theight: 2em;\n\twidth: 2em;\n\tvertical-align: middle;\n\tfill: <<colour download-foreground>>;\n}\n\n.tc-sidebar-lists input {\n\tcolor: <<colour foreground>>;\n}\n\n.tc-sidebar-lists button {\n\tcolor: <<colour sidebar-button-foreground>>;\n\tfill: <<colour sidebar-button-foreground>>;\n}\n\n.tc-sidebar-lists button.tc-btn-mini {\n\tcolor: <<colour sidebar-muted-foreground>>;\n}\n\n.tc-sidebar-lists button.tc-btn-mini:hover {\n\tcolor: <<colour sidebar-muted-foreground-hover>>;\n}\n\nbutton svg.tc-image-button, button .tc-image-button img {\n\theight: 1em;\n\twidth: 1em;\n}\n\n.tc-unfold-banner {\n\tposition: absolute;\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n\twidth: 100%;\n\twidth: calc(100% + 2px);\n\tmargin-left: -43px;\n\ttext-align: center;\n\tborder-top: 2px solid <<colour tiddler-info-background>>;\n\tmargin-top: 4px;\n}\n\n.tc-unfold-banner:hover {\n\tbackground: <<colour tiddler-info-background>>;\n\tborder-top: 2px solid <<colour tiddler-info-border>>;\n}\n\n.tc-unfold-banner svg, .tc-fold-banner svg {\n\theight: 0.75em;\n\tfill: <<colour tiddler-controls-foreground>>;\n}\n\n.tc-unfold-banner:hover svg, .tc-fold-banner:hover svg {\n\tfill: <<colour tiddler-controls-foreground-hover>>;\n}\n\n.tc-fold-banner {\n\tposition: absolute;\n\tpadding: 0;\n\tmargin: 0;\n\tbackground: none;\n\tborder: none;\n\twidth: 23px;\n\ttext-align: center;\n\tmargin-left: -35px;\n\ttop: 6px;\n\tbottom: 6px;\n}\n\n.tc-fold-banner:hover {\n\tbackground: <<colour tiddler-info-background>>;\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-unfold-banner {\n\t\tposition: static;\n\t\twidth: calc(100% + 59px);\n\t}\n\n\t.tc-fold-banner {\n\t\twidth: 16px;\n\t\tmargin-left: -16px;\n\t\tfont-size: 0.75em;\n\t}\n\n}\n\n/*\n** Tags and missing tiddlers\n*/\n\n.tc-tag-list-item {\n\tposition: relative;\n\tdisplay: inline-block;\n\tmargin-right: 7px;\n}\n\n.tc-tags-wrapper {\n\tmargin: 4px 0 14px 0;\n}\n\n.tc-missing-tiddler-label {\n\tfont-style: italic;\n\tfont-weight: normal;\n\tdisplay: inline-block;\n\tfont-size: 11.844px;\n\tline-height: 14px;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n}\n\nbutton.tc-tag-label, span.tc-tag-label {\n\tdisplay: inline-block;\n\tpadding: 0.16em 0.7em;\n\tfont-size: 0.9em;\n\tfont-weight: 400;\n\tline-height: 1.2em;\n\tcolor: <<colour tag-foreground>>;\n\twhite-space: nowrap;\n\tvertical-align: baseline;\n\tbackground-color: <<colour tag-background>>;\n\tborder-radius: 1em;\n}\n\n.tc-untagged-separator {\n\twidth: 10em;\n\tleft: 0;\n\tmargin-left: 0;\n\tborder: 0;\n\theight: 1px;\n\tbackground: <<colour tab-divider>>;\n}\n\nbutton.tc-untagged-label {\n\tbackground-color: <<colour untagged-background>>;\n}\n\n.tc-tag-label svg, .tc-tag-label img {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour tag-foreground>>;\n\tvertical-align: text-bottom;\n}\n\n.tc-tag-manager-table .tc-tag-label {\n\twhite-space: normal;\n}\n\n.tc-tag-manager-tag {\n\twidth: 100%;\n}\n\n/*\n** Page layout\n*/\n\n.tc-topbar {\n\tposition: fixed;\n\tz-index: 1200;\n}\n\n.tc-topbar-left {\n\tleft: 29px;\n\ttop: 5px;\n}\n\n.tc-topbar-right {\n\ttop: 5px;\n\tright: 29px;\n}\n\n.tc-topbar button {\n\tpadding: 8px;\n}\n\n.tc-topbar svg {\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-topbar button:hover svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-sidebar-header {\n\tcolor: <<colour sidebar-foreground>>;\n\tfill: <<colour sidebar-foreground>>;\n}\n\n.tc-sidebar-header .tc-title a.tc-tiddlylink-resolves {\n\tfont-weight: 300;\n}\n\n.tc-sidebar-header .tc-sidebar-lists p {\n\tmargin-top: 3px;\n\tmargin-bottom: 3px;\n}\n\n.tc-sidebar-header .tc-missing-tiddler-label {\n\tcolor: <<colour sidebar-foreground>>;\n}\n\n.tc-advanced-search input {\n\twidth: 60%;\n}\n\n.tc-search a svg {\n\twidth: 1.2em;\n\theight: 1.2em;\n\tvertical-align: middle;\n}\n\n.tc-page-controls {\n\tmargin-top: 14px;\n\tfont-size: 1.5em;\n}\n\n.tc-page-controls button {\n\tmargin-right: 0.5em;\n}\n\n.tc-page-controls a.tc-tiddlylink:hover {\n\ttext-decoration: none;\n}\n\n.tc-page-controls img {\n\twidth: 1em;\n}\n\n.tc-page-controls svg {\n\tfill: <<colour sidebar-controls-foreground>>;\n}\n\n.tc-page-controls button:hover svg, .tc-page-controls a:hover svg {\n\tfill: <<colour sidebar-controls-foreground-hover>>;\n}\n\n.tc-menu-list-item {\n\twhite-space: nowrap;\n}\n\n.tc-menu-list-count {\n\tfont-weight: bold;\n}\n\n.tc-menu-list-subitem {\n\tpadding-left: 7px;\n}\n\n.tc-story-river {\n\tposition: relative;\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-sidebar-header {\n\t\tpadding: 14px;\n\t\tmin-height: 32px;\n\t\tmargin-top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t}\n\n\t.tc-story-river {\n\t\tposition: relative;\n\t\tpadding: 0;\n\t}\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-message-box {\n\t\tmargin: 21px -21px 21px -21px;\n\t}\n\n\t.tc-sidebar-scrollable {\n\t\tposition: fixed;\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics/storyright}};\n\t\tbottom: 0;\n\t\tright: 0;\n\t\toverflow-y: auto;\n\t\toverflow-x: auto;\n\t\t-webkit-overflow-scrolling: touch;\n\t\tmargin: 0 0 0 -42px;\n\t\tpadding: 71px 0 28px 42px;\n\t}\n\n\thtml[dir=\"rtl\"] .tc-sidebar-scrollable {\n\t\tleft: auto;\n\t\tright: {{$:/themes/tiddlywiki/vanilla/metrics/storyright}};\n\t}\n\n\t.tc-story-river {\n\t\tposition: relative;\n\t\tleft: {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}};\n\t\ttop: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}};\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/storywidth}};\n\t\tpadding: 42px 42px 42px 42px;\n\t}\n\n<<if-no-sidebar \"\n\n\t.tc-story-river {\n\t\twidth: calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}});\n\t}\n\n\">>\n\n}\n\n@media print {\n\n\tbody.tc-body {\n\t\tbackground-color: transparent;\n\t}\n\n\t.tc-sidebar-header, .tc-topbar {\n\t\tdisplay: none;\n\t}\n\n\t.tc-story-river {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\n\t.tc-story-river .tc-tiddler-frame {\n\t\tmargin: 0;\n\t\tborder: none;\n\t\tpadding: 0;\n\t}\n}\n\n/*\n** Tiddler styles\n*/\n\n.tc-tiddler-frame {\n\tposition: relative;\n\tmargin-bottom: 28px;\n\tbackground-color: <<colour tiddler-background>>;\n\tborder: 1px solid <<colour tiddler-border>>;\n}\n\n{{$:/themes/tiddlywiki/vanilla/sticky}}\n\n.tc-tiddler-info {\n\tpadding: 14px 42px 14px 42px;\n\tbackground-color: <<colour tiddler-info-background>>;\n\tborder-top: 1px solid <<colour tiddler-info-border>>;\n\tborder-bottom: 1px solid <<colour tiddler-info-border>>;\n}\n\n.tc-tiddler-info p {\n\tmargin-top: 3px;\n\tmargin-bottom: 3px;\n}\n\n.tc-tiddler-info .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour tiddler-info-tab-background>>;\n\tborder-bottom: 1px solid <<colour tiddler-info-tab-background>>;\n}\n\n.tc-view-field-table {\n\twidth: 100%;\n}\n\n.tc-view-field-name {\n\twidth: 1%; /* Makes this column be as narrow as possible */\n\ttext-align: right;\n\tfont-style: italic;\n\tfont-weight: 200;\n}\n\n.tc-view-field-value {\n}\n\n@media (max-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\tpadding: 14px 14px 14px 14px;\n\t}\n\n\t.tc-tiddler-info {\n\t\tmargin: 0 -14px 0 -14px;\n\t}\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\t.tc-tiddler-frame {\n\t\tpadding: 28px 42px 42px 42px;\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}};\n\t\tborder-radius: 2px;\n\t}\n\n<<if-no-sidebar \"\n\n\t.tc-tiddler-frame {\n\t\twidth: 100%;\n\t}\n\n\">>\n\n\t.tc-tiddler-info {\n\t\tmargin: 0 -42px 0 -42px;\n\t}\n}\n\n.tc-site-title,\n.tc-titlebar {\n\tfont-weight: 300;\n\tfont-size: 2.35em;\n\tline-height: 1.2em;\n\tcolor: <<colour tiddler-title-foreground>>;\n\tmargin: 0;\n}\n\n.tc-site-title {\n\tcolor: <<colour site-title-foreground>>;\n}\n\n.tc-tiddler-title-icon {\n\tvertical-align: middle;\n}\n\n.tc-system-title-prefix {\n\tcolor: <<colour muted-foreground>>;\n}\n\n.tc-titlebar h2 {\n\tfont-size: 1em;\n\tdisplay: inline;\n}\n\n.tc-titlebar img {\n\theight: 1em;\n}\n\n.tc-subtitle {\n\tfont-size: 0.9em;\n\tcolor: <<colour tiddler-subtitle-foreground>>;\n\tfont-weight: 300;\n}\n\n.tc-tiddler-missing .tc-title {\n font-style: italic;\n font-weight: normal;\n}\n\n.tc-tiddler-frame .tc-tiddler-controls {\n\tfloat: right;\n}\n\n.tc-tiddler-controls .tc-drop-down {\n\tfont-size: 0.6em;\n}\n\n.tc-tiddler-controls .tc-drop-down .tc-drop-down {\n\tfont-size: 1em;\n}\n\n.tc-tiddler-controls > span > button,\n.tc-tiddler-controls > span > span > button,\n.tc-tiddler-controls > span > span > span > button {\n\tvertical-align: baseline;\n\tmargin-left:5px;\n}\n\n.tc-tiddler-controls button svg, .tc-tiddler-controls button img,\n.tc-search button svg, .tc-search a svg {\n\tfill: <<colour tiddler-controls-foreground>>;\n}\n\n.tc-tiddler-controls button svg, .tc-tiddler-controls button img {\n\theight: 0.75em;\n}\n\n.tc-search button svg, .tc-search a svg {\n height: 1.2em;\n width: 1.2em;\n margin: 0 0.25em;\n}\n\n.tc-tiddler-controls button.tc-selected svg,\n.tc-page-controls button.tc-selected svg {\n\tfill: <<colour tiddler-controls-foreground-selected>>;\n}\n\n.tc-tiddler-controls button.tc-btn-invisible:hover svg,\n.tc-search button:hover svg, .tc-search a:hover svg {\n\tfill: <<colour tiddler-controls-foreground-hover>>;\n}\n\n@media print {\n\t.tc-tiddler-controls {\n\t\tdisplay: none;\n\t}\n}\n\n.tc-tiddler-help { /* Help prompts within tiddler template */\n\tcolor: <<colour muted-foreground>>;\n\tmargin-top: 14px;\n}\n\n.tc-tiddler-help a.tc-tiddlylink {\n\tcolor: <<colour very-muted-foreground>>;\n}\n\n.tc-tiddler-frame .tc-edit-texteditor {\n\twidth: 100%;\n\tmargin: 4px 0 4px 0;\n}\n\n.tc-tiddler-frame input.tc-edit-texteditor,\n.tc-tiddler-frame textarea.tc-edit-texteditor,\n.tc-tiddler-frame iframe.tc-edit-texteditor {\n\tpadding: 3px 3px 3px 3px;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tbackground-color: <<colour tiddler-editor-background>>;\n\tline-height: 1.3em;\n\t-webkit-appearance: none;\n\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};\n}\n\n.tc-tiddler-frame .tc-binary-warning {\n\twidth: 100%;\n\theight: 5em;\n\ttext-align: center;\n\tpadding: 3em 3em 6em 3em;\n\tbackground: <<colour alert-background>>;\n\tborder: 1px solid <<colour alert-border>>;\n}\n\ncanvas.tc-edit-bitmapeditor {\n\tborder: 6px solid <<colour tiddler-editor-border-image>>;\n\tcursor: crosshair;\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tmargin-top: 6px;\n\tmargin-bottom: 6px;\n}\n\n.tc-edit-bitmapeditor-width {\n\tdisplay: block;\n}\n\n.tc-edit-bitmapeditor-height {\n\tdisplay: block;\n}\n\n.tc-tiddler-body {\n\tclear: both;\n}\n\n.tc-tiddler-frame .tc-tiddler-body {\n\tfont-size: {{$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize}};\n\tline-height: {{$:/themes/tiddlywiki/vanilla/metrics/bodylineheight}};\n}\n\n.tc-titlebar, .tc-tiddler-edit-title {\n\toverflow: hidden; /* https://github.com/Jermolene/TiddlyWiki5/issues/282 */\n}\n\nhtml body.tc-body.tc-single-tiddler-window {\n\tmargin: 1em;\n\tbackground: <<colour tiddler-background>>;\n}\n\n.tc-single-tiddler-window img,\n.tc-single-tiddler-window svg,\n.tc-single-tiddler-window canvas,\n.tc-single-tiddler-window embed,\n.tc-single-tiddler-window iframe {\n\tmax-width: 100%;\n}\n\n/*\n** Editor\n*/\n\n.tc-editor-toolbar {\n\tmargin-top: 8px;\n}\n\n.tc-editor-toolbar button {\n\tvertical-align: middle;\n\tbackground-color: <<colour tiddler-controls-foreground>>;\n\tfill: <<colour tiddler-controls-foreground-selected>>;\n\tborder-radius: 4px;\n\tpadding: 3px;\n\tmargin: 2px 0 2px 4px;\n}\n\n.tc-editor-toolbar button.tc-text-editor-toolbar-item-adjunct {\n\tmargin-left: 1px;\n\twidth: 1em;\n\tborder-radius: 8px;\n}\n\n.tc-editor-toolbar button.tc-text-editor-toolbar-item-start-group {\n\tmargin-left: 11px;\n}\n\n.tc-editor-toolbar button.tc-selected {\n\tbackground-color: <<colour primary>>;\n}\n\n.tc-editor-toolbar button svg {\n\twidth: 1.6em;\n\theight: 1.2em;\n}\n\n.tc-editor-toolbar button:hover {\n\tbackground-color: <<colour tiddler-controls-foreground-selected>>;\n\tfill: <<colour background>>;\n}\n\n.tc-editor-toolbar .tc-text-editor-toolbar-more {\n\twhite-space: normal;\n}\n\n.tc-editor-toolbar .tc-text-editor-toolbar-more button {\n\tdisplay: inline-block;\n\tpadding: 3px;\n\twidth: auto;\n}\n\n.tc-editor-toolbar .tc-search-results {\n\tpadding: 0;\n}\n\n/*\n** Adjustments for fluid-fixed mode\n*/\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n<<if-fluid-fixed text:\"\"\"\n\n\t.tc-story-river {\n\t\tpadding-right: 0;\n\t\tposition: relative;\n\t\twidth: auto;\n\t\tleft: 0;\n\t\tmargin-left: {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}};\n\t\tmargin-right: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}};\n\t}\n\n\t.tc-tiddler-frame {\n\t\twidth: 100%;\n\t}\n\n\t.tc-sidebar-scrollable {\n\t\tleft: auto;\n\t\tbottom: 0;\n\t\tright: 0;\n\t\twidth: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}};\n\t}\n\n\tbody.tc-body .tc-storyview-zoomin-tiddler {\n\t\twidth: 100%;\n\t\twidth: calc(100% - 42px);\n\t}\n\n\"\"\" hiddenSidebarText:\"\"\"\n\n\t.tc-story-river {\n\t\tpadding-right: 3em;\n\t\tmargin-right: 0;\n\t}\n\n\tbody.tc-body .tc-storyview-zoomin-tiddler {\n\t\twidth: 100%;\n\t\twidth: calc(100% - 84px);\n\t}\n\n\"\"\">>\n\n}\n\n/*\n** Toolbar buttons\n*/\n\n.tc-page-controls svg.tc-image-new-button {\n fill: <<colour toolbar-new-button>>;\n}\n\n.tc-page-controls svg.tc-image-options-button {\n fill: <<colour toolbar-options-button>>;\n}\n\n.tc-page-controls svg.tc-image-save-button {\n fill: <<colour toolbar-save-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-info-button {\n fill: <<colour toolbar-info-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-edit-button {\n fill: <<colour toolbar-edit-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-close-button {\n fill: <<colour toolbar-close-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-delete-button {\n fill: <<colour toolbar-delete-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-cancel-button {\n fill: <<colour toolbar-cancel-button>>;\n}\n\n.tc-tiddler-controls button svg.tc-image-done-button {\n fill: <<colour toolbar-done-button>>;\n}\n\n/*\n** Tiddler edit mode\n*/\n\n.tc-tiddler-edit-frame em.tc-edit {\n\tcolor: <<colour muted-foreground>>;\n\tfont-style: normal;\n}\n\n.tc-edit-type-dropdown a.tc-tiddlylink-missing {\n\tfont-style: normal;\n}\n\n.tc-edit-tags {\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tpadding: 4px 8px 4px 8px;\n}\n\n.tc-edit-add-tag {\n\tdisplay: inline-block;\n}\n\n.tc-edit-add-tag .tc-add-tag-name input {\n\twidth: 50%;\n}\n\n.tc-edit-add-tag .tc-keyboard {\n\tdisplay:inline;\n}\n\n.tc-edit-tags .tc-tag-label {\n\tdisplay: inline-block;\n}\n\n.tc-edit-tags-list {\n\tmargin: 14px 0 14px 0;\n}\n\n.tc-remove-tag-button {\n\tpadding-left: 4px;\n}\n\n.tc-tiddler-preview {\n\toverflow: auto;\n}\n\n.tc-tiddler-preview-preview {\n\tfloat: right;\n\twidth: 49%;\n\tborder: 1px solid <<colour tiddler-editor-border>>;\n\tmargin: 4px 0 3px 3px;\n\tpadding: 3px 3px 3px 3px;\n}\n\n<<if-editor-height-fixed then:\"\"\"\n\n.tc-tiddler-preview-preview {\n\toverflow-y: scroll;\n\theight: {{$:/config/TextEditor/EditorHeight/Height}};\n}\n\n\"\"\">>\n\n.tc-tiddler-frame .tc-tiddler-preview .tc-edit-texteditor {\n\twidth: 49%;\n}\n\n.tc-tiddler-frame .tc-tiddler-preview canvas.tc-edit-bitmapeditor {\n\tmax-width: 49%;\n}\n\n.tc-edit-fields {\n\twidth: 100%;\n}\n\n\n.tc-edit-fields table, .tc-edit-fields tr, .tc-edit-fields td {\n\tborder: none;\n\tpadding: 4px;\n}\n\n.tc-edit-fields > tbody > .tc-edit-field:nth-child(odd) {\n\tbackground-color: <<colour tiddler-editor-fields-odd>>;\n}\n\n.tc-edit-fields > tbody > .tc-edit-field:nth-child(even) {\n\tbackground-color: <<colour tiddler-editor-fields-even>>;\n}\n\n.tc-edit-field-name {\n\ttext-align: right;\n}\n\n.tc-edit-field-value input {\n\twidth: 100%;\n}\n\n.tc-edit-field-remove {\n}\n\n.tc-edit-field-remove svg {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n\tvertical-align: middle;\n}\n\n.tc-edit-field-add-name {\n\tdisplay: inline-block;\n\twidth: 15%;\n}\n\n.tc-edit-field-add-value {\n\tdisplay: inline-block;\n\twidth: 40%;\n}\n\n.tc-edit-field-add-button {\n\tdisplay: inline-block;\n\twidth: 10%;\n}\n\n/*\n** Storyview Classes\n*/\n\n.tc-storyview-zoomin-tiddler {\n\tposition: absolute;\n\tdisplay: block;\n\twidth: 100%;\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-storyview-zoomin-tiddler {\n\t\twidth: calc(100% - 84px);\n\t}\n\n}\n\n/*\n** Dropdowns\n*/\n\n.tc-btn-dropdown {\n\ttext-align: left;\n}\n\n.tc-btn-dropdown svg, .tc-btn-dropdown img {\n\theight: 1em;\n\twidth: 1em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-drop-down-wrapper {\n\tposition: relative;\n}\n\n.tc-drop-down {\n\tmin-width: 380px;\n\tborder: 1px solid <<colour dropdown-border>>;\n\tbackground-color: <<colour dropdown-background>>;\n\tpadding: 7px 0 7px 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n\ttext-shadow: none;\n\tline-height: 1.4;\n}\n\n.tc-drop-down .tc-drop-down {\n\tmargin-left: 14px;\n}\n\n.tc-drop-down button svg, .tc-drop-down a svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-drop-down button.tc-btn-invisible:hover svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-drop-down p {\n\tpadding: 0 14px 0 14px;\n}\n\n.tc-drop-down svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-drop-down img {\n\twidth: 1em;\n}\n\n.tc-drop-down-language-chooser img {\n\twidth: 2em;\n\tvertical-align: baseline;\n}\n\n.tc-drop-down a, .tc-drop-down button {\n\tdisplay: block;\n\tpadding: 0 14px 0 14px;\n\twidth: 100%;\n\ttext-align: left;\n\tcolor: <<colour foreground>>;\n\tline-height: 1.4;\n}\n\n.tc-drop-down .tc-tab-set .tc-tab-buttons button {\n\tdisplay: inline-block;\n width: auto;\n margin-bottom: 0px;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.tc-drop-down .tc-prompt {\n\tpadding: 0 14px;\n}\n\n.tc-drop-down .tc-chooser {\n\tborder: none;\n}\n\n.tc-drop-down .tc-chooser .tc-swatches-horiz {\n\tfont-size: 0.4em;\n\tpadding-left: 1.2em;\n}\n\n.tc-drop-down .tc-file-input-wrapper {\n\twidth: 100%;\n}\n\n.tc-drop-down .tc-file-input-wrapper button {\n\tcolor: <<colour foreground>>;\n}\n\n.tc-drop-down a:hover, .tc-drop-down button:hover, .tc-drop-down .tc-file-input-wrapper:hover button {\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n\ttext-decoration: none;\n}\n\n.tc-drop-down .tc-tab-buttons button {\n\tbackground-color: <<colour dropdown-tab-background>>;\n}\n\n.tc-drop-down .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour dropdown-tab-background-selected>>;\n\tborder-bottom: 1px solid <<colour dropdown-tab-background-selected>>;\n}\n\n.tc-drop-down-bullet {\n\tdisplay: inline-block;\n\twidth: 0.5em;\n}\n\n.tc-drop-down .tc-tab-contents a {\n\tpadding: 0 0.5em 0 0.5em;\n}\n\n.tc-block-dropdown-wrapper {\n\tposition: relative;\n}\n\n.tc-block-dropdown {\n\tposition: absolute;\n\tmin-width: 220px;\n\tborder: 1px solid <<colour dropdown-border>>;\n\tbackground-color: <<colour dropdown-background>>;\n\tpadding: 7px 0;\n\tmargin: 4px 0 0 0;\n\twhite-space: nowrap;\n\tz-index: 1000;\n\ttext-shadow: none;\n}\n\n.tc-block-dropdown.tc-search-drop-down {\n\tmargin-left: -12px;\n}\n\n.tc-block-dropdown a {\n\tdisplay: block;\n\tpadding: 4px 14px 4px 14px;\n}\n\n.tc-block-dropdown.tc-search-drop-down a {\n\tdisplay: block;\n\tpadding: 0px 10px 0px 10px;\n}\n\n.tc-drop-down .tc-dropdown-item-plain,\n.tc-block-dropdown .tc-dropdown-item-plain {\n\tpadding: 4px 14px 4px 7px;\n}\n\n.tc-drop-down .tc-dropdown-item,\n.tc-block-dropdown .tc-dropdown-item {\n\tpadding: 4px 14px 4px 7px;\n\tcolor: <<colour muted-foreground>>;\n}\n\n.tc-block-dropdown a:hover {\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n\ttext-decoration: none;\n}\n\n.tc-search-results {\n\tpadding: 0 7px 0 7px;\n}\n\n.tc-image-chooser, .tc-colour-chooser {\n\twhite-space: normal;\n}\n\n.tc-image-chooser a,\n.tc-colour-chooser a {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\ttext-align: center;\n\tposition: relative;\n}\n\n.tc-image-chooser a {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tpadding: 2px;\n\tmargin: 2px;\n\twidth: 4em;\n\theight: 4em;\n}\n\n.tc-colour-chooser a {\n\tpadding: 3px;\n\twidth: 2em;\n\theight: 2em;\n\tvertical-align: middle;\n}\n\n.tc-image-chooser a:hover,\n.tc-colour-chooser a:hover {\n\tbackground: <<colour primary>>;\n\tpadding: 0px;\n\tborder: 3px solid <<colour primary>>;\n}\n\n.tc-image-chooser a svg,\n.tc-image-chooser a img {\n\tdisplay: inline-block;\n\twidth: auto;\n\theight: auto;\n\tmax-width: 3.5em;\n\tmax-height: 3.5em;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tmargin: auto;\n}\n\n/*\n** Modals\n*/\n\n.tc-modal-wrapper {\n\tposition: fixed;\n\toverflow: auto;\n\toverflow-y: scroll;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tz-index: 900;\n}\n\n.tc-modal-backdrop {\n\tposition: fixed;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tz-index: 1000;\n\tbackground-color: <<colour modal-backdrop>>;\n}\n\n.tc-modal {\n\tz-index: 1100;\n\tbackground-color: <<colour modal-background>>;\n\tborder: 1px solid <<colour modal-border>>;\n}\n\n@media (max-width: 55em) {\n\t.tc-modal {\n\t\tposition: fixed;\n\t\ttop: 1em;\n\t\tleft: 1em;\n\t\tright: 1em;\n\t}\n\n\t.tc-modal-body {\n\t\toverflow-y: auto;\n\t\tmax-height: 400px;\n\t\tmax-height: 60vh;\n\t}\n}\n\n@media (min-width: 55em) {\n\t.tc-modal {\n\t\tposition: fixed;\n\t\ttop: 2em;\n\t\tleft: 25%;\n\t\twidth: 50%;\n\t}\n\n\t.tc-modal-body {\n\t\toverflow-y: auto;\n\t\tmax-height: 400px;\n\t\tmax-height: 60vh;\n\t}\n}\n\n.tc-modal-header {\n\tpadding: 9px 15px;\n\tborder-bottom: 1px solid <<colour modal-header-border>>;\n}\n\n.tc-modal-header h3 {\n\tmargin: 0;\n\tline-height: 30px;\n}\n\n.tc-modal-header img, .tc-modal-header svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-modal-body {\n\tpadding: 15px;\n}\n\n.tc-modal-footer {\n\tpadding: 14px 15px 15px;\n\tmargin-bottom: 0;\n\ttext-align: right;\n\tbackground-color: <<colour modal-footer-background>>;\n\tborder-top: 1px solid <<colour modal-footer-border>>;\n}\n\n/*\n** Notifications\n*/\n\n.tc-notification {\n\tposition: fixed;\n\ttop: 14px;\n\tright: 42px;\n\tz-index: 1300;\n\tmax-width: 280px;\n\tpadding: 0 14px 0 14px;\n\tbackground-color: <<colour notification-background>>;\n\tborder: 1px solid <<colour notification-border>>;\n}\n\n/*\n** Tabs\n*/\n\n.tc-tab-set.tc-vertical {\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n}\n\n.tc-tab-buttons {\n\tfont-size: 0.85em;\n\tpadding-top: 1em;\n\tmargin-bottom: -2px;\n}\n\n.tc-tab-buttons.tc-vertical {\n\tz-index: 100;\n\tdisplay: block;\n\tpadding-top: 14px;\n\tvertical-align: top;\n\ttext-align: right;\n\tmargin-bottom: inherit;\n\tmargin-right: -1px;\n\tmax-width: 33%;\n\t-webkit-flex: 0 0 auto;\n\tflex: 0 0 auto;\n}\n\n.tc-tab-buttons button.tc-tab-selected {\n\tcolor: <<colour tab-foreground-selected>>;\n\tbackground-color: <<colour tab-background-selected>>;\n\tborder-left: 1px solid <<colour tab-border-selected>>;\n\tborder-top: 1px solid <<colour tab-border-selected>>;\n\tborder-right: 1px solid <<colour tab-border-selected>>;\n}\n\n.tc-tab-buttons button {\n\tcolor: <<colour tab-foreground>>;\n\tpadding: 3px 5px 3px 5px;\n\tmargin-right: 0.3em;\n\tfont-weight: 300;\n\tborder: none;\n\tbackground: inherit;\n\tbackground-color: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-right: 1px solid <<colour tab-border>>;\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n}\n\n.tc-tab-buttons.tc-vertical button {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin-top: 3px;\n\tmargin-right: 0;\n\ttext-align: right;\n\tbackground-color: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tborder-right: none;\n\tborder-top-left-radius: 2px;\n\tborder-bottom-left-radius: 2px;\n\tborder-top-right-radius: 0;\n\tborder-bottom-right-radius: 0;\n}\n\n.tc-tab-buttons.tc-vertical button.tc-tab-selected {\n\tbackground-color: <<colour tab-background-selected>>;\n\tborder-right: 1px solid <<colour tab-background-selected>>;\n}\n\n.tc-tab-divider {\n\tborder-top: 1px solid <<colour tab-divider>>;\n}\n\n.tc-tab-divider.tc-vertical {\n\tdisplay: none;\n}\n\n.tc-tab-content {\n\tmargin-top: 14px;\n}\n\n.tc-tab-content.tc-vertical {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tpadding-top: 0;\n\tpadding-left: 14px;\n\tborder-left: 1px solid <<colour tab-border>>;\n\t-webkit-flex: 1 0 70%;\n\tflex: 1 0 70%;\n}\n\n.tc-sidebar-lists .tc-tab-buttons {\n\tmargin-bottom: -1px;\n}\n\n.tc-sidebar-lists .tc-tab-buttons button.tc-tab-selected {\n\tbackground-color: <<colour sidebar-tab-background-selected>>;\n\tcolor: <<colour sidebar-tab-foreground-selected>>;\n\tborder-left: 1px solid <<colour sidebar-tab-border-selected>>;\n\tborder-top: 1px solid <<colour sidebar-tab-border-selected>>;\n\tborder-right: 1px solid <<colour sidebar-tab-border-selected>>;\n}\n\n.tc-sidebar-lists .tc-tab-buttons button {\n\tbackground-color: <<colour sidebar-tab-background>>;\n\tcolor: <<colour sidebar-tab-foreground>>;\n\tborder-left: 1px solid <<colour sidebar-tab-border>>;\n\tborder-top: 1px solid <<colour sidebar-tab-border>>;\n\tborder-right: 1px solid <<colour sidebar-tab-border>>;\n}\n\n.tc-sidebar-lists .tc-tab-divider {\n\tborder-top: 1px solid <<colour sidebar-tab-divider>>;\n}\n\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button {\n\tdisplay: block;\n\twidth: 100%;\n\tbackground-color: <<colour sidebar-tab-background>>;\n\tborder-top: none;\n\tborder-left: none;\n\tborder-bottom: none;\n\tborder-right: 1px solid #ccc;\n\tmargin-bottom: inherit;\n}\n\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button.tc-tab-selected {\n\tbackground-color: <<colour sidebar-tab-background-selected>>;\n\tborder: none;\n}\n\n/*\n** Manager\n*/\n\n.tc-manager-wrapper {\n\t\n}\n\n.tc-manager-controls {\n\t\n}\n\n.tc-manager-control {\n\tmargin: 0.5em 0;\n}\n\n.tc-manager-list {\n\twidth: 100%;\n\tborder-top: 1px solid <<colour muted-foreground>>;\n\tborder-left: 1px solid <<colour muted-foreground>>;\n\tborder-right: 1px solid <<colour muted-foreground>>;\n}\n\n.tc-manager-list-item {\n\n}\n\n.tc-manager-list-item-heading {\n display: block;\n width: 100%;\n text-align: left;\t\n\tborder-bottom: 1px solid <<colour muted-foreground>>;\n\tpadding: 3px;\n}\n\n.tc-manager-list-item-heading-selected {\n\tfont-weight: bold;\n\tcolor: <<colour background>>;\n\tfill: <<colour background>>;\n\tbackground-color: <<colour foreground>>;\n}\n\n.tc-manager-list-item-heading:hover {\n\tbackground: <<colour primary>>;\n\tcolor: <<colour background>>;\n}\n\n.tc-manager-list-item-content {\n\tdisplay: flex;\n}\n\n.tc-manager-list-item-content-sidebar {\n flex: 1 0;\n background: <<colour tiddler-editor-background>>;\n border-right: 0.5em solid <<colour muted-foreground>>;\n border-bottom: 0.5em solid <<colour muted-foreground>>;\n white-space: nowrap;\n}\n\n.tc-manager-list-item-content-item-heading {\n\tdisplay: block;\n\twidth: 100%;\n\ttext-align: left;\n background: <<colour muted-foreground>>;\n\ttext-transform: uppercase;\n\tfont-size: 0.6em;\n\tfont-weight: bold;\n padding: 0.5em 0 0.5em 0;\n}\n\n.tc-manager-list-item-content-item-body {\n\tpadding: 0 0.5em 0 0.5em;\n}\n\n.tc-manager-list-item-content-item-body > pre {\n\tmargin: 0.5em 0 0.5em 0;\n\tborder: none;\n\tbackground: inherit;\n}\n\n.tc-manager-list-item-content-tiddler {\n flex: 3 1;\n border-left: 0.5em solid <<colour muted-foreground>>;\n border-right: 0.5em solid <<colour muted-foreground>>;\n border-bottom: 0.5em solid <<colour muted-foreground>>;\n}\n\n.tc-manager-list-item-content-item-body > table {\n\tborder: none;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.tc-manager-list-item-content-item-body > table td {\n\tborder: none;\n}\n\n.tc-manager-icon-editor > button {\n\twidth: 100%;\n}\n\n.tc-manager-icon-editor > button > svg,\n.tc-manager-icon-editor > button > button {\n\twidth: 100%;\n\theight: auto;\n}\n\n/*\n** Alerts\n*/\n\n.tc-alerts {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tmax-width: 500px;\n\tz-index: 20000;\n}\n\n.tc-alert {\n\tposition: relative;\n\tmargin: 28px;\n\tpadding: 14px 14px 14px 14px;\n\tborder: 2px solid <<colour alert-border>>;\n\tbackground-color: <<colour alert-background>>;\n}\n\n.tc-alert-toolbar {\n\tposition: absolute;\n\ttop: 14px;\n\tright: 14px;\n}\n\n.tc-alert-toolbar svg {\n\tfill: <<colour alert-muted-foreground>>;\n}\n\n.tc-alert-subtitle {\n\tcolor: <<colour alert-muted-foreground>>;\n\tfont-weight: bold;\n}\n\n.tc-alert-highlight {\n\tcolor: <<colour alert-highlight>>;\n}\n\n@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}) {\n\n\t.tc-static-alert {\n\t\tposition: relative;\n\t}\n\n\t.tc-static-alert-inner {\n\t\tposition: absolute;\n\t\tz-index: 100;\n\t}\n\n}\n\n.tc-static-alert-inner {\n\tpadding: 0 2px 2px 42px;\n\tcolor: <<colour static-alert-foreground>>;\n}\n\n/*\n** Control panel\n*/\n\n.tc-control-panel td {\n\tpadding: 4px;\n}\n\n.tc-control-panel table, .tc-control-panel table input, .tc-control-panel table textarea {\n\twidth: 100%;\n}\n\n.tc-plugin-info {\n\tdisplay: block;\n\tborder: 1px solid <<colour muted-foreground>>;\n\tbackground-colour: <<colour background>>;\n\tmargin: 0.5em 0 0.5em 0;\n\tpadding: 4px;\n}\n\n.tc-plugin-info-disabled {\n\tbackground: -webkit-repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);\n\tbackground: repeating-linear-gradient(45deg, #ff0, #ff0 10px, #eee 10px, #eee 20px);\n}\n\n.tc-plugin-info-disabled:hover {\n\tbackground: -webkit-repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);\n\tbackground: repeating-linear-gradient(45deg, #aa0, #aa0 10px, #888 10px, #888 20px);\n}\n\na.tc-tiddlylink.tc-plugin-info:hover {\n\ttext-decoration: none;\n\tbackground-color: <<colour primary>>;\n\tcolor: <<colour background>>;\n\tfill: <<colour foreground>>;\n}\n\na.tc-tiddlylink.tc-plugin-info:hover .tc-plugin-info > .tc-plugin-info-chunk > svg {\n\tfill: <<colour foreground>>;\n}\n\n.tc-plugin-info-chunk {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.tc-plugin-info-chunk h1 {\n\tfont-size: 1em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info-chunk h2 {\n\tfont-size: 0.8em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info-chunk div {\n\tfont-size: 0.7em;\n\tmargin: 2px 0 2px 0;\n}\n\n.tc-plugin-info:hover > .tc-plugin-info-chunk > img, .tc-plugin-info:hover > .tc-plugin-info-chunk > svg {\n\twidth: 2em;\n\theight: 2em;\n\tfill: <<colour foreground>>;\n}\n\n.tc-plugin-info > .tc-plugin-info-chunk > img, .tc-plugin-info > .tc-plugin-info-chunk > svg {\n\twidth: 2em;\n\theight: 2em;\n\tfill: <<colour muted-foreground>>;\n}\n\n.tc-plugin-info.tc-small-icon > .tc-plugin-info-chunk > img, .tc-plugin-info.tc-small-icon > .tc-plugin-info-chunk > svg {\n\twidth: 1em;\n\theight: 1em;\n}\n\n.tc-plugin-info-dropdown {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tmargin-top: -8px;\n}\n\n.tc-plugin-info-dropdown-message {\n\tbackground: <<colour message-background>>;\n\tpadding: 0.5em 1em 0.5em 1em;\n\tfont-weight: bold;\n\tfont-size: 0.8em;\n}\n\n.tc-plugin-info-dropdown-body {\n\tpadding: 1em 1em 1em 1em;\n}\n\n/*\n** Message boxes\n*/\n\n.tc-message-box {\n\tborder: 1px solid <<colour message-border>>;\n\tbackground: <<colour message-background>>;\n\tpadding: 0px 21px 0px 21px;\n\tfont-size: 12px;\n\tline-height: 18px;\n\tcolor: <<colour message-foreground>>;\n}\n\n.tc-message-box svg {\n\twidth: 1em;\n\theight: 1em;\n vertical-align: text-bottom;\n}\n\n/*\n** Pictures\n*/\n\n.tc-bordered-image {\n\tborder: 1px solid <<colour muted-foreground>>;\n\tpadding: 5px;\n\tmargin: 5px;\n}\n\n/*\n** Floats\n*/\n\n.tc-float-right {\n\tfloat: right;\n}\n\n/*\n** Chooser\n*/\n\n.tc-chooser {\n\tborder: 1px solid <<colour table-border>>;\n}\n\n.tc-chooser-item {\n\tborder: 8px;\n\tpadding: 2px 4px;\n}\n\n.tc-chooser-item a.tc-tiddlylink {\n\tdisplay: block;\n\ttext-decoration: none;\n\tcolor: <<colour tiddler-link-foreground>>;\n\tbackground-color: <<colour tiddler-link-background>>;\n}\n\n.tc-chooser-item a.tc-tiddlylink:hover {\n\ttext-decoration: none;\n\tcolor: <<colour tiddler-link-background>>;\n\tbackground-color: <<colour tiddler-link-foreground>>;\n}\n\n/*\n** Palette swatches\n*/\n\n.tc-swatches-horiz {\n}\n\n.tc-swatches-horiz .tc-swatch {\n\tdisplay: inline-block;\n}\n\n.tc-swatch {\n\twidth: 2em;\n\theight: 2em;\n\tmargin: 0.4em;\n\tborder: 1px solid #888;\n}\n\n/*\n** Table of contents\n*/\n\n.tc-sidebar-lists .tc-table-of-contents {\n\twhite-space: nowrap;\n}\n\n.tc-table-of-contents button {\n\tcolor: <<colour sidebar-foreground>>;\n}\n\n.tc-table-of-contents svg {\n\twidth: 0.7em;\n\theight: 0.7em;\n\tvertical-align: middle;\n\tfill: <<colour sidebar-foreground>>;\n}\n\n.tc-table-of-contents ol {\n\tlist-style-type: none;\n\tpadding-left: 0;\n}\n\n.tc-table-of-contents ol ol {\n\tpadding-left: 1em;\n}\n\n.tc-table-of-contents li {\n\tfont-size: 1.0em;\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li a {\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li li {\n\tfont-size: 0.95em;\n\tfont-weight: normal;\n\tline-height: 1.4;\n}\n\n.tc-table-of-contents li li a {\n\tfont-weight: normal;\n}\n\n.tc-table-of-contents li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n\tline-height: 1.5;\n}\n\n.tc-table-of-contents li li li a {\n\tfont-weight: bold;\n}\n\n.tc-table-of-contents li li li li {\n\tfont-size: 0.95em;\n\tfont-weight: 200;\n}\n\n.tc-tabbed-table-of-contents {\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents {\n\tz-index: 100;\n\tdisplay: inline-block;\n\tpadding-left: 1em;\n\tmax-width: 50%;\n\t-webkit-flex: 0 0 auto;\n\tflex: 0 0 auto;\n\tbackground: <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a,\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {\n\tdisplay: block;\n\tpadding: 0.12em 1em 0.12em 0.25em;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a {\n\tborder-top: 1px solid <<colour tab-background>>;\n\tborder-left: 1px solid <<colour tab-background>>;\n\tborder-bottom: 1px solid <<colour tab-background>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item > a:hover {\n\ttext-decoration: none;\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tbackground: <<colour tab-border>>;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a {\n\tborder-top: 1px solid <<colour tab-border>>;\n\tborder-left: 1px solid <<colour tab-border>>;\n\tborder-bottom: 1px solid <<colour tab-border>>;\n\tbackground: <<colour background>>;\n\tmargin-right: -1px;\n}\n\n.tc-tabbed-table-of-contents .tc-table-of-contents .toc-item-selected > a:hover {\n\ttext-decoration: none;\n}\n\n.tc-tabbed-table-of-contents .tc-tabbed-table-of-contents-content {\n\tdisplay: inline-block;\n\tvertical-align: top;\n\tpadding-left: 1.5em;\n\tpadding-right: 1.5em;\n\tborder: 1px solid <<colour tab-border>>;\n\t-webkit-flex: 1 0 50%;\n\tflex: 1 0 50%;\n}\n\n/*\n** Dirty indicator\n*/\n\nbody.tc-dirty span.tc-dirty-indicator, body.tc-dirty span.tc-dirty-indicator svg {\n\tfill: <<colour dirty-indicator>>;\n\tcolor: <<colour dirty-indicator>>;\n}\n\n/*\n** File inputs\n*/\n\n.tc-file-input-wrapper {\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n}\n\n.tc-file-input-wrapper input[type=file] {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tfont-size: 999px;\n\tmax-width: 100%;\n\tmax-height: 100%;\n\tfilter: alpha(opacity=0);\n\topacity: 0;\n\toutline: none;\n\tbackground: white;\n\tcursor: pointer;\n\tdisplay: inline-block;\n}\n\n/*\n** Thumbnail macros\n*/\n\n.tc-thumbnail-wrapper {\n\tposition: relative;\n\tdisplay: inline-block;\n\tmargin: 6px;\n\tvertical-align: top;\n}\n\n.tc-thumbnail-right-wrapper {\n\tfloat:right;\n\tmargin: 0.5em 0 0.5em 0.5em;\n}\n\n.tc-thumbnail-image {\n\ttext-align: center;\n\toverflow: hidden;\n\tborder-radius: 3px;\n}\n\n.tc-thumbnail-image svg,\n.tc-thumbnail-image img {\n\tfilter: alpha(opacity=1);\n\topacity: 1;\n\tmin-width: 100%;\n\tmin-height: 100%;\n\tmax-width: 100%;\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-image svg,\n.tc-thumbnail-wrapper:hover .tc-thumbnail-image img {\n\tfilter: alpha(opacity=0.8);\n\topacity: 0.8;\n}\n\n.tc-thumbnail-background {\n\tposition: absolute;\n\tborder-radius: 3px;\n}\n\n.tc-thumbnail-icon svg,\n.tc-thumbnail-icon img {\n\twidth: 3em;\n\theight: 3em;\n\t<<filter \"drop-shadow(2px 2px 4px rgba(0,0,0,0.3))\">>\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-icon svg,\n.tc-thumbnail-wrapper:hover .tc-thumbnail-icon img {\n\tfill: #fff;\n\t<<filter \"drop-shadow(3px 3px 4px rgba(0,0,0,0.6))\">>\n}\n\n.tc-thumbnail-icon {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tdisplay: -webkit-flex;\n\t-webkit-align-items: center;\n\t-webkit-justify-content: center;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.tc-thumbnail-caption {\n\tposition: absolute;\n\tbackground-color: #777;\n\tcolor: #fff;\n\ttext-align: center;\n\tbottom: 0;\n\twidth: 100%;\n\tfilter: alpha(opacity=0.9);\n\topacity: 0.9;\n\tline-height: 1.4;\n\tborder-bottom-left-radius: 3px;\n\tborder-bottom-right-radius: 3px;\n}\n\n.tc-thumbnail-wrapper:hover .tc-thumbnail-caption {\n\tfilter: alpha(opacity=1);\n\topacity: 1;\n}\n\n/*\n** Errors\n*/\n\n.tc-error {\n\tbackground: #f00;\n\tcolor: #fff;\n}\n\n/*\n** Tree macro\n*/\n\n.tc-tree div {\n \tpadding-left: 14px;\n}\n\n.tc-tree ol {\n \tlist-style-type: none;\n \tpadding-left: 0;\n \tmargin-top: 0;\n}\n\n.tc-tree ol ol {\n \tpadding-left: 1em; \n}\n\n.tc-tree button { \n \tcolor: #acacac;\n}\n\n.tc-tree svg {\n \tfill: #acacac;\n}\n\n.tc-tree span svg {\n \twidth: 1em;\n \theight: 1em;\n \tvertical-align: baseline;\n}\n\n.tc-tree li span {\n \tcolor: lightgray;\n}\n"
},
"$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/bodyfontsize",
"text": "15px"
},
"$:/themes/tiddlywiki/vanilla/metrics/bodylineheight": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/bodylineheight",
"text": "22px"
},
"$:/themes/tiddlywiki/vanilla/metrics/fontsize": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/fontsize",
"text": "14px"
},
"$:/themes/tiddlywiki/vanilla/metrics/lineheight": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/lineheight",
"text": "20px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storyleft": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storyleft",
"text": "0px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storytop": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storytop",
"text": "0px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storyright": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storyright",
"text": "770px"
},
"$:/themes/tiddlywiki/vanilla/metrics/storywidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/storywidth",
"text": "770px"
},
"$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth",
"text": "686px"
},
"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint",
"text": "960px"
},
"$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth": {
"title": "$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth",
"text": "350px"
},
"$:/themes/tiddlywiki/vanilla/options/stickytitles": {
"title": "$:/themes/tiddlywiki/vanilla/options/stickytitles",
"text": "no"
},
"$:/themes/tiddlywiki/vanilla/options/sidebarlayout": {
"title": "$:/themes/tiddlywiki/vanilla/options/sidebarlayout",
"text": "fixed-fluid"
},
"$:/themes/tiddlywiki/vanilla/options/codewrapping": {
"title": "$:/themes/tiddlywiki/vanilla/options/codewrapping",
"text": "pre-wrap"
},
"$:/themes/tiddlywiki/vanilla/reset": {
"title": "$:/themes/tiddlywiki/vanilla/reset",
"type": "text/plain",
"text": "/*! normalize.css v3.0.0 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n * user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined in IE 8/9.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9.\n * Hide the `template` element in IE, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background: transparent;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9, Safari 5, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.\n */\n\nb,\nstrong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari 5 and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari 5, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow displayed oddly in IE 9.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari 5.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8+, and Opera\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\n * (include `-moz` to future-proof).\n */\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; /* 2 */\n box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n"
},
"$:/themes/tiddlywiki/vanilla/settings/fontfamily": {
"title": "$:/themes/tiddlywiki/vanilla/settings/fontfamily",
"text": "\"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", \"DejaVu Sans\", sans-serif"
},
"$:/themes/tiddlywiki/vanilla/settings/codefontfamily": {
"title": "$:/themes/tiddlywiki/vanilla/settings/codefontfamily",
"text": "Monaco, Consolas, \"Lucida Console\", \"DejaVu Sans Mono\", monospace"
},
"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment": {
"title": "$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment",
"text": "fixed"
},
"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize": {
"title": "$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize",
"text": "auto"
},
"$:/themes/tiddlywiki/vanilla/sticky": {
"title": "$:/themes/tiddlywiki/vanilla/sticky",
"text": "<$reveal state=\"$:/themes/tiddlywiki/vanilla/options/stickytitles\" type=\"match\" text=\"yes\">\n``\n.tc-tiddler-title {\n\tposition: -webkit-sticky;\n\tposition: -moz-sticky;\n\tposition: -o-sticky;\n\tposition: -ms-sticky;\n\tposition: sticky;\n\ttop: 0px;\n\tbackground: ``<<colour tiddler-background>>``;\n\tz-index: 500;\n}\n``\n</$reveal>\n"
}
}
}
!!Now you can:
* TAP/CLICK ''4 times'' on a tiddler to open a MODAL dialogue to choose from a set of actions for that tiddler
* CLICK and HOLD/TAP and HOLD about half a second on a Tiddler opens / closes sidebar
<<info """These actions are only enabled when dragging is enabled""">>
\define lingo-base() $:/language/Tiddlers/Opacity/
\define tiddler-opacity-inner()
<$button tag="a" tooltip="""$(opacity)$""" style="font-size: 1rem">
<$action-setfield
$tiddler="$:/plugins/BTC/tiddly-touch/config" $field="tiddler-opacity"
$value="$(new-opacity)$"
/>
<$action-deletetiddler
$tiddler=<<dropdown-state>>
/>
<div style="display: inline-block; vertical-align: middle; background-color: #2A2B30; opacity: $(opacity)$; width: 1em; height: 1em; border-radius: 50%;"/>
<span style="margin-left: 8px;">
<$text text="""$(opacity)$"""/>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity" type="match" text="""$(new-opacity)$""" tag="span">
<$entity entity=" "/>
<$entity entity="✓"/>
</$reveal>
</span>
</$button>
\end
\define tiddler-opacity()
''<<lingo Hint>>''
<$list filter="[list[$:/plugins/BTC/tiddly-touch/AddOns/Buttons/tiddler-sidebar-opacity!!tiddler-opacities]]" variable="opacity">
<$list filter="[<opacity>regexp[0.0]]">
<$set name="new-opacity" value="00">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.1]]">
<$set name="new-opacity" value="19">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.2]]">
<$set name="new-opacity" value="33">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.3]]">
<$set name="new-opacity" value="4c">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.4]]">
<$set name="new-opacity" value="66">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.5]]">
<$set name="new-opacity" value="80">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.6]]">
<$set name="new-opacity" value="99">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.7]]">
<$set name="new-opacity" value="b3">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.8]]">
<$set name="new-opacity" value="cc">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.9]!regexp[0.95]]">
<$set name="new-opacity" value="e6">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[0.95]]">
<$set name="new-opacity" value="f3">
<<tiddler-opacity-inner>>
</$set>
</$list>
<$list filter="[<opacity>regexp[1.0]]">
<$set name="new-opacity" value="ff">
<<tiddler-opacity-inner>>
</$set>
</$list>
</$list>
\end
!!Come on, we're not in politics
<$set name="dropdown-state" value=<<qualify "$:/state/drop-down">>>
<span class="tc-popup-keep">
<$button popup=<<dropdown-state>> tooltip="Tiddler opacity" aria-label="Tiddler opacity" class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]"><span class="big-icon blue-icon">
{{$:/core/images/opacity}}</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text="triddler opacity"/></span>
</$list>
</$button>
</span>
<$reveal state=<<dropdown-state>> type="popup" position="right" animate="yes">
<div class="tc-drop-down" style="font-size:1.2em;">
<$set name="current-background-color" value=<<colour background>>>
<$set name="current-hex-tiddler-opacity" value={{$:/plugins/BTC/tiddly-touch/config!!tiddler-opacity}}>
<$list filter="[<current-hex-tiddler-opacity>regexp[^00$]]">
<$set name="current-tiddler-opacity" value="0.0">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^19$]]">
<$set name="current-tiddler-opacity" value="0.1">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^33$]]">
<$set name="current-tiddler-opacity" value="0.2">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^4c$]]">
<$set name="current-tiddler-opacity" value="0.3">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^66$]]">
<$set name="current-tiddler-opacity" value="0.4">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^80$]]">
<$set name="current-tiddler-opacity" value="0.5">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^99$]]">
<$set name="current-tiddler-opacity" value="0.6">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^b3$]]">
<$set name="current-tiddler-opacity" value="0.7">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^cc$]]">
<$set name="current-tiddler-opacity" value="0.8">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^e6$]]">
<$set name="current-tiddler-opacity" value="0.9">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^f3$]]">
<$set name="current-tiddler-opacity" value="0.95">
<<tiddler-opacity>>
</$set>
</$list>
<$list filter="[<current-hex-tiddler-opacity>regexp[^ff$]]">
<$set name="current-tiddler-opacity" value="1.0">
<<tiddler-opacity>>
</$set>
</$list>
</$set>
</$set>
</div>
</$reveal>
</$set>
{{!!muuri-tiddler-width-px}}
!!!this tiddly ticking clock uses only wikitext, the formula plugin and the timer plugin to change the angles of the different hands
{{the tiddly clock}}
http://evanbalster.com/tiddlywiki/formulas.html
https://webcom.transapex.com/wp-content/uploads/adobe_analog_clock.svg
@charset "UTF-8";
/*!
* animate.css -http://daneden.me/animate
* Version - 3.5.2
* Licensed under the MIT license - http://opensource.org/licenses/MIT
*
* Copyright (c) 2018 Daniel Eden
*/
.animated {
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.animated.infinite {
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
@-webkit-keyframes bounce {
from,
20%,
53%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
40%,
43% {
-webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
70% {
-webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
90% {
-webkit-transform: translate3d(0, -4px, 0);
transform: translate3d(0, -4px, 0);
}
}
@keyframes bounce {
from,
20%,
53%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
40%,
43% {
-webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
-webkit-transform: translate3d(0, -30px, 0);
transform: translate3d(0, -30px, 0);
}
70% {
-webkit-animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
-webkit-transform: translate3d(0, -15px, 0);
transform: translate3d(0, -15px, 0);
}
90% {
-webkit-transform: translate3d(0, -4px, 0);
transform: translate3d(0, -4px, 0);
}
}
.bounce {
-webkit-animation-name: bounce;
animation-name: bounce;
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
@-webkit-keyframes flash {
from,
50%,
to {
opacity: 1;
}
25%,
75% {
opacity: 0;
}
}
@keyframes flash {
from,
50%,
to {
opacity: 1;
}
25%,
75% {
opacity: 0;
}
}
.flash {
-webkit-animation-name: flash;
animation-name: flash;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes pulse {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes pulse {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
50% {
-webkit-transform: scale3d(1.05, 1.05, 1.05);
transform: scale3d(1.05, 1.05, 1.05);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.pulse {
-webkit-animation-name: pulse;
animation-name: pulse;
}
@-webkit-keyframes rubberBand {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
30% {
-webkit-transform: scale3d(1.25, 0.75, 1);
transform: scale3d(1.25, 0.75, 1);
}
40% {
-webkit-transform: scale3d(0.75, 1.25, 1);
transform: scale3d(0.75, 1.25, 1);
}
50% {
-webkit-transform: scale3d(1.15, 0.85, 1);
transform: scale3d(1.15, 0.85, 1);
}
65% {
-webkit-transform: scale3d(0.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
-webkit-transform: scale3d(1.05, 0.95, 1);
transform: scale3d(1.05, 0.95, 1);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes rubberBand {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
30% {
-webkit-transform: scale3d(1.25, 0.75, 1);
transform: scale3d(1.25, 0.75, 1);
}
40% {
-webkit-transform: scale3d(0.75, 1.25, 1);
transform: scale3d(0.75, 1.25, 1);
}
50% {
-webkit-transform: scale3d(1.15, 0.85, 1);
transform: scale3d(1.15, 0.85, 1);
}
65% {
-webkit-transform: scale3d(0.95, 1.05, 1);
transform: scale3d(0.95, 1.05, 1);
}
75% {
-webkit-transform: scale3d(1.05, 0.95, 1);
transform: scale3d(1.05, 0.95, 1);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.rubberBand {
-webkit-animation-name: rubberBand;
animation-name: rubberBand;
}
@-webkit-keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
@keyframes shake {
from,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
10%,
30%,
50%,
70%,
90% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
20%,
40%,
60%,
80% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
}
.shake {
-webkit-animation-name: shake;
animation-name: shake;
}
@-webkit-keyframes headShake {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
6.5% {
-webkit-transform: translateX(-6px) rotateY(-9deg);
transform: translateX(-6px) rotateY(-9deg);
}
18.5% {
-webkit-transform: translateX(5px) rotateY(7deg);
transform: translateX(5px) rotateY(7deg);
}
31.5% {
-webkit-transform: translateX(-3px) rotateY(-5deg);
transform: translateX(-3px) rotateY(-5deg);
}
43.5% {
-webkit-transform: translateX(2px) rotateY(3deg);
transform: translateX(2px) rotateY(3deg);
}
50% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
@keyframes headShake {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
6.5% {
-webkit-transform: translateX(-6px) rotateY(-9deg);
transform: translateX(-6px) rotateY(-9deg);
}
18.5% {
-webkit-transform: translateX(5px) rotateY(7deg);
transform: translateX(5px) rotateY(7deg);
}
31.5% {
-webkit-transform: translateX(-3px) rotateY(-5deg);
transform: translateX(-3px) rotateY(-5deg);
}
43.5% {
-webkit-transform: translateX(2px) rotateY(3deg);
transform: translateX(2px) rotateY(3deg);
}
50% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
.headShake {
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-name: headShake;
animation-name: headShake;
}
@-webkit-keyframes swing {
20% {
-webkit-transform: rotate3d(0, 0, 1, 15deg);
transform: rotate3d(0, 0, 1, 15deg);
}
40% {
-webkit-transform: rotate3d(0, 0, 1, -10deg);
transform: rotate3d(0, 0, 1, -10deg);
}
60% {
-webkit-transform: rotate3d(0, 0, 1, 5deg);
transform: rotate3d(0, 0, 1, 5deg);
}
80% {
-webkit-transform: rotate3d(0, 0, 1, -5deg);
transform: rotate3d(0, 0, 1, -5deg);
}
to {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
}
@keyframes swing {
20% {
-webkit-transform: rotate3d(0, 0, 1, 15deg);
transform: rotate3d(0, 0, 1, 15deg);
}
40% {
-webkit-transform: rotate3d(0, 0, 1, -10deg);
transform: rotate3d(0, 0, 1, -10deg);
}
60% {
-webkit-transform: rotate3d(0, 0, 1, 5deg);
transform: rotate3d(0, 0, 1, 5deg);
}
80% {
-webkit-transform: rotate3d(0, 0, 1, -5deg);
transform: rotate3d(0, 0, 1, -5deg);
}
to {
-webkit-transform: rotate3d(0, 0, 1, 0deg);
transform: rotate3d(0, 0, 1, 0deg);
}
}
.swing {
-webkit-transform-origin: top center;
transform-origin: top center;
-webkit-animation-name: swing;
animation-name: swing;
}
@-webkit-keyframes tada {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
}
30%,
50%,
70%,
90% {
-webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
}
40%,
60%,
80% {
-webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes tada {
from {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
}
30%,
50%,
70%,
90% {
-webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
}
40%,
60%,
80% {
-webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
}
to {
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.tada {
-webkit-animation-name: tada;
animation-name: tada;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes wobble {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
15% {
-webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
}
30% {
-webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
}
45% {
-webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
}
60% {
-webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
}
75% {
-webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes wobble {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
15% {
-webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
}
30% {
-webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
}
45% {
-webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
}
60% {
-webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
}
75% {
-webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.wobble {
-webkit-animation-name: wobble;
animation-name: wobble;
}
@-webkit-keyframes jello {
from,
11.1%,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
22.2% {
-webkit-transform: skewX(-12.5deg) skewY(-12.5deg);
transform: skewX(-12.5deg) skewY(-12.5deg);
}
33.3% {
-webkit-transform: skewX(6.25deg) skewY(6.25deg);
transform: skewX(6.25deg) skewY(6.25deg);
}
44.4% {
-webkit-transform: skewX(-3.125deg) skewY(-3.125deg);
transform: skewX(-3.125deg) skewY(-3.125deg);
}
55.5% {
-webkit-transform: skewX(1.5625deg) skewY(1.5625deg);
transform: skewX(1.5625deg) skewY(1.5625deg);
}
66.6% {
-webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);
transform: skewX(-0.78125deg) skewY(-0.78125deg);
}
77.7% {
-webkit-transform: skewX(0.390625deg) skewY(0.390625deg);
transform: skewX(0.390625deg) skewY(0.390625deg);
}
88.8% {
-webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
}
}
@keyframes jello {
from,
11.1%,
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
22.2% {
-webkit-transform: skewX(-12.5deg) skewY(-12.5deg);
transform: skewX(-12.5deg) skewY(-12.5deg);
}
33.3% {
-webkit-transform: skewX(6.25deg) skewY(6.25deg);
transform: skewX(6.25deg) skewY(6.25deg);
}
44.4% {
-webkit-transform: skewX(-3.125deg) skewY(-3.125deg);
transform: skewX(-3.125deg) skewY(-3.125deg);
}
55.5% {
-webkit-transform: skewX(1.5625deg) skewY(1.5625deg);
transform: skewX(1.5625deg) skewY(1.5625deg);
}
66.6% {
-webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg);
transform: skewX(-0.78125deg) skewY(-0.78125deg);
}
77.7% {
-webkit-transform: skewX(0.390625deg) skewY(0.390625deg);
transform: skewX(0.390625deg) skewY(0.390625deg);
}
88.8% {
-webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
}
}
.jello {
-webkit-animation-name: jello;
animation-name: jello;
-webkit-transform-origin: center;
transform-origin: center;
}
@-webkit-keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes bounceIn {
from,
20%,
40%,
60%,
80%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
20% {
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
40% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
60% {
opacity: 1;
-webkit-transform: scale3d(1.03, 1.03, 1.03);
transform: scale3d(1.03, 1.03, 1.03);
}
80% {
-webkit-transform: scale3d(0.97, 0.97, 0.97);
transform: scale3d(0.97, 0.97, 0.97);
}
to {
opacity: 1;
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.bounceIn {
-webkit-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-name: bounceIn;
animation-name: bounceIn;
}
@-webkit-keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInDown {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(0, -3000px, 0);
transform: translate3d(0, -3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, 25px, 0);
transform: translate3d(0, 25px, 0);
}
75% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
90% {
-webkit-transform: translate3d(0, 5px, 0);
transform: translate3d(0, 5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInDown {
-webkit-animation-name: bounceInDown;
animation-name: bounceInDown;
}
@-webkit-keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInLeft {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
0% {
opacity: 0;
-webkit-transform: translate3d(-3000px, 0, 0);
transform: translate3d(-3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(25px, 0, 0);
transform: translate3d(25px, 0, 0);
}
75% {
-webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0);
}
90% {
-webkit-transform: translate3d(5px, 0, 0);
transform: translate3d(5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInLeft {
-webkit-animation-name: bounceInLeft;
animation-name: bounceInLeft;
}
@-webkit-keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInRight {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(3000px, 0, 0);
transform: translate3d(3000px, 0, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(-25px, 0, 0);
transform: translate3d(-25px, 0, 0);
}
75% {
-webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0);
}
90% {
-webkit-transform: translate3d(-5px, 0, 0);
transform: translate3d(-5px, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInRight {
-webkit-animation-name: bounceInRight;
animation-name: bounceInRight;
}
@-webkit-keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes bounceInUp {
from,
60%,
75%,
90%,
to {
-webkit-animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
from {
opacity: 0;
-webkit-transform: translate3d(0, 3000px, 0);
transform: translate3d(0, 3000px, 0);
}
60% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
75% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
90% {
-webkit-transform: translate3d(0, -5px, 0);
transform: translate3d(0, -5px, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.bounceInUp {
-webkit-animation-name: bounceInUp;
animation-name: bounceInUp;
}
@-webkit-keyframes bounceOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
@keyframes bounceOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
.bounceOut {
-webkit-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-name: bounceOut;
animation-name: bounceOut;
}
@-webkit-keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes bounceOutDown {
20% {
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.bounceOutDown {
-webkit-animation-name: bounceOutDown;
animation-name: bounceOutDown;
}
@-webkit-keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes bounceOutLeft {
20% {
opacity: 1;
-webkit-transform: translate3d(20px, 0, 0);
transform: translate3d(20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.bounceOutLeft {
-webkit-animation-name: bounceOutLeft;
animation-name: bounceOutLeft;
}
@-webkit-keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes bounceOutRight {
20% {
opacity: 1;
-webkit-transform: translate3d(-20px, 0, 0);
transform: translate3d(-20px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.bounceOutRight {
-webkit-animation-name: bounceOutRight;
animation-name: bounceOutRight;
}
@-webkit-keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes bounceOutUp {
20% {
-webkit-transform: translate3d(0, -10px, 0);
transform: translate3d(0, -10px, 0);
}
40%,
45% {
opacity: 1;
-webkit-transform: translate3d(0, 20px, 0);
transform: translate3d(0, 20px, 0);
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.bounceOutUp {
-webkit-animation-name: bounceOutUp;
animation-name: bounceOutUp;
}
@-webkit-keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
@-webkit-keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInDownBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInDownBig {
-webkit-animation-name: fadeInDownBig;
animation-name: fadeInDownBig;
}
@-webkit-keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeft {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
@-webkit-keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInLeftBig {
from {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInLeftBig {
-webkit-animation-name: fadeInLeftBig;
animation-name: fadeInLeftBig;
}
@-webkit-keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRight {
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInRightBig {
from {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInRightBig {
-webkit-animation-name: fadeInRightBig;
animation-name: fadeInRightBig;
}
@-webkit-keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUp {
-webkit-animation-name: fadeInUp;
animation-name: fadeInUp;
}
@-webkit-keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes fadeInUpBig {
from {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.fadeInUpBig {
-webkit-animation-name: fadeInUpBig;
animation-name: fadeInUpBig;
}
@-webkit-keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.fadeOut {
-webkit-animation-name: fadeOut;
animation-name: fadeOut;
}
@-webkit-keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
@keyframes fadeOutDown {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.fadeOutDown {
-webkit-animation-name: fadeOutDown;
animation-name: fadeOutDown;
}
@-webkit-keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
@keyframes fadeOutDownBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, 2000px, 0);
transform: translate3d(0, 2000px, 0);
}
}
.fadeOutDownBig {
-webkit-animation-name: fadeOutDownBig;
animation-name: fadeOutDownBig;
}
@-webkit-keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes fadeOutLeft {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.fadeOutLeft {
-webkit-animation-name: fadeOutLeft;
animation-name: fadeOutLeft;
}
@-webkit-keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
@keyframes fadeOutLeftBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(-2000px, 0, 0);
transform: translate3d(-2000px, 0, 0);
}
}
.fadeOutLeftBig {
-webkit-animation-name: fadeOutLeftBig;
animation-name: fadeOutLeftBig;
}
@-webkit-keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes fadeOutRight {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.fadeOutRight {
-webkit-animation-name: fadeOutRight;
animation-name: fadeOutRight;
}
@-webkit-keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
@keyframes fadeOutRightBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(2000px, 0, 0);
transform: translate3d(2000px, 0, 0);
}
}
.fadeOutRightBig {
-webkit-animation-name: fadeOutRightBig;
animation-name: fadeOutRightBig;
}
@-webkit-keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.fadeOutUp {
-webkit-animation-name: fadeOutUp;
animation-name: fadeOutUp;
}
@-webkit-keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
@keyframes fadeOutUpBig {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -2000px, 0);
transform: translate3d(0, -2000px, 0);
}
}
.fadeOutUpBig {
-webkit-animation-name: fadeOutUpBig;
animation-name: fadeOutUpBig;
}
@-webkit-keyframes flip {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
@keyframes flip {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
40% {
-webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
50% {
-webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
80% {
-webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
transform: perspective(400px) scale3d(0.95, 0.95, 0.95);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
}
.animated.flip {
-webkit-backface-visibility: visible;
backface-visibility: visible;
-webkit-animation-name: flip;
animation-name: flip;
}
@-webkit-keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInX {
from {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInX {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInX;
animation-name: flipInX;
}
@-webkit-keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
from {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
.flipInY {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipInY;
animation-name: flipInY;
}
@-webkit-keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutX {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
opacity: 0;
}
}
.flipOutX {
-webkit-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-name: flipOutX;
animation-name: flipOutX;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
}
@-webkit-keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
@keyframes flipOutY {
from {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
30% {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
opacity: 1;
}
to {
-webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
opacity: 0;
}
}
.flipOutY {
-webkit-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
-webkit-animation-name: flipOutY;
animation-name: flipOutY;
}
@-webkit-keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes lightSpeedIn {
from {
-webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
transform: translate3d(100%, 0, 0) skewX(-30deg);
opacity: 0;
}
60% {
-webkit-transform: skewX(20deg);
transform: skewX(20deg);
opacity: 1;
}
80% {
-webkit-transform: skewX(-5deg);
transform: skewX(-5deg);
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.lightSpeedIn {
-webkit-animation-name: lightSpeedIn;
animation-name: lightSpeedIn;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out;
}
@-webkit-keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
@keyframes lightSpeedOut {
from {
opacity: 1;
}
to {
-webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
transform: translate3d(100%, 0, 0) skewX(30deg);
opacity: 0;
}
}
.lightSpeedOut {
-webkit-animation-name: lightSpeedOut;
animation-name: lightSpeedOut;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
@-webkit-keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateIn {
from {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, -200deg);
transform: rotate3d(0, 0, 1, -200deg);
opacity: 0;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateIn {
-webkit-animation-name: rotateIn;
animation-name: rotateIn;
}
@-webkit-keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownLeft {
-webkit-animation-name: rotateInDownLeft;
animation-name: rotateInDownLeft;
}
@-webkit-keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInDownRight {
-webkit-animation-name: rotateInDownRight;
animation-name: rotateInDownRight;
}
@-webkit-keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpLeft {
-webkit-animation-name: rotateInUpLeft;
animation-name: rotateInUpLeft;
}
@-webkit-keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes rotateInUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -90deg);
transform: rotate3d(0, 0, 1, -90deg);
opacity: 0;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
.rotateInUpRight {
-webkit-animation-name: rotateInUpRight;
animation-name: rotateInUpRight;
}
@-webkit-keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
@keyframes rotateOut {
from {
-webkit-transform-origin: center;
transform-origin: center;
opacity: 1;
}
to {
-webkit-transform-origin: center;
transform-origin: center;
-webkit-transform: rotate3d(0, 0, 1, 200deg);
transform: rotate3d(0, 0, 1, 200deg);
opacity: 0;
}
}
.rotateOut {
-webkit-animation-name: rotateOut;
animation-name: rotateOut;
}
@-webkit-keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
@keyframes rotateOutDownLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, 45deg);
transform: rotate3d(0, 0, 1, 45deg);
opacity: 0;
}
}
.rotateOutDownLeft {
-webkit-animation-name: rotateOutDownLeft;
animation-name: rotateOutDownLeft;
}
@-webkit-keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutDownRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutDownRight {
-webkit-animation-name: rotateOutDownRight;
animation-name: rotateOutDownRight;
}
@-webkit-keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
@keyframes rotateOutUpLeft {
from {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
opacity: 1;
}
to {
-webkit-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: rotate3d(0, 0, 1, -45deg);
transform: rotate3d(0, 0, 1, -45deg);
opacity: 0;
}
}
.rotateOutUpLeft {
-webkit-animation-name: rotateOutUpLeft;
animation-name: rotateOutUpLeft;
}
@-webkit-keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
@keyframes rotateOutUpRight {
from {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
opacity: 1;
}
to {
-webkit-transform-origin: right bottom;
transform-origin: right bottom;
-webkit-transform: rotate3d(0, 0, 1, 90deg);
transform: rotate3d(0, 0, 1, 90deg);
opacity: 0;
}
}
.rotateOutUpRight {
-webkit-animation-name: rotateOutUpRight;
animation-name: rotateOutUpRight;
}
@-webkit-keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
@keyframes hinge {
0% {
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
20%,
60% {
-webkit-transform: rotate3d(0, 0, 1, 80deg);
transform: rotate3d(0, 0, 1, 80deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
}
40%,
80% {
-webkit-transform: rotate3d(0, 0, 1, 60deg);
transform: rotate3d(0, 0, 1, 60deg);
-webkit-transform-origin: top left;
transform-origin: top left;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
opacity: 1;
}
to {
-webkit-transform: translate3d(0, 700px, 0);
transform: translate3d(0, 700px, 0);
opacity: 0;
}
}
.hinge {
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-name: hinge;
animation-name: hinge;
}
@-webkit-keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(0.1) rotate(30deg);
transform: scale(0.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes jackInTheBox {
from {
opacity: 0;
-webkit-transform: scale(0.1) rotate(30deg);
transform: scale(0.1) rotate(30deg);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
}
50% {
-webkit-transform: rotate(-10deg);
transform: rotate(-10deg);
}
70% {
-webkit-transform: rotate(3deg);
transform: rotate(3deg);
}
to {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
}
.jackInTheBox {
-webkit-animation-name: jackInTheBox;
animation-name: jackInTheBox;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes rollIn {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.rollIn {
-webkit-animation-name: rollIn;
animation-name: rollIn;
}
/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
@-webkit-keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
@keyframes rollOut {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
}
}
.rollOut {
-webkit-animation-name: rollOut;
animation-name: rollOut;
}
@-webkit-keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
opacity: 1;
}
}
@keyframes zoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
opacity: 1;
}
}
.zoomIn {
-webkit-animation-name: zoomIn;
animation-name: zoomIn;
}
@-webkit-keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomInDown {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomInDown {
-webkit-animation-name: zoomInDown;
animation-name: zoomInDown;
}
@-webkit-keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomInLeft {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomInLeft {
-webkit-animation-name: zoomInLeft;
animation-name: zoomInLeft;
}
@-webkit-keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomInRight {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomInRight {
-webkit-animation-name: zoomInRight;
animation-name: zoomInRight;
}
@-webkit-keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomInUp {
from {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
60% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomInUp {
-webkit-animation-name: zoomInUp;
animation-name: zoomInUp;
}
@-webkit-keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
@keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
.zoomOut {
-webkit-animation-name: zoomOut;
animation-name: zoomOut;
}
@-webkit-keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomOutDown {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomOutDown {
-webkit-animation-name: zoomOutDown;
animation-name: zoomOutDown;
}
@-webkit-keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);
transform: scale(0.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
@keyframes zoomOutLeft {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(0.1) translate3d(-2000px, 0, 0);
transform: scale(0.1) translate3d(-2000px, 0, 0);
-webkit-transform-origin: left center;
transform-origin: left center;
}
}
.zoomOutLeft {
-webkit-animation-name: zoomOutLeft;
animation-name: zoomOutLeft;
}
@-webkit-keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(0.1) translate3d(2000px, 0, 0);
transform: scale(0.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
@keyframes zoomOutRight {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0);
}
to {
opacity: 0;
-webkit-transform: scale(0.1) translate3d(2000px, 0, 0);
transform: scale(0.1) translate3d(2000px, 0, 0);
-webkit-transform-origin: right center;
transform-origin: right center;
}
}
.zoomOutRight {
-webkit-animation-name: zoomOutRight;
animation-name: zoomOutRight;
}
@-webkit-keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
@keyframes zoomOutUp {
40% {
opacity: 1;
-webkit-transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
transform: scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
transform: scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0);
-webkit-transform-origin: center bottom;
transform-origin: center bottom;
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1);
}
}
.zoomOutUp {
-webkit-animation-name: zoomOutUp;
animation-name: zoomOutUp;
}
@-webkit-keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInDown {
from {
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInDown {
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
}
@-webkit-keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInLeft {
from {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInLeft {
-webkit-animation-name: slideInLeft;
animation-name: slideInLeft;
}
@-webkit-keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInRight {
-webkit-animation-name: slideInRight;
animation-name: slideInRight;
}
@-webkit-keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
@keyframes slideInUp {
from {
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
visibility: visible;
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}
.slideInUp {
-webkit-animation-name: slideInUp;
animation-name: slideInUp;
}
@-webkit-keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
@keyframes slideOutDown {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
}
.slideOutDown {
-webkit-animation-name: slideOutDown;
animation-name: slideOutDown;
}
@-webkit-keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
@keyframes slideOutLeft {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
.slideOutLeft {
-webkit-animation-name: slideOutLeft;
animation-name: slideOutLeft;
}
@-webkit-keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
@keyframes slideOutRight {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
}
.slideOutRight {
-webkit-animation-name: slideOutRight;
animation-name: slideOutRight;
}
@-webkit-keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
@keyframes slideOutUp {
from {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
visibility: hidden;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
}
.slideOutUp {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
}
<div class="tc-dynaview-zoom-factor-4">
<$transclude tiddler="watch muuri in different colors" mode="block"/>
</div>
<div class="tc-dynaview-zoom-factor-3">
<$transclude tiddler="yo! go fullscreen!" mode="block"/>
</div>
<div class="tc-dynaview-zoom-factor-2">
<$transclude tiddler="a little bit of transparency" mode="block"/>
</div>
<div class="tc-dynaview-zoom-factor-1">
<$transclude tiddler="$:/plugins/BTC/tiddly-touch/community/additions/show-hide-all-controls" mode="block"/>
</div>
by default this tiddler shows nothing but it reveals content if you change it's size by zooming (pinch-zoom)
\define actions()
<$action-setfield $tiddler="example-$(currentTiddler)$" $field="text" $value="""<$button class="tc-btn-invisible big-icon" message="tm-modal" param="$(currentTiddler)$">{{$(currentTiddler)$}}</$button>"""/><$action-setfield $tiddler="example-$(currentTiddler)$" $field="tags"
$value="$:/tags/minimalView"/><$action-navigate $to="example-$(currentTiddler)$"/>
\end
<$button class="button"><$list filter="[all[shadows+tiddlers]tag[$:/tags/Image]limit[50]]"><<actions>></$list>Click here
</$button>
This is a way to create something like an image-gallery with a button, that lists images and creates single tiddlers with a specified tag. One can assign css rules to those tags to style the gallery. Try it out ...
!!New: it uses a minimal ViewTemplate to save performance through the tag "$:/tags/minimalView"
each tiddler tagged with `$:/tags/minimalView` shows only the Tiddler body
<style>
.tc-tiddler-frame.tc-tagged-sampletag {
max-height: 10vh !important;
max-width: 10vh !important;
min-height: 10vh !important;
min-width: 10vh !important;
padding: 5px 5px 5px 5px;
text-align: center !important;
vertical-align: center;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar h2 {
display: none;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-titlebar {
display: none !important;
}
.tc-tiddler-frame.tc-tagged-sampletag .tc-subtitle, .tc-tiddler-frame.tc-tagged-sampletag .tc-tags-wrapper, .tc-tiddler-frame.tc-tagged-sampletag .tc-tiddler-controls {
display: none !important;
}
</style>
[img [https://upload.wikimedia.org/wikipedia/en/b/b9/MagrittePipe.jpg]]
"""
Ctrl-F / Cmd-F
Start searching
Ctrl-G / Cmd-G
Find next
Shift-Ctrl-G / Shift-Cmd-G
Find previous
Shift-Ctrl-F / Cmd-Option-F
Replace
Shift-Ctrl-R / Shift-Cmd-Option-F
Replace all
Alt-F
Persistent search (dialog doesn't autoclose, enter to find next, Shift-Enter to find previous)
Alt-G
Jump to line
!if you like, you can show different content for each pixel
{
"tiddlers+shadows": "all[tiddlers+shadows]",
"tiddlers": "all[tiddlers]"
}
!!!the table widget reads data from a specified json tiddler, here:
[[spreadsheet_data.json]]
<$spreadsheet target="test" tiddler="spreadsheet_data.json">
<div class="test">
<div class="hallo">
</div>
</div>
</$spreadsheet>
#drag two tiddlers to your wiki:
#* $:/plugins/tiddlywiki/codemirror/addon/search/jump-to-line.js
#* $:/plugins/tiddlywiki/codemirror/addon/search/search.js
#edit $:/config/CodeMirror to require those tiddlers (see how I did it in the tiddler to the right)
#set cursorBlinkRate to 0 (haha I'm kidding - that's just my gusto)
#save and restart your wiki
!!!...on Android, Windows, Linux, OSX, iOS and maybe your fridge, too!
!!You need two links
* ''__FIRST__'' https://tiddlywiki.com
** The great notetaking engine that powers this
* http://tiddlytouch.tiddlyspot.com
** the plugin that makes it a bit more touchy
[img [https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Van_Gogh_Self-Portrait_with_Straw_Hat_1887-Metropolitan.jpg/1200px-Van_Gogh_Self-Portrait_with_Straw_Hat_1887-Metropolitan.jpg]]
[img [https://upload.wikimedia.org/wikipedia/commons/c/cd/VanGogh-starry_night.jpg]]
it uses the swipe widget
drag these tiddlers to your wiki to use it right away:
* $:/plugins/BTC/tiddly-touch/widgets/swipe.js
* $:/plugins/BTC/tiddly-touch/lib/hammer.js
you don't need anything else for it to work
it lets you invoke any action by swiping with touch or mouse. like a button but triggered by a gesture
\define displayMono(param)
`$(hasDollar)$$($param$)$:`
\end
\define displayMonoResultMacroVariable(param,pre)
`$pre$$($param$)$="$($(currentTiddler)$)$"`
\end
\define displayMonoResultVariable(param,pre)
`$pre$$($param$)$=<$(currentTiddler)$>`
\end
\define displayMonoResult(param,pre,post)
`$pre$$($param$)$$post$`
\end
\define createMonoDisplayedResult()
<$list filter="[[$(currentFieldContent)$]!prefix[<]!suffix[>]!prefix[$<]!suffix[>$]] [[$(currentFieldContent)$]!prefix[<]suffix[>]] [[$(currentFieldContent)$]prefix[<]!suffix[>]]
[[$(currentFieldContent)$]!prefix[$<]suffix[>$]] [[$(currentFieldContent)$]prefix[$<]!suffix[>$]]">
<$list filter="[[$(currentField)$]prefix[magic-]removeprefix[magic-]]" variable="paramPre">
<<displayMonoResult paramPre "$(hasDollar)$" """="$(currentFieldContent)$" """>>
</$list>
</$list>
<$list filter="[[$(currentFieldContent)$]prefix[<]suffix[>]]">
<$list filter="[[$(currentField)$]prefix[magic-]removeprefix[magic-]]" variable="paramPre">
<<displayMonoResultVariable paramPre "$(hasDollar)$">>
</$list>
</$list>
<$list filter="[[$(currentFieldContent)$]prefix[$<]suffix[>$]removeprefix[$<]removesuffix[>$]]">
<$list filter="[[$(currentField)$]prefix[magic-]removeprefix[magic-]]" variable="paramPre">
<<displayMonoResultMacroVariable paramPre "$(hasDollar)$">>
</$list>
</$list>
\end
\define renderWidgetStringButton()
<$reveal state="$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-include" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-osckbd-simple"><$list filter="[[$:/temp/osckbd-widgets-input]fields[]!suffix[-include]]" variable="tiddlerField"><$list filter="[[$:/temp/osckbd-widgets-input]get<tiddlerField>regexp[^yes$]]"><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field=<<tiddlerField>> $value="no"/></$list></$list><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field="$(selectedWidget)$-$(currentParam)$-input" $value="yes"/><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field="$(selectedWidget)$-$(currentParam)$-include" $value="yes"/><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field="current-param" $value="$(currentParam)$"/><$action-deletetiddler $tiddler="$:/state/osckbd-simple"/><$action-setfield $tiddler="$:/state/osckbd-simple" $field="normal-layout" $value="yes"/><$action-setfield $tiddler="$:/state/osckbd-simple" $field="big-state" $value="no"/> `$(currentParam)$="$(currentParamInput)$"`</$button></$reveal>
<$reveal state="$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-include" type="match" text="yes">
<$reveal state="$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-input" type="match" text="yes">
<$button class="tc-btn-invisible tc-osckbd-simple tc-selected $(selectedState)$"><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field="$(selectedWidget)$-$(currentParam)$-include" $value="no"/> `$(currentParam)$="$(currentParamInput)$"`</$button></$reveal>
<$reveal state="$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-input" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-osckbd-simple $(selectedState)$"><$list filter="[[$:/temp/osckbd-widgets-input]fields[]!suffix[-include]]" variable="tiddlerField"><$list filter="[[$:/temp/osckbd-widgets-input]get<tiddlerField>regexp[^yes$]]"><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field=<<tiddlerField>> $value="no"/></$list></$list><$action-setfield $tiddler="$:/temp/osckbd-widgets-input" $field="$(selectedWidget)$-$(currentParam)$-input" $value="yes"/> `$(currentParam)$="$(currentParamInput)$"`</$button></$reveal>
</$reveal>
\end
\define renderWidgetStringButtons()
<$vars currentParamInput={{$:/temp/osckbd-widgets!!magic-$(currentParam)$}} selectedState={{$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-include}}>
<<renderWidgetStringButton>>
</$vars>
\end
\define revealParamInputField()
<$reveal state="$:/temp/osckbd-widgets-input!!$(selectedWidget)$-$(currentParam)$-input" type="match" text="yes">
<br><br>
<$edit-text tiddler="$:/temp/osckbd-widgets" field="magic-$(currentParam)$" focus="yes"><$transclude tiddler="$:/plugins/BTC/osckbd/Buttons/simple-keyboard" mode="inline"></$edit-text>
<br>
</$reveal>
\end
\define renderWidgetString()
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 +[limit[$(paramCount)$]]">
<$set name="currentParam" value=<<formula """nth(array($(paramString)$), <<currentTiddler>>)""">>>
<<renderWidgetStringButtons>>
</$set>
</$list>
<$set name="currentParam" filter="[[$:/temp/osckbd-widgets-input]get[current-param]]">
<<revealParamInputField>>
</$set>
\end
\define renderWidget()
<$set name="widgetName" value={{$(storyTiddler)$!!selected-widget}}>
<<displayMonoResult widgetName "<$" " ">>
<$list filter="[[$(storyTiddler)$]fields[]!regexp[^numbers$]!regexp[^text$]!regexp[^title$]!regexp[^created$]!regexp[^modified$]!regexp[^tags$]!regexp[^type$]!regexp[^tmap-id$]!regexp[^modifier$]!regexp[^widget$]!regexp[^magic-action$]!regexp[^multiple-action$]!regexp[^content$]!regexp[^triddler-state$]] [[$:/temp/magic-tiddly-button]fields[]!regexp[^numbers$]!regexp[^text$]!regexp[^title$]!regexp[^created$]!regexp[^modified$]!regexp[^tags$]!regexp[^type$]!regexp[^tmap-id$]!regexp[^modifier$]]">
<$set name="currentField" value=<<currentTiddler>>>
<$set name="currentFieldContent" filter="[[$(storyTiddler)$]get<currentField>] [[$:/temp/magic-tiddly-button]get<currentField>]">
<<createMonoDisplayedResult>>
</$set>
</$set>
</$list>
</$set>
\end
\define parameterState()
$(storyTiddler)$!!$(parameter)$
\end
\define getParamsList()
$(widgetCatalogue)$!!magic-$(parameter)$
\end
\define getWidgetParamSixteen()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^16$]]">
<<getWidgetParamSeventeen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamFifteen()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^15$]]">
<<getWidgetParamSixteen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamFourteen()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^14$]]">
<<getWidgetParamFifteen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamThirteen()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^13$]]">
<<getWidgetParamFourteen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamTwelve()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^12$]]">
<<getWidgetParamThirteen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamEleven()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^11$]]">
<<getWidgetParamTwelve>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamTen()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^10$]]">
<<getWidgetParamEleven>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamNine()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^9$]]">
<<getWidgetParamTen>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamEight()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^8$]]">
<<getWidgetParamNine>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamSeven()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^7$]]">
<<getWidgetParamEight>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamSix()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^6$]]">
<<getWidgetParamSeven>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamFive()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^5$]]">
<<getWidgetParamSix>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamFour()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^4$]]">
<<getWidgetParamFive>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamThree()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^3$]]">
<<getWidgetParamFour>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParamTwo()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[$(widgetCatalogue)$]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[$(widgetCatalogue)$]!has<magicParameter>]">
<br><<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^2$]]">
<<getWidgetParamThree>>
</$list>
</$set>
</$set>
</$set>
\end
\define getWidgetParams()
<$set name="parameter" filter="[[$(paramString)$]splitbefore[,]suffix[,]removesuffix[,]] [[$(paramString)$]splitbefore[,]!suffix[,]]">
<$set name="magicParameter" filter="[<parameter>addprefix[magic-]]">
<$list filter="[[widgetscatalogue]has<magicParameter>]">
<$set name="paramsList" value=<<getParamsList>>>
<<displayMono parameter>> <$select tiddler=<<storyTiddler>> field=<<parameter>>><$list filter="[list<paramsList>!suffix[:fieldmangler]] [list<paramsList>suffix[:fieldmangler]removesuffix[:fieldmangler]]"><option><<currentTiddler>></option></$list></$select></$set></$list>
<$list filter="[[widgetscatalogue]!has<magicParameter>]">
<<displayMono parameter>> <$edit-text tiddler="$:/temp/magic-tiddly-button" field=<<magicParameter>>/>
</$list>
<$set name="paramString" filter="[[$(paramString)$]removeprefix<parameter>removeprefix[,]]">
<$list filter="[[$(paramCount)$]!regexp[^1$]]">
<<getWidgetParamTwo>>
</$list>
</$set>
</$set>
</$set>
\end
<$reveal state="tiddly onscreen keyboard!!selected-widget" type="nomatch" text="">
<$vars widgetCatalogue="widgetscatalogue" selectedWidget={{tiddly onscreen keyboard!!selected-widget}}>
<$set name="paramCount" filter="[[widgetscatalogue]getindex<selectedWidget>splitbefore[,]removesuffix[,]]">
<$set name="hasDollar" filter="[[widgetscatalogue]getindex<selectedWidget>removeprefix<paramCount>removeprefix[,]splitbefore[,]removesuffix[,]regexp[^\$$]]">
<$list filter="[[widgetscatalogue]getindex<selectedWidget>removeprefix<paramCount>removeprefix[,]!prefix[$]] [[widgetscatalogue]getindex<selectedWidget>removeprefix<paramCount>removeprefix[,]prefix[$]removeprefix[$,]]" variable="paramString">
<<renderWidgetString>>
</$list>
</$set>
</$set>
</$vars>
</$reveal>
<svg class="tc-image-button" width="24pt" height="24pt" viewBox="0 0 24 24"><path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"/></svg>
{
"changecount": "<<changecount>>",
"colour": "<<colour \"name\">>",
"colour-picker": "<$macrocall $name=\"colour-picker\" actions=\"\"\"actionstring\"\"\" />",
"contrast-colour": "<$macrocall $name=\"contrast-colour\" target=\"targetbackgroundcolor\" fallbackTarget=\"alternativecolor\" colourA=\"firstcolor\" colourB=\"secondcolor\" />",
"csvtiddlers": "<<csvtiddlers filter:\"\"\"filter\"\"\" format:\"quoted-comma-sep\">>",
"datauri": "<<datauri \"title\">>"
}
tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-4 {
display: none;
}
.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-3,
.tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-4 {
display: block !important;
}
.tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-1 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-3, .tc-dynaview-zoom-factor-2 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-3 .tc-dynaview-zoom-factor-4, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-1, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-2, .tc-dynaview-zoom-factor-4 .tc-dynaview-zoom-factor-3 {
display: none;
}
[img[https://upload.wikimedia.org/wikipedia/en/archive/1/13/20160920225603%21PinkFloydWallCoverOriginalNoText.jpg]]
[[more info|muuri.gif]]
!!//you gotta recognize a muuri when you see one//
@@float:right;font-size:0.7rem;//*old tyrolean saying, origin unknown//@@
[img [https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/687px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg]]
<div class="tc-next" style="margin-left:-30px;margin-top:-30px;">
<$list filter="[all[current]next[$:/StoryList]]">
<$link to={{!!title}}>
{{$:/core/images/down-arrow}}
</$link>
</$list>
</div>
* ~~create a button that repeats actions on hold~~
* create a toggle button that sets while held, unsets when released
body.tc-body {
-webkit-filter: sepia(20%); /* Safari 6.0 - 9.0 */
filter: sepia(20%);
}
button.tc-onscreen-keyboard {
min-width: calc(100% / 22);
min-height: calc(100% / 6);
background-color: #ccccccea;
border-radius: 1px !important;
outline: none !important;
padding: 2px 8px 2px 8px !important;
margin: 1px 1px 1px 1px !important;
line-height: 1.7;
}
button.tc-onscreen-keyboard:hover {
color: #ffffff;
}
button.tc-onscreen-keyboard.tc-selected {
background-color: <<colour foreground>>;
color: #ffffff;
}
button.tc-onscreen-keyboard.caps-lock-key, button.tc-onscreen-keyboard.tab-key, button.tc-onscreen-keyboard.shift-key {
min-width: calc(100% / 20);
}
button.tc-onscreen-keyboard.space-key {
min-width: 40%;
}
button.tc-onscreen-keyboard.move-key svg {
transform: rotate(45deg);
}
button.tc-onscreen-keyboard-button {
position: absolute;
bottom:100px;
right: 50px;
}
.tc-onscreen-keyboard-popup {
min-width: 47vw !important;
left: 0px !important;
top: 180px !important;
border-radius: 2px;
}
<<if-sidebar """
.tc-onscreen-keyboard-popup {
min-width: calc(50vw - (100vw - {{$:/state/slidebar!!center-x}}px));
}
""">>
.tc-onscreen-keyboard-container {
padding: 8px 3px 5px 3px;
text-align: center;
position: relative !important;
top: calc({{$:/state/pan/osc!!prev-delta-y}}px + {{$:/state/pan/osc!!delta-y}}px) !important;
background-color: <<colour foreground>>99;
min-height: 28vh;
border-radius: 2px;
}
.tc-onscreen-keyboard-container p {
-webkit-margin-before: 0.5em;
-webkit-margin-after: 0.5em;
}
<$list filter="[[$:/state/pan/osc]!is[missing]]">
.tc-onscreen-keyboard-popup {
left: calc({{$:/state/pan/osc!!prev-delta-x}}px + {{$:/state/pan/osc!!delta-x}}px - (1.5 * (100% / 30))) !important;
}
</$list>
.input-osc button.tc-onscreen-keyboard-button {
position: relative;
right: -260px;
bottom: -32px;
}
button.tc-osckbd-simple.tc-selected, button.tc-osckbd-simple.yes {
background-color: <<colour foreground>>;
color: #ffffff;
}
button.tc-osckbd-simple code {
background-color: transparent;
border: none;
color: <<colour foreground>>;
}
button.tc-osckbd-simple.tc-selected code, button.tc-osckbd-simple.yes code {
background-color: transparent;
color: #ffffff;
border: none;
}
button.tc-osckbd-simple.tc-selected.yes {
border: 2px solid <<colour muted-foreground>>;
}
<<you-better-disable-dragging>>
<$reveal state="!!pan-state" type="nomatch" text="on">
<$button set="!!pan-state" setTo="on">OFF</$button>
</$reveal>
<$reveal state="!!pan-state" type="match" text="on">
<$button set="!!pan-state" setTo="off">ON</$button>
</$reveal>
<$pan $steps="2" $decimals="2" $targets="tc-tid-test" $state={{!!pan-state}} $direction="" $startactions="""<$action-setfield $field="play-audio" $value="yes"/><$action-sendmessage $message="tm-notify" $param="pannotification"/>""" $endactions="""<$action-sendmessage $message="tm-notify" $param="panendnotification"/><$action-setfield $field="play-audio" $value="no"/>""">
<div class="tc-tid-test" style="width: 100%; height: 500px; background-color: #337799;">
</div>
</$pan>
<$reveal state="!!play-audio" type="match" text="yes">
<audio autoplay>
<source src="https://ia902605.us.archive.org/4/items/bt2005-10-26.flac16/bt2005-10-26d1t03.mp3" type="audio/mpeg">
</audio>
audio playing
</$reveal>
you panned with an absolute velocity greater than 1.5. that's too fast. ouch
/*\
title: $:/plugins/BTC/tiddly-touch/widgets/pan.js
type: application/javascript
module-type: widget
enable actions triggered on panning
\*/
(function (global) {
"use strict";
/*jslint node: true, browser: true */
/*global $tw: false */
var Widget = require("$:/core/modules/widgets/widget.js").widget;
if (typeof window !== 'undefined') {
var Hammer = require("$:/plugins/BTC/tiddly-touch/lib/hammer.js");
}
var PanWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
PanWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
PanWidget.prototype.render = function(parent,nextSibling) {
var self = this;
var parentDomNode = parent;
// Compute attributes and execute state
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
var panState = self.trim(self.getAttribute('$state'));
if(panState !== "on") {
return false;
}
this.elementClasses = self.trim(self.getAttribute('$targets'));
var elementClass;
var multipleClasses = null;
if(this.elementClasses.indexOf(' ') !== -1) {
multipleClasses = true;
elementClass = self.elementClasses.split(' ');
} else {
elementClass = self.elementClasses;
}
var direction = self.trim(self.getAttribute('$direction',''));
var panDirection = 'pan' + direction;
var stateTiddler = $tw.utils.trim(self.getAttribute('$statetiddler','$:/state/pan'));
var pointerCount = parseInt(self.getAttribute('$pointers','1'));
var panThreshold = parseInt(self.getAttribute('$threshold','0'));
var panUserValuesString = self.trim(self.getAttribute('$values'));
var userToFixed = parseInt(self.getAttribute('$decimals','2'));
var panSteps = Math.floor(1000 / parseInt(self.getAttribute('$steps','24')));
var panUserValues;
if(panUserValuesString !== undefined) {
panUserValues = panUserValuesString.split(' ');
}
console.log(panUserValues);
var allowedDirection = Hammer.DIRECTION_ALL;
if(panDirection === 'vertical') {
allowedDirection = Hammer.DIRECTION_VERTICAL;
} else if(panDirection === 'horizontal') {
allowedDirection = Hammer.DIRECTION_HORIZONTAL;
}
if(elementClass === undefined || elementClass === null || elementClass === "") {
return false;
}
var domNodeList = [];
if (multipleClasses === true) {
for (var j=0; j<elementClass.length;j++) {
var classElements = parentDomNode.getElementsByClassName(elementClass[j]);
for (var k=0; k<classElements.length; k++) {
domNodeList[j + k] = classElements[k];
}
}
} else {
domNodeList = parentDomNode.getElementsByClassName(elementClass);
}
var elementIndex;
for(var i=0;i < domNodeList.length;i++) {
elementIndex = i;
var currentElement = domNodeList[i];
var hammer = new Hammer.Manager(domNodeList[i]);
hammer.add(new Hammer.Pan({
event: 'pan',
pointers: pointerCount,
threshold: panThreshold,
direction: allowedDirection
}));
hammer.get('pan');
var startX = null;
var startY = null;
var maxVelocity = null;
var maxVelocityX = null;
var maxVelocityY = null;
var elementTop = null;
var elementLeft = null;
var elementBottom = null;
var elementRight = null;
var elementWidth = null;
var elementHeight = null;
//var panValues = [];
// var domNodeProps = [];
var startActions = null;
var singleElement = null;
var domNodeRect = null;
var fieldNames = [ 'starting-x', 'starting-y', 'element-top', 'element-left', 'element-bottom', 'element-right', 'element-width', 'element-height', 'delta-x', 'delta-y', 'angle', 'center-x', 'center-y', 'delta-time', 'overall-velocity-x', 'overall-velocity-y', 'overall-velocity', 'velocity-x', 'velocity-y', 'velocity', 'pointer-type', 'max-velocity-x', 'max-velocity-y', 'max-velocity'];
// var fieldNamesAfter = [ 'element-top-after', 'element-left-after', 'element-bottom-after', 'element-right-after', 'element-width-after', 'element-height-after' ];
var fieldValues = [ 'getStartValues("starting-x");', 'getStartValues("starting-y");', 'elementTop.toFixed(userToFixed)', 'elementLeft.toFixed(userToFixed)', 'elementBottom.toFixed(userToFixed)', 'elementRight.toFixed(userToFixed)', 'elementWidth.toFixed(userToFixed)', 'elementHeight.toFixed(userToFixed)', 'e.deltaX.toFixed(userToFixed)', 'e.deltaY.toFixed(userToFixed)', 'e.angle.toFixed(userToFixed)', 'e.center.x.toFixed(userToFixed)', 'e.center.y.toFixed(userToFixed)', 'e.deltaTime.toFixed(userToFixed)', 'e.overallVelocityX.toFixed(userToFixed)', 'e.overallVelocityY.toFixed(userToFixed)', 'e.overallVelocity.toFixed(userToFixed)', 'e.velocityX.toFixed(userToFixed)', 'e.velocityY.toFixed(userToFixed)', 'e.velocity.toFixed(userToFixed)', 'e.pointerType', 'maxVelocityX.toFixed(userToFixed)', 'maxVelocityY.toFixed(userToFixed)', 'maxVelocity.toFixed(userToFixed)' ];
/* if(panUserValues.indexOf(' ') !== -1) {
fieldNames = panUserValues;
}*/
if (panUserValues === undefined) {
panUserValues = fieldNames;
}
var panValuesTimeout = null;
var startingValues = [];
var velocities = [];
function getStartValues(value) {
if (startingValues.indexOf(value) === undefined) {
startingValues.push(value);
var valueIndex = fieldNames.indexOf(value);
var evalValue = eval(fieldValues[valueIndex]);
return evalValue.toFixed(userToFixed);
}
}
function getMaxVelocities(value) {
var valueIndex = fieldNames.indexOf(value);
if(velocities.indexOf(value) === undefined) {
return
}
}
hammer.on('panstart panmove', function(e) {
if (domNodeRect === null) {
domNodeRect = currentElement.getBoundingClientRect();
}
if (startActions === null && self.panStartActions) {
if(self.panStartActions) {
self.invokeActionString(self.panStartActions,self,e);
}
startActions = 'done';
}
if(panUserValues.indexOf('max-velocity-x') !== -1 && maxVelocityX === null) {
maxVelocityX = e.velocityX;
} else if (Math.abs(e.velocityX) > Math.abs(maxVelocityX)) {
maxVelocityX = e.velocityX;
}
if(panUserValues.indexOf('max-velocity-y') !== -1 && maxVelocityY === null) {
maxVelocityY = e.velocityY;
} else if (Math.abs(e.velocityY) > Math.abs(maxVelocityY)) {
maxVelocityY = e.velocityY;
}
if(panUserValues.indexOf('max-velocity') !== -1 && maxVelocity === null) {
maxVelocity = e.velocity;
} else if (Math.abs(e.velocity) > Math.abs(maxVelocity)) {
maxVelocity = e.velocity;
}
if(panUserValues.indexOf('element-top') !== -1 && elementTop === null) {
elementTop = domNodeRect.top;
}
if(panUserValues.indexOf('element-left') !== -1 && elementLeft === null) {
elementLeft = domNodeRect.left;
}
if(panUserValues.indexOf('element-bottom') !== -1 && elementBottom === null) {
elementBottom = domNodeRect.bottom;
}
if(panUserValues.indexOf('element-right') !== -1 && elementRight === null) {
elementRight = domNodeRect.right;
}
if(panUserValues.indexOf('element-width') !== -1 && elementWidth === null) {
elementWidth = domNodeRect.width;
}
if(panUserValues.indexOf('element-height') !== -1 && elementHeight === null) {
elementHeight = domNodeRect.height;
}
/* var setProps = true;
if(domNodeRect.top === 0 && domNodeRect.left === 0 && domNodeRect.bottom === 0 && domNodeRect.right === 0 && domNodeRect.width === 0 && domNodeRect.height === 0) {
setProps = false;
}
if(setProps === true) {
domNodeProps[0] = domNodeRect.top;
domNodeProps[1] = domNodeRect.left;
domNodeProps[2] = domNodeRect.bottom;
domNodeProps[3] = domNodeRect.right;
domNodeProps[4] = domNodeRect.width;
domNodeProps[5] = domNodeRect.height;
}*/
panValuesTimeout = setTimeout(function(){
for (var t=0; t<panUserValues.length; t++) {
if(domNodeList.length === 1) {
singleElement = true;
var fieldValuesIndex = fieldNames.indexOf(panUserValues[t]);
var correspondingValue = eval(fieldValues[fieldValuesIndex]);
self.setField(stateTiddler,panUserValues[t],correspondingValue);
} else {
var fieldValuesIndex = fieldNames.indexOf(panUserValues[t]);
var correspondingValue = eval(fieldValues[fieldValuesIndex]);
var fieldName = panUserValues[t] + "-" + elementIndex;
self.setField(stateTiddler,fieldName,correspondingValue);
}
}
}, panSteps);
})
.on('panend pancancel', function(e) {
//e.stopPropagation && e.stopPropagation();
clearTimeout(panValuesTimeout);
if(self.panEndActions) {
self.invokeActionString(self.panEndActions,self,e);
}
/* for (var k=0; k<domNodeProps.length; k++) {
if(singleElement === true) {
console.log(domNodeProps[k]);
self.setField(stateTiddler,fieldNamesAfter[k],domNodeProps[k]);
} else {
var fieldName = fieldNamesAfter[k] + domNodeList.indexOf(currentElement);
self.setField(stateTiddler,fieldName,domNodeProps[k]);
}
}*/
startX = null;
startY = null;
maxVelocity = null;
maxVelocityX = null;
maxVelocityY = null;
//panValues = [];
//domNodeProps = [];
startActions = null;
singleElement = null;
return true; // Action was invoked
});
}
};
/*
Set the computed values in the state-tiddler fields
*/
PanWidget.prototype.setField = function(tiddler,field,value) {
$tw.wiki.setText(tiddler,field,undefined,value,{ suppressTimestamp: true });
};
PanWidget.prototype.trim = function(str) {
if(typeof str === "string") {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/ +(?= )/g,'');
} else {
return str;
}
};
/*
Compute the internal state of the widget
*/
PanWidget.prototype.execute = function() {
this.panStartActions = this.getAttribute("$startactions","");
this.panEndActions = this.getAttribute("$endactions","");
this.makeChildWidgets();
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
PanWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(Object.keys(changedAttributes).length) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.pan = PanWidget;
})(this);
/9j/4AAQSkZJRgABAQAAAQABAAD/4TBuRXhpZgAASUkqAAgAAAAKAAsAAgANAAAAhgAAAAABCQABAAAAqQEAAAEBCQABAAAAJQIAABIBCQABAAAAAQAAABoBCQABAAAASAAAABsBCQABAAAASAAAACgBCQABAAAAAgAAADIBAgA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QzBCSW6ZaRKdZI88wJIo3tGzh7WFw3Gu/8AlXrH/apf9rJ/zce49w2xY0ZpiygkMACfsCxA/wDX3P3PVrbtmAO590AxIf8AiQjldqARgALJqhx1/9k=
\define navigation-actions()
<$action-navigate $to="new layout tiddler $(currentTiddler)$" $scroll="no"/>
\end
\define small-tiddlers()
<$action-setfield $tiddler="new layout tiddler $(currentTiddler)$" $field="muuri-tiddler-width-px" $value="482"/><$action-setfield $tiddler="new layout tiddler $(currentTiddler)$" $field="muuri-tiddler-height-px" $value="275"/>
\end
\define actions()
<$action-setfield $tiddler="""$(currentTiddler)$""" $field="muuri-tiddler-width-px" $value="482"/><$action-setfield $tiddler="""$(currentTiddler)$""" $field="muuri-tiddler-height-px" $value="275"/>
\end
\define small-tiddlers-storylist()
<$list filter="[list[$:/StoryList]limit[7]reverse[]nth[$(currentTiddler)$]]">
<<actions>>
</$list>
\end
\define big-tiddler-storylist()
<$action-setfield $tiddler="""$(currentTiddler)$""" $field="muuri-tiddler-width-px" $value="1480"/><$action-setfield $tiddler="""$(currentTiddler)$""" $field="muuri-tiddler-height-px" $value="290"/>
\end
!!klick the button to set a predefined layout
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/StoryList" $field="list" $value=""/>
<$list filter="1 2 3">
<<small-tiddlers>>
</$list>
<$action-setfield $tiddler="new layout tiddler 4" $field="muuri-tiddler-width-px" $value="1480"/><$action-setfield $tiddler="new layout tiddler 4" $field="muuri-tiddler-height-px" $value="290"/>
<$list filter="5 6 7">
<<small-tiddlers>>
</$list>
<$list filter="7 6 5 4 3 2 1"><<navigation-actions>>
</$list>{{top-3-middle-1-bottom-3.svg}}</$button>
!!This button sets the same layout, but for the currently open tiddlers
(a css solution for the overflowing content is missing, looks weird)
<$button class="tc-btn-invisible">
<$list filter="1 2 3">
<<small-tiddlers-storylist>>
</$list>
<$list filter="[list[$:/StoryList]limit[7]reverse[]nth[4]]">
<<big-tiddler-storylist>>
</$list>
<$list filter="5 6 7">
<<small-tiddlers-storylist>>
</$list>
{{top-3-middle-1-bottom-3.svg}}</$button>
<div class="tc-previous" style="position: absolute; z-index: 20;right:10px;bottom:0px;">
<$list filter="[all[current]previous[$:/StoryList]]">
<$link to={{!!title}}>
{{$:/core/images/up-arrow}}
</$link>
</$list>
</div>
!!In editing mode, at the bottom of each Tiddler you'll find a button to pop out an onscreen keyboard
!!Try it in the normal view, in muuri view there's some extra css work to do
<iframe width="560" height="315" src="https://www.youtube.com/embed/3ZlDZPYzfm4?rel=0" frameborder="0" allow="encrypted-media"></iframe>
\define save-wiki-button-indicator()
<$reveal state="$:/UploadName" type="match" text="">
body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator, body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator svg , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator svg {
display:inline-block !important;
font-size: 1rem !important;
fill: <<colour dirty-indicator>>;
color: <<colour dirty-indicator>>;
</$reveal>
<$reveal state="$:/UploadName" type="nomatch" text="">
body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator, body.tc-dirty .tc-bottombar .tc-hidden-button .tc-dirty-indicator svg , body.tc-dirty .tc-bottombar .tc-hidden-button span.tc-dirty-indicator svg {
fill: <<colour primary>> !important;
color: <<colour primary>> !important;
}
</$reveal>
}
\end
<span class="tc-hidden-button">
{{save-wiki-button}}
</span>
<$button message="tm-save-wiki" param={{$:/config/SaveWikiButton/Template}} tooltip={{$:/language/Buttons/SaveWiki/Hint}} aria-label={{$:/language/Buttons/SaveWiki/Caption}} class=<<tv-config-toolbar-class>>>
<span class="tc-dirty-indicator big-icon">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/save-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>
</$list>
</span>
</$button>
<$button class="tc-btn-invisible" set="$:/UploadName" setTo="muritest">tiddlyspot</$button><br>
<$button class="tc-btn-invisible" set="$:/UploadName" setTo="">locally</$button>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!seamless" type="nomatch" text="yes">
<$button class="tc-btn-invisible no-outline"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="seamless" $value="yes"/>click here for no tiddler borders and gaps</$button>
</$reveal>
<$reveal state="$:/plugins/BTC/tiddly-touch/config!!seamless" type="match" text="yes">
<$button class="tc-btn-invisible no-outline"><$action-setfield $tiddler="$:/plugins/BTC/tiddly-touch/config" $field="seamless" $value="no"/>click here for the previous design</$button>
<$reveal state="$:/state/hide-all-controls" type="nomatch" text="yes">
<$reveal state="$:/state/hide-all-controls-secure" type="nomatch" text="yes">
<$button class="tc-btn-invisible"><$action-setfield $tiddler="$:/state/hide-all-controls" $value="yes"/>
<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>
<span class="big-icon">{{$:/plugins/BTC/tiddly-touch/icons!!visibility}}</span>
</$button>
</$reveal>
</$reveal>
<$reveal state="$:/state/hide-all-controls" type="match" text="yes">
<$reveal state="$:/state/hide-all-controls-secure" type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-toolbar-icon"><$action-setfield $tiddler="$:/state/hide-all-controls" $value="no"/>
<span class="big-icon">{{$:/plugins/BTC/tiddly-touch/icons!!visibility-off-green}}</span>
</$button>
</$reveal>
</$reveal>
</$reveal>
\define revealIfHigherThanViewPort()
<$list filter="""[[$(higherThanRightLimit)$]regexp[^TRUE$]]""">
.tc-story-river-slider {
left: calc(100% - 42px);
right: 0px;
}
</$list>
\end
<$vars viewPortWidth=<<viewport width>>>
<$reveal state="$:/state/sidebar" type="match" text="yes">
.tc-sidebar-scrollable {
width: calc(100% - {{$:/state/slidebar!!center-x}}px);
max-width: 80%;
}
<$reveal state="$:/view" type="nomatch" text="muuri">
.tc-story-river {
width: calc(100% - (100% - {{$:/state/slidebar!!center-x}}px));
min-width: 20%;
max-width: calc(100vw - 84px);
}
</$reveal>
</$reveal>
.tc-story-river-slider {
position: fixed;
height: 100%;
top: 0px;
width: 42px;
background-color: #333333;
cursor: ew-resize;
}
<$reveal state="$:/state/sidebar" type="match" text="yes">
.tc-story-river-slider {
left: calc(100% - (100% - {{$:/state/slidebar!!center-x}}px));
}
</$reveal>
<$reveal state="$:/state/sidebar" type="nomatch" text="yes">
.tc-story-river-slider {
right: 0px;
}
</$reveal>
<$vars vPW=<<viewPortWidth>>>
<$vars leftLimit=<<formula "<<vPW>> / 5">>>
<$vars lowerThanLeftLimit=<<formula "lte({{$:/state/slidebar!!center-x}}, <<leftLimit>> )">>>
<$list filter="[<lowerThanLeftLimit>regexp[^TRUE$]]">
.tc-story-river-slider {
left: 20%;
}
</$list>
</$vars>
</$vars>
</$vars>
<$vars vPW=<<formula "<<viewPortWidth>> - 57">>>
<$vars higherThanRightLimit=<<formula "gte({{$:/state/slidebar!!center-x}}, <<vPW>> )">>>
<<revealIfHigherThanViewPort>>
</$vars>
</$vars>
<$vars vPW=<<formula "<<viewPortWidth>> - 200 ">>>
<$vars higherThanRightLimit=<<formula "gte({{$:/state/slidebar!!center-x}}, <<vPW>> )">>>
<$list filter="[<higherThanRightLimit>regexp[^TRUE$]]">
.tc-sidebar-scrollable {
display: none;
}
</$list>
</$vars>
</$vars>
.tc-tab-content {
height: -moz-available;
height: -webkit-fill-available;
}
<$reveal state="!!seamless" type="match" text="yes">
.tc-story-river-slider {
background-color: transparent;
}
</$reveal>
</$vars>
{
"tab": "\t",
"return": "\n"
}
[{
"id": 1,
"flag": "EUR",
"currencyCode": "EUR",
"currency": "Euro",
"level": 0.9033,
"units": "EUR / USD",
"asOf": "08/19/2015",
"onedChng": 0.0026
},
{
"id": 2,
"flag": "JPY",
"currencyCode": "JPY",
"currency": "Japanese Yen",
"level": 124.3870,
"units": "JPY / USD",
"asOf": "08/19/2015",
"onedChng": 0.0001
},
{
"id": 3,
"flag": "GBP",
"currencyCode": "GBP",
"currency": "Pound Sterling",
"level": 0.6396,
"units": "GBP / USD",
"asOf": "08/19/2015",
"onedChng": 0.00
},
{
"id": 4,
"flag": "CHF",
"currencyCode": "CHF",
"currency": "Swiss Franc",
"level": 0.9775,
"units": "CHF / USD",
"asOf": "08/19/2015",
"onedChng": 0.0008
},
{
"id": 5,
"flag": "CAD",
"currencyCode": "CAD",
"currency": "Canadian Dollar",
"level": 1.3097,
"units": "CAD / USD",
"asOf": "08/19/2015",
"onedChng": -0.0005
},
{
"id": 6,
"flag": "AUD",
"currencyCode": "AUD",
"currency": "Australian Dollar",
"level": 1.3589,
"units": "AUD / USD",
"asOf": "08/19/2015",
"onedChng": 0.0020
},
{
"id": 7,
"flag": "NZD",
"currencyCode": "NZD",
"currency": "New Zealand Dollar",
"level": 1.5218,
"units": "NZD / USD",
"asOf": "08/19/2015",
"onedChng": -0.0036
},
{
"id": 8,
"flag": "SEK",
"currencyCode": "SEK",
"currency": "Swedish Krona",
"level": 8.5280,
"units": "SEK / USD",
"asOf": "08/19/2015",
"onedChng": 0.0016
},
{
"id": 9,
"flag": "NOK",
"currencyCode": "NOK",
"currency": "Norwegian Krone",
"level": 8.2433,
"units": "NOK / USD",
"asOf": "08/19/2015",
"onedChng": 0.0008
},
{
"id": 10,
"flag": "BRL",
"currencyCode": "BRL",
"currency": "Brazilian Real",
"level": 3.4806,
"units": "BRL / USD",
"asOf": "08/19/2015",
"onedChng": -0.0009
},
{
"id": 11,
"flag": "CNY",
"currencyCode": "CNY",
"currency": "Chinese Yuan",
"level": 6.3961,
"units": "CNY / USD",
"asOf": "08/19/2015",
"onedChng": 0.0004
},
{
"id": 12,
"flag": "RUB",
"currencyCode": "RUB",
"currency": "Russian Rouble",
"level": 65.5980,
"units": "RUB / USD",
"asOf": "08/19/2015",
"onedChng": 0.0059
},
{
"id": 13,
"flag": "INR",
"currencyCode": "INR",
"currency": "Indian Rupee",
"level": 65.3724,
"units": "INR / USD",
"asOf": "08/19/2015",
"onedChng": 0.0026
},
{
"id": 14,
"flag": "TRY",
"currencyCode": "TRY",
"currency": "New Turkish Lira",
"level": 2.8689,
"units": "TRY / USD",
"asOf": "08/19/2015",
"onedChng": 0.0092
},
{
"id": 15,
"flag": "THB",
"currencyCode": "THB",
"currency": "Thai Baht",
"level": 35.5029,
"units": "THB / USD",
"asOf": "08/19/2015",
"onedChng": 0.0044
},
{
"id": 16,
"flag": "IDR",
"currencyCode": "IDR",
"currency": "Indonesian Rupiah",
"level": 13.83,
"units": "IDR / USD",
"asOf": "08/19/2015",
"onedChng": -0.0009
},
{
"id": 17,
"flag": "MYR",
"currencyCode": "MYR",
"currency": "Malaysian Ringgit",
"level": 4.0949,
"units": "MYR / USD",
"asOf": "08/19/2015",
"onedChng": 0.0010
},
{
"id": 18,
"flag": "MXN",
"currencyCode": "MXN",
"currency": "Mexican New Peso",
"level": 16.4309,
"units": "MXN / USD",
"asOf": "08/19/2015",
"onedChng": 0.0017
},
{
"id": 19,
"flag": "ARS",
"currencyCode": "ARS",
"currency": "Argentinian Peso",
"level": 9.2534,
"units": "ARS / USD",
"asOf": "08/19/2015",
"onedChng": 0.0011
},
{
"id": 20,
"flag": "DKK",
"currencyCode": "DKK",
"currency": "Danish Krone",
"level": 6.7417,
"units": "DKK / USD",
"asOf": "08/19/2015",
"onedChng": 0.0025
},
{
"id": 21,
"flag": "ILS",
"currencyCode": "ILS",
"currency": "Israeli New Sheqel",
"level": 3.8262,
"units": "ILS / USD",
"asOf": "08/19/2015",
"onedChng": 0.0084
},
{
"id": 22,
"flag": "PHP",
"currencyCode": "PHP",
"currency": "Philippine Peso",
"level": 46.3108,
"units": "PHP / USD",
"asOf": "08/19/2015",
"onedChng": 0.0012
}
]
.big-icon, .big-icon svg {
font-size:10rem !important;
}
/*.big-icon svg {
transform: scale(1);
}*/
.red-icon {
color: <<colour code-foreground>>;
}
.red-icon svg {
fill: <<colour code-foreground>>;
}
.medium-icon , .medium-icon svg {
font-size: 7rem;
}
.smaller-icon {
font-size: 4rem;
}
.small-icon , .small-icon svg {
font-size: 2rem;
}
.blue-icon {
color: <<colour primary>>;
}
.blue-icon svg {
fill: <<colour primary>>;
}
.green-icon {
color: <<colour download-background>>;
}
.green-icon svg {
fill: <<colour download-background>>;
}
.yellow-icon {
color: <<colour alert-background>>;
}
.yellow-icon svg {
fill: <<colour alert-background>>;
}
.rotate-25 svg {
transform: rotate(-25deg);
}
.yellow-icon.big-icon svg {
font-size: 10rem;
}
!!!any tiddlywiki action can be invoked with the ''swipe widget''
<$reveal state="!!swipe-state" type="nomatch" text="on">
<$button set="!!swipe-state" setTo="on">OFF</$button>
</$reveal>
<$reveal state="!!swipe-state" type="match" text="on">
<$button set="!!swipe-state" setTo="off">ON</$button>
</$reveal>
<$reveal state="$:/state/sidebar" type="match" text="yes">
<$swipe $targets=" tc-tid-frame tc-tiddler-test " $velocity="1.0" $direction="right" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>""" $state={{!!swipe-state}}>
<$swipe $targets=" tc-tid-frame tc-tiddler-test " $pointers="2" $velocity="1.0" $direction="right" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="no"/><$action-sendmessage $message="tm-close-other-tiddlers" $param=<<currentTiddler>>/>""" $state={{!!swipe-state}}>
<div class="tc-tid-frame" style="width: 100%; height: 250px; background-color: #33dddd; color: #333333;text-align:center;">
swipe right to hide sidebar<br>
swipe right with two fingers to hide the sidebar and close all tiddlers but this one
</div>
<div class="tc-tiddler-test" style="width: 100%; height: 250px; background-color: #dd44dd; color: #333333;text-align:center;">
swipe right to hide sidebar<br>
swipe right with two fingers to hide the sidebar and close all tiddlers but this one
</div>
</$swipe>
</$swipe>
</$reveal>
<$reveal state="$:/state/sidebar" type="nomatch" text="yes">
<$swipe $targets=" tc-tid-frame tc-tiddler-test " $velocity="1.0" $direction="left" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="yes"/>""" $state={{!!swipe-state}}>
<$swipe $targets=" tc-tid-frame tc-tiddler-test " $pointers="2" $velocity="1.0" $direction="left" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="yes"/><$action-sendmessage $message="tm-new-tiddler"/>""" $state={{!!swipe-state}}>
<div class="tc-tid-frame" style="width: 100%; height: 250px; background-color: #3355aa; color: #ffffff;text-align:center;">
swipe left to show sidebar<br>
swipe left with two fingers to show the sidebar and create a new tiddler
</div>
<div class="tc-tiddler-test" style="width: 100%; height: 250px; background-color: #dd44dd; color: #333333;text-align:center;">
swipe left to show sidebar<br>
swipe left with two fingers to show the sidebar and create a new tiddler
</div>
</$swipe>
</$swipe>
</$reveal>
in the next tiddler below the swipe widget gets called inside the tiddler on a single element
```
<$swipe $targets="tc-tid-frame" $velocity="1.0" $direction="down" $actions="""<$action-sendmessage $message="tm-new-tiddler" $param="testtiddler"""" $state="on">
<div class="tc-tid-frame" style="width: 100%; height: 500px; background-color: #333333; color: #ffffff;">
</div>
</$swipe>
```
the swipe widget accepts an ''actions'' attribute for actions that should be invoked when a swipe gets recognized:
```
<$swipe $targets="tc-tid-frame" $velocity="1.0" $direction="right" $actions="""<$action-sendmessage $message="tm-new-tiddler" $param="new test tiddler"/><$action-setfield $tiddler="$:/state/sidebar" $value="no"/>""" $state="on">
<div class="tc-tid-frame" style="width: 100%; height: 250px; background-color: #33dddd; color: #333333;text-align:center;">
swipe right
</div>
</$swipe>
```
<$reveal state="$:/state/sidebar" type="match" text="yes">
<$swipe $targets="tc-tid-frame" $velocity="1.0" $direction="right" $actions="""<$action-sendmessage $message="tm-new-tiddler" $param="new test tiddler"/><$action-setfield $tiddler="$:/state/sidebar" $value="no"/><$action-sendmessage $message="tm-notify" $param="testmessage2"/>""" $state="on">
<div class="tc-tid-frame" style="width: 100%; height: 250px; background-color: #33dddd; color: #333333;text-align:center;">
swipe right
</div>
</$swipe>
</$reveal>
<$reveal state="$:/state/sidebar" type="nomatch" text="yes">
<$swipe $targets="tc-tid-frame" $velocity="1.0" $direction="left" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="yes"/><$action-sendmessage $message="tm-notify" $param="testmessage"/>""" $state="on">
<div class="tc-tid-frame" style="width: 100%; height: 250px; background-color: #3355aa; color: #ffffff;text-align:center;">
swipe left
</div>
</$swipe>
</$reveal>
!!Installation:
drag these two tiddlers into an empty wiki (we're still testing):
* $:/plugins/BTC/tiddly-touch/widgets/swipe.js
* $:/plugins/BTC/tiddly-touch/lib/hammer.js
!!!any tiddlywiki action can be invoked with the ''tap widget''
<$reveal state="!!tap-state" type="nomatch" text="on">
<$button set="!!tap-state" setTo="on">OFF</$button>
</$reveal>
<$reveal state="!!tap-state" type="match" text="on">
<$button set="!!tap-state" setTo="off">ON</$button>
</$reveal>
<$reveal state="$:/state/sidebar" type="match" text="yes">
<$tap $taps="3" $targets="tc-test-target" $threshold="1000" $posthreshold="1000" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>""" $state={{!!tap-state}}>
<div class="tc-test-target" style="width: 100%; height: 200px; background-color: #333333; color: #ffffff;text-align: center;">
tap 3 times to close sidebar
</div>
</$tap>
</$reveal>
<$reveal state="$:/state/sidebar" type="nomatch" text="yes">
<$tap $taps="3" $targets="tc-test-target" $threshold="1000" $posthreshold="1000" $actions="""<$action-setfield $tiddler="$:/state/sidebar" $value="yes"/>""" $state={{!!tap-state}}>
<div class="tc-test-target" style="width: 100%; height: 200px; background-color: #ffffff; color: #333333;text-align: center;">
tap 3 times to show sidebar
</div>
</$tap>
</$reveal>
[img[https://pbs.twimg.com/profile_images/2909079277/0d0ad20fa03ea4f4eabdbbe44c5384ab_400x400.jpeg]]
[img[https://upload.wikimedia.org/wikipedia/commons/c/c3/Scuola_di_fontainebleau%2C_presunti_ritratti_di_gabrielle_d%27estr%C3%A9es_sua_sorella_la_duchessa_di_villars%2C_1594_ca._06.jpg]]
Gabrielle d'Estrées et une de ses sœurs
!!Try it, it's THE best!
@@font-size:0.7rem;//if you experience a hard time using all ten fingers, you can use your feet, too! <br> *use some wet wipes for disinfection afterwards@@
\define lattice-range() 1,$(lattice-depth)$
\define slider(field) <$edit-text field="$field$" type=range/>
\define redline()
<line x1=<<x>> y1=<<y>> x2=<<x>> y2=2000 style="stroke-width: 1; stroke:#FFDDAA; opacity:.3;"/>
<circle cx=<<x>> cy=<<y>> r=4 style="fill:#FFEEEA; opacity:.1"/>
<circle cx=<<x>> cy=<<y>> r=2 style="fill:#FFFDFB; opacity:.3"/>
<circle cx=<<x>> cy=<<y>> r=1 style="fill:#FFFEFD; opacity:.6"/>
\end
\define number_ball()
<circle cx=<<x>> cy=<<y>> r=5 style="fill:#444444; stroke:#555555; opacity: 1;"/>
<g transform="translate(0, 2)">
<text x=<<x>> y=<<y>> text-anchor=middle fill=white><<num>>/<<den>></text>
</g>
\end
<<you-better-disable-dragging>>
<$tiddler tiddler="Harmonic Lattice/State">
<$formula-vars $noRebuild=true lattice-depth="3+floor(50 * {{!!lattice-depth}}%^2)">
<$formula-vars $noRebuild={{!!noRebuild}} interpolate="floor(({{panOnLattice!!center-x}} - {{panOnLattice!!element-left}}) * 100 / {{panOnLattice!!element-width}})" minormax="-floor(({{panOnLattice!!center-y}} - {{panOnLattice!!element-bottom}}) * 100 / {{panOnLattice!!element-height}})">
Meet the "harmonic lattice".
|!Interpolation|linear| the graph itself is a slider |log|<<interpolate>>%|
|!Elevation|min| the graph itself is a slider |max|<<minormax>>%|
|!Lattice Depth|3|<<slider lattice-depth>>|53|1-<$text text=<<lattice-depth>> />|
|!Show Grid|<$checkbox field="octaveList" checked="[range[-60,60,12]]" unchecked=""/> Octaves — <$checkbox field="semitoneList" checked="[range[-60,60,1]]" unchecked=""/> Semitones (equal)|<|<|<|
|!$noRebuild|<$checkbox field="noRebuild" checked=true unchecked=false/> (this will improve performance)|<|<|<|
<$pan $steps="24" $decimals="0" $targets="tapme" $values="center-x center-y element-left element-bottom element-width element-height" $state="on" $statetiddler="panOnLattice">
<svg class="tapme" xmlns="http://www.w3.org/2000/svg" viewBox="-180 -10 360 180" width="960">
<g style="font-size: 4pt; font-weight: bold; align: center; stroke-width:1;">
<rect x=-1000 y=-1000 width=2000 height=2000 fill=#001133/>
<$list variable=n filter={{!!semitoneList}}>
<$formula-vars $noRebuild={{!!noRebuild}}
x="mix(50*2^(<<n>>/12)-150,3*<<n>>,<<interpolate>>%)"
y="mix(160-160*.5^(<<n>>/12),3*<<n>>,<<interpolate>>%)"
>
<line y1=-1000 y2=1000 x1=<<x>> x2=<<x>> style="stroke-width: .5; stroke:#222222;"/>
<line x1=-1000 x2=1000 y1=<<y>> y2=<<y>> style="stroke-width: .5; stroke:#222222;"/>
</$formula-vars>
</$list>
<$list variable=n filter={{!!octaveList}}>
<$formula-vars $noRebuild={{!!noRebuild}}
x="mix(50*2^(<<n>>/12)-150,3*<<n>>,<<interpolate>>%)"
y="mix(160-160*.5^(<<n>>/12),3*<<n>>,<<interpolate>>%)"
>
<line y1=-1000 y2=1000 x1=<<x>> x2=<<x>> style="stroke-width: .5; stroke:#444444;"/>
<line x1=-1000 x2=1000 y1=<<y>> y2=<<y>> style="stroke-width: .5; stroke:#444444;"/>
</$formula-vars>
</$list>
<$vars lattice="[range<lattice-range>]">
<$list variable="den" filter=<<lattice>> >
<$list variable="num" filter=<<lattice>> >
<$if value=<<formula "gcd(<<num>>, <<den>>)=1">>>
<$formula-vars $noRebuild={{!!noRebuild}}
x="""mix(
50*(<<num>>/<<den>>)-150,
36*log2(<<num>>/<<den>>),
<<interpolate>>%)"""
y="""mix(
160-160*(1/mix(max(<<num>>,<<den>>), min(<<num>>,<<den>>), <<minormax>>%)),
36*log2(mix(max(<<num>>,<<den>>), min(<<num>>,<<den>>), <<minormax>>%)),
<<interpolate>>%)"""
>
<<redline>>
</$formula-vars>
</$if>
</$set>
</$list>
</$list>
</$vars>
</g>
</svg>
</$pan>
</$formula-vars>
</$formula-vars>
<span class="input-osc"><$edit-text tag="input" tiddler="testtiddler" placeholder="" default=""><$transclude tiddler="$:/plugins/BTC/osckbd/Buttons/keyboard" mode="inline"/></$edit-text></span>
!!this widget stores its values in the state tiddler $:/state/pan or a user-defined tiddler
the widget: $:/plugins/BTC/tiddly-touch/widgets/pan.js<br>
the library: $:/plugins/BTC/tiddly-touch/lib/hammer.js
!!!any tiddlywiki action can be invoked with the pan widget - at pan-start and at pan-end using $startactions="actionstring" and $endactions="actionstring"
here you see the values produced by the pan-widget if you pan in the "pan widget testing zone" on the left (they're stored in the fields of $:/state/pan):
starting-x: {{$:/state/pan!!starting-x}}<br>
starting-y: {{$:/state/pan!!starting-y}}<br>
delta-x: {{$:/state/pan!!delta-x}}<br>
delta-y: {{$:/state/pan!!delta-y}}<br>
angle: {{$:/state/pan!!angle}}<br>
center-x: {{$:/state/pan!!center-x}}<br>
center-y: {{$:/state/pan!!center-y}}<br>
delta-time: {{$:/state/pan!!delta-time}}<br>
velocity: {{$:/state/pan!!velocity}}<br>
velocity-x: {{$:/state/pan!!velocity-x}}<br>
velocity-y: {{$:/state/pan!!velocity-y}}<br>
overall-velocity: {{$:/state/pan!!overall-velocity}}<br>
overall-velocity-x: {{$:/state/pan!!overall-velocity-x}}<br>
overall-velocity-y: {{$:/state/pan!!overall-velocity-y}}<br>
pointer-type: {{$:/state/pan!!pointer-type}}<br>
max-velocity: {{$:/state/pan!!max-velocity}}<br>
max-velocity-x: {{$:/state/pan!!max-velocity-x}}<br>
max-velocity-y: {{$:/state/pan!!max-velocity-y}}<br>
element-top: {{$:/state/pan!!element-top}}<br>
element-left: {{$:/state/pan!!element-left}}<br>
element-bottom: {{$:/state/pan!!element-bottom}}<br>
element-right: {{$:/state/pan!!element-right}}<br>
element-width: {{$:/state/pan!!element-width}}<br>
element-height: {{$:/state/pan!!element-height}}<br>
required attributes:
|$targets | the ''class'' of the target element(s) |
|$state | ''on'' or ''off'' |
optional attributes
|$startactions |default: none | tiddlywiki action strings |
|$endactions |default: none | tiddlywiki action strings |
|$direction |default: all (x and y) | "vertical" or "horizontal" |
|$threshold |default: 0 | |
|$pointers |default: 1 | |
|$statetiddler |default: $:/state/pan | |
|$values |a string of values that the widget calculates and saves to the state tiddler. ''default: all values''<br> see the next table for all available values | |
|$decimals | how many digits after decimal point? default: 2 | |
if you only want starting-x and delta-x you would provide $values="starting-x delta-x"
|value name |description |
|starting-x |the x-coordinate of the pointer (the x-center of the pointers if $pointers="more than one") relative to the left of the visible page area |
|starting-y |the y-coordinate of the pointer (the y-center of the pointers if $pointers="more than one") relative to the top of the visible page area |
|delta-x |the x-offset (in pixels) of the pointer relative to the initial pointer position when panning started |
|delta-y |the y-offset (in pixels) of the pointer relative to the initial pointer position when panning started |
|angle |the angle (in degrees) of the current pointer-movement |
|center-x |the current x-coordinate of the pointer (if more pointers than one it's the x-center of the pointers) relative to the left of the visible page area |
|center-y |the current y-coordinate of the pointer (if more pointers than one it's the y-center of the pointers) relative to the top of the visible page area |
|delta-time |the time in milliseconds from pan-start |
|pointer-type |the type of the pointer(s) - can be mouse, touch, pen or kinect |
<$reveal state="$:/view" type="match" text="muuri">
you can try this in the normal tiddlywiki view, too. there you'll also find a good way how to implement this.
</$reveal>
the css for this is in [[slidebar styles]]
<<you-better-disable-dragging>>
<$reveal state="!!slidebar-state" type="nomatch" text="on">
<$button set="!!slidebar-state" setTo="on">OFF</$button>
</$reveal>
<$reveal state="!!slidebar-state" type="match" text="on">
<$button set="!!slidebar-state" setTo="off">ON</$button>
</$reveal>
<$pan $steps="24" $decimals="0" $targets="tc-slidebar" $statetiddler="$:/state/slidebar" $state={{!!slidebar-state}} $startactions="""<$action-setfield $tiddler="$:/state/sidebar" $field="text" $value="yes"/>""" $direction="horizontal" $endactions="""<$set name="slideBarSmall" value=<<formula "gte({{$:/state/slidebar!!center-x}}, 1200)">>>
<$list filter="[<slideBarSmall>regexp[^TRUE$]]"><$action-setfield $tiddler="the pan widget sliding the sidebar in and out" $field="slidebar-state" $value="off"/><$action-setfield $field="slidebar-state" $tiddler="the pan widget sliding the sidebar in and out" $value="on"/>
<$action-setfield $tiddler="$:/state/sidebar" $field="text" $value="no"/>
</$list>
</$set>""">
<div class="tc-slidebar" style="background-color: #557722; color:#ffffff; width: 100%; height: 200px;">
pan/slide here to slide the sidebar in and out<br><br>
then you can slide out of this area to adjust the sidebar<br><br>
the sidebar closes automatically when it's width reaches a predefined value
</div>
</$pan>
<$reveal state="$:/view" type="nomatch" text="muuri">
!!the black div at the right marks an area where the pan widget lets you adjust the sidebar in a more natural way
!!!see $:/core/ui/PageTemplate/story how the pan widget gets called. there the div is at the bottom.
!!! the styles are in [[slidebar styles]]. if you set `transparent` as background-color for the .tc-story-river-slider div (by hand or klicking <$reveal type="nomatch" state="slidebar styles!!seamless" text="yes"><$button set="slidebar styles!!seamless" setTo="yes">here</$button></$reveal><$reveal type="match" state="slidebar styles!!seamless" text="yes"><$button set="slidebar styles!!seamless" setTo="no">back to black</$button></$reveal>) it seems as if there was no modification
</$reveal>
\define rotatable-image()
<div class="tc-rotate-test" style="z-index: -1; transform:rotate($(rotationValue)$deg)">
{{I am one of that guy's paintings}}
</div>
\end
WIP
{{$:/state/rotate!!rotation}}
<$rotate $steps="10" $decimals="0" $targets="tc-rotate-test" $state={{!!state}}>
<$set name="rotationValue" value={{$:/state/rotate!!rotation}}>
<<rotatable-image>>
</$set>
</$rotate>
{{swipe to show or hide sidebar}}
<<you-better-disable-dragging>>
{{tap to show or hide sidebar}}
just for fun, the tap widget is used here in the Tiddler ~ViewTemplate $:/plugins/BTC/tiddly-touch/ui/ViewTemplate, too
Tapping Tiddlers 3 times invokes an action
\define goMinutes()
<g id="minutes" class="fade-in">
<line fill="none" stroke="#cecece" stroke-width="2" x1="0" y1="0" x2="0" y2="-60">
<animateTransform type="rotate" dur="1s" values="$(mins)$;$(mins)$" repeatCount="indefinite" attributeName="transform">
</animateTransform>
</line>
</g>
\end
\define minutesHand()
<$formula-vars $noRebuild next-tick="to_tw_date(add_minutes(now(), 1))">
<$timer time=<<next-tick>>>
<$formula-vars $noRebuild mins="(minute(now()) * 60 + second(now())) / 60 * 6">
<$formula-vars $noRebuild nextmins="<<mins>> +1">
<<goMinutes>>
</$formula-vars>
</$formula-vars>
</$timer>
</$formula-vars>
\end
\define goHours()
<g id="hours" class="fade-in">
<line fill="none" stroke="#cecece" stroke-width="4" x1="0" y1="0" x2="0" y2="-45">
<animateTransform type="rotate" dur="1s" values="$(currentHours)$;$(currentHours)$" repeatCount="indefinite" attributeName="transform">
</animateTransform>
</line>
</g>
\end
\define goSeconds()
<g id="seconds" class="fade-in">
<line fill="none" stroke="#cecece" x1="0" y1="0" x2="0" y2="-75">
<animateTransform type="rotate" dur="0s" values="$(secs)$;$(secs)$" repeatCount="indefinite" attributeName="transform">
</animateTransform>
</line>
</g>
\end
\define secondsHand()
<$formula-vars $noRebuild next-tick="to_tw_date(add_seconds(now(), 1))">
<$timer time=<<next-tick>>>
<$action-setfield $tiddler="$:/temp/ticks" $field="next-tick" $value=<<formula "to_tw_date(add_minutes(now(), 1))">> />
<$formula-vars $noRebuild secs="second(now()) * 6">
<$formula-vars $noRebuild nextsecs="<<secs>> +1">
<<goSeconds>>
</$formula-vars>
</$formula-vars>
</$timer>
</$formula-vars>
\end
\define hoursHand()
<$set name="next-tick" value=<<formula "to_tw_date(add_hours(now(), 1))">>>
<$timer time=<<next-tick>>>
<$set name="hours" value=<<formula "(hour(now()) * 3600 + minute(now()) * 60 + second(now())) / 3600">>>
<$set name="nexthours" value=<<formula "<<hours>> +1">>>
<$list filter="[<hours>regexp[^(12|13|14|15|16|17|18|19|20|21|22|23|24)$]]">
<$set name="currentHours" value=<<formula "(<<hours>> - 12) * 30" >>>
<<goHours>>
</$set>
</$list>
<$list filter="[<hours>!regexp[^(12|13|14|15|16|17|18|19|20|21|22|23|24)$]]">
<$set name="currentHours" value=<<formula "<<hours>> * 30" >>>
<<goHours>>
</$set>
</$list>
</$set>
</$set>
</$timer>
</$set>
\end
\define doTheClock()
<svg version="1.1" id="Layer_1" onload="SetTime(evt)"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="19 19 162 162" enable-background="new 19 19 162 162" xml:space="preserve">
<defs><filter id="dropshadow" height="120%">
<feGaussianBlur in="SourceAlpha" stdDeviation="2"/> <!-- stdDeviation is how much to blur -->
<feOffset dx="1" dy="0" result="offsetblur"/> <!-- how much to offset -->
<feComponentTransfer>
<feFuncA type="linear" slope="0.3"/> <!-- slope is the opacity of the shadow -->
</feComponentTransfer>
<feMerge>
<feMergeNode/> <!-- this contains the offset blurred image -->
<feMergeNode in="SourceGraphic"/> <!-- this contains the element that the filter is applied to -->
</feMerge>
</filter></defs>
<circle fill="#8d8d8d" stroke="#cecece" stroke-width="2" cx="100" cy="100" r="80"/>
<text transform="matrix(1 0 0 1 130 46)" font-family="'ArialMT'" font-size="15">1</text>
<text transform="matrix(1 0 0 1 154 71)" font-family="'ArialMT'" font-size="15">2</text>
<text transform="matrix(1 0 0 1 165 106)" font-family="'ArialMT'" font-size="15">3</text>
<text transform="matrix(1 0 0 1 155 140)" font-family="'ArialMT'" font-size="15">4</text>
<text transform="matrix(1 0 0 1 130 166)" font-family="'ArialMT'" font-size="15">5</text>
<text transform="matrix(1 0 0 1 96 175)" font-family="'ArialMT'" font-size="15">6</text>
<text transform="matrix(1 0 0 1 62 166)" font-family="'ArialMT'" font-size="15">7</text>
<text transform="matrix(1 0 0 1 37 140)" font-family="'ArialMT'" font-size="15">8</text>
<text transform="matrix(1 0 0 1 27 106)" font-family="'ArialMT'" font-size="15">9</text>
<text transform="matrix(1 0 0 1 34 71)" font-family="'ArialMT'" font-size="15">10</text>
<text transform="matrix(1 0 0 1 58 46)" enable-background="new "><tspan x="0" y="0" font-family="'ArialMT'" font-size="15" letter-spacing="-1">1</tspan><tspan x="7.229" y="0" font-family="'ArialMT'" font-size="15">1</tspan></text>
<text transform="matrix(1 0 0 1 92 37)" font-family="'ArialMT'" font-size="15">12</text>
<g transform="translate(100 100)" filter="url(#dropshadow)" >
<<hoursHand>>
<<minutesHand>>
<<secondsHand>>
</g>
<circle stroke="#8d8d8d" cx="100" cy="100" r="3"/>
<path fill="none" d="z"/>
</svg>
\end
<$vars strokeColor=<<colour foreground>> backgroundColor=<<colour muted-foreground>>>
<<doTheClock>>
</$vars>
\define callwheelreveal()
This is the ''wheelreveal'' content
<hr>
<<wheelreveal "$(pixelList)$" "$(tiddlerList)$">>
<hr>
\end
\define startwheelreveal()
<$set name="pixelListCount" filter="$(pixelList)$ +[count[]]">
<$set name="tiddlerList" filter="[all[tiddlers]!is[system]!is[current]reverse[]limit<pixelListCount>]">
<<callwheelreveal>>
</$set>
</$set>
\end
!!Try to ''SCROLL'' on this Tiddler while you hold ''shift''
<$set name="pixelList" value={{!!pixel-list}}>
<<startwheelreveal>>
</$set>
This macro works like the widthreveal macro, but the tiddler dimensions don't change
\define callwidthreveal()
This is the ''widthreveal'' content
<hr>
<<widthreveal "$(pixelList)$" "$(tiddlerList)$">>
<hr>
\end
\define startwidthreveal()
<$set name="pixelListCount" filter="$(pixelList)$ +[count[]]">
<$set name="tiddlerList" filter="[all[tiddlers]!is[system]!is[current]reverse[]limit<pixelListCount>]">
<<callwidthreveal>>
</$set>
</$set>
\end
!!Try to change the ''WIDTH'' of this Tiddler with alt+mousewheel or pinch-zoom
<$set name="pixelList" value={{!!pixel-list}}>
<<startwidthreveal>>
</$set>
!!Keyboard shortcuts
* SHIFT + Mousewheel changes the Tiddler height
* ALT + Mousewheel changes the Tiddler width
* SHIFT + ALT + Mousewheel changes both together
!!!You can change the sensitivity for this in the $:/ControlPanel
<<note """ on chromium/chrome and TiddlyDesktop the Tiddler content gets paginated to be scrollable in horizontal direction """>>
[img[https://betanews.com/wp-content/uploads/2012/09/nerd-geek-keyboard.jpg]]
some kind of dynaview
<div class="tc-dynaview-zoom-factor-4">
{{my creator invented the touchscreen}}
</div>
<div class="tc-dynaview-zoom-factor-3">
{{the best louvre moment}}
</div>
<div class="tc-dynaview-zoom-factor-2">
{{I am Mr. Van Gogh}}
</div>
<div class="tc-dynaview-zoom-factor-1">
{{I am one of that guy's paintings}}
</div>
\define createLayout()
<$reveal state="tiddly onscreen keyboard!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="firstRow" value={{tiddly onscreen keyboard!!numbers-$(smallbig)$}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$reveal state="tiddly onscreen keyboard!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="firstRow" value={{tiddly onscreen keyboard!!numbers-$(smallbig)$-altgr}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$pan $targets="backspace-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard backspace-key"><$action-sendmessage $message="tm-edit-text-operation" $param="delete-text"/>backspace</$button></$pan>
<$button class="tc-btn-invisible tc-onscreen-keyboard tab-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{specialkeys##tab}}/>tab</$button><$reveal state="tiddly onscreen keyboard!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="secondRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-1}}>
<$list filter="[enlist<secondRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set></$list></$reveal><$reveal state="tiddly onscreen keyboard!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="secondRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-altgr-1}}>
<$list filter="[enlist<secondRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal>
<$reveal state="tiddly onscreen keyboard!!big-state" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard caps-lock-key tc-selected" set="tiddly onscreen keyboard!!big-state" setTo="no">caps lock</$button></$reveal><$reveal state="tiddly onscreen keyboard!!big-state" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard caps-lock-key" set="tiddly onscreen keyboard!!big-state" setTo="yes">caps lock</$button></$reveal><$reveal state="tiddly onscreen keyboard!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="thirdRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-2}}>
<$list filter="[enlist<thirdRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$reveal state="tiddly onscreen keyboard!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13">
<$set name="thirdRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-altgr-2}}>
<$list filter="[enlist<thirdRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$pan $targets="enter-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text="
"/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text="
"/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard enter-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{specialkeys##return}}/>return</$button></$pan>
<$button class="tc-btn-invisible tc-onscreen-keyboard cancel-key"><$action-sendmessage $message="tm-cancel-tiddler" $param=<<storyTiddler>>/>cancel</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard shift-key">shift</$button><$reveal state="tiddly onscreen keyboard!!altgr-state" type="nomatch" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10">
<$set name="fourthRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-3}}>
<$list filter="[enlist<fourthRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$reveal state="tiddly onscreen keyboard!!altgr-state" type="match" text="yes"><$list filter="1 2 3 4 5 6 7 8 9 10">
<$set name="fourthRow" value={{tiddly onscreen keyboard!!characters-$(smallbig)$-altgr-3}}>
<$list filter="[enlist<fourthRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$set>
</$list></$reveal><$button class="tc-btn-invisible tc-onscreen-keyboard save-key"><$action-sendmessage $message="tm-save-tiddler" $param=<<storyTiddler>>/>save</$button>
<$button class="tc-btn-invisible tc-onscreen-keyboard widget-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" widget-layout="yes"/>widgets</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard filter-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" filters-layout="yes"/>filters</$button> <$pan $targets="space-key"
$state="on" $startactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>""" $repeatactions="""<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>""" $steps="20"><$button class="tc-btn-invisible tc-onscreen-keyboard space-key"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=" "/>space</$button></$pan> <$reveal state="tiddly onscreen keyboard!!altgr-state" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard altgr-key tc-selected" set="tiddly onscreen keyboard!!altgr-state" setTo="no">Alt Gr</$button></$reveal> <$reveal state="tiddly onscreen keyboard!!altgr-state" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard altgr-key" set="tiddly onscreen keyboard!!altgr-state" setTo="yes">Alt Gr</$button></$reveal> <$button class="tc-btn-invisible tc-onscreen-keyboard macro-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" macro-layout="yes"/>macros</$button> <$button class="tc-btn-invisible tc-onscreen-keyboard emoji-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="no"/><$action-setfield $tiddler="tiddly onscreen keyboard" emoji-layout="yes"/>emojis</$button>
\end
\define widgetEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard" set="tiddly onscreen keyboard!!selected-widget" setTo="$(entryDescription)$"><$text text=$(entryDescription)$/></$button>
\end
\define createWidgetLayout()
{{insertwidget}}<br>
<$reveal state="tiddly onscreen keyboard!!widget-wrap" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key"><$action-setfield $tiddler="tiddly onscreen keyboard" widget-wrap="yes"/>wrap</$button></$reveal><$reveal state="tiddly onscreen keyboard!!widget-wrap" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key tc-selected"><$action-setfield $tiddler="tiddly onscreen keyboard" widget-wrap="no"/>wrap</$button></$reveal> <$list filter="[enlist{tiddly onscreen keyboard!!widgets-$(smallbig)$-description-1}count[]]" variable="widgetEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<widgetEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{tiddly onscreen keyboard!!widgets-$(smallbig)$-description-1}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<widgetEntryButton>>
</$list>
</$vars>
</$set>
</$list>
<br>
<$list filter="[enlist{tiddly onscreen keyboard!!widgets-$(smallbig)$-description-2}count[]]" variable="widgetEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<widgetEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{tiddly onscreen keyboard!!widgets-$(smallbig)$-description-2}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<widgetEntryButton>>
</$list>
</$vars>
</$set>
</$list> <$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" widget-layout="no"/>abc</$button>
</$list>
\end
\define filterEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{filters##$(entryDescription)$}}/><$text text=$(entryDescription)$/></$button>
\end
\define createFilterLayout()
<$list filter="[[filters]indexes[]count[]]" variable="filterEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<filterEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars firstRowDescription={{tiddly onscreen keyboard!!filters-$(smallbig)$-description-1}}>
<$list filter="[enlist<firstRowDescription>nth<entryCount>]" variable="entryDescription">
<<filterEntryButton>>
</$list>
</$vars>
</$set>
</$list><$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" filters-layout="no"/>abc</$button>
</$list>
\end
\define createEmojiLayout()
<$list filter="1 2 3 4 5">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars firstRow={{tiddly onscreen keyboard!!emojis-$(smallbig)$-1}}>
<$list filter="[enlist<firstRow>nth<currentTiddler>]">
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text=<<currentTiddler>>/><$text text=<<currentTiddler>>/></$button>
</$list>
</$vars>
</$set>
</$list><$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" emoji-layout="no"/>abc</$button>
\end
\define macroEntryButton()
<$button class="tc-btn-invisible tc-onscreen-keyboard"><$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{macros##$(entryDescription)$}}/><$text text=$(entryDescription)$/></$button>
\end
\define createMacroLayout()
<$reveal state="tiddly onscreen keyboard!!macro-wrap" type="nomatch" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key"><$action-setfield $tiddler="tiddly onscreen keyboard" macro-wrap="yes"/>wrap</$button></$reveal><$reveal state="tiddly onscreen keyboard!!macro-wrap" type="match" text="yes"><$button class="tc-btn-invisible tc-onscreen-keyboard wrap-key tc-selected"><$action-setfield $tiddler="tiddly onscreen keyboard" macro-wrap="no"/>wrap</$button></$reveal> <$list filter="[enlist{tiddly onscreen keyboard!!macros-$(smallbig)$-description-1}count[]]" variable="macroEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<macroEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{tiddly onscreen keyboard!!macros-$(smallbig)$-description-1}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<macroEntryButton>>
</$list>
</$vars>
</$set>
</$list>
<br>
<$list filter="[enlist{tiddly onscreen keyboard!!macros-$(smallbig)$-description-2}count[]]" variable="macroEntryCount">
<$list filter="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +[limit<macroEntryCount>]">
<$set name="entryCount" value=<<currentTiddler>>>
<$vars rowDescription={{tiddly onscreen keyboard!!macros-$(smallbig)$-description-2}}>
<$list filter="[enlist<rowDescription>nth<entryCount>]" variable="entryDescription">
<<macroEntryButton>>
</$list>
</$vars>
</$set>
</$list> <$button class="tc-btn-invisible tc-onscreen-keyboard normal-key"><$action-setfield $tiddler="tiddly onscreen keyboard" normal-layout="yes"/><$action-setfield $tiddler="tiddly onscreen keyboard" macro-layout="no"/>abc</$button>
</$list>
\end
<$reveal state="!!normal-layout" type="match" text="yes">
<$pan $steps="50" $state="on" $decimals="0" $targets="tc-onscreen-keyboard-container" $startactions="""<$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-y" $value=<<formula "{{$:/state/pan/osc!!delta-y}} + {{$:/state/pan/osc!!prev-delta-y}}">>/><$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-x" $value=<<formula "{{$:/state/pan/osc!!delta-x}} + {{$:/state/pan/osc!!prev-delta-x}}">>/>""" $statetiddler="$:/state/pan/osc">
<div class="tc-onscreen-keyboard-container">
<$list filter="[{!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createLayout>>
</$list>
</div>
</$pan>
</$reveal>
<$reveal state="!!emoji-layout" type="match" text="yes">
<$pan $steps="50" $state="on" $decimals="0" $targets="tc-onscreen-keyboard-container" $startactions="""<$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-y" $value=<<formula "{{$:/state/pan/osc!!delta-y}} + {{$:/state/pan/osc!!prev-delta-y}}">>/><$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-x" $value=<<formula "{{$:/state/pan/osc!!delta-x}} + {{$:/state/pan/osc!!prev-delta-x}}">>/>""" $statetiddler="$:/state/pan/osc">
<div class="tc-onscreen-keyboard-container">
<$list filter="[{!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createEmojiLayout>>
</$list>
</div>
</$pan>
</$reveal>
<$reveal state="!!widget-layout" type="match" text="yes">
<$pan $steps="50" $state="on" $decimals="0" $targets="tc-onscreen-keyboard-container" $startactions="""<$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-y" $value=<<formula "{{$:/state/pan/osc!!delta-y}} + {{$:/state/pan/osc!!prev-delta-y}}">>/><$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-x" $value=<<formula "{{$:/state/pan/osc!!delta-x}} + {{$:/state/pan/osc!!prev-delta-x}}">>/>""" $statetiddler="$:/state/pan/osc">
<div class="tc-onscreen-keyboard-container">
<$list filter="[{!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createWidgetLayout>>
</$list>
</div>
</$pan>
</$reveal>
<$reveal state="!!filters-layout" type="match" text="yes">
<$pan $steps="50" $state="on" $decimals="0" $targets="tc-onscreen-keyboard-container" $startactions="""<$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-y" $value=<<formula "{{$:/state/pan/osc!!delta-y}} + {{$:/state/pan/osc!!prev-delta-y}}">>/><$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-x" $value=<<formula "{{$:/state/pan/osc!!delta-x}} + {{$:/state/pan/osc!!prev-delta-x}}">>/>""" $statetiddler="$:/state/pan/osc">
<div class="tc-onscreen-keyboard-container">
<$list filter="[{!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createFilterLayout>>
</$list>
</div>
</$pan>
</$reveal>
<$reveal state="!!macro-layout" type="match" text="yes">
<$pan $steps="50" $state="on" $decimals="0" $targets="tc-onscreen-keyboard-container" $startactions="""<$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-y" $value=<<formula "{{$:/state/pan/osc!!delta-y}} + {{$:/state/pan/osc!!prev-delta-y}}">>/><$action-setfield $tiddler="$:/state/pan/osc" $field="prev-delta-x" $value=<<formula "{{$:/state/pan/osc!!delta-x}} + {{$:/state/pan/osc!!prev-delta-x}}">>/>""" $statetiddler="$:/state/pan/osc">
<div class="tc-onscreen-keyboard-container">
<$list filter="[{!!big-state}regexp[^no$]addprefix[small]removesuffix[no]] [{!!big-state}regexp[^yes$]addprefix[big]removesuffix[yes]]" variable="smallbig">
<<createMacroLayout>>
</$list>
</div>
</$pan>
</$reveal>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="26mm"
height="37mm"
viewBox="0 0 26 37"
version="1.1"
id="svg3810"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
sodipodi:docname="top-3-middle-1-bottom-3.svg">
<defs
id="defs3804" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="297.14286"
inkscape:cy="668.57143"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="954"
inkscape:window-height="1044"
inkscape:window-x="962"
inkscape:window-y="4"
inkscape:window-maximized="0" />
<metadata
id="metadata3807">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-260)">
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 2.7852894,265.4737 c -0.029694,0.1576 -0.068954,0.31254 -0.089083,0.47278 -0.014646,0.11658 0,0.23639 0,0.35458 0,0.27579 0,0.55158 0,0.82736 0,0.43338 0,0.86676 0,1.30014 0,0.15759 -0.013117,0.31615 0,0.47278 0.016717,0.19966 0.072358,0.3913 0.089083,0.59097 0.029515,0.35241 -0.024195,0.71062 0,1.06375 0.016349,0.23866 0.072726,0.4705 0.089083,0.70917 0.029572,0.43159 -0.027125,0.86825 0,1.30014 0.014999,0.23882 0.074085,0.47033 0.089084,0.70916 0.014793,0.23557 0,0.47278 0,0.70917 0,0.51217 0,1.02435 0,1.53652 0,0.78796 0,1.57592 0,2.36389 0,0.27579 0,0.55157 0,0.82735 0,0.27579 0.01481,0.55228 0,0.82737 -0.014958,0.27787 -0.07298,0.54959 -0.089084,0.82736 -0.02733,0.47138 0.029588,0.94719 0,1.41833 -0.014999,0.23882 -0.074085,0.47034 -0.089083,0.70916 -0.014793,0.23558 0,0.47279 0,0.70917 0,0.19699 0,0.39399 0,0.59098 0,0.74856 0,1.49712 0,2.24568 0,0.197 0,0.39399 0,0.59098 0,0.0788 0,0.15759 0,0.23638 0,0.0394 -0.00939,0.0808 0,0.1182 0.1023634,0.40744 0.089083,0.0876 0.089083,0.35459 0,0.0394 0,0.0788 0,0.11819 0,0.0394 0.029694,0.1182 0,0.1182 -0.029694,0 0,-0.0788 0,-0.1182"
id="path3699"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 2.7852894,265.4737 c 0.1781672,-0.51218 0.3116749,-1.05611 0.5345005,-1.53652 0.031126,-0.0671 0.1199304,0.0154 0.1781663,0 0.7324504,-0.32394 -0.1878037,0.0415 0.5345013,-0.1182 0.092624,-0.0205 0.1742918,-0.10057 0.2672493,-0.11819 0.1175846,-0.0223 0.2375558,0 0.3563342,0 0.2375559,0 0.4751109,0 0.7126668,0 0.4157229,0 0.831445,0 1.2471679,0 0.148472,0 0.2975551,-0.0179 0.4454174,0 0.1798821,0.0216 0.3546166,0.0965 0.5344996,0.11819 0.1478631,0.0179 0.2976819,-0.0196 0.4454173,0 1.4914572,0.19789 -0.7404988,0.0461 0.9799178,0.23639 0.3551027,0.0393 0.7137167,-0.0362 1.0690012,0 0.704116,0.0719 0.494938,0.18587 1.158083,0.1182 0.209353,-0.0214 0.414147,-0.0983 0.623585,-0.1182 1.751341,-0.16598 -0.605835,0.22537 1.33625,-0.11819 1.844106,-0.32623 -0.706153,0.10234 1.336251,-0.23639 0.237556,-0.0394 0.473793,-0.0971 0.712668,-0.1182 0.207401,-0.0184 0.416183,0.0184 0.623583,0 0.238874,-0.0211 0.475363,-0.0762 0.712668,-0.11819 0.416258,-0.0736 0.831444,-0.1576 1.247167,-0.2364 0.207862,-0.0394 0.414146,-0.0983 0.623584,-0.11819 0.207334,-0.0196 0.416334,0.0211 0.623585,0 0.180091,-0.0184 0.354497,-0.0983 0.534497,-0.11819 0.355105,-0.0392 0.714133,0.0428 1.069005,0 0.150787,-0.0182 0.294926,-0.096 0.445414,-0.11819 0.118054,-0.0174 0.237555,0 0.356333,0 0.118778,0 0.237556,0 0.356334,0 0.08908,0 0.179381,-0.0195 0.267252,0 0.09263,0.0205 0.175169,0.0938 0.26725,0.11819 0.11647,0.0309 0.241102,-0.0382 0.356334,0 0.06441,0.0214 0.115177,0.0903 0.178169,0.11819 0.02816,0.0124 0.06808,-0.0278 0.08908,0 0.021,0.0279 0,0.0788 0,0.11819 0,0.0394 0.021,0.0903 0,0.1182 -0.021,0.0279 -0.05939,0 -0.08908,0 -0.170817,0 -0.137923,0.0534 -0.267251,-0.1182"
id="path3701"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 22.65089,263.228 c 0,0.90617 0,1.81232 0,2.71848 0,0.59895 -0.02657,-0.14096 0.08908,0.47277 0.0144,0.0765 0,0.1576 0,0.2364 0,0.11819 0,0.23639 0,0.35458 0,0.15759 0.01473,0.3164 0,0.47277 -0.01519,0.1612 -0.0739,0.31159 -0.08908,0.47278 -0.01473,0.15638 0,0.31519 0,0.47278 0,0.19699 0,0.39398 0,0.59097 0,0.19699 0.01475,0.39496 0,0.59097 -0.01506,0.1999 -0.07538,0.39091 -0.08908,0.59097 -0.01612,0.23542 0,0.47278 0,0.70917 0,0.82736 0,1.65473 0,2.48208 0,0.35459 0.01571,0.70978 0,1.06375 -0.01408,0.31709 -0.05939,0.63037 -0.08908,0.94556 0,0.35458 0.01485,0.70971 0,1.06375 -0.02984,0.71242 -0.148338,1.41506 -0.178169,2.12749 0,2.82969 0.03317,-0.5855 -0.08908,2.00931 -0.01485,0.31457 0.0158,0.63106 0,0.94555 -0.118478,2.35795 -0.08908,-0.69616 -0.08908,1.65472 0,1.41833 0,2.83666 0,4.255 0,0.0761 -0.01506,0.74737 0,0.82735 0.0161,0.0855 0.06808,0.15282 0.08908,0.23639 0.0094,0.0374 -0.02969,0.1182 0,0.1182 0.147725,0 0.06247,-0.16575 0.08908,-0.23639 0.110084,-0.29211 0.08908,0.0408 0.08908,-0.23639"
id="path3703"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 2.8743725,287.45785 c 0.1187784,0.86675 0.237556,1.73352 0.3563342,2.60027 0,0.0394 -0.026561,0.10058 0,0.1182 0.1781663,0.1182 0.1336248,-0.0591 0.2672495,0 0.062989,0.0278 0.1130579,0.10091 0.178167,0.1182 0.2737832,0.0726 0.3401165,-0.0712 0.6235836,-0.1182 0.1178611,-0.0195 0.2375558,0 0.3563342,0 0.2672494,0 0.5355969,0.0321 0.8017499,0 1.3021128,-0.15706 -0.2299396,-0.1182 1.0690009,-0.1182 0.6235836,0 1.2471679,0 1.8707515,0 0.2375559,0 0.4751117,0 0.712668,0 0.2375556,0 0.4755213,-0.0184 0.7126659,0 1.0594128,0.0827 0.5407628,0.19241 1.6035018,0.1182 2.381497,-0.31598 -0.596852,0.0396 1.781668,-0.1182 0.298054,-0.0198 0.59278,-0.0984 0.890835,-0.11819 0.296574,-0.0197 0.594299,0.0207 0.890834,0 0.268523,-0.0188 0.533227,-0.0994 0.80175,-0.1182 2.371028,0 -0.501174,0.0435 1.692585,-0.11819 0.266838,-0.0197 0.534961,0.0208 0.801751,0 0.238991,-0.0186 0.473728,-0.0984 0.712667,-0.1182 0.237092,-0.0197 0.47511,0 0.712665,0 0.178168,0 0.356952,-0.0196 0.534503,0 0.179999,0.0199 0.354616,0.0965 0.534501,0.1182 0.147862,0.0179 0.296943,0 0.445413,0 0.118779,0 0.239174,-0.0259 0.356335,0 0.06549,0.0144 0.113752,0.0968 0.178167,0.11819 0.188175,0.0624 0.188093,-0.10502 0.356335,0.1182 0.021,0.0278 -0.05939,0 -0.08908,0 -0.02969,0 -0.05939,0 -0.08908,0 -0.0297,0 -0.09847,0.0374 -0.08908,0 0.151705,-0.60383 0.356335,-1.18194 0.534502,-1.77292"
id="path3705"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.2997068,266.89204 c 0,0.39397 0,0.78796 0,1.18194 0,0.11819 0,0.23639 0,0.35458 0,0.15759 -0.016798,0.31677 0,0.47278 0.01328,0.12333 0.073643,0.23169 0.089084,0.35458 0.014647,0.11659 0,0.23639 0,0.35458 0,0.1576 0.016799,0.31677 0,0.47278 -0.01328,0.12333 -0.073643,0.2317 -0.089084,0.35458 -0.014646,0.11659 0,0.23639 0,0.35459 0,0.11819 0,0.23639 0,0.35458 0,0.23639 0,0.47277 0,0.70916 0,0.0788 0,0.1576 0,0.23639 0,0.0394 0.029694,0.1182 0,0.1182 -0.029694,0 0,-0.0788 0,-0.1182 0.2162772,0.22934 0.4822043,-0.0764 0.7126676,0 0.064421,0.0214 0.1130571,0.10092 0.1781671,0.1182 0.087353,0.0231 0.178167,0 0.2672494,0 0.1781671,0 0.3563342,0 0.5345012,0 0.4454166,0 0.8908339,0 1.3362503,0 0.059389,0 0.1205516,-0.0191 0.1781672,0 0.064413,0.0214 0.1151747,0.0903 0.178167,0.1182 0.024179,0.0106 0.3432872,0.009 0.3563334,0 0.037558,-0.0249 0.059389,-0.0788 0.089083,-0.1182"
id="path3707"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 8.5757104,267.36481 c -0.089083,0.15759 -0.2008515,0.29658 -0.2672502,0.47278 -0.026561,0.0705 0,0.15759 0,0.23639 0,0.11819 -0.01747,0.23868 0,0.35458 0.013019,0.0864 0.078168,0.14949 0.089083,0.23638 0.019524,0.15546 0,0.31519 0,0.47279 0,0.39398 0,0.78796 0,1.18194 0,0.11819 0,0.23639 0,0.35458 0,0.1182 -0.014646,0.238 0,0.35459 0.015433,0.12289 0.070664,0.23241 0.089084,0.35458 0.011644,0.0772 0,0.15759 0,0.23638 0,0.1576 0,0.31519 0,0.47278 0,0.0394 0,0.0788 0,0.1182 0,0.0394 0.029694,0.1182 0,0.1182 -0.1224342,0 -0.2375558,-0.0788 -0.3563342,-0.1182"
id="path3709"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.2997068,266.89204 c 0.2969447,-0.23639 0.5868245,-0.48916 0.8908338,-0.70917 0.093499,-0.0677 0.1212323,0.0679 0.1781672,0.11819 0.055248,0.0489 0.1187783,0.0788 0.178167,0.11819 0.1187776,0.0788 0.2330342,0.17096 0.3563334,0.2364 0.087186,0.0463 0.1781671,0.0788 0.2672502,0.11819 0.089084,0.0394 0.1746258,0.0977 0.2672503,0.1182 0.087871,0.0195 0.1790622,-0.0168 0.2672501,0 0.1212028,0.023 0.2348459,0.098 0.3563343,0.11819 0.1178602,0.0195 0.2375551,0 0.3563333,0 0.4157229,0 0.8314451,0 1.2471681,0 0.2078605,0 0.4157219,0 0.6235826,0 0.029693,0 0.059386,0 0.089084,0 0.029693,0 0.089084,-0.0394 0.089084,0 0,0.0394 -0.06064,-0.0113 -0.089084,0 -0.2698262,0.1074 -0.5345002,0.23638 -0.8017505,0.35458"
id="path3711"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 10.535545,272.21078 c 0,0.0394 0,0.0788 0,0.1182 0,0.0394 -0.0297,0.11819 0,0.11819 0.0297,0 0,-0.0788 0,-0.11819 0,-0.0394 0,-0.0788 0,-0.1182 0,-0.13553 0.02307,-0.35034 0,-0.47278 -0.01611,-0.0855 -0.07298,-0.15092 -0.08908,-0.23639 -0.01441,-0.0764 0.01165,-0.15912 0,-0.23638 -0.01842,-0.12218 -0.07066,-0.23242 -0.08908,-0.35459 -0.01164,-0.0772 0,-0.15759 0,-0.23639 0,-0.11819 0,-0.23639 0,-0.35458 0,-0.47277 0,-0.94555 0,-1.41833 0,-0.1182 -0.01465,-0.238 0,-0.35459 0.01544,-0.12289 0.07068,-0.23241 0.08908,-0.35458 0.03494,-0.23179 -0.06988,-0.48196 0,-0.70917 0.296946,0 0.59389,0 0.890835,0 0.05939,0 0.119931,0.0154 0.178167,0 0.09208,-0.0244 0.175172,-0.0938 0.26725,-0.11819 0.05824,-0.0154 0.118778,0 0.178167,0 0.08908,0 0.178167,0 0.267251,0 0.05939,0 0.118777,0 0.178166,0 0.05939,0 0.120551,-0.0191 0.178167,0 0.06441,0.0214 0.11375,0.0968 0.178167,0.11819 0.07365,0.0244 0.489227,-0.03 0.534499,0 0.07244,0.0481 0.07371,0.1875 0.178168,0.1182 0.213319,-0.14151 -0.05614,-0.23639 0.178166,-0.23639"
id="path3713"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 10.535545,272.21078 c 1.098695,0 2.197391,0 3.296086,0"
id="path3715"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 13.653464,267.36481 c 0.241643,0.28637 0.04213,0.63408 0.08909,0.94556 0.01842,0.12216 0.07066,0.23241 0.08908,0.35457 0.02913,0.19317 -0.02441,0.39667 0,0.59098 0.01544,0.12289 0.07364,0.23169 0.08908,0.35458 0.01465,0.11659 -0.01465,0.238 0,0.35458 0.01544,0.1229 0.07365,0.2317 0.08908,0.35459 0.02929,0.23317 -0.02929,0.47599 0,0.70917 0.107864,0.85867 0.08908,-0.0415 0.08908,0.59096 0,0.31519 0,0.63038 0,0.94557 0,0.0394 0,0.0787 0,0.11819 0,0.0394 -0.0297,0.11819 0,0.11819 0.0348,0 0.142322,-0.16575 0.08908,-0.23638 -0.104986,-0.1393 -0.237557,-0.2364 -0.356334,-0.35459"
id="path3717"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.325966,272.09258 c -0.0297,0.0394 -0.04709,0.1182 -0.08908,0.1182 -0.110081,0 -0.08908,-0.16575 -0.08908,-0.23639 0,-0.0788 0,-0.15759 0,-0.23639 0,-0.0788 0.0144,-0.15994 0,-0.23639 -0.0161,-0.0855 -0.07606,-0.15 -0.08908,-0.23638 -0.01747,-0.11591 0,-0.23639 0,-0.35459 0,-0.11819 0,-0.23639 0,-0.35458 0,-0.83759 0.0216,0.20066 -0.08908,-0.82736 -0.02519,-0.23402 0.02929,-0.476 0,-0.70917 -0.01544,-0.12289 -0.07365,-0.23169 -0.08908,-0.35459 -0.01465,-0.11657 0,-0.23638 0,-0.35457 0,-0.1182 -0.01465,-0.238 0,-0.35459 0.01543,-0.12289 0.07067,-0.23241 0.08908,-0.35458 0.01165,-0.0772 0,-0.1576 0,-0.23639 0.0297,-0.15759 0.05939,-0.31518 0.08908,-0.47277 0.118777,0.19699 0.221885,0.41258 0.356333,0.59096 0.0022,0.003 0.41195,0 0.445416,0 0.08908,0 0.178168,0 0.267251,0 0.08908,0 0.179379,0.0195 0.26725,0 0.09263,-0.0205 0.174626,-0.0977 0.26725,-0.11819 0.175743,-0.0388 0.359795,0.0464 0.534499,0 0.06511,-0.0173 0.113058,-0.10092 0.178168,-0.1182 0.145589,-0.0387 0.296945,0 0.445417,0 0.347999,0 0.0094,-0.0352 0.356334,0.1182 0.117138,0.0518 0.178167,-0.0982 0.178167,0.23639"
id="path3719"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.325966,272.09258 c 0.847089,-0.53183 0.751813,-0.47278 1.425335,-0.47278 0.08908,0 0.178167,0 0.26725,0 0.05939,0 0.120551,-0.0191 0.178166,0 0.06441,0.0214 0.115177,0.0903 0.178167,0.1182 0.02817,0.0124 0.05939,0 0.08908,0 0.04972,0 0.404638,-0.018 0.445417,0 0.03984,0.0176 0.05153,0.0933 0.08908,0.11819 0.02657,0.0176 0.05939,0 0.08908,0 0.161469,0 0.26725,0.058 0.26725,-0.23639"
id="path3721"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 19.354803,267.6012 c 0,0.82736 0,1.65472 0,2.48208 0,0.11819 0,0.23639 0,0.35458 0,0.1182 -0.01747,0.23869 0,0.35459 0.128922,0.85526 0.08908,-0.54019 0.08908,0.59097 0,0.23638 0,0.47277 0,0.70916 0,0.0788 0.01163,0.31366 0,0.2364 -0.03542,-0.23501 -0.05939,-0.47279 -0.08908,-0.70918"
id="path3723"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.2106238,275.04744 c 0.4094526,0.27163 0.2235359,0.23639 0.5345004,0.23639 0.059389,0 0.1199313,-0.0154 0.1781662,0 0.09208,0.0244 0.1751724,0.0938 0.2672502,0.1182 0.058235,0.0154 0.1187783,0 0.1781672,0 0.089083,0 0.178167,0 0.2672502,0 0.1187783,0 0.2387496,-0.0223 0.3563341,0 0.092958,0.0176 0.1742911,0.10057 0.2672502,0.11819 0.1175837,0.0223 0.237556,0 0.3563334,0 0.1187776,0 0.2375559,0 0.3563334,0 0.1187783,0 0.2384731,-0.0195 0.3563341,0 0.1214877,0.0201 0.2346487,0.10026 0.3563334,0.11819 0.5258916,0.0775 0.407331,-0.0581 0.8017507,0 1.1996554,0.31834 -0.3028262,-0.0402 0.8908336,0.1182 0.1506609,0.02 0.2947554,0.0982 0.4454163,0.11819 0.2659248,0.0353 0.5361368,-0.0392 0.8017508,0 0.150487,0.0222 0.294627,0.10001 0.445417,0.1182 0.177435,0.0214 0.356334,0 0.534501,0 0.445417,0 0.890833,0 1.336251,0 0.0441,0 0.935824,0 0.979918,0 0.148471,0 0.297681,0.0196 0.445417,0 0.150661,-0.02 0.294756,-0.0982 0.445416,-0.1182 0.147735,-0.0196 0.296945,0 0.445418,0 0.118777,0 0.237555,0 0.356333,0 1.098696,0 2.19739,0 3.296086,0 0.148474,0 0.296946,0 0.445418,0 0.08908,0 0.178168,0 0.267247,0 0.02969,0 0.06092,-0.0124 0.08908,0 0.06299,0.0279 0.115175,0.0903 0.178168,0.1182 0.02816,0.0124 0.06252,-0.0176 0.08908,0 0.03757,0.0249 0.05153,0.0933 0.08908,0.11819 0.02657,0.0176 0.06809,-0.0278 0.08908,0 0.021,0.0278 -0.021,0.0903 0,0.1182 0.021,0.0278 0.06808,0.0278 0.08908,0 0.021,-0.0278 0,-0.0788 0,-0.1182 0.09629,0.511 0.08908,0.31033 0.08908,0.59098 0,0.0287 -0.003,0.35078 0,0.35457 0.021,0.0279 0.06808,-0.0278 0.08908,0 0.021,0.0279 -0.01326,0.0829 0,0.1182 0.01877,0.0498 0.05939,0.0788 0.08908,0.11819 0,0.0394 -0.01326,0.0829 0,0.1182 0.01877,0.0498 0.0703,0.0683 0.08908,0.11819 0.01326,0.0352 -0.01326,0.0829 0,0.1182 0.0188,0.0498 0.0758,0.0653 0.08908,0.1182 0.01877,0.0747 -0.0144,0.15994 0,0.23639 0.0161,0.0854 0.06808,0.15281 0.08908,0.23638 0.0094,0.0374 0,0.0788 0,0.11819 0,0.19699 0,0.39398 0,0.59098 0,0.59097 0,1.18194 0,1.77291 0,0.0681 -0.01623,0.54789 0,0.59097 0.01877,0.0498 0.0703,0.0684 0.08908,0.11819 0.02809,0.0746 -0.0281,0.51641 0,0.59098 0.01877,0.0498 0.0703,0.0684 0.08908,0.1182 0.01326,0.0352 -0.021,0.0903 0,0.11819 0.021,0.0278 0.06809,-0.0279 0.08908,0 0.021,0.0278 0.021,0.0903 0,0.11819 -0.021,0.0279 -0.05939,0 -0.08908,0 -0.0297,0 -0.05939,0 -0.08908,0 -0.148473,0 -0.296945,0 -0.445419,0 -0.05939,0 -0.121825,0.0249 -0.178166,0 -0.236548,-0.10461 0.102063,-0.2162 -0.267253,-0.11819 -0.09207,0.0245 -0.175171,0.0938 -0.267247,0.11819 -0.05824,0.0154 -0.118781,0 -0.178166,0 -0.178168,0 -0.356335,0 -0.534502,0 -0.05939,0 -0.119931,-0.0154 -0.178167,0 -0.09208,0.0245 -0.174625,0.0977 -0.267251,0.11819 -0.120669,0.0267 -0.476072,0 -0.623583,0 -0.05939,0 -0.120551,-0.0191 -0.178167,0 -0.06441,0.0214 -0.11375,0.0968 -0.178167,0.1182 -0.139738,0.0464 -0.305679,-0.0464 -0.445416,0 -0.06441,0.0214 -0.113751,0.0968 -0.178168,0.11819 -0.48913,0.16225 0.148385,-0.21663 -0.356333,0.1182 -0.08017,0.0355 -0.187076,-0.0355 -0.26725,0 -0.03984,0.0176 -0.04924,0.10057 -0.08908,0.1182 -0.05634,0.025 -0.118777,0 -0.178165,0 -0.02969,0 -0.06252,0.0176 -0.08908,0 -0.03756,-0.0249 -0.05153,-0.0933 -0.08908,-0.1182 -0.02656,-0.0176 -0.05939,0 -0.08908,0 -0.05939,0 -0.121824,0.0249 -0.178167,0 -0.07968,-0.0352 -0.103044,-0.18655 -0.178165,-0.23639 -0.02656,-0.0176 -0.06091,0.0125 -0.08908,0 -0.125985,-0.0557 -0.237558,-0.15759 -0.356335,-0.23639 -0.05939,-0.0394 -0.113751,-0.0968 -0.178167,-0.11819 -0.05761,-0.0191 -0.119931,0.0154 -0.178166,0 -0.09208,-0.0245 -0.174627,-0.0977 -0.267251,-0.11819 -0.08787,-0.0195 -0.178167,0 -0.26725,0 -0.118778,0 -0.237557,0 -0.356333,0 -0.207862,0 -0.415725,0 -0.623584,0 -0.148472,0 -0.297853,-0.0217 -0.445418,0 -0.121685,0.0179 -0.234649,0.10025 -0.356333,0.11819 -0.438243,0.0646 -0.407331,-0.0581 -0.801751,0 -0.150487,0.0222 -0.294931,0.096 -0.445417,0.11819 -0.118051,0.0174 -0.237556,0 -0.356333,0 -0.415723,0 -0.831446,0 -1.2471683,0 -1.2174732,0 -2.4349468,0 -3.6524196,0 -0.1781671,0 -0.3563342,0 -0.5345004,0 -0.029694,0 -0.059389,0 -0.089083,0 -0.029694,0 -0.062523,-0.0176 -0.089084,0 -0.075124,0.0498 -0.103045,0.18655 -0.1781671,0.23639 -0.026561,0.0176 -0.062523,-0.0176 -0.089082,0 -0.087661,0.0581 -0.2686731,0.41463 -0.3563341,0.47278 -0.026561,0.0176 -0.059389,0 -0.089083,0 -0.029694,0 -0.059389,0 -0.089084,0 -0.029694,0 -0.068087,0.0278 -0.089083,0 -0.020997,-0.0278 0.01328,-0.0829 0,-0.11819 -0.018779,-0.0498 -0.070305,-0.0684 -0.089083,-0.1182 -0.01328,-0.0352 0,-0.0788 0,-0.1182 0,-0.11819 0,-0.23639 0,-0.35458 0,-0.19699 -0.024409,-0.39666 0,-0.59097 0.01544,-0.12289 0.075803,-0.23125 0.089083,-0.35459 0.016798,-0.156 0,-0.31518 0,-0.47277 0,-0.39398 0,-0.78796 0,-1.18195 0,-1.57592 0,-3.15184 0,-4.72777 z"
id="path3725"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.2106238,285.33035 c -0.5523957,1.46582 -0.022683,-0.116 -0.1781663,0.70916 -0.016103,0.0855 -0.07298,0.15093 -0.089084,0.2364 -0.014401,0.0764 0,0.15759 0,0.23639 0,0.11819 0,0.23638 0,0.35457 0,0.47279 0,0.94557 0,1.41833 0,0.46173 -0.026561,0.0125 0.089084,0.47279 0.018779,0.0747 -0.041993,0.18067 0,0.23638 0.020997,0.0278 0.068087,0.0278 0.089083,0 0.020997,-0.0278 0.022068,-0.14455 0,-0.11819 -0.3121413,0.37273 -0.5938892,0.78796 -0.8908339,1.18194"
id="path3727"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.2106238,285.33035 c 0.4751966,0.36515 0.6280855,-0.49761 0.9799168,-0.59097 0.087354,-0.0231 0.1793798,0.0194 0.2672503,0 0.092625,-0.0205 0.1746265,-0.0977 0.2672502,-0.1182 0.1757435,-0.0388 0.3587578,0.0389 0.5345012,0 0.092624,-0.0205 0.1746257,-0.0977 0.2672495,-0.11819 0.1464524,-0.0324 0.2969454,0 0.4454173,0 0.059389,0 0.1187783,0 0.1781663,0 0.059389,0 0.1218262,-0.0249 0.1781678,0 0.03984,0.0176 0.051525,0.0933 0.089083,0.11819 0.026561,0.0176 0.062523,-0.0176 0.089082,0 0.037566,0.025 0.059389,0.0788 0.089084,0.1182 0.029694,0.0394 0.059389,0.0788 0.089084,0.1182"
id="path3729"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.2307067,290.05812 c 0.8487814,0.52611 1.0877349,-0.91444 1.6925837,-1.18194 0.028172,-0.0125 0.059389,0 0.089084,0 0.059389,0 0.1187775,0 0.1781662,0 0.1187783,0 0.2375568,0 0.3563342,0 0.5048061,0 1.0096122,0 1.5144183,0 0.4055324,0 0.00507,0.0557 0.2672501,-0.11819 0.061533,-0.0408 0.414147,0.0415 0.4454165,0 0.020997,-0.0278 0,-0.0788 0,-0.1182"
id="path3731"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 7.6848766,284.85758 c -0.029694,0.15759 -0.068954,0.31254 -0.089084,0.47277 -0.019524,0.15545 0,0.31519 0,0.47277 0,0.35459 0,0.70918 0,1.06375 0,0.197 0,0.39399 0,0.59098 0,0.0788 -0.011644,0.15912 0,0.23639 0.098474,0.65327 0.089084,0.14736 0.089084,0.47277 0,0.0788 0,0.15759 0,0.23639 0,0.0394 -0.020997,0.0903 0,0.11819 0.1187776,0.1576 0.089083,-0.19699 0.089083,0.1182"
id="path3733"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.7337943,284.73938 c -0.2133492,0.42647 -0.1781667,0.51249 -0.1781667,0.94555 0,1.13116 0.039838,-0.26429 -0.089083,0.59098 -0.017468,0.1159 0,0.23639 0,0.35458 0,0.11819 -0.014646,0.23799 0,0.35458 0.015439,0.12289 0.073641,0.23169 0.089083,0.35459 0.024408,0.1943 0,0.39398 0,0.59097 0,0.0788 -0.014402,0.15994 0,0.23638 0.016101,0.0855 0.072979,0.15093 0.089083,0.23639 0.016536,0.0877 -0.027342,0.4365 0,0.47278 0.020994,0.0278 0.068085,0.0278 0.089084,0 0.020994,-0.0278 0,-0.0788 0,-0.11819"
id="path3735"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.7337943,284.73938 c 0.5060457,-0.26139 0.9191247,-0.23639 1.4253347,-0.23639 0.118778,0 0.238749,-0.0223 0.356334,0 0.820778,0.15557 -0.2716,0.11819 0.5345,0.11819 0.178168,0 0.356334,0 0.534501,0 0.05939,0 0.119931,-0.0154 0.178166,0 0.09208,0.0245 0.176152,0.088 0.267251,0.1182 0.146271,0.0486 0.08311,-0.12611 0.267249,0.1182 0.021,0.0278 -0.01328,0.0829 0,0.11819 0.01878,0.0498 0.08909,0.0625 0.08909,0.1182 0,0.0394 -0.06808,-0.0279 -0.08909,0 -0.02099,0.0278 0,0.0788 0,0.11819"
id="path3737"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.7337943,288.75799 c 0.2672497,0.0394 0.5341897,0.0827 0.8017507,0.11819 0.08864,0.0117 0.178167,0 0.26725,0 0.178166,0 0.356334,0 0.534501,0 0.475112,0 0.950223,0 1.425334,0 0.451434,0 -0.106238,0.0352 0.356334,-0.11819 0.003,-8.4e-4 0.266776,3.3e-4 0.267251,0 0.02099,-0.0278 0,-0.0788 0,-0.1182"
id="path3739"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 13.29713,285.21216 c 0.118779,0.0394 0.246828,0.0455 0.356334,0.11819 0.0668,0.0443 -0.04028,0.16033 -0.08908,0.35458 -0.0094,0.0374 0,0.0788 0,0.11819 0,0.1182 0.01747,0.23869 0,0.35459 -0.01302,0.0864 -0.07606,0.15001 -0.08908,0.23639 -0.01747,0.1159 0,0.23639 0,0.35458 0,0.15759 0,0.31519 0,0.47278 0,0.51218 0,1.02435 0,1.53653 0,0.19699 0,0.39398 0,0.59097 0,0.0394 -0.0297,0.11819 0,0.11819 0.04199,0 0.09502,-0.0631 0.08908,-0.11819 -0.02656,-0.24667 -0.118777,-0.47278 -0.178166,-0.70917"
id="path3741"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.593217,282.84826 c 0,0.70918 -0.02809,1.41932 0,2.12751 0.0022,0.0556 0.0758,0.0653 0.08908,0.1182 0.01878,0.0747 0,0.15758 0,0.23638 0,0.19699 -0.02912,0.39781 0,0.59097 0.01302,0.0864 0.07606,0.15001 0.08908,0.23639 0.01747,0.1159 0,0.23639 0,0.35459 0,0.11819 0,0.23638 0,0.35457 0,0.0788 -0.0144,0.15995 0,0.23639 0.0161,0.0855 0.07298,0.15092 0.08908,0.2364 0.0216,0.11466 0,0.23639 0,0.35458 0,0.0394 0.02969,0.1182 0,0.1182 -0.107998,0 0.02217,-0.14762 0.08908,-0.23639"
id="path3743"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.593217,282.84826 c 0.207861,0.59098 0.370693,1.2137 0.623585,1.77292 0.03055,0.0676 0.118777,0 0.178165,0 0.128832,0 0.529514,0.025 0.623584,0 0.06511,-0.0173 0.113057,-0.10091 0.178166,-0.11819 0.14559,-0.0387 0.301379,0.0478 0.445417,0 0.06441,-0.0214 0.113751,-0.0968 0.178168,-0.11819 0.08076,-0.0268 0.341932,0 0.445417,0 0.05939,0 0.118779,0 0.178164,0 0.02969,0 0.06809,-0.0278 0.08909,0 0.0036,0.005 0,0.42937 0,0.47278"
id="path3745"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.94955,287.57605 c 0.01874,0.1243 0.0038,0.5935 0.178168,0.70915 0.03247,0.0216 0.394086,0 0.445416,0 0.296945,0 0.593889,0 0.890834,0 0.09264,0 0.464427,-0.0232 0.534501,0 0.06441,0.0214 0.113749,0.0968 0.178167,0.1182 0.05762,0.0191 0.118778,0 0.178167,0 0.02969,0 0.06252,-0.0176 0.08908,0 0.03757,0.0249 0.05153,0.0933 0.08909,0.11819 0.05312,0.0352 0.125044,-0.0352 0.178163,0 0.03756,0.0249 0.04709,0.1182 0.08908,0.1182 0.0297,0 -0.021,-0.0903 0,-0.1182 0.11878,-0.15759 0.08909,0.19699 0.08909,-0.11819"
id="path3747"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:0.10158036px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 19.532971,284.85758 c 0.118778,-0.0788 0.223534,-0.2364 0.356331,-0.2364 0.05939,0 0,0.1576 0,0.2364 0,0.47277 0,0.94554 0,1.41833 0,0.27578 0,0.55156 0,0.82735 0,0.0788 0,0.1576 0,0.2364 0,0.0788 -0.0144,0.15994 0,0.23639 0.0161,0.0855 0.06808,0.15281 0.08908,0.23639 0.0094,0.0374 -0.021,0.0903 0,0.11819 0.021,0.0278 0.06809,0.0278 0.08908,0 0.021,-0.0279 0.01326,-0.15343 0,-0.11819 -0.07152,0.18976 -0.118777,0.39397 -0.178166,0.59096"
id="path3749"
inkscape:connector-curvature="0" />
</g>
</svg>
iVBORw0KGgoAAAANSUhEUgAAAYEAAAGBCAIAAAAPO5pzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAD/lUlEQVR4XsTdh3dX2XYneBFEEAKBkJCEAAmQECIIJUQQOYPIOeecKYqqgqLiy/WCw7Pfs91tt+12e3rNjNue7tUz/efN59yv+Ln6tbtXd7tnDevUqX332Wfnve+5P/1C3dGJw2dOnzSOHD44ceTQ4cMHT544dvToEUDmU6dcHzl0YN+undu3b9u6bXzLju3jmzdt3Llj2769u22xau/Jk8eN06dP7t27++DB/Rcvnj9//uzLl8+fPn384sWz69evWj2Ey749b968/uijl8uWLWlpaa6vnzZ79syurqXbtm216/jxoyRevnxx9+6do6PDiHft2tHdtXTWzPqpU+v27Nv51bfvX75++uTpox//+Ic///nPPv74owcP7n333U9/9atffPLJx6Q8evTgxo1r1Lh37w7p9+/fRXD16mVL5ps3rxtHjhy6ffvmuXNnLpw/y/yDB/YdPnSAUXt279y6ZdOhg/vhz5097ZJpB/bv3btnFxqWjm0cAcOATxw/eomN584Yjx89sItPtmweG9yw3mzwFf+Y8SGFi7gOBjwyPOgSq0jcvWtHvDq+dTMmmLskhYfFwiX8/n17whBg16axUatDgwOjI0Pw9HcJT8+zZ05RG5nZ3qtXLpGVwGEOiKUojx+bQEYB3FCy+vatG+abN65dvnTBoCpiQvF8+ODe3Tu3eO/161eff/722bMn/CzK28Y3D6zv3zg6uHPH1q1bNm4aGx4d2bBr5/jePTt2bN9y6ODe3bvGj04cwj+ujgmxlEqSyrDKCczhPcpsGFjXv3oV04wVy7t6Vi7vWrakt2fF2jWrLa3p7zNjhbhvVY+g2I6b7chaFi5YMH/e/Ka5TfMaG+fMntMwa/asGfLHHGBG/bT66V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c3VSVxx49i1lppqZpoBpJEGbWz8GQ2eZu641K+2bxylQp5JdmIJQoM2DTqqJDzVftOpqlQtslWRWrTxs7Obdu2bSn7rm1dTg9qDU/abh7EeCwnoPyN7N9ICVku+yl2uqmv85X3E6ogxsoKcKmRELDBw45eabedsqnMppqQw318ZCNppDk9EYWHHDtN8WItq+xYxmhlE3r8vnpF6Zmbm7l+fc5DPO9QAToDli9rLq9PrF7JwpGR8rPoAwM7ym/J15dXeLMeBz6/Re2gwZFDZ86cMjhX//QANmm5CcShmgrCofit0uxqEtSI+meXUx5WnQ/PMs3htjbFPh+svXjxvP7evTsiJFR6qzTjHGFSFBrvP9L4UIHnXmN4eAwbV1CUe2BjrSUGePiETGgBA497ORDCZFWSACcKu1DkilUagehm8ctOOS3XszdKWix1eCz3ILnw5bTorLcw50fHTGN9mjqt4azMf225AVT+xcuXL13hNuDJZ3kR7tINoNwblPsVy/XuAQKnkZySVMqNU0wtWNpnysKFklg2K/cMt+U4R422JSShJ54H9++9evHi1csXFy+cd1M4eECR7evu6uzt6bG97eGVK1oYlyyXM4xbtnTJiuWGjqKey1Z6NFMFMGCzMXAozp+zX236my1hjV3qgOM27o57sH4BtoRBzGO+XSAiYsHDskhzftGb0qPndssKMWWIeAkQiik8oiPi2d5ilzTAmUcKoVcF3L+fPX0skewgvakXz59+/923nlGcEjL+3c+/cVzAKdnev3vz+tULR4eXL541DgFPnzyyBzmQcGIxkAyM7QB/Eh6nFgnOHJ6EYPAA9Onj+x9/+P4//0//8b/85//03/7rf/Fg9Ke/++Pvf/dbemn59a9+1DOTrsePH05NTdoRNogDxK36V3y225uSkK84hycV2fqSUHlluqacgl+eKv7qedkPa2PbEM01stmYs7KHDYi2heIyFGYg0sT1mXW75jsu5jU5xDxViSMSDGttKgOu1yysMd53vO5zO98OV4bKVr9wLhEVeEdBse/r6/X0iCevPebzZYJKiEYs4Xwahjxnnjt/VvxYga4PQtgqmHJCcZkNz0xGYdODZ2A5LUTRYkAgjdPTUydPHleb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rzwon7RubWlGXC90zYZQii5RkEj7f/avzH0RSmHV+FeGKsoo0EdmMdeSFac8Qq4KUoGqkr/URO85fSM4/StoN2PG3LlzWYz9hQ9rHDxQ/mhlR+RcDhUaJaFjgZLWyZsqzxdsn+dHFU1KMFd0SDw/h4Pa8wJTiuRlSk2enivy7/0rvWXy/xv/ni/93zP7d3k/78wLAbzhZH1ZW4PDqeO+/AMBS3FrJcHDmQzxyHgP6OFwvIqDcmLT2ZRnuzqJfLch0CD9yXtPgJFU5datG/IgaRsHWt7VPjU55iqev8KePl1ylkOHDky7p7jtr187NDQATYlq+ltvPTOa12t+/PH7r7764vXX712/fvXtt990KXv48HXwBKpgEDKoVH6L8cI5CdHdu7fFleskXchMVB4gJCgiSOgSaIA1Mi9ZmFQI9ABNi0rf3Adhk7urWjgpiTclmYIQkqULRdwCBxCEofiWyJd9CFez0DOjgFej8Whdo6YwbAHB+o4HEqIxRDyU0MQe2SAGt0fcN4BlrYL19c8i5MHfdAuZYkdM0W8v7KYewmQJy5GKyijR62QKnG1Z7uOu2GDo9q0bINvdHBgBHdbTKR12I8sLQ9gqBMAZfwJQGSQROwytYgkLKcweC2gTiYIkZDo9KIlquomEEYcwnUHYzbVLYVi5lU6SG2XqvETiOoaMuZhCj6AtX3xTztvyLxGlTuSnnX/F7//NP+GsOL8bJVeY8gfEueV7fPI+T8UlUYrndgY13ApzN8xQ7m4kQe+qVUHEBadcV4gRqbq6lokPJwpvzAt/NoUB2YdBGMEj31Bwzt0zaIttrocWanXNXDj/xVfNLHTBcdNUuzGoRVb+rElyKtQvKltAbQBUwPHf/IsFnj88/+exFNb6vyoNmp8W/T9JcwKRpQQu05m2upSZM/5Pl86RmoIOMF4AAAAASUVORK5CYII=
<span class="tc-popup-keep">
<$button popup=<<qualify "$:/state/popup/palette">> tooltip={{$:/language/Buttons/Palette/Hint}} aria-label={{$:/language/Buttons/Palette/Caption}} class=<<tv-config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]"><span class="big-icon green-icon">
{{$:/core/images/palette}}</span>
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/language/Buttons/Palette/Caption}}/></span>
</$list>
</$button>
</span>
<$reveal state=<<qualify "$:/state/popup/palette">> type="popup" position="below" animate="yes">
<div class="tc-drop-down" style="font-size:0.7em;">
{{$:/snippets/paletteswitcher}}
</div>
</$reveal>
<$wheel $targets="tc-wheel-target" $state="on">
<div class="tc-wheel-target" style="width: 100%; height: 500px; background-color: #333333;">
</div>
</$wheel>
{
"list": "<$list filter=\" \">\n\n</$list>\n",
"button": "<$button>\n\n</$button>\n",
"set": "<$set name= value= >\n\n</$set>\n",
"vars": "<$vars>\n\n</$vars>\n",
"action-sendmessage": "<$action-sendmessage $message=\"tm-\" />",
"action-setfield": "<$action-setfield $tiddler=\"\" $field=\" \" $index=\" \" $value=\" \" />",
"action-listops": "<$action-listops $tiddler=\"\" $field=\"\" $index=\"optional\" $filter=\"optional\" $subfilter=\"optional\" $tags=\"optional\" />",
"action-createtiddler": "<$action-createtiddler $basetitle=\"\" $savetitle=\"optional\" $timestamp=\"optional\" />",
"action-deletefield": "<$action-deletefield $tiddler=\"\" $field=\"\" />",
"action-deletetiddler": "<$action-deletetiddler $tiddler=\"optional\" $filter=\"optional\" />"
}
action-sendmessage: 4,$,'message','param','name','value'
action-setfield: 5,$,'tiddler','field','index','value','timestamp'
action-createtiddler: 3,$,'basetitle','savetitle','timestamp'
action-listops: 6,$,'tiddler','field','index','filter','subfilter','tags'
draggable: 4,'tiddler','filter','class','tag'
checkbox: 10,'tiddler','tag','inverTag','field','index','checked','unchecked','default','class','actions'
browse: 4,'multiple','deserializer','tooltip','message'
button: 16,'actions','to','message','param','set','setTo','selectedClass','default','popup','aria-label','tooltip','class','style','tag','dragTiddler','dragFilter'
codeblock: 2,'code','language'
count: 1,'filter'
droppable: 3,'action','class','tag'
dropzone: 1,'deserializer'
edit-text: 14,'tiddler','field','index','default','class','placeholder','focusPopup','focus','tag','type','size','autoHeight','minHeight','rows'
edit: 4,'tiddler','field','index','class'
fields: 4,'tiddler','template','exclude','stripTitlePrefix'
image: 6,'source','width','height','tooltip','alt','class'
importvariables: 1','filter'
keyboard: 6,'actions','message','param','key','class','tag'
linkcatcher: 5,'to','message','set','setTo','actions'
link: 8,'to','aria-label','tooltip','tabindex','draggable','tag','class','overrideClass'
macrocall: 4,$,'name','type','output'
navigator: 4,'story','history','openLinkFromInsideRiver','openLinkFromOutsideRiver'
radio: 5','tiddler','field','index','value','class'
reveal: 10,'state','tag','type','text','class','style','position','default','animate','retain'
scrollable: 2,'class','fallThrough'
select: 8,'tiddler','field','index','class','default','multiple','size','actions'
set: 8,'name','value','tiddler','field','index','filter','select','emptyValue'
text: 1,'text'
tiddler: 1,'tiddler'
transclude: 5,'tiddler','field','index','subtiddler','mode'
view: 7,'tiddler','field','index','format','template','subtiddler','mode'
wikify: 5,'name','text','type','mode','output'
list: 7,'filter','template','editTemplate','variable','emptyMessage','storyview','history'
<div class="video-background">
<div class="video-foreground">
<iframe src="https://www.youtube.com/embed/W0LHTWG-UmQ?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ" frameborder="0" allowfullscreen></iframe>
</div>
</div>
.video-background {
background: #000;
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
z-index: -99;
box-sizing: border-box;
}
.video-foreground,
.video-background iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
box-sizing: border-box;
}
@media (max-aspect-ratio: 16/9) {
.video-foreground { width: 300%; left: -100%; }
box-sizing: border-box;
}
@media all and (max-width: 600px) {
.vid-info { width: 50%; padding: .5rem; }
.vid-info h1 { margin-bottom: .2rem; }
box-sizing: border-box;
}
@media all and (max-width: 500px) {
.vid-info .acronym { display: none; }
box-sizing: border-box;
}